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