@biggive/components 202412181555.0.0 → 202412311320.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-bdf27c6e.entry.js → p-0eda1345.entry.js} +2 -2
- package/dist/biggive/{p-8f87813f.entry.js → p-16da1da1.entry.js} +2 -2
- package/dist/biggive/{p-ff386daf.entry.js → p-2eb2b970.entry.js} +2 -2
- package/dist/biggive/{p-c9dca099.entry.js → p-5262507c.entry.js} +2 -2
- package/dist/biggive/{p-294ca479.entry.js → p-6a812c8a.entry.js} +2 -2
- package/dist/biggive/p-753c50c5.js +3 -0
- package/dist/biggive/p-753c50c5.js.map +1 -0
- package/dist/biggive/{p-e3517299.entry.js → p-87562be2.entry.js} +2 -2
- package/dist/biggive/{p-1605c6ed.entry.js → p-b1d82c2f.entry.js} +2 -2
- package/dist/biggive/{p-8a90290c.entry.js → p-bfaa8a6d.entry.js} +2 -2
- package/dist/biggive/{p-a6b12da2.entry.js → p-cf7446f9.entry.js} +2 -2
- package/dist/biggive/{p-748e33b0.entry.js → p-e3b4412e.entry.js} +2 -2
- package/dist/biggive/{p-e0832635.entry.js → p-ea8d01ca.entry.js} +2 -2
- package/dist/biggive/{p-963a065a.entry.js → p-f0bb3912.entry.js} +2 -2
- package/dist/biggive/{p-10c21815.entry.js → p-f3246097.entry.js} +2 -2
- package/dist/biggive/p-f6b8aae2.entry.js +2 -0
- package/dist/cjs/biggive-accordion_40.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-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-6a8f5d99.js → index-c0a19159.js} +789 -544
- package/dist/cjs/index-c0a19159.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/biggive-accordion/biggive-accordion.js +6 -0
- package/dist/collection/components/biggive-accordion/biggive-accordion.js.map +1 -1
- package/dist/collection/components/biggive-accordion-entry/biggive-accordion-entry.js +2 -0
- package/dist/collection/components/biggive-accordion-entry/biggive-accordion-entry.js.map +1 -1
- package/dist/collection/components/biggive-article-card/biggive-article-card.js +44 -0
- package/dist/collection/components/biggive-article-card/biggive-article-card.js.map +1 -1
- package/dist/collection/components/biggive-basic-card/biggive-basic-card.js +42 -0
- package/dist/collection/components/biggive-basic-card/biggive-basic-card.js.map +1 -1
- package/dist/collection/components/biggive-beneficiary-icon/biggive-beneficiary-icon.js +10 -0
- package/dist/collection/components/biggive-beneficiary-icon/biggive-beneficiary-icon.js.map +1 -1
- package/dist/collection/components/biggive-biography-card/biggive-biography-card.js +28 -0
- package/dist/collection/components/biggive-biography-card/biggive-biography-card.js.map +1 -1
- package/dist/collection/components/biggive-boxed-content/biggive-boxed-content.js +10 -0
- package/dist/collection/components/biggive-boxed-content/biggive-boxed-content.js.map +1 -1
- package/dist/collection/components/biggive-branded-image/biggive-branded-image.js +14 -0
- package/dist/collection/components/biggive-branded-image/biggive-branded-image.js.map +1 -1
- package/dist/collection/components/biggive-button/biggive-button.js +20 -0
- package/dist/collection/components/biggive-button/biggive-button.js.map +1 -1
- package/dist/collection/components/biggive-call-to-action/biggive-call-to-action.js +40 -0
- package/dist/collection/components/biggive-call-to-action/biggive-call-to-action.js.map +1 -1
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js +38 -0
- package/dist/collection/components/biggive-campaign-card/biggive-campaign-card.js.map +1 -1
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js +24 -0
- package/dist/collection/components/biggive-campaign-card-filter-grid/biggive-campaign-card-filter-grid.js.map +1 -1
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.js +28 -0
- package/dist/collection/components/biggive-campaign-highlights/biggive-campaign-highlights.js.map +1 -1
- package/dist/collection/components/biggive-category-icon/biggive-category-icon.js +10 -0
- package/dist/collection/components/biggive-category-icon/biggive-category-icon.js.map +1 -1
- package/dist/collection/components/biggive-container-card/biggive-container-card.js +16 -0
- package/dist/collection/components/biggive-container-card/biggive-container-card.js.map +1 -1
- package/dist/collection/components/biggive-cookie-banner/biggive-cookie-banner.js +6 -0
- package/dist/collection/components/biggive-cookie-banner/biggive-cookie-banner.js.map +1 -1
- package/dist/collection/components/biggive-footer/biggive-footer.js +10 -0
- package/dist/collection/components/biggive-footer/biggive-footer.js.map +1 -1
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js +21 -1
- package/dist/collection/components/biggive-form-field-select/biggive-form-field-select.js.map +1 -1
- package/dist/collection/components/biggive-formatted-text/biggive-formatted-text.js +6 -0
- package/dist/collection/components/biggive-formatted-text/biggive-formatted-text.js.map +1 -1
- package/dist/collection/components/biggive-generic-icon/biggive-generic-icon.js +10 -0
- package/dist/collection/components/biggive-generic-icon/biggive-generic-icon.js.map +1 -1
- package/dist/collection/components/biggive-grid/biggive-grid.js +8 -0
- package/dist/collection/components/biggive-grid/biggive-grid.js.map +1 -1
- package/dist/collection/components/biggive-heading/biggive-heading.js +18 -0
- package/dist/collection/components/biggive-heading/biggive-heading.js.map +1 -1
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js +36 -0
- package/dist/collection/components/biggive-hero-image/biggive-hero-image.js.map +1 -1
- package/dist/collection/components/biggive-icon-button/biggive-icon-button.js +34 -0
- package/dist/collection/components/biggive-icon-button/biggive-icon-button.js.map +1 -1
- package/dist/collection/components/biggive-icon-group/biggive-icon-group.js +4 -0
- package/dist/collection/components/biggive-icon-group/biggive-icon-group.js.map +1 -1
- package/dist/collection/components/biggive-image/biggive-image.js +14 -0
- package/dist/collection/components/biggive-image/biggive-image.js.map +1 -1
- package/dist/collection/components/biggive-image-button/biggive-image-button.js +34 -0
- package/dist/collection/components/biggive-image-button/biggive-image-button.js.map +1 -1
- package/dist/collection/components/biggive-image-card/biggive-image-card.js +30 -0
- package/dist/collection/components/biggive-image-card/biggive-image-card.js.map +1 -1
- package/dist/collection/components/biggive-image-feature/biggive-image-feature.js +26 -0
- package/dist/collection/components/biggive-image-feature/biggive-image-feature.js.map +1 -1
- package/dist/collection/components/biggive-main-menu/biggive-main-menu.js +10 -0
- package/dist/collection/components/biggive-main-menu/biggive-main-menu.js.map +1 -1
- package/dist/collection/components/biggive-misc-icon/biggive-misc-icon.js +8 -0
- package/dist/collection/components/biggive-misc-icon/biggive-misc-icon.js.map +1 -1
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js +2 -0
- package/dist/collection/components/biggive-nav-group/biggive-nav-group.js.map +1 -1
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js +6 -0
- package/dist/collection/components/biggive-nav-item/biggive-nav-item.js.map +1 -1
- package/dist/collection/components/biggive-page-columns/biggive-page-columns.js +2 -0
- package/dist/collection/components/biggive-page-columns/biggive-page-columns.js.map +1 -1
- package/dist/collection/components/biggive-page-section/biggive-page-section.js +12 -0
- package/dist/collection/components/biggive-page-section/biggive-page-section.js.map +1 -1
- package/dist/collection/components/biggive-popup/biggive-popup.js +2 -0
- package/dist/collection/components/biggive-popup/biggive-popup.js.map +1 -1
- package/dist/collection/components/biggive-progress-bar/biggive-progress-bar.js +6 -0
- package/dist/collection/components/biggive-progress-bar/biggive-progress-bar.js.map +1 -1
- package/dist/collection/components/biggive-quote/biggive-quote.js +10 -0
- package/dist/collection/components/biggive-quote/biggive-quote.js.map +1 -1
- package/dist/collection/components/biggive-sheet/biggive-sheet.js +6 -0
- package/dist/collection/components/biggive-sheet/biggive-sheet.js.map +1 -1
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js +12 -0
- package/dist/collection/components/biggive-social-icon/biggive-social-icon.js.map +1 -1
- package/dist/collection/components/biggive-tab/biggive-tab.js +2 -0
- package/dist/collection/components/biggive-tab/biggive-tab.js.map +1 -1
- package/dist/collection/components/biggive-tabbed-content/biggive-tabbed-content.js +14 -0
- package/dist/collection/components/biggive-tabbed-content/biggive-tabbed-content.js.map +1 -1
- package/dist/collection/components/biggive-table/biggive-table.js +10 -0
- package/dist/collection/components/biggive-table/biggive-table.js.map +1 -1
- package/dist/collection/components/biggive-text-input/biggive-text-input.js +8 -0
- package/dist/collection/components/biggive-text-input/biggive-text-input.js.map +1 -1
- package/dist/collection/components/biggive-timeline/biggive-timeline.js +24 -0
- package/dist/collection/components/biggive-timeline/biggive-timeline.js.map +1 -1
- package/dist/collection/components/biggive-timeline-entry/biggive-timeline-entry.js +4 -0
- package/dist/collection/components/biggive-timeline-entry/biggive-timeline-entry.js.map +1 -1
- package/dist/collection/components/biggive-totalizer/biggive-totalizer.js +12 -0
- package/dist/collection/components/biggive-totalizer/biggive-totalizer.js.map +1 -1
- package/dist/collection/components/biggive-totalizer-ticker-item/biggive-totalizer-ticker-item.js +4 -0
- package/dist/collection/components/biggive-totalizer-ticker-item/biggive-totalizer-ticker-item.js.map +1 -1
- package/dist/collection/components/biggive-video/biggive-video.js +6 -0
- package/dist/collection/components/biggive-video/biggive-video.js.map +1 -1
- package/dist/collection/components/biggive-video-feature/biggive-video-feature.js +26 -0
- package/dist/collection/components/biggive-video-feature/biggive-video-feature.js.map +1 -1
- package/dist/esm/biggive-accordion_40.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-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-e697836a.js → index-bf4df57a.js} +789 -544
- package/dist/esm/index-bf4df57a.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/hydrate/index.js +799 -553
- package/hydrate/index.mjs +799 -553
- package/package.json +4 -4
- package/dist/biggive/p-4836d838.entry.js +0 -2
- package/dist/biggive/p-b6a2fb47.js +0 -3
- package/dist/biggive/p-b6a2fb47.js.map +0 -1
- package/dist/cjs/index-6a8f5d99.js.map +0 -1
- package/dist/esm/index-e697836a.js.map +0 -1
- /package/dist/biggive/{p-bdf27c6e.entry.js.map → p-0eda1345.entry.js.map} +0 -0
- /package/dist/biggive/{p-8f87813f.entry.js.map → p-16da1da1.entry.js.map} +0 -0
- /package/dist/biggive/{p-ff386daf.entry.js.map → p-2eb2b970.entry.js.map} +0 -0
- /package/dist/biggive/{p-c9dca099.entry.js.map → p-5262507c.entry.js.map} +0 -0
- /package/dist/biggive/{p-294ca479.entry.js.map → p-6a812c8a.entry.js.map} +0 -0
- /package/dist/biggive/{p-e3517299.entry.js.map → p-87562be2.entry.js.map} +0 -0
- /package/dist/biggive/{p-1605c6ed.entry.js.map → p-b1d82c2f.entry.js.map} +0 -0
- /package/dist/biggive/{p-8a90290c.entry.js.map → p-bfaa8a6d.entry.js.map} +0 -0
- /package/dist/biggive/{p-a6b12da2.entry.js.map → p-cf7446f9.entry.js.map} +0 -0
- /package/dist/biggive/{p-748e33b0.entry.js.map → p-e3b4412e.entry.js.map} +0 -0
- /package/dist/biggive/{p-e0832635.entry.js.map → p-ea8d01ca.entry.js.map} +0 -0
- /package/dist/biggive/{p-963a065a.entry.js.map → p-f0bb3912.entry.js.map} +0 -0
- /package/dist/biggive/{p-10c21815.entry.js.map → p-f3246097.entry.js.map} +0 -0
- /package/dist/biggive/{p-4836d838.entry.js.map → p-f6b8aae2.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, 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.23.0 | MIT Licensed | https://stenciljs.com
|
|
131
131
|
*/
|
|
132
132
|
var __defProp = Object.defineProperty;
|
|
133
133
|
var __export = (target, all) => {
|
|
@@ -207,26 +207,13 @@ var unwrapErr = (result) => {
|
|
|
207
207
|
throw result.value;
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
var createTime = (fnName, tagName = "") => {
|
|
211
|
-
{
|
|
212
|
-
return () => {
|
|
213
|
-
return;
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
var uniqueTime = (key, measureText) => {
|
|
218
|
-
{
|
|
219
|
-
return () => {
|
|
220
|
-
return;
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
210
|
|
|
225
211
|
// src/runtime/runtime-constants.ts
|
|
226
212
|
var CONTENT_REF_ID = "r";
|
|
227
213
|
var ORG_LOCATION_ID = "o";
|
|
228
214
|
var SLOT_NODE_ID = "s";
|
|
229
215
|
var TEXT_NODE_ID = "t";
|
|
216
|
+
var COMMENT_NODE_ID = "c";
|
|
230
217
|
var HYDRATE_ID = "s-id";
|
|
231
218
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
232
219
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -348,433 +335,124 @@ var convertToPrivate = (node) => {
|
|
|
348
335
|
vnode.$name$ = node.vname;
|
|
349
336
|
return vnode;
|
|
350
337
|
};
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
362
|
-
}
|
|
363
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
364
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
365
|
-
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
366
|
-
childRenderNodes.map((c) => {
|
|
367
|
-
const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
|
|
368
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
369
|
-
const node = c.$elm$;
|
|
370
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
371
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
372
|
-
}
|
|
373
|
-
if (!shadowRoot) {
|
|
374
|
-
node["s-hn"] = tagName;
|
|
375
|
-
if (orgLocationNode) {
|
|
376
|
-
node["s-ol"] = orgLocationNode;
|
|
377
|
-
node["s-ol"]["s-nr"] = node;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
381
|
-
});
|
|
382
|
-
if (shadowRoot) {
|
|
383
|
-
shadowRootNodes.map((shadowRootNode) => {
|
|
384
|
-
if (shadowRootNode) {
|
|
385
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
338
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
339
|
+
if (oldValue !== newValue) {
|
|
340
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
341
|
+
let ln = memberName.toLowerCase();
|
|
342
|
+
if (memberName === "class") {
|
|
343
|
+
const classList = elm.classList;
|
|
344
|
+
const oldClasses = parseClassList(oldValue);
|
|
345
|
+
const newClasses = parseClassList(newValue);
|
|
346
|
+
if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
|
|
347
|
+
newClasses.push(elm["s-si"]);
|
|
386
348
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
398
|
-
if (childNodeType) {
|
|
399
|
-
childIdSplt = childNodeType.split(".");
|
|
400
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
401
|
-
childVNode = {
|
|
402
|
-
$flags$: 0,
|
|
403
|
-
$hostId$: childIdSplt[0],
|
|
404
|
-
$nodeId$: childIdSplt[1],
|
|
405
|
-
$depth$: childIdSplt[2],
|
|
406
|
-
$index$: childIdSplt[3],
|
|
407
|
-
$tag$: node.tagName.toLowerCase(),
|
|
408
|
-
$elm$: node,
|
|
409
|
-
$attrs$: null,
|
|
410
|
-
$children$: null,
|
|
411
|
-
$key$: null,
|
|
412
|
-
$name$: null,
|
|
413
|
-
$text$: null
|
|
414
|
-
};
|
|
415
|
-
childRenderNodes.push(childVNode);
|
|
416
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
417
|
-
if (!parentVNode.$children$) {
|
|
418
|
-
parentVNode.$children$ = [];
|
|
349
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
350
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
351
|
+
} else if (memberName === "style") {
|
|
352
|
+
{
|
|
353
|
+
for (const prop in oldValue) {
|
|
354
|
+
if (!newValue || newValue[prop] == null) {
|
|
355
|
+
{
|
|
356
|
+
elm.style[prop] = "";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
419
359
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (
|
|
423
|
-
|
|
360
|
+
}
|
|
361
|
+
for (const prop in newValue) {
|
|
362
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
363
|
+
{
|
|
364
|
+
elm.style[prop] = newValue[prop];
|
|
365
|
+
}
|
|
424
366
|
}
|
|
425
367
|
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
clientHydrate(
|
|
430
|
-
parentVNode,
|
|
431
|
-
childRenderNodes,
|
|
432
|
-
slotNodes,
|
|
433
|
-
shadowRootNodes,
|
|
434
|
-
hostElm,
|
|
435
|
-
node.shadowRoot.childNodes[i2],
|
|
436
|
-
hostId
|
|
437
|
-
);
|
|
368
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
369
|
+
if (newValue) {
|
|
370
|
+
newValue(elm);
|
|
438
371
|
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
childIdSplt = node.nodeValue.split(".");
|
|
453
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
454
|
-
childNodeType = childIdSplt[0];
|
|
455
|
-
childVNode = {
|
|
456
|
-
$flags$: 0,
|
|
457
|
-
$hostId$: childIdSplt[1],
|
|
458
|
-
$nodeId$: childIdSplt[2],
|
|
459
|
-
$depth$: childIdSplt[3],
|
|
460
|
-
$index$: childIdSplt[4],
|
|
461
|
-
$elm$: node,
|
|
462
|
-
$attrs$: null,
|
|
463
|
-
$children$: null,
|
|
464
|
-
$key$: null,
|
|
465
|
-
$name$: null,
|
|
466
|
-
$tag$: null,
|
|
467
|
-
$text$: null
|
|
468
|
-
};
|
|
469
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
470
|
-
childVNode.$elm$ = node.nextSibling;
|
|
471
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
472
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
473
|
-
childRenderNodes.push(childVNode);
|
|
474
|
-
node.remove();
|
|
475
|
-
if (!parentVNode.$children$) {
|
|
476
|
-
parentVNode.$children$ = [];
|
|
477
|
-
}
|
|
478
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
479
|
-
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
480
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
481
|
-
}
|
|
372
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
373
|
+
if (memberName[2] === "-") {
|
|
374
|
+
memberName = memberName.slice(3);
|
|
375
|
+
} else if (isMemberInElement(win, ln)) {
|
|
376
|
+
memberName = ln.slice(2);
|
|
377
|
+
} else {
|
|
378
|
+
memberName = ln[2] + memberName.slice(3);
|
|
379
|
+
}
|
|
380
|
+
if (oldValue || newValue) {
|
|
381
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
382
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
383
|
+
if (oldValue) {
|
|
384
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
482
385
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
386
|
+
if (newValue) {
|
|
387
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
} else {
|
|
391
|
+
const isComplex = isComplexType(newValue);
|
|
392
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
393
|
+
try {
|
|
394
|
+
if (!elm.tagName.includes("-")) {
|
|
395
|
+
const n = newValue == null ? "" : newValue;
|
|
396
|
+
if (memberName === "list") {
|
|
397
|
+
isProp = false;
|
|
398
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
399
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
400
|
+
elm[memberName] = n;
|
|
401
|
+
} else {
|
|
402
|
+
elm.setAttribute(memberName, n);
|
|
403
|
+
}
|
|
501
404
|
}
|
|
502
|
-
}
|
|
503
|
-
slotNodes.push(childVNode);
|
|
504
|
-
if (!parentVNode.$children$) {
|
|
505
|
-
parentVNode.$children$ = [];
|
|
506
|
-
}
|
|
507
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
508
|
-
} else if (childNodeType === CONTENT_REF_ID) {
|
|
509
|
-
if (shadowRootNodes) {
|
|
510
|
-
node.remove();
|
|
511
405
|
} else {
|
|
512
|
-
|
|
513
|
-
|
|
406
|
+
elm[memberName] = newValue;
|
|
407
|
+
}
|
|
408
|
+
} catch (e) {
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (newValue == null || newValue === false) {
|
|
412
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
413
|
+
{
|
|
414
|
+
elm.removeAttribute(memberName);
|
|
514
415
|
}
|
|
515
416
|
}
|
|
417
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
418
|
+
newValue = newValue === true ? "" : newValue;
|
|
419
|
+
{
|
|
420
|
+
elm.setAttribute(memberName, newValue);
|
|
421
|
+
}
|
|
516
422
|
}
|
|
517
423
|
}
|
|
518
|
-
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
519
|
-
const vnode = newVNode(null, node.textContent);
|
|
520
|
-
vnode.$elm$ = node;
|
|
521
|
-
vnode.$index$ = "0";
|
|
522
|
-
parentVNode.$children$ = [vnode];
|
|
523
424
|
}
|
|
524
425
|
};
|
|
525
|
-
var
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
426
|
+
var parseClassListRegex = /\s/;
|
|
427
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
428
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
429
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
430
|
+
|
|
431
|
+
// src/runtime/vdom/update-element.ts
|
|
432
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
433
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
434
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
435
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
436
|
+
{
|
|
437
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
438
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
439
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
531
440
|
}
|
|
532
441
|
}
|
|
533
|
-
for (i2 = 0; i2 < node.childNodes.length; i2++) {
|
|
534
|
-
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
535
|
-
}
|
|
536
|
-
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
537
|
-
const childIdSplt = node.nodeValue.split(".");
|
|
538
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
539
|
-
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
540
|
-
node.nodeValue = "";
|
|
541
|
-
node["s-en"] = childIdSplt[3];
|
|
542
|
-
}
|
|
543
442
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
547
|
-
if (propType & 4 /* Boolean */) {
|
|
548
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
549
|
-
}
|
|
550
|
-
if (propType & 2 /* Number */) {
|
|
551
|
-
return parseFloat(propValue);
|
|
552
|
-
}
|
|
553
|
-
if (propType & 1 /* String */) {
|
|
554
|
-
return String(propValue);
|
|
555
|
-
}
|
|
556
|
-
return propValue;
|
|
443
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
444
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
557
445
|
}
|
|
558
|
-
return propValue;
|
|
559
446
|
};
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
//
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
composed: !!(flags & 2 /* Composed */),
|
|
570
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
571
|
-
detail
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
};
|
|
576
|
-
var emitEvent = (elm, name, opts) => {
|
|
577
|
-
const ev = plt.ce(name, opts);
|
|
578
|
-
elm.dispatchEvent(ev);
|
|
579
|
-
return ev;
|
|
580
|
-
};
|
|
581
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
582
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
583
|
-
let style = styles.get(scopeId2);
|
|
584
|
-
{
|
|
585
|
-
style = cssText;
|
|
586
|
-
}
|
|
587
|
-
styles.set(scopeId2, style);
|
|
588
|
-
};
|
|
589
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
590
|
-
var _a;
|
|
591
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
592
|
-
const style = styles.get(scopeId2);
|
|
593
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
594
|
-
if (style) {
|
|
595
|
-
if (typeof style === "string") {
|
|
596
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
597
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
598
|
-
let styleElm;
|
|
599
|
-
if (!appliedStyles) {
|
|
600
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
601
|
-
}
|
|
602
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
603
|
-
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
604
|
-
styleElm.innerHTML = style;
|
|
605
|
-
} else {
|
|
606
|
-
styleElm = doc.createElement("style");
|
|
607
|
-
styleElm.innerHTML = style;
|
|
608
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
609
|
-
if (nonce != null) {
|
|
610
|
-
styleElm.setAttribute("nonce", nonce);
|
|
611
|
-
}
|
|
612
|
-
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
613
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
614
|
-
}
|
|
615
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
616
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
617
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
618
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
619
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
620
|
-
} else if ("host" in styleContainerNode) {
|
|
621
|
-
{
|
|
622
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
623
|
-
if (existingStyleContainer) {
|
|
624
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
625
|
-
} else {
|
|
626
|
-
styleContainerNode.prepend(styleElm);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
} else {
|
|
630
|
-
styleContainerNode.append(styleElm);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
634
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
638
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
639
|
-
}
|
|
640
|
-
if (appliedStyles) {
|
|
641
|
-
appliedStyles.add(scopeId2);
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
return scopeId2;
|
|
647
|
-
};
|
|
648
|
-
var attachStyles = (hostRef) => {
|
|
649
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
650
|
-
const elm = hostRef.$hostElement$;
|
|
651
|
-
const flags = cmpMeta.$flags$;
|
|
652
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
653
|
-
const scopeId2 = addStyle(
|
|
654
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
655
|
-
cmpMeta);
|
|
656
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
657
|
-
elm["s-sc"] = scopeId2;
|
|
658
|
-
elm.classList.add(scopeId2 + "-h");
|
|
659
|
-
}
|
|
660
|
-
endAttachStyles();
|
|
661
|
-
};
|
|
662
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
663
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
664
|
-
if (oldValue !== newValue) {
|
|
665
|
-
let isProp = isMemberInElement(elm, memberName);
|
|
666
|
-
let ln = memberName.toLowerCase();
|
|
667
|
-
if (memberName === "class") {
|
|
668
|
-
const classList = elm.classList;
|
|
669
|
-
const oldClasses = parseClassList(oldValue);
|
|
670
|
-
const newClasses = parseClassList(newValue);
|
|
671
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
672
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
673
|
-
} else if (memberName === "style") {
|
|
674
|
-
{
|
|
675
|
-
for (const prop in oldValue) {
|
|
676
|
-
if (!newValue || newValue[prop] == null) {
|
|
677
|
-
{
|
|
678
|
-
elm.style[prop] = "";
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
for (const prop in newValue) {
|
|
684
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
685
|
-
{
|
|
686
|
-
elm.style[prop] = newValue[prop];
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
691
|
-
if (newValue) {
|
|
692
|
-
newValue(elm);
|
|
693
|
-
}
|
|
694
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
695
|
-
if (memberName[2] === "-") {
|
|
696
|
-
memberName = memberName.slice(3);
|
|
697
|
-
} else if (isMemberInElement(win, ln)) {
|
|
698
|
-
memberName = ln.slice(2);
|
|
699
|
-
} else {
|
|
700
|
-
memberName = ln[2] + memberName.slice(3);
|
|
701
|
-
}
|
|
702
|
-
if (oldValue || newValue) {
|
|
703
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
704
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
705
|
-
if (oldValue) {
|
|
706
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
707
|
-
}
|
|
708
|
-
if (newValue) {
|
|
709
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
} else {
|
|
713
|
-
const isComplex = isComplexType(newValue);
|
|
714
|
-
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
715
|
-
try {
|
|
716
|
-
if (!elm.tagName.includes("-")) {
|
|
717
|
-
const n = newValue == null ? "" : newValue;
|
|
718
|
-
if (memberName === "list") {
|
|
719
|
-
isProp = false;
|
|
720
|
-
} else if (oldValue == null || elm[memberName] != n) {
|
|
721
|
-
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
722
|
-
elm[memberName] = n;
|
|
723
|
-
} else {
|
|
724
|
-
elm.setAttribute(memberName, n);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
} else {
|
|
728
|
-
elm[memberName] = newValue;
|
|
729
|
-
}
|
|
730
|
-
} catch (e) {
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
if (newValue == null || newValue === false) {
|
|
734
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
735
|
-
{
|
|
736
|
-
elm.removeAttribute(memberName);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
740
|
-
newValue = newValue === true ? "" : newValue;
|
|
741
|
-
{
|
|
742
|
-
elm.setAttribute(memberName, newValue);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
};
|
|
748
|
-
var parseClassListRegex = /\s/;
|
|
749
|
-
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
750
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
751
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
752
|
-
|
|
753
|
-
// src/runtime/vdom/update-element.ts
|
|
754
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
755
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
756
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
757
|
-
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
758
|
-
{
|
|
759
|
-
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
760
|
-
if (!(memberName in newVnodeAttrs)) {
|
|
761
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
766
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
function sortedAttrNames(attrNames) {
|
|
770
|
-
return attrNames.includes("ref") ? (
|
|
771
|
-
// we need to sort these to ensure that `'ref'` is the last attr
|
|
772
|
-
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
773
|
-
) : (
|
|
774
|
-
// no need to sort, return the original array
|
|
775
|
-
attrNames
|
|
776
|
-
);
|
|
777
|
-
}
|
|
447
|
+
function sortedAttrNames(attrNames) {
|
|
448
|
+
return attrNames.includes("ref") ? (
|
|
449
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
450
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
451
|
+
) : (
|
|
452
|
+
// no need to sort, return the original array
|
|
453
|
+
attrNames
|
|
454
|
+
);
|
|
455
|
+
}
|
|
778
456
|
|
|
779
457
|
// src/runtime/vdom/vdom-render.ts
|
|
780
458
|
var scopeId;
|
|
@@ -867,7 +545,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
867
545
|
};
|
|
868
546
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
869
547
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
870
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
548
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
871
549
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
872
550
|
let node = parentElm;
|
|
873
551
|
while (node = node.nextSibling) {
|
|
@@ -1081,7 +759,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1081
759
|
}
|
|
1082
760
|
};
|
|
1083
761
|
var updateFallbackSlotVisibility = (elm) => {
|
|
1084
|
-
const childNodes = elm.childNodes;
|
|
762
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
1085
763
|
for (const childNode of childNodes) {
|
|
1086
764
|
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1087
765
|
if (childNode["s-sr"]) {
|
|
@@ -1094,7 +772,7 @@ var updateFallbackSlotVisibility = (elm) => {
|
|
|
1094
772
|
childNode.hidden = true;
|
|
1095
773
|
break;
|
|
1096
774
|
}
|
|
1097
|
-
} else {
|
|
775
|
+
} else if (slotName === siblingNode["s-sn"]) {
|
|
1098
776
|
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1099
777
|
childNode.hidden = true;
|
|
1100
778
|
break;
|
|
@@ -1112,9 +790,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1112
790
|
let node;
|
|
1113
791
|
let hostContentNodes;
|
|
1114
792
|
let j;
|
|
1115
|
-
|
|
793
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
794
|
+
for (const childNode of children) {
|
|
1116
795
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1117
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
796
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1118
797
|
const slotName = childNode["s-sn"];
|
|
1119
798
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1120
799
|
node = hostContentNodes[j];
|
|
@@ -1156,129 +835,632 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1156
835
|
}
|
|
1157
836
|
}
|
|
1158
837
|
};
|
|
1159
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1160
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1161
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1162
|
-
return true;
|
|
838
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
839
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
840
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
841
|
+
return true;
|
|
842
|
+
}
|
|
843
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
844
|
+
return true;
|
|
845
|
+
}
|
|
846
|
+
return false;
|
|
847
|
+
}
|
|
848
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
849
|
+
return true;
|
|
850
|
+
}
|
|
851
|
+
return slotName === "";
|
|
852
|
+
};
|
|
853
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
854
|
+
{
|
|
855
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
856
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
860
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
861
|
+
return inserted;
|
|
862
|
+
};
|
|
863
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
864
|
+
var _a, _b, _c, _d;
|
|
865
|
+
const hostElm = hostRef.$hostElement$;
|
|
866
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
867
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
868
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
869
|
+
hostTagName = hostElm.tagName;
|
|
870
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
871
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
872
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
873
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
rootVnode.$tag$ = null;
|
|
878
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
879
|
+
hostRef.$vnode$ = rootVnode;
|
|
880
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
881
|
+
{
|
|
882
|
+
scopeId = hostElm["s-sc"];
|
|
883
|
+
}
|
|
884
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
885
|
+
{
|
|
886
|
+
contentRef = hostElm["s-cr"];
|
|
887
|
+
checkSlotFallbackVisibility = false;
|
|
888
|
+
}
|
|
889
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
890
|
+
{
|
|
891
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
892
|
+
if (checkSlotRelocate) {
|
|
893
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
894
|
+
for (const relocateData of relocateNodes) {
|
|
895
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
896
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
897
|
+
const orgLocationNode = originalLocationDebugNode(nodeToRelocate) ;
|
|
898
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
899
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
for (const relocateData of relocateNodes) {
|
|
903
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
904
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
905
|
+
if (slotRefNode) {
|
|
906
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
907
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
908
|
+
{
|
|
909
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
910
|
+
while (orgLocationNode) {
|
|
911
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
912
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
913
|
+
refNode = refNode.nextSibling;
|
|
914
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
915
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
916
|
+
}
|
|
917
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
918
|
+
insertBeforeNode = refNode;
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
926
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
927
|
+
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
928
|
+
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
929
|
+
}
|
|
930
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
931
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
932
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
|
|
937
|
+
} else {
|
|
938
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
939
|
+
if (isInitialLoad) {
|
|
940
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
941
|
+
}
|
|
942
|
+
nodeToRelocate.hidden = true;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
if (checkSlotFallbackVisibility) {
|
|
948
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
949
|
+
}
|
|
950
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
951
|
+
relocateNodes.length = 0;
|
|
952
|
+
}
|
|
953
|
+
contentRef = void 0;
|
|
954
|
+
};
|
|
955
|
+
var slotReferenceDebugNode = (slotVNode) => doc.createComment(
|
|
956
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
957
|
+
);
|
|
958
|
+
var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
|
|
959
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
960
|
+
);
|
|
961
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
962
|
+
let slottedNodeLocation;
|
|
963
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
964
|
+
slottedNodeLocation = newChild["s-ol"];
|
|
965
|
+
} else {
|
|
966
|
+
slottedNodeLocation = document.createTextNode("");
|
|
967
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
968
|
+
}
|
|
969
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
970
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
971
|
+
const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
|
|
972
|
+
if (typeof position !== "undefined") {
|
|
973
|
+
{
|
|
974
|
+
slottedNodeLocation["s-oo"] = position;
|
|
975
|
+
const childNodes = parent.__childNodes || parent.childNodes;
|
|
976
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
977
|
+
childNodes.forEach((n) => {
|
|
978
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
979
|
+
});
|
|
980
|
+
slotRelocateNodes.sort((a, b) => {
|
|
981
|
+
if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
|
|
982
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
983
|
+
return 0;
|
|
984
|
+
});
|
|
985
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
986
|
+
}
|
|
987
|
+
} else {
|
|
988
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
989
|
+
}
|
|
990
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
991
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
992
|
+
};
|
|
993
|
+
var createTime = (fnName, tagName = "") => {
|
|
994
|
+
{
|
|
995
|
+
return () => {
|
|
996
|
+
return;
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
var uniqueTime = (key, measureText) => {
|
|
1001
|
+
{
|
|
1002
|
+
return () => {
|
|
1003
|
+
return;
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
// src/runtime/client-hydrate.ts
|
|
1009
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1010
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
1011
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
1012
|
+
const childRenderNodes = [];
|
|
1013
|
+
const slotNodes = [];
|
|
1014
|
+
const slottedNodes = [];
|
|
1015
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
1016
|
+
const vnode = newVNode(tagName, null);
|
|
1017
|
+
vnode.$elm$ = hostElm;
|
|
1018
|
+
if (!plt.$orgLocNodes$) {
|
|
1019
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1020
|
+
}
|
|
1021
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
1022
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
1023
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1024
|
+
vnode,
|
|
1025
|
+
childRenderNodes,
|
|
1026
|
+
slotNodes,
|
|
1027
|
+
shadowRootNodes,
|
|
1028
|
+
hostElm,
|
|
1029
|
+
hostElm,
|
|
1030
|
+
hostId,
|
|
1031
|
+
slottedNodes
|
|
1032
|
+
);
|
|
1033
|
+
let crIndex = 0;
|
|
1034
|
+
const crLength = childRenderNodes.length;
|
|
1035
|
+
let childRenderNode;
|
|
1036
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1037
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1038
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
1039
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
1040
|
+
const node = childRenderNode.$elm$;
|
|
1041
|
+
if (!shadowRoot) {
|
|
1042
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1043
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1044
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1048
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1049
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1050
|
+
}
|
|
1051
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1052
|
+
if (!shadowRoot) {
|
|
1053
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
1057
|
+
}
|
|
1058
|
+
const hosts = [];
|
|
1059
|
+
let snIndex = 0;
|
|
1060
|
+
const snLen = slottedNodes.length;
|
|
1061
|
+
let slotGroup;
|
|
1062
|
+
let snGroupIdx;
|
|
1063
|
+
let snGroupLen;
|
|
1064
|
+
let slottedItem;
|
|
1065
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1066
|
+
slotGroup = slottedNodes[snIndex];
|
|
1067
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1068
|
+
snGroupLen = slotGroup.length;
|
|
1069
|
+
snGroupIdx = 0;
|
|
1070
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1071
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1072
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1073
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1074
|
+
}
|
|
1075
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1076
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1077
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1078
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1079
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1080
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1081
|
+
} else {
|
|
1082
|
+
const hostChildren = hostEle.__childNodes || hostEle.childNodes;
|
|
1083
|
+
slottedItem.slot["s-cr"] = hostChildren[0];
|
|
1084
|
+
}
|
|
1085
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1086
|
+
}
|
|
1087
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1088
|
+
hostEle.appendChild(slottedItem.node);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
if (shadowRoot) {
|
|
1093
|
+
let rnIdex = 0;
|
|
1094
|
+
const rnLen = shadowRootNodes.length;
|
|
1095
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1096
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1097
|
+
}
|
|
1098
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1099
|
+
if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
|
|
1100
|
+
node.parentNode.removeChild(node);
|
|
1101
|
+
}
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
hostRef.$hostElement$ = hostElm;
|
|
1105
|
+
endHydrate();
|
|
1106
|
+
};
|
|
1107
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
1108
|
+
let childNodeType;
|
|
1109
|
+
let childIdSplt;
|
|
1110
|
+
let childVNode;
|
|
1111
|
+
let i2;
|
|
1112
|
+
const scopeId2 = hostElm["s-sc"];
|
|
1113
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1114
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
1115
|
+
if (childNodeType) {
|
|
1116
|
+
childIdSplt = childNodeType.split(".");
|
|
1117
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
1118
|
+
childVNode = createSimpleVNode({
|
|
1119
|
+
$flags$: 0,
|
|
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` reconciliation will fail:
|
|
1127
|
+
// client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
|
|
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
|
+
if (scopeId2) node["s-si"] = scopeId2;
|
|
1157
|
+
parentVNode = childVNode;
|
|
1158
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1159
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
if (node.shadowRoot) {
|
|
1164
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
1165
|
+
clientHydrate(
|
|
1166
|
+
parentVNode,
|
|
1167
|
+
childRenderNodes,
|
|
1168
|
+
slotNodes,
|
|
1169
|
+
shadowRootNodes,
|
|
1170
|
+
hostElm,
|
|
1171
|
+
node.shadowRoot.childNodes[i2],
|
|
1172
|
+
hostId,
|
|
1173
|
+
slottedNodes
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1178
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
1179
|
+
clientHydrate(
|
|
1180
|
+
parentVNode,
|
|
1181
|
+
childRenderNodes,
|
|
1182
|
+
slotNodes,
|
|
1183
|
+
shadowRootNodes,
|
|
1184
|
+
hostElm,
|
|
1185
|
+
nonShadowNodes[i2],
|
|
1186
|
+
hostId,
|
|
1187
|
+
slottedNodes
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1191
|
+
childIdSplt = node.nodeValue.split(".");
|
|
1192
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
1193
|
+
childNodeType = childIdSplt[0];
|
|
1194
|
+
childVNode = createSimpleVNode({
|
|
1195
|
+
$hostId$: childIdSplt[1],
|
|
1196
|
+
$nodeId$: childIdSplt[2],
|
|
1197
|
+
$depth$: childIdSplt[3],
|
|
1198
|
+
$index$: childIdSplt[4] || "0",
|
|
1199
|
+
$elm$: node,
|
|
1200
|
+
$attrs$: null,
|
|
1201
|
+
$children$: null,
|
|
1202
|
+
$key$: null,
|
|
1203
|
+
$name$: null,
|
|
1204
|
+
$tag$: null,
|
|
1205
|
+
$text$: null
|
|
1206
|
+
});
|
|
1207
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
1208
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1209
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
1210
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
1211
|
+
childRenderNodes.push(childVNode);
|
|
1212
|
+
node.remove();
|
|
1213
|
+
if (hostId === childVNode.$hostId$) {
|
|
1214
|
+
if (!parentVNode.$children$) {
|
|
1215
|
+
parentVNode.$children$ = [];
|
|
1216
|
+
}
|
|
1217
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1218
|
+
}
|
|
1219
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
1220
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1224
|
+
childVNode.$elm$ = node.nextSibling;
|
|
1225
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1226
|
+
childRenderNodes.push(childVNode);
|
|
1227
|
+
node.remove();
|
|
1228
|
+
}
|
|
1229
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
1230
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
1231
|
+
childVNode.$tag$ = "slot";
|
|
1232
|
+
const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
|
|
1233
|
+
addSlot(
|
|
1234
|
+
slotName,
|
|
1235
|
+
childIdSplt[2],
|
|
1236
|
+
childVNode,
|
|
1237
|
+
node,
|
|
1238
|
+
parentVNode,
|
|
1239
|
+
childRenderNodes,
|
|
1240
|
+
slotNodes,
|
|
1241
|
+
shadowRootNodes,
|
|
1242
|
+
slottedNodes
|
|
1243
|
+
);
|
|
1244
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
1245
|
+
if (shadowRootNodes) {
|
|
1246
|
+
node.remove();
|
|
1247
|
+
} else {
|
|
1248
|
+
hostElm["s-cr"] = node;
|
|
1249
|
+
node["s-cn"] = true;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
1255
|
+
const vnode = newVNode(null, node.textContent);
|
|
1256
|
+
vnode.$elm$ = node;
|
|
1257
|
+
vnode.$index$ = "0";
|
|
1258
|
+
parentVNode.$children$ = [vnode];
|
|
1259
|
+
}
|
|
1260
|
+
return parentVNode;
|
|
1261
|
+
};
|
|
1262
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
1263
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
1264
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1265
|
+
if (componentId) {
|
|
1266
|
+
orgLocNodes.set(componentId, node);
|
|
1267
|
+
}
|
|
1268
|
+
let i2 = 0;
|
|
1269
|
+
if (node.shadowRoot) {
|
|
1270
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
1271
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1275
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1276
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
1277
|
+
}
|
|
1278
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
1279
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
1280
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
1281
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
1282
|
+
node.nodeValue = "";
|
|
1283
|
+
node["s-en"] = childIdSplt[3];
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1287
|
+
var createSimpleVNode = (vnode) => {
|
|
1288
|
+
const defaultVNode = {
|
|
1289
|
+
$flags$: 0,
|
|
1290
|
+
$hostId$: null,
|
|
1291
|
+
$nodeId$: null,
|
|
1292
|
+
$depth$: null,
|
|
1293
|
+
$index$: "0",
|
|
1294
|
+
$elm$: null,
|
|
1295
|
+
$attrs$: null,
|
|
1296
|
+
$children$: null,
|
|
1297
|
+
$key$: null,
|
|
1298
|
+
$name$: null,
|
|
1299
|
+
$tag$: null,
|
|
1300
|
+
$text$: null
|
|
1301
|
+
};
|
|
1302
|
+
return { ...defaultVNode, ...vnode };
|
|
1303
|
+
};
|
|
1304
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1305
|
+
node["s-sr"] = true;
|
|
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);
|
|
1311
|
+
}
|
|
1312
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1313
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1314
|
+
} else {
|
|
1315
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1163
1316
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1317
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1318
|
+
node.remove();
|
|
1319
|
+
if (childVNode.$depth$ === "0") {
|
|
1320
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1166
1321
|
}
|
|
1167
|
-
|
|
1322
|
+
} else {
|
|
1323
|
+
const slot = childVNode.$elm$;
|
|
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]);
|
|
1328
|
+
}
|
|
1329
|
+
childRenderNodes.push(childVNode);
|
|
1168
1330
|
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1331
|
+
slotNodes.push(childVNode);
|
|
1332
|
+
if (!parentVNode.$children$) {
|
|
1333
|
+
parentVNode.$children$ = [];
|
|
1171
1334
|
}
|
|
1172
|
-
|
|
1173
|
-
}
|
|
1174
|
-
var
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1335
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1336
|
+
}
|
|
1337
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1338
|
+
let slottedNode = slotNode.nextSibling;
|
|
1339
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
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;
|
|
1178
1344
|
}
|
|
1179
1345
|
};
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1185
|
-
var _a, _b, _c, _d;
|
|
1186
|
-
const hostElm = hostRef.$hostElement$;
|
|
1187
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
1188
|
-
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1189
|
-
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1190
|
-
hostTagName = hostElm.tagName;
|
|
1191
|
-
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1192
|
-
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1193
|
-
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
1194
|
-
rootVnode.$attrs$[key] = hostElm[key];
|
|
1195
|
-
}
|
|
1346
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
1347
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1348
|
+
if (propType & 4 /* Boolean */) {
|
|
1349
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1196
1350
|
}
|
|
1351
|
+
if (propType & 2 /* Number */) {
|
|
1352
|
+
return parseFloat(propValue);
|
|
1353
|
+
}
|
|
1354
|
+
if (propType & 1 /* String */) {
|
|
1355
|
+
return String(propValue);
|
|
1356
|
+
}
|
|
1357
|
+
return propValue;
|
|
1197
1358
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1359
|
+
return propValue;
|
|
1360
|
+
};
|
|
1361
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
1362
|
+
|
|
1363
|
+
// src/runtime/event-emitter.ts
|
|
1364
|
+
var createEvent = (ref, name, flags) => {
|
|
1365
|
+
const elm = getElement(ref);
|
|
1366
|
+
return {
|
|
1367
|
+
emit: (detail) => {
|
|
1368
|
+
return emitEvent(elm, name, {
|
|
1369
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1370
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1371
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1372
|
+
detail
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
var emitEvent = (elm, name, opts) => {
|
|
1378
|
+
const ev = plt.ce(name, opts);
|
|
1379
|
+
elm.dispatchEvent(ev);
|
|
1380
|
+
return ev;
|
|
1381
|
+
};
|
|
1382
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1383
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1384
|
+
let style = styles.get(scopeId2);
|
|
1206
1385
|
{
|
|
1207
|
-
|
|
1208
|
-
checkSlotFallbackVisibility = false;
|
|
1386
|
+
style = cssText;
|
|
1209
1387
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1388
|
+
styles.set(scopeId2, style);
|
|
1389
|
+
};
|
|
1390
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1391
|
+
var _a;
|
|
1392
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1393
|
+
const style = styles.get(scopeId2);
|
|
1394
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
1395
|
+
if (style) {
|
|
1396
|
+
if (typeof style === "string") {
|
|
1397
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1398
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1399
|
+
let styleElm;
|
|
1400
|
+
if (!appliedStyles) {
|
|
1401
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1222
1402
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1233
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1234
|
-
refNode = refNode.nextSibling;
|
|
1235
|
-
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1236
|
-
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1237
|
-
}
|
|
1238
|
-
if (!refNode || !refNode["s-nr"]) {
|
|
1239
|
-
insertBeforeNode = refNode;
|
|
1240
|
-
break;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
orgLocationNode = orgLocationNode.previousSibling;
|
|
1244
|
-
}
|
|
1403
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1404
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1405
|
+
styleElm.innerHTML = style;
|
|
1406
|
+
} else {
|
|
1407
|
+
styleElm = doc.createElement("style");
|
|
1408
|
+
styleElm.innerHTML = style;
|
|
1409
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
1410
|
+
if (nonce != null) {
|
|
1411
|
+
styleElm.setAttribute("nonce", nonce);
|
|
1245
1412
|
}
|
|
1246
|
-
if (
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1413
|
+
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1414
|
+
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1415
|
+
}
|
|
1416
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1417
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1418
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
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
|
+
}
|
|
1254
1429
|
}
|
|
1430
|
+
} else {
|
|
1431
|
+
styleContainerNode.append(styleElm);
|
|
1255
1432
|
}
|
|
1256
1433
|
}
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1260
|
-
if (isInitialLoad) {
|
|
1261
|
-
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1262
|
-
}
|
|
1263
|
-
nodeToRelocate.hidden = true;
|
|
1434
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
1435
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
1264
1436
|
}
|
|
1265
1437
|
}
|
|
1438
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1439
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
1440
|
+
}
|
|
1441
|
+
if (appliedStyles) {
|
|
1442
|
+
appliedStyles.add(scopeId2);
|
|
1443
|
+
}
|
|
1266
1444
|
}
|
|
1267
1445
|
}
|
|
1268
|
-
if (checkSlotFallbackVisibility) {
|
|
1269
|
-
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1270
|
-
}
|
|
1271
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1272
|
-
relocateNodes.length = 0;
|
|
1273
1446
|
}
|
|
1274
|
-
|
|
1447
|
+
return scopeId2;
|
|
1275
1448
|
};
|
|
1276
|
-
var
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
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();
|
|
1462
|
+
};
|
|
1463
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
1282
1464
|
|
|
1283
1465
|
// src/runtime/update-component.ts
|
|
1284
1466
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -1512,16 +1694,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1512
1694
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1513
1695
|
members.map(([memberName, [memberFlags]]) => {
|
|
1514
1696
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1697
|
+
if ((memberFlags & 2048 /* Getter */) === 0) {
|
|
1698
|
+
Object.defineProperty(prototype, memberName, {
|
|
1699
|
+
get() {
|
|
1700
|
+
return getValue(this, memberName);
|
|
1701
|
+
},
|
|
1702
|
+
set(newValue) {
|
|
1703
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
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() {
|
|
1712
|
+
const ref = getHostRef(this);
|
|
1713
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1714
|
+
if (!instance) return;
|
|
1715
|
+
return instance[memberName];
|
|
1716
|
+
},
|
|
1717
|
+
configurable: true,
|
|
1718
|
+
enumerable: true
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
if (memberFlags & 4096 /* Setter */) {
|
|
1722
|
+
const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
|
|
1723
|
+
Object.defineProperty(prototype, memberName, {
|
|
1724
|
+
set(newValue) {
|
|
1725
|
+
const ref = getHostRef(this);
|
|
1726
|
+
if (origSetter) {
|
|
1727
|
+
const currentValue = ref.$hostElement$[memberName];
|
|
1728
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1729
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1730
|
+
}
|
|
1731
|
+
origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
|
|
1732
|
+
setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
|
|
1733
|
+
return;
|
|
1734
|
+
}
|
|
1735
|
+
if (!ref) return;
|
|
1736
|
+
const setterSetVal = () => {
|
|
1737
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1738
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1739
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
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());
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1525
1753
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1526
1754
|
Object.defineProperty(prototype, memberName, {
|
|
1527
1755
|
value(...args) {
|
|
@@ -1561,7 +1789,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1561
1789
|
}
|
|
1562
1790
|
return;
|
|
1563
1791
|
}
|
|
1564
|
-
|
|
1792
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1793
|
+
if (!propDesc.get || !!propDesc.set) {
|
|
1794
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1795
|
+
}
|
|
1565
1796
|
});
|
|
1566
1797
|
};
|
|
1567
1798
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1722,6 +1953,9 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
1722
1953
|
childId = `${hostId}.${nodeId}`;
|
|
1723
1954
|
if (nodeRef.nodeType === 1 /* ElementNode */) {
|
|
1724
1955
|
nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
1956
|
+
if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
|
|
1957
|
+
nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
|
|
1958
|
+
}
|
|
1725
1959
|
} else if (nodeRef.nodeType === 3 /* TextNode */) {
|
|
1726
1960
|
if (hostId === 0) {
|
|
1727
1961
|
const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
|
|
@@ -1733,6 +1967,10 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
1733
1967
|
const commentBeforeTextNode = doc2.createComment(childId);
|
|
1734
1968
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
1735
1969
|
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
1970
|
+
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
1971
|
+
const commentBeforeTextNode = doc2.createComment(childId);
|
|
1972
|
+
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
1973
|
+
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
1736
1974
|
}
|
|
1737
1975
|
}
|
|
1738
1976
|
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
@@ -1813,6 +2051,9 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
1813
2051
|
childElm["s-node-id"] = nodeId;
|
|
1814
2052
|
if (childElm.nodeType === 1 /* ElementNode */) {
|
|
1815
2053
|
childElm.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
2054
|
+
if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
|
|
2055
|
+
childElm.setAttribute("s-sn", childElm["s-sn"]);
|
|
2056
|
+
}
|
|
1816
2057
|
} else if (childElm.nodeType === 3 /* TextNode */) {
|
|
1817
2058
|
const parentNode = childElm.parentNode;
|
|
1818
2059
|
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
@@ -2224,7 +2465,6 @@ var plt = {
|
|
|
2224
2465
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2225
2466
|
ce: (eventName, opts) => new win.CustomEvent(eventName, opts)
|
|
2226
2467
|
};
|
|
2227
|
-
var supportsShadow = BUILD.shadowDom;
|
|
2228
2468
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
2229
2469
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
2230
2470
|
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
@@ -5845,7 +6085,7 @@ var NAMESPACE = (
|
|
|
5845
6085
|
);
|
|
5846
6086
|
|
|
5847
6087
|
/*
|
|
5848
|
-
Stencil Hydrate Runner v4.
|
|
6088
|
+
Stencil Hydrate Runner v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
5849
6089
|
*/
|
|
5850
6090
|
var __defProp = Object.defineProperty;
|
|
5851
6091
|
var __export = (target, all) => {
|
|
@@ -16275,7 +16515,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
16275
16515
|
text: []
|
|
16276
16516
|
};
|
|
16277
16517
|
let renderedNode = "";
|
|
16278
|
-
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm
|
|
16518
|
+
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
|
|
16279
16519
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
16280
16520
|
const child = children[i];
|
|
16281
16521
|
const chunks = Array.from(streamToHtml(child, opts, output));
|
|
@@ -16308,7 +16548,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
16308
16548
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
16309
16549
|
yield "<" + tag;
|
|
16310
16550
|
output.currentLineWidth += tag.length + 1;
|
|
16311
|
-
if (tag === "template") {
|
|
16551
|
+
if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode"))) {
|
|
16312
16552
|
const mode = ` shadowrootmode="open"`;
|
|
16313
16553
|
yield mode;
|
|
16314
16554
|
output.currentLineWidth += mode.length;
|
|
@@ -16392,7 +16632,8 @@ style="${cssText}">`;
|
|
|
16392
16632
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
16393
16633
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
16394
16634
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
16395
|
-
|
|
16635
|
+
const childNodes = getChildNodes(node);
|
|
16636
|
+
if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
|
|
16396
16637
|
yield "\n";
|
|
16397
16638
|
output.currentLineWidth = 0;
|
|
16398
16639
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -16403,7 +16644,7 @@ style="${cssText}">`;
|
|
|
16403
16644
|
}
|
|
16404
16645
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
16405
16646
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
16406
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
16647
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
16407
16648
|
const childNodeLength = childNodes.length;
|
|
16408
16649
|
if (childNodeLength > 0) {
|
|
16409
16650
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -16576,6 +16817,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
16576
16817
|
}
|
|
16577
16818
|
return false;
|
|
16578
16819
|
}
|
|
16820
|
+
function getChildNodes(node) {
|
|
16821
|
+
return node.__childNodes || node.childNodes;
|
|
16822
|
+
}
|
|
16579
16823
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
16580
16824
|
"STYLE",
|
|
16581
16825
|
"SCRIPT",
|
|
@@ -16845,10 +17089,12 @@ var MockElement = class extends MockNode2 {
|
|
|
16845
17089
|
attachInternals() {
|
|
16846
17090
|
return new Proxy({}, {
|
|
16847
17091
|
get: function(_target, prop, _receiver) {
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
17092
|
+
if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
|
|
17093
|
+
console.error(
|
|
17094
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
17095
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
17096
|
+
);
|
|
17097
|
+
}
|
|
16852
17098
|
}
|
|
16853
17099
|
});
|
|
16854
17100
|
}
|
|
@@ -20055,11 +20301,11 @@ var unwrapErr = (result) => {
|
|
|
20055
20301
|
throw result.value;
|
|
20056
20302
|
}
|
|
20057
20303
|
};
|
|
20304
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20305
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20058
20306
|
|
|
20059
20307
|
// src/runtime/mode.ts
|
|
20060
20308
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
20061
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
20062
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
20063
20309
|
|
|
20064
20310
|
// src/compiler/html/canonical-link.ts
|
|
20065
20311
|
var updateCanonicalLink = (doc2, href) => {
|