@vanelsas/baredom 2.0.1 → 2.1.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +26 -7
  3. package/dist/base.js +405 -403
  4. package/dist/x-alert.js +19 -19
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +15 -15
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +16 -16
  12. package/dist/x-cancel-dialogue.js +17 -17
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-carousel.js +35 -0
  15. package/dist/x-chart.js +48 -48
  16. package/dist/x-checkbox.js +11 -11
  17. package/dist/x-chip.js +9 -9
  18. package/dist/x-collapse.js +11 -11
  19. package/dist/x-color-picker.js +46 -0
  20. package/dist/x-command-palette.js +27 -32
  21. package/dist/x-container.js +6 -6
  22. package/dist/x-context-menu.js +20 -20
  23. package/dist/x-copy.js +23 -23
  24. package/dist/x-currency-field.js +23 -23
  25. package/dist/x-date-picker.js +42 -42
  26. package/dist/x-divider.js +10 -13
  27. package/dist/x-drawer.js +12 -12
  28. package/dist/x-dropdown.js +10 -10
  29. package/dist/x-fieldset.js +6 -6
  30. package/dist/x-file-download.js +7 -7
  31. package/dist/x-form-field.js +16 -16
  32. package/dist/x-form.js +10 -10
  33. package/dist/x-gaussian-blur.js +18 -18
  34. package/dist/x-grid.js +6 -6
  35. package/dist/x-kinetic-font.js +29 -28
  36. package/dist/x-kinetic-typography.js +39 -39
  37. package/dist/x-liquid-dock.js +39 -39
  38. package/dist/x-liquid-fill.js +45 -44
  39. package/dist/x-liquid-glass.js +47 -47
  40. package/dist/x-menu-item.js +10 -10
  41. package/dist/x-menu.js +11 -12
  42. package/dist/x-metaball-cursor.js +27 -28
  43. package/dist/x-modal.js +13 -13
  44. package/dist/x-morph-stack.js +39 -39
  45. package/dist/x-navbar.js +13 -13
  46. package/dist/x-neural-glow.js +34 -34
  47. package/dist/x-notification-center.js +10 -9
  48. package/dist/x-organic-divider.js +19 -19
  49. package/dist/x-organic-progress.js +38 -38
  50. package/dist/x-organic-shape.js +14 -14
  51. package/dist/x-pagination.js +16 -16
  52. package/dist/x-particle-button.js +53 -0
  53. package/dist/x-popover.js +15 -15
  54. package/dist/x-progress-circle.js +11 -11
  55. package/dist/x-progress.js +11 -11
  56. package/dist/x-radio.js +11 -11
  57. package/dist/x-ripple-effect.js +12 -12
  58. package/dist/x-scroll-parallax.js +19 -19
  59. package/dist/x-scroll-stack.js +19 -19
  60. package/dist/x-scroll-story.js +36 -36
  61. package/dist/x-scroll-timeline.js +47 -47
  62. package/dist/x-scroll.js +42 -42
  63. package/dist/x-search-field.js +15 -15
  64. package/dist/x-select.js +11 -11
  65. package/dist/x-sidebar.js +17 -17
  66. package/dist/x-skeleton.js +6 -6
  67. package/dist/x-slider.js +16 -16
  68. package/dist/x-soft-body.js +22 -22
  69. package/dist/x-spacer.js +5 -5
  70. package/dist/x-spinner.js +5 -5
  71. package/dist/x-splash.js +13 -13
  72. package/dist/x-stat.js +11 -11
  73. package/dist/x-stepper.js +16 -16
  74. package/dist/x-switch.js +10 -10
  75. package/dist/x-tab.js +8 -8
  76. package/dist/x-table-cell.js +24 -24
  77. package/dist/x-table-row.js +10 -10
  78. package/dist/x-table.js +16 -16
  79. package/dist/x-tabs.js +11 -11
  80. package/dist/x-text-area.js +19 -19
  81. package/dist/x-theme.js +25 -24
  82. package/dist/x-timeline-item.js +24 -24
  83. package/dist/x-timeline.js +9 -9
  84. package/dist/x-toast.js +25 -25
  85. package/dist/x-toaster.js +8 -8
  86. package/dist/x-typography.js +11 -11
  87. package/package.json +14 -2
@@ -1,20 +1,20 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var iS=function(a){return new $APP.P(null,1,[$APP.el,a],null)},jS=function(a){var b=$APP.l(a,"__xScrollParallaxRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),g=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-parallax-perspective:none;--x-scroll-parallax-overflow:hidden;--x-scroll-parallax-smooth-duration:80ms;--x-scroll-parallax-fade-range:20%;--x-scroll-parallax-scale-min:0.85;--x-scroll-parallax-disabled-opacity:0.55;}[part\x3dviewport]{position:relative;width:100%;height:100%;overflow:var(--x-scroll-parallax-overflow);perspective:var(--x-scroll-parallax-perspective);}::slotted(*){will-change:transform;}:host([disabled]){opacity:var(--x-scroll-parallax-disabled-opacity);}:host([easing\x3dsmooth]) ::slotted(*){transition:transform var(--x-scroll-parallax-smooth-duration) ease-out,opacity var(--x-scroll-parallax-smooth-duration) ease-out;}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}@media (prefers-reduced-motion:reduce){::slotted(*){transform:none !important;opacity:1 !important;}}";
3
- d.setAttribute("part","viewport");d.setAttribute("role","region");d.appendChild(e);g.setAttribute("part","live");g.setAttribute("aria-live","polite");g.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xScrollParallaxRefs=new $APP.P(null,4,[$APP.bi,b,$APP.Hi,d,$APP.Fi,e,$APP.$h,g],null);return $APP.l(a,"__xScrollParallaxRefs")},qS=function(a){a=new $APP.P(null,5,[$APP.si,a.getAttribute("direction"),kS,a.getAttribute("source"),lS,a.getAttribute("easing"),$APP.Ai,
4
- $APP.r(a.hasAttribute("disabled"))?"":null,$APP.Oh,a.getAttribute("label")],null);var b=$APP.N(a),c=$APP.G(b,$APP.si),d=$APP.G(b,kS),e=$APP.G(b,lS);a=$APP.G(b,$APP.Ai);b=$APP.G(b,$APP.Oh);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(mS,c)?c:"vertical";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.J(nS,d)?d:"document";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.J(oS,e)?e:"none";return new $APP.P(null,5,[$APP.Ni,c,$APP.zk,d,pS,e,$APP.W,a!=null,$APP.T,$APP.r(b)?
5
- b:""],null)},rS=function(a){a=jS(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},sS=function(a){var b=a.getAttribute("data-speed");typeof b==="string"?(b=parseFloat(b.trim()),b=$APP.r(isNaN(b))?1:b):b=1;var c=a.getAttribute("data-offset");typeof c==="string"?(c=parseFloat(c.trim()),c=$APP.r(isNaN(c))?0:c):c=0;return new $APP.P(null,4,[$APP.Yi,b,$APP.Rh,c,$APP.Ph,$APP.D.i("fade",a.getAttribute("data-opacity")),$APP.ui,$APP.D.i("grow",a.getAttribute("data-scale"))],null)},tS=function(a){var b=
6
- $APP.l(a,"__xScrollParallaxChildCache");if($APP.r(b))return b;b=rS(a);b=$APP.af.o($APP.ie,$APP.de.g(sS),$APP.wc(b));return a.__xScrollParallaxChildCache=b},uS=function(a){a.__xScrollParallaxChildCache=null},vS=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-fade-range");a=typeof a==="string"?a.trim():null;return $APP.r($APP.r(a)?a.endsWith("%"):a)?(a=parseFloat(a.slice(0,-1)),$APP.r(isNaN(a))?.2:a/100):.2},wS=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-scale-min");
7
- a=typeof a==="string"?parseFloat(a.trim()):null;var b=a==null;return $APP.r(b?b:isNaN(a))?.85:a},xS=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},yS=function(a){var b=function(){var H=$APP.l(a,"__xScrollParallaxModel");return $APP.r(H)?H:qS(a)}();if(!$APP.r($APP.W.g(b))){var c=a.getBoundingClientRect();b=$APP.D.i("vertical",$APP.Ni.g(b));var d=window.innerHeight,e=b?d:window.innerWidth,g=$APP.Yg.i(0,$APP.Zg.i(1,(d-c.top)/(d+
8
- c.height)));c=$APP.l(a,"__xScrollParallaxLastProg");d=rS(a);for(var h=tS(a),k=vS(a),m=wS(a),p=d.length,q=0;;)if(q<p){if(q<$APP.C(h)){var w=d[q],x=$APP.rc(h,q),y=$APP.N(x),A=$APP.G(y,$APP.Yi),B=$APP.G(y,$APP.Rh);x=$APP.G(y,$APP.Ph);y=$APP.G(y,$APP.ui);A=(g-.5)*e*(A-1)+B;var E=b?"translateY("+$APP.S.g(A)+"px)":"translateX("+$APP.S.g(A)+"px)";A=$APP.r(y)?function(){var H=m+(1-m)*(1-Math.abs(g-.5)*2);return""+$APP.S.g(E)+" scale("+$APP.S.g(H)+")"}():E;w.style.transform=A;$APP.r(x)&&(w.style.opacity=""+
9
- $APP.S.g(g<k?g/k:g>1-k?(1-g)/k:1))}q+=1}else break;if(c==null||Math.abs(g-c)>.001)a.__xScrollParallaxLastProg=g,xS(a,"x-scroll-parallax-progress",iS(g))}a.__xScrollParallaxRAF=null},zS=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollParallaxVisible"),$APP.r(b)?!$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches):b):b}())?$APP.r($APP.l(a,"__xScrollParallaxRAF"))?null:$APP.n(a,"__xScrollParallaxRAF",requestAnimationFrame(function(){return yS(a)})):
10
- null},AS=function(a){a=$APP.l(a,"__xScrollParallaxHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},BS=function(a){a=$APP.l(a,"__xScrollParallaxHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},CS=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},1E3)},DS=function(a,b){b=b[0].isIntersecting;
11
- var c=$APP.N($APP.l(a,"__xScrollParallaxRefs"));c=$APP.G(c,$APP.$h);a.__xScrollParallaxVisible=b;if($APP.r(b))return AS(a),yS(a),CS(c,"Parallax section entered viewport"),xS(a,"x-scroll-parallax-enter",iS(function(){var d=$APP.l(a,"__xScrollParallaxLastProg");return $APP.r(d)?d:0}()));BS(a);CS(c,"Parallax section left viewport");return xS(a,"x-scroll-parallax-leave",iS(function(){var d=$APP.l(a,"__xScrollParallaxLastProg");return $APP.r(d)?d:0}()))},ES=function(a){function b(){return $APP.r($APP.l(a,
12
- "__xScrollParallaxVisible"))?(uS(a),yS(a)):null}function c(){uS(a);return $APP.r($APP.l(a,"__xScrollParallaxVisible"))?yS(a):null}var d=jS(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollParallaxHandlers",{scroll:function(){return zS(a)},slot:c,resize:b,scrollAttached:!1})},FS=function(a){var b=$APP.l(a,"__xScrollParallaxHandlers");if($APP.r(b)){BS(a);var c=$APP.l(a,"__xScrollParallaxRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=
13
- $APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollParallaxRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollParallaxRAF=null);a.__xScrollParallaxHandlers=null},GS=function(a){var b=$APP.l(a,"__xScrollParallaxIO");$APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){return DS(a,c)},{threshold:[0]});b.observe(a);a.__xScrollParallaxIO=b},HS=function(a){var b=qS(a);if($APP.O($APP.l(a,
14
- "__xScrollParallaxModel"),b)){var c=$APP.N(b),d=$APP.G(c,$APP.Ni);$APP.G(c,pS);b=$APP.G(c,$APP.W);var e=$APP.G(c,$APP.T),g=jS(a);g=$APP.N(g);var h=$APP.G(g,$APP.Hi);$APP.G(g,$APP.$h);a.setAttribute("data-direction",d);$APP.u(e)?h.setAttribute("aria-label",e):h.removeAttribute("aria-label");a.__xScrollParallaxModel=c;c=$APP.l(a,"__xScrollParallaxVisible");$APP.r($APP.r(c)?$APP.t(b):c)&&yS(a)}},IS=function(a){Object.defineProperty(a,"direction",{get:function(){var b=this.getAttribute("direction");return $APP.r(b)?
15
- b:"vertical"},set:function(b){return $APP.r(b)?this.setAttribute("direction",""+$APP.S.g(b)):this.removeAttribute("direction")},enumerable:!0,configurable:!0});Object.defineProperty(a,"source",{get:function(){var b=this.getAttribute("source");return $APP.r(b)?b:"document"},set:function(b){return $APP.r(b)?this.setAttribute("source",""+$APP.S.g(b)):this.removeAttribute("source")},enumerable:!0,configurable:!0});Object.defineProperty(a,"easing",{get:function(){var b=this.getAttribute("easing");return $APP.r(b)?
16
- b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("easing",""+$APP.S.g(b)):this.removeAttribute("easing")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?
17
- $APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollParallaxLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0})},KS=function(){var a=class extends HTMLElement{};a.observedAttributes=JS;a.prototype.connectedCallback=function(){jS(this);FS(this);ES(this);GS(this);HS(this);return null};a.prototype.disconnectedCallback=function(){for(var b=rS(this),
18
- c=b.length,d=0;;)if(d<c){var e=b[d];e.style.transform="";e.style.opacity="";d+=1}else break;$APP.r($APP.l(this,"__xScrollParallaxVisible"))&&(b=$APP.l(this,"__xScrollParallaxLastProg"),xS(this,"x-scroll-parallax-leave",iS($APP.r(b)?b:0)));FS(this);b=$APP.l(this,"__xScrollParallaxIO");$APP.r(b)&&(b.disconnect(),this.__xScrollParallaxIO=null);uS(this);this.__xScrollParallaxVisible=!1;return this.__xScrollParallaxLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&HS(this);
19
- return null};IS(a.prototype);return a},LS=function(){$APP.r(customElements.get("x-scroll-parallax"))||customElements.define("x-scroll-parallax",KS());return null},kS=new $APP.K(null,"source-raw","source-raw",396083546),lS=new $APP.K(null,"easing-raw","easing-raw",440485546),pS=new $APP.K(null,"easing","easing",735372043);var JS=["direction","source","easing","disabled","label"];$APP.Sd(["x-scroll-parallax-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-parallax-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-parallax-progress",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null)]);
20
- var mS=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),nS=new $APP.R(null,new $APP.P(null,1,["document",null],null),null),oS=new $APP.R(null,new $APP.P(null,2,["none",null,"smooth",null],null),null);$APP.ka("baredom.exports.x_scroll_parallax.init",LS);export const init=LS;
2
+ var gU=function(a){return new $APP.R(null,1,[$APP.ol,a],null)},hU=function(a){var b=$APP.k(a,"__xScrollParallaxRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),g=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-parallax-perspective:none;--x-scroll-parallax-overflow:hidden;--x-scroll-parallax-smooth-duration:80ms;--x-scroll-parallax-fade-range:20%;--x-scroll-parallax-scale-min:0.85;--x-scroll-parallax-disabled-opacity:0.55;}[part\x3dviewport]{position:relative;width:100%;height:100%;overflow:var(--x-scroll-parallax-overflow);perspective:var(--x-scroll-parallax-perspective);}::slotted(*){will-change:transform;}:host([disabled]){opacity:var(--x-scroll-parallax-disabled-opacity);}:host([easing\x3dsmooth]) ::slotted(*){transition:transform var(--x-scroll-parallax-smooth-duration) ease-out,opacity var(--x-scroll-parallax-smooth-duration) ease-out;}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}@media (prefers-reduced-motion:reduce){::slotted(*){transform:none !important;opacity:1 !important;}}";
3
+ d.setAttribute("part","viewport");d.setAttribute("role","region");d.appendChild(e);g.setAttribute("part","live");g.setAttribute("aria-live","polite");g.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xScrollParallaxRefs=new $APP.R(null,4,[$APP.ji,b,$APP.Ni,d,$APP.Li,e,$APP.hi,g],null);return $APP.k(a,"__xScrollParallaxRefs")},oU=function(a){a=new $APP.R(null,5,[$APP.Ai,a.getAttribute("direction"),iU,a.getAttribute("source"),jU,a.getAttribute("easing"),$APP.Gi,
4
+ $APP.n(a.hasAttribute("disabled"))?"":null,$APP.Wh,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Ai),d=$APP.D(b,iU),e=$APP.D(b,jU);a=$APP.D(b,$APP.Gi);b=$APP.D(b,$APP.Wh);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(kU,c)?c:"vertical";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.J(lU,d)?d:"document";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.J(mU,e)?e:"none";return new $APP.R(null,5,[$APP.Ti,c,$APP.Hk,d,nU,e,$APP.W,a!=null,$APP.U,$APP.n(b)?
5
+ b:""],null)},pU=function(a){a=hU(a);a=$APP.M(a);return $APP.D(a,$APP.Li).assignedElements()},qU=function(a){var b=a.getAttribute("data-speed");typeof b==="string"?(b=parseFloat(b.trim()),b=$APP.n(isNaN(b))?1:b):b=1;var c=a.getAttribute("data-offset");typeof c==="string"?(c=parseFloat(c.trim()),c=$APP.n(isNaN(c))?0:c):c=0;return new $APP.R(null,4,[$APP.dj,b,$APP.Zh,c,$APP.Xh,$APP.C.i("fade",a.getAttribute("data-opacity")),$APP.Ci,$APP.C.i("grow",a.getAttribute("data-scale"))],null)},rU=function(a){var b=
6
+ $APP.k(a,"__xScrollParallaxChildCache");if($APP.n(b))return b;b=pU(a);b=$APP.Ue.m($APP.ee,$APP.$d.g(qU),$APP.tc(b));return a.__xScrollParallaxChildCache=b},sU=function(a){a.__xScrollParallaxChildCache=null},tU=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-fade-range");a=typeof a==="string"?a.trim():null;return $APP.n($APP.n(a)?a.endsWith("%"):a)?(a=parseFloat(a.slice(0,-1)),$APP.n(isNaN(a))?.2:a/100):.2},uU=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-scale-min");
7
+ a=typeof a==="string"?parseFloat(a.trim()):null;var b=a==null;return $APP.n(b?b:isNaN(a))?.85:a},vU=function(a,b,c){b=new CustomEvent(b,{detail:$APP.ph(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},wU=function(a){var b=function(){var H=$APP.k(a,"__xScrollParallaxModel");return $APP.n(H)?H:oU(a)}();if(!$APP.n($APP.W.g(b))){var c=a.getBoundingClientRect();b=$APP.C.i("vertical",$APP.Ti.g(b));var d=window.innerHeight,e=b?d:window.innerWidth,g=$APP.$g.i(0,$APP.ah.i(1,(d-c.top)/(d+
8
+ c.height)));c=$APP.k(a,"__xScrollParallaxLastProg");d=pU(a);for(var h=rU(a),l=tU(a),m=uU(a),p=d.length,q=0;;)if(q<p){if(q<$APP.z(h)){var v=d[q],x=$APP.oc(h,q),y=$APP.M(x),A=$APP.D(y,$APP.dj),B=$APP.D(y,$APP.Zh);x=$APP.D(y,$APP.Xh);y=$APP.D(y,$APP.Ci);A=(g-.5)*e*(A-1)+B;var E=b?"translateY("+$APP.T.g(A)+"px)":"translateX("+$APP.T.g(A)+"px)";A=$APP.n(y)?function(){var H=m+(1-m)*(1-Math.abs(g-.5)*2);return""+$APP.T.g(E)+" scale("+$APP.T.g(H)+")"}():E;v.style.transform=A;$APP.n(x)&&(v.style.opacity=""+
9
+ $APP.T.g(g<l?g/l:g>1-l?(1-g)/l:1))}q+=1}else break;if(c==null||Math.abs(g-c)>.001)a.__xScrollParallaxLastProg=g,vU(a,"x-scroll-parallax-progress",gU(g))}a.__xScrollParallaxRAF=null},xU=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollParallaxVisible"),$APP.n(b)?!$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches):b):b}())?$APP.n($APP.k(a,"__xScrollParallaxRAF"))?null:$APP.ia(a,"__xScrollParallaxRAF",requestAnimationFrame(function(){return wU(a)})):
10
+ null},yU=function(a){a=$APP.k(a,"__xScrollParallaxHandlers");$APP.n($APP.n(a)?$APP.r($APP.k(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},zU=function(a){a=$APP.k(a,"__xScrollParallaxHandlers");$APP.n($APP.n(a)?$APP.k(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.k(a,"scroll")),a.scrollAttached=!1)},AU=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},1E3)},BU=function(a,b){b=b[0].isIntersecting;
11
+ var c=$APP.M($APP.k(a,"__xScrollParallaxRefs"));c=$APP.D(c,$APP.hi);a.__xScrollParallaxVisible=b;if($APP.n(b))return yU(a),wU(a),AU(c,"Parallax section entered viewport"),vU(a,"x-scroll-parallax-enter",gU(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()));zU(a);AU(c,"Parallax section left viewport");return vU(a,"x-scroll-parallax-leave",gU(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()))},CU=function(a){function b(){return $APP.n($APP.k(a,
12
+ "__xScrollParallaxVisible"))?(sU(a),wU(a)):null}function c(){sU(a);return $APP.n($APP.k(a,"__xScrollParallaxVisible"))?wU(a):null}var d=hU(a);d=$APP.M(d);$APP.D(d,$APP.Li).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ia(a,"__xScrollParallaxHandlers",{scroll:function(){return xU(a)},slot:c,resize:b,scrollAttached:!1})},DU=function(a){var b=$APP.k(a,"__xScrollParallaxHandlers");if($APP.n(b)){zU(a);var c=$APP.k(a,"__xScrollParallaxRefs");if($APP.n(c)){c=$APP.Li.g(c);var d=
13
+ $APP.k(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.k(b,"resize");$APP.n(b)&&window.removeEventListener("resize",b)}b=$APP.k(a,"__xScrollParallaxRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollParallaxRAF=null);a.__xScrollParallaxHandlers=null},EU=function(a){var b=$APP.k(a,"__xScrollParallaxIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return BU(a,c)},{threshold:[0]});b.observe(a);a.__xScrollParallaxIO=b},FU=function(a){var b=oU(a);if($APP.N($APP.k(a,
14
+ "__xScrollParallaxModel"),b)){var c=$APP.M(b),d=$APP.D(c,$APP.Ti);b=$APP.D(c,$APP.W);var e=$APP.D(c,$APP.U),g=hU(a);g=$APP.M(g);g=$APP.D(g,$APP.Ni);a.setAttribute("data-direction",d);$APP.t(e)?g.setAttribute("aria-label",e):g.removeAttribute("aria-label");a.__xScrollParallaxModel=c;c=$APP.k(a,"__xScrollParallaxVisible");$APP.n($APP.n(c)?$APP.r(b):c)&&wU(a)}},GU=function(a){Object.defineProperty(a,"direction",{get:function(){var b=this.getAttribute("direction");return $APP.n(b)?b:"vertical"},set:function(b){return $APP.n(b)?
15
+ this.setAttribute("direction",""+$APP.T.g(b)):this.removeAttribute("direction")},enumerable:!0,configurable:!0});Object.defineProperty(a,"source",{get:function(){var b=this.getAttribute("source");return $APP.n(b)?b:"document"},set:function(b){return $APP.n(b)?this.setAttribute("source",""+$APP.T.g(b)):this.removeAttribute("source")},enumerable:!0,configurable:!0});Object.defineProperty(a,"easing",{get:function(){var b=this.getAttribute("easing");return $APP.n(b)?b:"none"},set:function(b){return $APP.n(b)?
16
+ this.setAttribute("easing",""+$APP.T.g(b)):this.removeAttribute("easing")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",
17
+ ""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.k(this,"__xScrollParallaxLastProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0})},IU=function(){var a=class extends HTMLElement{};a.observedAttributes=HU;a.prototype.connectedCallback=function(){hU(this);DU(this);CU(this);EU(this);FU(this);return null};a.prototype.disconnectedCallback=function(){for(var b=pU(this),c=b.length,d=0;;)if(d<c){var e=b[d];
18
+ e.style.transform="";e.style.opacity="";d+=1}else break;$APP.n($APP.k(this,"__xScrollParallaxVisible"))&&(b=$APP.k(this,"__xScrollParallaxLastProg"),vU(this,"x-scroll-parallax-leave",gU($APP.n(b)?b:0)));DU(this);b=$APP.k(this,"__xScrollParallaxIO");$APP.n(b)&&(b.disconnect(),this.__xScrollParallaxIO=null);sU(this);this.__xScrollParallaxVisible=!1;return this.__xScrollParallaxLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&FU(this);return null};GU(a.prototype);return a},
19
+ JU=function(){$APP.n(customElements.get("x-scroll-parallax"))||customElements.define("x-scroll-parallax",IU());return null},iU=new $APP.K(null,"source-raw","source-raw",396083546),jU=new $APP.K(null,"easing-raw","easing-raw",440485546),nU=new $APP.K(null,"easing","easing",735372043);var HU=["direction","source","easing","disabled","label"];$APP.Pd(["x-scroll-parallax-enter",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-parallax-leave",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-parallax-progress",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null)]);
20
+ var kU=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),lU=new $APP.S(null,new $APP.R(null,1,["document",null],null),null),mU=new $APP.S(null,new $APP.R(null,2,["none",null,"smooth",null],null),null);$APP.fa("baredom.exports.x_scroll_parallax.init",JU);export const init=JU;
@@ -1,20 +1,20 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var $y=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.t(isNaN(a))&&a>0?a:b):b},bz=function(a){return typeof a==="string"&&$APP.J(az,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},cz=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},dz=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},ez=function(a){var b=$APP.l(a,"__xScrollStackRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
3
- d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-stack-peek:6px;--x-scroll-stack-rotation:3deg;--x-scroll-stack-gap:1rem;}[part\x3dcontainer]{position:sticky;top:0;height:100vh;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:var(--x-scroll-stack-padding-top,2rem);gap:var(--x-scroll-stack-gap);}::slotted(*){flex-shrink:0;will-change:transform;transition:transform 60ms linear;}:host([disabled]){opacity:0.55;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
- d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.P(null,3,[$APP.bi,b,$APP.Zi,d,$APP.Fi,e],null);return $APP.l(a,"__xScrollStackRefs")},kz=function(a){a=new $APP.P(null,5,[fz,a.getAttribute("peek"),gz,a.getAttribute("rotation"),hz,a.getAttribute("scroll-distance"),$APP.qi,a.getAttribute("align"),$APP.Ai,$APP.r(a.hasAttribute("disabled"))?"":null],null);var b=$APP.N(a);a=$APP.G(b,fz);var c=$APP.G(b,gz),
5
- d=$APP.G(b,hz),e=$APP.G(b,$APP.qi);b=$APP.G(b,$APP.Ai);return new $APP.P(null,5,[iz,$y(a,6),$APP.dl,$y(c,3),jz,$y(d,150),$APP.Qi,bz(e),$APP.W,b!=null],null)},lz=function(a){a=ez(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},mz=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},nz=function(a){var b=$APP.l(a,"__xScrollStackModel");b=$APP.r(b)?b:kz(a);var c=lz(a).length;b=window.innerHeight+c*jz.g(b);a.style.height=""+$APP.S.g(b)+
6
- "px"},tz=function(a){var b=function(){var ta=$APP.l(a,"__xScrollStackModel");return $APP.r(ta)?ta:kz(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=lz(a),e=d.length,g=$APP.l(a,"__xScrollStackNaturalOffsets"),h=$APP.l(a,"__xScrollStackChildHeights");if($APP.r(function(){var ta=e>0;return ta?$APP.r(g)?$APP.r(h)?$APP.D.i(g.length,e)&&$APP.D.i(h.length,e):h:g:ta}())){var k=jz.g(b),m=iz.g(b),p=$APP.dl.g(b),q=$APP.Qi.g(b),w=g[0],x=$APP.r(a.hasAttribute("align"))?function(){var ta=(e-1)*m+
7
- h[e-1],Ha=$APP.N($APP.l(a,"__xScrollStackRefs"));Ha=$APP.G(Ha,$APP.Zi).clientHeight;a:switch(q){case "top":ta=32;break a;case "bottom":ta=Ha-ta-32;break a;default:ta=(Ha-ta)/2}return ta-w}():0;b=dz(c,e,k);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,k)))),A=function(){var ta=$APP.l(a,"__xScrollStackStackedCount");return $APP.r(ta)?ta:0}(),B=0;;)if(B<e){var E=d[B],H=cz(c,B,k),F=new $APP.P(null,3,[oz,B*m,pz,p*Math.sin(B*2.3),qz,2*Math.cos(B*3.7)],null),M=g[B];M=w+oz.g(F)-M;M=H*M+H*x;var Y=
8
- H*pz.g(F);F=H*qz.g(F);var ea=H>0?""+$APP.S.g(B):"";E.style.transform=H===0?"":"translate("+$APP.S.g(F.toFixed(2))+"px,"+$APP.S.g(M.toFixed(2))+"px) rotate("+$APP.S.g(Y.toFixed(3))+"deg)";E.style.zIndex=ea;B+=1}else break;$APP.O(y,A)&&(a.__xScrollStackStackedCount=y,mz(a,"x-scroll-stack-change",new $APP.P(null,3,[rz,y,sz,e,$APP.el,b],null)));c=$APP.l(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,mz(a,"x-scroll-stack-progress",new $APP.P(null,3,[$APP.el,b,rz,
9
- y,sz,e],null))}a.__xScrollStackRAF=null},uz=function(a){a=$APP.l(a,"__xScrollStackModel");return $APP.r(a)?$APP.W.g(a):a},vz=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStackVisible"),$APP.r(b)?$APP.t(uz(a)):b):b}())?$APP.r($APP.l(a,"__xScrollStackRAF"))?null:$APP.n(a,"__xScrollStackRAF",requestAnimationFrame(function(){return tz(a)})):null},wz=function(a){a=$APP.l(a,"__xScrollStackHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&
10
- (window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},xz=function(a){a=$APP.l(a,"__xScrollStackHandlers");if($APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a))window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1;else return null},yz=function(a){var b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.n(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=
11
- null;if($APP.r(a.isConnected)){var c=lz(a),d=c.length;if(d>0){var e=$APP.N($APP.l(a,"__xScrollStackRefs")),g=$APP.G(e,$APP.Zi);e=Array(d);for(var h=Array(d),k=0;;)if(k<d){var m=c[k];m.style.transform="";m.style.zIndex="";k+=1}else break;g.offsetHeight;g=g.getBoundingClientRect();for(k=0;;)if(k<d)m=c[k].getBoundingClientRect(),e[k]=m.top-g.top,h[k]=m.height,k+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return tz(a)}return null}))},zz=function(a){var b=$APP.l(a,"__xScrollStackIO");
12
- $APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.r(c)?$APP.r(uz(a))?c=null:(wz(a),c=yz(a)):c=xz(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},Az=function(a){a=lz(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.style.transform="";d.style.zIndex="";c+=1}else break},Bz=function(a){function b(){nz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?yz(a):null}function c(){nz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?
13
- yz(a):null}var d=ez(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStackHandlers",{scroll:function(){return vz(a)},slot:c,resize:b,scrollAttached:!1})},Cz=function(a){var b=$APP.l(a,"__xScrollStackHandlers");if($APP.r(b)){xz(a);var c=$APP.l(a,"__xScrollStackRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",
14
- b)}b=$APP.l(a,"__xScrollStackRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=null);b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},Dz=function(a){var b=kz(a);if($APP.O($APP.l(a,"__xScrollStackModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.W);a.__xScrollStackModel=b;$APP.r(c)?(Az(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,xz(a)):$APP.r($APP.l(a,"__xScrollStackVisible"))&&(wz(a),yz(a))}},
15
- Ez=function(a){Object.defineProperty(a,"peek",{get:function(){return $y(this.getAttribute("peek"),6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.S.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return $y(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.S.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",
16
- {get:function(){return $y(this.getAttribute("scroll-distance"),150)},set:function(b){return b!=null?this.setAttribute("scroll-distance",""+$APP.S.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return bz(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
17
- set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.l(this,"__xScrollStackStackedCount");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollStackLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"refresh",{value:function(){nz(this);return $APP.r($APP.l(this,
18
- "__xScrollStackVisible"))?yz(this):null},enumerable:!0,configurable:!0})},Gz=function(){var a=class extends HTMLElement{};a.observedAttributes=Fz;a.prototype.connectedCallback=function(){ez(this);Cz(this);Bz(this);zz(this);Dz(this);nz(this);return null};a.prototype.disconnectedCallback=function(){Az(this);Cz(this);var b=$APP.l(this,"__xScrollStackIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStackIO=null);this.__xScrollStackVisible=!1;this.__xScrollStackStackedCount=0;return this.__xScrollStackChildHeights=
19
- this.__xScrollStackNaturalOffsets=this.__xScrollStackLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&(Dz(this),nz(this),$APP.r($APP.l(this,"__xScrollStackVisible"))&&yz(this));return null};Ez(a.prototype);return a},Hz=function(){$APP.r(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",Gz());return null},pz=new $APP.K(null,"stack-rot","stack-rot",-949440704),iz=new $APP.K(null,"peek","peek",-291396325),sz=new $APP.K(null,"totalCount","totalCount",
20
- 2101470328),hz=new $APP.K(null,"scroll-distance-raw","scroll-distance-raw",1537519796),qz=new $APP.K(null,"stack-x","stack-x",-1557848736),oz=new $APP.K(null,"stack-y","stack-y",146748620),gz=new $APP.K(null,"rotation-raw","rotation-raw",318004495),fz=new $APP.K(null,"peek-raw","peek-raw",361729174),rz=new $APP.K(null,"stackedCount","stackedCount",137366007),jz=new $APP.K(null,"scroll-distance","scroll-distance",-544947824);var Fz=["peek","rotation","scroll-distance","align","disabled"];$APP.Sd(["x-scroll-stack-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[rz,$APP.V,sz,$APP.V,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-stack-progress",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,rz,$APP.V,sz,$APP.V],null),$APP.ll,!1],null)]);var az=new $APP.R(null,new $APP.P(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ka("baredom.exports.x_scroll_stack.init",Hz);export const init=Hz;
2
+ var gB=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:b):b},iB=function(a){return typeof a==="string"&&$APP.J(hB,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},jB=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},kB=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},lB=function(a){var b=$APP.k(a,"__xScrollStackRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
3
+ d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-stack-peek:6px;--x-scroll-stack-rotation:3deg;--x-scroll-stack-gap:1rem;}[part\x3dcontainer]{position:sticky;top:0;height:100dvh;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:var(--x-scroll-stack-padding-top,2rem);gap:var(--x-scroll-stack-gap);}::slotted(*){flex-shrink:0;will-change:transform;transition:transform 60ms linear;}:host([disabled]){opacity:0.55;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
+ d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.R(null,3,[$APP.ji,b,$APP.ej,d,$APP.Li,e],null);return $APP.k(a,"__xScrollStackRefs")},pB=function(a){a=new $APP.R(null,5,[$APP.ql,a.getAttribute("peek"),mB,a.getAttribute("rotation"),nB,a.getAttribute("scroll-distance"),$APP.yi,a.getAttribute("align"),$APP.Gi,$APP.n(a.hasAttribute("disabled"))?"":null],null);var b=$APP.M(a);a=$APP.D(b,$APP.ql);var c=$APP.D(b,
5
+ mB),d=$APP.D(b,nB),e=$APP.D(b,$APP.yi);b=$APP.D(b,$APP.Gi);return new $APP.R(null,5,[$APP.Di,gB(a,6),$APP.nl,gB(c,3),oB,gB(d,150),$APP.Wi,iB(e),$APP.W,b!=null],null)},qB=function(a){a=lB(a);a=$APP.M(a);return $APP.D(a,$APP.Li).assignedElements()},rB=function(a,b,c){b=new CustomEvent(b,{detail:$APP.ph(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},sB=function(a){var b=$APP.k(a,"__xScrollStackModel");b=$APP.n(b)?b:pB(a);var c=qB(a).length;b=window.innerHeight+c*oB.g(b);a.style.height=
6
+ ""+$APP.T.g(b)+"px"},yB=function(a){var b=function(){var la=$APP.k(a,"__xScrollStackModel");return $APP.n(la)?la:pB(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=qB(a),e=d.length,g=$APP.k(a,"__xScrollStackNaturalOffsets"),h=$APP.k(a,"__xScrollStackChildHeights");if($APP.n(function(){var la=e>0;return la?$APP.n(g)?$APP.n(h)?$APP.C.i(g.length,e)&&$APP.C.i(h.length,e):h:g:la}())){var l=oB.g(b),m=$APP.Di.g(b),p=$APP.nl.g(b),q=$APP.Wi.g(b),v=g[0],x=$APP.n(a.hasAttribute("align"))?function(){var la=
7
+ (e-1)*m+h[e-1],za=$APP.M($APP.k(a,"__xScrollStackRefs"));za=$APP.D(za,$APP.ej).clientHeight;a:switch(q){case "top":la=32;break a;case "bottom":la=za-la-32;break a;default:la=(za-la)/2}return la-v}():0;b=kB(c,e,l);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,l)))),A=function(){var la=$APP.k(a,"__xScrollStackStackedCount");return $APP.n(la)?la:0}(),B=0;;)if(B<e){var E=d[B],H=jB(c,B,l),G=new $APP.R(null,3,[tB,B*m,uB,p*Math.sin(B*2.3),vB,2*Math.cos(B*3.7)],null),I=g[B];I=v+tB.g(G)-I;I=H*I+
8
+ H*x;var Q=H*uB.g(G);G=H*vB.g(G);var Y=H>0?""+$APP.T.g(B):"";E.style.transform=H===0?"":"translate("+$APP.T.g(G.toFixed(2))+"px,"+$APP.T.g(I.toFixed(2))+"px) rotate("+$APP.T.g(Q.toFixed(3))+"deg)";E.style.zIndex=Y;B+=1}else break;$APP.N(y,A)&&(a.__xScrollStackStackedCount=y,rB(a,"x-scroll-stack-change",new $APP.R(null,3,[wB,y,xB,e,$APP.ol,b],null)));c=$APP.k(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,rB(a,"x-scroll-stack-progress",new $APP.R(null,3,[$APP.ol,
9
+ b,wB,y,xB,e],null))}a.__xScrollStackRAF=null},zB=function(a){a=$APP.k(a,"__xScrollStackModel");return $APP.n(a)?$APP.W.g(a):a},AB=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollStackVisible"),$APP.n(b)?$APP.r(zB(a)):b):b}())?$APP.n($APP.k(a,"__xScrollStackRAF"))?null:$APP.ia(a,"__xScrollStackRAF",requestAnimationFrame(function(){return yB(a)})):null},BB=function(a){a=$APP.k(a,"__xScrollStackHandlers");$APP.n($APP.n(a)?$APP.r($APP.k(a,"scrollAttached")):
10
+ a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},CB=function(a){a=$APP.k(a,"__xScrollStackHandlers");if($APP.n($APP.n(a)?$APP.k(a,"scrollAttached"):a))window.removeEventListener("scroll",$APP.k(a,"scroll")),a.scrollAttached=!1;else return null},DB=function(a){var b=$APP.k(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.ia(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=
11
+ null;if($APP.n(a.isConnected)){var c=qB(a),d=c.length;if(d>0){var e=$APP.M($APP.k(a,"__xScrollStackRefs")),g=$APP.D(e,$APP.ej);e=Array(d);for(var h=Array(d),l=0;;)if(l<d){var m=c[l];m.style.transform="";m.style.zIndex="";l+=1}else break;g.offsetHeight;g=g.getBoundingClientRect();for(l=0;;)if(l<d)m=c[l].getBoundingClientRect(),e[l]=m.top-g.top,h[l]=m.height,l+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return yB(a)}return null}))},EB=function(a){var b=$APP.k(a,"__xScrollStackIO");
12
+ $APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.n(c)?$APP.n(zB(a))?c=null:(BB(a),c=DB(a)):c=CB(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},FB=function(a){a=qB(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.style.transform="";d.style.zIndex="";c+=1}else break},GB=function(a){function b(){sB(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?DB(a):null}function c(){sB(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?
13
+ DB(a):null}var d=lB(a);d=$APP.M(d);$APP.D(d,$APP.Li).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ia(a,"__xScrollStackHandlers",{scroll:function(){return AB(a)},slot:c,resize:b,scrollAttached:!1})},HB=function(a){var b=$APP.k(a,"__xScrollStackHandlers");if($APP.n(b)){CB(a);var c=$APP.k(a,"__xScrollStackRefs");if($APP.n(c)){c=$APP.Li.g(c);var d=$APP.k(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.k(b,"resize");$APP.n(b)&&window.removeEventListener("resize",
14
+ b)}b=$APP.k(a,"__xScrollStackRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=null);b=$APP.k(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},IB=function(a){var b=pB(a);if($APP.N($APP.k(a,"__xScrollStackModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.W);a.__xScrollStackModel=b;$APP.n(c)?(FB(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,CB(a)):$APP.n($APP.k(a,"__xScrollStackVisible"))&&(BB(a),DB(a))}},
15
+ JB=function(a){Object.defineProperty(a,"peek",{get:function(){return gB(this.getAttribute("peek"),6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.T.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return gB(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.T.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",
16
+ {get:function(){return gB(this.getAttribute("scroll-distance"),150)},set:function(b){return b!=null?this.setAttribute("scroll-distance",""+$APP.T.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return iB(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.T.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
17
+ set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.k(this,"__xScrollStackStackedCount");return $APP.n(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.k(this,"__xScrollStackLastProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"refresh",{value:function(){sB(this);return $APP.n($APP.k(this,
18
+ "__xScrollStackVisible"))?DB(this):null},enumerable:!0,configurable:!0})},LB=function(){var a=class extends HTMLElement{};a.observedAttributes=KB;a.prototype.connectedCallback=function(){lB(this);HB(this);GB(this);EB(this);IB(this);sB(this);return null};a.prototype.disconnectedCallback=function(){FB(this);HB(this);var b=$APP.k(this,"__xScrollStackIO");$APP.n(b)&&(b.disconnect(),this.__xScrollStackIO=null);this.__xScrollStackVisible=!1;this.__xScrollStackStackedCount=0;return this.__xScrollStackChildHeights=
19
+ this.__xScrollStackNaturalOffsets=this.__xScrollStackLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&(IB(this),sB(this),$APP.n($APP.k(this,"__xScrollStackVisible"))&&DB(this));return null};JB(a.prototype);return a},MB=function(){$APP.n(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",LB());return null},uB=new $APP.K(null,"stack-rot","stack-rot",-949440704),xB=new $APP.K(null,"totalCount","totalCount",2101470328),nB=new $APP.K(null,"scroll-distance-raw",
20
+ "scroll-distance-raw",1537519796),vB=new $APP.K(null,"stack-x","stack-x",-1557848736),tB=new $APP.K(null,"stack-y","stack-y",146748620),mB=new $APP.K(null,"rotation-raw","rotation-raw",318004495),wB=new $APP.K(null,"stackedCount","stackedCount",137366007),oB=new $APP.K(null,"scroll-distance","scroll-distance",-544947824);var KB=["peek","rotation","scroll-distance","align","disabled"];$APP.Pd(["x-scroll-stack-change",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[wB,$APP.V,xB,$APP.V,$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-stack-progress",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,wB,$APP.V,xB,$APP.V],null),$APP.wl,!1],null)]);var hB=new $APP.S(null,new $APP.R(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.fa("baredom.exports.x_scroll_stack.init",MB);export const init=MB;
@@ -1,37 +1,37 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var OX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(0,$APP.Zg.i(1,a))):.5},PX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(.1,$APP.Zg.i(.9,a))):.5},QX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?50:$APP.Yg.i(1,$APP.Zg.i(1E3,a))):50},RX=function(a,b){var c=$APP.C(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?e:g;var h=$APP.rc(a,d),k=$APP.N(h);h=$APP.G(k,
3
- $APP.Qh);k=$APP.G(k,$APP.Rj);e=h<=b&&k>b?d:e;g=h<=b?d:g;d+=1}},TX=function(a){var b=$APP.l(a,"__xScrollStoryRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("slot"),m=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-story-gap:0;--x-scroll-story-step-min-height:80vh;--x-scroll-story-step-padding:2rem;--x-scroll-story-active-opacity:1;--x-scroll-story-inactive-opacity:0.3;--x-scroll-story-transition-duration:300ms;--x-scroll-story-disabled-opacity:0.55;--x-scroll-story-media-top:0;}[part\x3dcontainer]{display:flex;gap:var(--x-scroll-story-gap);}:host([data-layout\x3dleft]) [part\x3dcontainer]{flex-direction:row;}:host([data-layout\x3dright]) [part\x3dcontainer]{flex-direction:row-reverse;}:host([data-layout\x3dtop]) [part\x3dcontainer]{flex-direction:column;}[part\x3dmedia]{position:sticky;top:var(--x-scroll-story-media-top);align-self:flex-start;flex-shrink:0;}:host([data-layout\x3dtop]) [part\x3dmedia]{position:sticky;width:100%;}[part\x3dsteps]{flex:1;min-width:0;}[part\x3dmedia]{height:100vh;}::slotted(:not([slot])){min-height:var(--x-scroll-story-step-min-height);padding:var(--x-scroll-story-step-padding);opacity:var(--x-scroll-story-inactive-opacity);transition:opacity var(--x-scroll-story-transition-duration) ease;}::slotted([data-active]){opacity:var(--x-scroll-story-active-opacity);}:host([disabled]){opacity:var(--x-scroll-story-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
- d.setAttribute("part","container");d.setAttribute("role","region");e.setAttribute("part","media");h.setAttribute("name","media");var p=document.createElement("div");p.setAttribute("part","indicator");e.appendChild(p);e.appendChild(h);g.setAttribute("part","steps");g.appendChild(k);d.appendChild(e);d.appendChild(g);m.setAttribute("part","live");m.setAttribute("aria-live","polite");m.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(m);a.__xScrollStoryRefs=new $APP.P(null,
5
- 6,[$APP.bi,b,$APP.Zi,d,SX,e,$APP.xl,g,$APP.Fi,k,$APP.$h,m],null);return $APP.l(a,"__xScrollStoryRefs")},XX=function(a){a=$APP.Q([$APP.Oh,$APP.lj,$APP.hl,$APP.Ah,$APP.tk,$APP.ki,$APP.Ai,$APP.gl,UX],[a.getAttribute("label"),a.getAttribute("autoplay-speed"),$APP.r(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.r(a.hasAttribute("autoplay-indicator"))?"":null,$APP.r(a.hasAttribute("disabled"))?"":null,$APP.r(a.hasAttribute("autoplay-loop"))?"":null,a.getAttribute("split")]);
6
- var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,$APP.gl),d=$APP.G(b,UX),e=$APP.G(b,$APP.Oh),g=$APP.G(b,$APP.lj),h=$APP.G(b,$APP.hl),k=$APP.G(b,$APP.Ah),m=$APP.G(b,$APP.tk);b=$APP.G(b,$APP.ki);m=typeof m==="string"?m.trim().toLowerCase():null;m=$APP.J(VX,m)?m:"left";return $APP.Q([$APP.Aj,$APP.Wh,$APP.Xk,WX,$APP.T,$APP.di,$APP.W,$APP.mj,$APP.gi],[m,c!=null,OX(k),PX(d),$APP.r(e)?e:"",b!=null,a!=null,QX(g),h!=null])},YX=function(a){a=TX(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},
7
- ZX=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},$X=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.O(a,"")?a:null},aY=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},bY=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},3E3)},cY=function(a,b,c){var d=$APP.l(a,"__xScrollStoryActiveIndex");d=$APP.r(d)?d:-1;if($APP.O(d,c)){d>=0&&d<b.length&&
8
- b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");c>=0?a.setAttribute("data-active-index",""+$APP.S.g(c)):a.removeAttribute("data-active-index");a.__xScrollStoryActiveIndex=c;var e=d>=0&&d<b.length?$X(b[d]):null;b=c>=0&&c<b.length?$X(b[c]):null;aY(a,"x-scroll-story-step-change",new $APP.P(null,4,[$APP.Eh,c,$APP.Ek,b,$APP.rj,d,$APP.Vl,e],null));a=$APP.N($APP.l(a,"__xScrollStoryRefs"));a=$APP.G(a,$APP.$h);bY(a,"Step "+$APP.S.g(c+1)+" active")}},dY=function(a,
9
- b,c,d){var e=b.length;var g=$APP.l(a,"__xScrollStoryStepStates");if(!$APP.r($APP.r(g)?$APP.D.i(g.length,e):g)){for(var h=Array(e),k=0;;)if(k<e)h[k]=$APP.r($APP.r(g)?k<g.length:g)?g[k]:!1,k+=1;else break;g=a.__xScrollStoryStepStates=h}for(h=0;;)if(h<e){if(h<$APP.C(c)){k=$APP.rc(c,h);k=$APP.N(k);var m=$APP.G(k,$APP.Qh),p=$APP.G(k,$APP.Rj),q=g[h];k=m<=d&&p>d;var w=$X(b[h]),x=m;m=p-m;m=m<=0?0:$APP.Yg.i(0,$APP.Zg.i(1,(d-x)/m));$APP.t(q)&&k?(g[h]=!0,aY(a,"x-scroll-story-step-enter",new $APP.P(null,3,[$APP.Eh,
10
- h,$APP.Ek,w,$APP.el,m],null))):$APP.r($APP.r(q)?!k:q)&&(g[h]=!1,aY(a,"x-scroll-story-step-leave",new $APP.P(null,3,[$APP.Eh,h,$APP.Ek,w,$APP.el,m],null)))}h+=1}else break},eY=function(a){var b=function(){var m=$APP.l(a,"__xScrollStoryModel");return $APP.r(m)?m:XX(a)}();if(!$APP.r($APP.W.g(b))){var c=YX(a),d=c.length,e=window.innerHeight,g=e*$APP.Xk.g(b),h=function(){for(var m=0,p=$APP.ie;;){if(m>=d)return p;var q=c[m].getBoundingClientRect();m+=1;p=$APP.od.i(p,new $APP.P(null,2,[$APP.Qh,q.top,$APP.Rj,
11
- q.top+q.height],null))}}();b=RX(h,g);var k=$APP.N($APP.l(a,"__xScrollStoryRefs"));k=$APP.G(k,$APP.xl).getBoundingClientRect();e=$APP.Yg.i(0,$APP.Zg.i(1,(e-k.top)/(e+k.height)));k=$APP.l(a,"__xScrollStoryLastProg");cY(a,c,b);dY(a,c,h,g);if(k==null||Math.abs(e-k)>.001)a.__xScrollStoryLastProg=e,g=b>=0&&b<d?$X(c[b]):null,aY(a,"x-scroll-story-progress",new $APP.P(null,3,[$APP.el,e,$APP.Cj,b,$APP.Lk,g],null))}a.__xScrollStoryRAF=null},fY=function(a){return function d(c){if($APP.r(function(){var k=a.isConnected;
12
- return $APP.r(k)?(k=$APP.l(a,"__xScrollStoryVisible"),$APP.r(k)?$APP.t($APP.l(a,"__xScrollStoryAutoplayPaused")):k):k}())){var e=$APP.l(a,"__xScrollStoryModel");if($APP.r(function(){if($APP.r(e)){var k=$APP.gi.g(e);return $APP.r(k)?$APP.t($APP.W.g(e)):k}return e}())){var g=$APP.l(a,"__xScrollStoryAutoplayLast");g=$APP.r(g)?(c-g)/1E3:0;a.__xScrollStoryAutoplayLast=c;if(g>0){var h=window.scrollY;window.scrollBy(0,$APP.mj.g(e)*g);$APP.r(function(){var k=$APP.Wh.g(e);return $APP.r(k)?window.scrollY-h<
13
- .5:k}())&&(c=a.getBoundingClientRect().top+window.scrollY,window.scrollTo(0,c),a.__xScrollStoryAutoplayLast=null)}return $APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(d))}}return null}},gY=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused")))return null;a.__xScrollStoryAutoplayPaused=!0;var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");
14
- return $APP.r(e)?e:0}();var c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?$X(d[c]):null;return aY(a,"x-scroll-story-autoplay-pause",new $APP.P(null,3,[$APP.el,b,$APP.Cj,c,$APP.Lk,d],null))},hY=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused"))){a.__xScrollStoryAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollStoryAutoplayLast=null;$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(fY(a)));
15
- var b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(e)?e:0}(),c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?$X(d[c]):null;return aY(a,"x-scroll-story-autoplay-resume",new $APP.P(null,3,[$APP.el,b,$APP.Cj,c,$APP.Lk,d],null))}return null},iY=function(a){var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);b=$APP.l(a,"__xScrollStoryAutoplayHandlers");$APP.r(b)&&
16
- (a.removeEventListener("pointerdown",$APP.l(b,"pointerdown")),a.removeEventListener("pointerup",$APP.l(b,"pointerup")),a.removeEventListener("pointerleave",$APP.l(b,"pointerleave")),a.removeEventListener("keydown",$APP.l(b,"keydown")),a.removeEventListener("keyup",$APP.l(b,"keyup")),a.__xScrollStoryAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null},jY=function(a){if($APP.l(a,"__xScrollStoryAutoplayRAF")==
17
- null){var b=$APP.l(a,"__xScrollStoryModel");if($APP.r(function(){if($APP.r(b)){var k=$APP.gi.g(b);return $APP.r(k)?(k=$APP.t($APP.W.g(b)))?(k=$APP.l(a,"__xScrollStoryVisible"),$APP.r(k)?!ZX():k):k:k}return b}())){a.setAttribute("tabindex","0");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null;var c=function(){return gY(a)},d=function(){return hY(a)},e=function(){return $APP.r($APP.l(a,"__xScrollStoryAutoplayPaused"))?hY(a):null},g=function(k){return $APP.D.i(k.code,"Space")?(k.preventDefault(),
18
- gY(a)):null},h=function(k){return $APP.D.i(k.code,"Space")?hY(a):null};a.addEventListener("pointerdown",c);a.addEventListener("pointerup",d);a.addEventListener("pointerleave",e);a.addEventListener("keydown",g);a.addEventListener("keyup",h);$APP.n(a,"__xScrollStoryAutoplayHandlers",{pointerdown:c,pointerup:d,pointerleave:e,keydown:g,keyup:h});$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(fY(a)))}}return null},kY=function(a){a=$APP.l(a,"__xScrollStoryModel");return $APP.r(a)?$APP.W.g(a):
19
- a},lY=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStoryVisible"),$APP.r(b)?$APP.t(kY(a))&&!ZX():b):b}())?$APP.r($APP.l(a,"__xScrollStoryRAF"))?null:$APP.n(a,"__xScrollStoryRAF",requestAnimationFrame(function(){return eY(a)})):null},mY=function(a){a=$APP.l(a,"__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},nY=function(a){a=$APP.l(a,
20
- "__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},oY=function(a,b){b=b[0].isIntersecting;var c=$APP.N($APP.l(a,"__xScrollStoryRefs"));c=$APP.G(c,$APP.$h);a.__xScrollStoryVisible=b;if($APP.r(b)){if($APP.r(kY(a)))return null;mY(a);eY(a);bY(c,"Story section entered viewport");aY(a,"x-scroll-story-enter",new $APP.P(null,1,[$APP.el,function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?
21
- d:0}()],null));b=$APP.l(a,"__xScrollStoryModel");return $APP.r($APP.r(b)?$APP.gi.g(b):b)?jY(a):null}nY(a);iY(a);if($APP.r(kY(a)))return null;bY(c,"Story section left viewport");return aY(a,"x-scroll-story-leave",new $APP.P(null,1,[$APP.el,function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?d:0}()],null))},pY=function(a){function b(){return $APP.r($APP.l(a,"__xScrollStoryVisible"))?(a.__xScrollStoryStepStates=null,eY(a)):null}function c(){a.__xScrollStoryStepStates=null;return $APP.r($APP.l(a,
22
- "__xScrollStoryVisible"))?eY(a):null}var d=TX(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStoryHandlers",{scroll:function(){return lY(a)},slot:c,resize:b,scrollAttached:!1})},qY=function(a){var b=$APP.l(a,"__xScrollStoryHandlers");if($APP.r(b)){nY(a);var c=$APP.l(a,"__xScrollStoryRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",
23
- b)}b=$APP.l(a,"__xScrollStoryRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryRAF=null);a.__xScrollStoryHandlers=null},rY=function(a){var b=$APP.l(a,"__xScrollStoryIO");$APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){return oY(a,c)},{threshold:[0]});b.observe(a);a.__xScrollStoryIO=b},sY=function(a){a=YX(a);for(var b=a.length,c=0;;)if(c<b)a[c].removeAttribute("data-active"),c+=1;else break},tY=function(a){var b=XX(a);if($APP.O($APP.l(a,"__xScrollStoryModel"),b)){var c=$APP.N(b),
24
- d=$APP.G(c,$APP.Aj),e=$APP.G(c,WX);b=$APP.G(c,$APP.W);var g=$APP.G(c,$APP.T),h=TX(a);h=$APP.N(h);var k=$APP.G(h,$APP.Zi),m=$APP.G(h,SX);$APP.G(h,$APP.$h);a.setAttribute("data-layout",d);$APP.D.i(d,"top")?m.style.width="":m.style.width="var(--x-scroll-story-media-width,"+$APP.S.g(e*100)+"%)";$APP.u(g)?k.setAttribute("aria-label",g):k.removeAttribute("aria-label");a.__xScrollStoryModel=c;$APP.r(b)?(sY(a),a.__xScrollStoryActiveIndex=-1,a.__xScrollStoryStepStates=null,nY(a),iY(a)):$APP.r($APP.l(a,"__xScrollStoryVisible"))&&
25
- (mY(a),eY(a));c=$APP.gi.g(c);b=$APP.r(c)?(b=$APP.t(b))?$APP.l(a,"__xScrollStoryVisible"):b:c;$APP.r(b)?jY(a):iY(a)}},uY=function(a){Object.defineProperty(a,"layout",{get:function(){var b=this.getAttribute("layout");return $APP.r(b)?b:"left"},set:function(b){return $APP.r(b)?this.setAttribute("layout",""+$APP.S.g(b)):this.removeAttribute("layout")},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return OX(this.getAttribute("threshold"))},set:function(b){return b!=
26
- null?this.setAttribute("threshold",""+$APP.S.g(b)):this.removeAttribute("threshold")},enumerable:!0,configurable:!0});Object.defineProperty(a,"split",{get:function(){return PX(this.getAttribute("split"))},set:function(b){return b!=null?this.setAttribute("split",""+$APP.S.g(b)):this.removeAttribute("split")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},
27
- enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?$APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=$APP.l(this,"__xScrollStoryActiveIndex");return b!=null?b:-1},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=
28
- $APP.l(this,"__xScrollStoryLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplay",{get:function(){return this.hasAttribute("autoplay")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplaySpeed",{get:function(){return QX(this.getAttribute("autoplay-speed"))},set:function(b){return b!=null?this.setAttribute("autoplay-speed",""+$APP.S.g(b)):this.removeAttribute("autoplay-speed")},
29
- enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayLoop",{get:function(){return this.hasAttribute("autoplay-loop")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-loop",""):this.removeAttribute("autoplay-loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayIndicator",{get:function(){return this.hasAttribute("autoplay-indicator")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-indicator",""):this.removeAttribute("autoplay-indicator")},enumerable:!0,
30
- configurable:!0});Object.defineProperty(a,"autoplayPaused",{get:function(){return $APP.I($APP.l(this,"__xScrollStoryAutoplayPaused"))},enumerable:!0,configurable:!0})},wY=function(){var a=class extends HTMLElement{};a.observedAttributes=vY;a.prototype.connectedCallback=function(){TX(this);qY(this);pY(this);rY(this);tY(this);return null};a.prototype.disconnectedCallback=function(){iY(this);sY(this);if($APP.r($APP.l(this,"__xScrollStoryVisible"))){var b=$APP.l(this,"__xScrollStoryLastProg");aY(this,
31
- "x-scroll-story-leave",new $APP.P(null,1,[$APP.el,$APP.r(b)?b:0],null))}qY(this);b=$APP.l(this,"__xScrollStoryIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStoryIO=null);this.__xScrollStoryVisible=!1;this.__xScrollStoryActiveIndex=-1;return this.__xScrollStoryStepStates=this.__xScrollStoryLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&tY(this);return null};uY(a.prototype);return a},xY=function(){$APP.r(customElements.get("x-scroll-story"))||customElements.define("x-scroll-story",
32
- wY());return null},SX=new $APP.K(null,"media","media",-1066138403),UX=new $APP.K(null,"split-raw","split-raw",-455766786),WX=new $APP.K(null,"split","split",-599435118);var vY="layout threshold split disabled label autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
33
- $APP.Q([$APP.Ak,$APP.ph,$APP.Vj,$APP.gj,$APP.Aj,$APP.Cj,$APP.Xk,$APP.Cl,WX,$APP.T,$APP.Oj,$APP.el],[new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
34
- 1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null)]);
35
- $APP.Sd(["x-scroll-story-step-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.rj,$APP.V,$APP.Vl,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-step-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-step-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-progress",new $APP.P(null,2,[$APP.U,
36
- new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-autoplay-pause",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-autoplay-resume",new $APP.P(null,
37
- 2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null)]);var VX=new $APP.R(null,new $APP.P(null,3,["right",null,"top",null,"left",null],null),null);$APP.ka("baredom.exports.x_scroll_story.init",xY);export const init=xY;
2
+ var o0=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?.5:$APP.$g.i(0,$APP.ah.i(1,a))):.5},p0=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?.5:$APP.$g.i(.1,$APP.ah.i(.9,a))):.5},q0=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?50:$APP.$g.i(1,$APP.ah.i(1E3,a))):50},r0=function(a,b){var c=$APP.z(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?e:g;var h=$APP.oc(a,d),l=$APP.M(h);h=$APP.D(l,
3
+ $APP.Yh);l=$APP.D(l,$APP.fk);e=h<=b&&l>b?d:e;g=h<=b?d:g;d+=1}},t0=function(a){var b=$APP.k(a,"__xScrollStoryRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("slot"),m=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-story-gap:0;--x-scroll-story-step-min-height:80vh;--x-scroll-story-step-padding:2rem;--x-scroll-story-active-opacity:1;--x-scroll-story-inactive-opacity:0.3;--x-scroll-story-transition-duration:300ms;--x-scroll-story-disabled-opacity:0.55;--x-scroll-story-media-top:0;}[part\x3dcontainer]{display:flex;gap:var(--x-scroll-story-gap);}:host([data-layout\x3dleft]) [part\x3dcontainer]{flex-direction:row;}:host([data-layout\x3dright]) [part\x3dcontainer]{flex-direction:row-reverse;}:host([data-layout\x3dtop]) [part\x3dcontainer]{flex-direction:column;}[part\x3dmedia]{position:sticky;top:var(--x-scroll-story-media-top);align-self:flex-start;flex-shrink:0;}:host([data-layout\x3dtop]) [part\x3dmedia]{position:sticky;width:100%;}[part\x3dsteps]{flex:1;min-width:0;}[part\x3dmedia]{height:100dvh;}::slotted(:not([slot])){min-height:var(--x-scroll-story-step-min-height);padding:var(--x-scroll-story-step-padding);opacity:var(--x-scroll-story-inactive-opacity);transition:opacity var(--x-scroll-story-transition-duration) ease;}::slotted([data-active]){opacity:var(--x-scroll-story-active-opacity);}:host([disabled]){opacity:var(--x-scroll-story-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
+ d.setAttribute("part","container");d.setAttribute("role","region");e.setAttribute("part","media");h.setAttribute("name","media");var p=document.createElement("div");p.setAttribute("part","indicator");e.appendChild(p);e.appendChild(h);g.setAttribute("part","steps");g.appendChild(l);d.appendChild(e);d.appendChild(g);m.setAttribute("part","live");m.setAttribute("aria-live","polite");m.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(m);a.__xScrollStoryRefs=new $APP.R(null,
5
+ 6,[$APP.ji,b,$APP.ej,d,s0,e,$APP.Pl,g,$APP.Li,l,$APP.hi,m],null);return $APP.k(a,"__xScrollStoryRefs")},x0=function(a){a=$APP.xf([$APP.Wh,$APP.vj,$APP.sl,$APP.Gh,$APP.Bk,$APP.si,$APP.Gi,$APP.rl,u0],[a.getAttribute("label"),a.getAttribute("autoplay-speed"),$APP.n(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.n(a.hasAttribute("autoplay-indicator"))?"":null,$APP.n(a.hasAttribute("disabled"))?"":null,$APP.n(a.hasAttribute("autoplay-loop"))?"":null,a.getAttribute("split")]);
6
+ var b=$APP.M(a);a=$APP.D(b,$APP.Gi);var c=$APP.D(b,$APP.rl),d=$APP.D(b,u0),e=$APP.D(b,$APP.Wh),g=$APP.D(b,$APP.vj),h=$APP.D(b,$APP.sl),l=$APP.D(b,$APP.Gh),m=$APP.D(b,$APP.Bk);b=$APP.D(b,$APP.si);m=typeof m==="string"?m.trim().toLowerCase():null;m=$APP.J(v0,m)?m:"left";return $APP.xf([$APP.Nj,$APP.di,$APP.gl,w0,$APP.U,$APP.li,$APP.W,$APP.wj,$APP.oi],[m,c!=null,o0(l),p0(d),$APP.n(e)?e:"",b!=null,a!=null,q0(g),h!=null])},y0=function(a){a=t0(a);a=$APP.M(a);return $APP.D(a,$APP.Li).assignedElements()},
7
+ z0=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},A0=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.N(a,"")?a:null},B0=function(a,b,c){b=new CustomEvent(b,{detail:$APP.ph(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},C0=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},3E3)},D0=function(a,b,c){var d=$APP.k(a,"__xScrollStoryActiveIndex");d=$APP.n(d)?d:-1;if($APP.N(d,c)){d>=0&&d<b.length&&
8
+ b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");c>=0?a.setAttribute("data-active-index",""+$APP.T.g(c)):a.removeAttribute("data-active-index");a.__xScrollStoryActiveIndex=c;var e=d>=0&&d<b.length?A0(b[d]):null;b=c>=0&&c<b.length?A0(b[c]):null;B0(a,"x-scroll-story-step-change",new $APP.R(null,4,[$APP.Lh,c,$APP.Nk,b,$APP.Cj,d,$APP.nm,e],null));a=$APP.M($APP.k(a,"__xScrollStoryRefs"));a=$APP.D(a,$APP.hi);C0(a,"Step "+$APP.T.g(c+1)+" active")}},E0=function(a,
9
+ b,c,d){var e=b.length;var g=$APP.k(a,"__xScrollStoryStepStates");if(!$APP.n($APP.n(g)?$APP.C.i(g.length,e):g)){for(var h=Array(e),l=0;;)if(l<e)h[l]=$APP.n($APP.n(g)?l<g.length:g)?g[l]:!1,l+=1;else break;g=a.__xScrollStoryStepStates=h}for(h=0;;)if(h<e){if(h<$APP.z(c)){l=$APP.oc(c,h);l=$APP.M(l);var m=$APP.D(l,$APP.Yh),p=$APP.D(l,$APP.fk),q=g[h];l=m<=d&&p>d;var v=A0(b[h]),x=m;m=p-m;m=m<=0?0:$APP.$g.i(0,$APP.ah.i(1,(d-x)/m));$APP.r(q)&&l?(g[h]=!0,B0(a,"x-scroll-story-step-enter",new $APP.R(null,3,[$APP.Lh,
10
+ h,$APP.Nk,v,$APP.ol,m],null))):$APP.n($APP.n(q)?!l:q)&&(g[h]=!1,B0(a,"x-scroll-story-step-leave",new $APP.R(null,3,[$APP.Lh,h,$APP.Nk,v,$APP.ol,m],null)))}h+=1}else break},F0=function(a){var b=function(){var m=$APP.k(a,"__xScrollStoryModel");return $APP.n(m)?m:x0(a)}();if(!$APP.n($APP.W.g(b))){var c=y0(a),d=c.length,e=window.innerHeight,g=e*$APP.gl.g(b),h=function(){for(var m=0,p=$APP.ee;;){if(m>=d)return p;var q=c[m].getBoundingClientRect();m+=1;p=$APP.kd.i(p,new $APP.R(null,2,[$APP.Yh,q.top,$APP.fk,
11
+ q.top+q.height],null))}}();b=r0(h,g);var l=$APP.M($APP.k(a,"__xScrollStoryRefs"));l=$APP.D(l,$APP.Pl).getBoundingClientRect();e=$APP.$g.i(0,$APP.ah.i(1,(e-l.top)/(e+l.height)));l=$APP.k(a,"__xScrollStoryLastProg");D0(a,c,b);E0(a,c,h,g);if(l==null||Math.abs(e-l)>.001)a.__xScrollStoryLastProg=e,g=b>=0&&b<d?A0(c[b]):null,B0(a,"x-scroll-story-progress",new $APP.R(null,3,[$APP.ol,e,$APP.Pj,b,$APP.Uk,g],null))}a.__xScrollStoryRAF=null},G0=function(a){return function d(c){if($APP.n(function(){var l=a.isConnected;
12
+ return $APP.n(l)?(l=$APP.k(a,"__xScrollStoryVisible"),$APP.n(l)?$APP.r($APP.k(a,"__xScrollStoryAutoplayPaused")):l):l}())){var e=$APP.k(a,"__xScrollStoryModel");if($APP.n(function(){if($APP.n(e)){var l=$APP.oi.g(e);return $APP.n(l)?$APP.r($APP.W.g(e)):l}return e}())){var g=$APP.k(a,"__xScrollStoryAutoplayLast");g=$APP.n(g)?(c-g)/1E3:0;a.__xScrollStoryAutoplayLast=c;if(g>0){var h=window.scrollY;window.scrollBy(0,$APP.wj.g(e)*g);$APP.n(function(){var l=$APP.di.g(e);return $APP.n(l)?window.scrollY-h<
13
+ .5:l}())&&(c=a.getBoundingClientRect().top+window.scrollY,window.scrollTo(0,c),a.__xScrollStoryAutoplayLast=null)}return $APP.ia(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(d))}}return null}},H0=function(a){if($APP.n($APP.k(a,"__xScrollStoryAutoplayPaused")))return null;a.__xScrollStoryAutoplayPaused=!0;var b=$APP.k(a,"__xScrollStoryAutoplayRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.k(a,"__xScrollStoryLastProg");
14
+ return $APP.n(e)?e:0}();var c=function(){var e=$APP.k(a,"__xScrollStoryActiveIndex");return $APP.n(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?A0(d[c]):null;return B0(a,"x-scroll-story-autoplay-pause",new $APP.R(null,3,[$APP.ol,b,$APP.Pj,c,$APP.Uk,d],null))},I0=function(a){if($APP.n($APP.k(a,"__xScrollStoryAutoplayPaused"))){a.__xScrollStoryAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollStoryAutoplayLast=null;$APP.ia(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(G0(a)));
15
+ var b=function(){var e=$APP.k(a,"__xScrollStoryLastProg");return $APP.n(e)?e:0}(),c=function(){var e=$APP.k(a,"__xScrollStoryActiveIndex");return $APP.n(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?A0(d[c]):null;return B0(a,"x-scroll-story-autoplay-resume",new $APP.R(null,3,[$APP.ol,b,$APP.Pj,c,$APP.Uk,d],null))}return null},J0=function(a){var b=$APP.k(a,"__xScrollStoryAutoplayRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);b=$APP.k(a,"__xScrollStoryAutoplayHandlers");$APP.n(b)&&
16
+ (a.removeEventListener("pointerdown",$APP.k(b,"pointerdown")),a.removeEventListener("pointerup",$APP.k(b,"pointerup")),a.removeEventListener("pointerleave",$APP.k(b,"pointerleave")),a.removeEventListener("keydown",$APP.k(b,"keydown")),a.removeEventListener("keyup",$APP.k(b,"keyup")),a.__xScrollStoryAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null},K0=function(a){if($APP.k(a,"__xScrollStoryAutoplayRAF")==
17
+ null){var b=$APP.k(a,"__xScrollStoryModel");if($APP.n(function(){if($APP.n(b)){var l=$APP.oi.g(b);return $APP.n(l)?(l=$APP.r($APP.W.g(b)))?(l=$APP.k(a,"__xScrollStoryVisible"),$APP.n(l)?!z0():l):l:l}return b}())){a.setAttribute("tabindex","0");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null;var c=function(){return H0(a)},d=function(){return I0(a)},e=function(){return $APP.n($APP.k(a,"__xScrollStoryAutoplayPaused"))?I0(a):null},g=function(l){return $APP.C.i(l.code,"Space")?(l.preventDefault(),
18
+ H0(a)):null},h=function(l){return $APP.C.i(l.code,"Space")?I0(a):null};a.addEventListener("pointerdown",c);a.addEventListener("pointerup",d);a.addEventListener("pointerleave",e);a.addEventListener("keydown",g);a.addEventListener("keyup",h);$APP.ia(a,"__xScrollStoryAutoplayHandlers",{pointerdown:c,pointerup:d,pointerleave:e,keydown:g,keyup:h});$APP.ia(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(G0(a)))}}return null},L0=function(a){a=$APP.k(a,"__xScrollStoryModel");return $APP.n(a)?$APP.W.g(a):
19
+ a},M0=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollStoryVisible"),$APP.n(b)?$APP.r(L0(a))&&!z0():b):b}())?$APP.n($APP.k(a,"__xScrollStoryRAF"))?null:$APP.ia(a,"__xScrollStoryRAF",requestAnimationFrame(function(){return F0(a)})):null},N0=function(a){a=$APP.k(a,"__xScrollStoryHandlers");$APP.n($APP.n(a)?$APP.r($APP.k(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},O0=function(a){a=$APP.k(a,
20
+ "__xScrollStoryHandlers");$APP.n($APP.n(a)?$APP.k(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.k(a,"scroll")),a.scrollAttached=!1)},P0=function(a,b){b=b[0].isIntersecting;var c=$APP.M($APP.k(a,"__xScrollStoryRefs"));c=$APP.D(c,$APP.hi);a.__xScrollStoryVisible=b;if($APP.n(b)){if($APP.n(L0(a)))return null;N0(a);F0(a);C0(c,"Story section entered viewport");B0(a,"x-scroll-story-enter",new $APP.R(null,1,[$APP.ol,function(){var d=$APP.k(a,"__xScrollStoryLastProg");return $APP.n(d)?
21
+ d:0}()],null));b=$APP.k(a,"__xScrollStoryModel");return $APP.n($APP.n(b)?$APP.oi.g(b):b)?K0(a):null}O0(a);J0(a);if($APP.n(L0(a)))return null;C0(c,"Story section left viewport");return B0(a,"x-scroll-story-leave",new $APP.R(null,1,[$APP.ol,function(){var d=$APP.k(a,"__xScrollStoryLastProg");return $APP.n(d)?d:0}()],null))},Q0=function(a){function b(){return $APP.n($APP.k(a,"__xScrollStoryVisible"))?(a.__xScrollStoryStepStates=null,F0(a)):null}function c(){a.__xScrollStoryStepStates=null;return $APP.n($APP.k(a,
22
+ "__xScrollStoryVisible"))?F0(a):null}var d=t0(a);d=$APP.M(d);$APP.D(d,$APP.Li).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ia(a,"__xScrollStoryHandlers",{scroll:function(){return M0(a)},slot:c,resize:b,scrollAttached:!1})},R0=function(a){var b=$APP.k(a,"__xScrollStoryHandlers");if($APP.n(b)){O0(a);var c=$APP.k(a,"__xScrollStoryRefs");if($APP.n(c)){c=$APP.Li.g(c);var d=$APP.k(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.k(b,"resize");$APP.n(b)&&window.removeEventListener("resize",
23
+ b)}b=$APP.k(a,"__xScrollStoryRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStoryRAF=null);a.__xScrollStoryHandlers=null},S0=function(a){var b=$APP.k(a,"__xScrollStoryIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return P0(a,c)},{threshold:[0]});b.observe(a);a.__xScrollStoryIO=b},T0=function(a){a=y0(a);for(var b=a.length,c=0;;)if(c<b)a[c].removeAttribute("data-active"),c+=1;else break},U0=function(a){var b=x0(a);if($APP.N($APP.k(a,"__xScrollStoryModel"),b)){var c=$APP.M(b),
24
+ d=$APP.D(c,$APP.Nj),e=$APP.D(c,w0);b=$APP.D(c,$APP.W);var g=$APP.D(c,$APP.U),h=t0(a),l=$APP.M(h);h=$APP.D(l,$APP.ej);l=$APP.D(l,s0);a.setAttribute("data-layout",d);$APP.C.i(d,"top")?l.style.width="":l.style.width="var(--x-scroll-story-media-width,"+$APP.T.g(e*100)+"%)";$APP.t(g)?h.setAttribute("aria-label",g):h.removeAttribute("aria-label");a.__xScrollStoryModel=c;$APP.n(b)?(T0(a),a.__xScrollStoryActiveIndex=-1,a.__xScrollStoryStepStates=null,O0(a),J0(a)):$APP.n($APP.k(a,"__xScrollStoryVisible"))&&
25
+ (N0(a),F0(a));c=$APP.oi.g(c);b=$APP.n(c)?(b=$APP.r(b))?$APP.k(a,"__xScrollStoryVisible"):b:c;$APP.n(b)?K0(a):J0(a)}},V0=function(a){Object.defineProperty(a,"layout",{get:function(){var b=this.getAttribute("layout");return $APP.n(b)?b:"left"},set:function(b){return $APP.n(b)?this.setAttribute("layout",""+$APP.T.g(b)):this.removeAttribute("layout")},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return o0(this.getAttribute("threshold"))},set:function(b){return b!=
26
+ null?this.setAttribute("threshold",""+$APP.T.g(b)):this.removeAttribute("threshold")},enumerable:!0,configurable:!0});Object.defineProperty(a,"split",{get:function(){return p0(this.getAttribute("split"))},set:function(b){return b!=null?this.setAttribute("split",""+$APP.T.g(b)):this.removeAttribute("split")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},
27
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=$APP.k(this,"__xScrollStoryActiveIndex");return b!=null?b:-1},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=
28
+ $APP.k(this,"__xScrollStoryLastProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplay",{get:function(){return this.hasAttribute("autoplay")},set:function(b){return $APP.n(b)?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplaySpeed",{get:function(){return q0(this.getAttribute("autoplay-speed"))},set:function(b){return b!=null?this.setAttribute("autoplay-speed",""+$APP.T.g(b)):this.removeAttribute("autoplay-speed")},
29
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayLoop",{get:function(){return this.hasAttribute("autoplay-loop")},set:function(b){return $APP.n(b)?this.setAttribute("autoplay-loop",""):this.removeAttribute("autoplay-loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayIndicator",{get:function(){return this.hasAttribute("autoplay-indicator")},set:function(b){return $APP.n(b)?this.setAttribute("autoplay-indicator",""):this.removeAttribute("autoplay-indicator")},enumerable:!0,
30
+ configurable:!0});Object.defineProperty(a,"autoplayPaused",{get:function(){return $APP.F($APP.k(this,"__xScrollStoryAutoplayPaused"))},enumerable:!0,configurable:!0})},X0=function(){var a=class extends HTMLElement{};a.observedAttributes=W0;a.prototype.connectedCallback=function(){t0(this);R0(this);Q0(this);S0(this);U0(this);return null};a.prototype.disconnectedCallback=function(){J0(this);T0(this);if($APP.n($APP.k(this,"__xScrollStoryVisible"))){var b=$APP.k(this,"__xScrollStoryLastProg");B0(this,
31
+ "x-scroll-story-leave",new $APP.R(null,1,[$APP.ol,$APP.n(b)?b:0],null))}R0(this);b=$APP.k(this,"__xScrollStoryIO");$APP.n(b)&&(b.disconnect(),this.__xScrollStoryIO=null);this.__xScrollStoryVisible=!1;this.__xScrollStoryActiveIndex=-1;return this.__xScrollStoryStepStates=this.__xScrollStoryLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&U0(this);return null};V0(a.prototype);return a},Y0=function(){$APP.n(customElements.get("x-scroll-story"))||customElements.define("x-scroll-story",
32
+ X0());return null},s0=new $APP.K(null,"media","media",-1066138403),u0=new $APP.K(null,"split-raw","split-raw",-455766786),w0=new $APP.K(null,"split","split",-599435118);var W0="layout threshold split disabled label autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
33
+ $APP.xf([$APP.Ik,$APP.rh,$APP.jk,$APP.mj,$APP.Nj,$APP.Pj,$APP.gl,$APP.Ul,w0,$APP.U,$APP.ck,$APP.ol],[new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,2,[$APP.Z,$APP.V,$APP.Sj,!0],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,2,[$APP.Z,$APP.Bj,$APP.Sj,!0],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,
34
+ 1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,2,[$APP.Z,$APP.V,$APP.Sj,!0],null)]);
35
+ $APP.Pd(["x-scroll-story-step-change",new $APP.R(null,2,[$APP.yj,new $APP.R(null,4,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.Cj,$APP.V,$APP.nm,$APP.X],null),$APP.wl,!1],null),"x-scroll-story-step-enter",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-story-step-leave",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-story-progress",new $APP.R(null,2,
36
+ [$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null),"x-scroll-story-enter",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-story-leave",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-story-autoplay-pause",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null),"x-scroll-story-autoplay-resume",new $APP.R(null,
37
+ 2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null)]);var v0=new $APP.S(null,new $APP.R(null,3,["right",null,"top",null,"left",null],null),null);$APP.fa("baredom.exports.x_scroll_story.init",Y0);export const init=Y0;