@everymatrix/mini-games-lobby 1.54.11 → 1.55.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.
Files changed (24) hide show
  1. package/dist/cjs/{index-2c9f83af.js → index-60aa454b.js} +62 -153
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mini-games-lobby.cjs.entry.js +5 -182
  4. package/dist/cjs/mini-games-lobby.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/mini-games-lobby/mini-games-lobby.js +4 -41
  7. package/dist/esm/{index-25e6da1e.js → index-4ae384e0.js} +62 -153
  8. package/dist/esm/loader.js +2 -2
  9. package/dist/esm/mini-games-lobby.entry.js +5 -182
  10. package/dist/esm/mini-games-lobby.js +3 -3
  11. package/dist/mini-games-lobby/mini-games-lobby.esm.js +1 -1
  12. package/dist/mini-games-lobby/p-6b2ef1fa.js +2 -0
  13. package/dist/mini-games-lobby/p-6f4ccffc.entry.js +1 -0
  14. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.dev.d.ts +2 -0
  16. package/package.json +1 -1
  17. package/dist/mini-games-lobby/p-10aa90b5.entry.js +0 -1
  18. package/dist/mini-games-lobby/p-14714f4a.js +0 -2
  19. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.d.ts +0 -2
  20. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/packages/stencil/mini-games-lobby/stencil.config.dev.d.ts +0 -2
  21. /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/index.d.ts +0 -0
  22. /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  23. /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  24. /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/mini-games-lobby/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'mini-games-lobby';
24
- const BUILD = /* mini-games-lobby */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: true, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, 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: false, 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: false, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* mini-games-lobby */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: true, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, 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, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, 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: false, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: false, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
-
35
- // src/client/client-host-ref.ts
36
34
  var hostRefs = /* @__PURE__ */ new WeakMap();
37
35
  var getHostRef = (ref) => hostRefs.get(ref);
38
- var registerInstance = (lazyInstance, hostRef) => {
39
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
40
- };
36
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
41
37
  var registerHost = (hostElement, cmpMeta) => {
42
38
  const hostRef = {
43
39
  $flags$: 0,
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
50
46
  hostElement["s-p"] = [];
51
47
  hostElement["s-rc"] = [];
52
48
  }
53
- const ref = hostRefs.set(hostElement, hostRef);
54
- return ref;
49
+ return hostRefs.set(hostElement, hostRef);
55
50
  };
56
51
  var isMemberInElement = (elm, memberName) => memberName in elm;
57
52
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
88
83
  /* webpackExclude: /\.system\.entry\.js$/ */
89
84
  /* webpackMode: "lazy" */
90
85
  `./${bundleId}.entry.js${""}`
91
- )); }).then(
92
- (importedModule) => {
93
- {
94
- cmpModules.set(bundleId, importedModule);
95
- }
96
- return importedModule[exportName];
97
- },
98
- (e) => {
99
- consoleError(e, hostRef.$hostElement$);
86
+ )); }).then((importedModule) => {
87
+ {
88
+ cmpModules.set(bundleId, importedModule);
100
89
  }
101
- );
90
+ return importedModule[exportName];
91
+ }, consoleError);
102
92
  };
103
93
 
104
94
  // src/client/client-style.ts
105
95
  var styles = /* @__PURE__ */ new Map();
106
- var HYDRATED_STYLE_ID = "sty-id";
107
96
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
108
97
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
109
98
  var win = typeof window !== "undefined" ? window : {};
@@ -161,6 +150,12 @@ var flush = () => {
161
150
  };
162
151
  var nextTick = (cb) => promiseResolve().then(cb);
163
152
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
153
+
154
+ // src/utils/constants.ts
155
+ var EMPTY_OBJ = {};
156
+
157
+ // src/utils/helpers.ts
158
+ var isDef = (v) => v != null;
164
159
  var isComplexType = (o) => {
165
160
  o = typeof o;
166
161
  return o === "object" || o === "function";
@@ -374,7 +369,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
374
369
  }
375
370
  if (!appliedStyles.has(scopeId2)) {
376
371
  {
377
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
372
+ styleElm = doc.createElement("style");
378
373
  styleElm.innerHTML = style;
379
374
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
380
375
  if (nonce != null) {
@@ -384,10 +379,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
384
379
  if (styleContainerNode.nodeName === "HEAD") {
385
380
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
386
381
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
387
- styleContainerNode.insertBefore(
388
- styleElm,
389
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
390
- );
382
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
391
383
  } else if ("host" in styleContainerNode) {
392
384
  if (supportsConstructableStylesheets) {
393
385
  const stylesheet = new CSSStyleSheet();
@@ -405,7 +397,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
405
397
  styleContainerNode.append(styleElm);
406
398
  }
407
399
  }
408
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
400
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
409
401
  styleContainerNode.insertBefore(styleElm, null);
410
402
  }
411
403
  }
@@ -430,14 +422,14 @@ var attachStyles = (hostRef) => {
430
422
  const scopeId2 = addStyle(
431
423
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
432
424
  cmpMeta);
433
- if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
425
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
434
426
  elm["s-sc"] = scopeId2;
435
427
  elm.classList.add(scopeId2 + "-h");
436
428
  }
437
429
  endAttachStyles();
438
430
  };
439
431
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
440
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
432
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
441
433
  if (oldValue !== newValue) {
442
434
  let isProp = isMemberInElement(elm, memberName);
443
435
  let ln = memberName.toLowerCase();
@@ -474,7 +466,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
474
466
  elm.setAttribute(memberName, n);
475
467
  }
476
468
  }
477
- } else if (elm[memberName] !== newValue) {
469
+ } else {
478
470
  elm[memberName] = newValue;
479
471
  }
480
472
  } catch (e) {
@@ -499,31 +491,19 @@ var CAPTURE_EVENT_SUFFIX = "Capture";
499
491
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
500
492
 
501
493
  // src/runtime/vdom/update-element.ts
502
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
494
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
503
495
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
504
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
505
- const newVnodeAttrs = newVnode.$attrs$ || {};
496
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
497
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
506
498
  {
507
499
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
508
500
  if (!(memberName in newVnodeAttrs)) {
509
- setAccessor(
510
- elm,
511
- memberName,
512
- oldVnodeAttrs[memberName],
513
- void 0,
514
- isSvgMode2,
515
- newVnode.$flags$);
501
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
516
502
  }
517
503
  }
518
504
  }
519
505
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
520
- setAccessor(
521
- elm,
522
- memberName,
523
- oldVnodeAttrs[memberName],
524
- newVnodeAttrs[memberName],
525
- isSvgMode2,
526
- newVnode.$flags$);
506
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
527
507
  }
528
508
  };
529
509
  function sortedAttrNames(attrNames) {
@@ -535,10 +515,13 @@ function sortedAttrNames(attrNames) {
535
515
  attrNames
536
516
  );
537
517
  }
518
+
519
+ // src/runtime/vdom/vdom-render.ts
520
+ var scopeId;
538
521
  var hostTagName;
539
522
  var useNativeShadowDom = false;
540
523
  var isSvgMode = false;
541
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
524
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
542
525
  const newVNode2 = newParentVNode.$children$[childIndex];
543
526
  let i2 = 0;
544
527
  let elm;
@@ -550,6 +533,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
550
533
  {
551
534
  updateElement(null, newVNode2, isSvgMode);
552
535
  }
536
+ const rootNode = elm.getRootNode();
537
+ const isElementWithinShadowRoot = !rootNode.querySelector("body");
538
+ if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
539
+ elm.classList.add(elm["s-si"] = scopeId);
540
+ }
553
541
  if (newVNode2.$children$) {
554
542
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
555
543
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -678,9 +666,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
678
666
  if (!isInitialRender) {
679
667
  return leftVNode.$key$ === rightVNode.$key$;
680
668
  }
681
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
682
- leftVNode.$key$ = rightVNode.$key$;
683
- }
684
669
  return true;
685
670
  }
686
671
  return false;
@@ -708,9 +693,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
708
693
  }
709
694
  };
710
695
  var insertBefore = (parent, newNode, reference) => {
711
- {
712
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
713
- }
696
+ const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
697
+ return inserted;
714
698
  };
715
699
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
716
700
  const hostElm = hostRef.$hostElement$;
@@ -729,21 +713,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
729
713
  rootVnode.$flags$ |= 4 /* isHost */;
730
714
  hostRef.$vnode$ = rootVnode;
731
715
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
732
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
716
+ {
717
+ scopeId = hostElm["s-sc"];
718
+ }
719
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
733
720
  patch(oldVNode, rootVnode, isInitialLoad);
734
721
  };
735
722
 
736
723
  // src/runtime/update-component.ts
737
724
  var attachToAncestor = (hostRef, ancestorComponent) => {
738
725
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
739
- const index = ancestorComponent["s-p"].push(
740
- new Promise(
741
- (r) => hostRef.$onRenderResolve$ = () => {
742
- ancestorComponent["s-p"].splice(index - 1, 1);
743
- r();
744
- }
745
- )
746
- );
726
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
747
727
  }
748
728
  };
749
729
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -770,7 +750,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
770
750
  let maybePromise;
771
751
  if (isInitialLoad) {
772
752
  {
773
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
753
+ maybePromise = safeCall(instance, "componentWillLoad");
774
754
  }
775
755
  }
776
756
  endSchedule();
@@ -844,7 +824,7 @@ var postUpdateComponent = (hostRef) => {
844
824
  addHydratedFlag(elm);
845
825
  }
846
826
  {
847
- safeCall(instance, "componentDidLoad", void 0, elm);
827
+ safeCall(instance, "componentDidLoad");
848
828
  }
849
829
  endPostUpdate();
850
830
  {
@@ -868,14 +848,17 @@ var postUpdateComponent = (hostRef) => {
868
848
  }
869
849
  };
870
850
  var appDidLoad = (who) => {
851
+ {
852
+ addHydratedFlag(doc.documentElement);
853
+ }
871
854
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
872
855
  };
873
- var safeCall = (instance, method, arg, elm) => {
856
+ var safeCall = (instance, method, arg) => {
874
857
  if (instance && instance[method]) {
875
858
  try {
876
859
  return instance[method](arg);
877
860
  } catch (e) {
878
- consoleError(e, elm);
861
+ consoleError(e);
879
862
  }
880
863
  }
881
864
  return void 0;
@@ -939,68 +922,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
939
922
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
940
923
  members.map(([memberName, [memberFlags]]) => {
941
924
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
942
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
943
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
944
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
945
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
946
- Object.defineProperty(prototype, memberName, {
947
- get() {
948
- {
949
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
950
- return getValue(this, memberName);
951
- }
952
- const ref = getHostRef(this);
953
- const instance = ref ? ref.$lazyInstance$ : prototype;
954
- if (!instance) return;
955
- return instance[memberName];
956
- }
957
- },
958
- configurable: true,
959
- enumerable: true
960
- });
961
- }
962
925
  Object.defineProperty(prototype, memberName, {
926
+ get() {
927
+ return getValue(this, memberName);
928
+ },
963
929
  set(newValue) {
964
- const ref = getHostRef(this);
965
- if (origSetter) {
966
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
967
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
968
- newValue = ref.$instanceValues$.get(memberName);
969
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
970
- ref.$instanceValues$.set(memberName, currentValue);
971
- }
972
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
973
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
974
- setValue(this, memberName, newValue, cmpMeta);
975
- return;
976
- }
977
- {
978
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
979
- setValue(this, memberName, newValue, cmpMeta);
980
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
981
- ref.$onReadyPromise$.then(() => {
982
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
983
- ref.$lazyInstance$[memberName] = newValue;
984
- }
985
- });
986
- }
987
- return;
988
- }
989
- const setterSetVal = () => {
990
- const currentValue = ref.$lazyInstance$[memberName];
991
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
992
- ref.$instanceValues$.set(memberName, currentValue);
993
- }
994
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
995
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
996
- };
997
- if (ref.$lazyInstance$) {
998
- setterSetVal();
999
- } else {
1000
- ref.$onReadyPromise$.then(() => setterSetVal());
1001
- }
1002
- }
1003
- }
930
+ setValue(this, memberName, newValue, cmpMeta);
931
+ },
932
+ configurable: true,
933
+ enumerable: true
1004
934
  });
1005
935
  }
1006
936
  });
@@ -1010,7 +940,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1010
940
  plt.jmp(() => {
1011
941
  var _a2;
1012
942
  const propName = attrNameToPropName.get(attrName);
1013
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
943
+ if (this.hasOwnProperty(propName)) {
1014
944
  newValue = this[propName];
1015
945
  delete this[propName];
1016
946
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1030,11 +960,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1030
960
  }
1031
961
  return;
1032
962
  }
1033
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1034
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1035
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1036
- this[propName] = newValue;
1037
- }
963
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1038
964
  });
1039
965
  };
1040
966
  Cstr.observedAttributes = Array.from(
@@ -1059,7 +985,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1059
985
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1060
986
  const bundleId = cmpMeta.$lazyBundleId$;
1061
987
  if (bundleId) {
1062
- const CstrImport = loadModule(cmpMeta, hostRef);
988
+ const CstrImport = loadModule(cmpMeta);
1063
989
  if (CstrImport && "then" in CstrImport) {
1064
990
  const endLoad = uniqueTime();
1065
991
  Cstr = await CstrImport;
@@ -1084,7 +1010,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1084
1010
  try {
1085
1011
  new Cstr(hostRef);
1086
1012
  } catch (e) {
1087
- consoleError(e, elm);
1013
+ consoleError(e);
1088
1014
  }
1089
1015
  {
1090
1016
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1119,7 +1045,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1119
1045
  schedule();
1120
1046
  }
1121
1047
  };
1122
- var fireConnectedCallback = (instance, elm) => {
1048
+ var fireConnectedCallback = (instance) => {
1123
1049
  };
1124
1050
 
1125
1051
  // src/runtime/connected-callback.ts
@@ -1159,7 +1085,7 @@ var connectedCallback = (elm) => {
1159
1085
  endConnected();
1160
1086
  }
1161
1087
  };
1162
- var disconnectInstance = (instance, elm) => {
1088
+ var disconnectInstance = (instance) => {
1163
1089
  };
1164
1090
  var disconnectedCallback = async (elm) => {
1165
1091
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1168,12 +1094,6 @@ var disconnectedCallback = async (elm) => {
1168
1094
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1169
1095
  }
1170
1096
  }
1171
- if (rootAppliedStyles.has(elm)) {
1172
- rootAppliedStyles.delete(elm);
1173
- }
1174
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1175
- rootAppliedStyles.delete(elm.shadowRoot);
1176
- }
1177
1097
  };
1178
1098
 
1179
1099
  // src/runtime/bootstrap-lazy.ts
@@ -1251,17 +1171,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1251
1171
  }
1252
1172
  disconnectedCallback() {
1253
1173
  plt.jmp(() => disconnectedCallback(this));
1254
- plt.raf(() => {
1255
- var _a3;
1256
- const hostRef = getHostRef(this);
1257
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1258
- if (i2 > -1) {
1259
- deferredConnectedCallbacks.splice(i2, 1);
1260
- }
1261
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1262
- delete hostRef.$vnode$.$elm$;
1263
- }
1264
- });
1265
1174
  }
1266
1175
  componentOnReady() {
1267
1176
  return getHostRef(this).$onReadyPromise$;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2c9f83af.js');
5
+ const index = require('./index-60aa454b.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,38 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2c9f83af.js');
6
-
7
- /******************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
-
22
- function __decorate(decorators, target, key, desc) {
23
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
26
- return c > 3 && r && Object.defineProperty(target, key, r), r;
27
- }
28
-
29
- function __metadata(metadataKey, metadataValue) {
30
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
31
- }
32
-
33
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
- var e = new Error(message);
35
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
- };
5
+ const index = require('./index-60aa454b.js');
37
6
 
38
7
  const fetcher = async (url) => {
39
8
  let res;
@@ -92,154 +61,20 @@ const Games = ({ text, games, onClickGame }) => (index.h("div", { class: "GamesC
92
61
  index.h("div", { id: "Games" }, games.map((game) => index.h("div", { class: "Game" },
93
62
  index.h("div", Object.assign({ class: "GameImg" }, getProps(game, onClickGame))))))));
94
63
 
95
- const apply = (proto, lifecycle, run) => {
96
- const existLifeCycle = proto[lifecycle];
97
- if (!existLifeCycle) {
98
- throw new Error('lifecycle ' + lifecycle + ' not defined');
99
- }
100
- proto[lifecycle] = function (...args) {
101
- run.bind(this, ...args).call();
102
- if (existLifeCycle) {
103
- return existLifeCycle.bind(this, ...args).call();
104
- }
105
- };
106
- };
107
-
108
- const translation = {
109
- en: {
110
- MiniGames: 'Mini Games',
111
- },
112
- 'zh-hk': {
113
- MiniGames: '小游戲',
114
- },
115
- hr: {
116
- MiniGames: 'Mini igre'
117
- }
118
- };
119
-
120
- const getLocale = (_translations, language) => {
121
- return _translations[language] || _translations['en'];
122
- };
123
- function setLocale() {
124
- this.locale = getLocale(this.translation, this.language);
125
- }
126
- async function setLocaleByUrl(isInit = true) {
127
- if (this.translationUrl) {
128
- this.translation = await fetcher(this.translationUrl);
129
- setLocale.bind(this).call();
130
- }
131
- else {
132
- if (!isInit) {
133
- this.translation = translation;
134
- setLocale.bind(this).call();
135
- }
136
- }
137
- }
138
- const Locale = () => {
139
- // @ts-ignore
140
- return (proto, prop) => {
141
- apply(proto, 'componentWillLoad', async function () {
142
- this.translation = translation;
143
- setLocale.bind(this).call();
144
- setLocaleByUrl.bind(this, true).call();
145
- });
146
- // @ts-ignore
147
- apply(proto, 'componentShouldUpdate', async function (newValue, oldValue, key) {
148
- if (key === 'language') {
149
- setLocale.bind(this).call();
150
- }
151
- if (key === 'translationUrl') {
152
- setLocaleByUrl.bind(this, false).call();
153
- }
154
- });
155
- };
156
- };
157
-
158
- const fetchText = async (url) => {
159
- let styleCode;
160
- try {
161
- let res = await fetch(url);
162
- styleCode = await res.text();
163
- }
164
- catch (err) {
165
- console.error('error ', err);
166
- }
167
- return styleCode;
168
- };
169
- const setStyle = (container, index, styleCode) => {
170
- const sheet = new CSSStyleSheet();
171
- styleCode && sheet.insertRule(styleCode);
172
- try {
173
- container.adoptedStyleSheets[index] = sheet;
174
- }
175
- catch (err) { }
176
- };
177
- const getCode = async (url) => {
178
- let styleCode;
179
- if (url) {
180
- styleCode = await fetchText(url);
181
- }
182
- return styleCode;
183
- };
184
- const setClientStyling = (root, styleCode) => {
185
- if (!root)
186
- return;
187
- setStyle(root, 1, styleCode);
188
- };
189
- const setClientStylingUrl = async (root, url) => {
190
- if (!root)
191
- return;
192
- setStyle(root, 2, await getCode(url));
193
- };
194
-
195
- const matchStyleProcess = (root, value, key) => {
196
- switch (key) {
197
- case 'clientStyling':
198
- setClientStyling(root, value);
199
- break;
200
- case 'clientStylingUrl':
201
- setClientStylingUrl(root, value);
202
- break;
203
- }
204
- };
205
- const Style = () => {
206
- return (proto, prop) => {
207
- apply(proto, 'componentDidLoad', function () {
208
- const root = index.getElement(this).shadowRoot;
209
- matchStyleProcess(root, this[prop], prop);
210
- });
211
- // @ts-ignore
212
- apply(proto, 'componentShouldUpdate', function (newValue, oldValue, key) {
213
- if (key !== prop)
214
- return;
215
- const root = index.getElement(this).shadowRoot;
216
- matchStyleProcess(root, this[prop], prop);
217
- });
218
- };
219
- };
220
-
221
64
  const miniGamesLobbyCss = ":host{display:block}*{box-sizing:border-box}#LobbyContainer{display:flex;flex-direction:column;flex-grow:1;position:relative}#GameLaunchHeader{align-items:center;display:flex;background:var(--mini-games-header-bg, var(--base-bg, #fff));height:40px;justify-content:space-between;padding:0 15px}#GameLaunchHeader button{border:none;color:inherit;cursor:pointer;outline:0}#GameLaunchHeader .GameIcon--full-screen{margin:0 10px 0 auto}#GameLaunchHeader .GameIcon{background:var(--mini-game-icon-bg, transparent);padding:0}#GamesHeader{align-items:center;display:flex;background:var(--mini-games-header-bg, var(--base-bg, #fff));height:40px;justify-content:space-between;padding:0 15px;color:var(--mini-games-header-color, var(--text, #000))}#GamesHeader button{border:none;color:inherit;cursor:pointer;outline:0}#GamesHeader>div{align-items:center;display:flex}#GamesHeader p{font-weight:600;margin:0 5px}@media (min-width: 340px){#Games{gap:15px;justify-content:center}}#Games{display:inline-flex;flex-wrap:wrap;justify-content:space-between;gap:4px;padding:15px 15px 54px}.Game{width:68px;height:68px;border-radius:50%;box-shadow:0 4px 12px 0 rgba(13, 19, 29, 0.3);cursor:pointer}.GameImg{width:68px;height:68px;background-position:center center;background-size:cover;transition:0.3s}.GameImg:hover{transform:scale(1.5)}";
222
65
  const MiniGamesLobbyStyle0 = miniGamesLobbyCss;
223
66
 
224
67
  const MiniGamesLobby = class {
225
68
  constructor(hostRef) {
226
69
  index.registerInstance(this, hostRef);
227
- /**
228
- * Language of the widget
229
- */
70
+ this.filter = undefined;
71
+ this.session = undefined;
72
+ this.endpoint = undefined;
230
73
  this.language = 'en';
231
- /**
232
- * Client custom styling via string
233
- */
234
74
  this.clientStyling = '';
235
- /**
236
- * Client custom styling via url
237
- */
238
75
  this.clientStylingUrl = '';
239
- /**
240
- * translation via url
241
- */
242
76
  this.translationUrl = '';
77
+ this.locale = undefined;
243
78
  this.launchUrl = undefined;
244
79
  this.games = [];
245
80
  }
@@ -278,18 +113,6 @@ const MiniGamesLobby = class {
278
113
  "language": ["updateGames"]
279
114
  }; }
280
115
  };
281
- __decorate([
282
- Locale(),
283
- __metadata("design:type", String)
284
- ], MiniGamesLobby.prototype, "language", void 0);
285
- __decorate([
286
- Style(),
287
- __metadata("design:type", String)
288
- ], MiniGamesLobby.prototype, "clientStyling", void 0);
289
- __decorate([
290
- Style(),
291
- __metadata("design:type", String)
292
- ], MiniGamesLobby.prototype, "clientStylingUrl", void 0);
293
116
  MiniGamesLobby.style = MiniGamesLobbyStyle0;
294
117
 
295
118
  exports.mini_games_lobby = MiniGamesLobby;