diff --git a/lib/lib.umd.min.js.map b/lib/lib.umd.min.js.map index 79d8afcc..00a063d2 100644 --- a/lib/lib.umd.min.js.map +++ b/lib/lib.umd.min.js.map @@ -1 +1 @@ -{"version":3,"file":"lib.umd.min.js","sources":["../node_modules/vue-class-component/dist/vue-class-component.esm.js","../src/shims-vue-composition-api.ts","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDCOMPLETED = 'REFUND_COMPLETED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\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 __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\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDCOMPLETED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDCOMPLETED,\n SlipStatus.REFUNDREJECTED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDCOMPLETED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref({})\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = {}\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async () => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n // for time being setting limit to avoid overloading\n params.page = 1\n params.limit = 50\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipResult.value = response.data?.items\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n routingSlipNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n receiptNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n status: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n businessIdentifier: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n accountName: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n initiator: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n remainingAmount: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n dateFilter: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n chequeReceiptNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n function clearFilter () {\n resetSearchParams()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator\n }\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\n }\n}\n","\n\n\n\n\n\n\n","\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n
\n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n \n \n \n\n","\n\n\n","\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n\n","\n
\n \n \n \n \n mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_defineProperty","key","value","Object","defineProperty","enumerable","configurable","writable","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","Array","isArray","i","arr2","length","iter","toString","call","from","TypeError","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","to","forwardMetadata","getOwnPropertyNames","forEach","propertyKey","metaKey","metadata","getOwnMetadata","Vue","use","VueCompositionAPI","fakeArray","__proto__","hasProto","createDecorator","factory","target","index","Ctor","__decorators__","push","options","isPrimitive","type","warn","message","console","collectDataFromConstructor","vm","Component","originalInit","_init","_this","this","keys","$options","props","hasOwnProperty","get","set","data","plainData","process","env","NODE_ENV","$internalHooks","componentFactory","arguments","name","_componentTag","proto","indexOf","descriptor","getOwnPropertyDescriptor","methods","mixins","computed","decorators","fn","superProto","getPrototypeOf","Super","Extended","extend","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$2","concat","registerHooks","apply","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","k","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","display","className","sortable","hideInSearchColumnFilter","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","outputType","is224","Sha256","update","createMethod","method","nodeWrap","create","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","HmacSha256","createHmacMethod","sharedMemory","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","code","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","toKeycloakPromise","promise","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","status","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","reduce","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","ca","cookie","expirationDate","toUTCString","success","handleSuccess","handleError","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","addPropertiesToObject","_loop_1","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","n","v","op","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","funcName","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$4","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDCOMPLETED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","slipNumber","resetRoutingSlipDetails","resetSearchParams","searchRoutingSlip","dateFilter","startDate","endDate","page","items","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","headerSearch","displayedHeaderSearch","displayed","receiptNumber","accountName","initiator","remainingAmount","searchNow","debouncedSearch","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$3","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","__decorateClass$2","SearchColumnFilterComponent$1","nav","$set","StatusList","__decorateClass$1","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","comment","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Search","commonUtil","_objectDestructuringEmpty","Search$1","components","statusListComponent","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","colors","folio","CHEQUE","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","Boolean","required","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","acc","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","plugin","GlobalVue"],"mappings":";;;;;;;;AAOA,SAASA,QAAQC,GAWf,OATED,QADoB,mBAAXE,QAAoD,iBAApBA,OAAOC,SACtC,SAAUF,GAClB,cAAcA,CACpB,EAEc,SAAUA,GACXA,OAAAA,GAAyB,mBAAXC,QAAyBD,EAAIG,cAAgBF,QAAUD,IAAQC,OAAOG,UAAY,gBAAkBJ,CAC/H,GAGiBA,EACjB,CAES,SAAAK,gBAAgBL,EAAKM,EAAKC,GAY1B,OAXHD,KAAON,EACFQ,OAAAC,eAAeT,EAAKM,EAAK,CAC9BC,QACAG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZZ,EAAIM,GAAOC,EAGNP,CACT,CAEA,SAASa,mBAAmBC,GAC1B,OAAOC,mBAAmBD,IAAQE,iBAAiBF,IAAQG,oBAC7D,CAEA,SAASF,mBAAmBD,GACtB,GAAAI,MAAMC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+mE,KAAK1pD,OACb6G,EAAEkkD,SAASlkD,EAAE7G,SAIfhd,QAAQqQ,MAAM,gDAIZ1Q,EAAQ6iB,MAEV9d,OAAOszE,SAAWr4E,EAAQ6iB,MAG1BxiB,QAAQqQ,MAAM,qCAGhBvR,EAAIitE,UAAU,uBAAwBvI,OACxC,CAEA,MAAMyU,OAAS,CACbvM;AAGF,IAAIwM,UAAY;MACM,oBAAXxzE,OACTwzE,UAAYxzE,OAAO5F,IACQ,oBAAXqG,SAChB+yE,UAAY/yE,OAAOqyE,KAGjBU,WACFA,UAAUn5E,IAAIk5E,QAGhBzU,OAAOkI,QAAUA","x_google_ignoreList":[0,2,3,4,6,7,8,9,10,11,12,13,14,15,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,68,69]} \ No newline at end of file +{"version":3,"file":"lib.umd.min.js","sources":["../node_modules/vue-class-component/dist/vue-class-component.esm.js","../src/shims-vue-composition-api.ts","../node_modules/vue-property-decorator/lib/decorators/Emit.js","../node_modules/vue-property-decorator/lib/helpers/metadata.js","../node_modules/vue-property-decorator/lib/decorators/Prop.js","../src/util/constants.ts","../node_modules/js-sha256/src/sha256.js","../node_modules/keycloak-js/node_modules/base64-js/index.js","../node_modules/keycloak-js/dist/keycloak.js","../node_modules/sbc-common-components/src/util/constants.ts","../node_modules/sbc-common-components/src/util/common-util.ts","../node_modules/sbc-common-components/src/util/config-helper.ts","../node_modules/vuex-module-decorators/dist/esm/index.js","../node_modules/sbc-common-components/src/store/modules/auth.ts","../node_modules/sbc-common-components/src/services/keycloak.services.ts","../node_modules/moment/dist/moment.js","../src/util/common-util.ts","../src/util/config-helper.ts","../src/util/debounce.ts","../src/composables/useIndicators.ts","../src/composables/common/useLoader.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/defaults.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/util/http-util.ts","../src/services/codes.service.ts","../src/composables/useCodes.ts","../src/composables/common/useStatusList.ts","../src/services/routingSlip.services.ts","../src/composables/useRoutingSlip.ts","../src/composables/Dashboard/useSearch.ts","../src/composables/common/useDateRange.ts","../src/composables/common/useSearchColumnFilterComponent.ts","../src/components/common/DateRangeFilter.vue","../src/components/common/DateRangeFilter.vue?vue&type=template&lang.js","../src/components/common/SearchColumnFilterComponent.vue","../src/components/common/SearchColumnFilterComponent.vue?vue&type=template&lang.js","../src/components/common/StatusList.vue","../src/components/common/StatusList.vue?vue&type=template&lang.js","../src/composables/Dashboard/useDashboard.ts","../src/directives/can.ts","../src/components/Dashboard/Search.vue","../src/components/Dashboard/Search.vue?vue&type=template&lang.js","../node_modules/vue-i18n/dist/vue-i18n.esm.js","../node_modules/vue-i18n-composable/dist/index.mjs","../src/plugins/i18n.ts","../src/lib-setup.js"],"sourcesContent":["/**\n * vue-class-component v7.2.6\n * (c) 2015-present Evan You\n * @license MIT\n */\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\n// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\nfunction createDecorator(factory) {\n return function (target, key, index) {\n var Ctor = typeof target === 'function' ? target : target.constructor;\n\n if (!Ctor.__decorators__) {\n Ctor.__decorators__ = [];\n }\n\n if (typeof index !== 'number') {\n index = undefined;\n }\n\n Ctor.__decorators__.push(function (options) {\n return factory(options, key, index);\n });\n };\n}\nfunction mixins() {\n for (var _len = arguments.length, Ctors = new Array(_len), _key = 0; _key < _len; _key++) {\n Ctors[_key] = arguments[_key];\n }\n\n return Vue.extend({\n mixins: Ctors\n });\n}\nfunction isPrimitive(value) {\n var type = _typeof(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\nfunction warn(message) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-class-component] ' + message);\n }\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this;\n\n // proxy to actual vm\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {\n warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');\n }\n }\n\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\nvar reservedPropertyNames = [// Unique id\n'cid', // Super Vue constructor\n'super', // Component options that will be used by the component\n'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets\n'component', 'directive', 'filter'];\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {\n warn(\"Static property name '\".concat(key, \"' declared on class '\").concat(Original.name, \"' \") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');\n }\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nexport default Component;\nexport { createDecorator, mixins };\n","// This needs to be done, otherwise these App.vue gets hoisted above the statements below:\nimport VueCompositionAPI from '@vue/composition-api'\nimport Vue from 'vue'\nVue.use(VueCompositionAPI)\n","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\n// Code copied from Vue/src/shared/util.js\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };\n/**\n * decorator of an event-emitter function\n * @param event The name of the event\n * @return MethodDecorator\n */\nexport function Emit(event) {\n return function (_target, propertyKey, descriptor) {\n var key = hyphenate(propertyKey);\n var original = descriptor.value;\n descriptor.value = function emitter() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var emit = function (returnValue) {\n var emitName = event || key;\n if (returnValue === undefined) {\n if (args.length === 0) {\n _this.$emit(emitName);\n }\n else if (args.length === 1) {\n _this.$emit(emitName, args[0]);\n }\n else {\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n }\n else {\n args.unshift(returnValue);\n _this.$emit.apply(_this, __spreadArrays([emitName], args));\n }\n };\n var returnValue = original.apply(this, args);\n if (isPromise(returnValue)) {\n returnValue.then(emit);\n }\n else {\n emit(returnValue);\n }\n return returnValue;\n };\n };\n}\nfunction isPromise(obj) {\n return obj instanceof Promise || (obj && typeof obj.then === 'function');\n}\n","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n LaunchDarklyFlags = 'LD_FLAGS',\n ExtraProvincialUser = 'EXTRAPROVINCIAL_USER',\n SessionSynced = 'SESSION_SYNCED',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n PayApiUrl = 'PAY_API_URL',\n StatusApiUrl = 'STATUS_API_URL',\n FasWebUrl = 'FAS_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum DateFilterCodes {\n TODAY = 'TODAY',\n YESTERDAY = 'YESTERDAY',\n LASTWEEK = 'LASTWEEK',\n LASTMONTH = 'LASTMONTH',\n CUSTOMRANGE = 'CUSTOMRANGE',\n}\n\nexport enum PaymentMethods {\n CASH = 'CASH',\n CHEQUE = 'CHEQUE',\n}\n\nexport enum SlipStatus {\n ACTIVE = 'ACTIVE',\n COMPLETE = 'COMPLETE',\n BOUNCED = 'BOUNCED',\n NSF = 'NSF',\n REFUND = 'REFUND',\n LAST = 'LAST',\n HOLD = 'HOLD',\n LINKED = 'LINKED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n REFUNDAUTHORIZED = 'REFUND_AUTHORIZED',\n REFUNDCOMPLETED = 'REFUND_COMPLETED',\n REFUNDREJECTED = 'REFUND_REJECTED',\n CANCEL_REFUND_REQUEST = 'CANCEL_REFUND_REQUEST',\n CANCELWRITEOFFREQUEST='CANCEL_WRITE_OFF_REQUEST',\n WRITEOFFAUTHORIZED='WRITE_OFF_AUTHORIZED',\n WRITEOFFREQUESTED='WRITE_OFF_REQUESTED',\n WRITEOFFCOMPLETED='WRITE_OFF_COMPLETED',\n VOID='VOID',\n CORRECTION='CORRECTION'\n}\n\nexport enum SlipStatusLabel {\n ACTIVE = 'Place routing slip to active',\n NSF = 'Place routing slip to NSF',\n HOLD = 'Place routing slip on hold',\n LINKED = 'LINKED',\n REFUND_REQUESTED = 'Refund request',\n WRITE_OFF_REQUESTED = 'Write off request',\n CANCEL_REFUND_REQUEST = 'Cancel refund request',\n REFUND_AUTHORIZED='Review refund request',\n WRITE_OFF_AUTHORIZED='Authorize Write off request',\n CANCEL_WRITE_OFF_REQUEST='Cancel Write off request',\n VOID='Void Routing Slip',\n // CORRECTION='Correct Routing Slip' - Future\n}\n\nexport enum Role {\n FAS_USER = 'fas_user',\n FAS_EDIT = 'fas_edit',\n FAS_REPORTS = 'fas_reports',\n FAS_SEARCH = 'fas_search',\n FAS_VIEW = 'fas_view',\n FAS_CREATE = 'fas_create',\n FAS_LNK = 'fas_link',\n FAS_TRANSACTION = 'fas_transaction',\n FAS_REFUND_APPROVER = 'fas_refund_approver',\n FAS_REFUND = 'fas_refund',\n FAS_VOID = 'fas_void',\n FAS_CORRECTION = 'fas_correction'\n}\n\nexport enum InvoiceStatus {\n COMPLETED = 'COMPLETED',\n REFUNDED = 'REFUNDED',\n DELETE_ACCEPTED = 'DELETE_ACCEPTED',\n REFUNDREQUEST = 'REFUND_REQUESTED',\n}\n\nexport enum ApiErrors {\n FAS_INVALID_ROUTING_SLIP_DIGITS = 'FAS_INVALID_ROUTING_SLIP_DIGITS'\n}\n\nexport enum CreateRoutingSlipStatus {\n VALID = 'VALID',\n EXISTS = 'EXISTS',\n INVALID_DIGITS = 'INVALID_DIGITS',\n}\n\nexport enum PatchActions {\n UPDATE_STATUS = 'updateStatus'\n}\n\nexport const AXIOS_ERROR_ALERT_TIME_OUT = 5000\n\nexport const headerSearchTitle =\n[\n {\n text: 'Routing Slip Number',\n align: 'start',\n value: 'routingSlipNumber',\n display: true,\n className: 'routing-slip'\n },\n {\n text: 'Receipt Number',\n align: 'start',\n sortable: false,\n value: 'receiptNumber',\n display: true,\n className: 'receiptNumber'\n },\n {\n text: 'Entity Number',\n align: 'start',\n value: 'accountName',\n sortable: false,\n display: false,\n className: 'accountName'\n },\n {\n text: 'Created By',\n align: 'start',\n value: 'createdName',\n sortable: false,\n display: false,\n className: 'createdName'\n },\n {\n text: 'Date',\n align: 'start',\n sortable: false,\n value: 'date',\n display: true,\n className: 'date'\n },\n {\n text: 'Status',\n align: 'start',\n sortable: false,\n value: 'status',\n display: true,\n className: 'status'\n },\n {\n text: 'Reference Number',\n align: 'start',\n value: 'businessIdentifier',\n sortable: false,\n display: true,\n className: 'businessIdentifier'\n },\n {\n text: 'Cheque Number',\n align: 'start',\n value: 'chequeReceiptNumber',\n sortable: false,\n display: false,\n className: 'cheque-receipt-number'\n },\n {\n text: 'Balance',\n align: 'right',\n value: 'remainingAmount',\n sortable: false,\n display: true,\n className: 'remainingAmount'\n },\n {\n text: 'Actions',\n align: 'start',\n value: '',\n sortable: false,\n display: true,\n hideInSearchColumnFilter: true,\n className: 'action'\n }\n]\n","/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var ERROR = 'input is invalid type';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA256_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var EXTRA = [-2147483648, 8388608, 32768, 128];\n var SHIFT = [24, 16, 8, 0];\n var K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ];\n var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\n\n var blocks = [];\n\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (outputType, is224) {\n return function (message) {\n return new Sha256(is224, true).update(message)[outputType]();\n };\n };\n\n var createMethod = function (is224) {\n var method = createOutputMethod('hex', is224);\n if (NODE_JS) {\n method = nodeWrap(method, is224);\n }\n method.create = function () {\n return new Sha256(is224);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createOutputMethod(type, is224);\n }\n return method;\n };\n\n var nodeWrap = function (method, is224) {\n var crypto = eval(\"require('crypto')\");\n var Buffer = eval(\"require('buffer').Buffer\");\n var algorithm = is224 ? 'sha224' : 'sha256';\n var nodeMethod = function (message) {\n if (typeof message === 'string') {\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\n } else {\n if (message === null || message === undefined) {\n throw new Error(ERROR);\n } else if (message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n }\n }\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n message.constructor === Buffer) {\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\n } else {\n return method(message);\n }\n };\n return nodeMethod;\n };\n\n var createHmacOutputMethod = function (outputType, is224) {\n return function (key, message) {\n return new HmacSha256(key, is224, true).update(message)[outputType]();\n };\n };\n\n var createHmacMethod = function (is224) {\n var method = createHmacOutputMethod('hex', is224);\n method.create = function (key) {\n return new HmacSha256(key, is224);\n };\n method.update = function (key, message) {\n return method.create(key).update(message);\n };\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createHmacOutputMethod(type, is224);\n }\n return method;\n };\n\n function Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else { // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n }\n\n Sha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code, index = 0, i, length = message.length, blocks = this.blocks;\n\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n }\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[15] = this.bytes << 3;\n this.hash();\n };\n\n Sha256.prototype.hash = function () {\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = t1 - 150054599 << 0;\n d = t1 + 24177077 << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = t1 - 1521486534 << 0;\n d = t1 + 143694565 << 0;\n }\n this.first = false;\n } else {\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = d + t1 << 0;\n d = t1 + t2 << 0;\n }\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (h & e) ^ (~h & f);\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = c + t1 << 0;\n c = t1 + t2 << 0;\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = b + t1 << 0;\n b = t1 + t2 << 0;\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = a + t1 << 0;\n a = t1 + t2 << 0;\n }\n\n this.h0 = this.h0 + a << 0;\n this.h1 = this.h1 + b << 0;\n this.h2 = this.h2 + c << 0;\n this.h3 = this.h3 + d << 0;\n this.h4 = this.h4 + e << 0;\n this.h5 = this.h5 + f << 0;\n this.h6 = this.h6 + g << 0;\n this.h7 = this.h7 + h << 0;\n };\n\n Sha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\n if (!this.is224) {\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\n }\n return hex;\n };\n\n Sha256.prototype.toString = Sha256.prototype.hex;\n\n Sha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n h6 = this.h6, h7 = this.h7;\n\n var arr = [\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\n ];\n if (!this.is224) {\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\n }\n return arr;\n };\n\n Sha256.prototype.array = Sha256.prototype.digest;\n\n Sha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n };\n\n function HmacSha256(key, is224, sharedMemory) {\n var i, type = typeof key;\n if (type === 'string') {\n var bytes = [], length = key.length, index = 0, code;\n for (i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n } else {\n if (type === 'object') {\n if (key === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n }\n\n if (key.length > 64) {\n key = (new Sha256(is224, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (i = 0; i < 64; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha256.call(this, is224, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha256.prototype = new Sha256();\n\n HmacSha256.prototype.finalize = function () {\n Sha256.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha256.call(this, this.is224, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha256.prototype.finalize.call(this);\n }\n };\n\n var exports = createMethod();\n exports.sha256 = exports;\n exports.sha224 = createMethod(true);\n exports.sha256.hmac = createHmacMethod();\n exports.sha224.hmac = createHmacMethod(true);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha256 = exports.sha256;\n root.sha224 = exports.sha224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*\n * Copyright 2016 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n(function(root, factory) {\n if ( typeof exports === 'object' ) {\n if ( typeof module === 'object' ) {\n module.exports = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n } else {\n exports[\"keycloak\"] = factory( require(\"js-sha256\"), require(\"base64-js\") ); \n }\n } else {\n /**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.9.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2017\n * @license MIT\n */\n !function () { \"use strict\"; function t(t, i) { i ? (d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d) : this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t ? (this.h0 = 3238371032, this.h1 = 914150663, this.h2 = 812702999, this.h3 = 4144912697, this.h4 = 4290775857, this.h5 = 1750603025, this.h6 = 1694076839, this.h7 = 3204075428) : (this.h0 = 1779033703, this.h1 = 3144134277, this.h2 = 1013904242, this.h3 = 2773480762, this.h4 = 1359893119, this.h5 = 2600822924, this.h6 = 528734635, this.h7 = 1541459225), this.block = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0, this.is224 = t } function i(i, r, s) { var e, n = typeof i; if (\"string\" === n) { var o, a = [], u = i.length, c = 0; for (e = 0; e < u; ++e)(o = i.charCodeAt(e)) < 128 ? a[c++] = o : o < 2048 ? (a[c++] = 192 | o >> 6, a[c++] = 128 | 63 & o) : o < 55296 || o >= 57344 ? (a[c++] = 224 | o >> 12, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o) : (o = 65536 + ((1023 & o) << 10 | 1023 & i.charCodeAt(++e)), a[c++] = 240 | o >> 18, a[c++] = 128 | o >> 12 & 63, a[c++] = 128 | o >> 6 & 63, a[c++] = 128 | 63 & o); i = a } else { if (\"object\" !== n) throw new Error(h); if (null === i) throw new Error(h); if (f && i.constructor === ArrayBuffer) i = new Uint8Array(i); else if (!(Array.isArray(i) || f && ArrayBuffer.isView(i))) throw new Error(h) } i.length > 64 && (i = new t(r, !0).update(i).array()); var y = [], p = []; for (e = 0; e < 64; ++e) { var l = i[e] || 0; y[e] = 92 ^ l, p[e] = 54 ^ l } t.call(this, r, s), this.update(p), this.oKeyPad = y, this.inner = !0, this.sharedMemory = s } var h = \"input is invalid type\", r = \"object\" == typeof window, s = r ? window : {}; s.JS_SHA256_NO_WINDOW && (r = !1); var e = !r && \"object\" == typeof self, n = !s.JS_SHA256_NO_NODE_JS && \"object\" == typeof process && process.versions && process.versions.node; n ? s = global : e && (s = self); var o = !s.JS_SHA256_NO_COMMON_JS && \"object\" == typeof module && module.exports, a = \"function\" == typeof define && define.amd, f = !s.JS_SHA256_NO_ARRAY_BUFFER && \"undefined\" != typeof ArrayBuffer, u = \"0123456789abcdef\".split(\"\"), c = [-2147483648, 8388608, 32768, 128], y = [24, 16, 8, 0], p = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], l = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"], d = []; !s.JS_SHA256_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) }), !f || !s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) { return \"object\" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer }); var A = function (i, h) { return function (r) { return new t(h, !0).update(r)[i]() } }, w = function (i) { var h = A(\"hex\", i); n && (h = b(h, i)), h.create = function () { return new t(i) }, h.update = function (t) { return h.create().update(t) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = A(s, i) } return h }, b = function (t, i) { var r = eval(\"require('crypto')\"), s = eval(\"require('buffer').Buffer\"), e = i ? \"sha224\" : \"sha256\", n = function (i) { if (\"string\" == typeof i) return r.createHash(e).update(i, \"utf8\").digest(\"hex\"); if (null === i || void 0 === i) throw new Error(h); return i.constructor === ArrayBuffer && (i = new Uint8Array(i)), Array.isArray(i) || ArrayBuffer.isView(i) || i.constructor === s ? r.createHash(e).update(new s(i)).digest(\"hex\") : t(i) }; return n }, v = function (t, h) { return function (r, s) { return new i(r, h, !0).update(s)[t]() } }, _ = function (t) { var h = v(\"hex\", t); h.create = function (h) { return new i(h, t) }, h.update = function (t, i) { return h.create(t).update(i) }; for (var r = 0; r < l.length; ++r) { var s = l[r]; h[s] = v(s, t) } return h }; t.prototype.update = function (t) { if (!this.finalized) { var i, r = typeof t; if (\"string\" !== r) { if (\"object\" !== r) throw new Error(h); if (null === t) throw new Error(h); if (f && t.constructor === ArrayBuffer) t = new Uint8Array(t); else if (!(Array.isArray(t) || f && ArrayBuffer.isView(t))) throw new Error(h); i = !0 } for (var s, e, n = 0, o = t.length, a = this.blocks; n < o;) { if (this.hashed && (this.hashed = !1, a[0] = this.block, a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0), i) for (e = this.start; n < o && e < 64; ++n)a[e >> 2] |= t[n] << y[3 & e++]; else for (e = this.start; n < o && e < 64; ++n)(s = t.charCodeAt(n)) < 128 ? a[e >> 2] |= s << y[3 & e++] : s < 2048 ? (a[e >> 2] |= (192 | s >> 6) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : s < 55296 || s >= 57344 ? (a[e >> 2] |= (224 | s >> 12) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++n)), a[e >> 2] |= (240 | s >> 18) << y[3 & e++], a[e >> 2] |= (128 | s >> 12 & 63) << y[3 & e++], a[e >> 2] |= (128 | s >> 6 & 63) << y[3 & e++], a[e >> 2] |= (128 | 63 & s) << y[3 & e++]); this.lastByteIndex = e, this.bytes += e - this.start, e >= 64 ? (this.block = a[16], this.start = e - 64, this.hash(), this.hashed = !0) : this.start = e } return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this } }, t.prototype.finalize = function () { if (!this.finalized) { this.finalized = !0; var t = this.blocks, i = this.lastByteIndex; t[16] = this.block, t[i >> 2] |= c[3 & i], this.block = t[16], i >= 56 && (this.hashed || this.hash(), t[0] = this.block, t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.hBytes << 3 | this.bytes >>> 29, t[15] = this.bytes << 3, this.hash() } }, t.prototype.hash = function () { var t, i, h, r, s, e, n, o, a, f = this.h0, u = this.h1, c = this.h2, y = this.h3, l = this.h4, d = this.h5, A = this.h6, w = this.h7, b = this.blocks; for (t = 16; t < 64; ++t)i = ((s = b[t - 15]) >>> 7 | s << 25) ^ (s >>> 18 | s << 14) ^ s >>> 3, h = ((s = b[t - 2]) >>> 17 | s << 15) ^ (s >>> 19 | s << 13) ^ s >>> 10, b[t] = b[t - 16] + i + b[t - 7] + h << 0; for (a = u & c, t = 0; t < 64; t += 4)this.first ? (this.is224 ? (e = 300032, w = (s = b[0] - 1413257819) - 150054599 << 0, y = s + 24177077 << 0) : (e = 704751109, w = (s = b[0] - 210244248) - 1521486534 << 0, y = s + 143694565 << 0), this.first = !1) : (i = (f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10), r = (e = f & u) ^ f & c ^ a, w = y + (s = w + (h = (l >>> 6 | l << 26) ^ (l >>> 11 | l << 21) ^ (l >>> 25 | l << 7)) + (l & d ^ ~l & A) + p[t] + b[t]) << 0, y = s + (i + r) << 0), i = (y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10), r = (n = y & f) ^ y & u ^ e, A = c + (s = A + (h = (w >>> 6 | w << 26) ^ (w >>> 11 | w << 21) ^ (w >>> 25 | w << 7)) + (w & l ^ ~w & d) + p[t + 1] + b[t + 1]) << 0, i = ((c = s + (i + r) << 0) >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10), r = (o = c & y) ^ c & f ^ n, d = u + (s = d + (h = (A >>> 6 | A << 26) ^ (A >>> 11 | A << 21) ^ (A >>> 25 | A << 7)) + (A & w ^ ~A & l) + p[t + 2] + b[t + 2]) << 0, i = ((u = s + (i + r) << 0) >>> 2 | u << 30) ^ (u >>> 13 | u << 19) ^ (u >>> 22 | u << 10), r = (a = u & c) ^ u & y ^ o, l = f + (s = l + (h = (d >>> 6 | d << 26) ^ (d >>> 11 | d << 21) ^ (d >>> 25 | d << 7)) + (d & A ^ ~d & w) + p[t + 3] + b[t + 3]) << 0, f = s + (i + r) << 0; this.h0 = this.h0 + f << 0, this.h1 = this.h1 + u << 0, this.h2 = this.h2 + c << 0, this.h3 = this.h3 + y << 0, this.h4 = this.h4 + l << 0, this.h5 = this.h5 + d << 0, this.h6 = this.h6 + A << 0, this.h7 = this.h7 + w << 0 }, t.prototype.hex = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = u[t >> 28 & 15] + u[t >> 24 & 15] + u[t >> 20 & 15] + u[t >> 16 & 15] + u[t >> 12 & 15] + u[t >> 8 & 15] + u[t >> 4 & 15] + u[15 & t] + u[i >> 28 & 15] + u[i >> 24 & 15] + u[i >> 20 & 15] + u[i >> 16 & 15] + u[i >> 12 & 15] + u[i >> 8 & 15] + u[i >> 4 & 15] + u[15 & i] + u[h >> 28 & 15] + u[h >> 24 & 15] + u[h >> 20 & 15] + u[h >> 16 & 15] + u[h >> 12 & 15] + u[h >> 8 & 15] + u[h >> 4 & 15] + u[15 & h] + u[r >> 28 & 15] + u[r >> 24 & 15] + u[r >> 20 & 15] + u[r >> 16 & 15] + u[r >> 12 & 15] + u[r >> 8 & 15] + u[r >> 4 & 15] + u[15 & r] + u[s >> 28 & 15] + u[s >> 24 & 15] + u[s >> 20 & 15] + u[s >> 16 & 15] + u[s >> 12 & 15] + u[s >> 8 & 15] + u[s >> 4 & 15] + u[15 & s] + u[e >> 28 & 15] + u[e >> 24 & 15] + u[e >> 20 & 15] + u[e >> 16 & 15] + u[e >> 12 & 15] + u[e >> 8 & 15] + u[e >> 4 & 15] + u[15 & e] + u[n >> 28 & 15] + u[n >> 24 & 15] + u[n >> 20 & 15] + u[n >> 16 & 15] + u[n >> 12 & 15] + u[n >> 8 & 15] + u[n >> 4 & 15] + u[15 & n]; return this.is224 || (a += u[o >> 28 & 15] + u[o >> 24 & 15] + u[o >> 20 & 15] + u[o >> 16 & 15] + u[o >> 12 & 15] + u[o >> 8 & 15] + u[o >> 4 & 15] + u[15 & o]), a }, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () { this.finalize(); var t = this.h0, i = this.h1, h = this.h2, r = this.h3, s = this.h4, e = this.h5, n = this.h6, o = this.h7, a = [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, 255 & t, i >> 24 & 255, i >> 16 & 255, i >> 8 & 255, 255 & i, h >> 24 & 255, h >> 16 & 255, h >> 8 & 255, 255 & h, r >> 24 & 255, r >> 16 & 255, r >> 8 & 255, 255 & r, s >> 24 & 255, s >> 16 & 255, s >> 8 & 255, 255 & s, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e, n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, 255 & n]; return this.is224 || a.push(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, 255 & o), a }, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () { this.finalize(); var t = new ArrayBuffer(this.is224 ? 28 : 32), i = new DataView(t); return i.setUint32(0, this.h0), i.setUint32(4, this.h1), i.setUint32(8, this.h2), i.setUint32(12, this.h3), i.setUint32(16, this.h4), i.setUint32(20, this.h5), i.setUint32(24, this.h6), this.is224 || i.setUint32(28, this.h7), t }, i.prototype = new t, i.prototype.finalize = function () { if (t.prototype.finalize.call(this), this.inner) { this.inner = !1; var i = this.array(); t.call(this, this.is224, this.sharedMemory), this.update(this.oKeyPad), this.update(i), t.prototype.finalize.call(this) } }; var B = w(); B.sha256 = B, B.sha224 = w(!0), B.sha256.hmac = _(), B.sha224.hmac = _(!0), o ? module.exports = B : (s.sha256 = B.sha256, s.sha224 = B.sha224, a && define(function () { return B })) }();\n\n /**\n * [base64-js]{@link https://github.com/beatgammit/base64-js}\n *\n * @version v1.3.0 \n * @author Kirill, Fomichev\n * @copyright Kirill, Fomichev 2014\n * @license MIT\n */\n (function (r) { if (typeof exports === \"object\" && typeof module !== \"undefined\") { module.exports = r() } else if (typeof define === \"function\" && define.amd) { define([], r) } else { var e; if (typeof window !== \"undefined\") { e = window } else if (typeof global !== \"undefined\") { e = global } else if (typeof self !== \"undefined\") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function r(e, n, t) { function o(f, i) { if (!n[f]) { if (!e[f]) { var u = \"function\" == typeof require && require; if (!i && u) return u(f, !0); if (a) return a(f, !0); var v = new Error(\"Cannot find module '\" + f + \"'\"); throw v.code = \"MODULE_NOT_FOUND\", v } var d = n[f] = { exports: {} }; e[f][0].call(d.exports, function (r) { var n = e[f][1][r]; return o(n || r) }, d, d.exports, r, e, n, t) } return n[f].exports } for (var a = \"function\" == typeof require && require, f = 0; f < t.length; f++)o(t[f]); return o } return r }()({ \"/\": [function (r, e, n) { \"use strict\"; n.byteLength = d; n.toByteArray = h; n.fromByteArray = p; var t = []; var o = []; var a = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array; var f = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"; for (var i = 0, u = f.length; i < u; ++i) { t[i] = f[i]; o[f.charCodeAt(i)] = i } o[\"-\".charCodeAt(0)] = 62; o[\"_\".charCodeAt(0)] = 63; function v(r) { var e = r.length; if (e % 4 > 0) { throw new Error(\"Invalid string. Length must be a multiple of 4\") } var n = r.indexOf(\"=\"); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function d(r) { var e = v(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function c(r, e, n) { return (e + n) * 3 / 4 - n } function h(r) { var e; var n = v(r); var t = n[0]; var f = n[1]; var i = new a(c(r, t, f)); var u = 0; var d = f > 0 ? t - 4 : t; for (var h = 0; h < d; h += 4) { e = o[r.charCodeAt(h)] << 18 | o[r.charCodeAt(h + 1)] << 12 | o[r.charCodeAt(h + 2)] << 6 | o[r.charCodeAt(h + 3)]; i[u++] = e >> 16 & 255; i[u++] = e >> 8 & 255; i[u++] = e & 255 } if (f === 2) { e = o[r.charCodeAt(h)] << 2 | o[r.charCodeAt(h + 1)] >> 4; i[u++] = e & 255 } if (f === 1) { e = o[r.charCodeAt(h)] << 10 | o[r.charCodeAt(h + 1)] << 4 | o[r.charCodeAt(h + 2)] >> 2; i[u++] = e >> 8 & 255; i[u++] = e & 255 } return i } function s(r) { return t[r >> 18 & 63] + t[r >> 12 & 63] + t[r >> 6 & 63] + t[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join(\"\") } function p(r) { var e; var n = r.length; var o = n % 3; var a = []; var f = 16383; for (var i = 0, u = n - o; i < u; i += f) { a.push(l(r, i, i + f > u ? u : i + f)) } if (o === 1) { e = r[n - 1]; a.push(t[e >> 2] + t[e << 4 & 63] + \"==\") } else if (o === 2) { e = (r[n - 2] << 8) + r[n - 1]; a.push(t[e >> 10] + t[e >> 4 & 63] + t[e << 2 & 63] + \"=\") } return a.join(\"\") } }, {}] }, {}, [])(\"/\") });\n\n /**\n * [promise-polyfill]{@link https://github.com/taylorhakes/promise-polyfill}\n *\n * @version v8.1.3 \n * @author Hakes, Taylor\n * @copyright Hakes, Taylor 2014\n * @license MIT\n */\n !function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n():\"function\"==typeof define&&define.amd?define(n):n()}(0,function(){\"use strict\";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||\"undefined\"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if(\"function\"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype[\"catch\"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype[\"finally\"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&(\"object\"==typeof n||\"function\"==typeof n)){var u=n.then;if(\"function\"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError(\"Promise.all accepts an array\"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError(\"Promise.race accepts an array\"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn=\"function\"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};var l=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw Error(\"unable to locate global object\")}();\"Promise\"in l?l.Promise.prototype[\"finally\"]||(l.Promise.prototype[\"finally\"]=e):l.Promise=o});\n\n var Keycloak = factory( root[\"sha256\"], root[\"base64js\"] );\n root[\"Keycloak\"] = Keycloak;\n\n if ( typeof define === \"function\" && define.amd ) { \n define( \"keycloak\", [], function () { return Keycloak; } );\n }\n }\n})(window, function (sha256_imported, base64js_imported) {\n if (typeof Promise === 'undefined') {\n throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');\n }\n\n var loggedPromiseDeprecation = false;\n\n function logPromiseDeprecation() {\n if (!loggedPromiseDeprecation) {\n loggedPromiseDeprecation = true;\n console.warn('[KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.');\n }\n }\n\n function toKeycloakPromise(promise) {\n promise.__proto__ = KeycloakPromise.prototype;\n return promise;\n }\n\n function KeycloakPromise(executor) {\n return toKeycloakPromise(new Promise(executor));\n }\n\n KeycloakPromise.prototype = Object.create(Promise.prototype);\n KeycloakPromise.prototype.constructor = KeycloakPromise;\n\n KeycloakPromise.prototype.success = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.then(function handleSuccess(value) {\n callback(value);\n });\n \n return toKeycloakPromise(promise);\n };\n\n KeycloakPromise.prototype.error = function(callback) {\n logPromiseDeprecation();\n\n var promise = this.catch(function handleError(error) {\n callback(error);\n });\n\n return toKeycloakPromise(promise);\n };\n\n function Keycloak (config) {\n if (!(this instanceof Keycloak)) {\n return new Keycloak(config);\n }\n\n var kc = this;\n var adapter;\n var refreshQueue = [];\n var callbackStorage;\n\n var loginIframe = {\n enable: true,\n callbackList: [],\n interval: 5\n };\n\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {\n kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];\n }\n }\n\n var useNonce = true;\n var logInfo = createLogger(console.info);\n var logWarn = createLogger(console.warn);\n \n kc.init = function (initOptions) {\n kc.authenticated = false;\n\n callbackStorage = createCallbackStorage();\n var adapters = ['default', 'cordova', 'cordova-native'];\n\n if (initOptions && adapters.indexOf(initOptions.adapter) > -1) {\n adapter = loadAdapter(initOptions.adapter);\n } else if (initOptions && typeof initOptions.adapter === \"object\") {\n adapter = initOptions.adapter;\n } else {\n if (window.Cordova || window.cordova) {\n adapter = loadAdapter('cordova');\n } else {\n adapter = loadAdapter();\n }\n }\n\n if (initOptions) {\n if (typeof initOptions.useNonce !== 'undefined') {\n useNonce = initOptions.useNonce;\n }\n\n if (typeof initOptions.checkLoginIframe !== 'undefined') {\n loginIframe.enable = initOptions.checkLoginIframe;\n }\n\n if (initOptions.checkLoginIframeInterval) {\n loginIframe.interval = initOptions.checkLoginIframeInterval;\n }\n\n if (initOptions.onLoad === 'login-required') {\n kc.loginRequired = true;\n }\n\n if (initOptions.responseMode) {\n if (initOptions.responseMode === 'query' || initOptions.responseMode === 'fragment') {\n kc.responseMode = initOptions.responseMode;\n } else {\n throw 'Invalid value for responseMode';\n }\n }\n\n if (initOptions.flow) {\n switch (initOptions.flow) {\n case 'standard':\n kc.responseType = 'code';\n break;\n case 'implicit':\n kc.responseType = 'id_token token';\n break;\n case 'hybrid':\n kc.responseType = 'code id_token token';\n break;\n default:\n throw 'Invalid value for flow';\n }\n kc.flow = initOptions.flow;\n }\n\n if (initOptions.timeSkew != null) {\n kc.timeSkew = initOptions.timeSkew;\n }\n\n if(initOptions.redirectUri) {\n kc.redirectUri = initOptions.redirectUri;\n }\n\n if (initOptions.silentCheckSsoRedirectUri) {\n kc.silentCheckSsoRedirectUri = initOptions.silentCheckSsoRedirectUri;\n }\n\n if (initOptions.pkceMethod) {\n if (initOptions.pkceMethod !== \"S256\") {\n throw 'Invalid value for pkceMethod';\n }\n kc.pkceMethod = initOptions.pkceMethod;\n }\n\n if (typeof initOptions.enableLogging === 'boolean') {\n kc.enableLogging = initOptions.enableLogging;\n } else {\n kc.enableLogging = false;\n }\n }\n\n if (!kc.responseMode) {\n kc.responseMode = 'fragment';\n }\n if (!kc.responseType) {\n kc.responseType = 'code';\n kc.flow = 'standard';\n }\n\n var promise = createPromise();\n\n var initPromise = createPromise();\n initPromise.promise.then(function() {\n kc.onReady && kc.onReady(kc.authenticated);\n promise.setSuccess(kc.authenticated);\n }).catch(function(errorData) {\n promise.setError(errorData);\n });\n\n var configPromise = loadConfig(config);\n\n function onLoad() {\n var doLogin = function(prompt) {\n if (!prompt) {\n options.prompt = 'none';\n }\n\n kc.login(options).then(function () {\n initPromise.setSuccess();\n }).catch(function () {\n initPromise.setError();\n });\n }\n\n var checkSsoSilently = function() {\n var ifrm = document.createElement(\"iframe\");\n var src = kc.createLoginUrl({prompt: 'none', redirectUri: kc.silentCheckSsoRedirectUri});\n ifrm.setAttribute(\"src\", src);\n ifrm.setAttribute(\"title\", \"keycloak-silent-check-sso\");\n ifrm.style.display = \"none\";\n document.body.appendChild(ifrm);\n\n var messageCallback = function(event) {\n if (event.origin !== window.location.origin || ifrm.contentWindow !== event.source) {\n return;\n }\n\n var oauth = parseCallback(event.data);\n processCallback(oauth, initPromise);\n\n document.body.removeChild(ifrm);\n window.removeEventListener(\"message\", messageCallback);\n };\n\n window.addEventListener(\"message\", messageCallback);\n };\n\n var options = {};\n switch (initOptions.onLoad) {\n case 'check-sso':\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (!unchanged) {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.silentCheckSsoRedirectUri ? checkSsoSilently() : doLogin(false);\n }\n break;\n case 'login-required':\n doLogin(true);\n break;\n default:\n throw 'Invalid value for onLoad';\n }\n }\n\n function processInit() {\n var callback = parseCallback(window.location.href);\n\n if (callback) {\n window.history.replaceState(window.history.state, null, callback.newUrl);\n }\n\n if (callback && callback.valid) {\n return setupCheckLoginIframe().then(function() {\n processCallback(callback, initPromise);\n }).catch(function (e) {\n initPromise.setError();\n });\n } else if (initOptions) {\n if (initOptions.token && initOptions.refreshToken) {\n setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken);\n\n if (loginIframe.enable) {\n setupCheckLoginIframe().then(function() {\n checkLoginIframe().then(function (unchanged) {\n if (unchanged) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n scheduleCheckIframe();\n } else {\n initPromise.setSuccess();\n }\n }).catch(function () {\n initPromise.setError();\n });\n });\n } else {\n kc.updateToken(-1).then(function() {\n kc.onAuthSuccess && kc.onAuthSuccess();\n initPromise.setSuccess();\n }).catch(function() {\n kc.onAuthError && kc.onAuthError();\n if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setError();\n }\n });\n }\n } else if (initOptions.onLoad) {\n onLoad();\n } else {\n initPromise.setSuccess();\n }\n } else {\n initPromise.setSuccess();\n }\n }\n\n configPromise.then(processInit);\n configPromise.catch(function() {\n promise.setError();\n });\n\n return promise.promise;\n }\n\n kc.login = function (options) {\n return adapter.login(options);\n }\n\n function generateRandomData(len) {\n // use web crypto APIs if possible\n var array = null;\n var crypto = window.crypto || window.msCrypto;\n if (crypto && crypto.getRandomValues && window.Uint8Array) {\n array = new Uint8Array(len);\n crypto.getRandomValues(array);\n return array;\n }\n\n // fallback to Math random\n array = new Array(len);\n for (var j = 0; j < array.length; j++) {\n array[j] = Math.floor(256 * Math.random());\n }\n return array;\n }\n\n function generateCodeVerifier(len) {\n return generateRandomString(len, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');\n }\n\n function generateRandomString(len, alphabet){\n var randomData = generateRandomData(len);\n var chars = new Array(len);\n for (var i = 0; i < len; i++) {\n chars[i] = alphabet.charCodeAt(randomData[i] % alphabet.length);\n }\n return String.fromCharCode.apply(null, chars);\n }\n\n function generatePkceChallenge(pkceMethod, codeVerifier) {\n switch (pkceMethod) {\n // The use of the \"plain\" method is considered insecure and therefore not supported.\n case \"S256\":\n // hash codeVerifier, then encode as url-safe base64 without padding\n var hashBytes = new Uint8Array(sha256_imported.arrayBuffer(codeVerifier));\n var encodedHash = base64js_imported.fromByteArray(hashBytes)\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/\\=/g, '');\n return encodedHash;\n default:\n throw 'Invalid value for pkceMethod';\n }\n }\n\n kc.createLoginUrl = function(options) {\n var state = createUUID();\n var nonce = createUUID();\n\n var redirectUri = adapter.redirectUri(options);\n\n var callbackState = {\n state: state,\n nonce: nonce,\n redirectUri: encodeURIComponent(redirectUri)\n };\n\n if (options && options.prompt) {\n callbackState.prompt = options.prompt;\n }\n\n var baseUrl;\n if (options && options.action == 'register') {\n baseUrl = kc.endpoints.register();\n } else {\n baseUrl = kc.endpoints.authorize();\n }\n\n var scope;\n if (options && options.scope) {\n if (options.scope.indexOf(\"openid\") != -1) {\n scope = options.scope;\n } else {\n scope = \"openid \" + options.scope;\n }\n } else {\n scope = \"openid\";\n }\n\n var url = baseUrl\n + '?client_id=' + encodeURIComponent(kc.clientId)\n + '&redirect_uri=' + encodeURIComponent(redirectUri)\n + '&state=' + encodeURIComponent(state)\n + '&response_mode=' + encodeURIComponent(kc.responseMode)\n + '&response_type=' + encodeURIComponent(kc.responseType)\n + '&scope=' + encodeURIComponent(scope);\n if (useNonce) {\n url = url + '&nonce=' + encodeURIComponent(nonce);\n }\n\n if (options && options.prompt) {\n url += '&prompt=' + encodeURIComponent(options.prompt);\n }\n\n if (options && options.maxAge) {\n url += '&max_age=' + encodeURIComponent(options.maxAge);\n }\n\n if (options && options.loginHint) {\n url += '&login_hint=' + encodeURIComponent(options.loginHint);\n }\n\n if (options && options.idpHint) {\n url += '&kc_idp_hint=' + encodeURIComponent(options.idpHint);\n }\n\n if (options && options.locale) {\n url += '&ui_locales=' + encodeURIComponent(options.locale);\n }\n\n if (kc.pkceMethod) {\n var codeVerifier = generateCodeVerifier(96);\n callbackState.pkceCodeVerifier = codeVerifier;\n var pkceChallenge = generatePkceChallenge(kc.pkceMethod, codeVerifier);\n url += '&code_challenge=' + pkceChallenge;\n url += '&code_challenge_method=' + kc.pkceMethod;\n }\n\n callbackStorage.add(callbackState);\n\n return url;\n }\n\n kc.logout = function(options) {\n return adapter.logout(options);\n }\n\n kc.createLogoutUrl = function(options) {\n var url = kc.endpoints.logout()\n + '?redirect_uri=' + encodeURIComponent(adapter.redirectUri(options, false));\n\n return url;\n }\n\n kc.register = function (options) {\n return adapter.register(options);\n }\n\n kc.createRegisterUrl = function(options) {\n if (!options) {\n options = {};\n }\n options.action = 'register';\n return kc.createLoginUrl(options);\n }\n\n kc.createAccountUrl = function(options) {\n var realm = getRealmUrl();\n var url = undefined;\n if (typeof realm !== 'undefined') {\n url = realm\n + '/account'\n + '?referrer=' + encodeURIComponent(kc.clientId)\n + '&referrer_uri=' + encodeURIComponent(adapter.redirectUri(options));\n }\n return url;\n }\n\n kc.accountManagement = function() {\n return adapter.accountManagement();\n }\n\n kc.hasRealmRole = function (role) {\n var access = kc.realmAccess;\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.hasResourceRole = function(role, resource) {\n if (!kc.resourceAccess) {\n return false;\n }\n\n var access = kc.resourceAccess[resource || kc.clientId];\n return !!access && access.roles.indexOf(role) >= 0;\n }\n\n kc.loadUserProfile = function() {\n var url = getRealmUrl() + '/account';\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.profile = JSON.parse(req.responseText);\n promise.setSuccess(kc.profile);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.loadUserInfo = function() {\n var url = kc.endpoints.userinfo();\n var req = new XMLHttpRequest();\n req.open('GET', url, true);\n req.setRequestHeader('Accept', 'application/json');\n req.setRequestHeader('Authorization', 'bearer ' + kc.token);\n\n var promise = createPromise();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n kc.userInfo = JSON.parse(req.responseText);\n promise.setSuccess(kc.userInfo);\n } else {\n promise.setError();\n }\n }\n }\n\n req.send();\n\n return promise.promise;\n }\n\n kc.isTokenExpired = function(minValidity) {\n if (!kc.tokenParsed || (!kc.refreshToken && kc.flow != 'implicit' )) {\n throw 'Not authenticated';\n }\n\n if (kc.timeSkew == null) {\n logInfo('[KEYCLOAK] Unable to determine if token is expired as timeskew is not set');\n return true;\n }\n\n var expiresIn = kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + kc.timeSkew;\n if (minValidity) {\n if (isNaN(minValidity)) {\n throw 'Invalid minValidity';\n }\n expiresIn -= minValidity;\n }\n return expiresIn < 0;\n }\n\n kc.updateToken = function(minValidity) {\n var promise = createPromise();\n\n if (!kc.refreshToken) {\n promise.setError();\n return promise.promise;\n }\n\n minValidity = minValidity || 5;\n\n var exec = function() {\n var refreshToken = false;\n if (minValidity == -1) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: forced refresh');\n } else if (!kc.tokenParsed || kc.isTokenExpired(minValidity)) {\n refreshToken = true;\n logInfo('[KEYCLOAK] Refreshing token: token expired');\n }\n\n if (!refreshToken) {\n promise.setSuccess(false);\n } else {\n var params = 'grant_type=refresh_token&' + 'refresh_token=' + kc.refreshToken;\n var url = kc.endpoints.token();\n\n refreshQueue.push(promise);\n\n if (refreshQueue.length == 1) {\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n req.withCredentials = true;\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n\n var timeLocal = new Date().getTime();\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200) {\n logInfo('[KEYCLOAK] Token refreshed');\n\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n var tokenResponse = JSON.parse(req.responseText);\n\n setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);\n\n kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setSuccess(true);\n }\n } else {\n logWarn('[KEYCLOAK] Failed to refresh token');\n\n if (req.status == 400) {\n kc.clearToken();\n }\n\n kc.onAuthRefreshError && kc.onAuthRefreshError();\n for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {\n p.setError(true);\n }\n }\n }\n };\n\n req.send(params);\n }\n }\n }\n\n if (loginIframe.enable) {\n var iframePromise = checkLoginIframe();\n iframePromise.then(function() {\n exec();\n }).catch(function() {\n promise.setError();\n });\n } else {\n exec();\n }\n\n return promise.promise;\n }\n\n kc.clearToken = function() {\n if (kc.token) {\n setToken(null, null, null);\n kc.onAuthLogout && kc.onAuthLogout();\n if (kc.loginRequired) {\n kc.login();\n }\n }\n }\n\n function getRealmUrl() {\n if (typeof kc.authServerUrl !== 'undefined') {\n if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {\n return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);\n } else {\n return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);\n }\n } else {\n \treturn undefined;\n }\n }\n\n function getOrigin() {\n if (!window.location.origin) {\n return window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');\n } else {\n return window.location.origin;\n }\n }\n\n function processCallback(oauth, promise) {\n var code = oauth.code;\n var error = oauth.error;\n var prompt = oauth.prompt;\n\n var timeLocal = new Date().getTime();\n\n if (error) {\n if (prompt != 'none') {\n var errorData = { error: error, error_description: oauth.error_description };\n kc.onAuthError && kc.onAuthError(errorData);\n promise && promise.setError(errorData);\n } else {\n promise && promise.setSuccess();\n }\n return;\n } else if ((kc.flow != 'standard') && (oauth.access_token || oauth.id_token)) {\n authSuccess(oauth.access_token, null, oauth.id_token, true);\n }\n\n if ((kc.flow != 'implicit') && code) {\n var params = 'code=' + code + '&grant_type=authorization_code';\n var url = kc.endpoints.token();\n\n var req = new XMLHttpRequest();\n req.open('POST', url, true);\n req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n\n params += '&client_id=' + encodeURIComponent(kc.clientId);\n params += '&redirect_uri=' + oauth.redirectUri;\n\n if (oauth.pkceCodeVerifier) {\n params += '&code_verifier=' + oauth.pkceCodeVerifier;\n }\n\n req.withCredentials = true;\n\n req.onreadystatechange = function() {\n if (req.readyState == 4) {\n if (req.status == 200) {\n\n var tokenResponse = JSON.parse(req.responseText);\n authSuccess(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], kc.flow === 'standard');\n scheduleCheckIframe();\n } else {\n kc.onAuthError && kc.onAuthError();\n promise && promise.setError();\n }\n }\n };\n\n req.send(params);\n }\n\n function authSuccess(accessToken, refreshToken, idToken, fulfillPromise) {\n timeLocal = (timeLocal + new Date().getTime()) / 2;\n\n setToken(accessToken, refreshToken, idToken, timeLocal);\n\n if (useNonce && ((kc.tokenParsed && kc.tokenParsed.nonce != oauth.storedNonce) ||\n (kc.refreshTokenParsed && kc.refreshTokenParsed.nonce != oauth.storedNonce) ||\n (kc.idTokenParsed && kc.idTokenParsed.nonce != oauth.storedNonce))) {\n\n logInfo('[KEYCLOAK] Invalid nonce, clearing token');\n kc.clearToken();\n promise && promise.setError();\n } else {\n if (fulfillPromise) {\n kc.onAuthSuccess && kc.onAuthSuccess();\n promise && promise.setSuccess();\n }\n }\n }\n\n }\n\n function loadConfig(url) {\n var promise = createPromise();\n var configUrl;\n\n if (!config) {\n configUrl = 'keycloak.json';\n } else if (typeof config === 'string') {\n configUrl = config;\n }\n\n function setupOidcEndoints(oidcConfiguration) {\n if (! oidcConfiguration) {\n kc.endpoints = {\n authorize: function() {\n return getRealmUrl() + '/protocol/openid-connect/auth';\n },\n token: function() {\n return getRealmUrl() + '/protocol/openid-connect/token';\n },\n logout: function() {\n return getRealmUrl() + '/protocol/openid-connect/logout';\n },\n checkSessionIframe: function() {\n var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';\n if (kc.iframeVersion) {\n src = src + '?version=' + kc.iframeVersion;\n }\n return src;\n },\n register: function() {\n return getRealmUrl() + '/protocol/openid-connect/registrations';\n },\n userinfo: function() {\n return getRealmUrl() + '/protocol/openid-connect/userinfo';\n }\n };\n } else {\n kc.endpoints = {\n authorize: function() {\n return oidcConfiguration.authorization_endpoint;\n },\n token: function() {\n return oidcConfiguration.token_endpoint;\n },\n logout: function() {\n if (!oidcConfiguration.end_session_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.end_session_endpoint;\n },\n checkSessionIframe: function() {\n if (!oidcConfiguration.check_session_iframe) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.check_session_iframe;\n },\n register: function() {\n throw 'Redirection to \"Register user\" page not supported in standard OIDC mode';\n },\n userinfo: function() {\n if (!oidcConfiguration.userinfo_endpoint) {\n throw \"Not supported by the OIDC server\";\n }\n return oidcConfiguration.userinfo_endpoint;\n }\n }\n }\n }\n\n if (configUrl) {\n var req = new XMLHttpRequest();\n req.open('GET', configUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var config = JSON.parse(req.responseText);\n\n kc.authServerUrl = config['auth-server-url'];\n kc.realm = config['realm'];\n kc.clientId = config['resource'];\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n if (!config.clientId) {\n throw 'clientId missing';\n }\n\n kc.clientId = config.clientId;\n\n var oidcProvider = config['oidcProvider'];\n if (!oidcProvider) {\n if (!config['url']) {\n var scripts = document.getElementsByTagName('script');\n for (var i = 0; i < scripts.length; i++) {\n if (scripts[i].src.match(/.*keycloak\\.js/)) {\n config.url = scripts[i].src.substr(0, scripts[i].src.indexOf('/js/keycloak.js'));\n break;\n }\n }\n }\n if (!config.realm) {\n throw 'realm missing';\n }\n\n kc.authServerUrl = config.url;\n kc.realm = config.realm;\n setupOidcEndoints(null);\n promise.setSuccess();\n } else {\n if (typeof oidcProvider === 'string') {\n var oidcProviderConfigUrl;\n if (oidcProvider.charAt(oidcProvider.length - 1) == '/') {\n oidcProviderConfigUrl = oidcProvider + '.well-known/openid-configuration';\n } else {\n oidcProviderConfigUrl = oidcProvider + '/.well-known/openid-configuration';\n }\n var req = new XMLHttpRequest();\n req.open('GET', oidcProviderConfigUrl, true);\n req.setRequestHeader('Accept', 'application/json');\n\n req.onreadystatechange = function () {\n if (req.readyState == 4) {\n if (req.status == 200 || fileLoaded(req)) {\n var oidcProviderConfig = JSON.parse(req.responseText);\n setupOidcEndoints(oidcProviderConfig);\n promise.setSuccess();\n } else {\n promise.setError();\n }\n }\n };\n\n req.send();\n } else {\n setupOidcEndoints(oidcProvider);\n promise.setSuccess();\n }\n }\n }\n\n return promise.promise;\n }\n\n function fileLoaded(xhr) {\n return xhr.status == 0 && xhr.responseText && xhr.responseURL.startsWith('file:');\n }\n\n function setToken(token, refreshToken, idToken, timeLocal) {\n if (kc.tokenTimeoutHandle) {\n clearTimeout(kc.tokenTimeoutHandle);\n kc.tokenTimeoutHandle = null;\n }\n\n if (refreshToken) {\n kc.refreshToken = refreshToken;\n kc.refreshTokenParsed = decodeToken(refreshToken);\n } else {\n delete kc.refreshToken;\n delete kc.refreshTokenParsed;\n }\n\n if (idToken) {\n kc.idToken = idToken;\n kc.idTokenParsed = decodeToken(idToken);\n } else {\n delete kc.idToken;\n delete kc.idTokenParsed;\n }\n\n if (token) {\n kc.token = token;\n kc.tokenParsed = decodeToken(token);\n kc.sessionId = kc.tokenParsed.session_state;\n kc.authenticated = true;\n kc.subject = kc.tokenParsed.sub;\n kc.realmAccess = kc.tokenParsed.realm_access;\n kc.resourceAccess = kc.tokenParsed.resource_access;\n\n if (timeLocal) {\n kc.timeSkew = Math.floor(timeLocal / 1000) - kc.tokenParsed.iat;\n }\n\n if (kc.timeSkew != null) {\n logInfo('[KEYCLOAK] Estimated time difference between browser and server is ' + kc.timeSkew + ' seconds');\n\n if (kc.onTokenExpired) {\n var expiresIn = (kc.tokenParsed['exp'] - (new Date().getTime() / 1000) + kc.timeSkew) * 1000;\n logInfo('[KEYCLOAK] Token expires in ' + Math.round(expiresIn / 1000) + ' s');\n if (expiresIn <= 0) {\n kc.onTokenExpired();\n } else {\n kc.tokenTimeoutHandle = setTimeout(kc.onTokenExpired, expiresIn);\n }\n }\n }\n } else {\n delete kc.token;\n delete kc.tokenParsed;\n delete kc.subject;\n delete kc.realmAccess;\n delete kc.resourceAccess;\n\n kc.authenticated = false;\n }\n }\n\n function decodeToken(str) {\n str = str.split('.')[1];\n\n str = str.replace('/-/g', '+');\n str = str.replace('/_/g', '/');\n switch (str.length % 4)\n {\n case 0:\n break;\n case 2:\n str += '==';\n break;\n case 3:\n str += '=';\n break;\n default:\n throw 'Invalid token';\n }\n\n str = (str + '===').slice(0, str.length + (str.length % 4));\n str = str.replace(/-/g, '+').replace(/_/g, '/');\n\n str = decodeURIComponent(escape(atob(str)));\n\n str = JSON.parse(str);\n return str;\n }\n\n function createUUID() {\n var hexDigits = '0123456789abcdef';\n var s = generateRandomString(36, hexDigits).split(\"\");\n s[14] = '4';\n s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);\n s[8] = s[13] = s[18] = s[23] = '-';\n var uuid = s.join('');\n return uuid;\n }\n\n function parseCallback(url) {\n var oauth = parseCallbackUrl(url);\n if (!oauth) {\n return;\n }\n\n var oauthState = callbackStorage.get(oauth.state);\n\n if (oauthState) {\n oauth.valid = true;\n oauth.redirectUri = oauthState.redirectUri;\n oauth.storedNonce = oauthState.nonce;\n oauth.prompt = oauthState.prompt;\n oauth.pkceCodeVerifier = oauthState.pkceCodeVerifier;\n }\n\n return oauth;\n }\n\n function parseCallbackUrl(url) {\n var supportedParams;\n switch (kc.flow) {\n case 'standard':\n supportedParams = ['code', 'state', 'session_state'];\n break;\n case 'implicit':\n supportedParams = ['access_token', 'token_type', 'id_token', 'state', 'session_state', 'expires_in'];\n break;\n case 'hybrid':\n supportedParams = ['access_token', 'id_token', 'code', 'state', 'session_state'];\n break;\n }\n\n supportedParams.push('error');\n supportedParams.push('error_description');\n supportedParams.push('error_uri');\n\n var queryIndex = url.indexOf('?');\n var fragmentIndex = url.indexOf('#');\n\n var newUrl;\n var parsed;\n\n if (kc.responseMode === 'query' && queryIndex !== -1) {\n newUrl = url.substring(0, queryIndex);\n parsed = parseCallbackParams(url.substring(queryIndex + 1, fragmentIndex !== -1 ? fragmentIndex : url.length), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '?' + parsed.paramsString;\n }\n if (fragmentIndex !== -1) {\n newUrl += url.substring(fragmentIndex);\n }\n } else if (kc.responseMode === 'fragment' && fragmentIndex !== -1) {\n newUrl = url.substring(0, fragmentIndex);\n parsed = parseCallbackParams(url.substring(fragmentIndex + 1), supportedParams);\n if (parsed.paramsString !== '') {\n newUrl += '#' + parsed.paramsString;\n }\n }\n\n if (parsed && parsed.oauthParams) {\n if (kc.flow === 'standard' || kc.flow === 'hybrid') {\n if ((parsed.oauthParams.code || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n } else if (kc.flow === 'implicit') {\n if ((parsed.oauthParams.access_token || parsed.oauthParams.error) && parsed.oauthParams.state) {\n parsed.oauthParams.newUrl = newUrl;\n return parsed.oauthParams;\n }\n }\n }\n }\n\n function parseCallbackParams(paramsString, supportedParams) {\n var p = paramsString.split('&');\n var result = {\n paramsString: '',\n oauthParams: {}\n }\n for (var i = 0; i < p.length; i++) {\n var split = p[i].indexOf(\"=\");\n var key = p[i].slice(0, split);\n if (supportedParams.indexOf(key) !== -1) {\n result.oauthParams[key] = p[i].slice(split + 1);\n } else {\n if (result.paramsString !== '') {\n result.paramsString += '&';\n }\n result.paramsString += p[i];\n }\n }\n return result;\n }\n\n function createPromise() {\n // Need to create a native Promise which also preserves the\n // interface of the custom promise type previously used by the API\n var p = {\n setSuccess: function(result) {\n p.resolve(result);\n },\n\n setError: function(result) {\n p.reject(result);\n }\n };\n p.promise = new KeycloakPromise(function(resolve, reject) {\n p.resolve = resolve;\n p.reject = reject;\n });\n return p;\n }\n\n\n function setupCheckLoginIframe() {\n var promise = createPromise();\n\n if (!loginIframe.enable) {\n promise.setSuccess();\n return promise.promise;\n }\n\n if (loginIframe.iframe) {\n promise.setSuccess();\n return promise.promise;\n }\n\n var iframe = document.createElement('iframe');\n loginIframe.iframe = iframe;\n\n iframe.onload = function() {\n var authUrl = kc.endpoints.authorize();\n if (authUrl.charAt(0) === '/') {\n loginIframe.iframeOrigin = getOrigin();\n } else {\n loginIframe.iframeOrigin = authUrl.substring(0, authUrl.indexOf('/', 8));\n }\n promise.setSuccess();\n }\n\n var src = kc.endpoints.checkSessionIframe();\n iframe.setAttribute('src', src );\n iframe.setAttribute('title', 'keycloak-session-iframe' );\n iframe.style.display = 'none';\n document.body.appendChild(iframe);\n\n var messageCallback = function(event) {\n if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) {\n return;\n }\n\n if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {\n return;\n }\n\n\n if (event.data != 'unchanged') {\n kc.clearToken();\n }\n\n var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);\n\n for (var i = callbacks.length - 1; i >= 0; --i) {\n var promise = callbacks[i];\n if (event.data == 'error') {\n promise.setError();\n } else {\n promise.setSuccess(event.data == 'unchanged');\n }\n }\n };\n\n window.addEventListener('message', messageCallback, false);\n\n return promise.promise;\n }\n\n function scheduleCheckIframe() {\n if (loginIframe.enable) {\n if (kc.token) {\n setTimeout(function() {\n checkLoginIframe().then(function(unchanged) {\n if (unchanged) {\n scheduleCheckIframe();\n }\n });\n }, loginIframe.interval * 1000);\n }\n }\n }\n\n function checkLoginIframe() {\n var promise = createPromise();\n\n if (loginIframe.iframe && loginIframe.iframeOrigin ) {\n var msg = kc.clientId + ' ' + (kc.sessionId ? kc.sessionId : '');\n loginIframe.callbackList.push(promise);\n var origin = loginIframe.iframeOrigin;\n if (loginIframe.callbackList.length == 1) {\n loginIframe.iframe.contentWindow.postMessage(msg, origin);\n }\n } else {\n promise.setSuccess();\n }\n\n return promise.promise;\n }\n\n function loadAdapter(type) {\n if (!type || type == 'default') {\n return {\n login: function(options) {\n window.location.replace(kc.createLoginUrl(options));\n return createPromise().promise;\n },\n\n logout: function(options) {\n window.location.replace(kc.createLogoutUrl(options));\n return createPromise().promise;\n },\n\n register: function(options) {\n window.location.replace(kc.createRegisterUrl(options));\n return createPromise().promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.location.href = accountUrl;\n } else {\n throw \"Not supported by the OIDC server\";\n }\n return createPromise().promise;\n },\n\n redirectUri: function(options, encodeHash) {\n if (arguments.length == 1) {\n encodeHash = true;\n }\n\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return location.href;\n }\n }\n };\n }\n\n if (type == 'cordova') {\n loginIframe.enable = false;\n var cordovaOpenWindowWrapper = function(loginUrl, target, options) {\n if (window.cordova && window.cordova.InAppBrowser) {\n // Use inappbrowser for IOS and Android if available\n return window.cordova.InAppBrowser.open(loginUrl, target, options);\n } else {\n return window.open(loginUrl, target, options);\n }\n };\n\n var shallowCloneCordovaOptions = function (userOptions) {\n if (userOptions && userOptions.cordovaOptions) {\n return Object.keys(userOptions.cordovaOptions).reduce(function (options, optionName) {\n options[optionName] = userOptions.cordovaOptions[optionName];\n return options;\n }, {});\n } else {\n return {};\n }\n };\n\n var formatCordovaOptions = function (cordovaOptions) {\n return Object.keys(cordovaOptions).reduce(function (options, optionName) {\n options.push(optionName+\"=\"+cordovaOptions[optionName]);\n return options;\n }, []).join(\",\");\n };\n\n var createCordovaOptions = function (userOptions) {\n var cordovaOptions = shallowCloneCordovaOptions(userOptions);\n cordovaOptions.location = 'no';\n if (userOptions && userOptions.prompt == 'none') {\n cordovaOptions.hidden = 'yes';\n }\n return formatCordovaOptions(cordovaOptions);\n };\n\n return {\n login: function(options) {\n var promise = createPromise();\n\n var cordovaOptions = createCordovaOptions(options);\n var loginUrl = kc.createLoginUrl(options);\n var ref = cordovaOpenWindowWrapper(loginUrl, '_blank', cordovaOptions);\n var completed = false;\n\n var closed = false;\n var closeBrowser = function() {\n closed = true;\n ref.close();\n };\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (!completed) {\n if (event.url.indexOf('http://localhost') == 0) {\n var callback = parseCallback(event.url);\n processCallback(callback, promise);\n closeBrowser();\n completed = true;\n } else {\n promise.setError();\n closeBrowser();\n }\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (!closed) {\n promise.setError({\n reason: \"closed_by_user\"\n });\n }\n });\n\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n\n var logoutUrl = kc.createLogoutUrl(options);\n var ref = cordovaOpenWindowWrapper(logoutUrl, '_blank', 'location=no,hidden=yes');\n\n var error;\n\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n\n ref.addEventListener('loaderror', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n } else {\n error = true;\n ref.close();\n }\n });\n\n ref.addEventListener('exit', function(event) {\n if (error) {\n promise.setError();\n } else {\n kc.clearToken();\n promise.setSuccess();\n }\n });\n\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl();\n var cordovaOptions = createCordovaOptions(options);\n var ref = cordovaOpenWindowWrapper(registerUrl, '_blank', cordovaOptions);\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n }\n });\n return promise.promise;\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n var ref = cordovaOpenWindowWrapper(accountUrl, '_blank', 'location=no');\n ref.addEventListener('loadstart', function(event) {\n if (event.url.indexOf('http://localhost') == 0) {\n ref.close();\n }\n });\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n return 'http://localhost';\n }\n }\n }\n\n if (type == 'cordova-native') {\n loginIframe.enable = false;\n\n return {\n login: function(options) {\n var promise = createPromise();\n var loginUrl = kc.createLoginUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n\n window.cordova.plugins.browsertab.openUrl(loginUrl);\n return promise.promise;\n },\n\n logout: function(options) {\n var promise = createPromise();\n var logoutUrl = kc.createLogoutUrl(options);\n\n universalLinks.subscribe('keycloak', function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n kc.clearToken();\n promise.setSuccess();\n });\n\n window.cordova.plugins.browsertab.openUrl(logoutUrl);\n return promise.promise;\n },\n\n register : function(options) {\n var promise = createPromise();\n var registerUrl = kc.createRegisterUrl(options);\n universalLinks.subscribe('keycloak' , function(event) {\n universalLinks.unsubscribe('keycloak');\n window.cordova.plugins.browsertab.close();\n var oauth = parseCallback(event.url);\n processCallback(oauth, promise);\n });\n window.cordova.plugins.browsertab.openUrl(registerUrl);\n return promise.promise;\n\n },\n\n accountManagement : function() {\n var accountUrl = kc.createAccountUrl();\n if (typeof accountUrl !== 'undefined') {\n window.cordova.plugins.browsertab.openUrl(accountUrl);\n } else {\n throw \"Not supported by the OIDC server\";\n }\n },\n\n redirectUri: function(options) {\n if (options && options.redirectUri) {\n return options.redirectUri;\n } else if (kc.redirectUri) {\n return kc.redirectUri;\n } else {\n return \"http://localhost\";\n }\n }\n }\n }\n\n throw 'invalid adapter type: ' + type;\n }\n\n var LocalStorage = function() {\n if (!(this instanceof LocalStorage)) {\n return new LocalStorage();\n }\n\n localStorage.setItem('kc-test', 'test');\n localStorage.removeItem('kc-test');\n\n var cs = this;\n\n function clearExpired() {\n var time = new Date().getTime();\n for (var i = 0; i < localStorage.length; i++) {\n var key = localStorage.key(i);\n if (key && key.indexOf('kc-callback-') == 0) {\n var value = localStorage.getItem(key);\n if (value) {\n try {\n var expires = JSON.parse(value).expires;\n if (!expires || expires < time) {\n localStorage.removeItem(key);\n }\n } catch (err) {\n localStorage.removeItem(key);\n }\n }\n }\n }\n }\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var key = 'kc-callback-' + state;\n var value = localStorage.getItem(key);\n if (value) {\n localStorage.removeItem(key);\n value = JSON.parse(value);\n }\n\n clearExpired();\n return value;\n };\n\n cs.add = function(state) {\n clearExpired();\n\n var key = 'kc-callback-' + state.state;\n state.expires = new Date().getTime() + (60 * 60 * 1000);\n localStorage.setItem(key, JSON.stringify(state));\n };\n };\n\n var CookieStorage = function() {\n if (!(this instanceof CookieStorage)) {\n return new CookieStorage();\n }\n\n var cs = this;\n\n cs.get = function(state) {\n if (!state) {\n return;\n }\n\n var value = getCookie('kc-callback-' + state);\n setCookie('kc-callback-' + state, '', cookieExpiration(-100));\n if (value) {\n return JSON.parse(value);\n }\n };\n\n cs.add = function(state) {\n setCookie('kc-callback-' + state.state, JSON.stringify(state), cookieExpiration(60));\n };\n\n cs.removeItem = function(key) {\n setCookie(key, '', cookieExpiration(-100));\n };\n\n var cookieExpiration = function (minutes) {\n var exp = new Date();\n exp.setTime(exp.getTime() + (minutes*60*1000));\n return exp;\n };\n\n var getCookie = function (key) {\n var name = key + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n };\n\n var setCookie = function (key, value, expirationDate) {\n var cookie = key + '=' + value + '; '\n + 'expires=' + expirationDate.toUTCString() + '; ';\n document.cookie = cookie;\n }\n };\n\n function createCallbackStorage() {\n try {\n return new LocalStorage();\n } catch (err) {\n }\n\n return new CookieStorage();\n }\n\n function createLogger(fn) {\n return function() {\n if (kc.enableLogging) {\n fn.apply(console, Array.prototype.slice.call(arguments));\n }\n };\n }\n }\n\n return Keycloak;\n})\n","export enum SessionStorageKeys {\n KeyCloakToken = 'KEYCLOAK_TOKEN',\n KeyCloakRefreshToken = 'KEYCLOAK_REFRESH_TOKEN',\n KeyCloakIdToken = 'KEYCLOAK_ID_TOKEN',\n ApiConfigKey = 'AUTH_API_CONFIG',\n PreventStorageSync = 'PREVENT_STORAGE_SYNC',\n LaunchDarklyFlags = 'LD_FLAGS',\n CurrentAccount = 'CURRENT_ACCOUNT',\n AuthApiUrl = 'AUTH_API_URL',\n AuthWebUrl = 'AUTH_WEB_URL',\n StatusApiUrl = 'STATUS_API_URL',\n WhatsNew = 'WHATS_NEW',\n SessionSynced = 'SESSION_SYNCED',\n RegistryHomeUrl = 'REGISTRY_HOME_URL',\n NameRequestUrl = 'NAME_REQUEST_URL',\n PprWebUrl = 'PPR_WEB_URL',\n SiteminderLogoutUrl = 'SITEMINDER_LOGOUT_URL'\n}\n\nexport enum Account {\n ANONYMOUS = 'ANONYMOUS',\n PREMIUM = 'PREMIUM',\n BASIC = 'BASIC',\n SBC_STAFF = 'SBC_STAFF',\n STAFF = 'STAFF'\n}\n\nexport enum IdpHint {\n BCROS = 'bcros',\n IDIR = 'idir',\n BCSC = 'bcsc',\n BCEID = 'bceid'\n}\n\nexport enum LoginSource {\n BCROS = 'BCROS',\n IDIR = 'IDIR',\n BCSC = 'BCSC',\n BCEID = 'BCEID'\n}\n\nexport enum Role {\n AccountHolder = 'account_holder',\n PublicUser = 'public_user',\n Staff = 'staff',\n GOVMAccountUser = 'gov_account_user'\n}\n\nexport enum Pages {\n HOME = 'home',\n USER_PROFILE = 'userprofile',\n ACCOUNT = 'account',\n SETTINGS = 'settings',\n SIGNIN = 'signin',\n USER_PROFILE_TERMS = 'userprofileterms',\n CREATE_ACCOUNT = 'setup-account',\n CHOOSE_AUTH_METHOD = 'choose-authentication-method',\n NON_BCSC_INSTRUCTIONS = 'nonbcsc-info/instructions',\n ACCOUNT_FREEZ = 'account-freeze',\n PENDING_APPROVAL = 'pendingapproval',\n ACCOUNT_SWITCHING = 'account-switching',\n REGISTRY_DASHBOARD = 'dashboard'\n}\n\nexport const ALLOWED_URIS_FOR_PENDING_ORGS: string[] = ['setup-non-bcsc-account', 'signout']\n\nexport const ACCOUNT_ID = 'accountid'\n","import ConfigHelper from './config-helper'\nimport { SessionStorageKeys, ACCOUNT_ID } from './constants'\n\n/**\n * Place to put all the custom utility methods\n */\nexport function getBoolean (value: boolean | string | number): boolean {\n let resultVal = value\n if (typeof value === 'string') {\n resultVal = value.toLowerCase()\n }\n switch (resultVal) {\n case true:\n case 'true':\n case 1:\n case '1':\n case 'on':\n case 'yes':\n case 'none':\n return true\n default:\n return false\n }\n}\n\nexport function decodeKCToken () {\n try {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n const base64Url = token.split('.')[1]\n const base64 = decodeURIComponent(window.atob(base64Url).split('').map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)\n }).join(''))\n return JSON.parse(base64)\n } else {\n return {}\n }\n } catch (error) {\n throw new Error('Error parsing JWT - ' + error)\n }\n}\n\nexport function trimTrailingSlashURL (url) {\n return (url) ? url.trim().replace(/\\/+$/, '') : ''\n}\n\nexport function getAccountIdFromCurrentUrl () {\n const urlParams = new URLSearchParams(window.location.search)\n return urlParams.get(ACCOUNT_ID) || false\n}\n\nexport function checkAndAppend (url, key = '', value = '') {\n const separator = (/\\?/).test(url) ? '&' : '?'\n // remove key from URL if existing\n const newUrl = removeAccountIdFromUrl(url, key)\n return (value !== '' && key !== '') ? `${newUrl}${separator}${key}=${value}` : url\n}\n\n// if account id is not passed, will get it from session\n// there are some cases we need to pass account id, ie to watch account id and get URL dynamically\nexport function appendAccountId (url, accountId = '') {\n const sessionAccountId = JSON.parse(ConfigHelper.getFromSession(SessionStorageKeys.CurrentAccount) || '{}').id || ''\n const currentAccount = accountId !== '' ? accountId : sessionAccountId\n return checkAndAppend(url, ACCOUNT_ID, currentAccount)\n}\n\nexport function removeAccountIdFromUrl (url, key = ACCOUNT_ID) {\n // replacing account id and formattig ie, removing extra ? or &\n return url?.replace(new RegExp(key + '=\\\\w+'), '').replace('?&', '?').replace(/\\?$/, '')\n .replace('&&', '&').replace(/&$/, '')\n}\n","import { SessionStorageKeys } from './constants'\nimport { trimTrailingSlashURL } from './common-util'\n\nexport default class ConfigHelper {\n static keycloakConfigUrl = ''\n\n static addToSession (key: string, value: any): void {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key: string): string | null {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key: string): void {\n sessionStorage.removeItem(key)\n }\n\n static clearSession (): void {\n sessionStorage.clear()\n }\n\n static getStatusAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || '')\n }\n\n static getAuthAPIUrl (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || '')\n }\n\n static getAuthContextPath (): string {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || '')\n }\n\n static getRegistryHomeURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.RegistryHomeUrl) || '')\n }\n\n static getNameRequestURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.NameRequestUrl) || '')\n }\n\n static getPprWebURL () {\n return trimTrailingSlashURL(sessionStorage.getItem(SessionStorageKeys.PprWebUrl) || '')\n }\n\n static setKeycloakConfigUrl (keycloakConfigUrl: string) {\n this.keycloakConfigUrl = keycloakConfigUrl\n }\n\n static getKeycloakConfigUrl (): string {\n return this.keycloakConfigUrl\n }\n}\n","var VuexModule = /** @class */ (function () {\r\n function VuexModule(module) {\r\n this.actions = module.actions;\r\n this.mutations = module.mutations;\r\n this.state = module.state;\r\n this.getters = module.getters;\r\n this.namespaced = module.namespaced;\r\n this.modules = module.modules;\r\n }\r\n return VuexModule;\r\n}());\r\nfunction getModule(moduleClass, store) {\r\n if (moduleClass._statics) {\r\n return moduleClass._statics;\r\n }\r\n var genStatic = moduleClass._genStatic;\r\n if (!genStatic) {\r\n throw new Error(\"ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\r\n }\r\n return (moduleClass._statics = genStatic(store));\r\n}\n\nvar reservedKeys = ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit'];\r\nfunction stateFactory(module) {\r\n var state = new module.prototype.constructor({});\r\n var s = {};\r\n Object.keys(state).forEach(function (key) {\r\n if (reservedKeys.indexOf(key) !== -1) {\r\n if (typeof state[key] !== 'undefined') {\r\n throw new Error(\"ERR_RESERVED_STATE_KEY_USED: You cannot use the following\\n ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\\n as fields in your module. These are reserved as they have special purpose in Vuex\");\r\n }\r\n return;\r\n }\r\n if (state.hasOwnProperty(key)) {\r\n if (typeof state[key] !== 'function') {\r\n s[key] = state[key];\r\n }\r\n }\r\n });\r\n return s;\r\n}\n\n/**\r\n * Takes the properties on object from parameter source and adds them to the object\r\n * parameter target\r\n * @param {object} target Object to have properties copied onto from y\r\n * @param {object} source Object with properties to be copied to x\r\n */\r\nfunction addPropertiesToObject(target, source) {\r\n var _loop_1 = function (k) {\r\n Object.defineProperty(target, k, {\r\n get: function () { return source[k]; }\r\n });\r\n };\r\n for (var _i = 0, _a = Object.keys(source || {}); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n _loop_1(k);\r\n }\r\n}\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 __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\nfunction staticStateGenerator(module, modOpt, statics) {\r\n var state = modOpt.stateFactory ? module.state() : module.state;\r\n Object.keys(state).forEach(function (key) {\r\n if (state.hasOwnProperty(key)) {\r\n // If not undefined or function means it is a state value\r\n if (['undefined', 'function'].indexOf(typeof state[key]) === -1) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.state[modOpt.name][key];\r\n }\r\n });\r\n }\r\n }\r\n });\r\n}\r\nfunction staticGetterGenerator(module, modOpt, statics) {\r\n Object.keys(module.getters).forEach(function (key) {\r\n if (module.namespaced) {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[modOpt.name + \"/\" + key];\r\n }\r\n });\r\n }\r\n else {\r\n Object.defineProperty(statics, key, {\r\n get: function () {\r\n return modOpt.store.getters[key];\r\n }\r\n });\r\n }\r\n });\r\n}\r\nfunction staticMutationGenerator(module, modOpt, statics) {\r\n Object.keys(module.mutations).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [modOpt.name + \"/\" + key].concat(args));\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var _a;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = modOpt.store).commit.apply(_a, [key].concat(args));\r\n };\r\n }\r\n });\r\n}\r\nfunction staticActionGenerators(module, modOpt, statics) {\r\n Object.keys(module.actions).forEach(function (key) {\r\n if (module.namespaced) {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [modOpt.name + \"/\" + key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n else {\r\n statics[key] = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var _a;\r\n return __generator(this, function (_b) {\r\n return [2 /*return*/, (_a = modOpt.store).dispatch.apply(_a, [key].concat(args))];\r\n });\r\n });\r\n };\r\n }\r\n });\r\n}\n\nfunction moduleDecoratorFactory(moduleOptions) {\r\n return function (constructor) {\r\n var module = constructor;\r\n var stateFactory$1 = function () { return stateFactory(module); };\r\n if (!module.state) {\r\n module.state = moduleOptions && moduleOptions.stateFactory ? stateFactory$1 : stateFactory$1();\r\n }\r\n if (!module.getters) {\r\n module.getters = {};\r\n }\r\n if (!module.namespaced) {\r\n module.namespaced = moduleOptions && moduleOptions.namespaced;\r\n }\r\n Object.getOwnPropertyNames(module.prototype).forEach(function (funcName) {\r\n var descriptor = Object.getOwnPropertyDescriptor(module.prototype, funcName);\r\n if (descriptor.get && module.getters) {\r\n module.getters[funcName] = function (state, getters, rootState, rootGetters) {\r\n var thisObj = { context: { state: state, getters: getters, rootState: rootState, rootGetters: rootGetters } };\r\n addPropertiesToObject(thisObj, state);\r\n addPropertiesToObject(thisObj, getters);\r\n var got = descriptor.get.call(thisObj);\r\n return got;\r\n };\r\n }\r\n });\r\n var modOpt = moduleOptions;\r\n if (modOpt.name) {\r\n Object.defineProperty(constructor, '_genStatic', {\r\n value: function (store) {\r\n var statics = {};\r\n modOpt.store = modOpt.store || store;\r\n if (!modOpt.store) {\r\n throw new Error(\"ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\\n should be decorated with store in decorator, i.e. @Module({store: store}) or\\n store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)\");\r\n }\r\n // =========== For statics ==============\r\n // ------ state -------\r\n staticStateGenerator(module, modOpt, statics);\r\n // ------- getters -------\r\n if (module.getters) {\r\n staticGetterGenerator(module, modOpt, statics);\r\n }\r\n // -------- mutations --------\r\n if (module.mutations) {\r\n staticMutationGenerator(module, modOpt, statics);\r\n }\r\n // -------- actions ---------\r\n if (module.actions) {\r\n staticActionGenerators(module, modOpt, statics);\r\n }\r\n return statics;\r\n }\r\n });\r\n }\r\n if (modOpt.dynamic) {\r\n if (!modOpt.name) {\r\n throw new Error('Name of module not provided in decorator options');\r\n }\r\n modOpt.store.registerModule(modOpt.name, // TODO: Handle nested modules too in future\r\n module);\r\n }\r\n return constructor;\r\n };\r\n}\r\nfunction Module(modOrOpt) {\r\n if (typeof modOrOpt === 'function') {\r\n /*\r\n * @Module decorator called without options (directly on the class definition)\r\n */\r\n moduleDecoratorFactory({})(modOrOpt);\r\n }\r\n else {\r\n /*\r\n * @Module({...}) decorator called with options\r\n */\r\n return moduleDecoratorFactory(modOrOpt);\r\n }\r\n}\n\nfunction actionDecoratorFactory(params) {\r\n var _a = params || {}, _b = _a.commit, commit = _b === void 0 ? undefined : _b, _c = _a.rawError, rawError = _c === void 0 ? false : _c, _d = _a.root, root = _d === void 0 ? false : _d;\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var actionFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, moduleAccessor, thisObj, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 5, , 6]);\r\n actionPayload = null;\r\n if (!module._genStatic) return [3 /*break*/, 2];\r\n moduleAccessor = getModule(module);\r\n moduleAccessor.context = context;\r\n return [4 /*yield*/, actionFunction.call(moduleAccessor, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 2:\r\n thisObj = { context: context };\r\n addPropertiesToObject(thisObj, context.state);\r\n addPropertiesToObject(thisObj, context.getters);\r\n return [4 /*yield*/, actionFunction.call(thisObj, payload)];\r\n case 3:\r\n actionPayload = _a.sent();\r\n _a.label = 4;\r\n case 4:\r\n if (commit) {\r\n context.commit(commit, actionPayload);\r\n }\r\n return [2 /*return*/, actionPayload];\r\n case 5:\r\n e_1 = _a.sent();\r\n throw rawError\r\n ? e_1\r\n : new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access ' +\r\n 'this.someMutation() or this.someGetter inside an @Action? \\n' +\r\n 'That works only in dynamic modules. \\n' +\r\n 'If not dynamic use this.context.commit(\"mutationName\", payload) ' +\r\n 'and this.context.getters[\"getterName\"]' +\r\n '\\n' +\r\n new Error(\"Could not perform action \" + key.toString()).stack +\r\n '\\n' +\r\n e_1.stack);\r\n case 6: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n module.actions[key] = root ? { root: root, handler: action } : action;\r\n };\r\n}\r\n/**\r\n * The @Action decorator turns an async function into an Vuex action\r\n *\r\n * @param targetOrParams the module class\r\n * @param key name of the action\r\n * @param descriptor the action function descriptor\r\n * @constructor\r\n */\r\nfunction Action(targetOrParams, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `targetOrParams` is params.\r\n * i.e. when used as -\r\n *
\r\n            @Action({commit: 'incrCount'})\r\n            async getCountDelta() {\r\n              return 5\r\n            }\r\n         * 
\r\n */\r\n return actionDecoratorFactory(targetOrParams);\r\n }\r\n else {\r\n /*\r\n * This is the case when @Action is called on action function\r\n * without any params\r\n *
\r\n         *   @Action\r\n         *   async doSomething() {\r\n         *    ...\r\n         *   }\r\n         * 
\r\n */\r\n actionDecoratorFactory()(targetOrParams, key, descriptor);\r\n }\r\n}\n\nfunction Mutation(target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n var mutationFunction = descriptor.value ? descriptor.value : function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return ({});\r\n };\r\n var mutation = function (state, payload) {\r\n mutationFunction.call(state, payload);\r\n };\r\n module.mutations[key] = mutation;\r\n}\n\nfunction mutationActionDecoratorFactory(params) {\r\n return function (target, key, descriptor) {\r\n var module = target.constructor;\r\n if (!module.mutations) {\r\n module.mutations = {};\r\n }\r\n if (!module.actions) {\r\n module.actions = {};\r\n }\r\n var mutactFunction = descriptor.value;\r\n var action = function (context, payload) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var actionPayload, e_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n _a.trys.push([0, 2, , 3]);\r\n return [4 /*yield*/, mutactFunction.call(context, payload)];\r\n case 1:\r\n actionPayload = _a.sent();\r\n context.commit(key, actionPayload);\r\n return [3 /*break*/, 3];\r\n case 2:\r\n e_1 = _a.sent();\r\n if (params.rawError) {\r\n throw e_1;\r\n }\r\n else {\r\n console.error('Could not perform action ' + key.toString());\r\n console.error(e_1);\r\n }\r\n return [3 /*break*/, 3];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n var mutation = function (state, payload) {\r\n if (!params.mutate) {\r\n params.mutate = Object.keys(payload);\r\n }\r\n for (var _i = 0, _a = params.mutate; _i < _a.length; _i++) {\r\n var stateItem = _a[_i];\r\n if (state.hasOwnProperty(stateItem) && payload.hasOwnProperty(stateItem)) {\r\n state[stateItem] = payload[stateItem];\r\n }\r\n else {\r\n throw new Error(\"ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\\n In @MutationAction, mutate: ['a', 'b', ...] array keys must\\n match with return type = {a: {}, b: {}, ...} and must\\n also be in state.\");\r\n }\r\n }\r\n };\r\n module.actions[key] = params.root ? { root: true, handler: action } : action;\r\n module.mutations[key] = mutation;\r\n };\r\n}\r\n/**\r\n * The @MutationAction decorator turns this into an action that further calls a mutation\r\n * Both the action and the mutation are generated for you\r\n *\r\n * @param paramsOrTarget the params or the target class\r\n * @param key the name of the function\r\n * @param descriptor the function body\r\n * @constructor\r\n */\r\nfunction MutationAction(paramsOrTarget, key, descriptor) {\r\n if (!key && !descriptor) {\r\n /*\r\n * This is the case when `paramsOrTarget` is params.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction({mutate: ['incrCount']})\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n return mutationActionDecoratorFactory(paramsOrTarget);\r\n }\r\n else {\r\n /*\r\n * This is the case when `paramsOrTarget` is target.\r\n * i.e. when used as -\r\n *
\r\n            @MutationAction\r\n            async getCountDelta() {\r\n              return {incrCount: 5}\r\n            }\r\n         * 
\r\n */\r\n mutationActionDecoratorFactory({})(paramsOrTarget, key, descriptor);\r\n }\r\n}\n\nexport { Action, Module, Mutation, MutationAction, VuexModule, getModule };\n//# sourceMappingURL=index.js.map\n","import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators'\nimport ConfigHelper from '../../util/config-helper'\nimport KeycloakServices from '../../services/keycloak.services'\nimport { SessionStorageKeys } from '../../util/constants'\n\n@Module({\n name: 'auth',\n namespaced: true\n})\nexport default class AuthModule extends VuexModule {\n token: string = ''\n idToken: string = ''\n refreshToken: string = ''\n kcGuid: string = ''\n loginSource: string = ''\n\n get isAuthenticated (): boolean {\n return !!this.token\n }\n\n get keycloakGuid (): string {\n return this.kcGuid || KeycloakServices.getUserInfo().keycloakGuid\n }\n\n get currentLoginSource (): string {\n return this.loginSource || KeycloakServices.getUserInfo().loginSource\n }\n\n @Mutation\n public setKCToken (token: string): void {\n this.token = token\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, token)\n }\n\n @Mutation\n public setIDToken (idToken: string): void {\n this.idToken = idToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, idToken)\n }\n\n @Mutation\n public setRefreshToken (refreshToken: string): void {\n this.refreshToken = refreshToken\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, refreshToken)\n }\n\n @Mutation\n public setKCGuid (kcGuid: string): void {\n this.kcGuid = kcGuid\n }\n\n @Mutation\n public setLoginSource (loginSource: string): void {\n this.loginSource = loginSource\n }\n\n @Action({ rawError: true })\n public clearSession (): void {\n this.context.commit('setKCToken', '')\n this.context.commit('setIDToken', '')\n this.context.commit('setRefreshToken', '')\n this.context.commit('setKCGuid', '')\n this.context.commit('setLoginSource', '')\n }\n\n @Action({ rawError: true })\n public syncWithSessionStorage (): void {\n this.context.commit('setKCToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || '')\n this.context.commit('setIDToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || '')\n this.context.commit('setRefreshToken', ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || '')\n }\n}\n","import Keycloak, { KeycloakInitOptions, KeycloakInstance, KeycloakLoginOptions, KeycloakTokenParsed } from 'keycloak-js'\nimport { KCUserProfile } from '../models/KCUserProfile'\nimport ConfigHelper from '../util/config-helper'\nimport { SessionStorageKeys } from '../util/constants'\nimport { Store } from 'vuex'\nimport { getModule } from 'vuex-module-decorators'\nimport AuthModule from '../store/modules/auth'\nimport { decodeKCToken } from '../util/common-util'\n\nclass KeyCloakService {\n private kc: KeycloakInstance | undefined\n private parsedToken: any\n private static instance: KeyCloakService\n private store: Store | null = null\n private counter = 0\n private REFRESH_ATTEMPT_INTERVAL = 10 // in seconds\n private timerId: any = 0\n\n public static getInstance (): KeyCloakService {\n return (this.instance) ? this.instance : new KeyCloakService()\n }\n\n public get isInitialized (): boolean {\n return !!this.kc\n }\n\n // Setting keycloak config url as a static configuration to access from other parts of the app if needed\n async setKeycloakConfigUrl (keyCloakConfigurl: string) {\n ConfigHelper.setKeycloakConfigUrl(keyCloakConfigurl)\n }\n\n getKCInstance () : KeycloakInstance | undefined {\n return this.kc\n }\n\n async initializeKeyCloak (idpHint: string, store: Store) {\n this.store = store\n this.clearSession()\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n const keycloakConfig = ConfigHelper.getKeycloakConfigUrl()\n this.kc = Keycloak(keycloakConfig)\n const kcLogin = this.kc.login\n this.kc.login = (options?: KeycloakLoginOptions) => {\n if (options) {\n options.idpHint = idpHint\n }\n return kcLogin(options)\n }\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n return this.kc.init(kcOptions)\n }\n\n async initSession () {\n if (!this.store) {\n return\n }\n\n const authModule = getModule(AuthModule, this.store)\n authModule.setKCToken(this.kc?.token || '')\n authModule.setIDToken(this.kc?.idToken || '')\n authModule.setRefreshToken(this.kc?.refreshToken || '')\n\n const userInfo = this.getUserInfo()\n authModule.setKCGuid(userInfo?.keycloakGuid || '')\n authModule.setLoginSource(userInfo?.loginSource || '')\n\n await this.syncSessionAndScheduleTokenRefresh()\n }\n\n getUserInfo () : KCUserProfile {\n if (!this.parsedToken || !Object.keys(this.parsedToken).length) {\n this.parsedToken = decodeKCToken()\n }\n return {\n lastName: this.parsedToken?.lastname,\n firstName: this.parsedToken?.firstname,\n email: this.parsedToken?.email,\n // eslint-disable-next-line camelcase\n roles: this.parsedToken?.realm_access?.roles,\n keycloakGuid: this.parsedToken?.sub,\n userName: this.parsedToken?.username,\n fullName: this.parsedToken?.name,\n loginSource: this.parsedToken?.loginSource\n }\n }\n\n async logout (redirectUrl?: string) {\n let token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined\n if (token) {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n let kcOptions :KeycloakInitOptions = {\n onLoad: 'login-required',\n checkLoginIframe: false,\n timeSkew: 0,\n token,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n const siteminderLogoutUrl = ConfigHelper.getFromSession(SessionStorageKeys.SiteminderLogoutUrl) || undefined\n // Here we clear session storage, and add a flag in to prevent the app from\n // putting tokens back in from returning async calls (see #2341)\n ConfigHelper.clearSession()\n ConfigHelper.addToSession(SessionStorageKeys.PreventStorageSync, true)\n return new Promise((resolve, reject) => {\n this.kc && this.kc.init(kcOptions)\n .then(authenticated => {\n if (!authenticated) {\n resolve()\n }\n redirectUrl = redirectUrl || `${window.location.origin}${process.env.VUE_APP_PATH}`\n if (siteminderLogoutUrl?.includes('http')) {\n redirectUrl = `${siteminderLogoutUrl}?returl=${redirectUrl.replace(/(https?:\\/\\/)|(\\/)+/g, '$1$2')}&retnow=1`\n }\n this.kc && this.kc.logout({ redirectUri: redirectUrl })\n .then(() => {\n resolve()\n })\n .catch(error => {\n reject(error)\n })\n })\n .catch(error => {\n reject(error)\n })\n })\n }\n }\n\n async refreshToken (isForceRefresh?: boolean) {\n // Set the token expiry time as the minValidity to force refresh token\n if (!isForceRefresh && (!this.kc?.tokenParsed?.exp || !this.kc.timeSkew)) {\n return\n }\n // if isForceRefresh is true, send -1 in updateToken to force update the token\n let tokenExpiresIn = (isForceRefresh) ? -1 : this.kc.tokenParsed.exp - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew + 100\n if (this.kc) {\n this.kc.updateToken(tokenExpiresIn)\n .then(refreshed => {\n if (refreshed) {\n this.initSession()\n }\n })\n .catch(() => {\n this.clearSession()\n return new Error('Could not refresh Token')\n })\n } else {\n return new Error('Could not refresh Token:No Kc Instance')\n }\n }\n\n verifyRoles (allowedRoles:[], disabledRoles:[]) {\n let isAuthorized = false\n if (allowedRoles || disabledRoles) {\n let userInfo = this.getUserInfo()\n isAuthorized = allowedRoles ? allowedRoles.some(role => userInfo.roles.includes(role)) : !disabledRoles.some(role => userInfo.roles.includes(role))\n } else {\n isAuthorized = true\n }\n return isAuthorized\n }\n\n async initializeToken (store?: Store, isScheduleRefresh: boolean = true, forceLogin: boolean = false) {\n this.store = store\n const kcOptions: KeycloakInitOptions = {\n onLoad: forceLogin ? 'login-required' : 'check-sso',\n checkLoginIframe: false,\n timeSkew: 0,\n token: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken) || undefined,\n refreshToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakRefreshToken) || undefined,\n idToken: ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakIdToken) || undefined,\n pkceMethod: 'S256'\n }\n\n return new Promise((resolve, reject) => {\n this.kc = Keycloak(ConfigHelper.getKeycloakConfigUrl())\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n this.kc.init(kcOptions)\n .then(authenticated => {\n console.info('[TokenServices] is User Authenticated?: Syncing ' + authenticated)\n resolve(this.syncSessionAndScheduleTokenRefresh(isScheduleRefresh))\n })\n .catch(error => {\n reject(new Error('Could not Initialize KC' + error))\n })\n })\n }\n\n async syncSessionAndScheduleTokenRefresh (isScheduleRefresh: boolean = true) {\n if (this.kc?.authenticated) {\n this.syncSessionStorage()\n if (isScheduleRefresh) {\n this.scheduleRefreshTimer()\n }\n return this.kc.token\n } else {\n this.clearSession()\n return new Error('NOT_AUTHENTICATED')\n }\n }\n\n scheduleRefreshTimer (refreshEarlyTime = 0) {\n let refreshEarlyTimeinMilliseconds = Math.max(this.REFRESH_ATTEMPT_INTERVAL, refreshEarlyTime) * 1000\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n\n private scheduleRefreshToken (refreshEarlyTimeinMilliseconds: number) {\n let refreshTokenExpiresIn = -1\n // check if refresh token is still valid . Or else clear all timers and throw errors\n if (this.kc && this.kc.timeSkew !== undefined && this.kc.refreshTokenParsed) {\n refreshTokenExpiresIn = this.kc.refreshTokenParsed['exp']! - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (refreshTokenExpiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let expiresIn = -1\n if (this.kc && this.kc.tokenParsed && this.kc.tokenParsed['exp'] && this.kc.timeSkew !== undefined) {\n expiresIn = this.kc.tokenParsed['exp'] - Math.ceil(new Date().getTime() / 1000) + this.kc.timeSkew\n }\n if (expiresIn < 0) {\n throw new Error('Refresh Token Expired. No more token refreshes')\n }\n let refreshInMilliSeconds = (expiresIn * 1000) - refreshEarlyTimeinMilliseconds // in milliseconds\n console.info('[TokenServices] Token Refresh Scheduled in %s Seconds', (refreshInMilliSeconds / 1000))\n this.timerId = setTimeout(() => {\n console.log('[TokenServices] Refreshing Token Attempt: %s ', ++this.counter)\n this.kc!.updateToken(-1)\n .then(refreshed => {\n if (refreshed) {\n console.log('Token successfully refreshed')\n this.syncSessionStorage()\n this.scheduleRefreshToken(refreshEarlyTimeinMilliseconds)\n }\n })\n .catch(() => {\n clearTimeout(this.timerId)\n })\n }, refreshInMilliSeconds)\n }\n\n private syncSessionStorage () {\n if (this.kc) {\n if (this.kc.token) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakToken, this.kc.token)\n }\n if (this.kc.refreshToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakRefreshToken, this.kc.refreshToken)\n }\n if (this.kc.idToken) {\n ConfigHelper.addToSession(SessionStorageKeys.KeyCloakIdToken, this.kc.idToken)\n }\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, true)\n } else {\n ConfigHelper.addToSession(SessionStorageKeys.SessionSynced, false)\n }\n }\n\n private async clearSession () {\n if (this.store) {\n const authModule = getModule(AuthModule, this.store)\n authModule.clearSession()\n }\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakIdToken)\n ConfigHelper.removeFromSession(SessionStorageKeys.KeyCloakRefreshToken)\n }\n}\n\nexport default KeyCloakService.getInstance()\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n hookCallback = callback;\n}\n\nfunction isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n}\n\nfunction isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n}\n\nfunction hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n}\n\nfunction isUndefined(input) {\n return input === void 0;\n}\n\nfunction isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n}\n\nfunction isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n}\n\nfunction map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n}\n\nfunction extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n}\n\nfunction getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n some = Array.prototype.some;\n} else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nfunction isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n}\n\nfunction createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\nfunction copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n}\n\nfunction isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n}\n\nfunction warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n}\n\nfunction deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n}\n\nfunction set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n}\n\nfunction Locale(config) {\n if (config != null) {\n this.set(config);\n }\n}\n\nvar keys;\n\nif (Object.keys) {\n keys = Object.keys;\n} else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n}\n\nvar defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n}\n\nvar formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n// token: 'M'\n// padded: ['MM', 2]\n// ordinal: 'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n}\n\nfunction removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n}\n\nvar defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {};\n\nfunction addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n}\n\nfunction normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n}\n\nvar priorities = {};\n\nfunction addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n}\n\nfunction getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n}\n\nfunction isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nfunction absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n}\n\nfunction toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n}\n\nfunction makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n}\n\nfunction get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n}\n\nfunction set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n}\n\nfunction stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n}\n\nvar match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n}\n\nfunction getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n}\n\nfunction regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n}\n\nfunction addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n}\n\nvar YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\nfunction mod(n, x) {\n return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n} else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n}\n\nfunction daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n});\n\n// ALIASES\n\naddUnitAlias('month', 'M');\n\n// PRIORITY\n\naddUnitPriority('month', 8);\n\n// PARSING\n\naddRegexToken('M', match1to2);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n}\n\nfunction getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n}\n\nfunction getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n}\n\nfunction monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n}\n\nfunction computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// ALIASES\n\naddUnitAlias('year', 'y');\n\n// PRIORITIES\n\naddUnitPriority('year', 1);\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n return isLeapYear(this.year());\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n}\n\nfunction createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n}\n\nfunction weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// ALIASES\n\naddUnitAlias('week', 'w');\naddUnitAlias('isoWeek', 'W');\n\n// PRIORITIES\n\naddUnitPriority('week', 5);\naddUnitPriority('isoWeek', 5);\n\n// PARSING\n\naddRegexToken('w', match1to2);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// ALIASES\n\naddUnitAlias('day', 'd');\naddUnitAlias('weekday', 'e');\naddUnitAlias('isoWeekday', 'E');\n\n// PRIORITY\naddUnitPriority('day', 11);\naddUnitPriority('weekday', 11);\naddUnitPriority('isoWeekday', 11);\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n}\n\nfunction weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n}\n\nfunction computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n});\n\nfunction meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// ALIASES\n\naddUnitAlias('hour', 'h');\n\n// PRIORITY\naddUnitPriority('hour', 13);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2);\naddRegexToken('h', match1to2);\naddRegexToken('k', match1to2);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n}\n\nvar baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n localeFamilies = {},\n globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n}\n\nfunction normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n}\n\nfunction loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n}\n\n// This function will load locale and then set the global locale. If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n}\n\nfunction updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n}\n\nfunction listLocales() {\n return keys(locales);\n}\n\nfunction checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n// date from iso format\nfunction configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n}\n\nfunction extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n}\n\nfunction untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n}\n\nhooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n}\n\nfunction currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n}\n\nfunction prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n}\n\nfunction configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n}\n\nfunction max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n}\n\nvar now = function () {\n return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n];\n\nfunction isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n}\n\nfunction isValid$1() {\n return this._isValid;\n}\n\nfunction createInvalid$1() {\n return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n}\n\nfunction isDuration(obj) {\n return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10', '00']\n// '-1530' > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}\n\nfunction getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n}\n\nfunction setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n}\n\nfunction isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n}\n\nfunction isLocal() {\n return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n}\n\nfunction momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n}\n\nvar add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n}\n\nfunction isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n}\n\nfunction clone() {\n return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n}\n\nfunction isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n}\n\nfunction isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n}\n\nfunction isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n}\n\nfunction toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance. Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n}\n\nvar lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n);\n\nfunction localeData() {\n return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n}\n\nfunction utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n}\n\nfunction startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n}\n\nfunction valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n return new Date(this.valueOf());\n}\n\nfunction toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n}\n\nfunction toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n}\n\nfunction toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n return isValid(this);\n}\n\nfunction parsingFlags() {\n return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n});\n\nfunction localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n}\n\nfunction localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n}\n\nfunction getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n}\n\nfunction getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n}\n\nfunction getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n}\n\nfunction getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\naddUnitAlias('weekYear', 'gg');\naddUnitAlias('isoWeekYear', 'GG');\n\n// PRIORITY\n\naddUnitPriority('weekYear', 1);\naddUnitPriority('isoWeekYear', 1);\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n}\n\nfunction getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n}\n\nfunction getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// ALIASES\n\naddUnitAlias('quarter', 'Q');\n\n// PRIORITY\n\naddUnitPriority('quarter', 7);\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// ALIASES\n\naddUnitAlias('date', 'D');\n\n// PRIORITY\naddUnitPriority('date', 9);\n\n// PARSING\n\naddRegexToken('D', match1to2);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// ALIASES\n\naddUnitAlias('dayOfYear', 'DDD');\n\n// PRIORITY\naddUnitPriority('dayOfYear', 4);\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// ALIASES\n\naddUnitAlias('minute', 'm');\n\n// PRIORITY\n\naddUnitPriority('minute', 14);\n\n// PARSING\n\naddRegexToken('m', match1to2);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// ALIASES\n\naddUnitAlias('second', 's');\n\n// PRIORITY\n\naddUnitPriority('second', 15);\n\n// PARSING\n\naddRegexToken('s', match1to2);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n});\n\n// ALIASES\n\naddUnitAlias('millisecond', 'ms');\n\n// PRIORITY\n\naddUnitPriority('millisecond', 16);\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n);\nproto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n);\nproto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n);\nproto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n);\nproto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n}\n\nfunction listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n);\nhooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n}\n\nfunction bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n}\n\nfunction daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n}\n\n// TODO: Use this.as('ms')?\nfunction valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n}\n\nfunction makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n}\n\nvar asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\nfunction clone$1() {\n return createDuration(this);\n}\n\nfunction get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\nfunction weeks() {\n return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.29.4';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n};\n\nexport default hooks;\n","/**\n * Place to put all the custom utility methods\n */\n\nimport { Address, BaseAddressModel } from '@/models/Address'\nimport { Role, SlipStatus } from '@/util/constants'\n\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport moment from 'moment'\n\nexport default class CommonUtils {\n // Formatting date in the desired format for displaying in the template\n static formatDisplayDate (date: Date, format?: string) {\n return date ? moment(date).format(format || 'MMM DD, YYYY') : ''\n }\n\n static requiredFieldRule (errorMessage: string = 'This field is required') {\n return [v => !!v || errorMessage]\n }\n\n static optionalFieldRule (errorMessage: string, length: number) {\n return [v => !v || (v.length <= length) || errorMessage]\n }\n\n static isSigningIn (): boolean {\n const path = window.location.pathname\n return (\n path.includes('/signin') ||\n path.includes('/signin-redirect') ||\n path.includes('/signin-redirect-full')\n )\n }\n\n static isSigningOut (): boolean {\n const path = window.location.pathname\n return path.includes('/signout')\n }\n\n // blob convert to downloadable file\n static fileDownload (data: any, fileName: string, fileType: string = 'text/plain', action:string = 'download') {\n const blob = new Blob([data], { type: fileType })\n if (typeof window.navigator.msSaveBlob !== 'undefined') {\n // IE workaround for \"HTML7007: One or more blob URLs were\n // revoked by closing the blob for which they were created.\n // These URLs will no longer resolve as the data backing\n // the URL has been freed.\"\n window.navigator.msSaveBlob(blob, fileName)\n } else {\n const blobURL = (window.URL && window.URL.createObjectURL) ? window.URL.createObjectURL(blob) : window.webkitURL.createObjectURL(blob)\n const tempLink = document.createElement('a')\n tempLink.style.display = 'none'\n tempLink.href = blobURL\n if (action === 'open') {\n tempLink.setAttribute('target', '_blank')\n } else {\n tempLink.setAttribute('download', fileName)\n }\n\n // Safari thinks _blank anchor are pop ups. We only want to set _blank\n // target if the browser does not support the HTML5 download attribute.\n // This allows you to download files in desktop safari if pop up blocking\n // is enabled.\n if (typeof tempLink.download === 'undefined') {\n tempLink.setAttribute('target', '_blank')\n }\n document.body.appendChild(tempLink)\n tempLink.click()\n setTimeout(() => {\n document.body.removeChild(tempLink)\n // TO CHECK: not revoking may increase more temp memory usage\n // once download, we will revokeObjectURL\n if (action !== 'open') {\n window.URL.revokeObjectURL(blobURL)\n }\n }, 200)\n }\n }\n\n static statusListColor (status: string, textColor: boolean = true) {\n let color = ''\n switch (status) {\n case SlipStatus.ACTIVE:\n case SlipStatus.COMPLETE:\n case SlipStatus.REFUNDCOMPLETED:\n case SlipStatus.WRITEOFFCOMPLETED:\n color = 'success'\n break\n case SlipStatus.BOUNCED:\n case SlipStatus.NSF:\n case SlipStatus.LINKED:\n case SlipStatus.REFUNDREQUEST:\n case SlipStatus.REFUNDAUTHORIZED:\n case SlipStatus.WRITEOFFAUTHORIZED:\n case SlipStatus.WRITEOFFREQUESTED:\n case SlipStatus.VOID:\n color = 'error'\n break\n }\n\n return textColor ? `${color}--text` : color\n }\n\n static appendCurrencySymbol (currency: number | string) {\n return '$' + currency\n }\n\n static cleanObject (obj) {\n return Object.keys(obj)\n .filter((k) => obj[k] !== '' && obj[k] !== null)\n .reduce((a, k) => ({ ...a, [k]: obj[k] }), {})\n }\n\n static createQueryParams = params =>\n Object.keys(params)\n .map(k => `${k}=${encodeURI(params[k])}`)\n .join('&')\n\n static appendQueryParamsIfNeeded (targetUrl: string, route: any): string {\n const requestParams = CommonUtils.createQueryParams(route.query)\n return requestParams ? `${targetUrl}?${requestParams}` : targetUrl\n }\n\n // for converting address object of sbc-auth to as needed for BaseAddress component\n static convertAddressForComponent (address: Address) : BaseAddressModel {\n return {\n addressCity: address.city,\n addressCountry: address.country,\n addressRegion: address.region,\n deliveryInstructions: address.deliveryInstructions,\n postalCode: address.postalCode,\n streetAddress: address.street,\n streetAddressAdditional: address.streetAdditional\n }\n }\n\n // for converting address object of BaseAddress component to as needed for sbc-auth\n static convertAddressForAuth (iaddress: BaseAddressModel) : Address {\n return {\n city: iaddress.addressCity,\n country: iaddress.addressCountry,\n region: iaddress.addressRegion,\n deliveryInstructions: iaddress.deliveryInstructions,\n postalCode: iaddress.postalCode,\n street: iaddress.streetAddress,\n streetAdditional: iaddress.streetAddressAdditional\n }\n }\n\n static isApproverRole () {\n const approverRole:any = [Role.FAS_REFUND_APPROVER]\n return KeyCloakService.verifyRoles(approverRole, [])\n }\n\n static isVoidRole () {\n const voidRole:any = [Role.FAS_VOID]\n return KeyCloakService.verifyRoles(voidRole, [])\n }\n\n /**\n * check its in refunc process\n * @param {string} status\n */\n static isRefundProcessStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.REFUNDCOMPLETED,\n SlipStatus.REFUNDREJECTED\n ].includes(status)\n }\n\n /**\n * status is refundrequest\n * @param {string} status\n */\n static isRefundRequestStatus (status) {\n return [\n SlipStatus.REFUNDREQUEST\n ].includes(status)\n }\n\n /**\n * status permission allow to chaneg details\n * @param {string} status\n */\n static isEditEnabledBystatus (status) {\n return ![\n SlipStatus.REFUNDCOMPLETED,\n SlipStatus.REFUNDAUTHORIZED,\n SlipStatus.NSF,\n SlipStatus.LINKED\n ].includes(status)\n }\n\n static isObject = (object) => {\n return object != null && typeof object === 'object'\n }\n\n static isDeepEqual = (object1, object2) => {\n const objKeys1 = Object.keys(object1)\n const objKeys2 = Object.keys(object2)\n\n if (objKeys1.length !== objKeys2.length) return false\n\n for (const key of objKeys1) {\n const value1 = object1[key]\n const value2 = object2[key]\n\n const isObjects = CommonUtils.isObject(value1) && CommonUtils.isObject(value2)\n\n if ((isObjects && !CommonUtils.isDeepEqual(value1, value2)) ||\n (!isObjects && value1 !== value2)\n ) {\n return false\n }\n }\n return true\n }\n}\n","import { SessionStorageKeys } from '@/util/constants'\n\nexport default class ConfigHelper {\n static async fetchConfig () {\n // sbc common components need the following keys\n sessionStorage.setItem(SessionStorageKeys.AuthApiUrl, ConfigHelper.getAuthAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.PayApiUrl, ConfigHelper.getPayAPIURL())\n sessionStorage.setItem(SessionStorageKeys.StatusApiUrl, ConfigHelper.getStatusAPIUrl())\n sessionStorage.setItem(SessionStorageKeys.AuthWebUrl, ConfigHelper.getAuthWebUrl())\n sessionStorage.setItem(SessionStorageKeys.FasWebUrl, ConfigHelper.getFasWebUrl())\n if (ConfigHelper.getSiteminderLogoutUrl()) {\n sessionStorage.setItem(SessionStorageKeys.SiteminderLogoutUrl, ConfigHelper.getSiteminderLogoutUrl())\n }\n }\n\n /**\n * this will run everytime when vue is being loaded..so do the call only when session storage doesnt have the values\n */\n static saveConfigToSessionStorage () {\n return this.fetchConfig()\n }\n\n static getSelfURL () {\n // this is without a trailing slash\n return `${window.location.origin}${import.meta.env.VUE_APP_PATH}`.replace(/\\/$/, '') // remove the slash at the end\n }\n\n static getPayAPIURL () {\n const payApiUrl = `${import.meta.env.VUE_APP_PAY_API_URL}` + `${import.meta.env.VUE_APP_PAY_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.PayApiUrl) || payApiUrl\n }\n\n static getFasAPIURL () {\n return `${ConfigHelper.getPayAPIURL()}/fas`\n }\n\n static getAuthAPIUrl () {\n const authApiUrl = `${import.meta.env.VUE_APP_AUTH_API_URL}` + `${import.meta.env.VUE_APP_AUTH_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.AuthApiUrl) || authApiUrl\n }\n\n static getAuthWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.AuthWebUrl) || `${import.meta.env.VUE_APP_AUTH_WEB_URL}`\n }\n\n static getFasWebUrl () {\n return sessionStorage.getItem(SessionStorageKeys.FasWebUrl) || `${import.meta.env.VUE_APP_FAS_WEB_URL}`\n }\n\n static getStatusAPIUrl () {\n const statusApiUrl = `${import.meta.env.VUE_APP_STATUS_API_URL}` + `${import.meta.env.VUE_APP_STATUS_API_VERSION}`\n return sessionStorage.getItem(SessionStorageKeys.StatusApiUrl) || statusApiUrl\n }\n\n static getSiteminderLogoutUrl () {\n const logoutUrl = `${import.meta.env.VUE_APP_SITEMINDER_LOGOUT_URL}`\n return sessionStorage.getItem(SessionStorageKeys.SiteminderLogoutUrl) || logoutUrl\n }\n\n static getKeycloakAuthUrl () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_AUTH_URL}`\n }\n\n static getKeycloakRealm () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_REALM}`\n }\n\n static getKeycloakClientId () {\n return `${import.meta.env.VUE_APP_KEYCLOAK_CLIENTID}`\n }\n\n static getAddressCompleteKey () {\n return `${import.meta.env.VUE_APP_ADDRESS_COMPLETE_KEY}`\n }\n\n static addToSession (key:string, value:any) {\n sessionStorage.setItem(key, value)\n }\n\n static getFromSession (key:string) {\n return sessionStorage.getItem(key)\n }\n\n static removeFromSession (key:string) {\n sessionStorage.removeItem(key)\n }\n\n static clearSession () {\n sessionStorage.clear()\n }\n}\n","// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\n\nfunction debounce (func, wait = 300, immediate = false) {\n let timeout\n\n // to avoid this type error define this with type any, arg for rest arguments\n return function (this: any, ...args) {\n const context = this\n\n const later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n const callNow = immediate && !timeout\n\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n}\n\nexport default debounce\n","import { computed, ref } from '@vue/composition-api'\n\nconst hasCallFailed = ref(false)\nconst activeCalls = ref(0)\nconst isThereActiveCalls = computed(() => {\n return activeCalls.value > 0\n})\n\nexport const useIndicators = () => {\n return {\n hasCallFailed,\n activeCalls,\n isThereActiveCalls\n }\n}\n","/*\nComposable function for loader component that is displayed whenever axios async process takes place\nGlobal loader is used in App.vue where show a full route loader - \nWhile, isLoading can be used inside an individual component - \n\n*/\n\nimport { ref } from '@vue/composition-api'\nimport { useIndicators } from '../useIndicators'\n\nexport function useLoader () {\n const { isThereActiveCalls } = useIndicators()\n const isLoading = ref(false)\n // vuex getters\n function changeLoadingStatus (isLoadingStatus: boolean): void {\n isLoading.value = isLoadingStatus\n }\n\n function toggleLoading (): void {\n changeLoadingStatus(!isLoading.value)\n }\n\n return {\n isLoading,\n isThereActiveCalls,\n toggleLoading\n }\n}\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\nvar pkg = require('./../../package.json');\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","import Axios from 'axios'\nimport ConfigHelper from '@/util/config-helper'\nimport { SessionStorageKeys } from '@/util/constants'\nimport { useIndicators } from '@/composables/useIndicators'\n// import store from '@/store'\n// using fasStore from window to avoid library build issue.\nconst axios = Axios.create()\n\nconst { activeCalls, hasCallFailed, isThereActiveCalls } = useIndicators()\n\naxios.defaults.showGlobalLoader = false // by default, false\naxios.defaults.showGlobalErrorHandling = true\n\naxios.interceptors.request.use(\n config => {\n const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n if (config.showGlobalLoader) {\n activeCalls.value++\n }\n return config\n },\n error => Promise.reject(error)\n)\n\naxios.interceptors.response.use(\n response => {\n // decrement active calls count by one\n if (response.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n return response\n },\n error => {\n // decrement active calls count by one\n if (error.config.showGlobalLoader && isThereActiveCalls.value) {\n activeCalls.value--\n }\n // call has failed in this case. And if the config showGlobalErrorHandling is true, then update store\n if (error.config.showGlobalErrorHandling && error?.response?.status >= 500) {\n hasCallFailed.value = true\n }\n return Promise.reject(error)\n }\n)\n\n// to work on both case export as default and normal\nexport { axios }\nexport default axios\n","import { AxiosResponse } from 'axios'\nimport { Code } from '@/models/Code'\nimport ConfigHelper from '@/util/config-helper'\nimport axios from '@/util/http-util'\n\nexport default class CodesService {\n public static async getCodes (codeType: string): Promise> {\n return axios.get(`${ConfigHelper.getPayAPIURL()}/codes/${codeType}`)\n }\n}\n","import { ref } from '@vue/composition-api'\nimport { Code } from '@/models/Code'\nimport CodesService from '@/services/codes.service'\nimport { SlipStatus } from '@/util/constants'\n\nconst routingSlipStatusList = ref([])\n\nexport const useCodes = () => {\n const getRoutingSlipStatusList = async () => {\n if (routingSlipStatusList.value.length === 0) {\n const response: any = await CodesService.getCodes(\n 'routing_slip_statuses'\n )\n if (response && response.data && response.status === 200) {\n routingSlipStatusList.value = response.data?.codes.filter(\n code => code.code !== SlipStatus.REFUNDREJECTED\n )\n return\n }\n routingSlipStatusList.value = []\n }\n }\n return {\n routingSlipStatusList,\n getRoutingSlipStatusList\n }\n}\n","import { Code } from '@/models/Code'\nimport { SlipStatus } from '@/util/constants'\nimport { ref, computed, toRefs, onMounted } from '@vue/composition-api'\nimport { useCodes } from '../useCodes'\n\nexport function useStatusList (props, context) {\n const { getRoutingSlipStatusList, routingSlipStatusList } = useCodes()\n // default value set blank incase if we didnt pass props\n const { value = ref('') } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const currentStatus = computed({\n get: () => {\n return value.value || ''\n },\n set: (modalValue: Code) => {\n context.emit('input', modalValue.code)\n }\n })\n\n onMounted(() => {\n // getting status list mouint and setting inside store\n // will make call once till page refresh\n getRoutingSlipStatusList()\n })\n\n /**\n * return status label on code\n *\n * @param {string} code\n * @returns {string} description - label\n */\n function statusLabel (code: string) {\n const codeArray = selectedStatusObject(code)\n return codeArray[0]?.description || ''\n }\n\n /**\n * filtering array and find given value of object\n * use full when needed to set object of status\n * @param {string} code\n * @returns [{code, description}]\n */\n\n function selectedStatusObject (code: string) {\n return routingSlipStatusList.value?.filter(\n statusList => statusList.code === code\n )\n }\n\n return {\n routingSlipStatusList,\n currentStatus,\n statusLabel,\n selectedStatusObject\n }\n}\n","import { AxiosResponse } from 'axios'\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport { GetFeeRequestParams, Payment } from '@/models/Payment'\nimport { LinkRoutingSlipPrams } from '@/models/RoutingSlip'\nimport axios from '@/util/http-util'\nimport { CreateRoutingSlipStatus, PatchActions, SlipStatus } from '@/util/constants'\n\nexport default class RoutingSlip {\n public static async getRoutingSlip (\n routingNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingNumber}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async createRoutingSlip (\n routingSlipRequest: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips`,\n routingSlipRequest,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async adjustRoutingSlip (\n payments: Payment[],\n routingSlipNumber: string\n ): Promise {\n const payload = {\n status: SlipStatus.CORRECTION,\n payments: payments\n }\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=${PatchActions.UPDATE_STATUS}`,\n payload\n )\n }\n\n public static async updateRoutingSlipStatus (\n code: string,\n routingSlipNumber: string\n ): Promise {\n return axios.patch(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}?action=updateStatus`,\n { status: code }\n )\n }\n\n public static async updateRoutingSlipRefund (\n details: string,\n routingSlipNumber: string\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/refunds`,\n details\n )\n }\n\n public static async getSearchRoutingSlip (\n searchParams: RoutingSlip,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/queries`,\n searchParams,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveLinkRoutingSlip (\n LinkRoutingSlip: LinkRoutingSlipPrams,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/links`,\n LinkRoutingSlip,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getLinkedRoutingSlips (\n routingSlipNumber: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${routingSlipNumber}/links`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getDailyReport (\n selectedDate: string,\n type: string = 'application/pdf',\n showGlobalLoader: boolean = false\n ): Promise {\n const headers = {\n Accept: type\n }\n return axios.post(\n `${ConfigHelper.getFasAPIURL()}/routing-slips/${selectedDate}/reports`,\n {},\n {\n headers,\n responseType: 'blob' as 'json',\n showGlobalLoader: showGlobalLoader\n }\n )\n }\n\n public static async getSearchFilingType (\n searchParams: string,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/schedules?description=${searchParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async getFeeByCorpTypeAndFilingType (\n getFeeRequestParams: GetFeeRequestParams,\n showGlobalLoader: boolean = false\n ): Promise {\n const requestParams = CommonUtils.createQueryParams(getFeeRequestParams.requestParams)\n return axios.get(\n `${ConfigHelper.getPayAPIURL()}/fees/${getFeeRequestParams.corpTypeCode}/${getFeeRequestParams.filingTypeCode}?${requestParams}`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n\n public static async saveManualTransactions (\n transactions: any,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests`,\n transactions,\n { showGlobalLoader: showGlobalLoader }\n\n )\n }\n\n public static async cancelRoutingSlipInvoice (\n invoiceId: number,\n showGlobalLoader: boolean = false\n ): Promise {\n return axios.post(\n `${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}/refunds`,\n { showGlobalLoader: showGlobalLoader }\n )\n }\n}\n","import { computed, ref } from '@vue/composition-api'\nimport RoutingSlipService from '@/services/routingSlip.services'\nimport { AccountInfo, AdjustRoutingSlipAmountPrams, AdjustRoutingSlipChequePrams, GetRoutingSlipRequestPayload, LinkedRoutingSlips, RoutingSlip, RoutingSlipDetails } from '@/models/RoutingSlip'\nimport { ApiErrors, CreateRoutingSlipStatus, headerSearchTitle as headerSearchTitleConstant, SlipStatus } from '@/util/constants'\nimport CommonUtils from '@/util/common-util'\nimport { BusinessInfo, GetFeeRequestParams, Payment, TransactionParams } from '@/models/Payment'\n\nconst headerSearchTitle = ref(headerSearchTitleConstant)\nconst searchRoutingSlipResult = ref([])\nconst searchRoutingSlipParams = ref({})\n\nconst routingSlip = ref({})\nconst linkedRoutingSlips = ref(undefined)\nconst routingSlipDetails = ref({})\nconst accountInfo = ref({})\nconst chequePayment = ref([])\nconst cashPayment = ref({})\nconst isPaymentMethodCheque = ref(true)\nconst isAmountPaidInUsd = ref(false)\nconst autoCompleteRoutingSlips = ref([])\n\nexport const useRoutingSlip = () => {\n // Computed\n const invoiceCount = computed(() => {\n return routingSlip.value?.invoices?.length\n })\n\n const searchParamsExist = computed(() => {\n const params = searchRoutingSlipParams.value\n for (const key in params) {\n if (params[key] && params[key] !== '') {\n return false\n }\n }\n return true\n })\n\n // for a child linked to a parent routing slip, there would be a parentNumber\n const isRoutingSlipAChild = computed(() => {\n return !!routingSlip.value?.parentNumber\n })\n\n // if routingslip has parentNumber then it is a child Else, check if there are any children in linkedroutingslips for it.(in this case, it is a parent)\n const isRoutingSlipLinked = computed(() => {\n return (\n isRoutingSlipAChild.value || linkedRoutingSlips.value?.children.length > 0\n )\n })\n\n const isRoutingSlipVoid = computed(() => {\n return routingSlip.value?.status === SlipStatus.VOID\n })\n\n const updateRoutingSlipChequeNumber = (chequeNumToChange: AdjustRoutingSlipChequePrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (chequeNumToChange.paymentIndex === i) {\n payment.chequeReceiptNumber = chequeNumToChange.chequeNum\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n const updateRoutingSlipAmount = (amountToChange: AdjustRoutingSlipAmountPrams) => {\n const payments = routingSlip.value.payments.map((payment: Payment, i: number) => {\n if (amountToChange.paymentIndex === i) {\n if (amountToChange.isRoutingSlipPaidInUsd) {\n payment.paidUsdAmount = amountToChange.amount\n } else {\n payment.paidAmount = amountToChange.amount\n }\n }\n return { ...payment }\n })\n routingSlip.value.payments = payments\n }\n\n // Functions\n const createRoutingSlip = async () => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n let routingSlipRequest: RoutingSlip = {}\n routingSlipRequest = { ...routingSlipDetails.value }\n routingSlipRequest.paymentAccount = accountInfo.value\n\n // By design, a routing slip can only have one payment method - CASH or CHEQUE.\n routingSlipRequest.payments = isPaymentMethodCheque.value\n ? chequePayment.value\n : [cashPayment.value]\n\n const response = await RoutingSlipService.createRoutingSlip(\n routingSlipRequest,\n true\n )\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n }\n\n const checkRoutingNumber = async (): Promise => {\n try {\n const routingNumber = routingSlipDetails.value.number\n const response = await RoutingSlipService.getRoutingSlip(routingNumber)\n // if routing number existing we will get 200 as response\n // else we will get 204\n if (response.status === 204) {\n return CreateRoutingSlipStatus.VALID\n }\n // all other case routing is existing so can't use this number\n return CreateRoutingSlipStatus.EXISTS\n } catch (error) {\n if (error.response?.status === 400 && error.response?.data?.type === ApiErrors.FAS_INVALID_ROUTING_SLIP_DIGITS) {\n return CreateRoutingSlipStatus.INVALID_DIGITS\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n // on error we allow the routing number which should break on create and show error message\n return CreateRoutingSlipStatus.VALID\n }\n }\n\n const getRoutingSlip = async (getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload) => {\n try {\n const response = await RoutingSlipService.getRoutingSlip(\n getRoutingSlipRequestPayload.routingSlipNumber,\n getRoutingSlipRequestPayload?.showGlobalLoader\n )\n\n if (response && response.data && response.status === 200) {\n routingSlip.value = response.data\n }\n // TODO : need to handle if slip not existing\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const updateRoutingSlipStatus = async (\n statusDetails: any\n ) => {\n const slipNumber = routingSlip.value.number\n // update status\n try {\n let response\n if (CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n response = await RoutingSlipService.updateRoutingSlipRefund(\n statusDetails,\n slipNumber\n )\n } else {\n response = await RoutingSlipService.updateRoutingSlipStatus(\n statusDetails.status,\n slipNumber\n )\n }\n if (response?.data && (response.status === 200 || response.status === 202)) {\n if (!CommonUtils.isRefundProcessStatus(statusDetails?.status)) {\n routingSlip.value = response.data\n } else {\n const getRoutingSlipRequestPayload: GetRoutingSlipRequestPayload = { routingSlipNumber: slipNumber }\n getRoutingSlip(getRoutingSlipRequestPayload)\n }\n return response\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const adjustRoutingSlip = async (payments: Payment[]): Promise => {\n // build the RoutingSlip Request JSON object that needs to be sent.\n const slipNumber = routingSlip.value.number\n try {\n const response = await RoutingSlipService.adjustRoutingSlip(\n payments,\n slipNumber\n )\n if (response?.data && response.status === 200) {\n return response.data\n }\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response)\n return error?.response\n }\n }\n\n const resetRoutingSlipDetails = () => {\n routingSlipDetails.value = undefined\n accountInfo.value = undefined\n chequePayment.value = undefined\n cashPayment.value = undefined\n isPaymentMethodCheque.value = undefined\n }\n\n const resetSearchParams = (): void => {\n searchRoutingSlipParams.value = {}\n searchRoutingSlipResult.value = []\n }\n\n const searchRoutingSlip = async () => {\n // // build the RoutingSlip Request JSON object that needs to be sent.\n\n let params = { ...searchRoutingSlipParams.value }\n // filtering and removing all non set values\n params = CommonUtils.cleanObject(params)\n\n // formatting as per API\n if (params.dateFilter) {\n params.dateFilter = {\n startDate: CommonUtils.formatDisplayDate(\n params.dateFilter[0],\n 'YYYY-MM-DD'\n ),\n endDate: CommonUtils.formatDisplayDate(\n params.dateFilter[1],\n 'YYYY-MM-DD'\n )\n }\n }\n\n // check for error handling\n if (params.status) {\n params.status = params.status.code\n }\n // for time being setting limit to avoid overloading\n params.page = 1\n params.limit = 50\n\n if (Object.keys(params).length > 0) {\n // need to reset result of there is no search params\n const response = await RoutingSlipService.getSearchRoutingSlip(\n params\n )\n if (response && response.data && response.status === 200) {\n searchRoutingSlipResult.value = response.data?.items\n return\n }\n }\n searchRoutingSlipResult.value = []\n }\n\n const saveLinkRoutingSlip = async (\n parentRoutingSlipNumber: string\n ): Promise => {\n const childRoutingSlipNumber: string = routingSlip.value.number\n\n const LinkPrams = { childRoutingSlipNumber, parentRoutingSlipNumber }\n\n try {\n // handle error condtions here\n const response = await RoutingSlipService.saveLinkRoutingSlip(LinkPrams)\n if (response && response.data && response.status === 200) {\n return {\n error: false\n }\n }\n } catch (error) {\n if (error.response.status === 400) {\n return { error: true, details: error.response?.data }\n }\n\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data)\n }\n }\n\n const getLinkedRoutingSlips = async (routingSlipNumber) => {\n try {\n const response = await RoutingSlipService.getLinkedRoutingSlips(\n routingSlipNumber,\n true\n )\n let result: LinkedRoutingSlips\n if (response && response.data && response.status === 200) {\n result = response.data\n }\n // 204 non content response\n linkedRoutingSlips.value = result\n } catch (error) {\n linkedRoutingSlips.value = undefined\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n }\n }\n\n const getDailyReportByDate = async (selectedDate, type) => {\n const formatedDate = CommonUtils.formatDisplayDate(\n selectedDate,\n 'YYYY-MM-DD'\n )\n try {\n return await RoutingSlipService.getDailyReport(formatedDate, type, false)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('error ', error.response?.data) // 500 errors may not return data\n return error.response\n }\n }\n\n const getAutoCompleteRoutingSlips = async (\n routingSlipNumber\n ): Promise => {\n const response = await RoutingSlipService.getSearchRoutingSlip({\n routingSlipNumber\n })\n if (response && response.data && response.status === 200) {\n return response.data?.items\n }\n\n return []\n }\n\n const getFeeByCorpTypeAndFilingType = async (\n getFeeRequestParams: GetFeeRequestParams\n ): Promise => {\n // Currently, in FAS we only need total from the result that is the source of truth.\n // Other properties such as tax breakdown and priority fees can be ignored here.\n const response = await RoutingSlipService.getFeeByCorpTypeAndFilingType(\n getFeeRequestParams\n )\n if (response && response.data && response.status === 200) {\n return response.data?.total\n }\n return null\n }\n\n const saveManualTransactions = async (transation: any): Promise => {\n // prepare format from here\n const routingSlipNumber: string = routingSlip.value.number\n\n const {\n referenceNumber,\n filingType,\n futureEffective,\n priority,\n quantity\n } = transation\n const businessInfo: BusinessInfo = {\n corpType: filingType.corpTypeCode.code\n }\n\n // no need to pass if empty\n if (referenceNumber) {\n businessInfo.businessIdentifier = referenceNumber\n }\n\n const transactionParams: TransactionParams = {\n businessInfo,\n filingInfo: {\n filingTypes: [\n {\n filingTypeCode: filingType.filingTypeCode.code,\n futureEffective: futureEffective,\n priority: priority,\n quantity: parseInt(quantity)\n }\n ]\n },\n accountInfo: {\n routingSlip: routingSlipNumber\n }\n }\n\n const response = await RoutingSlipService.saveManualTransactions(\n transactionParams\n )\n return response\n }\n\n const cancelRoutingSlipInvoice = async (invoiceId: number) => {\n return await RoutingSlipService.cancelRoutingSlipInvoice(invoiceId)\n }\n\n return {\n headerSearchTitle,\n searchRoutingSlipResult,\n searchRoutingSlipParams,\n routingSlip,\n linkedRoutingSlips,\n routingSlipDetails,\n accountInfo,\n chequePayment,\n cashPayment,\n isPaymentMethodCheque,\n isAmountPaidInUsd,\n autoCompleteRoutingSlips,\n invoiceCount,\n searchParamsExist,\n isRoutingSlipAChild,\n isRoutingSlipLinked,\n isRoutingSlipVoid,\n updateRoutingSlipChequeNumber,\n updateRoutingSlipAmount,\n createRoutingSlip,\n checkRoutingNumber,\n getRoutingSlip,\n updateRoutingSlipStatus,\n adjustRoutingSlip,\n resetRoutingSlipDetails,\n resetSearchParams,\n searchRoutingSlip,\n saveLinkRoutingSlip,\n getLinkedRoutingSlips,\n getDailyReportByDate,\n getAutoCompleteRoutingSlips,\n getFeeByCorpTypeAndFilingType,\n saveManualTransactions,\n cancelRoutingSlipInvoice\n }\n}\n","import { computed, onMounted, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport ConfigHelper from '@/util/config-helper'\nimport debounce from '@/util/debounce'\nimport { useLoader } from '@/composables/common/useLoader'\nimport { useStatusList } from '@/composables/common/useStatusList'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useSearch (props, context) {\n const {\n headerSearchTitle,\n resetSearchParams,\n searchParamsExist,\n searchRoutingSlip,\n searchRoutingSlipParams,\n searchRoutingSlipResult\n } = useRoutingSlip()\n const { isLibraryMode } = toRefs(props)\n // Adding openFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> FAS Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n const fasUrl = `${ConfigHelper.getFasWebUrl()}?openFromAuth=true`\n\n const { statusLabel } = useStatusList(reactive({ value: '' }), {})\n const { isLoading, toggleLoading } = useLoader()\n\n const showExpandedFolio = ref([])\n const showExpandedCheque = ref([])\n // to make sure not updating result on keyup\n const searchParamsChanged = ref(false)\n\n const headerSearch: any = computed({\n get: () => {\n return headerSearchTitle.value || []\n },\n set: (modalValue: any) => {\n headerSearchTitle.value = modalValue\n }\n })\n\n // columntoshow component and update the local object if display = true\n const displayedHeaderSearch: any = computed(() => {\n const displayed = []\n for (let i = 0; i < headerSearch.value?.length; i++) {\n if (headerSearch.value[i].display) {\n displayed.push(headerSearch.value[i])\n }\n }\n return displayed\n })\n\n function canShowColumn (columnName) {\n return displayedHeaderSearch.value.find(header => {\n return header.value === columnName\n })\n }\n\n // using same v-model value for getting value and update parent on change\n const routingSlipNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.routingSlipNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n routingSlipNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const receiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.receiptNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n receiptNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const status: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.status || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n status: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const businessIdentifier: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.businessIdentifier || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n businessIdentifier: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const accountName: any = computed({\n get: () => {\n return searchRoutingSlipParams.value?.accountName || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n accountName: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const initiator: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.initiator || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n initiator: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const remainingAmount: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.remainingAmount || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n remainingAmount: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const dateFilter: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.dateFilter || []\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n dateFilter: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n const chequeReceiptNumber: any = computed({\n get: () => {\n return searchRoutingSlipParams.value.chequeReceiptNumber || ''\n },\n set: (modalValue: any) => {\n searchRoutingSlipParams.value = {\n ...searchRoutingSlipParams.value,\n chequeReceiptNumber: modalValue\n }\n searchParamsChanged.value = true\n }\n })\n\n function applyDateFilter (dateRangeObj) {\n dateFilter.value = dateRangeObj\n }\n\n async function searchNow () {\n toggleLoading()\n await searchRoutingSlip()\n searchParamsChanged.value = false\n toggleLoading()\n }\n\n onMounted(() => {\n // To be triggered when coming back to FAS home page from a breadcrumb and if there are any search params present\n if (!searchParamsExist.value) {\n searchNow()\n }\n })\n\n const debouncedSearch = debounce(() => {\n searchNow()\n })\n\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n // get label of status\n function getStatusLabel (code: string) {\n return statusLabel(code)\n }\n\n function clearFilter () {\n resetSearchParams()\n }\n\n function toggleFolio (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedFolio.value.includes(id)) {\n showExpandedFolio.value = showExpandedFolio.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedFolio.value.push(id)\n }\n }\n\n function toggleCheque (id: number) {\n // to show and hide multiple folio on click\n // remove from array if already existing else add to array\n if (showExpandedCheque.value.includes(id)) {\n showExpandedCheque.value = showExpandedCheque.value.filter(function (item) {\n return item !== id\n })\n } else {\n showExpandedCheque.value.push(id)\n }\n }\n\n function formatFolioResult (routingSlip) {\n // to make sure not updating on keyup\n if (\n !searchParamsChanged.value &&\n businessIdentifier.value &&\n businessIdentifier.value !== ''\n ) {\n return [businessIdentifier.value]\n }\n const { invoices } = routingSlip\n\n if (invoices) {\n return invoices\n .filter(invoice => invoice.businessIdentifier)\n .map(value => value.businessIdentifier)\n }\n return ['-']\n }\n\n function navigateTo (routingSlipNumber: number) : void {\n if (isLibraryMode.value) {\n // This scenario would hit when the FAS Search is displayed as a plugin in Staff dashboard\n // we append queryparams so that we can persist breadcrumbs across different components and refresh issue\n // Adding viewFromAuth=true queryparams so that we can build breadcrumbs\n // Eg of a typical breadcrumb flow = Staff Dashboard -> View Routing Slip: test -> View Routing Slip: testchild\n window.location.href = `${ConfigHelper.getFasWebUrl()}view-routing-slip/${routingSlipNumber}?viewFromAuth=true`\n } else {\n context.root.$router.push(appendQueryParamsIfNeeded(`/view-routing-slip/${routingSlipNumber}`, context.root.$route))\n }\n }\n\n return {\n headerSearch,\n displayedHeaderSearch,\n status,\n routingSlipNumber,\n receiptNumber,\n dateFilter,\n businessIdentifier,\n accountName,\n remainingAmount,\n chequeReceiptNumber,\n canShowColumn,\n applyDateFilter,\n searchNow,\n debouncedSearch,\n searchRoutingSlipResult,\n getStatusLabel,\n searchParamsExist,\n clearFilter,\n formatFolioResult,\n showExpandedFolio,\n showExpandedCheque,\n toggleFolio,\n toggleCheque,\n isLoading,\n navigateTo,\n fasUrl,\n initiator\n }\n}\n","import { computed, reactive, ref, toRefs } from '@vue/composition-api'\n\nimport CommonUtils from '@/util/common-util'\nimport { DateFilterCodes } from '@/util/constants'\nimport moment from 'moment'\n\nexport const DATEFILTER_CODES = DateFilterCodes\nexport function useDateRange (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const dateRangeSelected = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: Date[]) => {\n context.emit('input', modalValue)\n }\n })\n // to keep track of old value on cancel rest to this value default value will props passed\n const oldSelectedRange = ref(value.value)\n\n const dateRangeSelectedDisplay = computed(() => {\n return dateRangeSelected.value.join(' - ')\n })\n\n const dateFilterRanges = reactive([\n {\n label: 'Today',\n code: DATEFILTER_CODES.TODAY\n },\n {\n label: 'Yesterday',\n code: DATEFILTER_CODES.YESTERDAY\n },\n {\n label: 'Last Week',\n code: DATEFILTER_CODES.LASTWEEK\n },\n {\n label: 'Last Month',\n code: DATEFILTER_CODES.LASTMONTH\n },\n {\n label: 'Custom Range',\n code: DATEFILTER_CODES.CUSTOMRANGE\n }\n ])\n\n const dateFilterSelectedIndex = ref(null)\n const dateFilterSelected: any = ref({})\n const showDateFilter = ref(false)\n const pickerDate = ref('')\n\n // apply filter button enable only if the date ranges are selected and start date <= end date\n const isApplyFilterBtnValid = computed(() => {\n if (\n dateRangeSelected.value.length === 2 &&\n dateRangeSelected.value[0] > dateRangeSelected.value[1]\n ) {\n dateRangeSelected.value = [\n dateRangeSelected.value[1],\n dateRangeSelected.value[0]\n ]\n }\n\n return (\n dateRangeSelected.value[0] &&\n dateRangeSelected.value[1] &&\n dateRangeSelected.value[0] <= dateRangeSelected.value[1]\n )\n })\n\n const showDateRangeSelected = computed(() => {\n let dateText = ''\n if (\n dateFilterSelected.value.code === DATEFILTER_CODES.TODAY ||\n dateFilterSelected.value.code === DATEFILTER_CODES.YESTERDAY\n ) {\n dateText = `${\n dateFilterSelected.value.label\n }: ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )}`\n } else {\n dateText = `${dateFilterSelected.value?.label}: \n ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[0],\n 'MM-DD-YYYY'\n )} \n - ${CommonUtils.formatDisplayDate(\n dateRangeSelected.value[1],\n 'MM-DD-YYYY'\n )}`\n }\n\n return dateFilterSelected.value?.code\n ? dateText\n : 'No dates selected'\n })\n\n function formatDatePickerDate (dateObj) {\n return dateObj.format('YYYY-MM-DD')\n }\n\n function dateFilterChange (val) {\n if (val > -1) {\n dateFilterSelected.value = dateFilterRanges[val]\n switch (dateFilterSelected.value.code) {\n case DATEFILTER_CODES.TODAY:\n // eslint-disable-next-line no-case-declarations\n const today = formatDatePickerDate(moment())\n dateRangeSelected.value = [today, today]\n pickerDate.value = today.slice(0, -3)\n break\n case DATEFILTER_CODES.YESTERDAY:\n // eslint-disable-next-line no-case-declarations\n const yesterday = formatDatePickerDate(moment().subtract(1, 'days'))\n dateRangeSelected.value = [yesterday, yesterday]\n pickerDate.value = yesterday.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTWEEK:\n // Week should start from Monday and Ends on Sunday\n // eslint-disable-next-line no-case-declarations\n const weekStart = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .startOf('isoWeek')\n )\n // eslint-disable-next-line no-case-declarations\n const weekEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'weeks')\n .endOf('isoWeek')\n )\n dateRangeSelected.value = [weekStart, weekEnd]\n pickerDate.value = weekStart.slice(0, -3)\n break\n case DATEFILTER_CODES.LASTMONTH:\n // eslint-disable-next-line no-case-declarations\n const monthStart = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .startOf('month')\n )\n // eslint-disable-next-line no-case-declarations\n const monthEnd = formatDatePickerDate(\n moment()\n .subtract(1, 'months')\n .endOf('month')\n )\n dateRangeSelected.value = [monthStart, monthEnd]\n pickerDate.value = monthStart.slice(0, -3)\n break\n case DATEFILTER_CODES.CUSTOMRANGE:\n pickerDate.value = ''\n }\n }\n }\n\n function dateClick (date) {\n pickerDate.value = ''\n // ideally it should find using DATEFILTER_CODES.CUSTOMRANGE, but since its static and date click is often, better give the index as it is\n dateFilterSelectedIndex.value = 4 // 4 = Custom Range\n dateFilterSelected.value = dateFilterRanges[dateFilterSelectedIndex.value]\n }\n\n function applyDateFilter () {\n // emit applied event so that we can hook to any @change event in parent. By default, v-model with parent variable is in sync all the time\n context.emit('applied', dateRangeSelected)\n // updating old value on appy click\n oldSelectedRange.value = dateRangeSelected.value\n showDateFilter.value = false\n }\n function cancelDateFilter () {\n // on cancel we need to rest to previous value, which we stored in oldSelectedRange\n dateRangeSelected.value = oldSelectedRange.value\n showDateFilter.value = false\n }\n\n return {\n dateFilterRanges,\n dateRangeSelected,\n dateFilterSelectedIndex,\n dateRangeSelectedDisplay,\n dateFilterSelected,\n showDateFilter,\n pickerDate,\n dateFilterChange,\n isApplyFilterBtnValid,\n dateClick,\n applyDateFilter,\n showDateRangeSelected,\n cancelDateFilter\n }\n}\n","/*\nComposable function for SearchColumn Filter component. It tracks the columns\nthat are present in a parent data-table and tracks display property to true/false\n*/\n\nimport { computed, toRefs } from '@vue/composition-api'\n\nexport function useSearchColumnFilterComponent (props, context) {\n const { value } = toRefs(props)\n\n // using same v-model value for getting value and update parent on change\n const selectedHeaderSearchList = computed({\n get: () => {\n return value.value\n },\n set: (modalValue: any[]) => {\n context.emit('input', modalValue)\n }\n })\n\n return {\n selectedHeaderSearchList\n }\n}\n","\n\n\n\n\n\n\n","\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n Apply\n \n \n Cancel\n \n
\n \n
\n
\n \n \n
\n\n","\n\n\n\n","\n\n \n \n \n !header.hideInSearchColumnFilter)\"\n :key=\"i\"\n >\n \n \n \n \n\n","\n\n\n","\n\n","import CommonUtils from '@/util/common-util'\nimport { useRoutingSlip } from '../useRoutingSlip'\n\nexport function useDashboard (_, context) {\n const { resetRoutingSlipDetails } = useRoutingSlip()\n const appendQueryParamsIfNeeded = CommonUtils.appendQueryParamsIfNeeded\n\n function addRoutingSlip (): void {\n // we need to clear out the routing slip store before rendering the create slip component\n resetRoutingSlipDetails()\n // navigate now\n // Check if we had come from Staff dashboard\n context.root.$router.push(appendQueryParamsIfNeeded('/create-routing-slip', context.root.$route))\n }\n\n return {\n addRoutingSlip\n }\n}\n","import { DirectiveBinding } from 'vue/types/options'\nimport { DirectiveOptions } from 'vue'\nimport KeyCloakService from 'sbc-common-components/src/services/keycloak.services'\nimport { VNode } from 'vue/types'\n\ninterface CustomHTMLElement extends HTMLElement {\n disabled: boolean\n readOnly: boolean\n}\n\nconst can: DirectiveOptions = {\n inserted (el, binding, node) {\n canAccess(binding, el, node)\n },\n componentUpdated (el, binding, node) {\n canAccess(binding, el, node)\n }\n}\n\nfunction canAccess (binding: DirectiveBinding, el: HTMLElement, node: VNode) {\n const behaviour = binding.modifiers.disable ? 'disable' : 'hide'\n // to handle special elements like v-card etc\n const isCard = !!binding.modifiers.card\n const requestedAction:any = [binding.arg]\n const customeEl = el as CustomHTMLElement\n const okayToAccess = KeyCloakService.verifyRoles(requestedAction, [])\n // if not okay , hide or disable\n if (!okayToAccess) {\n if (behaviour === 'hide') {\n commentNode(el, node)\n } else if (behaviour === 'disable' && isCard === false) {\n customeEl.disabled = true\n } else if (behaviour === 'disable' && isCard === true) {\n // TODO tab still works.. can tab to the text field and make it work\n customeEl.classList.add('v-card--disabled')\n customeEl.style.pointerEvents = 'none'\n }\n }\n}\n\n/**\n * Create comment node\n *\n * @private\n * @author https://stackoverflow.com/questions/43003976/a-custom-directive-similar-to-v-if-in-vuejs#43543814\n */\nfunction commentNode (el: HTMLElement, vnode: VNode) {\n const comment = document.createComment(' ')\n\n Object.defineProperty(comment, 'setAttribute', {\n value: () => undefined\n })\n\n vnode.text = ' '\n vnode.elm = comment\n vnode.isComment = true\n vnode.tag = undefined\n\n vnode.data = vnode.data || {}\n vnode.data.directives = undefined\n\n if (vnode.componentInstance) {\n // @ts-ignore\n vnode.componentInstance.$el = comment\n }\n\n if (el.parentNode) {\n el.parentNode.replaceChild(comment, el)\n }\n}\nexport default can\n","\n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n\n","\n
\n \n \n \n \n mdi-plus\n \n Add New Routing Slip\n \n \n \n \n Access Fee Accounting System\n \n mdi-open-in-new\n \n \n \n \n \n \n \n \n \n \n
\n \n mdi-view-list\n \n

\n {{ isLibraryMode ? 'Recent Routing Slip' : 'Search Routing Slip' }}\n

\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n {{\n item.remainingAmount\n ? appendCurrencySymbol(item.remainingAmount.toFixed(2))\n : '-'\n }}\n \n \n \n \n Open\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n","/*!\n * vue-i18n v8.28.2 \n * (c) 2022 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\nvar dateTimeFormatKeys = [\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'localeMatcher',\n \"hour12\",\n \"hourCycle\",\n \"timeZone\",\n \"formatMatcher\",\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName' ];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.delete(item)) {\n return arr\n }\n}\n\nfunction arrayFrom (arr) {\n var ret = [];\n arr.forEach(function (a) { return ret.push(a); });\n return ret\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\n/**\n * Mixin\n * \n * If `bridge` mode, empty mixin is returned,\n * else regulary mixin implementation is returned.\n */\nfunction defineMixin (bridge) {\n if ( bridge === void 0 ) bridge = false;\n\n function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n }\n\n return bridge\n ? { mounted: mounted } // delegate `vue-i18n-bridge` mixin implementation\n : { // regulary \n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n = options.__i18nBridge || options.__i18n;\n _i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if ((options.__i18nBridge || options.__i18n)) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n var _i18n$1 = options.__i18nBridge || options.__i18n;\n _i18n$1.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || ((options.__i18nBridge || options.__i18n) ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: mounted,\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n }\n}\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = { bridge: false };\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(defineMixin(options.bridge));\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-zA-Z]+)?:(?:[\\w\\-_|./]+|\\([\\w\\-_:|./]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-zA-Z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || options.datetimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._fallbackRootWithEmptyString = options.fallbackRootWithEmptyString === undefined\n ? true\n : !!options.fallbackRootWithEmptyString;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = new Set();\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n if ('__VUE_I18N_BRIDGE__' in options) {\n this.__VUE_I18N_BRIDGE__ = options.__VUE_I18N_BRIDGE__;\n }\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true },sync: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data, __VUE18N__INSTANCE__: true });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.add(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var this$1 = this;\n return this._vm.$watch('$data', function () {\n var listeners = arrayFrom(this$1._dataListeners);\n var i = listeners.length;\n while(i--) {\n Vue.nextTick(function () {\n listeners[i] && listeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale (composer) {\n if (!composer) {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n } else {\n // deal with vue-i18n-bridge\n if (!this.__VUE_I18N_BRIDGE__) { return null }\n var self = this;\n var target$1 = this._vm;\n return this.vm.$watch('locale', function (val) {\n target$1.$set(target$1, 'locale', val);\n if (self.__VUE_I18N_BRIDGE__ && composer) {\n composer.locale.value = val;\n }\n target$1.$forceUpdate();\n }, { immediate: true })\n }\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nprototypeAccessors.sync.get = function () { return this._sync };\nprototypeAccessors.sync.set = function (val) { this._sync = val; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return (this._fallbackRootWithEmptyString? !val : isNull(val)) && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n\n // eslint-disable-next-line no-autofix/prefer-const\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values, formatter, path, interpolateMode) {\n var this$1 = this;\n\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n var messages = this._getMessages();\n var locale = this.locale;\n\n return {\n list: list,\n named: named,\n values: values,\n formatter: formatter,\n path: path,\n messages: messages,\n locale: locale,\n linked: function (linkedKey) { return this$1._interpolate(locale, messages[locale] || {}, linkedKey, null, interpolateMode, undefined, [linkedKey]); }\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(\n this._createMessageContext(values, this._formatter || defaultFormatter, path, interpolateMode)\n )\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? Object.assign({}, this._vm.messages[locale])\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n formatter = new Intl.DateTimeFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n }\n\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key, options) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n var dtf = !options ? new Intl.DateTimeFormat(locale) : new Intl.DateTimeFormat(locale, options);\n return dtf.format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key, options);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(dateTimeFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key, options)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n // eslint-disable-next-line no-autofix/prefer-const\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.28.2';\n\nexport default VueI18n;\n","// src/index.ts\nimport Vue from \"vue\";\nimport VueI18n from \"vue-i18n\";\nimport { computed, getCurrentInstance } from \"@vue/composition-api\";\nvar i18nInstance;\nfunction createI18n(options) {\n i18nInstance = new VueI18n(options);\n return i18nInstance;\n}\nfunction useI18n() {\n if (!i18nInstance)\n throw new Error(\"vue-i18n not initialized\");\n const i18n = i18nInstance;\n const instance = getCurrentInstance();\n const vm = (instance == null ? void 0 : instance.proxy) || instance || new Vue({});\n const locale = computed({\n get() {\n return i18n.locale;\n },\n set(v) {\n i18n.locale = v;\n }\n });\n return {\n locale,\n t: vm.$t.bind(vm),\n tc: vm.$tc.bind(vm),\n d: vm.$d.bind(vm),\n te: vm.$te.bind(vm),\n n: vm.$n.bind(vm)\n };\n}\nexport {\n createI18n,\n useI18n\n};\n","import VueI18n, { LocaleMessages } from 'vue-i18n'\nimport { createI18n } from 'vue-i18n-composable'\nimport enLocals from '@/locales/en.json'\n\nexport default function initialize (vue) {\n vue.use(VueI18n)\n\n function loadLocaleMessages (): LocaleMessages {\n const messages: LocaleMessages = { en: {} }\n Object.keys(enLocals).forEach((key) => {\n messages.en[key] = enLocals[key]\n })\n return messages\n }\n\n const i18n = createI18n({\n locale: import.meta.env.VUE_APP_I18N_LOCALE || 'en',\n fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages: loadLocaleMessages()\n })\n return i18n\n}\n","/*\nWhile upgrading to vue 3 please check full plugin and do necessary modifications here\n Library build set up for fas-search-components.\n build library using vue-cli-service\n Basic set up of included files store and i18n included here\n How to use :\n inside main.ts `import Search from 'fas-ui'`\n Vue.use(Search, { store, i18n })\n include style if needed either\n import 'fas-ui/fas-lib/fas-ui.css'\n or inside component style tag us without scope (global scope needed),\n @import '~fas-ui/src/assets/scss/search.scss';\n */\n\nimport OurVue from 'vue'\nimport Search from '@/components/Dashboard/Search.vue'\nimport VueCompositionAPI from '@vue/composition-api'\nimport initializeI18n from './plugins/i18n'\n\n// stores needed fro search\n\n// lang files\n\n/**\n * install function\n *\n * @param {*} Vue parent component vue contructor\n * @param {store, i18n} options need store and i18n\n */\nfunction install (Vue, options) {\n if (OurVue !== Vue) {\n // eslint-disable-next-line no-console\n console.error('Multiple instances of Vue detected ')\n }\n\n if (install.installed) return\n install.installed = true\n // since VueCompositionAPI is not giving direct access to property we are checking by using setup api exist in context or not\n // since setup is a reserved keyword and which is using in vue 3 also, Hope it will not change.\n // Another solution is Object.hasOwnProperty.call(Vue, '__composition_api_installed__').\n // we are not using that in futurem, if they change the string no need to brake app\n // Couldnot find better solution since lack of information available. sorry devs :(\n if (!Object.hasOwnProperty.call(Vue.config.optionMergeStrategies, 'setup')) {\n // if parent is not using VueCompositionAPI api need to push to vue\n Vue.use(VueCompositionAPI)\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI is not available in parent so pushing from plugin')\n } else {\n // eslint-disable-next-line no-console\n console.info('[FAS-Plugin] VueCompositionAPI already installed')\n }\n\n // simple hack to inject locale messages. check for better solutions\n // this will not work when chaging lang.\n // need to updated code (since we are not using other lag now, not updating chanegs)\n const t = initializeI18n(Vue)\n if (options.i18n && t && t.messages) {\n options.i18n.mergeLocaleMessage(\n options.i18n.locale,\n t.messages[t.locale]\n )\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide i18n to use lang')\n }\n // pushing store modules to parent store\n // use unique name to avoid conflict\n if (options.store) {\n // options.store.registerModule('store', store)\n window.fasStore = options.store\n } else {\n // eslint-disable-next-line no-console\n console.error('[FAS-Plugin] please provide store')\n }\n // registering component to use as plugin\n Vue.component('fas-search-component', Search)\n}\n\nconst plugin = {\n install\n}\n\nlet GlobalVue = null\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.vue\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin)\n}\n\nSearch.install = install\n\nexport default Search\n"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_defineProperty","key","value","Object","defineProperty","enumerable","configurable","writable","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","Array","isArray","i","arr2","length","iter","toString","call","from","TypeError","reflectionIsSupported","Reflect","defineMetadata","getOwnMetadataKeys","copyReflectionMetadata","to","forwardMetadata","getOwnPropertyNames","forEach","propertyKey","metaKey","metadata","getOwnMetadata","Vue","use","VueCompositionAPI","fakeArray","__proto__","hasProto","createDecorator","factory","target","index","Ctor","__decorators__","push","options","isPrimitive","type","warn","message","console","collectDataFromConstructor","vm","Component","originalInit","_init","_this","this","keys","$options","props","hasOwnProperty","get","set","data","plainData","process","env","NODE_ENV","$internalHooks","componentFactory","arguments","name","_componentTag","proto","indexOf","descriptor","getOwnPropertyDescriptor","methods","mixins","computed","decorators","fn","superProto","getPrototypeOf","Super","Extended","extend","forwardStaticMembers","reservedPropertyNames","shouldIgnore","callee","caller","Original","extendedDescriptor","superDescriptor","warn$2","concat","registerHooks","apply","__spreadArrays","reflectMetadataIsSupported","getMetadata","applyMetadata","Prop","componentOptions","k","SessionStorageKeys","DateFilterCodes","PaymentMethods","SlipStatus","Role","ApiErrors","CreateRoutingSlipStatus","PatchActions","headerSearchTitle","text","align","display","className","sortable","hideInSearchColumnFilter","ERROR","WINDOW","window","root","JS_SHA256_NO_WINDOW","WEB_WORKER","self","NODE_JS","JS_SHA256_NO_NODE_JS","versions","node","global","COMMON_JS","JS_SHA256_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","split","EXTRA","SHIFT","K","OUTPUT_TYPES","blocks","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","outputType","is224","Sha256","update","createMethod","method","nodeWrap","create","crypto","eval","Buffer","algorithm","nodeMethod","createHash","digest","Error","Uint8Array","createHmacOutputMethod","HmacSha256","createHmacMethod","sharedMemory","h0","h1","h2","h3","h4","h5","h6","h7","block","start","bytes","hBytes","finalized","hashed","first","code","charCodeAt","array","oKeyPad","iKeyPad","b","inner","notString","lastByteIndex","hash","finalize","j","s0","s1","maj","t1","ab","da","cd","bc","a","c","d","e","f","g","h","hex","arrayBuffer","dataView","DataView","setUint32","innerHash","sha256","sha224","hmac","base64Js","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","Arr","_byteLength","curByte","len","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","lookup","join","end","num","output","sha256_imported","base64js_imported","Promise","loggedPromiseDeprecation","logPromiseDeprecation","toKeycloakPromise","promise","KeycloakPromise","executor","Keycloak","config","adapter","callbackStorage","kc","refreshQueue","loginIframe","enable","callbackList","interval","scripts","document","getElementsByTagName","src","iframeVersion","substring","useNonce","logInfo","createLogger","info","logWarn","generateRandomData","msCrypto","getRandomValues","Math","floor","random","generateCodeVerifier","generateRandomString","alphabet","randomData","chars","String","fromCharCode","generatePkceChallenge","pkceMethod","codeVerifier","hashBytes","replace","getRealmUrl","authServerUrl","charAt","encodeURIComponent","realm","getOrigin","location","origin","protocol","hostname","port","processCallback","oauth","error","prompt","timeLocal","Date","getTime","errorData","error_description","onAuthError","setError","setSuccess","flow","access_token","id_token","authSuccess","params","url","endpoints","token","req","XMLHttpRequest","open","setRequestHeader","clientId","redirectUri","pkceCodeVerifier","withCredentials","onreadystatechange","readyState","status","tokenResponse","JSON","parse","responseText","send","accessToken","refreshToken","idToken","fulfillPromise","setToken","tokenParsed","nonce","storedNonce","refreshTokenParsed","idTokenParsed","clearToken","onAuthSuccess","loadConfig","configUrl","createPromise","setupOidcEndoints","oidcConfiguration","authorize","authorization_endpoint","token_endpoint","logout","end_session_endpoint","checkSessionIframe","check_session_iframe","register","userinfo","userinfo_endpoint","fileLoaded","oidcProvider","oidcProviderConfigUrl","match","substr","xhr","responseURL","startsWith","tokenTimeoutHandle","clearTimeout","decodeToken","sessionId","session_state","authenticated","subject","sub","realmAccess","realm_access","resourceAccess","resource_access","timeSkew","iat","onTokenExpired","expiresIn","round","setTimeout","str","slice","decodeURIComponent","escape","atob","createUUID","hexDigits","s","parseCallback","parseCallbackUrl","oauthState","state","valid","supportedParams","newUrl","parsed","queryIndex","fragmentIndex","responseMode","parseCallbackParams","paramsString","oauthParams","p","result","resolve","reject","setupCheckLoginIframe","iframe","createElement","onload","authUrl","iframeOrigin","setAttribute","style","body","appendChild","messageCallback","event","contentWindow","source","callbacks","splice","addEventListener","scheduleCheckIframe","checkLoginIframe","then","unchanged","msg","postMessage","loadAdapter","login","createLoginUrl","createLogoutUrl","createRegisterUrl","accountManagement","accountUrl","createAccountUrl","href","encodeHash","cordovaOpenWindowWrapper","loginUrl","cordova","InAppBrowser","shallowCloneCordovaOptions","userOptions","cordovaOptions","reduce","optionName","formatCordovaOptions","createCordovaOptions","hidden","ref","completed","closed","closeBrowser","close","reason","logoutUrl","registerUrl","universalLinks","subscribe","unsubscribe","plugins","browsertab","openUrl","init","initOptions","createCallbackStorage","Cordova","checkLoginIframeInterval","onLoad","loginRequired","responseType","silentCheckSsoRedirectUri","enableLogging","initPromise","onReady","catch","configPromise","doLogin","checkSsoSilently","ifrm","removeChild","removeEventListener","processInit","callback","history","replaceState","updateToken","baseUrl","scope","callbackState","action","maxAge","loginHint","idpHint","locale","add","hasRealmRole","role","access","roles","hasResourceRole","resource","loadUserProfile","profile","loadUserInfo","userInfo","isTokenExpired","minValidity","ceil","isNaN","exec","onAuthRefreshSuccess","pop","onAuthRefreshError","onAuthLogout","LocalStorage","localStorage","setItem","removeItem","cs","clearExpired","time","getItem","expires","err","stringify","CookieStorage","getCookie","setCookie","cookieExpiration","minutes","exp","setTime","ca","cookie","expirationDate","toUTCString","success","handleSuccess","handleError","require$$0","require$$1","decodeKCToken","ConfigHelper","getFromSession","KeyCloakToken","base64Url","base64","map","trimTrailingSlashURL","trim","ConfigHelper$1","_a","addToSession","sessionStorage","removeFromSession","clearSession","clear","getStatusAPIUrl","StatusApiUrl","getAuthAPIUrl","AuthApiUrl","getAuthContextPath","AuthWebUrl","getRegistryHomeURL","RegistryHomeUrl","getNameRequestURL","NameRequestUrl","getPprWebURL","PprWebUrl","setKeycloakConfigUrl","keycloakConfigUrl","getKeycloakConfigUrl","__publicField","VuexModule","actions","mutations","getters","namespaced","modules","getModule","moduleClass","store","_statics","genStatic","_genStatic","reservedKeys","stateFactory","addPropertiesToObject","_loop_1","_i","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","_","label","sent","trys","ops","verb","throw","return","n","v","op","staticStateGenerator","modOpt","statics","staticGetterGenerator","staticMutationGenerator","args","commit","staticActionGenerators","_b","dispatch","moduleDecoratorFactory","moduleOptions","stateFactory$1","funcName","rootState","rootGetters","thisObj","context","dynamic","registerModule","Module","modOrOpt","actionDecoratorFactory","_c","rawError","_d","actionFunction","payload","actionPayload","moduleAccessor","e_1","stack","handler","Action","targetOrParams","Mutation","mutationFunction","AuthModule","super","isAuthenticated","keycloakGuid","kcGuid","KeycloakServices","getUserInfo","currentLoginSource","loginSource","setKCToken","setIDToken","KeyCloakIdToken","setRefreshToken","KeyCloakRefreshToken","setKCGuid","setLoginSource","syncWithSessionStorage","__decorateClass$4","__decorateClass","_KeyCloakService","getInstance","instance","isInitialized","keyCloakConfigurl","getKCInstance","initializeKeyCloak","keycloakConfig","kcLogin","kcOptions","initSession","authModule","syncSessionAndScheduleTokenRefresh","parsedToken","lastName","lastname","firstName","firstname","email","_e","_f","userName","_g","username","fullName","_h","redirectUrl","siteminderLogoutUrl","SiteminderLogoutUrl","PreventStorageSync","VUE_APP_PATH","includes","isForceRefresh","tokenExpiresIn","refreshed","verifyRoles","allowedRoles","disabledRoles","isAuthorized","some","initializeToken","isScheduleRefresh","forceLogin","SessionSynced","syncSessionStorage","scheduleRefreshTimer","refreshEarlyTime","refreshEarlyTimeinMilliseconds","max","REFRESH_ATTEMPT_INTERVAL","scheduleRefreshToken","refreshTokenExpiresIn","refreshInMilliSeconds","timerId","log","counter","KeyCloakService","KeyCloakService$1","hookCallback","hooks","setHookCallback","input","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","valueOf","createUTC","format","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","getParsingFlags","m","_pf","isValid","_isValid","flags","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","extend$2","fun","momentProperties","updateInProgress","copyConfig","prop","val","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","argLen","deprecations","deprecateSimple","isFunction","Function","_config","_dayOfMonthOrdinalParseLenient","RegExp","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","calendar","mom","now","_calendar","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","_longDateFormat","formatUpper","toUpperCase","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","future","past","ss","mm","hh","dd","w","ww","M","MM","yy","relativeTime","withoutSuffix","string","isFuture","_relativeTime","pastFuture","diff","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","getPrioritizedUnits","unitsObj","u","sort","isLeapYear","year","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","stringGet","stringSet","prioritized","prioritizedLen","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","regexes","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","mod","x","modMonth","o","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","isFormat","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","min","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","daysInYear","parseTwoDigitYear","parseInt","getSetYear","getIsLeapYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","day","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","hours","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","isLower","baseConfig","dayOfMonthOrdinalParse","meridiemParse","locales","localeFamilies","globalLocale","commonPrefix","arr1","minl","normalizeLocale","chooseLocale","names","loadLocale","isLocaleNameSane","oldLocale","_abbr","require","getSetGlobalLocale","values","getLocale","defineLocale","abbr","parentLocale","updateLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","setUTCMinutes","getUTCMinutes","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","gg","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","hour","isPm","meridiemHour","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","minute","second","millisecond","createFromConfig","prepareConfig","preparse","configFromInput","isUTC","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","clone","local","getDateOffset","getTimezoneOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","period","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","suffix","zone","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","isoWeekday","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","Infinity","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","isoWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","dates","isDSTShifted","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","valueOf$1","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","version","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","_CommonUtils","formatDisplayDate","moment","requiredFieldRule","errorMessage","optionalFieldRule","isSigningIn","path","pathname","isSigningOut","fileDownload","fileName","fileType","blob","Blob","navigator","msSaveBlob","blobURL","URL","createObjectURL","webkitURL","tempLink","download","click","revokeObjectURL","statusListColor","textColor","color","ACTIVE","COMPLETE","REFUNDCOMPLETED","WRITEOFFCOMPLETED","BOUNCED","NSF","LINKED","REFUNDREQUEST","REFUNDAUTHORIZED","WRITEOFFAUTHORIZED","WRITEOFFREQUESTED","VOID","appendCurrencySymbol","currency","cleanObject","appendQueryParamsIfNeeded","targetUrl","route","requestParams","createQueryParams","query","convertAddressForComponent","address","addressCity","city","addressCountry","country","addressRegion","region","deliveryInstructions","postalCode","streetAddress","street","streetAddressAdditional","streetAdditional","convertAddressForAuth","iaddress","isApproverRole","approverRole","FAS_REFUND_APPROVER","isVoidRole","voidRole","FAS_VOID","isRefundProcessStatus","REFUNDREJECTED","isRefundRequestStatus","isEditEnabledBystatus","encodeURI","object","object1","object2","objKeys1","objKeys2","value1","value2","isObjects","isDeepEqual","CommonUtils","fetchConfig","PayApiUrl","getPayAPIURL","getAuthWebUrl","FasWebUrl","getFasWebUrl","getSiteminderLogoutUrl","saveConfigToSessionStorage","getSelfURL","getFasAPIURL","getKeycloakAuthUrl","getKeycloakRealm","getKeycloakClientId","getAddressCompleteKey","debounce","wait","immediate","timeout","callNow","hasCallFailed","activeCalls","isThereActiveCalls","useIndicators","useLoader","isLoading","toggleLoading","changeLoadingStatus","isLoadingStatus","bind","wrap","isBuffer","isArrayBuffer","isFormData","FormData","isArrayBufferView","isPlainObject","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","product","merge","assignValue","stripBOM","content","utils","encode","buildURL","paramsSerializer","serializedParams","serialize","parseValue","hashmarkIndex","InterceptorManager","handlers","synchronous","runWhen","InterceptorManager$1","eject","id","forEachHandler","InterceptorManager_1","normalizeHeaderName","headers","normalizedName","processHeader","enhanceError","request","response","isAxiosError","description","lineNumber","columnNumber","createError","settle","validateStatus","cookies","standardBrowserEnv","write","domain","secure","toGMTString","read","remove","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","ignoreDuplicateOf","parseHeaders","parser","line","isURLSameOrigin","originURL","msie","userAgent","urlParsingNode","resolveURL","host","search","requestURL","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","xhrAdapter","dispatchXhrRequest","requestData","requestHeaders","auth","password","unescape","Authorization","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","statusText","handleLoad","onabort","handleAbort","onerror","ontimeout","handleTimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","xsrfValue","xsrfCookieName","xsrfHeaderName","onDownloadProgress","onUploadProgress","upload","cancelToken","onCanceled","cancel","abort","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","getDefaultAdapter","stringifySafely","rawValue","encoder","silentJSONParsing","forcedJSONParsing","transformRequest","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","defaults$3","common","Accept","utils$5","forEachMethodNoData","forEachMethodWithData","defaults_1","transformData","fns","transform","isCancel$1","isCancel","__CANCEL__","throwIfCancellationRequested","throwIfRequested","dispatchRequest","utils$3","cleanHeaderConfig","onAdapterResolution","onAdapterRejection","mergeConfig","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","utils$2","defaultToConfig2","axiosKeys","otherKeys","filterAxiosKeys","pkg","validators","validator","thing","deprecatedWarnings","currentVerArr","isOlderVersion","thanVersion","pkgVersionArr","destVer","assertOptions","schema","allowUnknown","opt","validators$1","isDeprecated","formatMessage","desc","opts","Axios","instanceConfig","interceptors","Axios$2","boolean","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","chain","newConfig","onFulfilled","onRejected","getUri","utils$1","Axios_1","Cancel","Cancel_1","CancelToken","resolvePromise","promiseExecutor","CancelToken_1","spread","createInstance","defaultConfig","axios","axios$2","all","promises","require$$8","require$$9","axiosModule","default","showGlobalLoader","showGlobalErrorHandling","CodesService","getCodes","codeType","routingSlipStatusList","useCodes","getRoutingSlipStatusList","async","codes","useStatusList","toRefs","currentStatus","modalValue","emit","selectedStatusObject","statusList","onMounted","statusLabel","RoutingSlip","getRoutingSlip","routingNumber","createRoutingSlip","routingSlipRequest","post","adjustRoutingSlip","payments","routingSlipNumber","CORRECTION","patch","UPDATE_STATUS","updateRoutingSlipStatus","updateRoutingSlipRefund","details","getSearchRoutingSlip","searchParams","saveLinkRoutingSlip","LinkRoutingSlip","getLinkedRoutingSlips","getDailyReport","selectedDate","getSearchFilingType","getFeeByCorpTypeAndFilingType","getFeeRequestParams","corpTypeCode","filingTypeCode","saveManualTransactions","transactions","cancelRoutingSlipInvoice","invoiceId","headerSearchTitleConstant","searchRoutingSlipResult","searchRoutingSlipParams","routingSlip","linkedRoutingSlips","routingSlipDetails","accountInfo","chequePayment","cashPayment","isPaymentMethodCheque","isAmountPaidInUsd","autoCompleteRoutingSlips","useRoutingSlip","invoiceCount","invoices","searchParamsExist","isRoutingSlipAChild","parentNumber","isRoutingSlipLinked","children","isRoutingSlipVoid","getRoutingSlipRequestPayload","RoutingSlipService","updateRoutingSlipChequeNumber","chequeNumToChange","payment","paymentIndex","chequeReceiptNumber","chequeNum","updateRoutingSlipAmount","amountToChange","isRoutingSlipPaidInUsd","paidUsdAmount","amount","paidAmount","paymentAccount","checkRoutingNumber","VALID","EXISTS","FAS_INVALID_ROUTING_SLIP_DIGITS","INVALID_DIGITS","statusDetails","slipNumber","resetRoutingSlipDetails","resetSearchParams","searchRoutingSlip","dateFilter","startDate","endDate","page","items","parentRoutingSlipNumber","LinkPrams","childRoutingSlipNumber","getDailyReportByDate","formatedDate","getAutoCompleteRoutingSlips","transation","referenceNumber","filingType","futureEffective","quantity","businessInfo","corpType","businessIdentifier","transactionParams","filingInfo","filingTypes","useSearch","isLibraryMode","fasUrl","reactive","showExpandedFolio","showExpandedCheque","searchParamsChanged","headerSearch","displayedHeaderSearch","displayed","receiptNumber","accountName","initiator","remainingAmount","searchNow","debouncedSearch","canShowColumn","columnName","find","header","applyDateFilter","dateRangeObj","getStatusLabel","clearFilter","formatFolioResult","invoice","toggleFolio","toggleCheque","navigateTo","$router","$route","DATEFILTER_CODES","useDateRange","dateRangeSelected","oldSelectedRange","dateRangeSelectedDisplay","dateFilterRanges","TODAY","YESTERDAY","LASTWEEK","LASTMONTH","CUSTOMRANGE","dateFilterSelectedIndex","dateFilterSelected","showDateFilter","pickerDate","isApplyFilterBtnValid","showDateRangeSelected","dateText","formatDatePickerDate","dateObj","dateFilterChange","today","yesterday","weekStart","weekEnd","monthStart","monthEnd","dateClick","cancelDateFilter","useSearchColumnFilterComponent","selectedHeaderSearchList","DateRangeFilter","__decorateClass$3","DateRangeFilter$1","setup","render","_vm","$createElement","_self","attrs","transition","scopedSlots","_u","_ref","on","readonly","filled","$$v","expression","$attrs","slot","_v","staticClass","dense","change","filterRange","domProps","textContent","_s","large","disabled","outlined","$event","innerHTML","width","range","$listeners","staticRenderFns","SearchColumnFilterComponent","__decorateClass$2","SearchColumnFilterComponent$1","nav","$set","StatusList","__decorateClass$1","useDashboard","addRoutingSlip","can","inserted","el","binding","canAccess","componentUpdated","behaviour","modifiers","disable","isCard","card","requestedAction","customeEl","commentNode","classList","pointerEvents","vnode","comment","createComment","elm","isComment","tag","directives","componentInstance","$el","parentNode","replaceChild","Search","commonUtil","_objectDestructuringEmpty","Search$1","components","statusListComponent","class","sm","cols","rawName","hide","dark","small","height","loading","$t","proxy","autocomplete","placeholder","applied","_ref2","paymentMethod","createdName","routingSlipDate","colors","folio","CHEQUE","numberFormatKeys","dateTimeFormatKeys","isBoolean","OBJECT_STRING","isNull","parseArgs","looseClone","delete","arrayFrom","hasOwn","arguments$1","looseEqual","isObjectA","isObjectB","isArrayA","isArrayB","every","keysA","keysB","escapeHtml","rawText","escapeParams","_i18n","i18n","$i18n","_t","_getMessages","$tc","choice","_tc","$te","_te","$d","$n","defineMixin","bridge","mounted","$root","__INTLIFY_META__","beforeCreate","__i18nBridge","__i18n","VueI18n","localeMessages","messages","mergeLocaleMessage","_i18nWatcher","watchI18nData","rootI18n","formatter","fallbackLocale","formatFallbackMessages","silentTranslationWarn","silentFallbackWarn","pluralizationRules","preserveDirectiveContent","localeMessages$1","sharedMessages","sync","_localeWatcher","watchLocale","onComponentInstanceCreated","parent","beforeMount","subscribeDataChanging","_subscribing","beforeDestroy","$nextTick","unsubscribeDataChanging","destroyVM","interpolationComponent","functional","Boolean","required","places","slots","onlyHasDefaultPlace","useLegacyPlaces","createParamsFromPlaces","everyPlace","child","vnodeHasPlaceAttribute","assignChildPlace","assignChildIndex","place","numberComponent","Number","acc","_ntp","part","assert","oldVNode","localeEqual","oldValue","_localeMessage","getLocaleMessage","unbind","preserve","_vt","ref$1","ref$2","tc","makeParams","install","_Vue","installed","mixin","directive","component","optionMergeStrategies","parentVal","childVal","BaseFormatter","_caches","interpolate","compile","RE_TOKEN_LIST_VALUE","RE_TOKEN_NAMED_VALUE","position","char","isClosed","compiled","mode","APPEND","PUSH","INC_SUB_PATH_DEPTH","PUSH_SUB_PATH","BEFORE_PATH","IN_PATH","BEFORE_IDENT","IN_IDENT","IN_SUB_PATH","IN_SINGLE_QUOTE","IN_DOUBLE_QUOTE","AFTER_PATH","pathStateMachine","ident","eof","else","literalValueRE","isLiteral","stripQuotes","getPathCharType","ch","formatSubPath","trimmed","parse$1","newChar","typeMap","subPathDepth","maybeUnescapeQuote","nextChar","I18nPath","_cache","parsePath","hit","getPathValue","paths","last","htmlTagMatcher","linkKeyMatcher","linkKeyPrefixMatcher","bracketsMatcher","defaultModifiers","upper","toLocaleUpperCase","lower","capitalize","defaultFormatter","this$1","dateTimeFormats","datetimeFormats","numberFormats","_formatter","_modifiers","_missing","missing","_root","_sync","_fallbackRoot","fallbackRoot","_fallbackRootWithEmptyString","fallbackRootWithEmptyString","_formatFallbackMessages","_silentTranslationWarn","_silentFallbackWarn","_dateTimeFormatters","_numberFormatters","_path","_dataListeners","Set","_componentInstanceCreatedListener","componentInstanceCreatedListener","_preserveDirectiveContent","_warnHtmlInMessage","warnHtmlInMessage","_postTranslation","postTranslation","_escapeParameterHtml","escapeParameterHtml","__VUE_I18N_BRIDGE__","getChoiceIndex","choicesLength","thisPrototype","_choice","_choicesLength","_exist","_checkLocaleMessage","_initVM","prototypeAccessors","availableLocales","availabilities","level","silent","__VUE18N__INSTANCE__","$destroy","$watch","listeners","nextTick","$forceUpdate","deep","composer","target$1","newI18n","_getDateTimeFormats","_getNumberFormats","_localeChainCache","fallback","orgLevel","_warnDefault","interpolateMode","missingRet","_isSilentTranslationWarn","parsedArgs","_render","_isFallbackRoot","_isSilentFallbackWarn","_isSilentFallback","_interpolate","visitedLinkStack","pathRet","_link","idx","link","linkKeyPrefixMatches","linkPrefix","formatterName","linkPlaceholder","reverse","translated","_translate","_createMessageContext","_list","_named","list","named","linked","linkedKey","_appendItemToChain","follow","_appendLocaleToChain","_appendBlockToChain","_getLocaleChain","predefined","count","fetchChoice","choices","te","setLocaleMessage","getDateTimeFormat","setDateTimeFormat","_clearDateTimeFormat","mergeDateTimeFormat","_localizeDateTime","current","Intl","DateTimeFormat","dateTimeFormat","getNumberFormat","setNumberFormat","_clearNumberFormat","mergeNumberFormat","_getNumberFormatter","NumberFormat","_n","numberFormat","formatToParts","defineProperties","intlDefined","VueI18n$1","i18nInstance","createI18n","initialize","vue","VUE_APP_I18N_LOCALE","VUE_APP_I18N_FALLBACK_LOCALE","loadLocaleMessages","en","enLocals","OurVue","initializeI18n","fasStore","plugin","GlobalVue"],"mappings":";;;;;;;;AAOA,SAASA,QAAQC,GAWf,OATED,QADoB,mBAAXE,QAAoD,iBAApBA,OAAOC,SACtC,SAAUF,GAClB,cAAcA,CACpB,EAEc,S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G,IAE1BorE,CACT,CAKY4P,IAGd,CCQS,SAAAjM,QAAS5sE,EAAKa,GAMrB,GALIm4E,QAAWh5E,GAEbkB,QAAQqQ,MAAM,uCAGZq7D,QAAQE,UAAW;AACvBF,QAAQE,WAAY,EAMf/uE,OAAO8D,eAAe7C,KAAKgB,EAAIoO,OAAO8+D,sBAAuB,SAOhEhsE,QAAQoO,KAAK,qDALbtP,EAAIC,IAAIC,mBAERgB,QAAQoO,KAAK;AASTyV,MAAAA,EAAIk0D,WAAej5E;AACrBa,EAAQ+mE,MAAQ7iD,GAAKA,EAAEkkD,SACzBpoE,EAAQ+mE,KAAKsB,mBACXroE,EAAQ+mE,KAAK1pD,OACb6G,EAAEkkD,SAASlkD,EAAE7G,SAIfhd,QAAQqQ,MAAM,gDAIZ1Q,EAAQ6iB,MAEV9d,OAAOszE,SAAWr4E,EAAQ6iB,MAG1BxiB,QAAQqQ,MAAM,qCAGhBvR,EAAIitE,UAAU,uBAAwBvI,OACxC,CAEA,MAAMyU,OAAS,CACbvM;AAGF,IAAIwM,UAAY;MACM,oBAAXxzE,OACTwzE,UAAYxzE,OAAO5F,IACQ,oBAAXqG,SAChB+yE,UAAY/yE,OAAOqyE,KAGjBU,WACFA,UAAUn5E,IAAIk5E,QAGhBzU,OAAOkI,QAAUA","x_google_ignoreList":[0,2,3,4,6,7,8,9,10,11,12,13,14,15,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,68,69]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index dc371af2..3c5c0407 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fas-ui", - "version": "1.2.5", + "version": "1.2.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fas-ui", - "version": "1.2.5", + "version": "1.2.7", "dependencies": { "@bcrs-shared-components/base-address": "^2.0.3", "@bcrs-shared-components/enums": "^1.0.51", @@ -20959,9 +20959,9 @@ } }, "node_modules/sbc-common-components": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-3.0.9.tgz", - "integrity": "sha512-m6CTXKV/LUIyL6VDGqlzyDpihPUAa6mC3xWVeXIulIVEtrEj7BdIuhuloroahpCaHUmsN9c55SsGejtBm9GPjg==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-3.0.11.tgz", + "integrity": "sha512-7D4loTBqHSB9MK28O7wsAZNGAt/xh9mVfqwoZEJWoHUgu0XGZBEL/msBOqt5ybepNqhSFpbxrTR5JiCv1IbQeA==", "dependencies": { "@mdi/font": "^4.5.95", "axios": "^0.21.1", @@ -43223,9 +43223,9 @@ } }, "sbc-common-components": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-3.0.9.tgz", - "integrity": "sha512-m6CTXKV/LUIyL6VDGqlzyDpihPUAa6mC3xWVeXIulIVEtrEj7BdIuhuloroahpCaHUmsN9c55SsGejtBm9GPjg==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-3.0.11.tgz", + "integrity": "sha512-7D4loTBqHSB9MK28O7wsAZNGAt/xh9mVfqwoZEJWoHUgu0XGZBEL/msBOqt5ybepNqhSFpbxrTR5JiCv1IbQeA==", "requires": { "@mdi/font": "^4.5.95", "axios": "^0.21.1", diff --git a/package.json b/package.json index a22631a6..1f678633 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,10 @@ { "name": "fas-ui", - "version": "1.2.5", + "version": "1.2.7", "private": true, "main": "./lib/lib.umd.min.js", + "appName": "FAS UI", + "sbcName": "SBC Common Components", "files": [ "lib/lib.umd.min.js", "src/assets/scss/search.scss" diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 00000000..96fab70a --- /dev/null +++ b/service-worker.js @@ -0,0 +1,33 @@ +/* eslint-disable no-undef */ +// Kill the service worker. +// Import Workbox from a CDN, Since this file is in the public folder and not processed by Vite +importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js') + +workbox.core.setCacheNameDetails({ prefix: 'fas' }) +// Precache manifest +self.__precacheManifest = [].concat(self.__precacheManifest || []) +workbox.precaching.suppressWarnings && workbox.precaching.suppressWarnings() +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}) + +// Skip waiting on install +self.addEventListener('install', function (e) { + self.skipWaiting() +}) + +self.addEventListener('activate', function (e) { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.getRegistrations().then(function (registrations) { + for (const registration of registrations) { + registration.unregister() + } + }) + } + if ('caches' in window) { + caches.keys() + .then(function (keyList) { + return Promise.all(keyList.map(function(key) { + return caches.delete(key) + })) + }) + } +}) diff --git a/src/App.vue b/src/App.vue index 23986194..511ebe40 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,7 +31,7 @@ - +