@everymatrix/casino-categories-providers 1.45.0 → 1.45.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.
@@ -1,485 +0,0 @@
1
- import { a as Q, $ as W, S as X, i as Y, f as M, c as Z, s as $, b as ee, e as b, g as f, j as S, o as I, p as L, q as te, u as le, w as N, t as j, d as C, x as re, k as g, m as A, y as R, z as V, l as J, v as se } from "./CasinoCategories-C0ogDjxI.js";
2
- const U = {
3
- en: {
4
- popularProviders: "Popular Suppliers",
5
- otherProviders: "Other Suppliers",
6
- loading: "Loading, please wait...",
7
- games: "games"
8
- },
9
- "zh-hk": {
10
- popularProviders: "热门供应商",
11
- otherProviders: "其他供应商",
12
- loading: "加载请稍候...",
13
- games: "游戏"
14
- },
15
- de: {
16
- popularProviders: "Beliebte Anbieter",
17
- otherProviders: "Andere Anbieter",
18
- loading: "Es lädt, bitte warten...",
19
- games: "Spiele"
20
- },
21
- it: {
22
- popularProviders: "Popular Suppliers",
23
- otherProviders: "Other Suppliers",
24
- loading: "Loading, please wait",
25
- games: "games"
26
- },
27
- fr: {
28
- popularProviders: "Fournisseurs populaires",
29
- otherProviders: "Autres fournisseurs",
30
- loading: "Chargement, veuillez patienter...",
31
- games: "jeux"
32
- },
33
- es: {
34
- popularProviders: "Proveedores Populares",
35
- otherProviders: "Otros Proveedores",
36
- loading: "Cargando",
37
- games: "juegos"
38
- },
39
- tr: {
40
- popularProviders: "Şimdi Oyna",
41
- otherProviders: "Rastgele oynanacak oyun yok",
42
- loading: "Son arama",
43
- games: "Oyunları Ara"
44
- },
45
- ru: {
46
- popularProviders: "Popular Suppliers",
47
- otherProviders: "Other Suppliers",
48
- loading: "Loading, please wait",
49
- games: "games"
50
- },
51
- ro: {
52
- popularProviders: "Furnizori de top",
53
- otherProviders: "Alti furnizori",
54
- loading: "Se incarca, te rugam asteapta…",
55
- games: "jocuri"
56
- },
57
- hr: {
58
- popularProviders: "Popularni brendovi",
59
- otherProviders: "Ostali brendovi",
60
- loading: "Učitavanje",
61
- games: "Igre"
62
- },
63
- hu: {
64
- popularProviders: "Popular Suppliers",
65
- otherProviders: "Other Suppliers",
66
- loading: "Loading, please wait",
67
- games: "games"
68
- },
69
- pl: {
70
- popularProviders: "Popular Suppliers",
71
- otherProviders: "Other Suppliers",
72
- loading: "Loading, please wait",
73
- games: "games"
74
- },
75
- pt: {
76
- popularProviders: "Popular Suppliers",
77
- otherProviders: "Other Suppliers",
78
- loading: "Loading, please wait",
79
- games: "games"
80
- },
81
- sl: {
82
- popularProviders: "Popular Suppliers",
83
- otherProviders: "Other Suppliers",
84
- loading: "Loading, please wait",
85
- games: "games"
86
- },
87
- sr: {
88
- popularProviders: "Popular Suppliers",
89
- otherProviders: "Other Suppliers",
90
- loading: "Loading, please wait",
91
- games: "games"
92
- },
93
- "pt-br": {
94
- popularProviders: "provedores populares",
95
- otherProviders: "Outros provedores",
96
- Loading: "Carregando",
97
- games: "jogos"
98
- },
99
- "es-mx": {
100
- popularProviders: "Proveedores Populares",
101
- otherProviders: "Otros proveedores",
102
- Loading: "Cargando, por favor espere...",
103
- games: "juegos"
104
- }
105
- };
106
- function q(t, e) {
107
- Q(t, e);
108
- }
109
- function ie(t) {
110
- W.set(t);
111
- }
112
- function oe(t) {
113
- ee(t, "svelte-kxzx9e", ".svelte-kxzx9e.svelte-kxzx9e,.svelte-kxzx9e.svelte-kxzx9e::before,.svelte-kxzx9e.svelte-kxzx9e::after{margin:0;padding:0;box-sizing:border-box}.CasinoProviders.svelte-kxzx9e.svelte-kxzx9e{display:flex;flex-direction:column;gap:1rem;padding:10px 60px}.ProviderTitle.svelte-kxzx9e.svelte-kxzx9e{font-weight:500;position:relative;right:30px;margin:10px 0}.Provider.svelte-kxzx9e.svelte-kxzx9e{border-radius:7px;display:flex;align-items:center;gap:16px;max-width:300px}.ProviderTextContainer.svelte-kxzx9e.svelte-kxzx9e{display:flex;flex-direction:column;justify-content:center;gap:10px;font-size:15px;color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}.ProviderTextContainer.svelte-kxzx9e p.svelte-kxzx9e:first-child{font-weight:600;color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}.ProviderTextContainer.svelte-kxzx9e p.svelte-kxzx9e:last-child{color:var(--emfe-w-color-gray-150, #828282);font-weight:300}.ProviderImage.svelte-kxzx9e.svelte-kxzx9e{border-radius:4px;object-fit:contain;height:64px;width:64px;font-weight:100;border:0.5px solid var(--emfe-w-color-gray-100, #E6E6E6);overflow:hidden;object-fit:contain}.Message.svelte-kxzx9e.svelte-kxzx9e{font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}");
114
- }
115
- function G(t, e, l) {
116
- const a = t.slice();
117
- return a[21] = e[l], a;
118
- }
119
- function H(t, e, l) {
120
- const a = t.slice();
121
- return a[21] = e[l], a;
122
- }
123
- function ae(t) {
124
- let e, l = (
125
- /*$_*/
126
- t[4]("popularProviders") + ""
127
- ), a, o, d, n, h = (
128
- /*$_*/
129
- t[4]("otherProviders") + ""
130
- ), m, P, _, v = N(
131
- /*topProviders*/
132
- t[1]
133
- ), u = [];
134
- for (let r = 0; r < v.length; r += 1)
135
- u[r] = B(H(t, v, r));
136
- let x = N(
137
- /*otherProviders*/
138
- t[2]
139
- ), p = [];
140
- for (let r = 0; r < x.length; r += 1)
141
- p[r] = D(G(t, x, r));
142
- return {
143
- c() {
144
- e = b("h4"), a = j(l), o = C();
145
- for (let r = 0; r < u.length; r += 1)
146
- u[r].c();
147
- d = C(), n = b("h4"), m = j(h), P = C();
148
- for (let r = 0; r < p.length; r += 1)
149
- p[r].c();
150
- _ = re(), f(e, "class", "ProviderTitle svelte-kxzx9e"), f(n, "class", "ProviderTitle svelte-kxzx9e");
151
- },
152
- m(r, c) {
153
- S(r, e, c), g(e, a), S(r, o, c);
154
- for (let s = 0; s < u.length; s += 1)
155
- u[s] && u[s].m(r, c);
156
- S(r, d, c), S(r, n, c), g(n, m), S(r, P, c);
157
- for (let s = 0; s < p.length; s += 1)
158
- p[s] && p[s].m(r, c);
159
- S(r, _, c);
160
- },
161
- p(r, c) {
162
- if (c & /*$_*/
163
- 16 && l !== (l = /*$_*/
164
- r[4]("popularProviders") + "") && A(a, l), c & /*openGameProviderPage, topProviders, $_*/
165
- 50) {
166
- v = N(
167
- /*topProviders*/
168
- r[1]
169
- );
170
- let s;
171
- for (s = 0; s < v.length; s += 1) {
172
- const y = H(r, v, s);
173
- u[s] ? u[s].p(y, c) : (u[s] = B(y), u[s].c(), u[s].m(d.parentNode, d));
174
- }
175
- for (; s < u.length; s += 1)
176
- u[s].d(1);
177
- u.length = v.length;
178
- }
179
- if (c & /*$_*/
180
- 16 && h !== (h = /*$_*/
181
- r[4]("otherProviders") + "") && A(m, h), c & /*openGameProviderPage, otherProviders, $_*/
182
- 52) {
183
- x = N(
184
- /*otherProviders*/
185
- r[2]
186
- );
187
- let s;
188
- for (s = 0; s < x.length; s += 1) {
189
- const y = G(r, x, s);
190
- p[s] ? p[s].p(y, c) : (p[s] = D(y), p[s].c(), p[s].m(_.parentNode, _));
191
- }
192
- for (; s < p.length; s += 1)
193
- p[s].d(1);
194
- p.length = x.length;
195
- }
196
- },
197
- d(r) {
198
- r && (L(e), L(o), L(d), L(n), L(P), L(_)), R(u, r), R(p, r);
199
- }
200
- };
201
- }
202
- function ne(t) {
203
- let e, l = (
204
- /*$_*/
205
- t[4]("loading") + ""
206
- ), a;
207
- return {
208
- c() {
209
- e = b("p"), a = j(l), f(e, "class", "Message svelte-kxzx9e");
210
- },
211
- m(o, d) {
212
- S(o, e, d), g(e, a);
213
- },
214
- p(o, d) {
215
- d & /*$_*/
216
- 16 && l !== (l = /*$_*/
217
- o[4]("loading") + "") && A(a, l);
218
- },
219
- d(o) {
220
- o && L(e);
221
- }
222
- };
223
- }
224
- function B(t) {
225
- let e, l, a, o, d, n, h, m = (
226
- /*provider*/
227
- t[21].name + ""
228
- ), P, _, v, u = (
229
- /*provider*/
230
- t[21].games.count + ""
231
- ), x, p, r = (
232
- /*$_*/
233
- t[4]("games") + ""
234
- ), c, s, y;
235
- function E() {
236
- return (
237
- /*click_handler*/
238
- t[12](
239
- /*provider*/
240
- t[21]
241
- )
242
- );
243
- }
244
- return {
245
- c() {
246
- e = b("div"), l = b("img"), d = C(), n = b("div"), h = b("p"), P = j(m), _ = C(), v = b("p"), x = j(u), p = C(), c = j(r), V(l.src, a = /*provider*/
247
- t[21].logo) || f(l, "src", a), f(l, "alt", o = /*provider*/
248
- t[21].name), f(l, "class", "ProviderImage svelte-kxzx9e"), f(h, "class", "svelte-kxzx9e"), f(v, "class", "svelte-kxzx9e"), f(n, "class", "ProviderTextContainer svelte-kxzx9e"), f(e, "class", "Provider svelte-kxzx9e");
249
- },
250
- m(O, k) {
251
- S(O, e, k), g(e, l), g(e, d), g(e, n), g(n, h), g(h, P), g(n, _), g(n, v), g(v, x), g(v, p), g(v, c), s || (y = J(e, "click", E), s = !0);
252
- },
253
- p(O, k) {
254
- t = O, k & /*topProviders*/
255
- 2 && !V(l.src, a = /*provider*/
256
- t[21].logo) && f(l, "src", a), k & /*topProviders*/
257
- 2 && o !== (o = /*provider*/
258
- t[21].name) && f(l, "alt", o), k & /*topProviders*/
259
- 2 && m !== (m = /*provider*/
260
- t[21].name + "") && A(P, m), k & /*topProviders*/
261
- 2 && u !== (u = /*provider*/
262
- t[21].games.count + "") && A(x, u), k & /*$_*/
263
- 16 && r !== (r = /*$_*/
264
- t[4]("games") + "") && A(c, r);
265
- },
266
- d(O) {
267
- O && L(e), s = !1, y();
268
- }
269
- };
270
- }
271
- function D(t) {
272
- let e, l, a, o, d, n, h, m = (
273
- /*provider*/
274
- t[21].name + ""
275
- ), P, _, v, u = (
276
- /*provider*/
277
- t[21].games.count + ""
278
- ), x, p, r = (
279
- /*$_*/
280
- t[4]("games") + ""
281
- ), c, s, y, E;
282
- function O() {
283
- return (
284
- /*click_handler_1*/
285
- t[13](
286
- /*provider*/
287
- t[21]
288
- )
289
- );
290
- }
291
- return {
292
- c() {
293
- e = b("div"), l = b("img"), d = C(), n = b("div"), h = b("p"), P = j(m), _ = C(), v = b("p"), x = j(u), p = C(), c = j(r), s = C(), V(l.src, a = /*provider*/
294
- t[21].logo) || f(l, "src", a), f(l, "alt", o = /*provider*/
295
- t[21].name), f(l, "class", "ProviderImage svelte-kxzx9e"), f(h, "class", "svelte-kxzx9e"), f(v, "class", "svelte-kxzx9e"), f(n, "class", "ProviderTextContainer svelte-kxzx9e"), f(e, "class", "Provider svelte-kxzx9e");
296
- },
297
- m(k, T) {
298
- S(k, e, T), g(e, l), g(e, d), g(e, n), g(n, h), g(h, P), g(n, _), g(n, v), g(v, x), g(v, p), g(v, c), g(e, s), y || (E = J(e, "click", O), y = !0);
299
- },
300
- p(k, T) {
301
- t = k, T & /*otherProviders*/
302
- 4 && !V(l.src, a = /*provider*/
303
- t[21].logo) && f(l, "src", a), T & /*otherProviders*/
304
- 4 && o !== (o = /*provider*/
305
- t[21].name) && f(l, "alt", o), T & /*otherProviders*/
306
- 4 && m !== (m = /*provider*/
307
- t[21].name + "") && A(P, m), T & /*otherProviders*/
308
- 4 && u !== (u = /*provider*/
309
- t[21].games.count + "") && A(x, u), T & /*$_*/
310
- 16 && r !== (r = /*$_*/
311
- t[4]("games") + "") && A(c, r);
312
- },
313
- d(k) {
314
- k && L(e), y = !1, E();
315
- }
316
- };
317
- }
318
- function de(t) {
319
- let e;
320
- function l(d, n) {
321
- return (
322
- /*isLoading*/
323
- d[3] === !0 ? ne : ae
324
- );
325
- }
326
- let a = l(t), o = a(t);
327
- return {
328
- c() {
329
- e = b("div"), o.c(), f(e, "class", "CasinoProviders svelte-kxzx9e");
330
- },
331
- m(d, n) {
332
- S(d, e, n), o.m(e, null), t[14](e);
333
- },
334
- p(d, [n]) {
335
- a === (a = l(d)) && o ? o.p(d, n) : (o.d(1), o = a(d), o && (o.c(), o.m(e, null)));
336
- },
337
- i: I,
338
- o: I,
339
- d(d) {
340
- d && L(e), o.d(), t[14](null);
341
- }
342
- };
343
- }
344
- function ue(t, e, l) {
345
- let a;
346
- te(t, se, (i) => l(4, a = i));
347
- let { endpoint: o = "" } = e, { datasource: d = "" } = e, { lang: n = "en" } = e, { clientstyling: h = "" } = e, { clientstylingurl: m = "" } = e, { translationurl: P = "" } = e, _ = [], v = [], u = [], x = !1, p;
348
- const r = () => {
349
- fetch(P).then((z) => z.json()).then((z) => {
350
- Object.keys(z).forEach((w) => {
351
- q(w, z[w]);
352
- });
353
- }).catch((z) => {
354
- console.log(z);
355
- });
356
- };
357
- Object.keys(U).forEach((i) => {
358
- q(i, U[i]);
359
- });
360
- const c = () => {
361
- l(3, x = !0);
362
- const i = new URL(`${o}/v1/casino/vendors`);
363
- i.searchParams.append("datasource", d), i.searchParams.append("language", n), i.searchParams.append("fields", "id,name,displayName,subVendors,isTopVendor,logo,games"), fetch(i).then((z) => z.json()).then((z) => {
364
- l(3, x = !1), _ = z.items.map((F) => F), l(1, v = _.filter((F) => F.isTopVendor === !0)), l(2, u = _.filter((F) => F.isTopVendor === !1));
365
- let w = [];
366
- w = _.flatMap((F) => F.subVendors), u.push(...w.filter((F) => F.games.count > 0));
367
- });
368
- }, s = (i, z, w) => {
369
- window.postMessage(
370
- {
371
- type: "OpenGameProvider",
372
- providerId: i,
373
- providerName: z,
374
- providerLogo: w
375
- },
376
- window.location.href
377
- );
378
- }, y = () => {
379
- ie(n);
380
- }, E = () => {
381
- let i = document.createElement("style");
382
- i.innerHTML = h, p.appendChild(i);
383
- }, O = () => {
384
- let i = new URL(m), z = document.createElement("style");
385
- fetch(i.href).then((w) => w.text()).then((w) => {
386
- z.innerHTML = w, setTimeout(
387
- () => {
388
- p.appendChild(z);
389
- },
390
- 1
391
- );
392
- });
393
- }, k = (i) => s(i.id, i.name, i.logo), T = (i) => s(i.id, i.name, i.logo);
394
- function K(i) {
395
- le[i ? "unshift" : "push"](() => {
396
- p = i, l(0, p);
397
- });
398
- }
399
- return t.$$set = (i) => {
400
- "endpoint" in i && l(6, o = i.endpoint), "datasource" in i && l(7, d = i.datasource), "lang" in i && l(8, n = i.lang), "clientstyling" in i && l(9, h = i.clientstyling), "clientstylingurl" in i && l(10, m = i.clientstylingurl), "translationurl" in i && l(11, P = i.translationurl);
401
- }, t.$$.update = () => {
402
- t.$$.dirty & /*endpoint, lang, datasource*/
403
- 448 && o && n && d && c(), t.$$.dirty & /*lang*/
404
- 256 && n && y(), t.$$.dirty & /*translationurl*/
405
- 2048 && P && r(), t.$$.dirty & /*clientstyling, customStylingContainer*/
406
- 513 && h && p && E(), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
407
- 1025 && m && p && O();
408
- }, [
409
- p,
410
- v,
411
- u,
412
- x,
413
- a,
414
- s,
415
- o,
416
- d,
417
- n,
418
- h,
419
- m,
420
- P,
421
- k,
422
- T,
423
- K
424
- ];
425
- }
426
- class pe extends X {
427
- constructor(e) {
428
- super(), Y(
429
- this,
430
- e,
431
- ue,
432
- de,
433
- $,
434
- {
435
- endpoint: 6,
436
- datasource: 7,
437
- lang: 8,
438
- clientstyling: 9,
439
- clientstylingurl: 10,
440
- translationurl: 11
441
- },
442
- oe
443
- );
444
- }
445
- get endpoint() {
446
- return this.$$.ctx[6];
447
- }
448
- set endpoint(e) {
449
- this.$$set({ endpoint: e }), M();
450
- }
451
- get datasource() {
452
- return this.$$.ctx[7];
453
- }
454
- set datasource(e) {
455
- this.$$set({ datasource: e }), M();
456
- }
457
- get lang() {
458
- return this.$$.ctx[8];
459
- }
460
- set lang(e) {
461
- this.$$set({ lang: e }), M();
462
- }
463
- get clientstyling() {
464
- return this.$$.ctx[9];
465
- }
466
- set clientstyling(e) {
467
- this.$$set({ clientstyling: e }), M();
468
- }
469
- get clientstylingurl() {
470
- return this.$$.ctx[10];
471
- }
472
- set clientstylingurl(e) {
473
- this.$$set({ clientstylingurl: e }), M();
474
- }
475
- get translationurl() {
476
- return this.$$.ctx[11];
477
- }
478
- set translationurl(e) {
479
- this.$$set({ translationurl: e }), M();
480
- }
481
- }
482
- Z(pe, { endpoint: {}, datasource: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
483
- export {
484
- pe as default
485
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoCategories-vpVI3Nub.cjs"),L={en:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait...",games:"games"},"zh-hk":{popularProviders:"热门供应商",otherProviders:"其他供应商",loading:"加载请稍候...",games:"游戏"},de:{popularProviders:"Beliebte Anbieter",otherProviders:"Andere Anbieter",loading:"Es lädt, bitte warten...",games:"Spiele"},it:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},fr:{popularProviders:"Fournisseurs populaires",otherProviders:"Autres fournisseurs",loading:"Chargement, veuillez patienter...",games:"jeux"},es:{popularProviders:"Proveedores Populares",otherProviders:"Otros Proveedores",loading:"Cargando",games:"juegos"},tr:{popularProviders:"Şimdi Oyna",otherProviders:"Rastgele oynanacak oyun yok",loading:"Son arama",games:"Oyunları Ara"},ru:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},ro:{popularProviders:"Furnizori de top",otherProviders:"Alti furnizori",loading:"Se incarca, te rugam asteapta…",games:"jocuri"},hr:{popularProviders:"Popularni brendovi",otherProviders:"Ostali brendovi",loading:"Učitavanje",games:"Igre"},hu:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},pl:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},pt:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},sl:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},sr:{popularProviders:"Popular Suppliers",otherProviders:"Other Suppliers",loading:"Loading, please wait",games:"games"},"pt-br":{popularProviders:"provedores populares",otherProviders:"Outros provedores",Loading:"Carregando",games:"jogos"},"es-mx":{popularProviders:"Proveedores Populares",otherProviders:"Otros proveedores",Loading:"Cargando, por favor espere...",games:"juegos"}};function O(r,t){e.addMessages(r,t)}function q(r){e.$locale.set(r)}function N(r){e.append_styles(r,"svelte-kxzx9e",".svelte-kxzx9e.svelte-kxzx9e,.svelte-kxzx9e.svelte-kxzx9e::before,.svelte-kxzx9e.svelte-kxzx9e::after{margin:0;padding:0;box-sizing:border-box}.CasinoProviders.svelte-kxzx9e.svelte-kxzx9e{display:flex;flex-direction:column;gap:1rem;padding:10px 60px}.ProviderTitle.svelte-kxzx9e.svelte-kxzx9e{font-weight:500;position:relative;right:30px;margin:10px 0}.Provider.svelte-kxzx9e.svelte-kxzx9e{border-radius:7px;display:flex;align-items:center;gap:16px;max-width:300px}.ProviderTextContainer.svelte-kxzx9e.svelte-kxzx9e{display:flex;flex-direction:column;justify-content:center;gap:10px;font-size:15px;color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}.ProviderTextContainer.svelte-kxzx9e p.svelte-kxzx9e:first-child{font-weight:600;color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}.ProviderTextContainer.svelte-kxzx9e p.svelte-kxzx9e:last-child{color:var(--emfe-w-color-gray-150, #828282);font-weight:300}.ProviderImage.svelte-kxzx9e.svelte-kxzx9e{border-radius:4px;object-fit:contain;height:64px;width:64px;font-weight:100;border:0.5px solid var(--emfe-w-color-gray-100, #E6E6E6);overflow:hidden;object-fit:contain}.Message.svelte-kxzx9e.svelte-kxzx9e{font-weight:600;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}")}function T(r,t,l){const o=r.slice();return o[21]=t[l],o}function F(r,t,l){const o=r.slice();return o[21]=t[l],o}function V(r){let t,l=r[4]("popularProviders")+"",o,n,p,d,h=r[4]("otherProviders")+"",m,_,x,v=e.ensure_array_like(r[1]),u=[];for(let s=0;s<v.length;s+=1)u[s]=j(F(r,v,s));let f=e.ensure_array_like(r[2]),c=[];for(let s=0;s<f.length;s+=1)c[s]=A(T(r,f,s));return{c(){t=e.element("h4"),o=e.text(l),n=e.space();for(let s=0;s<u.length;s+=1)u[s].c();p=e.space(),d=e.element("h4"),m=e.text(h),_=e.space();for(let s=0;s<c.length;s+=1)c[s].c();x=e.empty(),e.attr(t,"class","ProviderTitle svelte-kxzx9e"),e.attr(d,"class","ProviderTitle svelte-kxzx9e")},m(s,g){e.insert(s,t,g),e.append(t,o),e.insert(s,n,g);for(let a=0;a<u.length;a+=1)u[a]&&u[a].m(s,g);e.insert(s,p,g),e.insert(s,d,g),e.append(d,m),e.insert(s,_,g);for(let a=0;a<c.length;a+=1)c[a]&&c[a].m(s,g);e.insert(s,x,g)},p(s,g){if(g&16&&l!==(l=s[4]("popularProviders")+"")&&e.set_data(o,l),g&50){v=e.ensure_array_like(s[1]);let a;for(a=0;a<v.length;a+=1){const y=F(s,v,a);u[a]?u[a].p(y,g):(u[a]=j(y),u[a].c(),u[a].m(p.parentNode,p))}for(;a<u.length;a+=1)u[a].d(1);u.length=v.length}if(g&16&&h!==(h=s[4]("otherProviders")+"")&&e.set_data(m,h),g&52){f=e.ensure_array_like(s[2]);let a;for(a=0;a<f.length;a+=1){const y=T(s,f,a);c[a]?c[a].p(y,g):(c[a]=A(y),c[a].c(),c[a].m(x.parentNode,x))}for(;a<c.length;a+=1)c[a].d(1);c.length=f.length}},d(s){s&&(e.detach(t),e.detach(n),e.detach(p),e.detach(d),e.detach(_),e.detach(x)),e.destroy_each(u,s),e.destroy_each(c,s)}}}function I(r){let t,l=r[4]("loading")+"",o;return{c(){t=e.element("p"),o=e.text(l),e.attr(t,"class","Message svelte-kxzx9e")},m(n,p){e.insert(n,t,p),e.append(t,o)},p(n,p){p&16&&l!==(l=n[4]("loading")+"")&&e.set_data(o,l)},d(n){n&&e.detach(t)}}}function j(r){let t,l,o,n,p,d,h,m=r[21].name+"",_,x,v,u=r[21].games.count+"",f,c,s=r[4]("games")+"",g,a,y;function C(){return r[12](r[21])}return{c(){t=e.element("div"),l=e.element("img"),p=e.space(),d=e.element("div"),h=e.element("p"),_=e.text(m),x=e.space(),v=e.element("p"),f=e.text(u),c=e.space(),g=e.text(s),e.src_url_equal(l.src,o=r[21].logo)||e.attr(l,"src",o),e.attr(l,"alt",n=r[21].name),e.attr(l,"class","ProviderImage svelte-kxzx9e"),e.attr(h,"class","svelte-kxzx9e"),e.attr(v,"class","svelte-kxzx9e"),e.attr(d,"class","ProviderTextContainer svelte-kxzx9e"),e.attr(t,"class","Provider svelte-kxzx9e")},m(b,P){e.insert(b,t,P),e.append(t,l),e.append(t,p),e.append(t,d),e.append(d,h),e.append(h,_),e.append(d,x),e.append(d,v),e.append(v,f),e.append(v,c),e.append(v,g),a||(y=e.listen(t,"click",C),a=!0)},p(b,P){r=b,P&2&&!e.src_url_equal(l.src,o=r[21].logo)&&e.attr(l,"src",o),P&2&&n!==(n=r[21].name)&&e.attr(l,"alt",n),P&2&&m!==(m=r[21].name+"")&&e.set_data(_,m),P&2&&u!==(u=r[21].games.count+"")&&e.set_data(f,u),P&16&&s!==(s=r[4]("games")+"")&&e.set_data(g,s)},d(b){b&&e.detach(t),a=!1,y()}}}function A(r){let t,l,o,n,p,d,h,m=r[21].name+"",_,x,v,u=r[21].games.count+"",f,c,s=r[4]("games")+"",g,a,y,C;function b(){return r[13](r[21])}return{c(){t=e.element("div"),l=e.element("img"),p=e.space(),d=e.element("div"),h=e.element("p"),_=e.text(m),x=e.space(),v=e.element("p"),f=e.text(u),c=e.space(),g=e.text(s),a=e.space(),e.src_url_equal(l.src,o=r[21].logo)||e.attr(l,"src",o),e.attr(l,"alt",n=r[21].name),e.attr(l,"class","ProviderImage svelte-kxzx9e"),e.attr(h,"class","svelte-kxzx9e"),e.attr(v,"class","svelte-kxzx9e"),e.attr(d,"class","ProviderTextContainer svelte-kxzx9e"),e.attr(t,"class","Provider svelte-kxzx9e")},m(P,w){e.insert(P,t,w),e.append(t,l),e.append(t,p),e.append(t,d),e.append(d,h),e.append(h,_),e.append(d,x),e.append(d,v),e.append(v,f),e.append(v,c),e.append(v,g),e.append(t,a),y||(C=e.listen(t,"click",b),y=!0)},p(P,w){r=P,w&4&&!e.src_url_equal(l.src,o=r[21].logo)&&e.attr(l,"src",o),w&4&&n!==(n=r[21].name)&&e.attr(l,"alt",n),w&4&&m!==(m=r[21].name+"")&&e.set_data(_,m),w&4&&u!==(u=r[21].games.count+"")&&e.set_data(f,u),w&16&&s!==(s=r[4]("games")+"")&&e.set_data(g,s)},d(P){P&&e.detach(t),y=!1,C()}}}function R(r){let t;function l(p,d){return p[3]===!0?I:V}let o=l(r),n=o(r);return{c(){t=e.element("div"),n.c(),e.attr(t,"class","CasinoProviders svelte-kxzx9e")},m(p,d){e.insert(p,t,d),n.m(t,null),r[14](t)},p(p,[d]){o===(o=l(p))&&n?n.p(p,d):(n.d(1),n=o(p),n&&(n.c(),n.m(t,null)))},i:e.noop,o:e.noop,d(p){p&&e.detach(t),n.d(),r[14](null)}}}function U(r,t,l){let o;e.component_subscribe(r,e.$format,i=>l(4,o=i));let{endpoint:n=""}=t,{datasource:p=""}=t,{lang:d="en"}=t,{clientstyling:h=""}=t,{clientstylingurl:m=""}=t,{translationurl:_=""}=t,x=[],v=[],u=[],f=!1,c;const s=()=>{fetch(_).then(k=>k.json()).then(k=>{Object.keys(k).forEach(z=>{O(z,k[z])})}).catch(k=>{console.log(k)})};Object.keys(L).forEach(i=>{O(i,L[i])});const g=()=>{l(3,f=!0);const i=new URL(`${n}/v1/casino/vendors`);i.searchParams.append("datasource",p),i.searchParams.append("language",d),i.searchParams.append("fields","id,name,displayName,subVendors,isTopVendor,logo,games"),fetch(i).then(k=>k.json()).then(k=>{l(3,f=!1),x=k.items.map(S=>S),l(1,v=x.filter(S=>S.isTopVendor===!0)),l(2,u=x.filter(S=>S.isTopVendor===!1));let z=[];z=x.flatMap(S=>S.subVendors),u.push(...z.filter(S=>S.games.count>0))})},a=(i,k,z)=>{window.postMessage({type:"OpenGameProvider",providerId:i,providerName:k,providerLogo:z},window.location.href)},y=()=>{q(d)},C=()=>{let i=document.createElement("style");i.innerHTML=h,c.appendChild(i)},b=()=>{let i=new URL(m),k=document.createElement("style");fetch(i.href).then(z=>z.text()).then(z=>{k.innerHTML=z,setTimeout(()=>{c.appendChild(k)},1)})},P=i=>a(i.id,i.name,i.logo),w=i=>a(i.id,i.name,i.logo);function E(i){e.binding_callbacks[i?"unshift":"push"](()=>{c=i,l(0,c)})}return r.$$set=i=>{"endpoint"in i&&l(6,n=i.endpoint),"datasource"in i&&l(7,p=i.datasource),"lang"in i&&l(8,d=i.lang),"clientstyling"in i&&l(9,h=i.clientstyling),"clientstylingurl"in i&&l(10,m=i.clientstylingurl),"translationurl"in i&&l(11,_=i.translationurl)},r.$$.update=()=>{r.$$.dirty&448&&n&&d&&p&&g(),r.$$.dirty&256&&d&&y(),r.$$.dirty&2048&&_&&s(),r.$$.dirty&513&&h&&c&&C(),r.$$.dirty&1025&&m&&c&&b()},[c,v,u,f,o,a,n,p,d,h,m,_,P,w,E]}class M extends e.SvelteComponent{constructor(t){super(),e.init(this,t,U,R,e.safe_not_equal,{endpoint:6,datasource:7,lang:8,clientstyling:9,clientstylingurl:10,translationurl:11},N)}get endpoint(){return this.$$.ctx[6]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get datasource(){return this.$$.ctx[7]}set datasource(t){this.$$set({datasource:t}),e.flush()}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),e.flush()}get clientstyling(){return this.$$.ctx[9]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[10]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[11]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(M,{endpoint:{},datasource:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=M;