@everymatrix/helper-tabs 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.
Files changed (28) hide show
  1. package/dist/cjs/helper-tab_2.cjs.entry.js +159 -65
  2. package/dist/cjs/helper-tabs.cjs.js +3 -3
  3. package/dist/cjs/{index-d8f4ee8c.js → index-08bd9c7c.js} +207 -75
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/helper-tab/helper-tab.js +95 -38
  7. package/dist/collection/components/helper-tabs/helper-tabs.js +111 -37
  8. package/dist/esm/helper-tab_2.entry.js +159 -65
  9. package/dist/esm/helper-tabs.js +4 -4
  10. package/dist/esm/{index-55376e55.js → index-c5727b52.js} +207 -75
  11. package/dist/esm/loader.js +3 -3
  12. package/dist/helper-tabs/helper-tabs.esm.js +1 -1
  13. package/dist/helper-tabs/p-c6fec16e.entry.js +1 -0
  14. package/dist/helper-tabs/p-d8d96e22.js +2 -0
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.d.ts +2 -0
  16. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.dev.d.ts +2 -0
  17. package/dist/types/components/helper-tab/helper-tab.d.ts +10 -5
  18. package/dist/types/components/helper-tabs/helper-tabs.d.ts +10 -5
  19. package/dist/types/components.d.ts +20 -4
  20. package/package.json +1 -1
  21. package/dist/helper-tabs/p-47fcd693.js +0 -2
  22. package/dist/helper-tabs/p-7f43459b.entry.js +0 -1
  23. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.d.ts +0 -2
  24. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/helper-tabs/.stencil/packages/stencil/helper-tabs/stencil.config.dev.d.ts +0 -2
  25. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-tabs/.stencil/tools/plugins/index.d.ts +0 -0
  26. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-tabs/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  27. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-tabs/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  28. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-tabs/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,17 +1,21 @@
1
1
  const NAMESPACE = 'helper-tabs';
2
- const BUILD = /* helper-tabs */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, 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: true, propMutable: true, propNumber: true, 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: false };
2
+ const BUILD = /* helper-tabs */ { 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: true, propMutable: true, propNumber: true, 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.22.3 | MIT Licensed | https://stenciljs.com
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) => hostRefs.set(hostRef.$lazyInstance$ = 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
- return hostRefs.set(hostElement, hostRef);
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((importedModule) => {
65
- {
66
- cmpModules.set(bundleId, importedModule);
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
- return importedModule[exportName];
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";
@@ -322,7 +327,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
322
327
  }
323
328
  if (!appliedStyles.has(scopeId2)) {
324
329
  {
325
- styleElm = doc.createElement("style");
330
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
326
331
  styleElm.innerHTML = style;
327
332
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
328
333
  if (nonce != null) {
@@ -332,7 +337,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
332
337
  if (styleContainerNode.nodeName === "HEAD") {
333
338
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
334
339
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
335
- styleContainerNode.insertBefore(styleElm, referenceNode2);
340
+ styleContainerNode.insertBefore(
341
+ styleElm,
342
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
343
+ );
336
344
  } else if ("host" in styleContainerNode) {
337
345
  if (supportsConstructableStylesheets) {
338
346
  const stylesheet = new CSSStyleSheet();
@@ -350,7 +358,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
350
358
  styleContainerNode.append(styleElm);
351
359
  }
352
360
  }
353
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
361
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
354
362
  styleContainerNode.insertBefore(styleElm, null);
355
363
  }
356
364
  }
@@ -375,23 +383,25 @@ var attachStyles = (hostRef) => {
375
383
  const scopeId2 = addStyle(
376
384
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
377
385
  cmpMeta);
378
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
386
+ if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
379
387
  elm["s-sc"] = scopeId2;
380
388
  elm.classList.add(scopeId2 + "-h");
381
389
  }
382
390
  endAttachStyles();
383
391
  };
384
392
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
385
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
393
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
386
394
  if (oldValue !== newValue) {
387
395
  let isProp = isMemberInElement(elm, memberName);
388
396
  let ln = memberName.toLowerCase();
389
397
  if (memberName === "class") {
390
398
  const classList = elm.classList;
391
399
  const oldClasses = parseClassList(oldValue);
392
- const newClasses = parseClassList(newValue);
393
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
394
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
400
+ let newClasses = parseClassList(newValue);
401
+ {
402
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
403
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
404
+ }
395
405
  } else if (memberName === "key") ; else if (memberName === "ref") {
396
406
  if (newValue) {
397
407
  newValue(elm);
@@ -429,7 +439,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
429
439
  elm.setAttribute(memberName, n);
430
440
  }
431
441
  }
432
- } else {
442
+ } else if (elm[memberName] !== newValue) {
433
443
  elm[memberName] = newValue;
434
444
  }
435
445
  } catch (e) {
@@ -451,24 +461,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
451
461
  }
452
462
  };
453
463
  var parseClassListRegex = /\s/;
454
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
464
+ var parseClassList = (value) => {
465
+ if (typeof value === "object" && value && "baseVal" in value) {
466
+ value = value.baseVal;
467
+ }
468
+ if (!value || typeof value !== "string") {
469
+ return [];
470
+ }
471
+ return value.split(parseClassListRegex);
472
+ };
455
473
  var CAPTURE_EVENT_SUFFIX = "Capture";
456
474
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
457
475
 
458
476
  // src/runtime/vdom/update-element.ts
459
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
477
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
460
478
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
461
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
462
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
479
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
480
+ const newVnodeAttrs = newVnode.$attrs$ || {};
463
481
  {
464
482
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
465
483
  if (!(memberName in newVnodeAttrs)) {
466
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
484
+ setAccessor(
485
+ elm,
486
+ memberName,
487
+ oldVnodeAttrs[memberName],
488
+ void 0,
489
+ isSvgMode2,
490
+ newVnode.$flags$);
467
491
  }
468
492
  }
469
493
  }
470
494
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
471
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
495
+ setAccessor(
496
+ elm,
497
+ memberName,
498
+ oldVnodeAttrs[memberName],
499
+ newVnodeAttrs[memberName],
500
+ isSvgMode2,
501
+ newVnode.$flags$);
472
502
  }
473
503
  };
474
504
  function sortedAttrNames(attrNames) {
@@ -480,13 +510,10 @@ function sortedAttrNames(attrNames) {
480
510
  attrNames
481
511
  );
482
512
  }
483
-
484
- // src/runtime/vdom/vdom-render.ts
485
- var scopeId;
486
513
  var hostTagName;
487
514
  var useNativeShadowDom = false;
488
515
  var isSvgMode = false;
489
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
516
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
490
517
  const newVNode2 = newParentVNode.$children$[childIndex];
491
518
  let i2 = 0;
492
519
  let elm;
@@ -500,11 +527,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
500
527
  {
501
528
  updateElement(null, newVNode2, isSvgMode);
502
529
  }
503
- const rootNode = elm.getRootNode();
504
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
505
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
506
- elm.classList.add(elm["s-si"] = scopeId);
507
- }
508
530
  if (newVNode2.$children$) {
509
531
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
510
532
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -634,6 +656,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
634
656
  if (!isInitialRender) {
635
657
  return leftVNode.$key$ === rightVNode.$key$;
636
658
  }
659
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
660
+ leftVNode.$key$ = rightVNode.$key$;
661
+ }
637
662
  return true;
638
663
  }
639
664
  return false;
@@ -673,8 +698,9 @@ var nullifyVNodeRefs = (vNode) => {
673
698
  }
674
699
  };
675
700
  var insertBefore = (parent, newNode, reference) => {
676
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
677
- return inserted;
701
+ {
702
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
703
+ }
678
704
  };
679
705
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
680
706
  const hostElm = hostRef.$hostElement$;
@@ -699,17 +725,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
699
725
  rootVnode.$flags$ |= 4 /* isHost */;
700
726
  hostRef.$vnode$ = rootVnode;
701
727
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
702
- {
703
- scopeId = hostElm["s-sc"];
704
- }
705
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
728
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
706
729
  patch(oldVNode, rootVnode, isInitialLoad);
707
730
  };
708
731
 
709
732
  // src/runtime/update-component.ts
710
733
  var attachToAncestor = (hostRef, ancestorComponent) => {
711
734
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
712
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
735
+ const index = ancestorComponent["s-p"].push(
736
+ new Promise(
737
+ (r) => hostRef.$onRenderResolve$ = () => {
738
+ ancestorComponent["s-p"].splice(index - 1, 1);
739
+ r();
740
+ }
741
+ )
742
+ );
713
743
  }
714
744
  };
715
745
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -736,7 +766,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
736
766
  let maybePromise;
737
767
  if (isInitialLoad) {
738
768
  {
739
- maybePromise = safeCall(instance, "componentWillLoad");
769
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
740
770
  }
741
771
  }
742
772
  endSchedule();
@@ -804,14 +834,14 @@ var postUpdateComponent = (hostRef) => {
804
834
  const endPostUpdate = createTime("postUpdate", tagName);
805
835
  const instance = hostRef.$lazyInstance$ ;
806
836
  const ancestorComponent = hostRef.$ancestorComponent$;
807
- {
808
- safeCall(instance, "componentDidRender");
809
- }
810
837
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
811
838
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
812
839
  {
813
840
  addHydratedFlag(elm);
814
841
  }
842
+ {
843
+ safeCall(instance, "componentDidLoad", void 0, elm);
844
+ }
815
845
  endPostUpdate();
816
846
  {
817
847
  hostRef.$onReadyResolve$(elm);
@@ -834,17 +864,14 @@ var postUpdateComponent = (hostRef) => {
834
864
  }
835
865
  };
836
866
  var appDidLoad = (who) => {
837
- {
838
- addHydratedFlag(doc.documentElement);
839
- }
840
867
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
841
868
  };
842
- var safeCall = (instance, method, arg) => {
869
+ var safeCall = (instance, method, arg, elm) => {
843
870
  if (instance && instance[method]) {
844
871
  try {
845
872
  return instance[method](arg);
846
873
  } catch (e) {
847
- consoleError(e);
874
+ consoleError(e, elm);
848
875
  }
849
876
  }
850
877
  return void 0;
@@ -863,6 +890,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
863
890
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
864
891
  );
865
892
  }
893
+ const elm = hostRef.$hostElement$ ;
866
894
  const oldVal = hostRef.$instanceValues$.get(propName);
867
895
  const flags = hostRef.$flags$;
868
896
  const instance = hostRef.$lazyInstance$ ;
@@ -872,6 +900,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
872
900
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
873
901
  hostRef.$instanceValues$.set(propName, newVal);
874
902
  if (instance) {
903
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
904
+ const watchMethods = cmpMeta.$watchers$[propName];
905
+ if (watchMethods) {
906
+ watchMethods.map((watchMethodName) => {
907
+ try {
908
+ instance[watchMethodName](newVal, oldVal, propName);
909
+ } catch (e) {
910
+ consoleError(e, elm);
911
+ }
912
+ });
913
+ }
914
+ }
875
915
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
876
916
  scheduleUpdate(hostRef, false);
877
917
  }
@@ -883,19 +923,75 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
883
923
  var proxyComponent = (Cstr, cmpMeta, flags) => {
884
924
  var _a, _b;
885
925
  const prototype = Cstr.prototype;
886
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
926
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
927
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
928
+ cmpMeta.$watchers$ = Cstr.watchers;
929
+ }
887
930
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
888
931
  members.map(([memberName, [memberFlags]]) => {
889
932
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
933
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
934
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
935
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
936
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
937
+ Object.defineProperty(prototype, memberName, {
938
+ get() {
939
+ {
940
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
941
+ return getValue(this, memberName);
942
+ }
943
+ const ref = getHostRef(this);
944
+ const instance = ref ? ref.$lazyInstance$ : prototype;
945
+ if (!instance) return;
946
+ return instance[memberName];
947
+ }
948
+ },
949
+ configurable: true,
950
+ enumerable: true
951
+ });
952
+ }
890
953
  Object.defineProperty(prototype, memberName, {
891
- get() {
892
- return getValue(this, memberName);
893
- },
894
954
  set(newValue) {
895
- setValue(this, memberName, newValue, cmpMeta);
896
- },
897
- configurable: true,
898
- enumerable: true
955
+ const ref = getHostRef(this);
956
+ if (origSetter) {
957
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
958
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
959
+ newValue = ref.$instanceValues$.get(memberName);
960
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
961
+ ref.$instanceValues$.set(memberName, currentValue);
962
+ }
963
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
964
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
965
+ setValue(this, memberName, newValue, cmpMeta);
966
+ return;
967
+ }
968
+ {
969
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
970
+ setValue(this, memberName, newValue, cmpMeta);
971
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
972
+ ref.$onReadyPromise$.then(() => {
973
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
974
+ ref.$lazyInstance$[memberName] = newValue;
975
+ }
976
+ });
977
+ }
978
+ return;
979
+ }
980
+ const setterSetVal = () => {
981
+ const currentValue = ref.$lazyInstance$[memberName];
982
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
983
+ ref.$instanceValues$.set(memberName, currentValue);
984
+ }
985
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
986
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
987
+ };
988
+ if (ref.$lazyInstance$) {
989
+ setterSetVal();
990
+ } else {
991
+ ref.$onReadyPromise$.then(() => setterSetVal());
992
+ }
993
+ }
994
+ }
899
995
  });
900
996
  }
901
997
  });
@@ -905,7 +1001,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
905
1001
  plt.jmp(() => {
906
1002
  var _a2;
907
1003
  const propName = attrNameToPropName.get(attrName);
908
- if (this.hasOwnProperty(propName)) {
1004
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
909
1005
  newValue = this[propName];
910
1006
  delete this[propName];
911
1007
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -925,7 +1021,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
925
1021
  }
926
1022
  return;
927
1023
  }
928
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1024
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1025
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1026
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1027
+ this[propName] = newValue;
1028
+ }
929
1029
  });
930
1030
  };
931
1031
  Cstr.observedAttributes = Array.from(
@@ -954,7 +1054,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
954
1054
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
955
1055
  const bundleId = cmpMeta.$lazyBundleId$;
956
1056
  if (bundleId) {
957
- const CstrImport = loadModule(cmpMeta);
1057
+ const CstrImport = loadModule(cmpMeta, hostRef);
958
1058
  if (CstrImport && "then" in CstrImport) {
959
1059
  const endLoad = uniqueTime();
960
1060
  Cstr = await CstrImport;
@@ -966,6 +1066,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
966
1066
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
967
1067
  }
968
1068
  if (!Cstr.isProxied) {
1069
+ {
1070
+ cmpMeta.$watchers$ = Cstr.watchers;
1071
+ }
969
1072
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
970
1073
  Cstr.isProxied = true;
971
1074
  }
@@ -976,13 +1079,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
976
1079
  try {
977
1080
  new Cstr(hostRef);
978
1081
  } catch (e) {
979
- consoleError(e);
1082
+ consoleError(e, elm);
980
1083
  }
981
1084
  {
982
1085
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
983
1086
  }
1087
+ {
1088
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1089
+ }
984
1090
  endNewInstance();
985
- fireConnectedCallback(hostRef.$lazyInstance$);
1091
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
986
1092
  } else {
987
1093
  Cstr = elm.constructor;
988
1094
  const cmpTag = elm.localName;
@@ -1009,9 +1115,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1009
1115
  schedule();
1010
1116
  }
1011
1117
  };
1012
- var fireConnectedCallback = (instance) => {
1118
+ var fireConnectedCallback = (instance, elm) => {
1013
1119
  {
1014
- safeCall(instance, "connectedCallback");
1120
+ safeCall(instance, "connectedCallback", void 0, elm);
1015
1121
  }
1016
1122
  };
1017
1123
 
@@ -1046,23 +1152,34 @@ var connectedCallback = (elm) => {
1046
1152
  }
1047
1153
  } else {
1048
1154
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1049
- fireConnectedCallback(hostRef.$lazyInstance$);
1155
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1050
1156
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1051
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1157
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1052
1158
  }
1053
1159
  }
1054
1160
  endConnected();
1055
1161
  }
1056
1162
  };
1057
- var disconnectInstance = (instance) => {
1163
+ var disconnectInstance = (instance, elm) => {
1164
+ {
1165
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1166
+ }
1058
1167
  };
1059
1168
  var disconnectedCallback = async (elm) => {
1060
1169
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1061
1170
  const hostRef = getHostRef(elm);
1062
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1063
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1171
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1172
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1173
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1174
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1064
1175
  }
1065
1176
  }
1177
+ if (rootAppliedStyles.has(elm)) {
1178
+ rootAppliedStyles.delete(elm);
1179
+ }
1180
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1181
+ rootAppliedStyles.delete(elm.shadowRoot);
1182
+ }
1066
1183
  };
1067
1184
 
1068
1185
  // src/runtime/bootstrap-lazy.ts
@@ -1083,6 +1200,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1083
1200
  let hasSlotRelocation = false;
1084
1201
  lazyBundles.map((lazyBundle) => {
1085
1202
  lazyBundle[1].map((compactMeta) => {
1203
+ var _a2;
1086
1204
  const cmpMeta = {
1087
1205
  $flags$: compactMeta[0],
1088
1206
  $tagName$: compactMeta[1],
@@ -1098,6 +1216,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1098
1216
  {
1099
1217
  cmpMeta.$attrsToReflect$ = [];
1100
1218
  }
1219
+ {
1220
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1221
+ }
1101
1222
  const tagName = cmpMeta.$tagName$;
1102
1223
  const HostElement = class extends HTMLElement {
1103
1224
  // StencilLazyHost
@@ -1139,6 +1260,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1139
1260
  }
1140
1261
  disconnectedCallback() {
1141
1262
  plt.jmp(() => disconnectedCallback(this));
1263
+ plt.raf(() => {
1264
+ var _a3;
1265
+ const hostRef = getHostRef(this);
1266
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1267
+ if (i2 > -1) {
1268
+ deferredConnectedCallbacks.splice(i2, 1);
1269
+ }
1270
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1271
+ delete hostRef.$vnode$.$elm$;
1272
+ }
1273
+ });
1142
1274
  }
1143
1275
  componentOnReady() {
1144
1276
  return getHostRef(this).$onReadyPromise$;
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-55376e55.js';
2
- export { s as setNonce } from './index-55376e55.js';
1
+ import { b as bootstrapLazy } from './index-c5727b52.js';
2
+ export { s as setNonce } from './index-c5727b52.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([["helper-tab_2",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrlContent":[513,"client-styling-url-content"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
8
+ return bootstrapLazy([["helper-tab_2",[[1,"helper-tabs",{"disabled":[516],"label":[513],"selected":[516],"cmsEndpoint":[513,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[513,"client-styling"],"mbSource":[1,"mb-source"],"clientStylingurl":[513,"client-stylingurl"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"helper-tab",{"selectedIndex":[514,"selected-index"],"cmsEndpoint":[513,"cms-endpoint"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"lowNumber":[514,"low-number"],"highNumber":[514,"high-number"],"minimumAllowed":[514,"minimum-allowed"],"maxinumAllowed":[514,"maxinum-allowed"],"language":[513],"translationUrl":[520,"translation-url"],"tabContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as n,b as l}from"./p-47fcd693.js";export{s as setNonce}from"./p-47fcd693.js";import{g as e}from"./p-e1255160.js";(()=>{const l=import.meta.url,e={};return""!==l&&(e.resourcesUrl=new URL(".",l).href),n(e)})().then((async n=>(await e(),l([["p-7f43459b",[[1,"helper-tabs",{disabled:[516],label:[513],selected:[516],cmsEndpoint:[513,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[513,"client-styling"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrlContent:[513,"client-styling-url-content"],lowNumber:[514,"low-number"],highNumber:[514,"high-number"],minimumAllowed:[514,"minimum-allowed"],maxinumAllowed:[514,"maxinum-allowed"],language:[513],translationUrl:[520,"translation-url"],limitStylingAppends:[32]}],[1,"helper-tab",{selectedIndex:[514,"selected-index"],cmsEndpoint:[513,"cms-endpoint"],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],lowNumber:[514,"low-number"],highNumber:[514,"high-number"],minimumAllowed:[514,"minimum-allowed"],maxinumAllowed:[514,"maxinum-allowed"],language:[513],translationUrl:[520,"translation-url"],tabContent:[32],limitStylingAppends:[32]}]]]],n))));
1
+ import{p as l,b as e}from"./p-d8d96e22.js";export{s as setNonce}from"./p-d8d96e22.js";import{g as n}from"./p-e1255160.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),l(n)})().then((async l=>(await n(),e([["p-c6fec16e",[[1,"helper-tabs",{disabled:[516],label:[513],selected:[516],cmsEndpoint:[513,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[513,"client-styling"],mbSource:[1,"mb-source"],clientStylingurl:[513,"client-stylingurl"],clientStylingUrl:[513,"client-styling-url"],lowNumber:[514,"low-number"],highNumber:[514,"high-number"],minimumAllowed:[514,"minimum-allowed"],maxinumAllowed:[514,"maxinum-allowed"],language:[513],translationUrl:[520,"translation-url"]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"helper-tab",{selectedIndex:[514,"selected-index"],cmsEndpoint:[513,"cms-endpoint"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],lowNumber:[514,"low-number"],highNumber:[514,"high-number"],minimumAllowed:[514,"minimum-allowed"],maxinumAllowed:[514,"maxinum-allowed"],language:[513],translationUrl:[520,"translation-url"],tabContent:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],l))));
@@ -0,0 +1 @@
1
+ import{r as e,h as t,g as i}from"./p-d8d96e22.js";const o="en",a=["en"],n={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},s=(e,t)=>{const i=t;return n[void 0!==i&&a.includes(i)?i:o][e]};function r(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function c(e,t){const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function l(e,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}const u=class{constructor(t){e(this,t),this.selectedIndex=0,this.clientStyling="",this.clientStylingUrl="",this.language="en",this.tabContent=""}handleClientStylingChange(e,t){e!=t&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?l(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var e;this.translationUrl&&(e=JSON.parse(this.translationUrl),Object.keys(e).forEach((t=>{for(let i in e[t])n[t][i]=e[t][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((e,t)=>{const i=t.lang;let s=n[void 0!==i&&a.includes(i)?i:o][e];return t?(Object.keys(t).forEach((e=>{s=s.replace(new RegExp("\\${"+e+"}","gm"),t[e])})),s):n[void 0!==i&&a.includes(i)?i:o][e]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=t("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:e=>this.stylingContainer=e},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=t("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:e=>this.stylingContainer=e},t("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},t("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},s("register",this.language)),t("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},s("butTickets",this.language)),t("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},s("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=t("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:e=>this.stylingContainer=e},t("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},t("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},s("odds",this.language)),t("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},s("winGame",this.language)),t("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},s("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};u.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";const h=class{constructor(t){e(this,t),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrl="",this.language="en"}connectedCallback(){}handleClientStylingChange(e,t){e!=t&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(e,t){e!=t&&this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?l(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return t("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:e=>this.stylingContainer=e},t("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((e,i)=>t("button",{class:"TabButton"+(this.selectedIndex==i?" Active":""),onClick:()=>this.selectedIndex=i},e.label)))),t("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},t("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-typography, #009993);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-gray-50, #F1F1F1)}.TabButton.Active{background:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}';export{u as helper_tab,h as helper_tabs}