vviinn-widgets 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/{app-globals-e86c9512.js → app-globals-eea7941d.js} +1 -1
  2. package/dist/cjs/cropper-handler_28.cjs.entry.js +2 -2
  3. package/dist/cjs/{imageSearch.store-200f1dce.js → imageSearch.store-9badba6d.js} +1 -1
  4. package/dist/cjs/{index-c376feb2.js → index-fe4d4ff2.js} +358 -8
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/{products.worker-e95a092f.js → products.worker-053e042f.js} +2 -2
  7. package/dist/cjs/{vpr-slider-9c9797ca.js → vpr-slider-65d574c0.js} +2 -2
  8. package/dist/cjs/vpr-slider.cjs.entry.js +2 -2
  9. package/dist/cjs/vviinn-vpr-widget.cjs.entry.js +2 -2
  10. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  11. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -1
  12. package/dist/esm/{app-globals-0e46d4b4.js → app-globals-330036ec.js} +1 -1
  13. package/dist/esm/cropper-handler_28.entry.js +2 -2
  14. package/dist/esm/{imageSearch.store-7e73d83d.js → imageSearch.store-b6fbd866.js} +1 -1
  15. package/dist/esm/{index-e2722720.js → index-d6f8815f.js} +358 -8
  16. package/dist/esm/loader.js +3 -3
  17. package/dist/esm/{products.worker-14d7f8b2.js → products.worker-d8ebf5fc.js} +2 -2
  18. package/dist/esm/{vpr-slider-da10c24c.js → vpr-slider-c5a7e0f6.js} +2 -2
  19. package/dist/esm/vpr-slider.entry.js +2 -2
  20. package/dist/esm/vviinn-vpr-widget.entry.js +2 -2
  21. package/dist/esm/vviinn-widgets.js +3 -3
  22. package/dist/vviinn-widgets/{p-0de05e2b.entry.js → p-0d4aeff5.entry.js} +1 -1
  23. package/dist/vviinn-widgets/p-11901002.js +1 -0
  24. package/{www/build/p-35df1067.js → dist/vviinn-widgets/p-35281467.js} +1 -1
  25. package/dist/vviinn-widgets/{p-a82ba7e9.js → p-8dd2b524.js} +1 -1
  26. package/dist/vviinn-widgets/{p-afe4ba7a.js → p-a18c9fd0.js} +1 -1
  27. package/{www/build/p-67af524f.entry.js → dist/vviinn-widgets/p-ab707f1d.entry.js} +1 -1
  28. package/dist/vviinn-widgets/p-b712167e.js +1 -0
  29. package/dist/vviinn-widgets/p-c290a38a.entry.js +1 -0
  30. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  31. package/package.json +1 -1
  32. package/www/build/{p-0de05e2b.entry.js → p-0d4aeff5.entry.js} +1 -1
  33. package/www/build/p-11901002.js +1 -0
  34. package/{dist/vviinn-widgets/p-35df1067.js → www/build/p-35281467.js} +1 -1
  35. package/www/build/{p-a82ba7e9.js → p-8dd2b524.js} +1 -1
  36. package/www/build/{p-afe4ba7a.js → p-a18c9fd0.js} +1 -1
  37. package/{dist/vviinn-widgets/p-67af524f.entry.js → www/build/p-ab707f1d.entry.js} +1 -1
  38. package/www/build/p-b712167e.js +1 -0
  39. package/www/build/{p-4b267904.js → p-c0a19108.js} +1 -1
  40. package/www/build/p-c290a38a.entry.js +1 -0
  41. package/www/build/vviinn-widgets.esm.js +1 -1
  42. package/www/index.html +1 -1
  43. package/dist/vviinn-widgets/p-067e0ddf.js +0 -1
  44. package/dist/vviinn-widgets/p-412b690d.entry.js +0 -1
  45. package/dist/vviinn-widgets/p-836a1d8e.js +0 -1
  46. package/www/build/p-067e0ddf.js +0 -1
  47. package/www/build/p-412b690d.entry.js +0 -1
  48. package/www/build/p-836a1d8e.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c376feb2.js');
3
+ const index = require('./index-fe4d4ff2.js');
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c376feb2.js');
6
- const imageSearch_store = require('./imageSearch.store-200f1dce.js');
5
+ const index = require('./index-fe4d4ff2.js');
6
+ const imageSearch_store = require('./imageSearch.store-9badba6d.js');
7
7
 
8
8
  const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
9
9
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c376feb2.js');
3
+ const index = require('./index-fe4d4ff2.js');
4
4
 
5
5
  // -------------------------------------------------------------------------------------
6
6
  /**
@@ -21,10 +21,14 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'vviinn-widgets';
24
- const Env = /* vviinn-widgets */ {"packageVersion":"0.9.9","packageName":"vviinn-widgets"};
24
+ const Env = /* vviinn-widgets */ {"packageVersion":"0.9.10","packageName":"vviinn-widgets"};
25
25
 
26
26
  let scopeId;
27
+ let contentRef;
27
28
  let hostTagName;
29
+ let useNativeShadowDom = false;
30
+ let checkSlotFallbackVisibility = false;
31
+ let checkSlotRelocate = false;
28
32
  let isSvgMode = false;
29
33
  let renderingRef = null;
30
34
  let queuePending = false;
@@ -190,6 +194,7 @@ const isComplexType = (o) => {
190
194
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
191
195
  const h = (nodeName, vnodeData, ...children) => {
192
196
  let child = null;
197
+ let slotName = null;
193
198
  let simple = false;
194
199
  let lastSimple = false;
195
200
  let vNodeChildren = [];
@@ -217,6 +222,9 @@ const h = (nodeName, vnodeData, ...children) => {
217
222
  };
218
223
  walk(children);
219
224
  if (vnodeData) {
225
+ if (vnodeData.name) {
226
+ slotName = vnodeData.name;
227
+ }
220
228
  {
221
229
  const classData = vnodeData.className || vnodeData.class;
222
230
  if (classData) {
@@ -238,6 +246,9 @@ const h = (nodeName, vnodeData, ...children) => {
238
246
  if (vNodeChildren.length > 0) {
239
247
  vnode.$children$ = vNodeChildren;
240
248
  }
249
+ {
250
+ vnode.$name$ = slotName;
251
+ }
241
252
  return vnode;
242
253
  };
243
254
  const newVNode = (tag, text) => {
@@ -251,6 +262,9 @@ const newVNode = (tag, text) => {
251
262
  {
252
263
  vnode.$attrs$ = null;
253
264
  }
265
+ {
266
+ vnode.$name$ = null;
267
+ }
254
268
  return vnode;
255
269
  };
256
270
  const Host = {};
@@ -442,16 +456,39 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
442
456
  let i = 0;
443
457
  let elm;
444
458
  let childNode;
459
+ let oldVNode;
460
+ if (!useNativeShadowDom) {
461
+ // remember for later we need to check to relocate nodes
462
+ checkSlotRelocate = true;
463
+ if (newVNode.$tag$ === 'slot') {
464
+ if (scopeId) {
465
+ // scoped css needs to add its scoped id to the parent element
466
+ parentElm.classList.add(scopeId + '-s');
467
+ }
468
+ newVNode.$flags$ |= newVNode.$children$
469
+ ? // slot element has fallback content
470
+ 2 /* isSlotFallback */
471
+ : // slot element does not have fallback content
472
+ 1 /* isSlotReference */;
473
+ }
474
+ }
445
475
  if (newVNode.$text$ !== null) {
446
476
  // create text node
447
477
  elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
448
478
  }
479
+ else if (newVNode.$flags$ & 1 /* isSlotReference */) {
480
+ // create a slot reference node
481
+ elm = newVNode.$elm$ =
482
+ doc.createTextNode('');
483
+ }
449
484
  else {
450
485
  if (!isSvgMode) {
451
486
  isSvgMode = newVNode.$tag$ === 'svg';
452
487
  }
453
488
  // create element
454
- elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
489
+ elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
490
+ ? 'slot-fb'
491
+ : newVNode.$tag$)
455
492
  );
456
493
  if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
457
494
  isSvgMode = false;
@@ -468,7 +505,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
468
505
  if (newVNode.$children$) {
469
506
  for (i = 0; i < newVNode.$children$.length; ++i) {
470
507
  // create the node
471
- childNode = createElm(oldParentVNode, newVNode, i);
508
+ childNode = createElm(oldParentVNode, newVNode, i, elm);
472
509
  // return node could have been null
473
510
  if (childNode) {
474
511
  // append our new node
@@ -487,20 +524,62 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
487
524
  }
488
525
  }
489
526
  }
527
+ {
528
+ elm['s-hn'] = hostTagName;
529
+ if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
530
+ // remember the content reference comment
531
+ elm['s-sr'] = true;
532
+ // remember the content reference comment
533
+ elm['s-cr'] = contentRef;
534
+ // remember the slot name, or empty string for default slot
535
+ elm['s-sn'] = newVNode.$name$ || '';
536
+ // check if we've got an old vnode for this slot
537
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
538
+ if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
539
+ // we've got an old slot vnode and the wrapper is being replaced
540
+ // so let's move the old slot content back to it's original location
541
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
542
+ }
543
+ }
544
+ }
490
545
  return elm;
491
546
  };
547
+ const putBackInOriginalLocation = (parentElm, recursive) => {
548
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
549
+ const oldSlotChildNodes = parentElm.childNodes;
550
+ for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
551
+ const childNode = oldSlotChildNodes[i];
552
+ if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
553
+ // // this child node in the old element is from another component
554
+ // // remove this node from the old slot's parent
555
+ // childNode.remove();
556
+ // and relocate it back to it's original location
557
+ parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
558
+ // remove the old original location comment entirely
559
+ // later on the patch function will know what to do
560
+ // and move this to the correct spot in need be
561
+ childNode['s-ol'].remove();
562
+ childNode['s-ol'] = undefined;
563
+ checkSlotRelocate = true;
564
+ }
565
+ if (recursive) {
566
+ putBackInOriginalLocation(childNode, recursive);
567
+ }
568
+ }
569
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
570
+ };
492
571
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
493
- let containerElm = (parentElm);
572
+ let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
494
573
  let childNode;
495
574
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
496
575
  containerElm = containerElm.shadowRoot;
497
576
  }
498
577
  for (; startIdx <= endIdx; ++startIdx) {
499
578
  if (vnodes[startIdx]) {
500
- childNode = createElm(null, parentVNode, startIdx);
579
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
501
580
  if (childNode) {
502
581
  vnodes[startIdx].$elm$ = childNode;
503
- containerElm.insertBefore(childNode, before);
582
+ containerElm.insertBefore(childNode, referenceNode(before) );
504
583
  }
505
584
  }
506
585
  }
@@ -510,6 +589,20 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
510
589
  if ((vnode = vnodes[startIdx])) {
511
590
  elm = vnode.$elm$;
512
591
  callNodeRefs(vnode);
592
+ {
593
+ // we're removing this element
594
+ // so it's possible we need to show slot fallback content now
595
+ checkSlotFallbackVisibility = true;
596
+ if (elm['s-ol']) {
597
+ // remove the original location comment
598
+ elm['s-ol'].remove();
599
+ }
600
+ else {
601
+ // it's possible that child nodes of the node
602
+ // that's being removed are slot nodes
603
+ putBackInOriginalLocation(elm, true);
604
+ }
605
+ }
513
606
  // remove the vnode's element from the dom
514
607
  elm.remove();
515
608
  }
@@ -550,12 +643,20 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
550
643
  newEndVnode = newCh[--newEndIdx];
551
644
  }
552
645
  else if (isSameVnode(oldStartVnode, newEndVnode)) {
646
+ // Vnode moved right
647
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
648
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
649
+ }
553
650
  patch(oldStartVnode, newEndVnode);
554
651
  parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
555
652
  oldStartVnode = oldCh[++oldStartIdx];
556
653
  newEndVnode = newCh[--newEndIdx];
557
654
  }
558
655
  else if (isSameVnode(oldEndVnode, newStartVnode)) {
656
+ // Vnode moved left
657
+ if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
658
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
659
+ }
559
660
  patch(oldEndVnode, newStartVnode);
560
661
  parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
561
662
  oldEndVnode = oldCh[--oldEndIdx];
@@ -564,12 +665,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
564
665
  else {
565
666
  {
566
667
  // new element
567
- node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
668
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
568
669
  newStartVnode = newCh[++newStartIdx];
569
670
  }
570
671
  if (node) {
571
672
  {
572
- oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
673
+ parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
573
674
  }
574
675
  }
575
676
  }
@@ -585,16 +686,28 @@ const isSameVnode = (vnode1, vnode2) => {
585
686
  // compare if two vnode to see if they're "technically" the same
586
687
  // need to have the same element tag, and same key to be the same
587
688
  if (vnode1.$tag$ === vnode2.$tag$) {
689
+ if (vnode1.$tag$ === 'slot') {
690
+ return vnode1.$name$ === vnode2.$name$;
691
+ }
588
692
  return true;
589
693
  }
590
694
  return false;
591
695
  };
696
+ const referenceNode = (node) => {
697
+ // this node was relocated to a new location in the dom
698
+ // because of some other component's slot
699
+ // but we still have an html comment in place of where
700
+ // it's original location was according to it's original vdom
701
+ return (node && node['s-ol']) || node;
702
+ };
703
+ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
592
704
  const patch = (oldVNode, newVNode) => {
593
705
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
594
706
  const oldChildren = oldVNode.$children$;
595
707
  const newChildren = newVNode.$children$;
596
708
  const tag = newVNode.$tag$;
597
709
  const text = newVNode.$text$;
710
+ let defaultHolder;
598
711
  if (text === null) {
599
712
  {
600
713
  // test if we're rendering an svg element, or still rendering nodes inside of one
@@ -633,12 +746,147 @@ const patch = (oldVNode, newVNode) => {
633
746
  isSvgMode = false;
634
747
  }
635
748
  }
749
+ else if ((defaultHolder = elm['s-cr'])) {
750
+ // this element has slotted content
751
+ defaultHolder.parentNode.textContent = text;
752
+ }
636
753
  else if (oldVNode.$text$ !== text) {
637
754
  // update the text content for the text only vnode
638
755
  // and also only if the text is different than before
639
756
  elm.data = text;
640
757
  }
641
758
  };
759
+ const updateFallbackSlotVisibility = (elm) => {
760
+ // tslint:disable-next-line: prefer-const
761
+ let childNodes = elm.childNodes;
762
+ let childNode;
763
+ let i;
764
+ let ilen;
765
+ let j;
766
+ let slotNameAttr;
767
+ let nodeType;
768
+ for (i = 0, ilen = childNodes.length; i < ilen; i++) {
769
+ childNode = childNodes[i];
770
+ if (childNode.nodeType === 1 /* ElementNode */) {
771
+ if (childNode['s-sr']) {
772
+ // this is a slot fallback node
773
+ // get the slot name for this slot reference node
774
+ slotNameAttr = childNode['s-sn'];
775
+ // by default always show a fallback slot node
776
+ // then hide it if there are other slots in the light dom
777
+ childNode.hidden = false;
778
+ for (j = 0; j < ilen; j++) {
779
+ nodeType = childNodes[j].nodeType;
780
+ if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
781
+ // this sibling node is from a different component OR is a named fallback slot node
782
+ if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
783
+ childNode.hidden = true;
784
+ break;
785
+ }
786
+ }
787
+ else {
788
+ // this is a default fallback slot node
789
+ // any element or text node (with content)
790
+ // should hide the default fallback slot node
791
+ if (nodeType === 1 /* ElementNode */ ||
792
+ (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
793
+ childNode.hidden = true;
794
+ break;
795
+ }
796
+ }
797
+ }
798
+ }
799
+ // keep drilling down
800
+ updateFallbackSlotVisibility(childNode);
801
+ }
802
+ }
803
+ };
804
+ const relocateNodes = [];
805
+ const relocateSlotContent = (elm) => {
806
+ // tslint:disable-next-line: prefer-const
807
+ let childNode;
808
+ let node;
809
+ let hostContentNodes;
810
+ let slotNameAttr;
811
+ let relocateNodeData;
812
+ let j;
813
+ let i = 0;
814
+ let childNodes = elm.childNodes;
815
+ let ilen = childNodes.length;
816
+ for (; i < ilen; i++) {
817
+ childNode = childNodes[i];
818
+ if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
819
+ // first got the content reference comment node
820
+ // then we got it's parent, which is where all the host content is in now
821
+ hostContentNodes = node.parentNode.childNodes;
822
+ slotNameAttr = childNode['s-sn'];
823
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
824
+ node = hostContentNodes[j];
825
+ if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
826
+ // let's do some relocating to its new home
827
+ // but never relocate a content reference node
828
+ // that is suppose to always represent the original content location
829
+ if (isNodeLocatedInSlot(node, slotNameAttr)) {
830
+ // it's possible we've already decided to relocate this node
831
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
832
+ // made some changes to slots
833
+ // let's make sure we also double check
834
+ // fallbacks are correctly hidden or shown
835
+ checkSlotFallbackVisibility = true;
836
+ node['s-sn'] = node['s-sn'] || slotNameAttr;
837
+ if (relocateNodeData) {
838
+ // previously we never found a slot home for this node
839
+ // but turns out we did, so let's remember it now
840
+ relocateNodeData.$slotRefNode$ = childNode;
841
+ }
842
+ else {
843
+ // add to our list of nodes to relocate
844
+ relocateNodes.push({
845
+ $slotRefNode$: childNode,
846
+ $nodeToRelocate$: node,
847
+ });
848
+ }
849
+ if (node['s-sr']) {
850
+ relocateNodes.map((relocateNode) => {
851
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
852
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
853
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
854
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
855
+ }
856
+ }
857
+ });
858
+ }
859
+ }
860
+ else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
861
+ // so far this element does not have a slot home, not setting slotRefNode on purpose
862
+ // if we never find a home for this element then we'll need to hide it
863
+ relocateNodes.push({
864
+ $nodeToRelocate$: node,
865
+ });
866
+ }
867
+ }
868
+ }
869
+ }
870
+ if (childNode.nodeType === 1 /* ElementNode */) {
871
+ relocateSlotContent(childNode);
872
+ }
873
+ }
874
+ };
875
+ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
876
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
877
+ if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
878
+ return true;
879
+ }
880
+ if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
881
+ return true;
882
+ }
883
+ return false;
884
+ }
885
+ if (nodeToRelocate['s-sn'] === slotNameAttr) {
886
+ return true;
887
+ }
888
+ return slotNameAttr === '';
889
+ };
642
890
  const callNodeRefs = (vNode) => {
643
891
  {
644
892
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -662,8 +910,90 @@ const renderVdom = (hostRef, renderFnResults) => {
662
910
  {
663
911
  scopeId = hostElm['s-sc'];
664
912
  }
913
+ {
914
+ contentRef = hostElm['s-cr'];
915
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
916
+ // always reset
917
+ checkSlotFallbackVisibility = false;
918
+ }
665
919
  // synchronous patch
666
920
  patch(oldVNode, rootVnode);
921
+ {
922
+ // while we're moving nodes around existing nodes, temporarily disable
923
+ // the disconnectCallback from working
924
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
925
+ if (checkSlotRelocate) {
926
+ relocateSlotContent(rootVnode.$elm$);
927
+ let relocateData;
928
+ let nodeToRelocate;
929
+ let orgLocationNode;
930
+ let parentNodeRef;
931
+ let insertBeforeNode;
932
+ let refNode;
933
+ let i = 0;
934
+ for (; i < relocateNodes.length; i++) {
935
+ relocateData = relocateNodes[i];
936
+ nodeToRelocate = relocateData.$nodeToRelocate$;
937
+ if (!nodeToRelocate['s-ol']) {
938
+ // add a reference node marking this node's original location
939
+ // keep a reference to this node for later lookups
940
+ orgLocationNode =
941
+ doc.createTextNode('');
942
+ orgLocationNode['s-nr'] = nodeToRelocate;
943
+ nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
944
+ }
945
+ }
946
+ for (i = 0; i < relocateNodes.length; i++) {
947
+ relocateData = relocateNodes[i];
948
+ nodeToRelocate = relocateData.$nodeToRelocate$;
949
+ if (relocateData.$slotRefNode$) {
950
+ // by default we're just going to insert it directly
951
+ // after the slot reference node
952
+ parentNodeRef = relocateData.$slotRefNode$.parentNode;
953
+ insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
954
+ orgLocationNode = nodeToRelocate['s-ol'];
955
+ while ((orgLocationNode = orgLocationNode.previousSibling)) {
956
+ refNode = orgLocationNode['s-nr'];
957
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
958
+ refNode = refNode.nextSibling;
959
+ if (!refNode || !refNode['s-nr']) {
960
+ insertBeforeNode = refNode;
961
+ break;
962
+ }
963
+ }
964
+ }
965
+ if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
966
+ nodeToRelocate.nextSibling !== insertBeforeNode) {
967
+ // we've checked that it's worth while to relocate
968
+ // since that the node to relocate
969
+ // has a different next sibling or parent relocated
970
+ if (nodeToRelocate !== insertBeforeNode) {
971
+ if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
972
+ // probably a component in the index.html that doesn't have it's hostname set
973
+ nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
974
+ }
975
+ // add it back to the dom but in its new home
976
+ parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
977
+ }
978
+ }
979
+ }
980
+ else {
981
+ // this node doesn't have a slot home to go to, so let's hide it
982
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
983
+ nodeToRelocate.hidden = true;
984
+ }
985
+ }
986
+ }
987
+ }
988
+ if (checkSlotFallbackVisibility) {
989
+ updateFallbackSlotVisibility(rootVnode.$elm$);
990
+ }
991
+ // done moving nodes around
992
+ // allow the disconnect callback to work again
993
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
994
+ // always reset
995
+ relocateNodes.length = 0;
996
+ }
667
997
  };
668
998
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
669
999
  const createEvent = (ref, name, flags) => {
@@ -1132,6 +1462,15 @@ const connectedCallback = (elm) => {
1132
1462
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1133
1463
  // first time this component has connected
1134
1464
  hostRef.$flags$ |= 1 /* hasConnected */;
1465
+ {
1466
+ // initUpdate
1467
+ // if the slot polyfill is required we'll need to put some nodes
1468
+ // in here to act as original content anchors as we move nodes around
1469
+ // host element has been connected to the DOM
1470
+ if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
1471
+ setContentReference(elm);
1472
+ }
1473
+ }
1135
1474
  {
1136
1475
  // find the first ancestor component (if there is one) and register
1137
1476
  // this component as one of the actively loading child components for its ancestor
@@ -1173,6 +1512,17 @@ const connectedCallback = (elm) => {
1173
1512
  endConnected();
1174
1513
  }
1175
1514
  };
1515
+ const setContentReference = (elm) => {
1516
+ // only required when we're NOT using native shadow dom (slot)
1517
+ // or this browser doesn't support native shadow dom
1518
+ // and this host element was NOT created with SSR
1519
+ // let's pick out the inner content for slot projection
1520
+ // create a node to represent where the original
1521
+ // content was first placed, which is useful later on
1522
+ const contentRefElm = (elm['s-cr'] = doc.createComment(''));
1523
+ contentRefElm['s-cn'] = true;
1524
+ elm.insertBefore(contentRefElm, elm.firstChild);
1525
+ };
1176
1526
  const disconnectedCallback = (elm) => {
1177
1527
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1178
1528
  const hostRef = getHostRef(elm);
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c376feb2.js');
6
- const appGlobals = require('./app-globals-e86c9512.js');
5
+ const index = require('./index-fe4d4ff2.js');
6
+ const appGlobals = require('./app-globals-eea7941d.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -16,7 +16,7 @@ const defineCustomElements = (win, options) => {
16
16
  if (typeof window === 'undefined') return Promise.resolve();
17
17
  return patchEsm().then(() => {
18
18
  appGlobals.globalScripts();
19
- return index.bootstrapLazy([["cropper-handler_28.cjs",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]],[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}],[1,"vviinn-image-view"],[0,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"imageLoaded":[32]}],[1,"vviinn-error"],[1,"vviinn-preloader"]]],["vpr-slider.cjs",[[0,"vpr-slider",{"mode":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productsInGrid":[2,"products-in-grid"],"wrappedItems":[32],"slidePosition":[32],"resetSliderPosition":[64],"loadProducts":[64]}]]],["vviinn-vpr-widget.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"columns":[2],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"sliderMode":[4,"slider-mode"],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"recommendations":[32],"loaded":[32]}]]]], options);
19
+ return index.bootstrapLazy([["cropper-handler_28.cjs",[[4,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"pressed":[32]},[[0,"modalClosed","handleModalClosed"]]],[1,"vviinn-vps-widget",{"token":[1],"apiPath":[1,"api-path"],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"slidePosition":[32],"width":[32],"wrongImageFormat":[32]}],[1,"vviinn-image-view"],[0,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{"active":[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{"filter":[16],"selectedCategoryId":[32],"hideFilters":[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{"disabled":[4],"handleMove":[32]}],[1,"vviinn-example-image",{"src":[1],"width":[2],"height":[2],"selected":[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{"detectedObject":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"slider":[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32]}],[1,"cropper-handler",{"handler":[16],"disabled":[4]}],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"imageLoaded":[32]}],[1,"vviinn-error"],[1,"vviinn-preloader"]]],["vpr-slider.cjs",[[0,"vpr-slider",{"mode":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productsInGrid":[2,"products-in-grid"],"wrappedItems":[32],"slidePosition":[32],"resetSliderPosition":[64],"loadProducts":[64]}]]],["vviinn-vpr-widget.cjs",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"columns":[2],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"sliderMode":[4,"slider-mode"],"campaignType":[1,"campaign-type"],"locale":[1],"apiPath":[1,"api-path"],"recommendations":[32],"loaded":[32]}]]]], options);
20
20
  });
21
21
  };
22
22
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const vprSlider_entry = require('./vpr-slider-9c9797ca.js');
4
- require('./index-c376feb2.js');
3
+ const vprSlider_entry = require('./vpr-slider-65d574c0.js');
4
+ require('./index-fe4d4ff2.js');
5
5
 
6
6
  const workerName = 'products.worker';
7
7
  const workerMsgId = 'stencil.products.worker';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-c376feb2.js');
3
+ const index = require('./index-fe4d4ff2.js');
4
4
 
5
5
  const isInstanceOf = (value, className) => {
6
6
  const C = globalThis[className];
@@ -104,7 +104,7 @@ const createWorkerProxy = (worker, workerMsgId, exportedMethod) => (
104
104
  })
105
105
  );
106
106
 
107
- const workerPromise = Promise.resolve().then(function () { return require('./products.worker-e95a092f.js'); }).then(m => m.worker);
107
+ const workerPromise = Promise.resolve().then(function () { return require('./products.worker-053e042f.js'); }).then(m => m.worker);
108
108
  const rebuildProducts = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.products.worker', 'rebuildProducts');
109
109
  const rewrapProducts = /*@__PURE__*/createWorkerProxy(workerPromise, 'stencil.products.worker', 'rewrapProducts');
110
110
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const vprSlider_entry = require('./vpr-slider-9c9797ca.js');
6
- require('./index-c376feb2.js');
5
+ const vprSlider_entry = require('./vpr-slider-65d574c0.js');
6
+ require('./index-fe4d4ff2.js');
7
7
 
8
8
 
9
9
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-c376feb2.js');
6
- const imageSearch_store = require('./imageSearch.store-200f1dce.js');
5
+ const index = require('./index-fe4d4ff2.js');
6
+ const imageSearch_store = require('./imageSearch.store-9badba6d.js');
7
7
 
8
8
  const createBearerString = (x) => `Bearer ${x}`;
9
9
  const createAuthedHeader = (x) => new Headers({