@everymatrix/general-tutorial-slider 1.55.0 → 1.56.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e91cd3ca.js');
5
+ const index = require('./index-7f840d12.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -44,6 +44,63 @@ const translate = (key, customLang) => {
44
44
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
45
45
  };
46
46
 
47
+ /**
48
+ * @name setClientStyling
49
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
50
+ * @param {HTMLElement} stylingContainer The reference element of the widget
51
+ * @param {string} clientStyling The style content
52
+ */
53
+ function setClientStyling(stylingContainer, clientStyling) {
54
+ if (stylingContainer) {
55
+ const sheet = document.createElement('style');
56
+ sheet.innerHTML = clientStyling;
57
+ stylingContainer.appendChild(sheet);
58
+ }
59
+ }
60
+
61
+ /**
62
+ * @name setClientStylingURL
63
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
64
+ * @param {HTMLElement} stylingContainer The reference element of the widget
65
+ * @param {string} clientStylingUrl The URL of the style content
66
+ */
67
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
68
+ const url = new URL(clientStylingUrl);
69
+
70
+ fetch(url.href)
71
+ .then((res) => res.text())
72
+ .then((data) => {
73
+ const cssFile = document.createElement('style');
74
+ cssFile.innerHTML = data;
75
+ if (stylingContainer) {
76
+ stylingContainer.appendChild(cssFile);
77
+ }
78
+ })
79
+ .catch((err) => {
80
+ console.error('There was an error while trying to load client styling from URL', err);
81
+ });
82
+ }
83
+
84
+ /**
85
+ * @name setStreamLibrary
86
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
87
+ * @param {HTMLElement} stylingContainer The highest element of the widget
88
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
89
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
90
+ */
91
+ function setStreamStyling(stylingContainer, domain, subscription) {
92
+ if (window.emMessageBus) {
93
+ const sheet = document.createElement('style');
94
+
95
+ window.emMessageBus.subscribe(domain, (data) => {
96
+ sheet.innerHTML = data;
97
+ if (stylingContainer) {
98
+ stylingContainer.appendChild(sheet);
99
+ }
100
+ });
101
+ }
102
+ }
103
+
47
104
  /**
48
105
  * @name isMobile
49
106
  * @description A method that returns if the browser used to access the app is from a mobile device or not
@@ -103,24 +160,7 @@ const GeneralTutorialSlider = class {
103
160
  this.recalculateItemsPerPage();
104
161
  }, 10);
105
162
  };
106
- this.setClientStyling = () => {
107
- let sheet = document.createElement('style');
108
- sheet.innerHTML = this.clientStyling;
109
- this.stylingContainer.prepend(sheet);
110
- };
111
- this.setClientStylingURL = () => {
112
- let url = new URL(this.clientStylingUrl);
113
- let cssFile = document.createElement('style');
114
- fetch(url.href)
115
- .then((res) => res.text())
116
- .then((data) => {
117
- cssFile.innerHTML = data;
118
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
119
- })
120
- .catch((err) => {
121
- console.log('error ', err);
122
- });
123
- };
163
+ this.mbSource = undefined;
124
164
  this.clientStyling = '';
125
165
  this.clientStylingUrl = '';
126
166
  this.language = 'en';
@@ -135,7 +175,6 @@ const GeneralTutorialSlider = class {
135
175
  this.scrollItems = 1;
136
176
  this.itemsPerPage = 1;
137
177
  this.hasErrors = false;
138
- this.limitStylingAppends = false;
139
178
  this.isLoading = true;
140
179
  this.activeIndex = 0;
141
180
  this.tutorialElementWidth = 0;
@@ -147,6 +186,17 @@ const GeneralTutorialSlider = class {
147
186
  });
148
187
  }
149
188
  }
189
+ handleClientStylingChange(newValue, oldValue) {
190
+ if (newValue != oldValue) {
191
+ setClientStyling(this.stylingContainer, this.clientStyling);
192
+ }
193
+ }
194
+ handleClientStylingChangeURL(newValue, oldValue) {
195
+ if (newValue != oldValue) {
196
+ if (this.clientStylingUrl)
197
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
198
+ }
199
+ }
150
200
  connectedCallback() {
151
201
  window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
152
202
  }
@@ -159,20 +209,22 @@ const GeneralTutorialSlider = class {
159
209
  }
160
210
  componentDidLoad() {
161
211
  window.addEventListener('resize', this.resizeHandler);
212
+ if (this.stylingContainer) {
213
+ if (window.emMessageBus != undefined) {
214
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
215
+ }
216
+ else {
217
+ if (this.clientStyling)
218
+ setClientStyling(this.stylingContainer, this.clientStyling);
219
+ if (this.clientStylingUrl)
220
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
221
+ }
222
+ }
162
223
  }
163
224
  componentDidRender() {
164
225
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
165
226
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
166
227
  this.recalculateItemsPerPage();
167
- // start custom styling area
168
- if (!this.limitStylingAppends && this.stylingContainer) {
169
- if (this.clientStyling)
170
- this.setClientStyling();
171
- if (this.clientStylingUrl)
172
- this.setClientStylingURL();
173
- this.limitStylingAppends = true;
174
- }
175
- // end custom styling area
176
228
  }
177
229
  componentDidUpdate() {
178
230
  this.recalculateItemsPerPage();
@@ -182,6 +234,7 @@ const GeneralTutorialSlider = class {
182
234
  this.el.removeEventListener('touchmove', this.handleTouchMove);
183
235
  window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
184
236
  window.removeEventListener('resize', this.resizeHandler);
237
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
185
238
  }
186
239
  getGeneralTutorialSlider() {
187
240
  let url = new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);
@@ -301,7 +354,9 @@ const GeneralTutorialSlider = class {
301
354
  get el() { return index.getElement(this); }
302
355
  static get watchers() { return {
303
356
  "cmsEndpoint": ["watchEndpoint"],
304
- "language": ["watchEndpoint"]
357
+ "language": ["watchEndpoint"],
358
+ "clientStyling": ["handleClientStylingChange"],
359
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
305
360
  }; }
306
361
  };
307
362
  GeneralTutorialSlider.style = GeneralTutorialSliderStyle0;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e91cd3ca.js');
5
+ const index = require('./index-7f840d12.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-tutorial-slider.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["general-tutorial-slider.cjs",[[1,"general-tutorial-slider",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}]]]], options);
22
+ return index.bootstrapLazy([["general-tutorial-slider.cjs",[[1,"general-tutorial-slider",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -24,7 +24,7 @@ const NAMESPACE = 'general-tutorial-slider';
24
24
  const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, 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, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -342,31 +342,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
342
342
  if (nonce != null) {
343
343
  styleElm.setAttribute("nonce", nonce);
344
344
  }
345
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
346
- if (styleContainerNode.nodeName === "HEAD") {
347
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
348
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
349
- styleContainerNode.insertBefore(styleElm, referenceNode2);
350
- } else if ("host" in styleContainerNode) {
351
- if (supportsConstructableStylesheets) {
352
- const stylesheet = new CSSStyleSheet();
353
- stylesheet.replaceSync(style);
354
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
355
- } else {
356
- const existingStyleContainer = styleContainerNode.querySelector("style");
357
- if (existingStyleContainer) {
358
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
359
- } else {
360
- styleContainerNode.prepend(styleElm);
361
- }
362
- }
363
- } else {
364
- styleContainerNode.append(styleElm);
365
- }
366
- }
367
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
368
- styleContainerNode.insertBefore(styleElm, null);
369
- }
345
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
370
346
  }
371
347
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
372
348
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -389,7 +365,7 @@ var attachStyles = (hostRef) => {
389
365
  const scopeId2 = addStyle(
390
366
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
391
367
  cmpMeta);
392
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
368
+ if (flags & 10 /* needsScopedEncapsulation */) {
393
369
  elm["s-sc"] = scopeId2;
394
370
  elm.classList.add(scopeId2 + "-h");
395
371
  }
@@ -458,11 +434,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
458
434
  if (memberName === "list") {
459
435
  isProp = false;
460
436
  } else if (oldValue == null || elm[memberName] != n) {
461
- if (typeof elm.__lookupSetter__(memberName) === "function") {
462
- elm[memberName] = n;
463
- } else {
464
- elm.setAttribute(memberName, n);
465
- }
437
+ elm[memberName] = n;
466
438
  }
467
439
  } else {
468
440
  elm[memberName] = newValue;
@@ -542,9 +514,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
542
514
  {
543
515
  updateElement(null, newVNode2, isSvgMode);
544
516
  }
545
- const rootNode = elm.getRootNode();
546
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
547
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
517
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
548
518
  elm.classList.add(elm["s-si"] = scopeId);
549
519
  }
550
520
  if (newVNode2.$children$) {
@@ -684,10 +654,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
684
654
  elm.textContent = "";
685
655
  }
686
656
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
687
- } else if (
688
- // don't do this on initial render as it can cause non-hydrated content to be removed
689
- !isInitialRender && BUILD.updatable && oldChildren !== null
690
- ) {
657
+ } else if (oldChildren !== null) {
691
658
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
692
659
  }
693
660
  if (isSvgMode && tag === "svg") {
@@ -961,8 +928,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
961
928
  if (this.hasOwnProperty(propName)) {
962
929
  newValue = this[propName];
963
930
  delete this[propName];
964
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
965
- this[propName] == newValue) {
931
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
966
932
  return;
967
933
  } else if (propName == null) {
968
934
  const hostRef = getHostRef(this);
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e91cd3ca.js');
5
+ const index = require('./index-7f840d12.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["general-tutorial-slider.cjs",[[1,"general-tutorial-slider",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}]]]], options);
11
+ return index.bootstrapLazy([["general-tutorial-slider.cjs",[[1,"general-tutorial-slider",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
8
- "typescriptVersion": "5.5.4"
7
+ "version": "4.19.2",
8
+ "typescriptVersion": "5.4.5"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { translate } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  import { isMobile, getDevicePlatform } from "../../utils/utils";
4
5
  export class GeneralTutorialSlider {
5
6
  constructor() {
@@ -16,24 +17,7 @@ export class GeneralTutorialSlider {
16
17
  this.recalculateItemsPerPage();
17
18
  }, 10);
18
19
  };
19
- this.setClientStyling = () => {
20
- let sheet = document.createElement('style');
21
- sheet.innerHTML = this.clientStyling;
22
- this.stylingContainer.prepend(sheet);
23
- };
24
- this.setClientStylingURL = () => {
25
- let url = new URL(this.clientStylingUrl);
26
- let cssFile = document.createElement('style');
27
- fetch(url.href)
28
- .then((res) => res.text())
29
- .then((data) => {
30
- cssFile.innerHTML = data;
31
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
32
- })
33
- .catch((err) => {
34
- console.log('error ', err);
35
- });
36
- };
20
+ this.mbSource = undefined;
37
21
  this.clientStyling = '';
38
22
  this.clientStylingUrl = '';
39
23
  this.language = 'en';
@@ -48,7 +32,6 @@ export class GeneralTutorialSlider {
48
32
  this.scrollItems = 1;
49
33
  this.itemsPerPage = 1;
50
34
  this.hasErrors = false;
51
- this.limitStylingAppends = false;
52
35
  this.isLoading = true;
53
36
  this.activeIndex = 0;
54
37
  this.tutorialElementWidth = 0;
@@ -60,6 +43,17 @@ export class GeneralTutorialSlider {
60
43
  });
61
44
  }
62
45
  }
46
+ handleClientStylingChange(newValue, oldValue) {
47
+ if (newValue != oldValue) {
48
+ setClientStyling(this.stylingContainer, this.clientStyling);
49
+ }
50
+ }
51
+ handleClientStylingChangeURL(newValue, oldValue) {
52
+ if (newValue != oldValue) {
53
+ if (this.clientStylingUrl)
54
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
55
+ }
56
+ }
63
57
  connectedCallback() {
64
58
  window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
65
59
  }
@@ -72,20 +66,22 @@ export class GeneralTutorialSlider {
72
66
  }
73
67
  componentDidLoad() {
74
68
  window.addEventListener('resize', this.resizeHandler);
69
+ if (this.stylingContainer) {
70
+ if (window.emMessageBus != undefined) {
71
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
72
+ }
73
+ else {
74
+ if (this.clientStyling)
75
+ setClientStyling(this.stylingContainer, this.clientStyling);
76
+ if (this.clientStylingUrl)
77
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
78
+ }
79
+ }
75
80
  }
76
81
  componentDidRender() {
77
82
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
78
83
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
79
84
  this.recalculateItemsPerPage();
80
- // start custom styling area
81
- if (!this.limitStylingAppends && this.stylingContainer) {
82
- if (this.clientStyling)
83
- this.setClientStyling();
84
- if (this.clientStylingUrl)
85
- this.setClientStylingURL();
86
- this.limitStylingAppends = true;
87
- }
88
- // end custom styling area
89
85
  }
90
86
  componentDidUpdate() {
91
87
  this.recalculateItemsPerPage();
@@ -95,6 +91,7 @@ export class GeneralTutorialSlider {
95
91
  this.el.removeEventListener('touchmove', this.handleTouchMove);
96
92
  window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
97
93
  window.removeEventListener('resize', this.resizeHandler);
94
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
98
95
  }
99
96
  getGeneralTutorialSlider() {
100
97
  let url = new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);
@@ -225,6 +222,23 @@ export class GeneralTutorialSlider {
225
222
  }
226
223
  static get properties() {
227
224
  return {
225
+ "mbSource": {
226
+ "type": "string",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "string",
230
+ "resolved": "string",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "Client custom styling via streamStyling"
238
+ },
239
+ "attribute": "mb-source",
240
+ "reflect": false
241
+ },
228
242
  "clientStyling": {
229
243
  "type": "string",
230
244
  "mutable": false,
@@ -463,7 +477,6 @@ export class GeneralTutorialSlider {
463
477
  static get states() {
464
478
  return {
465
479
  "hasErrors": {},
466
- "limitStylingAppends": {},
467
480
  "isLoading": {},
468
481
  "activeIndex": {},
469
482
  "tutorialElementWidth": {}
@@ -477,6 +490,12 @@ export class GeneralTutorialSlider {
477
490
  }, {
478
491
  "propName": "language",
479
492
  "methodName": "watchEndpoint"
493
+ }, {
494
+ "propName": "clientStyling",
495
+ "methodName": "handleClientStylingChange"
496
+ }, {
497
+ "propName": "clientStylingUrl",
498
+ "methodName": "handleClientStylingChangeURL"
480
499
  }];
481
500
  }
482
501
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, g as getElement } from './index-8f6f886a.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-37276b41.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -40,6 +40,63 @@ const translate = (key, customLang) => {
40
40
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
41
41
  };
42
42
 
43
+ /**
44
+ * @name setClientStyling
45
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
46
+ * @param {HTMLElement} stylingContainer The reference element of the widget
47
+ * @param {string} clientStyling The style content
48
+ */
49
+ function setClientStyling(stylingContainer, clientStyling) {
50
+ if (stylingContainer) {
51
+ const sheet = document.createElement('style');
52
+ sheet.innerHTML = clientStyling;
53
+ stylingContainer.appendChild(sheet);
54
+ }
55
+ }
56
+
57
+ /**
58
+ * @name setClientStylingURL
59
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
60
+ * @param {HTMLElement} stylingContainer The reference element of the widget
61
+ * @param {string} clientStylingUrl The URL of the style content
62
+ */
63
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
64
+ const url = new URL(clientStylingUrl);
65
+
66
+ fetch(url.href)
67
+ .then((res) => res.text())
68
+ .then((data) => {
69
+ const cssFile = document.createElement('style');
70
+ cssFile.innerHTML = data;
71
+ if (stylingContainer) {
72
+ stylingContainer.appendChild(cssFile);
73
+ }
74
+ })
75
+ .catch((err) => {
76
+ console.error('There was an error while trying to load client styling from URL', err);
77
+ });
78
+ }
79
+
80
+ /**
81
+ * @name setStreamLibrary
82
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
83
+ * @param {HTMLElement} stylingContainer The highest element of the widget
84
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
85
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
86
+ */
87
+ function setStreamStyling(stylingContainer, domain, subscription) {
88
+ if (window.emMessageBus) {
89
+ const sheet = document.createElement('style');
90
+
91
+ window.emMessageBus.subscribe(domain, (data) => {
92
+ sheet.innerHTML = data;
93
+ if (stylingContainer) {
94
+ stylingContainer.appendChild(sheet);
95
+ }
96
+ });
97
+ }
98
+ }
99
+
43
100
  /**
44
101
  * @name isMobile
45
102
  * @description A method that returns if the browser used to access the app is from a mobile device or not
@@ -99,24 +156,7 @@ const GeneralTutorialSlider = class {
99
156
  this.recalculateItemsPerPage();
100
157
  }, 10);
101
158
  };
102
- this.setClientStyling = () => {
103
- let sheet = document.createElement('style');
104
- sheet.innerHTML = this.clientStyling;
105
- this.stylingContainer.prepend(sheet);
106
- };
107
- this.setClientStylingURL = () => {
108
- let url = new URL(this.clientStylingUrl);
109
- let cssFile = document.createElement('style');
110
- fetch(url.href)
111
- .then((res) => res.text())
112
- .then((data) => {
113
- cssFile.innerHTML = data;
114
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
115
- })
116
- .catch((err) => {
117
- console.log('error ', err);
118
- });
119
- };
159
+ this.mbSource = undefined;
120
160
  this.clientStyling = '';
121
161
  this.clientStylingUrl = '';
122
162
  this.language = 'en';
@@ -131,7 +171,6 @@ const GeneralTutorialSlider = class {
131
171
  this.scrollItems = 1;
132
172
  this.itemsPerPage = 1;
133
173
  this.hasErrors = false;
134
- this.limitStylingAppends = false;
135
174
  this.isLoading = true;
136
175
  this.activeIndex = 0;
137
176
  this.tutorialElementWidth = 0;
@@ -143,6 +182,17 @@ const GeneralTutorialSlider = class {
143
182
  });
144
183
  }
145
184
  }
185
+ handleClientStylingChange(newValue, oldValue) {
186
+ if (newValue != oldValue) {
187
+ setClientStyling(this.stylingContainer, this.clientStyling);
188
+ }
189
+ }
190
+ handleClientStylingChangeURL(newValue, oldValue) {
191
+ if (newValue != oldValue) {
192
+ if (this.clientStylingUrl)
193
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
194
+ }
195
+ }
146
196
  connectedCallback() {
147
197
  window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
148
198
  }
@@ -155,20 +205,22 @@ const GeneralTutorialSlider = class {
155
205
  }
156
206
  componentDidLoad() {
157
207
  window.addEventListener('resize', this.resizeHandler);
208
+ if (this.stylingContainer) {
209
+ if (window.emMessageBus != undefined) {
210
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
211
+ }
212
+ else {
213
+ if (this.clientStyling)
214
+ setClientStyling(this.stylingContainer, this.clientStyling);
215
+ if (this.clientStylingUrl)
216
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
217
+ }
218
+ }
158
219
  }
159
220
  componentDidRender() {
160
221
  this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
161
222
  this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
162
223
  this.recalculateItemsPerPage();
163
- // start custom styling area
164
- if (!this.limitStylingAppends && this.stylingContainer) {
165
- if (this.clientStyling)
166
- this.setClientStyling();
167
- if (this.clientStylingUrl)
168
- this.setClientStylingURL();
169
- this.limitStylingAppends = true;
170
- }
171
- // end custom styling area
172
224
  }
173
225
  componentDidUpdate() {
174
226
  this.recalculateItemsPerPage();
@@ -178,6 +230,7 @@ const GeneralTutorialSlider = class {
178
230
  this.el.removeEventListener('touchmove', this.handleTouchMove);
179
231
  window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
180
232
  window.removeEventListener('resize', this.resizeHandler);
233
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
181
234
  }
182
235
  getGeneralTutorialSlider() {
183
236
  let url = new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);
@@ -297,7 +350,9 @@ const GeneralTutorialSlider = class {
297
350
  get el() { return getElement(this); }
298
351
  static get watchers() { return {
299
352
  "cmsEndpoint": ["watchEndpoint"],
300
- "language": ["watchEndpoint"]
353
+ "language": ["watchEndpoint"],
354
+ "clientStyling": ["handleClientStylingChange"],
355
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
301
356
  }; }
302
357
  };
303
358
  GeneralTutorialSlider.style = GeneralTutorialSliderStyle0;
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-8f6f886a.js';
2
- export { s as setNonce } from './index-8f6f886a.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-37276b41.js';
2
+ export { s as setNonce } from './index-37276b41.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["general-tutorial-slider",[[1,"general-tutorial-slider",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}]]]], options);
19
+ return bootstrapLazy([["general-tutorial-slider",[[1,"general-tutorial-slider",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
20
20
  });
@@ -2,7 +2,7 @@ const NAMESPACE = 'general-tutorial-slider';
2
2
  const BUILD = /* general-tutorial-slider */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, 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, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, 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.19.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -320,31 +320,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
320
320
  if (nonce != null) {
321
321
  styleElm.setAttribute("nonce", nonce);
322
322
  }
323
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
324
- if (styleContainerNode.nodeName === "HEAD") {
325
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
326
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
327
- styleContainerNode.insertBefore(styleElm, referenceNode2);
328
- } else if ("host" in styleContainerNode) {
329
- if (supportsConstructableStylesheets) {
330
- const stylesheet = new CSSStyleSheet();
331
- stylesheet.replaceSync(style);
332
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
333
- } else {
334
- const existingStyleContainer = styleContainerNode.querySelector("style");
335
- if (existingStyleContainer) {
336
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
337
- } else {
338
- styleContainerNode.prepend(styleElm);
339
- }
340
- }
341
- } else {
342
- styleContainerNode.append(styleElm);
343
- }
344
- }
345
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
346
- styleContainerNode.insertBefore(styleElm, null);
347
- }
323
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
348
324
  }
349
325
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
350
326
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -367,7 +343,7 @@ var attachStyles = (hostRef) => {
367
343
  const scopeId2 = addStyle(
368
344
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
369
345
  cmpMeta);
370
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
346
+ if (flags & 10 /* needsScopedEncapsulation */) {
371
347
  elm["s-sc"] = scopeId2;
372
348
  elm.classList.add(scopeId2 + "-h");
373
349
  }
@@ -436,11 +412,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
436
412
  if (memberName === "list") {
437
413
  isProp = false;
438
414
  } else if (oldValue == null || elm[memberName] != n) {
439
- if (typeof elm.__lookupSetter__(memberName) === "function") {
440
- elm[memberName] = n;
441
- } else {
442
- elm.setAttribute(memberName, n);
443
- }
415
+ elm[memberName] = n;
444
416
  }
445
417
  } else {
446
418
  elm[memberName] = newValue;
@@ -520,9 +492,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
520
492
  {
521
493
  updateElement(null, newVNode2, isSvgMode);
522
494
  }
523
- const rootNode = elm.getRootNode();
524
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
525
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
495
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
526
496
  elm.classList.add(elm["s-si"] = scopeId);
527
497
  }
528
498
  if (newVNode2.$children$) {
@@ -662,10 +632,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
662
632
  elm.textContent = "";
663
633
  }
664
634
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
665
- } else if (
666
- // don't do this on initial render as it can cause non-hydrated content to be removed
667
- !isInitialRender && BUILD.updatable && oldChildren !== null
668
- ) {
635
+ } else if (oldChildren !== null) {
669
636
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
670
637
  }
671
638
  if (isSvgMode && tag === "svg") {
@@ -939,8 +906,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
939
906
  if (this.hasOwnProperty(propName)) {
940
907
  newValue = this[propName];
941
908
  delete this[propName];
942
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
943
- this[propName] == newValue) {
909
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
944
910
  return;
945
911
  } else if (propName == null) {
946
912
  const hostRef = getHostRef(this);
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-8f6f886a.js';
2
- export { s as setNonce } from './index-8f6f886a.js';
1
+ import { b as bootstrapLazy } from './index-37276b41.js';
2
+ export { s as setNonce } from './index-37276b41.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([["general-tutorial-slider",[[1,"general-tutorial-slider",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"limitStylingAppends":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"]}]]]], options);
8
+ return bootstrapLazy([["general-tutorial-slider",[[1,"general-tutorial-slider",{"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"cmsEndpoint":[513,"cms-endpoint"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"showSliderDots":[516,"show-slider-dots"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"enableAutoScroll":[516,"enable-auto-scroll"],"intervalPeriod":[514,"interval-period"],"scrollItems":[520,"scroll-items"],"itemsPerPage":[514,"items-per-page"],"hasErrors":[32],"isLoading":[32],"activeIndex":[32],"tutorialElementWidth":[32]},null,{"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-f4302c55.js";export{s as setNonce}from"./p-f4302c55.js";import{g as l}from"./p-e1255160.js";(()=>{const s=import.meta.url,r={};return""!==s&&(r.resourcesUrl=new URL(".",s).href),e(r)})().then((async e=>(await l(),r([["p-61e877f0",[[1,"general-tutorial-slider",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],showSliderArrowsMobile:[516,"show-slider-arrows-mobile"],enableAutoScroll:[516,"enable-auto-scroll"],intervalPeriod:[514,"interval-period"],scrollItems:[520,"scroll-items"],itemsPerPage:[514,"items-per-page"],hasErrors:[32],limitStylingAppends:[32],isLoading:[32],activeIndex:[32],tutorialElementWidth:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}]]]],e))));
1
+ import{p as e,b as l}from"./p-df9e22a7.js";export{s as setNonce}from"./p-df9e22a7.js";import{g as t}from"./p-e1255160.js";(()=>{const l=import.meta.url,s={};return""!==l&&(s.resourcesUrl=new URL(".",l).href),e(s)})().then((async e=>(await t(),l([["p-2ac9a6c7",[[1,"general-tutorial-slider",{mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[513],cmsEndpoint:[513,"cms-endpoint"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],showSliderArrowsMobile:[516,"show-slider-arrows-mobile"],enableAutoScroll:[516,"enable-auto-scroll"],intervalPeriod:[514,"interval-period"],scrollItems:[520,"scroll-items"],itemsPerPage:[514,"items-per-page"],hasErrors:[32],isLoading:[32],activeIndex:[32],tutorialElementWidth:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as n}from"./p-df9e22a7.js";const e={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."},"es-mx":{error:"Error",noResults:"Cargando, espere por favor…"},"pt-br":{error:"Erro",noResults:"Carregando, espere por favor…"}};function o(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function s(t,i){const n=new URL(i);fetch(n.href).then((t=>t.text())).then((i=>{const n=document.createElement("style");n.innerHTML=i,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const r=class{constructor(i){var n;t(this,i),this.userAgent=window.navigator.userAgent,this.isMobile=!!((n=this.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.allElementsWidth=0,this.xDown=null,this.yDown=null,this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.language="en",this.cmsEndpoint=void 0,this.userRoles="everyone",this.cmsEnv="stage",this.showSliderDots=!0,this.showSliderArrows=!0,this.showSliderArrowsMobile=!1,this.enableAutoScroll=!1,this.intervalPeriod=5e3,this.scrollItems=1,this.itemsPerPage=1,this.hasErrors=!1,this.isLoading=!0,this.activeIndex=0,this.tutorialElementWidth=0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}handleClientStylingChange(t,i){t!=i&&o(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!=i&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}componentDidLoad(){window.addEventListener("resize",this.resizeHandler),this.stylingContainer&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{n.innerHTML=i,t&&t.appendChild(n)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)))}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}getGeneralTutorialSlider(){let t=new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),t.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"})()),new Promise(((i,n)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{i(t)})).catch((t=>{console.error(t),this.hasErrors=!0,n(t)})).finally((()=>{this.isLoading=!1}))}))}move(t){this.setActive(this.activeIndex+t)}recalculateItemsPerPage(){this.tutorialsElement&&(this.tutorialElementWidth=this.tutorialsElement.clientWidth,this.allElementsWidth=(this.tutorialData.length-1)*this.tutorialElementWidth)}goTo(t){let i=this.activeIndex-t;if(i>0)for(let t=0;t<i;t++)this.move(-1);else for(let t=0;t>i;t--)this.move(1)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,n=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(n)&&this.move(i>0?1:-1),this.xDown=null,this.yDown=null}setActive(t){const i=this.tutorialData.length;this.activeIndex=t>=0?t>=i-1?i-1:t:0}renderDots(){const t=[];for(let n=0;n<this.tutorialData.length/this.itemsPerPage;n++)t.push(i("li",{class:n==this.activeIndex?"active":"default",onClick:()=>{this.goTo(n),this.setActive(n)}}));return t}render(){const t={transform:`translate(${this.allElementsWidth/(this.tutorialData.length-1)*this.activeIndex*-1}px, 0px)`},n={width:this.tutorialElementWidth/this.itemsPerPage+"px"};return this.hasErrors?i("div",{class:"GeneralTutorialSliderError"},i("div",{class:"TitleError"},e[void 0!==(o=this.language)&&o in e?o:"en"].error)):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TutorialWrapper"},i("div",{class:"TutorialContent",ref:t=>this.slider=t},(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:0===this.activeIndex?"SliderNavButton DisabledArrow":"SliderNavButton",onClick:()=>this.move(-1)},i("svg",{fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("main",null,i("div",{style:t,ref:t=>this.tutorialsElement=t,class:"TutorialItems"},this.tutorialData.map((t=>{var e,o,s,r,l,a,d,h,c,u,p,v,m,g,w,f,x,y;return i("div",{class:"TutorialItem",style:n},i("div",{class:"ItemTitle",innerHTML:null==t?void 0:t.title}),(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.images)?i("div",{class:"ItemImage"},i("img",this.isMobile?{src:null===(l=null===(r=null===(s=null===(o=null==t?void 0:t.media)||void 0===o?void 0:o.images[0])||void 0===s?void 0:s.sources)||void 0===r?void 0:r.find((t=>"mobile"===t.media)))||void 0===l?void 0:l.src,alt:null==t?void 0:t.slug}:{src:null===(c=null===(h=null===(d=null===(a=null==t?void 0:t.media)||void 0===a?void 0:a.images[0])||void 0===d?void 0:d.sources)||void 0===h?void 0:h.find((t=>"desktop"===t.media)))||void 0===c?void 0:c.src,alt:null==t?void 0:t.slug})):(null===(u=null==t?void 0:t.media)||void 0===u?void 0:u.video)?i("div",{class:"ItemImage"},i("video",{controls:!0,loop:!0,autoplay:!0},i("source",this.isMobile?{src:null===(g=null===(m=null===(v=null===(p=null==t?void 0:t.media)||void 0===p?void 0:p.video[0])||void 0===v?void 0:v.sources)||void 0===m?void 0:m.find((t=>"mobile"===t.media)))||void 0===g?void 0:g.src,type:"video/mp4"}:{src:null===(y=null===(x=null===(f=null===(w=null==t?void 0:t.media)||void 0===w?void 0:w.video[0])||void 0===f?void 0:f.sources)||void 0===x?void 0:x.find((t=>"desktop"===t.media)))||void 0===y?void 0:y.src,type:"video/mp4"}))):null,i("div",{class:"ItemDescription",innerHTML:null==t?void 0:t.content}))})))),(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:this.activeIndex===this.tutorialData.length-1?" SliderNavButton DisabledArrow disabled":"SliderNavButton",onClick:()=>this.move(1)},i("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}))),i("div",null)),this.showSliderDots&&i("div",{class:"DotsWrapper"},i("ul",{class:"Dots"},this.renderDots()))));var o}get el(){return n(this)}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style=":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emw--color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emw--color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background: var(--emw--color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n .TutorialItems {\n height: inherit;\n }\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";export{r as general_tutorial_slider}
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="undefined"!=typeof window?window:{},u=a.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],w=[],y=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.o?b($):f.raf($))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},$=()=>{v(m),v(w),(d=m.length>0)&&f.raf($)},b=t=>h().then(t),g=y(w,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>E,ok:()=>k,unwrap:()=>P,unwrapErr:()=>R});var k=t=>({isOk:!0,isErr:!1,value:t}),C=t=>({isOk:!1,isErr:!0,value:t});function E(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>k(t))):k(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},D=(t,e,...n)=>{let o=null,l=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&r?s[s.length-1].i+=o:s.push(l?L(null,o):o),r=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=L(t,null);return c.u=e,s.length>0&&(c.h=s),c},L=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),T={},U=t=>n(t).$hostElement$,A=new WeakMap,F=t=>"sc-"+t.v,N=(t,e,n,o,r,s)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=H(n),r=H(o);e.remove(...l.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!r)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(q);e=e.replace(G,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},W=/\s/,H=t=>t?t.split(W):[],q="Capture",G=RegExp(q+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,r=e.u||S;for(const t of _(Object.keys(l)))t in r||N(o,t,l[t],void 0,n,e.o);for(const t of _(Object.keys(r)))N(o,t,l[t],r[t],n,e.o)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var z=!1,B=(t,e,n)=>{const o=e.h[n];let l,r,s=0;if(null!==o.i)l=o.m=u.createTextNode(o.i);else{if(z||(z="svg"===o.p),l=o.m=u.createElementNS(z?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),z&&"foreignObject"===o.p&&(z=!1),V(null,o,z),null!=M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.h)for(s=0;s<o.h.length;++s)r=B(t,o,s),r&&l.appendChild(r);"svg"===o.p?z=!1:"foreignObject"===l.tagName&&(z=!0)}return l["s-hn"]=x,l},I=(t,e,n,o,l,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);l<=r;++l)o[l]&&(s=B(null,n,l),s&&(o[l].m=s,Y(i,s,e)))},J=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;X(e),t&&t.remove()}}},K=(t,e)=>t.p===e.p,Q=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,r=e.h,s=e.p,i=e.i;null===i?(V(t,e,z="svg"===s||"foreignObject"!==s&&z),null!==l&&null!==r?((t,e,n,o,l=!1)=>{let r,s=0,i=0,c=e.length-1,a=e[0],u=e[c],f=o.length-1,h=o[0],p=o[f];for(;s<=c&&i<=f;)null==a?a=e[++s]:null==u?u=e[--c]:null==h?h=o[++i]:null==p?p=o[--f]:K(a,h)?(Q(a,h,l),a=e[++s],h=o[++i]):K(u,p)?(Q(u,p,l),u=e[--c],p=o[--f]):K(a,p)?(Q(a,p,l),Y(t,a.m,u.m.nextSibling),a=e[++s],p=o[--f]):K(u,h)?(Q(u,h,l),Y(t,u.m,a.m),u=e[--c],h=o[++i]):(r=B(e&&e[i],n,i),h=o[++i],r&&Y(a.m.parentNode,r,a.m));s>c?I(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&J(e,s,c)})(o,l,e,r,n):null!==r?(null!==t.i&&(o.textContent=""),I(o,null,e,r,0,r.length-1)):null!==l&&J(l,0,l.length-1),z&&"svg"===s&&(z=!1)):t.i!==i&&(o.data=i)},X=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(X)},Y=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Z=(t,e)=>{e&&!t.$&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.$=e)))},tt=(t,e)=>{if(t.o|=16,!(4&t.o))return Z(t,t.S),g((()=>et(t,e)));t.o|=512},et=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e&&(o=ct(n,"componentWillLoad")),nt(o,(()=>lt(t,n,e)))},nt=(t,e)=>ot(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,lt=async(t,e,n)=>{var o;const l=t.$hostElement$,r=l["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=F(e),l=i.get(o);if(t=11===t.nodeType?t:u,l)if("string"==typeof l){let r,s=A.get(t=t.head||t);if(s||A.set(t,s=new Set),!s.has(o)){{r=u.createElement("style"),r.innerHTML=l;const e=null!=(n=f.O)?n:O(u);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.o&&(r.innerHTML+=c),s&&s.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);rt(t,e,l,n),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},rt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.j,r=t.k||L(null,null),s=(t=>t&&t.p===T)(e)?e:D(null,null,e);if(x=o.tagName,l.C&&(s.u=s.u||{},l.C.map((([t,e])=>s.u[e]=o[t]))),n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.p=null,s.o|=4,t.k=s,s.m=r.m=o.shadowRoot||o,M=o["s-sc"],Q(r,s,n)})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.t,o=t.S;ct(n,"componentDidRender"),64&t.o?ct(n,"componentDidUpdate"):(t.o|=64,at(e),ct(n,"componentDidLoad"),t.M(e),o||it()),t.$&&(t.$(),t.$=void 0),512&t.o&&b((()=>tt(t,!1))),t.o&=-517},it=()=>{at(u.documentElement),b((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"general-tutorial-slider"}});return t.dispatchEvent(e),e})(a)))},ct=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},at=t=>t.classList.add("hydrated"),ut=(t,e,o)=>{var l,s;const i=t.prototype;if(e.P||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const c=Object.entries(null!=(l=e.P)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).D.get(e))(0,t)},set(o){((t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.v}" 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).`);const i=s.$hostElement$,c=s.D.get(e),a=s.o,u=s.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.P[e][0]),(!(8&a)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(s.D.set(e,o),u)){if(l.R&&128&a){const t=l.R[e];t&&t.map((t=>{try{u[t](o,c,e)}catch(t){r(t,i)}}))}2==(18&a)&&tt(s,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,r){f.jmp((()=>{var s;const c=o.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&r!==l){const n=o.t,i=null==(s=e.R)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,l,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.R)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const r=n[1]||t;return o.set(r,t),512&n[0]&&(null==(l=e.C)||l.push([t,r])),r}))]))}}return t},ft=t=>{ct(t,"connectedCallback")},ht=t=>{ct(t,"disconnectedCallback")},pt=(t,o={})=>{var l;const h=[],d=o.exclude||[],m=a.customElements,w=u.head,y=w.querySelector("meta[charset]"),v=u.createElement("style"),$=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],P:o[2],L:o[3]};4&c.o&&(S=!0),c.P=o[2],c.C=[],c.R=null!=(l=o[4])?l:{};const a=c.v,u=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,j:n,D:new Map};o.T=new Promise((t=>o.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?$.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.j,l=()=>{};if(1&e.o)(null==e?void 0:e.t)?ft(e.t):(null==e?void 0:e.T)&&e.T.then((()=>ft(e.t)));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(e,e.S=n);break}}o.P&&Object.entries(o.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.U){const t=(t=>{const e=t.v.replace(/-/g,"_"),n=t.U;if(!n)return;const o=s.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.v}#${e.A}" was not found`);o.isProxied||(n.R=o.watchers,ut(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){r(t)}e.o&=-9,e.o|=128,l(),ft(e.t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=F(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.S,c=()=>tt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);(null==t?void 0:t.t)?ht(t.t):(null==t?void 0:t.T)&&t.T.then((()=>ht(t.t)))}})()))}componentOnReady(){return n(this).T}};c.U=t[0],d.includes(a)||m.get(a)||(h.push(a),m.define(a,ut(u,c,1)))}))})),h.length>0&&(S&&(v.textContent+=c),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const t=null!=(l=f.O)?l:O(u);null!=t&&v.setAttribute("nonce",t),w.insertBefore(v,y?y.nextSibling:w.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(it,30)))},dt=t=>f.O=t;export{pt as b,U as g,D as h,h as p,o as r,dt as s}
@@ -1,4 +1,8 @@
1
1
  export declare class GeneralTutorialSlider {
2
+ /**
3
+ * Client custom styling via streamStyling
4
+ */
5
+ mbSource: string;
2
6
  /**
3
7
  * Client custom styling via inline style
4
8
  */
@@ -53,12 +57,12 @@ export declare class GeneralTutorialSlider {
53
57
  itemsPerPage: number;
54
58
  el: HTMLElement;
55
59
  hasErrors: boolean;
56
- private limitStylingAppends;
57
60
  private isLoading;
58
61
  activeIndex: number;
59
62
  tutorialElementWidth: number;
60
63
  private userAgent;
61
64
  private stylingContainer;
65
+ private stylingSubscription;
62
66
  private tutorialData;
63
67
  isMobile: boolean;
64
68
  allElementsWidth: number;
@@ -67,6 +71,8 @@ export declare class GeneralTutorialSlider {
67
71
  xDown: any;
68
72
  yDown: any;
69
73
  watchEndpoint(newValue: string, oldValue: string): void;
74
+ handleClientStylingChange(newValue: any, oldValue: any): void;
75
+ handleClientStylingChangeURL(newValue: any, oldValue: any): void;
70
76
  connectedCallback(): void;
71
77
  componentWillLoad(): Promise<void>;
72
78
  componentDidLoad(): void;
@@ -83,8 +89,6 @@ export declare class GeneralTutorialSlider {
83
89
  handleTouchMove(evt: any): void;
84
90
  setActive(index: number): void;
85
91
  orientationChangeHandler: () => void;
86
- setClientStyling: () => void;
87
- setClientStylingURL: () => void;
88
92
  renderDots(): Array<HTMLElement>;
89
93
  render(): void;
90
94
  }
@@ -39,6 +39,10 @@ export namespace Components {
39
39
  * Language of the widget
40
40
  */
41
41
  "language": string;
42
+ /**
43
+ * Client custom styling via streamStyling
44
+ */
45
+ "mbSource": string;
42
46
  /**
43
47
  * Set the number of slides you wish to display.
44
48
  */
@@ -106,6 +110,10 @@ declare namespace LocalJSX {
106
110
  * Language of the widget
107
111
  */
108
112
  "language"?: string;
113
+ /**
114
+ * Client custom styling via streamStyling
115
+ */
116
+ "mbSource"?: string;
109
117
  /**
110
118
  * Set the number of slides you wish to display.
111
119
  */
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
- controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
- controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1020
1018
  crossOrigin?: string;
1021
1019
  crossorigin?: string;
1022
1020
  loop?: boolean;
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
1566
1564
  onSubmitCapture?: (event: Event) => void;
1567
1565
  onInvalid?: (event: Event) => void;
1568
1566
  onInvalidCapture?: (event: Event) => void;
1569
- onBeforeToggle?: (event: Event) => void;
1570
- onBeforeToggleCapture?: (event: Event) => void;
1571
- onToggle?: (event: Event) => void;
1572
- onToggleCapture?: (event: Event) => void;
1573
1567
  onLoad?: (event: Event) => void;
1574
1568
  onLoadCapture?: (event: Event) => void;
1575
1569
  onError?: (event: Event) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-tutorial-slider",
3
- "version": "1.55.0",
3
+ "version": "1.56.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as i,g as n}from"./p-f4302c55.js";const e={en:{error:"Error",noResults:"Loading, please wait ..."},hu:{error:"Error",noResults:"Loading, please wait ..."},ro:{error:"Eroare",noResults:"Loading, please wait ..."},fr:{error:"Error",noResults:"Loading, please wait ..."},ar:{error:"خطأ",noResults:"Loading, please wait ..."},hr:{error:"Greška",noResults:"Učitavanje, molimo pričekajte ..."},"es-mx":{error:"Error",noResults:"Cargando, espere por favor…"},"pt-br":{error:"Erro",noResults:"Carregando, espere por favor…"}},o=class{constructor(i){var n;t(this,i),this.userAgent=window.navigator.userAgent,this.isMobile=!!((n=this.userAgent).toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.allElementsWidth=0,this.xDown=null,this.yDown=null,this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.cmsEndpoint=void 0,this.userRoles="everyone",this.cmsEnv="stage",this.showSliderDots=!0,this.showSliderArrows=!0,this.showSliderArrowsMobile=!1,this.enableAutoScroll=!1,this.intervalPeriod=5e3,this.scrollItems=1,this.itemsPerPage=1,this.hasErrors=!1,this.limitStylingAppends=!1,this.isLoading=!0,this.activeIndex=0,this.tutorialElementWidth=0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentWillLoad(){if(this.cmsEndpoint&&this.language)return this.getGeneralTutorialSlider().then((t=>{this.tutorialData=t}))}componentDidLoad(){window.addEventListener("resize",this.resizeHandler)}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage(),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}componentDidUpdate(){this.recalculateItemsPerPage()}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}getGeneralTutorialSlider(){let t=new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);return t.searchParams.append("env",this.cmsEnv),t.searchParams.append("userRoles",this.userRoles),t.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"})()),new Promise(((i,n)=>{this.isLoading=!0,fetch(t.href).then((t=>t.json())).then((t=>{i(t)})).catch((t=>{console.error(t),this.hasErrors=!0,n(t)})).finally((()=>{this.isLoading=!1}))}))}move(t){this.setActive(this.activeIndex+t)}recalculateItemsPerPage(){this.tutorialsElement&&(this.tutorialElementWidth=this.tutorialsElement.clientWidth,this.allElementsWidth=(this.tutorialData.length-1)*this.tutorialElementWidth)}goTo(t){let i=this.activeIndex-t;if(i>0)for(let t=0;t<i;t++)this.move(-1);else for(let t=0;t>i;t--)this.move(1)}handleTouchStart(t){const i=this.getTouches(t)[0];this.xDown=i.clientX,this.yDown=i.clientY}getTouches(t){return t.touches||t.originalEvent.touches}handleTouchMove(t){if(!this.xDown||!this.yDown)return;let i=this.xDown-t.touches[0].clientX,n=this.yDown-t.touches[0].clientY;Math.abs(i)>Math.abs(n)&&this.move(i>0?1:-1),this.xDown=null,this.yDown=null}setActive(t){const i=this.tutorialData.length;this.activeIndex=t>=0?t>=i-1?i-1:t:0}renderDots(){const t=[];for(let n=0;n<this.tutorialData.length/this.itemsPerPage;n++)t.push(i("li",{class:n==this.activeIndex?"active":"default",onClick:()=>{this.goTo(n),this.setActive(n)}}));return t}render(){const t={transform:`translate(${this.allElementsWidth/(this.tutorialData.length-1)*this.activeIndex*-1}px, 0px)`},n={width:this.tutorialElementWidth/this.itemsPerPage+"px"};return this.hasErrors?i("div",{class:"GeneralTutorialSliderError"},i("div",{class:"TitleError"},e[void 0!==(o=this.language)&&o in e?o:"en"].error)):this.isLoading?void 0:i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"TutorialWrapper"},i("div",{class:"TutorialContent",ref:t=>this.slider=t},(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:0===this.activeIndex?"SliderNavButton DisabledArrow":"SliderNavButton",onClick:()=>this.move(-1)},i("svg",{fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),i("main",null,i("div",{style:t,ref:t=>this.tutorialsElement=t,class:"TutorialItems"},this.tutorialData.map((t=>{var e,o,s,r,l,a,d,h,u,c,p,v,m,w,g,f,x,I;return i("div",{class:"TutorialItem",style:n},i("div",{class:"ItemTitle",innerHTML:null==t?void 0:t.title}),(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.images)?i("div",{class:"ItemImage"},i("img",this.isMobile?{src:null===(l=null===(r=null===(s=null===(o=null==t?void 0:t.media)||void 0===o?void 0:o.images[0])||void 0===s?void 0:s.sources)||void 0===r?void 0:r.find((t=>"mobile"===t.media)))||void 0===l?void 0:l.src,alt:null==t?void 0:t.slug}:{src:null===(u=null===(h=null===(d=null===(a=null==t?void 0:t.media)||void 0===a?void 0:a.images[0])||void 0===d?void 0:d.sources)||void 0===h?void 0:h.find((t=>"desktop"===t.media)))||void 0===u?void 0:u.src,alt:null==t?void 0:t.slug})):(null===(c=null==t?void 0:t.media)||void 0===c?void 0:c.video)?i("div",{class:"ItemImage"},i("video",{controls:!0,loop:!0,autoplay:!0},i("source",this.isMobile?{src:null===(w=null===(m=null===(v=null===(p=null==t?void 0:t.media)||void 0===p?void 0:p.video[0])||void 0===v?void 0:v.sources)||void 0===m?void 0:m.find((t=>"mobile"===t.media)))||void 0===w?void 0:w.src,type:"video/mp4"}:{src:null===(I=null===(x=null===(f=null===(g=null==t?void 0:t.media)||void 0===g?void 0:g.video[0])||void 0===f?void 0:f.sources)||void 0===x?void 0:x.find((t=>"desktop"===t.media)))||void 0===I?void 0:I.src,type:"video/mp4"}))):null,i("div",{class:"ItemDescription",innerHTML:null==t?void 0:t.content}))})))),(this.showSliderArrows&&!this.isMobile||this.showSliderArrowsMobile&&this.isMobile)&&i("div",{class:this.activeIndex===this.tutorialData.length-1?" SliderNavButton DisabledArrow disabled":"SliderNavButton",onClick:()=>this.move(1)},i("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"}))),i("div",null)),this.showSliderDots&&i("div",{class:"DotsWrapper"},i("ul",{class:"Dots"},this.renderDots()))));var o}get el(){return n(this)}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"]}}};o.style=":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emw--color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emw--color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background: var(--emw--color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emw--color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n .TutorialItems {\n height: inherit;\n }\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emw--color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";export{o as general_tutorial_slider}
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,m=[],y=[],w=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&f.o?b($):f.raf($))},v=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{v(m),v(y),(d=m.length>0)&&f.raf($)},b=e=>h().then(e),g=w(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function O(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>x,unwrapErr:()=>P});var k=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},D=(e,t,...n)=>{let o=null,l=!1,s=!1;const r=[],i=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof e&&!j(o))&&(o+=""),l&&s?r[r.length-1].i+=o:r.push(l?A(null,o):o),s=l)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=A(e,null);return c.u=t,r.length>0&&(c.h=r),c},A=(e,t)=>({o:0,p:e,i:t,m:null,h:null,u:null}),R={},H=e=>n(e).$hostElement$,L=new WeakMap,T=e=>"sc-"+e.v,U=(e,t,n,o,s,r)=>{if(n!==o){let i=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=N(n),s=N(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("ref"===t)o&&o(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=j(o);if((i||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?i=!1:null!=n&&e[t]==l||("function"==typeof e.__lookupSetter__(t)?e[t]=l:e.setAttribute(t,l))}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(u,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(W);t=t.replace(q,""),n&&f.rel(e,t,n,l),o&&f.ael(e,t,o,l)}}},F=/\s/,N=e=>e?e.split(F):[],W="Capture",q=RegExp(W+"$"),G=(e,t,n)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,l=e&&e.u||S,s=t.u||S;for(const e of V(Object.keys(l)))e in s||U(o,e,l[e],void 0,n,t.o);for(const e of V(Object.keys(s)))U(o,e,l[e],s[e],n,t.o)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const o=t.h[n];let l,s,r=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),G(null,o,_),l.getRootNode().querySelector("body"),o.h)for(r=0;r<o.h.length;++r)s=z(e,o,r),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=M,l},B=(e,t,n,o,l,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=z(null,n,l),r&&(o[l].m=r,X(i,r,t)))},I=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.m;Q(t),e&&e.remove()}}},J=(e,t)=>e.p===t.p,K=(e,t,n=!1)=>{const o=t.m=e.m,l=e.h,s=t.h,r=t.p,i=t.i;null===i?(G(e,t,_="svg"===r||"foreignObject"!==r&&_),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,r=0,i=0,c=t.length-1,u=t[0],a=t[c],f=o.length-1,h=o[0],p=o[f];for(;r<=c&&i<=f;)null==u?u=t[++r]:null==a?a=t[--c]:null==h?h=o[++i]:null==p?p=o[--f]:J(u,h)?(K(u,h,l),u=t[++r],h=o[++i]):J(a,p)?(K(a,p,l),a=t[--c],p=o[--f]):J(u,p)?(K(u,p,l),X(e,u.m,a.m.nextSibling),u=t[++r],p=o[--f]):J(a,h)?(K(a,h,l),X(e,a.m,u.m),a=t[--c],h=o[++i]):(s=z(t&&t[i],n,i),h=o[++i],s&&X(u.m.parentNode,s,u.m));r>c?B(e,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&I(t,r,c)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),B(o,null,t,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1),_&&"svg"===r&&(_=!1)):e.i!==i&&(o.data=i)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.$&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.$=t)))},Z=(e,t)=>{if(e.o|=16,!(4&e.o))return Y(e,e.S),g((()=>ee(e,t)));e.o|=512},ee=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(o=ie(n,"componentWillLoad")),te(o,(()=>oe(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=T(t),l=i.get(o);if(e=11===e.nodeType?e:a,l)if("string"==typeof l){let s,r=L.get(e=e.head||e);if(r||L.set(e,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const o=null!=(n=f.O)?n:O(a);if(null!=o&&s.setAttribute("nonce",o),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(p){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(s)}else e.append(s);1&t.o&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.o&&(s.innerHTML+=c),r&&r.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);le(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},le=(e,t,n,o)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.j,s=e.k||A(null,null),r=(e=>e&&e.p===R)(t)?t:D(null,null,t);if(M=o.tagName,l.C&&(r.u=r.u||{},l.C.map((([e,t])=>r.u[t]=o[e]))),n&&r.u)for(const e of Object.keys(r.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=o[e]);r.p=null,r.o|=4,e.k=r,r.m=s.m=o.shadowRoot||o,K(s,r,n)})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,o=e.S;ie(n,"componentDidRender"),64&e.o?ie(n,"componentDidUpdate"):(e.o|=64,ce(t),ie(n,"componentDidLoad"),e.M(t),o||re()),e.$&&(e.$(),e.$=void 0),512&e.o&&b((()=>Z(e,!1))),e.o&=-517},re=()=>{ce(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"general-tutorial-slider"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,o)=>{var l,r;const i=e.prototype;if(t.P||t.D||e.watchers){e.watchers&&!t.D&&(t.D=e.watchers);const c=Object.entries(null!=(l=t.P)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(o){((e,t,o,l)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${l.v}" 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).`);const i=r.$hostElement$,c=r.A.get(t),u=r.o,a=r.t;if(o=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(o,l.P[t][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.A.set(t,o),a)){if(l.D&&128&u){const e=l.D[t];e&&e.map((e=>{try{a[e](o,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var r;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=t.D)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.D)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.C)||l.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"connectedCallback")},fe=e=>{ie(e,"disconnectedCallback")},he=(e,o={})=>{var l;const h=[],d=o.exclude||[],m=u.customElements,y=a.head,w=y.querySelector("meta[charset]"),v=a.createElement("style"),$=[];let b,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],v:o[1],P:o[2],R:o[3]};4&c.o&&(S=!0),c.P=o[2],c.C=[],c.D=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,j:n,A:new Map};o.H=new Promise((e=>o.M=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?$.push(this):f.jmp((()=>(e=>{if(!(1&f.o)){const t=n(e),o=t.j,l=()=>{};if(1&t.o)(null==t?void 0:t.t)?ae(t.t):(null==t?void 0:t.H)&&t.H.then((()=>ae(t.t)));else{t.o|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.S=n);break}}o.P&&Object.entries(o.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.L){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.L;if(!n)return;const o=r.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.v}#${t.T}" was not found`);o.isProxied||(n.D=o.watchers,ue(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,t.o|=128,l(),ae(t.t)}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=T(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.S,c=()=>Z(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const e=n(this);(null==e?void 0:e.t)?fe(e.t):(null==e?void 0:e.H)&&e.H.then((()=>fe(e.t)))}})()))}componentOnReady(){return n(this).H}};c.L=e[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(S&&(v.textContent+=c),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(l=f.O)?l:O(a);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,w?w.nextSibling:y.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(re,30)))},pe=e=>f.O=e;export{he as b,H as g,D as h,h as p,o as r,pe as s}