@everymatrix/helper-accordion 1.77.25 → 1.77.27

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-bf959871.js');
5
+ const index = require('./index-46debeee.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
@@ -35,25 +35,73 @@ const getTranslations = (data) => {
35
35
  });
36
36
  };
37
37
 
38
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}";
38
+ /**
39
+ * @name setClientStyling
40
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
41
+ * @param {HTMLElement} stylingContainer The reference element of the widget
42
+ * @param {string} clientStyling The style content
43
+ */
44
+ function setClientStyling(stylingContainer, clientStyling) {
45
+ if (stylingContainer) {
46
+ const sheet = document.createElement('style');
47
+ sheet.innerHTML = clientStyling;
48
+ stylingContainer.appendChild(sheet);
49
+ }
50
+ }
51
+
52
+ /**
53
+ * @name setClientStylingURL
54
+ * @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
55
+ * @param {HTMLElement} stylingContainer The reference element of the widget
56
+ * @param {string} clientStylingUrl The URL of the style content
57
+ */
58
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
59
+ const url = new URL(clientStylingUrl);
60
+
61
+ fetch(url.href)
62
+ .then((res) => res.text())
63
+ .then((data) => {
64
+ const cssFile = document.createElement('style');
65
+ cssFile.innerHTML = data;
66
+ if (stylingContainer) {
67
+ stylingContainer.appendChild(cssFile);
68
+ }
69
+ })
70
+ .catch((err) => {
71
+ console.error('There was an error while trying to load client styling from URL', err);
72
+ });
73
+ }
74
+
75
+ /**
76
+ * @name setStreamLibrary
77
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
78
+ * @param {HTMLElement} stylingContainer The highest element of the widget
79
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
80
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
81
+ */
82
+ function setStreamStyling(stylingContainer, domain, subscription) {
83
+ if (window.emMessageBus) {
84
+ const sheet = document.createElement('style');
85
+
86
+ window.emMessageBus.subscribe(domain, (data) => {
87
+ sheet.innerHTML = data;
88
+ if (stylingContainer) {
89
+ stylingContainer.appendChild(sheet);
90
+ }
91
+ });
92
+ }
93
+ }
94
+
95
+ const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:var(--emw--color-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00aba4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}";
39
96
  const HelperAccordionStyle0 = helperAccordionCss;
40
97
 
41
98
  const HelperAccordion = class {
42
99
  constructor(hostRef) {
43
100
  index.registerInstance(this, hostRef);
44
101
  this.accordionEvent = index.createEvent(this, "helperAccordionAction", 7);
45
- this.setClientStyling = () => {
46
- let sheet = document.createElement('style');
47
- sheet.innerHTML = this.clientStyling;
48
- this.stylingContainer.prepend(sheet);
49
- };
50
- this.setClientStylingURL = () => {
51
- let cssFile = document.createElement('style');
52
- setTimeout(() => {
53
- cssFile.innerHTML = this.clientStylingUrlContent;
54
- this.stylingContainer.prepend(cssFile);
55
- }, 1);
56
- };
102
+ this.mbSource = undefined;
103
+ this.clientStyling = undefined;
104
+ this.clientStylingUrl = undefined;
57
105
  this.ticketHistoryFlag = false;
58
106
  this.headerTitle = '';
59
107
  this.headerSubtitle = '';
@@ -64,13 +112,38 @@ const HelperAccordion = class {
64
112
  this.eventName = 'helperAccordionAction';
65
113
  this.collapsed = true;
66
114
  this.language = 'en';
67
- this.clientStyling = '';
68
- this.clientStylingUrlContent = '';
69
115
  this.translationUrl = undefined;
70
116
  this.showContent = undefined;
71
- this.limitStylingAppends = false;
72
117
  }
73
118
  // @TODO fix the `any` type :)
119
+ handleClientStylingChange(newValue, oldValue) {
120
+ if (newValue != oldValue) {
121
+ setClientStyling(this.stylingContainer, this.clientStyling);
122
+ }
123
+ }
124
+ handleClientStylingUrlChange(newValue, oldValue) {
125
+ if (newValue != oldValue) {
126
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
127
+ }
128
+ }
129
+ handleMbSourceChange(newValue, oldValue) {
130
+ if (newValue != oldValue) {
131
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
132
+ }
133
+ }
134
+ componentDidLoad() {
135
+ if (this.stylingContainer) {
136
+ if (this.mbSource)
137
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
138
+ if (this.clientStyling)
139
+ setClientStyling(this.stylingContainer, this.clientStyling);
140
+ if (this.clientStylingUrl)
141
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
142
+ }
143
+ }
144
+ disconnectedCallback() {
145
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
146
+ }
74
147
  connectedCallback() {
75
148
  this.showContent = !this.collapsed;
76
149
  }
@@ -79,17 +152,6 @@ const HelperAccordion = class {
79
152
  getTranslations(JSON.parse(this.translationUrl));
80
153
  }
81
154
  }
82
- componentDidRender() {
83
- // start custom styling area
84
- if (!this.limitStylingAppends && this.stylingContainer) {
85
- if (this.clientStyling)
86
- this.setClientStyling();
87
- if (this.clientStylingUrlContent)
88
- this.setClientStylingURL();
89
- this.limitStylingAppends = true;
90
- }
91
- // end custom styling area
92
- }
93
155
  toggleContent() {
94
156
  this.showContent = !this.showContent;
95
157
  }
@@ -101,11 +163,13 @@ const HelperAccordion = class {
101
163
  this.accordionEvent.emit();
102
164
  }
103
165
  render() {
104
- return (index.h("div", { key: '2db19795aa22479f038d9fc7c936cf7403efa43e', class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { key: '6804e27dbd68e4f4182ab07beb665c53b54069b6', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, index.h("p", { key: 'd1293990d39da1f50d36dff28e1abbe53259356b', class: "Title" }, this.headerTitle), index.h("p", { key: '7632e3ddda5dea8e91d8a3935ff46c0f357c4397', class: "Subtitle" }, this.headerSubtitle), index.h("p", { key: '1ab0dd4cc2625ef20c858738ee290e922e37dd21', class: "Subtitle Description" }, this.description), index.h("span", { key: '3c7e3d3092aa97d24f62383e17a8a91646a78058', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
105
- index.h("div", { key: 'ba970b8947e1986aedbdfd37b044e05f2b1c29fc' }, index.h("div", { key: '7cfc0ca2b99d76d7647569f7105c29d1be8cf994', class: "Content" }, index.h("slot", { key: 'a2d866a914d33eac26b3b7e138e611be9f942c65', name: 'accordionContent' }), this.footer && this.showContent &&
106
- index.h("div", { key: 'c44d54e98f712c921e7dd16faaaaa7cfb92e17c4' }, this.deleteTab &&
107
- index.h("span", { key: '8c46aa94fcce959f370d07da69bd58509c143373', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
166
+ return (index.h("div", { key: '58cd507e7d1dc8de1e3b049936a2d6acb355e83d', class: "Wrapper", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '70c6453ca4c4d40738edb1ae7e91f8954eebd3eb', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, index.h("p", { key: 'cf543e01c0baa833bea27aa4effb19734e234ed1', class: "Title" }, this.headerTitle), index.h("p", { key: '365a05cabda273796e9d9689e514566ecc2aadcc', class: "Subtitle" }, this.headerSubtitle), index.h("p", { key: 'f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f', class: "Subtitle Description" }, this.description), index.h("span", { key: 'a47718e90743d53b31968f67b002a3e427e193bc', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent && (index.h("div", { key: 'bb34d51602f9397c427d79141a38aca7a64bf206' }, index.h("div", { key: '64171a30185b88bbafaa4ea555aeb9e2e33c46d6', class: "Content" }, index.h("slot", { key: '6def0d44f3881196255f3329184053fb3d5a3cfd', name: "accordionContent" }), this.footer && this.showContent && (index.h("div", { key: '08bfb5b017055788ba55b149e3bee23964f11ccf' }, this.deleteTab && (index.h("span", { key: 'b7b03fc6329a37841a2cf2b6a34780349341a0d5', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language))))))))));
108
167
  }
168
+ static get watchers() { return {
169
+ "clientStyling": ["handleClientStylingChange"],
170
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
171
+ "mbSource": ["handleMbSourceChange"]
172
+ }; }
109
173
  };
110
174
  HelperAccordion.style = HelperAccordionStyle0;
111
175
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf959871.js');
5
+ const index = require('./index-46debeee.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
22
+ return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"translationUrl":[520,"translation-url"],"showContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'helper-accordion';
24
- const BUILD = /* helper-accordion */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, 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: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* helper-accordion */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, 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: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -806,14 +806,14 @@ var postUpdateComponent = (hostRef) => {
806
806
  const endPostUpdate = createTime("postUpdate", tagName);
807
807
  const instance = hostRef.$lazyInstance$ ;
808
808
  const ancestorComponent = hostRef.$ancestorComponent$;
809
- {
810
- safeCall(instance, "componentDidRender");
811
- }
812
809
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
813
810
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
814
811
  {
815
812
  addHydratedFlag(elm);
816
813
  }
814
+ {
815
+ safeCall(instance, "componentDidLoad");
816
+ }
817
817
  endPostUpdate();
818
818
  {
819
819
  hostRef.$onReadyResolve$(elm);
@@ -865,6 +865,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
865
865
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
866
866
  );
867
867
  }
868
+ const elm = hostRef.$hostElement$ ;
868
869
  const oldVal = hostRef.$instanceValues$.get(propName);
869
870
  const flags = hostRef.$flags$;
870
871
  const instance = hostRef.$lazyInstance$ ;
@@ -874,6 +875,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
874
875
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
875
876
  hostRef.$instanceValues$.set(propName, newVal);
876
877
  if (instance) {
878
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
879
+ const watchMethods = cmpMeta.$watchers$[propName];
880
+ if (watchMethods) {
881
+ watchMethods.map((watchMethodName) => {
882
+ try {
883
+ instance[watchMethodName](newVal, oldVal, propName);
884
+ } catch (e) {
885
+ consoleError(e, elm);
886
+ }
887
+ });
888
+ }
889
+ }
877
890
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
878
891
  scheduleUpdate(hostRef, false);
879
892
  }
@@ -885,7 +898,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
885
898
  var proxyComponent = (Cstr, cmpMeta, flags) => {
886
899
  var _a, _b;
887
900
  const prototype = Cstr.prototype;
888
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
901
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
902
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
903
+ cmpMeta.$watchers$ = Cstr.watchers;
904
+ }
889
905
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
890
906
  members.map(([memberName, [memberFlags]]) => {
891
907
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -967,6 +983,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
967
983
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
968
984
  }
969
985
  if (!Cstr.isProxied) {
986
+ {
987
+ cmpMeta.$watchers$ = Cstr.watchers;
988
+ }
970
989
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
971
990
  Cstr.isProxied = true;
972
991
  }
@@ -982,6 +1001,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
982
1001
  {
983
1002
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
984
1003
  }
1004
+ {
1005
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1006
+ }
985
1007
  endNewInstance();
986
1008
  fireConnectedCallback(hostRef.$lazyInstance$);
987
1009
  } else {
@@ -1056,12 +1078,17 @@ var connectedCallback = (elm) => {
1056
1078
  }
1057
1079
  };
1058
1080
  var disconnectInstance = (instance) => {
1081
+ {
1082
+ safeCall(instance, "disconnectedCallback");
1083
+ }
1059
1084
  };
1060
1085
  var disconnectedCallback = async (elm) => {
1061
1086
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1062
1087
  const hostRef = getHostRef(elm);
1063
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1064
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1088
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1089
+ disconnectInstance(hostRef.$lazyInstance$);
1090
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1091
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1065
1092
  }
1066
1093
  }
1067
1094
  };
@@ -1084,6 +1111,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1084
1111
  let hasSlotRelocation = false;
1085
1112
  lazyBundles.map((lazyBundle) => {
1086
1113
  lazyBundle[1].map((compactMeta) => {
1114
+ var _a2;
1087
1115
  const cmpMeta = {
1088
1116
  $flags$: compactMeta[0],
1089
1117
  $tagName$: compactMeta[1],
@@ -1099,6 +1127,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1099
1127
  {
1100
1128
  cmpMeta.$attrsToReflect$ = [];
1101
1129
  }
1130
+ {
1131
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1132
+ }
1102
1133
  const tagName = cmpMeta.$tagName$;
1103
1134
  const HostElement = class extends HTMLElement {
1104
1135
  // StencilLazyHost
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bf959871.js');
5
+ const index = require('./index-46debeee.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([["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["helper-accordion.cjs",[[1,"helper-accordion",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"translationUrl":[520,"translation-url"],"showContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -6,29 +6,29 @@
6
6
 
7
7
  .Header {
8
8
  border-radius: 5px;
9
- background: var(--emw--color-background, #009993);
9
+ background: var(--emw--color-primary, #009993);
10
10
  display: flex;
11
11
  gap: 30px;
12
- border: 1px solid var(--emw--color-typography, #009993);
12
+ border: 1px solid var(--emw--color-primary, #009993);
13
13
  padding: 8px 10px;
14
14
  user-select: none;
15
15
  margin-bottom: 1px;
16
16
  cursor: pointer;
17
17
  }
18
18
  .Header:hover {
19
- background: var(--emw--color-background-secondary, #00ABA4);
19
+ background: var(--emw--color-secondary, #00aba4);
20
20
  }
21
21
  .Header .Title,
22
22
  .Header .Subtitle,
23
23
  .Header .Description {
24
24
  margin: 0;
25
25
  font-size: 14px;
26
- color: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
26
+ color: var(--emw--color-typography-inverse, rgb(255, 255, 255));
27
27
  text-transform: capitalize;
28
28
  }
29
29
  .Header .Expand {
30
30
  margin-left: auto;
31
- color: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
31
+ color: var(--emw--color-typography-inverse, rgb(255, 255, 255));
32
32
  width: 17px;
33
33
  height: 17px;
34
34
  cursor: pointer;
@@ -40,28 +40,28 @@
40
40
 
41
41
  .HeaderTicketHistory {
42
42
  border-radius: 4px;
43
- background: var(--emw--color-gray-50, #F1F1F1);
43
+ background: var(--emw--color-background, #fff);
44
44
  display: flex;
45
45
  gap: 30px;
46
- border: 1px solid var(--emw--color-typography, #009993);
46
+ border: 1px solid var(--emw--color-primary, #009993);
47
47
  padding: 8px 10px;
48
48
  user-select: none;
49
49
  margin-bottom: 5px;
50
50
  cursor: pointer;
51
51
  }
52
52
  .HeaderTicketHistory:hover {
53
- background: var(--emw--color-secondary, #00ABA4);
53
+ background: var(--emw--color-secondary, #00aba4);
54
54
  }
55
55
  .HeaderTicketHistory .Title,
56
56
  .HeaderTicketHistory .Subtitle,
57
57
  .HeaderTicketHistory .Description {
58
58
  margin: 0;
59
59
  font-size: 14px;
60
- color: var(--emw--button-text-color, #000);
60
+ color: var(--emw--color-typography, #000);
61
61
  }
62
62
  .HeaderTicketHistory .Expand {
63
63
  margin-left: auto;
64
- color: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
64
+ color: var(--emw--color-typography-inverse, rgb(255, 255, 255));
65
65
  width: 17px;
66
66
  height: 17px;
67
67
  cursor: pointer;
@@ -73,11 +73,11 @@
73
73
 
74
74
  .Content {
75
75
  border-radius: 0 0 4px 4px;
76
- background: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
77
- border: 1px solid var(--emw--button-border-color, #009993);
76
+ background: var(--emw--color-background, #fff);
77
+ border: 1px solid var(--emw--color-primary, #009993);
78
78
  padding: 10px 15px;
79
79
  user-select: none;
80
- color: var(--emw--button-text-color, #000);
80
+ color: var(--emw--color-typography, #000);
81
81
  margin-bottom: 10px;
82
82
  }
83
83
 
@@ -91,11 +91,11 @@
91
91
  text-align: center;
92
92
  padding: 8px 20px;
93
93
  min-width: 80px;
94
- background: var(--emw--color-error, #FF3D00);
95
- border: 1px solid var(--emw--color-error, #FF3D00);
96
- color: var(--emw--color-gray-transparency-100, rgb(255, 255, 255));
94
+ background: var(--emw--color-error, #ff3d00);
95
+ border: 1px solid var(--emw--color-error, #ff3d00);
96
+ color: var(--emw--color-background, #fff);
97
97
  }
98
98
  .ActionButton:hover {
99
- background: var(--emw--color-secondary, #FF6536);
100
- border: 1px solid var(--emw--color-error, #FF3D00);
99
+ background: var(--emw--color-secondary, #ff6536);
100
+ border: 1px solid var(--emw--color-error, #ff3d00);
101
101
  }
@@ -1,19 +1,11 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { translate, getTranslations } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  export class HelperAccordion {
4
5
  constructor() {
5
- this.setClientStyling = () => {
6
- let sheet = document.createElement('style');
7
- sheet.innerHTML = this.clientStyling;
8
- this.stylingContainer.prepend(sheet);
9
- };
10
- this.setClientStylingURL = () => {
11
- let cssFile = document.createElement('style');
12
- setTimeout(() => {
13
- cssFile.innerHTML = this.clientStylingUrlContent;
14
- this.stylingContainer.prepend(cssFile);
15
- }, 1);
16
- };
6
+ this.mbSource = undefined;
7
+ this.clientStyling = undefined;
8
+ this.clientStylingUrl = undefined;
17
9
  this.ticketHistoryFlag = false;
18
10
  this.headerTitle = '';
19
11
  this.headerSubtitle = '';
@@ -24,13 +16,38 @@ export class HelperAccordion {
24
16
  this.eventName = 'helperAccordionAction';
25
17
  this.collapsed = true;
26
18
  this.language = 'en';
27
- this.clientStyling = '';
28
- this.clientStylingUrlContent = '';
29
19
  this.translationUrl = undefined;
30
20
  this.showContent = undefined;
31
- this.limitStylingAppends = false;
32
21
  }
33
22
  // @TODO fix the `any` type :)
23
+ handleClientStylingChange(newValue, oldValue) {
24
+ if (newValue != oldValue) {
25
+ setClientStyling(this.stylingContainer, this.clientStyling);
26
+ }
27
+ }
28
+ handleClientStylingUrlChange(newValue, oldValue) {
29
+ if (newValue != oldValue) {
30
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
31
+ }
32
+ }
33
+ handleMbSourceChange(newValue, oldValue) {
34
+ if (newValue != oldValue) {
35
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
36
+ }
37
+ }
38
+ componentDidLoad() {
39
+ if (this.stylingContainer) {
40
+ if (this.mbSource)
41
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
42
+ if (this.clientStyling)
43
+ setClientStyling(this.stylingContainer, this.clientStyling);
44
+ if (this.clientStylingUrl)
45
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
46
+ }
47
+ }
48
+ disconnectedCallback() {
49
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
50
+ }
34
51
  connectedCallback() {
35
52
  this.showContent = !this.collapsed;
36
53
  }
@@ -39,17 +56,6 @@ export class HelperAccordion {
39
56
  getTranslations(JSON.parse(this.translationUrl));
40
57
  }
41
58
  }
42
- componentDidRender() {
43
- // start custom styling area
44
- if (!this.limitStylingAppends && this.stylingContainer) {
45
- if (this.clientStyling)
46
- this.setClientStyling();
47
- if (this.clientStylingUrlContent)
48
- this.setClientStylingURL();
49
- this.limitStylingAppends = true;
50
- }
51
- // end custom styling area
52
- }
53
59
  toggleContent() {
54
60
  this.showContent = !this.showContent;
55
61
  }
@@ -61,10 +67,7 @@ export class HelperAccordion {
61
67
  this.accordionEvent.emit();
62
68
  }
63
69
  render() {
64
- return (h("div", { key: '2db19795aa22479f038d9fc7c936cf7403efa43e', class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { key: '6804e27dbd68e4f4182ab07beb665c53b54069b6', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'd1293990d39da1f50d36dff28e1abbe53259356b', class: "Title" }, this.headerTitle), h("p", { key: '7632e3ddda5dea8e91d8a3935ff46c0f357c4397', class: "Subtitle" }, this.headerSubtitle), h("p", { key: '1ab0dd4cc2625ef20c858738ee290e922e37dd21', class: "Subtitle Description" }, this.description), h("span", { key: '3c7e3d3092aa97d24f62383e17a8a91646a78058', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
65
- h("div", { key: 'ba970b8947e1986aedbdfd37b044e05f2b1c29fc' }, h("div", { key: '7cfc0ca2b99d76d7647569f7105c29d1be8cf994', class: "Content" }, h("slot", { key: 'a2d866a914d33eac26b3b7e138e611be9f942c65', name: 'accordionContent' }), this.footer && this.showContent &&
66
- h("div", { key: 'c44d54e98f712c921e7dd16faaaaa7cfb92e17c4' }, this.deleteTab &&
67
- h("span", { key: '8c46aa94fcce959f370d07da69bd58509c143373', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
70
+ return (h("div", { key: '58cd507e7d1dc8de1e3b049936a2d6acb355e83d', class: "Wrapper", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '70c6453ca4c4d40738edb1ae7e91f8954eebd3eb', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'cf543e01c0baa833bea27aa4effb19734e234ed1', class: "Title" }, this.headerTitle), h("p", { key: '365a05cabda273796e9d9689e514566ecc2aadcc', class: "Subtitle" }, this.headerSubtitle), h("p", { key: 'f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f', class: "Subtitle Description" }, this.description), h("span", { key: 'a47718e90743d53b31968f67b002a3e427e193bc', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent && (h("div", { key: 'bb34d51602f9397c427d79141a38aca7a64bf206' }, h("div", { key: '64171a30185b88bbafaa4ea555aeb9e2e33c46d6', class: "Content" }, h("slot", { key: '6def0d44f3881196255f3329184053fb3d5a3cfd', name: "accordionContent" }), this.footer && this.showContent && (h("div", { key: '08bfb5b017055788ba55b149e3bee23964f11ccf' }, this.deleteTab && (h("span", { key: 'b7b03fc6329a37841a2cf2b6a34780349341a0d5', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language))))))))));
68
71
  }
69
72
  static get is() { return "helper-accordion"; }
70
73
  static get encapsulation() { return "shadow"; }
@@ -80,6 +83,57 @@ export class HelperAccordion {
80
83
  }
81
84
  static get properties() {
82
85
  return {
86
+ "mbSource": {
87
+ "type": "string",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "string",
91
+ "resolved": "string",
92
+ "references": {}
93
+ },
94
+ "required": false,
95
+ "optional": false,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "Client custom styling via message bus"
99
+ },
100
+ "attribute": "mb-source",
101
+ "reflect": true
102
+ },
103
+ "clientStyling": {
104
+ "type": "string",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "string",
108
+ "resolved": "string",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Client custom styling via string"
116
+ },
117
+ "attribute": "client-styling",
118
+ "reflect": true
119
+ },
120
+ "clientStylingUrl": {
121
+ "type": "string",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "string",
125
+ "resolved": "string",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": "Client custom styling via css file url"
133
+ },
134
+ "attribute": "client-styling-url",
135
+ "reflect": true
136
+ },
83
137
  "ticketHistoryFlag": {
84
138
  "type": "boolean",
85
139
  "mutable": false,
@@ -260,42 +314,6 @@ export class HelperAccordion {
260
314
  "reflect": true,
261
315
  "defaultValue": "'en'"
262
316
  },
263
- "clientStyling": {
264
- "type": "string",
265
- "mutable": false,
266
- "complexType": {
267
- "original": "string",
268
- "resolved": "string",
269
- "references": {}
270
- },
271
- "required": false,
272
- "optional": false,
273
- "docs": {
274
- "tags": [],
275
- "text": "Client custom styling via string"
276
- },
277
- "attribute": "client-styling",
278
- "reflect": true,
279
- "defaultValue": "''"
280
- },
281
- "clientStylingUrlContent": {
282
- "type": "string",
283
- "mutable": false,
284
- "complexType": {
285
- "original": "string",
286
- "resolved": "string",
287
- "references": {}
288
- },
289
- "required": false,
290
- "optional": false,
291
- "docs": {
292
- "tags": [],
293
- "text": "Client custom styling via url content"
294
- },
295
- "attribute": "client-styling-url-content",
296
- "reflect": true,
297
- "defaultValue": "''"
298
- },
299
317
  "translationUrl": {
300
318
  "type": "any",
301
319
  "mutable": false,
@@ -317,8 +335,7 @@ export class HelperAccordion {
317
335
  }
318
336
  static get states() {
319
337
  return {
320
- "showContent": {},
321
- "limitStylingAppends": {}
338
+ "showContent": {}
322
339
  };
323
340
  }
324
341
  static get events() {
@@ -339,4 +356,16 @@ export class HelperAccordion {
339
356
  }
340
357
  }];
341
358
  }
359
+ static get watchers() {
360
+ return [{
361
+ "propName": "clientStyling",
362
+ "methodName": "handleClientStylingChange"
363
+ }, {
364
+ "propName": "clientStylingUrl",
365
+ "methodName": "handleClientStylingUrlChange"
366
+ }, {
367
+ "propName": "mbSource",
368
+ "methodName": "handleMbSourceChange"
369
+ }];
370
+ }
342
371
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-08b29256.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-d6f3c92e.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
@@ -31,25 +31,73 @@ const getTranslations = (data) => {
31
31
  });
32
32
  };
33
33
 
34
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}";
34
+ /**
35
+ * @name setClientStyling
36
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
37
+ * @param {HTMLElement} stylingContainer The reference element of the widget
38
+ * @param {string} clientStyling The style content
39
+ */
40
+ function setClientStyling(stylingContainer, clientStyling) {
41
+ if (stylingContainer) {
42
+ const sheet = document.createElement('style');
43
+ sheet.innerHTML = clientStyling;
44
+ stylingContainer.appendChild(sheet);
45
+ }
46
+ }
47
+
48
+ /**
49
+ * @name setClientStylingURL
50
+ * @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
51
+ * @param {HTMLElement} stylingContainer The reference element of the widget
52
+ * @param {string} clientStylingUrl The URL of the style content
53
+ */
54
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
55
+ const url = new URL(clientStylingUrl);
56
+
57
+ fetch(url.href)
58
+ .then((res) => res.text())
59
+ .then((data) => {
60
+ const cssFile = document.createElement('style');
61
+ cssFile.innerHTML = data;
62
+ if (stylingContainer) {
63
+ stylingContainer.appendChild(cssFile);
64
+ }
65
+ })
66
+ .catch((err) => {
67
+ console.error('There was an error while trying to load client styling from URL', err);
68
+ });
69
+ }
70
+
71
+ /**
72
+ * @name setStreamLibrary
73
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
74
+ * @param {HTMLElement} stylingContainer The highest element of the widget
75
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
76
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
77
+ */
78
+ function setStreamStyling(stylingContainer, domain, subscription) {
79
+ if (window.emMessageBus) {
80
+ const sheet = document.createElement('style');
81
+
82
+ window.emMessageBus.subscribe(domain, (data) => {
83
+ sheet.innerHTML = data;
84
+ if (stylingContainer) {
85
+ stylingContainer.appendChild(sheet);
86
+ }
87
+ });
88
+ }
89
+ }
90
+
91
+ const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:var(--emw--color-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00aba4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}";
35
92
  const HelperAccordionStyle0 = helperAccordionCss;
36
93
 
37
94
  const HelperAccordion = class {
38
95
  constructor(hostRef) {
39
96
  registerInstance(this, hostRef);
40
97
  this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
41
- this.setClientStyling = () => {
42
- let sheet = document.createElement('style');
43
- sheet.innerHTML = this.clientStyling;
44
- this.stylingContainer.prepend(sheet);
45
- };
46
- this.setClientStylingURL = () => {
47
- let cssFile = document.createElement('style');
48
- setTimeout(() => {
49
- cssFile.innerHTML = this.clientStylingUrlContent;
50
- this.stylingContainer.prepend(cssFile);
51
- }, 1);
52
- };
98
+ this.mbSource = undefined;
99
+ this.clientStyling = undefined;
100
+ this.clientStylingUrl = undefined;
53
101
  this.ticketHistoryFlag = false;
54
102
  this.headerTitle = '';
55
103
  this.headerSubtitle = '';
@@ -60,13 +108,38 @@ const HelperAccordion = class {
60
108
  this.eventName = 'helperAccordionAction';
61
109
  this.collapsed = true;
62
110
  this.language = 'en';
63
- this.clientStyling = '';
64
- this.clientStylingUrlContent = '';
65
111
  this.translationUrl = undefined;
66
112
  this.showContent = undefined;
67
- this.limitStylingAppends = false;
68
113
  }
69
114
  // @TODO fix the `any` type :)
115
+ handleClientStylingChange(newValue, oldValue) {
116
+ if (newValue != oldValue) {
117
+ setClientStyling(this.stylingContainer, this.clientStyling);
118
+ }
119
+ }
120
+ handleClientStylingUrlChange(newValue, oldValue) {
121
+ if (newValue != oldValue) {
122
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
123
+ }
124
+ }
125
+ handleMbSourceChange(newValue, oldValue) {
126
+ if (newValue != oldValue) {
127
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
128
+ }
129
+ }
130
+ componentDidLoad() {
131
+ if (this.stylingContainer) {
132
+ if (this.mbSource)
133
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
134
+ if (this.clientStyling)
135
+ setClientStyling(this.stylingContainer, this.clientStyling);
136
+ if (this.clientStylingUrl)
137
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
138
+ }
139
+ }
140
+ disconnectedCallback() {
141
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
142
+ }
70
143
  connectedCallback() {
71
144
  this.showContent = !this.collapsed;
72
145
  }
@@ -75,17 +148,6 @@ const HelperAccordion = class {
75
148
  getTranslations(JSON.parse(this.translationUrl));
76
149
  }
77
150
  }
78
- componentDidRender() {
79
- // start custom styling area
80
- if (!this.limitStylingAppends && this.stylingContainer) {
81
- if (this.clientStyling)
82
- this.setClientStyling();
83
- if (this.clientStylingUrlContent)
84
- this.setClientStylingURL();
85
- this.limitStylingAppends = true;
86
- }
87
- // end custom styling area
88
- }
89
151
  toggleContent() {
90
152
  this.showContent = !this.showContent;
91
153
  }
@@ -97,11 +159,13 @@ const HelperAccordion = class {
97
159
  this.accordionEvent.emit();
98
160
  }
99
161
  render() {
100
- return (h("div", { key: '2db19795aa22479f038d9fc7c936cf7403efa43e', class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { key: '6804e27dbd68e4f4182ab07beb665c53b54069b6', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'd1293990d39da1f50d36dff28e1abbe53259356b', class: "Title" }, this.headerTitle), h("p", { key: '7632e3ddda5dea8e91d8a3935ff46c0f357c4397', class: "Subtitle" }, this.headerSubtitle), h("p", { key: '1ab0dd4cc2625ef20c858738ee290e922e37dd21', class: "Subtitle Description" }, this.description), h("span", { key: '3c7e3d3092aa97d24f62383e17a8a91646a78058', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
101
- h("div", { key: 'ba970b8947e1986aedbdfd37b044e05f2b1c29fc' }, h("div", { key: '7cfc0ca2b99d76d7647569f7105c29d1be8cf994', class: "Content" }, h("slot", { key: 'a2d866a914d33eac26b3b7e138e611be9f942c65', name: 'accordionContent' }), this.footer && this.showContent &&
102
- h("div", { key: 'c44d54e98f712c921e7dd16faaaaa7cfb92e17c4' }, this.deleteTab &&
103
- h("span", { key: '8c46aa94fcce959f370d07da69bd58509c143373', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
162
+ return (h("div", { key: '58cd507e7d1dc8de1e3b049936a2d6acb355e83d', class: "Wrapper", ref: (el) => (this.stylingContainer = el) }, h("div", { key: '70c6453ca4c4d40738edb1ae7e91f8954eebd3eb', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { key: 'cf543e01c0baa833bea27aa4effb19734e234ed1', class: "Title" }, this.headerTitle), h("p", { key: '365a05cabda273796e9d9689e514566ecc2aadcc', class: "Subtitle" }, this.headerSubtitle), h("p", { key: 'f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f', class: "Subtitle Description" }, this.description), h("span", { key: 'a47718e90743d53b31968f67b002a3e427e193bc', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent && (h("div", { key: 'bb34d51602f9397c427d79141a38aca7a64bf206' }, h("div", { key: '64171a30185b88bbafaa4ea555aeb9e2e33c46d6', class: "Content" }, h("slot", { key: '6def0d44f3881196255f3329184053fb3d5a3cfd', name: "accordionContent" }), this.footer && this.showContent && (h("div", { key: '08bfb5b017055788ba55b149e3bee23964f11ccf' }, this.deleteTab && (h("span", { key: 'b7b03fc6329a37841a2cf2b6a34780349341a0d5', class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language))))))))));
104
163
  }
164
+ static get watchers() { return {
165
+ "clientStyling": ["handleClientStylingChange"],
166
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
167
+ "mbSource": ["handleMbSourceChange"]
168
+ }; }
105
169
  };
106
170
  HelperAccordion.style = HelperAccordionStyle0;
107
171
 
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-08b29256.js';
2
- export { s as setNonce } from './index-08b29256.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-d6f3c92e.js';
2
+ export { s as setNonce } from './index-d6f3c92e.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
19
+ return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"translationUrl":[520,"translation-url"],"showContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'helper-accordion';
2
- const BUILD = /* helper-accordion */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, 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: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* helper-accordion */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, 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: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -784,14 +784,14 @@ var postUpdateComponent = (hostRef) => {
784
784
  const endPostUpdate = createTime("postUpdate", tagName);
785
785
  const instance = hostRef.$lazyInstance$ ;
786
786
  const ancestorComponent = hostRef.$ancestorComponent$;
787
- {
788
- safeCall(instance, "componentDidRender");
789
- }
790
787
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
791
788
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
792
789
  {
793
790
  addHydratedFlag(elm);
794
791
  }
792
+ {
793
+ safeCall(instance, "componentDidLoad");
794
+ }
795
795
  endPostUpdate();
796
796
  {
797
797
  hostRef.$onReadyResolve$(elm);
@@ -843,6 +843,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
843
843
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
844
844
  );
845
845
  }
846
+ const elm = hostRef.$hostElement$ ;
846
847
  const oldVal = hostRef.$instanceValues$.get(propName);
847
848
  const flags = hostRef.$flags$;
848
849
  const instance = hostRef.$lazyInstance$ ;
@@ -852,6 +853,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
852
853
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
853
854
  hostRef.$instanceValues$.set(propName, newVal);
854
855
  if (instance) {
856
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
857
+ const watchMethods = cmpMeta.$watchers$[propName];
858
+ if (watchMethods) {
859
+ watchMethods.map((watchMethodName) => {
860
+ try {
861
+ instance[watchMethodName](newVal, oldVal, propName);
862
+ } catch (e) {
863
+ consoleError(e, elm);
864
+ }
865
+ });
866
+ }
867
+ }
855
868
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
856
869
  scheduleUpdate(hostRef, false);
857
870
  }
@@ -863,7 +876,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
863
876
  var proxyComponent = (Cstr, cmpMeta, flags) => {
864
877
  var _a, _b;
865
878
  const prototype = Cstr.prototype;
866
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
879
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
880
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
881
+ cmpMeta.$watchers$ = Cstr.watchers;
882
+ }
867
883
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
868
884
  members.map(([memberName, [memberFlags]]) => {
869
885
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -945,6 +961,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
945
961
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
946
962
  }
947
963
  if (!Cstr.isProxied) {
964
+ {
965
+ cmpMeta.$watchers$ = Cstr.watchers;
966
+ }
948
967
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
949
968
  Cstr.isProxied = true;
950
969
  }
@@ -960,6 +979,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
960
979
  {
961
980
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
962
981
  }
982
+ {
983
+ hostRef.$flags$ |= 128 /* isWatchReady */;
984
+ }
963
985
  endNewInstance();
964
986
  fireConnectedCallback(hostRef.$lazyInstance$);
965
987
  } else {
@@ -1034,12 +1056,17 @@ var connectedCallback = (elm) => {
1034
1056
  }
1035
1057
  };
1036
1058
  var disconnectInstance = (instance) => {
1059
+ {
1060
+ safeCall(instance, "disconnectedCallback");
1061
+ }
1037
1062
  };
1038
1063
  var disconnectedCallback = async (elm) => {
1039
1064
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1040
1065
  const hostRef = getHostRef(elm);
1041
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1042
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1066
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1067
+ disconnectInstance(hostRef.$lazyInstance$);
1068
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1069
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1043
1070
  }
1044
1071
  }
1045
1072
  };
@@ -1062,6 +1089,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1062
1089
  let hasSlotRelocation = false;
1063
1090
  lazyBundles.map((lazyBundle) => {
1064
1091
  lazyBundle[1].map((compactMeta) => {
1092
+ var _a2;
1065
1093
  const cmpMeta = {
1066
1094
  $flags$: compactMeta[0],
1067
1095
  $tagName$: compactMeta[1],
@@ -1077,6 +1105,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1077
1105
  {
1078
1106
  cmpMeta.$attrsToReflect$ = [];
1079
1107
  }
1108
+ {
1109
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1110
+ }
1080
1111
  const tagName = cmpMeta.$tagName$;
1081
1112
  const HostElement = class extends HTMLElement {
1082
1113
  // StencilLazyHost
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-08b29256.js';
2
- export { s as setNonce } from './index-08b29256.js';
1
+ import { b as bootstrapLazy } from './index-d6f3c92e.js';
2
+ export { s as setNonce } from './index-d6f3c92e.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrlContent":[513,"client-styling-url-content"],"translationUrl":[520,"translation-url"],"showContent":[32],"limitStylingAppends":[32]}]]]], options);
8
+ return bootstrapLazy([["helper-accordion",[[1,"helper-accordion",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"ticketHistoryFlag":[516,"ticket-history-flag"],"headerTitle":[513,"header-title"],"headerSubtitle":[513,"header-subtitle"],"description":[513],"footer":[516],"deleteTab":[516,"delete-tab"],"postMessage":[516,"post-message"],"eventName":[513,"event-name"],"collapsed":[516],"language":[513],"translationUrl":[520,"translation-url"],"showContent":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{r as e,c as t,h as r}from"./index-08b29256.js";const o=["ro","en","hr"],i={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},a=class{constructor(r){e(this,r),this.accordionEvent=t(this,"helperAccordionAction",7),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=document.createElement("style");setTimeout((()=>{e.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(e)}),1)},this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showContent=void 0,this.limitStylingAppends=!1}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var e;this.translationUrl&&(e=JSON.parse(this.translationUrl),Object.keys(e).forEach((t=>{for(let r in e[t])i[t][r]=e[t][r]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return r("div",{key:"2db19795aa22479f038d9fc7c936cf7403efa43e",class:"Wrapper",ref:e=>this.stylingContainer=e},r("div",{key:"6804e27dbd68e4f4182ab07beb665c53b54069b6",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},r("p",{key:"d1293990d39da1f50d36dff28e1abbe53259356b",class:"Title"},this.headerTitle),r("p",{key:"7632e3ddda5dea8e91d8a3935ff46c0f357c4397",class:"Subtitle"},this.headerSubtitle),r("p",{key:"1ab0dd4cc2625ef20c858738ee290e922e37dd21",class:"Subtitle Description"},this.description),r("span",{key:"3c7e3d3092aa97d24f62383e17a8a91646a78058",class:"Expand"},this.showContent?"<":">")),this.showContent&&r("div",{key:"ba970b8947e1986aedbdfd37b044e05f2b1c29fc"},r("div",{key:"7cfc0ca2b99d76d7647569f7105c29d1be8cf994",class:"Content"},r("slot",{key:"a2d866a914d33eac26b3b7e138e611be9f942c65",name:"accordionContent"}),this.footer&&this.showContent&&r("div",{key:"c44d54e98f712c921e7dd16faaaaa7cfb92e17c4"},this.deleteTab&&r("span",{key:"8c46aa94fcce959f370d07da69bd58509c143373",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const e=this.language;return i[void 0!==e&&o.includes(e)?e:"en"].deleteTicket})())))))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';export{a as helper_accordion}
1
+ import{r as e,c as t,h as r}from"./index-d6f3c92e.js";const o=["ro","en","hr"],i={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}};function a(e,t){if(e){const r=document.createElement("style");r.innerHTML=t,e.appendChild(r)}}function s(e,t){const r=new URL(t);fetch(r.href).then((e=>e.text())).then((t=>{const r=document.createElement("style");r.innerHTML=t,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function n(e,t){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{r.innerHTML=t,e&&e.appendChild(r)}))}}const c=class{constructor(r){e(this,r),this.accordionEvent=t(this,"helperAccordionAction",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.translationUrl=void 0,this.showContent=void 0}handleClientStylingChange(e,t){e!=t&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,t){e!=t&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var e;this.translationUrl&&(e=JSON.parse(this.translationUrl),Object.keys(e).forEach((t=>{for(let r in e[t])i[t][r]=e[t][r]})))}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return r("div",{key:"58cd507e7d1dc8de1e3b049936a2d6acb355e83d",class:"Wrapper",ref:e=>this.stylingContainer=e},r("div",{key:"70c6453ca4c4d40738edb1ae7e91f8954eebd3eb",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},r("p",{key:"cf543e01c0baa833bea27aa4effb19734e234ed1",class:"Title"},this.headerTitle),r("p",{key:"365a05cabda273796e9d9689e514566ecc2aadcc",class:"Subtitle"},this.headerSubtitle),r("p",{key:"f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f",class:"Subtitle Description"},this.description),r("span",{key:"a47718e90743d53b31968f67b002a3e427e193bc",class:"Expand"},this.showContent?"<":">")),this.showContent&&r("div",{key:"bb34d51602f9397c427d79141a38aca7a64bf206"},r("div",{key:"64171a30185b88bbafaa4ea555aeb9e2e33c46d6",class:"Content"},r("slot",{key:"6def0d44f3881196255f3329184053fb3d5a3cfd",name:"accordionContent"}),this.footer&&this.showContent&&r("div",{key:"08bfb5b017055788ba55b149e3bee23964f11ccf"},this.deleteTab&&r("span",{key:"b7b03fc6329a37841a2cf2b6a34780349341a0d5",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const e=this.language;return i[void 0!==e&&o.includes(e)?e:"en"].deleteTicket})())))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00aba4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}';export{c as helper_accordion}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./index-08b29256.js";export{s as setNonce}from"./index-08b29256.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["helper-accordion",[[1,"helper-accordion",{ticketHistoryFlag:[516,"ticket-history-flag"],headerTitle:[513,"header-title"],headerSubtitle:[513,"header-subtitle"],description:[513],footer:[516],deleteTab:[516,"delete-tab"],postMessage:[516,"post-message"],eventName:[513,"event-name"],collapsed:[516],language:[513],clientStyling:[513,"client-styling"],clientStylingUrlContent:[513,"client-styling-url-content"],translationUrl:[520,"translation-url"],showContent:[32],limitStylingAppends:[32]}]]]],e))));
1
+ import{p as e,b as t}from"./index-d6f3c92e.js";export{s as setNonce}from"./index-d6f3c92e.js";import{g as l}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t([["helper-accordion",[[1,"helper-accordion",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],ticketHistoryFlag:[516,"ticket-history-flag"],headerTitle:[513,"header-title"],headerSubtitle:[513,"header-subtitle"],description:[513],footer:[516],deleteTab:[516,"delete-tab"],postMessage:[516,"post-message"],eventName:[513,"event-name"],collapsed:[516],language:[513],translationUrl:[520,"translation-url"],showContent:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}]]]],e))));
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(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={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(m),b(y),(p=m.length>0)&&f.raf(w)},v=e=>h().then(e),S=$(y,!0),g={},k=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},N=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>U(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},U=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},W=new WeakMap,D=e=>"sc-"+e.v,F=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||g,s=t.u||g;for(const e of z(Object.keys(o)))e in s||F(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))F(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),_(null,l,I),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=J(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},K=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].$=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Y=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(("slot"!==t.m||B)&&_(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(X(h,m,o))Y(h,m,o),h=t[++i],m=l[++c];else if(X(d,y,o))Y(d,y,o),d=t[--f],y=l[--p];else if(X(h,y,o))Y(h,y,o),ee(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(X(d,m,o))Y(d,m,o),ee(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=J(t&&t[c],n,u):(Y(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=J(t&&t[c],n,c),m=l[++c]),s&&ee(h.$.parentNode,s,h.$)}i>f?K(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&Q(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):null!==o&&Q(o,0,o.length-1)):e.i!==r&&(l.data=r)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),te=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ne=(e,t)=>{if(e.l|=16,!(4&e.l))return te(e,e.k),S((()=>le(e,t)));e.l|=512},le=(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 l;return t&&(l=ae(n,"componentWillLoad")),oe(l,(()=>re(e,n,t)))},oe=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=W.get(e=e.head||e);if(r||W.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ce(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],B=!!(1&o.l),Y(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ce=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,fe(t),ae(n,"componentDidLoad"),e.P(t),l||ue()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>ne(e,!1))),e.l&=-517},ue=()=>{fe(a.documentElement),v((()=>U(u,"appload",{detail:{namespace:"helper-accordion"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},fe=e=>e.classList.add("hydrated"),he=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.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.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&ne(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},de=e=>{ae(e,"connectedCallback")},pe=e=>{ae(e,"disconnectedCallback")},me=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)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),v&&(clearTimeout(v),v=null),S?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?de(t.t):(null==t?void 0:t.N)&&t.N.then((()=>de(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.k=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[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=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,he(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o(),de(t.t)}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>ne(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?pe(e.t):(null==e?void 0:e.N)&&e.N.then((()=>pe(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,he(a,c,1)))}))})),h.length>0&&(g&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}S=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ue,30)))},ye=e=>f.O=e;export{me as b,N as c,R as h,h as p,l as r,ye as s}
@@ -1,8 +1,20 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class HelperAccordion {
3
3
  /**
4
- * Flag for ticket history
5
- */
4
+ * Client custom styling via message bus
5
+ */
6
+ mbSource: string;
7
+ /**
8
+ * Client custom styling via string
9
+ */
10
+ clientStyling: string;
11
+ /**
12
+ * Client custom styling via css file url
13
+ */
14
+ clientStylingUrl: string;
15
+ /**
16
+ * Flag for ticket history
17
+ */
6
18
  ticketHistoryFlag: boolean;
7
19
  /**
8
20
  * Title (top header)
@@ -40,31 +52,25 @@ export declare class HelperAccordion {
40
52
  * Language
41
53
  */
42
54
  language: string;
43
- /**
44
- * Client custom styling via string
45
- */
46
- clientStyling: string;
47
- /**
48
- * Client custom styling via url content
49
- */
50
- clientStylingUrlContent: string;
51
55
  /**
52
56
  * Translations via parent component
53
57
  */
54
58
  translationUrl?: any;
55
59
  showContent: boolean;
56
- private limitStylingAppends;
57
60
  private stylingContainer;
61
+ private stylingSubscription;
58
62
  /**
59
63
  * Action event
60
64
  */
61
65
  accordionEvent: EventEmitter<any>;
66
+ handleClientStylingChange(newValue: any, oldValue: any): void;
67
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
68
+ handleMbSourceChange(newValue: any, oldValue: any): void;
69
+ componentDidLoad(): void;
70
+ disconnectedCallback(): void;
62
71
  connectedCallback(): void;
63
72
  componentWillLoad(): void;
64
- componentDidRender(): void;
65
73
  toggleContent(): void;
66
74
  deleteAction(): void;
67
- setClientStyling: () => void;
68
- setClientStylingURL: () => void;
69
75
  render(): void;
70
76
  }
@@ -12,9 +12,9 @@ export namespace Components {
12
12
  */
13
13
  "clientStyling": string;
14
14
  /**
15
- * Client custom styling via url content
15
+ * Client custom styling via css file url
16
16
  */
17
- "clientStylingUrlContent": string;
17
+ "clientStylingUrl": string;
18
18
  /**
19
19
  * Collapsed
20
20
  */
@@ -47,6 +47,10 @@ export namespace Components {
47
47
  * Language
48
48
  */
49
49
  "language": string;
50
+ /**
51
+ * Client custom styling via message bus
52
+ */
53
+ "mbSource": string;
50
54
  /**
51
55
  * Activates postMessages as events for actions from the widget
52
56
  */
@@ -94,9 +98,9 @@ declare namespace LocalJSX {
94
98
  */
95
99
  "clientStyling"?: string;
96
100
  /**
97
- * Client custom styling via url content
101
+ * Client custom styling via css file url
98
102
  */
99
- "clientStylingUrlContent"?: string;
103
+ "clientStylingUrl"?: string;
100
104
  /**
101
105
  * Collapsed
102
106
  */
@@ -129,6 +133,10 @@ declare namespace LocalJSX {
129
133
  * Language
130
134
  */
131
135
  "language"?: string;
136
+ /**
137
+ * Client custom styling via message bus
138
+ */
139
+ "mbSource"?: string;
132
140
  /**
133
141
  * Action event
134
142
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/helper-accordion",
3
- "version": "1.77.25",
3
+ "version": "1.77.27",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(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={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(m),b(y),(p=m.length>0)&&f.raf(w)},v=e=>h().then(e),S=$(y,!0),g={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=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=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value},T=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),L={},N=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>U(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},U=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},W=new WeakMap,D=e=>"sc-"+e.v,F=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},H=/\s/,q=e=>e?e.split(H):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||g,s=t.u||g;for(const e of z(Object.keys(o)))e in s||F(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))F(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),_(null,l,I),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=J(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},K=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=J(null,n,o),r&&(l[o].$=r,ee(i,r,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Z(t),e&&e.remove()}}},X=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Y=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(("slot"!==t.m||B)&&_(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(X(h,m,o))Y(h,m,o),h=t[++i],m=l[++c];else if(X(d,y,o))Y(d,y,o),d=t[--f],y=l[--p];else if(X(h,y,o))Y(h,y,o),ee(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(X(d,m,o))Y(d,m,o),ee(e,d.$,h.$),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=J(t&&t[c],n,u):(Y(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=J(t&&t[c],n,c),m=l[++c]),s&&ee(h.$.parentNode,s,h.$)}i>f?K(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&Q(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):null!==o&&Q(o,0,o.length-1)):e.i!==r&&(l.data=r)},Z=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Z)},ee=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),te=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ne=(e,t)=>{if(e.l|=16,!(4&e.l))return te(e,e.j),S((()=>le(e,t)));e.l|=512},le=(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 l;return t&&(l=ae(n,"componentWillLoad")),oe(l,(()=>re(e,n,t)))},oe=(e,t)=>se(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),se=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,re=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=D(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=W.get(e=e.head||e);if(r||W.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ce(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||A(null,null),r=(e=>e&&e.m===L)(t)?t:T(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],B=!!(1&o.l),Y(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ce=e=>{const t=e.$hostElement$,n=e.j;ae(e.t,"componentDidRender"),64&e.l||(e.l|=64,fe(t),e.P(t),n||ue()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>ne(e,!1))),e.l&=-517},ue=()=>{fe(a.documentElement),v((()=>U(u,"appload",{detail:{namespace:"helper-accordion"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},fe=e=>e.classList.add("hydrated"),he=(e,t,l)=>{var o,s;const r=e.prototype;if(t.R){const i=Object.entries(null!=(o=t.R)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${o.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 r=s.T.get(t),i=s.l,c=s.t;l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.R[t][0]),8&i&&void 0!==r||l===r||Number.isNaN(r)&&Number.isNaN(l)||(s.T.set(t,l),c&&2==(18&i)&&ne(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.A)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.A)?s:{}),...i.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},de=e=>{ae(e,"connectedCallback")},pe=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],v:l[1],R:l[2],L:l[3]};4&o.l&&(g=!0),o.R=l[2],o.M=[];const c=o.v,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,o),1&o.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.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),v&&(clearTimeout(v),v=null),S?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?de(t.t):(null==t?void 0:t.N)&&t.N.then((()=>de(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){te(t,t.j=n);break}}l.R&&Object.entries(l.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[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=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.W}" was not found`);l.isProxied||(he(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,o(),de(t.t)}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=D(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>ne(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}))}})()))}componentOnReady(){return n(this).N}};o.U=e[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,he(u,o,1)))}))})),h.length>0&&(g&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}S=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ue,30)))},me=e=>f.O=e;export{pe as b,N as c,T as h,h as p,l as r,me as s}