@biggive/components 202501170933.0.0 → 202501211147.0.0
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.
- package/dist/biggive/biggive.esm.js +1 -1
- package/dist/biggive/biggive.esm.js.map +1 -1
- package/dist/biggive/{p-f3843702.entry.js → p-08caba7b.entry.js} +2 -2
- package/dist/biggive/{p-972e8b70.entry.js → p-130c66ba.entry.js} +2 -2
- package/dist/biggive/{p-4d544ada.entry.js → p-1668ace9.entry.js} +2 -2
- package/dist/biggive/{p-62791aae.entry.js → p-1d9d1fb2.entry.js} +2 -2
- package/dist/biggive/p-22982c55.js +3 -0
- package/dist/biggive/p-22982c55.js.map +1 -0
- package/dist/biggive/{p-8c6c1385.entry.js → p-2baa279c.entry.js} +2 -2
- package/dist/biggive/{p-9f09fec7.entry.js → p-372349f5.entry.js} +2 -2
- package/dist/biggive/{p-f0b40214.entry.js → p-42a8df24.entry.js} +2 -2
- package/dist/biggive/{p-c964fd9f.entry.js → p-4e3802b0.entry.js} +2 -2
- package/dist/biggive/{p-05d6cfa4.entry.js → p-64677357.entry.js} +2 -2
- package/dist/biggive/{p-6684c3f7.entry.js → p-7c0358ab.entry.js} +2 -2
- package/dist/biggive/p-aefad0be.entry.js +2 -0
- package/dist/biggive/{p-257dc505.entry.js → p-c4222c1b.entry.js} +2 -2
- package/dist/biggive/{p-e2d84fe2.entry.js → p-d05e6bf8.entry.js} +2 -2
- package/dist/biggive/{p-f7a53e18.entry.js → p-d7f9d076.entry.js} +2 -2
- package/dist/biggive/{p-6eb68ed6.entry.js → p-f6ee342f.entry.js} +2 -2
- package/dist/biggive/{p-7459c28f.entry.js → p-ff8a3dc2.entry.js} +2 -2
- package/dist/cjs/biggive-accordion_38.cjs.entry.js +1 -1
- package/dist/cjs/biggive-article-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-basic-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-beneficiary-icon.cjs.entry.js +1 -1
- package/dist/cjs/biggive-biography-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-boxed-content.cjs.entry.js +1 -1
- package/dist/cjs/biggive-category-icon.cjs.entry.js +1 -1
- package/dist/cjs/biggive-container-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
- package/dist/cjs/biggive-form.cjs.entry.js +1 -1
- package/dist/cjs/biggive-icon-group.cjs.entry.js +1 -1
- package/dist/cjs/biggive-image-card.cjs.entry.js +1 -1
- package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
- package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
- package/dist/cjs/biggive-table.cjs.entry.js +1 -1
- package/dist/cjs/biggive-video.cjs.entry.js +1 -1
- package/dist/cjs/biggive.cjs.js +2 -2
- package/dist/cjs/biggive.cjs.js.map +1 -1
- package/dist/cjs/{index-e6b3a940.js → index-c57c3e85.js} +1152 -1111
- package/dist/cjs/index-c57c3e85.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/esm/biggive-accordion_38.entry.js +1 -1
- package/dist/esm/biggive-article-card.entry.js +1 -1
- package/dist/esm/biggive-basic-card.entry.js +1 -1
- package/dist/esm/biggive-beneficiary-icon.entry.js +1 -1
- package/dist/esm/biggive-biography-card.entry.js +1 -1
- package/dist/esm/biggive-boxed-content.entry.js +1 -1
- package/dist/esm/biggive-category-icon.entry.js +1 -1
- package/dist/esm/biggive-container-card.entry.js +1 -1
- package/dist/esm/biggive-cookie-banner.entry.js +1 -1
- package/dist/esm/biggive-form.entry.js +1 -1
- package/dist/esm/biggive-icon-group.entry.js +1 -1
- package/dist/esm/biggive-image-card.entry.js +1 -1
- package/dist/esm/biggive-nav-group.entry.js +1 -1
- package/dist/esm/biggive-nav-item.entry.js +1 -1
- package/dist/esm/biggive-table.entry.js +1 -1
- package/dist/esm/biggive-video.entry.js +1 -1
- package/dist/esm/biggive.js +3 -3
- package/dist/esm/biggive.js.map +1 -1
- package/dist/esm/{index-501730c4.js → index-a7be7e08.js} +1152 -1111
- package/dist/esm/index-a7be7e08.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/hydrate/index.js +1016 -984
- package/hydrate/index.mjs +1016 -984
- package/package.json +2 -2
- package/dist/biggive/p-14df7401.entry.js +0 -2
- package/dist/biggive/p-e5a29e75.js +0 -3
- package/dist/biggive/p-e5a29e75.js.map +0 -1
- package/dist/cjs/index-e6b3a940.js.map +0 -1
- package/dist/esm/index-501730c4.js.map +0 -1
- /package/dist/biggive/{p-f3843702.entry.js.map → p-08caba7b.entry.js.map} +0 -0
- /package/dist/biggive/{p-972e8b70.entry.js.map → p-130c66ba.entry.js.map} +0 -0
- /package/dist/biggive/{p-4d544ada.entry.js.map → p-1668ace9.entry.js.map} +0 -0
- /package/dist/biggive/{p-62791aae.entry.js.map → p-1d9d1fb2.entry.js.map} +0 -0
- /package/dist/biggive/{p-8c6c1385.entry.js.map → p-2baa279c.entry.js.map} +0 -0
- /package/dist/biggive/{p-9f09fec7.entry.js.map → p-372349f5.entry.js.map} +0 -0
- /package/dist/biggive/{p-f0b40214.entry.js.map → p-42a8df24.entry.js.map} +0 -0
- /package/dist/biggive/{p-c964fd9f.entry.js.map → p-4e3802b0.entry.js.map} +0 -0
- /package/dist/biggive/{p-05d6cfa4.entry.js.map → p-64677357.entry.js.map} +0 -0
- /package/dist/biggive/{p-6684c3f7.entry.js.map → p-7c0358ab.entry.js.map} +0 -0
- /package/dist/biggive/{p-14df7401.entry.js.map → p-aefad0be.entry.js.map} +0 -0
- /package/dist/biggive/{p-257dc505.entry.js.map → p-c4222c1b.entry.js.map} +0 -0
- /package/dist/biggive/{p-e2d84fe2.entry.js.map → p-d05e6bf8.entry.js.map} +0 -0
- /package/dist/biggive/{p-f7a53e18.entry.js.map → p-d7f9d076.entry.js.map} +0 -0
- /package/dist/biggive/{p-6eb68ed6.entry.js.map → p-f6ee342f.entry.js.map} +0 -0
- /package/dist/biggive/{p-7459c28f.entry.js.map → p-ff8a3dc2.entry.js.map} +0 -0
package/hydrate/index.mjs
CHANGED
|
@@ -127,7 +127,7 @@ const NAMESPACE = 'biggive';
|
|
|
127
127
|
const BUILD = /* biggive */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, 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: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
128
128
|
|
|
129
129
|
/*
|
|
130
|
-
Stencil Hydrate Platform v4.
|
|
130
|
+
Stencil Hydrate Platform v4.24.0 | MIT Licensed | https://stenciljs.com
|
|
131
131
|
*/
|
|
132
132
|
var __defProp = Object.defineProperty;
|
|
133
133
|
var __export = (target, all) => {
|
|
@@ -220,6 +220,8 @@ var DEFAULT_DOC_DATA = {
|
|
|
220
220
|
staticComponents: /* @__PURE__ */ new Set()
|
|
221
221
|
};
|
|
222
222
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
223
|
+
|
|
224
|
+
// src/runtime/slot-polyfill-utils.ts
|
|
223
225
|
var updateFallbackSlotVisibility = (elm) => {
|
|
224
226
|
const childNodes = elm.__childNodes || elm.childNodes;
|
|
225
227
|
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
@@ -240,20 +242,20 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
};
|
|
243
|
-
|
|
245
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
244
246
|
let i2 = 0;
|
|
245
247
|
let slottedNodes = [];
|
|
246
248
|
let childNode;
|
|
247
249
|
for (; i2 < childNodes.length; i2++) {
|
|
248
250
|
childNode = childNodes[i2];
|
|
249
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (
|
|
251
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
250
252
|
slottedNodes.push(childNode);
|
|
251
253
|
if (typeof slotName !== "undefined") return slottedNodes;
|
|
252
254
|
}
|
|
253
255
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
254
256
|
}
|
|
255
257
|
return slottedNodes;
|
|
256
|
-
}
|
|
258
|
+
}
|
|
257
259
|
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
258
260
|
const childNodes = [];
|
|
259
261
|
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
@@ -309,6 +311,20 @@ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
|
309
311
|
newChild["s-ol"] = slottedNodeLocation;
|
|
310
312
|
newChild["s-sh"] = slotNode["s-hn"];
|
|
311
313
|
};
|
|
314
|
+
var createTime = (fnName, tagName = "") => {
|
|
315
|
+
{
|
|
316
|
+
return () => {
|
|
317
|
+
return;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
var uniqueTime = (key, measureText) => {
|
|
322
|
+
{
|
|
323
|
+
return () => {
|
|
324
|
+
return;
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
};
|
|
312
328
|
var h = (nodeName, vnodeData, ...children) => {
|
|
313
329
|
let child = null;
|
|
314
330
|
let key = null;
|
|
@@ -420,1052 +436,1048 @@ var convertToPrivate = (node) => {
|
|
|
420
436
|
vnode.$name$ = node.vname;
|
|
421
437
|
return vnode;
|
|
422
438
|
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
439
|
+
|
|
440
|
+
// src/runtime/client-hydrate.ts
|
|
441
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
442
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
443
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
444
|
+
const childRenderNodes = [];
|
|
445
|
+
const slotNodes = [];
|
|
446
|
+
const slottedNodes = [];
|
|
447
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
448
|
+
const vnode = newVNode(tagName, null);
|
|
449
|
+
vnode.$elm$ = hostElm;
|
|
450
|
+
if (!plt.$orgLocNodes$) {
|
|
451
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
452
|
+
}
|
|
453
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
454
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
455
|
+
hostRef.$vnode$ = clientHydrate(
|
|
456
|
+
vnode,
|
|
457
|
+
childRenderNodes,
|
|
458
|
+
slotNodes,
|
|
459
|
+
shadowRootNodes,
|
|
460
|
+
hostElm,
|
|
461
|
+
hostElm,
|
|
462
|
+
hostId,
|
|
463
|
+
slottedNodes
|
|
464
|
+
);
|
|
465
|
+
let crIndex = 0;
|
|
466
|
+
const crLength = childRenderNodes.length;
|
|
467
|
+
let childRenderNode;
|
|
468
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
469
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
470
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
471
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
472
|
+
const node = childRenderNode.$elm$;
|
|
473
|
+
if (!shadowRoot) {
|
|
474
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
475
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
476
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
452
477
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
478
|
+
}
|
|
479
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
480
|
+
if (childRenderNode.$children$) {
|
|
481
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
482
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
483
|
+
childRenderNode.$children$.forEach((c) => {
|
|
484
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
485
|
+
});
|
|
458
486
|
}
|
|
487
|
+
} else {
|
|
488
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
459
489
|
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
490
|
+
}
|
|
491
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
492
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
493
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
463
494
|
}
|
|
464
|
-
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
} else if (isMemberInElement(win, ln)) {
|
|
468
|
-
memberName = ln.slice(2);
|
|
469
|
-
} else {
|
|
470
|
-
memberName = ln[2] + memberName.slice(3);
|
|
495
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
496
|
+
if (!shadowRoot) {
|
|
497
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
471
498
|
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
499
|
+
}
|
|
500
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
501
|
+
}
|
|
502
|
+
const hosts = [];
|
|
503
|
+
const snLen = slottedNodes.length;
|
|
504
|
+
let snIndex = 0;
|
|
505
|
+
let slotGroup;
|
|
506
|
+
let snGroupIdx;
|
|
507
|
+
let snGroupLen;
|
|
508
|
+
let slottedItem;
|
|
509
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
510
|
+
slotGroup = slottedNodes[snIndex];
|
|
511
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
512
|
+
snGroupLen = slotGroup.length;
|
|
513
|
+
snGroupIdx = 0;
|
|
514
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
515
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
516
|
+
if (!hosts[slottedItem.hostId]) {
|
|
517
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
481
518
|
}
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
if (
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
491
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
492
|
-
elm[memberName] = n;
|
|
493
|
-
} else {
|
|
494
|
-
elm.setAttribute(memberName, n);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
} else {
|
|
498
|
-
elm[memberName] = newValue;
|
|
499
|
-
}
|
|
500
|
-
} catch (e) {
|
|
519
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
520
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
521
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
522
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
523
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
524
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
525
|
+
} else {
|
|
526
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
501
527
|
}
|
|
528
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
502
529
|
}
|
|
503
|
-
if (
|
|
504
|
-
|
|
505
|
-
{
|
|
506
|
-
elm.removeAttribute(memberName);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
510
|
-
newValue = newValue === true ? "" : newValue;
|
|
511
|
-
{
|
|
512
|
-
elm.setAttribute(memberName, newValue);
|
|
513
|
-
}
|
|
530
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
531
|
+
hostEle.appendChild(slottedItem.node);
|
|
514
532
|
}
|
|
515
533
|
}
|
|
516
534
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
}
|
|
523
|
-
if (!value) {
|
|
524
|
-
return [];
|
|
525
|
-
}
|
|
526
|
-
return value.split(parseClassListRegex);
|
|
527
|
-
};
|
|
528
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
529
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
530
|
-
|
|
531
|
-
// src/runtime/vdom/update-element.ts
|
|
532
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
533
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
534
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
535
|
-
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
536
|
-
{
|
|
537
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
538
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
539
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
540
|
-
}
|
|
535
|
+
if (shadowRoot) {
|
|
536
|
+
let rnIdex = 0;
|
|
537
|
+
const rnLen = shadowRootNodes.length;
|
|
538
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
539
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
541
540
|
}
|
|
541
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
542
|
+
if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
|
|
543
|
+
node.parentNode.removeChild(node);
|
|
544
|
+
}
|
|
545
|
+
});
|
|
542
546
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
547
|
+
hostRef.$hostElement$ = hostElm;
|
|
548
|
+
endHydrate();
|
|
546
549
|
};
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}
|
|
599
|
-
{
|
|
600
|
-
updateElement(null, newVNode2, isSvgMode);
|
|
601
|
-
}
|
|
602
|
-
if (newVNode2.$children$) {
|
|
603
|
-
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
604
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
605
|
-
if (childNode) {
|
|
606
|
-
elm.appendChild(childNode);
|
|
550
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
551
|
+
let childNodeType;
|
|
552
|
+
let childIdSplt;
|
|
553
|
+
let childVNode;
|
|
554
|
+
let i2;
|
|
555
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
556
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
557
|
+
if (childNodeType) {
|
|
558
|
+
childIdSplt = childNodeType.split(".");
|
|
559
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
560
|
+
childVNode = createSimpleVNode({
|
|
561
|
+
$flags$: 0,
|
|
562
|
+
$hostId$: childIdSplt[0],
|
|
563
|
+
$nodeId$: childIdSplt[1],
|
|
564
|
+
$depth$: childIdSplt[2],
|
|
565
|
+
$index$: childIdSplt[3],
|
|
566
|
+
$tag$: node.tagName.toLowerCase(),
|
|
567
|
+
$elm$: node,
|
|
568
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
569
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
570
|
+
$attrs$: { class: node.className || "" }
|
|
571
|
+
});
|
|
572
|
+
childRenderNodes.push(childVNode);
|
|
573
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
574
|
+
if (!parentVNode.$children$) {
|
|
575
|
+
parentVNode.$children$ = [];
|
|
576
|
+
}
|
|
577
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
578
|
+
if (typeof slotName === "string") {
|
|
579
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
580
|
+
addSlot(
|
|
581
|
+
slotName,
|
|
582
|
+
childIdSplt[2],
|
|
583
|
+
childVNode,
|
|
584
|
+
node,
|
|
585
|
+
parentVNode,
|
|
586
|
+
childRenderNodes,
|
|
587
|
+
slotNodes,
|
|
588
|
+
shadowRootNodes,
|
|
589
|
+
slottedNodes
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
593
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
594
|
+
}
|
|
595
|
+
if (childVNode.$index$ !== void 0) {
|
|
596
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
597
|
+
}
|
|
598
|
+
parentVNode = childVNode;
|
|
599
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
600
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
607
601
|
}
|
|
608
602
|
}
|
|
609
603
|
}
|
|
610
|
-
{
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
604
|
+
if (node.shadowRoot) {
|
|
605
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
606
|
+
clientHydrate(
|
|
607
|
+
parentVNode,
|
|
608
|
+
childRenderNodes,
|
|
609
|
+
slotNodes,
|
|
610
|
+
shadowRootNodes,
|
|
611
|
+
hostElm,
|
|
612
|
+
node.shadowRoot.childNodes[i2],
|
|
613
|
+
hostId,
|
|
614
|
+
slottedNodes
|
|
615
|
+
);
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
618
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
619
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
620
|
+
clientHydrate(
|
|
621
|
+
parentVNode,
|
|
622
|
+
childRenderNodes,
|
|
623
|
+
slotNodes,
|
|
624
|
+
shadowRootNodes,
|
|
625
|
+
hostElm,
|
|
626
|
+
nonShadowNodes[i2],
|
|
627
|
+
hostId,
|
|
628
|
+
slottedNodes
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
632
|
+
childIdSplt = node.nodeValue.split(".");
|
|
633
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
634
|
+
childNodeType = childIdSplt[0];
|
|
635
|
+
childVNode = createSimpleVNode({
|
|
636
|
+
$hostId$: childIdSplt[1],
|
|
637
|
+
$nodeId$: childIdSplt[2],
|
|
638
|
+
$depth$: childIdSplt[3],
|
|
639
|
+
$index$: childIdSplt[4] || "0",
|
|
640
|
+
$elm$: node,
|
|
641
|
+
$attrs$: null,
|
|
642
|
+
$children$: null,
|
|
643
|
+
$key$: null,
|
|
644
|
+
$name$: null,
|
|
645
|
+
$tag$: null,
|
|
646
|
+
$text$: null
|
|
647
|
+
});
|
|
648
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
649
|
+
childVNode.$elm$ = node.nextSibling;
|
|
650
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
651
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
652
|
+
childRenderNodes.push(childVNode);
|
|
653
|
+
node.remove();
|
|
654
|
+
if (hostId === childVNode.$hostId$) {
|
|
655
|
+
if (!parentVNode.$children$) {
|
|
656
|
+
parentVNode.$children$ = [];
|
|
657
|
+
}
|
|
658
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
659
|
+
}
|
|
660
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
661
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
665
|
+
childVNode.$elm$ = node.nextSibling;
|
|
666
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
667
|
+
childRenderNodes.push(childVNode);
|
|
668
|
+
node.remove();
|
|
669
|
+
}
|
|
670
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
671
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
672
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
673
|
+
addSlot(
|
|
674
|
+
slotName,
|
|
675
|
+
childIdSplt[2],
|
|
676
|
+
childVNode,
|
|
677
|
+
node,
|
|
678
|
+
parentVNode,
|
|
679
|
+
childRenderNodes,
|
|
680
|
+
slotNodes,
|
|
681
|
+
shadowRootNodes,
|
|
682
|
+
slottedNodes
|
|
683
|
+
);
|
|
684
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
685
|
+
if (shadowRootNodes) {
|
|
686
|
+
node.remove();
|
|
687
|
+
} else {
|
|
688
|
+
hostElm["s-cr"] = node;
|
|
689
|
+
node["s-cn"] = true;
|
|
690
|
+
}
|
|
629
691
|
}
|
|
630
692
|
}
|
|
631
693
|
}
|
|
694
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
695
|
+
const vnode = newVNode(null, node.textContent);
|
|
696
|
+
vnode.$elm$ = node;
|
|
697
|
+
vnode.$index$ = "0";
|
|
698
|
+
parentVNode.$children$ = [vnode];
|
|
632
699
|
}
|
|
633
|
-
return
|
|
700
|
+
return parentVNode;
|
|
634
701
|
};
|
|
635
|
-
var
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
while (node = node.nextSibling) {
|
|
641
|
-
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
642
|
-
oldSlotChildNodes.push(node);
|
|
643
|
-
}
|
|
702
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
703
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
704
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
705
|
+
if (componentId) {
|
|
706
|
+
orgLocNodes.set(componentId, node);
|
|
644
707
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
childNode["s-ol"].remove();
|
|
651
|
-
childNode["s-ol"] = void 0;
|
|
652
|
-
childNode["s-sh"] = void 0;
|
|
653
|
-
checkSlotRelocate = true;
|
|
708
|
+
let i2 = 0;
|
|
709
|
+
if (node.shadowRoot) {
|
|
710
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
711
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
712
|
+
}
|
|
654
713
|
}
|
|
655
|
-
|
|
656
|
-
|
|
714
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
715
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
716
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
657
717
|
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
665
|
-
containerElm = containerElm.shadowRoot;
|
|
666
|
-
}
|
|
667
|
-
for (; startIdx <= endIdx; ++startIdx) {
|
|
668
|
-
if (vnodes[startIdx]) {
|
|
669
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
670
|
-
if (childNode) {
|
|
671
|
-
vnodes[startIdx].$elm$ = childNode;
|
|
672
|
-
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
673
|
-
}
|
|
718
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
719
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
720
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
721
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
722
|
+
node.nodeValue = "";
|
|
723
|
+
node["s-en"] = childIdSplt[3];
|
|
674
724
|
}
|
|
675
725
|
}
|
|
676
726
|
};
|
|
677
|
-
var
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
727
|
+
var createSimpleVNode = (vnode) => {
|
|
728
|
+
const defaultVNode = {
|
|
729
|
+
$flags$: 0,
|
|
730
|
+
$hostId$: null,
|
|
731
|
+
$nodeId$: null,
|
|
732
|
+
$depth$: null,
|
|
733
|
+
$index$: "0",
|
|
734
|
+
$elm$: null,
|
|
735
|
+
$attrs$: null,
|
|
736
|
+
$children$: null,
|
|
737
|
+
$key$: null,
|
|
738
|
+
$name$: null,
|
|
739
|
+
$tag$: null,
|
|
740
|
+
$text$: null
|
|
741
|
+
};
|
|
742
|
+
return { ...defaultVNode, ...vnode };
|
|
696
743
|
};
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
let elmToMove;
|
|
710
|
-
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
711
|
-
if (oldStartVnode == null) {
|
|
712
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
713
|
-
} else if (oldEndVnode == null) {
|
|
714
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
715
|
-
} else if (newStartVnode == null) {
|
|
716
|
-
newStartVnode = newCh[++newStartIdx];
|
|
717
|
-
} else if (newEndVnode == null) {
|
|
718
|
-
newEndVnode = newCh[--newEndIdx];
|
|
719
|
-
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
720
|
-
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
721
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
722
|
-
newStartVnode = newCh[++newStartIdx];
|
|
723
|
-
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
724
|
-
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
725
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
726
|
-
newEndVnode = newCh[--newEndIdx];
|
|
727
|
-
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
728
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
729
|
-
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
730
|
-
}
|
|
731
|
-
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
732
|
-
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
733
|
-
oldStartVnode = oldCh[++oldStartIdx];
|
|
734
|
-
newEndVnode = newCh[--newEndIdx];
|
|
735
|
-
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
736
|
-
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
737
|
-
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
738
|
-
}
|
|
739
|
-
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
740
|
-
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
741
|
-
oldEndVnode = oldCh[--oldEndIdx];
|
|
742
|
-
newStartVnode = newCh[++newStartIdx];
|
|
744
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
745
|
+
node["s-sr"] = true;
|
|
746
|
+
childVNode.$name$ = slotName || null;
|
|
747
|
+
childVNode.$tag$ = "slot";
|
|
748
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
749
|
+
if (shadowRootNodes) {
|
|
750
|
+
const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
751
|
+
if (childVNode.$name$) {
|
|
752
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
753
|
+
}
|
|
754
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
755
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
743
756
|
} else {
|
|
744
|
-
|
|
745
|
-
{
|
|
746
|
-
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
747
|
-
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
748
|
-
idxInOld = i2;
|
|
749
|
-
break;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
if (idxInOld >= 0) {
|
|
754
|
-
elmToMove = oldCh[idxInOld];
|
|
755
|
-
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
756
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
757
|
-
} else {
|
|
758
|
-
patch(elmToMove, newStartVnode, isInitialRender);
|
|
759
|
-
oldCh[idxInOld] = void 0;
|
|
760
|
-
node = elmToMove.$elm$;
|
|
761
|
-
}
|
|
762
|
-
newStartVnode = newCh[++newStartIdx];
|
|
763
|
-
} else {
|
|
764
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
765
|
-
newStartVnode = newCh[++newStartIdx];
|
|
766
|
-
}
|
|
767
|
-
if (node) {
|
|
768
|
-
{
|
|
769
|
-
insertBefore(
|
|
770
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
771
|
-
node,
|
|
772
|
-
referenceNode(oldStartVnode.$elm$)
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
757
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
776
758
|
}
|
|
759
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
760
|
+
node.remove();
|
|
761
|
+
if (childVNode.$depth$ === "0") {
|
|
762
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
763
|
+
}
|
|
764
|
+
} else {
|
|
765
|
+
const slot = childVNode.$elm$;
|
|
766
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
767
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
768
|
+
if (shouldMove) {
|
|
769
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
770
|
+
}
|
|
771
|
+
childRenderNodes.push(childVNode);
|
|
777
772
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
773
|
+
slotNodes.push(childVNode);
|
|
774
|
+
if (!parentVNode.$children$) {
|
|
775
|
+
parentVNode.$children$ = [];
|
|
776
|
+
}
|
|
777
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
778
|
+
}
|
|
779
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
780
|
+
let slottedNode = slotNode.nextSibling;
|
|
781
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
782
|
+
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
783
|
+
slottedNode["s-sn"] = slotName;
|
|
784
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
785
|
+
slottedNode = slottedNode.nextSibling;
|
|
789
786
|
}
|
|
790
787
|
};
|
|
791
|
-
var
|
|
792
|
-
if (
|
|
793
|
-
if (
|
|
794
|
-
return
|
|
788
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
789
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
790
|
+
if (propType & 4 /* Boolean */) {
|
|
791
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
795
792
|
}
|
|
796
|
-
if (
|
|
797
|
-
return
|
|
793
|
+
if (propType & 2 /* Number */) {
|
|
794
|
+
return parseFloat(propValue);
|
|
798
795
|
}
|
|
799
|
-
if (
|
|
800
|
-
|
|
796
|
+
if (propType & 1 /* String */) {
|
|
797
|
+
return String(propValue);
|
|
801
798
|
}
|
|
802
|
-
return
|
|
799
|
+
return propValue;
|
|
803
800
|
}
|
|
804
|
-
return
|
|
801
|
+
return propValue;
|
|
805
802
|
};
|
|
806
|
-
var
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
803
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
804
|
+
|
|
805
|
+
// src/runtime/event-emitter.ts
|
|
806
|
+
var createEvent = (ref, name, flags) => {
|
|
807
|
+
const elm = getElement(ref);
|
|
808
|
+
return {
|
|
809
|
+
emit: (detail) => {
|
|
810
|
+
return emitEvent(elm, name, {
|
|
811
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
812
|
+
composed: !!(flags & 2 /* Composed */),
|
|
813
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
814
|
+
detail
|
|
815
|
+
});
|
|
817
816
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
var emitEvent = (elm, name, opts) => {
|
|
820
|
+
const ev = plt.ce(name, opts);
|
|
821
|
+
elm.dispatchEvent(ev);
|
|
822
|
+
return ev;
|
|
823
|
+
};
|
|
824
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
825
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
826
|
+
let style = styles.get(scopeId2);
|
|
827
|
+
{
|
|
828
|
+
style = cssText;
|
|
829
|
+
}
|
|
830
|
+
styles.set(scopeId2, style);
|
|
831
|
+
};
|
|
832
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
833
|
+
var _a;
|
|
834
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
835
|
+
const style = styles.get(scopeId2);
|
|
836
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
837
|
+
if (style) {
|
|
838
|
+
if (typeof style === "string") {
|
|
839
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
840
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
841
|
+
let styleElm;
|
|
842
|
+
if (!appliedStyles) {
|
|
843
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
821
844
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
845
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
846
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
847
|
+
styleElm.innerHTML = style;
|
|
848
|
+
} else {
|
|
849
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
850
|
+
styleElm.innerHTML = style;
|
|
851
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
852
|
+
if (nonce != null) {
|
|
853
|
+
styleElm.setAttribute("nonce", nonce);
|
|
854
|
+
}
|
|
855
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
856
|
+
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
857
|
+
}
|
|
858
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
859
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
860
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
861
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
862
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
863
|
+
} else if ("host" in styleContainerNode) {
|
|
864
|
+
{
|
|
865
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
866
|
+
if (existingStyleContainer) {
|
|
867
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
868
|
+
} else {
|
|
869
|
+
styleContainerNode.prepend(styleElm);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
} else {
|
|
873
|
+
styleContainerNode.append(styleElm);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
877
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
881
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
882
|
+
}
|
|
883
|
+
if (appliedStyles) {
|
|
884
|
+
appliedStyles.add(scopeId2);
|
|
885
|
+
}
|
|
828
886
|
}
|
|
829
|
-
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
830
|
-
} else if (
|
|
831
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
832
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
833
|
-
) {
|
|
834
|
-
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
835
887
|
}
|
|
836
|
-
if (isSvgMode && tag === "svg") {
|
|
837
|
-
isSvgMode = false;
|
|
838
|
-
}
|
|
839
|
-
} else if ((defaultHolder = elm["s-cr"])) {
|
|
840
|
-
defaultHolder.parentNode.textContent = text;
|
|
841
|
-
} else if (oldVNode.$text$ !== text) {
|
|
842
|
-
elm.data = text;
|
|
843
888
|
}
|
|
889
|
+
return scopeId2;
|
|
844
890
|
};
|
|
845
|
-
var
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
891
|
+
var attachStyles = (hostRef) => {
|
|
892
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
893
|
+
const elm = hostRef.$hostElement$;
|
|
894
|
+
const flags = cmpMeta.$flags$;
|
|
895
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
896
|
+
const scopeId2 = addStyle(
|
|
897
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
898
|
+
cmpMeta);
|
|
899
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
900
|
+
elm["s-sc"] = scopeId2;
|
|
901
|
+
elm.classList.add(scopeId2 + "-h");
|
|
902
|
+
}
|
|
903
|
+
endAttachStyles();
|
|
904
|
+
};
|
|
905
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
906
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
907
|
+
if (oldValue !== newValue) {
|
|
908
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
909
|
+
let ln = memberName.toLowerCase();
|
|
910
|
+
if (memberName === "class") {
|
|
911
|
+
const classList = elm.classList;
|
|
912
|
+
const oldClasses = parseClassList(oldValue);
|
|
913
|
+
let newClasses = parseClassList(newValue);
|
|
914
|
+
if (elm["s-si"]) {
|
|
915
|
+
newClasses.push(elm["s-si"]);
|
|
916
|
+
oldClasses.forEach((c) => {
|
|
917
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
918
|
+
});
|
|
919
|
+
newClasses = [...new Set(newClasses)];
|
|
920
|
+
classList.add(...newClasses);
|
|
921
|
+
delete elm["s-si"];
|
|
922
|
+
} else {
|
|
923
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
924
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
925
|
+
}
|
|
926
|
+
} else if (memberName === "style") {
|
|
927
|
+
{
|
|
928
|
+
for (const prop in oldValue) {
|
|
929
|
+
if (!newValue || newValue[prop] == null) {
|
|
930
|
+
{
|
|
931
|
+
elm.style[prop] = "";
|
|
881
932
|
}
|
|
882
|
-
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
883
|
-
relocateNodes.push({
|
|
884
|
-
$nodeToRelocate$: node
|
|
885
|
-
});
|
|
886
933
|
}
|
|
887
934
|
}
|
|
888
935
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}
|
|
895
|
-
var nullifyVNodeRefs = (vNode) => {
|
|
896
|
-
{
|
|
897
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
898
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
899
|
-
}
|
|
900
|
-
};
|
|
901
|
-
var insertBefore = (parent, newNode, reference) => {
|
|
902
|
-
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
903
|
-
return inserted;
|
|
904
|
-
};
|
|
905
|
-
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
906
|
-
var _c, _d;
|
|
907
|
-
const hostElm = hostRef.$hostElement$;
|
|
908
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
909
|
-
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
910
|
-
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
911
|
-
hostTagName = hostElm.tagName;
|
|
912
|
-
if (isInitialLoad && rootVnode.$attrs$) {
|
|
913
|
-
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
914
|
-
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
915
|
-
rootVnode.$attrs$[key] = hostElm[key];
|
|
936
|
+
for (const prop in newValue) {
|
|
937
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
938
|
+
{
|
|
939
|
+
elm.style[prop] = newValue[prop];
|
|
940
|
+
}
|
|
941
|
+
}
|
|
916
942
|
}
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
if (
|
|
936
|
-
|
|
937
|
-
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
938
|
-
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
943
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
944
|
+
if (newValue) {
|
|
945
|
+
newValue(elm);
|
|
946
|
+
}
|
|
947
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
948
|
+
if (memberName[2] === "-") {
|
|
949
|
+
memberName = memberName.slice(3);
|
|
950
|
+
} else if (isMemberInElement(win, ln)) {
|
|
951
|
+
memberName = ln.slice(2);
|
|
952
|
+
} else {
|
|
953
|
+
memberName = ln[2] + memberName.slice(3);
|
|
954
|
+
}
|
|
955
|
+
if (oldValue || newValue) {
|
|
956
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
957
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
958
|
+
if (oldValue) {
|
|
959
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
960
|
+
}
|
|
961
|
+
if (newValue) {
|
|
962
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
939
963
|
}
|
|
940
964
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
965
|
+
} else {
|
|
966
|
+
const isComplex = isComplexType(newValue);
|
|
967
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
968
|
+
try {
|
|
969
|
+
if (!elm.tagName.includes("-")) {
|
|
970
|
+
const n = newValue == null ? "" : newValue;
|
|
971
|
+
if (memberName === "list") {
|
|
972
|
+
isProp = false;
|
|
973
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
974
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
975
|
+
elm[memberName] = n;
|
|
976
|
+
} else {
|
|
977
|
+
elm.setAttribute(memberName, n);
|
|
955
978
|
}
|
|
956
979
|
}
|
|
980
|
+
} else if (elm[memberName] !== newValue) {
|
|
981
|
+
elm[memberName] = newValue;
|
|
957
982
|
}
|
|
958
|
-
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
983
|
+
} catch (e) {
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
if (newValue == null || newValue === false) {
|
|
987
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
988
|
+
{
|
|
989
|
+
elm.removeAttribute(memberName);
|
|
965
990
|
}
|
|
966
991
|
}
|
|
992
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
993
|
+
newValue = newValue === true ? "" : newValue;
|
|
994
|
+
{
|
|
995
|
+
elm.setAttribute(memberName, newValue);
|
|
996
|
+
}
|
|
967
997
|
}
|
|
968
998
|
}
|
|
969
|
-
if (checkSlotFallbackVisibility) {
|
|
970
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
971
|
-
}
|
|
972
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
973
|
-
relocateNodes.length = 0;
|
|
974
999
|
}
|
|
975
|
-
contentRef = void 0;
|
|
976
1000
|
};
|
|
977
|
-
var
|
|
978
|
-
|
|
979
|
-
)
|
|
980
|
-
|
|
981
|
-
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
982
|
-
);
|
|
983
|
-
var createTime = (fnName, tagName = "") => {
|
|
984
|
-
{
|
|
985
|
-
return () => {
|
|
986
|
-
return;
|
|
987
|
-
};
|
|
1001
|
+
var parseClassListRegex = /\s/;
|
|
1002
|
+
var parseClassList = (value) => {
|
|
1003
|
+
if (typeof value === "object" && "baseVal" in value) {
|
|
1004
|
+
value = value.baseVal;
|
|
988
1005
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
{
|
|
992
|
-
return () => {
|
|
993
|
-
return;
|
|
994
|
-
};
|
|
1006
|
+
if (!value) {
|
|
1007
|
+
return [];
|
|
995
1008
|
}
|
|
1009
|
+
return value.split(parseClassListRegex);
|
|
996
1010
|
};
|
|
1011
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
1012
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
997
1013
|
|
|
998
|
-
// src/runtime/
|
|
999
|
-
var
|
|
1000
|
-
const
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1014
|
+
// src/runtime/vdom/update-element.ts
|
|
1015
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1016
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
1017
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1018
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
1019
|
+
{
|
|
1020
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
1021
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
1022
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1010
1025
|
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1026
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
1027
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
1028
|
+
}
|
|
1029
|
+
};
|
|
1030
|
+
function sortedAttrNames(attrNames) {
|
|
1031
|
+
return attrNames.includes("ref") ? (
|
|
1032
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
1033
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
1034
|
+
) : (
|
|
1035
|
+
// no need to sort, return the original array
|
|
1036
|
+
attrNames
|
|
1022
1037
|
);
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1038
|
+
}
|
|
1039
|
+
var contentRef;
|
|
1040
|
+
var hostTagName;
|
|
1041
|
+
var useNativeShadowDom = false;
|
|
1042
|
+
var checkSlotFallbackVisibility = false;
|
|
1043
|
+
var checkSlotRelocate = false;
|
|
1044
|
+
var isSvgMode = false;
|
|
1045
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1046
|
+
var _a;
|
|
1047
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
1048
|
+
let i2 = 0;
|
|
1049
|
+
let elm;
|
|
1050
|
+
let childNode;
|
|
1051
|
+
let oldVNode;
|
|
1052
|
+
if (!useNativeShadowDom) {
|
|
1053
|
+
checkSlotRelocate = true;
|
|
1054
|
+
if (newVNode2.$tag$ === "slot") {
|
|
1055
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
1056
|
+
// slot element has fallback content
|
|
1057
|
+
// still create an element that "mocks" the slot element
|
|
1058
|
+
2 /* isSlotFallback */
|
|
1059
|
+
) : (
|
|
1060
|
+
// slot element does not have fallback content
|
|
1061
|
+
// create an html comment we'll use to always reference
|
|
1062
|
+
// where actual slot content should sit next to
|
|
1063
|
+
1 /* isSlotReference */
|
|
1064
|
+
);
|
|
1036
1065
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1066
|
+
}
|
|
1067
|
+
if (newVNode2.$text$ !== null) {
|
|
1068
|
+
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
1069
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1070
|
+
elm = newVNode2.$elm$ = slotReferenceDebugNode(newVNode2) ;
|
|
1071
|
+
} else {
|
|
1072
|
+
if (!isSvgMode) {
|
|
1073
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
1074
|
+
}
|
|
1075
|
+
elm = newVNode2.$elm$ = doc.createElementNS(
|
|
1076
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
1077
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
1078
|
+
) ;
|
|
1079
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
1080
|
+
isSvgMode = false;
|
|
1081
|
+
}
|
|
1082
|
+
{
|
|
1083
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1084
|
+
}
|
|
1085
|
+
if (newVNode2.$children$) {
|
|
1086
|
+
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1087
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1088
|
+
if (childNode) {
|
|
1089
|
+
elm.appendChild(childNode);
|
|
1044
1090
|
}
|
|
1045
|
-
} else {
|
|
1046
|
-
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1047
1091
|
}
|
|
1048
1092
|
}
|
|
1049
|
-
|
|
1050
|
-
if (
|
|
1051
|
-
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
if (!shadowRoot) {
|
|
1055
|
-
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1093
|
+
{
|
|
1094
|
+
if (newVNode2.$tag$ === "svg") {
|
|
1095
|
+
isSvgMode = false;
|
|
1096
|
+
} else if (elm.tagName === "foreignObject") {
|
|
1097
|
+
isSvgMode = true;
|
|
1056
1098
|
}
|
|
1057
1099
|
}
|
|
1058
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1059
1100
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
snGroupIdx = 0;
|
|
1072
|
-
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1073
|
-
slottedItem = slotGroup[snGroupIdx];
|
|
1074
|
-
if (!hosts[slottedItem.hostId]) {
|
|
1075
|
-
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1076
|
-
}
|
|
1077
|
-
if (!hosts[slottedItem.hostId]) continue;
|
|
1078
|
-
const hostEle = hosts[slottedItem.hostId];
|
|
1079
|
-
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1080
|
-
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1081
|
-
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1082
|
-
slottedItem.slot["s-cr"] = hostEle;
|
|
1083
|
-
} else {
|
|
1084
|
-
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1101
|
+
elm["s-hn"] = hostTagName;
|
|
1102
|
+
{
|
|
1103
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
1104
|
+
elm["s-sr"] = true;
|
|
1105
|
+
elm["s-cr"] = contentRef;
|
|
1106
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
1107
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1108
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
1109
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
1110
|
+
{
|
|
1111
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
1085
1112
|
}
|
|
1086
|
-
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1087
1113
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
return elm;
|
|
1117
|
+
};
|
|
1118
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
1119
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1120
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1121
|
+
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
1122
|
+
let node = parentElm;
|
|
1123
|
+
while (node = node.nextSibling) {
|
|
1124
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1125
|
+
oldSlotChildNodes.push(node);
|
|
1090
1126
|
}
|
|
1091
1127
|
}
|
|
1092
1128
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1129
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
1130
|
+
const childNode = oldSlotChildNodes[i2];
|
|
1131
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
1132
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
1133
|
+
childNode["s-ol"].remove();
|
|
1134
|
+
childNode["s-ol"] = void 0;
|
|
1135
|
+
childNode["s-sh"] = void 0;
|
|
1136
|
+
checkSlotRelocate = true;
|
|
1137
|
+
}
|
|
1138
|
+
if (recursive) {
|
|
1139
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
1098
1140
|
}
|
|
1099
|
-
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1100
|
-
if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
|
|
1101
|
-
node.parentNode.removeChild(node);
|
|
1102
|
-
}
|
|
1103
|
-
});
|
|
1104
1141
|
}
|
|
1105
|
-
|
|
1106
|
-
endHydrate();
|
|
1142
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1107
1143
|
};
|
|
1108
|
-
var
|
|
1109
|
-
let
|
|
1110
|
-
let
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1117
|
-
if (
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
$hostId$: childIdSplt[0],
|
|
1121
|
-
$nodeId$: childIdSplt[1],
|
|
1122
|
-
$depth$: childIdSplt[2],
|
|
1123
|
-
$index$: childIdSplt[3],
|
|
1124
|
-
$tag$: node.tagName.toLowerCase(),
|
|
1125
|
-
$elm$: node,
|
|
1126
|
-
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1127
|
-
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1128
|
-
$attrs$: { class: node.className || "" }
|
|
1129
|
-
});
|
|
1130
|
-
childRenderNodes.push(childVNode);
|
|
1131
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
1132
|
-
if (!parentVNode.$children$) {
|
|
1133
|
-
parentVNode.$children$ = [];
|
|
1134
|
-
}
|
|
1135
|
-
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1136
|
-
if (typeof slotName === "string") {
|
|
1137
|
-
if (childVNode.$tag$ === "slot-fb") {
|
|
1138
|
-
addSlot(
|
|
1139
|
-
slotName,
|
|
1140
|
-
childIdSplt[2],
|
|
1141
|
-
childVNode,
|
|
1142
|
-
node,
|
|
1143
|
-
parentVNode,
|
|
1144
|
-
childRenderNodes,
|
|
1145
|
-
slotNodes,
|
|
1146
|
-
shadowRootNodes,
|
|
1147
|
-
slottedNodes
|
|
1148
|
-
);
|
|
1149
|
-
}
|
|
1150
|
-
childVNode.$elm$["s-sn"] = slotName;
|
|
1151
|
-
childVNode.$elm$.removeAttribute("s-sn");
|
|
1152
|
-
}
|
|
1153
|
-
if (childVNode.$index$ !== void 0) {
|
|
1154
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1155
|
-
}
|
|
1156
|
-
parentVNode = childVNode;
|
|
1157
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1158
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
if (node.shadowRoot) {
|
|
1163
|
-
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1164
|
-
clientHydrate(
|
|
1165
|
-
parentVNode,
|
|
1166
|
-
childRenderNodes,
|
|
1167
|
-
slotNodes,
|
|
1168
|
-
shadowRootNodes,
|
|
1169
|
-
hostElm,
|
|
1170
|
-
node.shadowRoot.childNodes[i2],
|
|
1171
|
-
hostId,
|
|
1172
|
-
slottedNodes
|
|
1173
|
-
);
|
|
1144
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1145
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
1146
|
+
let childNode;
|
|
1147
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
1148
|
+
containerElm = containerElm.shadowRoot;
|
|
1149
|
+
}
|
|
1150
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
|
1151
|
+
if (vnodes[startIdx]) {
|
|
1152
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
1153
|
+
if (childNode) {
|
|
1154
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
1155
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
1174
1156
|
}
|
|
1175
1157
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1192
|
-
childNodeType = childIdSplt[0];
|
|
1193
|
-
childVNode = createSimpleVNode({
|
|
1194
|
-
$hostId$: childIdSplt[1],
|
|
1195
|
-
$nodeId$: childIdSplt[2],
|
|
1196
|
-
$depth$: childIdSplt[3],
|
|
1197
|
-
$index$: childIdSplt[4] || "0",
|
|
1198
|
-
$elm$: node,
|
|
1199
|
-
$attrs$: null,
|
|
1200
|
-
$children$: null,
|
|
1201
|
-
$key$: null,
|
|
1202
|
-
$name$: null,
|
|
1203
|
-
$tag$: null,
|
|
1204
|
-
$text$: null
|
|
1205
|
-
});
|
|
1206
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
1207
|
-
childVNode.$elm$ = node.nextSibling;
|
|
1208
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1209
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1210
|
-
childRenderNodes.push(childVNode);
|
|
1211
|
-
node.remove();
|
|
1212
|
-
if (hostId === childVNode.$hostId$) {
|
|
1213
|
-
if (!parentVNode.$children$) {
|
|
1214
|
-
parentVNode.$children$ = [];
|
|
1215
|
-
}
|
|
1216
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1160
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
1161
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
1162
|
+
const vnode = vnodes[index];
|
|
1163
|
+
if (vnode) {
|
|
1164
|
+
const elm = vnode.$elm$;
|
|
1165
|
+
nullifyVNodeRefs(vnode);
|
|
1166
|
+
if (elm) {
|
|
1167
|
+
{
|
|
1168
|
+
checkSlotFallbackVisibility = true;
|
|
1169
|
+
if (elm["s-ol"]) {
|
|
1170
|
+
elm["s-ol"].remove();
|
|
1171
|
+
} else {
|
|
1172
|
+
putBackInOriginalLocation(elm, true);
|
|
1217
1173
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1174
|
+
}
|
|
1175
|
+
elm.remove();
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
1181
|
+
let oldStartIdx = 0;
|
|
1182
|
+
let newStartIdx = 0;
|
|
1183
|
+
let idxInOld = 0;
|
|
1184
|
+
let i2 = 0;
|
|
1185
|
+
let oldEndIdx = oldCh.length - 1;
|
|
1186
|
+
let oldStartVnode = oldCh[0];
|
|
1187
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
1188
|
+
let newEndIdx = newCh.length - 1;
|
|
1189
|
+
let newStartVnode = newCh[0];
|
|
1190
|
+
let newEndVnode = newCh[newEndIdx];
|
|
1191
|
+
let node;
|
|
1192
|
+
let elmToMove;
|
|
1193
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
1194
|
+
if (oldStartVnode == null) {
|
|
1195
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1196
|
+
} else if (oldEndVnode == null) {
|
|
1197
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1198
|
+
} else if (newStartVnode == null) {
|
|
1199
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1200
|
+
} else if (newEndVnode == null) {
|
|
1201
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1202
|
+
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1203
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1204
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1205
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1206
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1207
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1208
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1209
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1210
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1211
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1212
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1213
|
+
}
|
|
1214
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1215
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1216
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1217
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1218
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1219
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1220
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1221
|
+
}
|
|
1222
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1223
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1224
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1225
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1226
|
+
} else {
|
|
1227
|
+
idxInOld = -1;
|
|
1228
|
+
{
|
|
1229
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
1230
|
+
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1231
|
+
idxInOld = i2;
|
|
1232
|
+
break;
|
|
1220
1233
|
}
|
|
1221
1234
|
}
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
node
|
|
1235
|
+
}
|
|
1236
|
+
if (idxInOld >= 0) {
|
|
1237
|
+
elmToMove = oldCh[idxInOld];
|
|
1238
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1239
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1240
|
+
} else {
|
|
1241
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1242
|
+
oldCh[idxInOld] = void 0;
|
|
1243
|
+
node = elmToMove.$elm$;
|
|
1227
1244
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1245
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1246
|
+
} else {
|
|
1247
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1248
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1249
|
+
}
|
|
1250
|
+
if (node) {
|
|
1251
|
+
{
|
|
1252
|
+
insertBefore(
|
|
1253
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1235
1254
|
node,
|
|
1236
|
-
|
|
1237
|
-
childRenderNodes,
|
|
1238
|
-
slotNodes,
|
|
1239
|
-
shadowRootNodes,
|
|
1240
|
-
slottedNodes
|
|
1255
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1241
1256
|
);
|
|
1242
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1243
|
-
if (shadowRootNodes) {
|
|
1244
|
-
node.remove();
|
|
1245
|
-
} else {
|
|
1246
|
-
hostElm["s-cr"] = node;
|
|
1247
|
-
node["s-cn"] = true;
|
|
1248
|
-
}
|
|
1249
1257
|
}
|
|
1250
1258
|
}
|
|
1251
1259
|
}
|
|
1252
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1253
|
-
const vnode = newVNode(null, node.textContent);
|
|
1254
|
-
vnode.$elm$ = node;
|
|
1255
|
-
vnode.$index$ = "0";
|
|
1256
|
-
parentVNode.$children$ = [vnode];
|
|
1257
1260
|
}
|
|
1258
|
-
|
|
1261
|
+
if (oldStartIdx > oldEndIdx) {
|
|
1262
|
+
addVnodes(
|
|
1263
|
+
parentElm,
|
|
1264
|
+
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
1265
|
+
newVNode2,
|
|
1266
|
+
newCh,
|
|
1267
|
+
newStartIdx,
|
|
1268
|
+
newEndIdx
|
|
1269
|
+
);
|
|
1270
|
+
} else if (newStartIdx > newEndIdx) {
|
|
1271
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1272
|
+
}
|
|
1259
1273
|
};
|
|
1260
|
-
var
|
|
1261
|
-
if (
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
orgLocNodes.set(componentId, node);
|
|
1265
|
-
}
|
|
1266
|
-
let i2 = 0;
|
|
1267
|
-
if (node.shadowRoot) {
|
|
1268
|
-
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1269
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1270
|
-
}
|
|
1274
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1275
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1276
|
+
if (leftVNode.$tag$ === "slot") {
|
|
1277
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
1271
1278
|
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1279
|
+
if (!isInitialRender) {
|
|
1280
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
1275
1281
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1279
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1280
|
-
node.nodeValue = "";
|
|
1281
|
-
node["s-en"] = childIdSplt[3];
|
|
1282
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
1283
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
1282
1284
|
}
|
|
1285
|
+
return true;
|
|
1283
1286
|
}
|
|
1287
|
+
return false;
|
|
1284
1288
|
};
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
$name$: null,
|
|
1297
|
-
$tag$: null,
|
|
1298
|
-
$text$: null
|
|
1299
|
-
};
|
|
1300
|
-
return { ...defaultVNode, ...vnode };
|
|
1301
|
-
};
|
|
1302
|
-
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1303
|
-
node["s-sr"] = true;
|
|
1304
|
-
childVNode.$name$ = slotName || null;
|
|
1305
|
-
childVNode.$tag$ = "slot";
|
|
1306
|
-
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1307
|
-
if (shadowRootNodes) {
|
|
1308
|
-
const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
1309
|
-
if (childVNode.$name$) {
|
|
1310
|
-
childVNode.$elm$.setAttribute("name", slotName);
|
|
1289
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1290
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1291
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1292
|
+
const oldChildren = oldVNode.$children$;
|
|
1293
|
+
const newChildren = newVNode2.$children$;
|
|
1294
|
+
const tag = newVNode2.$tag$;
|
|
1295
|
+
const text = newVNode2.$text$;
|
|
1296
|
+
let defaultHolder;
|
|
1297
|
+
if (text === null) {
|
|
1298
|
+
{
|
|
1299
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
1311
1300
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1301
|
+
{
|
|
1302
|
+
if (tag === "slot" && !useNativeShadowDom) ; else {
|
|
1303
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1304
|
+
}
|
|
1316
1305
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
if (
|
|
1320
|
-
|
|
1306
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
1307
|
+
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
1308
|
+
} else if (newChildren !== null) {
|
|
1309
|
+
if (oldVNode.$text$ !== null) {
|
|
1310
|
+
elm.textContent = "";
|
|
1311
|
+
}
|
|
1312
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1313
|
+
} else if (
|
|
1314
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1315
|
+
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
1316
|
+
) {
|
|
1317
|
+
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1318
|
+
}
|
|
1319
|
+
if (isSvgMode && tag === "svg") {
|
|
1320
|
+
isSvgMode = false;
|
|
1321
|
+
}
|
|
1322
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1323
|
+
defaultHolder.parentNode.textContent = text;
|
|
1324
|
+
} else if (oldVNode.$text$ !== text) {
|
|
1325
|
+
elm.data = text;
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
var relocateNodes = [];
|
|
1329
|
+
var markSlotContentForRelocation = (elm) => {
|
|
1330
|
+
let node;
|
|
1331
|
+
let hostContentNodes;
|
|
1332
|
+
let j;
|
|
1333
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1334
|
+
for (const childNode of children) {
|
|
1335
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1336
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1337
|
+
const slotName = childNode["s-sn"];
|
|
1338
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1339
|
+
node = hostContentNodes[j];
|
|
1340
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes )) {
|
|
1341
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1342
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1343
|
+
checkSlotFallbackVisibility = true;
|
|
1344
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
1345
|
+
if (relocateNodeData) {
|
|
1346
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
1347
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
1348
|
+
} else {
|
|
1349
|
+
node["s-sh"] = childNode["s-hn"];
|
|
1350
|
+
relocateNodes.push({
|
|
1351
|
+
$slotRefNode$: childNode,
|
|
1352
|
+
$nodeToRelocate$: node
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
if (node["s-sr"]) {
|
|
1356
|
+
relocateNodes.map((relocateNode) => {
|
|
1357
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1358
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1359
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1360
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1366
|
+
relocateNodes.push({
|
|
1367
|
+
$nodeToRelocate$: node
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1321
1372
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1325
|
-
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1326
|
-
if (shouldMove) {
|
|
1327
|
-
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1373
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1374
|
+
markSlotContentForRelocation(childNode);
|
|
1328
1375
|
}
|
|
1329
|
-
childRenderNodes.push(childVNode);
|
|
1330
|
-
}
|
|
1331
|
-
slotNodes.push(childVNode);
|
|
1332
|
-
if (!parentVNode.$children$) {
|
|
1333
|
-
parentVNode.$children$ = [];
|
|
1334
1376
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1341
|
-
slottedNode["s-sn"] = slotName;
|
|
1342
|
-
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1343
|
-
slottedNode = slottedNode.nextSibling;
|
|
1377
|
+
};
|
|
1378
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
1379
|
+
{
|
|
1380
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1381
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1344
1382
|
}
|
|
1345
1383
|
};
|
|
1346
|
-
var
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1350
|
-
}
|
|
1351
|
-
if (propType & 2 /* Number */) {
|
|
1352
|
-
return parseFloat(propValue);
|
|
1353
|
-
}
|
|
1354
|
-
if (propType & 1 /* String */) {
|
|
1355
|
-
return String(propValue);
|
|
1356
|
-
}
|
|
1357
|
-
return propValue;
|
|
1384
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
1385
|
+
{
|
|
1386
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1358
1387
|
}
|
|
1359
|
-
return propValue;
|
|
1360
1388
|
};
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
});
|
|
1389
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1390
|
+
var _c, _d;
|
|
1391
|
+
const hostElm = hostRef.$hostElement$;
|
|
1392
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1393
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1394
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1395
|
+
hostTagName = hostElm.tagName;
|
|
1396
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1397
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1398
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
1399
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1400
|
+
}
|
|
1374
1401
|
}
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
elm.
|
|
1380
|
-
|
|
1381
|
-
};
|
|
1382
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1383
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1384
|
-
let style = styles.get(scopeId2);
|
|
1402
|
+
}
|
|
1403
|
+
rootVnode.$tag$ = null;
|
|
1404
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1405
|
+
hostRef.$vnode$ = rootVnode;
|
|
1406
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1407
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1385
1408
|
{
|
|
1386
|
-
|
|
1409
|
+
contentRef = hostElm["s-cr"];
|
|
1410
|
+
checkSlotFallbackVisibility = false;
|
|
1387
1411
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
if (!appliedStyles) {
|
|
1401
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1412
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1413
|
+
{
|
|
1414
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1415
|
+
if (checkSlotRelocate) {
|
|
1416
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1417
|
+
for (const relocateData of relocateNodes) {
|
|
1418
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1419
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
1420
|
+
const orgLocationNode = originalLocationDebugNode(nodeToRelocate) ;
|
|
1421
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1422
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1423
|
+
}
|
|
1402
1424
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1420
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
1421
|
-
} else if ("host" in styleContainerNode) {
|
|
1422
|
-
{
|
|
1423
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1424
|
-
if (existingStyleContainer) {
|
|
1425
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1426
|
-
} else {
|
|
1427
|
-
styleContainerNode.prepend(styleElm);
|
|
1428
|
-
}
|
|
1425
|
+
for (const relocateData of relocateNodes) {
|
|
1426
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1427
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1428
|
+
if (slotRefNode) {
|
|
1429
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1430
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1431
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1432
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1433
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1434
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1435
|
+
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1436
|
+
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1437
|
+
}
|
|
1438
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1439
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1440
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1429
1441
|
}
|
|
1430
|
-
} else {
|
|
1431
|
-
styleContainerNode.append(styleElm);
|
|
1432
1442
|
}
|
|
1433
1443
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1444
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
|
|
1445
|
+
} else {
|
|
1446
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1447
|
+
if (isInitialLoad) {
|
|
1448
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1449
|
+
}
|
|
1450
|
+
nodeToRelocate.hidden = true;
|
|
1436
1451
|
}
|
|
1437
1452
|
}
|
|
1438
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1439
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1440
|
-
}
|
|
1441
|
-
if (appliedStyles) {
|
|
1442
|
-
appliedStyles.add(scopeId2);
|
|
1443
|
-
}
|
|
1444
1453
|
}
|
|
1445
1454
|
}
|
|
1455
|
+
if (checkSlotFallbackVisibility) {
|
|
1456
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1457
|
+
}
|
|
1458
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1459
|
+
relocateNodes.length = 0;
|
|
1446
1460
|
}
|
|
1447
|
-
|
|
1448
|
-
};
|
|
1449
|
-
var attachStyles = (hostRef) => {
|
|
1450
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1451
|
-
const elm = hostRef.$hostElement$;
|
|
1452
|
-
const flags = cmpMeta.$flags$;
|
|
1453
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1454
|
-
const scopeId2 = addStyle(
|
|
1455
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
1456
|
-
cmpMeta);
|
|
1457
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
1458
|
-
elm["s-sc"] = scopeId2;
|
|
1459
|
-
elm.classList.add(scopeId2 + "-h");
|
|
1460
|
-
}
|
|
1461
|
-
endAttachStyles();
|
|
1461
|
+
contentRef = void 0;
|
|
1462
1462
|
};
|
|
1463
|
-
var
|
|
1463
|
+
var slotReferenceDebugNode = (slotVNode) => doc.createComment(
|
|
1464
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
1465
|
+
);
|
|
1466
|
+
var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
|
|
1467
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
1468
|
+
);
|
|
1464
1469
|
|
|
1465
1470
|
// src/runtime/update-component.ts
|
|
1466
1471
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1467
1472
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1468
|
-
ancestorComponent["s-p"].push(
|
|
1473
|
+
const index = ancestorComponent["s-p"].push(
|
|
1474
|
+
new Promise(
|
|
1475
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1476
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1477
|
+
r();
|
|
1478
|
+
}
|
|
1479
|
+
)
|
|
1480
|
+
);
|
|
1469
1481
|
}
|
|
1470
1482
|
};
|
|
1471
1483
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1694,62 +1706,69 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1694
1706
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1695
1707
|
members.map(([memberName, [memberFlags]]) => {
|
|
1696
1708
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1697
|
-
|
|
1709
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1710
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1711
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1712
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1698
1713
|
Object.defineProperty(prototype, memberName, {
|
|
1699
1714
|
get() {
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
},
|
|
1705
|
-
configurable: true,
|
|
1706
|
-
enumerable: true
|
|
1707
|
-
});
|
|
1708
|
-
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1709
|
-
{
|
|
1710
|
-
Object.defineProperty(prototype, memberName, {
|
|
1711
|
-
get() {
|
|
1715
|
+
{
|
|
1716
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1717
|
+
return getValue(this, memberName);
|
|
1718
|
+
}
|
|
1712
1719
|
const ref = getHostRef(this);
|
|
1713
1720
|
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1714
1721
|
if (!instance) return;
|
|
1715
1722
|
return instance[memberName];
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
configurable: true,
|
|
1726
|
+
enumerable: true
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
Object.defineProperty(prototype, memberName, {
|
|
1730
|
+
set(newValue) {
|
|
1731
|
+
const ref = getHostRef(this);
|
|
1732
|
+
if (origSetter) {
|
|
1733
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1734
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1735
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1736
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1737
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1738
|
+
}
|
|
1739
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1740
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1741
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1742
|
+
return;
|
|
1743
|
+
}
|
|
1744
|
+
{
|
|
1745
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1746
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1747
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1748
|
+
ref.$onReadyPromise$.then(() => {
|
|
1749
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1750
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1734
1753
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1742
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1743
|
-
};
|
|
1744
|
-
if (ref.$lazyInstance$) {
|
|
1745
|
-
setterSetVal();
|
|
1746
|
-
} else {
|
|
1747
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1756
|
+
const setterSetVal = () => {
|
|
1757
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1758
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1759
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1748
1760
|
}
|
|
1761
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1762
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1763
|
+
};
|
|
1764
|
+
if (ref.$lazyInstance$) {
|
|
1765
|
+
setterSetVal();
|
|
1766
|
+
} else {
|
|
1767
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1749
1768
|
}
|
|
1750
|
-
}
|
|
1769
|
+
}
|
|
1751
1770
|
}
|
|
1752
|
-
}
|
|
1771
|
+
});
|
|
1753
1772
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1754
1773
|
Object.defineProperty(prototype, memberName, {
|
|
1755
1774
|
value(...args) {
|
|
@@ -1790,8 +1809,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1790
1809
|
return;
|
|
1791
1810
|
}
|
|
1792
1811
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1793
|
-
|
|
1794
|
-
|
|
1812
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1813
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1814
|
+
this[propName] = newValue;
|
|
1795
1815
|
}
|
|
1796
1816
|
});
|
|
1797
1817
|
};
|
|
@@ -2092,7 +2112,8 @@ var hAsync = (nodeName, vnodeData, ...children) => {
|
|
|
2092
2112
|
}
|
|
2093
2113
|
return h(nodeName, vnodeData);
|
|
2094
2114
|
};
|
|
2095
|
-
function proxyHostElement(elm,
|
|
2115
|
+
function proxyHostElement(elm, cstr) {
|
|
2116
|
+
const cmpMeta = cstr.cmpMeta;
|
|
2096
2117
|
if (typeof elm.componentOnReady !== "function") {
|
|
2097
2118
|
elm.componentOnReady = componentOnReady;
|
|
2098
2119
|
}
|
|
@@ -2107,11 +2128,13 @@ function proxyHostElement(elm, cmpMeta) {
|
|
|
2107
2128
|
if (cmpMeta.$members$ != null) {
|
|
2108
2129
|
const hostRef = getHostRef(elm);
|
|
2109
2130
|
const members = Object.entries(cmpMeta.$members$);
|
|
2110
|
-
members.forEach(([memberName,
|
|
2131
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
2111
2132
|
var _a, _b;
|
|
2112
|
-
const memberFlags = m[0];
|
|
2113
2133
|
if (memberFlags & 31 /* Prop */) {
|
|
2114
|
-
|
|
2134
|
+
let getter2 = function() {
|
|
2135
|
+
return ![void 0, null].includes(parsedAttrValue) ? parsedAttrValue : origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
2136
|
+
};
|
|
2137
|
+
const attributeName = metaAttributeName || memberName;
|
|
2115
2138
|
let attrValue = elm.getAttribute(attributeName);
|
|
2116
2139
|
if ((attrValue == null ? void 0 : attrValue.startsWith("{")) && attrValue.endsWith("}") || (attrValue == null ? void 0 : attrValue.startsWith("[")) && attrValue.endsWith("]")) {
|
|
2117
2140
|
try {
|
|
@@ -2119,8 +2142,14 @@ function proxyHostElement(elm, cmpMeta) {
|
|
|
2119
2142
|
} catch (e) {
|
|
2120
2143
|
}
|
|
2121
2144
|
}
|
|
2145
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(cstr.prototype, memberName) || {};
|
|
2146
|
+
let parsedAttrValue;
|
|
2122
2147
|
if (attrValue != null) {
|
|
2123
|
-
|
|
2148
|
+
parsedAttrValue = parsePropertyValue(attrValue, memberFlags);
|
|
2149
|
+
if (origSetter) {
|
|
2150
|
+
origSetter.apply(elm, [parsedAttrValue]);
|
|
2151
|
+
parsedAttrValue = origGetter ? origGetter.apply(elm) : parsedAttrValue;
|
|
2152
|
+
}
|
|
2124
2153
|
(_a = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a.set(memberName, parsedAttrValue);
|
|
2125
2154
|
}
|
|
2126
2155
|
const ownValue = elm[memberName];
|
|
@@ -2129,15 +2158,18 @@ function proxyHostElement(elm, cmpMeta) {
|
|
|
2129
2158
|
delete elm[memberName];
|
|
2130
2159
|
}
|
|
2131
2160
|
Object.defineProperty(elm, memberName, {
|
|
2132
|
-
get
|
|
2133
|
-
return getValue(this, memberName);
|
|
2134
|
-
},
|
|
2161
|
+
get: getter2,
|
|
2135
2162
|
set(newValue) {
|
|
2136
2163
|
setValue(this, memberName, newValue, cmpMeta);
|
|
2137
2164
|
},
|
|
2138
2165
|
configurable: true,
|
|
2139
2166
|
enumerable: true
|
|
2140
2167
|
});
|
|
2168
|
+
Object.defineProperty(cstr.prototype, memberName, {
|
|
2169
|
+
get: getter2,
|
|
2170
|
+
configurable: true,
|
|
2171
|
+
enumerable: true
|
|
2172
|
+
});
|
|
2141
2173
|
} else if (memberFlags & 64 /* Method */) {
|
|
2142
2174
|
Object.defineProperty(elm, memberName, {
|
|
2143
2175
|
value(...args) {
|
|
@@ -2212,7 +2244,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
|
|
|
2212
2244
|
createdElements.add(elm);
|
|
2213
2245
|
elm.connectedCallback = patchedConnectedCallback2;
|
|
2214
2246
|
registerHost(elm, Cstr.cmpMeta);
|
|
2215
|
-
proxyHostElement(elm, Cstr
|
|
2247
|
+
proxyHostElement(elm, Cstr);
|
|
2216
2248
|
}
|
|
2217
2249
|
}
|
|
2218
2250
|
}
|
|
@@ -6348,7 +6380,7 @@ var NAMESPACE = (
|
|
|
6348
6380
|
);
|
|
6349
6381
|
|
|
6350
6382
|
/*
|
|
6351
|
-
Stencil Hydrate Runner v4.
|
|
6383
|
+
Stencil Hydrate Runner v4.24.0 | MIT Licensed | https://stenciljs.com
|
|
6352
6384
|
*/
|
|
6353
6385
|
var __defProp = Object.defineProperty;
|
|
6354
6386
|
var __export = (target, all) => {
|
|
@@ -17318,7 +17350,7 @@ var MockNode2 = class {
|
|
|
17318
17350
|
}
|
|
17319
17351
|
remove() {
|
|
17320
17352
|
if (this.parentNode != null) {
|
|
17321
|
-
this.parentNode.removeChild(this);
|
|
17353
|
+
this.__parentNode ? this.__parentNode.removeChild(this) : this.parentNode.removeChild(this);
|
|
17322
17354
|
}
|
|
17323
17355
|
}
|
|
17324
17356
|
replaceChild(newChild, oldChild) {
|
|
@@ -20078,7 +20110,7 @@ function resetWindowDefaults(win2) {
|
|
|
20078
20110
|
win2.__clearTimeout = nativeClearTimeout;
|
|
20079
20111
|
win2.__setInterval = nativeSetInterval;
|
|
20080
20112
|
win2.__setTimeout = nativeSetTimeout;
|
|
20081
|
-
win2.__maxTimeout =
|
|
20113
|
+
win2.__maxTimeout = 6e4;
|
|
20082
20114
|
win2.__allowInterval = true;
|
|
20083
20115
|
win2.URL = nativeURL;
|
|
20084
20116
|
}
|
|
@@ -20569,11 +20601,11 @@ var unwrapErr = (result) => {
|
|
|
20569
20601
|
throw result.value;
|
|
20570
20602
|
}
|
|
20571
20603
|
};
|
|
20572
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20573
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20574
20604
|
|
|
20575
20605
|
// src/runtime/mode.ts
|
|
20576
20606
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
20607
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20608
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20577
20609
|
|
|
20578
20610
|
// src/compiler/html/canonical-link.ts
|
|
20579
20611
|
var updateCanonicalLink = (doc2, href) => {
|