@everymatrix/casino-tournament-duration 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/casino-tournament-duration/casino-tournament-duration.esm.js +1 -0
  2. package/dist/casino-tournament-duration/index.esm.js +0 -0
  3. package/dist/casino-tournament-duration/p-05f4af89.entry.js +1 -0
  4. package/dist/casino-tournament-duration/p-efeaf265.js +1 -0
  5. package/dist/cjs/casino-tournament-duration.cjs.entry.js +180 -0
  6. package/dist/cjs/casino-tournament-duration.cjs.js +19 -0
  7. package/dist/cjs/index-8e0377fe.js +1138 -0
  8. package/dist/cjs/index.cjs.js +2 -0
  9. package/dist/cjs/loader.cjs.js +21 -0
  10. package/dist/collection/collection-manifest.json +12 -0
  11. package/dist/collection/components/casino-tournament-duration/casino-tournament-duration.css +60 -0
  12. package/dist/collection/components/casino-tournament-duration/casino-tournament-duration.js +228 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/utils/locale.utils.js +80 -0
  15. package/dist/collection/utils/utils.js +3 -0
  16. package/dist/components/casino-tournament-duration.d.ts +11 -0
  17. package/dist/components/casino-tournament-duration.js +206 -0
  18. package/dist/components/index.d.ts +26 -0
  19. package/dist/components/index.js +1 -0
  20. package/dist/esm/casino-tournament-duration.entry.js +176 -0
  21. package/dist/esm/casino-tournament-duration.js +17 -0
  22. package/dist/esm/index-a10d1dd0.js +1113 -0
  23. package/dist/esm/index.js +1 -0
  24. package/dist/esm/loader.js +17 -0
  25. package/dist/esm/polyfills/core-js.js +11 -0
  26. package/dist/esm/polyfills/css-shim.js +1 -0
  27. package/dist/esm/polyfills/dom.js +79 -0
  28. package/dist/esm/polyfills/es5-html-element.js +1 -0
  29. package/dist/esm/polyfills/index.js +34 -0
  30. package/dist/esm/polyfills/system.js +6 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/stencil.config.js +22 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-tournament-duration/.stencil/packages/casino-tournament-duration/stencil.config.d.ts +2 -0
  35. package/dist/types/components/casino-tournament-duration/casino-tournament-duration.d.ts +23 -0
  36. package/dist/types/components.d.ts +49 -0
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  39. package/dist/types/utils/locale.utils.d.ts +1 -0
  40. package/dist/types/utils/utils.d.ts +1 -0
  41. package/loader/cdn.js +3 -0
  42. package/loader/index.cjs.js +3 -0
  43. package/loader/index.d.ts +12 -0
  44. package/loader/index.es2017.js +3 -0
  45. package/loader/index.js +4 -0
  46. package/loader/package.json +10 -0
  47. package/package.json +19 -0
@@ -0,0 +1,1138 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'casino-tournament-duration';
24
+
25
+ let scopeId;
26
+ let hostTagName;
27
+ let isSvgMode = false;
28
+ let queuePending = false;
29
+ const win = typeof window !== 'undefined' ? window : {};
30
+ const doc = win.document || { head: {} };
31
+ const plt = {
32
+ $flags$: 0,
33
+ $resourcesUrl$: '',
34
+ jmp: (h) => h(),
35
+ raf: (h) => requestAnimationFrame(h),
36
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
37
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
38
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
39
+ };
40
+ const promiseResolve = (v) => Promise.resolve(v);
41
+ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
42
+ try {
43
+ new CSSStyleSheet();
44
+ return typeof new CSSStyleSheet().replace === 'function';
45
+ }
46
+ catch (e) { }
47
+ return false;
48
+ })()
49
+ ;
50
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
51
+ const createTime = (fnName, tagName = '') => {
52
+ {
53
+ return () => {
54
+ return;
55
+ };
56
+ }
57
+ };
58
+ const uniqueTime = (key, measureText) => {
59
+ {
60
+ return () => {
61
+ return;
62
+ };
63
+ }
64
+ };
65
+ const rootAppliedStyles = new WeakMap();
66
+ const registerStyle = (scopeId, cssText, allowCS) => {
67
+ let style = styles.get(scopeId);
68
+ if (supportsConstructibleStylesheets && allowCS) {
69
+ style = (style || new CSSStyleSheet());
70
+ style.replace(cssText);
71
+ }
72
+ else {
73
+ style = cssText;
74
+ }
75
+ styles.set(scopeId, style);
76
+ };
77
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
78
+ let scopeId = getScopeId(cmpMeta);
79
+ let style = styles.get(scopeId);
80
+ // if an element is NOT connected then getRootNode() will return the wrong root node
81
+ // so the fallback is to always use the document for the root node in those cases
82
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
83
+ if (style) {
84
+ if (typeof style === 'string') {
85
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
86
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
87
+ let styleElm;
88
+ if (!appliedStyles) {
89
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
90
+ }
91
+ if (!appliedStyles.has(scopeId)) {
92
+ {
93
+ {
94
+ styleElm = doc.createElement('style');
95
+ styleElm.innerHTML = style;
96
+ }
97
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
98
+ }
99
+ if (appliedStyles) {
100
+ appliedStyles.add(scopeId);
101
+ }
102
+ }
103
+ }
104
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
105
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
106
+ }
107
+ }
108
+ return scopeId;
109
+ };
110
+ const attachStyles = (hostRef) => {
111
+ const cmpMeta = hostRef.$cmpMeta$;
112
+ const elm = hostRef.$hostElement$;
113
+ const flags = cmpMeta.$flags$;
114
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
115
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
116
+ if (flags & 10 /* needsScopedEncapsulation */) {
117
+ // only required when we're NOT using native shadow dom (slot)
118
+ // or this browser doesn't support native shadow dom
119
+ // and this host element was NOT created with SSR
120
+ // let's pick out the inner content for slot projection
121
+ // create a node to represent where the original
122
+ // content was first placed, which is useful later on
123
+ // DOM WRITE!!
124
+ elm['s-sc'] = scopeId;
125
+ elm.classList.add(scopeId + '-h');
126
+ }
127
+ endAttachStyles();
128
+ };
129
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
130
+ /**
131
+ * Default style mode id
132
+ */
133
+ /**
134
+ * Reusable empty obj/array
135
+ * Don't add values to these!!
136
+ */
137
+ const EMPTY_OBJ = {};
138
+ const isDef = (v) => v != null;
139
+ const isComplexType = (o) => {
140
+ // https://jsperf.com/typeof-fn-object/5
141
+ o = typeof o;
142
+ return o === 'object' || o === 'function';
143
+ };
144
+ /**
145
+ * Production h() function based on Preact by
146
+ * Jason Miller (@developit)
147
+ * Licensed under the MIT License
148
+ * https://github.com/developit/preact/blob/master/LICENSE
149
+ *
150
+ * Modified for Stencil's compiler and vdom
151
+ */
152
+ // const stack: any[] = [];
153
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
154
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
155
+ const h = (nodeName, vnodeData, ...children) => {
156
+ let child = null;
157
+ let simple = false;
158
+ let lastSimple = false;
159
+ let vNodeChildren = [];
160
+ const walk = (c) => {
161
+ for (let i = 0; i < c.length; i++) {
162
+ child = c[i];
163
+ if (Array.isArray(child)) {
164
+ walk(child);
165
+ }
166
+ else if (child != null && typeof child !== 'boolean') {
167
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
168
+ child = String(child);
169
+ }
170
+ if (simple && lastSimple) {
171
+ // If the previous child was simple (string), we merge both
172
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
173
+ }
174
+ else {
175
+ // Append a new vNode, if it's text, we create a text vNode
176
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
177
+ }
178
+ lastSimple = simple;
179
+ }
180
+ }
181
+ };
182
+ walk(children);
183
+ if (vnodeData) {
184
+ {
185
+ const classData = vnodeData.className || vnodeData.class;
186
+ if (classData) {
187
+ vnodeData.class =
188
+ typeof classData !== 'object'
189
+ ? classData
190
+ : Object.keys(classData)
191
+ .filter((k) => classData[k])
192
+ .join(' ');
193
+ }
194
+ }
195
+ }
196
+ const vnode = newVNode(nodeName, null);
197
+ vnode.$attrs$ = vnodeData;
198
+ if (vNodeChildren.length > 0) {
199
+ vnode.$children$ = vNodeChildren;
200
+ }
201
+ return vnode;
202
+ };
203
+ const newVNode = (tag, text) => {
204
+ const vnode = {
205
+ $flags$: 0,
206
+ $tag$: tag,
207
+ $text$: text,
208
+ $elm$: null,
209
+ $children$: null,
210
+ };
211
+ {
212
+ vnode.$attrs$ = null;
213
+ }
214
+ return vnode;
215
+ };
216
+ const Host = {};
217
+ const isHost = (node) => node && node.$tag$ === Host;
218
+ /**
219
+ * Production setAccessor() function based on Preact by
220
+ * Jason Miller (@developit)
221
+ * Licensed under the MIT License
222
+ * https://github.com/developit/preact/blob/master/LICENSE
223
+ *
224
+ * Modified for Stencil's compiler and vdom
225
+ */
226
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
227
+ if (oldValue !== newValue) {
228
+ let isProp = isMemberInElement(elm, memberName);
229
+ memberName.toLowerCase();
230
+ if (memberName === 'class') {
231
+ const classList = elm.classList;
232
+ const oldClasses = parseClassList(oldValue);
233
+ const newClasses = parseClassList(newValue);
234
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
235
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
236
+ }
237
+ else if (memberName === 'style') {
238
+ // update style attribute, css properties and values
239
+ {
240
+ for (const prop in oldValue) {
241
+ if (!newValue || newValue[prop] == null) {
242
+ if (prop.includes('-')) {
243
+ elm.style.removeProperty(prop);
244
+ }
245
+ else {
246
+ elm.style[prop] = '';
247
+ }
248
+ }
249
+ }
250
+ }
251
+ for (const prop in newValue) {
252
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
253
+ if (prop.includes('-')) {
254
+ elm.style.setProperty(prop, newValue[prop]);
255
+ }
256
+ else {
257
+ elm.style[prop] = newValue[prop];
258
+ }
259
+ }
260
+ }
261
+ }
262
+ else if (memberName === 'ref') {
263
+ // minifier will clean this up
264
+ if (newValue) {
265
+ newValue(elm);
266
+ }
267
+ }
268
+ else {
269
+ // Set property if it exists and it's not a SVG
270
+ const isComplex = isComplexType(newValue);
271
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
272
+ try {
273
+ if (!elm.tagName.includes('-')) {
274
+ let n = newValue == null ? '' : newValue;
275
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
276
+ if (memberName === 'list') {
277
+ isProp = false;
278
+ }
279
+ else if (oldValue == null || elm[memberName] != n) {
280
+ elm[memberName] = n;
281
+ }
282
+ }
283
+ else {
284
+ elm[memberName] = newValue;
285
+ }
286
+ }
287
+ catch (e) { }
288
+ }
289
+ if (newValue == null || newValue === false) {
290
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
291
+ {
292
+ elm.removeAttribute(memberName);
293
+ }
294
+ }
295
+ }
296
+ else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
297
+ newValue = newValue === true ? '' : newValue;
298
+ {
299
+ elm.setAttribute(memberName, newValue);
300
+ }
301
+ }
302
+ }
303
+ }
304
+ };
305
+ const parseClassListRegex = /\s/;
306
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
307
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
308
+ // if the element passed in is a shadow root, which is a document fragment
309
+ // then we want to be adding attrs/props to the shadow root's "host" element
310
+ // if it's not a shadow root, then we add attrs/props to the same element
311
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
312
+ ? newVnode.$elm$.host
313
+ : newVnode.$elm$;
314
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
315
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
316
+ {
317
+ // remove attributes no longer present on the vnode by setting them to undefined
318
+ for (memberName in oldVnodeAttrs) {
319
+ if (!(memberName in newVnodeAttrs)) {
320
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
321
+ }
322
+ }
323
+ }
324
+ // add new & update changed attributes
325
+ for (memberName in newVnodeAttrs) {
326
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
327
+ }
328
+ };
329
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
330
+ // tslint:disable-next-line: prefer-const
331
+ let newVNode = newParentVNode.$children$[childIndex];
332
+ let i = 0;
333
+ let elm;
334
+ let childNode;
335
+ if (newVNode.$text$ !== null) {
336
+ // create text node
337
+ elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
338
+ }
339
+ else {
340
+ // create element
341
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
342
+ // add css classes, attrs, props, listeners, etc.
343
+ {
344
+ updateElement(null, newVNode, isSvgMode);
345
+ }
346
+ if (isDef(scopeId) && elm['s-si'] !== scopeId) {
347
+ // if there is a scopeId and this is the initial render
348
+ // then let's add the scopeId as a css class
349
+ elm.classList.add((elm['s-si'] = scopeId));
350
+ }
351
+ if (newVNode.$children$) {
352
+ for (i = 0; i < newVNode.$children$.length; ++i) {
353
+ // create the node
354
+ childNode = createElm(oldParentVNode, newVNode, i);
355
+ // return node could have been null
356
+ if (childNode) {
357
+ // append our new node
358
+ elm.appendChild(childNode);
359
+ }
360
+ }
361
+ }
362
+ }
363
+ return elm;
364
+ };
365
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
366
+ let containerElm = (parentElm);
367
+ let childNode;
368
+ if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
369
+ containerElm = containerElm.shadowRoot;
370
+ }
371
+ for (; startIdx <= endIdx; ++startIdx) {
372
+ if (vnodes[startIdx]) {
373
+ childNode = createElm(null, parentVNode, startIdx);
374
+ if (childNode) {
375
+ vnodes[startIdx].$elm$ = childNode;
376
+ containerElm.insertBefore(childNode, before);
377
+ }
378
+ }
379
+ }
380
+ };
381
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
382
+ for (; startIdx <= endIdx; ++startIdx) {
383
+ if ((vnode = vnodes[startIdx])) {
384
+ elm = vnode.$elm$;
385
+ callNodeRefs(vnode);
386
+ // remove the vnode's element from the dom
387
+ elm.remove();
388
+ }
389
+ }
390
+ };
391
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
392
+ let oldStartIdx = 0;
393
+ let newStartIdx = 0;
394
+ let oldEndIdx = oldCh.length - 1;
395
+ let oldStartVnode = oldCh[0];
396
+ let oldEndVnode = oldCh[oldEndIdx];
397
+ let newEndIdx = newCh.length - 1;
398
+ let newStartVnode = newCh[0];
399
+ let newEndVnode = newCh[newEndIdx];
400
+ let node;
401
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
402
+ if (oldStartVnode == null) {
403
+ // Vnode might have been moved left
404
+ oldStartVnode = oldCh[++oldStartIdx];
405
+ }
406
+ else if (oldEndVnode == null) {
407
+ oldEndVnode = oldCh[--oldEndIdx];
408
+ }
409
+ else if (newStartVnode == null) {
410
+ newStartVnode = newCh[++newStartIdx];
411
+ }
412
+ else if (newEndVnode == null) {
413
+ newEndVnode = newCh[--newEndIdx];
414
+ }
415
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
416
+ patch(oldStartVnode, newStartVnode);
417
+ oldStartVnode = oldCh[++oldStartIdx];
418
+ newStartVnode = newCh[++newStartIdx];
419
+ }
420
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
421
+ patch(oldEndVnode, newEndVnode);
422
+ oldEndVnode = oldCh[--oldEndIdx];
423
+ newEndVnode = newCh[--newEndIdx];
424
+ }
425
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
426
+ patch(oldStartVnode, newEndVnode);
427
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
428
+ oldStartVnode = oldCh[++oldStartIdx];
429
+ newEndVnode = newCh[--newEndIdx];
430
+ }
431
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
432
+ patch(oldEndVnode, newStartVnode);
433
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
434
+ oldEndVnode = oldCh[--oldEndIdx];
435
+ newStartVnode = newCh[++newStartIdx];
436
+ }
437
+ else {
438
+ {
439
+ // new element
440
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
441
+ newStartVnode = newCh[++newStartIdx];
442
+ }
443
+ if (node) {
444
+ {
445
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
446
+ }
447
+ }
448
+ }
449
+ }
450
+ if (oldStartIdx > oldEndIdx) {
451
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
452
+ }
453
+ else if (newStartIdx > newEndIdx) {
454
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
455
+ }
456
+ };
457
+ const isSameVnode = (vnode1, vnode2) => {
458
+ // compare if two vnode to see if they're "technically" the same
459
+ // need to have the same element tag, and same key to be the same
460
+ if (vnode1.$tag$ === vnode2.$tag$) {
461
+ return true;
462
+ }
463
+ return false;
464
+ };
465
+ const patch = (oldVNode, newVNode) => {
466
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
467
+ const oldChildren = oldVNode.$children$;
468
+ const newChildren = newVNode.$children$;
469
+ const text = newVNode.$text$;
470
+ if (text === null) {
471
+ // element node
472
+ {
473
+ {
474
+ // either this is the first render of an element OR it's an update
475
+ // AND we already know it's possible it could have changed
476
+ // this updates the element's css classes, attrs, props, listeners, etc.
477
+ updateElement(oldVNode, newVNode, isSvgMode);
478
+ }
479
+ }
480
+ if (oldChildren !== null && newChildren !== null) {
481
+ // looks like there's child vnodes for both the old and new vnodes
482
+ updateChildren(elm, oldChildren, newVNode, newChildren);
483
+ }
484
+ else if (newChildren !== null) {
485
+ // no old child vnodes, but there are new child vnodes to add
486
+ if (oldVNode.$text$ !== null) {
487
+ // the old vnode was text, so be sure to clear it out
488
+ elm.textContent = '';
489
+ }
490
+ // add the new vnode children
491
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
492
+ }
493
+ else if (oldChildren !== null) {
494
+ // no new child vnodes, but there are old child vnodes to remove
495
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
496
+ }
497
+ }
498
+ else if (oldVNode.$text$ !== text) {
499
+ // update the text content for the text only vnode
500
+ // and also only if the text is different than before
501
+ elm.data = text;
502
+ }
503
+ };
504
+ const callNodeRefs = (vNode) => {
505
+ {
506
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
507
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
508
+ }
509
+ };
510
+ const renderVdom = (hostRef, renderFnResults) => {
511
+ const hostElm = hostRef.$hostElement$;
512
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
513
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
514
+ hostTagName = hostElm.tagName;
515
+ rootVnode.$tag$ = null;
516
+ rootVnode.$flags$ |= 4 /* isHost */;
517
+ hostRef.$vnode$ = rootVnode;
518
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
519
+ {
520
+ scopeId = hostElm['s-sc'];
521
+ }
522
+ // synchronous patch
523
+ patch(oldVNode, rootVnode);
524
+ };
525
+ /**
526
+ * Helper function to create & dispatch a custom Event on a provided target
527
+ * @param elm the target of the Event
528
+ * @param name the name to give the custom Event
529
+ * @param opts options for configuring a custom Event
530
+ * @returns the custom Event
531
+ */
532
+ const emitEvent = (elm, name, opts) => {
533
+ const ev = plt.ce(name, opts);
534
+ elm.dispatchEvent(ev);
535
+ return ev;
536
+ };
537
+ const attachToAncestor = (hostRef, ancestorComponent) => {
538
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
539
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
540
+ }
541
+ };
542
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
543
+ {
544
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
545
+ }
546
+ if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
547
+ hostRef.$flags$ |= 512 /* needsRerender */;
548
+ return;
549
+ }
550
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
551
+ // there is no ancestor component or the ancestor component
552
+ // has already fired off its lifecycle update then
553
+ // fire off the initial update
554
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
555
+ return writeTask(dispatch) ;
556
+ };
557
+ const dispatchHooks = (hostRef, isInitialLoad) => {
558
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
559
+ const instance = hostRef.$lazyInstance$ ;
560
+ let promise;
561
+ if (isInitialLoad) {
562
+ {
563
+ promise = safeCall(instance, 'componentWillLoad');
564
+ }
565
+ }
566
+ endSchedule();
567
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
568
+ };
569
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
570
+ // updateComponent
571
+ const elm = hostRef.$hostElement$;
572
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
573
+ const rc = elm['s-rc'];
574
+ if (isInitialLoad) {
575
+ // DOM WRITE!
576
+ attachStyles(hostRef);
577
+ }
578
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
579
+ {
580
+ callRender(hostRef, instance);
581
+ }
582
+ if (rc) {
583
+ // ok, so turns out there are some child host elements
584
+ // waiting on this parent element to load
585
+ // let's fire off all update callbacks waiting
586
+ rc.map((cb) => cb());
587
+ elm['s-rc'] = undefined;
588
+ }
589
+ endRender();
590
+ endUpdate();
591
+ {
592
+ const childrenPromises = elm['s-p'];
593
+ const postUpdate = () => postUpdateComponent(hostRef);
594
+ if (childrenPromises.length === 0) {
595
+ postUpdate();
596
+ }
597
+ else {
598
+ Promise.all(childrenPromises).then(postUpdate);
599
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
600
+ childrenPromises.length = 0;
601
+ }
602
+ }
603
+ };
604
+ const callRender = (hostRef, instance, elm) => {
605
+ try {
606
+ instance = instance.render() ;
607
+ {
608
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
609
+ }
610
+ {
611
+ hostRef.$flags$ |= 2 /* hasRendered */;
612
+ }
613
+ {
614
+ {
615
+ // looks like we've got child nodes to render into this host element
616
+ // or we need to update the css class/attrs on the host element
617
+ // DOM WRITE!
618
+ {
619
+ renderVdom(hostRef, instance);
620
+ }
621
+ }
622
+ }
623
+ }
624
+ catch (e) {
625
+ consoleError(e, hostRef.$hostElement$);
626
+ }
627
+ return null;
628
+ };
629
+ const postUpdateComponent = (hostRef) => {
630
+ const tagName = hostRef.$cmpMeta$.$tagName$;
631
+ const elm = hostRef.$hostElement$;
632
+ const endPostUpdate = createTime('postUpdate', tagName);
633
+ const instance = hostRef.$lazyInstance$ ;
634
+ const ancestorComponent = hostRef.$ancestorComponent$;
635
+ {
636
+ safeCall(instance, 'componentDidRender');
637
+ }
638
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
639
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
640
+ {
641
+ // DOM WRITE!
642
+ addHydratedFlag(elm);
643
+ }
644
+ endPostUpdate();
645
+ {
646
+ hostRef.$onReadyResolve$(elm);
647
+ if (!ancestorComponent) {
648
+ appDidLoad();
649
+ }
650
+ }
651
+ }
652
+ else {
653
+ endPostUpdate();
654
+ }
655
+ // load events fire from bottom to top
656
+ // the deepest elements load first then bubbles up
657
+ {
658
+ if (hostRef.$onRenderResolve$) {
659
+ hostRef.$onRenderResolve$();
660
+ hostRef.$onRenderResolve$ = undefined;
661
+ }
662
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
663
+ nextTick(() => scheduleUpdate(hostRef, false));
664
+ }
665
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
666
+ }
667
+ // ( •_•)
668
+ // ( •_•)>⌐■-■
669
+ // (⌐■_■)
670
+ };
671
+ const appDidLoad = (who) => {
672
+ // on appload
673
+ // we have finish the first big initial render
674
+ {
675
+ addHydratedFlag(doc.documentElement);
676
+ }
677
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
678
+ };
679
+ const safeCall = (instance, method, arg) => {
680
+ if (instance && instance[method]) {
681
+ try {
682
+ return instance[method](arg);
683
+ }
684
+ catch (e) {
685
+ consoleError(e);
686
+ }
687
+ }
688
+ return undefined;
689
+ };
690
+ const then = (promise, thenFn) => {
691
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
692
+ };
693
+ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
694
+ ;
695
+ /**
696
+ * Parse a new property value for a given property type.
697
+ *
698
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
699
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
700
+ * 1. `any`, the type given to `propValue` in the function signature
701
+ * 2. the type stored from `propType`.
702
+ *
703
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
704
+ *
705
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
706
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
707
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
708
+ * ```tsx
709
+ * <my-cmp prop-val={0}></my-cmp>
710
+ * ```
711
+ *
712
+ * HTML prop values on the other hand, will always a string
713
+ *
714
+ * @param propValue the new value to coerce to some type
715
+ * @param propType the type of the prop, expressed as a binary number
716
+ * @returns the parsed/coerced value
717
+ */
718
+ const parsePropertyValue = (propValue, propType) => {
719
+ // ensure this value is of the correct prop type
720
+ if (propValue != null && !isComplexType(propValue)) {
721
+ if (propType & 1 /* String */) {
722
+ // could have been passed as a number or boolean
723
+ // but we still want it as a string
724
+ return String(propValue);
725
+ }
726
+ // redundant return here for better minification
727
+ return propValue;
728
+ }
729
+ // not sure exactly what type we want
730
+ // so no need to change to a different type
731
+ return propValue;
732
+ };
733
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
734
+ const setValue = (ref, propName, newVal, cmpMeta) => {
735
+ // check our new property value against our internal value
736
+ const hostRef = getHostRef(ref);
737
+ const oldVal = hostRef.$instanceValues$.get(propName);
738
+ const flags = hostRef.$flags$;
739
+ const instance = hostRef.$lazyInstance$ ;
740
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
741
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
742
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
743
+ const didValueChange = newVal !== oldVal && !areBothNaN;
744
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
745
+ // gadzooks! the property's value has changed!!
746
+ // set our new value!
747
+ hostRef.$instanceValues$.set(propName, newVal);
748
+ if (instance) {
749
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
750
+ // looks like this value actually changed, so we've got work to do!
751
+ // but only if we've already rendered, otherwise just chill out
752
+ // queue that we need to do an update, but don't worry about queuing
753
+ // up millions cuz this function ensures it only runs once
754
+ scheduleUpdate(hostRef, false);
755
+ }
756
+ }
757
+ }
758
+ };
759
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
760
+ if (cmpMeta.$members$) {
761
+ // It's better to have a const than two Object.entries()
762
+ const members = Object.entries(cmpMeta.$members$);
763
+ const prototype = Cstr.prototype;
764
+ members.map(([memberName, [memberFlags]]) => {
765
+ if ((memberFlags & 31 /* Prop */ ||
766
+ ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
767
+ // proxyComponent - prop
768
+ Object.defineProperty(prototype, memberName, {
769
+ get() {
770
+ // proxyComponent, get value
771
+ return getValue(this, memberName);
772
+ },
773
+ set(newValue) {
774
+ // proxyComponent, set value
775
+ setValue(this, memberName, newValue, cmpMeta);
776
+ },
777
+ configurable: true,
778
+ enumerable: true,
779
+ });
780
+ }
781
+ });
782
+ if ((flags & 1 /* isElementConstructor */)) {
783
+ const attrNameToPropName = new Map();
784
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
785
+ plt.jmp(() => {
786
+ const propName = attrNameToPropName.get(attrName);
787
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
788
+ // in the case where an attribute was set inline.
789
+ // ```html
790
+ // <my-component some-attribute="some-value"></my-component>
791
+ // ```
792
+ //
793
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
794
+ // programmatically changes it before it has been upgraded as shown below:
795
+ //
796
+ // ```html
797
+ // <!-- this component has _not_ been upgraded yet -->
798
+ // <my-component id="test" some-attribute="some-value"></my-component>
799
+ // <script>
800
+ // // grab non-upgraded component
801
+ // el = document.querySelector("#test");
802
+ // el.someAttribute = "another-value";
803
+ // // upgrade component
804
+ // customElements.define('my-component', MyComponent);
805
+ // </script>
806
+ // ```
807
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
808
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
809
+ // to the value that was set inline i.e. "some-value" from above example. When
810
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
811
+ //
812
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
813
+ // by connectedCallback as this attributeChangedCallback will not fire.
814
+ //
815
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
816
+ //
817
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
818
+ // properties here given that this goes against best practices outlined here
819
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
820
+ if (this.hasOwnProperty(propName)) {
821
+ newValue = this[propName];
822
+ delete this[propName];
823
+ }
824
+ else if (prototype.hasOwnProperty(propName) &&
825
+ typeof this[propName] === 'number' &&
826
+ this[propName] == newValue) {
827
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
828
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
829
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
830
+ return;
831
+ }
832
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
833
+ });
834
+ };
835
+ // create an array of attributes to observe
836
+ // and also create a map of html attribute name to js property name
837
+ Cstr.observedAttributes = members
838
+ .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
839
+ .map(([propName, m]) => {
840
+ const attrName = m[1] || propName;
841
+ attrNameToPropName.set(attrName, propName);
842
+ return attrName;
843
+ });
844
+ }
845
+ }
846
+ return Cstr;
847
+ };
848
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
849
+ // initializeComponent
850
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
851
+ {
852
+ // we haven't initialized this element yet
853
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
854
+ // lazy loaded components
855
+ // request the component's implementation to be
856
+ // wired up with the host element
857
+ Cstr = loadModule(cmpMeta);
858
+ if (Cstr.then) {
859
+ // Await creates a micro-task avoid if possible
860
+ const endLoad = uniqueTime();
861
+ Cstr = await Cstr;
862
+ endLoad();
863
+ }
864
+ if (!Cstr.isProxied) {
865
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
866
+ Cstr.isProxied = true;
867
+ }
868
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
869
+ // ok, time to construct the instance
870
+ // but let's keep track of when we start and stop
871
+ // so that the getters/setters don't incorrectly step on data
872
+ {
873
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
874
+ }
875
+ // construct the lazy-loaded component implementation
876
+ // passing the hostRef is very important during
877
+ // construction in order to directly wire together the
878
+ // host element and the lazy-loaded instance
879
+ try {
880
+ new Cstr(hostRef);
881
+ }
882
+ catch (e) {
883
+ consoleError(e);
884
+ }
885
+ {
886
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
887
+ }
888
+ endNewInstance();
889
+ }
890
+ if (Cstr.style) {
891
+ // this component has styles but we haven't registered them yet
892
+ let style = Cstr.style;
893
+ const scopeId = getScopeId(cmpMeta);
894
+ if (!styles.has(scopeId)) {
895
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
896
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
897
+ endRegisterStyles();
898
+ }
899
+ }
900
+ }
901
+ // we've successfully created a lazy instance
902
+ const ancestorComponent = hostRef.$ancestorComponent$;
903
+ const schedule = () => scheduleUpdate(hostRef, true);
904
+ if (ancestorComponent && ancestorComponent['s-rc']) {
905
+ // this is the initial load and this component it has an ancestor component
906
+ // but the ancestor component has NOT fired its will update lifecycle yet
907
+ // so let's just cool our jets and wait for the ancestor to continue first
908
+ // this will get fired off when the ancestor component
909
+ // finally gets around to rendering its lazy self
910
+ // fire off the initial update
911
+ ancestorComponent['s-rc'].push(schedule);
912
+ }
913
+ else {
914
+ schedule();
915
+ }
916
+ };
917
+ const connectedCallback = (elm) => {
918
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
919
+ const hostRef = getHostRef(elm);
920
+ const cmpMeta = hostRef.$cmpMeta$;
921
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
922
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
923
+ // first time this component has connected
924
+ hostRef.$flags$ |= 1 /* hasConnected */;
925
+ {
926
+ // find the first ancestor component (if there is one) and register
927
+ // this component as one of the actively loading child components for its ancestor
928
+ let ancestorComponent = elm;
929
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
930
+ // climb up the ancestors looking for the first
931
+ // component that hasn't finished its lifecycle update yet
932
+ if (ancestorComponent['s-p']) {
933
+ // we found this components first ancestor component
934
+ // keep a reference to this component's ancestor component
935
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
936
+ break;
937
+ }
938
+ }
939
+ }
940
+ // Lazy properties
941
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
942
+ if (cmpMeta.$members$) {
943
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
944
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
945
+ const value = elm[memberName];
946
+ delete elm[memberName];
947
+ elm[memberName] = value;
948
+ }
949
+ });
950
+ }
951
+ {
952
+ initializeComponent(elm, hostRef, cmpMeta);
953
+ }
954
+ }
955
+ endConnected();
956
+ }
957
+ };
958
+ const disconnectedCallback = (elm) => {
959
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
960
+ getHostRef(elm);
961
+ }
962
+ };
963
+ const bootstrapLazy = (lazyBundles, options = {}) => {
964
+ const endBootstrap = createTime();
965
+ const cmpTags = [];
966
+ const exclude = options.exclude || [];
967
+ const customElements = win.customElements;
968
+ const head = doc.head;
969
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
970
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
971
+ const deferredConnectedCallbacks = [];
972
+ let appLoadFallback;
973
+ let isBootstrapping = true;
974
+ Object.assign(plt, options);
975
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
976
+ lazyBundles.map((lazyBundle) => {
977
+ lazyBundle[1].map((compactMeta) => {
978
+ const cmpMeta = {
979
+ $flags$: compactMeta[0],
980
+ $tagName$: compactMeta[1],
981
+ $members$: compactMeta[2],
982
+ $listeners$: compactMeta[3],
983
+ };
984
+ {
985
+ cmpMeta.$members$ = compactMeta[2];
986
+ }
987
+ const tagName = cmpMeta.$tagName$;
988
+ const HostElement = class extends HTMLElement {
989
+ // StencilLazyHost
990
+ constructor(self) {
991
+ // @ts-ignore
992
+ super(self);
993
+ self = this;
994
+ registerHost(self, cmpMeta);
995
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
996
+ // this component is using shadow dom
997
+ // and this browser supports shadow dom
998
+ // add the read-only property "shadowRoot" to the host element
999
+ // adding the shadow root build conditionals to minimize runtime
1000
+ {
1001
+ {
1002
+ self.attachShadow({ mode: 'open' });
1003
+ }
1004
+ }
1005
+ }
1006
+ }
1007
+ connectedCallback() {
1008
+ if (appLoadFallback) {
1009
+ clearTimeout(appLoadFallback);
1010
+ appLoadFallback = null;
1011
+ }
1012
+ if (isBootstrapping) {
1013
+ // connectedCallback will be processed once all components have been registered
1014
+ deferredConnectedCallbacks.push(this);
1015
+ }
1016
+ else {
1017
+ plt.jmp(() => connectedCallback(this));
1018
+ }
1019
+ }
1020
+ disconnectedCallback() {
1021
+ plt.jmp(() => disconnectedCallback(this));
1022
+ }
1023
+ componentOnReady() {
1024
+ return getHostRef(this).$onReadyPromise$;
1025
+ }
1026
+ };
1027
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1028
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1029
+ cmpTags.push(tagName);
1030
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
1031
+ }
1032
+ });
1033
+ });
1034
+ {
1035
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1036
+ visibilityStyle.setAttribute('data-styles', '');
1037
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1038
+ }
1039
+ // Process deferred connectedCallbacks now all components have been registered
1040
+ isBootstrapping = false;
1041
+ if (deferredConnectedCallbacks.length) {
1042
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1043
+ }
1044
+ else {
1045
+ {
1046
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1047
+ }
1048
+ }
1049
+ // Fallback appLoad event
1050
+ endBootstrap();
1051
+ };
1052
+ const hostRefs = new WeakMap();
1053
+ const getHostRef = (ref) => hostRefs.get(ref);
1054
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1055
+ const registerHost = (elm, cmpMeta) => {
1056
+ const hostRef = {
1057
+ $flags$: 0,
1058
+ $hostElement$: elm,
1059
+ $cmpMeta$: cmpMeta,
1060
+ $instanceValues$: new Map(),
1061
+ };
1062
+ {
1063
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1064
+ elm['s-p'] = [];
1065
+ elm['s-rc'] = [];
1066
+ }
1067
+ return hostRefs.set(elm, hostRef);
1068
+ };
1069
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1070
+ const consoleError = (e, el) => (0, console.error)(e, el);
1071
+ const cmpModules = /*@__PURE__*/ new Map();
1072
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1073
+ // loadModuleImport
1074
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1075
+ const bundleId = cmpMeta.$lazyBundleId$;
1076
+ const module = cmpModules.get(bundleId) ;
1077
+ if (module) {
1078
+ return module[exportName];
1079
+ }
1080
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1081
+ /* webpackInclude: /\.entry\.js$/ */
1082
+ /* webpackExclude: /\.system\.entry\.js$/ */
1083
+ /* webpackMode: "lazy" */
1084
+ `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
1085
+ {
1086
+ cmpModules.set(bundleId, importedModule);
1087
+ }
1088
+ return importedModule[exportName];
1089
+ }, consoleError);
1090
+ };
1091
+ const styles = new Map();
1092
+ const queueDomReads = [];
1093
+ const queueDomWrites = [];
1094
+ const queueTask = (queue, write) => (cb) => {
1095
+ queue.push(cb);
1096
+ if (!queuePending) {
1097
+ queuePending = true;
1098
+ if (write && plt.$flags$ & 4 /* queueSync */) {
1099
+ nextTick(flush);
1100
+ }
1101
+ else {
1102
+ plt.raf(flush);
1103
+ }
1104
+ }
1105
+ };
1106
+ const consume = (queue) => {
1107
+ for (let i = 0; i < queue.length; i++) {
1108
+ try {
1109
+ queue[i](performance.now());
1110
+ }
1111
+ catch (e) {
1112
+ consoleError(e);
1113
+ }
1114
+ }
1115
+ queue.length = 0;
1116
+ };
1117
+ const flush = () => {
1118
+ // always force a bunch of medium callbacks to run, but still have
1119
+ // a throttle on how many can run in a certain time
1120
+ // DOM READS!!!
1121
+ consume(queueDomReads);
1122
+ // DOM WRITES!!!
1123
+ {
1124
+ consume(queueDomWrites);
1125
+ if ((queuePending = queueDomReads.length > 0)) {
1126
+ // still more to do yet, but we've run out of time
1127
+ // let's let this thing cool off and try again in the next tick
1128
+ plt.raf(flush);
1129
+ }
1130
+ }
1131
+ };
1132
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1133
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1134
+
1135
+ exports.bootstrapLazy = bootstrapLazy;
1136
+ exports.h = h;
1137
+ exports.promiseResolve = promiseResolve;
1138
+ exports.registerInstance = registerInstance;