@everymatrix/casino-play-random-game 1.55.0 → 1.56.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.
- package/dist/casino-play-random-game/casino-play-random-game.esm.js +1 -1
- package/dist/casino-play-random-game/p-aafe302e.js +2 -0
- package/dist/casino-play-random-game/p-ca888ed9.entry.js +1 -0
- package/dist/cjs/casino-play-random-game.cjs.entry.js +119 -40
- package/dist/cjs/casino-play-random-game.cjs.js +3 -3
- package/dist/cjs/{index-4316ff18.js → index-a0c0d6c2.js} +178 -72
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-play-random-game/casino-play-random-game.js +104 -39
- package/dist/esm/casino-play-random-game.entry.js +119 -40
- package/dist/esm/casino-play-random-game.js +4 -4
- package/dist/esm/{index-eac6b960.js → index-29915e18.js} +178 -72
- package/dist/esm/loader.js +3 -3
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-play-random-game/casino-play-random-game.d.ts +9 -3
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/casino-play-random-game/p-a29126ee.entry.js +0 -1
- package/dist/casino-play-random-game/p-abcaead5.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-play-random-game';
|
|
2
|
-
const BUILD = /* casino-play-random-game */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback:
|
|
2
|
+
const BUILD = /* casino-play-random-game */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
// src/client/client-host-ref.ts
|
|
12
14
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
15
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
16
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
17
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
+
};
|
|
15
19
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
20
|
const hostRef = {
|
|
17
21
|
$flags$: 0,
|
|
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
28
|
hostElement["s-p"] = [];
|
|
25
29
|
hostElement["s-rc"] = [];
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
32
|
+
return ref;
|
|
28
33
|
};
|
|
29
34
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
35
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -61,16 +66,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
61
66
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
62
67
|
/* webpackMode: "lazy" */
|
|
63
68
|
`./${bundleId}.entry.js${""}`
|
|
64
|
-
).then(
|
|
65
|
-
{
|
|
66
|
-
|
|
69
|
+
).then(
|
|
70
|
+
(importedModule) => {
|
|
71
|
+
{
|
|
72
|
+
cmpModules.set(bundleId, importedModule);
|
|
73
|
+
}
|
|
74
|
+
return importedModule[exportName];
|
|
75
|
+
},
|
|
76
|
+
(e) => {
|
|
77
|
+
consoleError(e, hostRef.$hostElement$);
|
|
67
78
|
}
|
|
68
|
-
|
|
69
|
-
}, consoleError);
|
|
79
|
+
);
|
|
70
80
|
};
|
|
71
81
|
|
|
72
82
|
// src/client/client-style.ts
|
|
73
83
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
74
85
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
75
86
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
76
87
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -128,12 +139,6 @@ var flush = () => {
|
|
|
128
139
|
};
|
|
129
140
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
130
141
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
131
|
-
|
|
132
|
-
// src/utils/constants.ts
|
|
133
|
-
var EMPTY_OBJ = {};
|
|
134
|
-
|
|
135
|
-
// src/utils/helpers.ts
|
|
136
|
-
var isDef = (v) => v != null;
|
|
137
142
|
var isComplexType = (o) => {
|
|
138
143
|
o = typeof o;
|
|
139
144
|
return o === "object" || o === "function";
|
|
@@ -316,7 +321,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
316
321
|
}
|
|
317
322
|
if (!appliedStyles.has(scopeId2)) {
|
|
318
323
|
{
|
|
319
|
-
styleElm = doc.createElement("style");
|
|
324
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
320
325
|
styleElm.innerHTML = style;
|
|
321
326
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
322
327
|
if (nonce != null) {
|
|
@@ -326,7 +331,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
326
331
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
327
332
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
328
333
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
329
|
-
styleContainerNode.insertBefore(
|
|
334
|
+
styleContainerNode.insertBefore(
|
|
335
|
+
styleElm,
|
|
336
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
337
|
+
);
|
|
330
338
|
} else if ("host" in styleContainerNode) {
|
|
331
339
|
if (supportsConstructableStylesheets) {
|
|
332
340
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -344,7 +352,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
344
352
|
styleContainerNode.append(styleElm);
|
|
345
353
|
}
|
|
346
354
|
}
|
|
347
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
355
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
348
356
|
styleContainerNode.insertBefore(styleElm, null);
|
|
349
357
|
}
|
|
350
358
|
}
|
|
@@ -369,23 +377,25 @@ var attachStyles = (hostRef) => {
|
|
|
369
377
|
const scopeId2 = addStyle(
|
|
370
378
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
371
379
|
cmpMeta);
|
|
372
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
380
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
373
381
|
elm["s-sc"] = scopeId2;
|
|
374
382
|
elm.classList.add(scopeId2 + "-h");
|
|
375
383
|
}
|
|
376
384
|
endAttachStyles();
|
|
377
385
|
};
|
|
378
386
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
379
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
387
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
380
388
|
if (oldValue !== newValue) {
|
|
381
389
|
let isProp = isMemberInElement(elm, memberName);
|
|
382
390
|
let ln = memberName.toLowerCase();
|
|
383
391
|
if (memberName === "class") {
|
|
384
392
|
const classList = elm.classList;
|
|
385
393
|
const oldClasses = parseClassList(oldValue);
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
394
|
+
let newClasses = parseClassList(newValue);
|
|
395
|
+
{
|
|
396
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
397
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
398
|
+
}
|
|
389
399
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
390
400
|
if (newValue) {
|
|
391
401
|
newValue(elm);
|
|
@@ -423,7 +433,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
423
433
|
elm.setAttribute(memberName, n);
|
|
424
434
|
}
|
|
425
435
|
}
|
|
426
|
-
} else {
|
|
436
|
+
} else if (elm[memberName] !== newValue) {
|
|
427
437
|
elm[memberName] = newValue;
|
|
428
438
|
}
|
|
429
439
|
} catch (e) {
|
|
@@ -445,24 +455,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
445
455
|
}
|
|
446
456
|
};
|
|
447
457
|
var parseClassListRegex = /\s/;
|
|
448
|
-
var parseClassList = (value) =>
|
|
458
|
+
var parseClassList = (value) => {
|
|
459
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
460
|
+
value = value.baseVal;
|
|
461
|
+
}
|
|
462
|
+
if (!value || typeof value !== "string") {
|
|
463
|
+
return [];
|
|
464
|
+
}
|
|
465
|
+
return value.split(parseClassListRegex);
|
|
466
|
+
};
|
|
449
467
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
450
468
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
451
469
|
|
|
452
470
|
// src/runtime/vdom/update-element.ts
|
|
453
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
471
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
454
472
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
455
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
456
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
473
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
474
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
457
475
|
{
|
|
458
476
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
459
477
|
if (!(memberName in newVnodeAttrs)) {
|
|
460
|
-
setAccessor(
|
|
478
|
+
setAccessor(
|
|
479
|
+
elm,
|
|
480
|
+
memberName,
|
|
481
|
+
oldVnodeAttrs[memberName],
|
|
482
|
+
void 0,
|
|
483
|
+
isSvgMode2,
|
|
484
|
+
newVnode.$flags$);
|
|
461
485
|
}
|
|
462
486
|
}
|
|
463
487
|
}
|
|
464
488
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
465
|
-
setAccessor(
|
|
489
|
+
setAccessor(
|
|
490
|
+
elm,
|
|
491
|
+
memberName,
|
|
492
|
+
oldVnodeAttrs[memberName],
|
|
493
|
+
newVnodeAttrs[memberName],
|
|
494
|
+
isSvgMode2,
|
|
495
|
+
newVnode.$flags$);
|
|
466
496
|
}
|
|
467
497
|
};
|
|
468
498
|
function sortedAttrNames(attrNames) {
|
|
@@ -474,13 +504,10 @@ function sortedAttrNames(attrNames) {
|
|
|
474
504
|
attrNames
|
|
475
505
|
);
|
|
476
506
|
}
|
|
477
|
-
|
|
478
|
-
// src/runtime/vdom/vdom-render.ts
|
|
479
|
-
var scopeId;
|
|
480
507
|
var hostTagName;
|
|
481
508
|
var useNativeShadowDom = false;
|
|
482
509
|
var isSvgMode = false;
|
|
483
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
510
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
484
511
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
485
512
|
let i2 = 0;
|
|
486
513
|
let elm;
|
|
@@ -494,11 +521,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
494
521
|
{
|
|
495
522
|
updateElement(null, newVNode2, isSvgMode);
|
|
496
523
|
}
|
|
497
|
-
const rootNode = elm.getRootNode();
|
|
498
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
499
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
500
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
501
|
-
}
|
|
502
524
|
if (newVNode2.$children$) {
|
|
503
525
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
504
526
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -628,6 +650,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
628
650
|
if (!isInitialRender) {
|
|
629
651
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
630
652
|
}
|
|
653
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
654
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
655
|
+
}
|
|
631
656
|
return true;
|
|
632
657
|
}
|
|
633
658
|
return false;
|
|
@@ -667,8 +692,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
667
692
|
}
|
|
668
693
|
};
|
|
669
694
|
var insertBefore = (parent, newNode, reference) => {
|
|
670
|
-
|
|
671
|
-
|
|
695
|
+
{
|
|
696
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
697
|
+
}
|
|
672
698
|
};
|
|
673
699
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
674
700
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -693,17 +719,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
693
719
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
694
720
|
hostRef.$vnode$ = rootVnode;
|
|
695
721
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
696
|
-
|
|
697
|
-
scopeId = hostElm["s-sc"];
|
|
698
|
-
}
|
|
699
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
722
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
700
723
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
701
724
|
};
|
|
702
725
|
|
|
703
726
|
// src/runtime/update-component.ts
|
|
704
727
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
705
728
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
706
|
-
ancestorComponent["s-p"].push(
|
|
729
|
+
const index = ancestorComponent["s-p"].push(
|
|
730
|
+
new Promise(
|
|
731
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
732
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
733
|
+
r();
|
|
734
|
+
}
|
|
735
|
+
)
|
|
736
|
+
);
|
|
707
737
|
}
|
|
708
738
|
};
|
|
709
739
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -730,7 +760,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
730
760
|
let maybePromise;
|
|
731
761
|
if (isInitialLoad) {
|
|
732
762
|
{
|
|
733
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
763
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
734
764
|
}
|
|
735
765
|
}
|
|
736
766
|
endSchedule();
|
|
@@ -804,7 +834,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
804
834
|
addHydratedFlag(elm);
|
|
805
835
|
}
|
|
806
836
|
{
|
|
807
|
-
safeCall(instance, "componentDidLoad");
|
|
837
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
808
838
|
}
|
|
809
839
|
endPostUpdate();
|
|
810
840
|
{
|
|
@@ -828,17 +858,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
828
858
|
}
|
|
829
859
|
};
|
|
830
860
|
var appDidLoad = (who) => {
|
|
831
|
-
{
|
|
832
|
-
addHydratedFlag(doc.documentElement);
|
|
833
|
-
}
|
|
834
861
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
835
862
|
};
|
|
836
|
-
var safeCall = (instance, method, arg) => {
|
|
863
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
837
864
|
if (instance && instance[method]) {
|
|
838
865
|
try {
|
|
839
866
|
return instance[method](arg);
|
|
840
867
|
} catch (e) {
|
|
841
|
-
consoleError(e);
|
|
868
|
+
consoleError(e, elm);
|
|
842
869
|
}
|
|
843
870
|
}
|
|
844
871
|
return void 0;
|
|
@@ -897,15 +924,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
897
924
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
898
925
|
members.map(([memberName, [memberFlags]]) => {
|
|
899
926
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
927
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
928
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
929
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
930
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
931
|
+
Object.defineProperty(prototype, memberName, {
|
|
932
|
+
get() {
|
|
933
|
+
{
|
|
934
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
935
|
+
return getValue(this, memberName);
|
|
936
|
+
}
|
|
937
|
+
const ref = getHostRef(this);
|
|
938
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
939
|
+
if (!instance) return;
|
|
940
|
+
return instance[memberName];
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
configurable: true,
|
|
944
|
+
enumerable: true
|
|
945
|
+
});
|
|
946
|
+
}
|
|
900
947
|
Object.defineProperty(prototype, memberName, {
|
|
901
|
-
get() {
|
|
902
|
-
return getValue(this, memberName);
|
|
903
|
-
},
|
|
904
948
|
set(newValue) {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
949
|
+
const ref = getHostRef(this);
|
|
950
|
+
if (origSetter) {
|
|
951
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
952
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
953
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
954
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
955
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
956
|
+
}
|
|
957
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
958
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
959
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
{
|
|
963
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
964
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
965
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
966
|
+
ref.$onReadyPromise$.then(() => {
|
|
967
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
968
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
const setterSetVal = () => {
|
|
975
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
976
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
977
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
978
|
+
}
|
|
979
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
980
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
981
|
+
};
|
|
982
|
+
if (ref.$lazyInstance$) {
|
|
983
|
+
setterSetVal();
|
|
984
|
+
} else {
|
|
985
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
909
989
|
});
|
|
910
990
|
}
|
|
911
991
|
});
|
|
@@ -915,7 +995,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
915
995
|
plt.jmp(() => {
|
|
916
996
|
var _a2;
|
|
917
997
|
const propName = attrNameToPropName.get(attrName);
|
|
918
|
-
if (this.hasOwnProperty(propName)) {
|
|
998
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
919
999
|
newValue = this[propName];
|
|
920
1000
|
delete this[propName];
|
|
921
1001
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -935,7 +1015,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
935
1015
|
}
|
|
936
1016
|
return;
|
|
937
1017
|
}
|
|
938
|
-
|
|
1018
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1019
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1020
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1021
|
+
this[propName] = newValue;
|
|
1022
|
+
}
|
|
939
1023
|
});
|
|
940
1024
|
};
|
|
941
1025
|
Cstr.observedAttributes = Array.from(
|
|
@@ -964,7 +1048,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
964
1048
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
965
1049
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
966
1050
|
if (bundleId) {
|
|
967
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1051
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
968
1052
|
if (CstrImport && "then" in CstrImport) {
|
|
969
1053
|
const endLoad = uniqueTime();
|
|
970
1054
|
Cstr = await CstrImport;
|
|
@@ -989,7 +1073,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
989
1073
|
try {
|
|
990
1074
|
new Cstr(hostRef);
|
|
991
1075
|
} catch (e) {
|
|
992
|
-
consoleError(e);
|
|
1076
|
+
consoleError(e, elm);
|
|
993
1077
|
}
|
|
994
1078
|
{
|
|
995
1079
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -998,7 +1082,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
998
1082
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
999
1083
|
}
|
|
1000
1084
|
endNewInstance();
|
|
1001
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1085
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1002
1086
|
} else {
|
|
1003
1087
|
Cstr = elm.constructor;
|
|
1004
1088
|
const cmpTag = elm.localName;
|
|
@@ -1025,9 +1109,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1025
1109
|
schedule();
|
|
1026
1110
|
}
|
|
1027
1111
|
};
|
|
1028
|
-
var fireConnectedCallback = (instance) => {
|
|
1112
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1029
1113
|
{
|
|
1030
|
-
safeCall(instance, "connectedCallback");
|
|
1114
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1031
1115
|
}
|
|
1032
1116
|
};
|
|
1033
1117
|
|
|
@@ -1062,23 +1146,34 @@ var connectedCallback = (elm) => {
|
|
|
1062
1146
|
}
|
|
1063
1147
|
} else {
|
|
1064
1148
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1065
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1149
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1066
1150
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1067
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1151
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1068
1152
|
}
|
|
1069
1153
|
}
|
|
1070
1154
|
endConnected();
|
|
1071
1155
|
}
|
|
1072
1156
|
};
|
|
1073
|
-
var disconnectInstance = (instance) => {
|
|
1157
|
+
var disconnectInstance = (instance, elm) => {
|
|
1158
|
+
{
|
|
1159
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1160
|
+
}
|
|
1074
1161
|
};
|
|
1075
1162
|
var disconnectedCallback = async (elm) => {
|
|
1076
1163
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1077
1164
|
const hostRef = getHostRef(elm);
|
|
1078
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1079
|
-
hostRef.$
|
|
1165
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1166
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1167
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1168
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1080
1169
|
}
|
|
1081
1170
|
}
|
|
1171
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1172
|
+
rootAppliedStyles.delete(elm);
|
|
1173
|
+
}
|
|
1174
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1175
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1176
|
+
}
|
|
1082
1177
|
};
|
|
1083
1178
|
|
|
1084
1179
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1159,6 +1254,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1159
1254
|
}
|
|
1160
1255
|
disconnectedCallback() {
|
|
1161
1256
|
plt.jmp(() => disconnectedCallback(this));
|
|
1257
|
+
plt.raf(() => {
|
|
1258
|
+
var _a3;
|
|
1259
|
+
const hostRef = getHostRef(this);
|
|
1260
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1261
|
+
if (i2 > -1) {
|
|
1262
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1263
|
+
}
|
|
1264
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1265
|
+
delete hostRef.$vnode$.$elm$;
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1162
1268
|
}
|
|
1163
1269
|
componentOnReady() {
|
|
1164
1270
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-29915e18.js';
|
|
2
|
+
export { s as setNonce } from './index-29915e18.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["casino-play-random-game",[[1,"casino-play-random-game",{"endpoint":[513],"datasource":[513],"language":[513],"specificCategory":[513,"specific-category"],"iconVisible":[513,"icon-visible"],"iconVisibleOnAnim":[513,"icon-visible-on-anim"],"launchByGameCard":[513,"launch-by-game-card"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"hasErrors":[32],"
|
|
8
|
+
return bootstrapLazy([["casino-play-random-game",[[1,"casino-play-random-game",{"endpoint":[513],"datasource":[513],"language":[513],"specificCategory":[513,"specific-category"],"iconVisible":[513,"icon-visible"],"iconVisibleOnAnim":[513,"icon-visible-on-anim"],"launchByGameCard":[513,"launch-by-game-card"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"hasErrors":[32],"isLoading":[32],"gamesToShow":[32],"selectedGame":[32],"animationDone":[32],"animationStarted":[32]},null,{"endpoint":["watchEndpoint"],"datasource":["watchEndpoint"],"language":["watchEndpoint"],"translationUrl":["handleNewTranslations"],"iconVisible":["handleIsIconVisible"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -28,6 +28,10 @@ export declare class CasinoPlayRandomGame {
|
|
|
28
28
|
*/
|
|
29
29
|
launchByGameCard: string;
|
|
30
30
|
/**
|
|
31
|
+
* Client custom styling via streamStyling
|
|
32
|
+
*/
|
|
33
|
+
mbSource: string;
|
|
34
|
+
/**
|
|
31
35
|
* Client custom styling via string
|
|
32
36
|
*/
|
|
33
37
|
clientStyling: string;
|
|
@@ -41,7 +45,6 @@ export declare class CasinoPlayRandomGame {
|
|
|
41
45
|
translationUrl: string;
|
|
42
46
|
host: HTMLElement;
|
|
43
47
|
private hasErrors;
|
|
44
|
-
private limitStylingAppends;
|
|
45
48
|
private isLoading;
|
|
46
49
|
private gamesToShow;
|
|
47
50
|
private selectedGame;
|
|
@@ -52,12 +55,17 @@ export declare class CasinoPlayRandomGame {
|
|
|
52
55
|
private selectedGameIndex;
|
|
53
56
|
private selectedGameEl;
|
|
54
57
|
private iconVisibility;
|
|
58
|
+
private stylingSubscription;
|
|
59
|
+
private stylingContainer;
|
|
55
60
|
watchEndpoint(newValue: string, oldValue: string): void;
|
|
56
61
|
handleNewTranslations(): void;
|
|
57
62
|
handleIsIconVisible(): void;
|
|
63
|
+
handleClientStylingChange(newValue: any, oldValue: any): void;
|
|
64
|
+
handleClientStylingChangeURL(newValue: any, oldValue: any): void;
|
|
58
65
|
connectedCallback(): void;
|
|
59
66
|
componentWillLoad(): Promise<any>;
|
|
60
67
|
componentDidLoad(): void;
|
|
68
|
+
disconnectedCallback(): void;
|
|
61
69
|
fetchGameList(): Promise<any>;
|
|
62
70
|
shuffle: (array: any[]) => any[];
|
|
63
71
|
setUpGames(games: any): any[];
|
|
@@ -67,8 +75,6 @@ export declare class CasinoPlayRandomGame {
|
|
|
67
75
|
animateGames(): void;
|
|
68
76
|
playGame(): void;
|
|
69
77
|
showGameInfo(): void;
|
|
70
|
-
setClientStyling: () => void;
|
|
71
|
-
setClientStylingURL: () => void;
|
|
72
78
|
renderGameDetails(): HTMLElement;
|
|
73
79
|
render(): void;
|
|
74
80
|
}
|
|
@@ -39,6 +39,10 @@ export namespace Components {
|
|
|
39
39
|
* Open event on the game card.
|
|
40
40
|
*/
|
|
41
41
|
"launchByGameCard": string;
|
|
42
|
+
/**
|
|
43
|
+
* Client custom styling via streamStyling
|
|
44
|
+
*/
|
|
45
|
+
"mbSource": string;
|
|
42
46
|
/**
|
|
43
47
|
* Configure a specific category for randomising the games.
|
|
44
48
|
*/
|
|
@@ -94,6 +98,10 @@ declare namespace LocalJSX {
|
|
|
94
98
|
* Open event on the game card.
|
|
95
99
|
*/
|
|
96
100
|
"launchByGameCard"?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Client custom styling via streamStyling
|
|
103
|
+
*/
|
|
104
|
+
"mbSource"?: string;
|
|
97
105
|
/**
|
|
98
106
|
* Configure a specific category for randomising the games.
|
|
99
107
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,h as a,g as e}from"./p-abcaead5.js";const t={en:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},ro:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},fr:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},hr:{error:"Greška",randomGameLoading:"Učitavanje ...",playRandomGame:"Igraj nasumičnu igru",playNowRandomGame:"Igraj sada",spinRandomGame:"Zavrti"},hu:{error:"Error",randomGameLoading:"Loading ...",playRandomGame:"Play a random game",playNowRandomGame:"Play now",spinRandomGame:"Spin"},tr:{error:"Hata",randomGameLoading:"Yükleniyor...",playRandomGame:"Rasgele bir oyun oyna",playNowRandomGame:"Şimdi Oyna",spinRandomGame:"DEĞİŞTİR"}},i=n=>new Promise((a=>{fetch(n).then((n=>n.json())).then((n=>{Object.keys(n).forEach((a=>{t[a]||(t[a]={});for(let e in n[a])t[a][e]=n[a][e]})),a(!0)}))})),o=(n,a)=>t[void 0!==a&&a in t?a:"en"][n],r=class{constructor(a){n(this,a),this.animation=null,this.selectedGameIndex=null,this.selectedGameEl=null,this.iconVisibility=null,this.shuffle=n=>{let a,e=n.length;for(;0!==e;)a=Math.floor(Math.random()*e),e--,[n[e],n[a]]=[n[a],n[e]];return n},this.setClientStyling=()=>{let n=document.createElement("style");n.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(n)},this.setClientStylingURL=()=>{let n=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{a.innerHTML=n,this.clientStyling=n,setTimeout((()=>{this.host.shadowRoot.prepend(a)}),1)}))},this.endpoint=void 0,this.datasource=void 0,this.language="en",this.specificCategory="",this.iconVisible="",this.iconVisibleOnAnim="",this.launchByGameCard="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.gamesToShow=void 0,this.selectedGame=null,this.animationDone=!1,this.animationStarted=!1}watchEndpoint(n,a){n&&n!=a&&this.endpoint&&this.fetchGameList()}handleNewTranslations(){this.isLoading=!0,i(this.translationUrl).then((()=>{this.isLoading=!1}))}handleIsIconVisible(){this.iconVisibility="true"===this.iconVisible}connectedCallback(){this.handleIsIconVisible()}componentWillLoad(){if(this.translationUrl.length>2&&i(this.translationUrl),this.endpoint&&this.language&&this.datasource)return this.fetchGameList()}componentDidLoad(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}fetchGameList(){let n=new URL(`${this.endpoint}/v1/casino/games`);return n.searchParams.append("platform",(()=>{let n=window.navigator.userAgent;return n.toLowerCase().match(/android/i)?"Android":n.toLowerCase().match(/iphone/i)?"iPhone":n.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})()),n.searchParams.append("datasource",this.datasource),n.searchParams.append("fields","gId,id,href,thumbnail,name,vendor,launchUrl,subVendor"),n.searchParams.append("expand","vendor"),n.searchParams.append("pagination","offset=0,limit=423"),n.searchParams.append("language",this.language),this.specificCategory&&n.searchParams.append("filter",`categories(id=${this.specificCategory})`),new Promise(((a,e)=>{this.isLoading=!0,fetch(n.href).then((n=>n.json())).then((n=>{this.gamesToShow=this.setUpGames(null==n?void 0:n.items),a(!0)})).catch((n=>{console.error(n),this.hasErrors=!0,e(n)})).finally((()=>{this.isLoading=!1}))}))}setUpGames(n){const a=this.shuffle(n).slice(0,40);return a.concat(a)}selectRandomGame(){const n=this.gamesToShow.length/2;this.selectedGameIndex=Math.floor(Math.random()*(n-3)),this.selectedGameIndex+=n,this.selectedGameEl=this.gameContainer.children[this.selectedGameIndex]}playRandomGame(){this.animateGames(),"function"==typeof gtag&>ag("event","PlayRandomGame",{context:"CasinoPlayRandomGame"})}respin(){this.animateGames(),"function"==typeof gtag&>ag("event","RespinRandomGame",{context:"CasinoPlayRandomGame"})}animateGames(){this.iconVisibility="true"===this.iconVisibleOnAnim,this.animationStarted=!0,this.animationDone=!1,this.animation&&this.animation.cancel(),this.selectedGameEl&&(this.selectedGameEl.classList.remove("TheRandomGame"),this.selectedGame=null,this.selectedGameIndex=null),this.selectRandomGame();const n=window.getComputedStyle(this.gameContainer).getPropertyValue("gap"),a=parseInt(n,10),e=this.selectedGameEl.offsetWidth;this.animation=this.gameContainer.animate([{transform:"translateX(0px)",scale:1},{scale:.75},{transform:`translateX(-${(e+a)*this.selectedGameIndex+e/2-this.gameContainer.offsetWidth/2}px)`,scale:1}],{duration:3e3,easing:"cubic-bezier(0.5, 0, 0.5, 1.2)",fill:"forwards"}),this.animation.onfinish=()=>{this.animationDone=!0,this.selectedGameEl.classList.add("TheRandomGame"),this.selectedGame=this.gamesToShow[this.selectedGameIndex]}}playGame(){this.selectedGame&&(window.postMessage({type:"PlayRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),"function"==typeof gtag&>ag("event","OpenRandomGame",{context:"CasinoPlayRandomGame"}))}showGameInfo(){window.postMessage({type:"InfoRandomGame",gameId:this.selectedGame.id,launchUrl:this.selectedGame.launchUrl,gameName:this.selectedGame.name,subVendor:this.selectedGame.subVendor},window.location.href),"function"==typeof gtag&>ag("event","OpenRandomGameInfo",{context:"CasinoPlayRandomGame"})}renderGameDetails(){return a("div",{class:"RandomButtonsWrapper"},a("div",{class:"RandomGameDetails"},a("span",{class:"RandomGameTitle"},this.selectedGame.name),a("span",{class:"RandomGameInfo",onClick:()=>this.showGameInfo()},"i")),a("div",{class:"RandomButtons"},a("button",{class:"RandomButton On",onClick:()=>this.respin()},o("spinRandomGame",this.language)),!this.launchByGameCard&&a("button",{class:"RandomButton On",onClick:()=>this.playGame()},o("playNowRandomGame",this.language))))}render(){return this.hasErrors?a("div",{class:"RandomGameError"},a("div",{class:"Title"},o("error",this.language))):this.isLoading?a("div",{class:"RandomGameLoading"},a("div",{class:"Title"},o("randomGameLoading",this.language))):this.isLoading?void 0:a("div",{class:"RandomGameWrapper"},a("div",{class:"GameContainerGradient"}),a("div",{class:"GamesContainer",ref:n=>this.gameContainer=n},this.gamesToShow&&this.gamesToShow.map(((n,e)=>a("div",{class:"RandomGameCard",key:e,onClick:"true"===this.launchByGameCard?()=>this.playGame():null},a("div",{class:"RandomGameVendor"},n.vendor.name),a("img",{class:"RandomGameImage",src:n.thumbnail,alt:n.name,title:n.name}),this.selectedGame&&this.selectedGameIndex===e&&this.renderGameDetails())))),a("div",{class:"ButtonWrapper "+(this.animationDone?"HideAnimation":"")},a("div",{class:"ButtonContainer"},this.iconVisibility&&a("div",{class:"ButtonIcon "+(this.animationStarted?"Flip":"")},a("div",{class:"QustionMark"},"?"),a("div",{class:"HexagonMarkShadow"}),a("div",{class:"HexagonMark"})),!this.animationStarted&&a("div",{class:"RandomButton "+(this.animationStarted?"HideAnimation":""),onClick:()=>this.playRandomGame()},o("playRandomGame",this.language)))))}get host(){return e(this)}static get watchers(){return{endpoint:["watchEndpoint"],datasource:["watchEndpoint"],language:["watchEndpoint"],translationUrl:["handleNewTranslations"],iconVisible:["handleIsIconVisible"]}}};r.style=":host {\n display: block;\n font-family: inherit;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n:host * {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n.RandomGameWrapper {\n width: 100%;\n height: var(--emw--size-4x-medium, 700px);\n background: transparent;\n position: relative;\n overflow: hidden;\n}\n\n.GameContainerGradient {\n position: absolute;\n top: 10%;\n left: -5px;\n width: 100vw;\n height: 80%;\n background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.5) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.5) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);\n pointer-events: none;\n z-index: 1;\n filter: blur(10px);\n}\n\n.GamesContainer {\n display: flex;\n height: var(--emw--size-4x-medium, 600px);\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n align-content: flex-start;\n gap: var(--emw--spacing-large, 20px);\n}\n\n.RandomGameCard {\n position: relative;\n width: var(--emw--size-3x-medium, 300px);\n height: var(--emw--size-4x-medium, 420px);\n border-radius: var(--emw--border-radius-large, 20px);\n top: 8%;\n filter: blur(5px);\n}\n.RandomGameCard .RandomGameVendor {\n position: absolute;\n font-size: var(--emw--font-size-x-small, 12px);\n bottom: var(--emw--spacing-small-minus, 10px);\n left: var(--emw--spacing-small-minus, 10px);\n color: var(--emw--color-typography, #FFFFFF);\n}\n\n.TheRandomGame {\n animation-name: ZoomFadeIn;\n animation-duration: 0.5s;\n animation-fill-mode: forwards;\n -webkit-animation-name: ZoomFadeIn;\n -webkit-animation-duration: 0.5s;\n -webkit-animation-fill-mode: forwards;\n opacity: 1;\n cursor: pointer;\n filter: blur(0);\n}\n\n.RandomGameImage {\n width: inherit;\n height: inherit;\n object-fit: cover;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n\n.RandomGameDetails {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: var(--emw--color-typography, #FFFFFF);\n font-size: var(--emw--font-size-small, 14px);\n width: 100%;\n}\n.RandomGameDetails .RandomGameTitle {\n line-height: 18px;\n}\n.RandomGameDetails .RandomGameInfo {\n border-radius: 50%;\n width: var(--emw--spacing-medium, 16px);\n height: var(--emw--spacing-medium, 16px);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-normal, 400);\n border: solid 1px var(--emw--color-typography, #FFFFFF);\n text-align: center;\n margin: var(--emw--spacing-2x-small, 4px) 0;\n line-height: 14px;\n cursor: pointer;\n}\n.RandomGameDetails .RandomGamePlay {\n background: var(--emw--color-primary, #4bd004);\n color: var(--emw--color-typography, #FFFFFF);\n border: none;\n border-radius: var(--emw--border-radius-medium, 5px);\n width: 200px;\n height: 40px;\n font-size: var(--emw--font-size-small, 14px);\n cursor: pointer;\n}\n\n.ButtonWrapper {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 20;\n}\n\n.ButtonContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n width: 100%;\n position: relative;\n}\n\n.ButtonIcon {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n}\n\n.QustionMark {\n position: absolute;\n font-family: sans-serif;\n font-size: 120px;\n font-weight: 900;\n color: color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 10%);\n text-shadow: 0px 12px 0px color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 50%);\n left: 50%;\n top: -20%;\n transform: translateX(-50%);\n z-index: 10;\n}\n\n.HexagonMarkShadow {\n width: 100px;\n height: 115px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 70%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.HexagonMark {\n position: absolute;\n width: var(--emw--size-medium, 90px);\n height: 105px;\n background: linear-gradient(to bottom, color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 20%) 0%, var(--emw--categories-color-secondary, var(--emw--color-secondary, #eeac4a)) 100%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.RandomButtons {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n width: 100%;\n position: relative;\n z-index: 10;\n}\n\n.RandomButton {\n font-size: var(--emw--font-size-large, 20px);\n text-transform: uppercase;\n width: max-content;\n border-radius: var(--emw--button-border-radius, 50px);\n padding: var(--emw--spacing-large, 20px) var(--emw--spacing-2x-large, 40px);\n border: solid 3px var(--emw--button-border-color, #063B17);\n color: var(--emw--button-text-color, #FFFFFF);\n opacity: 1;\n animation: ButtonEffect 3s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n cursor: pointer;\n position: relative;\n z-index: 10;\n}\n.RandomButton:hover {\n opacity: 0.8;\n}\n\n.HideAnimation {\n filter: blur(5px);\n animation: AnimateButton 0.2s forwards;\n}\n\n.Flip {\n animation-name: Flip, Blur;\n animation-duration: 0.75s, 3s;\n animation-iteration-count: infinite, 1;\n -webkit-animation-name: Flip, Blur;\n -webkit-animation-duration: 0.75s, 3s;\n -webkit-animation-iteration-count: infinite, 1;\n}\n\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n@keyframes ZoomFadeIn {\n 0% {\n transform: scale(0.2) translateY(0);\n filter: blur(5px);\n opacity: 0.3;\n }\n 50% {\n transform: scale(1.1) translateY(-30px);\n filter: blur(2px);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1) translateY(-30px);\n filter: blur(0px);\n opacity: 1;\n }\n}\n@keyframes AnimateButton {\n 0% {\n opacity: 0.7;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n}\n@keyframes Flip {\n 0% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n 100% {\n transform: rotateY(360deg);\n }\n}\n@keyframes Blur {\n 0% {\n filter: blur(0);\n }\n 50% {\n filter: blur(1px);\n }\n 100% {\n filter: blur(3px);\n }\n}\n@container (max-width: 475px) {\n .GamesContainer {\n height: inherit;\n gap: var(--emw--spacing-2x-small, 5px);\n }\n .RandomGameWrapper {\n width: 100%;\n height: 300px;\n overflow: hidden;\n background: transparent;\n position: relative;\n }\n .GameContainerGradient {\n position: absolute;\n top: 10%;\n left: -5px;\n width: 100vw;\n height: 80%;\n background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.2) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.2) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);\n pointer-events: none;\n z-index: 1;\n filter: blur(5px);\n }\n .RandomGameCard {\n width: 100px;\n height: 150px;\n top: 0%;\n border-radius: var(--emw--border-radius-medium, 4px);\n filter: blur(5px);\n }\n .RandomGameImage {\n width: 102px;\n height: inherit;\n top: 0%;\n }\n .RandomGameDetails {\n font-size: 14px;\n width: 100%;\n }\n .RandomGameDetails .RandomGameTitle {\n line-height: 18px;\n width: 75%;\n }\n .RandomGameDetails .RandomGameInfo {\n border-radius: 50%;\n width: 16px;\n height: 16px;\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 14px;\n }\n .RandomGameDetails .RandomGamePlay {\n background: var(--emw--color-primary, #52d004);\n color: var(--emw--color-typography, #FFFFFF);\n border: none;\n border-radius: 5px;\n width: 200px;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n }\n .RandomGameCard .RandomGameVendor {\n font-size: var(--emw--font-size-x-small, 12px);\n bottom: 5px;\n right: 5px;\n }\n .RandomButtons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n width: 100%;\n }\n .RandomButton {\n font-size: var(--emw--font-size-x-small, 12px);\n padding: 10px 15px;\n border: solid 1px var(--emw--button-border-color, #063B17);\n }\n .QustionMark {\n font-size: 100px;\n font-weight: 700;\n }\n .HexagonMarkShadow {\n width: 80px;\n height: 95px;\n }\n .HexagonMark {\n width: 70px;\n height: 85px;\n }\n}";export{r as casino_play_random_game}
|