@everymatrix/casino-footer-v2 0.0.348 → 0.0.349
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/casino-footer-v2.js +917 -934
- package/dist/casino-footer-v2.js.map +1 -1
- package/package.json +2 -2
package/dist/casino-footer-v2.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function r(e){e.forEach(t)}function i(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s,a;function l(e,t){return s||(s=document.createElement("a")),s.href=t,e===s.href}function u(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@everymatrix/panic-button")):"function"==typeof define&&define.amd?define(["@everymatrix/panic-button"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).app=t()}(this,(function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function r(e){e.forEach(t)}function i(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let s,a;function l(e,t){return s||(s=document.createElement("a")),s.href=t,e===s.href}function u(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(t){return t&&i(t.destroy)?t.destroy:e}function h(e,t){e.appendChild(t)}function d(e,t,n){e.insertBefore(t,n||null)}function f(e){e.parentNode.removeChild(e)}function p(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function m(e){return document.createElement(e)}function g(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function y(e){return document.createTextNode(e)}function _(){return y(" ")}function b(){return y("")}function v(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function w(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:w(e,t,n)}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t){for(let n=0;n<e.options.length;n+=1){const r=e.options[n];if(r.__value===t)return void(r.selected=!0)}e.selectedIndex=-1}function k(e){const t={};for(const n of e)t[n.name]=n.value;return t}function M(e){a=e}function D(e){(function(){if(!a)throw new Error("Function called outside component initialization");return a})().$$.on_mount.push(e)}const x=[],O=[],L=[],A=[],H=Promise.resolve();let I=!1;function P(e){L.push(e)}
|
2
2
|
// flush() calls callbacks in this order:
|
3
3
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
4
4
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
@@ -17,55 +17,55 @@
|
|
17
17
|
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
18
18
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
19
19
|
// function, guarantees this behavior.
|
20
|
-
const
|
21
|
-
function
|
20
|
+
const F=new Set;let N=0;// Do *not* move this inside the flush() function
|
21
|
+
function C(){const e=a;do{
|
22
22
|
// first, call beforeUpdate functions
|
23
23
|
// and update components
|
24
|
-
for(;N<
|
24
|
+
for(;N<x.length;){const e=x[N];N++,M(e),R(e.$$)}for(M(null),x.length=0,N=0;O.length;)O.pop()();
|
25
25
|
// then, once components are updated, call
|
26
26
|
// afterUpdate functions. This may cause
|
27
27
|
// subsequent updates...
|
28
|
-
for(let e=0;e<
|
28
|
+
for(let e=0;e<L.length;e+=1){const t=L[e];F.has(t)||(
|
29
29
|
// ...so guard against infinite loops
|
30
|
-
|
30
|
+
F.add(t),t())}L.length=0}while(x.length);for(;A.length;)A.pop()();I=!1,F.clear(),M(e)}function R(e){if(null!==e.fragment){e.update(),r(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(P)}}const $=new Set;const B="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Y(e,t){-1===e.$$.dirty[0]&&(x.push(e),I||(I=!0,H.then(C)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function U(o,s,l,u,c,h,d,p=[-1]){const m=a;M(o);const g=o.$$={fragment:null,ctx:null,
|
31
31
|
// state
|
32
32
|
props:h,update:e,not_equal:c,bound:n(),
|
33
33
|
// lifecycle
|
34
34
|
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(m?m.$$.context:[])),
|
35
35
|
// everything else
|
36
|
-
callbacks:n(),dirty:
|
36
|
+
callbacks:n(),dirty:p,skip_bound:!1,root:s.target||m.$$.root};d&&d(g.root);let y=!1;if(g.ctx=l?l(o,s.props||{},((e,t,...n)=>{const r=n.length?n[0]:t;return g.ctx&&c(g.ctx[e],g.ctx[e]=r)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](r),y&&Y(o,e)),t})):[],g.update(),y=!0,r(g.before_update),
|
37
37
|
// `false` as a special case of no DOM component
|
38
38
|
g.fragment=!!u&&u(g.ctx),s.target){if(s.hydrate){const e=function(e){return Array.from(e.childNodes)}(s.target);
|
39
39
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
40
|
-
g.fragment&&g.fragment.l(e),e.forEach(
|
40
|
+
g.fragment&&g.fragment.l(e),e.forEach(f)}else
|
41
41
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
42
|
-
g.fragment&&g.fragment.c();s.intro&&((
|
42
|
+
g.fragment&&g.fragment.c();s.intro&&((_=o.$$.fragment)&&_.i&&($.delete(_),_.i(b))),function(e,n,o,s){const{fragment:a,on_mount:l,on_destroy:u,after_update:c}=e.$$;a&&a.m(n,o),s||
|
43
43
|
// onMount happens before the initial afterUpdate
|
44
|
-
|
44
|
+
P((()=>{const n=l.map(t).filter(i);u?u.push(...n):
|
45
45
|
// Edge case - component was destroyed immediately,
|
46
46
|
// most likely as a result of a binding initialising
|
47
|
-
r(n),e.$$.on_mount=[]})),c.forEach(
|
47
|
+
r(n),e.$$.on_mount=[]})),c.forEach(P)}(o,s.target,s.anchor,s.customElement),C()}var _,b;M(m)}let G;
|
48
48
|
/* ../casino-footer-thumbnail/src/CasinoFooterThumbnail.svelte generated by Svelte v3.48.0 */
|
49
|
-
function
|
49
|
+
function j(e){let t,n,r,i,o,s,a;return{c(){t=m("div"),n=m("a"),r=m("img"),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*sociallinkimage*/e[16])||w(r,"src",i),w(r,"title",/*sociallinktitle*/e[17]),w(n,"class",o="FooterLink "+(/*sociallinkurl*/e[15]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",s="FooterLink "+(/*sociallinkurl*/e[15]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"href",/*sociallinkurl*/e[15]),w(n,"target",a=/*target*/e[18]?/*target*/e[18]:"_blank"),w(t,"class","FooterItem SocialItem"),w(t,"part","FooterItem SocialItem")},m(e,i){d(e,t,i),h(t,n),h(n,r)},p(e,t){/*sociallinkimage*/65536&t&&!l(r.src,i=/*sociallinkimage*/e[16])&&w(r,"src",i),/*sociallinktitle*/131072&t&&w(r,"title",/*sociallinktitle*/e[17]),/*sociallinkurl*/32768&t&&o!==(o="FooterLink "+(/*sociallinkurl*/e[15]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",o),/*sociallinkurl*/32768&t&&s!==(s="FooterLink "+(/*sociallinkurl*/e[15]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",s),/*sociallinkurl*/32768&t&&w(n,"href",/*sociallinkurl*/e[15]),/*target*/262144&t&&a!==(a=/*target*/e[18]?/*target*/e[18]:"_blank")&&w(n,"target",a)},d(e){e&&f(t)}}}
|
50
50
|
// (67:25)
|
51
|
-
function
|
51
|
+
function V(e){let t,n,r,i,o,s;return{c(){t=m("div"),n=m("a"),r=m("img"),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*licenseimage*/e[13])||w(r,"src",i),w(r,"title",/*licensetitle*/e[14]),w(n,"class",o="FooterLink "+(/*licenseurl*/e[12]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",s="FooterLink "+(/*licenseurl*/e[12]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"href",/*licenseurl*/e[12]),w(n,"target","_blank"),w(t,"class","FooterItem"),w(t,"part","FooterItem")},m(e,i){d(e,t,i),h(t,n),h(n,r)},p(e,t){/*licenseimage*/8192&t&&!l(r.src,i=/*licenseimage*/e[13])&&w(r,"src",i),/*licensetitle*/16384&t&&w(r,"title",/*licensetitle*/e[14]),/*licenseurl*/4096&t&&o!==(o="FooterLink "+(/*licenseurl*/e[12]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",o),/*licenseurl*/4096&t&&s!==(s="FooterLink "+(/*licenseurl*/e[12]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",s),/*licenseurl*/4096&t&&w(n,"href",/*licenseurl*/e[12])},d(e){e&&f(t)}}}
|
52
52
|
// (58:28)
|
53
|
-
function
|
53
|
+
function W(e){let t,n,r,i,o,s,a,u,c=/*helperlinktitle*/e[11]&&K(e);return{c(){t=m("div"),n=m("a"),r=m("img"),o=_(),c&&c.c(),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*helperlinkimage*/e[10])||w(r,"src",i),w(r,"title",/*helperlinktitle*/e[11]),w(n,"class",s=/*helperlinktitle*/(e[11]?"FooterHelperLink":"")+" "+(/*helperlinkurl*/e[9]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",a=/*helperlinktitle*/(e[11]?"FooterHelperLink":"")+" "+(/*helperlinkurl*/e[9]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"href",/*helperlinkurl*/e[9]),w(n,"target",/*target*/e[18]),w(t,"class",u="FooterItem HelperLinkItem "+(/*displaycolumn*/"true"==e[19]?"DisplayColumn":"")),w(t,"part","FooterItem HelperLinkItem")},m(e,i){d(e,t,i),h(t,n),h(n,r),h(n,o),c&&c.m(n,null)},p(e,o){/*helperlinkimage*/1024&o&&!l(r.src,i=/*helperlinkimage*/e[10])&&w(r,"src",i),/*helperlinktitle*/2048&o&&w(r,"title",/*helperlinktitle*/e[11]),/*helperlinktitle*/e[11]?c?c.p(e,o):(c=K(e),c.c(),c.m(n,null)):c&&(c.d(1),c=null),/*helperlinktitle, helperlinkurl*/2560&o&&s!==(s=/*helperlinktitle*/(e[11]?"FooterHelperLink":"")+" "+(/*helperlinkurl*/e[9]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",s),/*helperlinktitle, helperlinkurl*/2560&o&&a!==(a=/*helperlinktitle*/(e[11]?"FooterHelperLink":"")+" "+(/*helperlinkurl*/e[9]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",a),/*helperlinkurl*/512&o&&w(n,"href",/*helperlinkurl*/e[9]),/*target*/262144&o&&w(n,"target",/*target*/e[18]),/*displaycolumn*/524288&o&&u!==(u="FooterItem HelperLinkItem "+(/*displaycolumn*/"true"==e[19]?"DisplayColumn":""))&&w(t,"class",u)},d(e){e&&f(t),c&&c.d()}}}
|
54
54
|
// (52:25)
|
55
|
-
function
|
55
|
+
function z(e){let t,n,r,i,o,s;return{c(){t=m("div"),n=m("a"),r=m("img"),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*vendorimage*/e[7])||w(r,"src",i),w(r,"title",/*vendortitle*/e[8]),w(n,"href",/*vendorurl*/e[6]),w(n,"class",o=/*vendorurl*/(e[6]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",s=/*vendorurl*/(e[6]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"target","_blank"),w(t,"class","FooterItem GameVendorItem"),w(t,"part","FooterItem GameVendorItem")},m(e,i){d(e,t,i),h(t,n),h(n,r)},p(e,t){/*vendorimage*/128&t&&!l(r.src,i=/*vendorimage*/e[7])&&w(r,"src",i),/*vendortitle*/256&t&&w(r,"title",/*vendortitle*/e[8]),/*vendorurl*/64&t&&w(n,"href",/*vendorurl*/e[6]),/*vendorurl*/64&t&&o!==(o=/*vendorurl*/(e[6]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",o),/*vendorurl*/64&t&&s!==(s=/*vendorurl*/(e[6]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",s)},d(e){e&&f(t)}}}
|
56
56
|
// (43:25)
|
57
|
-
function
|
57
|
+
function Z(e){let t,n,r,i,o,s,a,u=/*paymenttitle*/e[5]&&q(e);return{c(){t=m("div"),n=m("a"),r=m("img"),o=_(),u&&u.c(),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*paymentimage*/e[4])||w(r,"src",i),w(r,"title",/*paymenttitle*/e[5]),w(n,"class",s=/*paymenttitle*/(e[5]?"FooterPaymentLink":"")+" "+(/*paymenturl*/e[3]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",a=/*paymenttitle*/(e[5]?"FooterPaymentLink":"")+" "+(/*paymenturl*/e[3]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"href",/*paymenturl*/e[3]),w(n,"target","_blank"),w(t,"class","FooterItem PaymentItem"),w(t,"part","FooterItem PaymentItem")},m(e,i){d(e,t,i),h(t,n),h(n,r),h(n,o),u&&u.m(n,null)},p(e,t){/*paymentimage*/16&t&&!l(r.src,i=/*paymentimage*/e[4])&&w(r,"src",i),/*paymenttitle*/32&t&&w(r,"title",/*paymenttitle*/e[5]),/*paymenttitle*/e[5]?u?u.p(e,t):(u=q(e),u.c(),u.m(n,null)):u&&(u.d(1),u=null),/*paymenttitle, paymenturl*/40&t&&s!==(s=/*paymenttitle*/(e[5]?"FooterPaymentLink":"")+" "+(/*paymenturl*/e[3]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",s),/*paymenttitle, paymenturl*/40&t&&a!==(a=/*paymenttitle*/(e[5]?"FooterPaymentLink":"")+" "+(/*paymenturl*/e[3]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",a),/*paymenturl*/8&t&&w(n,"href",/*paymenturl*/e[3])},d(e){e&&f(t),u&&u.d()}}}
|
58
58
|
// (34:2) {#if sponsorimage}
|
59
|
-
function
|
59
|
+
function X(e){let t,n,r,i,o,s,a,u=/*sponsortitle*/e[2]&&J(e);return{c(){t=m("div"),n=m("a"),r=m("img"),o=_(),u&&u.c(),w(r,"class","FooterImage"),w(r,"part","FooterImage"),l(r.src,i=/*sponsorimage*/e[1])||w(r,"src",i),w(r,"title",/*sponsorimage*/e[1]),w(n,"class",s=/*sponsortitle*/(e[2]?"FooterSponsorLink":"")+" "+(/*sponsorurl*/e[0]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"part",a=/*sponsortitle*/(e[2]?"FooterSponsorLink":"")+" "+(/*sponsorurl*/e[0]?"":"FooterLinkDisabled")+" FooterItemAnchor"),w(n,"href",/*sponsorurl*/e[0]),w(n,"target","_blank"),w(t,"class","FooterItem SponsorItem"),w(t,"part","FooterItem SponsorItem")},m(e,i){d(e,t,i),h(t,n),h(n,r),h(n,o),u&&u.m(n,null)},p(e,t){/*sponsorimage*/2&t&&!l(r.src,i=/*sponsorimage*/e[1])&&w(r,"src",i),/*sponsorimage*/2&t&&w(r,"title",/*sponsorimage*/e[1]),/*sponsortitle*/e[2]?u?u.p(e,t):(u=J(e),u.c(),u.m(n,null)):u&&(u.d(1),u=null),/*sponsortitle, sponsorurl*/5&t&&s!==(s=/*sponsortitle*/(e[2]?"FooterSponsorLink":"")+" "+(/*sponsorurl*/e[0]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"class",s),/*sponsortitle, sponsorurl*/5&t&&a!==(a=/*sponsortitle*/(e[2]?"FooterSponsorLink":"")+" "+(/*sponsorurl*/e[0]?"":"FooterLinkDisabled")+" FooterItemAnchor")&&w(n,"part",a),/*sponsorurl*/1&t&&w(n,"href",/*sponsorurl*/e[0])},d(e){e&&f(t),u&&u.d()}}}
|
60
60
|
// (62:8) {#if helperlinktitle}
|
61
|
-
function
|
61
|
+
function K(e){let t,n;return{c(){t=m("p"),n=y(/*helperlinktitle*/e[11]),w(t,"class","HelperTitle"),w(t,"part","HelperTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*helperlinktitle*/2048&t&&T(n,/*helperlinktitle*/e[11])},d(e){e&&f(t)}}}
|
62
62
|
// (47:8) {#if paymenttitle}
|
63
|
-
function
|
63
|
+
function q(e){let t,n;return{c(){t=m("p"),n=y(/*paymenttitle*/e[5]),w(t,"class","PaymentTitle"),w(t,"part","PaymentTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*paymenttitle*/32&t&&T(n,/*paymenttitle*/e[5])},d(e){e&&f(t)}}}
|
64
64
|
// (38:8) {#if sponsortitle}
|
65
|
-
function
|
66
|
-
return e[1]?
|
67
|
-
/*div_binding*/,t[22](n)},p(e,[t]){i===(i=r(e))&&o?o.p(e,t):(o&&o.d(1),o=i&&i(e),o&&(o.c(),o.m(n,null)))},i:e,o:e,d(e){e&&
|
68
|
-
/*div_binding*/,t[22](null)}}}function
|
65
|
+
function J(e){let t,n;return{c(){t=m("p"),n=y(/*sponsortitle*/e[2]),w(t,"class","SponsorTitle"),w(t,"part","SponsorTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*sponsortitle*/4&t&&T(n,/*sponsortitle*/e[2])},d(e){e&&f(t)}}}function Q(t){let n;function r(e,t){/*sponsorimage*/
|
66
|
+
return e[1]?X:/*paymentimage*/e[4]?Z:/*vendorimage*/e[7]?z:/*helperlinkimage*/e[10]?W:/*licenseimage*/e[13]?V:/*sociallinkimage*/e[16]?j:void 0}let i=r(t),o=i&&i(t);return{c(){n=m("div"),o&&o.c(),this.c=e,w(n,"class","ThumbnailContainer"),w(n,"part","ThumbnailContainer")},m(e,r){d(e,n,r),o&&o.m(n,null)
|
67
|
+
/*div_binding*/,t[22](n)},p(e,[t]){i===(i=r(e))&&o?o.p(e,t):(o&&o.d(1),o=i&&i(e),o&&(o.c(),o.m(n,null)))},i:e,o:e,d(e){e&&f(n),o&&o.d()
|
68
|
+
/*div_binding*/,t[22](null)}}}function ee(e,t,n){let r,{sponsorurl:i=""}=t,{sponsorimage:o=""}=t,{sponsortitle:s=""}=t,{paymenturl:a=""}=t,{paymentimage:l=""}=t,{paymenttitle:u=""}=t,{vendorurl:c=""}=t,{vendorimage:h=""}=t,{vendortitle:d=""}=t,{helperlinkurl:f=""}=t,{helperlinkimage:p=""}=t,{helperlinktitle:m=""}=t,{licenseurl:g=""}=t,{licenseimage:y=""}=t,{licensetitle:_=""}=t,{sociallinkurl:b=""}=t,{sociallinkimage:v=""}=t,{sociallinktitle:w=""}=t,{clientstyling:E=""}=t,{target:T="_self"}=t,{displaycolumn:S=""}=t;return e.$$set=e=>{"sponsorurl"in e&&n(0,i=e.sponsorurl),"sponsorimage"in e&&n(1,o=e.sponsorimage),"sponsortitle"in e&&n(2,s=e.sponsortitle),"paymenturl"in e&&n(3,a=e.paymenturl),"paymentimage"in e&&n(4,l=e.paymentimage),"paymenttitle"in e&&n(5,u=e.paymenttitle),"vendorurl"in e&&n(6,c=e.vendorurl),"vendorimage"in e&&n(7,h=e.vendorimage),"vendortitle"in e&&n(8,d=e.vendortitle),"helperlinkurl"in e&&n(9,f=e.helperlinkurl),"helperlinkimage"in e&&n(10,p=e.helperlinkimage),"helperlinktitle"in e&&n(11,m=e.helperlinktitle),"licenseurl"in e&&n(12,g=e.licenseurl),"licenseimage"in e&&n(13,y=e.licenseimage),"licensetitle"in e&&n(14,_=e.licensetitle),"sociallinkurl"in e&&n(15,b=e.sociallinkurl),"sociallinkimage"in e&&n(16,v=e.sociallinkimage),"sociallinktitle"in e&&n(17,w=e.sociallinktitle),"clientstyling"in e&&n(21,E=e.clientstyling),"target"in e&&n(18,T=e.target),"displaycolumn"in e&&n(19,S=e.displaycolumn)},e.$$.update=()=>{/*clientstyling*/2097152&e.$$.dirty&&E&&(()=>{let e=document.createElement("style");e.innerHTML=E,r.appendChild(e)})()},[i,o,s,a,l,u,c,h,d,f,p,m,g,y,_,b,v,w,T,S,r,E,function(e){O[e?"unshift":"push"]((()=>{r=e,n(20,r)}))}]}"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(i);
|
69
69
|
// @ts-ignore todo: improve typings
|
70
70
|
for(const e in this.$$.slotted)
|
71
71
|
// @ts-ignore todo: improve typings
|
@@ -76,620 +76,34 @@ n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(e,t){
|
|
76
76
|
// TODO should this delegate to addEventListener?
|
77
77
|
const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-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)}});
|
78
78
|
/* ../casino-footer-section/src/CasinoFooterSection.svelte generated by Svelte v3.48.0 */
|
79
|
-
function
|
79
|
+
function te(e,t,n){const r=e.slice();return r[25]=t[n],r}function ne(e,t,n){const r=e.slice();return r[25]=t[n],r}function re(e,t,n){const r=e.slice();return r[25]=t[n],r}function ie(e,t,n){const r=e.slice();return r[25]=t[n],r}function oe(e,t,n){const r=e.slice();return r[22]=t[n],r}function se(e,t,n){const r=e.slice();return r[19]=t[n],r}
|
80
80
|
// (75:51)
|
81
|
-
function
|
81
|
+
function ae(e){let t,n=/*footersociallinks*/e[14],r=[];for(let t=0;t<n.length;t+=1)r[t]=fe(te(e,n,t));return{c(){t=m("div");for(let e=0;e<r.length;e+=1)r[e].c();w(t,"class","FooterSectionInnerContainer"),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(/*footersociallinks, clientstyling, target*/16576&i[0]){let o;for(n=/*footersociallinks*/e[14],o=0;o<n.length;o+=1){const s=te(e,n,o);r[o]?r[o].p(s,i):(r[o]=fe(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){e&&f(t),p(r,e)}}}
|
82
82
|
// (69:49)
|
83
|
-
function
|
83
|
+
function le(e){let t,n=/*footerlicenses*/e[13],r=[];for(let t=0;t<n.length;t+=1)r[t]=pe(ne(e,n,t));return{c(){t=m("div");for(let e=0;e<r.length;e+=1)r[e].c();w(t,"class","FooterSectionInnerContainer"),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(/*footerlicenses, clientstyling, target*/8384&i[0]){let o;for(n=/*footerlicenses*/e[13],o=0;o<n.length;o+=1){const s=ne(e,n,o);r[o]?r[o].p(s,i):(r[o]=pe(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){e&&f(t),p(r,e)}}}
|
84
84
|
// (63:51)
|
85
|
-
function
|
85
|
+
function ue(e){let t,n,r=/*footerhelperlinks*/e[12],i=[];for(let t=0;t<r.length;t+=1)i[t]=me(re(e,r,t));return{c(){t=m("div");for(let e=0;e<i.length;e+=1)i[e].c();w(t,"class",n="FooterSectionInnerContainer "+(/*displaycolumn*/"true"==e[8]?"DisplayColumn":"")),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null)},p(e,o){if(/*footerhelperlinks, clientstyling, displaycolumn, target*/4544&o[0]){let n;for(r=/*footerhelperlinks*/e[12],n=0;n<r.length;n+=1){const s=re(e,r,n);i[n]?i[n].p(s,o):(i[n]=me(s),i[n].c(),i[n].m(t,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=r.length}/*displaycolumn*/256&o[0]&&n!==(n="FooterSectionInnerContainer "+(/*displaycolumn*/"true"==e[8]?"DisplayColumn":""))&&w(t,"class",n)},d(e){e&&f(t),p(i,e)}}}
|
86
86
|
// (57:47)
|
87
|
-
function
|
87
|
+
function ce(e){let t,n=/*footervendors*/e[11],r=[];for(let t=0;t<n.length;t+=1)r[t]=ge(ie(e,n,t));return{c(){t=m("div");for(let e=0;e<r.length;e+=1)r[e].c();w(t,"class","FooterSectionInnerContainer"),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(/*footervendors, clientstyling, target*/2240&i[0]){let o;for(n=/*footervendors*/e[11],o=0;o<n.length;o+=1){const s=ie(e,n,o);r[o]?r[o].p(s,i):(r[o]=ge(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){e&&f(t),p(r,e)}}}
|
88
88
|
// (51:48)
|
89
|
-
function
|
89
|
+
function he(e){let t,n=/*footerpayment*/e[10],r=[];for(let t=0;t<n.length;t+=1)r[t]=ye(oe(e,n,t));return{c(){t=m("div");for(let e=0;e<r.length;e+=1)r[e].c();w(t,"class","FooterSectionInnerContainer"),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(/*footerpayment, clientstyling, target*/1216&i[0]){let o;for(n=/*footerpayment*/e[10],o=0;o<n.length;o+=1){const s=oe(e,n,o);r[o]?r[o].p(s,i):(r[o]=ye(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){e&&f(t),p(r,e)}}}
|
90
90
|
// (45:2) {#if sponsorflag && footersponsors.length}
|
91
|
-
function
|
91
|
+
function de(e){let t,n=/*footersponsors*/e[9],r=[];for(let t=0;t<n.length;t+=1)r[t]=_e(se(e,n,t));return{c(){t=m("div");for(let e=0;e<r.length;e+=1)r[e].c();w(t,"class","FooterSectionInnerContainer"),w(t,"part","FooterSectionInnerContainer")},m(e,n){d(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(/*footersponsors, clientstyling, target*/704&i[0]){let o;for(n=/*footersponsors*/e[9],o=0;o<n.length;o+=1){const s=se(e,n,o);r[o]?r[o].p(s,i):(r[o]=_e(s),r[o].c(),r[o].m(t,null))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(e){e&&f(t),p(r,e)}}}
|
92
92
|
// (77:6) {#each footersociallinks as footerData}
|
93
|
-
function
|
93
|
+
function fe(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"sociallinkurl",n=/*footerData*/e[25].socialLinkUrl),E(t,"sociallinkimage",r=/*footerData*/e[25].socialLinkImage),E(t,"sociallinktitle",i=/*footerData*/e[25].socialLinkTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footersociallinks*/16384&o[0]&&n!==(n=/*footerData*/e[25].socialLinkUrl)&&E(t,"sociallinkurl",n),/*footersociallinks*/16384&o[0]&&r!==(r=/*footerData*/e[25].socialLinkImage)&&E(t,"sociallinkimage",r),/*footersociallinks*/16384&o[0]&&i!==(i=/*footerData*/e[25].socialLinkTitle)&&E(t,"sociallinktitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}
|
94
94
|
// (71:6) {#each footerlicenses as footerData}
|
95
|
-
function
|
95
|
+
function pe(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"licenseurl",n=/*footerData*/e[25].licenseUrl),E(t,"licenseimage",r=/*footerData*/e[25].licenseImage),E(t,"licensetitle",i=/*footerData*/e[25].licenseTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footerlicenses*/8192&o[0]&&n!==(n=/*footerData*/e[25].licenseUrl)&&E(t,"licenseurl",n),/*footerlicenses*/8192&o[0]&&r!==(r=/*footerData*/e[25].licenseImage)&&E(t,"licenseimage",r),/*footerlicenses*/8192&o[0]&&i!==(i=/*footerData*/e[25].licenseTitle)&&E(t,"licensetitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}
|
96
96
|
// (65:6) {#each footerhelperlinks as footerData}
|
97
|
-
function
|
97
|
+
function me(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"helperlinkurl",n=/*footerData*/e[25].helpLinkUrl),E(t,"helperlinkimage",r=/*footerData*/e[25].helpLinkImage),E(t,"helperlinktitle",i=/*footerData*/e[25].helpLinkTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"displaycolumn",/*displaycolumn*/e[8]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footerhelperlinks*/4096&o[0]&&n!==(n=/*footerData*/e[25].helpLinkUrl)&&E(t,"helperlinkurl",n),/*footerhelperlinks*/4096&o[0]&&r!==(r=/*footerData*/e[25].helpLinkImage)&&E(t,"helperlinkimage",r),/*footerhelperlinks*/4096&o[0]&&i!==(i=/*footerData*/e[25].helpLinkTitle)&&E(t,"helperlinktitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*displaycolumn*/256&o[0]&&E(t,"displaycolumn",/*displaycolumn*/e[8]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}
|
98
98
|
// (59:6) {#each footervendors as footerData}
|
99
|
-
function
|
99
|
+
function ge(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"vendorurl",n=/*footerData*/e[25].gameVendorUrl),E(t,"vendorimage",r=/*footerData*/e[25].gameVendorImage),E(t,"vendortitle",i=/*footerData*/e[25].gameVendorTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footervendors*/2048&o[0]&&n!==(n=/*footerData*/e[25].gameVendorUrl)&&E(t,"vendorurl",n),/*footervendors*/2048&o[0]&&r!==(r=/*footerData*/e[25].gameVendorImage)&&E(t,"vendorimage",r),/*footervendors*/2048&o[0]&&i!==(i=/*footerData*/e[25].gameVendorTitle)&&E(t,"vendortitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}
|
100
100
|
// (53:4) {#each footerpayment as paymentData}
|
101
|
-
function
|
101
|
+
function ye(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"paymenturl",n=/*paymentData*/e[22].paymentMethodUrl),E(t,"paymentimage",r=/*paymentData*/e[22].paymentMethodImage),E(t,"paymenttitle",i=/*paymentData*/e[22].paymentMethodTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footerpayment*/1024&o[0]&&n!==(n=/*paymentData*/e[22].paymentMethodUrl)&&E(t,"paymenturl",n),/*footerpayment*/1024&o[0]&&r!==(r=/*paymentData*/e[22].paymentMethodImage)&&E(t,"paymentimage",r),/*footerpayment*/1024&o[0]&&i!==(i=/*paymentData*/e[22].paymentMethodTitle)&&E(t,"paymenttitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}
|
102
102
|
// (47:6) {#each footersponsors as sponsorData}
|
103
|
-
function
|
104
|
-
return e[0]&&/*footersponsors*/e[9].length?
|
105
|
-
/*div_binding*/,t[16](n)},p(e,t){i===(i=r(e))&&o?o.p(e,t):(o&&o.d(1),o=i&&i(e),o&&(o.c(),o.m(n,null)))},i:e,o:e,d(e){e&&
|
106
|
-
/*div_binding*/,t[16](null)}}}function
|
107
|
-
// Build a destructive iterator for the value list
|
108
|
-
function He(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Te&&(t[Symbol.iterator]=function(){return t}),t}function Ie(e){this.map={},e instanceof Ie?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Fe(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ce(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function $e(e){var t=new FileReader,n=Ce(t);return t.readAsArrayBuffer(e),n}function Ne(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Be(){return this.bodyUsed=!1,this._initBody=function(e){var t;
|
109
|
-
/*
|
110
|
-
fetch-mock wraps the Response object in an ES6 Proxy to
|
111
|
-
provide useful test harness features such as flush. However, on
|
112
|
-
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
113
|
-
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
114
|
-
on the object before the Proxy is created. This change ensures
|
115
|
-
Response.bodyUsed exists on the instance, while maintaining the
|
116
|
-
semantic of setting Request.bodyUsed in the constructor before
|
117
|
-
_initBody is called.
|
118
|
-
*/
|
119
|
-
this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:xe&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Me&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:ke&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():De&&xe&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ne(e.buffer),
|
120
|
-
// IE 10-11 can't handle a DataView body.
|
121
|
-
this._bodyInit=new Blob([this._bodyArrayBuffer])):De&&(ArrayBuffer.prototype.isPrototypeOf(e)||Oe(e))?this._bodyArrayBuffer=Ne(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):ke&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},xe&&(this.blob=function(){var e=Fe(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Fe(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then($e)}),this.text=function(){var e,t,n,r=Fe(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Ce(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Me&&(this.formData=function(){return this.text().then(Ue)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
122
|
-
// HTTP methods whose capitalization should be normalized
|
123
|
-
Ie.prototype.append=function(e,t){e=Ae(e),t=Pe(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Ie.prototype.delete=function(e){delete this.map[Ae(e)]},Ie.prototype.get=function(e){return e=Ae(e),this.has(e)?this.map[e]:null},Ie.prototype.has=function(e){return this.map.hasOwnProperty(Ae(e))},Ie.prototype.set=function(e,t){this.map[Ae(e)]=Pe(t)},Ie.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Ie.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),He(e)},Ie.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),He(e)},Ie.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),He(e)},Te&&(Ie.prototype[Symbol.iterator]=Ie.prototype.entries);var Re=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ye(e,t){if(!(this instanceof Ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(t=t||{}).body;if(e instanceof Ye){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ie(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Ie(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Re.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){
|
124
|
-
// Search for a '_' parameter in the query string
|
125
|
-
var o=/([?&])_=[^&]*/;if(o.test(this.url))
|
126
|
-
// If it already exists then set the value with the current time
|
127
|
-
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Ue(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Ge(e,t){if(!(this instanceof Ge))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Ie(t.headers),this.url=t.url||"",this._initBody(e)}Ye.prototype.clone=function(){return new Ye(this,{body:this._bodyInit})},Be.call(Ye.prototype),Be.call(Ge.prototype),Ge.prototype.clone=function(){return new Ge(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ie(this.headers),url:this.url})},Ge.error=function(){var e=new Ge(null,{status:0,statusText:""});return e.type="error",e};var je=[301,302,303,307,308];Ge.redirect=function(e,t){if(-1===je.indexOf(t))throw new RangeError("Invalid status code");return new Ge(null,{status:t,headers:{location:e}})};var Ve=Se.DOMException;try{new Ve}catch(e){(Ve=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Ve.prototype.constructor=Ve}function We(e,t){return new Promise((function(n,r){var i=new Ye(e,t);if(i.signal&&i.signal.aborted)return r(new Ve("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Ie,
|
128
|
-
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
129
|
-
// https://github.com/github/fetch/issues/748
|
130
|
-
// https://github.com/zloirock/core-js/issues/751
|
131
|
-
e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Ge(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Ve("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&Se.location.href?Se.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(xe?o.responseType="blob":De&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Ie?i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){o.setRequestHeader(e,Pe(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
|
132
|
-
// DONE (success or failure)
|
133
|
-
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}We.polyfill=!0,Se.fetch||(Se.fetch=We,Se.Headers=Ie,Se.Request=Ye,Se.Response=Ge);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ze(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
|
134
|
-
// the whatwg-fetch polyfill installs the fetch() function
|
135
|
-
// on the global object (window or self)
|
136
|
-
|
137
|
-
// Return that as the export for use in Webpack, Browserify etc.
|
138
|
-
var Ze=self.fetch.bind(self),Xe=function(e,t){return Xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Xe(e,t)};
|
139
|
-
/******************************************************************************
|
140
|
-
Copyright (c) Microsoft Corporation.
|
141
|
-
|
142
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
143
|
-
purpose with or without fee is hereby granted.
|
144
|
-
|
145
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
146
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
147
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
148
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
149
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
150
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
151
|
-
PERFORMANCE OF THIS SOFTWARE.
|
152
|
-
***************************************************************************** */
|
153
|
-
/* global Reflect, Promise */function Ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function qe(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Je(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Qe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function et(e){return"function"==typeof e}function tt(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var nt=tt((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function rt(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var it=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=qe(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(et(l))try{l()}catch(e){i=e instanceof nt?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=qe(u),h=c.next();!h.done;h=c.next()){var d=h.value;try{at(d)}catch(e){i=null!=i?i:[],e instanceof nt?i=Qe(Qe([],Je(i)),Je(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new nt(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)at(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&rt(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&rt(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ot=it.EMPTY;function st(e){return e instanceof it||e&&"closed"in e&&et(e.remove)&&et(e.add)&&et(e.unsubscribe)}function at(e){et(e)?e():e.unsubscribe()}var lt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ut={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ut.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Qe([e,t],Je(n))):setTimeout.apply(void 0,Qe([e,t],Je(n)))},clearTimeout:function(e){var t=ut.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ct(){}var ht=null;function dt(e){if(lt.useDeprecatedSynchronousErrorHandling){var t=!ht;if(t&&(ht={errorThrown:!1,error:null}),e(),t){var n=ht,r=n.errorThrown,i=n.error;if(ht=null,r)throw i}}else e()}var ft=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,st(t)&&t.add(n)):n.destination=_t,n}return Ke(t,e),t.create=function(e,t,n){return new yt(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(it),pt=Function.prototype.bind;function mt(e,t){return pt.call(e,t)}var gt=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){bt(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){bt(e)}else bt(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){bt(e)}},e}(),yt=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;et(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&<.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&mt(t.next,o),error:t.error&&mt(t.error,o),complete:t.complete&&mt(t.complete,o)}):i=t;return s.destination=new gt(i),s}return Ke(t,e),t}(ft);function bt(e){var t;t=e,ut.setTimeout((function(){throw t}))}var _t={closed:!0,next:ct,error:function(e){throw e},complete:ct},vt="function"==typeof Symbol&&Symbol.observable||"@@observable";function wt(e){return e}function Et(e){return 0===e.length?wt:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var St=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,o=(r=e)&&r instanceof ft||function(e){return e&&et(e.next)&&et(e.error)&&et(e.complete)}(r)&&st(r)?e:new yt(e,t,n);return dt((function(){var e=i,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=kt(t))((function(t,r){var i=new yt({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[vt]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Et(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=kt(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function kt(e){var t;return null!==(t=null!=e?e:lt.Promise)&&void 0!==t?t:Promise}var Tt=tt((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),xt=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Ke(t,e),t.prototype.lift=function(e){var t=new Mt(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Tt},t.prototype.next=function(e){var t=this;dt((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=qe(t.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;dt((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;dt((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?ot:(this.currentObservers=null,o.push(e),new it((function(){t.currentObservers=null,rt(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new St;return e.source=this,e},t.create=function(e,t){return new Mt(e,t)},t}(St),Mt=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Ke(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:ot},t}(xt),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},Lt=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Dt);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return Ke(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}},t}(xt);let Ot=[],At={};
|
154
|
-
/**
|
155
|
-
* @name topic
|
156
|
-
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
157
|
-
* @param event [String] Event name
|
158
|
-
* @param step [String] How many values to be buffed for new subscribers - default 0
|
159
|
-
* @returns ReplaySubject
|
160
|
-
*/
|
161
|
-
const Pt=[];
|
162
|
-
/**
|
163
|
-
* Create a `Writable` store that allows both updating and reading by subscription.
|
164
|
-
* @param {*=}value initial value
|
165
|
-
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
166
|
-
*/
|
167
|
-
function Ht(t,n=e){let r;const i=new Set;function s(e){if(o(t,e)&&(t=e,r)){// store is ready
|
168
|
-
const e=!Pt.length;for(const e of i)e[1](),Pt.push(e,t);if(e){for(let e=0;e<Pt.length;e+=2)Pt[e][0](Pt[e+1]);Pt.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return i.add(l),1===i.size&&(r=n(s)||e),o(t),()=>{i.delete(l),0===i.size&&(r(),r=null)}}}}function It(t,n,o){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return c=t=>{let o=!1;const c=[];let h=0,d=e;const f=()=>{if(h)return;d();const r=n(s?c[0]:c,t);l?t(r):d=i(r)?r:e},p=a.map(((e,t)=>u(e,(e=>{c[t]=e,h&=~(1<<t),o&&f()}),(()=>{h|=1<<t}))));return o=!0,f(),function(){r(p),d()}},{subscribe:Ht(o,c).subscribe};
|
169
|
-
/**
|
170
|
-
* Creates a `Readable` store that allows reading by subscription.
|
171
|
-
* @param value initial value
|
172
|
-
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
173
|
-
*/
|
174
|
-
var c}var Ft=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===Ct}(e)}
|
175
|
-
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
176
|
-
(e)};var Ct="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function $t(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ut((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Nt(e,t,n){return e.concat(t).map((function(e){return $t(e,n)}))}function Bt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Rt(e,t){try{return t in e}catch(e){return!1}}
|
177
|
-
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
178
|
-
function Yt(e,t,n){var r={};return n.isMergeableObject(e)&&Bt(e).forEach((function(t){r[t]=$t(e[t],n)})),Bt(t).forEach((function(i){(function(e,t){return Rt(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
179
|
-
})(e,i)||(Rt(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return Ut;var n=t.customMerge(e);return"function"==typeof n?n:Ut}(i,n)(e[i],t[i],n):r[i]=$t(t[i],n))})),r}function Ut(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Nt,n.isMergeableObject=n.isMergeableObject||Ft,
|
180
|
-
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
181
|
-
// implementations can use it. The caller may not replace it.
|
182
|
-
n.cloneUnlessOtherwiseSpecified=$t;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Yt(e,t,n):$t(t,n)}Ut.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ut(e,n,t)}),{})};var Gt=Ut,jt=function(e,t){return jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},jt(e,t)};function Vt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}jt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Wt,zt,Zt,Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xt.apply(this,arguments)};function Kt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}
|
183
|
-
/**
|
184
|
-
* Type Guards
|
185
|
-
*/
|
186
|
-
function qt(e){return e.type===zt.literal}function Jt(e){return e.type===zt.argument}function Qt(e){return e.type===zt.number}function en(e){return e.type===zt.date}function tn(e){return e.type===zt.time}function nn(e){return e.type===zt.select}function rn(e){return e.type===zt.plural}function on(e){return e.type===zt.pound}function sn(e){return e.type===zt.tag}function an(e){return!(!e||"object"!=typeof e||e.type!==Zt.number)}function ln(e){return!(!e||"object"!=typeof e||e.type!==Zt.dateTime)}
|
187
|
-
// @generated from regex-gen.ts
|
188
|
-
!function(e){
|
189
|
-
/** Argument is unclosed (e.g. `{0`) */
|
190
|
-
e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
191
|
-
/** Argument is empty (e.g. `{}`). */
|
192
|
-
e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
193
|
-
/** Argument is malformed (e.g. `{foo!}``) */
|
194
|
-
e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
195
|
-
/** Expect an argument type (e.g. `{foo,}`) */
|
196
|
-
e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
197
|
-
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
198
|
-
e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
199
|
-
/** Expect an argument style (e.g. `{foo, number, }`) */
|
200
|
-
e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
201
|
-
/** The number skeleton is invalid. */
|
202
|
-
e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
203
|
-
/** The date time skeleton is invalid. */
|
204
|
-
e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
205
|
-
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
206
|
-
e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
207
|
-
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
208
|
-
e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
209
|
-
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
210
|
-
e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
211
|
-
/** Missing select argument options (e.g. `{foo, select}`) */
|
212
|
-
e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
213
|
-
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
214
|
-
e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
215
|
-
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
216
|
-
e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
217
|
-
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
218
|
-
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
219
|
-
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
220
|
-
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
221
|
-
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
222
|
-
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
223
|
-
/**
|
224
|
-
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
225
|
-
* (e.g. `{foo, plural, one}`)
|
226
|
-
*/
|
227
|
-
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
228
|
-
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
229
|
-
e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
230
|
-
/**
|
231
|
-
* Duplicate selectors in `plural` or `selectordinal` argument.
|
232
|
-
* (e.g. {foo, plural, one {#} one {#}})
|
233
|
-
*/
|
234
|
-
e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
235
|
-
/** Duplicate selectors in `select` argument.
|
236
|
-
* (e.g. {foo, select, apple {apple} apple {apple}})
|
237
|
-
*/
|
238
|
-
e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
239
|
-
/** Plural or select argument option must have `other` clause. */
|
240
|
-
e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
241
|
-
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
242
|
-
e[e.INVALID_TAG=23]="INVALID_TAG",
|
243
|
-
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
244
|
-
e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
245
|
-
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
246
|
-
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
247
|
-
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
248
|
-
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Wt||(Wt={})),function(e){
|
249
|
-
/**
|
250
|
-
* Raw text
|
251
|
-
*/
|
252
|
-
e[e.literal=0]="literal",
|
253
|
-
/**
|
254
|
-
* Variable w/o any format, e.g `var` in `this is a {var}`
|
255
|
-
*/
|
256
|
-
e[e.argument=1]="argument",
|
257
|
-
/**
|
258
|
-
* Variable w/ number format
|
259
|
-
*/
|
260
|
-
e[e.number=2]="number",
|
261
|
-
/**
|
262
|
-
* Variable w/ date format
|
263
|
-
*/
|
264
|
-
e[e.date=3]="date",
|
265
|
-
/**
|
266
|
-
* Variable w/ time format
|
267
|
-
*/
|
268
|
-
e[e.time=4]="time",
|
269
|
-
/**
|
270
|
-
* Variable w/ select format
|
271
|
-
*/
|
272
|
-
e[e.select=5]="select",
|
273
|
-
/**
|
274
|
-
* Variable w/ plural format
|
275
|
-
*/
|
276
|
-
e[e.plural=6]="plural",
|
277
|
-
/**
|
278
|
-
* Only possible within plural argument.
|
279
|
-
* This is the `#` symbol that will be substituted with the count.
|
280
|
-
*/
|
281
|
-
e[e.pound=7]="pound",
|
282
|
-
/**
|
283
|
-
* XML-like tag
|
284
|
-
*/
|
285
|
-
e[e.tag=8]="tag"}(zt||(zt={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Zt||(Zt={}));var un=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,cn=/(?:[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;
|
286
|
-
/**
|
287
|
-
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
288
|
-
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
289
|
-
* with some tweaks
|
290
|
-
*/
|
291
|
-
/**
|
292
|
-
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
293
|
-
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
294
|
-
* @public
|
295
|
-
* @param skeleton skeleton string
|
296
|
-
*/
|
297
|
-
function hn(e){var t={};return e.replace(cn,(function(e){var n=e.length;switch(e[0]){
|
298
|
-
// Era
|
299
|
-
case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
|
300
|
-
// Year
|
301
|
-
case"y":t.year=2===n?"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");
|
302
|
-
// Quarter
|
303
|
-
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
304
|
-
// Month
|
305
|
-
case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;
|
306
|
-
// Week
|
307
|
-
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
308
|
-
// Weekday
|
309
|
-
case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;
|
310
|
-
// Period
|
311
|
-
case"a":// AM, PM
|
312
|
-
t.hour12=!0;break;case"b":// am, pm, noon, midnight
|
313
|
-
case"B":// flexible day periods
|
314
|
-
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
315
|
-
// Hour
|
316
|
-
case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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");
|
317
|
-
// Minute
|
318
|
-
case"m":t.minute=["numeric","2-digit"][n-1];break;
|
319
|
-
// Second
|
320
|
-
case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
321
|
-
// Zone
|
322
|
-
case"z":// 1..3, 4: specific non-location format
|
323
|
-
t.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
324
|
-
case"O":// 1, 4: miliseconds in day short, long
|
325
|
-
case"v":// 1, 4: generic non-location format
|
326
|
-
case"V":// 1, 2, 3, 4: time zone ID or city
|
327
|
-
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
328
|
-
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
329
|
-
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
330
|
-
// @generated from regex-gen.ts
|
331
|
-
var dn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var fn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,pn=/^(@+)?(\+|#+)?[rs]?$/g,mn=/(\*)(0+)|(#+)(0+)|(0+)/g,gn=/^(0+)$/;function yn(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(pn,(function(e,n,r){
|
332
|
-
// @@@ case
|
333
|
-
return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function bn(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 _n(e){
|
334
|
-
// Engineering
|
335
|
-
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 n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!gn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function vn(e){var t=bn(e);return t||{}}
|
336
|
-
/**
|
337
|
-
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
338
|
-
*/function wn(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=i.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=Xt(Xt(Xt({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return Xt(Xt({},e),vn(t))}),{}));continue;case"engineering":t=Xt(Xt(Xt({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return Xt(Xt({},e),vn(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
339
|
-
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
340
|
-
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(i.options[0]);continue;
|
341
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
342
|
-
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(mn,(function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
343
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
344
|
-
if(gn.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(fn.test(i.stem)){
|
345
|
-
// Precision
|
346
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
347
|
-
// precision-integer case
|
348
|
-
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(fn,(function(e,n,r,i,o,s){
|
349
|
-
// .000* case (before ICU67 it was .000+)
|
350
|
-
return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var o=i.options[0];
|
351
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
352
|
-
"w"===o?t=Xt(Xt({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Xt(Xt({},t),yn(o)))}
|
353
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
354
|
-
else if(pn.test(i.stem))t=Xt(Xt({},t),yn(i.stem));else{var s=bn(i.stem);s&&(t=Xt(Xt({},t),s));var a=_n(i.stem);a&&(t=Xt(Xt({},t),a))}}return t}
|
355
|
-
// @generated from time-data-gen.ts
|
356
|
-
// prettier-ignore
|
357
|
-
var En,Sn={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"]};
|
358
|
-
/**
|
359
|
-
* Returns the best matching date time pattern if a date time skeleton
|
360
|
-
* pattern is provided with a locale. Follows the Unicode specification:
|
361
|
-
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
362
|
-
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
363
|
-
* @param locale
|
364
|
-
*/
|
365
|
-
/**
|
366
|
-
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
367
|
-
* of the given `locale` to the corresponding time pattern.
|
368
|
-
* @param locale
|
369
|
-
*/
|
370
|
-
function kn(e){var t=e.hourCycle;if(void 0===t&&
|
371
|
-
// @ts-ignore hourCycle(s) is not identified yet
|
372
|
-
e.hourCycles&&
|
373
|
-
// @ts-ignore
|
374
|
-
e.hourCycles.length&&(
|
375
|
-
// @ts-ignore
|
376
|
-
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")}
|
377
|
-
// TODO: Once hourCycle is fully supported remove the following with data generation
|
378
|
-
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Sn[n||""]||Sn[r||""]||Sn["".concat(r,"-001")]||Sn["001"])[0]}var Tn=new RegExp("^".concat(un.source,"*")),xn=new RegExp("".concat(un.source,"*$"));function Mn(e,t){return{start:e,end:t}}
|
379
|
-
// #region Ponyfills
|
380
|
-
// Consolidate these variables up top for easier toggling during debugging
|
381
|
-
var Dn=!!String.prototype.startsWith,Ln=!!String.fromCodePoint,On=!!Object.fromEntries,An=!!String.prototype.codePointAt,Pn=!!String.prototype.trimStart,Hn=!!String.prototype.trimEnd,In=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Fn=!0;try{
|
382
|
-
/**
|
383
|
-
* legacy Edge or Xbox One browser
|
384
|
-
* Unicode flag support: supported
|
385
|
-
* Pattern_Syntax support: not supported
|
386
|
-
* See https://github.com/formatjs/formatjs/issues/2822
|
387
|
-
*/
|
388
|
-
Fn="a"===(null===(En=Gn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===En?void 0:En[0])}catch(e){Fn=!1}var Cn,$n=Dn?// Native
|
389
|
-
function(e,t,n){return e.startsWith(t,n)}:// For IE11
|
390
|
-
function(e,t,n){return e.slice(n,n+t.length)===t},Nn=Ln?String.fromCodePoint:// IE11
|
391
|
-
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,o=0;i>o;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Bn=
|
392
|
-
// native
|
393
|
-
On?Object.fromEntries:// Ponyfill
|
394
|
-
function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],s=i[1];t[o]=s}return t},Rn=An?// Native
|
395
|
-
function(e,t){return e.codePointAt(t)}:// IE 11
|
396
|
-
function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},Yn=Pn?// Native
|
397
|
-
function(e){return e.trimStart()}:// Ponyfill
|
398
|
-
function(e){return e.replace(Tn,"")},Un=Hn?// Native
|
399
|
-
function(e){return e.trimEnd()}:// Ponyfill
|
400
|
-
function(e){return e.replace(xn,"")};
|
401
|
-
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
402
|
-
function Gn(e,t){return new RegExp(e,t)}
|
403
|
-
// #endregion
|
404
|
-
if(Fn){
|
405
|
-
// Native
|
406
|
-
var jn=Gn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Cn=function(e,t){var n;return jn.lastIndex=t,null!==(n=jn.exec(e)[1])&&void 0!==n?n:""}}else
|
407
|
-
// IE11
|
408
|
-
Cn=function(e,t){for(var n=[];;){var r=Rn(e,t);if(void 0===r||Zn(r)||Xn(r))break;n.push(r),t+=r>=65536?2:1}return Nn.apply(void 0,n)};var Vn=/** @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,n){for(var r=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Wt.UNMATCHED_CLOSING_TAG,Mn(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Wn(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:zt.pound,location:Mn(s,this.clonePosition())})}}}return{val:r,err:null}},
|
409
|
-
/**
|
410
|
-
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
411
|
-
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
412
|
-
* are accepted:
|
413
|
-
*
|
414
|
-
* ```
|
415
|
-
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
416
|
-
* tagName ::= [a-z] (PENChar)*
|
417
|
-
* PENChar ::=
|
418
|
-
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
419
|
-
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
420
|
-
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
421
|
-
* ```
|
422
|
-
*
|
423
|
-
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
424
|
-
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
425
|
-
* since other tag-based engines like React allow it
|
426
|
-
*/
|
427
|
-
e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
|
428
|
-
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
429
|
-
// Self closing tag
|
430
|
-
return{val:{type:zt.literal,value:"<".concat(r,"/>"),location:Mn(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
431
|
-
// Expecting a close tag
|
432
|
-
if(this.bumpIf("</")){if(this.isEOF()||!Wn(this.char()))return this.error(Wt.INVALID_TAG,Mn(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Wt.UNMATCHED_CLOSING_TAG,Mn(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:zt.tag,value:r,children:o,location:Mn(n,this.clonePosition())},err:null}:this.error(Wt.INVALID_TAG,Mn(s,this.clonePosition())))}return this.error(Wt.UNCLOSED_TAG,Mn(n,this.clonePosition()))}return this.error(Wt.INVALID_TAG,Mn(n,this.clonePosition()))},
|
433
|
-
/**
|
434
|
-
* This method assumes that the caller has peeked ahead for the first tag character.
|
435
|
-
*/
|
436
|
-
e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
|
437
|
-
for(this.bump();!this.isEOF()&&zn(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=Mn(n,this.clonePosition());return{val:{type:zt.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Wn(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
438
|
-
/** See `parseTag` function docs. */},
|
439
|
-
/**
|
440
|
-
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
441
|
-
* a character that requires quoting (that is, "only where needed"), and works the same in
|
442
|
-
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
443
|
-
*/
|
444
|
-
e.prototype.tryParseQuote=function(e){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
445
|
-
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
446
|
-
// Check if is valid escaped character
|
447
|
-
switch(this.peek()){case 39/* `'` */:
|
448
|
-
// double quote, should return as a single quote.
|
449
|
-
return this.bump(),this.bump(),"'";
|
450
|
-
// '{', '<', '>', '}'
|
451
|
-
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
452
|
-
if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();// apostrophe
|
453
|
-
var t=[this.char()];// escaped char
|
454
|
-
// read chars until the optional closing apostrophe is found
|
455
|
-
for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
|
456
|
-
// Optional closing apostrophe.
|
457
|
-
this.bump();break}t.push(39),
|
458
|
-
// Bump one more time because we need to skip 2 characters.
|
459
|
-
this.bump()}else t.push(n);this.bump()}return Nn.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===t||"selectordinal"===t)||125/* `}` */===n&&e>0?null:(this.bump(),Nn(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),// `{`
|
460
|
-
this.bumpSpace(),this.isEOF())return this.error(Wt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Wt.EMPTY_ARGUMENT,Mn(n,this.clonePosition()));
|
461
|
-
// argument name
|
462
|
-
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Wt.MALFORMED_ARGUMENT,Mn(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Wt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition()));switch(this.char()){
|
463
|
-
// Simple argument: `{name}`
|
464
|
-
case 125/* `}` */:// `}`
|
465
|
-
return this.bump(),{val:{type:zt.argument,
|
466
|
-
// value does not include the opening and closing braces.
|
467
|
-
value:r,location:Mn(n,this.clonePosition())},err:null};
|
468
|
-
// Argument with options: `{name, format, ...}`
|
469
|
-
case 44/* `,` */:return this.bump(),// `,`
|
470
|
-
this.bumpSpace(),this.isEOF()?this.error(Wt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Wt.MALFORMED_ARGUMENT,Mn(n,this.clonePosition()))}},
|
471
|
-
/**
|
472
|
-
* Advance the parser until the end of the identifier, if it is currently on
|
473
|
-
* an identifier character. Return an empty string otherwise.
|
474
|
-
*/
|
475
|
-
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Cn(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Mn(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
476
|
-
// Parse this range:
|
477
|
-
// {name, type, style}
|
478
|
-
// ^---^
|
479
|
-
switch(s){case"":
|
480
|
-
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
481
|
-
return this.error(Wt.EXPECT_ARGUMENT_TYPE,Mn(o,a));case"number":case"date":case"time":
|
482
|
-
// Parse this range:
|
483
|
-
// {name, number, style}
|
484
|
-
// ^-------^
|
485
|
-
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=Un(y.val)).length)return this.error(Wt.EXPECT_ARGUMENT_STYLE,Mn(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:Mn(u,this.clonePosition())}}if((b=this.tryParseArgumentClose(r)).err)return b;var c=Mn(r,this.clonePosition());
|
486
|
-
// Extract style or skeleton
|
487
|
-
if(l&&$n(null==l?void 0:l.style,"::",0)){
|
488
|
-
// Skeleton starts with `::`.
|
489
|
-
var h=Yn(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:zt.number,value:n,location:c,style:y.val},err:null};if(0===h.length)return this.error(Wt.EXPECT_DATE_TIME_SKELETON,c);var d=h;
|
490
|
-
// Get "best match" pattern only if locale is passed, if not, let it
|
491
|
-
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
492
|
-
// for unsupported patterns.
|
493
|
-
this.locale&&(d=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=kn(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(h,this.locale));var f={type:Zt.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?hn(d):{}};return{val:{type:"date"===s?zt.date:zt.time,value:n,location:c,style:f},err:null}}
|
494
|
-
// Regular style or no style.
|
495
|
-
return{val:{type:"number"===s?zt.number:"date"===s?zt.date:zt.time,value:n,location:c,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
496
|
-
// Parse this range:
|
497
|
-
// {name, plural, options}
|
498
|
-
// ^---------^
|
499
|
-
var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Wt.EXPECT_SELECT_ARGUMENT_OPTIONS,Mn(p,Xt({},p)));this.bumpSpace();
|
500
|
-
// Parse offset:
|
501
|
-
// {name, plural, offset:1, options}
|
502
|
-
// ^-----^
|
503
|
-
// or the first option:
|
504
|
-
// {name, plural, one {...} other {...}}
|
505
|
-
// ^--^
|
506
|
-
var m=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(Wt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Mn(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(Wt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Wt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
507
|
-
// Parse another identifier for option parsing
|
508
|
-
this.bumpSpace(),m=this.parseIdentifierIfPossible(),g=y.val}var b,_=this.tryParsePluralOrSelectOptions(e,s,t,m);if(_.err)return _;if((b=this.tryParseArgumentClose(r)).err)return b;var v=Mn(r,this.clonePosition());return"select"===s?{val:{type:zt.select,value:n,options:Bn(_.val),location:v},err:null}:{val:{type:zt.plural,value:n,options:Bn(_.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(Wt.INVALID_ARGUMENT_TYPE,Mn(o,a))}},e.prototype.tryParseArgumentClose=function(e){
|
509
|
-
// Parse: {value, number, ::currency/GBP }
|
510
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(Wt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
511
|
-
/**
|
512
|
-
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
513
|
-
*/
|
514
|
-
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
515
|
-
// Treat apostrophe as quoting but include it in the style part.
|
516
|
-
// Find the end of the quoted literal text.
|
517
|
-
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Wt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Mn(n,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 n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
518
|
-
// Parse the skeleton
|
519
|
-
for(var t=e.split(dn).filter((function(e){return e.length>0})),n=[],r=0,i=t;r<i.length;r++){var o=i[r].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var s=o[0],a=o.slice(1),l=0,u=a;l<u.length;l++)if(0===u[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(e)}catch(e){return this.error(Wt.INVALID_NUMBER_SKELETON,t)}return{val:{type:Zt.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?wn(n):{}},err:null}},
|
520
|
-
/**
|
521
|
-
* @param nesting_level The current nesting level of messages.
|
522
|
-
* This can be positive when parsing message fragment in select or plural argument options.
|
523
|
-
* @param parent_arg_type The parent argument's type.
|
524
|
-
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
525
|
-
* the argument. It is a by-product of a previous parsing attempt.
|
526
|
-
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
527
|
-
* between a pair of opening and closing tags. The nested message will not parse beyond
|
528
|
-
* the closing tag boundary.
|
529
|
-
*/
|
530
|
-
e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
|
531
|
-
// Parse:
|
532
|
-
// one {one apple}
|
533
|
-
// ^--^
|
534
|
-
for(var i,o=!1,s=[],a=new Set,l=r.value,u=r.location;;){if(0===l.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
535
|
-
// Try parse `={number}` selector
|
536
|
-
var h=this.tryParseDecimalInteger(Wt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Wt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Mn(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
|
537
|
-
// Duplicate selector clauses
|
538
|
-
if(a.has(l))return this.error("select"===t?Wt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Wt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===l&&(o=!0),
|
539
|
-
// Parse:
|
540
|
-
// one {one apple}
|
541
|
-
// ^----------^
|
542
|
-
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Wt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Wt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Mn(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var p=this.tryParseArgumentClose(d);if(p.err)return p;s.push([l,{value:f.val,location:Mn(d,this.clonePosition())}]),
|
543
|
-
// Keep track of the existing selectors
|
544
|
-
a.add(l),
|
545
|
-
// Prep next selector clause.
|
546
|
-
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===s.length?this.error("select"===t?Wt.EXPECT_SELECT_ARGUMENT_SELECTOR:Wt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Mn(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Wt.MISSING_OTHER_CLAUSE,Mn(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=Mn(r,this.clonePosition());return i?In(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
547
|
-
// This is much faster than `Object.assign` or spread.
|
548
|
-
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
549
|
-
/**
|
550
|
-
* Return the code point at the current position of the parser.
|
551
|
-
* Throws if the index is out of bound.
|
552
|
-
*/
|
553
|
-
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Rn(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}}},
|
554
|
-
/** Bump the parser to the next UTF-16 code unit. */
|
555
|
-
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,
|
556
|
-
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
557
|
-
this.position.offset+=e<65536?1:2)}},
|
558
|
-
/**
|
559
|
-
* If the substring starting at the current position of the parser has
|
560
|
-
* the given prefix, then bump the parser to the character immediately
|
561
|
-
* following the prefix and return true. Otherwise, don't bump the parser
|
562
|
-
* and return false.
|
563
|
-
*/
|
564
|
-
e.prototype.bumpIf=function(e){if($n(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
565
|
-
/**
|
566
|
-
* Bump the parser until the pattern character is found and return `true`.
|
567
|
-
* Otherwise bump to the end of the file and return `false`.
|
568
|
-
*/
|
569
|
-
e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},
|
570
|
-
/**
|
571
|
-
* Bump the parser to the target offset.
|
572
|
-
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
573
|
-
*/
|
574
|
-
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}},
|
575
|
-
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
576
|
-
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Zn(this.char());)this.bump()},
|
577
|
-
/**
|
578
|
-
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
579
|
-
* If the input has been exhausted, then this returns null.
|
580
|
-
*/
|
581
|
-
e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();
|
582
|
-
/**
|
583
|
-
* This check if codepoint is alphabet (lower & uppercase)
|
584
|
-
* @param codepoint
|
585
|
-
* @returns
|
586
|
-
*/function Wn(e){return e>=97&&e<=122||e>=65&&e<=90}function zn(e){return 45/* '-' */===e||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}
|
587
|
-
/**
|
588
|
-
* Code point equivalent of regex `\p{White_Space}`.
|
589
|
-
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
590
|
-
*/function Zn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
591
|
-
/**
|
592
|
-
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
593
|
-
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
594
|
-
*/function Xn(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 Kn(e){e.forEach((function(e){if(delete e.location,nn(e)||rn(e))for(var t in e.options)delete e.options[t].location,Kn(e.options[t].value);else Qt(e)&&an(e.style)||(en(e)||tn(e))&&ln(e.style)?delete e.style.location:sn(e)&&Kn(e.children)}))}function qn(e,t){void 0===t&&(t={}),t=Xt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Vn(e,t).parse();if(n.err){var r=SyntaxError(Wt[n.err.kind]);
|
595
|
-
// @ts-expect-error Assign to error object
|
596
|
-
throw r.location=n.err.location,
|
597
|
-
// @ts-expect-error Assign to error object
|
598
|
-
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Kn(n.val),n.val}
|
599
|
-
|
600
|
-
// Main
|
601
|
-
|
602
|
-
function Jn(e,t){var n=t&&t.cache?t.cache:sr,r=t&&t.serializer?t.serializer:rr;return(t&&t.strategy?t.strategy:nr)(e,{cache:n,serializer:r})}
|
603
|
-
|
604
|
-
// Strategy
|
605
|
-
|
606
|
-
function Qn(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=t.get(o);return void 0===s&&(s=e.call(this,r),t.set(o,s)),s}function er(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function tr(e,t,n,r,i){return n.bind(t,e,r,i)}function nr(e,t){return tr(e,this,1===e.length?Qn:er,t.cache.create(),t.serializer)}
|
607
|
-
// Serializer
|
608
|
-
var rr=function(){return JSON.stringify(arguments)};
|
609
|
-
|
610
|
-
// Cache
|
611
|
-
|
612
|
-
function ir(){this.cache=Object.create(null)}ir.prototype.get=function(e){return this.cache[e]},ir.prototype.set=function(e,t){this.cache[e]=t};var or,sr={create:function(){
|
613
|
-
// @ts-ignore
|
614
|
-
return new ir}},ar={variadic:function(e,t){return tr(e,this,er,t.cache.create(),t.serializer)},monadic:function(e,t){return tr(e,this,Qn,t.cache.create(),t.serializer)}};!function(e){
|
615
|
-
// When we have a placeholder but no value to format
|
616
|
-
e.MISSING_VALUE="MISSING_VALUE",
|
617
|
-
// When value supplied is invalid
|
618
|
-
e.INVALID_VALUE="INVALID_VALUE",
|
619
|
-
// When we need specific Intl API but it's not available
|
620
|
-
e.MISSING_INTL_API="MISSING_INTL_API"}(or||(or={}));var lr,ur=/** @class */function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return Vt(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),cr=/** @class */function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),or.INVALID_VALUE,i)||this}return Vt(t,e),t}(ur),hr=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),or.INVALID_VALUE,r)||this}return Vt(t,e),t}(ur),dr=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),or.MISSING_VALUE,n)||this}return Vt(t,e),t}(ur);function fr(e){return"function"==typeof e}
|
621
|
-
// TODO(skeleton): add skeleton support
|
622
|
-
function pr(e,t,n,r,i,o,
|
623
|
-
// For debugging
|
624
|
-
s){
|
625
|
-
// Hot path for straight simple msg translations
|
626
|
-
if(1===e.length&&qt(e[0]))return[{type:lr.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];
|
627
|
-
// Exit early for string parts.
|
628
|
-
if(qt(c))a.push({type:lr.literal,value:c.value});else
|
629
|
-
// TODO: should this part be literal type?
|
630
|
-
// Replace `#` in plural rules with the actual numeric value.
|
631
|
-
if(on(c))"number"==typeof o&&a.push({type:lr.literal,value:n.getNumberFormat(t).format(o)});else{var h=c.value;
|
632
|
-
// Enforce that all required values are provided by the caller.
|
633
|
-
if(!i||!(h in i))throw new dr(h,s);var d=i[h];if(Jt(c))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?lr.literal:lr.object,value:d});else
|
634
|
-
// Recursively format plural and select parts' option — which can be a
|
635
|
-
// nested pattern structure. The choosing of the option to use is
|
636
|
-
// abstracted-by and delegated-to the part helper object.
|
637
|
-
if(en(c)){var f="string"==typeof c.style?r.date[c.style]:ln(c.style)?c.style.parsedOptions:void 0;a.push({type:lr.literal,value:n.getDateTimeFormat(t,f).format(d)})}else if(tn(c)){f="string"==typeof c.style?r.time[c.style]:ln(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:lr.literal,value:n.getDateTimeFormat(t,f).format(d)})}else if(Qt(c)){(f="string"==typeof c.style?r.number[c.style]:an(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(d*=f.scale||1),a.push({type:lr.literal,value:n.getNumberFormat(t,f).format(d)})}else{if(sn(c)){var p=c.children,m=c.value,g=i[m];if(!fr(g))throw new hr(m,"function",s);var y=g(pr(p,t,n,r,i,o).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?lr.literal:lr.object,value:e}})))}if(nn(c)){if(!(b=c.options[d]||c.options.other))throw new cr(c.value,d,Object.keys(c.options),s);a.push.apply(a,pr(b.value,t,n,r,i))}else if(rn(c)){var b;if(!(b=c.options["=".concat(d)])){if(!Intl.PluralRules)throw new ur('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',or.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));b=c.options[_]||c.options.other}if(!b)throw new cr(c.value,d,Object.keys(c.options),s);a.push.apply(a,pr(b.value,t,n,r,i,d-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===lr.literal&&t.type===lr.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
|
638
|
-
/*
|
639
|
-
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
640
|
-
Copyrights licensed under the New BSD License.
|
641
|
-
See the accompanying LICENSE file for terms.
|
642
|
-
*/
|
643
|
-
// -- MessageFormat --------------------------------------------------------
|
644
|
-
function mr(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?Xt(Xt(Xt({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=Xt(Xt({},i[t]),o[t]||{}),e}),{})):i),n}),Xt({},e)):e}function gr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(lr||(lr={}));var yr=/** @class */function(){function e(t,n,r,i){var o,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
|
645
|
-
// Hot path for straight simple msg translations
|
646
|
-
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===lr.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return pr(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
647
|
-
// Defined first because it's used to build the format pattern.
|
648
|
-
this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
649
|
-
// Parse string messages into an AST.
|
650
|
-
this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.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.");
|
651
|
-
// Creates a new object with the specified `formats` merged with the default
|
652
|
-
// formats.
|
653
|
-
this.formats=mr(e.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Jn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,Kt([void 0],t,!1)))}),{cache:gr(o.number),strategy:ar.variadic}),getDateTimeFormat:Jn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,Kt([void 0],t,!1)))}),{cache:gr(o.dateTime),strategy:ar.variadic}),getPluralRules:Jn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,Kt([void 0],t,!1)))}),{cache:gr(o.pluralRules),strategy:ar.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=qn,
|
654
|
-
// Default format options used as the prototype of the `formats` provided to the
|
655
|
-
// constructor. These are used when constructing the internal Intl.NumberFormat
|
656
|
-
// and Intl.DateTimeFormat instances.
|
657
|
-
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}(),br=yr;
|
658
|
-
/*
|
659
|
-
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
660
|
-
Copyrights licensed under the New BSD License.
|
661
|
-
See the accompanying LICENSE file for terms.
|
662
|
-
*/const _r={},vr=(e,t,n)=>n?(t in _r||(_r[t]={}),e in _r[t]||(_r[t][e]=n),n):n,wr=(e,t)=>{if(null==t)return;if(t in _r&&e in _r[t])return _r[t][e];const n=Br(t);for(let r=0;r<n.length;r++){const i=Tr(n[r],e);if(i)return vr(e,t,i)}};let Er;const Sr=Ht({});function kr(e){return e in Er}function Tr(e,t){if(!kr(e))return null;const n=function(e){return Er[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function xr(e,...t){delete _r[e],Sr.update((n=>(n[e]=Gt.all([n[e]||{},...t]),n)))}It([Sr],(([e])=>Object.keys(e))),Sr.subscribe((e=>Er=e));const Mr={};function Dr(e){return Mr[e]}function Lr(e){return null!=e&&Br(e).some((e=>{var t;return null===(t=Dr(e))||void 0===t?void 0:t.size}))}const Or={};function Ar(e){if(!Lr(e))return e in Or?Or[e]:Promise.resolve();const t=function(e){return Br(e).map((e=>{const t=Dr(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Or[e]=Promise.all(t.map((([e,t])=>function(e,t){const n=Promise.all(t.map((t=>(function(e,t){Mr[e].delete(t),0===Mr[e].size&&delete Mr[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>xr(e,...t)))}(e,t)))).then((()=>{if(Lr(e))return Ar(e);delete Or[e]})),Or[e]}
|
663
|
-
/*! *****************************************************************************
|
664
|
-
Copyright (c) Microsoft Corporation.
|
665
|
-
|
666
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
667
|
-
purpose with or without fee is hereby granted.
|
668
|
-
|
669
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
670
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
671
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
672
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
673
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
674
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
675
|
-
PERFORMANCE OF THIS SOFTWARE.
|
676
|
-
***************************************************************************** */function Pr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}const Hr={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 Ir(){return Hr}const Fr=Ht(!1);let Cr;const $r=Ht(null);function Nr(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function Br(e,t=Ir().fallbackLocale){const n=Nr(e);return t?[...new Set([...n,...Nr(t)])]:n}function Rr(){return null!=Cr?Cr:void 0}$r.subscribe((e=>{Cr=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Yr=Object.assign(Object.assign({},$r),{set:e=>{if(e&&function(e){if(null==e)return;const t=Br(e);for(let e=0;e<t.length;e++){const n=t[e];if(kr(n))return n}}(e)&&Lr(e)){const{loadingDelay:t}=Ir();let n;return"undefined"!=typeof window&&null!=Rr()&&t?n=window.setTimeout((()=>Fr.set(!0)),t):Fr.set(!0),Ar(e).then((()=>{$r.set(e)})).finally((()=>{clearTimeout(n),Fr.set(!1)}))}return $r.set(e)}}),Ur=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Gr=(e,t)=>{const{formats:n}=Ir();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},jr=Ur((e=>{var{locale:t,format:n}=e,r=Pr(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=Gr("number",n)),new Intl.NumberFormat(t,r)})),Vr=Ur((e=>{var{locale:t,format:n}=e,r=Pr(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=Gr("date",n):0===Object.keys(r).length&&(r=Gr("date","short")),new Intl.DateTimeFormat(t,r)})),Wr=Ur((e=>{var{locale:t,format:n}=e,r=Pr(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=Gr("time",n):0===Object.keys(r).length&&(r=Gr("time","short")),new Intl.DateTimeFormat(t,r)})),zr=Ur(((e,t=Rr())=>new br(e,t,Ir().formats,{ignoreTag:Ir().ignoreTag}))),Zr=(e,t={})=>{var n,r,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=Rr(),default:u}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=wr(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!==(o=null!==(i=null===(r=(n=Ir()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))&&void 0!==i?i:u)&&void 0!==o?o:e;if(!a)return c;let h=c;try{h=zr(c,l).format(a)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Xr=(e,t)=>((e={})=>{var{locale:t=Rr()}=e,n=Pr(e,["locale"]);return Wr(Object.assign({locale:t},n))})(t).format(e),Kr=(e,t)=>((e={})=>{var{locale:t=Rr()}=e,n=Pr(e,["locale"]);return Vr(Object.assign({locale:t},n))})(t).format(e),qr=(e,t)=>((e={})=>{var{locale:t=Rr()}=e,n=Pr(e,["locale"]);return jr(Object.assign({locale:t},n))})(t).format(e),Jr=(e,t=Rr())=>wr(e,t),Qr=It([Yr,Sr],(()=>Zr));It([Yr],(()=>Xr)),It([Yr],(()=>Kr)),It([Yr],(()=>qr)),It([Yr,Sr],(()=>Jr)),window.emWidgets={topic:(e,t=0)=>{if(-1==Ot.indexOf(e)){let n=new Lt(t);At[e]=n,Ot.push(e)}return At[e]}};
|
677
|
-
/**
|
678
|
-
* @name getDevice
|
679
|
-
* @description A method that returns the type of the device
|
680
|
-
* @param {String} userAgent window.navigator.userAgent
|
681
|
-
* @returns {String} Android/iPhone/iPad/PC
|
682
|
-
*/
|
683
|
-
const ei=e=>e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC";const ti={en:{panicButton:{panicButtonString:"Hold button for 3 seconds to take 24-hours instant lock"}},ro:{panicButton:{panicButtonString:"Tine apasat 3 secunde pentru a lua o pauza de 24h"}}};
|
684
|
-
/* ../panic-button/src/PanicButton.svelte generated by Svelte v3.48.0 */function ni(t){let n,r,i,o,s,a=/*customtext*/(t[0]||/*$_*/t[5]("panicButton.panicButtonString"))+"";return{c(){n=g("div"),r=g("div"),i=g("button"),o=b(a),this.c=e,E(i,"class","PanicButton "+("PC"!==ei(/*userAgent*/t[6])?"PanicButtonMobile":"")),E(i,"part","PanicButton "+("PC"!==ei(/*userAgent*/t[6])?"PanicButtonMobile":"")),x(i,"PanicButtonAnimation",/*panicLoading*/t[4]),E(r,"class","PanicSection "+("PC"!==ei(/*userAgent*/t[6])?"PanicSectionMobile":"")),E(r,"part","PanicSection "+("PC"!==ei(/*userAgent*/t[6])?"PanicSectionMobile":"")),E(n,"class",s=/*alternativestyling*/"true"==t[1]?"PanicButtonV2":"")},m(e,s){f(e,n,s),d(n,r),d(r,i),d(i,o),
|
685
|
-
/*button_binding*/t[10](i),
|
686
|
-
/*div1_binding*/t[11](n)},p(e,[t]){/*customtext, $_*/33&t&&a!==(a=/*customtext*/(e[0]||/*$_*/e[5]("panicButton.panicButtonString"))+"")&&k(o,a),/*panicLoading*/16&t&&x(i,"PanicButtonAnimation",/*panicLoading*/e[4]),/*alternativestyling*/2&t&&s!==(s=/*alternativestyling*/"true"==e[1]?"PanicButtonV2":"")&&E(n,"class",s)},i:e,o:e,d(e){e&&p(n)
|
687
|
-
/*button_binding*/,t[10](null),
|
688
|
-
/*div1_binding*/t[11](null)}}}function ri(e,t,n){let r;c(e,Qr,(e=>n(5,r=e)));let i,o,s,{lang:a="en"}=t,{customtext:l=""}=t,{clientstyling:u=""}=t,{clientstylingurl:h=""}=t,{alternativestyling:d=""}=t,f=!1,p=0,m=window.navigator.userAgent;Object.keys(ti).forEach((e=>{!function(e,t){xr(e,t)}(e,ti[e])}));const g=()=>{p=0,n(4,f=!0),s=setInterval((()=>{p++,p>=2&&(window.postMessage({type:"PanicButtonClicked"},window.location.href),clearInterval(s))}),1e3)},y=()=>{n(4,f=!1),clearInterval(s)};return L((()=>()=>{n(4,f=!1),null==i||i.removeEventListener("mousedown",g),null==i||i.removeEventListener("touchstart",g),
|
689
|
-
// on mouseup stop interval count
|
690
|
-
null==i||i.removeEventListener("mouseup",y),null==i||i.removeEventListener("touchend",y)})),e.$$set=e=>{"lang"in e&&n(7,a=e.lang),"customtext"in e&&n(0,l=e.customtext),"clientstyling"in e&&n(8,u=e.clientstyling),"clientstylingurl"in e&&n(9,h=e.clientstylingurl),"alternativestyling"in e&&n(1,d=e.alternativestyling)},e.$$.update=()=>{var t;/*panicButton*/4&e.$$.dirty&&i&&(null==i||i.addEventListener("mousedown",g,!1),null==i||i.addEventListener("touchstart",g,!1),
|
691
|
-
// on mouseup stop interval count
|
692
|
-
null==i||i.addEventListener("mouseup",y,!1),null==i||i.addEventListener("touchend",y,!1)),/*lang*/128&e.$$.dirty&&a&&(t=a,Yr.set(t)),/*clientstyling*/256&e.$$.dirty&&u&&(()=>{let e=document.createElement("style");e.innerHTML=u,o.appendChild(e)})(),/*clientstylingurl*/512&e.$$.dirty&&h&&(()=>{let e=new URL(h),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,o&&setTimeout((()=>{o.appendChild(t)}),1)}))})()},[l,d,i,o,f,r,m,a,u,h,function(e){A[e?"unshift":"push"]((()=>{i=e,n(2,i)}))},function(e){A[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}!customElements.get("panic-button")&&customElements.define("panic-button",class extends V{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.PanicSection{display:flex;align-items:center;gap:10px;margin:20px 0}.PanicSection .PanicButton{border-radius:5px;border:1px solid #D0046C;background-color:#D0046C;font-size:10px;width:280px;height:fit-content;padding:15px;color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer}.PanicSectionMobile{position:absolute;top:0;left:0;width:100%;text-align:center;margin:10px 0 0 0 !important}.PanicButtonMobile{border-radius:5px;margin:0 10px;border:1px solid #D0046C;background-color:#D0046C;width:100% !important;height:30px;color:var(--emfe-w-color-white, #FFFFFF);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.PanicButtonAnimation{background:-webkit-linear-gradient(135deg, rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%);background:-moz-linear-gradient(135deg, rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%);background:-o-linear-gradient(135deg, rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%);background-color:#D0046C;width:280px;color:#fff;-webkit-animation:bar-animation 2s linear}@-webkit-keyframes bar-animation{0%{background-position:0}100%{background-position:280px}}.PanicButtonV2 .PanicButton{border:1px solid #F57F17;background-color:#F57F17;width:388px;font-size:12px}.PanicButtonV2 .PanicButtonMobile{border:1px solid #F57F17;background-color:#F57F17;font-size:10px}.PanicButtonV2 .PanicButtonAnimation{background-color:#F57F17;width:388px}@-webkit-keyframes bar-animation{0%{background-position:0}100%{background-position:388px}}</style>",j(this,{target:this.shadowRoot,props:M(this.attributes),customElement:!0},ri,ni,o,{lang:7,customtext:0,clientstyling:8,clientstylingurl:9,alternativestyling:1},null),e&&(e.target&&f(e.target,this,e.anchor),e.props&&(this.$set(e.props),B()))}static get observedAttributes(){return["lang","customtext","clientstyling","clientstylingurl","alternativestyling"]}get lang(){return this.$$.ctx[7]}set lang(e){this.$$set({lang:e}),B()}get customtext(){return this.$$.ctx[0]}set customtext(e){this.$$set({customtext:e}),B()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(e){this.$$set({clientstyling:e}),B()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),B()}get alternativestyling(){return this.$$.ctx[1]}set alternativestyling(e){this.$$set({alternativestyling:e}),B()}});var ii=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return ze(null==t&&n.path)}},n.exports),n.exports}((function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}
|
103
|
+
function _e(e){let t,n,r,i;return{c(){t=m("casino-footer-thumbnail"),E(t,"sponsorurl",n=/*sponsorData*/e[19].sponsorUrl),E(t,"sponsorimage",r=/*sponsorData*/e[19].sponsorImage),E(t,"sponsortitle",i=/*sponsorData*/e[19].sponsorTitle),E(t,"clientstyling",/*clientstyling*/e[6]),E(t,"target",/*target*/e[7])},m(e,n){d(e,t,n)},p(e,o){/*footersponsors*/512&o[0]&&n!==(n=/*sponsorData*/e[19].sponsorUrl)&&E(t,"sponsorurl",n),/*footersponsors*/512&o[0]&&r!==(r=/*sponsorData*/e[19].sponsorImage)&&E(t,"sponsorimage",r),/*footersponsors*/512&o[0]&&i!==(i=/*sponsorData*/e[19].sponsorTitle)&&E(t,"sponsortitle",i),/*clientstyling*/64&o[0]&&E(t,"clientstyling",/*clientstyling*/e[6]),/*target*/128&o[0]&&E(t,"target",/*target*/e[7])},d(e){e&&f(t)}}}function be(t){let n;function r(e,t){/*sponsorflag*/
|
104
|
+
return e[0]&&/*footersponsors*/e[9].length?de:/*paymentflag*/e[1]&&/*footerpayment*/e[10].length?he:/*vendorflag*/e[2]&&/*footervendors*/e[11].length?ce:/*helperflag*/e[3]&&/*footerhelperlinks*/e[12].length?ue:/*licenseflag*/e[4]&&/*footerlicenses*/e[13].length?le:/*socialflag*/e[5]&&/*footersociallinks*/e[14].length?ae:void 0}let i=r(t),o=i&&i(t);return{c(){n=m("div"),o&&o.c(),this.c=e,w(n,"class","FooterSectionContainer"),w(n,"part","FooterSectionContainer")},m(e,r){d(e,n,r),o&&o.m(n,null)
|
105
|
+
/*div_binding*/,t[16](n)},p(e,t){i===(i=r(e))&&o?o.p(e,t):(o&&o.d(1),o=i&&i(e),o&&(o.c(),o.m(n,null)))},i:e,o:e,d(e){e&&f(n),o&&o.d()
|
106
|
+
/*div_binding*/,t[16](null)}}}function ve(e,t,n){let r,{sponsorflag:i=""}=t,{paymentflag:o=""}=t,{vendorflag:s=""}=t,{helperflag:a=""}=t,{licenseflag:l=""}=t,{socialflag:u=""}=t,{clientstyling:c=""}=t,{target:h=""}=t,{displaycolumn:d=""}=t,f=[],p=[],m=[],g=[],y=[],_=[];const b=e=>{e.data&&"FooterData"===e.data.type&&(n(9,f=e.data.sponsorsRepeater),n(10,p=e.data.paymentMethodsRepeater),n(11,m=e.data.gameVendorsRepeater),n(12,g=e.data.helpLinksRepeater),n(13,y=e.data.licensesRepeater),n(14,_=e.data.socialLinksRepeater))};return D((()=>(window.addEventListener("message",b,!1),()=>{window.removeEventListener("message",b)}))),e.$$set=e=>{"sponsorflag"in e&&n(0,i=e.sponsorflag),"paymentflag"in e&&n(1,o=e.paymentflag),"vendorflag"in e&&n(2,s=e.vendorflag),"helperflag"in e&&n(3,a=e.helperflag),"licenseflag"in e&&n(4,l=e.licenseflag),"socialflag"in e&&n(5,u=e.socialflag),"clientstyling"in e&&n(6,c=e.clientstyling),"target"in e&&n(7,h=e.target),"displaycolumn"in e&&n(8,d=e.displaycolumn)},e.$$.update=()=>{/*clientstyling*/64&e.$$.dirty[0]&&c&&(()=>{let e=document.createElement("style");e.innerHTML=c,r.appendChild(e)})()},[i,o,s,a,l,u,c,h,d,f,p,m,g,y,_,r,function(e){O[e?"unshift":"push"]((()=>{r=e,n(15,r)}))}]}!customElements.get("casino-footer-thumbnail")&&customElements.define("casino-footer-thumbnail",class extends G{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}.FooterItem{display:inline-block;padding:0 15px}.FooterItem .FooterSponsorLink,.FooterItem .FooterPaymentLink{display:block}.FooterItem .FooterSponsorLink{display:flex;align-items:center}.FooterItem .FooterPaymentLink,.FooterItem .FooterHelperLink{display:flex;align-items:center;justify-content:center}.FooterItem .FooterLinkDisabled{pointer-events:none;cursor:auto}.FooterItem .SponsorTitle,.FooterItem .PaymentTitle,.FooterItem .HelperTitle{font-size:9px;text-decoration:none;color:var(--emfe-w-color-gray-150, #828282);text-align:center}.FooterItem .HelperTitle{font-size:8px}.FooterItem.HelperLinkItem p{font-size:10px}.FooterItem .FooterItemAnchor{display:flex;flex-direction:column;gap:10px;text-decoration:none}.FooterItem.SocialItem .FooterItemAnchor{width:42px;height:42px}.SponsorTitle{margin:0}.FooterLink{display:block;text-align:center}.DisplayColumn .FooterItemAnchor{flex-direction:row}.DisplayColumn .FooterImage{height:15px;width:15px}.DisplayColumn.FooterItem.HelperLinkItem p{font-size:12px}@media only screen and (max-width: 768px){.FooterItem{padding:0 5px}.FooterItem.PaymentItem{padding:15px 5px}.FooterItem.GameVendorItem{padding:0 10px}}</style>",U(this,{target:this.shadowRoot,props:k(this.attributes),customElement:!0},ee,Q,o,{sponsorurl:0,sponsorimage:1,sponsortitle:2,paymenturl:3,paymentimage:4,paymenttitle:5,vendorurl:6,vendorimage:7,vendortitle:8,helperlinkurl:9,helperlinkimage:10,helperlinktitle:11,licenseurl:12,licenseimage:13,licensetitle:14,sociallinkurl:15,sociallinkimage:16,sociallinktitle:17,clientstyling:21,target:18,displaycolumn:19},null),e&&(e.target&&d(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["sponsorurl","sponsorimage","sponsortitle","paymenturl","paymentimage","paymenttitle","vendorurl","vendorimage","vendortitle","helperlinkurl","helperlinkimage","helperlinktitle","licenseurl","licenseimage","licensetitle","sociallinkurl","sociallinkimage","sociallinktitle","clientstyling","target","displaycolumn"]}get sponsorurl(){return this.$$.ctx[0]}set sponsorurl(e){this.$$set({sponsorurl:e}),C()}get sponsorimage(){return this.$$.ctx[1]}set sponsorimage(e){this.$$set({sponsorimage:e}),C()}get sponsortitle(){return this.$$.ctx[2]}set sponsortitle(e){this.$$set({sponsortitle:e}),C()}get paymenturl(){return this.$$.ctx[3]}set paymenturl(e){this.$$set({paymenturl:e}),C()}get paymentimage(){return this.$$.ctx[4]}set paymentimage(e){this.$$set({paymentimage:e}),C()}get paymenttitle(){return this.$$.ctx[5]}set paymenttitle(e){this.$$set({paymenttitle:e}),C()}get vendorurl(){return this.$$.ctx[6]}set vendorurl(e){this.$$set({vendorurl:e}),C()}get vendorimage(){return this.$$.ctx[7]}set vendorimage(e){this.$$set({vendorimage:e}),C()}get vendortitle(){return this.$$.ctx[8]}set vendortitle(e){this.$$set({vendortitle:e}),C()}get helperlinkurl(){return this.$$.ctx[9]}set helperlinkurl(e){this.$$set({helperlinkurl:e}),C()}get helperlinkimage(){return this.$$.ctx[10]}set helperlinkimage(e){this.$$set({helperlinkimage:e}),C()}get helperlinktitle(){return this.$$.ctx[11]}set helperlinktitle(e){this.$$set({helperlinktitle:e}),C()}get licenseurl(){return this.$$.ctx[12]}set licenseurl(e){this.$$set({licenseurl:e}),C()}get licenseimage(){return this.$$.ctx[13]}set licenseimage(e){this.$$set({licenseimage:e}),C()}get licensetitle(){return this.$$.ctx[14]}set licensetitle(e){this.$$set({licensetitle:e}),C()}get sociallinkurl(){return this.$$.ctx[15]}set sociallinkurl(e){this.$$set({sociallinkurl:e}),C()}get sociallinkimage(){return this.$$.ctx[16]}set sociallinkimage(e){this.$$set({sociallinkimage:e}),C()}get sociallinktitle(){return this.$$.ctx[17]}set sociallinktitle(e){this.$$set({sociallinktitle:e}),C()}get clientstyling(){return this.$$.ctx[21]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get target(){return this.$$.ctx[18]}set target(e){this.$$set({target:e}),C()}get displaycolumn(){return this.$$.ctx[19]}set displaycolumn(e){this.$$set({displaycolumn:e}),C()}});!customElements.get("casino-footer-section")&&customElements.define("casino-footer-section",class extends G{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}.FooterSectionInnerContainer{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.DisplayColumn{flex-direction:column;align-items:flex-start}</style>",U(this,{target:this.shadowRoot,props:k(this.attributes),customElement:!0},ve,be,o,{sponsorflag:0,paymentflag:1,vendorflag:2,helperflag:3,licenseflag:4,socialflag:5,clientstyling:6,target:7,displaycolumn:8},null,[-1,-1]),e&&(e.target&&d(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["sponsorflag","paymentflag","vendorflag","helperflag","licenseflag","socialflag","clientstyling","target","displaycolumn"]}get sponsorflag(){return this.$$.ctx[0]}set sponsorflag(e){this.$$set({sponsorflag:e}),C()}get paymentflag(){return this.$$.ctx[1]}set paymentflag(e){this.$$set({paymentflag:e}),C()}get vendorflag(){return this.$$.ctx[2]}set vendorflag(e){this.$$set({vendorflag:e}),C()}get helperflag(){return this.$$.ctx[3]}set helperflag(e){this.$$set({helperflag:e}),C()}get licenseflag(){return this.$$.ctx[4]}set licenseflag(e){this.$$set({licenseflag:e}),C()}get socialflag(){return this.$$.ctx[5]}set socialflag(e){this.$$set({socialflag:e}),C()}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get target(){return this.$$.ctx[7]}set target(e){this.$$set({target:e}),C()}get displaycolumn(){return this.$$.ctx[8]}set displaycolumn(e){this.$$set({displaycolumn:e}),C()}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function we(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ee=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return we(null==t&&n.path)}},n.exports),n.exports}((function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}
|
693
107
|
// This is done to register the method called with moment()
|
694
108
|
// without creating circular dependencies.
|
695
109
|
function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){
|
@@ -697,66 +111,66 @@ function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Ob
|
|
697
111
|
// input != null
|
698
112
|
return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(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(a(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 n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Xn(e,t,n,r,!0).utc()}function m(){
|
699
113
|
// We need to deep clone this object.
|
700
|
-
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=m()),e._pf}function y(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),i=!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&&r);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function
|
114
|
+
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=m()),e._pf}function y(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),i=!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&&r);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function _(e){var t=p(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}
|
701
115
|
// Plugins that add properties should also add the key here (null value),
|
702
116
|
// so we can properly clone ourselves.
|
703
|
-
n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var
|
117
|
+
n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],v=!1;function w(e,t){var n,r,i,o=b.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),o>0)for(n=0;n<o;n++)u(i=t[r=b[n]])||(e[r]=i);return e}
|
704
118
|
// Moment prototype object
|
705
119
|
function E(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),
|
706
120
|
// Prevent infinite loop in case updateOffset creates new moment
|
707
121
|
// objects.
|
708
|
-
!1===v&&(v=!0,r.updateOffset(this),v=!1)}function
|
122
|
+
!1===v&&(v=!0,r.updateOffset(this),v=!1)}function T(e){return e instanceof E||null!=e&&null!=e._isAMomentObject}function S(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,o,s,l=[],u=arguments.length;for(o=0;o<u;o++){if(i="","object"==typeof arguments[o]){for(s in i+="\n["+o+"] ",arguments[0])a(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}S(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var M,D={};function x(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(S(t),D[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function L(e){var t,n;for(n in e)a(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,
|
709
123
|
// Lenient ordinal parsing accepts just a number in addition to
|
710
124
|
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
|
711
125
|
// TODO: Remove "ordinalParse" fallback in next major release.
|
712
126
|
this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function A(e,t){var n,r=f({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(
|
713
127
|
// make sure changes to properties don't modify parent config
|
714
|
-
r[n]=f({},r[n]));return r}function
|
128
|
+
r[n]=f({},r[n]));return r}function H(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var I={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function P(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,C=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},$={};
|
715
129
|
// token: 'M'
|
716
130
|
// padded: ['MM', 2]
|
717
131
|
// ordinal: 'Mo'
|
718
132
|
// callback: function () { this.month() + 1 }
|
719
|
-
function
|
133
|
+
function B(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&($[e]=i),t&&($[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,n,r=e.match(N);for(t=0,n=r.length;t<n;t++)$[r[t]]?r[t]=$[r[t]]:r[t]=Y(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=O(r[i])?r[i].call(t,e):r[i];return o}}
|
720
134
|
// format date using native date object
|
721
|
-
function G(e,t){return e.isValid()?(t=j(t,e.localeData()),
|
135
|
+
function G(e,t){return e.isValid()?(t=j(t,e.localeData()),R[t]=R[t]||U(t),R[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var V={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 W(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).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 Z(){return this._invalidDate}var X="%d",K=/\d{1,2}/;function q(e){return this._ordinal.replace("%d",e)}var J={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 Q(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,n,r={};for(n in e)a(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var oe={};function se(e,t){oe[e]=t}function ae(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ue(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ue(t)),n}function he(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):de(this,e)}}function de(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ce(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),et(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}
|
722
136
|
// MOMENTS
|
723
|
-
function pe(e){return
|
724
|
-
|
725
|
-
|
137
|
+
function pe(e){return O(this[e=re(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,r=ae(e=ie(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(O(this[e=re(e)]))return this[e](t);return this}var ge,ye=/\d/,// 0 - 9
|
138
|
+
_e=/\d\d/,// 00 - 99
|
139
|
+
be=/\d{3}/,// 000 - 999
|
726
140
|
ve=/\d{4}/,// 0000 - 9999
|
727
|
-
|
728
|
-
|
141
|
+
Ee=/[+-]?\d{6}/,// -999999 - 999999
|
142
|
+
Te=/\d\d?/,// 0 - 99
|
729
143
|
Se=/\d\d\d\d?/,// 999 - 9999
|
730
144
|
ke=/\d\d\d\d\d\d?/,// 99999 - 999999
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
145
|
+
Me=/\d{1,3}/,// 0 - 999
|
146
|
+
De=/\d{1,4}/,// 0 - 9999
|
147
|
+
xe=/[+-]?\d{1,6}/,// -999999 - 999999
|
148
|
+
Oe=/\d+/,// 0 - inf
|
735
149
|
Le=/[+-]?\d+/,// -inf - inf
|
736
|
-
|
737
|
-
|
738
|
-
|
150
|
+
Ae=/Z|[+-]\d\d:?\d\d/gi,// +00:00 -00:00 +0000 -0000 or Z
|
151
|
+
He=/Z|[+-]\d\d(?::?\d\d)?/gi,// +00 -00 +00:00 -00:00 +0000 -0000 or Z
|
152
|
+
Ie=/[+-]?\d+(\.\d{1,3})?/,// 123456789 123456789.123
|
739
153
|
// any word (or two) characters or numbers including two/three word month in arabic.
|
740
154
|
// includes scottish gaelic two word and hyphenated months
|
741
|
-
|
155
|
+
Pe=/[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 Fe(e,t,n){ge[e]=O(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return a(ge,e)?ge[e](t._strict,t._locale):new RegExp(Ce(e))}
|
742
156
|
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
743
|
-
function Ce(e){return
|
157
|
+
function Ce(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var $e={};function Be(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=ce(e)}),r=e.length,n=0;n<r;n++)$e[e[n]]=i}function Ye(e,t){Be(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Ue(e,t,n){null!=t&&a($e,e)&&$e[e](t,n._a,n,e)}var Ge,je=0,Ve=1,We=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 n=Qe(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}
|
744
158
|
// FORMATTING
|
745
|
-
|
159
|
+
Ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){
|
746
160
|
// I know
|
747
|
-
var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},
|
161
|
+
var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},B("M",["MM",2],"Mo",(function(){return this.month()+1})),B("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),B("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),
|
748
162
|
// ALIASES
|
749
163
|
ne("month","M"),
|
750
164
|
// PRIORITY
|
751
165
|
se("month",8),
|
752
166
|
// PARSING
|
753
|
-
|
167
|
+
Fe("M",Te),Fe("MM",Te,_e),Fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),Fe("MMMM",(function(e,t){return t.monthsRegex(e)})),Be(["M","MM"],(function(e,t){t[Ve]=ce(e)-1})),Be(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);
|
754
168
|
// if we didn't find a month name, mark the date as invalid.
|
755
|
-
null!=i?t[
|
169
|
+
null!=i?t[Ve]=i:g(n).invalidMonth=e}));
|
756
170
|
// LOCALES
|
757
|
-
var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=
|
171
|
+
var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Pe,ot=Pe;function st(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||rt).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function at(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[rt.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(
|
758
172
|
// this is not used
|
759
|
-
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=
|
173
|
+
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,s))?i:null:-1!==(i=Ge.call(this._longMonthsParse,s))?i:null:"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,s))||-1!==(i=Ge.call(this._longMonthsParse,s))?i:null:-1!==(i=Ge.call(this._longMonthsParse,s))||-1!==(i=Ge.call(this._shortMonthsParse,s))?i:null}function ut(e,t,n){var r,i,o;if(this._monthsParseExact)return lt.call(this,e,t,n);
|
760
174
|
// TODO: add sorting
|
761
175
|
// Sorting makes sure if one month (or abbr) is a prefix of another
|
762
176
|
// see sorting in computeMonthsParse
|
@@ -775,20 +189,20 @@ if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),et(e.
|
|
775
189
|
n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));
|
776
190
|
// Sorting makes sure if one month (or abbr) is a prefix of another it
|
777
191
|
// will match the longer piece.
|
778
|
-
for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]
|
192
|
+
for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=Re(r[t]),i[t]=Re(i[t]);for(t=0;t<24;t++)o[t]=Re(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}
|
779
193
|
// FORMATTING
|
780
194
|
// HELPERS
|
781
195
|
function gt(e){return le(e)?366:365}
|
782
196
|
// HOOKS
|
783
|
-
|
197
|
+
B("Y",0,0,(function(){var e=this.year();return e<=9999?F(e,4):"+"+e})),B(0,["YY",2],0,(function(){return this.year()%100})),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),
|
784
198
|
// ALIASES
|
785
199
|
ne("year","y"),
|
786
200
|
// PRIORITIES
|
787
201
|
se("year",1),
|
788
202
|
// PARSING
|
789
|
-
|
203
|
+
Fe("Y",Le),Fe("YY",Te,_e),Fe("YYYY",De,ve),Fe("YYYYY",xe,Ee),Fe("YYYYYY",xe,Ee),Be(["YYYYY","YYYYYY"],je),Be("YYYY",(function(e,t){t[je]=2===e.length?r.parseTwoDigitYear(e):ce(e)})),Be("YY",(function(e,t){t[je]=r.parseTwoDigitYear(e)})),Be("Y",(function(e,t){t[je]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ce(e)+(ce(e)>68?1900:2e3)};
|
790
204
|
// MOMENTS
|
791
|
-
var yt=he("FullYear",!0);function
|
205
|
+
var yt=he("FullYear",!0);function _t(){return le(this.year())}function bt(e,t,n,r,i,o,s){
|
792
206
|
// can't just apply() to create a date:
|
793
207
|
// https://stackoverflow.com/q/181348
|
794
208
|
var a;
|
@@ -804,33 +218,33 @@ return e<100&&e>=0?(
|
|
804
218
|
function wt(e,t,n){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
|
805
219
|
r=7+t-n;return-(7+vt(e,0,r).getUTCDay()-t)%7+r-1}
|
806
220
|
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
|
807
|
-
function Et(e,t,n,r,i){var o,s,a=1+7*(t-1)+(7+n-r)%7+wt(e,r,i);return a<=0?s=gt(o=e-1)+a:a>gt(e)?(o=e+1,s=a-gt(e)):(o=e,s=a),{year:o,dayOfYear:s}}function
|
221
|
+
function Et(e,t,n,r,i){var o,s,a=1+7*(t-1)+(7+n-r)%7+wt(e,r,i);return a<=0?s=gt(o=e-1)+a:a>gt(e)?(o=e+1,s=a-gt(e)):(o=e,s=a),{year:o,dayOfYear:s}}function Tt(e,t,n){var r,i,o=wt(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?r=s+St(i=e.year()-1,t,n):s>St(e.year(),t,n)?(r=s-St(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function St(e,t,n){var r=wt(e,t,n),i=wt(e+1,t,n);return(gt(e)-r+i)/7}
|
808
222
|
// FORMATTING
|
809
223
|
// HELPERS
|
810
224
|
// LOCALES
|
811
|
-
function
|
225
|
+
function kt(e){return Tt(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),
|
812
226
|
// ALIASES
|
813
227
|
ne("week","w"),ne("isoWeek","W"),
|
814
228
|
// PRIORITIES
|
815
229
|
se("week",5),se("isoWeek",5),
|
816
230
|
// PARSING
|
817
|
-
|
818
|
-
doy:6};function
|
231
|
+
Fe("w",Te),Fe("ww",Te,_e),Fe("W",Te),Fe("WW",Te,_e),Ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ce(e)}));var Mt={dow:0,// Sunday is the first day of the week.
|
232
|
+
doy:6};function Dt(){return this._week.dow}function xt(){return this._week.doy}
|
819
233
|
// MOMENTS
|
820
|
-
function
|
234
|
+
function Ot(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Lt(e){var t=Tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}
|
821
235
|
// FORMATTING
|
822
236
|
// HELPERS
|
823
|
-
function At(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function
|
237
|
+
function At(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ht(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}
|
824
238
|
// LOCALES
|
825
|
-
function
|
239
|
+
function It(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),B("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),B("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),
|
826
240
|
// ALIASES
|
827
241
|
ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),
|
828
242
|
// PRIORITY
|
829
243
|
se("day",11),se("weekday",11),se("isoWeekday",11),
|
830
244
|
// PARSING
|
831
|
-
|
245
|
+
Fe("d",Te),Fe("e",Te),Fe("E",Te),Fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ye(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);
|
832
246
|
// if we didn't get a weekday name, mark the date as invalid
|
833
|
-
null!=i?t.d=i:g(n).invalidWeekday=e})),
|
247
|
+
null!=i?t.d=i:g(n).invalidWeekday=e})),Ye(["d","e","E"],(function(e,t,n,r){t[r]=ce(e)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ct=Pe,Rt=Pe,$t=Pe;function Bt(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?It(n,this._week.dow):e?n[e.day()]:n}function Yt(e){return!0===e?It(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?It(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Gt(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,s))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._shortWeekdaysParse,s))||-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,s))||-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._minWeekdaysParse,s))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,s))||-1!==(i=Ge.call(this._weekdaysParse,s))||-1!==(i=Ge.call(this._shortWeekdaysParse,s))?i:null}function jt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Gt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){
|
834
248
|
// test the regex
|
835
249
|
if(
|
836
250
|
// make the regex if we don't have it already
|
@@ -840,30 +254,30 @@ function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this
|
|
840
254
|
// behaves the same as moment#day except
|
841
255
|
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
|
842
256
|
// as a setter, sunday should belong to the previous week.
|
843
|
-
if(null!=e){var t=
|
257
|
+
if(null!=e){var t=Ht(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ct),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Xt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Rt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)
|
844
258
|
// make the regex if we don't have it already
|
845
|
-
n=p([2e3,1]).day(t),r
|
259
|
+
n=p([2e3,1]).day(t),r=Re(this.weekdaysMin(n,"")),i=Re(this.weekdaysShort(n,"")),o=Re(this.weekdays(n,"")),s.push(r),a.push(i),l.push(o),u.push(r),u.push(i),u.push(o);
|
846
260
|
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
|
847
261
|
// will match the longer piece.
|
848
262
|
s.sort(e),a.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("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}
|
849
263
|
// FORMATTING
|
850
|
-
function Jt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function en(e,t){
|
264
|
+
function Jt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function en(e,t){B(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}
|
851
265
|
// PARSING
|
852
266
|
function tn(e,t){return t._meridiemParse}
|
853
267
|
// LOCALES
|
854
268
|
function nn(e){
|
855
269
|
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
|
856
270
|
// Using charAt should be more compatible.
|
857
|
-
return"p"===(e+"").toLowerCase().charAt(0)}
|
271
|
+
return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Jt),B("k",["kk",2],0,Qt),B("hmm",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+Jt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),en("a",!0),en("A",!1),
|
858
272
|
// ALIASES
|
859
273
|
ne("hour","h"),
|
860
274
|
// PRIORITY
|
861
|
-
se("hour",13),
|
275
|
+
se("hour",13),Fe("a",tn),Fe("A",tn),Fe("H",Te),Fe("h",Te),Fe("k",Te),Fe("HH",Te,_e),Fe("hh",Te,_e),Fe("kk",Te,_e),Fe("hmm",Se),Fe("hmmss",ke),Fe("Hmm",Se),Fe("Hmmss",ke),Be(["H","HH"],ze),Be(["k","kk"],(function(e,t,n){var r=ce(e);t[ze]=24===r?0:r})),Be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Be(["h","hh"],(function(e,t,n){t[ze]=ce(e),g(n).bigHour=!0})),Be("hmm",(function(e,t,n){var r=e.length-2;t[ze]=ce(e.substr(0,r)),t[Ze]=ce(e.substr(r)),g(n).bigHour=!0})),Be("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=ce(e.substr(0,r)),t[Ze]=ce(e.substr(r,2)),t[Xe]=ce(e.substr(i)),g(n).bigHour=!0})),Be("Hmm",(function(e,t,n){var r=e.length-2;t[ze]=ce(e.substr(0,r)),t[Ze]=ce(e.substr(r))})),Be("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[ze]=ce(e.substr(0,r)),t[Ze]=ce(e.substr(r,2)),t[Xe]=ce(e.substr(i))}));var rn=/[ap]\.?m?\.?/i,
|
862
276
|
// Setting the hour should keep the time, because the user explicitly
|
863
277
|
// specified which hour they want. So trying to maintain the same hour (in
|
864
278
|
// a new timezone) makes sense. Adding/subtracting hours does not follow
|
865
279
|
// this rule.
|
866
|
-
on=he("Hours",!0);function sn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,ln={calendar:
|
280
|
+
on=he("Hours",!0);function sn(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,ln={calendar:I,longDateFormat:V,invalidDate:z,ordinal:X,dayOfMonthOrdinalParse:K,relativeTime:J,months:tt,monthsShort:nt,week:Mt,weekdays:Pt,weekdaysMin:Nt,weekdaysShort:Ft,meridiemParse:rn},un={},cn={};
|
867
281
|
// internal storage for locale config files
|
868
282
|
function hn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}
|
869
283
|
// pick the locale from the array
|
@@ -875,7 +289,7 @@ break;t--}o++}return an}function pn(e){
|
|
875
289
|
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
876
290
|
return null!=e.match("^[^/\\\\]*$")}function mn(t){var n=null;
|
877
291
|
// TODO: Find a better way to register and load all the locales in Node
|
878
|
-
if(void 0===un[t]&&e&&e.exports&&pn(t))try{n=an._abbr,
|
292
|
+
if(void 0===un[t]&&e&&e.exports&&pn(t))try{n=an._abbr,we(),gn(n)}catch(e){
|
879
293
|
// mark as not found to avoid repeating expensive file require call causing high CPU
|
880
294
|
// when trying to find en-US, en_US, en-us for every format call
|
881
295
|
un[t]=null;// null means not found
|
@@ -883,17 +297,17 @@ un[t]=null;// null means not found
|
|
883
297
|
// This function will load locale and then set the global locale. If
|
884
298
|
// no arguments are passed in, it will simply return the current global
|
885
299
|
// locale key.
|
886
|
-
function gn(e,t){var n;return e&&((n=u(t)?
|
300
|
+
function gn(e,t){var n;return e&&((n=u(t)?bn(e):yn(e,t))?
|
887
301
|
// moment.duration._locale = moment._locale = data;
|
888
302
|
an=n:"undefined"!=typeof console&&console.warn&&
|
889
303
|
//warn user if arguments are passed but the locale could not be set
|
890
|
-
console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function yn(e,t){if(null!==t){var n,r=ln;if(t.abbr=e,null!=un[e])
|
304
|
+
console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function yn(e,t){if(null!==t){var n,r=ln;if(t.abbr=e,null!=un[e])x("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."),r=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])r=un[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return un[e]=new H(A(r,t)),cn[e]&&cn[e].forEach((function(e){yn(e.name,e.config)})),
|
891
305
|
// backwards compat for now: also set the locale
|
892
306
|
// make sure we set the locale AFTER all child locales have been
|
893
307
|
// created, so we won't end up with the child locale set.
|
894
308
|
gn(e),un[e]}
|
895
309
|
// useful for testing
|
896
|
-
return delete un[e],null}function
|
310
|
+
return delete un[e],null}function _n(e,t){if(null!=t){var n,r,i=ln;null!=un[e]&&null!=un[e].parentLocale?
|
897
311
|
// Update existing child locale in-place to avoid memory-leaks
|
898
312
|
un[e].set(A(un[e]._config,t)):(
|
899
313
|
// MERGE
|
@@ -901,94 +315,94 @@ null!=(r=mn(e))&&(i=r._config),t=A(i,t),null==r&&(
|
|
901
315
|
// updateLocale is called for creating a new locale
|
902
316
|
// Set abbr so it will have a name (getters return
|
903
317
|
// undefined otherwise).
|
904
|
-
t.abbr=e),(n=new
|
318
|
+
t.abbr=e),(n=new H(t)).parentLocale=un[e],un[e]=n),
|
905
319
|
// backwards compat for now: also set the locale
|
906
320
|
gn(e)}else
|
907
321
|
// pass null for config to unupdate, useful for tests
|
908
322
|
null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===gn()&&gn(e)):null!=un[e]&&delete un[e]);return un[e]}
|
909
323
|
// returns locale data
|
910
|
-
function
|
324
|
+
function bn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(
|
911
325
|
//short-circuit everything else
|
912
|
-
t=mn(e))return t;e=[e]}return fn(e)}function vn(){return
|
326
|
+
t=mn(e))return t;e=[e]}return fn(e)}function vn(){return M(un)}function wn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Ve]<0||n[Ve]>11?Ve:n[We]<1||n[We]>et(n[je],n[Ve])?We:n[ze]<0||n[ze]>24||24===n[ze]&&(0!==n[Ze]||0!==n[Xe]||0!==n[Ke])?ze:n[Ze]<0||n[Ze]>59?Ze:n[Xe]<0||n[Xe]>59?Xe:n[Ke]<0||n[Ke]>999?Ke:-1,g(e)._overflowDayOfYear&&(t<je||t>We)&&(t=We),g(e)._overflowWeeks&&-1===t&&(t=qe),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}
|
913
327
|
// iso 8601 regex
|
914
328
|
// 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)
|
915
|
-
var En=/^\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)?)?$/,
|
329
|
+
var En=/^\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)?)?$/,Tn=/^\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)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["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]],
|
916
330
|
// iso time formats and regexes
|
917
|
-
|
331
|
+
Mn=[["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/]],Dn=/^\/?Date\((-?\d+)/i,
|
918
332
|
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
919
|
-
|
333
|
+
xn=/^(?:(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}))$/,On={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};
|
920
334
|
// date from iso format
|
921
|
-
function
|
335
|
+
function Ln(e){var t,n,r,i,o,s,a=e._i,l=En.exec(a)||Tn.exec(a),u=kn.length,c=Mn.length;if(l){for(g(e).iso=!0,t=0,n=u;t<n;t++)if(kn[t][1].exec(l[1])){i=kn[t][0],r=!1!==kn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(Mn[t][1].exec(l[3])){
|
922
336
|
// match[2] should be 'T' or space
|
923
|
-
o=(l[2]||" ")+
|
337
|
+
o=(l[2]||" ")+Mn[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=i+(o||"")+(s||""),Un(e)}else e._isValid=!1}function An(e,t,n,r,i,o){var s=[Hn(e),nt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&s.push(parseInt(o,10)),s}function Hn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function In(e){
|
924
338
|
// Remove comments and folding whitespace and replace multiple-spaces with a single space
|
925
|
-
return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function
|
339
|
+
return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pn(e,t,n){return!e||Ft.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Fn(e,t,n){if(e)return On[e];if(t)
|
926
340
|
// the only allowed military tz is Z
|
927
341
|
return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}
|
928
342
|
// date and time from ref 2822 format
|
929
|
-
function
|
343
|
+
function Nn(e){var t,n=xn.exec(In(e._i));if(n){if(t=An(n[4],n[3],n[2],n[5],n[6],n[7]),!Pn(n[1],t,e))return;e._a=t,e._tzm=Fn(n[8],n[9],n[10]),e._d=vt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}
|
930
344
|
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
|
931
|
-
function
|
345
|
+
function Cn(e){var t=Dn.exec(e._i);null===t?(Ln(e),!1===e._isValid&&(delete e._isValid,Nn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:
|
932
346
|
// Final attempt, use Input Fallback
|
933
347
|
r.createFromInputFallback(e)))):e._d=new Date(+t[1])}
|
934
348
|
// Pick the first defined of two or three arguments.
|
935
|
-
function
|
349
|
+
function Rn(e,t,n){return null!=e?e:null!=t?t:n}function $n(e){
|
936
350
|
// hooks is actually the exported moment object
|
937
351
|
var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}
|
938
352
|
// convert an array to a date.
|
939
353
|
// the array should mirror the parameters below
|
940
354
|
// note: all values past the year are optional and will default to the lowest possible value.
|
941
355
|
// [year, month, day , hour, minute, second, millisecond]
|
942
|
-
function
|
356
|
+
function Bn(e){var t,n,r,i,o,s=[];if(!e._d){
|
943
357
|
// Default to current date.
|
944
358
|
// * if no year, month, day of month are given, default to today
|
945
359
|
// * if day of month is given, default month and year
|
946
360
|
// * if month is given, default only year
|
947
361
|
// * if year is given, don't default anything
|
948
|
-
for(r
|
362
|
+
for(r=$n(e),
|
949
363
|
//compute day of the year from weeks and weekdays
|
950
|
-
e._w&&null==e._a[
|
364
|
+
e._w&&null==e._a[We]&&null==e._a[Ve]&&Yn(e),
|
951
365
|
//if the day of the year is set, figure out what it is
|
952
|
-
null!=e._dayOfYear&&(o=
|
366
|
+
null!=e._dayOfYear&&(o=Rn(e._a[je],r[je]),(e._dayOfYear>gt(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=vt(o,0,e._dayOfYear),e._a[Ve]=n.getUTCMonth(),e._a[We]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];
|
953
367
|
// Zero out whatever was not defaulted, including time
|
954
368
|
for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];
|
955
369
|
// Check for 24:00:00.000
|
956
|
-
24===e._a[
|
370
|
+
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?vt:bt).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),
|
957
371
|
// Apply timezone offset from input. The actual utcOffset can be changed
|
958
372
|
// with parseZone.
|
959
|
-
null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[
|
373
|
+
null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),
|
960
374
|
// check for mismatching day of week
|
961
375
|
e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Yn(e){var t,n,r,i,o,s,a,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,s=4,
|
962
376
|
// TODO: We need to take the current isoWeekYear, but that depends on
|
963
377
|
// how we interpret now (local, utc, fixed offset). So create
|
964
378
|
// a now version of current config (take local/utc/offset flags, and
|
965
379
|
// create now).
|
966
|
-
n=
|
380
|
+
n=Rn(t.GG,e._a[je],Tt(Kn(),1,4).year),r=Rn(t.W,1),((i=Rn(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,u=Tt(Kn(),o,s),n=Rn(t.gg,e._a[je],u.year),
|
967
381
|
// Default to current week.
|
968
|
-
r=
|
382
|
+
r=Rn(t.w,u.week),null!=t.d?((
|
969
383
|
// weekday -- low day numbers are considered next week
|
970
384
|
i=t.d)<0||i>6)&&(l=!0):null!=t.e?(
|
971
385
|
// local weekday -- counting starts from beginning of week
|
972
386
|
i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):
|
973
387
|
// default to beginning of week
|
974
|
-
i=o),r<1||r>
|
388
|
+
i=o),r<1||r>St(n,o,s)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(a=Et(n,r,i,o,s),e._a[je]=a.year,e._dayOfYear=a.dayOfYear)}
|
975
389
|
// constant that refers to the ISO standard
|
976
390
|
// date from string and format string
|
977
391
|
function Un(e){
|
978
392
|
// TODO: Move this to another part of the creation flow to prevent circular deps
|
979
393
|
if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;
|
980
394
|
// This array is used to make a Date, either with `new Date` or `Date.UTC`
|
981
|
-
var t,n,i,o,s,a,l,u=""+e._i,c=u.length,h=0;for(l=(i=j(e._f,e._locale).match(
|
395
|
+
var t,n,i,o,s,a,l,u=""+e._i,c=u.length,h=0;for(l=(i=j(e._f,e._locale).match(N)||[]).length,t=0;t<l;t++)o=i[t],(n=(u.match(Ne(o,e))||[])[0])&&((s=u.substr(0,u.indexOf(n))).length>0&&g(e).unusedInput.push(s),u=u.slice(u.indexOf(n)+n.length),h+=n.length),
|
982
396
|
// don't parse if it's not a known token
|
983
|
-
|
397
|
+
$[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Ue(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);
|
984
398
|
// add remaining unparsed input length to the string
|
985
399
|
g(e).charsLeftOver=c-h,u.length>0&&g(e).unusedInput.push(u),
|
986
400
|
// clear _12h flag if hour is <= 12
|
987
|
-
e._a[
|
401
|
+
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,
|
988
402
|
// handle meridiem
|
989
|
-
e._a[
|
403
|
+
e._a[ze]=Gn(e._locale,e._a[ze],e._meridiem),null!==(
|
990
404
|
// handle era
|
991
|
-
a=g(e).era)&&(e._a[
|
405
|
+
a=g(e).era)&&(e._a[je]=e._locale.erasConvertYear(a,e._a[je])),Bn(e),wn(e)}else Nn(e);else Ln(e)}function Gn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(
|
992
406
|
// Fallback
|
993
407
|
(r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}
|
994
408
|
// date from string and array of format strings
|
@@ -996,16 +410,16 @@ function jn(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(0===l)return g(e).invalidFo
|
|
996
410
|
// if there is any input that was not parsed add a penalty for that format
|
997
411
|
o+=g(t).charsLeftOver,
|
998
412
|
//or tokens
|
999
|
-
o+=10*g(t).unusedTokens.length,g(t).score=o,a?o<r&&(r=o,n=t):(null==r||o<r||s)&&(r=o,n=t,s&&(a=!0));f(e,n||t)}function Vn(e){if(!e._d){var t=ie(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),
|
413
|
+
o+=10*g(t).unusedTokens.length,g(t).score=o,a?o<r&&(r=o,n=t):(null==r||o<r||s)&&(r=o,n=t,s&&(a=!0));f(e,n||t)}function Vn(e){if(!e._d){var t=ie(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Bn(e)}}function Wn(e){var t=new E(wn(zn(e)));return t._nextDay&&(
|
1000
414
|
// Adding is smart enough around DST
|
1001
|
-
t.add(1,"d"),t._nextDay=void 0),t}function zn(e){var t=e._i,n=e._f;return e._locale=e._locale||
|
415
|
+
t.add(1,"d"),t._nextDay=void 0),t}function zn(e){var t=e._i,n=e._f;return e._locale=e._locale||bn(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new E(wn(t)):(h(t)?e._d=t:o(n)?jn(e):n?Un(e):Zn(e),y(e)||(e._d=null),e))}function Zn(e){var t=e._i;u(t)?e._d=new Date(r.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Cn(e):o(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Bn(e)):s(t)?Vn(e):c(t)?
|
1002
416
|
// from milliseconds
|
1003
417
|
e._d=new Date(t):r.createFromInputFallback(e)}function Xn(e,t,n,r,i){var a={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),
|
1004
418
|
// object construction must be done this way.
|
1005
419
|
// https://github.com/moment/moment/issues/1423
|
1006
|
-
a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,Wn(a)}function Kn(e,t,n,r){return Xn(e,t,n,r,!1)}r.createFromInputFallback=
|
420
|
+
a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,Wn(a)}function Kn(e,t,n,r){return Xn(e,t,n,r,!1)}r.createFromInputFallback=k("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":""))})),r.ISO_8601=function(){},
|
1007
421
|
// constant that refers to the RFC 2822 form
|
1008
|
-
r.RFC_2822=function(){};var qn=
|
422
|
+
r.RFC_2822=function(){};var qn=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Jn=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));
|
1009
423
|
// Pick a moment m from moments so that m[fn](other) is true for all
|
1010
424
|
// other. This relies on the function fn to be transitive.
|
1011
425
|
|
@@ -1013,8 +427,8 @@ r.RFC_2822=function(){};var qn=T("moment().min is deprecated, use moment.max ins
|
|
1013
427
|
// first element is an array of moment objects.
|
1014
428
|
function Qn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}
|
1015
429
|
// TODO: Use [].sort instead?
|
1016
|
-
function er(){return Qn("isBefore",[].slice.call(arguments,0))}function tr(){return Qn("isAfter",[].slice.call(arguments,0))}var nr=function(){return Date.now?Date.now():+new Date},rr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ir(e){var t,n,r=!1,i=rr.length;for(t in e)if(a(e,t)&&(-1===
|
1017
|
-
parseFloat(e[rr[n]])!==ce(e[rr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function sr(){return
|
430
|
+
function er(){return Qn("isBefore",[].slice.call(arguments,0))}function tr(){return Qn("isAfter",[].slice.call(arguments,0))}var nr=function(){return Date.now?Date.now():+new Date},rr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ir(e){var t,n,r=!1,i=rr.length;for(t in e)if(a(e,t)&&(-1===Ge.call(rr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[rr[n]]){if(r)return!1;// only allow non-integers for smallest unit
|
431
|
+
parseFloat(e[rr[n]])!==ce(e[rr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function sr(){return Or(NaN)}function ar(e){var t=ie(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=ir(t),
|
1018
432
|
// representation for dateAddRemove
|
1019
433
|
this._milliseconds=+c+1e3*u+// 1000
|
1020
434
|
6e4*l+// 1000 * 60
|
@@ -1025,20 +439,20 @@ this._days=+s+7*o,
|
|
1025
439
|
// It is impossible to translate months into days without knowing
|
1026
440
|
// which months you are are talking about, so we have to store
|
1027
441
|
// it separately.
|
1028
|
-
this._months=+i+3*r+12*n,this._data={},this._locale=
|
442
|
+
this._months=+i+3*r+12*n,this._data={},this._locale=bn(),this._bubble()}function lr(e){return e instanceof ar}function ur(e){return e<0?-1*Math.round(-1*e):Math.round(e)}
|
1029
443
|
// compare two arrays, return the number of differences
|
1030
444
|
function cr(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&ce(e[r])!==ce(t[r]))&&s++;return s+o}
|
1031
445
|
// FORMATTING
|
1032
|
-
function hr(e,t){
|
446
|
+
function hr(e,t){B(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}hr("Z",":"),hr("ZZ",""),
|
1033
447
|
// PARSING
|
1034
|
-
|
448
|
+
Fe("Z",He),Fe("ZZ",He),Be(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(He,e)}));
|
1035
449
|
// HELPERS
|
1036
450
|
// timezone chunker
|
1037
451
|
// '+10:00' > ['10', '00']
|
1038
452
|
// '-1530' > ['-15', '30']
|
1039
453
|
var dr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(dr)||["-",0,0])[1]+ce(n[2]))?0:"+"===n[0]?r:-r}
|
1040
454
|
// Return a moment from input, that is local/utc/zone equivalent to model.
|
1041
|
-
function pr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(
|
455
|
+
function pr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(T(e)||h(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),
|
1042
456
|
// Use low-level api, because this fn is low-level api.
|
1043
457
|
n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Kn(e).local()}function mr(e){
|
1044
458
|
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
|
@@ -1057,34 +471,34 @@ return-Math.round(e._d.getTimezoneOffset())}
|
|
1057
471
|
// a second time. In case it wants us to change the offset again
|
1058
472
|
// _changeInProgress == true case, then we have to adjust, because
|
1059
473
|
// there is no such time in the given timezone.
|
1060
|
-
function gr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(
|
474
|
+
function gr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(He,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=mr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Pr(this,Or(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:mr(this)}function yr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function _r(e){return this.utcOffset(0,e)}function br(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function vr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(Ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wr(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Er(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Tr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=zn(t))._a?(e=t._isUTC?p(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function kr(){return!!this.isValid()&&this._isUTC}function Mr(){return!!this.isValid()&&this._isUTC&&0===this._offset}
|
1061
475
|
// ASP.NET json date format regex
|
1062
|
-
r.updateOffset=function(){};var
|
476
|
+
r.updateOffset=function(){};var Dr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
|
1063
477
|
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
|
1064
478
|
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
|
1065
479
|
// and further modified to allow for strings containing both week and day
|
1066
|
-
|
480
|
+
xr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Or(e,t){var n,r,i,o=e,
|
1067
481
|
// matching against regexp is expensive, do it on demand
|
1068
|
-
s=null;return lr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(s=
|
482
|
+
s=null;return lr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(s=Dr.exec(e))?(n="-"===s[1]?-1:1,o={y:0,d:ce(s[We])*n,h:ce(s[ze])*n,m:ce(s[Ze])*n,s:ce(s[Xe])*n,ms:ce(ur(1e3*s[Ke]))*n}):(s=xr.exec(e))?(n="-"===s[1]?-1:1,o={y:Lr(s[2],n),M:Lr(s[3],n),w:Lr(s[4],n),d:Lr(s[5],n),h:Lr(s[6],n),m:Lr(s[7],n),s:Lr(s[8],n)}):null==o?
|
1069
483
|
// checks for null or undefined
|
1070
|
-
o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=
|
484
|
+
o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Hr(Kn(o.from),Kn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),lr(e)&&a(e,"_locale")&&(r._locale=e._locale),lr(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Lr(e,t){
|
1071
485
|
// We'd normally use ~~inp for this, but unfortunately it also
|
1072
486
|
// converts floats to ints.
|
1073
487
|
// inp may be undefined, so careful calling replace on it.
|
1074
488
|
var n=e&&parseFloat(e.replace(",","."));
|
1075
489
|
// apply sign while we're at it
|
1076
|
-
return(isNaN(n)?0:n)*t}function Ar(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function
|
490
|
+
return(isNaN(n)?0:n)*t}function Ar(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Hr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Ar(e,t):((n=Ar(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}
|
1077
491
|
// TODO: remove 'name' arg after deprecation is removed
|
1078
|
-
function
|
492
|
+
function Ir(e,t){return function(n,r){var i;
|
1079
493
|
//invert the arguments, but complain about it
|
1080
|
-
return null===r||isNaN(+r)||(
|
494
|
+
return null===r||isNaN(+r)||(x(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."),i=n,n=r,r=i),Pr(this,Or(n,r),e),this}}function Pr(e,t,n,i){var o=t._milliseconds,s=ur(t._days),a=ur(t._months);e.isValid()&&(i=null==i||i,a&&ct(e,de(e,"Month")+a*n),s&&fe(e,"Date",de(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,s||a))}Or.fn=ar.prototype,Or.invalid=sr;var Fr=Ir(1,"add"),Nr=Ir(-1,"subtract");function Cr(e){return"string"==typeof e||e instanceof String}
|
1081
495
|
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
|
1082
|
-
function
|
496
|
+
function Rr(e){return T(e)||h(e)||Cr(e)||c(e)||Br(e)||$r(e)||null==e}function $r(e){var t,n,r=s(e)&&!l(e),i=!1,o=["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=o.length;for(t=0;t<u;t+=1)n=o[t],i=i||a(e,n);return r&&i}function Br(e){var t=o(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Cr(e)})).length),t&&n}function Yr(e){var t,n,r=s(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||a(e,n);return r&&i}function Ur(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Gr(e,t){
|
1083
497
|
// Support for single parameter, formats only overload to the calendar function
|
1084
|
-
1===arguments.length&&(arguments[0]?
|
498
|
+
1===arguments.length&&(arguments[0]?Rr(arguments[0])?(e=arguments[0],t=void 0):Yr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));
|
1085
499
|
// We want to compare the start of today, vs this.
|
1086
500
|
// Getting start-of-today depends on whether we're local/utc/offset or not.
|
1087
|
-
var n=e||Kn(),i=pr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",s=t&&(
|
501
|
+
var n=e||Kn(),i=pr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",s=t&&(O(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,Kn(n)))}function jr(){return new E(this)}function Vr(e,t){var n=T(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Wr(e,t){var n=T(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function zr(e,t,n,r){var i=T(e)?e:Kn(e),o=T(t)?t:Kn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Zr(e,t){var n,r=T(e)?e:Kn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Xr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Kr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function qr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=pr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=Jr(this,r)/12;break;case"month":o=Jr(this,r);break;case"quarter":o=Jr(this,r)/3;break;case"second":o=(this-r)/1e3;break;// 1000
|
1088
502
|
case"minute":o=(this-r)/6e4;break;// 1000 * 60
|
1089
503
|
case"hour":o=(this-r)/36e5;break;// 1000 * 60 * 60
|
1090
504
|
case"day":o=(this-r-i)/864e5;break;// 1000 * 60 * 60 * 24, negate dst
|
@@ -1098,248 +512,817 @@ var n=12*(t.year()-e.year())+(t.month()-e.month()),
|
|
1098
512
|
// b is in (anchor - 1 month, anchor + 1 month)
|
1099
513
|
r=e.clone().add(n,"months");
|
1100
514
|
//check for negative zero, return zero if negative zero
|
1101
|
-
return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ei(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):
|
515
|
+
return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ei(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?
|
1102
516
|
// native implementation is ~50x faster, use it when we can
|
1103
517
|
t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}
|
1104
518
|
/**
|
1105
|
-
* Return a human readable representation of a moment that can
|
1106
|
-
* also be evaluated to get a new moment which is the same
|
1107
|
-
*
|
1108
|
-
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
|
1109
|
-
*/function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ni(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(
|
1110
|
-
// If passed a locale key, it will set the locale for this
|
1111
|
-
// instance. Otherwise, it will return the locale configuration
|
1112
|
-
// variables for this instance.
|
1113
|
-
function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=
|
1114
|
-
// actual modulo - handles negative numbers (for dates before 1970):
|
1115
|
-
function pi(e,t){return(e%t+t)%t}function mi(e,t,n){
|
1116
|
-
// the date constructor remaps years 0-99 to 1900-1999
|
1117
|
-
return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function gi(e,t,n){
|
1118
|
-
// Date.UTC remaps years 0-99 to 1900-1999
|
1119
|
-
return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function yi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gi:mi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*hi),di);break;case"minute":t=this._d.valueOf(),t-=pi(t,hi);break;case"second":t=this._d.valueOf(),t-=pi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function
|
1120
|
-
// new Date(NaN).toJSON() === null
|
1121
|
-
return this.isValid()?this.toISOString():null}function
|
1122
|
-
// truncate time
|
1123
|
-
o=r(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":
|
1124
|
-
// truncate time
|
1125
|
-
o=r(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf()}return s}function
|
1126
|
-
// truncate time
|
1127
|
-
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function
|
1128
|
-
// truncate time
|
1129
|
-
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function
|
1130
|
-
// truncate time
|
1131
|
-
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Fi(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,
|
1132
|
-
// truncate time
|
1133
|
-
i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function
|
1134
|
-
// FORMATTING
|
1135
|
-
function ji(e,t){
|
1136
|
-
// MOMENTS
|
1137
|
-
function Vi(e){return qi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Wi(e){return qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function zi(){return
|
1138
|
-
// FORMATTING
|
1139
|
-
// MOMENTS
|
1140
|
-
function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}
|
1141
|
-
// FORMATTING
|
1142
|
-
|
1143
|
-
// ALIASES
|
1144
|
-
ne("weekYear","gg"),ne("isoWeekYear","GG"),
|
1145
|
-
// PRIORITY
|
1146
|
-
se("weekYear",1),se("isoWeekYear",1),
|
1147
|
-
// PARSING
|
1148
|
-
|
1149
|
-
// ALIASES
|
1150
|
-
ne("quarter","Q"),
|
1151
|
-
// PRIORITY
|
1152
|
-
se("quarter",7),
|
1153
|
-
// PARSING
|
1154
|
-
|
1155
|
-
// ALIASES
|
1156
|
-
ne("date","D"),
|
1157
|
-
// PRIORITY
|
1158
|
-
se("date",9),
|
1159
|
-
// PARSING
|
1160
|
-
|
1161
|
-
// TODO: Remove "ordinalParse" fallback in next major release.
|
1162
|
-
return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Be(["D","DD"],
|
1163
|
-
// MOMENTS
|
1164
|
-
var eo=he("Date",!0);
|
1165
|
-
// FORMATTING
|
1166
|
-
// HELPERS
|
1167
|
-
// MOMENTS
|
1168
|
-
function to(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}
|
1169
|
-
// FORMATTING
|
1170
|
-
|
1171
|
-
// ALIASES
|
1172
|
-
ne("dayOfYear","DDD"),
|
1173
|
-
// PRIORITY
|
1174
|
-
se("dayOfYear",4),
|
1175
|
-
// PARSING
|
1176
|
-
|
1177
|
-
// ALIASES
|
1178
|
-
ne("minute","m"),
|
1179
|
-
// PRIORITY
|
1180
|
-
se("minute",14),
|
1181
|
-
// PARSING
|
1182
|
-
|
1183
|
-
// MOMENTS
|
1184
|
-
var no=he("Minutes",!1);
|
1185
|
-
// FORMATTING
|
1186
|
-
|
1187
|
-
// ALIASES
|
1188
|
-
ne("second","s"),
|
1189
|
-
// PRIORITY
|
1190
|
-
se("second",15),
|
1191
|
-
// PARSING
|
1192
|
-
|
1193
|
-
// MOMENTS
|
1194
|
-
var ro,io,oo=he("Seconds",!1);
|
1195
|
-
// FORMATTING
|
1196
|
-
for(
|
1197
|
-
// ALIASES
|
1198
|
-
ne("millisecond","ms"),
|
1199
|
-
// PRIORITY
|
1200
|
-
se("millisecond",16),
|
1201
|
-
// PARSING
|
1202
|
-
|
1203
|
-
// MOMENTS
|
1204
|
-
function ao(){return this._isUTC?"UTC":""}function lo(){return this._isUTC?"Coordinated Universal Time":""}io=he("Milliseconds",!1),
|
1205
|
-
// FORMATTING
|
1206
|
-
|
1207
|
-
// ()
|
1208
|
-
// (5)
|
1209
|
-
// (fmt, 5)
|
1210
|
-
// (fmt)
|
1211
|
-
// (true)
|
1212
|
-
// (true, 5)
|
1213
|
-
// (true, fmt, 5)
|
1214
|
-
// (true, fmt)
|
1215
|
-
function yo(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=
|
1216
|
-
// Side effect imports
|
1217
|
-
r.lang=
|
1218
|
-
// supports only 2.0-style add(1, 's') or add(duration)
|
1219
|
-
function
|
1220
|
-
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
1221
|
-
function
|
1222
|
-
// if we have a mix of positive and negative values, bubble down first
|
1223
|
-
// check: https://github.com/moment/moment/issues/2166
|
1224
|
-
return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*
|
1225
|
-
// The following code bubbles up values, see the tests for
|
1226
|
-
// examples of what that means.
|
1227
|
-
l.milliseconds=o%1e3,e=ue(o/1e3),l.seconds=e%60,t=ue(e/60),l.minutes=t%60,n=ue(t/60),l.hours=n%24,s+=ue(n/24),a+=
|
1228
|
-
// convert days to months
|
1229
|
-
i=ue(
|
1230
|
-
// 12 months -> 1 year
|
1231
|
-
r=ue(a/12),a%=12,l.days=s,l.months=a,l.years=r,this}function
|
1232
|
-
// 400 years have 146097 days (taking into account leap year rules)
|
1233
|
-
// 400 years have 12 months === 4800
|
1234
|
-
return 4800*e/146097}function Ao(e){
|
1235
|
-
// the reverse of daysToMonths
|
1236
|
-
return 146097*e/4800}function
|
1237
|
-
// handle milliseconds separately because of floating point math errors (issue #1867)
|
1238
|
-
t=this._days+Math.round(Ao(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;
|
1239
|
-
// Math.floor prevents floating point math errors here
|
1240
|
-
case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}
|
1241
|
-
// TODO: Use this.as('ms')?
|
1242
|
-
function
|
1243
|
-
s:45,// seconds to minute
|
1244
|
-
m:45,// minutes to hour
|
1245
|
-
h:22,// hours to day
|
1246
|
-
d:26,// days to month/week
|
1247
|
-
w:null,// weeks to month
|
1248
|
-
M:11};
|
1249
|
-
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
1250
|
-
function rs(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function is(e,t,n,r){var i=
|
1251
|
-
// This function allows you to set the rounding function for relative time strings
|
1252
|
-
function os(e){return void 0===e?ts:"function"==typeof e&&(ts=e,!0)}
|
1253
|
-
// This function allows you to set a threshold for relative time strings
|
1254
|
-
function ss(e,t){return void 0!==ns[e]&&(void 0===t?ns[e]:(ns[e]=t,"s"===e&&(ns.ss=t-1),!0))}function as(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ns;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ns,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=is(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ls=Math.abs;function us(e){return(e>0)-(e<0)||+e}function cs(){
|
1255
|
-
// for ISO strings we do not use the normal bubbling rules:
|
1256
|
-
// * milliseconds bubble up until they become hours
|
1257
|
-
// * days do not bubble at all
|
1258
|
-
// * months bubble up until they become years
|
1259
|
-
// This is because there is no context-free conversion between hours and days
|
1260
|
-
// (think of clock changes)
|
1261
|
-
// and also not between days and months (28-31 days per month)
|
1262
|
-
if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,s,a,l=ls(this._milliseconds)/1e3,u=ls(this._days),c=ls(this._months),h=this.asSeconds();return h?(
|
1263
|
-
// 3600 seconds -> 60 minutes -> 1 hour
|
1264
|
-
e=ue(l/60),t=ue(e/60),l%=60,e%=60,
|
1265
|
-
// 12 months -> 1 year
|
1266
|
-
n=ue(c/12),c%=12,
|
1267
|
-
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
|
1268
|
-
r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",o=us(this._months)!==us(h)?"-":"",s=us(this._days)!==us(h)?"-":"",a=us(this._milliseconds)!==us(h)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var hs=ar.prototype;return hs.isValid=or,hs.abs=
|
1269
|
-
// FORMATTING
|
1270
|
-
|
1271
|
-
// PARSING
|
1272
|
-
|
1273
|
-
//! moment.js
|
1274
|
-
r.version="2.29.3",i(Kn),r.fn=uo,r.min=er,r.max=tr,r.now=nr,r.utc=p,r.unix=co,r.months=
|
1275
|
-
// currently HTML5 input type only supports 24-hour formats
|
1276
|
-
r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",// <input type="datetime-local" />
|
1277
|
-
DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",// <input type="datetime-local" step="1" />
|
1278
|
-
DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",// <input type="datetime-local" step="0.001" />
|
1279
|
-
DATE:"YYYY-MM-DD",// <input type="date" />
|
1280
|
-
TIME:"HH:mm",// <input type="time" />
|
1281
|
-
TIME_SECONDS:"HH:mm:ss",// <input type="time" step="1" />
|
1282
|
-
TIME_MS:"HH:mm:ss.SSS",// <input type="time" step="0.001" />
|
1283
|
-
WEEK:"GGGG-[W]WW",// <input type="week" />
|
1284
|
-
MONTH:"YYYY-MM"},r}()}))
|
1285
|
-
|
519
|
+
* Return a human readable representation of a moment that can
|
520
|
+
* also be evaluated to get a new moment which is the same
|
521
|
+
*
|
522
|
+
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
|
523
|
+
*/function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ni(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(T(e)&&e.isValid()||Kn(e).isValid())?Or({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.from(Kn(),e)}function oi(e,t){return this.isValid()&&(T(e)&&e.isValid()||Kn(e).isValid())?Or({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.to(Kn(),e)}
|
524
|
+
// If passed a locale key, it will set the locale for this
|
525
|
+
// instance. Otherwise, it will return the locale configuration
|
526
|
+
// variables for this instance.
|
527
|
+
function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=bn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var li=k("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 ui(){return this._locale}var ci=1e3,hi=60*ci,di=60*hi,fi=3506328*di;
|
528
|
+
// actual modulo - handles negative numbers (for dates before 1970):
|
529
|
+
function pi(e,t){return(e%t+t)%t}function mi(e,t,n){
|
530
|
+
// the date constructor remaps years 0-99 to 1900-1999
|
531
|
+
return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function gi(e,t,n){
|
532
|
+
// Date.UTC remaps years 0-99 to 1900-1999
|
533
|
+
return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function yi(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gi:mi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*hi),di);break;case"minute":t=this._d.valueOf(),t-=pi(t,hi);break;case"second":t=this._d.valueOf(),t-=pi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function _i(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gi:mi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-pi(t+(this._isUTC?0:this.utcOffset()*hi),di)-1;break;case"minute":t=this._d.valueOf(),t+=hi-pi(t,hi)-1;break;case"second":t=this._d.valueOf(),t+=ci-pi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ei(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ti(){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 Si(){
|
534
|
+
// new Date(NaN).toJSON() === null
|
535
|
+
return this.isValid()?this.toISOString():null}function ki(){return y(this)}function Mi(){return f({},g(this))}function Di(){return g(this).overflow}function xi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Oi(e,t){var n,i,o,s=this._eras||bn("en")._eras;for(n=0,i=s.length;n<i;++n)switch("string"==typeof s[n].since&&(
|
536
|
+
// truncate time
|
537
|
+
o=r(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":
|
538
|
+
// truncate time
|
539
|
+
o=r(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf()}return s}function Li(e,t,n){var r,i,o,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([o,s,a].indexOf(e)>=0)return l[r]}function Ai(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Hi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
540
|
+
// truncate time
|
541
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
542
|
+
// truncate time
|
543
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(
|
544
|
+
// truncate time
|
545
|
+
n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Fi(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,
|
546
|
+
// truncate time
|
547
|
+
i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function Ni(e){return a(this,"_erasNameRegex")||Gi.call(this),e?this._erasNameRegex:this._erasRegex}function Ci(e){return a(this,"_erasAbbrRegex")||Gi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ri(e){return a(this,"_erasNarrowRegex")||Gi.call(this),e?this._erasNarrowRegex:this._erasRegex}function $i(e,t){return t.erasAbbrRegex(e)}function Bi(e,t){return t.erasNameRegex(e)}function Yi(e,t){return t.erasNarrowRegex(e)}function Ui(e,t){return t._eraYearOrdinalRegex||Oe}function Gi(){var e,t,n=[],r=[],i=[],o=[],s=this.eras();for(e=0,t=s.length;e<t;++e)r.push(Re(s[e].name)),n.push(Re(s[e].abbr)),i.push(Re(s[e].narrow)),o.push(Re(s[e].name)),o.push(Re(s[e].abbr)),o.push(Re(s[e].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}
|
548
|
+
// FORMATTING
|
549
|
+
function ji(e,t){B(0,[e,e.length],0,t)}
|
550
|
+
// MOMENTS
|
551
|
+
function Vi(e){return qi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Wi(e){return qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function zi(){return St(this.year(),1,4)}function Zi(){return St(this.isoWeekYear(),1,4)}function Xi(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Ki(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function qi(e,t,n,r,i){var o;return null==e?Tt(this,r,i).year:(t>(o=St(e,r,i))&&(t=o),Ji.call(this,e,t,n,r,i))}function Ji(e,t,n,r,i){var o=Et(e,t,n,r,i),s=vt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}
|
552
|
+
// FORMATTING
|
553
|
+
// MOMENTS
|
554
|
+
function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}
|
555
|
+
// FORMATTING
|
556
|
+
B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Fe("N",$i),Fe("NN",$i),Fe("NNN",$i),Fe("NNNN",Bi),Fe("NNNNN",Yi),Be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e})),Fe("y",Oe),Fe("yy",Oe),Fe("yyy",Oe),Fe("yyyy",Oe),Fe("yo",Ui),Be(["y","yy","yyy","yyyy"],je),Be(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[je]=n._locale.eraYearOrdinalParse(e,i):t[je]=parseInt(e,10)})),B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ji("gggg","weekYear"),ji("ggggg","weekYear"),ji("GGGG","isoWeekYear"),ji("GGGGG","isoWeekYear"),
|
557
|
+
// ALIASES
|
558
|
+
ne("weekYear","gg"),ne("isoWeekYear","GG"),
|
559
|
+
// PRIORITY
|
560
|
+
se("weekYear",1),se("isoWeekYear",1),
|
561
|
+
// PARSING
|
562
|
+
Fe("G",Le),Fe("g",Le),Fe("GG",Te,_e),Fe("gg",Te,_e),Fe("GGGG",De,ve),Fe("gggg",De,ve),Fe("GGGGG",xe,Ee),Fe("ggggg",xe,Ee),Ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ce(e)})),Ye(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),B("Q",0,"Qo","quarter"),
|
563
|
+
// ALIASES
|
564
|
+
ne("quarter","Q"),
|
565
|
+
// PRIORITY
|
566
|
+
se("quarter",7),
|
567
|
+
// PARSING
|
568
|
+
Fe("Q",ye),Be("Q",(function(e,t){t[Ve]=3*(ce(e)-1)})),B("D",["DD",2],"Do","date"),
|
569
|
+
// ALIASES
|
570
|
+
ne("date","D"),
|
571
|
+
// PRIORITY
|
572
|
+
se("date",9),
|
573
|
+
// PARSING
|
574
|
+
Fe("D",Te),Fe("DD",Te,_e),Fe("Do",(function(e,t){
|
575
|
+
// TODO: Remove "ordinalParse" fallback in next major release.
|
576
|
+
return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Be(["D","DD"],We),Be("Do",(function(e,t){t[We]=ce(e.match(Te)[0])}));
|
577
|
+
// MOMENTS
|
578
|
+
var eo=he("Date",!0);
|
579
|
+
// FORMATTING
|
580
|
+
// HELPERS
|
581
|
+
// MOMENTS
|
582
|
+
function to(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}
|
583
|
+
// FORMATTING
|
584
|
+
B("DDD",["DDDD",3],"DDDo","dayOfYear"),
|
585
|
+
// ALIASES
|
586
|
+
ne("dayOfYear","DDD"),
|
587
|
+
// PRIORITY
|
588
|
+
se("dayOfYear",4),
|
589
|
+
// PARSING
|
590
|
+
Fe("DDD",Me),Fe("DDDD",be),Be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ce(e)})),B("m",["mm",2],0,"minute"),
|
591
|
+
// ALIASES
|
592
|
+
ne("minute","m"),
|
593
|
+
// PRIORITY
|
594
|
+
se("minute",14),
|
595
|
+
// PARSING
|
596
|
+
Fe("m",Te),Fe("mm",Te,_e),Be(["m","mm"],Ze);
|
597
|
+
// MOMENTS
|
598
|
+
var no=he("Minutes",!1);
|
599
|
+
// FORMATTING
|
600
|
+
B("s",["ss",2],0,"second"),
|
601
|
+
// ALIASES
|
602
|
+
ne("second","s"),
|
603
|
+
// PRIORITY
|
604
|
+
se("second",15),
|
605
|
+
// PARSING
|
606
|
+
Fe("s",Te),Fe("ss",Te,_e),Be(["s","ss"],Xe);
|
607
|
+
// MOMENTS
|
608
|
+
var ro,io,oo=he("Seconds",!1);
|
609
|
+
// FORMATTING
|
610
|
+
for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),
|
611
|
+
// ALIASES
|
612
|
+
ne("millisecond","ms"),
|
613
|
+
// PRIORITY
|
614
|
+
se("millisecond",16),
|
615
|
+
// PARSING
|
616
|
+
Fe("S",Me,ye),Fe("SS",Me,_e),Fe("SSS",Me,be),ro="SSSS";ro.length<=9;ro+="S")Fe(ro,Oe);function so(e,t){t[Ke]=ce(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Be(ro,so);
|
617
|
+
// MOMENTS
|
618
|
+
function ao(){return this._isUTC?"UTC":""}function lo(){return this._isUTC?"Coordinated Universal Time":""}io=he("Milliseconds",!1),
|
619
|
+
// FORMATTING
|
620
|
+
B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var uo=E.prototype;function co(e){return Kn(1e3*e)}function ho(){return Kn.apply(null,arguments).parseZone()}function fo(e){return e}uo.add=Fr,uo.calendar=Gr,uo.clone=jr,uo.diff=qr,uo.endOf=_i,uo.format=ni,uo.from=ri,uo.fromNow=ii,uo.to=oi,uo.toNow=si,uo.get=pe,uo.invalidAt=Di,uo.isAfter=Vr,uo.isBefore=Wr,uo.isBetween=zr,uo.isSame=Zr,uo.isSameOrAfter=Xr,uo.isSameOrBefore=Kr,uo.isValid=ki,uo.lang=li,uo.locale=ai,uo.localeData=ui,uo.max=Jn,uo.min=qn,uo.parsingFlags=Mi,uo.set=me,uo.startOf=yi,uo.subtract=Nr,uo.toArray=Ei,uo.toObject=Ti,uo.toDate=wi,uo.toISOString=ei,uo.inspect=ti,"undefined"!=typeof Symbol&&null!=Symbol.for&&(uo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),uo.toJSON=Si,uo.toString=Qr,uo.unix=vi,uo.valueOf=bi,uo.creationData=xi,uo.eraName=Hi,uo.eraNarrow=Ii,uo.eraAbbr=Pi,uo.eraYear=Fi,uo.year=yt,uo.isLeapYear=_t,uo.weekYear=Vi,uo.isoWeekYear=Wi,uo.quarter=uo.quarters=Qi,uo.month=ht,uo.daysInMonth=dt,uo.week=uo.weeks=Ot,uo.isoWeek=uo.isoWeeks=Lt,uo.weeksInYear=Xi,uo.weeksInWeekYear=Ki,uo.isoWeeksInYear=zi,uo.isoWeeksInISOWeekYear=Zi,uo.date=eo,uo.day=uo.days=Vt,uo.weekday=Wt,uo.isoWeekday=zt,uo.dayOfYear=to,uo.hour=uo.hours=on,uo.minute=uo.minutes=no,uo.second=uo.seconds=oo,uo.millisecond=uo.milliseconds=io,uo.utcOffset=gr,uo.utc=_r,uo.local=br,uo.parseZone=vr,uo.hasAlignedHourOffset=wr,uo.isDST=Er,uo.isLocal=Sr,uo.isUtcOffset=kr,uo.isUtc=Mr,uo.isUTC=Mr,uo.zoneAbbr=ao,uo.zoneName=lo,uo.dates=k("dates accessor is deprecated. Use date instead.",eo),uo.months=k("months accessor is deprecated. Use month instead",ht),uo.years=k("years accessor is deprecated. Use year instead",yt),uo.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",yr),uo.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Tr);var po=H.prototype;function mo(e,t,n,r){var i=bn(),o=p().set(r,t);return i[n](o,e)}function go(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return mo(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=mo(e,r,n,"month");return i}
|
621
|
+
// ()
|
622
|
+
// (5)
|
623
|
+
// (fmt, 5)
|
624
|
+
// (fmt)
|
625
|
+
// (true)
|
626
|
+
// (true, 5)
|
627
|
+
// (true, fmt, 5)
|
628
|
+
// (true, fmt)
|
629
|
+
function yo(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=bn(),s=e?o._week.dow:0,a=[];if(null!=n)return mo(t,(n+s)%7,r,"day");for(i=0;i<7;i++)a[i]=mo(t,(i+s)%7,r,"day");return a}function _o(e,t){return go(e,t,"months")}function bo(e,t){return go(e,t,"monthsShort")}function vo(e,t,n){return yo(e,t,n,"weekdays")}function wo(e,t,n){return yo(e,t,n,"weekdaysShort")}function Eo(e,t,n){return yo(e,t,n,"weekdaysMin")}po.calendar=P,po.longDateFormat=W,po.invalidDate=Z,po.ordinal=q,po.preparse=fo,po.postformat=fo,po.relativeTime=Q,po.pastFuture=ee,po.set=L,po.eras=Oi,po.erasParse=Li,po.erasConvertYear=Ai,po.erasAbbrRegex=Ci,po.erasNameRegex=Ni,po.erasNarrowRegex=Ri,po.months=st,po.monthsShort=at,po.monthsParse=ut,po.monthsRegex=pt,po.monthsShortRegex=ft,po.week=kt,po.firstDayOfYear=xt,po.firstDayOfWeek=Dt,po.weekdays=Bt,po.weekdaysMin=Ut,po.weekdaysShort=Yt,po.weekdaysParse=jt,po.weekdaysRegex=Zt,po.weekdaysShortRegex=Xt,po.weekdaysMinRegex=Kt,po.isPM=nn,po.meridiem=sn,gn("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===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),
|
630
|
+
// Side effect imports
|
631
|
+
r.lang=k("moment.lang is deprecated. Use moment.locale instead.",gn),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",bn);var To=Math.abs;function So(){var e=this._data;return this._milliseconds=To(this._milliseconds),this._days=To(this._days),this._months=To(this._months),e.milliseconds=To(e.milliseconds),e.seconds=To(e.seconds),e.minutes=To(e.minutes),e.hours=To(e.hours),e.months=To(e.months),e.years=To(e.years),this}function ko(e,t,n,r){var i=Or(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}
|
632
|
+
// supports only 2.0-style add(1, 's') or add(duration)
|
633
|
+
function Mo(e,t){return ko(this,e,t,1)}
|
634
|
+
// supports only 2.0-style subtract(1, 's') or subtract(duration)
|
635
|
+
function Do(e,t){return ko(this,e,t,-1)}function xo(e){return e<0?Math.floor(e):Math.ceil(e)}function Oo(){var e,t,n,r,i,o=this._milliseconds,s=this._days,a=this._months,l=this._data;
|
636
|
+
// if we have a mix of positive and negative values, bubble down first
|
637
|
+
// check: https://github.com/moment/moment/issues/2166
|
638
|
+
return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*xo(Ao(a)+s),s=0,a=0),
|
639
|
+
// The following code bubbles up values, see the tests for
|
640
|
+
// examples of what that means.
|
641
|
+
l.milliseconds=o%1e3,e=ue(o/1e3),l.seconds=e%60,t=ue(e/60),l.minutes=t%60,n=ue(t/60),l.hours=n%24,s+=ue(n/24),a+=
|
642
|
+
// convert days to months
|
643
|
+
i=ue(Lo(s)),s-=xo(Ao(i)),
|
644
|
+
// 12 months -> 1 year
|
645
|
+
r=ue(a/12),a%=12,l.days=s,l.months=a,l.years=r,this}function Lo(e){
|
646
|
+
// 400 years have 146097 days (taking into account leap year rules)
|
647
|
+
// 400 years have 12 months === 4800
|
648
|
+
return 4800*e/146097}function Ao(e){
|
649
|
+
// the reverse of daysToMonths
|
650
|
+
return 146097*e/4800}function Ho(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Lo(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(
|
651
|
+
// handle milliseconds separately because of floating point math errors (issue #1867)
|
652
|
+
t=this._days+Math.round(Ao(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;
|
653
|
+
// Math.floor prevents floating point math errors here
|
654
|
+
case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}
|
655
|
+
// TODO: Use this.as('ms')?
|
656
|
+
function Io(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function Po(e){return function(){return this.as(e)}}var Fo=Po("ms"),No=Po("s"),Co=Po("m"),Ro=Po("h"),$o=Po("d"),Bo=Po("w"),Yo=Po("M"),Uo=Po("Q"),Go=Po("y");function jo(){return Or(this)}function Vo(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Wo(e){return function(){return this.isValid()?this._data[e]:NaN}}var zo=Wo("milliseconds"),Zo=Wo("seconds"),Xo=Wo("minutes"),Ko=Wo("hours"),qo=Wo("days"),Jo=Wo("months"),Qo=Wo("years");function es(){return ue(this.days()/7)}var ts=Math.round,ns={ss:44,// a few seconds to seconds
|
657
|
+
s:45,// seconds to minute
|
658
|
+
m:45,// minutes to hour
|
659
|
+
h:22,// hours to day
|
660
|
+
d:26,// days to month/week
|
661
|
+
w:null,// weeks to month
|
662
|
+
M:11};
|
663
|
+
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
|
664
|
+
function rs(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function is(e,t,n,r){var i=Or(e).abs(),o=ts(i.as("s")),s=ts(i.as("m")),a=ts(i.as("h")),l=ts(i.as("d")),u=ts(i.as("M")),c=ts(i.as("w")),h=ts(i.as("y")),d=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=r,rs.apply(null,d)}
|
665
|
+
// This function allows you to set the rounding function for relative time strings
|
666
|
+
function os(e){return void 0===e?ts:"function"==typeof e&&(ts=e,!0)}
|
667
|
+
// This function allows you to set a threshold for relative time strings
|
668
|
+
function ss(e,t){return void 0!==ns[e]&&(void 0===t?ns[e]:(ns[e]=t,"s"===e&&(ns.ss=t-1),!0))}function as(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ns;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ns,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=is(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var ls=Math.abs;function us(e){return(e>0)-(e<0)||+e}function cs(){
|
669
|
+
// for ISO strings we do not use the normal bubbling rules:
|
670
|
+
// * milliseconds bubble up until they become hours
|
671
|
+
// * days do not bubble at all
|
672
|
+
// * months bubble up until they become years
|
673
|
+
// This is because there is no context-free conversion between hours and days
|
674
|
+
// (think of clock changes)
|
675
|
+
// and also not between days and months (28-31 days per month)
|
676
|
+
if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,s,a,l=ls(this._milliseconds)/1e3,u=ls(this._days),c=ls(this._months),h=this.asSeconds();return h?(
|
677
|
+
// 3600 seconds -> 60 minutes -> 1 hour
|
678
|
+
e=ue(l/60),t=ue(e/60),l%=60,e%=60,
|
679
|
+
// 12 months -> 1 year
|
680
|
+
n=ue(c/12),c%=12,
|
681
|
+
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
|
682
|
+
r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",o=us(this._months)!==us(h)?"-":"",s=us(this._days)!==us(h)?"-":"",a=us(this._milliseconds)!==us(h)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var hs=ar.prototype;return hs.isValid=or,hs.abs=So,hs.add=Mo,hs.subtract=Do,hs.as=Ho,hs.asMilliseconds=Fo,hs.asSeconds=No,hs.asMinutes=Co,hs.asHours=Ro,hs.asDays=$o,hs.asWeeks=Bo,hs.asMonths=Yo,hs.asQuarters=Uo,hs.asYears=Go,hs.valueOf=Io,hs._bubble=Oo,hs.clone=jo,hs.get=Vo,hs.milliseconds=zo,hs.seconds=Zo,hs.minutes=Xo,hs.hours=Ko,hs.days=qo,hs.weeks=es,hs.months=Jo,hs.years=Qo,hs.humanize=as,hs.toISOString=cs,hs.toString=cs,hs.toJSON=cs,hs.locale=ai,hs.localeData=ui,hs.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),hs.lang=li,
|
683
|
+
// FORMATTING
|
684
|
+
B("X",0,0,"unix"),B("x",0,0,"valueOf"),
|
685
|
+
// PARSING
|
686
|
+
Fe("x",Le),Fe("X",Ie),Be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Be("x",(function(e,t,n){n._d=new Date(ce(e))})),
|
687
|
+
//! moment.js
|
688
|
+
r.version="2.29.3",i(Kn),r.fn=uo,r.min=er,r.max=tr,r.now=nr,r.utc=p,r.unix=co,r.months=_o,r.isDate=h,r.locale=gn,r.invalid=_,r.duration=Or,r.isMoment=T,r.weekdays=vo,r.parseZone=ho,r.localeData=bn,r.isDuration=lr,r.monthsShort=bo,r.weekdaysMin=Eo,r.defineLocale=yn,r.updateLocale=_n,r.locales=vn,r.weekdaysShort=wo,r.normalizeUnits=re,r.relativeTimeRounding=os,r.relativeTimeThreshold=ss,r.calendarFormat=Ur,r.prototype=uo,
|
689
|
+
// currently HTML5 input type only supports 24-hour formats
|
690
|
+
r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",// <input type="datetime-local" />
|
691
|
+
DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",// <input type="datetime-local" step="1" />
|
692
|
+
DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",// <input type="datetime-local" step="0.001" />
|
693
|
+
DATE:"YYYY-MM-DD",// <input type="date" />
|
694
|
+
TIME:"HH:mm",// <input type="time" />
|
695
|
+
TIME_SECONDS:"HH:mm:ss",// <input type="time" step="1" />
|
696
|
+
TIME_MS:"HH:mm:ss.SSS",// <input type="time" step="0.001" />
|
697
|
+
WEEK:"GGGG-[W]WW",// <input type="week" />
|
698
|
+
MONTH:"YYYY-MM"},r}()})),Te="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Te&&Te,Se="URLSearchParams"in Te,ke="Symbol"in Te&&"iterator"in Symbol,Me="FileReader"in Te&&"Blob"in Te&&function(){try{return new Blob,!0}catch(e){return!1}}(),De="FormData"in Te,xe="ArrayBuffer"in Te;if(xe)var Oe=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Le=ArrayBuffer.isView||function(e){return e&&Oe.indexOf(Object.prototype.toString.call(e))>-1};function Ae(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function He(e){return"string"!=typeof e&&(e=String(e)),e}
|
699
|
+
// Build a destructive iterator for the value list
|
700
|
+
function Ie(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return ke&&(t[Symbol.iterator]=function(){return t}),t}function Pe(e){this.map={},e instanceof Pe?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Fe(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ne(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ce(e){var t=new FileReader,n=Ne(t);return t.readAsArrayBuffer(e),n}function Re(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function $e(){return this.bodyUsed=!1,this._initBody=function(e){var t;
|
701
|
+
/*
|
702
|
+
fetch-mock wraps the Response object in an ES6 Proxy to
|
703
|
+
provide useful test harness features such as flush. However, on
|
704
|
+
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
705
|
+
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
706
|
+
on the object before the Proxy is created. This change ensures
|
707
|
+
Response.bodyUsed exists on the instance, while maintaining the
|
708
|
+
semantic of setting Request.bodyUsed in the constructor before
|
709
|
+
_initBody is called.
|
710
|
+
*/
|
711
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Me&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:De&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Se&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():xe&&Me&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Re(e.buffer),
|
712
|
+
// IE 10-11 can't handle a DataView body.
|
713
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):xe&&(ArrayBuffer.prototype.isPrototypeOf(e)||Le(e))?this._bodyArrayBuffer=Re(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Se&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Me&&(this.blob=function(){var e=Fe(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Fe(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Ce)}),this.text=function(){var e,t,n,r=Fe(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Ne(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},De&&(this.formData=function(){return this.text().then(Ue)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
714
|
+
// HTTP methods whose capitalization should be normalized
|
715
|
+
Pe.prototype.append=function(e,t){e=Ae(e),t=He(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Pe.prototype.delete=function(e){delete this.map[Ae(e)]},Pe.prototype.get=function(e){return e=Ae(e),this.has(e)?this.map[e]:null},Pe.prototype.has=function(e){return this.map.hasOwnProperty(Ae(e))},Pe.prototype.set=function(e,t){this.map[Ae(e)]=He(t)},Pe.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Pe.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Ie(e)},Pe.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ie(e)},Pe.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Ie(e)},ke&&(Pe.prototype[Symbol.iterator]=Pe.prototype.entries);var Be=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Ye(e,t){if(!(this instanceof Ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(t=t||{}).body;if(e instanceof Ye){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Pe(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Pe(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Be.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){
|
716
|
+
// Search for a '_' parameter in the query string
|
717
|
+
var o=/([?&])_=[^&]*/;if(o.test(this.url))
|
718
|
+
// If it already exists then set the value with the current time
|
719
|
+
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Ue(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Ge(e,t){if(!(this instanceof Ge))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Pe(t.headers),this.url=t.url||"",this._initBody(e)}Ye.prototype.clone=function(){return new Ye(this,{body:this._bodyInit})},$e.call(Ye.prototype),$e.call(Ge.prototype),Ge.prototype.clone=function(){return new Ge(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Pe(this.headers),url:this.url})},Ge.error=function(){var e=new Ge(null,{status:0,statusText:""});return e.type="error",e};var je=[301,302,303,307,308];Ge.redirect=function(e,t){if(-1===je.indexOf(t))throw new RangeError("Invalid status code");return new Ge(null,{status:t,headers:{location:e}})};var Ve=Te.DOMException;try{new Ve}catch(e){(Ve=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Ve.prototype.constructor=Ve}function We(e,t){return new Promise((function(n,r){var i=new Ye(e,t);if(i.signal&&i.signal.aborted)return r(new Ve("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Pe,
|
720
|
+
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
721
|
+
// https://github.com/github/fetch/issues/748
|
722
|
+
// https://github.com/zloirock/core-js/issues/751
|
723
|
+
e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Ge(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Ve("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&Te.location.href?Te.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Me?o.responseType="blob":xe&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Pe?i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){o.setRequestHeader(e,He(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
|
724
|
+
// DONE (success or failure)
|
725
|
+
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}We.polyfill=!0,Te.fetch||(Te.fetch=We,Te.Headers=Pe,Te.Request=Ye,Te.Response=Ge);
|
726
|
+
// the whatwg-fetch polyfill installs the fetch() function
|
727
|
+
// on the global object (window or self)
|
728
|
+
// Return that as the export for use in Webpack, Browserify etc.
|
729
|
+
var ze=self.fetch.bind(self),Ze=function(e,t){return Ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ze(e,t)};
|
730
|
+
/******************************************************************************
|
731
|
+
Copyright (c) Microsoft Corporation.
|
732
|
+
|
733
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
734
|
+
purpose with or without fee is hereby granted.
|
735
|
+
|
736
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
737
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
738
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
739
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
740
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
741
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
742
|
+
PERFORMANCE OF THIS SOFTWARE.
|
743
|
+
***************************************************************************** */
|
744
|
+
/* global Reflect, Promise */function Xe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ze(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ke(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qe(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Je(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function Qe(e){return"function"==typeof e}function et(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var tt=et((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function nt(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var rt=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Ke(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(Qe(l))try{l()}catch(e){i=e instanceof tt?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=Ke(u),h=c.next();!h.done;h=c.next()){var d=h.value;try{st(d)}catch(e){i=null!=i?i:[],e instanceof tt?i=Je(Je([],qe(i)),qe(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}if(i)throw new tt(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)st(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nt(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&nt(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),it=rt.EMPTY;function ot(e){return e instanceof rt||e&&"closed"in e&&Qe(e.remove)&&Qe(e.add)&&Qe(e.unsubscribe)}function st(e){Qe(e)?e():e.unsubscribe()}var at={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},lt={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=lt.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Je([e,t],qe(n))):setTimeout.apply(void 0,Je([e,t],qe(n)))},clearTimeout:function(e){var t=lt.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ut(){}var ct=null;function ht(e){if(at.useDeprecatedSynchronousErrorHandling){var t=!ct;if(t&&(ct={errorThrown:!1,error:null}),e(),t){var n=ct,r=n.errorThrown,i=n.error;if(ct=null,r)throw i}}else e()}var dt=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,ot(t)&&t.add(n)):n.destination=_t,n}return Xe(t,e),t.create=function(e,t,n){return new gt(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rt),ft=Function.prototype.bind;function pt(e,t){return ft.call(e,t)}var mt=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){yt(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){yt(e)}else yt(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){yt(e)}},e}(),gt=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;Qe(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&at.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&pt(t.next,o),error:t.error&&pt(t.error,o),complete:t.complete&&pt(t.complete,o)}):i=t;return s.destination=new mt(i),s}return Xe(t,e),t}(dt);function yt(e){var t;t=e,lt.setTimeout((function(){throw t}))}var _t={closed:!0,next:ut,error:function(e){throw e},complete:ut},bt="function"==typeof Symbol&&Symbol.observable||"@@observable";function vt(e){return e}function wt(e){return 0===e.length?vt:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Et=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,o=(r=e)&&r instanceof dt||function(e){return e&&Qe(e.next)&&Qe(e.error)&&Qe(e.complete)}(r)&&ot(r)?e:new gt(e,t,n);return ht((function(){var e=i,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Tt(t))((function(t,r){var i=new gt({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[bt]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return wt(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Tt(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Tt(e){var t;return null!==(t=null!=e?e:at.Promise)&&void 0!==t?t:Promise}var St=et((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),kt=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Xe(t,e),t.prototype.lift=function(e){var t=new Mt(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new St},t.prototype.next=function(e){var t=this;ht((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=Ke(t.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;ht((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;ht((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?it:(this.currentObservers=null,o.push(e),new rt((function(){t.currentObservers=null,nt(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Et;return e.source=this,e},t.create=function(e,t){return new Mt(e,t)},t}(Et),Mt=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Xe(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:it},t}(kt),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},xt=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Dt);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return Xe(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}},t}(kt);let Ot=[],Lt={};
|
745
|
+
/**
|
746
|
+
* @name topic
|
747
|
+
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
748
|
+
* @param event [String] Event name
|
749
|
+
* @param step [String] How many values to be buffed for new subscribers - default 0
|
750
|
+
* @returns ReplaySubject
|
751
|
+
*/
|
752
|
+
const At=[];
|
753
|
+
/**
|
754
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
755
|
+
* @param {*=}value initial value
|
756
|
+
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
757
|
+
*/
|
758
|
+
function Ht(t,n=e){let r;const i=new Set;function s(e){if(o(t,e)&&(t=e,r)){// store is ready
|
759
|
+
const e=!At.length;for(const e of i)e[1](),At.push(e,t);if(e){for(let e=0;e<At.length;e+=2)At[e][0](At[e+1]);At.length=0}}}return{set:s,update:function(e){s(e(t))},subscribe:function(o,a=e){const l=[o,a];return i.add(l),1===i.size&&(r=n(s)||e),o(t),()=>{i.delete(l),0===i.size&&(r(),r=null)}}}}function It(t,n,o){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return c=t=>{let o=!1;const c=[];let h=0,d=e;const f=()=>{if(h)return;d();const r=n(s?c[0]:c,t);l?t(r):d=i(r)?r:e},p=a.map(((e,t)=>u(e,(e=>{c[t]=e,h&=~(1<<t),o&&f()}),(()=>{h|=1<<t}))));return o=!0,f(),function(){r(p),d()}},{subscribe:Ht(o,c).subscribe};
|
760
|
+
/**
|
761
|
+
* Creates a `Readable` store that allows reading by subscription.
|
762
|
+
* @param value initial value
|
763
|
+
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
764
|
+
*/
|
765
|
+
var c}var Pt=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===Ft}(e)}
|
766
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
767
|
+
(e)};var Ft="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Nt(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Yt((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ct(e,t,n){return e.concat(t).map((function(e){return Nt(e,n)}))}function Rt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function $t(e,t){try{return t in e}catch(e){return!1}}
|
768
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
769
|
+
function Bt(e,t,n){var r={};return n.isMergeableObject(e)&&Rt(e).forEach((function(t){r[t]=Nt(e[t],n)})),Rt(t).forEach((function(i){(function(e,t){return $t(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
770
|
+
})(e,i)||($t(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return Yt;var n=t.customMerge(e);return"function"==typeof n?n:Yt}(i,n)(e[i],t[i],n):r[i]=Nt(t[i],n))})),r}function Yt(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ct,n.isMergeableObject=n.isMergeableObject||Pt,
|
771
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
772
|
+
// implementations can use it. The caller may not replace it.
|
773
|
+
n.cloneUnlessOtherwiseSpecified=Nt;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Bt(e,t,n):Nt(t,n)}Yt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Yt(e,n,t)}),{})};var Ut=Yt,Gt=function(e,t){return Gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Gt(e,t)};function jt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Vt,Wt,zt,Zt=function(){return Zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Zt.apply(this,arguments)};function Xt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}
|
774
|
+
/**
|
775
|
+
* Type Guards
|
776
|
+
*/
|
777
|
+
function Kt(e){return e.type===Wt.literal}function qt(e){return e.type===Wt.argument}function Jt(e){return e.type===Wt.number}function Qt(e){return e.type===Wt.date}function en(e){return e.type===Wt.time}function tn(e){return e.type===Wt.select}function nn(e){return e.type===Wt.plural}function rn(e){return e.type===Wt.pound}function on(e){return e.type===Wt.tag}function sn(e){return!(!e||"object"!=typeof e||e.type!==zt.number)}function an(e){return!(!e||"object"!=typeof e||e.type!==zt.dateTime)}
|
778
|
+
// @generated from regex-gen.ts
|
779
|
+
!function(e){
|
780
|
+
/** Argument is unclosed (e.g. `{0`) */
|
781
|
+
e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
782
|
+
/** Argument is empty (e.g. `{}`). */
|
783
|
+
e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
784
|
+
/** Argument is malformed (e.g. `{foo!}``) */
|
785
|
+
e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
786
|
+
/** Expect an argument type (e.g. `{foo,}`) */
|
787
|
+
e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
788
|
+
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
789
|
+
e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
790
|
+
/** Expect an argument style (e.g. `{foo, number, }`) */
|
791
|
+
e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
792
|
+
/** The number skeleton is invalid. */
|
793
|
+
e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
794
|
+
/** The date time skeleton is invalid. */
|
795
|
+
e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
796
|
+
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
797
|
+
e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
798
|
+
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
799
|
+
e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
800
|
+
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
801
|
+
e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
802
|
+
/** Missing select argument options (e.g. `{foo, select}`) */
|
803
|
+
e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
804
|
+
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
805
|
+
e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
806
|
+
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
807
|
+
e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
808
|
+
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
809
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
810
|
+
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
811
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
812
|
+
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
813
|
+
e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
814
|
+
/**
|
815
|
+
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
816
|
+
* (e.g. `{foo, plural, one}`)
|
817
|
+
*/
|
818
|
+
e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
819
|
+
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
820
|
+
e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
821
|
+
/**
|
822
|
+
* Duplicate selectors in `plural` or `selectordinal` argument.
|
823
|
+
* (e.g. {foo, plural, one {#} one {#}})
|
824
|
+
*/
|
825
|
+
e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
826
|
+
/** Duplicate selectors in `select` argument.
|
827
|
+
* (e.g. {foo, select, apple {apple} apple {apple}})
|
828
|
+
*/
|
829
|
+
e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
830
|
+
/** Plural or select argument option must have `other` clause. */
|
831
|
+
e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
832
|
+
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
833
|
+
e[e.INVALID_TAG=23]="INVALID_TAG",
|
834
|
+
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
835
|
+
e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
836
|
+
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
837
|
+
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
838
|
+
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
839
|
+
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Vt||(Vt={})),function(e){
|
840
|
+
/**
|
841
|
+
* Raw text
|
842
|
+
*/
|
843
|
+
e[e.literal=0]="literal",
|
844
|
+
/**
|
845
|
+
* Variable w/o any format, e.g `var` in `this is a {var}`
|
846
|
+
*/
|
847
|
+
e[e.argument=1]="argument",
|
848
|
+
/**
|
849
|
+
* Variable w/ number format
|
850
|
+
*/
|
851
|
+
e[e.number=2]="number",
|
852
|
+
/**
|
853
|
+
* Variable w/ date format
|
854
|
+
*/
|
855
|
+
e[e.date=3]="date",
|
856
|
+
/**
|
857
|
+
* Variable w/ time format
|
858
|
+
*/
|
859
|
+
e[e.time=4]="time",
|
860
|
+
/**
|
861
|
+
* Variable w/ select format
|
862
|
+
*/
|
863
|
+
e[e.select=5]="select",
|
864
|
+
/**
|
865
|
+
* Variable w/ plural format
|
866
|
+
*/
|
867
|
+
e[e.plural=6]="plural",
|
868
|
+
/**
|
869
|
+
* Only possible within plural argument.
|
870
|
+
* This is the `#` symbol that will be substituted with the count.
|
871
|
+
*/
|
872
|
+
e[e.pound=7]="pound",
|
873
|
+
/**
|
874
|
+
* XML-like tag
|
875
|
+
*/
|
876
|
+
e[e.tag=8]="tag"}(Wt||(Wt={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(zt||(zt={}));var ln=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,un=/(?:[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;
|
877
|
+
/**
|
878
|
+
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
879
|
+
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
880
|
+
* with some tweaks
|
881
|
+
*/
|
882
|
+
/**
|
883
|
+
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
884
|
+
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
885
|
+
* @public
|
886
|
+
* @param skeleton skeleton string
|
887
|
+
*/
|
888
|
+
function cn(e){var t={};return e.replace(un,(function(e){var n=e.length;switch(e[0]){
|
889
|
+
// Era
|
890
|
+
case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
|
891
|
+
// Year
|
892
|
+
case"y":t.year=2===n?"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");
|
893
|
+
// Quarter
|
894
|
+
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
895
|
+
// Month
|
896
|
+
case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;
|
897
|
+
// Week
|
898
|
+
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
899
|
+
// Weekday
|
900
|
+
case"E":t.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;
|
901
|
+
// Period
|
902
|
+
case"a":// AM, PM
|
903
|
+
t.hour12=!0;break;case"b":// am, pm, noon, midnight
|
904
|
+
case"B":// flexible day periods
|
905
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
906
|
+
// Hour
|
907
|
+
case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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");
|
908
|
+
// Minute
|
909
|
+
case"m":t.minute=["numeric","2-digit"][n-1];break;
|
910
|
+
// Second
|
911
|
+
case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
912
|
+
// Zone
|
913
|
+
case"z":// 1..3, 4: specific non-location format
|
914
|
+
t.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
915
|
+
case"O":// 1, 4: miliseconds in day short, long
|
916
|
+
case"v":// 1, 4: generic non-location format
|
917
|
+
case"V":// 1, 2, 3, 4: time zone ID or city
|
918
|
+
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
919
|
+
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
920
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
921
|
+
// @generated from regex-gen.ts
|
922
|
+
var hn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var dn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,fn=/^(@+)?(\+|#+)?[rs]?$/g,pn=/(\*)(0+)|(#+)(0+)|(0+)/g,mn=/^(0+)$/;function gn(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(fn,(function(e,n,r){
|
923
|
+
// @@@ case
|
924
|
+
return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function yn(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 _n(e){
|
925
|
+
// Engineering
|
926
|
+
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 n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!mn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function bn(e){var t=yn(e);return t||{}}
|
927
|
+
/**
|
928
|
+
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
929
|
+
*/function vn(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=i.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=Zt(Zt(Zt({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return Zt(Zt({},e),bn(t))}),{}));continue;case"engineering":t=Zt(Zt(Zt({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return Zt(Zt({},e),bn(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
930
|
+
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
931
|
+
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(i.options[0]);continue;
|
932
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
933
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(pn,(function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
934
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
935
|
+
if(mn.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(dn.test(i.stem)){
|
936
|
+
// Precision
|
937
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
938
|
+
// precision-integer case
|
939
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(dn,(function(e,n,r,i,o,s){
|
940
|
+
// .000* case (before ICU67 it was .000+)
|
941
|
+
return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var o=i.options[0];
|
942
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
943
|
+
"w"===o?t=Zt(Zt({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Zt(Zt({},t),gn(o)))}
|
944
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
945
|
+
else if(fn.test(i.stem))t=Zt(Zt({},t),gn(i.stem));else{var s=yn(i.stem);s&&(t=Zt(Zt({},t),s));var a=_n(i.stem);a&&(t=Zt(Zt({},t),a))}}return t}
|
946
|
+
// @generated from time-data-gen.ts
|
947
|
+
// prettier-ignore
|
948
|
+
var wn,En={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"]};
|
949
|
+
/**
|
950
|
+
* Returns the best matching date time pattern if a date time skeleton
|
951
|
+
* pattern is provided with a locale. Follows the Unicode specification:
|
952
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
953
|
+
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
954
|
+
* @param locale
|
955
|
+
*/
|
956
|
+
/**
|
957
|
+
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
958
|
+
* of the given `locale` to the corresponding time pattern.
|
959
|
+
* @param locale
|
960
|
+
*/
|
961
|
+
function Tn(e){var t=e.hourCycle;if(void 0===t&&
|
962
|
+
// @ts-ignore hourCycle(s) is not identified yet
|
963
|
+
e.hourCycles&&
|
964
|
+
// @ts-ignore
|
965
|
+
e.hourCycles.length&&(
|
966
|
+
// @ts-ignore
|
967
|
+
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")}
|
968
|
+
// TODO: Once hourCycle is fully supported remove the following with data generation
|
969
|
+
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(En[n||""]||En[r||""]||En["".concat(r,"-001")]||En["001"])[0]}var Sn=new RegExp("^".concat(ln.source,"*")),kn=new RegExp("".concat(ln.source,"*$"));function Mn(e,t){return{start:e,end:t}}
|
970
|
+
// #region Ponyfills
|
971
|
+
// Consolidate these variables up top for easier toggling during debugging
|
972
|
+
var Dn=!!String.prototype.startsWith,xn=!!String.fromCodePoint,On=!!Object.fromEntries,Ln=!!String.prototype.codePointAt,An=!!String.prototype.trimStart,Hn=!!String.prototype.trimEnd,In=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Pn=!0;try{
|
973
|
+
/**
|
974
|
+
* legacy Edge or Xbox One browser
|
975
|
+
* Unicode flag support: supported
|
976
|
+
* Pattern_Syntax support: not supported
|
977
|
+
* See https://github.com/formatjs/formatjs/issues/2822
|
978
|
+
*/
|
979
|
+
Pn="a"===(null===(wn=Un("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===wn?void 0:wn[0])}catch(e){Pn=!1}var Fn,Nn=Dn?// Native
|
980
|
+
function(e,t,n){return e.startsWith(t,n)}:// For IE11
|
981
|
+
function(e,t,n){return e.slice(n,n+t.length)===t},Cn=xn?String.fromCodePoint:// IE11
|
982
|
+
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",i=e.length,o=0;i>o;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Rn=
|
983
|
+
// native
|
984
|
+
On?Object.fromEntries:// Ponyfill
|
985
|
+
function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],s=i[1];t[o]=s}return t},$n=Ln?// Native
|
986
|
+
function(e,t){return e.codePointAt(t)}:// IE 11
|
987
|
+
function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},Bn=An?// Native
|
988
|
+
function(e){return e.trimStart()}:// Ponyfill
|
989
|
+
function(e){return e.replace(Sn,"")},Yn=Hn?// Native
|
990
|
+
function(e){return e.trimEnd()}:// Ponyfill
|
991
|
+
function(e){return e.replace(kn,"")};
|
992
|
+
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
993
|
+
function Un(e,t){return new RegExp(e,t)}
|
994
|
+
// #endregion
|
995
|
+
if(Pn){
|
996
|
+
// Native
|
997
|
+
var Gn=Un("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fn=function(e,t){var n;return Gn.lastIndex=t,null!==(n=Gn.exec(e)[1])&&void 0!==n?n:""}}else
|
998
|
+
// IE11
|
999
|
+
Fn=function(e,t){for(var n=[];;){var r=$n(e,t);if(void 0===r||zn(r)||Zn(r))break;n.push(r),t+=r>=65536?2:1}return Cn.apply(void 0,n)};var jn=/** @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,n){for(var r=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125/* `}` */===i&&e>0)break;if(35/* `#` */!==i||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Vt.UNMATCHED_CLOSING_TAG,Mn(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Vn(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:Wt.pound,location:Mn(s,this.clonePosition())})}}}return{val:r,err:null}},
|
1000
|
+
/**
|
1001
|
+
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
1002
|
+
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
1003
|
+
* are accepted:
|
1004
|
+
*
|
1005
|
+
* ```
|
1006
|
+
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
1007
|
+
* tagName ::= [a-z] (PENChar)*
|
1008
|
+
* PENChar ::=
|
1009
|
+
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
1010
|
+
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
1011
|
+
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
1012
|
+
* ```
|
1013
|
+
*
|
1014
|
+
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
1015
|
+
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
1016
|
+
* since other tag-based engines like React allow it
|
1017
|
+
*/
|
1018
|
+
e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
|
1019
|
+
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
1020
|
+
// Self closing tag
|
1021
|
+
return{val:{type:Wt.literal,value:"<".concat(r,"/>"),location:Mn(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
1022
|
+
// Expecting a close tag
|
1023
|
+
if(this.bumpIf("</")){if(this.isEOF()||!Vn(this.char()))return this.error(Vt.INVALID_TAG,Mn(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Vt.UNMATCHED_CLOSING_TAG,Mn(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Wt.tag,value:r,children:o,location:Mn(n,this.clonePosition())},err:null}:this.error(Vt.INVALID_TAG,Mn(s,this.clonePosition())))}return this.error(Vt.UNCLOSED_TAG,Mn(n,this.clonePosition()))}return this.error(Vt.INVALID_TAG,Mn(n,this.clonePosition()))},
|
1024
|
+
/**
|
1025
|
+
* This method assumes that the caller has peeked ahead for the first tag character.
|
1026
|
+
*/
|
1027
|
+
e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
|
1028
|
+
for(this.bump();!this.isEOF()&&Wn(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=Mn(n,this.clonePosition());return{val:{type:Wt.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Vn(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
1029
|
+
/** See `parseTag` function docs. */},
|
1030
|
+
/**
|
1031
|
+
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
1032
|
+
* a character that requires quoting (that is, "only where needed"), and works the same in
|
1033
|
+
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
1034
|
+
*/
|
1035
|
+
e.prototype.tryParseQuote=function(e){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
1036
|
+
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
1037
|
+
// Check if is valid escaped character
|
1038
|
+
switch(this.peek()){case 39/* `'` */:
|
1039
|
+
// double quote, should return as a single quote.
|
1040
|
+
return this.bump(),this.bump(),"'";
|
1041
|
+
// '{', '<', '>', '}'
|
1042
|
+
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
1043
|
+
if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();// apostrophe
|
1044
|
+
var t=[this.char()];// escaped char
|
1045
|
+
// read chars until the optional closing apostrophe is found
|
1046
|
+
for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
|
1047
|
+
// Optional closing apostrophe.
|
1048
|
+
this.bump();break}t.push(39),
|
1049
|
+
// Bump one more time because we need to skip 2 characters.
|
1050
|
+
this.bump()}else t.push(n);this.bump()}return Cn.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===t||"selectordinal"===t)||125/* `}` */===n&&e>0?null:(this.bump(),Cn(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),// `{`
|
1051
|
+
this.bumpSpace(),this.isEOF())return this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Vt.EMPTY_ARGUMENT,Mn(n,this.clonePosition()));
|
1052
|
+
// argument name
|
1053
|
+
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Vt.MALFORMED_ARGUMENT,Mn(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition()));switch(this.char()){
|
1054
|
+
// Simple argument: `{name}`
|
1055
|
+
case 125/* `}` */:// `}`
|
1056
|
+
return this.bump(),{val:{type:Wt.argument,
|
1057
|
+
// value does not include the opening and closing braces.
|
1058
|
+
value:r,location:Mn(n,this.clonePosition())},err:null};
|
1059
|
+
// Argument with options: `{name, format, ...}`
|
1060
|
+
case 44/* `,` */:return this.bump(),// `,`
|
1061
|
+
this.bumpSpace(),this.isEOF()?this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Vt.MALFORMED_ARGUMENT,Mn(n,this.clonePosition()))}},
|
1062
|
+
/**
|
1063
|
+
* Advance the parser until the end of the identifier, if it is currently on
|
1064
|
+
* an identifier character. Return an empty string otherwise.
|
1065
|
+
*/
|
1066
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Fn(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Mn(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
1067
|
+
// Parse this range:
|
1068
|
+
// {name, type, style}
|
1069
|
+
// ^---^
|
1070
|
+
switch(s){case"":
|
1071
|
+
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
1072
|
+
return this.error(Vt.EXPECT_ARGUMENT_TYPE,Mn(o,a));case"number":case"date":case"time":
|
1073
|
+
// Parse this range:
|
1074
|
+
// {name, number, style}
|
1075
|
+
// ^-------^
|
1076
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(f=Yn(y.val)).length)return this.error(Vt.EXPECT_ARGUMENT_STYLE,Mn(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:Mn(u,this.clonePosition())}}if((_=this.tryParseArgumentClose(r)).err)return _;var c=Mn(r,this.clonePosition());
|
1077
|
+
// Extract style or skeleton
|
1078
|
+
if(l&&Nn(null==l?void 0:l.style,"::",0)){
|
1079
|
+
// Skeleton starts with `::`.
|
1080
|
+
var h=Bn(l.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?y:{val:{type:Wt.number,value:n,location:c,style:y.val},err:null};if(0===h.length)return this.error(Vt.EXPECT_DATE_TIME_SKELETON,c);var d=h;
|
1081
|
+
// Get "best match" pattern only if locale is passed, if not, let it
|
1082
|
+
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
1083
|
+
// for unsupported patterns.
|
1084
|
+
this.locale&&(d=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if("j"===i){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=Tn(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(h,this.locale));var f={type:zt.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?cn(d):{}};return{val:{type:"date"===s?Wt.date:Wt.time,value:n,location:c,style:f},err:null}}
|
1085
|
+
// Regular style or no style.
|
1086
|
+
return{val:{type:"number"===s?Wt.number:"date"===s?Wt.date:Wt.time,value:n,location:c,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
1087
|
+
// Parse this range:
|
1088
|
+
// {name, plural, options}
|
1089
|
+
// ^---------^
|
1090
|
+
var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Vt.EXPECT_SELECT_ARGUMENT_OPTIONS,Mn(p,Zt({},p)));this.bumpSpace();
|
1091
|
+
// Parse offset:
|
1092
|
+
// {name, plural, offset:1, options}
|
1093
|
+
// ^-----^
|
1094
|
+
// or the first option:
|
1095
|
+
// {name, plural, one {...} other {...}}
|
1096
|
+
// ^--^
|
1097
|
+
var m=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(Vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Mn(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(Vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Vt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
1098
|
+
// Parse another identifier for option parsing
|
1099
|
+
this.bumpSpace(),m=this.parseIdentifierIfPossible(),g=y.val}var _,b=this.tryParsePluralOrSelectOptions(e,s,t,m);if(b.err)return b;if((_=this.tryParseArgumentClose(r)).err)return _;var v=Mn(r,this.clonePosition());return"select"===s?{val:{type:Wt.select,value:n,options:Rn(b.val),location:v},err:null}:{val:{type:Wt.plural,value:n,options:Rn(b.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(Vt.INVALID_ARGUMENT_TYPE,Mn(o,a))}},e.prototype.tryParseArgumentClose=function(e){
|
1100
|
+
// Parse: {value, number, ::currency/GBP }
|
1101
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,Mn(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
1102
|
+
/**
|
1103
|
+
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
1104
|
+
*/
|
1105
|
+
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
1106
|
+
// Treat apostrophe as quoting but include it in the style part.
|
1107
|
+
// Find the end of the quoted literal text.
|
1108
|
+
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Vt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Mn(n,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 n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
1109
|
+
// Parse the skeleton
|
1110
|
+
for(var t=e.split(hn).filter((function(e){return e.length>0})),n=[],r=0,i=t;r<i.length;r++){var o=i[r].split("/");if(0===o.length)throw new Error("Invalid number skeleton");for(var s=o[0],a=o.slice(1),l=0,u=a;l<u.length;l++)if(0===u[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(e)}catch(e){return this.error(Vt.INVALID_NUMBER_SKELETON,t)}return{val:{type:zt.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?vn(n):{}},err:null}},
|
1111
|
+
/**
|
1112
|
+
* @param nesting_level The current nesting level of messages.
|
1113
|
+
* This can be positive when parsing message fragment in select or plural argument options.
|
1114
|
+
* @param parent_arg_type The parent argument's type.
|
1115
|
+
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
1116
|
+
* the argument. It is a by-product of a previous parsing attempt.
|
1117
|
+
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
1118
|
+
* between a pair of opening and closing tags. The nested message will not parse beyond
|
1119
|
+
* the closing tag boundary.
|
1120
|
+
*/
|
1121
|
+
e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
|
1122
|
+
// Parse:
|
1123
|
+
// one {one apple}
|
1124
|
+
// ^--^
|
1125
|
+
for(var i,o=!1,s=[],a=new Set,l=r.value,u=r.location;;){if(0===l.length){var c=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
1126
|
+
// Try parse `={number}` selector
|
1127
|
+
var h=this.tryParseDecimalInteger(Vt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Vt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Mn(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
|
1128
|
+
// Duplicate selector clauses
|
1129
|
+
if(a.has(l))return this.error("select"===t?Vt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Vt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);"other"===l&&(o=!0),
|
1130
|
+
// Parse:
|
1131
|
+
// one {one apple}
|
1132
|
+
// ^----------^
|
1133
|
+
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Vt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Vt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Mn(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var p=this.tryParseArgumentClose(d);if(p.err)return p;s.push([l,{value:f.val,location:Mn(d,this.clonePosition())}]),
|
1134
|
+
// Keep track of the existing selectors
|
1135
|
+
a.add(l),
|
1136
|
+
// Prep next selector clause.
|
1137
|
+
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,u=i.location}return 0===s.length?this.error("select"===t?Vt.EXPECT_SELECT_ARGUMENT_SELECTOR:Vt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Mn(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Vt.MISSING_OTHER_CLAUSE,Mn(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=Mn(r,this.clonePosition());return i?In(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
1138
|
+
// This is much faster than `Object.assign` or spread.
|
1139
|
+
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
1140
|
+
/**
|
1141
|
+
* Return the code point at the current position of the parser.
|
1142
|
+
* Throws if the index is out of bound.
|
1143
|
+
*/
|
1144
|
+
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=$n(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}}},
|
1145
|
+
/** Bump the parser to the next UTF-16 code unit. */
|
1146
|
+
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,
|
1147
|
+
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
1148
|
+
this.position.offset+=e<65536?1:2)}},
|
1149
|
+
/**
|
1150
|
+
* If the substring starting at the current position of the parser has
|
1151
|
+
* the given prefix, then bump the parser to the character immediately
|
1152
|
+
* following the prefix and return true. Otherwise, don't bump the parser
|
1153
|
+
* and return false.
|
1154
|
+
*/
|
1155
|
+
e.prototype.bumpIf=function(e){if(Nn(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
1156
|
+
/**
|
1157
|
+
* Bump the parser until the pattern character is found and return `true`.
|
1158
|
+
* Otherwise bump to the end of the file and return `false`.
|
1159
|
+
*/
|
1160
|
+
e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},
|
1161
|
+
/**
|
1162
|
+
* Bump the parser to the target offset.
|
1163
|
+
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
1164
|
+
*/
|
1165
|
+
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}},
|
1166
|
+
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
1167
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&zn(this.char());)this.bump()},
|
1168
|
+
/**
|
1169
|
+
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
1170
|
+
* If the input has been exhausted, then this returns null.
|
1171
|
+
*/
|
1172
|
+
e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();
|
1173
|
+
/**
|
1174
|
+
* This check if codepoint is alphabet (lower & uppercase)
|
1175
|
+
* @param codepoint
|
1176
|
+
* @returns
|
1177
|
+
*/function Vn(e){return e>=97&&e<=122||e>=65&&e<=90}function Wn(e){return 45/* '-' */===e||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}
|
1178
|
+
/**
|
1179
|
+
* Code point equivalent of regex `\p{White_Space}`.
|
1180
|
+
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
1181
|
+
*/function zn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
1182
|
+
/**
|
1183
|
+
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
1184
|
+
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
1185
|
+
*/function Zn(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 Xn(e){e.forEach((function(e){if(delete e.location,tn(e)||nn(e))for(var t in e.options)delete e.options[t].location,Xn(e.options[t].value);else Jt(e)&&sn(e.style)||(Qt(e)||en(e))&&an(e.style)?delete e.style.location:on(e)&&Xn(e.children)}))}function Kn(e,t){void 0===t&&(t={}),t=Zt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new jn(e,t).parse();if(n.err){var r=SyntaxError(Vt[n.err.kind]);
|
1186
|
+
// @ts-expect-error Assign to error object
|
1187
|
+
throw r.location=n.err.location,
|
1188
|
+
// @ts-expect-error Assign to error object
|
1189
|
+
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Xn(n.val),n.val}
|
1190
|
+
|
1191
|
+
// Main
|
1192
|
+
|
1193
|
+
function qn(e,t){var n=t&&t.cache?t.cache:or,r=t&&t.serializer?t.serializer:nr;return(t&&t.strategy?t.strategy:tr)(e,{cache:n,serializer:r})}
|
1194
|
+
|
1195
|
+
// Strategy
|
1196
|
+
|
1197
|
+
function Jn(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=t.get(o);return void 0===s&&(s=e.call(this,r),t.set(o,s)),s}function Qn(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function er(e,t,n,r,i){return n.bind(t,e,r,i)}function tr(e,t){return er(e,this,1===e.length?Jn:Qn,t.cache.create(),t.serializer)}
|
1198
|
+
// Serializer
|
1199
|
+
var nr=function(){return JSON.stringify(arguments)};
|
1200
|
+
|
1201
|
+
// Cache
|
1202
|
+
|
1203
|
+
function rr(){this.cache=Object.create(null)}rr.prototype.get=function(e){return this.cache[e]},rr.prototype.set=function(e,t){this.cache[e]=t};var ir,or={create:function(){
|
1204
|
+
// @ts-ignore
|
1205
|
+
return new rr}},sr={variadic:function(e,t){return er(e,this,Qn,t.cache.create(),t.serializer)},monadic:function(e,t){return er(e,this,Jn,t.cache.create(),t.serializer)}};!function(e){
|
1206
|
+
// When we have a placeholder but no value to format
|
1207
|
+
e.MISSING_VALUE="MISSING_VALUE",
|
1208
|
+
// When value supplied is invalid
|
1209
|
+
e.INVALID_VALUE="INVALID_VALUE",
|
1210
|
+
// When we need specific Intl API but it's not available
|
1211
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(ir||(ir={}));var ar,lr=/** @class */function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return jt(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ur=/** @class */function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),ir.INVALID_VALUE,i)||this}return jt(t,e),t}(lr),cr=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),ir.INVALID_VALUE,r)||this}return jt(t,e),t}(lr),hr=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),ir.MISSING_VALUE,n)||this}return jt(t,e),t}(lr);function dr(e){return"function"==typeof e}
|
1212
|
+
// TODO(skeleton): add skeleton support
|
1213
|
+
function fr(e,t,n,r,i,o,
|
1214
|
+
// For debugging
|
1215
|
+
s){
|
1216
|
+
// Hot path for straight simple msg translations
|
1217
|
+
if(1===e.length&&Kt(e[0]))return[{type:ar.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];
|
1218
|
+
// Exit early for string parts.
|
1219
|
+
if(Kt(c))a.push({type:ar.literal,value:c.value});else
|
1220
|
+
// TODO: should this part be literal type?
|
1221
|
+
// Replace `#` in plural rules with the actual numeric value.
|
1222
|
+
if(rn(c))"number"==typeof o&&a.push({type:ar.literal,value:n.getNumberFormat(t).format(o)});else{var h=c.value;
|
1223
|
+
// Enforce that all required values are provided by the caller.
|
1224
|
+
if(!i||!(h in i))throw new hr(h,s);var d=i[h];if(qt(c))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?ar.literal:ar.object,value:d});else
|
1225
|
+
// Recursively format plural and select parts' option — which can be a
|
1226
|
+
// nested pattern structure. The choosing of the option to use is
|
1227
|
+
// abstracted-by and delegated-to the part helper object.
|
1228
|
+
if(Qt(c)){var f="string"==typeof c.style?r.date[c.style]:an(c.style)?c.style.parsedOptions:void 0;a.push({type:ar.literal,value:n.getDateTimeFormat(t,f).format(d)})}else if(en(c)){f="string"==typeof c.style?r.time[c.style]:an(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:ar.literal,value:n.getDateTimeFormat(t,f).format(d)})}else if(Jt(c)){(f="string"==typeof c.style?r.number[c.style]:sn(c.style)?c.style.parsedOptions:void 0)&&f.scale&&(d*=f.scale||1),a.push({type:ar.literal,value:n.getNumberFormat(t,f).format(d)})}else{if(on(c)){var p=c.children,m=c.value,g=i[m];if(!dr(g))throw new cr(m,"function",s);var y=g(fr(p,t,n,r,i,o).map((function(e){return e.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(e){return{type:"string"==typeof e?ar.literal:ar.object,value:e}})))}if(tn(c)){if(!(_=c.options[d]||c.options.other))throw new ur(c.value,d,Object.keys(c.options),s);a.push.apply(a,fr(_.value,t,n,r,i))}else if(nn(c)){var _;if(!(_=c.options["=".concat(d)])){if(!Intl.PluralRules)throw new lr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',ir.MISSING_INTL_API,s);var b=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));_=c.options[b]||c.options.other}if(!_)throw new ur(c.value,d,Object.keys(c.options),s);a.push.apply(a,fr(_.value,t,n,r,i,d-(c.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===ar.literal&&t.type===ar.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
|
1229
|
+
/*
|
1230
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
1231
|
+
Copyrights licensed under the New BSD License.
|
1232
|
+
See the accompanying LICENSE file for terms.
|
1233
|
+
*/
|
1234
|
+
// -- MessageFormat --------------------------------------------------------
|
1235
|
+
function pr(e,t){return t?Object.keys(e).reduce((function(n,r){var i,o;return n[r]=(i=e[r],(o=t[r])?Zt(Zt(Zt({},i||{}),o||{}),Object.keys(i).reduce((function(e,t){return e[t]=Zt(Zt({},i[t]),o[t]||{}),e}),{})):i),n}),Zt({},e)):e}function mr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(ar||(ar={}));var gr=/** @class */function(){function e(t,n,r,i){var o,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
|
1236
|
+
// Hot path for straight simple msg translations
|
1237
|
+
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===ar.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return fr(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
1238
|
+
// Defined first because it's used to build the format pattern.
|
1239
|
+
this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
1240
|
+
// Parse string messages into an AST.
|
1241
|
+
this.ast=e.__parse(t,{ignoreTag:null==i?void 0:i.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.");
|
1242
|
+
// Creates a new object with the specified `formats` merged with the default
|
1243
|
+
// formats.
|
1244
|
+
this.formats=pr(e.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:qn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,Xt([void 0],t,!1)))}),{cache:mr(o.number),strategy:sr.variadic}),getDateTimeFormat:qn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,Xt([void 0],t,!1)))}),{cache:mr(o.dateTime),strategy:sr.variadic}),getPluralRules:qn((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,Xt([void 0],t,!1)))}),{cache:mr(o.pluralRules),strategy:sr.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=Kn,
|
1245
|
+
// Default format options used as the prototype of the `formats` provided to the
|
1246
|
+
// constructor. These are used when constructing the internal Intl.NumberFormat
|
1247
|
+
// and Intl.DateTimeFormat instances.
|
1248
|
+
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}(),yr=gr;
|
1249
|
+
/*
|
1250
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
1251
|
+
Copyrights licensed under the New BSD License.
|
1252
|
+
See the accompanying LICENSE file for terms.
|
1253
|
+
*/const _r={},br=(e,t,n)=>n?(t in _r||(_r[t]={}),e in _r[t]||(_r[t][e]=n),n):n,vr=(e,t)=>{if(null==t)return;if(t in _r&&e in _r[t])return _r[t][e];const n=Rr(t);for(let r=0;r<n.length;r++){const i=Sr(n[r],e);if(i)return br(e,t,i)}};let wr;const Er=Ht({});function Tr(e){return e in wr}function Sr(e,t){if(!Tr(e))return null;const n=function(e){return wr[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function kr(e,...t){delete _r[e],Er.update((n=>(n[e]=Ut.all([n[e]||{},...t]),n)))}It([Er],(([e])=>Object.keys(e))),Er.subscribe((e=>wr=e));const Mr={};function Dr(e){return Mr[e]}function xr(e){return null!=e&&Rr(e).some((e=>{var t;return null===(t=Dr(e))||void 0===t?void 0:t.size}))}const Or={};function Lr(e){if(!xr(e))return e in Or?Or[e]:Promise.resolve();const t=function(e){return Rr(e).map((e=>{const t=Dr(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Or[e]=Promise.all(t.map((([e,t])=>function(e,t){const n=Promise.all(t.map((t=>(function(e,t){Mr[e].delete(t),0===Mr[e].size&&delete Mr[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>kr(e,...t)))}(e,t)))).then((()=>{if(xr(e))return Lr(e);delete Or[e]})),Or[e]}
|
1254
|
+
/*! *****************************************************************************
|
1255
|
+
Copyright (c) Microsoft Corporation.
|
1256
|
+
|
1257
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
1258
|
+
purpose with or without fee is hereby granted.
|
1259
|
+
|
1260
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
1261
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
1262
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
1263
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
1264
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
1265
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
1266
|
+
PERFORMANCE OF THIS SOFTWARE.
|
1267
|
+
***************************************************************************** */function Ar(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}const Hr={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 Ir(){return Hr}const Pr=Ht(!1);let Fr;const Nr=Ht(null);function Cr(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function Rr(e,t=Ir().fallbackLocale){const n=Cr(e);return t?[...new Set([...n,...Cr(t)])]:n}function $r(){return null!=Fr?Fr:void 0}Nr.subscribe((e=>{Fr=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Br=Object.assign(Object.assign({},Nr),{set:e=>{if(e&&function(e){if(null==e)return;const t=Rr(e);for(let e=0;e<t.length;e++){const n=t[e];if(Tr(n))return n}}(e)&&xr(e)){const{loadingDelay:t}=Ir();let n;return"undefined"!=typeof window&&null!=$r()&&t?n=window.setTimeout((()=>Pr.set(!0)),t):Pr.set(!0),Lr(e).then((()=>{Nr.set(e)})).finally((()=>{clearTimeout(n),Pr.set(!1)}))}return Nr.set(e)}}),Yr=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Ur=(e,t)=>{const{formats:n}=Ir();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Gr=Yr((e=>{var{locale:t,format:n}=e,r=Ar(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=Ur("number",n)),new Intl.NumberFormat(t,r)})),jr=Yr((e=>{var{locale:t,format:n}=e,r=Ar(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=Ur("date",n):0===Object.keys(r).length&&(r=Ur("date","short")),new Intl.DateTimeFormat(t,r)})),Vr=Yr((e=>{var{locale:t,format:n}=e,r=Ar(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=Ur("time",n):0===Object.keys(r).length&&(r=Ur("time","short")),new Intl.DateTimeFormat(t,r)})),Wr=Yr(((e,t=$r())=>new yr(e,t,Ir().formats,{ignoreTag:Ir().ignoreTag}))),zr=(e,t={})=>{var n,r,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=$r(),default:u}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=vr(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!==(o=null!==(i=null===(r=(n=Ir()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))&&void 0!==i?i:u)&&void 0!==o?o:e;if(!a)return c;let h=c;try{h=Wr(c,l).format(a)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Zr=(e,t)=>((e={})=>{var{locale:t=$r()}=e,n=Ar(e,["locale"]);return Vr(Object.assign({locale:t},n))})(t).format(e),Xr=(e,t)=>((e={})=>{var{locale:t=$r()}=e,n=Ar(e,["locale"]);return jr(Object.assign({locale:t},n))})(t).format(e),Kr=(e,t)=>((e={})=>{var{locale:t=$r()}=e,n=Ar(e,["locale"]);return Gr(Object.assign({locale:t},n))})(t).format(e),qr=(e,t=$r())=>vr(e,t),Jr=It([Br,Er],(()=>zr));It([Br],(()=>Zr)),It([Br],(()=>Xr)),It([Br],(()=>Kr)),It([Br,Er],(()=>qr)),window.emWidgets={topic:(e,t=0)=>{if(-1==Ot.indexOf(e)){let n=new xt(t);Lt[e]=n,Ot.push(e)}return Lt[e]}};const Qr={en:{casinoFooter:{timeText:"Time",sessionTimer:"Logged in for"}},fr:{casinoFooter:{timeText:"Catégories",sessionTimer:"Logged in for"}},ro:{casinoFooter:{timeText:"Ora",sessionTimer:"Online de"}},es:{casinoFooter:{timeText:"Categorías",sessionTimer:"Logged in for"}},pt:{casinoFooter:{timeText:"Categorias",sessionTimer:"Logged in for"}}},{document:ei}=B;
|
1268
|
+
/* src/CasinoFooterV2.svelte generated by Svelte v3.48.0 */function ti(e,t,n){const r=e.slice();return r[70]=t[n],r}function ni(e,t,n){const r=e.slice();return r[73]=t[n],r}
|
1286
1269
|
// (239:2) {#if headScript}
|
1287
|
-
function
|
1270
|
+
function ri(e){let t,n;return{c(){t=m("script"),l(t.src,n=/*licenseScriptSrc*/e[26])||w(t,"src",n)},m(e,n){d(e,t,n)},p(e,r){/*licenseScriptSrc*/67108864&r[0]&&!l(t.src,n=/*licenseScriptSrc*/e[26])&&w(t,"src",n)},d(e){e&&f(t)}}}
|
1288
1271
|
// (249:2) {:else}
|
1289
|
-
function
|
1290
|
-
/*div2_binding*/,e[56](t)},p(e,t){/*helpLinksRepeater*/e[16]?
|
1272
|
+
function ii(e){let t,n,r,i,o,s,a,l,u,c,p,g=/*helpLinksRepeater*/e[16]&&ai(e),y=/*gameVendorsRepeater*/e[10]&&ui(e),b=/*paymentMethodsRepeater*/e[12]&&hi(e),v=/*panicbuttonenabled*/"true"===e[6]&&fi(e),E=/*licensesRepeater*/e[18]&&pi(e),T=/*sponsorsRepeater*/e[14]&&bi(e),S=/*socialLinksRepeater*/e[20]&&Ei(e),k=/*languageselectorenabled*/"true"===e[5]&&/*languagePackLoaded*/e[34]&&/*selectedLanguage*/e[28]&&Si(e),M=/*copyright*/e[21]&&Di(e);return{c(){t=m("div"),n=m("div"),g&&g.c(),r=_(),i=m("div"),y&&y.c(),o=_(),b&&b.c(),s=_(),v&&v.c(),a=_(),E&&E.c(),l=_(),T&&T.c(),u=_(),S&&S.c(),c=_(),k&&k.c(),p=_(),M&&M.c(),w(n,"class","FooterSide"),w(i,"class","FooterGrid"),w(t,"class","Footer")},m(f,m){d(f,t,m),h(t,n),g&&g.m(n,null),h(t,r),h(t,i),y&&y.m(i,null),h(i,o),b&&b.m(i,null),h(i,s),v&&v.m(i,null),h(i,a),E&&E.m(i,null),h(i,l),T&&T.m(i,null),h(i,u),S&&S.m(i,null),h(i,c),k&&k.m(i,null),h(i,p),M&&M.m(i,null)
|
1273
|
+
/*div2_binding*/,e[56](t)},p(e,t){/*helpLinksRepeater*/e[16]?g?g.p(e,t):(g=ai(e),g.c(),g.m(n,null)):g&&(g.d(1),g=null),/*gameVendorsRepeater*/e[10]?y?y.p(e,t):(y=ui(e),y.c(),y.m(i,o)):y&&(y.d(1),y=null),/*paymentMethodsRepeater*/e[12]?b?b.p(e,t):(b=hi(e),b.c(),b.m(i,s)):b&&(b.d(1),b=null),/*panicbuttonenabled*/"true"===e[6]?v?v.p(e,t):(v=fi(e),v.c(),v.m(i,a)):v&&(v.d(1),v=null),/*licensesRepeater*/e[18]?E?E.p(e,t):(E=pi(e),E.c(),E.m(i,l)):E&&(E.d(1),E=null),/*sponsorsRepeater*/e[14]?T?T.p(e,t):(T=bi(e),T.c(),T.m(i,u)):T&&(T.d(1),T=null),/*socialLinksRepeater*/e[20]?S?S.p(e,t):(S=Ei(e),S.c(),S.m(i,c)):S&&(S.d(1),S=null),/*languageselectorenabled*/"true"===e[5]&&/*languagePackLoaded*/e[34]&&/*selectedLanguage*/e[28]?k?k.p(e,t):(k=Si(e),k.c(),k.m(i,p)):k&&(k.d(1),k=null),/*copyright*/e[21]?M?M.p(e,t):(M=Di(e),M.c(),M.m(i,null)):M&&(M.d(1),M=null)},d(n){n&&f(t),g&&g.d(),y&&y.d(),b&&b.d(),v&&v.d(),E&&E.d(),T&&T.d(),S&&S.d(),k&&k.d(),M&&M.d()
|
1291
1274
|
/*div2_binding*/,e[56](null)}}}
|
1292
1275
|
// (247:2) {#if isLoading}
|
1293
|
-
function
|
1276
|
+
function oi(t){let n;return{c(){n=m("p"),n.textContent="Loading ...",w(n,"class","SearchLoading")},m(e,t){d(e,n,t)},p:e,d(e){e&&f(n)}}}
|
1294
1277
|
// (244:0) {#if hasErrors}
|
1295
|
-
function
|
1278
|
+
function si(t){let n;return{c(){n=m("p"),n.textContent="500 Error - Internal Server Error",w(n,"class","SearchLoading")},m(e,t){d(e,n,t)},p:e,d(e){e&&f(n)}}}
|
1296
1279
|
// (254:8) {#if helpLinksRepeater}
|
1297
|
-
function
|
1280
|
+
function ai(e){let t,n,r=/*helpLinksTitle*/e[15]&&li(e);return{c(){r&&r.c(),t=_(),n=m("casino-footer-section"),E(n,"helperflag","1"),E(n,"clientstyling",Oi),E(n,"target",/*target*/e[2]),E(n,"displaycolumn","true")},m(e,i){r&&r.m(e,i),d(e,t,i),d(e,n,i)},p(e,i){/*helpLinksTitle*/e[15]?r?r.p(e,i):(r=li(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),/*target*/4&i[0]&&E(n,"target",/*target*/e[2])},d(e){r&&r.d(e),e&&f(t),e&&f(n)}}}
|
1298
1281
|
// (255:10) {#if helpLinksTitle}
|
1299
|
-
function
|
1282
|
+
function li(e){let t,n;return{c(){t=m("p"),n=y(/*helpLinksTitle*/e[15]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*helpLinksTitle*/32768&t[0]&&T(n,/*helpLinksTitle*/e[15])},d(e){e&&f(t)}}}
|
1300
1283
|
// (264:8) {#if gameVendorsRepeater}
|
1301
|
-
function
|
1284
|
+
function ui(e){let t,n,r,i,o=/*gameVendorsLinksTitle*/e[9]&&ci(e);return{c(){t=m("div"),n=m("div"),o&&o.c(),r=_(),i=m("casino-footer-section"),E(i,"vendorflag","1"),E(i,"clientstyling",Oi),E(i,"target",/*target*/e[2]),w(t,"class","GridRow")},m(e,s){d(e,t,s),h(t,n),o&&o.m(n,null),h(n,r),h(n,i)},p(e,t){/*gameVendorsLinksTitle*/e[9]?o?o.p(e,t):(o=ci(e),o.c(),o.m(n,r)):o&&(o.d(1),o=null),/*target*/4&t[0]&&E(i,"target",/*target*/e[2])},d(e){e&&f(t),o&&o.d()}}}
|
1302
1285
|
// (267:14) {#if gameVendorsLinksTitle}
|
1303
|
-
function
|
1286
|
+
function ci(e){let t,n;return{c(){t=m("p"),n=y(/*gameVendorsLinksTitle*/e[9]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*gameVendorsLinksTitle*/512&t[0]&&T(n,/*gameVendorsLinksTitle*/e[9])},d(e){e&&f(t)}}}
|
1304
1287
|
// (276:6) {#if paymentMethodsRepeater}
|
1305
|
-
function
|
1288
|
+
function hi(e){let t,n,r,i,o=/*paymentLinksTitle*/e[11]&&di(e);return{c(){t=m("div"),n=m("div"),o&&o.c(),r=_(),i=m("casino-footer-section"),E(i,"paymentflag","1"),E(i,"clientstyling",Oi),E(i,"target",/*target*/e[2]),w(t,"class","GridRow")},m(e,s){d(e,t,s),h(t,n),o&&o.m(n,null),h(n,r),h(n,i)},p(e,t){/*paymentLinksTitle*/e[11]?o?o.p(e,t):(o=di(e),o.c(),o.m(n,r)):o&&(o.d(1),o=null),/*target*/4&t[0]&&E(i,"target",/*target*/e[2])},d(e){e&&f(t),o&&o.d()}}}
|
1306
1289
|
// (279:12) {#if paymentLinksTitle}
|
1307
|
-
function
|
1290
|
+
function di(e){let t,n;return{c(){t=m("p"),n=y(/*paymentLinksTitle*/e[11]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*paymentLinksTitle*/2048&t[0]&&T(n,/*paymentLinksTitle*/e[11])},d(e){e&&f(t)}}}
|
1308
1291
|
// (289:6) {#if panicbuttonenabled === "true"}
|
1309
|
-
function
|
1292
|
+
function fi(e){let t;return{c(){t=m("panic-button"),E(t,"customtext","Hold the button for 3 seconds to take 24 hours instant lock"),E(t,"alternativestyling","true"),E(t,"lang",/*lang*/e[0]),E(t,"clientstyling",/*clientstyling*/e[1])},m(e,n){d(e,t,n)},p(e,n){/*lang*/1&n[0]&&E(t,"lang",/*lang*/e[0]),/*clientstyling*/2&n[0]&&E(t,"clientstyling",/*clientstyling*/e[1])},d(e){e&&f(t)}}}
|
1310
1293
|
// (299:6) {#if licensesRepeater}
|
1311
|
-
function
|
1294
|
+
function pi(e){let t,n,r,i,o,s,a=/*licensesLinksTitle*/e[17]&&mi(e),l=/*licenseDesc*/e[22]&&gi(e);return{c(){t=m("div"),n=m("div"),a&&a.c(),r=_(),i=m("casino-footer-section"),o=_(),s=m("div"),l&&l.c(),E(i,"licenseflag","1"),E(i,"clientstyling",Oi),E(i,"target",/*target*/e[2]),w(n,"class","LicenseLinks"),w(s,"class","LicenseDesc"),w(t,"class","GridRow")},m(e,u){d(e,t,u),h(t,n),a&&a.m(n,null),h(n,r),h(n,i),h(t,o),h(t,s),l&&l.m(s,null)},p(e,t){/*licensesLinksTitle*/e[17]?a?a.p(e,t):(a=mi(e),a.c(),a.m(n,r)):a&&(a.d(1),a=null),/*target*/4&t[0]&&E(i,"target",/*target*/e[2]),/*licenseDesc*/e[22]?l?l.p(e,t):(l=gi(e),l.c(),l.m(s,null)):l&&(l.d(1),l=null)},d(e){e&&f(t),a&&a.d(),l&&l.d()}}}
|
1312
1295
|
// (302:12) {#if licensesLinksTitle}
|
1313
|
-
function
|
1296
|
+
function mi(e){let t,n;return{c(){t=m("p"),n=y(/*licensesLinksTitle*/e[17]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*licensesLinksTitle*/131072&t[0]&&T(n,/*licensesLinksTitle*/e[17])},d(e){e&&f(t)}}}
|
1314
1297
|
// (309:12) {#if licenseDesc}
|
1315
|
-
function
|
1298
|
+
function gi(e){let t,n,o,s,a,l,u,p,g,y,b=/*clockenabled*/"true"===e[3]&&yi(e),v=/*sessiontimerenabled*/e[7]&&localStorage.session&&_i(e);return{c(){t=m("div"),o=_(),s=m("div"),l=_(),u=m("div"),b&&b.c(),p=_(),v&&v.c(),w(t,"class","DetailedLicenses"),w(s,"class","DetailedCustomLicenses")},m(r,i){d(r,t,i),d(r,o,i),d(r,s,i),d(r,l,i),d(r,u,i),b&&b.m(u,null),h(u,p),v&&v.m(u,null),g||(y=[c(n=/*setContent*/e[38].call(null,t,/*licenseDesc*/e[22])),c(a=/*setContent*/e[38].call(null,s,/*licenseScript*/e[27]))],g=!0)},p(e,t){n&&i(n.update)&&/*licenseDesc*/4194304&t[0]&&n.update.call(null,/*licenseDesc*/e[22]),a&&i(a.update)&&/*licenseScript*/134217728&t[0]&&a.update.call(null,/*licenseScript*/e[27]),/*clockenabled*/"true"===e[3]?b?b.p(e,t):(b=yi(e),b.c(),b.m(u,p)):b&&(b.d(1),b=null),/*sessiontimerenabled*/e[7]&&localStorage.session?v?v.p(e,t):(v=_i(e),v.c(),v.m(u,null)):v&&(v.d(1),v=null)},d(e){e&&f(t),e&&f(o),e&&f(s),e&&f(l),e&&f(u),b&&b.d(),v&&v.d(),g=!1,r(y)}}}
|
1316
1299
|
// (314:16) {#if clockenabled==="true"}
|
1317
|
-
function
|
1300
|
+
function yi(e){let t,n,r,i,o,s,a;return{c(){t=m("div"),n=m("span"),r=y(/*clocktext*/e[4]),i=y(":"),o=_(),s=m("span"),a=y(/*time*/e[29]),w(n,"class","ClockText"),w(s,"class","ClockTime"),w(t,"class","ClockContainer")},m(e,l){d(e,t,l),h(t,n),h(n,r),h(n,i),h(t,o),h(t,s),h(s,a)},p(e,t){/*clocktext*/16&t[0]&&T(r,/*clocktext*/e[4]),/*time*/536870912&t[0]&&T(a,/*time*/e[29])},d(e){e&&f(t)}}}
|
1318
1301
|
// (323:16) {#if sessiontimerenabled && localStorage.session}
|
1319
|
-
function
|
1302
|
+
function _i(e){let t,n,r,i,o,s=/*$_*/e[37]("casinoFooter.sessionTimer")+"";return{c(){t=m("div"),n=m("span"),r=y(s),i=_(),o=y(/*timeString*/e[35]),w(n,"class","SessionText"),w(t,"class","sessionTimerContainer")},m(e,s){d(e,t,s),h(t,n),h(n,r),h(n,i),h(n,o)},p(e,t){/*$_*/64&t[1]&&s!==(s=/*$_*/e[37]("casinoFooter.sessionTimer")+"")&&T(r,s),/*timeString*/16&t[1]&&T(o,/*timeString*/e[35])},d(e){e&&f(t)}}}
|
1320
1303
|
// (338:6) {#if sponsorsRepeater}
|
1321
|
-
function
|
1304
|
+
function bi(e){let t,n=/*sponsorsRepeater*/e[14]&&vi(e);return{c(){t=m("div"),n&&n.c(),w(t,"class","GridRow")},m(e,r){d(e,t,r),n&&n.m(t,null)},p(e,r){/*sponsorsRepeater*/e[14]?n?n.p(e,r):(n=vi(e),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},d(e){e&&f(t),n&&n.d()}}}
|
1322
1305
|
// (340:10) {#if sponsorsRepeater}
|
1323
|
-
function
|
1306
|
+
function vi(e){let t,n,r,i=/*sponsorsLinksTitle*/e[13]&&wi(e);return{c(){t=m("div"),i&&i.c(),n=_(),r=m("casino-footer-section"),E(r,"sponsorflag","1"),E(r,"clientstyling",Oi),E(r,"target",/*target*/e[2])},m(e,o){d(e,t,o),i&&i.m(t,null),h(t,n),h(t,r)},p(e,o){/*sponsorsLinksTitle*/e[13]?i?i.p(e,o):(i=wi(e),i.c(),i.m(t,n)):i&&(i.d(1),i=null),/*target*/4&o[0]&&E(r,"target",/*target*/e[2])},d(e){e&&f(t),i&&i.d()}}}
|
1324
1307
|
// (342:12) {#if sponsorsLinksTitle}
|
1325
|
-
function
|
1308
|
+
function wi(e){let t,n;return{c(){t=m("p"),n=y(/*sponsorsLinksTitle*/e[13]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*sponsorsLinksTitle*/8192&t[0]&&T(n,/*sponsorsLinksTitle*/e[13])},d(e){e&&f(t)}}}
|
1326
1309
|
// (353:8) {#if socialLinksRepeater}
|
1327
|
-
function
|
1310
|
+
function Ei(e){let t,n,r,i=/*socialLinksTitle*/e[19]&&Ti(e);return{c(){t=m("div"),i&&i.c(),n=_(),r=m("casino-footer-section"),E(r,"socialflag","1"),E(r,"clientstyling",Oi),E(r,"target",/*target*/e[2]),w(t,"class","GridRow")},m(e,o){d(e,t,o),i&&i.m(t,null),h(t,n),h(t,r)},p(e,o){/*socialLinksTitle*/e[19]?i?i.p(e,o):(i=Ti(e),i.c(),i.m(t,n)):i&&(i.d(1),i=null),/*target*/4&o[0]&&E(r,"target",/*target*/e[2])},d(e){e&&f(t),i&&i.d()}}}
|
1328
1311
|
// (355:12) {#if socialLinksTitle}
|
1329
|
-
function
|
1312
|
+
function Ti(e){let t,n;return{c(){t=m("p"),n=y(/*socialLinksTitle*/e[19]),w(t,"class","FooterTitle")},m(e,r){d(e,t,r),h(t,n)},p(e,t){/*socialLinksTitle*/524288&t[0]&&T(n,/*socialLinksTitle*/e[19])},d(e){e&&f(t)}}}
|
1330
1313
|
// (364:6) {#if (languageselectorenabled==="true" && languagePackLoaded && selectedLanguage)}
|
1331
|
-
function
|
1332
|
-
/*div0_binding*/e[55](
|
1333
|
-
/*div0_binding*/e[55](null),
|
1314
|
+
function Si(e){let t,n,i,o,s,a,u,c,b,E,k,M,D,x,O,L,A,H=/*languagesArray*/e[30],I=[];for(let t=0;t<H.length;t+=1)I[t]=ki(ni(e,H,t));let F=/*languages*/e[8],N=[];for(let t=0;t<F.length;t+=1)N[t]=Mi(ti(e,F,t));return{c(){t=m("div"),n=m("div"),i=m("select");for(let e=0;e<I.length;e+=1)I[e].c();o=_(),s=m("div"),a=m("button"),u=m("img"),b=y(/*languageDisplayName*/e[32]),E=_(),k=g("svg"),M=g("path"),D=_(),x=m("div"),O=m("ul");for(let e=0;e<N.length;e+=1)N[e].c();w(i,"class","Item ItemLanguage"),/*selectedLanguage*/void 0===e[28]&&P((()=>/*select_change_handler*/e[53].call(i))),w(u,"class","languageFlag"),l(u.src,c=/*currentLanguageFlag*/e[33])||w(u,"src",c),w(M,"opacity","0.4"),w(M,"d","M0.94 0L4.00067 3.05467L7.06 0L8 0.940667L4.00067 4.94133L0 0.940667L0.94 0Z"),w(M,"fill","black"),w(k,"width","8"),w(k,"height","5"),w(k,"viewBox","0 0 8 5"),w(k,"fill","none"),w(k,"xmlns","http://www.w3.org/2000/svg"),w(a,"class","drawerButton"),a.value=/*selectedLanguage*/e[28],w(O,"id","languageList"),w(x,"class","languageDrawer hidden"),w(s,"class","languageSelectorOverlay"),w(n,"class","languageSelectorContainer"),w(t,"class","GridRow")},m(r,l){d(r,t,l),h(t,n),h(n,i);for(let e=0;e<I.length;e+=1)I[e].m(i,null);S(i,/*selectedLanguage*/e[28]),h(n,o),h(n,s),h(s,a),h(a,u),h(a,b),h(a,E),h(a,k),h(k,M),h(s,D),h(s,x),h(x,O);for(let e=0;e<N.length;e+=1)N[e].m(O,null);
|
1315
|
+
/*div0_binding*/e[55](x),L||(A=[v(i,"change",/*select_change_handler*/e[53]),v(i,"change",/*change_handler*/e[54]),v(a,"click",/*toggleLanguageDrawer*/e[40])],L=!0)},p(e,t){if(/*languagesArray*/1073741824&t[0]){let n;for(H=/*languagesArray*/e[30],n=0;n<H.length;n+=1){const r=ni(e,H,n);I[n]?I[n].p(r,t):(I[n]=ki(r),I[n].c(),I[n].m(i,null))}for(;n<I.length;n+=1)I[n].d(1);I.length=H.length}if(/*selectedLanguage, languagesArray*/1342177280&t[0]&&S(i,/*selectedLanguage*/e[28]),/*currentLanguageFlag*/4&t[1]&&!l(u.src,c=/*currentLanguageFlag*/e[33])&&w(u,"src",c),/*languageDisplayName*/2&t[1]&&T(b,/*languageDisplayName*/e[32]),/*selectedLanguage, languagesArray*/1342177280&t[0]&&(a.value=/*selectedLanguage*/e[28]),/*languages*/256&t[0]|/*overlayOptionTrigger*/1024&t[1]){let n;for(F=/*languages*/e[8],n=0;n<F.length;n+=1){const r=ti(e,F,n);N[n]?N[n].p(r,t):(N[n]=Mi(r),N[n].c(),N[n].m(O,null))}for(;n<N.length;n+=1)N[n].d(1);N.length=F.length}},d(n){n&&f(t),p(I,n),p(N,n),
|
1316
|
+
/*div0_binding*/e[55](null),L=!1,r(A)}}}
|
1334
1317
|
// (369:14) {#each languagesArray as operatorLanguage}
|
1335
|
-
function
|
1318
|
+
function ki(e){let t,n,r,i=/*operatorLanguage*/e[73]+"";return{c(){t=m("option"),n=y(i),t.__value=r=/*operatorLanguage*/e[73],t.value=t.__value,t.selected=!0},m(e,r){d(e,t,r),h(t,n)},p(e,o){/*languagesArray*/1073741824&o[0]&&i!==(i=/*operatorLanguage*/e[73]+"")&&T(n,i),/*languagesArray*/1073741824&o[0]&&r!==(r=/*operatorLanguage*/e[73])&&(t.__value=r,t.value=t.__value)},d(e){e&&f(t)}}}
|
1336
1319
|
// (383:20) {#each languages as language}
|
1337
|
-
function
|
1320
|
+
function Mi(e){let t,n,r,i,o,s,a,u,c,p=/*language*/e[70].name+"";return{c(){t=m("li"),n=m("img"),i=m("a"),o=m("span"),s=y(p),w(n,"class","languageFlag"),l(n.src,r=/*language*/e[70].flag_icon_editable)||w(n,"src",r),w(i,"href","javascript:void(0)"),w(t,"class","overlayLanguageOption"),w(t,"data-lang",a=/*language*/e[70].code)},m(r,a){d(r,t,a),h(t,n),h(t,i),h(i,o),h(o,s),u||(c=v(t,"click",/*overlayOptionTrigger*/e[41]),u=!0)},p(e,i){/*languages*/256&i[0]&&!l(n.src,r=/*language*/e[70].flag_icon_editable)&&w(n,"src",r),/*languages*/256&i[0]&&p!==(p=/*language*/e[70].name+"")&&T(s,p),/*languages*/256&i[0]&&a!==(a=/*language*/e[70].code)&&w(t,"data-lang",a)},d(e){e&&f(t),u=!1,c()}}}
|
1338
1321
|
// (394:6) {#if copyright}
|
1339
|
-
function
|
1340
|
-
return e[23]?
|
1322
|
+
function Di(e){let t,n,r,o;return{c(){t=m("div"),w(t,"class","CopyrightAreaRights CopyrightArea")},m(i,s){d(i,t,s),r||(o=c(n=/*setContent*/e[38].call(null,t,/*copyright*/e[21])),r=!0)},p(e,t){n&&i(n.update)&&/*copyright*/2097152&t[0]&&n.update.call(null,/*copyright*/e[21])},d(e){e&&f(t),r=!1,o()}}}function xi(t){let n,r,i,o=/*headScript*/t[25]&&ri(t);function s(e,t){/*hasErrors*/
|
1323
|
+
return e[23]?si:/*isLoading*/e[24]?oi:ii}let a=s(t),l=a(t);return{c(){o&&o.c(),n=b(),r=_(),l.c(),i=b(),this.c=e},m(e,t){o&&o.m(ei.head,null),h(ei.head,n),d(e,r,t),l.m(e,t),d(e,i,t)},p(e,t){/*headScript*/e[25]?o?o.p(e,t):(o=ri(e),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),a===(a=s(e))&&l?l.p(e,t):(l.d(1),l=a(e),l&&(l.c(),l.m(i.parentNode,i)))},i:e,o:e,d(e){o&&o.d(e),f(n),e&&f(r),l.d(e),e&&f(i)}}}let Oi="";function Li(e,t,n){let r;var i,o;i=Jr,o=e=>n(37,r=e),e.$$.on_destroy.push(u(i,o));let s,a,l,c,h,{endpoint:d=""}=t,{lang:f="en"}=t,{env:p=""}=t,{clientstyling:m=""}=t,{clientstylingurl:g=""}=t,{target:y=""}=t,{clockenabled:_=""}=t,{clocksecondsenabled:b=""}=t,{clockcustomformat:v=""}=t,{clocktext:w="Time"}=t,{languageselectorenabled:E="true"}=t,{languageslist:T="en, ro"}=t,{languagedisplaytype:S="name"}=t,{session:k=""}=t,{userid:M=""}=t,{userendpoint:D=""}=t,{panicbuttonenabled:x="true"}=t,{sessiontimerenabled:L="true"}=t,A="",H=[],I="",P=[],F="",N=[],C="",R=[],$="",B=[],Y="",U=[],G="",j="",V=!1,W=!1,z=!1,Z="",X="",K=!1,q="hr",J=[],Q=[],ee="",te="",ne=!1,re="";Object.keys(Qr).forEach((e=>{!function(e,t){kr(e,t)}(e,Qr[e])}));
|
1341
1324
|
// needed for session timer
|
1342
|
-
const
|
1325
|
+
const ie=()=>{(function(e,t){return new Promise(((n,r)=>{let i=new Headers;i.append("X-SessionID",t),ze(`${e}/player/session/player`,{method:"GET",headers:i}).then((e=>e.json())).then((e=>n(e))).catch((e=>r(e)))}))})(D,k).then((e=>{e.Guid,e.UserID,n(52,K=!0)}),(e=>{n(52,K=!1),console.error("Error while checking the session - ",e)}))},oe=()=>{const e="false"!=v?v:`hh:mm${"true"===b?":ss":""} (UTC Z)`;n(29,a=Ee().format(e))},se=()=>{window.postMessage({type:"LanguageChanged",selectedLanguage:q},window.location.href)},ae=()=>{let e=!1;J.forEach(((t,r)=>{if(t.code==q.toLowerCase()){e=!0;let r="";switch(n(33,te=t.flag_icon_editable),S){case"name":r=t.name;break;case"translatedName":r=t.translated_name;break;default:r=t.code}n(32,ee=r)}})),e||n(32,ee=q)};return e.$$set=e=>{"endpoint"in e&&n(42,d=e.endpoint),"lang"in e&&n(0,f=e.lang),"env"in e&&n(43,p=e.env),"clientstyling"in e&&n(1,m=e.clientstyling),"clientstylingurl"in e&&n(44,g=e.clientstylingurl),"target"in e&&n(2,y=e.target),"clockenabled"in e&&n(3,_=e.clockenabled),"clocksecondsenabled"in e&&n(45,b=e.clocksecondsenabled),"clockcustomformat"in e&&n(46,v=e.clockcustomformat),"clocktext"in e&&n(4,w=e.clocktext),"languageselectorenabled"in e&&n(5,E=e.languageselectorenabled),"languageslist"in e&&n(47,T=e.languageslist),"languagedisplaytype"in e&&n(48,S=e.languagedisplaytype),"session"in e&&n(49,k=e.session),"userid"in e&&n(50,M=e.userid),"userendpoint"in e&&n(51,D=e.userendpoint),"panicbuttonenabled"in e&&n(6,x=e.panicbuttonenabled),"sessiontimerenabled"in e&&n(7,L=e.sessiontimerenabled)},e.$$.update=()=>{var t;/*lang*/1&e.$$.dirty[0]&&f&&(t=f,Br.set(t)),/*languageslist*/65536&e.$$.dirty[1]&&T&&(n(30,Q=T.replace(/ /g,"").split(",")),n(30,Q=Q.map((e=>e.toUpperCase())))),/*session, userid, endpoint*/788480&e.$$.dirty[1]&&k&&M&&d&&ie(),/*lang*/1&e.$$.dirty[0]|/*isLoggedIn*/2097152&e.$$.dirty[1]&&K&&f&&(()=>{
|
1343
1326
|
// using Date instead of moment because they recommend in their docs to stop using it for new projects
|
1344
|
-
const e=JSON.parse(localStorage.session),t=new Date(e.Login),r=(new Date).getTimezoneOffset()/60;let i=(new Date).getTime()-t.getTime(),o=Math.floor(i/36e5)+r,s=Math.floor(i%36e5/6e4),a=Math.floor(i%6e4/1e3);setInterval((()=>{o=Math.floor(i/36e5)+r,s=Math.floor(i%36e5/6e4),a=Math.floor(i%6e4/1e3),n(35,
|
1327
|
+
const e=JSON.parse(localStorage.session),t=new Date(e.Login),r=(new Date).getTimezoneOffset()/60;let i=(new Date).getTime()-t.getTime(),o=Math.floor(i/36e5)+r,s=Math.floor(i%36e5/6e4),a=Math.floor(i%6e4/1e3);setInterval((()=>{o=Math.floor(i/36e5)+r,s=Math.floor(i%36e5/6e4),a=Math.floor(i%6e4/1e3),n(35,re=`${o>9?o:"0"+o}:${s>9?s:"0"+s}:${a>9?a:"0"+a}`),i+=1e3}),1e3)})(),/*lang*/1&e.$$.dirty[0]|/*endpoint, env*/6144&e.$$.dirty[1]&&d&&f&&p&&(()=>{let e=new URL(`${d}/${f}/footer-raw-data?env=${p}`);n(24,W=!0),fetch(e.href).then((e=>e.json())).then((e=>{let t,r,i;n(24,W=!1),s=e,n(9,({gameVendorsLinksTitle:A,gameVendorsRepeater:H,paymentLinksTitle:I,paymentMethodsRepeater:P,sponsorsLinksTitle:F,sponsorsRepeater:N,helpLinksTitle:C,helpLinksRepeater:R,licensesLinksTitle:$,licensesRepeater:B,socialLinksTitle:Y,socialLinksRepeater:U,copyright:G,licenseDesc:j,licenseHeadScriptSrc:t,licenseScriptBody:r,licenseEvent:i,language:J}=s),A,n(10,H),n(11,I),n(12,P),n(13,F),n(14,N),n(15,C),n(16,R),n(17,$),n(18,B),n(19,Y),n(20,U),n(21,G),n(22,j),n(8,J)),J&&(n(34,ne=!0),ae()),(null==t?void 0:t.length)>0&&(n(25,z=!0),n(26,Z=t)),(null==r?void 0:r.length)>0&&n(27,X=r),window.postMessage({type:i},window.location.href),window.postMessage({type:"FooterData",gameVendorsRepeater:H,paymentMethodsRepeater:P,sponsorsRepeater:N,helpLinksRepeater:R,licensesRepeater:B,socialLinksRepeater:U},window.location.href)})).catch((e=>{n(23,V=!0),n(24,W=!1),console.error(e)}))})(),/*clockenabled*/8&e.$$.dirty[0]|/*clocksecondsenabled, clockcustomformat*/49152&e.$$.dirty[1]&&"false"!==_&&b&&v&&oe(),/*clockenabled*/8&e.$$.dirty[0]|/*clocksecondsenabled*/16384&e.$$.dirty[1]&&"false"!==_&&b&&(l="true"==b?1e3:6e4)&&setInterval((()=>{oe()}),l),/*lang, languages*/257&e.$$.dirty[0]&&f&&n(28,q=f)&&J&&J.length>0&&ae(),/*clientstyling*/2&e.$$.dirty[0]&&m&&(()=>{let e=document.createElement("style");e.innerHTML=m,h&&h.appendChild(e)})(),/*clientstylingurl*/8192&e.$$.dirty[1]&&g&&(()=>{let e=new URL(g),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,h&&setTimeout((()=>{h.appendChild(t)}),1)}))})()},[f,m,y,_,w,E,x,L,J,A,H,I,P,F,N,C,R,$,B,Y,U,G,j,V,W,z,Z,X,q,a,Q,c,ee,te,ne,re,h,r,(e,t)=>{let n=document.createElement("div");n.innerHTML=t,e.append(n)},se,()=>{c.classList.toggle("hidden")},e=>{let t=e.target.closest(".overlayLanguageOption");n(28,q=t.getAttribute("data-lang")),se(),ae(),c.classList.toggle("hidden")},d,p,g,b,v,T,S,k,M,D,K,function(){q=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(28,q),n(0,f),n(8,J),n(30,Q)},()=>se(),function(e){O[e?"unshift":"push"]((()=>{c=e,n(31,c)}))},function(e){O[e?"unshift":"push"]((()=>{h=e,n(36,h)}))}]}class Ai extends G{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}.SearchLoading{color:var(--emfe-w-color-white, #FFFFFF);text-align:center}.Footer{background-color:#E8E9EB;position:relative}.FooterSide{display:flex;flex-direction:column;position:absolute;background-color:#E8E9EB}.FooterSide .FooterTitle{text-transform:uppercase;font-size:12px;font-weight:600;margin:24px 13px}.FooterGrid{font-weight:400;display:flex;padding:100px 0;max-width:1200px;margin:0 auto;background-color:#E8E9EB;flex-direction:column;align-items:center;justify-content:center}.FooterGrid .GridRow{display:flex;flex-flow:row wrap;width:100%;align-items:flex-start;justify-content:center;align-items:center;padding:20px 0;text-align:center;max-width:1100px}.FooterGrid .GridRow p{text-align:center}.FooterGrid .GridRow p.FooterTitle{font-size:12px;font-weight:700}.FooterGrid .GridRow .LicenseDesc{flex:1;max-width:575px;line-height:1.3;display:flex;flex-direction:column;align-items:flex-start}.FooterGrid .GridRow .LicenseDesc .DetailedLicenses{font-size:10px;color:var(--emfe-w-color-gray-150, #828282)}.FooterGrid .GridRow .LicenseDesc .DetailedLicenses div{text-align:left;white-space:pre-line}.FooterGrid .CopyrightAreaRights{margin-top:10px}.FooterGrid .CopyrightTextArea p,.FooterGrid .CopyrightArea p{margin:0;color:var(--emfe-w-color-gray-150, #828282);font-size:9px}@media only screen and (max-width: 768px){.Footer{display:flex;flex-direction:column}.FooterSide{position:relative;margin-top:66px;margin-left:14px}.FooterGrid{padding:0}.FooterGrid:last-child{padding-bottom:50px}.GridRow{border-bottom:1px solid rgba(0, 0, 0, 0.05);gap:15px}.GridRow:last-child{border:none}}.ClockContainer{color:var(--emfe-w-color-gray-150, #828282);font-size:11px;display:inline}.sessionTimerContainer{color:#828282;font-size:11px;display:inline}.ItemLanguage{display:none}#languageList{padding:0;margin:0}.languageSelectorOverlay{position:relative}.drawerButton{height:30px;width:150px;background:inherit;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit;display:flex;justify-content:space-evenly;align-items:center;border-radius:0px;border:0}.languageDrawer{position:absolute;background:#E8E9EB;width:150px;top:30px;padding:6px 0;left:3.9px}.languageDrawer.hidden{display:none}.languageFlag{margin-right:8px;background:black;border-radius:50%;width:14px;height:14px}.overlayLanguageOption{list-style:none;width:24px;position:relative;padding:0;justify-content:center}.overlayLanguageOption img{position:absolute;z-index:0;cursor:pointer;top:6px;left:12px}.overlayLanguageOption a{text-decoration:none;color:black;display:inline-block;width:150px}.overlayLanguageOption a span{width:100%;display:flex;justify-content:center;margin:4px 0}</style>",U(this,{target:this.shadowRoot,props:k(this.attributes),customElement:!0},Li,xi,o,{endpoint:42,lang:0,env:43,clientstyling:1,clientstylingurl:44,target:2,clockenabled:3,clocksecondsenabled:45,clockcustomformat:46,clocktext:4,languageselectorenabled:5,languageslist:47,languagedisplaytype:48,session:49,userid:50,userendpoint:51,panicbuttonenabled:6,sessiontimerenabled:7},null,[-1,-1,-1]),e&&(e.target&&d(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["endpoint","lang","env","clientstyling","clientstylingurl","target","clockenabled","clocksecondsenabled","clockcustomformat","clocktext","languageselectorenabled","languageslist","languagedisplaytype","session","userid","userendpoint","panicbuttonenabled","sessiontimerenabled"]}get endpoint(){return this.$$.ctx[42]}set endpoint(e){this.$$set({endpoint:e}),C()}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),C()}get env(){return this.$$.ctx[43]}set env(e){this.$$set({env:e}),C()}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[44]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),C()}get clockenabled(){return this.$$.ctx[3]}set clockenabled(e){this.$$set({clockenabled:e}),C()}get clocksecondsenabled(){return this.$$.ctx[45]}set clocksecondsenabled(e){this.$$set({clocksecondsenabled:e}),C()}get clockcustomformat(){return this.$$.ctx[46]}set clockcustomformat(e){this.$$set({clockcustomformat:e}),C()}get clocktext(){return this.$$.ctx[4]}set clocktext(e){this.$$set({clocktext:e}),C()}get languageselectorenabled(){return this.$$.ctx[5]}set languageselectorenabled(e){this.$$set({languageselectorenabled:e}),C()}get languageslist(){return this.$$.ctx[47]}set languageslist(e){this.$$set({languageslist:e}),C()}get languagedisplaytype(){return this.$$.ctx[48]}set languagedisplaytype(e){this.$$set({languagedisplaytype:e}),C()}get session(){return this.$$.ctx[49]}set session(e){this.$$set({session:e}),C()}get userid(){return this.$$.ctx[50]}set userid(e){this.$$set({userid:e}),C()}get userendpoint(){return this.$$.ctx[51]}set userendpoint(e){this.$$set({userendpoint:e}),C()}get panicbuttonenabled(){return this.$$.ctx[6]}set panicbuttonenabled(e){this.$$set({panicbuttonenabled:e}),C()}get sessiontimerenabled(){return this.$$.ctx[7]}set sessiontimerenabled(e){this.$$set({sessiontimerenabled:e}),C()}}return!customElements.get("casino-footer-v2")&&customElements.define("casino-footer-v2",Ai),Ai}));
|
1345
1328
|
//# sourceMappingURL=casino-footer-v2.js.map
|