@everymatrix/casino-calendar 1.9.0 → 1.9.2
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-calendar.js +185 -167
- package/dist/casino-calendar.js.map +1 -1
- package/package.json +3 -4
package/dist/casino-calendar.js
CHANGED
|
@@ -2,15 +2,27 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Creates a new task that runs on each raf frame
|
|
4
4
|
* until it returns a falsy value or is aborted
|
|
5
|
-
*/function f(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function m(t){const e=E("style");return function(t,e){f(t.head||t,e)}(y(t),e),e.sheet}function g(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function v(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function E(t){return document.createElement(t)}function w(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function
|
|
5
|
+
*/function f(t,e){t.appendChild(e)}function y(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function m(t){const e=E("style");return function(t,e){f(t.head||t,e),e.sheet}(y(t),e),e.sheet}function g(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode&&t.parentNode.removeChild(t)}function v(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function E(t){return document.createElement(t)}function w(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function _(t){return document.createTextNode(t)}function T(){return _(" ")}function x(){return _("")}function B(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function A(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:C(t,e,n)}function H(t,e){e=""+e,t.data!==e&&(t.data=e)}function S(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}
|
|
6
6
|
// unfortunately this can't be a constant as that wouldn't be tree-shakeable
|
|
7
7
|
// so we cache the result instead
|
|
8
8
|
let P;function I(){if(void 0===P){P=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){P=!0}}return P}function L(t){const e={};for(const n of t)e[n.name]=n.value;return e}
|
|
9
9
|
// we need to store the information for multiple documents because a Svelte application could also contain iframes
|
|
10
10
|
// https://github.com/sveltejs/svelte/issues/3624
|
|
11
|
-
const
|
|
11
|
+
const $=new Map;let M,O=0;
|
|
12
12
|
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
13
|
-
function
|
|
13
|
+
function N(t,e,n,r,i,o,s,a=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l){const r=e+(n-e)*o(t);c+=100*t+`%{${s(r,1-r)}}\n`}const u=c+`100% {${s(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${a}`,d=y(t),{stylesheet:p,rules:f}=$.get(d)||function(t,e){const n={stylesheet:m(e),rules:{}};return $.set(t,n),n}(d,t);f[h]||(f[h]=!0,p.insertRule(`@keyframes ${h} ${u}`,p.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${h} ${r}ms linear ${i}ms 1 both`,O+=1,h}function D(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),O-=i,O||h((()=>{O||($.forEach((t=>{const{ownerNode:e}=t.stylesheet;
|
|
14
|
+
// there is no ownerNode if it runs on jsdom.
|
|
15
|
+
e&&b(e)})),$.clear())})))}function R(t){M=t}
|
|
16
|
+
/**
|
|
17
|
+
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
18
|
+
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
19
|
+
* it can be called from an external module).
|
|
20
|
+
*
|
|
21
|
+
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
22
|
+
*
|
|
23
|
+
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
24
|
+
*/
|
|
25
|
+
function k(t){(function(){if(!M)throw new Error("Function called outside component initialization");return M})().$$.on_mount.push(t)}const U=[],F=[];let G=[];const j=[],z=Promise.resolve();let V=!1;function X(t){G.push(t)}
|
|
14
26
|
// flush() calls callbacks in this order:
|
|
15
27
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
16
28
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -30,57 +42,70 @@ function R(t,e,n,r,i,o,s,a=0){const l=16.666/r;let c="{\n";for(let t=0;t<=1;t+=l
|
|
|
30
42
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
31
43
|
// function, guarantees this behavior.
|
|
32
44
|
const W=new Set;let K,Y=0;// Do *not* move this inside the flush() function
|
|
33
|
-
function Z(){
|
|
45
|
+
function Z(){
|
|
46
|
+
// Do not reenter flush while dirty components are updated, as this can
|
|
47
|
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
48
|
+
// Reentrancy is ok afterwards for bindings etc.
|
|
49
|
+
if(0!==Y)return;const t=M;do{
|
|
34
50
|
// first, call beforeUpdate functions
|
|
35
51
|
// and update components
|
|
36
|
-
for(;Y<U.length;){const t=U[Y];Y++,
|
|
52
|
+
try{for(;Y<U.length;){const t=U[Y];Y++,R(t),q(t.$$)}}catch(t){
|
|
53
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
54
|
+
throw U.length=0,Y=0,t}for(R(null),U.length=0,Y=0;F.length;)F.pop()();
|
|
37
55
|
// then, once components are updated, call
|
|
38
56
|
// afterUpdate functions. This may cause
|
|
39
57
|
// subsequent updates...
|
|
40
58
|
for(let t=0;t<G.length;t+=1){const e=G[t];W.has(e)||(
|
|
41
59
|
// ...so guard against infinite loops
|
|
42
|
-
W.add(e),e())}G.length=0}while(U.length);for(;j.length;)j.pop()();V=!1,W.clear(),
|
|
60
|
+
W.add(e),e())}G.length=0}while(U.length);for(;j.length;)j.pop()();V=!1,W.clear(),R(t)}function q(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(X)}}
|
|
61
|
+
/**
|
|
62
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
63
|
+
*/function J(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const Q=new Set;let tt;function et(t,e){t&&t.i&&(Q.delete(t),t.i(e))}function nt(t,e,n,r){if(t&&t.o){if(Q.has(t))return;Q.add(t),tt.c.push((()=>{Q.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const rt={duration:0};function it(n,r,s,a){const l={direction:"both"};let c=r(n,s,l),f=a?0:1,y=null,m=null,g=null;function b(){g&&D(n,g)}function v(t,e){const n=t.b-f;return e*=Math.abs(n),{a:f,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function E(r){const{delay:o=0,duration:s=300,easing:a=e,tick:l=t,css:E}=c||rt,w={start:u()+o,b:r};r||(
|
|
43
64
|
// @ts-ignore todo: improve typings
|
|
44
|
-
w.group=tt,tt.r+=1),
|
|
65
|
+
w.group=tt,tt.r+=1),y||m?m=w:(
|
|
45
66
|
// if this is an intro, and there's a delay, we need to do
|
|
46
67
|
// an initial tick and/or apply CSS animation immediately
|
|
47
|
-
E&&(
|
|
68
|
+
E&&(b(),g=N(n,f,r,s,o,a,E)),r&&l(0,1),y=v(w,s),X((()=>J(n,r,"start"))),function(t){let e;0===d.size&&h(p),new Promise((n=>{d.add(e={c:t,f:n})}))}((t=>{if(m&&t>m.start&&(y=v(m,s),m=null,J(n,y.b,"start"),E&&(b(),g=N(n,f,y.b,y.duration,0,a,c.css))),y)if(t>=y.end)l(f=y.b,1-f),J(n,y.b,"end"),m||(
|
|
48
69
|
// we're done
|
|
49
|
-
|
|
70
|
+
y.b?
|
|
50
71
|
// intro — we can tidy up immediately
|
|
51
|
-
|
|
72
|
+
b():
|
|
52
73
|
// outro — needs to be coordinated
|
|
53
|
-
--
|
|
74
|
+
--y.group.r||i(y.group.c)),y=null;else if(t>=y.start){const e=t-y.start;f=y.a+y.d*a(e/y.duration),l(f,1-f)}return!(!y&&!m)})))}return{run(t){o(c)?(K||(K=Promise.resolve(),K.then((()=>{K=null}))),K).then((()=>{
|
|
54
75
|
// @ts-ignore
|
|
55
|
-
|
|
76
|
+
c=c(l),E(t)})):E(t)},end(){b(),y=m=null}}}function ot(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];G.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),G=e}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
77
|
+
// TODO null out other refs, including component.$$ (but need to
|
|
78
|
+
// preserve final state?)
|
|
79
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(U.push(t),V||(V=!0,z.then(Z)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function at(e,s,a,l,c,u,h,d=[-1]){const p=M;R(e);const f=e.$$={fragment:null,ctx:[],
|
|
56
80
|
// state
|
|
57
81
|
props:u,update:t,not_equal:c,bound:r(),
|
|
58
82
|
// lifecycle
|
|
59
83
|
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(p?p.$$.context:[])),
|
|
60
84
|
// everything else
|
|
61
|
-
callbacks:r(),dirty:d,skip_bound:!1,root:s.target||p.$$.root};h&&h(f.root);let y=!1;if(f.ctx=a?a(e,s.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return f.ctx&&c(f.ctx[t],f.ctx[t]=i)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](i),y&&
|
|
85
|
+
callbacks:r(),dirty:d,skip_bound:!1,root:s.target||p.$$.root};h&&h(f.root);let y=!1;if(f.ctx=a?a(e,s.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return f.ctx&&c(f.ctx[t],f.ctx[t]=i)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](i),y&&st(e,t)),n})):[],f.update(),y=!0,i(f.before_update),
|
|
62
86
|
// `false` as a special case of no DOM component
|
|
63
87
|
f.fragment=!!l&&l(f.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
64
88
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
65
89
|
f.fragment&&f.fragment.l(t),t.forEach(b)}else
|
|
66
90
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
67
|
-
f.fragment&&f.fragment.c();s.intro&&et(e.$$.fragment),function(t,e,r,s){const{fragment:a,
|
|
91
|
+
f.fragment&&f.fragment.c();s.intro&&et(e.$$.fragment),function(t,e,r,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,r),s||
|
|
68
92
|
// onMount happens before the initial afterUpdate
|
|
69
|
-
X((()=>{const e=
|
|
93
|
+
X((()=>{const e=t.$$.on_mount.map(n).filter(o);
|
|
94
|
+
// if the component was destroyed immediately
|
|
95
|
+
// it will update the `$$.on_destroy` reference to `null`.
|
|
96
|
+
// the destructured on_destroy may still reference to the old array
|
|
97
|
+
t.$$.on_destroy?t.$$.on_destroy.push(...e):
|
|
70
98
|
// Edge case - component was destroyed immediately,
|
|
71
99
|
// most likely as a result of a binding initialising
|
|
72
|
-
i(e),t.$$.on_mount=[]})),
|
|
100
|
+
i(e),t.$$.on_mount=[]})),l.forEach(X)}(e,s.target,s.anchor,s.customElement),Z()}R(p)}let lt;"function"==typeof HTMLElement&&(lt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(o);
|
|
73
101
|
// @ts-ignore todo: improve typings
|
|
74
102
|
for(const t in this.$$.slotted)
|
|
75
103
|
// @ts-ignore todo: improve typings
|
|
76
|
-
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){
|
|
77
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
78
|
-
// preserve final state?)
|
|
79
|
-
n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){
|
|
104
|
+
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){ot(this,1),this.$destroy=t}$on(e,n){
|
|
80
105
|
// TODO should this delegate to addEventListener?
|
|
81
|
-
const
|
|
106
|
+
if(!o(n))return t;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var ct="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==ct&&ct,ut={searchParams:"URLSearchParams"in ct,iterable:"Symbol"in ct&&"iterator"in Symbol,blob:"FileReader"in ct&&"Blob"in ct&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in ct,arrayBuffer:"ArrayBuffer"in ct};if(ut.arrayBuffer)var ht=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],dt=ArrayBuffer.isView||function(t){return t&&ht.indexOf(Object.prototype.toString.call(t))>-1};function pt(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function ft(t){return"string"!=typeof t&&(t=String(t)),t}
|
|
82
107
|
// Build a destructive iterator for the value list
|
|
83
|
-
function
|
|
108
|
+
function yt(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return ut.iterable&&(e[Symbol.iterator]=function(){return e}),e}function mt(t){this.map={},t instanceof mt?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function gt(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function bt(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function vt(t){var e=new FileReader,n=bt(e);return e.readAsArrayBuffer(t),n}function Et(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function wt(){return this.bodyUsed=!1,this._initBody=function(t){var e;
|
|
84
109
|
/*
|
|
85
110
|
fetch-mock wraps the Response object in an ES6 Proxy to
|
|
86
111
|
provide useful test harness features such as flush. However, on
|
|
@@ -91,25 +116,25 @@ function bt(t){var e={next:function(){var e=t.shift();return{done:void 0===e,val
|
|
|
91
116
|
semantic of setting Request.bodyUsed in the constructor before
|
|
92
117
|
_initBody is called.
|
|
93
118
|
*/
|
|
94
|
-
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:
|
|
119
|
+
this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:ut.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:ut.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:ut.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():ut.arrayBuffer&&ut.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=Et(t.buffer),
|
|
95
120
|
// IE 10-11 can't handle a DataView body.
|
|
96
|
-
this._bodyInit=new Blob([this._bodyArrayBuffer])):
|
|
121
|
+
this._bodyInit=new Blob([this._bodyArrayBuffer])):ut.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||dt(t))?this._bodyArrayBuffer=Et(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):ut.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},ut.blob&&(this.blob=function(){var t=gt(this);if(t)return t;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 t=gt(this);return t||(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(vt)}),this.text=function(){var t=gt(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=bt(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},ut.formData&&(this.formData=function(){return this.text().then(xt)}),this.json=function(){return this.text().then(JSON.parse)},this}
|
|
97
122
|
// HTTP methods whose capitalization should be normalized
|
|
98
|
-
|
|
123
|
+
mt.prototype.append=function(t,e){t=pt(t),e=ft(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},mt.prototype.delete=function(t){delete this.map[pt(t)]},mt.prototype.get=function(t){return t=pt(t),this.has(t)?this.map[t]:null},mt.prototype.has=function(t){return this.map.hasOwnProperty(pt(t))},mt.prototype.set=function(t,e){this.map[pt(t)]=ft(e)},mt.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},mt.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),yt(t)},mt.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),yt(t)},mt.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),yt(t)},ut.iterable&&(mt.prototype[Symbol.iterator]=mt.prototype.entries);var _t=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Tt(t,e){if(!(this instanceof Tt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof Tt){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new mt(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new mt(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),_t.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.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"!==e.cache&&"no-cache"!==e.cache)){
|
|
99
124
|
// Search for a '_' parameter in the query string
|
|
100
125
|
var o=/([?&])_=[^&]*/;if(o.test(this.url))
|
|
101
126
|
// If it already exists then set the value with the current time
|
|
102
|
-
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function
|
|
127
|
+
this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function xt(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function Bt(t,e){if(!(this instanceof Bt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new mt(e.headers),this.url=e.url||"",this._initBody(t)}Tt.prototype.clone=function(){return new Tt(this,{body:this._bodyInit})},wt.call(Tt.prototype),wt.call(Bt.prototype),Bt.prototype.clone=function(){return new Bt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new mt(this.headers),url:this.url})},Bt.error=function(){var t=new Bt(null,{status:0,statusText:""});return t.type="error",t};var Ct=[301,302,303,307,308];Bt.redirect=function(t,e){if(-1===Ct.indexOf(e))throw new RangeError("Invalid status code");return new Bt(null,{status:e,headers:{location:t}})};var At=ct.DOMException;try{new At}catch(t){(At=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),At.prototype.constructor=At}function Ht(t,e){return new Promise((function(n,r){var i=new Tt(t,e);if(i.signal&&i.signal.aborted)return r(new At("Aborted","AbortError"));var o=new XMLHttpRequest;function s(){o.abort()}o.onload=function(){var t,e,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new mt,
|
|
103
128
|
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
104
129
|
// https://github.com/github/fetch/issues/748
|
|
105
130
|
// https://github.com/zloirock/core-js/issues/751
|
|
106
|
-
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};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
|
|
131
|
+
t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};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 Bt(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 At("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&ct.location.href?ct.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(ut.blob?o.responseType="blob":ut.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof mt?i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){o.setRequestHeader(t,ft(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",s),o.onreadystatechange=function(){
|
|
107
132
|
// DONE (success or failure)
|
|
108
|
-
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}
|
|
133
|
+
4===o.readyState&&i.signal.removeEventListener("abort",s)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Ht.polyfill=!0,ct.fetch||(ct.fetch=Ht,ct.Headers=mt,ct.Request=Tt,ct.Response=Bt);
|
|
109
134
|
// the whatwg-fetch polyfill installs the fetch() function
|
|
110
135
|
// on the global object (window or self)
|
|
111
136
|
// Return that as the export for use in Webpack, Browserify etc.
|
|
112
|
-
var
|
|
137
|
+
var St=self.fetch.bind(self),Pt=function(t,e){return Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Pt(t,e)};
|
|
113
138
|
/******************************************************************************
|
|
114
139
|
Copyright (c) Microsoft Corporation.
|
|
115
140
|
|
|
@@ -124,7 +149,7 @@ var Lt=self.fetch.bind(self),Mt=function(t,e){return Mt=Object.setPrototypeOf||{
|
|
|
124
149
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
125
150
|
PERFORMANCE OF THIS SOFTWARE.
|
|
126
151
|
***************************************************************************** */
|
|
127
|
-
/* global Reflect, Promise */function $t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Mt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Ot(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Nt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function Dt(t){return"function"==typeof t}function kt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ut=kt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Ft(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,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=Ot(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(Dt(l))try{l()}catch(t){i=t instanceof Ut?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Ot(c),h=u.next();!h.done;h=u.next()){var d=h.value;try{Vt(d)}catch(t){i=null!=i?i:[],t instanceof Ut?i=Nt(Nt([],Rt(i)),Rt(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Ut(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Vt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ft(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ft(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),jt=Gt.EMPTY;function zt(t){return t instanceof Gt||t&&"closed"in t&&Dt(t.remove)&&Dt(t.add)&&Dt(t.unsubscribe)}function Vt(t){Dt(t)?t():t.unsubscribe()}var Xt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Wt={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Wt.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Nt([t,e],Rt(n))):setTimeout.apply(void 0,Nt([t,e],Rt(n)))},clearTimeout:function(t){var e=Wt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Kt(){}var Yt=null;function Zt(t){if(Xt.useDeprecatedSynchronousErrorHandling){var e=!Yt;if(e&&(Yt={errorThrown:!1,error:null}),t(),e){var n=Yt,r=n.errorThrown,i=n.error;if(Yt=null,r)throw i}}else t()}var qt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,zt(e)&&e.add(n)):n.destination=re,n}return $t(e,t),e.create=function(t,e,n){return new ee(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gt),Jt=Function.prototype.bind;function Qt(t,e){return Jt.call(t,e)}var te=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){ne(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){ne(t)}else ne(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){ne(t)}},t}(),ee=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;Dt(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&Xt.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Qt(e.next,o),error:e.error&&Qt(e.error,o),complete:e.complete&&Qt(e.complete,o)}):i=e;return s.destination=new te(i),s}return $t(e,t),e}(qt);function ne(t){var e;e=t,Wt.setTimeout((function(){throw e}))}var re={closed:!0,next:Kt,error:function(t){throw t},complete:Kt},ie="function"==typeof Symbol&&Symbol.observable||"@@observable";function oe(t){return t}function se(t){return 0===t.length?oe:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var ae=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof qt||function(t){return t&&Dt(t.next)&&Dt(t.error)&&Dt(t.complete)}(r)&&zt(r)?t:new ee(t,e,n);return Zt((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=le(e))((function(e,r){var i=new ee({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[ie]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return se(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=le(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function le(t){var e;return null!==(e=null!=t?t:Xt.Promise)&&void 0!==e?e:Promise}var ce=kt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),ue=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return $t(e,t),e.prototype.lift=function(t){var e=new he(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ce},e.prototype.next=function(t){var e=this;Zt((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=Ot(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Zt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Zt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?jt:(this.currentObservers=null,o.push(t),new Gt((function(){e.currentObservers=null,Ft(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new ae;return t.source=this,t},e.create=function(t,e){return new he(t,e)},e}(ae),he=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return $t(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:jt},e}(ue),de={now:function(){return(de.delegate||Date).now()},delegate:void 0},pe=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=de);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return $t(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<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)}},e}(ue);let fe=[],ye={};
|
|
152
|
+
/* global Reflect, Promise */function It(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Pt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Lt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $t(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Mt(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function Ot(t){return"function"==typeof t}function Nt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Dt=Nt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Rt(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var kt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,e,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=Lt(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(Ot(l))try{l()}catch(t){i=t instanceof Dt?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=Lt(c),h=u.next();!h.done;h=u.next()){var d=h.value;try{Gt(d)}catch(t){i=null!=i?i:[],t instanceof Dt?i=Mt(Mt([],$t(i)),$t(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Dt(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Gt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Rt(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Rt(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Ut=kt.EMPTY;function Ft(t){return t instanceof kt||t&&"closed"in t&&Ot(t.remove)&&Ot(t.add)&&Ot(t.unsubscribe)}function Gt(t){Ot(t)?t():t.unsubscribe()}var jt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zt={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=zt.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,Mt([t,e],$t(n))):setTimeout.apply(void 0,Mt([t,e],$t(n)))},clearTimeout:function(t){var e=zt.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Vt(){}var Xt=null;function Wt(t){if(jt.useDeprecatedSynchronousErrorHandling){var e=!Xt;if(e&&(Xt={errorThrown:!1,error:null}),t(),e){var n=Xt,r=n.errorThrown,i=n.error;if(Xt=null,r)throw i}}else t()}var Kt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Ft(e)&&e.add(n)):n.destination=te,n}return It(e,t),e.create=function(t,e,n){return new Jt(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(kt),Yt=Function.prototype.bind;function Zt(t,e){return Yt.call(t,e)}var qt=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Qt(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Qt(t)}else Qt(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Qt(t)}},t}(),Jt=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;Ot(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&jt.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Zt(e.next,o),error:e.error&&Zt(e.error,o),complete:e.complete&&Zt(e.complete,o)}):i=e;return s.destination=new qt(i),s}return It(e,t),e}(Kt);function Qt(t){var e;e=t,zt.setTimeout((function(){throw e}))}var te={closed:!0,next:Vt,error:function(t){throw t},complete:Vt},ee="function"==typeof Symbol&&Symbol.observable||"@@observable";function ne(t){return t}var re=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Kt||function(t){return t&&Ot(t.next)&&Ot(t.error)&&Ot(t.complete)}(r)&&Ft(r)?t:new Jt(t,e,n);return Wt((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=ie(e))((function(e,r){var i=new Jt({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[ee]=function(){return this},t.prototype.pipe=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0===(t=e).length?ne:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)})(this)},t.prototype.toPromise=function(t){var e=this;return new(t=ie(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function ie(t){var e;return null!==(e=null!=t?t:jt.Promise)&&void 0!==e?e:Promise}var oe=Nt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),se=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return It(e,t),e.prototype.lift=function(t){var e=new ae(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new oe},e.prototype.next=function(t){var e=this;Wt((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=Lt(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Wt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Wt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?Ut:(this.currentObservers=null,o.push(t),new kt((function(){e.currentObservers=null,Rt(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new re;return t.source=this,t},e.create=function(t,e){return new ae(t,e)},e}(re),ae=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return It(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:Ut},e}(se),le={now:function(){return(le.delegate||Date).now()},delegate:void 0},ce=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=le);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return It(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<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)}},e}(se);let ue=[],he={};
|
|
128
153
|
/**
|
|
129
154
|
* @name topic
|
|
130
155
|
* @description A small wrapper over the rxjs to offer the topic method on top of it
|
|
@@ -132,32 +157,36 @@ var Lt=self.fetch.bind(self),Mt=function(t,e){return Mt=Object.setPrototypeOf||{
|
|
|
132
157
|
* @param step [String] How many values to be buffed for new subscribers - default 0
|
|
133
158
|
* @returns ReplaySubject
|
|
134
159
|
*/
|
|
135
|
-
const
|
|
160
|
+
const de=[];
|
|
136
161
|
/**
|
|
137
162
|
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
138
163
|
* @param {*=}value initial value
|
|
139
164
|
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
140
165
|
*/
|
|
141
|
-
function
|
|
142
|
-
const t=!
|
|
166
|
+
function pe(e,n=t){let r;const i=new Set;function o(t){if(s(e,t)&&(e=t,r)){// store is ready
|
|
167
|
+
const t=!de.length;for(const t of i)t[1](),de.push(t,e);if(t){for(let t=0;t<de.length;t+=2)de[t][0](de[t+1]);de.length=0}}}return{set:o,update:function(t){o(t(e))},subscribe:function(s,a=t){const l=[s,a];return i.add(l),1===i.size&&(r=n(o)||t),s(e),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function fe(e,n,r){const s=!Array.isArray(e),a=s?[e]:e,l=n.length<2;return c=e=>{let r=!1;const c=[];let u=0,h=t;const d=()=>{if(u)return;h();const r=n(s?c[0]:c,e);l?e(r):h=o(r)?r:t},p=a.map(((e,n)=>function(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}(e,(t=>{c[n]=t,u&=~(1<<n),r&&d()}),(()=>{u|=1<<n}))));return r=!0,d(),function(){i(p),h(),
|
|
168
|
+
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
169
|
+
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
170
|
+
// invoke this derived store.
|
|
171
|
+
r=!1}},{subscribe:pe(r,c).subscribe};
|
|
143
172
|
/**
|
|
144
173
|
* Creates a `Readable` store that allows reading by subscription.
|
|
145
174
|
* @param value initial value
|
|
146
175
|
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
147
176
|
*/
|
|
148
|
-
var c}var
|
|
177
|
+
var c}var ye=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===me}(t)}
|
|
149
178
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
150
|
-
(t)};var
|
|
179
|
+
(t)};var me="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ge(t,e){return!1!==e.clone&&e.isMergeableObject(t)?_e((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function be(t,e,n){return t.concat(e).map((function(t){return ge(t,n)}))}function ve(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function Ee(t,e){try{return e in t}catch(t){return!1}}
|
|
151
180
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
152
|
-
function
|
|
153
|
-
})(t,i)||(
|
|
181
|
+
function we(t,e,n){var r={};return n.isMergeableObject(t)&&ve(t).forEach((function(e){r[e]=ge(t[e],n)})),ve(e).forEach((function(i){(function(t,e){return Ee(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
|
|
182
|
+
})(t,i)||(Ee(t,i)&&n.isMergeableObject(e[i])?r[i]=function(t,e){if(!e.customMerge)return _e;var n=e.customMerge(t);return"function"==typeof n?n:_e}(i,n)(t[i],e[i],n):r[i]=ge(e[i],n))})),r}function _e(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||be,n.isMergeableObject=n.isMergeableObject||ye,
|
|
154
183
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
155
184
|
// implementations can use it. The caller may not replace it.
|
|
156
|
-
n.cloneUnlessOtherwiseSpecified=
|
|
185
|
+
n.cloneUnlessOtherwiseSpecified=ge;var r=Array.isArray(e);return r===Array.isArray(t)?r?n.arrayMerge(t,e,n):we(t,e,n):ge(e,n)}_e.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return _e(t,n,e)}),{})};var Te=_e,xe=function(t,e){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},xe(t,e)};function Be(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}xe(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Ce,Ae,He,Se=function(){return Se=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Se.apply(this,arguments)};function Pe(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}
|
|
157
186
|
/**
|
|
158
187
|
* Type Guards
|
|
159
188
|
*/
|
|
160
|
-
function
|
|
189
|
+
function Ie(t){return t.type===Ae.literal}function Le(t){return t.type===Ae.argument}function $e(t){return t.type===Ae.number}function Me(t){return t.type===Ae.date}function Oe(t){return t.type===Ae.time}function Ne(t){return t.type===Ae.select}function De(t){return t.type===Ae.plural}function Re(t){return t.type===Ae.pound}function ke(t){return t.type===Ae.tag}function Ue(t){return!(!t||"object"!=typeof t||t.type!==He.number)}function Fe(t){return!(!t||"object"!=typeof t||t.type!==He.dateTime)}
|
|
161
190
|
// @generated from regex-gen.ts
|
|
162
191
|
!function(t){
|
|
163
192
|
/** Argument is unclosed (e.g. `{0`) */
|
|
@@ -219,7 +248,7 @@ t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
|
219
248
|
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
220
249
|
t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
221
250
|
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
222
|
-
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(
|
|
251
|
+
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Ce||(Ce={})),function(t){
|
|
223
252
|
/**
|
|
224
253
|
* Raw text
|
|
225
254
|
*/
|
|
@@ -256,7 +285,7 @@ t[t.pound=7]="pound",
|
|
|
256
285
|
/**
|
|
257
286
|
* XML-like tag
|
|
258
287
|
*/
|
|
259
|
-
t[t.tag=8]="tag"}(
|
|
288
|
+
t[t.tag=8]="tag"}(Ae||(Ae={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(He||(He={}));var Ge=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,je=/(?:[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;
|
|
260
289
|
/**
|
|
261
290
|
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
262
291
|
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
@@ -268,7 +297,7 @@ t[t.tag=8]="tag"}(Ie||(Ie={})),function(t){t[t.number=0]="number",t[t.dateTime=1
|
|
|
268
297
|
* @public
|
|
269
298
|
* @param skeleton skeleton string
|
|
270
299
|
*/
|
|
271
|
-
function
|
|
300
|
+
function ze(t){var e={};return t.replace(je,(function(t){var n=t.length;switch(t[0]){
|
|
272
301
|
// Era
|
|
273
302
|
case"G":e.era=4===n?"long":5===n?"narrow":"short";break;
|
|
274
303
|
// Year
|
|
@@ -302,33 +331,33 @@ case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
|
302
331
|
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
303
332
|
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
|
|
304
333
|
// @generated from regex-gen.ts
|
|
305
|
-
var
|
|
334
|
+
var Ve=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Xe=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,We=/^(@+)?(\+|#+)?[rs]?$/g,Ke=/(\*)(0+)|(#+)(0+)|(0+)/g,Ye=/^(0+)$/;function Ze(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(We,(function(t,n,r){
|
|
306
335
|
// @@@ case
|
|
307
|
-
return"string"!=typeof r?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):"+"===r?e.minimumSignificantDigits=n.length:"#"===n[0]?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),e}function
|
|
336
|
+
return"string"!=typeof r?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):"+"===r?e.minimumSignificantDigits=n.length:"#"===n[0]?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),e}function qe(t){switch(t){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 Je(t){
|
|
308
337
|
// Engineering
|
|
309
|
-
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if("+!"===n?(e.signDisplay="always",t=t.slice(2)):"+?"===n&&(e.signDisplay="exceptZero",t=t.slice(2)),!
|
|
338
|
+
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if("+!"===n?(e.signDisplay="always",t=t.slice(2)):"+?"===n&&(e.signDisplay="exceptZero",t=t.slice(2)),!Ye.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Qe(t){var e=qe(t);return e||{}}
|
|
310
339
|
/**
|
|
311
340
|
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
312
|
-
*/function
|
|
341
|
+
*/function tn(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Se(Se(Se({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return Se(Se({},t),Qe(e))}),{}));continue;case"engineering":e=Se(Se(Se({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return Se(Se({},t),Qe(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
|
|
313
342
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
314
343
|
case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;
|
|
315
344
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
316
|
-
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(
|
|
345
|
+
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ke,(function(t,n,r,i,o,s){if(n)e.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}
|
|
317
346
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
318
|
-
if(
|
|
347
|
+
if(Ye.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(Xe.test(i.stem)){
|
|
319
348
|
// Precision
|
|
320
349
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
321
350
|
// precision-integer case
|
|
322
|
-
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(
|
|
351
|
+
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Xe,(function(t,n,r,i,o,s){
|
|
323
352
|
// .000* case (before ICU67 it was .000+)
|
|
324
353
|
return"*"===r?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&s?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+s.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var o=i.options[0];
|
|
325
354
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
326
|
-
"w"===o?e=
|
|
355
|
+
"w"===o?e=Se(Se({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=Se(Se({},e),Ze(o)))}
|
|
327
356
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
328
|
-
else if(
|
|
357
|
+
else if(We.test(i.stem))e=Se(Se({},e),Ze(i.stem));else{var s=qe(i.stem);s&&(e=Se(Se({},e),s));var a=Je(i.stem);a&&(e=Se(Se({},e),a))}}return e}
|
|
329
358
|
// @generated from time-data-gen.ts
|
|
330
359
|
// prettier-ignore
|
|
331
|
-
var
|
|
360
|
+
var en,nn={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"]};
|
|
332
361
|
/**
|
|
333
362
|
* Returns the best matching date time pattern if a date time skeleton
|
|
334
363
|
* pattern is provided with a locale. Follows the Unicode specification:
|
|
@@ -341,7 +370,7 @@ var sn,an={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H
|
|
|
341
370
|
* of the given `locale` to the corresponding time pattern.
|
|
342
371
|
* @param locale
|
|
343
372
|
*/
|
|
344
|
-
function
|
|
373
|
+
function rn(t){var e=t.hourCycle;if(void 0===e&&
|
|
345
374
|
// @ts-ignore hourCycle(s) is not identified yet
|
|
346
375
|
t.hourCycles&&
|
|
347
376
|
// @ts-ignore
|
|
@@ -349,37 +378,37 @@ t.hourCycles.length&&(
|
|
|
349
378
|
// @ts-ignore
|
|
350
379
|
e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
351
380
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
352
|
-
var n,r=t.language;return"root"!==r&&(n=t.maximize().region),(
|
|
381
|
+
var n,r=t.language;return"root"!==r&&(n=t.maximize().region),(nn[n||""]||nn[r||""]||nn["".concat(r,"-001")]||nn["001"])[0]}var on=new RegExp("^".concat(Ge.source,"*")),sn=new RegExp("".concat(Ge.source,"*$"));function an(t,e){return{start:t,end:e}}
|
|
353
382
|
// #region Ponyfills
|
|
354
383
|
// Consolidate these variables up top for easier toggling during debugging
|
|
355
|
-
var
|
|
384
|
+
var ln=!!String.prototype.startsWith,cn=!!String.fromCodePoint,un=!!Object.fromEntries,hn=!!String.prototype.codePointAt,dn=!!String.prototype.trimStart,pn=!!String.prototype.trimEnd,fn=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},yn=!0;try{
|
|
356
385
|
/**
|
|
357
386
|
* legacy Edge or Xbox One browser
|
|
358
387
|
* Unicode flag support: supported
|
|
359
388
|
* Pattern_Syntax support: not supported
|
|
360
389
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
361
390
|
*/
|
|
362
|
-
|
|
391
|
+
yn="a"===(null===(en=Tn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===en?void 0:en[0])}catch(t){yn=!1}var mn,gn=ln?// Native
|
|
363
392
|
function(t,e,n){return t.startsWith(e,n)}:// For IE11
|
|
364
|
-
function(t,e,n){return t.slice(n,n+e.length)===e},
|
|
365
|
-
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n,r="",i=t.length,o=0;i>o;){if((n=t[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},
|
|
393
|
+
function(t,e,n){return t.slice(n,n+e.length)===e},bn=cn?String.fromCodePoint:// IE11
|
|
394
|
+
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n,r="",i=t.length,o=0;i>o;){if((n=t[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},vn=
|
|
366
395
|
// native
|
|
367
|
-
|
|
368
|
-
function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],s=i[1];e[o]=s}return e},
|
|
396
|
+
un?Object.fromEntries:// Ponyfill
|
|
397
|
+
function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],s=i[1];e[o]=s}return e},En=hn?// Native
|
|
369
398
|
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
370
|
-
function(t,e){var n=t.length;if(!(e<0||e>=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},
|
|
399
|
+
function(t,e){var n=t.length;if(!(e<0||e>=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},wn=dn?// Native
|
|
371
400
|
function(t){return t.trimStart()}:// Ponyfill
|
|
372
|
-
function(t){return t.replace(
|
|
401
|
+
function(t){return t.replace(on,"")},_n=pn?// Native
|
|
373
402
|
function(t){return t.trimEnd()}:// Ponyfill
|
|
374
|
-
function(t){return t.replace(
|
|
403
|
+
function(t){return t.replace(sn,"")};
|
|
375
404
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
376
|
-
function
|
|
405
|
+
function Tn(t,e){return new RegExp(t,e)}
|
|
377
406
|
// #endregion
|
|
378
|
-
if(
|
|
407
|
+
if(yn){
|
|
379
408
|
// Native
|
|
380
|
-
var
|
|
409
|
+
var xn=Tn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");mn=function(t,e){var n;return xn.lastIndex=e,null!==(n=xn.exec(t)[1])&&void 0!==n?n:""}}else
|
|
381
410
|
// IE11
|
|
382
|
-
|
|
411
|
+
mn=function(t,e){for(var n=[];;){var r=En(t,e);if(void 0===r||Hn(r)||Sn(r))break;n.push(r),e+=r>=65536?2:1}return bn.apply(void 0,n)};var Bn=/** @class */function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var r=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(t,n)).err)return o;r.push(o.val)}else{if(125/* `}` */===i&&t>0)break;if(35/* `#` */!==i||"plural"!==e&&"selectordinal"!==e){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Ce.UNMATCHED_CLOSING_TAG,an(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Cn(this.peek()||0)){if((o=this.parseTag(t,e)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(t,e)).err)return o;r.push(o.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:Ae.pound,location:an(s,this.clonePosition())})}}}return{val:r,err:null}},
|
|
383
412
|
/**
|
|
384
413
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
385
414
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -401,14 +430,14 @@ En=function(t,e){for(var n=[];;){var r=xn(t,e);if(void 0===r||Ln(r)||Mn(r))break
|
|
|
401
430
|
t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();// `<`
|
|
402
431
|
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
403
432
|
// Self closing tag
|
|
404
|
-
return{val:{type:
|
|
433
|
+
return{val:{type:Ae.literal,value:"<".concat(r,"/>"),location:an(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
|
405
434
|
// Expecting a close tag
|
|
406
|
-
if(this.bumpIf("</")){if(this.isEOF()||!
|
|
435
|
+
if(this.bumpIf("</")){if(this.isEOF()||!Cn(this.char()))return this.error(Ce.INVALID_TAG,an(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Ce.UNMATCHED_CLOSING_TAG,an(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ae.tag,value:r,children:o,location:an(n,this.clonePosition())},err:null}:this.error(Ce.INVALID_TAG,an(s,this.clonePosition())))}return this.error(Ce.UNCLOSED_TAG,an(n,this.clonePosition()))}return this.error(Ce.INVALID_TAG,an(n,this.clonePosition()))},
|
|
407
436
|
/**
|
|
408
437
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
409
438
|
*/
|
|
410
439
|
t.prototype.parseTagName=function(){var t=this.offset();// the first tag name character
|
|
411
|
-
for(this.bump();!this.isEOF()&&
|
|
440
|
+
for(this.bump();!this.isEOF()&&An(this.char());)this.bump();return this.message.slice(t,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(e);if(i)r+=i;else{var o=this.tryParseUnquoted(t,e);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=an(n,this.clonePosition());return{val:{type:Ae.literal,value:r,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Cn(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
|
|
412
441
|
/** See `parseTag` function docs. */},
|
|
413
442
|
/**
|
|
414
443
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
@@ -430,67 +459,67 @@ for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'
|
|
|
430
459
|
// Optional closing apostrophe.
|
|
431
460
|
this.bump();break}e.push(39),
|
|
432
461
|
// Bump one more time because we need to skip 2 characters.
|
|
433
|
-
this.bump()}else e.push(n);this.bump()}return
|
|
434
|
-
this.bumpSpace(),this.isEOF())return this.error(
|
|
462
|
+
this.bump()}else e.push(n);this.bump()}return bn.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===e||"selectordinal"===e)||125/* `}` */===n&&t>0?null:(this.bump(),bn(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),// `{`
|
|
463
|
+
this.bumpSpace(),this.isEOF())return this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,an(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Ce.EMPTY_ARGUMENT,an(n,this.clonePosition()));
|
|
435
464
|
// argument name
|
|
436
|
-
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(
|
|
465
|
+
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Ce.MALFORMED_ARGUMENT,an(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,an(n,this.clonePosition()));switch(this.char()){
|
|
437
466
|
// Simple argument: `{name}`
|
|
438
467
|
case 125/* `}` */:// `}`
|
|
439
|
-
return this.bump(),{val:{type:
|
|
468
|
+
return this.bump(),{val:{type:Ae.argument,
|
|
440
469
|
// value does not include the opening and closing braces.
|
|
441
|
-
value:r,location:
|
|
470
|
+
value:r,location:an(n,this.clonePosition())},err:null};
|
|
442
471
|
// Argument with options: `{name, format, ...}`
|
|
443
472
|
case 44/* `,` */:return this.bump(),// `,`
|
|
444
|
-
this.bumpSpace(),this.isEOF()?this.error(
|
|
473
|
+
this.bumpSpace(),this.isEOF()?this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,an(n,this.clonePosition())):this.parseArgumentOptions(t,e,r,n);default:return this.error(Ce.MALFORMED_ARGUMENT,an(n,this.clonePosition()))}},
|
|
445
474
|
/**
|
|
446
475
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
447
476
|
* an identifier character. Return an empty string otherwise.
|
|
448
477
|
*/
|
|
449
|
-
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=
|
|
478
|
+
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=mn(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:an(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
450
479
|
// Parse this range:
|
|
451
480
|
// {name, type, style}
|
|
452
481
|
// ^---^
|
|
453
482
|
switch(s){case"":
|
|
454
483
|
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
455
|
-
return this.error(
|
|
484
|
+
return this.error(Ce.EXPECT_ARGUMENT_TYPE,an(o,a));case"number":case"date":case"time":
|
|
456
485
|
// Parse this range:
|
|
457
486
|
// {name, number, style}
|
|
458
487
|
// ^-------^
|
|
459
|
-
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(p=
|
|
488
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(p=_n(g.val)).length)return this.error(Ce.EXPECT_ARGUMENT_STYLE,an(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:an(c,this.clonePosition())}}if((b=this.tryParseArgumentClose(r)).err)return b;var u=an(r,this.clonePosition());
|
|
460
489
|
// Extract style or skeleton
|
|
461
|
-
if(l&&
|
|
490
|
+
if(l&&gn(null==l?void 0:l.style,"::",0)){
|
|
462
491
|
// Skeleton starts with `::`.
|
|
463
|
-
var h=
|
|
492
|
+
var h=wn(l.style.slice(2));if("number"===s)return(g=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?g:{val:{type:Ae.number,value:n,location:u,style:g.val},err:null};if(0===h.length)return this.error(Ce.EXPECT_DATE_TIME_SKELETON,u);var d=h;
|
|
464
493
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
465
494
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
466
495
|
// for unsupported patterns.
|
|
467
|
-
this.locale&&(d=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t.charAt(r);if("j"===i){for(var o=0;r+1<t.length&&t.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=
|
|
496
|
+
this.locale&&(d=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t.charAt(r);if("j"===i){for(var o=0;r+1<t.length&&t.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),l=rn(e);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 p={type:He.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ze(d):{}};return{val:{type:"date"===s?Ae.date:Ae.time,value:n,location:u,style:p},err:null}}
|
|
468
497
|
// Regular style or no style.
|
|
469
|
-
return{val:{type:"number"===s?
|
|
498
|
+
return{val:{type:"number"===s?Ae.number:"date"===s?Ae.date:Ae.time,value:n,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
|
470
499
|
// Parse this range:
|
|
471
500
|
// {name, plural, options}
|
|
472
501
|
// ^---------^
|
|
473
|
-
var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(
|
|
502
|
+
var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ce.EXPECT_SELECT_ARGUMENT_OPTIONS,an(f,Se({},f)));this.bumpSpace();
|
|
474
503
|
// Parse offset:
|
|
475
504
|
// {name, plural, offset:1, options}
|
|
476
505
|
// ^-----^
|
|
477
506
|
// or the first option:
|
|
478
507
|
// {name, plural, one {...} other {...}}
|
|
479
508
|
// ^--^
|
|
480
|
-
var y=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(
|
|
509
|
+
var y=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(Ce.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,an(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(Ce.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ce.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return g;
|
|
481
510
|
// Parse another identifier for option parsing
|
|
482
|
-
this.bumpSpace(),y=this.parseIdentifierIfPossible(),m=g.val}var b,v=this.tryParsePluralOrSelectOptions(t,s,e,y);if(v.err)return v;if((b=this.tryParseArgumentClose(r)).err)return b;var E=
|
|
511
|
+
this.bumpSpace(),y=this.parseIdentifierIfPossible(),m=g.val}var b,v=this.tryParsePluralOrSelectOptions(t,s,e,y);if(v.err)return v;if((b=this.tryParseArgumentClose(r)).err)return b;var E=an(r,this.clonePosition());return"select"===s?{val:{type:Ae.select,value:n,options:vn(v.val),location:E},err:null}:{val:{type:Ae.plural,value:n,options:vn(v.val),offset:m,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(Ce.INVALID_ARGUMENT_TYPE,an(o,a))}},t.prototype.tryParseArgumentClose=function(t){
|
|
483
512
|
// Parse: {value, number, ::currency/GBP }
|
|
484
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(
|
|
513
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(Ce.EXPECT_ARGUMENT_CLOSING_BRACE,an(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
485
514
|
/**
|
|
486
515
|
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
487
516
|
*/
|
|
488
517
|
t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
489
518
|
// Treat apostrophe as quoting but include it in the style part.
|
|
490
519
|
// Find the end of the quoted literal text.
|
|
491
|
-
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(
|
|
520
|
+
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ce.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,an(n,this.clonePosition()));this.bump();break;case 123/* `{` */:t+=1,this.bump();break;case 125/* `}` */:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");
|
|
492
521
|
// Parse the skeleton
|
|
493
|
-
for(var e=t.split(
|
|
522
|
+
for(var e=t.split(Ve).filter((function(t){return t.length>0})),n=[],r=0,i=e;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,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(t)}catch(t){return this.error(Ce.INVALID_NUMBER_SKELETON,e)}return{val:{type:He.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?tn(n):{}},err:null}},
|
|
494
523
|
/**
|
|
495
524
|
* @param nesting_level The current nesting level of messages.
|
|
496
525
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -507,24 +536,24 @@ t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,r){
|
|
|
507
536
|
// ^--^
|
|
508
537
|
for(var i,o=!1,s=[],a=new Set,l=r.value,c=r.location;;){if(0===l.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
|
|
509
538
|
// Try parse `={number}` selector
|
|
510
|
-
var h=this.tryParseDecimalInteger(
|
|
539
|
+
var h=this.tryParseDecimalInteger(Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ce.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=an(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
|
|
511
540
|
// Duplicate selector clauses
|
|
512
|
-
if(a.has(l))return this.error("select"===e?
|
|
541
|
+
if(a.has(l))return this.error("select"===e?Ce.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ce.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(o=!0),
|
|
513
542
|
// Parse:
|
|
514
543
|
// one {one apple}
|
|
515
544
|
// ^----------^
|
|
516
|
-
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?
|
|
545
|
+
this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?Ce.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,an(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,e,n);if(p.err)return p;var f=this.tryParseArgumentClose(d);if(f.err)return f;s.push([l,{value:p.val,location:an(d,this.clonePosition())}]),
|
|
517
546
|
// Keep track of the existing selectors
|
|
518
547
|
a.add(l),
|
|
519
548
|
// Prep next selector clause.
|
|
520
|
-
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===e?
|
|
549
|
+
this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===s.length?this.error("select"===e?Ce.EXPECT_SELECT_ARGUMENT_SELECTOR:Ce.EXPECT_PLURAL_ARGUMENT_SELECTOR,an(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Ce.MISSING_OTHER_CLAUSE,an(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){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=an(r,this.clonePosition());return i?fn(o*=n)?{val:o,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){
|
|
521
550
|
// This is much faster than `Object.assign` or spread.
|
|
522
551
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
523
552
|
/**
|
|
524
553
|
* Return the code point at the current position of the parser.
|
|
525
554
|
* Throws if the index is out of bound.
|
|
526
555
|
*/
|
|
527
|
-
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=
|
|
556
|
+
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=En(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},
|
|
528
557
|
/** Bump the parser to the next UTF-16 code unit. */
|
|
529
558
|
t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10/* '\n' */===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
|
530
559
|
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
@@ -535,7 +564,7 @@ this.position.offset+=t<65536?1:2)}},
|
|
|
535
564
|
* following the prefix and return true. Otherwise, don't bump the parser
|
|
536
565
|
* and return false.
|
|
537
566
|
*/
|
|
538
|
-
t.prototype.bumpIf=function(t){if(
|
|
567
|
+
t.prototype.bumpIf=function(t){if(gn(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
|
|
539
568
|
/**
|
|
540
569
|
* Bump the parser until the pattern character is found and return `true`.
|
|
541
570
|
* Otherwise bump to the end of the file and return `false`.
|
|
@@ -547,7 +576,7 @@ t.prototype.bumpUntil=function(t){var e=this.offset(),n=this.message.indexOf(t,e
|
|
|
547
576
|
*/
|
|
548
577
|
t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
549
578
|
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
550
|
-
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&
|
|
579
|
+
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Hn(this.char());)this.bump()},
|
|
551
580
|
/**
|
|
552
581
|
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
553
582
|
* If the input has been exhausted, then this returns null.
|
|
@@ -557,160 +586,149 @@ t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this
|
|
|
557
586
|
* This check if codepoint is alphabet (lower & uppercase)
|
|
558
587
|
* @param codepoint
|
|
559
588
|
* @returns
|
|
560
|
-
*/function
|
|
589
|
+
*/function Cn(t){return t>=97&&t<=122||t>=65&&t<=90}function An(t){return 45/* '-' */===t||46/* '.' */===t||t>=48&&t<=57/* 0..9 */||95/* '_' */===t||t>=97&&t<=122/** a..z */||t>=65&&t<=90/* A..Z */||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}
|
|
561
590
|
/**
|
|
562
591
|
* Code point equivalent of regex `\p{White_Space}`.
|
|
563
592
|
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
564
|
-
*/function
|
|
593
|
+
*/function Hn(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
|
|
565
594
|
/**
|
|
566
595
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
567
596
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
568
|
-
*/function
|
|
597
|
+
*/function Sn(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function Pn(t){t.forEach((function(t){if(delete t.location,Ne(t)||De(t))for(var e in t.options)delete t.options[e].location,Pn(t.options[e].value);else $e(t)&&Ue(t.style)||(Me(t)||Oe(t))&&Fe(t.style)?delete t.style.location:ke(t)&&Pn(t.children)}))}function In(t,e){void 0===e&&(e={}),e=Se({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Bn(t,e).parse();if(n.err){var r=SyntaxError(Ce[n.err.kind]);
|
|
569
598
|
// @ts-expect-error Assign to error object
|
|
570
599
|
throw r.location=n.err.location,
|
|
571
600
|
// @ts-expect-error Assign to error object
|
|
572
|
-
r.originalMessage=n.err.message,r}return(null==e?void 0:e.captureLocation)
|
|
601
|
+
r.originalMessage=n.err.message,r}return(null==e?void 0:e.captureLocation)||Pn(n.val),n.val}
|
|
573
602
|
|
|
574
603
|
// Main
|
|
575
604
|
|
|
576
|
-
function
|
|
605
|
+
function Ln(t,e){var n=e&&e.cache?e.cache:Un,r=e&&e.serializer?e.serializer:Dn;return(e&&e.strategy?e.strategy:Nn)(t,{cache:n,serializer:r})}
|
|
577
606
|
|
|
578
607
|
// Strategy
|
|
579
608
|
|
|
580
|
-
function
|
|
609
|
+
function $n(t,e,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=e.get(o);return void 0===s&&(s=t.call(this,r),e.set(o,s)),s}function Mn(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);return void 0===o&&(o=t.apply(this,r),e.set(i,o)),o}function On(t,e,n,r,i){return n.bind(e,t,r,i)}function Nn(t,e){return On(t,this,1===t.length?$n:Mn,e.cache.create(),e.serializer)}
|
|
581
610
|
// Serializer
|
|
582
|
-
var
|
|
611
|
+
var Dn=function(){return JSON.stringify(arguments)};
|
|
583
612
|
|
|
584
613
|
// Cache
|
|
585
614
|
|
|
586
|
-
function
|
|
615
|
+
function Rn(){this.cache=Object.create(null)}Rn.prototype.get=function(t){return this.cache[t]},Rn.prototype.set=function(t,e){this.cache[t]=e};var kn,Un={create:function(){
|
|
587
616
|
// @ts-ignore
|
|
588
|
-
return new
|
|
617
|
+
return new Rn}},Fn={variadic:function(t,e){return On(t,this,Mn,e.cache.create(),e.serializer)},monadic:function(t,e){return On(t,this,$n,e.cache.create(),e.serializer)}};!function(t){
|
|
589
618
|
// When we have a placeholder but no value to format
|
|
590
619
|
t.MISSING_VALUE="MISSING_VALUE",
|
|
591
620
|
// When value supplied is invalid
|
|
592
621
|
t.INVALID_VALUE="INVALID_VALUE",
|
|
593
622
|
// When we need specific Intl API but it's not available
|
|
594
|
-
t.MISSING_INTL_API="MISSING_INTL_API"}(
|
|
623
|
+
t.MISSING_INTL_API="MISSING_INTL_API"}(kn||(kn={}));var Gn,jn=/** @class */function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return Be(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),zn=/** @class */function(t){function e(e,n,r,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),kn.INVALID_VALUE,i)||this}return Be(e,t),e}(jn),Vn=/** @class */function(t){function e(e,n,r){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),kn.INVALID_VALUE,r)||this}return Be(e,t),e}(jn),Xn=/** @class */function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),kn.MISSING_VALUE,n)||this}return Be(e,t),e}(jn);function Wn(t){return"function"==typeof t}
|
|
595
624
|
// TODO(skeleton): add skeleton support
|
|
596
|
-
function
|
|
625
|
+
function Kn(t,e,n,r,i,o,
|
|
597
626
|
// For debugging
|
|
598
627
|
s){
|
|
599
628
|
// Hot path for straight simple msg translations
|
|
600
|
-
if(1===t.length&&
|
|
629
|
+
if(1===t.length&&Ie(t[0]))return[{type:Gn.literal,value:t[0].value}];for(var a=[],l=0,c=t;l<c.length;l++){var u=c[l];
|
|
601
630
|
// Exit early for string parts.
|
|
602
|
-
if(
|
|
631
|
+
if(Ie(u))a.push({type:Gn.literal,value:u.value});else
|
|
603
632
|
// TODO: should this part be literal type?
|
|
604
633
|
// Replace `#` in plural rules with the actual numeric value.
|
|
605
|
-
if(
|
|
634
|
+
if(Re(u))"number"==typeof o&&a.push({type:Gn.literal,value:n.getNumberFormat(e).format(o)});else{var h=u.value;
|
|
606
635
|
// Enforce that all required values are provided by the caller.
|
|
607
|
-
if(!i||!(h in i))throw new
|
|
636
|
+
if(!i||!(h in i))throw new Xn(h,s);var d=i[h];if(Le(u))d&&"string"!=typeof d&&"number"!=typeof d||(d="string"==typeof d||"number"==typeof d?String(d):""),a.push({type:"string"==typeof d?Gn.literal:Gn.object,value:d});else
|
|
608
637
|
// Recursively format plural and select parts' option — which can be a
|
|
609
638
|
// nested pattern structure. The choosing of the option to use is
|
|
610
639
|
// abstracted-by and delegated-to the part helper object.
|
|
611
|
-
if(
|
|
640
|
+
if(Me(u)){var p="string"==typeof u.style?r.date[u.style]:Fe(u.style)?u.style.parsedOptions:void 0;a.push({type:Gn.literal,value:n.getDateTimeFormat(e,p).format(d)})}else if(Oe(u)){p="string"==typeof u.style?r.time[u.style]:Fe(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Gn.literal,value:n.getDateTimeFormat(e,p).format(d)})}else if($e(u)){(p="string"==typeof u.style?r.number[u.style]:Ue(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(d*=p.scale||1),a.push({type:Gn.literal,value:n.getNumberFormat(e,p).format(d)})}else{if(ke(u)){var f=u.children,y=u.value,m=i[y];if(!Wn(m))throw new Vn(y,"function",s);var g=m(Kn(f,e,n,r,i,o).map((function(t){return t.value})));Array.isArray(g)||(g=[g]),a.push.apply(a,g.map((function(t){return{type:"string"==typeof t?Gn.literal:Gn.object,value:t}})))}if(Ne(u)){if(!(b=u.options[d]||u.options.other))throw new zn(u.value,d,Object.keys(u.options),s);a.push.apply(a,Kn(b.value,e,n,r,i))}else if(De(u)){var b;if(!(b=u.options["=".concat(d)])){if(!Intl.PluralRules)throw new jn('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',kn.MISSING_INTL_API,s);var v=n.getPluralRules(e,{type:u.pluralType}).select(d-(u.offset||0));b=u.options[v]||u.options.other}if(!b)throw new zn(u.value,d,Object.keys(u.options),s);a.push.apply(a,Kn(b.value,e,n,r,i,d-(u.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var n=t[t.length-1];return n&&n.type===Gn.literal&&e.type===Gn.literal?n.value+=e.value:t.push(e),t}),[])}(a)}
|
|
612
641
|
/*
|
|
613
642
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
614
643
|
Copyrights licensed under the New BSD License.
|
|
615
644
|
See the accompanying LICENSE file for terms.
|
|
616
645
|
*/
|
|
617
646
|
// -- MessageFormat --------------------------------------------------------
|
|
618
|
-
function
|
|
647
|
+
function Yn(t,e){return e?Object.keys(t).reduce((function(n,r){var i,o;return n[r]=(i=t[r],(o=e[r])?Se(Se(Se({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=Se(Se({},i[e]),o[e]||{}),t}),{})):i),n}),Se({},t)):t}function Zn(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(Gn||(Gn={}));var qn=/** @class */function(){function t(e,n,r,i){var o,s=this;if(void 0===n&&(n=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=s.formatToParts(t);
|
|
619
648
|
// Hot path for straight simple msg translations
|
|
620
|
-
if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===
|
|
649
|
+
if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===Gn.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(t){return Kn(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
|
621
650
|
// Defined first because it's used to build the format pattern.
|
|
622
651
|
this.locales=n,this.resolvedLocale=t.resolveLocale(n),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
623
652
|
// Parse string messages into an AST.
|
|
624
653
|
this.ast=t.__parse(e,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
625
654
|
// Creates a new object with the specified `formats` merged with the default
|
|
626
655
|
// formats.
|
|
627
|
-
this.formats=
|
|
656
|
+
this.formats=Yn(t.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ln((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Pe([void 0],e,!1)))}),{cache:Zn(o.number),strategy:Fn.variadic}),getDateTimeFormat:Ln((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Pe([void 0],e,!1)))}),{cache:Zn(o.dateTime),strategy:Fn.variadic}),getPluralRules:Ln((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Pe([void 0],e,!1)))}),{cache:Zn(o.pluralRules),strategy:Fn.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=In,
|
|
628
657
|
// Default format options used as the prototype of the `formats` provided to the
|
|
629
658
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
630
659
|
// and Intl.DateTimeFormat instances.
|
|
631
|
-
t.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"}}},t}(),
|
|
660
|
+
t.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"}}},t}(),Jn=qn;
|
|
632
661
|
/*
|
|
633
662
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
634
663
|
Copyrights licensed under the New BSD License.
|
|
635
664
|
See the accompanying LICENSE file for terms.
|
|
636
|
-
*/const
|
|
637
|
-
/*! *****************************************************************************
|
|
638
|
-
Copyright (c) Microsoft Corporation.
|
|
639
|
-
|
|
640
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
641
|
-
purpose with or without fee is hereby granted.
|
|
642
|
-
|
|
643
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
644
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
645
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
646
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
647
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
648
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
649
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
650
|
-
***************************************************************************** */function mr(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}const gr={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 br(){return gr}const vr=ge(!1);let Er;const wr=ge(null);function Tr(t){return t.split("-").map(((t,e,n)=>n.slice(0,e+1).join("-"))).reverse()}function _r(t,e=br().fallbackLocale){const n=Tr(t);return e?[...new Set([...n,...Tr(e)])]:n}function xr(){return null!=Er?Er:void 0}wr.subscribe((t=>{Er=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const Br=Object.assign(Object.assign({},wr),{set:t=>{if(t&&function(t){if(null==t)return;const e=_r(t);for(let t=0;t<e.length;t++){const n=e[t];if(lr(n))return n}}(t)&&dr(t)){const{loadingDelay:e}=br();let n;return"undefined"!=typeof window&&null!=xr()&&e?n=window.setTimeout((()=>vr.set(!0)),e):vr.set(!0),yr(t).then((()=>{wr.set(t)})).finally((()=>{clearTimeout(n),vr.set(!1)}))}return wr.set(t)}}),Cr=t=>{const e=Object.create(null);return n=>{const r=JSON.stringify(n);return r in e?e[r]:e[r]=t(n)}},Ar=(t,e)=>{const{formats:n}=br();if(t in n&&e in n[t])return n[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},Hr=Cr((t=>{var{locale:e,format:n}=t,r=mr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=Ar("number",n)),new Intl.NumberFormat(e,r)})),Sr=Cr((t=>{var{locale:e,format:n}=t,r=mr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=Ar("date",n):0===Object.keys(r).length&&(r=Ar("date","short")),new Intl.DateTimeFormat(e,r)})),Pr=Cr((t=>{var{locale:e,format:n}=t,r=mr(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=Ar("time",n):0===Object.keys(r).length&&(r=Ar("time","short")),new Intl.DateTimeFormat(e,r)})),Ir=Cr(((t,e=xr())=>new nr(t,e,br().formats,{ignoreTag:br().ignoreTag}))),Lr=(t,e={})=>{var n,r,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=xr(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=or(t,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(o=null!==(i=null===(r=(n=br()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:t,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==o?o:t;if(!a)return u;let h=u;try{h=Ir(u,l).format(a)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},Mr=(t,e)=>((t={})=>{var{locale:e=xr()}=t,n=mr(t,["locale"]);return Pr(Object.assign({locale:e},n))})(e).format(t),$r=(t,e)=>((t={})=>{var{locale:e=xr()}=t,n=mr(t,["locale"]);return Sr(Object.assign({locale:e},n))})(e).format(t),Or=(t,e)=>((t={})=>{var{locale:e=xr()}=t,n=mr(t,["locale"]);return Hr(Object.assign({locale:e},n))})(e).format(t),Rr=(t,e=xr())=>or(t,e);be([Br,ar],(()=>Lr)),be([Br],(()=>Mr)),be([Br],(()=>$r)),be([Br],(()=>Or)),be([Br,ar],(()=>Rr)),window.emWidgets={topic:(t,e=0)=>{if(-1==fe.indexOf(t)){let n=new pe(e);ye[t]=n,fe.push(t)}return ye[t]}};
|
|
665
|
+
*/const Qn={},tr=(t,e,n)=>n?(e in Qn||(Qn[e]={}),t in Qn[e]||(Qn[e][t]=n),n):n,er=(t,e)=>{if(null==e)return;if(e in Qn&&t in Qn[e])return Qn[e][t];const n=br(e);for(let r=0;r<n.length;r++){const i=or(n[r],t);if(i)return tr(t,e,i)}};let nr;const rr=pe({});function ir(t){return t in nr}function or(t,e){if(!ir(t))return null;const n=function(t){return nr[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const n=e.split(".");let r=t;for(let t=0;t<n.length;t++)if("object"==typeof r){if(t>0){const e=n.slice(t,n.length).join(".");if(e in r){r=r[e];break}}r=r[n[t]]}else r=void 0;return r}(n,e)}fe([rr],(([t])=>Object.keys(t))),rr.subscribe((t=>nr=t));const sr={};function ar(t){return sr[t]}function lr(t){return null!=t&&br(t).some((t=>{var e;return null===(e=ar(t))||void 0===e?void 0:e.size}))}function cr(t,e){const n=Promise.all(e.map((e=>(function(t,e){sr[t].delete(e),0===sr[t].size&&delete sr[t]}(t,e),e().then((t=>t.default||t))))));return n.then((e=>function(t,...e){delete Qn[t],rr.update((n=>(n[t]=Te.all([n[t]||{},...e]),n)))}(t,...e)))}const ur={};function hr(t){if(!lr(t))return t in ur?ur[t]:Promise.resolve();const e=function(t){return br(t).map((t=>{const e=ar(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return ur[t]=Promise.all(e.map((([t,e])=>cr(t,e)))).then((()=>{if(lr(t))return hr(t);delete ur[t]})),ur[t]}const dr={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 pr(){return dr}const fr=pe(!1);let yr;const mr=pe(null);function gr(t){return t.split("-").map(((t,e,n)=>n.slice(0,e+1).join("-"))).reverse()}function br(t,e=pr().fallbackLocale){const n=gr(t);return e?[...new Set([...n,...gr(e)])]:n}function vr(){return null!=yr?yr:void 0}mr.subscribe((t=>{yr=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const Er={...mr,set:t=>{if(t&&function(t){if(null==t)return;const e=br(t);for(let t=0;t<e.length;t++){const n=e[t];if(ir(n))return n}}(t)&&lr(t)){const{loadingDelay:e}=pr();let n;return"undefined"!=typeof window&&null!=vr()&&e?n=window.setTimeout((()=>fr.set(!0)),e):fr.set(!0),hr(t).then((()=>{mr.set(t)})).finally((()=>{clearTimeout(n),fr.set(!1)}))}return mr.set(t)}},wr=t=>{const e=Object.create(null);return n=>{const r=JSON.stringify(n);return r in e?e[r]:e[r]=t(n)}},_r=(t,e)=>{const{formats:n}=pr();if(t in n&&e in n[t])return n[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},Tr=wr((({locale:t,format:e,...n})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return e&&(n=_r("number",e)),new Intl.NumberFormat(t,n)})),xr=wr((({locale:t,format:e,...n})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return e?n=_r("date",e):0===Object.keys(n).length&&(n=_r("date","short")),new Intl.DateTimeFormat(t,n)})),Br=wr((({locale:t,format:e,...n})=>{if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return e?n=_r("time",e):0===Object.keys(n).length&&(n=_r("time","short")),new Intl.DateTimeFormat(t,n)})),Cr=wr(((t,e=vr())=>new Jn(t,e,pr().formats,{ignoreTag:pr().ignoreTag}))),Ar=(t,e={})=>{var n,r,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=vr(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=er(t,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(o=null!==(i=null===(r=(n=pr()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:t,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==o?o:t;if(!a)return u;let h=u;try{h=Cr(u,l).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},Hr=(t,e)=>(({locale:t=vr(),...e}={})=>Br({locale:t,...e}))(e).format(t),Sr=(t,e)=>(({locale:t=vr(),...e}={})=>xr({locale:t,...e}))(e).format(t),Pr=(t,e)=>(({locale:t=vr(),...e}={})=>Tr({locale:t,...e}))(e).format(t),Ir=(t,e=vr())=>er(t,e);fe([Er,rr],(()=>Ar)),fe([Er],(()=>Hr)),fe([Er],(()=>Sr)),fe([Er],(()=>Pr)),fe([Er,rr],(()=>Ir)),window.emWidgets={topic:(t,e=0)=>{if(-1==ue.indexOf(t)){let n=new ce(e);he[t]=n,ue.push(t)}return he[t]}};
|
|
651
666
|
/**
|
|
652
667
|
* @name isMobile
|
|
653
668
|
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
654
669
|
* @param {String} userAgent window.navigator.userAgent
|
|
655
670
|
* @returns {Boolean} true or false
|
|
656
671
|
*/
|
|
657
|
-
const
|
|
658
|
-
/* ../casino-modal/src/CasinoModal.svelte generated by Svelte v3.
|
|
659
|
-
/*div1_binding*/t[17](n),l=function(t,e){"static"===getComputedStyle(t).position&&(t.style.position="relative");const n=E("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const r=I();let i;return r?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=B(window,"message",(t=>{t.source===n.contentWindow&&e()}))):(n.src="about:blank",n.onload=()=>{i=B(n.contentWindow,"resize",e)
|
|
660
|
-
|
|
672
|
+
const Lr=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));function $r(t,{delay:n=0,duration:r=400,easing:i=e}={}){const o=+getComputedStyle(t).opacity;return{delay:n,duration:r,easing:i,css:t=>"opacity: "+t*o}}
|
|
673
|
+
/* ../casino-modal/src/CasinoModal.svelte generated by Svelte v3.58.0 */function Mr(t){let e,n,r,i,o,s,a,l,c,u,h,d;return{c(){e=E("div"),n=E("div"),r=E("div"),r.innerHTML="<slot></slot>",i=T(),o=E("span"),s=E("slot"),s.innerHTML='<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',C(r,"class","ModalContainer"),C(r,"part","ModalContainer"),C(s,"name","close"),C(o,"class",a="ModalCloseBtn "+(/*haspanicbutton*/"true"==t[1]&&/*mobileView*/t[3]?"ModalPanicCloseButton":"")),C(o,"part","ModalCloseBtn"),C(o,"role","button"),C(n,"class","ModalWindow"),C(n,"part","ModalWindow"),C(n,"id","Modal"),X((()=>/*div1_elementresize_handler*/t[18].call(n))),C(e,"part","CustomStylingContainer")},m(a,c){g(a,e,c),f(e,n),f(n,r),f(n,i),f(n,o),f(o,s),
|
|
674
|
+
/*div1_binding*/t[17](n),l=function(t,e){"static"===getComputedStyle(t).position&&(t.style.position="relative");const n=E("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const r=I();let i;return r?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=B(window,"message",(t=>{t.source===n.contentWindow&&e()}))):(n.src="about:blank",n.onload=()=>{i=B(n.contentWindow,"resize",e),
|
|
675
|
+
// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)
|
|
676
|
+
// see https://github.com/sveltejs/svelte/issues/4233
|
|
677
|
+
e()}),f(t,n),()=>{(r||i&&n.contentWindow)&&i(),b(n)}}(n,/*div1_elementresize_handler*/t[18].bind(n)),
|
|
678
|
+
/*div2_binding*/t[19](e),u=!0,h||(d=B(o,"click",/*close*/t[8]),h=!0)},p(e,n){t=e,(!u||/*haspanicbutton, mobileView*/10&n&&a!==(a="ModalCloseBtn "+(/*haspanicbutton*/"true"==t[1]&&/*mobileView*/t[3]?"ModalPanicCloseButton":"")))&&C(o,"class",a)},i(e){u||(X((()=>{u&&(c||(c=it(n,$r,{transitionDuration:/*duration*/t[0]},!0)),c.run(1))})),u=!0)},o(e){c||(c=it(n,$r,{transitionDuration:/*duration*/t[0]},!1)),c.run(0),u=!1},d(n){n&&b(e)
|
|
661
679
|
/*div1_binding*/,t[17](null),l(),n&&c&&c.end()
|
|
662
|
-
/*div2_binding*/,t[19](null),h=!1,d()}}}function
|
|
663
|
-
/* ../casino-calendar-daily-details/src/CasinoCalendarDailyDetails.svelte generated by Svelte v3.
|
|
664
|
-
function
|
|
680
|
+
/*div2_binding*/,t[19](null),h=!1,d()}}}function Or(e){let n,r,o=/*show*/e[7]&&Mr(e);return{c(){o&&o.c(),n=x(),this.c=t},m(t,e){o&&o.m(t,e),g(t,n,e),r=!0},p(t,[e]){/*show*/t[7]?o?(o.p(t,e),/*show*/128&e&&et(o,1)):(o=Mr(t),o.c(),et(o,1),o.m(n.parentNode,n)):o&&(tt={r:0,c:[],p:tt},nt(o,1,1,(()=>{o=null})),tt.r||i(tt.c),tt=tt.p)},i(t){r||(et(o),r=!0)},o(t){nt(o),r=!1},d(t){o&&o.d(t),t&&b(n)}}}function Nr(t,e,n){let r,i,o,s,{duration:a=350}=e,{session:l=""}=e,{userid:c=""}=e,{clientstyling:u=""}=e,{clientstylingurl:h=""}=e,{endpoint:d=""}=e,{haspanicbutton:p="false"}=e,{gamepagemodalurl:f="false"}=e,{sessioncheck:y="true"}=e,{integratedgameframedesktop:m="false"}=e,g=window.navigator.userAgent,b=!1,v=!1,E=!1;const w=t=>{if("ModalClosed"==t.data.type&&("false"!=m||Lr(g))&&n(7,E=!1),"ShowGameModal"===t.data.type&&(n(7,E=!0),window.postMessage({type:"GameLaunchID",gameId:t.data.gameId},window.location.href),window.postMessage({type:"DisableScroll"},window.location.href)),"OpenGameFrameModal"===t.data.type&&(n(7,E=!0),window.postMessage({type:"LaunchGameFrame",gameId:t.data.gameId,gameFunMode:t.data.gamefunmode},window.location.href),window.postMessage({type:"DisableScroll"},window.location.href)),"RequestModalSize"===t.data.type){let t={modalWidth:r?getComputedStyle(r).width:null,modalHeight:r?getComputedStyle(r).height:null};window.postMessage({type:"ModalSize",modalContainerSize:t},window.location.href)}"GameStateOnResize"===t.data.type&&(v=t.data.detailsObtained),"OpenCalendarModal"===t.data.type&&(n(7,E=!0),window.postMessage({type:"DisableScroll"},window.location.href))},_=t=>{if(v){let t={modalWidth:getComputedStyle(r).width,modalHeight:getComputedStyle(r).height};window.postMessage({type:"ModalSize",modalContainerSize:t},window.location.href)}},T=()=>{"true"==y&&function(t,e){return new Promise(((n,r)=>{let i=new Headers;i.append("X-SessionID",e),St(`${t}/player/session/player`,{method:"GET",headers:i}).then((t=>t.json())).then((t=>n(t))).catch((t=>r(t)))}))}(d,l).then((t=>{t.Guid,t.UserID}),(t=>{console.error("err on session",t)}))};return k((()=>(n(3,b=Lr(g)),window.addEventListener("message",w,!1),window.addEventListener("resize",_,!1),()=>{window.removeEventListener("message",w),window.removeEventListener("resize",w)}))),t.$$set=t=>{"duration"in t&&n(0,a=t.duration),"session"in t&&n(9,l=t.session),"userid"in t&&n(10,c=t.userid),"clientstyling"in t&&n(11,u=t.clientstyling),"clientstylingurl"in t&&n(12,h=t.clientstylingurl),"endpoint"in t&&n(13,d=t.endpoint),"haspanicbutton"in t&&n(1,p=t.haspanicbutton),"gamepagemodalurl"in t&&n(14,f=t.gamepagemodalurl),"sessioncheck"in t&&n(15,y=t.sessioncheck),"integratedgameframedesktop"in t&&n(16,m=t.integratedgameframedesktop)},t.$$.update=()=>{/*session, userid, endpoint*/9728&t.$$.dirty&&l&&c&&d&&T(),/*clientstyling, customStylingContainer*/2052&t.$$.dirty&&u&&i&&(()=>{let t=document.createElement("style");t.innerHTML=u,i.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/4100&t.$$.dirty&&h&&i&&(()=>{let t=new URL(h),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e)}),1)}))})()},[a,p,i,b,r,o,s,E,()=>{n(7,E=!1),n(3,b=Lr(g)),window.postMessage({type:"ModalClosed",gamepagemodalurl:f,mobileView:b},window.location.href)},l,c,u,h,d,f,y,m,function(t){F[t?"unshift":"push"]((()=>{r=t,n(4,r)}))},function(){o=this.clientWidth,s=this.clientHeight,n(5,o),n(6,s)},function(t){F[t?"unshift":"push"]((()=>{i=t,n(2,i)}))}]}
|
|
681
|
+
/* ../casino-calendar-daily-details/src/CasinoCalendarDailyDetails.svelte generated by Svelte v3.58.0 */
|
|
682
|
+
function Dr(t,e,n){const r=t.slice();return r[26]=e[n],r[27]=e,r[28]=n,r}function Rr(t,e,n){const r=t.slice();return r[29]=e[n],r[28]=n,r}
|
|
665
683
|
// (105:4) {:else}
|
|
666
|
-
function
|
|
684
|
+
function kr(t){let e,n,r,i,o,s=/*dailyeventsDetails*/t[3],a=[];for(let e=0;e<s.length;e+=1)a[e]=Xr(Dr(t,s,e));return{c(){e=E("div"),n=E("div"),r=_(/*dailyday*/t[1]),i=T();for(let t=0;t<a.length;t+=1)a[t].c();C(n,"class","CasinoCalendarDailyDay"),C(e,"class",o="CasinoCalendarDailyDetailsBackground "+(/*mobileView*/t[6]?"Mobile":""))},m(t,o){g(t,e,o),f(e,n),f(n,r),f(e,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(e,null)},p(t,n){if(/*dailyday*/2&n&&H(r,/*dailyday*/t[1]),/*dailyeventsDetails, selectedTab, setActiveTab, handleDetailsArea, dailybuttontitle*/409&n){let r;for(s=/*dailyeventsDetails*/t[3],r=0;r<s.length;r+=1){const i=Dr(t,s,r);a[r]?a[r].p(i,n):(a[r]=Xr(i),a[r].c(),a[r].m(e,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=s.length}/*mobileView*/64&n&&o!==(o="CasinoCalendarDailyDetailsBackground "+(/*mobileView*/t[6]?"Mobile":""))&&C(e,"class",o)},d(t){t&&b(e),v(a,t)}}}
|
|
667
685
|
// (103:4) {#if isLoading}
|
|
668
|
-
function
|
|
686
|
+
function Ur(e){let n;return{c(){n=E("p"),n.textContent="Loading ...",C(n,"class","SearchLoading"),C(n,"part","SearchLoading")},m(t,e){g(t,n,e)},p:t,d(t){t&&b(n)}}}
|
|
669
687
|
// (130:16) {:else}
|
|
670
|
-
function
|
|
688
|
+
function Fr(t){let e,n;return{c(){e=w("svg"),n=w("path"),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"d","M19.5 8.25l-7.5 7.5-7.5-7.5"),C(e,"xmlns","http://www.w3.org/2000/svg"),C(e,"fill","none"),C(e,"viewBox","0 0 24 24"),C(e,"stroke-width","1.5"),C(e,"stroke","currentColor"),C(e,"class","IconUp")},m(t,r){g(t,e,r),f(e,n)},d(t){t&&b(e)}}}
|
|
671
689
|
// (116:16) {#if event.expandedInfo == true}
|
|
672
|
-
function
|
|
690
|
+
function Gr(t){let e,n;return{c(){e=w("svg"),n=w("path"),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"d","M19.5 8.25l-7.5 7.5-7.5-7.5"),C(e,"xmlns","http://www.w3.org/2000/svg"),C(e,"fill","none"),C(e,"viewBox","0 0 24 24"),C(e,"stroke-width","1.5"),C(e,"stroke","currentColor"),C(e,"class","IconDown")},m(t,r){g(t,e,r),f(e,n)},d(t){t&&b(e)}}}
|
|
673
691
|
// (147:14) {#if event.expandedInfo == true}
|
|
674
|
-
function
|
|
692
|
+
function jr(t){let e,n,r=/*event*/t[26].details,i=[];for(let e=0;e<r.length;e+=1)i[e]=zr(Rr(t,r,e));let o=/*event*/t[26].detailsExpanded&&Vr(t);return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=T(),o&&o.c(),n=x()},m(t,r){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,r);g(t,e,r),o&&o.m(t,r),g(t,n,r)},p(t,s){if(/*selectedTab, dailyeventsDetails, setActiveTab*/280&s){let n;for(r=/*event*/t[26].details,n=0;n<r.length;n+=1){const o=Rr(t,r,n);i[n]?i[n].p(o,s):(i[n]=zr(o),i[n].c(),i[n].m(e.parentNode,e))}for(;n<i.length;n+=1)i[n].d(1);i.length=r.length}/*event*/t[26].detailsExpanded?o?o.p(t,s):(o=Vr(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(t){v(i,t),t&&b(e),o&&o.d(t),t&&b(n)}}}
|
|
675
693
|
// (148:16) {#each event.details as detail, index}
|
|
676
|
-
function
|
|
677
|
-
return t[18](/*event*/t[26],/*index*/t[28])}return{c(){e=E("div"),n=E("div"),r=E("button"),i=
|
|
694
|
+
function zr(t){let e,n,r,i,o,s,a,l,c=/*detail*/t[29].title+"";function u(){/*click_handler_1*/
|
|
695
|
+
return t[18](/*event*/t[26],/*index*/t[28])}return{c(){e=E("div"),n=E("div"),r=E("button"),i=_(c),C(r,"class",o="HeaderButton "+(/*detail*/t[29].expandedTab?"Active":"")),C(n,"class","Header"),C(e,"class",s=/*index*/t[28]==/*selectedTab*/t[4]?"SelectedTab":""),C(e,"id","CollapseMoreInfoButton"),S(e,"height",/*event*/t[26].expandedInfo?"100%":"")},m(t,o){g(t,e,o),f(e,n),f(n,r),f(r,i),a||(l=B(r,"click",u),a=!0)},p(n,a){t=n,/*dailyeventsDetails*/8&a&&c!==(c=/*detail*/t[29].title+"")&&H(i,c),/*dailyeventsDetails*/8&a&&o!==(o="HeaderButton "+(/*detail*/t[29].expandedTab?"Active":""))&&C(r,"class",o),/*selectedTab*/16&a&&s!==(s=/*index*/t[28]==/*selectedTab*/t[4]?"SelectedTab":"")&&C(e,"class",s),/*dailyeventsDetails*/8&a&&S(e,"height",/*event*/t[26].expandedInfo?"100%":"")},d(t){t&&b(e),a=!1,l()}}}
|
|
678
696
|
// (158:16) {#if event.detailsExpanded}
|
|
679
|
-
function
|
|
697
|
+
function Vr(t){let e,n,r,i=/*event*/t[26].details[/*selectedTab*/t[4]].description+"";return{c(){e=E("div"),n=_(i),C(e,"class",r="DetailTabsDescription "+(/*event*/t[26].details[/*selectedTab*/t[4]].expandedTab?"":"NotVisible"))},m(t,r){g(t,e,r),f(e,n)},p(t,o){/*dailyeventsDetails, selectedTab*/24&o&&i!==(i=/*event*/t[26].details[/*selectedTab*/t[4]].description+"")&&H(n,i),/*dailyeventsDetails, selectedTab*/24&o&&r!==(r="DetailTabsDescription "+(/*event*/t[26].details[/*selectedTab*/t[4]].expandedTab?"":"NotVisible"))&&C(e,"class",r)},d(t){t&&b(e)}}}
|
|
680
698
|
// (108:8) {#each dailyeventsDetails as event, index}
|
|
681
|
-
function
|
|
682
|
-
return 1==t[26].expandedInfo?
|
|
683
|
-
return t[17](/*event*/t[26],/*each_value*/t[27],/*index*/t[28])}let
|
|
684
|
-
return t[5]?
|
|
699
|
+
function Xr(t){let e,n,r,i,o,s,a,c,u,h,d,p,y,m,v,w,x,A,S,P,I=/*event*/t[26].title+"",L=/*event*/t[26].description+"";function $(t,e){/*event*/
|
|
700
|
+
return 1==t[26].expandedInfo?Gr:Fr}let M=$(t),O=M(t);function N(){/*click_handler*/
|
|
701
|
+
return t[17](/*event*/t[26],/*each_value*/t[27],/*index*/t[28])}let D=/*event*/1==t[26].expandedInfo&&jr(t);return{c(){e=E("div"),n=E("div"),r=_(I),i=T(),o=E("div"),s=E("img"),u=T(),h=E("div"),d=_(L),p=T(),y=E("div"),m=E("button"),v=_(/*dailybuttontitle*/t[0]),w=T(),O.c(),x=T(),D&&D.c(),A=T(),C(n,"class","CasinoCalendarDailyTitle"),C(s,"class","CasinoCalendarFitImage"),l(s.src,a=/*event*/t[26].image)||C(s,"src",a),C(s,"alt",c=/*event*/t[26].image),C(o,"class","CasinoCalendarImage"),C(h,"class","CasinoCalendarDailyDescription"),C(m,"class","MoreInfoButton"),C(y,"class","CasinoCalendarTabs"),C(e,"class","CasinoCalendarDailyDetailsParent")},m(t,a){g(t,e,a),f(e,n),f(n,r),f(e,i),f(e,o),f(o,s),f(e,u),f(e,h),f(h,d),f(e,p),f(e,y),f(y,m),f(m,v),f(m,w),O.m(m,null),f(y,x),D&&D.m(y,null),f(e,A),S||(P=B(m,"click",N),S=!0)},p(e,n){t=e,/*dailyeventsDetails*/8&n&&I!==(I=/*event*/t[26].title+"")&&H(r,I),/*dailyeventsDetails*/8&n&&!l(s.src,a=/*event*/t[26].image)&&C(s,"src",a),/*dailyeventsDetails*/8&n&&c!==(c=/*event*/t[26].image)&&C(s,"alt",c),/*dailyeventsDetails*/8&n&&L!==(L=/*event*/t[26].description+"")&&H(d,L),/*dailybuttontitle*/1&n&&H(v,/*dailybuttontitle*/t[0]),M!==(M=$(t))&&(O.d(1),O=M(t),O&&(O.c(),O.m(m,null))),/*event*/1==t[26].expandedInfo?D?D.p(t,n):(D=jr(t),D.c(),D.m(y,null)):D&&(D.d(1),D=null)},d(t){t&&b(e),O.d(),D&&D.d(),S=!1,P()}}}function Wr(e){let n;function r(t,e){/*isLoading*/
|
|
702
|
+
return t[5]?Ur:kr}let i=r(e),o=i(e);return{c(){n=E("div"),o.c(),this.c=t},m(t,r){g(t,n,r),o.m(n,null),
|
|
685
703
|
/*div_binding*/e[19](n)},p(t,[e]){i===(i=r(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(n,null)))},i:t,o:t,d(t){t&&b(n),o.d(),
|
|
686
|
-
/*div_binding*/e[19](null)}}}function
|
|
704
|
+
/*div_binding*/e[19](null)}}}function Kr(t,e,n){let r,{dailybackground:i=""}=e,{dailybuttontitle:o=""}=e,{dailyday:s=""}=e,{dailydescription:a="<p></p>"}=e,{dailyicon:l=""}=e,{dailytitle:c=""}=e,{lang:u="en"}=e,{clientstyling:h=""}=e,{clientstylingurl:d=""}=e,{translationUrl:p=""}=e,f=[],y=0,m=!0,g=!1,b=window.navigator.userAgent;!function({withLocale:t,translations:e}){Er.subscribe((n=>{null==n&&(rr.set(e),Er.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
687
705
|
/*dictionary.set(translations);
|
|
688
|
-
locale.set(_locale);*/}({withLocale:"en",translations:{}});const v=t=>{"DailyEventsData"==t.data.type&&(n(5,m=!1),n(3,f=t.data.data),f.forEach((t=>{t.expandedInfo=!1,t.detailsExpanded=!1,t.details.forEach(((t,e)=>{t.expandedTab=0==e}))}))),"ModalClosed"==t.data.type&&(n(4,y=0),f.forEach(((t,e)=>{t.detailsExpanded=0==e,t.expandedInfo=0==e})))},E=()=>{var t;t=u,
|
|
706
|
+
locale.set(_locale);*/}({withLocale:"en",translations:{}});const v=t=>{"DailyEventsData"==t.data.type&&(n(5,m=!1),n(3,f=t.data.data),f.forEach((t=>{t.expandedInfo=!1,t.detailsExpanded=!1,t.details.forEach(((t,e)=>{t.expandedTab=0==e}))}))),"ModalClosed"==t.data.type&&(n(4,y=0),f.forEach(((t,e)=>{t.detailsExpanded=0==e,t.expandedInfo=0==e})))},E=()=>{var t;t=u,Er.set(t)},w=t=>{n(4,y=0),n(3,f[t].detailsExpanded=!f[t].detailsExpanded,f),
|
|
689
707
|
//Analytics event
|
|
690
|
-
"function"==typeof gtag&>ag("event","MoreInfo",{context:"CalendarWidgetDetails"})},
|
|
691
|
-
/* ../casino-calendar-daily-item/src/CasinoCalendarDailyItem.svelte generated by Svelte v3.
|
|
692
|
-
function
|
|
708
|
+
"function"==typeof gtag&>ag("event","MoreInfo",{context:"CalendarWidgetDetails"})},_=(t,e)=>{n(4,y=e),t.details.forEach(((t,e)=>{t.expandedTab=y==e}))};k((()=>(window.addEventListener("message",v,!1),Lr(b)&&n(6,g=!0),()=>{window.removeEventListener("message",v)})));return t.$$set=t=>{"dailybackground"in t&&n(9,i=t.dailybackground),"dailybuttontitle"in t&&n(0,o=t.dailybuttontitle),"dailyday"in t&&n(1,s=t.dailyday),"dailydescription"in t&&n(10,a=t.dailydescription),"dailyicon"in t&&n(11,l=t.dailyicon),"dailytitle"in t&&n(12,c=t.dailytitle),"lang"in t&&n(13,u=t.lang),"clientstyling"in t&&n(14,h=t.clientstyling),"clientstylingurl"in t&&n(15,d=t.clientstylingurl),"translationUrl"in t&&n(16,p=t.translationUrl)},t.$$.update=()=>{/*lang*/8192&t.$$.dirty&&u&&E(),/*clientstyling, customStylingContainer*/16388&t.$$.dirty&&h&&r&&(()=>{let t=document.createElement("style");t.innerHTML=h,r.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/32772&t.$$.dirty&&d&&r&&(()=>{let t=new URL(d),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{r.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[o,s,r,f,y,m,g,w,_,i,a,l,c,u,h,d,p,(t,e,r)=>{n(3,e[r].expandedInfo=!t.expandedInfo,f),w(r)},(t,e)=>{_(t,e)},function(t){F[t?"unshift":"push"]((()=>{r=t,n(2,r)}))}]}!customElements.get("casino-modal")&&customElements.define("casino-modal",class extends lt{constructor(t){super();const e=document.createElement("style");e.textContent=':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;box-sizing:border-box}.ModalWindow{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:100;top:0;left:0;background-color:rgba(0, 0, 0, 0.9)}.ModalWindow .ModalPanicCloseButton{margin-top:45px}.ModalWindow .ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:10px;right:10px;padding:10px;border-radius:50%;color:var(--emfe-w-color-white, #FFFFFF);background:rgba(255, 255, 255, 0.1);cursor:pointer;transition:all 150ms ease-in-out}.ModalWindow .ModalCloseBtn svg{width:32px;height:32px}.ModalWindow .ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}',this.shadowRoot.appendChild(e),at(this,{target:this.shadowRoot,props:L(this.attributes),customElement:!0},Nr,Or,s,{duration:0,session:9,userid:10,clientstyling:11,clientstylingurl:12,endpoint:13,haspanicbutton:1,gamepagemodalurl:14,sessioncheck:15,integratedgameframedesktop:16},null),t&&(t.target&&g(t.target,this,t.anchor),t.props&&(this.$set(t.props),Z()))}static get observedAttributes(){return["duration","session","userid","clientstyling","clientstylingurl","endpoint","haspanicbutton","gamepagemodalurl","sessioncheck","integratedgameframedesktop"]}get duration(){return this.$$.ctx[0]}set duration(t){this.$$set({duration:t}),Z()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),Z()}get userid(){return this.$$.ctx[10]}set userid(t){this.$$set({userid:t}),Z()}get clientstyling(){return this.$$.ctx[11]}set clientstyling(t){this.$$set({clientstyling:t}),Z()}get clientstylingurl(){return this.$$.ctx[12]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Z()}get endpoint(){return this.$$.ctx[13]}set endpoint(t){this.$$set({endpoint:t}),Z()}get haspanicbutton(){return this.$$.ctx[1]}set haspanicbutton(t){this.$$set({haspanicbutton:t}),Z()}get gamepagemodalurl(){return this.$$.ctx[14]}set gamepagemodalurl(t){this.$$set({gamepagemodalurl:t}),Z()}get sessioncheck(){return this.$$.ctx[15]}set sessioncheck(t){this.$$set({sessioncheck:t}),Z()}get integratedgameframedesktop(){return this.$$.ctx[16]}set integratedgameframedesktop(t){this.$$set({integratedgameframedesktop:t}),Z()}});
|
|
709
|
+
/* ../casino-calendar-daily-item/src/CasinoCalendarDailyItem.svelte generated by Svelte v3.58.0 */
|
|
710
|
+
function Yr(e){let n,r,i,o,s,a,c,u,h,d,p,y,m,v,w,x,A,P,I,L,$,M,O;return{c(){n=E("div"),r=E("div"),i=E("div"),o=E("div"),s=E("div"),s.innerHTML='<div class="RingLeft"></div> \n <div class="RingRight"></div>',a=T(),c=E("div"),u=E("div"),h=E("img"),p=T(),y=E("div"),m=_(/*dailyday*/e[2]),v=T(),w=E("div"),x=T(),A=E("div"),P=E("button"),I=_(/*dailybuttontitle*/e[3]),this.c=t,C(s,"class","CalendarBar"),l(h.src,d=/*dailyicon*/e[1])||C(h,"src",d),C(h,"alt",/*dailyicon*/e[1]),C(u,"class","CasinoCalendarDailyIcon"),C(y,"class","CasinoCalendarDailyTitle"),C(w,"class","CasinoCalendarDailyItemDescription"),C(P,"class","MoreInfoButton"),C(A,"class","CasinoCalendarDailyItemButton"),C(c,"class",L="CasinoCalendarItemBackground CalendarPage "+("OpenCalendarModal"==/*index*/e[4]?"Tear":"")),S(c,"background-image","url('"+/*dailybackground*/e[0]+"')"),S(c,"background-size","cover"),S(c,"background-position","center"),S(c,"-webkit-background-size","cover"),S(c,"-moz-background-size","cover"),S(c,"-o-background-size","cover"),C(o,"class","CalendarCard"),C(i,"class","CasinoCalendarItems"),C(r,"class",$="Container "+(/*mobileView*/e[7]?"Mobile":""))},m(t,l){g(t,n,l),f(n,r),f(r,i),f(i,o),f(o,s),f(o,a),f(o,c),f(c,u),f(u,h),f(c,p),f(c,y),f(y,m),f(c,v),f(c,w),
|
|
693
711
|
/*div5_binding*/e[14](w),f(c,x),f(c,A),f(A,P),f(P,I),
|
|
694
|
-
/*div11_binding*/e[16](n)
|
|
712
|
+
/*div11_binding*/e[16](n),M||(O=B(P,"click",/*click_handler*/e[15]),M=!0)},p(t,[e]){/*dailyicon*/2&e&&!l(h.src,d=/*dailyicon*/t[1])&&C(h,"src",d),/*dailyicon*/2&e&&C(h,"alt",/*dailyicon*/t[1]),/*dailyday*/4&e&&H(m,/*dailyday*/t[2]),/*dailybuttontitle*/8&e&&H(I,/*dailybuttontitle*/t[3]),/*index*/16&e&&L!==(L="CasinoCalendarItemBackground CalendarPage "+("OpenCalendarModal"==/*index*/t[4]?"Tear":""))&&C(c,"class",L),/*dailybackground*/1&e&&S(c,"background-image","url('"+/*dailybackground*/t[0]+"')"),/*mobileView*/128&e&&$!==($="Container "+(/*mobileView*/t[7]?"Mobile":""))&&C(r,"class",$)},i:t,o:t,d(t){t&&b(n)
|
|
695
713
|
/*div5_binding*/,e[14](null),
|
|
696
|
-
/*div11_binding*/e[16](null)
|
|
714
|
+
/*div11_binding*/e[16](null),M=!1,O()}}}function Zr(t,e,n){let r,i,{cmsendpoint:o=""}=e,{lang:s=""}=e,{dailybackground:a=""}=e,{dailyicon:l=""}=e,{dailyday:c=""}=e,{dailydescription:u="<p></p>"}=e,{dailybuttontitle:h=""}=e,{index:d="0"}=e,{clientstyling:p=""}=e,{clientstylingurl:f=""}=e;!function({withLocale:t,translations:e}){Er.subscribe((n=>{null==n&&(rr.set(e),Er.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
697
715
|
/*dictionary.set(translations);
|
|
698
716
|
locale.set(_locale);*/}({withLocale:"en",translations:{}});let y=!1,m=window.navigator.userAgent;const g=()=>{window.postMessage({type:"OpenCalendar",index:d},window.location.href),
|
|
699
717
|
//Analytics event
|
|
700
|
-
"function"==typeof gtag&>ag("event","MoreInfo",{context:"CalendarWidgetItem"})};k((()=>{
|
|
718
|
+
"function"==typeof gtag&>ag("event","MoreInfo",{context:"CalendarWidgetItem"})};k((()=>{Lr(m)&&n(7,y=!0)}));return t.$$set=t=>{"cmsendpoint"in t&&n(9,o=t.cmsendpoint),"lang"in t&&n(10,s=t.lang),"dailybackground"in t&&n(0,a=t.dailybackground),"dailyicon"in t&&n(1,l=t.dailyicon),"dailyday"in t&&n(2,c=t.dailyday),"dailydescription"in t&&n(11,u=t.dailydescription),"dailybuttontitle"in t&&n(3,h=t.dailybuttontitle),"index"in t&&n(4,d=t.index),"clientstyling"in t&&n(12,p=t.clientstyling),"clientstylingurl"in t&&n(13,f=t.clientstylingurl)},t.$$.update=()=>{/*dailyicon, dailyday, dailydescription, dailybuttontitle, dailybackground*/2063&t.$$.dirty&&l&&c&&u&&h&&a&&(()=>{
|
|
701
719
|
// remove HTML tags
|
|
702
|
-
let t=document.createElement("div");t.innerHTML=u,r&&r.append(t)})(),/*clientstyling, customStylingContainer*/4128&t.$$.dirty&&p&&i&&(()=>{let t=document.createElement("style");t.innerHTML=p,i.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/8224&t.$$.dirty&&f&&i&&(()=>{let t=new URL(f),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[a,l,c,h,d,i,r,y,g,o,s,u,p,f,function(t){F[t?"unshift":"push"]((()=>{r=t,n(6,r)}))},()=>g(),function(t){F[t?"unshift":"push"]((()=>{i=t,n(5,i)}))}]}!customElements.get("casino-calendar-daily-details")&&customElements.define("casino-calendar-daily-details",class extends
|
|
703
|
-
/* src/CasinoCalendar.svelte generated by Svelte v3.
|
|
704
|
-
function
|
|
720
|
+
let t=document.createElement("div");t.innerHTML=u,r&&r.append(t)})(),/*clientstyling, customStylingContainer*/4128&t.$$.dirty&&p&&i&&(()=>{let t=document.createElement("style");t.innerHTML=p,i.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/8224&t.$$.dirty&&f&&i&&(()=>{let t=new URL(f),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[a,l,c,h,d,i,r,y,g,o,s,u,p,f,function(t){F[t?"unshift":"push"]((()=>{r=t,n(6,r)}))},()=>g(),function(t){F[t?"unshift":"push"]((()=>{i=t,n(5,i)}))}]}!customElements.get("casino-calendar-daily-details")&&customElements.define("casino-calendar-daily-details",class extends lt{constructor(t){super();const e=document.createElement("style");e.textContent=':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}#CollapseMoreInfoButton{-moz-transition:height 0.5s;-ms-transition:height 0.5s;-o-transition:height 0.5s;-webkit-transition:height 0.5s;transition:height 0.5s;height:0;overflow:hidden}.MoreInfoButton{display:flex;justify-content:center;width:100%;padding:15px 0;border-radius:0 0 5px 5px;border:none;color:var(--emfe-w-color-white, #FFFFFF);background:var(--emfe-w-color-primary, #D0046C);cursor:pointer}.IconDown{width:18px;height:18px;margin-left:10px;transform:rotate(0deg)}.IconUp{width:18px;height:18px;margin-left:10px;transform:rotate(180deg)}.CasinoCalendarDailyDetailsBackground{display:flex;justify-content:flex-start;flex-direction:column;align-items:center;background:var(--emfe-w-color-white, #FFFFFF);width:500px;max-height:50vw;padding:20px;text-align:center;margin-bottom:50px;overflow:scroll}.CasinoCalendarDailyDetailsParent{display:flex;justify-content:flex-start;align-items:center;flex-direction:column;max-width:376px}.CasinoCalendarDailyDay{padding:10px 0 40px 0;font-size:22px;text-transform:uppercase;width:100%;color:var(--emfe-w-color-primary, #D0046C)}.CasinoCalendarDailyTitle{padding:15px 0 20px 0;font-size:18px;text-transform:capitalize;width:100%;color:var(--emfe-w-color-primary, #D0046C)}.CasinoCalendarImage{background:var(--emfe-w-color-gray-100, #E6E6E6);border-radius:5px 5px 0 0}.CasinoCalendarImage img{max-width:376px;max-height:250px;border-radius:5px 5px 0 0}.CasinoCalendarDailyDescription{width:100%;padding:25px 15px;font-size:14px;font-weight:600;color:var(--emfe-w-gray-300, #58586B);font-weight:400;border-radius:0;background:linear-gradient(180deg, var(--emfe-w-color-white, #FFFFFF) 55%, var(--emfe-w-color-gray-100, #E6E6E6))}.DetailTabsDescription{margin-top:15px}.CasinoCalendarTabs{width:100%;font-size:14px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;align-content:stretch;padding-bottom:40px}.CasinoCalendarFitImage{border-radius:5px}.NotVisible{display:none}.Header{display:flex;justify-content:center;justify-items:center;margin-bottom:4px;padding:0 10px}.HeaderButton{min-height:48px;margin:0;border:none;background:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-gray-150, #828282)}.SelectedTab{box-shadow:none;border-bottom:2px solid var(--emfe-w-color-primary, #D0046C)}.Mobile{max-height:70vh;margin-bottom:0}',this.shadowRoot.appendChild(e),at(this,{target:this.shadowRoot,props:L(this.attributes),customElement:!0},Kr,Wr,s,{dailybackground:9,dailybuttontitle:0,dailyday:1,dailydescription:10,dailyicon:11,dailytitle:12,lang:13,clientstyling:14,clientstylingurl:15,translationUrl:16},null),t&&(t.target&&g(t.target,this,t.anchor),t.props&&(this.$set(t.props),Z()))}static get observedAttributes(){return["dailybackground","dailybuttontitle","dailyday","dailydescription","dailyicon","dailytitle","lang","clientstyling","clientstylingurl","translationUrl"]}get dailybackground(){return this.$$.ctx[9]}set dailybackground(t){this.$$set({dailybackground:t}),Z()}get dailybuttontitle(){return this.$$.ctx[0]}set dailybuttontitle(t){this.$$set({dailybuttontitle:t}),Z()}get dailyday(){return this.$$.ctx[1]}set dailyday(t){this.$$set({dailyday:t}),Z()}get dailydescription(){return this.$$.ctx[10]}set dailydescription(t){this.$$set({dailydescription:t}),Z()}get dailyicon(){return this.$$.ctx[11]}set dailyicon(t){this.$$set({dailyicon:t}),Z()}get dailytitle(){return this.$$.ctx[12]}set dailytitle(t){this.$$set({dailytitle:t}),Z()}get lang(){return this.$$.ctx[13]}set lang(t){this.$$set({lang:t}),Z()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),Z()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Z()}get translationUrl(){return this.$$.ctx[16]}set translationUrl(t){this.$$set({translationUrl:t}),Z()}});
|
|
721
|
+
/* src/CasinoCalendar.svelte generated by Svelte v3.58.0 */
|
|
722
|
+
function qr(t,e,n){const r=t.slice();return r[12]=e[n],r[14]=n,r}
|
|
705
723
|
// (66:4) {#if calendarCollections?.length}
|
|
706
|
-
function
|
|
724
|
+
function Jr(t){let e,n,r,i=/*calendarCollections*/t[1],o=[];for(let e=0;e<i.length;e+=1)o[e]=ei(qr(t,i,e));let s=/*calendarModalOpened*/1==t[6]&&ni(t);return{c(){e=E("div");for(let t=0;t<o.length;t+=1)o[t].c();n=T(),s&&s.c(),C(e,"class",r="CasinoCalendarItem "+(/*mobileView*/t[5]?"Mobile":""))},m(t,r){g(t,e,r);for(let t=0;t<o.length;t+=1)o[t]&&o[t].m(e,null);f(e,n),s&&s.m(e,null)},p(t,a){if(/*calendarCollections, lang*/3&a){let r;for(i=/*calendarCollections*/t[1],r=0;r<i.length;r+=1){const s=qr(t,i,r);o[r]?o[r].p(s,a):(o[r]=ei(s),o[r].c(),o[r].m(e,n))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}/*calendarModalOpened*/1==t[6]?s?s.p(t,a):(s=ni(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null),/*mobileView*/32&a&&r!==(r="CasinoCalendarItem "+(/*mobileView*/t[5]?"Mobile":""))&&C(e,"class",r)},d(t){t&&b(e),v(o,t),s&&s.d()}}}
|
|
707
725
|
// (63:2) {#if isLoading}
|
|
708
|
-
function
|
|
726
|
+
function Qr(e){let n;return{c(){n=E("p"),n.textContent="Loading ...",C(n,"class","SearchLoading"),C(n,"part","SearchLoading")},m(t,e){g(t,n,e)},p:t,d(t){t&&b(n)}}}
|
|
709
727
|
// (60:0) {#if hasErrors}
|
|
710
|
-
function
|
|
728
|
+
function ti(e){let n;return{c(){n=E("p"),n.textContent="500 Error - Internal Server Error",C(n,"class","SearchLoading"),C(n,"part","SearchLoading")},m(t,e){g(t,n,e)},p:t,d(t){t&&b(n)}}}
|
|
711
729
|
// (68:8) {#each calendarCollections as dailyCalendarData, index }
|
|
712
|
-
function
|
|
730
|
+
function ei(t){let e,n,r,i,o,s;return{c(){e=E("casino-calendar-daily-item"),A(e,"dailybackground",n=/*dailyCalendarData*/t[12].dailyBackground),A(e,"dailyicon",r=/*dailyCalendarData*/t[12].dailyIcon),A(e,"dailyday",i=/*dailyCalendarData*/t[12].dailyDay),A(e,"dailydescription",o=/*dailyCalendarData*/t[12].dailyDescription),A(e,"dailybuttontitle",s=/*dailyCalendarData*/t[12].dailyButtonTitle),A(e,"index",/*index*/t[14]),A(e,"lang",/*lang*/t[0])},m(t,n){g(t,e,n)},p(t,a){/*calendarCollections*/2&a&&n!==(n=/*dailyCalendarData*/t[12].dailyBackground)&&A(e,"dailybackground",n),/*calendarCollections*/2&a&&r!==(r=/*dailyCalendarData*/t[12].dailyIcon)&&A(e,"dailyicon",r),/*calendarCollections*/2&a&&i!==(i=/*dailyCalendarData*/t[12].dailyDay)&&A(e,"dailyday",i),/*calendarCollections*/2&a&&o!==(o=/*dailyCalendarData*/t[12].dailyDescription)&&A(e,"dailydescription",o),/*calendarCollections*/2&a&&s!==(s=/*dailyCalendarData*/t[12].dailyButtonTitle)&&A(e,"dailybuttontitle",s),/*lang*/1&a&&A(e,"lang",/*lang*/t[0])},d(t){t&&b(e)}}}
|
|
713
731
|
// (80:8) {#if calendarModalOpened == true}
|
|
714
|
-
function
|
|
715
|
-
return t[4]?
|
|
732
|
+
function ni(t){let e,n,r,i,o,s,a,l;return{c(){e=E("casino-modal"),n=E("casino-calendar-daily-details"),A(n,"dailybackground",r=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyBackground),A(n,"dailybuttontitle",i=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyButtonTitle),A(n,"dailyday",o=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyDay),A(n,"dailydescription",s=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyDescription),A(n,"dailyicon",a=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyIcon),A(n,"dailytitle",l=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyTitle),A(n,"lang",/*lang*/t[0])},m(t,r){g(t,e,r),f(e,n)},p(t,e){/*calendarCollections, selectedIndex*/6&e&&r!==(r=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyBackground)&&A(n,"dailybackground",r),/*calendarCollections, selectedIndex*/6&e&&i!==(i=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyButtonTitle)&&A(n,"dailybuttontitle",i),/*calendarCollections, selectedIndex*/6&e&&o!==(o=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyDay)&&A(n,"dailyday",o),/*calendarCollections, selectedIndex*/6&e&&s!==(s=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyDescription)&&A(n,"dailydescription",s),/*calendarCollections, selectedIndex*/6&e&&a!==(a=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyIcon)&&A(n,"dailyicon",a),/*calendarCollections, selectedIndex*/6&e&&l!==(l=/*calendarCollections*/t[1][/*selectedIndex*/t[2]].dailyTitle)&&A(n,"dailytitle",l),/*lang*/1&e&&A(n,"lang",/*lang*/t[0])},d(t){t&&b(e)}}}function ri(e){let n;function r(t,e){/*hasErrors*/
|
|
733
|
+
return t[4]?ti:/*isLoading*/t[3]?Qr:/*calendarCollections*/t[1]?.length?Jr:void 0}let i=r(e),o=i&&i(e);return{c(){o&&o.c(),n=x(),this.c=t},m(t,e){o&&o.m(t,e),g(t,n,e)},p(t,[e]){i===(i=r(t))&&o?o.p(t,e):(o&&o.d(1),o=i&&i(t),o&&(o.c(),o.m(n.parentNode,n)))},i:t,o:t,d(t){o&&o.d(t),t&&b(n)}}}function ii(t,e,n){let r,{cmsendpoint:i=""}=e,{lang:o="en"}=e,s=0,a=!0,l=!1,c=!1,u=window.navigator.userAgent,h=!1;const d=()=>{fetch(`${i}/${o}/daily-calendar/`).then((t=>t.json())).then((t=>{n(1,r=t)})).catch((t=>{console.log(t),n(4,l=!0)})).finally((()=>{n(3,a=!1)}))},p=t=>{var e;t.data&&"OpenCalendar"==t.data.type&&(n(2,s=t.data.index),n(6,h=!0),window.postMessage({type:"OpenCalendarModal",selectedIndex:s},window.location.href),window.postMessage({type:"DailyEventsData",data:null===(e=r[s])||void 0===e?void 0:e.dailyEvents})),t.data&&"ModalClosed"==t.data.type&&n(6,h=!1)};return k((()=>(window.addEventListener("message",p,!1),Lr(u)&&n(5,c=!0),()=>{window.removeEventListener("message",p)}))),t.$$set=t=>{"cmsendpoint"in t&&n(7,i=t.cmsendpoint),"lang"in t&&n(0,o=t.lang)},t.$$.update=()=>{/*cmsendpoint, lang*/129&t.$$.dirty&&i&&o&&d()},[o,r,s,a,l,c,h,i]}!customElements.get("casino-calendar-daily-item")&&customElements.define("casino-calendar-daily-item",class extends lt{constructor(t){super();const e=document.createElement("style");e.textContent=':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}.Container{display:flex;overflow-x:scroll;justify-content:space-between;position:relative;width:100%;border-radius:0 0 5px 5px}.Container::-webkit-scrollbar{display:none}.CalendarBar{width:100%;height:28px;background:linear-gradient(#e2e2e2, #b5b5b5);border-radius:4px 4px 0 0;border-bottom:3px solid #888;display:block;z-index:2}.CalendarBar::before{content:"";position:absolute;z-index:-1}.RingLeft::before{content:"";width:8px;height:24px;border-radius:20px;background:linear-gradient(#fff, #ccc);box-shadow:inset 0 -4px 6px rgba(0, 0, 0, 0.5);top:-8px;left:22px;position:absolute;z-index:1}.RingLeft::after{content:"";float:left;top:15px;width:12px;height:12px;background:#111;border-radius:10px;box-shadow:0 1px 1px #fff;top:6px;right:20px;position:absolute;z-index:0}.RingRight::before{content:"";width:8px;height:24px;border-radius:20px;background:linear-gradient(#fff, #ccc);box-shadow:inset 0 -4px 6px rgba(0, 0, 0, 0.5);top:-8px;right:22px;position:absolute;z-index:1}.RingRight::after{content:"";float:left;top:15px;width:12px;height:12px;background:#111;border-radius:10px;box-shadow:0 1px 1px #fff;top:6px;left:20px;position:absolute;z-index:0}.CalendarPage{width:100%;min-width:170px;height:170px;padding:8px 16px;text-align:center;border-radius:0 0 2px 2px;color:#fff;position:relative;z-index:0}.CalendarPage.Tear{animation:tearoff 1.5s both;transform-origin:0 100%;box-shadow:-1px -1px 4px rgba(0, 0, 0, 0.4)}@keyframes tearoff{0%{top:0}40%{transform:rotate(4deg);top:10px;opacity:1}65%{opacity:1}90%{transform:rotate(4deg);top:20px;opacity:0}95%{transform:rotate(0deg);top:0px;opacity:0}100%{transform:rotate(0deg);top:0px;opacity:1}}.CalendarCard{margin:16px 0 12px;width:170px;height:240px;text-align:center;border-radius:5px;color:#fff;position:relative;display:block}.CasinoCalendarItems{width:100%}.CasinoCalendarItemBackground{display:flex;justify-content:flex-start;flex-direction:column;align-items:center;color:var(--emfe-w-color-white, #FFFFFF);background:var(--emfe-w-color-gray-300, #58586B);background-image:url("https://breakthrough.org/wp-content/uploads/2018/10/default-placeholder-image.png");background-position:center;background-size:cover;background-blend-mode:multiply;height:100%;width:100%;border-radius:0 0 5px 5px}.CasinoCalendarDailyIcon{height:20px;margin:15px}.CasinoCalendarDailyTitle{text-transform:capitalize;font-weight:600;font-size:16px}.CasinoCalendarDailyItemDescription{padding:15px;margin-bottom:20px;font-size:14px;height:72px;white-space:unset;overflow:hidden;text-overflow:ellipsis}.CasinoCalendarDailyItemButton{width:80%;text-align:center}.MoreInfoButton{display:flex;justify-content:center;width:100%;font-size:12px;padding:10px 6px;border-radius:5px;border:none;color:var(--emfe-w-color-white, #FFFFFF);background:var(--emfe-w-color-primary, #D0046C);cursor:pointer}',this.shadowRoot.appendChild(e),at(this,{target:this.shadowRoot,props:L(this.attributes),customElement:!0},Zr,Yr,s,{cmsendpoint:9,lang:10,dailybackground:0,dailyicon:1,dailyday:2,dailydescription:11,dailybuttontitle:3,index:4,clientstyling:12,clientstylingurl:13},null),t&&(t.target&&g(t.target,this,t.anchor),t.props&&(this.$set(t.props),Z()))}static get observedAttributes(){return["cmsendpoint","lang","dailybackground","dailyicon","dailyday","dailydescription","dailybuttontitle","index","clientstyling","clientstylingurl"]}get cmsendpoint(){return this.$$.ctx[9]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),Z()}get lang(){return this.$$.ctx[10]}set lang(t){this.$$set({lang:t}),Z()}get dailybackground(){return this.$$.ctx[0]}set dailybackground(t){this.$$set({dailybackground:t}),Z()}get dailyicon(){return this.$$.ctx[1]}set dailyicon(t){this.$$set({dailyicon:t}),Z()}get dailyday(){return this.$$.ctx[2]}set dailyday(t){this.$$set({dailyday:t}),Z()}get dailydescription(){return this.$$.ctx[11]}set dailydescription(t){this.$$set({dailydescription:t}),Z()}get dailybuttontitle(){return this.$$.ctx[3]}set dailybuttontitle(t){this.$$set({dailybuttontitle:t}),Z()}get index(){return this.$$.ctx[4]}set index(t){this.$$set({index:t}),Z()}get clientstyling(){return this.$$.ctx[12]}set clientstyling(t){this.$$set({clientstyling:t}),Z()}get clientstylingurl(){return this.$$.ctx[13]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),Z()}});class oi extends lt{constructor(t){super();const e=document.createElement("style");e.textContent=".CasinoCalendarItem{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center;align-content:flex-start;text-align:left;gap:10px}.Mobile{overflow:auto;scroll-snap-type:x mandatory;-ms-overflow-style:none;scrollbar-width:none}",this.shadowRoot.appendChild(e),at(this,{target:this.shadowRoot,props:L(this.attributes),customElement:!0},ii,ri,s,{cmsendpoint:7,lang:0},null),t&&(t.target&&g(t.target,this,t.anchor),t.props&&(this.$set(t.props),Z()))}static get observedAttributes(){return["cmsendpoint","lang"]}get cmsendpoint(){return this.$$.ctx[7]}set cmsendpoint(t){this.$$set({cmsendpoint:t}),Z()}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),Z()}}return!customElements.get("casino-calendar")&&customElements.define("casino-calendar",oi),oi}));
|
|
716
734
|
//# sourceMappingURL=casino-calendar.js.map
|