@everymatrix/player-rglimits 1.28.3 → 1.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/player-rglimits.js +498 -480
- package/dist/player-rglimits.js.map +1 -1
- package/index.html +2 -2
- package/package.json +2 -2
- package/src/PlayerRglimits.svelte +451 -271
- package/src/images/arch-bg.svg +5 -0
- package/src/translations.js +100 -28
- package/tsconfig.json +2 -2
- package/types/general-animation-loading.d.ts +1 -0
- package/types/types.ts +57 -0
package/dist/player-rglimits.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e){return e()}function i(){return Object.create(null)}function n(e){e.forEach(t)}function r(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let a,o;function l(e,t){return a||(a=document.createElement("a")),a.href=t,e===a.href}function u(t,...i){if(null==t)return e;const n=t.subscribe(...i);return n.unsubscribe?()=>n.unsubscribe():n}function c(e,t){e.appendChild(t)}function h(e,t,i){e.insertBefore(t,i||null)}function d(e){e.parentNode&&e.parentNode.removeChild(e)}function m(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function f(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function g(){return p(" ")}function y(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function _(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function v(e,t,i){t in e?e[t]="boolean"==typeof e[t]&&""===i||i:_(e,t,i)}function b(e,t){t=""+t,e.data!==t&&(e.data=t)}function w(e,t,i,n){null==i?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function L(e,t,i){for(let i=0;i<e.options.length;i+=1){const n=e.options[i];if(n.__value===t)return void(n.selected=!0)}i&&void 0===t||(e.selectedIndex=-1)}function E(e){const t=e.querySelector(":checked");return t&&t.__value}function T(e){const t={};for(const i of e)t[i.name]=i.value;return t}function S(e){o=e}
|
|
2
2
|
/**
|
|
3
3
|
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
4
4
|
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
10
10
|
*/
|
|
11
|
-
function
|
|
11
|
+
function M(e){(function(){if(!o)throw new Error("Function called outside component initialization");return o})().$$.on_mount.push(e)}const D=[],k=[];let H=[];const A=[],P=Promise.resolve();let O=!1;function C(e){H.push(e)}
|
|
12
12
|
// flush() calls callbacks in this order:
|
|
13
13
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
14
14
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -27,410 +27,410 @@ function S(t){(function(){if(!a)throw new Error("Function called outside compone
|
|
|
27
27
|
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
28
28
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
29
29
|
// function, guarantees this behavior.
|
|
30
|
-
const
|
|
31
|
-
function
|
|
30
|
+
const N=new Set;let x=0;// Do *not* move this inside the flush() function
|
|
31
|
+
function R(){
|
|
32
32
|
// Do not reenter flush while dirty components are updated, as this can
|
|
33
33
|
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
34
34
|
// Reentrancy is ok afterwards for bindings etc.
|
|
35
|
-
if(0!==
|
|
35
|
+
if(0!==x)return;const e=o;do{
|
|
36
36
|
// first, call beforeUpdate functions
|
|
37
37
|
// and update components
|
|
38
|
-
try{for(;
|
|
38
|
+
try{for(;x<D.length;){const e=D[x];x++,S(e),B(e.$$)}}catch(e){
|
|
39
39
|
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
40
|
-
throw
|
|
40
|
+
throw D.length=0,x=0,e}for(S(null),D.length=0,x=0;k.length;)k.pop()();
|
|
41
41
|
// then, once components are updated, call
|
|
42
42
|
// afterUpdate functions. This may cause
|
|
43
43
|
// subsequent updates...
|
|
44
|
-
for(let
|
|
44
|
+
for(let e=0;e<H.length;e+=1){const t=H[e];N.has(t)||(
|
|
45
45
|
// ...so guard against infinite loops
|
|
46
|
-
|
|
46
|
+
N.add(t),t())}H.length=0}while(D.length);for(;A.length;)A.pop()();O=!1,N.clear(),S(e)}function B(e){if(null!==e.fragment){e.update(),n(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(C)}}
|
|
47
47
|
/**
|
|
48
48
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
49
|
-
*/const
|
|
49
|
+
*/const Y=new Set;function I(e,t){const i=e.$$;null!==i.fragment&&(!function(e){const t=[],i=[];H.forEach((n=>-1===e.indexOf(n)?t.push(n):i.push(n))),i.forEach((e=>e())),H=t}(i.after_update),n(i.on_destroy),i.fragment&&i.fragment.d(t),
|
|
50
50
|
// TODO null out other refs, including component.$$ (but need to
|
|
51
51
|
// preserve final state?)
|
|
52
|
-
|
|
52
|
+
i.on_destroy=i.fragment=null,i.ctx=[])}function U(e,t){-1===e.$$.dirty[0]&&(D.push(e),O||(O=!0,P.then(R)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function F(s,a,l,u,c,h,m,f=[-1]){const p=o;S(s);const g=s.$$={fragment:null,ctx:[],
|
|
53
53
|
// state
|
|
54
|
-
props:
|
|
54
|
+
props:h,update:e,not_equal:c,bound:i(),
|
|
55
55
|
// lifecycle
|
|
56
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(
|
|
56
|
+
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(p?p.$$.context:[])),
|
|
57
57
|
// everything else
|
|
58
|
-
callbacks:
|
|
58
|
+
callbacks:i(),dirty:f,skip_bound:!1,root:a.target||p.$$.root};m&&m(g.root);let y=!1;if(g.ctx=l?l(s,a.props||{},((e,t,...i)=>{const n=i.length?i[0]:t;return g.ctx&&c(g.ctx[e],g.ctx[e]=n)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](n),y&&U(s,e)),t})):[],g.update(),y=!0,n(g.before_update),
|
|
59
59
|
// `false` as a special case of no DOM component
|
|
60
|
-
g.fragment=!!u&&u(g.ctx),
|
|
60
|
+
g.fragment=!!u&&u(g.ctx),a.target){if(a.hydrate){const e=function(e){return Array.from(e.childNodes)}(a.target);
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
62
|
-
g.fragment&&g.fragment.l(
|
|
62
|
+
g.fragment&&g.fragment.l(e),e.forEach(d)}else
|
|
63
63
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
64
|
-
g.fragment&&g.fragment.c();
|
|
64
|
+
g.fragment&&g.fragment.c();a.intro&&((_=s.$$.fragment)&&_.i&&(Y.delete(_),_.i(v))),function(e,i,s,a){const{fragment:o,after_update:l}=e.$$;o&&o.m(i,s),a||
|
|
65
65
|
// onMount happens before the initial afterUpdate
|
|
66
|
-
|
|
66
|
+
C((()=>{const i=e.$$.on_mount.map(t).filter(r);
|
|
67
67
|
// if the component was destroyed immediately
|
|
68
68
|
// it will update the `$$.on_destroy` reference to `null`.
|
|
69
69
|
// the destructured on_destroy may still reference to the old array
|
|
70
|
-
|
|
70
|
+
e.$$.on_destroy?e.$$.on_destroy.push(...i):
|
|
71
71
|
// Edge case - component was destroyed immediately,
|
|
72
72
|
// most likely as a result of a binding initialising
|
|
73
|
-
i
|
|
73
|
+
n(i),e.$$.on_mount=[]})),l.forEach(C)}(s,a.target,a.anchor,a.customElement),R()}var _,v;S(p)}let G;"function"==typeof HTMLElement&&(G=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);
|
|
74
74
|
// @ts-ignore todo: improve typings
|
|
75
|
-
for(const
|
|
75
|
+
for(const e in this.$$.slotted)
|
|
76
76
|
// @ts-ignore todo: improve typings
|
|
77
|
-
this.appendChild(this.$$.slotted[
|
|
77
|
+
this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){I(this,1),this.$destroy=e}$on(t,i){
|
|
78
78
|
// TODO should this delegate to addEventListener?
|
|
79
|
-
if(!r(
|
|
79
|
+
if(!r(i))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const e=n.indexOf(i);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var W=function(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return $(null==t&&i.path)}},i.exports),i.exports}((function(e,t){e.exports=function(){var t,i;function n(){return t.apply(null,arguments)}
|
|
80
80
|
// This is done to register the method called with moment()
|
|
81
81
|
// without creating circular dependencies.
|
|
82
|
-
function r(
|
|
82
|
+
function r(e){t=e}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){
|
|
83
83
|
// IE8 will treat undefined and null as object if it wasn't for
|
|
84
84
|
// input != null
|
|
85
|
-
return null!=
|
|
85
|
+
return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var i,n=[],r=e.length;for(i=0;i<r;++i)n.push(t(e[i],i));return n}function m(e,t){for(var i in t)o(t,i)&&(e[i]=t[i]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,i,n){return Zi(e,t,i,n,!0).utc()}function p(){
|
|
86
86
|
// We need to deep clone this object.
|
|
87
|
-
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(
|
|
87
|
+
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=p()),e._pf}function y(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function _(e){var t=f(NaN);return null!=e?m(g(t),e):g(t).userInvalidated=!0,t}
|
|
88
88
|
// Plugins that add properties should also add the key here (null value),
|
|
89
89
|
// so we can properly clone ourselves.
|
|
90
|
-
|
|
90
|
+
i=Array.prototype.some?Array.prototype.some:function(e){var t,i=Object(this),n=i.length>>>0;for(t=0;t<n;t++)if(t in i&&e.call(this,i[t],t,i))return!0;return!1};var v=n.momentProperties=[],b=!1;function w(e,t){var i,n,r,s=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),s>0)for(i=0;i<s;i++)u(r=t[n=v[i]])||(e[n]=r);return e}
|
|
91
91
|
// Moment prototype object
|
|
92
|
-
function
|
|
92
|
+
function L(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),
|
|
93
93
|
// Prevent infinite loop in case updateOffset creates new moment
|
|
94
94
|
// objects.
|
|
95
|
-
!1===b&&(b=!0,
|
|
95
|
+
!1===b&&(b=!0,n.updateOffset(this),b=!1)}function E(e){return e instanceof L||null!=e&&null!=e._isAMomentObject}function T(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var i=!0;return m((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),i){var r,s,a,l=[],u=arguments.length;for(s=0;s<u;s++){if(r="","object"==typeof arguments[s]){for(a in r+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];l.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var M,D={};function k(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}function H(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e){var t,i;for(i in e)o(e,i)&&(H(t=e[i])?this[i]=t:this["_"+i]=t);this._config=e,
|
|
96
96
|
// Lenient ordinal parsing accepts just a number in addition to
|
|
97
97
|
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
|
|
98
98
|
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
99
|
-
this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function
|
|
99
|
+
this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(e,t){var i,n=m({},e);for(i in t)o(t,i)&&(a(e[i])&&a(t[i])?(n[i]={},m(n[i],e[i]),m(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)o(e,i)&&!o(t,i)&&a(e[i])&&(
|
|
100
100
|
// make sure changes to properties don't modify parent config
|
|
101
|
-
i
|
|
101
|
+
n[i]=m({},n[i]));return n}function O(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)o(e,t)&&i.push(t);return i};var C={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return H(n)?n.call(t,i):n}function x(e,t,i){var n=""+Math.abs(e),r=t-n.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var R=/(\[[^\[]*\])|(\\)?([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,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},I={};
|
|
102
102
|
// token: 'M'
|
|
103
103
|
// padded: ['MM', 2]
|
|
104
104
|
// ordinal: 'Mo'
|
|
105
105
|
// callback: function () { this.month() + 1 }
|
|
106
|
-
function
|
|
106
|
+
function U(e,t,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),e&&(I[e]=r),t&&(I[t[0]]=function(){return x(r.apply(this,arguments),t[1],t[2])}),i&&(I[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e){var t,i,n=e.match(R);for(t=0,i=n.length;t<i;t++)I[n[t]]?n[t]=I[n[t]]:n[t]=F(n[t]);return function(t){var r,s="";for(r=0;r<i;r++)s+=H(n[r])?n[r].call(t,e):n[r];return s}}
|
|
107
107
|
// format date using native date object
|
|
108
|
-
function
|
|
108
|
+
function W(e,t){return e.isValid()?(t=V(t,e.localeData()),Y[t]=Y[t]||G(t),Y[t](e)):e.localeData().invalidDate()}function V(e,t){var i=5;function n(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;i>=0&&B.test(e);)e=e.replace(B,n),B.lastIndex=0,i-=1;return e}var j={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function z(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(R).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function X(){return this._invalidDate}var K="%d",q=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ee(e,t,i,n){var r=this._relativeTime[i];return H(r)?r(e,t,i,n):r.replace(/%d/i,e)}function te(e,t){var i=this._relativeTime[e>0?"future":"past"];return H(i)?i(t):i.replace(/%s/i,t)}var ie={};function ne(e,t){var i=e.toLowerCase();ie[i]=ie[i+"s"]=ie[t]=e}function re(e){return"string"==typeof e?ie[e]||ie[e.toLowerCase()]:void 0}function se(e){var t,i,n={};for(i in e)o(e,i)&&(t=re(i))&&(n[t]=e[i]);return n}var ae={};function oe(e,t){ae[e]=t}function le(e){var t,i=[];for(t in e)o(e,t)&&i.push({unit:t,priority:ae[t]});return i.sort((function(e,t){return e.priority-t.priority})),i}function ue(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=ce(t)),i}function de(e,t){return function(i){return null!=i?(fe(this,e,i),n.updateOffset(this,t),this):me(this,e)}}function me(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(i=he(i),e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),et(i,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](i))}
|
|
109
109
|
// MOMENTS
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
110
|
+
function pe(e){return H(this[e=re(e)])?this[e]():this}function ge(e,t){if("object"==typeof e){var i,n=le(e=se(e)),r=n.length;for(i=0;i<r;i++)this[n[i].unit](e[n[i].unit])}else if(H(this[e=re(e)]))return this[e](t);return this}var ye,_e=/\d/,// 0 - 9
|
|
111
|
+
ve=/\d\d/,// 00 - 99
|
|
112
|
+
be=/\d{3}/,// 000 - 999
|
|
113
|
+
we=/\d{4}/,// 0000 - 9999
|
|
114
|
+
Le=/[+-]?\d{6}/,// -999999 - 999999
|
|
115
|
+
Ee=/\d\d?/,// 0 - 99
|
|
116
|
+
Te=/\d\d\d\d?/,// 999 - 9999
|
|
117
|
+
Se=/\d\d\d\d\d\d?/,// 99999 - 999999
|
|
118
|
+
Me=/\d{1,3}/,// 0 - 999
|
|
119
|
+
De=/\d{1,4}/,// 0 - 9999
|
|
120
|
+
ke=/[+-]?\d{1,6}/,// -999999 - 999999
|
|
121
|
+
He=/\d+/,// 0 - inf
|
|
122
|
+
Ae=/[+-]?\d+/,// -inf - inf
|
|
123
|
+
Pe=/Z|[+-]\d\d:?\d\d/gi,// +00:00 -00:00 +0000 -0000 or Z
|
|
124
|
+
Oe=/Z|[+-]\d\d(?::?\d\d)?/gi,// +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
|
125
|
+
Ce=/[+-]?\d+(\.\d{1,3})?/,// 123456789 123456789.123
|
|
126
126
|
// any word (or two) characters or numbers including two/three word month in arabic.
|
|
127
127
|
// includes scottish gaelic two word and hyphenated months
|
|
128
|
-
|
|
128
|
+
Ne=/[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;function xe(e,t,i){ye[e]=H(t)?t:function(e,n){return e&&i?i:t}}function Re(e,t){return o(ye,e)?ye[e](t._strict,t._locale):new RegExp(Be(e))}
|
|
129
129
|
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
|
130
|
-
function
|
|
130
|
+
function Be(e){return Ye(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,r){return t||i||n||r})))}function Ye(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ye={};var Ie={};function Ue(e,t){var i,n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,i){i[t]=he(e)}),n=e.length,i=0;i<n;i++)Ie[e[i]]=r}function Fe(e,t){Ue(e,(function(e,i,n,r){n._w=n._w||{},t(e,n._w,n,r)}))}function Ge(e,t,i){null!=t&&o(Ie,e)&&Ie[e](t,i._a,i,e)}var $e,We=0,Ve=1,je=2,ze=3,Ze=4,Xe=5,Ke=6,qe=7,Je=8;function Qe(e,t){return(e%t+t)%t}function et(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=Qe(t,12);return e+=(t-i)/12,1===i?ue(e)?29:28:31-i%7%2}
|
|
131
131
|
// FORMATTING
|
|
132
|
-
$
|
|
132
|
+
$e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){
|
|
133
133
|
// I know
|
|
134
|
-
var
|
|
134
|
+
var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),
|
|
135
135
|
// ALIASES
|
|
136
|
-
|
|
136
|
+
ne("month","M"),
|
|
137
137
|
// PRIORITY
|
|
138
|
-
|
|
138
|
+
oe("month",8),
|
|
139
139
|
// PARSING
|
|
140
|
-
|
|
140
|
+
xe("M",Ee),xe("MM",Ee,ve),xe("MMM",(function(e,t){return t.monthsShortRegex(e)})),xe("MMMM",(function(e,t){return t.monthsRegex(e)})),Ue(["M","MM"],(function(e,t){t[Ve]=he(e)-1})),Ue(["MMM","MMMM"],(function(e,t,i,n){var r=i._locale.monthsParse(e,n,i._strict);
|
|
141
141
|
// if we didn't find a month name, mark the date as invalid.
|
|
142
|
-
null!=r?
|
|
142
|
+
null!=r?t[Ve]=r:g(i).invalidMonth=e}));
|
|
143
143
|
// LOCALES
|
|
144
|
-
var
|
|
144
|
+
var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=Ne,st=Ne;function at(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone}function ot(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(
|
|
145
145
|
// this is not used
|
|
146
|
-
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],
|
|
146
|
+
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=$e.call(this._shortMonthsParse,a))?r:null:-1!==(r=$e.call(this._longMonthsParse,a))?r:null:"MMM"===t?-1!==(r=$e.call(this._shortMonthsParse,a))||-1!==(r=$e.call(this._longMonthsParse,a))?r:null:-1!==(r=$e.call(this._longMonthsParse,a))||-1!==(r=$e.call(this._shortMonthsParse,a))?r:null}function ut(e,t,i){var n,r,s;if(this._monthsParseExact)return lt.call(this,e,t,i);
|
|
147
147
|
// TODO: add sorting
|
|
148
148
|
// Sorting makes sure if one month (or abbr) is a prefix of another
|
|
149
149
|
// see sorting in computeMonthsParse
|
|
150
|
-
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),
|
|
150
|
+
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){
|
|
151
151
|
// test the regex
|
|
152
152
|
if(
|
|
153
153
|
// make the regex if we don't have it already
|
|
154
|
-
r=f([2e3,
|
|
154
|
+
r=f([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}}
|
|
155
155
|
// MOMENTS
|
|
156
|
-
function
|
|
156
|
+
function ct(e,t){var i;if(!e.isValid())
|
|
157
157
|
// No op
|
|
158
|
-
return
|
|
158
|
+
return e;if("string"==typeof t)if(/^\d+$/.test(t))t=he(t);else
|
|
159
159
|
// TODO: Another silent failure?
|
|
160
|
-
if(!
|
|
160
|
+
if(!c(t=e.localeData().monthsParse(t)))return e;return i=Math.min(e.date(),et(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function ht(e){return null!=e?(ct(this,e),n.updateOffset(this,!0),this):me(this,"Month")}function dt(){return et(this.year(),this.month())}function mt(e){return this._monthsParseExact?(o(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(o(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,i,n=[],r=[],s=[];for(t=0;t<12;t++)
|
|
161
161
|
// make the regex if we don't have it already
|
|
162
|
-
|
|
162
|
+
i=f([2e3,t]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));
|
|
163
163
|
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
|
164
164
|
// will match the longer piece.
|
|
165
|
-
for(
|
|
165
|
+
for(n.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)n[t]=Ye(n[t]),r[t]=Ye(r[t]);for(t=0;t<24;t++)s[t]=Ye(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}
|
|
166
166
|
// FORMATTING
|
|
167
167
|
// HELPERS
|
|
168
|
-
function
|
|
168
|
+
function gt(e){return ue(e)?366:365}
|
|
169
169
|
// HOOKS
|
|
170
|
-
|
|
170
|
+
U("Y",0,0,(function(){var e=this.year();return e<=9999?x(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),
|
|
171
171
|
// ALIASES
|
|
172
|
-
|
|
172
|
+
ne("year","y"),
|
|
173
173
|
// PRIORITIES
|
|
174
|
-
|
|
174
|
+
oe("year",1),
|
|
175
175
|
// PARSING
|
|
176
|
-
|
|
176
|
+
xe("Y",Ae),xe("YY",Ee,ve),xe("YYYY",De,we),xe("YYYYY",ke,Le),xe("YYYYYY",ke,Le),Ue(["YYYYY","YYYYYY"],We),Ue("YYYY",(function(e,t){t[We]=2===e.length?n.parseTwoDigitYear(e):he(e)})),Ue("YY",(function(e,t){t[We]=n.parseTwoDigitYear(e)})),Ue("Y",(function(e,t){t[We]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return he(e)+(he(e)>68?1900:2e3)};
|
|
177
177
|
// MOMENTS
|
|
178
|
-
var
|
|
178
|
+
var yt=de("FullYear",!0);function _t(){return ue(this.year())}function vt(e,t,i,n,r,s,a){
|
|
179
179
|
// can't just apply() to create a date:
|
|
180
180
|
// https://stackoverflow.com/q/181348
|
|
181
|
-
var
|
|
181
|
+
var o;
|
|
182
182
|
// the date constructor remaps years 0-99 to 1900-1999
|
|
183
|
-
return
|
|
183
|
+
return e<100&&e>=0?(
|
|
184
184
|
// preserve leap years using a full 400 year cycle, then reset
|
|
185
|
-
|
|
185
|
+
o=new Date(e+400,t,i,n,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,n,r,s,a),o}function bt(e){var t,i;
|
|
186
186
|
// the Date.UTC function remaps years 0-99 to 1900-1999
|
|
187
|
-
return
|
|
187
|
+
return e<100&&e>=0?(
|
|
188
188
|
// preserve leap years using a full 400 year cycle, then reset
|
|
189
|
-
(
|
|
189
|
+
(i=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}
|
|
190
190
|
// start-of-first-week - start-of-year
|
|
191
|
-
function
|
|
192
|
-
|
|
191
|
+
function wt(e,t,i){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
|
192
|
+
n=7+t-i;return-(7+bt(e,0,n).getUTCDay()-t)%7+n-1}
|
|
193
193
|
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
|
194
|
-
function
|
|
194
|
+
function Lt(e,t,i,n,r){var s,a,o=1+7*(t-1)+(7+i-n)%7+wt(e,n,r);return o<=0?a=gt(s=e-1)+o:o>gt(e)?(s=e+1,a=o-gt(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Et(e,t,i){var n,r,s=wt(e.year(),t,i),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?n=a+Tt(r=e.year()-1,t,i):a>Tt(e.year(),t,i)?(n=a-Tt(e.year(),t,i),r=e.year()+1):(r=e.year(),n=a),{week:n,year:r}}function Tt(e,t,i){var n=wt(e,t,i),r=wt(e+1,t,i);return(gt(e)-n+r)/7}
|
|
195
195
|
// FORMATTING
|
|
196
196
|
// HELPERS
|
|
197
197
|
// LOCALES
|
|
198
|
-
function
|
|
198
|
+
function St(e){return Et(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),
|
|
199
199
|
// ALIASES
|
|
200
|
-
|
|
200
|
+
ne("week","w"),ne("isoWeek","W"),
|
|
201
201
|
// PRIORITIES
|
|
202
|
-
|
|
202
|
+
oe("week",5),oe("isoWeek",5),
|
|
203
203
|
// PARSING
|
|
204
|
-
|
|
205
|
-
doy:6};function
|
|
204
|
+
xe("w",Ee),xe("ww",Ee,ve),xe("W",Ee),xe("WW",Ee,ve),Fe(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=he(e)}));var Mt={dow:0,// Sunday is the first day of the week.
|
|
205
|
+
doy:6};function Dt(){return this._week.dow}function kt(){return this._week.doy}
|
|
206
206
|
// MOMENTS
|
|
207
|
-
function
|
|
207
|
+
function Ht(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=Et(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}
|
|
208
208
|
// FORMATTING
|
|
209
209
|
// HELPERS
|
|
210
|
-
function
|
|
210
|
+
function Pt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}
|
|
211
211
|
// LOCALES
|
|
212
|
-
function
|
|
212
|
+
function Ct(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),
|
|
213
213
|
// ALIASES
|
|
214
|
-
|
|
214
|
+
ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),
|
|
215
215
|
// PRIORITY
|
|
216
|
-
|
|
216
|
+
oe("day",11),oe("weekday",11),oe("isoWeekday",11),
|
|
217
217
|
// PARSING
|
|
218
|
-
|
|
218
|
+
xe("d",Ee),xe("e",Ee),xe("E",Ee),xe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),xe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),xe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Fe(["dd","ddd","dddd"],(function(e,t,i,n){var r=i._locale.weekdaysParse(e,n,i._strict);
|
|
219
219
|
// if we didn't get a weekday name, mark the date as invalid
|
|
220
|
-
null!=r?
|
|
220
|
+
null!=r?t.d=r:g(i).invalidWeekday=e})),Fe(["d","e","E"],(function(e,t,i,n){t[n]=he(e)}));var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=Ne,Yt=Ne,It=Ne;function Ut(e,t){var i=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ct(i,this._week.dow):e?i[e.day()]:i}function Ft(e){return!0===e?Ct(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Gt(e){return!0===e?Ct(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function $t(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=$e.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=$e.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=$e.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=$e.call(this._weekdaysParse,a))||-1!==(r=$e.call(this._shortWeekdaysParse,a))||-1!==(r=$e.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=$e.call(this._shortWeekdaysParse,a))||-1!==(r=$e.call(this._weekdaysParse,a))||-1!==(r=$e.call(this._minWeekdaysParse,a))?r:null:-1!==(r=$e.call(this._minWeekdaysParse,a))||-1!==(r=$e.call(this._weekdaysParse,a))||-1!==(r=$e.call(this._shortWeekdaysParse,a))?r:null}function Wt(e,t,i){var n,r,s;if(this._weekdaysParseExact)return $t.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){
|
|
221
221
|
// test the regex
|
|
222
222
|
if(
|
|
223
223
|
// make the regex if we don't have it already
|
|
224
|
-
r=f([2e3,1]).day(
|
|
224
|
+
r=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}}
|
|
225
225
|
// MOMENTS
|
|
226
|
-
function
|
|
226
|
+
function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Pt(e,this.localeData()),this.add(e-t,"d")):t}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function zt(e){if(!this.isValid())return null!=e?this:NaN;
|
|
227
227
|
// behaves the same as moment#day except
|
|
228
228
|
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
|
|
229
229
|
// as a setter, sunday should belong to the previous week.
|
|
230
|
-
if(null!=
|
|
230
|
+
if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Xt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Yt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=It),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qt(){function e(e,t){return t.length-e.length}var t,i,n,r,s,a=[],o=[],l=[],u=[];for(t=0;t<7;t++)
|
|
231
231
|
// make the regex if we don't have it already
|
|
232
|
-
|
|
232
|
+
i=f([2e3,1]).day(t),n=Ye(this.weekdaysMin(i,"")),r=Ye(this.weekdaysShort(i,"")),s=Ye(this.weekdays(i,"")),a.push(n),o.push(r),l.push(s),u.push(n),u.push(r),u.push(s);
|
|
233
233
|
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
|
234
234
|
// will match the longer piece.
|
|
235
|
-
|
|
235
|
+
a.sort(e),o.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}
|
|
236
236
|
// FORMATTING
|
|
237
|
-
function
|
|
237
|
+
function Jt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function ei(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}
|
|
238
238
|
// PARSING
|
|
239
|
-
function
|
|
239
|
+
function ti(e,t){return t._meridiemParse}
|
|
240
240
|
// LOCALES
|
|
241
|
-
function
|
|
241
|
+
function ii(e){
|
|
242
242
|
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
|
|
243
243
|
// Using charAt should be more compatible.
|
|
244
|
-
return"p"===(
|
|
244
|
+
return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Jt),U("k",["kk",2],0,Qt),U("hmm",0,0,(function(){return""+Jt.apply(this)+x(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Jt.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+x(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)})),ei("a",!0),ei("A",!1),
|
|
245
245
|
// ALIASES
|
|
246
|
-
|
|
246
|
+
ne("hour","h"),
|
|
247
247
|
// PRIORITY
|
|
248
|
-
|
|
248
|
+
oe("hour",13),xe("a",ti),xe("A",ti),xe("H",Ee),xe("h",Ee),xe("k",Ee),xe("HH",Ee,ve),xe("hh",Ee,ve),xe("kk",Ee,ve),xe("hmm",Te),xe("hmmss",Se),xe("Hmm",Te),xe("Hmmss",Se),Ue(["H","HH"],ze),Ue(["k","kk"],(function(e,t,i){var n=he(e);t[ze]=24===n?0:n})),Ue(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),Ue(["h","hh"],(function(e,t,i){t[ze]=he(e),g(i).bigHour=!0})),Ue("hmm",(function(e,t,i){var n=e.length-2;t[ze]=he(e.substr(0,n)),t[Ze]=he(e.substr(n)),g(i).bigHour=!0})),Ue("hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[ze]=he(e.substr(0,n)),t[Ze]=he(e.substr(n,2)),t[Xe]=he(e.substr(r)),g(i).bigHour=!0})),Ue("Hmm",(function(e,t,i){var n=e.length-2;t[ze]=he(e.substr(0,n)),t[Ze]=he(e.substr(n))})),Ue("Hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[ze]=he(e.substr(0,n)),t[Ze]=he(e.substr(n,2)),t[Xe]=he(e.substr(r))}));var ni=/[ap]\.?m?\.?/i,
|
|
249
249
|
// Setting the hour should keep the time, because the user explicitly
|
|
250
250
|
// specified which hour they want. So trying to maintain the same hour (in
|
|
251
251
|
// a new timezone) makes sense. Adding/subtracting hours does not follow
|
|
252
252
|
// this rule.
|
|
253
|
-
|
|
253
|
+
ri=de("Hours",!0);function si(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}var ai,oi={calendar:C,longDateFormat:j,invalidDate:Z,ordinal:K,dayOfMonthOrdinalParse:q,relativeTime:Q,months:tt,monthsShort:it,week:Mt,weekdays:Nt,weekdaysMin:Rt,weekdaysShort:xt,meridiemParse:ni},li={},ui={};
|
|
254
254
|
// internal storage for locale config files
|
|
255
|
-
function
|
|
255
|
+
function ci(e,t){var i,n=Math.min(e.length,t.length);for(i=0;i<n;i+=1)if(e[i]!==t[i])return i;return n}function hi(e){return e?e.toLowerCase().replace("_","-"):e}
|
|
256
256
|
// pick the locale from the array
|
|
257
257
|
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
|
|
258
258
|
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
|
|
259
|
-
function
|
|
259
|
+
function di(e){for(var t,i,n,r,s=0;s<e.length;){for(t=(r=hi(e[s]).split("-")).length,i=(i=hi(e[s+1]))?i.split("-"):null;t>0;){if(n=fi(r.slice(0,t).join("-")))return n;if(i&&i.length>=t&&ci(r,i)>=t-1)
|
|
260
260
|
//the next array item is better than a shallower substring of this one
|
|
261
|
-
break;
|
|
261
|
+
break;t--}s++}return ai}function mi(e){
|
|
262
262
|
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
|
263
|
-
return null!=
|
|
263
|
+
return null!=e.match("^[^/\\\\]*$")}function fi(t){var i=null;
|
|
264
264
|
// TODO: Find a better way to register and load all the locales in Node
|
|
265
|
-
if(void 0===
|
|
265
|
+
if(void 0===li[t]&&e&&e.exports&&mi(t))try{i=ai._abbr,$(),pi(i)}catch(e){
|
|
266
266
|
// mark as not found to avoid repeating expensive file require call causing high CPU
|
|
267
267
|
// when trying to find en-US, en_US, en-us for every format call
|
|
268
|
-
|
|
269
|
-
}return
|
|
268
|
+
li[t]=null;// null means not found
|
|
269
|
+
}return li[t]}
|
|
270
270
|
// This function will load locale and then set the global locale. If
|
|
271
271
|
// no arguments are passed in, it will simply return the current global
|
|
272
272
|
// locale key.
|
|
273
|
-
function
|
|
273
|
+
function pi(e,t){var i;return e&&((i=u(t)?_i(e):gi(e,t))?
|
|
274
274
|
// moment.duration._locale = moment._locale = data;
|
|
275
|
-
|
|
275
|
+
ai=i:"undefined"!=typeof console&&console.warn&&
|
|
276
276
|
//warn user if arguments are passed but the locale could not be set
|
|
277
|
-
console.warn("Locale "+
|
|
277
|
+
console.warn("Locale "+e+" not found. Did you forget to load it?")),ai._abbr}function gi(e,t){if(null!==t){var i,n=oi;if(t.abbr=e,null!=li[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=li[e]._config;else if(null!=t.parentLocale)if(null!=li[t.parentLocale])n=li[t.parentLocale]._config;else{if(null==(i=fi(t.parentLocale)))return ui[t.parentLocale]||(ui[t.parentLocale]=[]),ui[t.parentLocale].push({name:e,config:t}),null;n=i._config}return li[e]=new O(P(n,t)),ui[e]&&ui[e].forEach((function(e){gi(e.name,e.config)})),
|
|
278
278
|
// backwards compat for now: also set the locale
|
|
279
279
|
// make sure we set the locale AFTER all child locales have been
|
|
280
280
|
// created, so we won't end up with the child locale set.
|
|
281
|
-
|
|
281
|
+
pi(e),li[e]}
|
|
282
282
|
// useful for testing
|
|
283
|
-
return delete
|
|
283
|
+
return delete li[e],null}function yi(e,t){if(null!=t){var i,n,r=oi;null!=li[e]&&null!=li[e].parentLocale?
|
|
284
284
|
// Update existing child locale in-place to avoid memory-leaks
|
|
285
|
-
|
|
285
|
+
li[e].set(P(li[e]._config,t)):(
|
|
286
286
|
// MERGE
|
|
287
|
-
null!=(
|
|
287
|
+
null!=(n=fi(e))&&(r=n._config),t=P(r,t),null==n&&(
|
|
288
288
|
// updateLocale is called for creating a new locale
|
|
289
289
|
// Set abbr so it will have a name (getters return
|
|
290
290
|
// undefined otherwise).
|
|
291
|
-
|
|
291
|
+
t.abbr=e),(i=new O(t)).parentLocale=li[e],li[e]=i),
|
|
292
292
|
// backwards compat for now: also set the locale
|
|
293
|
-
|
|
293
|
+
pi(e)}else
|
|
294
294
|
// pass null for config to unupdate, useful for tests
|
|
295
|
-
null!=
|
|
295
|
+
null!=li[e]&&(null!=li[e].parentLocale?(li[e]=li[e].parentLocale,e===pi()&&pi(e)):null!=li[e]&&delete li[e]);return li[e]}
|
|
296
296
|
// returns locale data
|
|
297
|
-
function
|
|
297
|
+
function _i(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ai;if(!s(e)){if(
|
|
298
298
|
//short-circuit everything else
|
|
299
|
-
|
|
299
|
+
t=fi(e))return t;e=[e]}return di(e)}function vi(){return M(li)}function bi(e){var t,i=e._a;return i&&-2===g(e).overflow&&(t=i[Ve]<0||i[Ve]>11?Ve:i[je]<1||i[je]>et(i[We],i[Ve])?je:i[ze]<0||i[ze]>24||24===i[ze]&&(0!==i[Ze]||0!==i[Xe]||0!==i[Ke])?ze:i[Ze]<0||i[Ze]>59?Ze:i[Xe]<0||i[Xe]>59?Xe:i[Ke]<0||i[Ke]>999?Ke:-1,g(e)._overflowDayOfYear&&(t<We||t>je)&&(t=je),g(e)._overflowWeeks&&-1===t&&(t=qe),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}
|
|
300
300
|
// iso 8601 regex
|
|
301
301
|
// 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)
|
|
302
|
-
var
|
|
302
|
+
var wi=/^\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)?)?$/,Li=/^\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)?)?$/,Ei=/Z|[+-]\d\d(?::?\d\d)?/,Ti=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],
|
|
303
303
|
// iso time formats and regexes
|
|
304
|
-
|
|
304
|
+
Si=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mi=/^\/?Date\((-?\d+)/i,
|
|
305
305
|
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
|
306
|
-
|
|
306
|
+
Di=/^(?:(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}))$/,ki={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};
|
|
307
307
|
// date from iso format
|
|
308
|
-
function
|
|
308
|
+
function Hi(e){var t,i,n,r,s,a,o=e._i,l=wi.exec(o)||Li.exec(o),u=Ti.length,c=Si.length;if(l){for(g(e).iso=!0,t=0,i=u;t<i;t++)if(Ti[t][1].exec(l[1])){r=Ti[t][0],n=!1!==Ti[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,i=c;t<i;t++)if(Si[t][1].exec(l[3])){
|
|
309
309
|
// match[2] should be 'T' or space
|
|
310
|
-
s=(l[2]||" ")+
|
|
310
|
+
s=(l[2]||" ")+Si[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(l[4]){if(!Ei.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(s||"")+(a||""),Fi(e)}else e._isValid=!1}function Ai(e,t,i,n,r,s){var a=[Pi(e),it.indexOf(t),parseInt(i,10),parseInt(n,10),parseInt(r,10)];return s&&a.push(parseInt(s,10)),a}function Pi(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Oi(e){
|
|
311
311
|
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
|
312
|
-
return
|
|
312
|
+
return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,i){return!e||xt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(i).weekdayMismatch=!0,i._isValid=!1,!1)}function Ni(e,t,i){if(e)return ki[e];if(t)
|
|
313
313
|
// the only allowed military tz is Z
|
|
314
|
-
return 0;var
|
|
314
|
+
return 0;var n=parseInt(i,10),r=n%100;return(n-r)/100*60+r}
|
|
315
315
|
// date and time from ref 2822 format
|
|
316
|
-
function
|
|
316
|
+
function xi(e){var t,i=Di.exec(Oi(e._i));if(i){if(t=Ai(i[4],i[3],i[2],i[5],i[6],i[7]),!Ci(i[1],t,e))return;e._a=t,e._tzm=Ni(i[8],i[9],i[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}
|
|
317
317
|
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
|
|
318
|
-
function
|
|
318
|
+
function Ri(e){var t=Mi.exec(e._i);null===t?(Hi(e),!1===e._isValid&&(delete e._isValid,xi(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:
|
|
319
319
|
// Final attempt, use Input Fallback
|
|
320
|
-
|
|
320
|
+
n.createFromInputFallback(e)))):e._d=new Date(+t[1])}
|
|
321
321
|
// Pick the first defined of two or three arguments.
|
|
322
|
-
function
|
|
322
|
+
function Bi(e,t,i){return null!=e?e:null!=t?t:i}function Yi(e){
|
|
323
323
|
// hooks is actually the exported moment object
|
|
324
|
-
var
|
|
324
|
+
var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}
|
|
325
325
|
// convert an array to a date.
|
|
326
326
|
// the array should mirror the parameters below
|
|
327
327
|
// note: all values past the year are optional and will default to the lowest possible value.
|
|
328
328
|
// [year, month, day , hour, minute, second, millisecond]
|
|
329
|
-
function
|
|
329
|
+
function Ii(e){var t,i,n,r,s,a=[];if(!e._d){
|
|
330
330
|
// Default to current date.
|
|
331
331
|
// * if no year, month, day of month are given, default to today
|
|
332
332
|
// * if day of month is given, default month and year
|
|
333
333
|
// * if month is given, default only year
|
|
334
334
|
// * if year is given, don't default anything
|
|
335
|
-
for(
|
|
335
|
+
for(n=Yi(e),
|
|
336
336
|
//compute day of the year from weeks and weekdays
|
|
337
|
-
|
|
337
|
+
e._w&&null==e._a[je]&&null==e._a[Ve]&&Ui(e),
|
|
338
338
|
//if the day of the year is set, figure out what it is
|
|
339
|
-
null!=
|
|
339
|
+
null!=e._dayOfYear&&(s=Bi(e._a[We],n[We]),(e._dayOfYear>gt(s)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),i=bt(s,0,e._dayOfYear),e._a[Ve]=i.getUTCMonth(),e._a[je]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];
|
|
340
340
|
// Zero out whatever was not defaulted, including time
|
|
341
|
-
for(;
|
|
341
|
+
for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];
|
|
342
342
|
// Check for 24:00:00.000
|
|
343
|
-
24===
|
|
343
|
+
24===e._a[ze]&&0===e._a[Ze]&&0===e._a[Xe]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?bt:vt).apply(null,a),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),
|
|
344
344
|
// Apply timezone offset from input. The actual utcOffset can be changed
|
|
345
345
|
// with parseZone.
|
|
346
|
-
null!=
|
|
346
|
+
null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),
|
|
347
347
|
// check for mismatching day of week
|
|
348
|
-
|
|
348
|
+
e._w&&void 0!==e._w.d&&e._w.d!==r&&(g(e).weekdayMismatch=!0)}}function Ui(e){var t,i,n,r,s,a,o,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,
|
|
349
349
|
// TODO: We need to take the current isoWeekYear, but that depends on
|
|
350
350
|
// how we interpret now (local, utc, fixed offset). So create
|
|
351
351
|
// a now version of current config (take local/utc/offset flags, and
|
|
352
352
|
// create now).
|
|
353
|
-
|
|
353
|
+
i=Bi(t.GG,e._a[We],Et(Xi(),1,4).year),n=Bi(t.W,1),((r=Bi(t.E,1))<1||r>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,u=Et(Xi(),s,a),i=Bi(t.gg,e._a[We],u.year),
|
|
354
354
|
// Default to current week.
|
|
355
|
-
|
|
355
|
+
n=Bi(t.w,u.week),null!=t.d?((
|
|
356
356
|
// weekday -- low day numbers are considered next week
|
|
357
|
-
r=
|
|
357
|
+
r=t.d)<0||r>6)&&(l=!0):null!=t.e?(
|
|
358
358
|
// local weekday -- counting starts from beginning of week
|
|
359
|
-
r=
|
|
359
|
+
r=t.e+s,(t.e<0||t.e>6)&&(l=!0)):
|
|
360
360
|
// default to beginning of week
|
|
361
|
-
r=s),
|
|
361
|
+
r=s),n<1||n>Tt(i,s,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(o=Lt(i,n,r,s,a),e._a[We]=o.year,e._dayOfYear=o.dayOfYear)}
|
|
362
362
|
// constant that refers to the ISO standard
|
|
363
363
|
// date from string and format string
|
|
364
|
-
function
|
|
364
|
+
function Fi(e){
|
|
365
365
|
// TODO: Move this to another part of the creation flow to prevent circular deps
|
|
366
|
-
if(
|
|
366
|
+
if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;
|
|
367
367
|
// This array is used to make a Date, either with `new Date` or `Date.UTC`
|
|
368
|
-
var
|
|
368
|
+
var t,i,r,s,a,o,l,u=""+e._i,c=u.length,h=0;for(l=(r=V(e._f,e._locale).match(R)||[]).length,t=0;t<l;t++)s=r[t],(i=(u.match(Re(s,e))||[])[0])&&((a=u.substr(0,u.indexOf(i))).length>0&&g(e).unusedInput.push(a),u=u.slice(u.indexOf(i)+i.length),h+=i.length),
|
|
369
369
|
// don't parse if it's not a known token
|
|
370
|
-
|
|
370
|
+
I[s]?(i?g(e).empty=!1:g(e).unusedTokens.push(s),Ge(s,i,e)):e._strict&&!i&&g(e).unusedTokens.push(s);
|
|
371
371
|
// add remaining unparsed input length to the string
|
|
372
|
-
g(
|
|
372
|
+
g(e).charsLeftOver=c-h,u.length>0&&g(e).unusedInput.push(u),
|
|
373
373
|
// clear _12h flag if hour is <= 12
|
|
374
|
-
|
|
374
|
+
e._a[ze]<=12&&!0===g(e).bigHour&&e._a[ze]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,
|
|
375
375
|
// handle meridiem
|
|
376
|
-
|
|
376
|
+
e._a[ze]=Gi(e._locale,e._a[ze],e._meridiem),null!==(
|
|
377
377
|
// handle era
|
|
378
|
-
|
|
378
|
+
o=g(e).era)&&(e._a[We]=e._locale.erasConvertYear(o,e._a[We])),Ii(e),bi(e)}else xi(e);else Hi(e)}function Gi(e,t,i){var n;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(
|
|
379
379
|
// Fallback
|
|
380
|
-
(
|
|
380
|
+
(n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}
|
|
381
381
|
// date from string and array of format strings
|
|
382
|
-
function
|
|
382
|
+
function $i(e){var t,i,n,r,s,a,o=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<l;r++)s=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Fi(t),y(t)&&(a=!0),
|
|
383
383
|
// if there is any input that was not parsed add a penalty for that format
|
|
384
|
-
s+=g(
|
|
384
|
+
s+=g(t).charsLeftOver,
|
|
385
385
|
//or tokens
|
|
386
|
-
s+=10*g(
|
|
386
|
+
s+=10*g(t).unusedTokens.length,g(t).score=s,o?s<n&&(n=s,i=t):(null==n||s<n||a)&&(n=s,i=t,a&&(o=!0));m(e,i||t)}function Wi(e){if(!e._d){var t=se(e._i),i=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,i,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Ii(e)}}function Vi(e){var t=new L(bi(ji(e)));return t._nextDay&&(
|
|
387
387
|
// Adding is smart enough around DST
|
|
388
|
-
|
|
388
|
+
t.add(1,"d"),t._nextDay=void 0),t}function ji(e){var t=e._i,i=e._f;return e._locale=e._locale||_i(e._l),null===t||void 0===i&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),E(t)?new L(bi(t)):(h(t)?e._d=t:s(i)?$i(e):i?Fi(e):zi(e),y(e)||(e._d=null),e))}function zi(e){var t=e._i;u(t)?e._d=new Date(n.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Ri(e):s(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Ii(e)):a(t)?Wi(e):c(t)?
|
|
389
389
|
// from milliseconds
|
|
390
|
-
|
|
390
|
+
e._d=new Date(t):n.createFromInputFallback(e)}function Zi(e,t,i,n,r){var o={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(a(e)&&l(e)||s(e)&&0===e.length)&&(e=void 0),
|
|
391
391
|
// object construction must be done this way.
|
|
392
392
|
// https://github.com/moment/moment/issues/1423
|
|
393
|
-
|
|
393
|
+
o._isAMomentObject=!0,o._useUTC=o._isUTC=r,o._l=i,o._i=e,o._f=t,o._strict=n,Vi(o)}function Xi(e,t,i,n){return Zi(e,t,i,n,!1)}n.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},
|
|
394
394
|
// constant that refers to the RFC 2822 form
|
|
395
|
-
|
|
395
|
+
n.RFC_2822=function(){};var Ki=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xi.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),qi=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xi.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));
|
|
396
396
|
// Pick a moment m from moments so that m[fn](other) is true for all
|
|
397
397
|
// other. This relies on the function fn to be transitive.
|
|
398
398
|
|
|
399
399
|
// moments should either be an array of moment objects or an array, whose
|
|
400
400
|
// first element is an array of moment objects.
|
|
401
|
-
function
|
|
401
|
+
function Ji(e,t){var i,n;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Xi();for(i=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](i)||(i=t[n]);return i}
|
|
402
402
|
// TODO: Use [].sort instead?
|
|
403
|
-
function
|
|
404
|
-
parseFloat(
|
|
403
|
+
function Qi(){return Ji("isBefore",[].slice.call(arguments,0))}function en(){return Ji("isAfter",[].slice.call(arguments,0))}var tn=function(){return Date.now?Date.now():+new Date},nn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rn(e){var t,i,n=!1,r=nn.length;for(t in e)if(o(e,t)&&(-1===$e.call(nn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(i=0;i<r;++i)if(e[nn[i]]){if(n)return!1;// only allow non-integers for smallest unit
|
|
404
|
+
parseFloat(e[nn[i]])!==he(e[nn[i]])&&(n=!0)}return!0}function sn(){return this._isValid}function an(){return Hn(NaN)}function on(e){var t=se(e),i=t.year||0,n=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=rn(t),
|
|
405
405
|
// representation for dateAddRemove
|
|
406
|
-
this._milliseconds=+
|
|
406
|
+
this._milliseconds=+c+1e3*u+// 1000
|
|
407
407
|
6e4*l+// 1000 * 60
|
|
408
|
-
1e3*
|
|
408
|
+
1e3*o*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
|
|
409
409
|
// Because of dateAddRemove treats 24 hours as different from a
|
|
410
410
|
// day when working around DST, we need to store them separately
|
|
411
|
-
this._days=+
|
|
411
|
+
this._days=+a+7*s,
|
|
412
412
|
// It is impossible to translate months into days without knowing
|
|
413
413
|
// which months you are are talking about, so we have to store
|
|
414
414
|
// it separately.
|
|
415
|
-
this._months=+r+3*
|
|
415
|
+
this._months=+r+3*n+12*i,this._data={},this._locale=_i(),this._bubble()}function ln(e){return e instanceof on}function un(e){return e<0?-1*Math.round(-1*e):Math.round(e)}
|
|
416
416
|
// compare two arrays, return the number of differences
|
|
417
|
-
function
|
|
417
|
+
function cn(e,t,i){var n,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<r;n++)(i&&e[n]!==t[n]||!i&&he(e[n])!==he(t[n]))&&a++;return a+s}
|
|
418
418
|
// FORMATTING
|
|
419
|
-
function
|
|
419
|
+
function hn(e,t){U(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+x(~~(e/60),2)+t+x(~~e%60,2)}))}hn("Z",":"),hn("ZZ",""),
|
|
420
420
|
// PARSING
|
|
421
|
-
|
|
421
|
+
xe("Z",Oe),xe("ZZ",Oe),Ue(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=mn(Oe,e)}));
|
|
422
422
|
// HELPERS
|
|
423
423
|
// timezone chunker
|
|
424
424
|
// '+10:00' > ['10', '00']
|
|
425
425
|
// '-1530' > ['-15', '30']
|
|
426
|
-
var
|
|
426
|
+
var dn=/([\+\-]|\d\d)/gi;function mn(e,t){var i,n,r=(t||"").match(e);return null===r?null:0===(n=60*(i=((r[r.length-1]||[])+"").match(dn)||["-",0,0])[1]+he(i[2]))?0:"+"===i[0]?n:-n}
|
|
427
427
|
// Return a moment from input, that is local/utc/zone equivalent to model.
|
|
428
|
-
function
|
|
428
|
+
function fn(e,t){var i,r;return t._isUTC?(i=t.clone(),r=(E(e)||h(e)?e.valueOf():Xi(e).valueOf())-i.valueOf(),
|
|
429
429
|
// Use low-level api, because this fn is low-level api.
|
|
430
|
-
|
|
430
|
+
i._d.setTime(i._d.valueOf()+r),n.updateOffset(i,!1),i):Xi(e).local()}function pn(e){
|
|
431
431
|
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
|
|
432
432
|
// https://github.com/moment/moment/pull/1871
|
|
433
|
-
return-Math.round(
|
|
433
|
+
return-Math.round(e._d.getTimezoneOffset())}
|
|
434
434
|
// HOOKS
|
|
435
435
|
// This function will be called whenever a moment is mutated.
|
|
436
436
|
// It is intended to keep the offset in sync with the timezone.
|
|
@@ -444,153 +444,153 @@ return-Math.round(t._d.getTimezoneOffset())}
|
|
|
444
444
|
// a second time. In case it wants us to change the offset again
|
|
445
445
|
// _changeInProgress == true case, then we have to adjust, because
|
|
446
446
|
// there is no such time in the given timezone.
|
|
447
|
-
function
|
|
447
|
+
function gn(e,t,i){var r,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=mn(Oe,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(r=pn(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),s!==e&&(!t||this._changeInProgress?Nn(this,Hn(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:pn(this)}function yn(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function _n(e){return this.utcOffset(0,e)}function vn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pn(this),"m")),this}function bn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=mn(Pe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wn(e){return!!this.isValid()&&(e=e?Xi(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Ln(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function En(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=ji(t))._a?(e=t._isUTC?f(t._a):Xi(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function Mn(){return!!this.isValid()&&this._isUTC&&0===this._offset}
|
|
448
448
|
// ASP.NET json date format regex
|
|
449
|
-
|
|
449
|
+
n.updateOffset=function(){};var Dn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
|
|
450
450
|
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
|
|
451
451
|
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
|
|
452
452
|
// and further modified to allow for strings containing both week and day
|
|
453
|
-
|
|
453
|
+
kn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Hn(e,t){var i,n,r,s=e,
|
|
454
454
|
// matching against regexp is expensive, do it on demand
|
|
455
|
-
|
|
455
|
+
a=null;return ln(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(a=Dn.exec(e))?(i="-"===a[1]?-1:1,s={y:0,d:he(a[je])*i,h:he(a[ze])*i,m:he(a[Ze])*i,s:he(a[Xe])*i,ms:he(un(1e3*a[Ke]))*i}):(a=kn.exec(e))?(i="-"===a[1]?-1:1,s={y:An(a[2],i),M:An(a[3],i),w:An(a[4],i),d:An(a[5],i),h:An(a[6],i),m:An(a[7],i),s:An(a[8],i)}):null==s?
|
|
456
456
|
// checks for null or undefined
|
|
457
|
-
s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=
|
|
457
|
+
s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=On(Xi(s.from),Xi(s.to)),(s={}).ms=r.milliseconds,s.M=r.months),n=new on(s),ln(e)&&o(e,"_locale")&&(n._locale=e._locale),ln(e)&&o(e,"_isValid")&&(n._isValid=e._isValid),n}function An(e,t){
|
|
458
458
|
// We'd normally use ~~inp for this, but unfortunately it also
|
|
459
459
|
// converts floats to ints.
|
|
460
460
|
// inp may be undefined, so careful calling replace on it.
|
|
461
|
-
var
|
|
461
|
+
var i=e&&parseFloat(e.replace(",","."));
|
|
462
462
|
// apply sign while we're at it
|
|
463
|
-
return(isNaN(
|
|
463
|
+
return(isNaN(i)?0:i)*t}function Pn(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function On(e,t){var i;return e.isValid()&&t.isValid()?(t=fn(t,e),e.isBefore(t)?i=Pn(e,t):((i=Pn(t,e)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}
|
|
464
464
|
// TODO: remove 'name' arg after deprecation is removed
|
|
465
|
-
function
|
|
465
|
+
function Cn(e,t){return function(i,n){var r;
|
|
466
466
|
//invert the arguments, but complain about it
|
|
467
|
-
return null===
|
|
467
|
+
return null===n||isNaN(+n)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Nn(this,Hn(i,n),e),this}}function Nn(e,t,i,r){var s=t._milliseconds,a=un(t._days),o=un(t._months);e.isValid()&&(r=null==r||r,o&&ct(e,me(e,"Month")+o*i),a&&fe(e,"Date",me(e,"Date")+a*i),s&&e._d.setTime(e._d.valueOf()+s*i),r&&n.updateOffset(e,a||o))}Hn.fn=on.prototype,Hn.invalid=an;var xn=Cn(1,"add"),Rn=Cn(-1,"subtract");function Bn(e){return"string"==typeof e||e instanceof String}
|
|
468
468
|
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
|
|
469
|
-
function
|
|
469
|
+
function Yn(e){return E(e)||h(e)||Bn(e)||c(e)||Un(e)||In(e)||null==e}function In(e){var t,i,n=a(e)&&!l(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=s.length;for(t=0;t<u;t+=1)i=s[t],r=r||o(e,i);return n&&r}function Un(e){var t=s(e),i=!1;return t&&(i=0===e.filter((function(t){return!c(t)&&Bn(e)})).length),t&&i}function Fn(e){var t,i,n=a(e)&&!l(e),r=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)i=s[t],r=r||o(e,i);return n&&r}function Gn(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function $n(e,t){
|
|
470
470
|
// Support for single parameter, formats only overload to the calendar function
|
|
471
|
-
1===arguments.length&&(arguments[0]?
|
|
471
|
+
1===arguments.length&&(arguments[0]?Yn(arguments[0])?(e=arguments[0],t=void 0):Fn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));
|
|
472
472
|
// We want to compare the start of today, vs this.
|
|
473
473
|
// Getting start-of-today depends on whether we're local/utc/offset or not.
|
|
474
|
-
var
|
|
475
|
-
case"minute":s=(this-
|
|
476
|
-
case"hour":s=(this-
|
|
477
|
-
case"day":s=(this-
|
|
478
|
-
case"week":s=(this-
|
|
479
|
-
default:s=this-
|
|
474
|
+
var i=e||Xi(),r=fn(i,this).startOf("day"),s=n.calendarFormat(this,r)||"sameElse",a=t&&(H(t[s])?t[s].call(this,i):t[s]);return this.format(a||this.localeData().calendar(s,this,Xi(i)))}function Wn(){return new L(this)}function Vn(e,t){var i=E(e)?e:Xi(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())}function jn(e,t){var i=E(e)?e:Xi(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())}function zn(e,t,i,n){var r=E(e)?e:Xi(e),s=E(t)?t:Xi(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i))}function Zn(e,t){var i,n=E(e)?e:Xi(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))}function Xn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Kn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function qn(e,t,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=fn(e,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),t=re(t)){case"year":s=Jn(this,n)/12;break;case"month":s=Jn(this,n);break;case"quarter":s=Jn(this,n)/3;break;case"second":s=(this-n)/1e3;break;// 1000
|
|
475
|
+
case"minute":s=(this-n)/6e4;break;// 1000 * 60
|
|
476
|
+
case"hour":s=(this-n)/36e5;break;// 1000 * 60 * 60
|
|
477
|
+
case"day":s=(this-n-r)/864e5;break;// 1000 * 60 * 60 * 24, negate dst
|
|
478
|
+
case"week":s=(this-n-r)/6048e5;break;// 1000 * 60 * 60 * 24 * 7, negate dst
|
|
479
|
+
default:s=this-n}return i?s:ce(s)}function Jn(e,t){if(e.date()<t.date())
|
|
480
480
|
// end-of-month calculations work correct when the start month has more
|
|
481
481
|
// days than the end month.
|
|
482
|
-
return-
|
|
482
|
+
return-Jn(t,e);
|
|
483
483
|
// difference in months
|
|
484
|
-
var
|
|
484
|
+
var i=12*(t.year()-e.year())+(t.month()-e.month()),
|
|
485
485
|
// b is in (anchor - 1 month, anchor + 1 month)
|
|
486
|
-
|
|
486
|
+
n=e.clone().add(i,"months");
|
|
487
487
|
//check for negative zero, return zero if negative zero
|
|
488
|
-
return-(
|
|
488
|
+
return-(i+(t-n<0?(t-n)/(n-e.clone().add(i-1,"months")):(t-n)/(e.clone().add(i+1,"months")-n)))||0}function Qn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function er(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?W(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):H(Date.prototype.toISOString)?
|
|
489
489
|
// native implementation is ~50x faster, use it when we can
|
|
490
|
-
|
|
490
|
+
t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(i,"Z")):W(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}
|
|
491
491
|
/**
|
|
492
492
|
* Return a human readable representation of a moment that can
|
|
493
493
|
* also be evaluated to get a new moment which is the same
|
|
494
494
|
*
|
|
495
495
|
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
|
|
496
|
-
*/function
|
|
496
|
+
*/function tr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,i,n,r="moment",s="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=s+'[")]',this.format(e+t+i+n)}function ir(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function nr(e,t){return this.isValid()&&(E(e)&&e.isValid()||Xi(e).isValid())?Hn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function rr(e){return this.from(Xi(),e)}function sr(e,t){return this.isValid()&&(E(e)&&e.isValid()||Xi(e).isValid())?Hn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ar(e){return this.to(Xi(),e)}
|
|
497
497
|
// If passed a locale key, it will set the locale for this
|
|
498
498
|
// instance. Otherwise, it will return the locale configuration
|
|
499
499
|
// variables for this instance.
|
|
500
|
-
function
|
|
500
|
+
function or(e){var t;return void 0===e?this._locale._abbr:(null!=(t=_i(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lr=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ur(){return this._locale}var cr=1e3,hr=60*cr,dr=60*hr,mr=3506328*dr;
|
|
501
501
|
// actual modulo - handles negative numbers (for dates before 1970):
|
|
502
|
-
function fr(t
|
|
502
|
+
function fr(e,t){return(e%t+t)%t}function pr(e,t,i){
|
|
503
503
|
// the date constructor remaps years 0-99 to 1900-1999
|
|
504
|
-
return
|
|
504
|
+
return e<100&&e>=0?new Date(e+400,t,i)-mr:new Date(e,t,i).valueOf()}function gr(e,t,i){
|
|
505
505
|
// Date.UTC remaps years 0-99 to 1900-1999
|
|
506
|
-
return
|
|
506
|
+
return e<100&&e>=0?Date.UTC(e+400,t,i)-mr:Date.UTC(e,t,i)}function yr(e){var t,i;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?gr:pr,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fr(t+(this._isUTC?0:this.utcOffset()*hr),dr);break;case"minute":t=this._d.valueOf(),t-=fr(t,hr);break;case"second":t=this._d.valueOf(),t-=fr(t,cr)}return this._d.setTime(t),n.updateOffset(this,!0),this}function _r(e){var t,i;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?gr:pr,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dr-fr(t+(this._isUTC?0:this.utcOffset()*hr),dr)-1;break;case"minute":t=this._d.valueOf(),t+=hr-fr(t,hr)-1;break;case"second":t=this._d.valueOf(),t+=cr-fr(t,cr)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function vr(){return this._d.valueOf()-6e4*(this._offset||0)}function br(){return Math.floor(this.valueOf()/1e3)}function wr(){return new Date(this.valueOf())}function Lr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Er(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Tr(){
|
|
507
507
|
// new Date(NaN).toJSON() === null
|
|
508
|
-
return this.isValid()?this.toISOString():null}function
|
|
508
|
+
return this.isValid()?this.toISOString():null}function Sr(){return y(this)}function Mr(){return m({},g(this))}function Dr(){return g(this).overflow}function kr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Hr(e,t){var i,r,s,a=this._eras||_i("en")._eras;for(i=0,r=a.length;i<r;++i)switch("string"==typeof a[i].since&&(
|
|
509
509
|
// truncate time
|
|
510
|
-
s=
|
|
510
|
+
s=n(a[i].since).startOf("day"),a[i].since=s.valueOf()),typeof a[i].until){case"undefined":a[i].until=1/0;break;case"string":
|
|
511
511
|
// truncate time
|
|
512
|
-
s=
|
|
512
|
+
s=n(a[i].until).startOf("day").valueOf(),a[i].until=s.valueOf()}return a}function Ar(e,t,i){var n,r,s,a,o,l=this.eras();for(e=e.toUpperCase(),n=0,r=l.length;n<r;++n)if(s=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),o=l[n].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(s===e)return l[n];break;case"NNNNN":if(o===e)return l[n]}else if([s,a,o].indexOf(e)>=0)return l[n]}function Pr(e,t){var i=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*i}function Or(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(
|
|
513
513
|
// truncate time
|
|
514
|
-
|
|
514
|
+
i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].name;if(n[e].until<=i&&i<=n[e].since)return n[e].name}return""}function Cr(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(
|
|
515
515
|
// truncate time
|
|
516
|
-
|
|
516
|
+
i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].narrow;if(n[e].until<=i&&i<=n[e].since)return n[e].narrow}return""}function Nr(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(
|
|
517
517
|
// truncate time
|
|
518
|
-
|
|
518
|
+
i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until)return n[e].abbr;if(n[e].until<=i&&i<=n[e].since)return n[e].abbr}return""}function xr(){var e,t,i,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(i=s[e].since<=s[e].until?1:-1,
|
|
519
519
|
// truncate time
|
|
520
|
-
r=this.clone().startOf("day").valueOf(),s[
|
|
520
|
+
r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-n(s[e].since).year())*i+s[e].offset;return this.year()}function Rr(e){return o(this,"_erasNameRegex")||$r.call(this),e?this._erasNameRegex:this._erasRegex}function Br(e){return o(this,"_erasAbbrRegex")||$r.call(this),e?this._erasAbbrRegex:this._erasRegex}function Yr(e){return o(this,"_erasNarrowRegex")||$r.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ir(e,t){return t.erasAbbrRegex(e)}function Ur(e,t){return t.erasNameRegex(e)}function Fr(e,t){return t.erasNarrowRegex(e)}function Gr(e,t){return t._eraYearOrdinalRegex||He}function $r(){var e,t,i=[],n=[],r=[],s=[],a=this.eras();for(e=0,t=a.length;e<t;++e)n.push(Ye(a[e].name)),i.push(Ye(a[e].abbr)),r.push(Ye(a[e].narrow)),s.push(Ye(a[e].name)),s.push(Ye(a[e].abbr)),s.push(Ye(a[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}
|
|
521
521
|
// FORMATTING
|
|
522
|
-
function
|
|
522
|
+
function Wr(e,t){U(0,[e,e.length],0,t)}
|
|
523
523
|
// MOMENTS
|
|
524
|
-
function
|
|
524
|
+
function Vr(e){return qr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function jr(e){return qr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function zr(){return Tt(this.year(),1,4)}function Zr(){return Tt(this.isoWeekYear(),1,4)}function Xr(){var e=this.localeData()._week;return Tt(this.year(),e.dow,e.doy)}function Kr(){var e=this.localeData()._week;return Tt(this.weekYear(),e.dow,e.doy)}function qr(e,t,i,n,r){var s;return null==e?Et(this,n,r).year:(t>(s=Tt(e,n,r))&&(t=s),Jr.call(this,e,t,i,n,r))}function Jr(e,t,i,n,r){var s=Lt(e,t,i,n,r),a=bt(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}
|
|
525
525
|
// FORMATTING
|
|
526
526
|
// MOMENTS
|
|
527
|
-
function Qr(
|
|
527
|
+
function Qr(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}
|
|
528
528
|
// FORMATTING
|
|
529
|
-
|
|
529
|
+
U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),xe("N",Ir),xe("NN",Ir),xe("NNN",Ir),xe("NNNN",Ur),xe("NNNNN",Fr),Ue(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,i,n){var r=i._locale.erasParse(e,n,i._strict);r?g(i).era=r:g(i).invalidEra=e})),xe("y",He),xe("yy",He),xe("yyy",He),xe("yyyy",He),xe("yo",Gr),Ue(["y","yy","yyy","yyyy"],We),Ue(["yo"],(function(e,t,i,n){var r;i._locale._eraYearOrdinalRegex&&(r=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[We]=i._locale.eraYearOrdinalParse(e,r):t[We]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Wr("gggg","weekYear"),Wr("ggggg","weekYear"),Wr("GGGG","isoWeekYear"),Wr("GGGGG","isoWeekYear"),
|
|
530
530
|
// ALIASES
|
|
531
|
-
|
|
531
|
+
ne("weekYear","gg"),ne("isoWeekYear","GG"),
|
|
532
532
|
// PRIORITY
|
|
533
|
-
|
|
533
|
+
oe("weekYear",1),oe("isoWeekYear",1),
|
|
534
534
|
// PARSING
|
|
535
|
-
|
|
535
|
+
xe("G",Ae),xe("g",Ae),xe("GG",Ee,ve),xe("gg",Ee,ve),xe("GGGG",De,we),xe("gggg",De,we),xe("GGGGG",ke,Le),xe("ggggg",ke,Le),Fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=he(e)})),Fe(["gg","GG"],(function(e,t,i,r){t[r]=n.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),
|
|
536
536
|
// ALIASES
|
|
537
|
-
|
|
537
|
+
ne("quarter","Q"),
|
|
538
538
|
// PRIORITY
|
|
539
|
-
|
|
539
|
+
oe("quarter",7),
|
|
540
540
|
// PARSING
|
|
541
|
-
|
|
541
|
+
xe("Q",_e),Ue("Q",(function(e,t){t[Ve]=3*(he(e)-1)})),U("D",["DD",2],"Do","date"),
|
|
542
542
|
// ALIASES
|
|
543
|
-
|
|
543
|
+
ne("date","D"),
|
|
544
544
|
// PRIORITY
|
|
545
|
-
|
|
545
|
+
oe("date",9),
|
|
546
546
|
// PARSING
|
|
547
|
-
|
|
547
|
+
xe("D",Ee),xe("DD",Ee,ve),xe("Do",(function(e,t){
|
|
548
548
|
// TODO: Remove "ordinalParse" fallback in next major release.
|
|
549
|
-
return t
|
|
549
|
+
return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ue(["D","DD"],je),Ue("Do",(function(e,t){t[je]=he(e.match(Ee)[0])}));
|
|
550
550
|
// MOMENTS
|
|
551
|
-
var
|
|
551
|
+
var es=de("Date",!0);
|
|
552
552
|
// FORMATTING
|
|
553
553
|
// HELPERS
|
|
554
554
|
// MOMENTS
|
|
555
|
-
function
|
|
555
|
+
function ts(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}
|
|
556
556
|
// FORMATTING
|
|
557
|
-
|
|
557
|
+
U("DDD",["DDDD",3],"DDDo","dayOfYear"),
|
|
558
558
|
// ALIASES
|
|
559
|
-
|
|
559
|
+
ne("dayOfYear","DDD"),
|
|
560
560
|
// PRIORITY
|
|
561
|
-
|
|
561
|
+
oe("dayOfYear",4),
|
|
562
562
|
// PARSING
|
|
563
|
-
|
|
563
|
+
xe("DDD",Me),xe("DDDD",be),Ue(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=he(e)})),U("m",["mm",2],0,"minute"),
|
|
564
564
|
// ALIASES
|
|
565
|
-
|
|
565
|
+
ne("minute","m"),
|
|
566
566
|
// PRIORITY
|
|
567
|
-
|
|
567
|
+
oe("minute",14),
|
|
568
568
|
// PARSING
|
|
569
|
-
|
|
569
|
+
xe("m",Ee),xe("mm",Ee,ve),Ue(["m","mm"],Ze);
|
|
570
570
|
// MOMENTS
|
|
571
|
-
var
|
|
571
|
+
var is=de("Minutes",!1);
|
|
572
572
|
// FORMATTING
|
|
573
|
-
|
|
573
|
+
U("s",["ss",2],0,"second"),
|
|
574
574
|
// ALIASES
|
|
575
|
-
|
|
575
|
+
ne("second","s"),
|
|
576
576
|
// PRIORITY
|
|
577
|
-
|
|
577
|
+
oe("second",15),
|
|
578
578
|
// PARSING
|
|
579
|
-
|
|
579
|
+
xe("s",Ee),xe("ss",Ee,ve),Ue(["s","ss"],Xe);
|
|
580
580
|
// MOMENTS
|
|
581
|
-
var
|
|
581
|
+
var ns,rs,ss=de("Seconds",!1);
|
|
582
582
|
// FORMATTING
|
|
583
|
-
for(
|
|
583
|
+
for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),
|
|
584
584
|
// ALIASES
|
|
585
|
-
|
|
585
|
+
ne("millisecond","ms"),
|
|
586
586
|
// PRIORITY
|
|
587
|
-
|
|
587
|
+
oe("millisecond",16),
|
|
588
588
|
// PARSING
|
|
589
|
-
|
|
589
|
+
xe("S",Me,_e),xe("SS",Me,ve),xe("SSS",Me,be),ns="SSSS";ns.length<=9;ns+="S")xe(ns,He);function as(e,t){t[Ke]=he(1e3*("0."+e))}for(ns="S";ns.length<=9;ns+="S")Ue(ns,as);
|
|
590
590
|
// MOMENTS
|
|
591
|
-
function
|
|
591
|
+
function os(){return this._isUTC?"UTC":""}function ls(){return this._isUTC?"Coordinated Universal Time":""}rs=de("Milliseconds",!1),
|
|
592
592
|
// FORMATTING
|
|
593
|
-
|
|
593
|
+
U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var us=L.prototype;function cs(e){return Xi(1e3*e)}function hs(){return Xi.apply(null,arguments).parseZone()}function ds(e){return e}us.add=xn,us.calendar=$n,us.clone=Wn,us.diff=qn,us.endOf=_r,us.format=ir,us.from=nr,us.fromNow=rr,us.to=sr,us.toNow=ar,us.get=pe,us.invalidAt=Dr,us.isAfter=Vn,us.isBefore=jn,us.isBetween=zn,us.isSame=Zn,us.isSameOrAfter=Xn,us.isSameOrBefore=Kn,us.isValid=Sr,us.lang=lr,us.locale=or,us.localeData=ur,us.max=qi,us.min=Ki,us.parsingFlags=Mr,us.set=ge,us.startOf=yr,us.subtract=Rn,us.toArray=Lr,us.toObject=Er,us.toDate=wr,us.toISOString=er,us.inspect=tr,"undefined"!=typeof Symbol&&null!=Symbol.for&&(us[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),us.toJSON=Tr,us.toString=Qn,us.unix=br,us.valueOf=vr,us.creationData=kr,us.eraName=Or,us.eraNarrow=Cr,us.eraAbbr=Nr,us.eraYear=xr,us.year=yt,us.isLeapYear=_t,us.weekYear=Vr,us.isoWeekYear=jr,us.quarter=us.quarters=Qr,us.month=ht,us.daysInMonth=dt,us.week=us.weeks=Ht,us.isoWeek=us.isoWeeks=At,us.weeksInYear=Xr,us.weeksInWeekYear=Kr,us.isoWeeksInYear=zr,us.isoWeeksInISOWeekYear=Zr,us.date=es,us.day=us.days=Vt,us.weekday=jt,us.isoWeekday=zt,us.dayOfYear=ts,us.hour=us.hours=ri,us.minute=us.minutes=is,us.second=us.seconds=ss,us.millisecond=us.milliseconds=rs,us.utcOffset=gn,us.utc=_n,us.local=vn,us.parseZone=bn,us.hasAlignedHourOffset=wn,us.isDST=Ln,us.isLocal=Tn,us.isUtcOffset=Sn,us.isUtc=Mn,us.isUTC=Mn,us.zoneAbbr=os,us.zoneName=ls,us.dates=S("dates accessor is deprecated. Use date instead.",es),us.months=S("months accessor is deprecated. Use month instead",ht),us.years=S("years accessor is deprecated. Use year instead",yt),us.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yn),us.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",En);var ms=O.prototype;function fs(e,t,i,n){var r=_i(),s=f().set(n,t);return r[i](s,e)}function ps(e,t,i){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fs(e,t,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=fs(e,n,i,"month");return r}
|
|
594
594
|
// ()
|
|
595
595
|
// (5)
|
|
596
596
|
// (fmt, 5)
|
|
@@ -599,34 +599,34 @@ I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var us=T.prototype;function hs(t){r
|
|
|
599
599
|
// (true, 5)
|
|
600
600
|
// (true, fmt, 5)
|
|
601
601
|
// (true, fmt)
|
|
602
|
-
function gs(t,
|
|
602
|
+
function gs(e,t,i,n){"boolean"==typeof e?(c(t)&&(i=t,t=void 0),t=t||""):(i=t=e,e=!1,c(t)&&(i=t,t=void 0),t=t||"");var r,s=_i(),a=e?s._week.dow:0,o=[];if(null!=i)return fs(t,(i+a)%7,n,"day");for(r=0;r<7;r++)o[r]=fs(t,(r+a)%7,n,"day");return o}function ys(e,t){return ps(e,t,"months")}function _s(e,t){return ps(e,t,"monthsShort")}function vs(e,t,i){return gs(e,t,i,"weekdays")}function bs(e,t,i){return gs(e,t,i,"weekdaysShort")}function ws(e,t,i){return gs(e,t,i,"weekdaysMin")}ms.calendar=N,ms.longDateFormat=z,ms.invalidDate=X,ms.ordinal=J,ms.preparse=ds,ms.postformat=ds,ms.relativeTime=ee,ms.pastFuture=te,ms.set=A,ms.eras=Hr,ms.erasParse=Ar,ms.erasConvertYear=Pr,ms.erasAbbrRegex=Br,ms.erasNameRegex=Rr,ms.erasNarrowRegex=Yr,ms.months=at,ms.monthsShort=ot,ms.monthsParse=ut,ms.monthsRegex=ft,ms.monthsShortRegex=mt,ms.week=St,ms.firstDayOfYear=kt,ms.firstDayOfWeek=Dt,ms.weekdays=Ut,ms.weekdaysMin=Gt,ms.weekdaysShort=Ft,ms.weekdaysParse=Wt,ms.weekdaysRegex=Zt,ms.weekdaysShortRegex=Xt,ms.weekdaysMinRegex=Kt,ms.isPM=ii,ms.meridiem=si,pi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===he(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),
|
|
603
603
|
// Side effect imports
|
|
604
|
-
|
|
604
|
+
n.lang=S("moment.lang is deprecated. Use moment.locale instead.",pi),n.langData=S("moment.langData is deprecated. Use moment.localeData instead.",_i);var Ls=Math.abs;function Es(){var e=this._data;return this._milliseconds=Ls(this._milliseconds),this._days=Ls(this._days),this._months=Ls(this._months),e.milliseconds=Ls(e.milliseconds),e.seconds=Ls(e.seconds),e.minutes=Ls(e.minutes),e.hours=Ls(e.hours),e.months=Ls(e.months),e.years=Ls(e.years),this}function Ts(e,t,i,n){var r=Hn(t,i);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}
|
|
605
605
|
// supports only 2.0-style add(1, 's') or add(duration)
|
|
606
|
-
function
|
|
606
|
+
function Ss(e,t){return Ts(this,e,t,1)}
|
|
607
607
|
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
|
608
|
-
function Ms(t
|
|
608
|
+
function Ms(e,t){return Ts(this,e,t,-1)}function Ds(e){return e<0?Math.floor(e):Math.ceil(e)}function ks(){var e,t,i,n,r,s=this._milliseconds,a=this._days,o=this._months,l=this._data;
|
|
609
609
|
// if we have a mix of positive and negative values, bubble down first
|
|
610
610
|
// check: https://github.com/moment/moment/issues/2166
|
|
611
|
-
return s>=0&&
|
|
611
|
+
return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*Ds(As(o)+a),a=0,o=0),
|
|
612
612
|
// The following code bubbles up values, see the tests for
|
|
613
613
|
// examples of what that means.
|
|
614
|
-
l.milliseconds=s%1e3,
|
|
614
|
+
l.milliseconds=s%1e3,e=ce(s/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,i=ce(t/60),l.hours=i%24,a+=ce(i/24),o+=
|
|
615
615
|
// convert days to months
|
|
616
|
-
r=
|
|
616
|
+
r=ce(Hs(a)),a-=Ds(As(r)),
|
|
617
617
|
// 12 months -> 1 year
|
|
618
|
-
|
|
618
|
+
n=ce(o/12),o%=12,l.days=a,l.months=o,l.years=n,this}function Hs(e){
|
|
619
619
|
// 400 years have 146097 days (taking into account leap year rules)
|
|
620
620
|
// 400 years have 12 months === 4800
|
|
621
|
-
return 4800*
|
|
621
|
+
return 4800*e/146097}function As(e){
|
|
622
622
|
// the reverse of daysToMonths
|
|
623
|
-
return 146097*
|
|
623
|
+
return 146097*e/4800}function Ps(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+Hs(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(
|
|
624
624
|
// handle milliseconds separately because of floating point math errors (issue #1867)
|
|
625
|
-
|
|
625
|
+
t=this._days+Math.round(As(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;
|
|
626
626
|
// Math.floor prevents floating point math errors here
|
|
627
|
-
case"millisecond":return Math.floor(864e5*
|
|
627
|
+
case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}
|
|
628
628
|
// TODO: Use this.as('ms')?
|
|
629
|
-
function Os(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*
|
|
629
|
+
function Os(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*he(this._months/12):NaN}function Cs(e){return function(){return this.as(e)}}var Ns=Cs("ms"),xs=Cs("s"),Rs=Cs("m"),Bs=Cs("h"),Ys=Cs("d"),Is=Cs("w"),Us=Cs("M"),Fs=Cs("Q"),Gs=Cs("y");function $s(){return Hn(this)}function Ws(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Vs(e){return function(){return this.isValid()?this._data[e]:NaN}}var js=Vs("milliseconds"),zs=Vs("seconds"),Zs=Vs("minutes"),Xs=Vs("hours"),Ks=Vs("days"),qs=Vs("months"),Js=Vs("years");function Qs(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,// a few seconds to seconds
|
|
630
630
|
s:45,// seconds to minute
|
|
631
631
|
m:45,// minutes to hour
|
|
632
632
|
h:22,// hours to day
|
|
@@ -634,11 +634,11 @@ d:26,// days to month/week
|
|
|
634
634
|
w:null,// weeks to month
|
|
635
635
|
M:11};
|
|
636
636
|
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
|
637
|
-
function
|
|
637
|
+
function ia(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}function na(e,t,i,n){var r=Hn(e).abs(),s=ea(r.as("s")),a=ea(r.as("m")),o=ea(r.as("h")),l=ea(r.as("d")),u=ea(r.as("M")),c=ea(r.as("w")),h=ea(r.as("y")),d=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||a<=1&&["m"]||a<i.m&&["mm",a]||o<=1&&["h"]||o<i.h&&["hh",o]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(d=d||c<=1&&["w"]||c<i.w&&["ww",c]),(d=d||u<=1&&["M"]||u<i.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=n,ia.apply(null,d)}
|
|
638
638
|
// This function allows you to set the rounding function for relative time strings
|
|
639
|
-
function
|
|
639
|
+
function ra(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}
|
|
640
640
|
// This function allows you to set a threshold for relative time strings
|
|
641
|
-
function
|
|
641
|
+
function sa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var i,n,r=!1,s=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(s=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=na(this,!r,s,i=this.localeData()),r&&(n=i.pastFuture(+this,n)),i.postformat(n)}var oa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ua(){
|
|
642
642
|
// for ISO strings we do not use the normal bubbling rules:
|
|
643
643
|
// * milliseconds bubble up until they become hours
|
|
644
644
|
// * days do not bubble at all
|
|
@@ -646,21 +646,21 @@ function so(t,e){return void 0!==eo[t]&&(void 0===e?eo[t]:(eo[t]=e,"s"===t&&(eo.
|
|
|
646
646
|
// This is because there is no context-free conversion between hours and days
|
|
647
647
|
// (think of clock changes)
|
|
648
648
|
// and also not between days and months (28-31 days per month)
|
|
649
|
-
if(!this.isValid())return this.localeData().invalidDate();var t,
|
|
649
|
+
if(!this.isValid())return this.localeData().invalidDate();var e,t,i,n,r,s,a,o,l=oa(this._milliseconds)/1e3,u=oa(this._days),c=oa(this._months),h=this.asSeconds();return h?(
|
|
650
650
|
// 3600 seconds -> 60 minutes -> 1 hour
|
|
651
|
-
|
|
651
|
+
e=ce(l/60),t=ce(e/60),l%=60,e%=60,
|
|
652
652
|
// 12 months -> 1 year
|
|
653
|
-
|
|
653
|
+
i=ce(c/12),c%=12,
|
|
654
654
|
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
|
|
655
|
-
|
|
655
|
+
n=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=h<0?"-":"",s=la(this._months)!==la(h)?"-":"",a=la(this._days)!==la(h)?"-":"",o=la(this._milliseconds)!==la(h)?"-":"",r+"P"+(i?s+i+"Y":"")+(c?s+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+n+"S":"")):"P0D"}var ca=on.prototype;return ca.isValid=sn,ca.abs=Es,ca.add=Ss,ca.subtract=Ms,ca.as=Ps,ca.asMilliseconds=Ns,ca.asSeconds=xs,ca.asMinutes=Rs,ca.asHours=Bs,ca.asDays=Ys,ca.asWeeks=Is,ca.asMonths=Us,ca.asQuarters=Fs,ca.asYears=Gs,ca.valueOf=Os,ca._bubble=ks,ca.clone=$s,ca.get=Ws,ca.milliseconds=js,ca.seconds=zs,ca.minutes=Zs,ca.hours=Xs,ca.days=Ks,ca.weeks=Qs,ca.months=qs,ca.years=Js,ca.humanize=aa,ca.toISOString=ua,ca.toString=ua,ca.toJSON=ua,ca.locale=or,ca.localeData=ur,ca.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ca.lang=lr,
|
|
656
656
|
// FORMATTING
|
|
657
|
-
|
|
657
|
+
U("X",0,0,"unix"),U("x",0,0,"valueOf"),
|
|
658
658
|
// PARSING
|
|
659
|
-
|
|
659
|
+
xe("x",Ae),xe("X",Ce),Ue("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e))})),Ue("x",(function(e,t,i){i._d=new Date(he(e))})),
|
|
660
660
|
//! moment.js
|
|
661
|
-
|
|
661
|
+
n.version="2.29.4",r(Xi),n.fn=us,n.min=Qi,n.max=en,n.now=tn,n.utc=f,n.unix=cs,n.months=ys,n.isDate=h,n.locale=pi,n.invalid=_,n.duration=Hn,n.isMoment=E,n.weekdays=vs,n.parseZone=hs,n.localeData=_i,n.isDuration=ln,n.monthsShort=_s,n.weekdaysMin=ws,n.defineLocale=gi,n.updateLocale=yi,n.locales=vi,n.weekdaysShort=bs,n.normalizeUnits=re,n.relativeTimeRounding=ra,n.relativeTimeThreshold=sa,n.calendarFormat=Gn,n.prototype=us,
|
|
662
662
|
// currently HTML5 input type only supports 24-hour formats
|
|
663
|
-
|
|
663
|
+
n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",// <input type="datetime-local" />
|
|
664
664
|
DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",// <input type="datetime-local" step="1" />
|
|
665
665
|
DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",// <input type="datetime-local" step="0.001" />
|
|
666
666
|
DATE:"YYYY-MM-DD",// <input type="date" />
|
|
@@ -668,7 +668,7 @@ TIME:"HH:mm",// <input type="time" />
|
|
|
668
668
|
TIME_SECONDS:"HH:mm:ss",// <input type="time" step="1" />
|
|
669
669
|
TIME_MS:"HH:mm:ss.SSS",// <input type="time" step="0.001" />
|
|
670
670
|
WEEK:"GGGG-[W]WW",// <input type="week" />
|
|
671
|
-
MONTH:"YYYY-MM"},
|
|
671
|
+
MONTH:"YYYY-MM"},n}()}));const V=[];
|
|
672
672
|
/**
|
|
673
673
|
* Creates a `Readable` store that allows reading by subscription.
|
|
674
674
|
* @param value initial value
|
|
@@ -679,123 +679,123 @@ MONTH:"YYYY-MM"},i}()}));const $=[];
|
|
|
679
679
|
* @param {*=}value initial value
|
|
680
680
|
* @param {StartStopNotifier=} start
|
|
681
681
|
*/
|
|
682
|
-
function
|
|
683
|
-
const
|
|
682
|
+
function j(t,i=e){let n;const r=new Set;function a(e){if(s(t,e)&&(t=e,n)){// store is ready
|
|
683
|
+
const e=!V.length;for(const e of r)e[1](),V.push(e,t);if(e){for(let e=0;e<V.length;e+=2)V[e][0](V[e+1]);V.length=0}}}return{set:a,update:function(e){a(e(t))},subscribe:function(s,o=e){const l=[s,o];return r.add(l),1===r.size&&(n=i(a)||e),s(t),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function z(t,i,s){const a=!Array.isArray(t),o=a?[t]:t,l=i.length<2;return c=t=>{let s=!1;const c=[];let h=0,d=e;const m=()=>{if(h)return;d();const n=i(a?c[0]:c,t);l?t(n):d=r(n)?n:e},f=o.map(((e,t)=>u(e,(e=>{c[t]=e,h&=~(1<<t),s&&m()}),(()=>{h|=1<<t}))));return s=!0,m(),function(){n(f),d(),
|
|
684
684
|
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
685
685
|
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
686
686
|
// invoke this derived store.
|
|
687
|
-
s=!1}},{subscribe:
|
|
687
|
+
s=!1}},{subscribe:j(s,c).subscribe};var c}var Z=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===X}(e)}
|
|
688
688
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
689
|
-
(
|
|
689
|
+
(e)};var X="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function K(e,t){return!1!==t.clone&&t.isMergeableObject(e)?te((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function q(e,t,i){return e.concat(t).map((function(e){return K(e,i)}))}function J(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Q(e,t){try{return t in e}catch(e){return!1}}
|
|
690
690
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
691
|
-
function
|
|
692
|
-
})(
|
|
691
|
+
function ee(e,t,i){var n={};return i.isMergeableObject(e)&&J(e).forEach((function(t){n[t]=K(e[t],i)})),J(t).forEach((function(r){(function(e,t){return Q(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
|
692
|
+
})(e,r)||(Q(e,r)&&i.isMergeableObject(t[r])?n[r]=function(e,t){if(!t.customMerge)return te;var i=t.customMerge(e);return"function"==typeof i?i:te}(r,i)(e[r],t[r],i):n[r]=K(t[r],i))})),n}function te(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||q,i.isMergeableObject=i.isMergeableObject||Z,
|
|
693
693
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
694
694
|
// implementations can use it. The caller may not replace it.
|
|
695
|
-
|
|
695
|
+
i.cloneUnlessOtherwiseSpecified=K;var n=Array.isArray(t);return n===Array.isArray(e)?n?i.arrayMerge(e,t,i):ee(e,t,i):K(t,i)}te.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return te(e,i,t)}),{})};var ie=te,ne=function(e,t){return ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},ne(e,t)};function re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}ne(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var se,ae,oe,le=function(){return le=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},le.apply(this,arguments)};function ue(e,t,i){if(i||2===arguments.length)for(var n,r=0,s=t.length;r<s;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}
|
|
696
696
|
/**
|
|
697
697
|
* Type Guards
|
|
698
698
|
*/
|
|
699
|
-
function
|
|
699
|
+
function ce(e){return e.type===ae.literal}function he(e){return e.type===ae.argument}function de(e){return e.type===ae.number}function me(e){return e.type===ae.date}function fe(e){return e.type===ae.time}function pe(e){return e.type===ae.select}function ge(e){return e.type===ae.plural}function ye(e){return e.type===ae.pound}function _e(e){return e.type===ae.tag}function ve(e){return!(!e||"object"!=typeof e||e.type!==oe.number)}function be(e){return!(!e||"object"!=typeof e||e.type!==oe.dateTime)}
|
|
700
700
|
// @generated from regex-gen.ts
|
|
701
|
-
"function"==typeof SuppressedError&&SuppressedError,function(
|
|
701
|
+
"function"==typeof SuppressedError&&SuppressedError,function(e){
|
|
702
702
|
/** Argument is unclosed (e.g. `{0`) */
|
|
703
|
-
|
|
703
|
+
e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
|
704
704
|
/** Argument is empty (e.g. `{}`). */
|
|
705
|
-
|
|
705
|
+
e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
|
706
706
|
/** Argument is malformed (e.g. `{foo!}``) */
|
|
707
|
-
|
|
707
|
+
e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
|
708
708
|
/** Expect an argument type (e.g. `{foo,}`) */
|
|
709
|
-
|
|
709
|
+
e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
|
710
710
|
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
|
711
|
-
|
|
711
|
+
e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
|
712
712
|
/** Expect an argument style (e.g. `{foo, number, }`) */
|
|
713
|
-
|
|
713
|
+
e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
|
714
714
|
/** The number skeleton is invalid. */
|
|
715
|
-
|
|
715
|
+
e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
|
716
716
|
/** The date time skeleton is invalid. */
|
|
717
|
-
|
|
717
|
+
e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
|
718
718
|
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
|
719
|
-
|
|
719
|
+
e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
|
720
720
|
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
|
721
|
-
|
|
721
|
+
e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
|
722
722
|
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
|
723
|
-
|
|
723
|
+
e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
|
724
724
|
/** Missing select argument options (e.g. `{foo, select}`) */
|
|
725
|
-
|
|
725
|
+
e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
|
726
726
|
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
|
727
|
-
|
|
727
|
+
e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
728
728
|
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
|
729
|
-
|
|
729
|
+
e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
730
730
|
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
|
731
|
-
|
|
731
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
|
732
732
|
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
|
733
|
-
|
|
733
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
|
734
734
|
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
|
735
|
-
|
|
735
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
|
736
736
|
/**
|
|
737
737
|
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
|
738
738
|
* (e.g. `{foo, plural, one}`)
|
|
739
739
|
*/
|
|
740
|
-
|
|
740
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
|
741
741
|
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
|
742
|
-
|
|
742
|
+
e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
|
743
743
|
/**
|
|
744
744
|
* Duplicate selectors in `plural` or `selectordinal` argument.
|
|
745
745
|
* (e.g. {foo, plural, one {#} one {#}})
|
|
746
746
|
*/
|
|
747
|
-
|
|
747
|
+
e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
|
748
748
|
/** Duplicate selectors in `select` argument.
|
|
749
749
|
* (e.g. {foo, select, apple {apple} apple {apple}})
|
|
750
750
|
*/
|
|
751
|
-
|
|
751
|
+
e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
|
752
752
|
/** Plural or select argument option must have `other` clause. */
|
|
753
|
-
|
|
753
|
+
e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
|
754
754
|
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
|
755
|
-
|
|
755
|
+
e[e.INVALID_TAG=23]="INVALID_TAG",
|
|
756
756
|
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
|
757
|
-
|
|
757
|
+
e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
758
758
|
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
759
|
-
|
|
759
|
+
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
760
760
|
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
761
|
-
|
|
761
|
+
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(se||(se={})),function(e){
|
|
762
762
|
/**
|
|
763
763
|
* Raw text
|
|
764
764
|
*/
|
|
765
|
-
|
|
765
|
+
e[e.literal=0]="literal",
|
|
766
766
|
/**
|
|
767
767
|
* Variable w/o any format, e.g `var` in `this is a {var}`
|
|
768
768
|
*/
|
|
769
|
-
|
|
769
|
+
e[e.argument=1]="argument",
|
|
770
770
|
/**
|
|
771
771
|
* Variable w/ number format
|
|
772
772
|
*/
|
|
773
|
-
|
|
773
|
+
e[e.number=2]="number",
|
|
774
774
|
/**
|
|
775
775
|
* Variable w/ date format
|
|
776
776
|
*/
|
|
777
|
-
|
|
777
|
+
e[e.date=3]="date",
|
|
778
778
|
/**
|
|
779
779
|
* Variable w/ time format
|
|
780
780
|
*/
|
|
781
|
-
|
|
781
|
+
e[e.time=4]="time",
|
|
782
782
|
/**
|
|
783
783
|
* Variable w/ select format
|
|
784
784
|
*/
|
|
785
|
-
|
|
785
|
+
e[e.select=5]="select",
|
|
786
786
|
/**
|
|
787
787
|
* Variable w/ plural format
|
|
788
788
|
*/
|
|
789
|
-
|
|
789
|
+
e[e.plural=6]="plural",
|
|
790
790
|
/**
|
|
791
791
|
* Only possible within plural argument.
|
|
792
792
|
* This is the `#` symbol that will be substituted with the count.
|
|
793
793
|
*/
|
|
794
|
-
|
|
794
|
+
e[e.pound=7]="pound",
|
|
795
795
|
/**
|
|
796
796
|
* XML-like tag
|
|
797
797
|
*/
|
|
798
|
-
|
|
798
|
+
e[e.tag=8]="tag"}(ae||(ae={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(oe||(oe={}));var we=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Le=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
799
799
|
/**
|
|
800
800
|
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
801
801
|
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
@@ -807,67 +807,67 @@ t[t.tag=8]="tag"}(rt||(rt={})),function(t){t[t.number=0]="number",t[t.dateTime=1
|
|
|
807
807
|
* @public
|
|
808
808
|
* @param skeleton skeleton string
|
|
809
809
|
*/
|
|
810
|
-
function
|
|
810
|
+
function Ee(e){var t={};return e.replace(Le,(function(e){var i=e.length;switch(e[0]){
|
|
811
811
|
// Era
|
|
812
|
-
case"G":
|
|
812
|
+
case"G":t.era=4===i?"long":5===i?"narrow":"short";break;
|
|
813
813
|
// Year
|
|
814
|
-
case"y":
|
|
814
|
+
case"y":t.year=2===i?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
815
815
|
// Quarter
|
|
816
816
|
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
817
817
|
// Month
|
|
818
|
-
case"M":case"L":
|
|
818
|
+
case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;
|
|
819
819
|
// Week
|
|
820
|
-
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":
|
|
820
|
+
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
821
821
|
// Weekday
|
|
822
|
-
case"E":
|
|
822
|
+
case"E":t.weekday=4===i?"short":5===i?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;
|
|
823
823
|
// Period
|
|
824
824
|
case"a":// AM, PM
|
|
825
|
-
|
|
825
|
+
t.hour12=!0;break;case"b":// am, pm, noon, midnight
|
|
826
826
|
case"B":// flexible day periods
|
|
827
827
|
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
828
828
|
// Hour
|
|
829
|
-
case"h":
|
|
829
|
+
case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
830
830
|
// Minute
|
|
831
|
-
case"m":
|
|
831
|
+
case"m":t.minute=["numeric","2-digit"][i-1];break;
|
|
832
832
|
// Second
|
|
833
|
-
case"s":
|
|
833
|
+
case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
834
834
|
// Zone
|
|
835
835
|
case"z":// 1..3, 4: specific non-location format
|
|
836
|
-
|
|
836
|
+
t.timeZoneName=i<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
|
837
837
|
case"O":// 1, 4: miliseconds in day short, long
|
|
838
838
|
case"v":// 1, 4: generic non-location format
|
|
839
839
|
case"V":// 1, 2, 3, 4: time zone ID or city
|
|
840
840
|
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
841
841
|
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
842
|
-
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),
|
|
842
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
|
843
843
|
// @generated from regex-gen.ts
|
|
844
|
-
var
|
|
844
|
+
var Te=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Se=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Me=/^(@+)?(\+|#+)?[rs]?$/g,De=/(\*)(0+)|(#+)(0+)|(0+)/g,ke=/^(0+)$/;function He(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Me,(function(e,i,n){
|
|
845
845
|
// @@@ case
|
|
846
|
-
return"string"!=typeof
|
|
846
|
+
return"string"!=typeof n?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):"+"===n?t.minimumSignificantDigits=i.length:"#"===i[0]?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+("string"==typeof n?n.length:0)),""})),t}function Ae(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Pe(e){
|
|
847
847
|
// Engineering
|
|
848
|
-
var
|
|
848
|
+
var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var i=e.slice(0,2);if("+!"===i?(t.signDisplay="always",e=e.slice(2)):"+?"===i&&(t.signDisplay="exceptZero",e=e.slice(2)),!ke.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Oe(e){var t=Ae(e);return t||{}}
|
|
849
849
|
/**
|
|
850
850
|
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
851
|
-
*/function
|
|
851
|
+
*/function Ce(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=le(le(le({},t),{notation:"scientific"}),r.options.reduce((function(e,t){return le(le({},e),Oe(t))}),{}));continue;case"engineering":t=le(le(le({},t),{notation:"engineering"}),r.options.reduce((function(e,t){return le(le({},e),Oe(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
|
852
852
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
853
|
-
case"unit-width-narrow":
|
|
853
|
+
case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;
|
|
854
854
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
855
|
-
case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(
|
|
855
|
+
case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(De,(function(e,i,n,r,s,a){if(i)t.minimumIntegerDigits=n.length;else{if(r&&s)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
|
856
856
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
857
|
-
if(
|
|
857
|
+
if(ke.test(r.stem))t.minimumIntegerDigits=r.stem.length;else if(Se.test(r.stem)){
|
|
858
858
|
// Precision
|
|
859
859
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
860
860
|
// precision-integer case
|
|
861
|
-
if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(
|
|
861
|
+
if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Se,(function(e,i,n,r,s,a){
|
|
862
862
|
// .000* case (before ICU67 it was .000+)
|
|
863
|
-
return"*"===
|
|
863
|
+
return"*"===n?t.minimumFractionDigits=i.length:r&&"#"===r[0]?t.maximumFractionDigits=r.length:s&&a?(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length+a.length):(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length),""}));var s=r.options[0];
|
|
864
864
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
865
|
-
"w"===s?
|
|
865
|
+
"w"===s?t=le(le({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=le(le({},t),He(s)))}
|
|
866
866
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
867
|
-
else if(
|
|
867
|
+
else if(Me.test(r.stem))t=le(le({},t),He(r.stem));else{var a=Ae(r.stem);a&&(t=le(le({},t),a));var o=Pe(r.stem);o&&(t=le(le({},t),o))}}return t}
|
|
868
868
|
// @generated from time-data-gen.ts
|
|
869
869
|
// prettier-ignore
|
|
870
|
-
var
|
|
870
|
+
var Ne,xe={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
|
|
871
871
|
/**
|
|
872
872
|
* Returns the best matching date time pattern if a date time skeleton
|
|
873
873
|
* pattern is provided with a locale. Follows the Unicode specification:
|
|
@@ -880,45 +880,45 @@ var Ot,Ct={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H
|
|
|
880
880
|
* of the given `locale` to the corresponding time pattern.
|
|
881
881
|
* @param locale
|
|
882
882
|
*/
|
|
883
|
-
function
|
|
883
|
+
function Re(e){var t=e.hourCycle;if(void 0===t&&
|
|
884
884
|
// @ts-ignore hourCycle(s) is not identified yet
|
|
885
|
-
|
|
885
|
+
e.hourCycles&&
|
|
886
886
|
// @ts-ignore
|
|
887
|
-
|
|
887
|
+
e.hourCycles.length&&(
|
|
888
888
|
// @ts-ignore
|
|
889
|
-
e
|
|
889
|
+
t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
890
890
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
891
|
-
var n
|
|
891
|
+
var i,n=e.language;return"root"!==n&&(i=e.maximize().region),(xe[i||""]||xe[n||""]||xe["".concat(n,"-001")]||xe["001"])[0]}var Be=new RegExp("^".concat(we.source,"*")),Ye=new RegExp("".concat(we.source,"*$"));function Ie(e,t){return{start:e,end:t}}
|
|
892
892
|
// #region Ponyfills
|
|
893
893
|
// Consolidate these variables up top for easier toggling during debugging
|
|
894
|
-
var
|
|
894
|
+
var Ue=!!String.prototype.startsWith,Fe=!!String.fromCodePoint,Ge=!!Object.fromEntries,$e=!!String.prototype.codePointAt,We=!!String.prototype.trimStart,Ve=!!String.prototype.trimEnd,je=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ze=!0;try{
|
|
895
895
|
/**
|
|
896
896
|
* legacy Edge or Xbox One browser
|
|
897
897
|
* Unicode flag support: supported
|
|
898
898
|
* Pattern_Syntax support: not supported
|
|
899
899
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
900
900
|
*/
|
|
901
|
-
|
|
902
|
-
function(t,
|
|
903
|
-
function(t,
|
|
904
|
-
function(){for(var
|
|
901
|
+
ze="a"===(null===(Ne=tt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Ne?void 0:Ne[0])}catch(e){ze=!1}var Ze,Xe=Ue?// Native
|
|
902
|
+
function(e,t,i){return e.startsWith(t,i)}:// For IE11
|
|
903
|
+
function(e,t,i){return e.slice(i,i+t.length)===t},Ke=Fe?String.fromCodePoint:// IE11
|
|
904
|
+
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i,n="",r=e.length,s=0;r>s;){if((i=e[s++])>1114111)throw RangeError(i+" is not a valid code point");n+=i<65536?String.fromCharCode(i):String.fromCharCode(55296+((i-=65536)>>10),i%1024+56320)}return n},qe=
|
|
905
905
|
// native
|
|
906
|
-
|
|
907
|
-
function(
|
|
908
|
-
function(t
|
|
909
|
-
function(t
|
|
910
|
-
function(
|
|
911
|
-
function(
|
|
912
|
-
function(
|
|
913
|
-
function(
|
|
906
|
+
Ge?Object.fromEntries:// Ponyfill
|
|
907
|
+
function(e){for(var t={},i=0,n=e;i<n.length;i++){var r=n[i],s=r[0],a=r[1];t[s]=a}return t},Je=$e?// Native
|
|
908
|
+
function(e,t){return e.codePointAt(t)}:// IE 11
|
|
909
|
+
function(e,t){var i=e.length;if(!(t<0||t>=i)){var n,r=e.charCodeAt(t);return r<55296||r>56319||t+1===i||(n=e.charCodeAt(t+1))<56320||n>57343?r:n-56320+(r-55296<<10)+65536}},Qe=We?// Native
|
|
910
|
+
function(e){return e.trimStart()}:// Ponyfill
|
|
911
|
+
function(e){return e.replace(Be,"")},et=Ve?// Native
|
|
912
|
+
function(e){return e.trimEnd()}:// Ponyfill
|
|
913
|
+
function(e){return e.replace(Ye,"")};
|
|
914
914
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
915
|
-
function
|
|
915
|
+
function tt(e,t){return new RegExp(e,t)}
|
|
916
916
|
// #endregion
|
|
917
|
-
if(
|
|
917
|
+
if(ze){
|
|
918
918
|
// Native
|
|
919
|
-
var
|
|
919
|
+
var it=tt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ze=function(e,t){var i;return it.lastIndex=t,null!==(i=it.exec(e)[1])&&void 0!==i?i:""}}else
|
|
920
920
|
// IE11
|
|
921
|
-
|
|
921
|
+
Ze=function(e,t){for(var i=[];;){var n=Je(e,t);if(void 0===n||st(n)||at(n))break;i.push(n),t+=n>=65536?2:1}return Ke.apply(void 0,i)};var nt=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,i){for(var n=[];!this.isEOF();){var r=this.char();if(123/* `{` */===r){if((s=this.parseArgument(e,i)).err)return s;n.push(s.val)}else{if(125/* `}` */===r&&e>0)break;if(35/* `#` */!==r||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===r&&!this.ignoreTag&&47===this.peek()){if(i)break;return this.error(se.UNMATCHED_CLOSING_TAG,Ie(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===r&&!this.ignoreTag&&rt(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;n.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;n.push(s.val)}}else{var a=this.clonePosition();this.bump(),n.push({type:ae.pound,location:Ie(a,this.clonePosition())})}}}return{val:n,err:null}},
|
|
922
922
|
/**
|
|
923
923
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
924
924
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -937,24 +937,24 @@ Wt=function(t,e){for(var n=[];;){var i=Kt(t,e);if(void 0===i||ie(i)||re(i))break
|
|
|
937
937
|
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
|
938
938
|
* since other tag-based engines like React allow it
|
|
939
939
|
*/
|
|
940
|
-
|
|
941
|
-
var
|
|
940
|
+
e.prototype.parseTag=function(e,t){var i=this.clonePosition();this.bump();// `<`
|
|
941
|
+
var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
942
942
|
// Self closing tag
|
|
943
|
-
return{val:{type:
|
|
943
|
+
return{val:{type:ae.literal,value:"<".concat(n,"/>"),location:Ie(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var r=this.parseMessage(e+1,t,!0);if(r.err)return r;var s=r.val,a=this.clonePosition();
|
|
944
944
|
// Expecting a close tag
|
|
945
|
-
if(this.bumpIf("</")){if(this.isEOF()||!
|
|
945
|
+
if(this.bumpIf("</")){if(this.isEOF()||!rt(this.char()))return this.error(se.INVALID_TAG,Ie(a,this.clonePosition()));var o=this.clonePosition();return n!==this.parseTagName()?this.error(se.UNMATCHED_CLOSING_TAG,Ie(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ae.tag,value:n,children:s,location:Ie(i,this.clonePosition())},err:null}:this.error(se.INVALID_TAG,Ie(a,this.clonePosition())))}return this.error(se.UNCLOSED_TAG,Ie(i,this.clonePosition()))}return this.error(se.INVALID_TAG,Ie(i,this.clonePosition()))},
|
|
946
946
|
/**
|
|
947
947
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
948
948
|
*/
|
|
949
|
-
|
|
950
|
-
for(this.bump();!this.isEOF()&&(45/* '-' */===(
|
|
949
|
+
e.prototype.parseTagName=function(){var e,t=this.offset();// the first tag name character
|
|
950
|
+
for(this.bump();!this.isEOF()&&(45/* '-' */===(e=this.char())||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var i=this.clonePosition(),n="";;){var r=this.tryParseQuote(t);if(r)n+=r;else{var s=this.tryParseUnquoted(e,t);if(s)n+=s;else{var a=this.tryParseLeftAngleBracket();if(!a)break;n+=a}}}var o=Ie(i,this.clonePosition());return{val:{type:ae.literal,value:n,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(rt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
|
951
951
|
/** See `parseTag` function docs. */},
|
|
952
952
|
/**
|
|
953
953
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
954
954
|
* a character that requires quoting (that is, "only where needed"), and works the same in
|
|
955
955
|
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
|
956
956
|
*/
|
|
957
|
-
|
|
957
|
+
e.prototype.tryParseQuote=function(e){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
|
958
958
|
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
|
959
959
|
// Check if is valid escaped character
|
|
960
960
|
switch(this.peek()){case 39/* `'` */:
|
|
@@ -962,74 +962,74 @@ switch(this.peek()){case 39/* `'` */:
|
|
|
962
962
|
return this.bump(),this.bump(),"'";
|
|
963
963
|
// '{', '<', '>', '}'
|
|
964
964
|
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
|
965
|
-
if("plural"===
|
|
966
|
-
var
|
|
965
|
+
if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();// apostrophe
|
|
966
|
+
var t=[this.char()];// escaped char
|
|
967
967
|
// read chars until the optional closing apostrophe is found
|
|
968
|
-
for(this.bump();!this.isEOF();){var
|
|
968
|
+
for(this.bump();!this.isEOF();){var i=this.char();if(39/* `'` */===i){if(39/* `'` */!==this.peek()){
|
|
969
969
|
// Optional closing apostrophe.
|
|
970
|
-
this.bump();break}
|
|
970
|
+
this.bump();break}t.push(39),
|
|
971
971
|
// Bump one more time because we need to skip 2 characters.
|
|
972
|
-
this.bump()}else
|
|
973
|
-
this.bumpSpace(),this.isEOF())return this.error(
|
|
972
|
+
this.bump()}else t.push(i);this.bump()}return Ke.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var i=this.char();return 60/* `<` */===i||123/* `{` */===i||35/* `#` */===i&&("plural"===t||"selectordinal"===t)||125/* `}` */===i&&e>0?null:(this.bump(),Ke(i))},e.prototype.parseArgument=function(e,t){var i=this.clonePosition();if(this.bump(),// `{`
|
|
973
|
+
this.bumpSpace(),this.isEOF())return this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(i,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(se.EMPTY_ARGUMENT,Ie(i,this.clonePosition()));
|
|
974
974
|
// argument name
|
|
975
|
-
var
|
|
975
|
+
var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(se.MALFORMED_ARGUMENT,Ie(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(i,this.clonePosition()));switch(this.char()){
|
|
976
976
|
// Simple argument: `{name}`
|
|
977
977
|
case 125/* `}` */:// `}`
|
|
978
|
-
return this.bump(),{val:{type:
|
|
978
|
+
return this.bump(),{val:{type:ae.argument,
|
|
979
979
|
// value does not include the opening and closing braces.
|
|
980
|
-
value:
|
|
980
|
+
value:n,location:Ie(i,this.clonePosition())},err:null};
|
|
981
981
|
// Argument with options: `{name, format, ...}`
|
|
982
982
|
case 44/* `,` */:return this.bump(),// `,`
|
|
983
|
-
this.bumpSpace(),this.isEOF()?this.error(
|
|
983
|
+
this.bumpSpace(),this.isEOF()?this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(i,this.clonePosition())):this.parseArgumentOptions(e,t,n,i);default:return this.error(se.MALFORMED_ARGUMENT,Ie(i,this.clonePosition()))}},
|
|
984
984
|
/**
|
|
985
985
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
986
986
|
* an identifier character. Return an empty string otherwise.
|
|
987
987
|
*/
|
|
988
|
-
|
|
988
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),i=Ze(this.message,t),n=t+i.length;return this.bumpTo(n),{value:i,location:Ie(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,i,n){var r,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();
|
|
989
989
|
// Parse this range:
|
|
990
990
|
// {name, type, style}
|
|
991
991
|
// ^---^
|
|
992
|
-
switch(
|
|
992
|
+
switch(a){case"":
|
|
993
993
|
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
994
|
-
return this.error(
|
|
994
|
+
return this.error(se.EXPECT_ARGUMENT_TYPE,Ie(s,o));case"number":case"date":case"time":
|
|
995
995
|
// Parse this range:
|
|
996
996
|
// {name, number, style}
|
|
997
997
|
// ^-------^
|
|
998
|
-
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(m=
|
|
998
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(m=et(y.val)).length)return this.error(se.EXPECT_ARGUMENT_STYLE,Ie(this.clonePosition(),this.clonePosition()));l={style:m,styleLocation:Ie(u,this.clonePosition())}}if((_=this.tryParseArgumentClose(n)).err)return _;var c=Ie(n,this.clonePosition());
|
|
999
999
|
// Extract style or skeleton
|
|
1000
|
-
if(l&&
|
|
1000
|
+
if(l&&Xe(null==l?void 0:l.style,"::",0)){
|
|
1001
1001
|
// Skeleton starts with `::`.
|
|
1002
|
-
var
|
|
1002
|
+
var h=Qe(l.style.slice(2));if("number"===a)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:ae.number,value:i,location:c,style:y.val},err:null};if(0===h.length)return this.error(se.EXPECT_DATE_TIME_SKELETON,c);var d=h;
|
|
1003
1003
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
1004
1004
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
1005
1005
|
// for unsupported patterns.
|
|
1006
|
-
this.locale&&(d=function(t
|
|
1006
|
+
this.locale&&(d=function(e,t){for(var i="",n=0;n<e.length;n++){var r=e.charAt(n);if("j"===r){for(var s=0;n+1<e.length&&e.charAt(n+1)===r;)s++,n++;var a=1+(1&s),o=s<2?1:3+(s>>1),l=Re(t);for("H"!=l&&"k"!=l||(o=0);o-- >0;)i+="a";for(;a-- >0;)i=l+i}else i+="J"===r?"H":r}return i}(h,this.locale));var m={type:oe.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Ee(d):{}};return{val:{type:"date"===a?ae.date:ae.time,value:i,location:c,style:m},err:null}}
|
|
1007
1007
|
// Regular style or no style.
|
|
1008
|
-
return{val:{type:"number"===
|
|
1008
|
+
return{val:{type:"number"===a?ae.number:"date"===a?ae.date:ae.time,value:i,location:c,style:null!==(r=null==l?void 0:l.style)&&void 0!==r?r:null},err:null};case"plural":case"selectordinal":case"select":
|
|
1009
1009
|
// Parse this range:
|
|
1010
1010
|
// {name, plural, options}
|
|
1011
1011
|
// ^---------^
|
|
1012
|
-
var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(
|
|
1012
|
+
var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(se.EXPECT_SELECT_ARGUMENT_OPTIONS,Ie(f,le({},f)));this.bumpSpace();
|
|
1013
1013
|
// Parse offset:
|
|
1014
1014
|
// {name, plural, offset:1, options}
|
|
1015
1015
|
// ^-----^
|
|
1016
1016
|
// or the first option:
|
|
1017
1017
|
// {name, plural, one {...} other {...}}
|
|
1018
1018
|
// ^--^
|
|
1019
|
-
var p=this.parseIdentifierIfPossible(),g=0;if("select"!==
|
|
1019
|
+
var p=this.parseIdentifierIfPossible(),g=0;if("select"!==a&&"offset"===p.value){if(!this.bumpIf(":"))return this.error(se.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ie(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(se.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,se.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
|
1020
1020
|
// Parse another identifier for option parsing
|
|
1021
|
-
this.bumpSpace(),p=this.parseIdentifierIfPossible(),g=y.val}var _,v=this.tryParsePluralOrSelectOptions(
|
|
1021
|
+
this.bumpSpace(),p=this.parseIdentifierIfPossible(),g=y.val}var _,v=this.tryParsePluralOrSelectOptions(e,a,t,p);if(v.err)return v;if((_=this.tryParseArgumentClose(n)).err)return _;var b=Ie(n,this.clonePosition());return"select"===a?{val:{type:ae.select,value:i,options:qe(v.val),location:b},err:null}:{val:{type:ae.plural,value:i,options:qe(v.val),offset:g,pluralType:"plural"===a?"cardinal":"ordinal",location:b},err:null};default:return this.error(se.INVALID_ARGUMENT_TYPE,Ie(s,o))}},e.prototype.tryParseArgumentClose=function(e){
|
|
1022
1022
|
// Parse: {value, number, ::currency/GBP }
|
|
1023
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(
|
|
1023
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(se.EXPECT_ARGUMENT_CLOSING_BRACE,Ie(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
1024
1024
|
/**
|
|
1025
1025
|
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
1026
1026
|
*/
|
|
1027
|
-
|
|
1027
|
+
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
1028
1028
|
// Treat apostrophe as quoting but include it in the style part.
|
|
1029
1029
|
// Find the end of the quoted literal text.
|
|
1030
|
-
this.bump();var
|
|
1030
|
+
this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(se.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ie(i,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var i=[];try{i=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
|
1031
1031
|
// Parse the skeleton
|
|
1032
|
-
for(var
|
|
1032
|
+
for(var t=[],i=0,n=e.split(Te).filter((function(e){return e.length>0}));i<n.length;i++){var r=n[i].split("/");if(0===r.length)throw new Error("Invalid number skeleton");for(var s=r[0],a=r.slice(1),o=0,l=a;o<l.length;o++)if(0===l[o].length)throw new Error("Invalid number skeleton");t.push({stem:s,options:a})}return t}(e)}catch(e){return this.error(se.INVALID_NUMBER_SKELETON,t)}return{val:{type:oe.number,tokens:i,location:t,parsedOptions:this.shouldParseSkeletons?Ce(i):{}},err:null}},
|
|
1033
1033
|
/**
|
|
1034
1034
|
* @param nesting_level The current nesting level of messages.
|
|
1035
1035
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -1040,181 +1040,199 @@ for(var e=[],n=0,i=t.split(Tt).filter((function(t){return t.length>0}));n<i.leng
|
|
|
1040
1040
|
* between a pair of opening and closing tags. The nested message will not parse beyond
|
|
1041
1041
|
* the closing tag boundary.
|
|
1042
1042
|
*/
|
|
1043
|
-
|
|
1043
|
+
e.prototype.tryParsePluralOrSelectOptions=function(e,t,i,n){
|
|
1044
1044
|
// Parse:
|
|
1045
1045
|
// one {one apple}
|
|
1046
1046
|
// ^--^
|
|
1047
|
-
for(var r,s=!1,
|
|
1047
|
+
for(var r,s=!1,a=[],o=new Set,l=n.value,u=n.location;;){if(0===l.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
|
1048
1048
|
// Try parse `={number}` selector
|
|
1049
|
-
var
|
|
1049
|
+
var h=this.tryParseDecimalInteger(se.EXPECT_PLURAL_ARGUMENT_SELECTOR,se.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Ie(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
|
|
1050
1050
|
// Duplicate selector clauses
|
|
1051
|
-
if(
|
|
1051
|
+
if(o.has(l))return this.error("select"===t?se.DUPLICATE_SELECT_ARGUMENT_SELECTOR:se.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===l&&(s=!0),
|
|
1052
1052
|
// Parse:
|
|
1053
1053
|
// one {one apple}
|
|
1054
1054
|
// ^----------^
|
|
1055
|
-
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===
|
|
1055
|
+
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?se.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:se.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ie(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(e+1,t,i);if(m.err)return m;var f=this.tryParseArgumentClose(d);if(f.err)return f;a.push([l,{value:m.val,location:Ie(d,this.clonePosition())}]),
|
|
1056
1056
|
// Keep track of the existing selectors
|
|
1057
|
-
|
|
1057
|
+
o.add(l),
|
|
1058
1058
|
// Prep next selector clause.
|
|
1059
|
-
this.bumpSpace(),l=(r=this.parseIdentifierIfPossible()).value,u=r.location}return 0===
|
|
1059
|
+
this.bumpSpace(),l=(r=this.parseIdentifierIfPossible()).value,u=r.location}return 0===a.length?this.error("select"===t?se.EXPECT_SELECT_ARGUMENT_SELECTOR:se.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ie(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(se.MISSING_OTHER_CLAUSE,Ie(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var i=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var r=!1,s=0;!this.isEOF();){var a=this.char();if(!(a>=48/* `0` */&&a<=57/* `9` */))break;r=!0,s=10*s+(a-48),this.bump()}var o=Ie(n,this.clonePosition());return r?je(s*=i)?{val:s,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
|
1060
1060
|
// This is much faster than `Object.assign` or spread.
|
|
1061
1061
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
1062
1062
|
/**
|
|
1063
1063
|
* Return the code point at the current position of the parser.
|
|
1064
1064
|
* Throws if the index is out of bound.
|
|
1065
1065
|
*/
|
|
1066
|
-
|
|
1066
|
+
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Je(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},
|
|
1067
1067
|
/** Bump the parser to the next UTF-16 code unit. */
|
|
1068
|
-
|
|
1068
|
+
e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10/* '\n' */===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
|
1069
1069
|
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
1070
|
-
this.position.offset+=
|
|
1070
|
+
this.position.offset+=e<65536?1:2)}},
|
|
1071
1071
|
/**
|
|
1072
1072
|
* If the substring starting at the current position of the parser has
|
|
1073
1073
|
* the given prefix, then bump the parser to the character immediately
|
|
1074
1074
|
* following the prefix and return true. Otherwise, don't bump the parser
|
|
1075
1075
|
* and return false.
|
|
1076
1076
|
*/
|
|
1077
|
-
|
|
1077
|
+
e.prototype.bumpIf=function(e){if(Xe(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Bump the parser until the pattern character is found and return `true`.
|
|
1080
1080
|
* Otherwise bump to the end of the file and return `false`.
|
|
1081
1081
|
*/
|
|
1082
|
-
|
|
1082
|
+
e.prototype.bumpUntil=function(e){var t=this.offset(),i=this.message.indexOf(e,t);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},
|
|
1083
1083
|
/**
|
|
1084
1084
|
* Bump the parser to the target offset.
|
|
1085
1085
|
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
|
1086
1086
|
*/
|
|
1087
|
-
|
|
1087
|
+
e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
1088
1088
|
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
1089
|
-
|
|
1089
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&st(this.char());)this.bump()},
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
1092
1092
|
* If the input has been exhausted, then this returns null.
|
|
1093
1093
|
*/
|
|
1094
|
-
|
|
1094
|
+
e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),i=this.message.charCodeAt(t+(e>=65536?2:1));return null!=i?i:null},e}();
|
|
1095
1095
|
/**
|
|
1096
1096
|
* This check if codepoint is alphabet (lower & uppercase)
|
|
1097
1097
|
* @param codepoint
|
|
1098
1098
|
* @returns
|
|
1099
|
-
*/function
|
|
1099
|
+
*/function rt(e){return e>=97&&e<=122||e>=65&&e<=90}
|
|
1100
1100
|
/**
|
|
1101
1101
|
* Code point equivalent of regex `\p{White_Space}`.
|
|
1102
1102
|
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
1103
1103
|
*/
|
|
1104
|
-
function
|
|
1104
|
+
function st(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
1107
1107
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
1108
|
-
*/function
|
|
1108
|
+
*/function at(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function ot(e){e.forEach((function(e){if(delete e.location,pe(e)||ge(e))for(var t in e.options)delete e.options[t].location,ot(e.options[t].value);else de(e)&&ve(e.style)||(me(e)||fe(e))&&be(e.style)?delete e.style.location:_e(e)&&ot(e.children)}))}function lt(e,t){void 0===t&&(t={}),t=le({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var i=new nt(e,t).parse();if(i.err){var n=SyntaxError(se[i.err.kind]);
|
|
1109
1109
|
// @ts-expect-error Assign to error object
|
|
1110
|
-
throw
|
|
1110
|
+
throw n.location=i.err.location,
|
|
1111
1111
|
// @ts-expect-error Assign to error object
|
|
1112
|
-
|
|
1112
|
+
n.originalMessage=i.err.message,n}return(null==t?void 0:t.captureLocation)||ot(i.val),i.val}
|
|
1113
1113
|
|
|
1114
1114
|
// Main
|
|
1115
1115
|
|
|
1116
|
-
function
|
|
1116
|
+
function ut(e,t){var i=t&&t.cache?t.cache:yt,n=t&&t.serializer?t.serializer:ft;return(t&&t.strategy?t.strategy:mt)(e,{cache:i,serializer:n})}
|
|
1117
1117
|
|
|
1118
1118
|
// Strategy
|
|
1119
1119
|
|
|
1120
|
-
function
|
|
1120
|
+
function ct(e,t,i,n){var r,s=null==(r=n)||"number"==typeof r||"boolean"==typeof r?n:i(n),a=t.get(s);return void 0===a&&(a=e.call(this,n),t.set(s,a)),a}function ht(e,t,i){var n=Array.prototype.slice.call(arguments,3),r=i(n),s=t.get(r);return void 0===s&&(s=e.apply(this,n),t.set(r,s)),s}function dt(e,t,i,n,r){return i.bind(t,e,n,r)}function mt(e,t){return dt(e,this,1===e.length?ct:ht,t.cache.create(),t.serializer)}
|
|
1121
1121
|
// Serializer
|
|
1122
|
-
var
|
|
1122
|
+
var ft=function(){return JSON.stringify(arguments)};
|
|
1123
1123
|
|
|
1124
1124
|
// Cache
|
|
1125
1125
|
|
|
1126
|
-
function
|
|
1126
|
+
function pt(){this.cache=Object.create(null)}pt.prototype.get=function(e){return this.cache[e]},pt.prototype.set=function(e,t){this.cache[e]=t};var gt,yt={create:function(){
|
|
1127
1127
|
// @ts-ignore
|
|
1128
|
-
return new
|
|
1128
|
+
return new pt}},_t={variadic:function(e,t){return dt(e,this,ht,t.cache.create(),t.serializer)},monadic:function(e,t){return dt(e,this,ct,t.cache.create(),t.serializer)}};!function(e){
|
|
1129
1129
|
// When we have a placeholder but no value to format
|
|
1130
|
-
|
|
1130
|
+
e.MISSING_VALUE="MISSING_VALUE",
|
|
1131
1131
|
// When value supplied is invalid
|
|
1132
|
-
|
|
1132
|
+
e.INVALID_VALUE="INVALID_VALUE",
|
|
1133
1133
|
// When we need specific Intl API but it's not available
|
|
1134
|
-
|
|
1134
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(gt||(gt={}));var vt,bt=/** @class */function(e){function t(t,i,n){var r=e.call(this,t)||this;return r.code=i,r.originalMessage=n,r}return re(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),wt=/** @class */function(e){function t(t,i,n,r){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(i,'". Options are "').concat(Object.keys(n).join('", "'),'"'),gt.INVALID_VALUE,r)||this}return re(t,e),t}(bt),Lt=/** @class */function(e){function t(t,i,n){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(i),gt.INVALID_VALUE,n)||this}return re(t,e),t}(bt),Et=/** @class */function(e){function t(t,i){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(i,'"'),gt.MISSING_VALUE,i)||this}return re(t,e),t}(bt);function Tt(e){return"function"==typeof e}
|
|
1135
1135
|
// TODO(skeleton): add skeleton support
|
|
1136
|
-
function
|
|
1136
|
+
function St(e,t,i,n,r,s,
|
|
1137
1137
|
// For debugging
|
|
1138
|
-
|
|
1138
|
+
a){
|
|
1139
1139
|
// Hot path for straight simple msg translations
|
|
1140
|
-
if(1===
|
|
1140
|
+
if(1===e.length&&ce(e[0]))return[{type:vt.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var c=u[l];
|
|
1141
1141
|
// Exit early for string parts.
|
|
1142
|
-
if(
|
|
1142
|
+
if(ce(c))o.push({type:vt.literal,value:c.value});else
|
|
1143
1143
|
// TODO: should this part be literal type?
|
|
1144
1144
|
// Replace `#` in plural rules with the actual numeric value.
|
|
1145
|
-
if(
|
|
1145
|
+
if(ye(c))"number"==typeof s&&o.push({type:vt.literal,value:i.getNumberFormat(t).format(s)});else{var h=c.value;
|
|
1146
1146
|
// Enforce that all required values are provided by the caller.
|
|
1147
|
-
if(!r||!(
|
|
1147
|
+
if(!r||!(h in r))throw new Et(h,a);var d=r[h];if(he(c))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),o.push({type:"string"==typeof d?vt.literal:vt.object,value:d});else
|
|
1148
1148
|
// Recursively format plural and select parts' option — which can be a
|
|
1149
1149
|
// nested pattern structure. The choosing of the option to use is
|
|
1150
1150
|
// abstracted-by and delegated-to the part helper object.
|
|
1151
|
-
if(
|
|
1151
|
+
if(me(c)){var m="string"==typeof c.style?n.date[c.style]:be(c.style)?c.style.parsedOptions:void 0;o.push({type:vt.literal,value:i.getDateTimeFormat(t,m).format(d)})}else if(fe(c)){m="string"==typeof c.style?n.time[c.style]:be(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:vt.literal,value:i.getDateTimeFormat(t,m).format(d)})}else if(de(c)){(m="string"==typeof c.style?n.number[c.style]:ve(c.style)?c.style.parsedOptions:void 0)&&m.scale&&(d*=m.scale||1),o.push({type:vt.literal,value:i.getNumberFormat(t,m).format(d)})}else{if(_e(c)){var f=c.children,p=c.value,g=r[p];if(!Tt(g))throw new Lt(p,"function",a);var y=g(St(f,t,i,n,r,s).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),o.push.apply(o,y.map((function(e){return{type:"string"==typeof e?vt.literal:vt.object,value:e}})))}if(pe(c)){if(!(_=c.options[d]||c.options.other))throw new wt(c.value,d,Object.keys(c.options),a);o.push.apply(o,St(_.value,t,i,n,r))}else if(ge(c)){var _;if(!(_=c.options["=".concat(d)])){if(!Intl.PluralRules)throw new bt('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',gt.MISSING_INTL_API,a);var v=i.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));_=c.options[v]||c.options.other}if(!_)throw new wt(c.value,d,Object.keys(c.options),a);o.push.apply(o,St(_.value,t,i,n,r,d-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var i=e[e.length-1];return i&&i.type===vt.literal&&t.type===vt.literal?i.value+=t.value:e.push(t),e}),[])}(o)}
|
|
1152
1152
|
/*
|
|
1153
1153
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
1154
1154
|
Copyrights licensed under the New BSD License.
|
|
1155
1155
|
See the accompanying LICENSE file for terms.
|
|
1156
1156
|
*/
|
|
1157
1157
|
// -- MessageFormat --------------------------------------------------------
|
|
1158
|
-
function
|
|
1158
|
+
function Mt(e,t){return t?Object.keys(e).reduce((function(i,n){var r,s;return i[n]=(r=e[n],(s=t[n])?le(le(le({},r||{}),s||{}),Object.keys(r).reduce((function(e,t){return e[t]=le(le({},r[t]),s[t]||{}),e}),{})):r),i}),le({},e)):e}function Dt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,i){e[t]=i}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(vt||(vt={}));var kt=/** @class */function(){function e(t,i,n,r){var s,a=this;if(void 0===i&&(i=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);
|
|
1159
1159
|
// Hot path for straight simple msg translations
|
|
1160
|
-
if(1===
|
|
1160
|
+
if(1===t.length)return t[0].value;var i=t.reduce((function(e,t){return e.length&&t.type===vt.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return i.length<=1?i[0]||"":i},this.formatToParts=function(e){return St(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){return{locale:a.resolvedLocale.toString()}},this.getAst=function(){return a.ast},
|
|
1161
1161
|
// Defined first because it's used to build the format pattern.
|
|
1162
|
-
this.locales=
|
|
1162
|
+
this.locales=i,this.resolvedLocale=e.resolveLocale(i),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
1163
1163
|
// Parse string messages into an AST.
|
|
1164
|
-
this.ast=
|
|
1164
|
+
this.ast=e.__parse(t,{ignoreTag:null==r?void 0:r.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
1165
1165
|
// Creates a new object with the specified `formats` merged with the default
|
|
1166
1166
|
// formats.
|
|
1167
|
-
this.formats=
|
|
1167
|
+
this.formats=Mt(e.formats,n),this.formatters=r&&r.formatters||(void 0===(s=this.formatterCache)&&(s={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ut((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:Dt(s.number),strategy:_t.variadic}),getDateTimeFormat:ut((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:Dt(s.dateTime),strategy:_t.variadic}),getPluralRules:ut((function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,ue([void 0],t,!1)))}),{cache:Dt(s.pluralRules),strategy:_t.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=lt,
|
|
1168
1168
|
// Default format options used as the prototype of the `formats` provided to the
|
|
1169
1169
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
1170
1170
|
// and Intl.DateTimeFormat instances.
|
|
1171
|
-
|
|
1171
|
+
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Ht={},At=(e,t,i)=>i?(t in Ht||(Ht[t]={}),e in Ht[t]||(Ht[t][e]=i),i):i,Pt=(e,t)=>{if(null==t)return;if(t in Ht&&e in Ht[t])return Ht[t][e];const i=ii(t);for(let n=0;n<i.length;n++){const r=xt(i[n],e);if(r)return At(e,t,r)}};let Ot;const Ct=j({});function Nt(e){return e in Ot}function xt(e,t){if(!Nt(e))return null;const i=function(e){return Ot[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const i=t.split(".");let n=e;for(let e=0;e<i.length;e++)if("object"==typeof n){if(e>0){const t=i.slice(e,i.length).join(".");if(t in n){n=n[t];break}}n=n[i[e]]}else n=void 0;return n}(i,t)}function Rt(e,...t){delete Ht[e],Ct.update((i=>(i[e]=ie.all([i[e]||{},...t]),i)))}z([Ct],(([e])=>Object.keys(e))),Ct.subscribe((e=>Ot=e));const Bt={};function Yt(e){return Bt[e]}function It(e){return null!=e&&ii(e).some((e=>{var t;return null==(t=Yt(e))?void 0:t.size}))}function Ut(e,t){const i=Promise.all(t.map((t=>(function(e,t){Bt[e].delete(t),0===Bt[e].size&&delete Bt[e]}(e,t),t().then((e=>e.default||e))))));return i.then((t=>Rt(e,...t)))}const Ft={};function Gt(e){if(!It(e))return e in Ft?Ft[e]:Promise.resolve();const t=function(e){return ii(e).map((e=>{const t=Yt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Ft[e]=Promise.all(t.map((([e,t])=>Ut(e,t)))).then((()=>{if(It(e))return Gt(e);delete Ft[e]})),Ft[e]}const $t={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Wt(){return $t}const Vt=j(!1);var jt=Object.defineProperty,zt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Kt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Jt=(e,t,i)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;let Qt;const ei=j(null);function ti(e){return e.split("-").map(((e,t,i)=>i.slice(0,t+1).join("-"))).reverse()}function ii(e,t=Wt().fallbackLocale){const i=ti(e);return t?[...new Set([...i,...ti(t)])]:i}function ni(){return null!=Qt?Qt:void 0}ei.subscribe((e=>{Qt=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const ri=(si=((e,t)=>{for(var i in t||(t={}))Kt.call(t,i)&&Jt(e,i,t[i]);if(Xt)for(var i of Xt(t))qt.call(t,i)&&Jt(e,i,t[i]);return e})({},ei),zt(si,Zt({set:e=>{if(e&&function(e){if(null==e)return;const t=ii(e);for(let e=0;e<t.length;e++){const i=t[e];if(Nt(i))return i}}(e)&&It(e)){const{loadingDelay:t}=Wt();let i;return"undefined"!=typeof window&&null!=ni()&&t?i=window.setTimeout((()=>Vt.set(!0)),t):Vt.set(!0),Gt(e).then((()=>{ei.set(e)})).finally((()=>{clearTimeout(i),Vt.set(!1)}))}return ei.set(e)}})));var si;const ai=e=>{const t=Object.create(null);return i=>{const n=JSON.stringify(i);return n in t?t[n]:t[n]=e(i)}};var oi=Object.defineProperty,li=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,ci=Object.prototype.propertyIsEnumerable,hi=(e,t,i)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,di=(e,t)=>{for(var i in t||(t={}))ui.call(t,i)&&hi(e,i,t[i]);if(li)for(var i of li(t))ci.call(t,i)&&hi(e,i,t[i]);return e},mi=(e,t)=>{var i={};for(var n in e)ui.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&li)for(var n of li(e))t.indexOf(n)<0&&ci.call(e,n)&&(i[n]=e[n]);return i};const fi=(e,t)=>{const{formats:i}=Wt();if(e in i&&t in i[e])return i[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},pi=ai((e=>{var t=e,{locale:i,format:n}=t,r=mi(t,["locale","format"]);if(null==i)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=fi("number",n)),new Intl.NumberFormat(i,r)})),gi=ai((e=>{var t=e,{locale:i,format:n}=t,r=mi(t,["locale","format"]);if(null==i)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=fi("date",n):0===Object.keys(r).length&&(r=fi("date","short")),new Intl.DateTimeFormat(i,r)})),yi=ai((e=>{var t=e,{locale:i,format:n}=t,r=mi(t,["locale","format"]);if(null==i)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=fi("time",n):0===Object.keys(r).length&&(r=fi("time","short")),new Intl.DateTimeFormat(i,r)})),_i=ai((
|
|
1172
1172
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1173
|
-
(t,e=en())=>new Me(t,e,Ge().formats,{ignoreTag:Ge().ignoreTag}))),_n=(t,e={})=>{var n,i,r,s;let o=e;"object"==typeof t&&(o=t,t=o.id);const{values:a,locale:l=en(),default:u}=o;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Ae(t,l);if(h){if("string"!=typeof h)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h}else h=null!=(s=null!=(r=null==(i=(n=Ge()).handleMissingMessage)?void 0:i.call(n,{locale:l,id:t,defaultValue:u}))?r:u)?s:t;if(!a)return h;let c=h;try{c=yn(h,l).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return c},vn=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,i=dn(e,["locale"]);return gn(cn({locale:n},i))})(e).format(t),bn=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,i=dn(e,["locale"]);return pn(cn({locale:n},i))})(e).format(t),wn=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,i=dn(e,["locale"]);return fn(cn({locale:n},i))})(e).format(t),Tn=(t,e=en())=>Ae(t,e),En=j([nn,He],(()=>_n));function Sn(t,e){Ne(t,e)}j([nn],(()=>vn)),j([nn],(()=>bn)),j([nn],(()=>wn)),j([nn,He],(()=>Tn));const Ln={en:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},"zh-hk":{noLimitToDisplay:"使用者尚未設定儲值限額...",depositLimitHeader:"存款限額",spentAmount:"花費金額",remainingAmount:"剩餘數量",limitPeriod:"限制期限",displayedProduct:"產品",futureLimit:"未來限制",additionalLink1:"最後存款交易詳情",additionalLink2:"定期存款",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},de:{noLimitToDisplay:"Der Benutzer hat kein Einzahlungslimit festgelegt...",depositLimitHeader:"Einzahlungslimit",spentAmount:"Ausgegebener Betrag",remainingAmount:"Restbetrag",limitPeriod:"Begrenzungszeitraum",displayedProduct:"Produkt",futureLimit:"Zukünftige Grenze",additionalLink1:"Details zur letzten Einzahlungstransaktion",additionalLink2:"Einzahlung im Zeitraum",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},it:{noLimitToDisplay:"L'utente non ha impostato un limite di deposito...",depositLimitHeader:"Limite di deposito",spentAmount:"Importo speso",remainingAmount:"Importo residuo",limitPeriod:"Periodo limite",displayedProduct:"Prodotto",futureLimit:"Limite futuro",additionalLink1:"Dettagli della transazione dell'ultimo deposito",additionalLink2:"Deposito nel periodo",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},fr:{noLimitToDisplay:"L'utilisateur n'a pas fixé de limite de dépôt...",depositLimitHeader:"Limite de dépôt",spentAmount:"Montant dépensé",remainingAmount:"Montant restant",limitPeriod:"Délai limite",displayedProduct:"Produit",futureLimit:"Limite future",additionalLink1:"Détails de la transaction du dernier dépôt",additionalLink2:"Dépôt en période",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},es:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},el:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},tr:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},ru:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},ro:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},hr:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},hu:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},pl:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},pt:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},sl:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"},sr:{noLimitToDisplay:"The user has not set a deposit limit...",depositLimitHeader:"Deposit limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount"}};var Mn="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' height='12' width='6' viewBox='0 0 256 512'%3e%3c!--!Font Awesome Free 6.5.1 by %40fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons%2c Inc.--%3e%3cpath fill='%2318a0fb' d='M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z'/%3e%3c/svg%3e",Dn="data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Uploaded to: SVG Repo%2c www.svgrepo.com%2c Generator: SVG Repo Mixer Tools --%3e%3csvg fill='%23a9b6ce' width='800px' height='800px' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11%2c9h4a1%2c1%2c0%2c0%2c0%2c0-2H13V6a1%2c1%2c0%2c0%2c0-2%2c0V7a3%2c3%2c0%2c0%2c0%2c0%2c6h2a1%2c1%2c0%2c0%2c1%2c0%2c2H9a1%2c1%2c0%2c0%2c0%2c0%2c2h2v1a1%2c1%2c0%2c0%2c0%2c2%2c0V17a3%2c3%2c0%2c0%2c0%2c0-6H11a1%2c1%2c0%2c0%2c1%2c0-2Zm1-8A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c20a9%2c9%2c0%2c1%2c1%2c9-9A9%2c9%2c0%2c0%2c1%2c12%2c21Z'/%3e%3c/svg%3e";
|
|
1173
|
+
(e,t=ni())=>new kt(e,t,Wt().formats,{ignoreTag:Wt().ignoreTag}))),vi=(e,t={})=>{var i,n,r,s;let a=t;"object"==typeof e&&(a=e,e=a.id);const{values:o,locale:l=ni(),default:u}=a;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Pt(e,l);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(s=null!=(r=null==(n=(i=Wt()).handleMissingMessage)?void 0:n.call(i,{locale:l,id:e,defaultValue:u}))?r:u)?s:e;if(!o)return c;let h=c;try{h=_i(c,l).format(o)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},bi=(e,t)=>((e={})=>{var t=e,{locale:i=ni()}=t,n=mi(t,["locale"]);return yi(di({locale:i},n))})(t).format(e),wi=(e,t)=>((e={})=>{var t=e,{locale:i=ni()}=t,n=mi(t,["locale"]);return gi(di({locale:i},n))})(t).format(e),Li=(e,t)=>((e={})=>{var t=e,{locale:i=ni()}=t,n=mi(t,["locale"]);return pi(di({locale:i},n))})(t).format(e),Ei=(e,t=ni())=>Pt(e,t),Ti=z([ri,Ct],(()=>vi));function Si(e,t){Rt(e,t)}z([ri],(()=>bi)),z([ri],(()=>wi)),z([ri],(()=>Li)),z([ri,Ct],(()=>Ei));const Mi={en:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},"zh-hk":{noLimitToDisplay:"使用者尚未設定儲值限額...",depositLimitHeader:"存款限額",spentAmount:"花費金額",remainingAmount:"剩餘數量",limitPeriod:"限制期限",displayedProduct:"產品",futureLimit:"未來限制",additionalLink1:"最後存款交易詳情",additionalLink2:"定期存款",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},de:{noLimitToDisplay:"Der Benutzer hat kein Einzahlungslimit festgelegt...",depositLimitHeader:"Einzahlungslimit",spentAmount:"Ausgegebener Betrag",remainingAmount:"Restbetrag",limitPeriod:"Begrenzungszeitraum",displayedProduct:"Produkt",futureLimit:"Zukünftige Grenze",additionalLink1:"Details zur letzten Einzahlungstransaktion",additionalLink2:"Einzahlung im Zeitraum",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},it:{noLimitToDisplay:"L'utente non ha impostato un limite di deposito...",depositLimitHeader:"Limite di deposito",spentAmount:"Importo speso",remainingAmount:"Importo residuo",limitPeriod:"Periodo limite",displayedProduct:"Prodotto",futureLimit:"Limite futuro",additionalLink1:"Dettagli della transazione dell'ultimo deposito",additionalLink2:"Deposito nel periodo",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},fr:{noLimitToDisplay:"L'utilisateur n'a pas fixé de limite de dépôt...",depositLimitHeader:"Limite de dépôt",spentAmount:"Montant dépensé",remainingAmount:"Montant restant",limitPeriod:"Délai limite",displayedProduct:"Produit",futureLimit:"Limite future",additionalLink1:"Détails de la transaction du dernier dépôt",additionalLink2:"Dépôt en période",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},es:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},el:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},tr:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},ru:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},ro:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},hr:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},hu:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},pl:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},pt:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},sl:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."},sr:{noLimitToDisplay:"The user has not set a limit...",depositLimitHeader:"Deposit limit",lossLimitHeader:"Loss limit",wageringLimitHeader:"Wagering limit",spentAmount:"Spent amount",remainingAmount:"Remaining amount",limitPeriod:"Limit period",displayedProduct:"Product",futureLimit:"Future limit",additionalLink1:"Last deposit transaction details",additionalLink2:"Deposit in period",limitRemoved:"This limit has been removed and is valid until",limitUpdated:"This limit will be applied beginning with",changeLimitLabel:"Change limit",futureAmount:"Future amount",limitTypeLabel:"Limit type",fetchLimitDefError:"Failed to fetch limit definitions.",fetchLimitBalanceError:"Failed to fetch limit balance."}};var Di="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' height='12' width='6' viewBox='0 0 256 512'%3e%3c!--!Font Awesome Free 6.5.1 by %40fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons%2c Inc.--%3e%3cpath fill='%2318a0fb' d='M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z'/%3e%3c/svg%3e",ki="data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3c!-- Uploaded to: SVG Repo%2c www.svgrepo.com%2c Generator: SVG Repo Mixer Tools --%3e%3csvg fill='%23a9b6ce' width='800px' height='800px' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11%2c9h4a1%2c1%2c0%2c0%2c0%2c0-2H13V6a1%2c1%2c0%2c0%2c0-2%2c0V7a3%2c3%2c0%2c0%2c0%2c0%2c6h2a1%2c1%2c0%2c0%2c1%2c0%2c2H9a1%2c1%2c0%2c0%2c0%2c0%2c2h2v1a1%2c1%2c0%2c0%2c0%2c2%2c0V17a3%2c3%2c0%2c0%2c0%2c0-6H11a1%2c1%2c0%2c0%2c1%2c0-2Zm1-8A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c20a9%2c9%2c0%2c1%2c1%2c9-9A9%2c9%2c0%2c0%2c1%2c12%2c21Z'/%3e%3c/svg%3e",Hi="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 386 193' fill='none'%3e %3cpath d='M4 193a189 189 0 0 1 379 0' stroke='url(%23a)' stroke-width='6' stroke-dasharray='2 2'/%3e %3cpath d='M49 193a144 144 0 1 1 288 0' stroke='%23C4C4C4' stroke-width='30' stroke-dasharray='2 2'/%3e %3cdefs%3e%3clinearGradient id='a' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3e%3cstop offset='0%25'/%3e%3cstop offset='100%25' stop-opacity='.2'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";
|
|
1174
1174
|
/* ../general-animation-loading/src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
|
|
1175
|
-
function
|
|
1176
|
-
/*div5_binding*/
|
|
1177
|
-
/*div5_binding*/,
|
|
1175
|
+
function Ai(t){let i;return{c(){i=f("div"),i.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=e},m(e,n){h(e,i,n),
|
|
1176
|
+
/*div5_binding*/t[3](i)},p:e,i:e,o:e,d(e){e&&d(i)
|
|
1177
|
+
/*div5_binding*/,t[3](null)}}}function Pi(e,t,i){let n,{clientstyling:r=""}=t,{clientstylingurl:s=""}=t;return e.$$set=e=>{"clientstyling"in e&&i(1,r=e.clientstyling),"clientstylingurl"in e&&i(2,s=e.clientstylingurl)},e.$$.update=()=>{/*clientstyling, customStylingContainer*/3&e.$$.dirty&&r&&n&&(()=>{let e=document.createElement("style");e.innerHTML=r,n.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/5&e.$$.dirty&&s&&n&&(()=>{let e=new URL(s),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{n.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[n,r,s,function(e){k[e?"unshift":"push"]((()=>{n=e,i(0,n)}))}]}
|
|
1178
1178
|
/* src/PlayerRglimits.svelte generated by Svelte v3.59.2 */
|
|
1179
|
-
function
|
|
1180
|
-
// (
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1183
|
-
return
|
|
1184
|
-
// (
|
|
1185
|
-
function
|
|
1186
|
-
// (
|
|
1187
|
-
function
|
|
1188
|
-
// (
|
|
1189
|
-
function
|
|
1190
|
-
// (
|
|
1191
|
-
function
|
|
1192
|
-
// (
|
|
1193
|
-
function
|
|
1194
|
-
// (
|
|
1195
|
-
function
|
|
1196
|
-
// (
|
|
1197
|
-
function
|
|
1198
|
-
// (
|
|
1199
|
-
function
|
|
1200
|
-
// (
|
|
1201
|
-
function
|
|
1202
|
-
// (
|
|
1203
|
-
function
|
|
1204
|
-
return
|
|
1205
|
-
// (
|
|
1206
|
-
function
|
|
1207
|
-
// (
|
|
1208
|
-
function
|
|
1209
|
-
// (
|
|
1210
|
-
function
|
|
1211
|
-
// (
|
|
1212
|
-
function
|
|
1213
|
-
// (
|
|
1214
|
-
function
|
|
1215
|
-
// (
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
/*div_binding*/e[27](null)}}}function Xn(t,e,n){let i;var r,s;r=En,s=t=>n(16,i=t),t.$$.on_destroy.push(u(r,s));let o,a,{session:l=""}=e,{sessiontype:h=""}=e,{userid:c=""}=e,{endpoint:d=""}=e,{transdetailsurl:m=""}=e,{transactionspageurl:f=""}=e,{clientstyling:p=""}=e,{clientstylingurl:g=""}=e,{lang:y="en"}=e,{translationurl:_=""}=e,{datetimeformat:v=""}=e,b=!1,w=!1,T="",E="",L=!0,D=!0,k=!1,A={spentAmount:"",limitCurrency:"EUR",remainingAmount:"",limitType:"",limitProducts:[]},P=[],H="",O=[],C=0,N=.75,x=0,R="";Object.keys(Ln).forEach((t=>{Sn(t,Ln[t])}));const B=t=>{n(15,R=t)},Y=t=>{n(6,L=!0);const e=new URLSearchParams({limitDefinitionId:t.id}),i=new URL(`${d}/v1/player/${E}/limits/monetary/balance?${e}`);fetch(i,{method:"GET",headers:{"X-SessionId":T,"X-Session-Type":h}}).then((t=>t.json())).then((e=>{if(e&&e.error)throw new Error(e.error);F(e.limitBalances[0],t)})).catch((t=>{B(t)})).finally((()=>{n(6,L=!1)}))},U=()=>{new Promise(((t,e)=>{const n=new URL(`${d}/v1/player/${E}/limits/monetary/`);fetch(n,{method:"GET",headers:{"X-SessionId":T,"X-Session-Type":h}}).then((t=>t.json())).then((n=>n&&n.error?e(n.error):t(n.limits.length>0?n.limits.filter((t=>"Deposit"===t.type)):[]))).catch((t=>e(t)))})).then((t=>{if(O=t,0===O.length)return n(6,L=!1),void n(8,a=!0);if(O.length>1){const t={Daily:0,Weekly:1,Monthly:2};O.forEach((t=>{-1===P.indexOf(`${t.period} - ${t.products[0]}`)&&P.push(`${t.period} - ${t.products[0]}`)})),n(9,k=!0),n(11,P=P.sort(((e,n)=>t[e.split(" ")[0]]-t[n.split(" ")[0]])))}Y(O[0])}),(t=>{n(6,L=!1),B(t)}))},I=t=>G(t).utc(!0).format(v||"DD/MM/YYYY HH:mm:ss"),F=(t,e)=>{n(12,H=`${t.limitPeriod} - ${t.limitProducts[0]}`);const i=((t,e)=>{const n=e.find((e=>e.playerLimitId===t));return n?{updateAmount:n.updateAmount,expires:n.applyAt,expiresString:I(n.applyAt),id:n.id,isRemoved:n.updateAmount<1,isUpdated:n.updateAmount>0}:{updateAmount:"",expires:"",expiresString:"",id:"",isRemoved:!1,isUpdated:!1}})(e.id,e.schedules);n(10,A=Object.assign({totalAmount:t.limitAmount,spentAmount:parseFloat(t.spentBalance.amount).toFixed(2),limitCurrency:t.limitCurrency,remainingAmount:parseFloat(t.limitAmount-t.spentBalance.amount).toFixed(2),limitPeriod:t.limitPeriod,limitProducts:t.limitProducts[0],product:t.limitWalletTypes},i)),$(A)},$=t=>{x=0,x=100*t.spentAmount/t.totalAmount,x=parseFloat(x).toFixed(2);let e=.5*t.spentAmount/t.totalAmount;n(13,C=Number(parseFloat(e).toFixed(3))),n(13,C=C>.5?.5:C),n(14,N=.75),n(14,N=Number(parseFloat(e+N).toFixed(3))),n(14,N=N>1.25?1.25:N),n(7,D=!1)};S((()=>{setTimeout((()=>{n(24,b=!0)}),50)}));const V=()=>{var t;t=y,nn.set(t)};return t.$$set=t=>{"session"in t&&n(18,l=t.session),"sessiontype"in t&&n(0,h=t.sessiontype),"userid"in t&&n(19,c=t.userid),"endpoint"in t&&n(20,d=t.endpoint),"transdetailsurl"in t&&n(1,m=t.transdetailsurl),"transactionspageurl"in t&&n(2,f=t.transactionspageurl),"clientstyling"in t&&n(3,p=t.clientstyling),"clientstylingurl"in t&&n(4,g=t.clientstylingurl),"lang"in t&&n(21,y=t.lang),"translationurl"in t&&n(22,_=t.translationurl),"datetimeformat"in t&&n(23,v=t.datetimeformat)},t.$$.update=()=>{/*isMounted, session, userid*/17563648&t.$$.dirty[0]&&b&&l&&c&&(n(25,w=!0),T=l,E=c),/*isMounted, isLoggedIn*/50331648&t.$$.dirty[0]&&b&&w&&U(),/*clientstyling, customStylingContainer*/40&t.$$.dirty[0]&&p&&o&&(()=>{let t=document.createElement("style");t.innerHTML=p,o.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/48&t.$$.dirty[0]&&g&&o&&(()=>{let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{o.appendChild(e)}),1),setTimeout((()=>{}),500)}))})(),/*lang*/2097152&t.$$.dirty[0]&&y&&V(),/*translationurl*/4194304&t.$$.dirty[0]&&_&&(()=>{let t=new URL(_);fetch(t.href).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Sn(e,t[e])}))})).catch((t=>{console.log(t)}))})()},[h,m,f,p,g,o,L,D,a,k,A,P,H,C,N,R,i,()=>{let t=O.find((t=>`${t.period} - ${t.products[0]}`===H));Y(t)},l,c,d,y,_,v,b,w,function(){H=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),n(12,H),n(11,P)},function(t){M[t?"unshift":"push"]((()=>{o=t,n(5,o)}))}]}!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",class extends I{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),U(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},An,kn,s,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}});class Kn extends I{constructor(t){super();const e=document.createElement("style");e.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.ErrorMessage{margin:0 15px;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.LimitsContainer{display:flex;width:100%;max-width:620px;min-height:150px;border:1px solid var(--emw--color-contrast, #07072A);border-radius:20px;overflow:hidden;box-shadow:0.6em 0.6em 0.4em var(--emw--color-gray-150, #a9b6ce)}@container (max-width: 720px){.LimitsContainer{max-width:355px}}.ContentLeft{padding:1rem;width:318px;line-height:20px}.LimitTypeHeader{color:var(--emw--color-gray-150, #a9b6ce);margin-bottom:20px;max-width:225px}.HeaderIcon{height:20px;width:20px;color:var(--emw--color-gray-150, #a9b6ce)}.DetailsContainer{margin-bottom:15px;display:inline}.DetailsContainer span{float:left;clear:both}.ContentRight{min-width:300px;padding:1rem;display:flex;justify-content:center;flex-direction:column}.AmountContainer{padding:0.3rem;font-size:xx-large;text-align:center;border:1px solid var(--emw--color-contrast, #07072A);border-radius:20px;box-shadow:0.16em 0.16em 0.1em var(--emw--color-gray-150, #a9b6ce);background-color:#F5F5F5}.TextContainer{display:inline-block;padding-left:5px}.TextContainer p{width:100%;display:block;clear:both;font-weight:bold}.ExtraInfoContainer{padding:1rem 0;color:var(--emfe-w-color-red, #ed0909)}.UsefulLinksSection{padding-top:5px}.UsefulLinksSection a{float:left;clear:both;color:var(--emw--color-contrast, #07072A)}.MultipleSelectContainer{float:left;padding-top:1rem;clear:both}.MultipleSelectContainer label{float:left;padding-right:5px}.MultipleSelectContainer select{float:right;background:var(--emw--color-gray-150, #a9b6ce);border-radius:5px;margin:2px}.TextIcon{color:var(--emw--color-primary, #D0046C)}.Gauge{width:100%;font-family:"Roboto", sans-serif;font-size:32px;color:black;margin-top:1rem}.GaugeBody{width:100%;height:0;padding-bottom:50%;background:var(--emw--color-gray-100, #E6E6E6);position:relative;border-top-left-radius:100% 200%;border-top-right-radius:100% 200%;overflow:hidden}.GaugeFill{position:absolute;top:100%;left:0;width:inherit;height:100%;background:var(--emw--color-primary, #D0046C);transform-origin:center top;transform:var(--transform-value);transition:transform 0.2s ease-out}.GaugeCover{width:75%;height:150%;background:var(--emw--color-white, #FFFFFF);position:absolute;border-radius:50%;top:25%;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;padding-bottom:47%;box-sizing:border-box;font-size:20px}.GaugeCoverMin{width:50px;height:50px;background:var(--emw--color-primary, #D0046C);position:relative;top:6.7rem;left:50%;border-radius:50%;transform:translateX(-50%)}.GaugeNeedleCover{width:8%;height:16%;background:var(--emw--color-black, #000000);position:absolute;top:90%;left:50%;border:4px solid var(--emw--color-white, #FFFFFF);border-radius:50%;transform:translateX(-50%);transition:transform 0.2s ease-out}.GaugeNeedle{width:0.2rem;height:3.5rem;background:linear-gradient(0deg, #000000 0, #000000 55%, #c5c5c5 55%, #c5c5c5 90%, #000000 90%, #000000 100%);display:inline-block;left:49.5%;position:absolute;bottom:1%;transform:var(--transform-needle-value);transform-origin:bottom;transition:transform 0.2s ease-out}.Min{width:50%;float:left}.Max{width:49%;float:right;text-align:right}',this.shadowRoot.appendChild(e),U(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},Xn,Zn,s,{session:18,sessiontype:0,userid:19,endpoint:20,transdetailsurl:1,transactionspageurl:2,clientstyling:3,clientstylingurl:4,lang:21,translationurl:22,datetimeformat:23},null,[-1,-1]),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["session","sessiontype","userid","endpoint","transdetailsurl","transactionspageurl","clientstyling","clientstylingurl","lang","translationurl","datetimeformat"]}get session(){return this.$$.ctx[18]}set session(t){this.$$set({session:t}),N()}get sessiontype(){return this.$$.ctx[0]}set sessiontype(t){this.$$set({sessiontype:t}),N()}get userid(){return this.$$.ctx[19]}set userid(t){this.$$set({userid:t}),N()}get endpoint(){return this.$$.ctx[20]}set endpoint(t){this.$$set({endpoint:t}),N()}get transdetailsurl(){return this.$$.ctx[1]}set transdetailsurl(t){this.$$set({transdetailsurl:t}),N()}get transactionspageurl(){return this.$$.ctx[2]}set transactionspageurl(t){this.$$set({transactionspageurl:t}),N()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}get lang(){return this.$$.ctx[21]}set lang(t){this.$$set({lang:t}),N()}get translationurl(){return this.$$.ctx[22]}set translationurl(t){this.$$set({translationurl:t}),N()}get datetimeformat(){return this.$$.ctx[23]}set datetimeformat(t){this.$$set({datetimeformat:t}),N()}}return!customElements.get("player-rglimits")&&customElements.define("player-rglimits",Kn),Kn}));
|
|
1179
|
+
function Oi(e,t,i){const n=e.slice();return n[47]=t[i],n}function Ci(e,t,i){const n=e.slice();return n[47]=t[i],n}
|
|
1180
|
+
// (329:4) {:else}
|
|
1181
|
+
function Ni(e){let t,i,n,r,s,a,o,u,m,y,v,w=/*getWidgetTitle*/e[18](/*selectedLimitType*/e[14])+"";function L(e,t){/*isLoading*/
|
|
1182
|
+
return e[7]?Yi:Bi}let E=L(e),T=E(e),S=/*limitPeriodList*/e[11].length>0&&zi(e),M=/*limitTypeList*/e[12].length>0&&Xi(e);function D(e,t){/*isGaugeLoading*/
|
|
1183
|
+
return e[8]?Ji:qi}let k=D(e),H=k(e);return{c(){t=f("div"),i=f("h2"),n=f("img"),s=p(w),a=g(),T.c(),o=g(),u=f("div"),S&&S.c(),m=g(),M&&M.c(),y=g(),v=f("div"),H.c(),_(n,"class","HeaderIcon"),_(n,"alt","user"),l(n.src,r=ki)||_(n,"src",r),_(i,"class","LimitTypeHeader"),_(u,"class","WidgetFooterControls"),_(t,"class","ContentLeft"),_(v,"class","ContentRight")},m(e,r){h(e,t,r),c(t,i),c(i,n),c(i,s),c(t,a),T.m(t,null),c(t,o),c(t,u),S&&S.m(u,null),c(u,m),M&&M.m(u,null),h(e,y,r),h(e,v,r),H.m(v,null)},p(e,i){/*selectedLimitType*/16384&i[0]&&w!==(w=/*getWidgetTitle*/e[18](/*selectedLimitType*/e[14])+"")&&b(s,w),E===(E=L(e))&&T?T.p(e,i):(T.d(1),T=E(e),T&&(T.c(),T.m(t,o))),/*limitPeriodList*/e[11].length>0?S?S.p(e,i):(S=zi(e),S.c(),S.m(u,m)):S&&(S.d(1),S=null),/*limitTypeList*/e[12].length>0?M?M.p(e,i):(M=Xi(e),M.c(),M.m(u,null)):M&&(M.d(1),M=null),k===(k=D(e))&&H?H.p(e,i):(H.d(1),H=k(e),H&&(H.c(),H.m(v,null)))},d(e){e&&d(t),T.d(),S&&S.d(),M&&M.d(),e&&d(y),e&&d(v),H.d()}}}
|
|
1184
|
+
// (325:27)
|
|
1185
|
+
function xi(e){let t,i,n;return{c(){t=f("div"),i=f("strong"),n=p(/*errorMessage*/e[16]),_(i,"class","ErrorMessage"),_(t,"class","ContainerCenter")},m(e,r){h(e,t,r),c(t,i),c(i,n)},p(e,t){/*errorMessage*/65536&t[0]&&b(n,/*errorMessage*/e[16])},d(e){e&&d(t)}}}
|
|
1186
|
+
// (321:4) {#if noLimitToDisplay}
|
|
1187
|
+
function Ri(e){let t,i,n,r=/*$_*/e[17]("noLimitToDisplay")+"";return{c(){t=f("div"),i=f("p"),n=p(r),_(t,"class","ContainerCenter")},m(e,r){h(e,t,r),c(t,i),c(i,n)},p(e,t){/*$_*/131072&t[0]&&r!==(r=/*$_*/e[17]("noLimitToDisplay")+"")&&b(n,r)},d(e){e&&d(t)}}}
|
|
1188
|
+
// (334:8) {:else}
|
|
1189
|
+
function Bi(e){let t,i,n,r,s,a,o,u,m,y,v,w,L,E,T,S,M,D,k,H,A,P,O,C,N,x,R,B,Y,I,U,F,G,$,W,V,j,z,Z,X,K,q,J,Q,ee,te,ie,ne,re,se,ae=/*$_*/e[17]("spentAmount")+"",oe=/*$_*/e[17]("remainingAmount")+"",le=/*$_*/e[17]("limitPeriod")+"",ue=/*$_*/e[17]("displayedProduct")+"",ce=/*displayedLimit*/e[10].spentAmount+"",he=/*displayedLimit*/e[10].limitCurrency+"",de=/*displayedLimit*/e[10].remainingAmount+"",me=/*displayedLimit*/e[10].limitCurrency+"",fe=/*displayedLimit*/e[10].limitPeriod+"",pe=/*displayedLimit*/e[10].limitProducts+"",ge=/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated&&Ii(e),ye=/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated&&Ui(e),_e=/*displayedLimit*/(!0===e[10].formattedSchedule.isRemoved||/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated)&&Fi(e),ve=/*sessiontype*/"admin"===e[0]&&Wi(e);return{c(){t=f("div"),i=f("span"),n=p(ae),r=p(":"),s=g(),a=f("span"),o=p(oe),u=p(":"),m=g(),ge&&ge.c(),y=g(),v=f("span"),w=p(le),L=p(":"),E=g(),T=f("span"),S=p(ue),M=p(":"),D=g(),k=f("div"),H=f("p"),A=f("img"),O=g(),C=p(ce),N=g(),x=p(he),R=g(),B=f("p"),Y=f("img"),U=g(),F=p(de),G=g(),$=p(me),W=g(),ye&&ye.c(),V=g(),j=f("p"),z=f("img"),X=g(),K=p(fe),q=g(),J=f("p"),Q=f("img"),te=g(),ie=p(pe),ne=g(),_e&&_e.c(),re=g(),ve&&ve.c(),se=p(""),_(t,"class","DetailsContainer Entries"),_(A,"class","TextIcon"),_(A,"alt","user"),l(A.src,P=Di)||_(A,"src",P),_(Y,"class","TextIcon"),_(Y,"alt","user"),l(Y.src,I=Di)||_(Y,"src",I),_(z,"class","TextIcon"),_(z,"alt","user"),l(z.src,Z=Di)||_(z,"src",Z),_(Q,"class","TextIcon"),_(Q,"alt","user"),l(Q.src,ee=Di)||_(Q,"src",ee),_(k,"class","TextContainer")},m(e,l){h(e,t,l),c(t,i),c(i,n),c(i,r),c(t,s),c(t,a),c(a,o),c(a,u),c(t,m),ge&&ge.m(t,null),c(t,y),c(t,v),c(v,w),c(v,L),c(t,E),c(t,T),c(T,S),c(T,M),h(e,D,l),h(e,k,l),c(k,H),c(H,A),c(H,O),c(H,C),c(H,N),c(H,x),c(k,R),c(k,B),c(B,Y),c(B,U),c(B,F),c(B,G),c(B,$),c(k,W),ye&&ye.m(k,null),c(k,V),c(k,j),c(j,z),c(j,X),c(j,K),c(k,q),c(k,J),c(J,Q),c(J,te),c(J,ie),h(e,ne,l),_e&&_e.m(e,l),h(e,re,l),ve&&ve.m(e,l),h(e,se,l)},p(e,i){/*$_*/131072&i[0]&&ae!==(ae=/*$_*/e[17]("spentAmount")+"")&&b(n,ae),/*$_*/131072&i[0]&&oe!==(oe=/*$_*/e[17]("remainingAmount")+"")&&b(o,oe),/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated?ge?ge.p(e,i):(ge=Ii(e),ge.c(),ge.m(t,y)):ge&&(ge.d(1),ge=null),/*$_*/131072&i[0]&&le!==(le=/*$_*/e[17]("limitPeriod")+"")&&b(w,le),/*$_*/131072&i[0]&&ue!==(ue=/*$_*/e[17]("displayedProduct")+"")&&b(S,ue),/*displayedLimit*/1024&i[0]&&ce!==(ce=/*displayedLimit*/e[10].spentAmount+"")&&b(C,ce),/*displayedLimit*/1024&i[0]&&he!==(he=/*displayedLimit*/e[10].limitCurrency+"")&&b(x,he),/*displayedLimit*/1024&i[0]&&de!==(de=/*displayedLimit*/e[10].remainingAmount+"")&&b(F,de),/*displayedLimit*/1024&i[0]&&me!==(me=/*displayedLimit*/e[10].limitCurrency+"")&&b($,me),/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated?ye?ye.p(e,i):(ye=Ui(e),ye.c(),ye.m(k,V)):ye&&(ye.d(1),ye=null),/*displayedLimit*/1024&i[0]&&fe!==(fe=/*displayedLimit*/e[10].limitPeriod+"")&&b(K,fe),/*displayedLimit*/1024&i[0]&&pe!==(pe=/*displayedLimit*/e[10].limitProducts+"")&&b(ie,pe),/*displayedLimit*/!0===e[10].formattedSchedule.isRemoved||/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated?_e?_e.p(e,i):(_e=Fi(e),_e.c(),_e.m(re.parentNode,re)):_e&&(_e.d(1),_e=null),/*sessiontype*/"admin"===e[0]?ve?ve.p(e,i):(ve=Wi(e),ve.c(),ve.m(se.parentNode,se)):ve&&(ve.d(1),ve=null)},d(e){e&&d(t),ge&&ge.d(),e&&d(D),e&&d(k),ye&&ye.d(),e&&d(ne),_e&&_e.d(e),e&&d(re),ve&&ve.d(e),e&&d(se)}}}
|
|
1190
|
+
// (332:8) {#if isLoading}
|
|
1191
|
+
function Yi(e){let t;return{c(){t=f("general-animation-loading"),v(t,"clientstyling",/*clientstyling*/e[3]),v(t,"clientstylingurl",/*clientstylingurl*/e[4])},m(e,i){h(e,t,i)},p(e,i){/*clientstyling*/8&i[0]&&v(t,"clientstyling",/*clientstyling*/e[3]),/*clientstylingurl*/16&i[0]&&v(t,"clientstylingurl",/*clientstylingurl*/e[4])},d(e){e&&d(t)}}}
|
|
1192
|
+
// (338:12) {#if displayedLimit.formattedSchedule.isUpdated === true}
|
|
1193
|
+
function Ii(e){let t,i,n,r=/*$_*/e[17]("futureAmount")+"";return{c(){t=f("span"),i=p(r),n=p(":")},m(e,r){h(e,t,r),c(t,i),c(t,n)},p(e,t){/*$_*/131072&t[0]&&r!==(r=/*$_*/e[17]("futureAmount")+"")&&b(i,r)},d(e){e&&d(t)}}}
|
|
1194
|
+
// (347:12) {#if displayedLimit.formattedSchedule.isUpdated === true}
|
|
1195
|
+
function Ui(e){let t,i,n,r,s,a,o,u=/*displayedLimit*/e[10].formattedSchedule.updateAmount+"",m=/*displayedLimit*/e[10].limitCurrency+"";return{c(){t=f("p"),i=f("img"),r=g(),s=p(u),a=g(),o=p(m),_(i,"class","TextIcon"),_(i,"alt","user"),l(i.src,n=Di)||_(i,"src",n)},m(e,n){h(e,t,n),c(t,i),c(t,r),c(t,s),c(t,a),c(t,o)},p(e,t){/*displayedLimit*/1024&t[0]&&u!==(u=/*displayedLimit*/e[10].formattedSchedule.updateAmount+"")&&b(s,u),/*displayedLimit*/1024&t[0]&&m!==(m=/*displayedLimit*/e[10].limitCurrency+"")&&b(o,m)},d(e){e&&d(t)}}}
|
|
1196
|
+
// (353:10) {#if displayedLimit.formattedSchedule.isRemoved === true || displayedLimit.formattedSchedule.isUpdated === true }
|
|
1197
|
+
function Fi(e){let t,i,n=/*displayedLimit*/!0===e[10].formattedSchedule.isRemoved&&Gi(e),r=/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated&&$i(e);return{c(){t=f("div"),n&&n.c(),i=g(),r&&r.c(),_(t,"class","ExtraInfoContainer")},m(e,s){h(e,t,s),n&&n.m(t,null),c(t,i),r&&r.m(t,null)},p(e,s){/*displayedLimit*/!0===e[10].formattedSchedule.isRemoved?n?n.p(e,s):(n=Gi(e),n.c(),n.m(t,i)):n&&(n.d(1),n=null),/*displayedLimit*/!0===e[10].formattedSchedule.isUpdated?r?r.p(e,s):(r=$i(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(e){e&&d(t),n&&n.d(),r&&r.d()}}}
|
|
1198
|
+
// (355:14) {#if displayedLimit.formattedSchedule.isRemoved === true}
|
|
1199
|
+
function Gi(e){let t,i,n,r,s=/*$_*/e[17]("limitRemoved")+"",a=/*displayedLimit*/e[10].formattedSchedule.expiresString+"";return{c(){t=f("span"),i=p(s),n=p(": "),r=p(a)},m(e,s){h(e,t,s),c(t,i),c(t,n),c(t,r)},p(e,t){/*$_*/131072&t[0]&&s!==(s=/*$_*/e[17]("limitRemoved")+"")&&b(i,s),/*displayedLimit*/1024&t[0]&&a!==(a=/*displayedLimit*/e[10].formattedSchedule.expiresString+"")&&b(r,a)},d(e){e&&d(t)}}}
|
|
1200
|
+
// (358:14) {#if displayedLimit.formattedSchedule.isUpdated === true}
|
|
1201
|
+
function $i(e){let t,i,n,r,s=/*$_*/e[17]("limitUpdated")+"",a=/*displayedLimit*/e[10].formattedSchedule.expiresString+"";return{c(){t=f("span"),i=p(s),n=p(": "),r=p(a)},m(e,s){h(e,t,s),c(t,i),c(t,n),c(t,r)},p(e,t){/*$_*/131072&t[0]&&s!==(s=/*$_*/e[17]("limitUpdated")+"")&&b(i,s),/*displayedLimit*/1024&t[0]&&a!==(a=/*displayedLimit*/e[10].formattedSchedule.expiresString+"")&&b(r,a)},d(e){e&&d(t)}}}
|
|
1202
|
+
// (363:10) {#if sessiontype === 'admin'}
|
|
1203
|
+
function Wi(e){let t;function i(e,t){/*transdetailsurl*/
|
|
1204
|
+
return e[1]?ji:/*transactionspageurl*/e[2]?Vi:void 0}let n=i(e),r=n&&n(e);return{c(){t=f("div"),r&&r.c(),_(t,"class","UsefulLinksSection")},m(e,i){h(e,t,i),r&&r.m(t,null)},p(e,s){n===(n=i(e))&&r?r.p(e,s):(r&&r.d(1),r=n&&n(e),r&&(r.c(),r.m(t,null)))},d(e){e&&d(t),r&&r.d()}}}
|
|
1205
|
+
// (367:44)
|
|
1206
|
+
function Vi(e){let t,i,n=/*$_*/e[17]("additionalLink2")+"";return{c(){t=f("a"),i=p(n),_(t,"href",/*transactionspageurl*/e[2]),_(t,"target","_blank")},m(e,n){h(e,t,n),c(t,i)},p(e,r){/*$_*/131072&r[0]&&n!==(n=/*$_*/e[17]("additionalLink2")+"")&&b(i,n),/*transactionspageurl*/4&r[0]&&_(t,"href",/*transactionspageurl*/e[2])},d(e){e&&d(t)}}}
|
|
1207
|
+
// (365:14) {#if transdetailsurl}
|
|
1208
|
+
function ji(e){let t,i,n=/*$_*/e[17]("additionalLink1")+"";return{c(){t=f("a"),i=p(n),_(t,"href",/*transdetailsurl*/e[1]),_(t,"target","_blank")},m(e,n){h(e,t,n),c(t,i)},p(e,r){/*$_*/131072&r[0]&&n!==(n=/*$_*/e[17]("additionalLink1")+"")&&b(i,n),/*transdetailsurl*/2&r[0]&&_(t,"href",/*transdetailsurl*/e[1])},d(e){e&&d(t)}}}
|
|
1209
|
+
// (374:10) {#if limitPeriodList.length > 0}
|
|
1210
|
+
function zi(e){let t,i,r,s,a,o,l,u,v=/*$_*/e[17]("changeLimitLabel")+"",w=/*limitPeriodList*/e[11],E=[];for(let t=0;t<w.length;t+=1)E[t]=Zi(Ci(e,w,t));return{c(){t=f("div"),i=f("label"),r=p(v),s=p(":"),a=g(),o=f("select");for(let e=0;e<E.length;e+=1)E[e].c();_(i,"for","LimitPeriod"),_(o,"id","LimitPeriod"),/*selectedLimitPeriod*/void 0===e[13]&&C((()=>/*select_change_handler*/e[29].call(o))),_(t,"class","ControlContainer")},m(n,d){h(n,t,d),c(t,i),c(i,r),c(i,s),c(t,a),c(t,o);for(let e=0;e<E.length;e+=1)E[e]&&E[e].m(o,null);L(o,/*selectedLimitPeriod*/e[13],!0),l||(u=[y(o,"change",/*select_change_handler*/e[29]),y(o,"change",/*handlePeriodChange*/e[19])],l=!0)},p(e,t){if(/*$_*/131072&t[0]&&v!==(v=/*$_*/e[17]("changeLimitLabel")+"")&&b(r,v),/*limitPeriodList*/2048&t[0]){let i;for(w=/*limitPeriodList*/e[11],i=0;i<w.length;i+=1){const n=Ci(e,w,i);E[i]?E[i].p(n,t):(E[i]=Zi(n),E[i].c(),E[i].m(o,null))}for(;i<E.length;i+=1)E[i].d(1);E.length=w.length}/*selectedLimitPeriod, limitPeriodList*/10240&t[0]&&L(o,/*selectedLimitPeriod*/e[13])},d(e){e&&d(t),m(E,e),l=!1,n(u)}}}
|
|
1211
|
+
// (378:16) {#each limitPeriodList as value}
|
|
1212
|
+
function Zi(e){let t,i,n,r,s=/*value*/e[47]+"";return{c(){t=f("option"),i=p(s),n=g(),t.__value=r=/*value*/e[47],t.value=t.__value},m(e,r){h(e,t,r),c(t,i),c(t,n)},p(e,n){/*limitPeriodList*/2048&n[0]&&s!==(s=/*value*/e[47]+"")&&b(i,s),/*limitPeriodList*/2048&n[0]&&r!==(r=/*value*/e[47])&&(t.__value=r,t.value=t.__value)},d(e){e&&d(t)}}}
|
|
1213
|
+
// (386:10) {#if limitTypeList.length > 0}
|
|
1214
|
+
function Xi(e){let t,i,r,s,a,o,l,u,v=/*$_*/e[17]("limitTypeLabel")+"",w=/*limitTypeList*/e[12],E=[];for(let t=0;t<w.length;t+=1)E[t]=Ki(Oi(e,w,t));return{c(){t=f("div"),i=f("label"),r=p(v),s=p(":"),a=g(),o=f("select");for(let e=0;e<E.length;e+=1)E[e].c();_(i,"for","LimitType"),_(o,"id","LimitType"),/*selectedLimitType*/void 0===e[14]&&C((()=>/*select_change_handler_1*/e[30].call(o))),_(t,"class","ControlContainer")},m(n,d){h(n,t,d),c(t,i),c(i,r),c(i,s),c(t,a),c(t,o);for(let e=0;e<E.length;e+=1)E[e]&&E[e].m(o,null);L(o,/*selectedLimitType*/e[14],!0),l||(u=[y(o,"change",/*select_change_handler_1*/e[30]),y(o,"change",/*getLimitBalance*/e[20])],l=!0)},p(e,t){if(/*$_*/131072&t[0]&&v!==(v=/*$_*/e[17]("limitTypeLabel")+"")&&b(r,v),/*limitTypeList*/4096&t[0]){let i;for(w=/*limitTypeList*/e[12],i=0;i<w.length;i+=1){const n=Oi(e,w,i);E[i]?E[i].p(n,t):(E[i]=Ki(n),E[i].c(),E[i].m(o,null))}for(;i<E.length;i+=1)E[i].d(1);E.length=w.length}/*selectedLimitType, limitTypeList*/20480&t[0]&&L(o,/*selectedLimitType*/e[14])},d(e){e&&d(t),m(E,e),l=!1,n(u)}}}
|
|
1215
|
+
// (390:16) {#each limitTypeList as value}
|
|
1216
|
+
function Ki(e){let t,i,n,r,s=/*value*/e[47]+"";return{c(){t=f("option"),i=p(s),n=g(),t.__value=r=/*value*/e[47],t.value=t.__value},m(e,r){h(e,t,r),c(t,i),c(t,n)},p(e,n){/*limitTypeList*/4096&n[0]&&s!==(s=/*value*/e[47]+"")&&b(i,s),/*limitTypeList*/4096&n[0]&&r!==(r=/*value*/e[47])&&(t.__value=r,t.value=t.__value)},d(e){e&&d(t)}}}
|
|
1217
|
+
// (403:8) {:else}
|
|
1218
|
+
function qi(e){let t,i,n,r,s,a,o,u,m,y,v,L,E,T,S,M,D,k,H,A,P,O,C,N,x,R,B,Y,I,U,F,G,$,W,V=/*displayedLimit*/e[10].totalAmount+"",j=/*displayedLimit*/e[10].limitCurrency+"",z=/*displayedLimit*/e[10].spentAmount+"",Z=/*displayedLimit*/e[10].limitCurrency+"",X=/*displayedLimit*/e[10].limitCurrency+"",K=/*displayedLimit*/e[10].totalAmount+"",q=/*displayedLimit*/e[10].limitCurrency+"";return{c(){t=f("div"),i=p(V),n=g(),r=p(j),s=g(),a=f("div"),o=f("div"),u=f("img"),y=g(),v=f("div"),L=g(),E=f("div"),T=p(z),S=g(),M=p(Z),D=g(),k=f("div"),H=g(),A=f("div"),P=g(),O=f("div"),C=f("div"),N=f("strong"),N.textContent="0",x=g(),R=f("span"),B=p(X),Y=g(),I=f("div"),U=f("strong"),F=p(K),G=g(),$=f("span"),W=p(q),_(t,"class","AmountContainer"),_(u,"class","Archbg"),l(u.src,m=Hi)||_(u,"src",m),_(u,"alt","arch"),_(v,"class","GaugeFill"),w(v,"--p",/*gaugeValue*/e[15]+"deg"),_(E,"class","GaugeCover"),_(k,"class","GaugeNeedleCover"),_(A,"class","GaugeNeedle"),w(A,"--transform-needle-value","rotate("+(/*gaugeValue*/e[15]-90)+"deg)"),_(o,"class","GaugeBody"),_(a,"class","Gauge"),_(N,"class","MinContent"),_(R,"class","MinContentCurrency"),_(C,"class","Min"),_(U,"class","MaxContent"),_($,"class","MaxContentCurrency"),_(I,"class","Max"),_(O,"class","MinMaxContainer")},m(e,l){h(e,t,l),c(t,i),c(t,n),c(t,r),h(e,s,l),h(e,a,l),c(a,o),c(o,u),c(o,y),c(o,v),c(o,L),c(o,E),c(E,T),c(E,S),c(E,M),c(o,D),c(o,k),c(o,H),c(o,A),h(e,P,l),h(e,O,l),c(O,C),c(C,N),c(C,x),c(C,R),c(R,B),c(O,Y),c(O,I),c(I,U),c(U,F),c(I,G),c(I,$),c($,W)},p(e,t){/*displayedLimit*/1024&t[0]&&V!==(V=/*displayedLimit*/e[10].totalAmount+"")&&b(i,V),/*displayedLimit*/1024&t[0]&&j!==(j=/*displayedLimit*/e[10].limitCurrency+"")&&b(r,j),/*gaugeValue*/32768&t[0]&&w(v,"--p",/*gaugeValue*/e[15]+"deg"),/*displayedLimit*/1024&t[0]&&z!==(z=/*displayedLimit*/e[10].spentAmount+"")&&b(T,z),/*displayedLimit*/1024&t[0]&&Z!==(Z=/*displayedLimit*/e[10].limitCurrency+"")&&b(M,Z),/*gaugeValue*/32768&t[0]&&w(A,"--transform-needle-value","rotate("+(/*gaugeValue*/e[15]-90)+"deg)"),/*displayedLimit*/1024&t[0]&&X!==(X=/*displayedLimit*/e[10].limitCurrency+"")&&b(B,X),/*displayedLimit*/1024&t[0]&&K!==(K=/*displayedLimit*/e[10].totalAmount+"")&&b(F,K),/*displayedLimit*/1024&t[0]&&q!==(q=/*displayedLimit*/e[10].limitCurrency+"")&&b(W,q)},d(e){e&&d(t),e&&d(s),e&&d(a),e&&d(P),e&&d(O)}}}
|
|
1219
|
+
// (401:8) {#if isGaugeLoading}
|
|
1220
|
+
function Ji(e){let t;return{c(){t=f("general-animation-loading"),v(t,"clientstyling",/*clientstyling*/e[3]),v(t,"clientstylingurl",/*clientstylingurl*/e[4])},m(e,i){h(e,t,i)},p(e,i){/*clientstyling*/8&i[0]&&v(t,"clientstyling",/*clientstyling*/e[3]),/*clientstylingurl*/16&i[0]&&v(t,"clientstylingurl",/*clientstylingurl*/e[4])},d(e){e&&d(t)}}}function Qi(t){let i,n,r;function s(e,t){/*noLimitToDisplay*/
|
|
1221
|
+
return e[9]?Ri:/*errorMessage*/e[16]?xi:Ni}let a=s(t),o=a(t);return{c(){i=f("div"),n=f("div"),o.c(),this.c=e,_(n,"class","LimitsContainer"),_(i,"class",r=/*displayNone*/t[6]?"DisplayNone":"")},m(e,r){h(e,i,r),c(i,n),o.m(n,null),
|
|
1222
|
+
/*div0_binding*/t[31](n)},p(e,t){a===(a=s(e))&&o?o.p(e,t):(o.d(1),o=a(e),o&&(o.c(),o.m(n,null))),/*displayNone*/64&t[0]&&r!==(r=/*displayNone*/e[6]?"DisplayNone":"")&&_(i,"class",r)},i:e,o:e,d(e){e&&d(i),o.d(),
|
|
1223
|
+
/*div0_binding*/t[31](null)}}}function en(e,t,i){let n;var r,s;r=Ti,s=e=>i(17,n=e),e.$$.on_destroy.push(u(r,s));let a,o,{session:l=""}=t,{sessiontype:c=""}=t,{userid:h=""}=t,{endpoint:d=""}=t,{transdetailsurl:m=""}=t,{transactionspageurl:f=""}=t,{clientstyling:p=""}=t,{clientstylingurl:g=""}=t,{lang:y="en"}=t,{translationurl:_=""}=t,{datetimeformat:v=""}=t,b=!1,w=!1,L=!1,T="",S="",D=!0,H=!0,A={totalAmount:null,spentAmount:"",limitCurrency:"EUR",remainingAmount:"",limitPeriod:"",limitProducts:""},P=[],O=[],C="",N="",x=[],R=0,B="";Object.keys(Mi).forEach((e=>{Si(e,Mi[e])})),
|
|
1224
|
+
/**
|
|
1225
|
+
* Sets the isMounted flag after a short delay when the component is first rendered.
|
|
1226
|
+
*/
|
|
1227
|
+
M((()=>{setTimeout((()=>{i(27,w=!0)}),50)}));
|
|
1228
|
+
/**
|
|
1229
|
+
* Sets the session information upon login.
|
|
1230
|
+
*/
|
|
1231
|
+
const Y=e=>{i(16,B=e)},I=async e=>{try{i(7,D=!0);const t=new URL(`${d}/v1/player/${S}/limits/monetary/balance`);t.searchParams.append("limitDefinitionId",e.id);const r={method:"GET",headers:{"X-SessionId":T,"X-Session-Type":c}},s=await fetch(t,r);if(!s.ok)throw new Error(n("fetchLimitBalanceError"));const a=await s.json();F(a.limitBalances[0],e)}catch(e){Y(e.message)}finally{i(7,D=!1)}},U=async()=>{try{if(x=await(async()=>{try{const e=new URL(`${d}/v1/player/${S}/limits/monetary/`),t={method:"GET",headers:{"X-SessionId":T,"X-Session-Type":c}},r=await fetch(e,t);if(!r.ok)throw new Error(n("fetchLimitDefError"));const s=await r.json(),a=["Deposit","Loss","Wagering"],o=s.limits.map((e=>e.type));i(12,O=Array.from(new Set(o)).filter((e=>a.includes(e)))),N||i(14,N=O[0]);const l=s.limits.filter((e=>e.type===N));return l.length>0?l:[]}catch(e){throw e}})(),0===x.length)return i(7,D=!1),void i(9,o=!0);i(11,P=[]);const e={Daily:0,Weekly:1,Monthly:2};x.forEach((e=>{-1===P.indexOf(`${e.period} - ${e.products[0]}`)&&P.push(`${e.period} - ${e.products[0]}`)})),i(11,P=P.sort(((t,i)=>e[t.split(" ")[0]]-e[i.split(" ")[0]]))),I(x[0])}catch(e){return i(7,D=!1),void Y(e.message)}},F=(e,t)=>{i(13,C=`${e.limitPeriod} - ${e.limitProducts[0]}`);const n=$(t.id,t.schedules);i(10,A={totalAmount:e.limitAmount,spentAmount:e.spentBalance.amount.toFixed(2),limitCurrency:e.limitCurrency,remainingAmount:(e.limitAmount-e.spentBalance.amount).toFixed(2),limitPeriod:e.limitPeriod,limitProducts:e.limitProducts[0]}),n&&i(10,A.formattedSchedule=n,A),G(A)},G=e=>{const t=180/e.totalAmount*parseFloat(e.spentAmount),n=setInterval((()=>{Math.abs(R-t)<1.5?(i(15,R=t),clearInterval(n)):i(15,R+=R<t?1.5:-1.5),
|
|
1232
|
+
// Boundary checks to ensure gaugeValue stays within [0, 180]
|
|
1233
|
+
i(15,R=Math.min(180,Math.max(0,R))),R===t&&clearInterval(n)}));i(8,H=!1)},$=(e,t)=>{const i=t.find((t=>t.playerLimitId===e));return i?{updateAmount:i.updateAmount,expires:i.applyAt,expiresString:(n=i.applyAt,W(n).utc(!0).format(v||"DD/MM/YYYY HH:mm:ss")),id:i.id,isRemoved:i.updateAmount<1,isUpdated:i.updateAmount>0}:{updateAmount:"",expires:"",expiresString:"",id:"",isRemoved:!1,isUpdated:!1};var n},V=()=>{var e;e=y,ri.set(e)};
|
|
1234
|
+
/**
|
|
1235
|
+
* Handles errors by updating the error message.
|
|
1236
|
+
* @param error - The error message to be handled.
|
|
1237
|
+
*/return e.$$set=e=>{"session"in e&&i(21,l=e.session),"sessiontype"in e&&i(0,c=e.sessiontype),"userid"in e&&i(22,h=e.userid),"endpoint"in e&&i(23,d=e.endpoint),"transdetailsurl"in e&&i(1,m=e.transdetailsurl),"transactionspageurl"in e&&i(2,f=e.transactionspageurl),"clientstyling"in e&&i(3,p=e.clientstyling),"clientstylingurl"in e&&i(4,g=e.clientstylingurl),"lang"in e&&i(24,y=e.lang),"translationurl"in e&&i(25,_=e.translationurl),"datetimeformat"in e&&i(26,v=e.datetimeformat)},e.$$.update=()=>{/*isMounted, session, userid*/140509184&e.$$.dirty[0]&&w&&l&&h&&(i(28,L=!0),T=l,S=h),/*isMounted, isLoggedIn*/402653184&e.$$.dirty[0]&&w&&L&&U(),/*clientstyling, customStylingContainer*/40&e.$$.dirty[0]&&p&&a&&(()=>{let e=document.createElement("style");e.innerHTML=p,a.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/48&e.$$.dirty[0]&&g&&a&&(()=>{i(6,b=!0);let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{a.appendChild(t)}),1),setTimeout((()=>{i(6,b=!1)}),500)}))})(),/*lang*/16777216&e.$$.dirty[0]&&y&&V(),/*translationurl*/33554432&e.$$.dirty[0]&&_&&(()=>{let e=new URL(_);fetch(e.href).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Si(t,e[t])}))})).catch((e=>{console.log(e)}))})()},[c,m,f,p,g,a,b,D,H,o,A,P,O,C,N,R,B,n,e=>{switch(e){case"Deposit":return n("depositLimitHeader");case"Loss":return n("lossLimitHeader");case"Wagering":return n("wageringLimitHeader");default:return""}},()=>{let e=x.find((e=>`${e.period} - ${e.products[0]}`===C));I(e)},U,l,h,d,y,_,v,w,L,function(){C=E(this),i(13,C),i(11,P)},function(){N=E(this),i(14,N),i(12,O)},function(e){k[e?"unshift":"push"]((()=>{a=e,i(5,a)}))}]}!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",class extends G{constructor(e){super();const t=document.createElement("style");t.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(t),F(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},Pi,Ai,s,{clientstyling:1,clientstylingurl:2},null),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),R()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),R()}});class tn extends G{constructor(e){super();const t=document.createElement("style");t.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.DisplayNone{display:none}.ContainerCenter{width:100%;display:flex;justify-content:center;align-items:center;min-height:219px}.ErrorMessage{margin:0 15px;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.LimitsContainer{display:flex;width:100%;max-width:620px;min-height:150px;border:1px solid var(--emw--color-contrast, #07072A);border-radius:20px;overflow:hidden;box-shadow:0.6em 0.6em 0.4em var(--emw--color-gray-150, #a9b6ce)}.ContentLeft{padding:1rem;width:318px;line-height:20px}.LimitTypeHeader{display:flex;align-items:center;color:var(--emw--color-gray-150, #a9b6ce);margin-bottom:20px;gap:5px}.HeaderIcon{height:20px;width:20px;color:var(--emw--color-gray-150, #a9b6ce)}.DetailsContainer{margin-bottom:15px;display:inline}.DetailsContainer span{float:left;clear:both}.ContentRight{min-width:300px;padding:1rem;display:flex;justify-content:center;flex-direction:column}.AmountContainer{padding:0.3rem;font-size:xx-large;text-align:center;border:1px solid var(--emw--color-contrast, #07072A);border-radius:20px;box-shadow:0.16em 0.16em 0.1em var(--emw--color-gray-150, #a9b6ce);background-color:#F5F5F5}.TextContainer{display:inline-block;padding-left:5px}.TextContainer p{width:100%;display:block;clear:both;font-weight:bold}.ExtraInfoContainer{padding:1rem 0;color:var(--emfe-w-color-red, #ed0909)}.UsefulLinksSection{padding-top:5px}.UsefulLinksSection a{float:left;clear:both;color:var(--emw--color-contrast, #07072A)}.WidgetFooterControls{display:flex}.ControlContainer label{display:inline-block;width:100%;font-size:12px;font-weight:bold}.TextIcon{color:var(--emw--color-primary, #D0046C)}.Gauge{width:100%;font-family:"Roboto", sans-serif;font-size:32px;color:black;margin:1rem 0}.GaugeBody{width:100%;position:relative;text-align:center;padding:23px;padding-bottom:0}.Archbg{position:absolute;right:0;bottom:0}.GaugeFill{--p:0deg;--b:25px;border-radius:500px 500px 0 0;background:var(--emw--gauge-fill-bg, var(--emw--color-primary, #D0046C));mask:radial-gradient(farthest-side at bottom, transparent calc(100% - var(--b) - 1px), #fff calc(100% - var(--b))), linear-gradient(var(--p), #fff 50%, transparent 0) top/100% 200%;-webkit-mask:radial-gradient(farthest-side at bottom, transparent calc(100% - var(--b) - 1px), #fff calc(100% - var(--b))), linear-gradient(var(--p), #fff 50%, transparent 0) top/100% 200%;mask-composite:intersect;-webkit-mask-composite:destination-in}.GaugeFill::before{content:"";display:block;padding-top:50%}.GaugeCover{position:absolute;left:0;right:0;top:50%;font-size:20px}.GaugeNeedle{width:0.2rem;height:3.5rem;background:linear-gradient(0deg, #000000 0, #000000 55%, #c5c5c5 55%, #c5c5c5 90%, #000000 90%, #000000 100%);display:inline-block;left:49.5%;position:absolute;bottom:0.1rem;transform:var(--transform-needle-value);transform-origin:bottom}.GaugeNeedleCover{width:60px;height:30px;border-radius:150px 150px 0 0;background:var(--emw--color-black, #000000);background:radial-gradient(circle at 50% 100%, var(--emw--color-black, #000000) 0%, var(--emw--color-black, #000000) 25%, #fff 25%, #fff 40%, var(--emw--color-primary, #D0046C) 40%);position:absolute;bottom:0;left:50%;border:4px solid var(--emw--color-white, #FFFFFF);border-bottom:0;transform:translateX(-50%)}.MinMaxContainer{display:flex;justify-content:space-between}',this.shadowRoot.appendChild(t),F(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},en,Qi,s,{session:21,sessiontype:0,userid:22,endpoint:23,transdetailsurl:1,transactionspageurl:2,clientstyling:3,clientstylingurl:4,lang:24,translationurl:25,datetimeformat:26},null,[-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["session","sessiontype","userid","endpoint","transdetailsurl","transactionspageurl","clientstyling","clientstylingurl","lang","translationurl","datetimeformat"]}get session(){return this.$$.ctx[21]}set session(e){this.$$set({session:e}),R()}get sessiontype(){return this.$$.ctx[0]}set sessiontype(e){this.$$set({sessiontype:e}),R()}get userid(){return this.$$.ctx[22]}set userid(e){this.$$set({userid:e}),R()}get endpoint(){return this.$$.ctx[23]}set endpoint(e){this.$$set({endpoint:e}),R()}get transdetailsurl(){return this.$$.ctx[1]}set transdetailsurl(e){this.$$set({transdetailsurl:e}),R()}get transactionspageurl(){return this.$$.ctx[2]}set transactionspageurl(e){this.$$set({transactionspageurl:e}),R()}get clientstyling(){return this.$$.ctx[3]}set clientstyling(e){this.$$set({clientstyling:e}),R()}get clientstylingurl(){return this.$$.ctx[4]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),R()}get lang(){return this.$$.ctx[24]}set lang(e){this.$$set({lang:e}),R()}get translationurl(){return this.$$.ctx[25]}set translationurl(e){this.$$set({translationurl:e}),R()}get datetimeformat(){return this.$$.ctx[26]}set datetimeformat(e){this.$$set({datetimeformat:e}),R()}}return!customElements.get("player-rglimits")&&customElements.define("player-rglimits",tn),tn}));
|
|
1220
1238
|
//# sourceMappingURL=player-rglimits.js.map
|