@everymatrix/helper-pagination 1.55.0 → 1.56.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,64 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-502d881b.js');
5
+ const index = require('./index-d76910e9.js');
6
+
7
+ /**
8
+ * @name setClientStyling
9
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
10
+ * @param {HTMLElement} stylingContainer The reference element of the widget
11
+ * @param {string} clientStyling The style content
12
+ */
13
+ function setClientStyling(stylingContainer, clientStyling) {
14
+ if (stylingContainer) {
15
+ const sheet = document.createElement('style');
16
+ sheet.innerHTML = clientStyling;
17
+ stylingContainer.appendChild(sheet);
18
+ }
19
+ }
20
+
21
+ /**
22
+ * @name setClientStylingURL
23
+ * @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
24
+ * @param {HTMLElement} stylingContainer The reference element of the widget
25
+ * @param {string} clientStylingUrl The URL of the style content
26
+ */
27
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
28
+ const url = new URL(clientStylingUrl);
29
+
30
+ fetch(url.href)
31
+ .then((res) => res.text())
32
+ .then((data) => {
33
+ const cssFile = document.createElement('style');
34
+ cssFile.innerHTML = data;
35
+ if (stylingContainer) {
36
+ stylingContainer.appendChild(cssFile);
37
+ }
38
+ })
39
+ .catch((err) => {
40
+ console.error('There was an error while trying to load client styling from URL', err);
41
+ });
42
+ }
43
+
44
+ /**
45
+ * @name setStreamLibrary
46
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
47
+ * @param {HTMLElement} stylingContainer The highest element of the widget
48
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
49
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
50
+ */
51
+ function setStreamStyling(stylingContainer, domain, subscription) {
52
+ if (window.emMessageBus) {
53
+ const sheet = document.createElement('style');
54
+
55
+ window.emMessageBus.subscribe(domain, (data) => {
56
+ sheet.innerHTML = data;
57
+ if (stylingContainer) {
58
+ stylingContainer.appendChild(sheet);
59
+ }
60
+ });
61
+ }
62
+ }
6
63
 
7
64
  /**
8
65
  * @name isMobile
@@ -126,26 +183,15 @@ const HelperPagination = class {
126
183
  }
127
184
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
128
185
  };
129
- this.setClientStyling = () => {
130
- let sheet = document.createElement('style');
131
- sheet.innerHTML = this.clientStyling;
132
- this.stylingContainer.prepend(sheet);
133
- };
134
- this.setClientStylingURL = () => {
135
- let cssFile = document.createElement('style');
136
- setTimeout(() => {
137
- cssFile.innerHTML = this.clientStylingUrlContent;
138
- this.stylingContainer.prepend(cssFile);
139
- }, 1);
140
- };
141
186
  this.nextPage = '';
142
187
  this.prevPage = '';
143
188
  this.offset = 0;
144
189
  this.limit = 1;
145
190
  this.total = 1;
146
191
  this.language = 'en';
192
+ this.mbSource = undefined;
147
193
  this.clientStyling = '';
148
- this.clientStylingUrlContent = '';
194
+ this.clientStylingUrl = '';
149
195
  this.arrowsActive = undefined;
150
196
  this.secondaryArrowsActive = undefined;
151
197
  this.numberedNavActive = undefined;
@@ -156,7 +202,17 @@ const HelperPagination = class {
156
202
  this.totalInt = undefined;
157
203
  this.pagesArray = [];
158
204
  this.endInt = 0;
159
- this.limitStylingAppends = false;
205
+ }
206
+ handleClientStylingChange(newValue, oldValue) {
207
+ if (newValue != oldValue) {
208
+ setClientStyling(this.stylingContainer, this.clientStyling);
209
+ }
210
+ }
211
+ handleClientStylingChangeURL(newValue, oldValue) {
212
+ if (newValue != oldValue) {
213
+ if (this.clientStylingUrl)
214
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
215
+ }
160
216
  }
161
217
  componentWillRender() {
162
218
  this.offsetInt = this.offset;
@@ -183,16 +239,21 @@ const HelperPagination = class {
183
239
  this.pagesArray.unshift('...');
184
240
  }
185
241
  }
186
- componentDidRender() {
187
- // start custom styling area
188
- if (!this.limitStylingAppends && this.stylingContainer) {
189
- if (this.clientStyling)
190
- this.setClientStyling();
191
- if (this.clientStylingUrlContent)
192
- this.setClientStylingURL();
193
- this.limitStylingAppends = true;
242
+ componentDidLoad() {
243
+ if (this.stylingContainer) {
244
+ if (window.emMessageBus != undefined) {
245
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
246
+ }
247
+ else {
248
+ if (this.clientStyling)
249
+ setClientStyling(this.stylingContainer, this.clientStyling);
250
+ if (this.clientStylingUrl)
251
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
252
+ }
194
253
  }
195
- // end custom styling area
254
+ }
255
+ disconnectedCallback() {
256
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
196
257
  }
197
258
  render() {
198
259
  /**
@@ -221,6 +282,10 @@ const HelperPagination = class {
221
282
  }
222
283
  return (index.h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
223
284
  }
285
+ static get watchers() { return {
286
+ "clientStyling": ["handleClientStylingChange"],
287
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
288
+ }; }
224
289
  };
225
290
  HelperPagination.style = HelperPaginationStyle0;
226
291
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-502d881b.js');
5
+ const index = require('./index-d76910e9.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('helper-pagination.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["helper-pagination.cjs",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
22
+ return index.bootstrapLazy([["helper-pagination.cjs",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'helper-pagination';
24
- const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
24
+ const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -355,31 +355,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
355
355
  if (nonce != null) {
356
356
  styleElm.setAttribute("nonce", nonce);
357
357
  }
358
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
359
- if (styleContainerNode.nodeName === "HEAD") {
360
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
361
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
362
- styleContainerNode.insertBefore(styleElm, referenceNode2);
363
- } else if ("host" in styleContainerNode) {
364
- if (supportsConstructableStylesheets) {
365
- const stylesheet = new CSSStyleSheet();
366
- stylesheet.replaceSync(style);
367
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
368
- } else {
369
- const existingStyleContainer = styleContainerNode.querySelector("style");
370
- if (existingStyleContainer) {
371
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
372
- } else {
373
- styleContainerNode.prepend(styleElm);
374
- }
375
- }
376
- } else {
377
- styleContainerNode.append(styleElm);
378
- }
379
- }
380
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
381
- styleContainerNode.insertBefore(styleElm, null);
382
- }
358
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
383
359
  }
384
360
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
385
361
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -402,7 +378,7 @@ var attachStyles = (hostRef) => {
402
378
  const scopeId2 = addStyle(
403
379
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
404
380
  cmpMeta);
405
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
381
+ if (flags & 10 /* needsScopedEncapsulation */) {
406
382
  elm["s-sc"] = scopeId2;
407
383
  elm.classList.add(scopeId2 + "-h");
408
384
  }
@@ -450,11 +426,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
450
426
  if (memberName === "list") {
451
427
  isProp = false;
452
428
  } else if (oldValue == null || elm[memberName] != n) {
453
- if (typeof elm.__lookupSetter__(memberName) === "function") {
454
- elm[memberName] = n;
455
- } else {
456
- elm.setAttribute(memberName, n);
457
- }
429
+ elm[memberName] = n;
458
430
  }
459
431
  } else {
460
432
  elm[memberName] = newValue;
@@ -527,9 +499,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
527
499
  {
528
500
  updateElement(null, newVNode2, isSvgMode);
529
501
  }
530
- const rootNode = elm.getRootNode();
531
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
532
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
502
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
533
503
  elm.classList.add(elm["s-si"] = scopeId);
534
504
  }
535
505
  if (newVNode2.$children$) {
@@ -658,10 +628,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
658
628
  elm.textContent = "";
659
629
  }
660
630
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
661
- } else if (
662
- // don't do this on initial render as it can cause non-hydrated content to be removed
663
- !isInitialRender && BUILD.updatable && oldChildren !== null
664
- ) {
631
+ } else if (oldChildren !== null) {
665
632
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
666
633
  }
667
634
  } else if (oldVNode.$text$ !== text) {
@@ -804,14 +771,14 @@ var postUpdateComponent = (hostRef) => {
804
771
  const endPostUpdate = createTime("postUpdate", tagName);
805
772
  const instance = hostRef.$lazyInstance$ ;
806
773
  const ancestorComponent = hostRef.$ancestorComponent$;
807
- {
808
- safeCall(instance, "componentDidRender");
809
- }
810
774
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
811
775
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
812
776
  {
813
777
  addHydratedFlag(elm);
814
778
  }
779
+ {
780
+ safeCall(instance, "componentDidLoad");
781
+ }
815
782
  endPostUpdate();
816
783
  {
817
784
  hostRef.$onReadyResolve$(elm);
@@ -863,6 +830,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
863
830
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
864
831
  );
865
832
  }
833
+ const elm = hostRef.$hostElement$ ;
866
834
  const oldVal = hostRef.$instanceValues$.get(propName);
867
835
  const flags = hostRef.$flags$;
868
836
  const instance = hostRef.$lazyInstance$ ;
@@ -872,6 +840,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
872
840
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
873
841
  hostRef.$instanceValues$.set(propName, newVal);
874
842
  if (instance) {
843
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
844
+ const watchMethods = cmpMeta.$watchers$[propName];
845
+ if (watchMethods) {
846
+ watchMethods.map((watchMethodName) => {
847
+ try {
848
+ instance[watchMethodName](newVal, oldVal, propName);
849
+ } catch (e) {
850
+ consoleError(e, elm);
851
+ }
852
+ });
853
+ }
854
+ }
875
855
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
876
856
  scheduleUpdate(hostRef, false);
877
857
  }
@@ -883,7 +863,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
883
863
  var proxyComponent = (Cstr, cmpMeta, flags) => {
884
864
  var _a, _b;
885
865
  const prototype = Cstr.prototype;
886
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
866
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
867
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
868
+ cmpMeta.$watchers$ = Cstr.watchers;
869
+ }
887
870
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
888
871
  members.map(([memberName, [memberFlags]]) => {
889
872
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -908,8 +891,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
908
891
  if (this.hasOwnProperty(propName)) {
909
892
  newValue = this[propName];
910
893
  delete this[propName];
911
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
912
- this[propName] == newValue) {
894
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
913
895
  return;
914
896
  } else if (propName == null) {
915
897
  const hostRef = getHostRef(this);
@@ -966,6 +948,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
966
948
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
967
949
  }
968
950
  if (!Cstr.isProxied) {
951
+ {
952
+ cmpMeta.$watchers$ = Cstr.watchers;
953
+ }
969
954
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
970
955
  Cstr.isProxied = true;
971
956
  }
@@ -981,6 +966,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
981
966
  {
982
967
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
983
968
  }
969
+ {
970
+ hostRef.$flags$ |= 128 /* isWatchReady */;
971
+ }
984
972
  endNewInstance();
985
973
  } else {
986
974
  Cstr = elm.constructor;
@@ -1049,12 +1037,17 @@ var connectedCallback = (elm) => {
1049
1037
  }
1050
1038
  };
1051
1039
  var disconnectInstance = (instance) => {
1040
+ {
1041
+ safeCall(instance, "disconnectedCallback");
1042
+ }
1052
1043
  };
1053
1044
  var disconnectedCallback = async (elm) => {
1054
1045
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1055
1046
  const hostRef = getHostRef(elm);
1056
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1057
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1047
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1048
+ disconnectInstance(hostRef.$lazyInstance$);
1049
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1050
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1058
1051
  }
1059
1052
  }
1060
1053
  };
@@ -1077,6 +1070,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1077
1070
  let hasSlotRelocation = false;
1078
1071
  lazyBundles.map((lazyBundle) => {
1079
1072
  lazyBundle[1].map((compactMeta) => {
1073
+ var _a2;
1080
1074
  const cmpMeta = {
1081
1075
  $flags$: compactMeta[0],
1082
1076
  $tagName$: compactMeta[1],
@@ -1092,6 +1086,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1092
1086
  {
1093
1087
  cmpMeta.$attrsToReflect$ = [];
1094
1088
  }
1089
+ {
1090
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1091
+ }
1095
1092
  const tagName = cmpMeta.$tagName$;
1096
1093
  const HostElement = class extends HTMLElement {
1097
1094
  // StencilLazyHost
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-502d881b.js');
5
+ const index = require('./index-d76910e9.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-pagination.cjs",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["helper-pagination.cjs",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
8
- "typescriptVersion": "5.5.4"
7
+ "version": "4.19.2",
8
+ "typescriptVersion": "5.4.5"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
2
3
  import { isMobile } from "../../utils/utils";
3
4
  import { translate } from "../../utils/locale.utils";
4
5
  export class HelperPagination {
@@ -61,26 +62,15 @@ export class HelperPagination {
61
62
  }
62
63
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
63
64
  };
64
- this.setClientStyling = () => {
65
- let sheet = document.createElement('style');
66
- sheet.innerHTML = this.clientStyling;
67
- this.stylingContainer.prepend(sheet);
68
- };
69
- this.setClientStylingURL = () => {
70
- let cssFile = document.createElement('style');
71
- setTimeout(() => {
72
- cssFile.innerHTML = this.clientStylingUrlContent;
73
- this.stylingContainer.prepend(cssFile);
74
- }, 1);
75
- };
76
65
  this.nextPage = '';
77
66
  this.prevPage = '';
78
67
  this.offset = 0;
79
68
  this.limit = 1;
80
69
  this.total = 1;
81
70
  this.language = 'en';
71
+ this.mbSource = undefined;
82
72
  this.clientStyling = '';
83
- this.clientStylingUrlContent = '';
73
+ this.clientStylingUrl = '';
84
74
  this.arrowsActive = undefined;
85
75
  this.secondaryArrowsActive = undefined;
86
76
  this.numberedNavActive = undefined;
@@ -91,7 +81,17 @@ export class HelperPagination {
91
81
  this.totalInt = undefined;
92
82
  this.pagesArray = [];
93
83
  this.endInt = 0;
94
- this.limitStylingAppends = false;
84
+ }
85
+ handleClientStylingChange(newValue, oldValue) {
86
+ if (newValue != oldValue) {
87
+ setClientStyling(this.stylingContainer, this.clientStyling);
88
+ }
89
+ }
90
+ handleClientStylingChangeURL(newValue, oldValue) {
91
+ if (newValue != oldValue) {
92
+ if (this.clientStylingUrl)
93
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
94
+ }
95
95
  }
96
96
  componentWillRender() {
97
97
  this.offsetInt = this.offset;
@@ -118,16 +118,21 @@ export class HelperPagination {
118
118
  this.pagesArray.unshift('...');
119
119
  }
120
120
  }
121
- componentDidRender() {
122
- // start custom styling area
123
- if (!this.limitStylingAppends && this.stylingContainer) {
124
- if (this.clientStyling)
125
- this.setClientStyling();
126
- if (this.clientStylingUrlContent)
127
- this.setClientStylingURL();
128
- this.limitStylingAppends = true;
121
+ componentDidLoad() {
122
+ if (this.stylingContainer) {
123
+ if (window.emMessageBus != undefined) {
124
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
125
+ }
126
+ else {
127
+ if (this.clientStyling)
128
+ setClientStyling(this.stylingContainer, this.clientStyling);
129
+ if (this.clientStylingUrl)
130
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
131
+ }
129
132
  }
130
- // end custom styling area
133
+ }
134
+ disconnectedCallback() {
135
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
131
136
  }
132
137
  render() {
133
138
  /**
@@ -278,6 +283,23 @@ export class HelperPagination {
278
283
  "reflect": true,
279
284
  "defaultValue": "'en'"
280
285
  },
286
+ "mbSource": {
287
+ "type": "string",
288
+ "mutable": false,
289
+ "complexType": {
290
+ "original": "string",
291
+ "resolved": "string",
292
+ "references": {}
293
+ },
294
+ "required": false,
295
+ "optional": false,
296
+ "docs": {
297
+ "tags": [],
298
+ "text": "Client custom styling via streamStyling"
299
+ },
300
+ "attribute": "mb-source",
301
+ "reflect": false
302
+ },
281
303
  "clientStyling": {
282
304
  "type": "string",
283
305
  "mutable": true,
@@ -296,7 +318,7 @@ export class HelperPagination {
296
318
  "reflect": true,
297
319
  "defaultValue": "''"
298
320
  },
299
- "clientStylingUrlContent": {
321
+ "clientStylingUrl": {
300
322
  "type": "string",
301
323
  "mutable": true,
302
324
  "complexType": {
@@ -310,7 +332,7 @@ export class HelperPagination {
310
332
  "tags": [],
311
333
  "text": "Client custom styling via url content"
312
334
  },
313
- "attribute": "client-styling-url-content",
335
+ "attribute": "client-styling-url",
314
336
  "reflect": true,
315
337
  "defaultValue": "''"
316
338
  },
@@ -375,8 +397,7 @@ export class HelperPagination {
375
397
  "limitInt": {},
376
398
  "totalInt": {},
377
399
  "pagesArray": {},
378
- "endInt": {},
379
- "limitStylingAppends": {}
400
+ "endInt": {}
380
401
  };
381
402
  }
382
403
  static get events() {
@@ -397,4 +418,13 @@ export class HelperPagination {
397
418
  }
398
419
  }];
399
420
  }
421
+ static get watchers() {
422
+ return [{
423
+ "propName": "clientStyling",
424
+ "methodName": "handleClientStylingChange"
425
+ }, {
426
+ "propName": "clientStylingUrl",
427
+ "methodName": "handleClientStylingChangeURL"
428
+ }];
429
+ }
400
430
  }
@@ -1,4 +1,61 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-79ce7f1f.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-0483e183.js';
2
+
3
+ /**
4
+ * @name setClientStyling
5
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
6
+ * @param {HTMLElement} stylingContainer The reference element of the widget
7
+ * @param {string} clientStyling The style content
8
+ */
9
+ function setClientStyling(stylingContainer, clientStyling) {
10
+ if (stylingContainer) {
11
+ const sheet = document.createElement('style');
12
+ sheet.innerHTML = clientStyling;
13
+ stylingContainer.appendChild(sheet);
14
+ }
15
+ }
16
+
17
+ /**
18
+ * @name setClientStylingURL
19
+ * @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
20
+ * @param {HTMLElement} stylingContainer The reference element of the widget
21
+ * @param {string} clientStylingUrl The URL of the style content
22
+ */
23
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
24
+ const url = new URL(clientStylingUrl);
25
+
26
+ fetch(url.href)
27
+ .then((res) => res.text())
28
+ .then((data) => {
29
+ const cssFile = document.createElement('style');
30
+ cssFile.innerHTML = data;
31
+ if (stylingContainer) {
32
+ stylingContainer.appendChild(cssFile);
33
+ }
34
+ })
35
+ .catch((err) => {
36
+ console.error('There was an error while trying to load client styling from URL', err);
37
+ });
38
+ }
39
+
40
+ /**
41
+ * @name setStreamLibrary
42
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
43
+ * @param {HTMLElement} stylingContainer The highest element of the widget
44
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
45
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
46
+ */
47
+ function setStreamStyling(stylingContainer, domain, subscription) {
48
+ if (window.emMessageBus) {
49
+ const sheet = document.createElement('style');
50
+
51
+ window.emMessageBus.subscribe(domain, (data) => {
52
+ sheet.innerHTML = data;
53
+ if (stylingContainer) {
54
+ stylingContainer.appendChild(sheet);
55
+ }
56
+ });
57
+ }
58
+ }
2
59
 
3
60
  /**
4
61
  * @name isMobile
@@ -122,26 +179,15 @@ const HelperPagination = class {
122
179
  }
123
180
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
124
181
  };
125
- this.setClientStyling = () => {
126
- let sheet = document.createElement('style');
127
- sheet.innerHTML = this.clientStyling;
128
- this.stylingContainer.prepend(sheet);
129
- };
130
- this.setClientStylingURL = () => {
131
- let cssFile = document.createElement('style');
132
- setTimeout(() => {
133
- cssFile.innerHTML = this.clientStylingUrlContent;
134
- this.stylingContainer.prepend(cssFile);
135
- }, 1);
136
- };
137
182
  this.nextPage = '';
138
183
  this.prevPage = '';
139
184
  this.offset = 0;
140
185
  this.limit = 1;
141
186
  this.total = 1;
142
187
  this.language = 'en';
188
+ this.mbSource = undefined;
143
189
  this.clientStyling = '';
144
- this.clientStylingUrlContent = '';
190
+ this.clientStylingUrl = '';
145
191
  this.arrowsActive = undefined;
146
192
  this.secondaryArrowsActive = undefined;
147
193
  this.numberedNavActive = undefined;
@@ -152,7 +198,17 @@ const HelperPagination = class {
152
198
  this.totalInt = undefined;
153
199
  this.pagesArray = [];
154
200
  this.endInt = 0;
155
- this.limitStylingAppends = false;
201
+ }
202
+ handleClientStylingChange(newValue, oldValue) {
203
+ if (newValue != oldValue) {
204
+ setClientStyling(this.stylingContainer, this.clientStyling);
205
+ }
206
+ }
207
+ handleClientStylingChangeURL(newValue, oldValue) {
208
+ if (newValue != oldValue) {
209
+ if (this.clientStylingUrl)
210
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
211
+ }
156
212
  }
157
213
  componentWillRender() {
158
214
  this.offsetInt = this.offset;
@@ -179,16 +235,21 @@ const HelperPagination = class {
179
235
  this.pagesArray.unshift('...');
180
236
  }
181
237
  }
182
- componentDidRender() {
183
- // start custom styling area
184
- if (!this.limitStylingAppends && this.stylingContainer) {
185
- if (this.clientStyling)
186
- this.setClientStyling();
187
- if (this.clientStylingUrlContent)
188
- this.setClientStylingURL();
189
- this.limitStylingAppends = true;
238
+ componentDidLoad() {
239
+ if (this.stylingContainer) {
240
+ if (window.emMessageBus != undefined) {
241
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
242
+ }
243
+ else {
244
+ if (this.clientStyling)
245
+ setClientStyling(this.stylingContainer, this.clientStyling);
246
+ if (this.clientStylingUrl)
247
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
248
+ }
190
249
  }
191
- // end custom styling area
250
+ }
251
+ disconnectedCallback() {
252
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
192
253
  }
193
254
  render() {
194
255
  /**
@@ -217,6 +278,10 @@ const HelperPagination = class {
217
278
  }
218
279
  return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
219
280
  }
281
+ static get watchers() { return {
282
+ "clientStyling": ["handleClientStylingChange"],
283
+ "clientStylingUrl": ["handleClientStylingChangeURL"]
284
+ }; }
220
285
  };
221
286
  HelperPagination.style = HelperPaginationStyle0;
222
287
 
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-79ce7f1f.js';
2
- export { s as setNonce } from './index-79ce7f1f.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-0483e183.js';
2
+ export { s as setNonce } from './index-0483e183.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
19
+ return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
20
20
  });
@@ -1,8 +1,8 @@
1
1
  const NAMESPACE = 'helper-pagination';
2
- const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -333,31 +333,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
333
333
  if (nonce != null) {
334
334
  styleElm.setAttribute("nonce", nonce);
335
335
  }
336
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
337
- if (styleContainerNode.nodeName === "HEAD") {
338
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
339
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
340
- styleContainerNode.insertBefore(styleElm, referenceNode2);
341
- } else if ("host" in styleContainerNode) {
342
- if (supportsConstructableStylesheets) {
343
- const stylesheet = new CSSStyleSheet();
344
- stylesheet.replaceSync(style);
345
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
346
- } else {
347
- const existingStyleContainer = styleContainerNode.querySelector("style");
348
- if (existingStyleContainer) {
349
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
350
- } else {
351
- styleContainerNode.prepend(styleElm);
352
- }
353
- }
354
- } else {
355
- styleContainerNode.append(styleElm);
356
- }
357
- }
358
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
359
- styleContainerNode.insertBefore(styleElm, null);
360
- }
336
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
361
337
  }
362
338
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
363
339
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -380,7 +356,7 @@ var attachStyles = (hostRef) => {
380
356
  const scopeId2 = addStyle(
381
357
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
382
358
  cmpMeta);
383
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
359
+ if (flags & 10 /* needsScopedEncapsulation */) {
384
360
  elm["s-sc"] = scopeId2;
385
361
  elm.classList.add(scopeId2 + "-h");
386
362
  }
@@ -428,11 +404,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
428
404
  if (memberName === "list") {
429
405
  isProp = false;
430
406
  } else if (oldValue == null || elm[memberName] != n) {
431
- if (typeof elm.__lookupSetter__(memberName) === "function") {
432
- elm[memberName] = n;
433
- } else {
434
- elm.setAttribute(memberName, n);
435
- }
407
+ elm[memberName] = n;
436
408
  }
437
409
  } else {
438
410
  elm[memberName] = newValue;
@@ -505,9 +477,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
505
477
  {
506
478
  updateElement(null, newVNode2, isSvgMode);
507
479
  }
508
- const rootNode = elm.getRootNode();
509
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
510
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
480
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
511
481
  elm.classList.add(elm["s-si"] = scopeId);
512
482
  }
513
483
  if (newVNode2.$children$) {
@@ -636,10 +606,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
636
606
  elm.textContent = "";
637
607
  }
638
608
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
639
- } else if (
640
- // don't do this on initial render as it can cause non-hydrated content to be removed
641
- !isInitialRender && BUILD.updatable && oldChildren !== null
642
- ) {
609
+ } else if (oldChildren !== null) {
643
610
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
644
611
  }
645
612
  } else if (oldVNode.$text$ !== text) {
@@ -782,14 +749,14 @@ var postUpdateComponent = (hostRef) => {
782
749
  const endPostUpdate = createTime("postUpdate", tagName);
783
750
  const instance = hostRef.$lazyInstance$ ;
784
751
  const ancestorComponent = hostRef.$ancestorComponent$;
785
- {
786
- safeCall(instance, "componentDidRender");
787
- }
788
752
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
789
753
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
790
754
  {
791
755
  addHydratedFlag(elm);
792
756
  }
757
+ {
758
+ safeCall(instance, "componentDidLoad");
759
+ }
793
760
  endPostUpdate();
794
761
  {
795
762
  hostRef.$onReadyResolve$(elm);
@@ -841,6 +808,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
841
808
  `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).`
842
809
  );
843
810
  }
811
+ const elm = hostRef.$hostElement$ ;
844
812
  const oldVal = hostRef.$instanceValues$.get(propName);
845
813
  const flags = hostRef.$flags$;
846
814
  const instance = hostRef.$lazyInstance$ ;
@@ -850,6 +818,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
850
818
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
851
819
  hostRef.$instanceValues$.set(propName, newVal);
852
820
  if (instance) {
821
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
822
+ const watchMethods = cmpMeta.$watchers$[propName];
823
+ if (watchMethods) {
824
+ watchMethods.map((watchMethodName) => {
825
+ try {
826
+ instance[watchMethodName](newVal, oldVal, propName);
827
+ } catch (e) {
828
+ consoleError(e, elm);
829
+ }
830
+ });
831
+ }
832
+ }
853
833
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
854
834
  scheduleUpdate(hostRef, false);
855
835
  }
@@ -861,7 +841,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
861
841
  var proxyComponent = (Cstr, cmpMeta, flags) => {
862
842
  var _a, _b;
863
843
  const prototype = Cstr.prototype;
864
- if (cmpMeta.$members$ || BUILD.watchCallback ) {
844
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
845
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
846
+ cmpMeta.$watchers$ = Cstr.watchers;
847
+ }
865
848
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
866
849
  members.map(([memberName, [memberFlags]]) => {
867
850
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -886,8 +869,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
886
869
  if (this.hasOwnProperty(propName)) {
887
870
  newValue = this[propName];
888
871
  delete this[propName];
889
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
890
- this[propName] == newValue) {
872
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
891
873
  return;
892
874
  } else if (propName == null) {
893
875
  const hostRef = getHostRef(this);
@@ -944,6 +926,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
944
926
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
945
927
  }
946
928
  if (!Cstr.isProxied) {
929
+ {
930
+ cmpMeta.$watchers$ = Cstr.watchers;
931
+ }
947
932
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
948
933
  Cstr.isProxied = true;
949
934
  }
@@ -959,6 +944,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
959
944
  {
960
945
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
961
946
  }
947
+ {
948
+ hostRef.$flags$ |= 128 /* isWatchReady */;
949
+ }
962
950
  endNewInstance();
963
951
  } else {
964
952
  Cstr = elm.constructor;
@@ -1027,12 +1015,17 @@ var connectedCallback = (elm) => {
1027
1015
  }
1028
1016
  };
1029
1017
  var disconnectInstance = (instance) => {
1018
+ {
1019
+ safeCall(instance, "disconnectedCallback");
1020
+ }
1030
1021
  };
1031
1022
  var disconnectedCallback = async (elm) => {
1032
1023
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1033
1024
  const hostRef = getHostRef(elm);
1034
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1035
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1025
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1026
+ disconnectInstance(hostRef.$lazyInstance$);
1027
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1028
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1036
1029
  }
1037
1030
  }
1038
1031
  };
@@ -1055,6 +1048,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1055
1048
  let hasSlotRelocation = false;
1056
1049
  lazyBundles.map((lazyBundle) => {
1057
1050
  lazyBundle[1].map((compactMeta) => {
1051
+ var _a2;
1058
1052
  const cmpMeta = {
1059
1053
  $flags$: compactMeta[0],
1060
1054
  $tagName$: compactMeta[1],
@@ -1070,6 +1064,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1070
1064
  {
1071
1065
  cmpMeta.$attrsToReflect$ = [];
1072
1066
  }
1067
+ {
1068
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1069
+ }
1073
1070
  const tagName = cmpMeta.$tagName$;
1074
1071
  const HostElement = class extends HTMLElement {
1075
1072
  // StencilLazyHost
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-79ce7f1f.js';
2
- export { s as setNonce } from './index-79ce7f1f.js';
1
+ import { b as bootstrapLazy } from './index-0483e183.js';
2
+ export { s as setNonce } from './index-0483e183.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-pagination",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
8
+ return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as t,b as e}from"./p-ddd49f2d.js";export{s as setNonce}from"./p-ddd49f2d.js";import{g as a}from"./p-e1255160.js";(()=>{const e=import.meta.url,a={};return""!==e&&(a.resourcesUrl=new URL(".",e).href),t(a)})().then((async t=>(await a(),e([["p-a3272d7a",[[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],clientStyling:[1537,"client-styling"],clientStylingUrlContent:[1537,"client-styling-url-content"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]]],t))));
1
+ import{p as e,b as t}from"./p-fcde97c1.js";export{s as setNonce}from"./p-fcde97c1.js";import{g as n}from"./p-e1255160.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["p-b696341a",[[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],mbSource:[1,"mb-source"],clientStyling:[1537,"client-styling"],clientStylingUrl:[1537,"client-styling-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./p-fcde97c1.js";function e(t,i){if(t){const s=document.createElement("style");s.innerHTML=i,t.appendChild(s)}}function a(t,i){const s=new URL(i);fetch(s.href).then((t=>t.text())).then((i=>{const s=document.createElement("style");s.innerHTML=i,t&&t.appendChild(s)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const n=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},h=(t,i)=>o[void 0!==i&&i in o?i:"en"][t],r=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!=i&&e(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!=i&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const s=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{s.innerHTML=i,t&&t.appendChild(s)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(n(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},h("firstPage",this.language)),s("span",{class:"NavigationIcon"})),e=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"})));n(this.userAgent)&&(e=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},h("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let a=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},h("lastPage",this.language)),s("span",{class:"NavigationIcon"})),o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&a);return n(this.userAgent)&&(o=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},h("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&e,this.numberedNavActive&&t,this.arrowsActive&&o)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';export{r as helper_pagination}
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>e.set(n.t=t,n),o=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],y=[],$=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.l?v(w):f.raf(w))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},w=()=>{b(m),b(y),(d=m.length>0)&&f.raf(w)},v=t=>h().then(t),g=$(y,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let l=null,o=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!j(l))&&(l+=""),o&&r?s[s.length-1].i+=l:s.push(o?A(null,l):l),r=o)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,s.length>0&&(c.h=s),c},A=(t,e)=>({l:0,p:t,i:e,m:null,h:null,u:null}),F={},L=(t,e,l)=>{const o=(t=>n(t).$hostElement$)(t);return{emit:t=>N(o,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},N=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},U=new WeakMap,W=t=>"sc-"+t.$,D=(t,e,n,l,r,s)=>{if(n!==l){let i=o(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=q(n),r=q(l);e.remove(...o.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else if(i||"o"!==e[0]||"n"!==e[1]){const o=j(l);if((i||o&&null!==l)&&!r)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!o&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(u,c)?c.slice(2):c[2]+e.slice(3),n||l){const o=e.endsWith(G);e=e.replace(V,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}}},H=/\s/,q=t=>t?t.split(H):[],G="Capture",V=RegExp(G+"$"),_=(t,e,n)=>{const l=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||S,r=e.u||S;for(const t of z(Object.keys(o)))t in r||D(l,t,o[t],void 0,n,e.l);for(const t of z(Object.keys(r)))D(l,t,o[t],r[t],n,e.l)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,I=(t,e,n)=>{const l=e.h[n];let o,r,s=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else if(o=l.m=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(s=0;s<l.h.length;++s)r=I(t,l,s),r&&o.appendChild(r);return o["s-hn"]=x,o},J=(t,e,n,l,o,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=r;++o)l[o]&&(s=I(null,n,o),s&&(l[o].m=s,Z(i,s,e)))},K=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.m;Y(e),t&&t.remove()}}},Q=(t,e)=>t.p===e.p,X=(t,e,n=!1)=>{const l=e.m=t.m,o=t.h,r=e.h,s=e.i;null===s?(_(t,e,B),null!==o&&null!==r?((t,e,n,l,o=!1)=>{let r,s=0,i=0,c=e.length-1,u=e[0],a=e[c],f=l.length-1,h=l[0],p=l[f];for(;s<=c&&i<=f;)null==u?u=e[++s]:null==a?a=e[--c]:null==h?h=l[++i]:null==p?p=l[--f]:Q(u,h)?(X(u,h,o),u=e[++s],h=l[++i]):Q(a,p)?(X(a,p,o),a=e[--c],p=l[--f]):Q(u,p)?(X(u,p,o),Z(t,u.m,a.m.nextSibling),u=e[++s],p=l[--f]):Q(a,h)?(X(a,h,o),Z(t,a.m,u.m),a=e[--c],h=l[++i]):(r=I(e&&e[i],n,i),h=l[++i],r&&Z(u.m.parentNode,r,u.m));s>c?J(t,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&K(e,s,c)})(l,o,e,r,n):null!==r?(null!==t.i&&(l.textContent=""),J(l,null,e,r,0,r.length-1)):null!==o&&K(o,0,o.length-1)):t.i!==s&&(l.data=s)},Y=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Y)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},et=(t,e)=>{if(t.l|=16,!(4&t.l))return tt(t,t.S),g((()=>nt(t,e)));t.l|=512},nt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=lt(l,(()=>ut(n,"componentWillRender"))),lt(l,(()=>rt(t,n,e)))},lt=(t,e)=>ot(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,l=e.l,o=((t,e)=>{var n;const l=W(e),o=i.get(l);if(t=11===t.nodeType?t:a,o)if("string"==typeof o){let r,s=U.get(t=t.head||t);if(s||U.set(t,s=new Set),!s.has(l)){{r=a.createElement("style"),r.innerHTML=o;const e=null!=(n=f.k)?n:k(a);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.l&&(r.innerHTML+=c),s&&s.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);st(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},st=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.j,r=t.O||A(null,null),s=(t=>t&&t.p===F)(e)?e:T(null,null,e);if(x=l.tagName,o.C&&(s.u=s.u||{},o.C.map((([t,e])=>s.u[e]=l[t]))),n&&s.u)for(const t of Object.keys(s.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=l[t]);s.p=null,s.l|=4,t.O=s,s.m=r.m=l.shadowRoot||l,M=l["s-sc"],X(r,s,n)})(t,e,l)}catch(e){r(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.t,l=t.S;64&t.l||(t.l|=64,at(e),ut(n,"componentDidLoad"),t.M(e),l||ct()),t.v&&(t.v(),t.v=void 0),512&t.l&&v((()=>et(t,!1))),t.l&=-517},ct=()=>{at(a.documentElement),v((()=>N(u,"appload",{detail:{namespace:"helper-pagination"}})))},ut=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},at=t=>t.classList.add("hydrated"),ft=(t,e,l)=>{var o,s;const i=t.prototype;if(e.P||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const c=Object.entries(null!=(o=e.P)?o:{});if(c.map((([t,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).T.get(e))(0,t)},set(l){((t,e,l,o)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.T.get(e),u=s.l,a=s.t;if(l=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(l,o.P[e][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(s.T.set(e,l),a)){if(o.R&&128&u){const t=o.R[e];t&&t.map((t=>{try{a[t](l,c,e)}catch(t){r(t,i)}}))}2==(18&u)&&et(s,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,r){f.jmp((()=>{var s;const c=l.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&r!==o){const n=l.t,i=null==(s=e.R)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,o,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.R)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const r=n[1]||t;return l.set(r,t),512&n[0]&&(null==(o=e.C)||o.push([t,r])),r}))]))}}return t},ht=t=>{ut(t,"disconnectedCallback")},pt=(t,l={})=>{var o;const h=[],d=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{var o;const c={l:l[0],$:l[1],P:l[2],A:l[3]};4&c.l&&(S=!0),c.P=l[2],c.C=[],c.R=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,j:n,T:new Map};l.F=new Promise((t=>l.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c),1&c.l)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(t=>{if(!(1&f.l)){const e=n(t),l=e.j,o=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.F)&&e.F.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.S=n);break}}l.P&&Object.entries(l.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.L){const t=(t=>{const e=t.$.replace(/-/g,"_"),n=t.L;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};l=await t,e()}else l=t;if(!l)throw Error(`Constructor for "${n.$}#${e.N}" was not found`);l.isProxied||(n.R=l.watchers,ft(l,n,2),l.isProxied=!0);const o=()=>{};e.l|=8;try{new l(e)}catch(t){r(t)}e.l&=-9,e.l|=128,o()}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=W(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.l)),l()}}}const o=e.S,c=()=>et(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(t,e,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const t=n(this);(null==t?void 0:t.t)?ht(t.t):(null==t?void 0:t.F)&&t.F.then((()=>ht(t.t)))}})()))}componentOnReady(){return n(this).F}};c.L=t[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ft(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const t=null!=(o=f.k)?o:k(a);null!=t&&b.setAttribute("nonce",t),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((t=>t.connectedCallback())):f.jmp((()=>v=setTimeout(ct,30)))},dt=t=>f.k=t;export{pt as b,L as c,T as h,h as p,l as r,dt as s}
@@ -24,6 +24,10 @@ export declare class HelperPagination {
24
24
  * Language
25
25
  */
26
26
  language: string;
27
+ /**
28
+ * Client custom styling via streamStyling
29
+ */
30
+ mbSource: string;
27
31
  /**
28
32
  * Client custom styling via string
29
33
  */
@@ -31,7 +35,7 @@ export declare class HelperPagination {
31
35
  /**
32
36
  * Client custom styling via url content
33
37
  */
34
- clientStylingUrlContent: string;
38
+ clientStylingUrl: string;
35
39
  /**
36
40
  * Customize pagination: Activate pagination arrows
37
41
  */
@@ -78,8 +82,10 @@ export declare class HelperPagination {
78
82
  * Event that handles the navigation, updating the offset, limit and total values
79
83
  */
80
84
  hpPageChange: EventEmitter<any>;
81
- private limitStylingAppends;
82
85
  private stylingContainer;
86
+ private stylingSubscription;
87
+ handleClientStylingChange(newValue: any, oldValue: any): void;
88
+ handleClientStylingChangeURL(newValue: any, oldValue: any): void;
83
89
  /**
84
90
  * Navigation logic
85
91
  */
@@ -89,8 +95,7 @@ export declare class HelperPagination {
89
95
  */
90
96
  paginationNavigation: (pageNumber: number, index: any) => void;
91
97
  componentWillRender(): void;
92
- componentDidRender(): void;
93
- setClientStyling: () => void;
94
- setClientStylingURL: () => void;
98
+ componentDidLoad(): void;
99
+ disconnectedCallback(): void;
95
100
  render(): any;
96
101
  }
@@ -18,7 +18,7 @@ export namespace Components {
18
18
  /**
19
19
  * Client custom styling via url content
20
20
  */
21
- "clientStylingUrlContent": string;
21
+ "clientStylingUrl": string;
22
22
  /**
23
23
  * Language
24
24
  */
@@ -27,6 +27,10 @@ export namespace Components {
27
27
  * The received limit for the number of pages
28
28
  */
29
29
  "limit": number;
30
+ /**
31
+ * Client custom styling via streamStyling
32
+ */
33
+ "mbSource": string;
30
34
  /**
31
35
  * Next page string value - determines if the next page is disabled or active
32
36
  */
@@ -92,7 +96,7 @@ declare namespace LocalJSX {
92
96
  /**
93
97
  * Client custom styling via url content
94
98
  */
95
- "clientStylingUrlContent"?: string;
99
+ "clientStylingUrl"?: string;
96
100
  /**
97
101
  * Language
98
102
  */
@@ -101,6 +105,10 @@ declare namespace LocalJSX {
101
105
  * The received limit for the number of pages
102
106
  */
103
107
  "limit"?: number;
108
+ /**
109
+ * Client custom styling via streamStyling
110
+ */
111
+ "mbSource"?: string;
104
112
  /**
105
113
  * Next page string value - determines if the next page is disabled or active
106
114
  */
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
- controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
- controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1020
1018
  crossOrigin?: string;
1021
1019
  crossorigin?: string;
1022
1020
  loop?: boolean;
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
1566
1564
  onSubmitCapture?: (event: Event) => void;
1567
1565
  onInvalid?: (event: Event) => void;
1568
1566
  onInvalidCapture?: (event: Event) => void;
1569
- onBeforeToggle?: (event: Event) => void;
1570
- onBeforeToggleCapture?: (event: Event) => void;
1571
- onToggle?: (event: Event) => void;
1572
- onToggleCapture?: (event: Event) => void;
1573
1567
  onLoad?: (event: Event) => void;
1574
1568
  onLoadCapture?: (event: Event) => void;
1575
1569
  onError?: (event: Event) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/helper-pagination",
3
- "version": "1.55.0",
3
+ "version": "1.56.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s}from"./p-ddd49f2d.js";const a=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),e={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},o=(t,i)=>e[void 0!==i&&i in e?i:"en"][t],n=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0,this.limitStylingAppends=!1}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(a(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},o("firstPage",this.language)),s("span",{class:"NavigationIcon"})),e=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},o("previousPage",this.language)),s("span",{class:"NavigationIcon"})));a(this.userAgent)&&(e=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},o("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let n=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},o("lastPage",this.language)),s("span",{class:"NavigationIcon"})),h=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},o("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&n);return a(this.userAgent)&&(h=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},o("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&e,this.numberedNavActive&&t,this.arrowsActive&&h)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';export{n as helper_pagination}
@@ -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),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?v(b):f.raf(b))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{w(d),w(y),(m=d.length>0)&&f.raf(b)},v=e=>h().then(e),S=$(y,!0),g={},j=e=>"object"==(e=typeof e)||"function"===e;function E(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:()=>k,map:()=>C,ok:()=>O,unwrap:()=>x,unwrapErr:()=>P});var O=e=>({isOk:!0,isErr:!1,value:e}),k=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 k(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=!1,s=!1;const r=[],i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!j(l))&&(l+=""),o&&s?r[r.length-1].i+=l:r.push(o?A(null,l):l),s=o)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=A(e,null);return c.u=t,r.length>0&&(c.h=r),c},A=(e,t)=>({l:0,p:e,i:t,m:null,h:null,u:null}),D={},H=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>T(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},T=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},F=new WeakMap,N=e=>"sc-"+e.$,U=(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=L(n),s=L(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}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||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(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(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},W=/\s/,L=e=>e?e.split(W):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||g,s=t.u||g;for(const e of _(Object.keys(o)))e in s||U(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))U(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else if(o=l.m=a.createElement(l.p),V(null,l,z),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=B(e,l,r),s&&o.appendChild(s);return o["s-hn"]=M,o},I=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===M&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=B(null,n,o),r&&(l[o].m=r,Y(i,r,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.m;X(t),e&&e.remove()}}},K=(e,t)=>e.p===t.p,Q=(e,t,n=!1)=>{const l=t.m=e.m,o=e.h,s=t.h,r=t.i;null===r?(V(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r=0,i=0,c=t.length-1,u=t[0],a=t[c],f=l.length-1,h=l[0],p=l[f];for(;r<=c&&i<=f;)null==u?u=t[++r]:null==a?a=t[--c]:null==h?h=l[++i]:null==p?p=l[--f]:K(u,h)?(Q(u,h,o),u=t[++r],h=l[++i]):K(a,p)?(Q(a,p,o),a=t[--c],p=l[--f]):K(u,p)?(Q(u,p,o),Y(e,u.m,a.m.nextSibling),u=t[++r],p=l[--f]):K(a,h)?(Q(a,h,o),Y(e,a.m,u.m),a=t[--c],h=l[++i]):(s=B(t&&t[i],n,i),h=l[++i],s&&Y(u.m.parentNode,s,u.m));r>c?I(e,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&J(t,r,c)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),I(l,null,t,s,0,s.length-1)):!n&&null!==o&&J(o,0,o.length-1)):e.i!==r&&(l.data=r)},X=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(X)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.S),S((()=>te(e,t)));e.l|=512},te=(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 l=ne(l,(()=>ce(n,"componentWillRender"))),ne(l,(()=>oe(e,n,t)))},ne=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=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=N(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.O)?n:E(a);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(p){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}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&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);se(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},se=(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.k||A(null,null),r=(e=>e&&e.p===D)(t)?t:R(null,null,t);if(M=l.tagName,o.C&&(r.u=r.u||{},o.C.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.p=null,r.l|=4,e.k=r,r.m=s.m=l.shadowRoot||l,Q(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.S;ce(e.t,"componentDidRender"),64&e.l||(e.l|=64,ue(t),e.M(t),n||ie()),e.v&&(e.v(),e.v=void 0),512&e.l&&v((()=>ee(e,!1))),e.l&=-517},ie=()=>{ue(a.documentElement),v((()=>T(u,"appload",{detail:{namespace:"helper-pagination"}})))},ce=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),ae=(e,t,l)=>{var o,s;const r=e.prototype;if(t.P){const i=Object.entries(null!=(o=t.P)?o:{});if(i.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).R.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.$}" 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.R.get(t),i=s.l,c=s.t;l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.P[t][0]),8&i&&void 0!==r||l===r||Number.isNaN(r)&&Number.isNaN(l)||(s.R.set(t,l),c&&2==(18&i)&&ee(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.C)||o.push([e,s])),s}))]))}}return e},fe=(e,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];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],$:l[1],P:l[2],D:l[3]};4&o.l&&(g=!0),o.P=l[2],o.C=[];const c=o.$,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,R:new Map};l.H=new Promise((e=>l.M=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.$}! 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?b.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)||(null==t?void 0:t.H)&&t.H.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(t,t.S=n);break}}l.P&&Object.entries(l.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.T){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.T;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.$}#${t.F}" was not found`);l.isProxied||(ae(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,o()}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=N(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&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.S,c=()=>ee(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.H)&&e.H.then((()=>{}))}})()))}componentOnReady(){return n(this).H}};o.T=e[0],m.includes(c)||d.get(c)||(h.push(c),d.define(c,ae(u,o,1)))}))})),h.length>0&&(g&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:E(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}S=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ie,30)))},he=e=>f.O=e;export{fe as b,H as c,R as h,h as p,l as r,he as s}