@everymatrix/casino-wagering-detail-controller 1.12.6 → 1.13.0
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.
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}function e(t,e){
|
|
2
2
|
// @ts-ignore
|
|
3
|
-
for(const n in e)t[n]=e[n];return t}function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function i(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}const a=["",!0,1,"true","contenteditable"];function c(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function f(t){return document.createElement(t)}function h(t){return document.createTextNode(t)}function p(){return h(" ")}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}
|
|
3
|
+
for(const n in e)t[n]=e[n];return t}function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function i(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}const a=["",!0,1,"true","contenteditable"];function c(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function f(t){return document.createElement(t)}function h(t){return document.createTextNode(t)}function p(){return h(" ")}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}
|
|
4
|
+
/**
|
|
5
|
+
* List of attributes that should always be set through the attr method,
|
|
6
|
+
* because updating them through the property setter doesn't work reliably.
|
|
7
|
+
* In the example of `width`/`height`, the problem is that the setter only
|
|
8
|
+
* accepts numeric values, but the attribute can also be set to a string like `50%`.
|
|
9
|
+
* If this list becomes too big, rethink this approach.
|
|
10
|
+
*/const y=["width","height"];function m(t,e){
|
|
4
11
|
// @ts-ignore
|
|
5
|
-
const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set?t[o]=e[o]:g(t,o,e[o])}function
|
|
12
|
+
const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set&&-1===y.indexOf(o)?t[o]=e[o]:g(t,o,e[o])}function b(t,e){e=""+e,t.data!==e&&(t.data=e)}function $(t,e,n){~a.indexOf(n)?function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(t,e):b(t,e)}function v(t){const e={};for(const n of t)e[n.name]=n.value;return e}let w;function T(t){w=t}
|
|
6
13
|
/**
|
|
7
14
|
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
8
15
|
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
@@ -12,7 +19,7 @@ const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o
|
|
|
12
19
|
*
|
|
13
20
|
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
14
21
|
*/
|
|
15
|
-
function
|
|
22
|
+
function E(t){(function(){if(!w)throw new Error("Function called outside component initialization");return w})().$$.on_mount.push(t)}const S=[],C=[];let x=[];const D=[],R=Promise.resolve();let _=!1;function A(t){x.push(t)}
|
|
16
23
|
// flush() calls callbacks in this order:
|
|
17
24
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
18
25
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -31,57 +38,57 @@ function T(t){(function(){if(!v)throw new Error("Function called outside compone
|
|
|
31
38
|
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
32
39
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
33
40
|
// function, guarantees this behavior.
|
|
34
|
-
const
|
|
35
|
-
function
|
|
41
|
+
const O=new Set;let P=0;// Do *not* move this inside the flush() function
|
|
42
|
+
function N(){
|
|
36
43
|
// Do not reenter flush while dirty components are updated, as this can
|
|
37
44
|
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
38
45
|
// Reentrancy is ok afterwards for bindings etc.
|
|
39
|
-
if(0!==
|
|
46
|
+
if(0!==P)return;const t=w;do{
|
|
40
47
|
// first, call beforeUpdate functions
|
|
41
48
|
// and update components
|
|
42
|
-
try{for(;
|
|
49
|
+
try{for(;P<S.length;){const t=S[P];P++,T(t),B(t.$$)}}catch(t){
|
|
43
50
|
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
44
|
-
throw
|
|
51
|
+
throw S.length=0,P=0,t}for(T(null),S.length=0,P=0;C.length;)C.pop()();
|
|
45
52
|
// then, once components are updated, call
|
|
46
53
|
// afterUpdate functions. This may cause
|
|
47
54
|
// subsequent updates...
|
|
48
|
-
for(let t=0;t<
|
|
55
|
+
for(let t=0;t<x.length;t+=1){const e=x[t];O.has(e)||(
|
|
49
56
|
// ...so guard against infinite loops
|
|
50
|
-
|
|
57
|
+
O.add(e),e())}x.length=0}while(S.length);for(;D.length;)D.pop()();_=!1,O.clear(),T(t)}function B(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}
|
|
51
58
|
/**
|
|
52
59
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
53
|
-
*/const
|
|
60
|
+
*/const L=new Set;function M(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];x.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),x=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
54
61
|
// TODO null out other refs, including component.$$ (but need to
|
|
55
62
|
// preserve final state?)
|
|
56
|
-
n.on_destroy=n.fragment=null,n.ctx=[])}function
|
|
63
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function k(t,e){-1===t.$$.dirty[0]&&(S.push(t),_||(_=!0,R.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function H(e,s,a,c,l,d,f,h=[-1]){const p=w;T(e);const g=e.$$={fragment:null,ctx:[],
|
|
57
64
|
// state
|
|
58
65
|
props:d,update:t,not_equal:l,bound:o(),
|
|
59
66
|
// lifecycle
|
|
60
67
|
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(p?p.$$.context:[])),
|
|
61
68
|
// everything else
|
|
62
|
-
callbacks:o(),dirty:h,skip_bound:!1,root:s.target||p.$$.root};f&&f(g.root);let y=!1;if(g.ctx=a?a(e,s.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return g.ctx&&l(g.ctx[t],g.ctx[t]=r)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](r),y&&
|
|
69
|
+
callbacks:o(),dirty:h,skip_bound:!1,root:s.target||p.$$.root};f&&f(g.root);let y=!1;if(g.ctx=a?a(e,s.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return g.ctx&&l(g.ctx[t],g.ctx[t]=r)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](r),y&&k(e,t)),n})):[],g.update(),y=!0,r(g.before_update),
|
|
63
70
|
// `false` as a special case of no DOM component
|
|
64
71
|
g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
65
72
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
66
73
|
g.fragment&&g.fragment.l(t),t.forEach(u)}else
|
|
67
74
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
68
|
-
g.fragment&&g.fragment.c();s.intro&&((m=e.$$.fragment)&&m.i&&(
|
|
75
|
+
g.fragment&&g.fragment.c();s.intro&&((m=e.$$.fragment)&&m.i&&(L.delete(m),m.i(b))),function(t,e,o,s){const{fragment:a,after_update:c}=t.$$;a&&a.m(e,o),s||
|
|
69
76
|
// onMount happens before the initial afterUpdate
|
|
70
|
-
|
|
77
|
+
A((()=>{const e=t.$$.on_mount.map(n).filter(i);
|
|
71
78
|
// if the component was destroyed immediately
|
|
72
79
|
// it will update the `$$.on_destroy` reference to `null`.
|
|
73
80
|
// the destructured on_destroy may still reference to the old array
|
|
74
81
|
t.$$.on_destroy?t.$$.on_destroy.push(...e):
|
|
75
82
|
// Edge case - component was destroyed immediately,
|
|
76
83
|
// most likely as a result of a binding initialising
|
|
77
|
-
r(e),t.$$.on_mount=[]})),c.forEach(
|
|
84
|
+
r(e),t.$$.on_mount=[]})),c.forEach(A)}(e,s.target,s.anchor,s.customElement),N()}var m,b;T(p)}let F;"function"==typeof HTMLElement&&(F=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(i);
|
|
78
85
|
// @ts-ignore todo: improve typings
|
|
79
86
|
for(const t in this.$$.slotted)
|
|
80
87
|
// @ts-ignore todo: improve typings
|
|
81
|
-
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){
|
|
88
|
+
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){M(this,1),this.$destroy=t}$on(e,n){
|
|
82
89
|
// TODO should this delegate to addEventListener?
|
|
83
|
-
if(!i(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.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)}});const
|
|
84
|
-
/* eslint-disable quote-props */,
|
|
90
|
+
if(!i(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.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)}});const K=t=>j[t]
|
|
91
|
+
/* eslint-disable quote-props */,j={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"ман",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"};
|
|
85
92
|
/******************************************************************************
|
|
86
93
|
Copyright (c) Microsoft Corporation.
|
|
87
94
|
|
|
@@ -96,7 +103,7 @@ if(!i(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return
|
|
|
96
103
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
97
104
|
PERFORMANCE OF THIS SOFTWARE.
|
|
98
105
|
***************************************************************************** */
|
|
99
|
-
function
|
|
106
|
+
function G(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}"function"==typeof SuppressedError&&SuppressedError;const I=(t,e="")=>({part:t,class:[t,e].join(" ")}),U=async(t,e={})=>{let n;return n=await fetch(t,e),n=await n.json(),n};var Z,V,W,Y;!function(t){t.claimable="claimable",t.active="active",t.completed="completed",t.forfeited="forfeited",t.expired="expired",t.released="released",t.closed="closed"}(Z||(Z={})),function(t){t.standard="standard",t.freeBet="freeBet",t.freeRound="freeRound",t.tournamentTicket="tournamentTicket",t.oddsBoost="oddsBoost",t.cashBack="cashBack"}(V||(V={})),function(t){t.Money="money",t.BetCount="betcount"}(W||(W={})),function(t){t.en="en",t["zh-hk"]="zh-hk"}(Y||(Y={}));var X="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(t,e,n){t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}((function(t,e){
|
|
100
107
|
/** @license
|
|
101
108
|
* eventsource.js
|
|
102
109
|
* Available under MIT License (MIT)
|
|
@@ -116,7 +123,7 @@ i=function(){return new a("Microsoft.XMLHTTP")}),null==Object.create&&(Object.cr
|
|
|
116
123
|
// IE, Edge
|
|
117
124
|
null!=h&&null!=p&&function(){try{return"test"===(new h).decode((new p).encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}()||(h=m);var b=function(){};function $(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=b}function v(t){return t.replace(/[A-Z]/g,(function(t){return String.fromCharCode(t.charCodeAt(0)+32)}))}function w(t){for(
|
|
118
125
|
// Get headers: implemented according to mozilla's example code: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders#Example
|
|
119
|
-
var e=Object.create(null),n=t.split("\r\n"),o=0;o<n.length;o+=1){var r=n[o].split(": "),i=r.shift(),s=r.join(": ");e[v(i)]=s}this._map=e}function T(){}function E(t){this._headers=t}function
|
|
126
|
+
var e=Object.create(null),n=t.split("\r\n"),o=0;o<n.length;o+=1){var r=n[o].split(": "),i=r.shift(),s=r.join(": ");e[v(i)]=s}this._map=e}function T(){}function E(t){this._headers=t}function S(){}function C(){this._listeners=Object.create(null)}function x(t){o((function(){throw t}),0)}function D(t){this.type=t,this.target=void 0}function R(t,e){D.call(this,t),this.data=e.data,this.lastEventId=e.lastEventId}function _(t,e){D.call(this,t),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers}function A(t,e){D.call(this,t),this.error=e.error}$.prototype.open=function(t,e){this._abort(!0);var n=this,s=this._xhr,a=1,c=0;this._abort=function(t){0!==n._sendTimeout&&(r(n._sendTimeout),n._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,s.onload=b,s.onerror=b,s.onabort=b,s.onprogress=b,s.onreadystatechange=b,
|
|
120
127
|
// IE 8 - 9: XDomainRequest#abort() does not fire any event
|
|
121
128
|
// Opera < 10: XMLHttpRequest#abort() does not fire any event
|
|
122
129
|
s.abort(),0!==c&&(r(c),c=0),t||(n.readyState=4,n.onabort(null),n.onreadystatechange())),a=0};var l=function(){if(1===a){
|
|
@@ -163,35 +170,35 @@ if("ontimeout"in i.prototype&&("sendAsBinary"in i.prototype||"mozAnon"in i.proto
|
|
|
163
170
|
t.send(void 0)}catch(t){
|
|
164
171
|
// Safari 5.1.7, Opera 12
|
|
165
172
|
throw t}}else{var e=this;e._sendTimeout=o((function(){e._sendTimeout=0,e.send()}),4)}},w.prototype.get=function(t){return this._map[v(t)]},null!=i&&null==i.HEADERS_RECEIVED&&(// IE < 9, Firefox 3.6
|
|
166
|
-
i.HEADERS_RECEIVED=2),T.prototype.open=function(t,e,n,o,r,s,a){t.open("GET",r);var c=0;for(var l in t.onprogress=function(){var e=t.responseText.slice(c);c+=e.length,n(e)},t.onerror=function(t){t.preventDefault(),o(new Error("NetworkError"))},t.onload=function(){o(null)},t.onabort=function(){o(null)},t.onreadystatechange=function(){if(t.readyState===i.HEADERS_RECEIVED){var n=t.status,o=t.statusText,r=t.getResponseHeader("Content-Type"),s=t.getAllResponseHeaders();e(n,o,r,new w(s))}},t.withCredentials=s,a)Object.prototype.hasOwnProperty.call(a,l)&&t.setRequestHeader(l,a[l]);return t.send(),t},E.prototype.get=function(t){return this._headers.get(t)},
|
|
173
|
+
i.HEADERS_RECEIVED=2),T.prototype.open=function(t,e,n,o,r,s,a){t.open("GET",r);var c=0;for(var l in t.onprogress=function(){var e=t.responseText.slice(c);c+=e.length,n(e)},t.onerror=function(t){t.preventDefault(),o(new Error("NetworkError"))},t.onload=function(){o(null)},t.onabort=function(){o(null)},t.onreadystatechange=function(){if(t.readyState===i.HEADERS_RECEIVED){var n=t.status,o=t.statusText,r=t.getResponseHeader("Content-Type"),s=t.getAllResponseHeaders();e(n,o,r,new w(s))}},t.withCredentials=s,a)Object.prototype.hasOwnProperty.call(a,l)&&t.setRequestHeader(l,a[l]);return t.send(),t},E.prototype.get=function(t){return this._headers.get(t)},S.prototype.open=function(t,e,n,o,r,i,s){var a=null,c=new g,l=c.signal,f=new h;return d(r,{headers:s,credentials:i?"include":"same-origin",signal:l,cache:"no-store"}).then((function(t){
|
|
167
174
|
// see https://github.com/promises-aplus/promises-spec/issues/179
|
|
168
175
|
return a=t.body.getReader(),e(t.status,t.statusText,t.headers.get("Content-Type"),new E(t.headers)),new u((function(t,e){var o=function(){a.read().then((function(e){if(e.done)
|
|
169
176
|
//Note: bytes in textDecoder are ignored
|
|
170
|
-
t(void 0);else{var r=f.decode(e.value,{stream:!0});n(r),o()}})).catch((function(t){e(t)}))};o()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){o(t)})),{abort:function(){null!=a&&a.cancel(),c.abort()}}},
|
|
177
|
+
t(void 0);else{var r=f.decode(e.value,{stream:!0});n(r),o()}})).catch((function(t){e(t)}))};o()}))})).catch((function(t){return"AbortError"===t.name?void 0:t})).then((function(t){o(t)})),{abort:function(){null!=a&&a.cancel(),c.abort()}}},C.prototype.dispatchEvent=function(t){t.target=this;var e=this._listeners[t.type];if(null!=e)for(var n=e.length,o=0;o<n;o+=1){var r=e[o];try{"function"==typeof r.handleEvent?r.handleEvent(t):r.call(this,t)}catch(t){x(t)}}},C.prototype.addEventListener=function(t,e){t=String(t);var n=this._listeners,o=n[t];null==o&&(o=[],n[t]=o);for(var r=!1,i=0;i<o.length;i+=1)o[i]===e&&(r=!0);r||o.push(e)},C.prototype.removeEventListener=function(t,e){t=String(t);var n=this._listeners,o=n[t];if(null!=o){for(var r=[],i=0;i<o.length;i+=1)o[i]!==e&&r.push(o[i]);0===r.length?delete n[t]:n[t]=r}},R.prototype=Object.create(D.prototype),_.prototype=Object.create(D.prototype),A.prototype=Object.create(D.prototype);var O=-1,P=0,N=1,B=2,L=-1,M=0,k=1,H=2,F=3,K=/^text\/event\-stream(;.*)?$/i,j=function(t,e){var n=null==t?e:parseInt(t,10);return n!=n&&(n=e),G(n)},G=function(t){return Math.min(Math.max(t,1e3),18e6)},I=function(t,e,n){try{"function"==typeof e&&e.call(t,n)}catch(t){x(t)}};function U(t,e){C.call(this),e=e||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,function(t,e,n){e=String(e);var a=Boolean(n.withCredentials),c=n.lastEventIdQueryParameterName||"lastEventId",l=G(1e3),u=j(n.heartbeatTimeout,45e3),d="",f=l,h=!1,p=0,g=n.headers||{},y=n.Transport,m=Z&&null==y?void 0:new $(null!=y?new y:null!=i&&"withCredentials"in i.prototype||null==s?new i:new s),b=null!=y&&"string"!=typeof y?new y:null==m?new S:new T,v=void 0,w=0,E=O,C="",x="",D="",U="",V=M,W=0,Y=0,X=function(e,n,o,r){if(E===P)if(200===e&&null!=o&&K.test(o)){E=N,h=Date.now(),f=l,t.readyState=N;var i=new _("open",{status:e,statusText:n,headers:r});t.dispatchEvent(i),I(t,t.onopen,i)}else{var s="";200!==e?(n&&(n=n.replace(/\s+/g," ")),s="EventSource's response has a status "+e+" "+n+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(null==o?"-":o.replace(/\s+/g," "))+". Aborting the connection.",z();i=new _("error",{status:e,statusText:n,headers:r});t.dispatchEvent(i),I(t,t.onerror,i),console.error(s)}},q=function(e){if(E===N){for(var n=-1,i=0;i<e.length;i+=1){(c=e.charCodeAt(i))!=="\n".charCodeAt(0)&&c!=="\r".charCodeAt(0)||(n=i)}var s=(-1!==n?U:"")+e.slice(0,n+1);U=(-1===n?U:"")+e.slice(n+1),""!==e&&(h=Date.now(),p+=e.length);for(var a=0;a<s.length;a+=1){var c=s.charCodeAt(a);if(V===L&&c==="\n".charCodeAt(0))V=M;else if(V===L&&(V=M),c==="\r".charCodeAt(0)||c==="\n".charCodeAt(0)){if(V!==M){V===k&&(Y=a+1);var g=s.slice(W,Y-1),y=s.slice(Y+(Y<a&&s.charCodeAt(Y)===" ".charCodeAt(0)?1:0),a);"data"===g?(C+="\n",C+=y):"id"===g?x=y:"event"===g?D=y:"retry"===g?(l=j(y,l),f=l):"heartbeatTimeout"===g&&(u=j(y,u),0!==w&&(r(w),w=o((function(){Q()}),u)))}if(V===M){if(""!==C){d=x,""===D&&(D="message");var m=new R(D,{data:C.slice(1),lastEventId:x});if(t.dispatchEvent(m),"open"===D?I(t,t.onopen,m):"message"===D?I(t,t.onmessage,m):"error"===D&&I(t,t.onerror,m),E===B)return}C="",D=""}V=c==="\r".charCodeAt(0)?L:M}else V===M&&(W=a,V=k),V===k?c===":".charCodeAt(0)&&(Y=a+1,V=H):V===H&&(V=F)}}},J=function(e){if(E===N||E===P){E=O,0!==w&&(r(w),w=0),w=o((function(){Q()}),f),f=G(Math.min(16*l,2*f)),t.readyState=P;var n=new A("error",{error:e});t.dispatchEvent(n),I(t,t.onerror,n),null!=e&&console.error(e)}},z=function(){E=B,null!=v&&(v.abort(),v=void 0),0!==w&&(r(w),w=0),t.readyState=B},Q=function(){if(w=0,E===O){h=!1,p=0,w=o((function(){Q()}),u),E=P,C="",D="",x=d,U="",W=0,Y=0,V=M;
|
|
171
178
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=428916
|
|
172
179
|
// Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.
|
|
173
180
|
var n=e;if("data:"!==e.slice(0,5)&&"blob:"!==e.slice(0,5)&&""!==d){
|
|
174
181
|
// Remove the lastEventId parameter if it's already part of the request URL.
|
|
175
182
|
var r=e.indexOf("?");n=-1===r?e:e.slice(0,r+1)+e.slice(r+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(t,e){return e===c?"":t})),
|
|
176
183
|
// Append the current lastEventId to the request URL.
|
|
177
|
-
n+=(-1===e.indexOf("?")?"?":"&")+c+"="+encodeURIComponent(d)}var i=t.withCredentials,s={Accept:"text/event-stream"},a=t.headers;if(null!=a)for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(s[l]=a[l]);try{v=b.open(m,X,q,J,n,i,s)}catch(t){throw z(),t}}else if(h||null==v){var f=Math.max((h||Date.now())+u-Date.now(),1);h=!1,w=o((function(){Q()}),f)}else J(new Error("No activity within "+u+" milliseconds. "+(E===P?"No response received.":p+" chars received.")+" Reconnecting.")),null!=v&&(v.abort(),v=void 0)};t.url=e,t.readyState=P,t.withCredentials=a,t.headers=g,t._close=z,Q()}(this,t,e)}var Z=null!=d&&null!=f&&"body"in f.prototype;U.prototype=Object.create(
|
|
184
|
+
n+=(-1===e.indexOf("?")?"?":"&")+c+"="+encodeURIComponent(d)}var i=t.withCredentials,s={Accept:"text/event-stream"},a=t.headers;if(null!=a)for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(s[l]=a[l]);try{v=b.open(m,X,q,J,n,i,s)}catch(t){throw z(),t}}else if(h||null==v){var f=Math.max((h||Date.now())+u-Date.now(),1);h=!1,w=o((function(){Q()}),f)}else J(new Error("No activity within "+u+" milliseconds. "+(E===P?"No response received.":p+" chars received.")+" Reconnecting.")),null!=v&&(v.abort(),v=void 0)};t.url=e,t.readyState=P,t.withCredentials=a,t.headers=g,t._close=z,Q()}(this,t,e)}var Z=null!=d&&null!=f&&"body"in f.prototype;U.prototype=Object.create(C.prototype),U.prototype.CONNECTING=P,U.prototype.OPEN=N,U.prototype.CLOSED=B,U.prototype.close=function(){this._close()},U.CONNECTING=P,U.OPEN=N,U.CLOSED=B,U.prototype.withCredentials=void 0;var V,W=c;null==i||null!=c&&"withCredentials"in c.prototype||(
|
|
178
185
|
// Why replace a native EventSource ?
|
|
179
186
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=444328
|
|
180
187
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=831392
|
|
181
188
|
// https://code.google.com/p/chromium/issues/detail?id=260144
|
|
182
189
|
// https://code.google.com/p/chromium/issues/detail?id=225654
|
|
183
190
|
// ...
|
|
184
|
-
W=U),V=function(t){t.EventSourcePolyfill=U,t.NativeEventSource=c,t.EventSource=W}(e),void 0!==V&&(t.exports=V)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:
|
|
185
|
-
/* src/CasinoWageringDetailController.svelte generated by Svelte v3.
|
|
191
|
+
W=U),V=function(t){t.EventSourcePolyfill=U,t.NativeEventSource=c,t.EventSource=W}(e),void 0!==V&&(t.exports=V)}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:X:globalThis)}));const q=async(t,e,n={})=>{const{limit:o,lang:r,status:i}=n,s=G(n,["limit","lang","status"]),a=Object.assign(Object.assign({type:"wagering",pagination:`limit=${o||50},offset=0`,language:r},i&&i!==Z.claimable?{status:i}:{}),s),c=i===Z.claimable?"claimable":"granted",l=new URL(`${t}/bonus/${c}`);return Object.keys(a).map((t=>{l.searchParams.append(t,a[t])})),await U(l,{headers:Object.assign({},e?{"x-SessionId":e}:{})})},J=(t,e)=>{switch(e.type){case V.standard:case V.freeBet:return((t,e)=>{let n;switch(e.type){case V.standard:n="bonus money";break;case V.freeBet:n="Free Bet"}const o=K(Object.keys(t.increment)[0]);return"percentage"===e.mode?`${100*e.bonusAmount}% up to ${o}${e.capAmount} ${n}`:"fixed"===e.mode?`${o}${e.bonusAmount} ${n}`:void 0})(t,e);case V.freeRound:return`${e.freespinNumber} Free Spins`;case V.tournamentTicket:return"Enroll to Tournament Ticket";case V.oddsBoost:return"Enroll to Odds Boost";case V.cashBack:return"Enroll to Cash Back"}};var z;!function(t){t.Locked="Locked",t.InProgress="InProgress",t.Completed="Completed"}(z||(z={}));const Q=(t,e,n)=>((t,e)=>{switch(t){case Z.completed:case Z.released:return e.completed();case Z.active:case Z.expired:case Z.closed:case Z.forfeited:return e.current();default:throw new Error(`unknown Bonus Status: ${t}`)}})(t.status,{completed:()=>z.Completed,current:()=>{if("number"==typeof n){if(e<Number(n))return z.Completed;if(e===Number(n))return z.InProgress;if(e>Number(n))return z.Locked}return z.Locked}});
|
|
192
|
+
/* src/CasinoWageringDetailController.svelte generated by Svelte v3.59.2 */function tt(t,e,n){const o=t.slice();return o[11]=e[n],o[13]=n,o}function et(t,e,n){const o=t.slice();return o[14]=e[n],o}
|
|
186
193
|
// (53:2) {#if bonus}
|
|
187
|
-
function
|
|
194
|
+
function nt(t){let e,n,o,r,i,s=/*levels*/t[0],a=[];for(let e=0;e<s.length;e+=1)a[e]=it(tt(t,s,e));return{c(){e=f("div"),n=f("table"),o=f("thead"),o.innerHTML="<tr><th>Level</th> \n <th>Target</th> \n <th>Status</th> \n <th>Rewards</th></tr>",r=p(),i=f("tbody");for(let t=0;t<a.length;t+=1)a[t].c();var t,s,c,l;t=e,s="margin-top",null==(c="10px")?t.style.removeProperty(s):t.style.setProperty(s,c,l?"important":"")},m(t,s){l(t,e,s),c(e,n),c(n,o),c(n,r),c(n,i);for(let t=0;t<a.length;t+=1)a[t]&&a[t].m(i,null)},p(t,e){if(/*classWithPart, levels, levelBonusMapper, getUserStautsText, bonus, currentlevel, Object, getCurrencySymbol*/7&e){let n;for(s=/*levels*/t[0],n=0;n<s.length;n+=1){const o=tt(t,s,n);a[n]?a[n].p(o,e):(a[n]=it(o),a[n].c(),a[n].m(i,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=s.length}},d(t){t&&u(e),d(a,t)}}}
|
|
188
195
|
// (50:0) {#if isLoading}
|
|
189
|
-
function
|
|
196
|
+
function ot(e){let n;return{c(){n=h("Loading...")},m(t,e){l(t,n,e)},p:t,d(t){t&&u(n)}}}
|
|
190
197
|
// (75:14) {#each level.bonuses as levelBonus}
|
|
191
|
-
function
|
|
198
|
+
function rt(t){let e,n,o=J(/*level*/t[11],/*levelBonus*/t[14])+"";return{c(){e=f("p"),n=h(o)},m(t,o){l(t,e,o),c(e,n)},p(t,e){/*levels*/1&e&&o!==(o=J(/*level*/t[11],/*levelBonus*/t[14])+"")&&b(n,o)},d(t){t&&u(e)}}}
|
|
192
199
|
// (65:10) {#each levels as level,index}
|
|
193
|
-
function
|
|
194
|
-
return t[9](/*level*/t[11])}let _=[
|
|
195
|
-
return t[3]?
|
|
196
|
-
let c,l,u=[],d=!1;const f=async()=>{var t;if(!(a&&i&&r&&o))return;n(3,d=!0);const e=await
|
|
200
|
+
function it(t){let n,o,r,i,s,a,g,y,b,v,w,T,E=/*index*/t[13]+1+"",S=`Play for ${R()} in total`,C=Q(/*bonus*/t[2],/*index*/t[13],/*currentlevel*/t[1])+"",x=[I("Level","center")],D={};for(let t=0;t<x.length;t+=1)D=e(D,x[t]);function R(){/*func*/
|
|
201
|
+
return t[9](/*level*/t[11])}let _=[I("Target")],A={};for(let t=0;t<_.length;t+=1)A=e(A,_[t]);let O=[I("Status","center")],P={};for(let t=0;t<O.length;t+=1)P=e(P,O[t]);let N=/*level*/t[11].bonuses,B=[];for(let e=0;e<N.length;e+=1)B[e]=rt(et(t,N,e));let L=[I("Reward")],M={};for(let t=0;t<L.length;t+=1)M=e(M,L[t]);return{c(){n=f("tr"),o=f("td"),r=h(E),i=p(),s=f("td"),a=h(S),g=p(),y=f("td"),b=h(C),v=p(),w=f("td");for(let t=0;t<B.length;t+=1)B[t].c();T=p(),m(o,D),m(s,A),m(y,P),m(w,M)},m(t,e){l(t,n,e),c(n,o),c(o,r),c(n,i),c(n,s),c(s,a),c(n,g),c(n,y),c(y,b),c(n,v),c(n,w);for(let t=0;t<B.length;t+=1)B[t]&&B[t].m(w,null);c(n,T)},p(e,n){if(t=e,/*levels*/1&n&&S!==(S=`Play for ${R()} in total`)&&$(a,S,A.contenteditable),/*bonus, currentlevel*/6&n&&C!==(C=Q(/*bonus*/t[2],/*index*/t[13],/*currentlevel*/t[1])+"")&&$(b,C,P.contenteditable),/*levelBonusMapper, levels*/1&n){let e;for(N=/*level*/t[11].bonuses,e=0;e<N.length;e+=1){const o=et(t,N,e);B[e]?B[e].p(o,n):(B[e]=rt(o),B[e].c(),B[e].m(w,null))}for(;e<B.length;e+=1)B[e].d(1);B.length=N.length}},d(t){t&&u(n),d(B,t)}}}function st(e){let n;function o(t,e){/*isLoading*/
|
|
202
|
+
return t[3]?ot:/*bonus*/t[2]?nt:void 0}let r=o(e),i=r&&r(e);return{c(){i&&i.c(),n=h(""),this.c=t},m(t,e){i&&i.m(t,e),l(t,n,e)},p(t,[e]){r===(r=o(t))&&i?i.p(t,e):(i&&i.d(1),i=r&&r(t),i&&(i.c(),i.m(n.parentNode,n)))},i:t,o:t,d(t){i&&i.d(t),t&&u(n)}}}function at(t,e,n){let{endpoint:o=""}=e,{bonuswalletid:r=""}=e,{lang:i="en"}=e,{session:s=""}=e,a=!1;E((()=>(n(8,a=!0),()=>{n(8,a=!1)})));
|
|
203
|
+
let c,l,u=[],d=!1;const f=async()=>{var t;if(!(a&&i&&r&&o))return;n(3,d=!0);const e=await q(o,s,{lang:i,bonusWalletId:r});if(!e.success)throw new Error(e.errorMessage);n(2,l=e.items.find((t=>t.bonusWalletID==r))),n(0,u=(t=>{const e=[];return t.map((t=>{const{maxRepeats:n,completedTime:o}=t,r=G(t,["maxRepeats","completedTime"]);for(let t=0;t<n;t++)e.push(Object.assign({},r))})),e})(l.levels)),n(1,c=(null===(t=l.wageringProgress)||void 0===t?void 0:t.currentLevel)-1),n(3,d=!1)};return t.$$set=t=>{"endpoint"in t&&n(4,o=t.endpoint),"bonuswalletid"in t&&n(5,r=t.bonuswalletid),"lang"in t&&n(6,i=t.lang),"session"in t&&n(7,s=t.session)},t.$$.update=()=>{/*isMounted*/256&t.$$.dirty&&a&&f(),/*lang*/64&t.$$.dirty&&i&&f(),/*endpoint*/16&t.$$.dirty&&o&&f(),/*bonuswalletid*/32&t.$$.dirty&&r&&f(),/*session*/128&t.$$.dirty&&s&&f()},[u,c,l,d,o,r,i,s,a,t=>{const e=Object.keys(t.increment)[0],n=t.increment[e];return`${K(e)}${n}`}]}class ct extends F{constructor(t){super();const e=document.createElement("style");e.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}table{width:100%}table td{padding:10px;width:20%}table th{padding:10px;background:#4E5662;color:#FFFFFF}.center{text-align:center}.Reward{color:#00AEEF}",this.shadowRoot.appendChild(e),H(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},at,st,s,{endpoint:4,bonuswalletid:5,lang:6,session:7},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["endpoint","bonuswalletid","lang","session"]}get endpoint(){return this.$$.ctx[4]}set endpoint(t){this.$$set({endpoint:t}),N()}get bonuswalletid(){return this.$$.ctx[5]}set bonuswalletid(t){this.$$set({bonuswalletid:t}),N()}get lang(){return this.$$.ctx[6]}set lang(t){this.$$set({lang:t}),N()}get session(){return this.$$.ctx[7]}set session(t){this.$$set({session:t}),N()}}return!customElements.get("casino-wagering-detail-controller")&&customElements.define("casino-wagering-detail-controller",ct),ct}));
|
|
197
204
|
//# sourceMappingURL=casino-wagering-detail-controller.js.map
|