@everymatrix/casino-wagering-detail-controller 1.9.1 → 1.10.1
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,18 @@
|
|
|
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}function
|
|
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)}function y(t,e){
|
|
4
4
|
// @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]:
|
|
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 m(t,e){e=""+e,t.data!==e&&(t.data=e)}function b(t,e,n){~a.indexOf(n)?function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(t,e):m(t,e)}function $(t){const e={};for(const n of t)e[n.name]=n.value;return e}let v;function w(t){v=t}
|
|
6
|
+
/**
|
|
7
|
+
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
8
|
+
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
9
|
+
* it can be called from an external module).
|
|
10
|
+
*
|
|
11
|
+
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
12
|
+
*
|
|
13
|
+
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
14
|
+
*/
|
|
15
|
+
function T(t){(function(){if(!v)throw new Error("Function called outside component initialization");return v})().$$.on_mount.push(t)}const E=[],C=[];let S=[];const D=[],R=Promise.resolve();let x=!1;function _(t){S.push(t)}
|
|
6
16
|
// flush() calls callbacks in this order:
|
|
7
17
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
8
18
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -21,43 +31,56 @@ const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o
|
|
|
21
31
|
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
22
32
|
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
23
33
|
// function, guarantees this behavior.
|
|
24
|
-
const
|
|
25
|
-
function
|
|
34
|
+
const A=new Set;let O=0;// Do *not* move this inside the flush() function
|
|
35
|
+
function P(){
|
|
36
|
+
// Do not reenter flush while dirty components are updated, as this can
|
|
37
|
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
38
|
+
// Reentrancy is ok afterwards for bindings etc.
|
|
39
|
+
if(0!==O)return;const t=v;do{
|
|
26
40
|
// first, call beforeUpdate functions
|
|
27
41
|
// and update components
|
|
28
|
-
for(;
|
|
42
|
+
try{for(;O<E.length;){const t=E[O];O++,w(t),N(t.$$)}}catch(t){
|
|
43
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
44
|
+
throw E.length=0,O=0,t}for(w(null),E.length=0,O=0;C.length;)C.pop()();
|
|
29
45
|
// then, once components are updated, call
|
|
30
46
|
// afterUpdate functions. This may cause
|
|
31
47
|
// subsequent updates...
|
|
32
|
-
for(let t=0;t<
|
|
48
|
+
for(let t=0;t<S.length;t+=1){const e=S[t];A.has(e)||(
|
|
33
49
|
// ...so guard against infinite loops
|
|
34
|
-
|
|
50
|
+
A.add(e),e())}S.length=0}while(E.length);for(;D.length;)D.pop()();x=!1,A.clear(),w(t)}function N(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(_)}}
|
|
51
|
+
/**
|
|
52
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
53
|
+
*/const B=new Set;function L(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];S.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),S=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
54
|
+
// TODO null out other refs, including component.$$ (but need to
|
|
55
|
+
// preserve final state?)
|
|
56
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function M(t,e){-1===t.$$.dirty[0]&&(E.push(t),x||(x=!0,R.then(P)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function k(e,s,a,c,l,d,f,h=[-1]){const p=v;w(e);const g=e.$$={fragment:null,ctx:[],
|
|
35
57
|
// state
|
|
36
|
-
props:d,update:t,not_equal:
|
|
58
|
+
props:d,update:t,not_equal:l,bound:o(),
|
|
37
59
|
// lifecycle
|
|
38
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(
|
|
60
|
+
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(p?p.$$.context:[])),
|
|
39
61
|
// everything else
|
|
40
|
-
callbacks:o(),dirty:
|
|
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&&M(e,t)),n})):[],g.update(),y=!0,r(g.before_update),
|
|
41
63
|
// `false` as a special case of no DOM component
|
|
42
64
|
g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
43
65
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
44
|
-
g.fragment&&g.fragment.l(t),t.forEach(
|
|
66
|
+
g.fragment&&g.fragment.l(t),t.forEach(u)}else
|
|
45
67
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
46
|
-
g.fragment&&g.fragment.c();s.intro&&((m=e.$$.fragment)&&m.i&&(
|
|
68
|
+
g.fragment&&g.fragment.c();s.intro&&((m=e.$$.fragment)&&m.i&&(B.delete(m),m.i(b))),function(t,e,o,s){const{fragment:a,after_update:c}=t.$$;a&&a.m(e,o),s||
|
|
47
69
|
// onMount happens before the initial afterUpdate
|
|
48
|
-
|
|
70
|
+
_((()=>{const e=t.$$.on_mount.map(n).filter(i);
|
|
71
|
+
// if the component was destroyed immediately
|
|
72
|
+
// it will update the `$$.on_destroy` reference to `null`.
|
|
73
|
+
// the destructured on_destroy may still reference to the old array
|
|
74
|
+
t.$$.on_destroy?t.$$.on_destroy.push(...e):
|
|
49
75
|
// Edge case - component was destroyed immediately,
|
|
50
76
|
// most likely as a result of a binding initialising
|
|
51
|
-
r(e),t.$$.on_mount=[]})),
|
|
77
|
+
r(e),t.$$.on_mount=[]})),c.forEach(_)}(e,s.target,s.anchor,s.customElement),P()}var m,b;w(p)}let H;"function"==typeof HTMLElement&&(H=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(i);
|
|
52
78
|
// @ts-ignore todo: improve typings
|
|
53
79
|
for(const t in this.$$.slotted)
|
|
54
80
|
// @ts-ignore todo: improve typings
|
|
55
|
-
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){
|
|
56
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
57
|
-
// preserve final state?)
|
|
58
|
-
n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){
|
|
81
|
+
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){L(this,1),this.$destroy=t}$on(e,n){
|
|
59
82
|
// TODO should this delegate to addEventListener?
|
|
60
|
-
const
|
|
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 F=t=>K[t]
|
|
61
84
|
/* eslint-disable quote-props */,K={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$"};
|
|
62
85
|
/******************************************************************************
|
|
63
86
|
Copyright (c) Microsoft Corporation.
|
|
@@ -73,7 +96,7 @@ const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{co
|
|
|
73
96
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
74
97
|
PERFORMANCE OF THIS SOFTWARE.
|
|
75
98
|
***************************************************************************** */
|
|
76
|
-
function
|
|
99
|
+
function j(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}const G=(t,e="")=>({part:t,class:[t,e].join(" ")}),I=async(t,e={})=>{let n;return n=await fetch(t,e),n=await n.json(),n};var U,Z,V,W;!function(t){t.claimable="claimable",t.active="active",t.completed="completed",t.forfeited="forfeited",t.expired="expired",t.released="released",t.closed="closed"}(U||(U={})),function(t){t.standard="standard",t.freeBet="freeBet",t.freeRound="freeRound",t.tournamentTicket="tournamentTicket",t.oddsBoost="oddsBoost",t.cashBack="cashBack"}(Z||(Z={})),function(t){t.Money="money",t.BetCount="betcount"}(V||(V={})),function(t){t.en="en",t["zh-hk"]="zh-hk"}(W||(W={}));var Y="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){
|
|
77
100
|
/** @license
|
|
78
101
|
* eventsource.js
|
|
79
102
|
* Available under MIT License (MIT)
|
|
@@ -81,7 +104,7 @@ function H(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o
|
|
|
81
104
|
*/
|
|
82
105
|
/*jslint indent: 2, vars: true, plusplus: true */
|
|
83
106
|
/*global setTimeout, clearTimeout */
|
|
84
|
-
!function(n){var o=n.setTimeout,r=n.clearTimeout,i=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,d=n.fetch,f=n.Response,
|
|
107
|
+
!function(n){var o=n.setTimeout,r=n.clearTimeout,i=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,d=n.fetch,f=n.Response,h=n.TextDecoder,p=n.TextEncoder,g=n.AbortController;
|
|
85
108
|
// see #118 (Promise#finally with polyfilled Promise)
|
|
86
109
|
// see #123 (data URLs crash Edge)
|
|
87
110
|
// see #125 (CSP violations)
|
|
@@ -91,9 +114,9 @@ if("undefined"==typeof window||void 0===l||"readyState"in l||null!=l.body||(// F
|
|
|
91
114
|
l.readyState="loading",window.addEventListener("load",(function(t){l.readyState="complete"}),!1)),null==i&&null!=a&&(// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest_in_IE6
|
|
92
115
|
i=function(){return new a("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==g){var y=d;d=function(t,e){var n=e.signal;return y(t,{headers:e.headers,credentials:e.credentials,cache:e.cache}).then((function(t){var e=t.body.getReader();return n._reader=e,n._aborted&&n._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return e}}}}))},g=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function m(){this.bitsNeeded=0,this.codePoint=0}m.prototype.decode=function(t){function e(t,e,n){if(1===n)return t>=128>>e&&t<<e<=2047;if(2===n)return t>=2048>>e&&t<<e<=55295||t>=57344>>e&&t<<e<=65535;if(3===n)return t>=65536>>e&&t<<e<=1114111;throw new Error}function n(t,e){if(6===t)return e>>6>15?3:e>31?2:1;if(12===t)return e>15?3:2;if(18===t)return 3;throw new Error}for(var o=65533,r="",i=this.bitsNeeded,s=this.codePoint,a=0;a<t.length;a+=1){var c=t[a];0!==i&&(c<128||c>191||!e(s<<6|63&c,i-6,n(i,s)))&&(i=0,s=o,r+=String.fromCharCode(s)),0===i?(c>=0&&c<=127?(i=0,s=c):c>=192&&c<=223?(i=6,s=31&c):c>=224&&c<=239?(i=12,s=15&c):c>=240&&c<=247?(i=18,s=7&c):(i=0,s=o),0===i||e(s,i,n(i,s))||(i=0,s=o)):(i-=6,s=s<<6|63&c),0===i&&(s<=65535?r+=String.fromCharCode(s):(r+=String.fromCharCode(55296+(s-65535-1>>10)),r+=String.fromCharCode(56320+(s-65535-1&1023))))}return this.bitsNeeded=i,this.codePoint=s,r};
|
|
93
116
|
// IE, Edge
|
|
94
|
-
null!=
|
|
117
|
+
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(
|
|
95
118
|
// Get headers: implemented according to mozilla's example code: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders#Example
|
|
96
|
-
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[
|
|
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 C(){}function S(){this._listeners=Object.create(null)}function D(t){o((function(){throw t}),0)}function R(t){this.type=t,this.target=void 0}function x(t,e){R.call(this,t),this.data=e.data,this.lastEventId=e.lastEventId}function _(t,e){R.call(this,t),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers}function A(t,e){R.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,
|
|
97
120
|
// IE 8 - 9: XDomainRequest#abort() does not fire any event
|
|
98
121
|
// Opera < 10: XMLHttpRequest#abort() does not fire any event
|
|
99
122
|
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){
|
|
@@ -128,9 +151,9 @@ u(),1===a||2===a||3===a){if(a=4,0!==c&&(r(c),c=0),n.readyState=4,"load"===t)n.on
|
|
|
128
151
|
u():2===s.readyState&&l())}(t)}),!("contentType"in s)&&"ontimeout"in i.prototype||(e+=(-1===e.indexOf("?")?"?":"&")+"padding=true"),s.open(t,e,!0),"readyState"in s&&(
|
|
129
152
|
// workaround for Opera 12 issue with "progress" events
|
|
130
153
|
// #91 (XMLHttpRequest onprogress not fired for streaming response in Edge 14-15-?)
|
|
131
|
-
c=o((function(){f()}),0))}
|
|
154
|
+
c=o((function(){f()}),0))},$.prototype.abort=function(){this._abort(!1)},$.prototype.getResponseHeader=function(t){return this._contentType},$.prototype.setRequestHeader=function(t,e){var n=this._xhr;"setRequestHeader"in n&&n.setRequestHeader(t,e)},$.prototype.getAllResponseHeaders=function(){
|
|
132
155
|
// XMLHttpRequest#getAllResponseHeaders returns null for CORS requests in Firefox 3.6.28
|
|
133
|
-
return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""}
|
|
156
|
+
return null!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},$.prototype.send=function(){
|
|
134
157
|
// loading indicator in Safari < ? (6), Chrome < 14, Firefox
|
|
135
158
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=736723
|
|
136
159
|
if("ontimeout"in i.prototype&&("sendAsBinary"in i.prototype||"mozAnon"in i.prototype)||null==l||null==l.readyState||"complete"===l.readyState){var t=this._xhr;
|
|
@@ -139,36 +162,36 @@ if("ontimeout"in i.prototype&&("sendAsBinary"in i.prototype||"mozAnon"in i.proto
|
|
|
139
162
|
// xhr.send(); throws "Not enough arguments" in Firefox 3.0
|
|
140
163
|
t.send(void 0)}catch(t){
|
|
141
164
|
// Safari 5.1.7, Opera 12
|
|
142
|
-
throw t}}else{var e=this;e._sendTimeout=o((function(){e._sendTimeout=0,e.send()}),4)}},w.prototype.get=function(t){return this._map[
|
|
143
|
-
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)},
|
|
165
|
+
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)},C.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){
|
|
144
167
|
// see https://github.com/promises-aplus/promises-spec/issues/179
|
|
145
168
|
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)
|
|
146
169
|
//Note: bytes in textDecoder are ignored
|
|
147
|
-
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()}}},
|
|
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()}}},S.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){D(t)}}},S.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)},S.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}},x.prototype=Object.create(R.prototype),_.prototype=Object.create(R.prototype),A.prototype=Object.create(R.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){D(t)}};function U(t,e){S.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 C:new T,v=void 0,w=0,E=O,S="",D="",R="",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?(S+="\n",S+=y):"id"===g?D=y:"event"===g?R=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(""!==S){d=D,""===R&&(R="message");var m=new x(R,{data:S.slice(1),lastEventId:D});if(t.dispatchEvent(m),"open"===R?I(t,t.onopen,m):"message"===R?I(t,t.onmessage,m):"error"===R&&I(t,t.onerror,m),E===B)return}S="",R=""}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,S="",R="",D=d,U="",W=0,Y=0,V=M;
|
|
148
171
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=428916
|
|
149
172
|
// Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.
|
|
150
173
|
var n=e;if("data:"!==e.slice(0,5)&&"blob:"!==e.slice(0,5)&&""!==d){
|
|
151
174
|
// Remove the lastEventId parameter if it's already part of the request URL.
|
|
152
175
|
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})),
|
|
153
176
|
// Append the current lastEventId to the request URL.
|
|
154
|
-
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{
|
|
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(S.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||(
|
|
155
178
|
// Why replace a native EventSource ?
|
|
156
179
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=444328
|
|
157
180
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=831392
|
|
158
181
|
// https://code.google.com/p/chromium/issues/detail?id=260144
|
|
159
182
|
// https://code.google.com/p/chromium/issues/detail?id=225654
|
|
160
183
|
// ...
|
|
161
|
-
|
|
162
|
-
/* src/CasinoWageringDetailController.svelte generated by Svelte v3.
|
|
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:Y:globalThis)}));const X=async(t,e,n={})=>{const{limit:o,lang:r,status:i}=n,s=j(n,["limit","lang","status"]),a=Object.assign(Object.assign({type:"wagering",pagination:`limit=${o||50},offset=0`,language:r},i&&i!==U.claimable?{status:i}:{}),s),c=i===U.claimable?"claimable":"granted",l=new URL(`${t}/bonus/${c}`);return Object.keys(a).map((t=>{l.searchParams.append(t,a[t])})),await I(l,{headers:Object.assign({},e?{"x-SessionId":e}:{})})},q=(t,e)=>{switch(e.type){case Z.standard:case Z.freeBet:return((t,e)=>{let n;switch(e.type){case Z.standard:n="bonus money";break;case Z.freeBet:n="Free Bet"}const o=F(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 Z.freeRound:return`${e.freespinNumber} Free Spins`;case Z.tournamentTicket:return"Enroll to Tournament Ticket";case Z.oddsBoost:return"Enroll to Odds Boost";case Z.cashBack:return"Enroll to Cash Back"}};var J;!function(t){t.Locked="Locked",t.InProgress="InProgress",t.Completed="Completed"}(J||(J={}));const z=(t,e,n)=>((t,e)=>{switch(t){case U.completed:case U.released:return e.completed();case U.active:case U.expired:case U.closed:case U.forfeited:return e.current();default:throw new Error(`unknown Bonus Status: ${t}`)}})(t.status,{completed:()=>J.Completed,current:()=>{if("number"==typeof n){if(e<Number(n))return J.Completed;if(e===Number(n))return J.InProgress;if(e>Number(n))return J.Locked}return J.Locked}});
|
|
185
|
+
/* src/CasinoWageringDetailController.svelte generated by Svelte v3.58.0 */function Q(t,e,n){const o=t.slice();return o[11]=e[n],o[13]=n,o}function tt(t,e,n){const o=t.slice();return o[14]=e[n],o}
|
|
163
186
|
// (53:2) {#if bonus}
|
|
164
|
-
function
|
|
187
|
+
function et(t){let e,n,o,r,i,s=/*levels*/t[0],a=[];for(let e=0;e<s.length;e+=1)a[e]=rt(Q(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=Q(t,s,n);a[n]?a[n].p(o,e):(a[n]=rt(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)}}}
|
|
165
188
|
// (50:0) {#if isLoading}
|
|
166
|
-
function
|
|
189
|
+
function nt(e){let n;return{c(){n=h("Loading...")},m(t,e){l(t,n,e)},p:t,d(t){t&&u(n)}}}
|
|
167
190
|
// (75:14) {#each level.bonuses as levelBonus}
|
|
168
|
-
function
|
|
191
|
+
function ot(t){let e,n,o=q(/*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=q(/*level*/t[11],/*levelBonus*/t[14])+"")&&m(n,o)},d(t){t&&u(e)}}}
|
|
169
192
|
// (65:10) {#each levels as level,index}
|
|
170
|
-
function
|
|
171
|
-
return t[9](/*level*/t[11])}let
|
|
172
|
-
return t[3]?
|
|
173
|
-
let c,l,u=[],d=!1;const f=async()=>{var t;if(!(a&&i&&r&&o))return;n(3,d=!0);const e=await
|
|
193
|
+
function rt(t){let n,o,r,i,s,a,g,m,$,v,w,T,E=/*index*/t[13]+1+"",C=`Play for ${x()} in total`,S=z(/*bonus*/t[2],/*index*/t[13],/*currentlevel*/t[1])+"",D=[G("Level","center")],R={};for(let t=0;t<D.length;t+=1)R=e(R,D[t]);function x(){/*func*/
|
|
194
|
+
return t[9](/*level*/t[11])}let _=[G("Target")],A={};for(let t=0;t<_.length;t+=1)A=e(A,_[t]);let O=[G("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]=ot(tt(t,N,e));let L=[G("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(C),g=p(),m=f("td"),$=h(S),v=p(),w=f("td");for(let t=0;t<B.length;t+=1)B[t].c();T=p(),y(o,R),y(s,A),y(m,P),y(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,m),c(m,$),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&&C!==(C=`Play for ${x()} in total`)&&b(a,C,A.contenteditable),/*bonus, currentlevel*/6&n&&S!==(S=z(/*bonus*/t[2],/*index*/t[13],/*currentlevel*/t[1])+"")&&b($,S,P.contenteditable),/*levelBonusMapper, levels*/1&n){let e;for(N=/*level*/t[11].bonuses,e=0;e<N.length;e+=1){const o=tt(t,N,e);B[e]?B[e].p(o,n):(B[e]=ot(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 it(e){let n;function o(t,e){/*isLoading*/
|
|
195
|
+
return t[3]?nt:/*bonus*/t[2]?et: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 st(t,e,n){let{endpoint:o=""}=e,{bonuswalletid:r=""}=e,{lang:i="en"}=e,{session:s=""}=e,a=!1;T((()=>(n(8,a=!0),()=>{n(8,a=!1)})));
|
|
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 X(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=j(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`${F(e)}${n}`}]}class at extends H{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}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),k(this,{target:this.shadowRoot,props:$(this.attributes),customElement:!0},st,it,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),P()))}static get observedAttributes(){return["endpoint","bonuswalletid","lang","session"]}get endpoint(){return this.$$.ctx[4]}set endpoint(t){this.$$set({endpoint:t}),P()}get bonuswalletid(){return this.$$.ctx[5]}set bonuswalletid(t){this.$$set({bonuswalletid:t}),P()}get lang(){return this.$$.ctx[6]}set lang(t){this.$$set({lang:t}),P()}get session(){return this.$$.ctx[7]}set session(t){this.$$set({session:t}),P()}}return!customElements.get("casino-wagering-detail-controller")&&customElements.define("casino-wagering-detail-controller",at),at}));
|
|
174
197
|
//# sourceMappingURL=casino-wagering-detail-controller.js.map
|