@vanelsas/baredom 2.6.0 → 2.8.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 (109) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +12 -41
  3. package/custom-elements.json +344 -5
  4. package/dist/baredom.d.ts +4 -0
  5. package/dist/base.js +451 -421
  6. package/dist/integrity.json +97 -93
  7. package/dist/x-alert.js +17 -19
  8. package/dist/x-avatar-group.js +9 -11
  9. package/dist/x-avatar.js +15 -15
  10. package/dist/x-badge.js +9 -11
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +13 -14
  14. package/dist/x-button.js +16 -16
  15. package/dist/x-cancel-dialogue.js +13 -17
  16. package/dist/x-card.js +7 -7
  17. package/dist/x-carousel.js +33 -34
  18. package/dist/x-chart.d.ts +26 -0
  19. package/dist/x-chart.js +47 -48
  20. package/dist/x-checkbox.js +11 -11
  21. package/dist/x-chip.js +1 -9
  22. package/dist/x-collapse.js +10 -12
  23. package/dist/x-color-picker.js +44 -45
  24. package/dist/x-combobox.js +26 -27
  25. package/dist/x-command-palette.js +26 -27
  26. package/dist/x-container.js +5 -6
  27. package/dist/x-context-menu.d.ts +31 -2
  28. package/dist/x-context-menu.js +20 -18
  29. package/dist/x-copy.js +20 -23
  30. package/dist/x-currency-field.js +23 -25
  31. package/dist/x-date-picker.d.ts +27 -0
  32. package/dist/x-date-picker.js +42 -42
  33. package/dist/x-divider.js +9 -10
  34. package/dist/x-drawer.js +10 -12
  35. package/dist/x-dropdown.js +11 -11
  36. package/dist/x-fieldset.js +5 -6
  37. package/dist/x-file-download.js +7 -8
  38. package/dist/x-file-upload.js +22 -25
  39. package/dist/x-form-field.js +15 -17
  40. package/dist/x-form.js +9 -10
  41. package/dist/x-gaussian-blur.js +13 -19
  42. package/dist/x-grid.js +6 -6
  43. package/dist/x-i18n-provider.d.ts +43 -0
  44. package/dist/x-i18n-provider.js +8 -0
  45. package/dist/x-i18n.d.ts +14 -0
  46. package/dist/x-i18n.js +5 -0
  47. package/dist/x-icon.js +6 -7
  48. package/dist/x-image.js +18 -19
  49. package/dist/x-kinetic-canvas.d.ts +18 -0
  50. package/dist/x-kinetic-canvas.js +26 -0
  51. package/dist/x-kinetic-font.js +27 -29
  52. package/dist/x-kinetic-typography.js +33 -39
  53. package/dist/x-liquid-dock.js +39 -39
  54. package/dist/x-liquid-fill.js +45 -45
  55. package/dist/x-liquid-glass.js +47 -47
  56. package/dist/x-menu-item.js +8 -10
  57. package/dist/x-menu.js +10 -11
  58. package/dist/x-metaball-cursor.js +27 -27
  59. package/dist/x-modal.js +11 -13
  60. package/dist/x-morph-stack.js +37 -39
  61. package/dist/x-multi-combobox.d.ts +50 -0
  62. package/dist/x-multi-combobox.js +37 -0
  63. package/dist/x-navbar.js +12 -13
  64. package/dist/x-neural-glow.js +33 -34
  65. package/dist/x-notification-center.js +9 -10
  66. package/dist/x-organic-divider.js +17 -19
  67. package/dist/x-organic-progress.js +38 -39
  68. package/dist/x-organic-shape.js +13 -14
  69. package/dist/x-pagination.js +15 -17
  70. package/dist/x-particle-button.js +51 -52
  71. package/dist/x-popover.js +26 -25
  72. package/dist/x-progress-circle.js +9 -11
  73. package/dist/x-progress.js +10 -11
  74. package/dist/x-radio.js +11 -12
  75. package/dist/x-ripple-effect.js +11 -12
  76. package/dist/x-scroll-parallax.js +18 -19
  77. package/dist/x-scroll-stack.js +17 -18
  78. package/dist/x-scroll-story.js +34 -36
  79. package/dist/x-scroll-timeline.js +45 -47
  80. package/dist/x-scroll.js +40 -42
  81. package/dist/x-search-field.js +15 -17
  82. package/dist/x-select.js +11 -11
  83. package/dist/x-sidebar.js +17 -17
  84. package/dist/x-skeleton-group.js +12 -14
  85. package/dist/x-skeleton.js +1 -1
  86. package/dist/x-slider.js +15 -18
  87. package/dist/x-soft-body.js +22 -22
  88. package/dist/x-spacer.js +4 -5
  89. package/dist/x-spinner.js +4 -6
  90. package/dist/x-splash.js +12 -13
  91. package/dist/x-stat.js +10 -12
  92. package/dist/x-stepper.js +14 -15
  93. package/dist/x-switch.js +10 -11
  94. package/dist/x-tab.js +7 -8
  95. package/dist/x-table-cell.js +20 -24
  96. package/dist/x-table-row.js +8 -10
  97. package/dist/x-table.js +12 -16
  98. package/dist/x-tabs.js +11 -11
  99. package/dist/x-text-area.js +19 -21
  100. package/dist/x-theme.d.ts +1 -1
  101. package/dist/x-theme.js +25 -25
  102. package/dist/x-timeline-item.js +21 -23
  103. package/dist/x-timeline.js +8 -9
  104. package/dist/x-toast.js +22 -24
  105. package/dist/x-toaster.js +8 -8
  106. package/dist/x-tooltip.js +12 -13
  107. package/dist/x-typography.js +9 -11
  108. package/dist/x-welcome-tour.js +60 -65
  109. package/package.json +201 -181
@@ -1,12 +1,10 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var lX=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},oX=function(a){var b=new $APP.Q(null,7,[$APP.Yi,a.getAttribute("value"),$APP.Wk,a.getAttribute("max"),$APP.Vg,a.getAttribute("variant"),$APP.Mh,a.getAttribute("size"),$APP.U,a.getAttribute("label"),$APP.nk,a.hasAttribute("show-value"),$APP.om,a.hasAttribute("indeterminate")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Wk),e=$APP.D(c,$APP.Yi),g=$APP.D(c,$APP.Vg),h=$APP.D(c,$APP.Mh);b=$APP.D(c,$APP.U);var l=$APP.D(c,
3
- $APP.nk);c=$APP.D(c,$APP.om);d=lX(d,100);d=d>0?d:100;e=$APP.ph.i($APP.oh.i(lX(e,0),0),d);g=typeof g==="string"&&$APP.I(mX,g)?g:"default";h=typeof h==="string"&&$APP.I(nX,h)?h:"md";c=$APP.F(c);l=$APP.F(l);var m=c?50:$APP.ph.i($APP.oh.i(e/d*100,0),100);b=$APP.zf([$APP.Vg,$APP.nk,$APP.Yi,$APP.Mh,$APP.om,$APP.Zm,$APP.Wk,$APP.U,$APP.Nl],[g,l,e,h,c,c?"Loading…":""+$APP.T.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.N("",b)?b:null,m]);var p=$APP.M(b);b=$APP.D(p,$APP.Nl);l=$APP.D(p,$APP.Vg);d=$APP.D(p,
4
- $APP.nk);h=$APP.D(p,$APP.Yi);c=$APP.D(p,$APP.Mh);e=$APP.D(p,$APP.Zm);g=$APP.D(p,$APP.om);m=$APP.D(p,$APP.U);p=$APP.D(p,$APP.Wk);var q=$APP.k(a,"__xProgressCircleBase"),v=$APP.k(a,"__xProgressCircleFill"),x=$APP.k(a,"__xProgressCircleValueNode"),y=$APP.k(a,"__xProgressCircleCompleted"),A=$APP.r(g)&&h>=p,C=$APP.n(g)?75:100*(1-b/100);q.setAttribute("data-variant",l);q.setAttribute("data-size",c);q.setAttribute("data-indeterminate",$APP.n(g)?"true":"false");v.setAttribute("stroke-dasharray",""+$APP.T.g(100));
5
- v.setAttribute("stroke-dashoffset",""+$APP.T.g(C));x.textContent=$APP.n($APP.n(d)?$APP.r(g):d)?""+$APP.T.g(Math.round(b))+"%":"";x.style.display=$APP.n($APP.n(d)?$APP.r(g):d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(g)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.T.g(h)),a.setAttribute("aria-valuemax",""+$APP.T.g(p)),a.setAttribute("aria-valuetext",
6
- e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");A&&$APP.r(y)&&a.dispatchEvent(new CustomEvent("x-progress-circle-complete",{bubbles:!0,composed:!0,detail:{value:h,max:p}}));a.__xProgressCircleCompleted=$APP.F(A)},pX=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
7
- "max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"indeterminate",{get:function(){return this.hasAttribute("indeterminate")},set:function(b){return $APP.n(b)?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showValue",{get:function(){return this.hasAttribute("show-value")},
8
- set:function(b){return $APP.n(b)?this.setAttribute("show-value",""):this.removeAttribute("show-value")},enumerable:!0,configurable:!0})},rX=function(){var a=class extends HTMLElement{};a.observedAttributes=qX;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xProgressCircleInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),g=document.createElementNS("http://www.w3.org/2000/svg",
9
- "circle"),h=document.createElementNS("http://www.w3.org/2000/svg","circle"),l=document.createElement("div"),m=document.createElement("span");c.textContent=":host{display:inline-flex;color-scheme:light dark;box-sizing:border-box;--x-progress-circle-size:64px;--x-progress-circle-track-color:rgba(0,0,0,0.10);--x-progress-circle-fill-color:var(--x-color-primary,#3b82f6);--x-progress-circle-stroke-width:2.8;--x-progress-circle-value-color:rgba(0,0,0,0.50);--x-progress-circle-transition-duration:var(--x-transition-duration,0.3s);}@media (prefers-color-scheme:dark){:host{--x-progress-circle-track-color:rgba(255,255,255,0.12);--x-progress-circle-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-circle-size:40px;}[part\x3dbase][data-size\x3d'md']{--x-progress-circle-size:64px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-circle-size:96px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-circle-fill-color:var(--x-color-success,#22c55e);}[part\x3dbase][data-variant\x3d'warning']{--x-progress-circle-fill-color:var(--x-color-warning,#f59e0b);}[part\x3dbase][data-variant\x3d'danger']{--x-progress-circle-fill-color:var(--x-color-danger,#ef4444);}[part\x3dbase]{position:relative;display:inline-flex;width:var(--x-progress-circle-size);height:var(--x-progress-circle-size);}[part\x3dsvg]{width:100%;height:100%;}[part\x3dtrack]{fill:none;stroke:var(--x-progress-circle-track-color);stroke-width:var(--x-progress-circle-stroke-width);}[part\x3dfill]{fill:none;stroke:var(--x-progress-circle-fill-color);stroke-width:var(--x-progress-circle-stroke-width);stroke-linecap:round;transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset var(--x-progress-circle-transition-duration) ease;}[part\x3dcenter]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}[part\x3dvalue-text]{font-size:calc(var(--x-progress-circle-size) * 0.22);color:var(--x-progress-circle-value-color);font-weight:500;line-height:1;}@keyframes x-progress-circle-spin{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-circle-spin 1.2s linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;}}";
10
- d.setAttribute("part","base");e.setAttribute("part","svg");e.setAttribute("viewBox","0 0 36 36");e.setAttribute("aria-hidden","true");e.setAttribute("focusable","false");g.setAttribute("part","track");g.setAttribute("cx","18");g.setAttribute("cy","18");g.setAttribute("r","15.9155");h.setAttribute("part","fill");h.setAttribute("cx","18");h.setAttribute("cy","18");h.setAttribute("r","15.9155");l.setAttribute("part","center");m.setAttribute("part","value-text");e.appendChild(g);e.appendChild(h);l.appendChild(m);
11
- d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);this.__xProgressCircleBase=d;this.__xProgressCircleFill=h;this.__xProgressCircleValueNode=m;this.__xProgressCircleInit=!0}oX(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xProgressCircleInit"))&&oX(this);return null};pX(a.prototype);return a},sX=function(){$APP.n(customElements.get("x-progress-circle"))||customElements.define("x-progress-circle",
12
- rX());return null};var mX=new $APP.S(null,new $APP.Q(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),nX=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),qX="value max variant size label show-value indeterminate".split(" ");$APP.Pd(["x-progress-circle-complete",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,2,[$APP.Yi,$APP.W,$APP.Wk,$APP.W],null)],null)]);$APP.ha("baredom.exports.x_progress_circle.init",sX);export const init=sX;
2
+ var v0=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},y0=function(a){var b=new $APP.N(null,7,[$APP.Gh,a.getAttribute("value"),$APP.em,a.getAttribute("max"),$APP.ii,a.getAttribute("variant"),$APP.bj,a.getAttribute("size"),$APP.X,a.getAttribute("label"),$APP.ul,a.hasAttribute("show-value"),$APP.In,a.hasAttribute("indeterminate")],null);var c=$APP.J(b),d=$APP.C(c,$APP.em),e=$APP.C(c,$APP.Gh),f=$APP.C(c,$APP.ii),h=$APP.C(c,$APP.bj);b=$APP.C(c,$APP.X);var l=$APP.C(c,
3
+ $APP.ul);c=$APP.C(c,$APP.In);d=v0(d,100);d=d>0?d:100;e=$APP.Ii.i($APP.Hi.i(v0(e,0),0),d);f=typeof f==="string"&&$APP.Zc(w0,f)?f:"default";h=typeof h==="string"&&$APP.Zc(x0,h)?h:"md";c=$APP.E(c);l=$APP.E(l);var m=c?50:$APP.Ii.i($APP.Hi.i(e/d*100,0),100);b=$APP.Lf([$APP.ii,$APP.ul,$APP.Gh,$APP.bj,$APP.In,$APP.lo,$APP.em,$APP.X,$APP.en],[f,l,e,h,c,c?"Loading…":""+$APP.Q.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.M("",b)?b:null,m]);var q=$APP.J(b);b=$APP.C(q,$APP.en);l=$APP.C(q,$APP.ii);d=$APP.C(q,
4
+ $APP.ul);h=$APP.C(q,$APP.Gh);c=$APP.C(q,$APP.bj);e=$APP.C(q,$APP.lo);f=$APP.C(q,$APP.In);m=$APP.C(q,$APP.X);q=$APP.C(q,$APP.em);var r=$APP.k(a,"__xProgressCircleBase"),v=$APP.k(a,"__xProgressCircleFill"),x=$APP.k(a,"__xProgressCircleValueNode"),y=$APP.k(a,"__xProgressCircleCompleted"),A=$APP.p(f)&&h>=q,D=$APP.n(f)?75:100*(1-b/100);r.setAttribute("data-variant",l);r.setAttribute("data-size",c);r.setAttribute("data-indeterminate",$APP.n(f)?"true":"false");v.setAttribute("stroke-dasharray",""+$APP.Q.g(100));
5
+ v.setAttribute("stroke-dashoffset",""+$APP.Q.g(D));x.textContent=$APP.n($APP.n(d)?$APP.p(f):d)?""+$APP.Q.g(Math.round(b))+"%":"";x.style.display=$APP.n($APP.n(d)?$APP.p(f):d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(f)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.Q.g(h)),a.setAttribute("aria-valuemax",""+$APP.Q.g(q)),a.setAttribute("aria-valuetext",
6
+ e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");A&&$APP.p(y)&&$APP.P(a,"x-progress-circle-complete",{value:h,max:q});a.__xProgressCircleCompleted=$APP.E(A)},z0=function(a){if(!$APP.n($APP.k(a,"__xProgressCircleInit"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),f=document.createElementNS("http://www.w3.org/2000/svg","circle"),
7
+ h=document.createElementNS("http://www.w3.org/2000/svg","circle"),l=document.createElement("div"),m=document.createElement("span");c.textContent=":host{display:inline-flex;color-scheme:light dark;box-sizing:border-box;--x-progress-circle-size:64px;--x-progress-circle-track-color:rgba(0,0,0,0.10);--x-progress-circle-fill-color:var(--x-color-primary,#3b82f6);--x-progress-circle-stroke-width:2.8;--x-progress-circle-value-color:rgba(0,0,0,0.50);--x-progress-circle-transition-duration:var(--x-transition-duration,0.3s);}@media (prefers-color-scheme:dark){:host{--x-progress-circle-track-color:rgba(255,255,255,0.12);--x-progress-circle-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-circle-size:40px;}[part\x3dbase][data-size\x3d'md']{--x-progress-circle-size:64px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-circle-size:96px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-circle-fill-color:var(--x-color-success,#22c55e);}[part\x3dbase][data-variant\x3d'warning']{--x-progress-circle-fill-color:var(--x-color-warning,#f59e0b);}[part\x3dbase][data-variant\x3d'danger']{--x-progress-circle-fill-color:var(--x-color-danger,#ef4444);}[part\x3dbase]{position:relative;display:inline-flex;width:var(--x-progress-circle-size);height:var(--x-progress-circle-size);}[part\x3dsvg]{width:100%;height:100%;}[part\x3dtrack]{fill:none;stroke:var(--x-progress-circle-track-color);stroke-width:var(--x-progress-circle-stroke-width);}[part\x3dfill]{fill:none;stroke:var(--x-progress-circle-fill-color);stroke-width:var(--x-progress-circle-stroke-width);stroke-linecap:round;transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset var(--x-progress-circle-transition-duration) ease;}[part\x3dcenter]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}[part\x3dvalue-text]{font-size:calc(var(--x-progress-circle-size) * 0.22);color:var(--x-progress-circle-value-color);font-weight:500;line-height:1;}@keyframes x-progress-circle-spin{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-circle-spin 1.2s linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;}}";
8
+ d.setAttribute("part","base");e.setAttribute("part","svg");e.setAttribute("viewBox","0 0 36 36");e.setAttribute("aria-hidden","true");e.setAttribute("focusable","false");f.setAttribute("part","track");f.setAttribute("cx","18");f.setAttribute("cy","18");f.setAttribute("r","15.9155");h.setAttribute("part","fill");h.setAttribute("cx","18");h.setAttribute("cy","18");h.setAttribute("r","15.9155");l.setAttribute("part","center");m.setAttribute("part","value-text");e.appendChild(f);e.appendChild(h);l.appendChild(m);
9
+ d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);a.__xProgressCircleBase=d;a.__xProgressCircleFill=h;a.__xProgressCircleValueNode=m;a.__xProgressCircleInit=!0}y0(a);return null},A0=function(a,b,c,d){$APP.M(c,d)&&$APP.n($APP.k(a,"__xProgressCircleInit"))&&y0(a);return null},B0=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});
10
+ Object.defineProperty(a,"max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});$APP.dh(a,"indeterminate","indeterminate");return $APP.dh(a,"showValue","show-value")},D0=function(){return $APP.Yg("x-progress-circle",new $APP.N(null,4,[$APP.Pg,C0,$APP.Qg,z0,$APP.Sg,A0,$APP.Wg,B0],null))};var w0=new $APP.O(null,new $APP.N(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),x0=new $APP.O(null,new $APP.N(null,3,["md",null,"lg",null,"sm",null],null),null),C0="value max variant size label show-value indeterminate".split(" ");$APP.Yd(["x-progress-circle-complete",new $APP.N(null,1,[$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.V,$APP.em,$APP.V],null)],null)]);$APP.ca("baredom.exports.x_progress_circle.init",D0);export const init=D0;
@@ -1,12 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var O7=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},R7=function(a){var b=new $APP.Q(null,7,[$APP.Yi,a.getAttribute("value"),$APP.Wk,a.getAttribute("max"),$APP.Vg,a.getAttribute("variant"),$APP.Mh,a.getAttribute("size"),$APP.U,a.getAttribute("label"),$APP.nk,a.hasAttribute("show-value"),$APP.om,a.hasAttribute("indeterminate")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Wk),e=$APP.D(c,$APP.Yi),g=$APP.D(c,$APP.Vg),h=$APP.D(c,$APP.Mh);b=$APP.D(c,$APP.U);var l=$APP.D(c,
3
- $APP.nk);c=$APP.D(c,$APP.om);d=O7(d,100);d=d>0?d:100;e=$APP.ph.i($APP.oh.i(O7(e,0),0),d);g=typeof g==="string"&&$APP.I(P7,g)?g:"default";h=typeof h==="string"&&$APP.I(Q7,h)?h:"md";c=$APP.F(c);l=$APP.F(l);var m=c?50:$APP.ph.i($APP.oh.i(e/d*100,0),100);b=$APP.zf([$APP.Vg,$APP.nk,$APP.Yi,$APP.Mh,$APP.om,$APP.Zm,$APP.Wk,$APP.U,$APP.Nl],[g,l,e,h,c,c?"Loading…":""+$APP.T.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.N("",b)?b:null,m]);var p=$APP.M(b);b=$APP.D(p,$APP.Nl);l=$APP.D(p,$APP.Vg);d=$APP.D(p,
4
- $APP.nk);h=$APP.D(p,$APP.Yi);c=$APP.D(p,$APP.Mh);e=$APP.D(p,$APP.Zm);g=$APP.D(p,$APP.om);m=$APP.D(p,$APP.U);p=$APP.D(p,$APP.Wk);var q=$APP.k(a,"__xProgressBase"),v=$APP.k(a,"__xProgressHeader"),x=$APP.k(a,"__xProgressFill"),y=$APP.k(a,"__xProgressLabel"),A=$APP.k(a,"__xProgressValue");var C=(C=m!=null)?C:d;var E=$APP.k(a,"__xProgressCompleted"),H=$APP.r(g)&&h>=p;q.setAttribute("data-variant",l);q.setAttribute("data-size",c);q.setAttribute("data-indeterminate",$APP.n(g)?"true":"false");x.style.width=
5
- $APP.n(g)?"40%":""+$APP.T.g(b.toFixed(2))+"%";v.style.display=$APP.n(C)?"flex":"none";y.textContent=$APP.n(m)?m:"";y.style.display=m!=null?"":"none";A.textContent=$APP.n($APP.n(d)?$APP.r(g):d)?""+$APP.T.g(Math.round(b))+"%":"";A.style.display=$APP.n(d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(g)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.T.g(h)),
6
- a.setAttribute("aria-valuemax",""+$APP.T.g(p)),a.setAttribute("aria-valuetext",e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");H&&$APP.r(E)&&a.dispatchEvent(new CustomEvent("x-progress-complete",{bubbles:!0,composed:!0,detail:{value:h,max:p}}));a.__xProgressCompleted=$APP.F(H)},S7=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",
7
- ""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"indeterminate",{get:function(){return this.hasAttribute("indeterminate")},set:function(b){return $APP.n(b)?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},enumerable:!0,configurable:!0});Object.defineProperty(a,
8
- "showValue",{get:function(){return this.hasAttribute("show-value")},set:function(b){return $APP.n(b)?this.setAttribute("show-value",""):this.removeAttribute("show-value")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:""},set:function(b){return this.setAttribute("variant",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?
9
- b:""},set:function(b){return this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){return this.getAttribute("label")},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},U7=function(){var a=class extends HTMLElement{};a.observedAttributes=T7;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xProgressInit"))){var b=this.attachShadow({mode:"open"}),
10
- c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;box-sizing:border-box;--x-progress-border-radius:var(--x-radius-full,9999px);--x-progress-track-color:rgba(0,0,0,0.10);--x-progress-fill-color:var(--x-color-primary,#3b82f6);--x-progress-label-color:rgba(0,0,0,0.60);--x-progress-value-color:rgba(0,0,0,0.50);}@media (prefers-color-scheme:dark){:host{--x-progress-track-color:rgba(255,255,255,0.12);--x-progress-label-color:rgba(255,255,255,0.60);--x-progress-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-height:4px;}[part\x3dbase][data-size\x3d'md']{--x-progress-height:8px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-height:12px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-fill-color:var(--x-color-success,#22c55e);}[part\x3dbase][data-variant\x3d'warning']{--x-progress-fill-color:var(--x-color-warning,#f59e0b);}[part\x3dbase][data-variant\x3d'danger']{--x-progress-fill-color:var(--x-color-danger,#ef4444);}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:var(--x-font-size-sm,0.875rem);color:var(--x-progress-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-progress-value-color);}[part\x3dtrack]{height:var(--x-progress-height,8px);border-radius:var(--x-progress-border-radius,9999px);background:var(--x-progress-track-color);overflow:hidden;position:relative;}[part\x3dfill]{height:100%;background:var(--x-progress-fill-color);border-radius:var(--x-progress-border-radius,9999px);transition:width 0.3s ease;width:0%;}@keyframes x-progress-indeterminate{0%{transform:translateX(-100%) scaleX(0.5);}50%{transform:translateX(60%) scaleX(0.8);}100%{transform:translateX(200%) scaleX(0.5);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-indeterminate 1.5s ease infinite;width:40%;transform-origin:left center;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;width:50%;}}";
11
- d.setAttribute("part","base");e.setAttribute("part","header");g.setAttribute("part","label-text");h.setAttribute("part","value-text");l.setAttribute("part","track");m.setAttribute("part","fill");e.appendChild(g);e.appendChild(h);l.appendChild(m);d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);this.__xProgressBase=d;this.__xProgressHeader=e;this.__xProgressFill=m;this.__xProgressLabel=g;this.__xProgressValue=h;this.__xProgressInit=!0}R7(this);return null};a.prototype.disconnectedCallback=
12
- function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xProgressInit"))&&R7(this);return null};S7(a.prototype);return a},V7=function(){$APP.n(customElements.get("x-progress"))||customElements.define("x-progress",U7());return null};var P7=new $APP.S(null,new $APP.Q(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),Q7=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),T7="value max variant size label show-value indeterminate".split(" ");$APP.Pd(["x-progress-complete",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,2,[$APP.Yi,$APP.W,$APP.Wk,$APP.W],null)],null)]);$APP.ha("baredom.exports.x_progress.init",V7);export const init=V7;
2
+ var c$=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},d$=function(a){var b=new $APP.N(null,7,[$APP.Gh,a.getAttribute("value"),$APP.em,a.getAttribute("max"),$APP.ii,a.getAttribute("variant"),$APP.bj,a.getAttribute("size"),$APP.X,a.getAttribute("label"),$APP.ul,a.hasAttribute("show-value"),$APP.In,a.hasAttribute("indeterminate")],null);var c=$APP.J(b),d=$APP.C(c,$APP.em),e=$APP.C(c,$APP.Gh),f=$APP.C(c,$APP.ii),h=$APP.C(c,$APP.bj);b=$APP.C(c,$APP.X);var l=$APP.C(c,
3
+ $APP.ul);c=$APP.C(c,$APP.In);d=c$(d,100);d=d>0?d:100;e=$APP.Ii.i($APP.Hi.i(c$(e,0),0),d);f=typeof f==="string"&&$APP.Zc(kca,f)?f:"default";h=typeof h==="string"&&$APP.Zc(lca,h)?h:"md";c=$APP.E(c);l=$APP.E(l);var m=c?50:$APP.Ii.i($APP.Hi.i(e/d*100,0),100);b=$APP.Lf([$APP.ii,$APP.ul,$APP.Gh,$APP.bj,$APP.In,$APP.lo,$APP.em,$APP.X,$APP.en],[f,l,e,h,c,c?"Loading…":""+$APP.Q.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.M("",b)?b:null,m]);var q=$APP.J(b);b=$APP.C(q,$APP.en);l=$APP.C(q,$APP.ii);d=$APP.C(q,
4
+ $APP.ul);h=$APP.C(q,$APP.Gh);c=$APP.C(q,$APP.bj);e=$APP.C(q,$APP.lo);f=$APP.C(q,$APP.In);m=$APP.C(q,$APP.X);q=$APP.C(q,$APP.em);var r=$APP.k(a,"__xProgressBase"),v=$APP.k(a,"__xProgressHeader"),x=$APP.k(a,"__xProgressFill"),y=$APP.k(a,"__xProgressLabel"),A=$APP.k(a,"__xProgressValue");var D=(D=m!=null)?D:d;var G=$APP.k(a,"__xProgressCompleted"),I=$APP.p(f)&&h>=q;r.setAttribute("data-variant",l);r.setAttribute("data-size",c);r.setAttribute("data-indeterminate",$APP.n(f)?"true":"false");x.style.width=
5
+ $APP.n(f)?"40%":""+$APP.Q.g(b.toFixed(2))+"%";v.style.display=$APP.n(D)?"flex":"none";y.textContent=$APP.n(m)?m:"";y.style.display=m!=null?"":"none";A.textContent=$APP.n($APP.n(d)?$APP.p(f):d)?""+$APP.Q.g(Math.round(b))+"%":"";A.style.display=$APP.n(d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(f)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.Q.g(h)),
6
+ a.setAttribute("aria-valuemax",""+$APP.Q.g(q)),a.setAttribute("aria-valuetext",e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");I&&$APP.p(G)&&$APP.P(a,"x-progress-complete",{value:h,max:q});a.__xProgressCompleted=$APP.E(I)},mca=function(a){if(!$APP.n($APP.k(a,"__xProgressInit"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),
7
+ h=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;box-sizing:border-box;--x-progress-border-radius:var(--x-radius-full,9999px);--x-progress-track-color:rgba(0,0,0,0.10);--x-progress-fill-color:var(--x-color-primary,#3b82f6);--x-progress-label-color:rgba(0,0,0,0.60);--x-progress-value-color:rgba(0,0,0,0.50);}@media (prefers-color-scheme:dark){:host{--x-progress-track-color:rgba(255,255,255,0.12);--x-progress-label-color:rgba(255,255,255,0.60);--x-progress-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-height:4px;}[part\x3dbase][data-size\x3d'md']{--x-progress-height:8px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-height:12px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-fill-color:var(--x-color-success,#22c55e);}[part\x3dbase][data-variant\x3d'warning']{--x-progress-fill-color:var(--x-color-warning,#f59e0b);}[part\x3dbase][data-variant\x3d'danger']{--x-progress-fill-color:var(--x-color-danger,#ef4444);}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:var(--x-font-size-sm,0.875rem);color:var(--x-progress-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-progress-value-color);}[part\x3dtrack]{height:var(--x-progress-height,8px);border-radius:var(--x-progress-border-radius,9999px);background:var(--x-progress-track-color);overflow:hidden;position:relative;}[part\x3dfill]{height:100%;background:var(--x-progress-fill-color);border-radius:var(--x-progress-border-radius,9999px);transition:width 0.3s ease;width:0%;}@keyframes x-progress-indeterminate{0%{transform:translateX(-100%) scaleX(0.5);}50%{transform:translateX(60%) scaleX(0.8);}100%{transform:translateX(200%) scaleX(0.5);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-indeterminate 1.5s ease infinite;width:40%;transform-origin:left center;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;width:50%;}}";
8
+ d.setAttribute("part","base");e.setAttribute("part","header");f.setAttribute("part","label-text");h.setAttribute("part","value-text");l.setAttribute("part","track");m.setAttribute("part","fill");e.appendChild(f);e.appendChild(h);l.appendChild(m);d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);a.__xProgressBase=d;a.__xProgressHeader=e;a.__xProgressFill=m;a.__xProgressLabel=f;a.__xProgressValue=h;a.__xProgressInit=!0}d$(a);return null},nca=function(a,b,c,d){$APP.M(c,d)&&$APP.n($APP.k(a,
9
+ "__xProgressInit"))&&d$(a);return null},oca=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});$APP.dh(a,"indeterminate","indeterminate");
10
+ $APP.dh(a,"showValue","show-value");Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:""},set:function(b){return this.setAttribute("variant",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:""},set:function(b){return this.setAttribute("size",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"label",{get:function(){return this.getAttribute("label")},
11
+ set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.Q.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},e$=function(){return $APP.Yg("x-progress",new $APP.N(null,4,[$APP.Pg,pca,$APP.Qg,mca,$APP.Sg,nca,$APP.Wg,oca],null))};var kca=new $APP.O(null,new $APP.N(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),lca=new $APP.O(null,new $APP.N(null,3,["md",null,"lg",null,"sm",null],null),null),pca="value max variant size label show-value indeterminate".split(" ");$APP.Yd(["x-progress-complete",new $APP.N(null,1,[$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.V,$APP.em,$APP.V],null)],null)]);$APP.ca("baredom.exports.x_progress.init",e$);export const init=e$;
package/dist/x-radio.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var pt=function(a,b,c){return a.setAttribute(b,c)},qt=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},rt=function(a){a=$APP.zf([$APP.Al,$APP.Ol,$APP.Nh,$APP.Zh,$APP.sj,$APP.Lj,$APP.Em,$APP.Uj,$APP.Cj],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.M(a);a=
3
- $APP.D(b,$APP.Uj);var c=$APP.D(b,$APP.Cj),d=$APP.D(b,$APP.Al),e=$APP.D(b,$APP.Ol),g=$APP.D(b,$APP.Nh),h=$APP.D(b,$APP.Zh),l=$APP.D(b,$APP.sj),m=$APP.D(b,$APP.Lj);b=$APP.D(b,$APP.Em);l=$APP.F(l);g=$APP.F(g);return $APP.zf([$APP.mi,$APP.ci,$APP.dn,$APP.Ej,$APP.Th,$APP.Aj,$APP.Yi,$APP.bk,$APP.$m,$APP.Ql,$APP.X],[g,l?"true":"false",$APP.F(m),l,$APP.n(g)?l:!0,d,b!=null?b:"on",h,c,a,$APP.F(e)])},st=function(a){var b=$APP.k(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=rt(a);var d=$APP.X.g(b),
4
- e=$APP.Ej.g(b);pt(c,"aria-checked",$APP.ci.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");pt(c,"aria-required",$APP.n($APP.mi.g(b))?"true":"false");pt(c,"aria-readonly",$APP.n($APP.dn.g(b))?"true":"false");var g=$APP.Ql.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.bk.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.$m.g(b);$APP.n(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
5
- $APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");qt(a,"data-checked",e);qt(a,"data-disabled",d);a=$APP.k(a,"__xRadioInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.Yi.g(b):null):null}return null},tt=function(a){var b=a.getAttribute("name"),c=$APP.n(a.form)?a.form:null;c=$APP.n(c)?c:document;if($APP.n($APP.n(b)?$APP.N(b,""):b)){var d=[];c.querySelectorAll("x-radio").forEach(function(e){return $APP.B.i(e.getAttribute("name"),b)?d.push(e):null});return d}return[a]},ut=
6
- function(a){a=tt(a);var b=a.find(function(d){return d.hasAttribute("checked")}),c=a.length>0?a[0]:null;return a.forEach(function(d){var e=$APP.k(d,"__xRadioRefs");return $APP.n(e)?(e=$APP.k(e,"control"),d=$APP.n(b)?$APP.B.i(d,b)?0:-1:$APP.B.i(d,c)?0:-1,e.tabIndex=d):null})},vt=function(a,b){b=new CustomEvent("x-radio-change-request",{detail:b,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},wt=function(a,b){return a.dispatchEvent(new CustomEvent("x-radio-change",
7
- {detail:b,bubbles:!0,composed:!0,cancelable:!1}))},xt=function(a){var b=rt(a),c=$APP.X.g(b),d=$APP.dn.g(b),e=$APP.Ej.g(b);if($APP.n($APP.n(c)?c:$APP.n(d)?d:e))return null;b=$APP.Yi.g(b);return vt(a,{value:b,previousChecked:!1,nextChecked:!0})?(a.setAttribute("checked",""),st(a),tt(a).forEach(function(g){var h=$APP.N(g,a);return $APP.n(h?g.hasAttribute("checked"):h)?(g.removeAttribute("checked"),st(g)):null}),ut(a),wt(a,{value:b,checked:!0})):null},yt=function(a){a=$APP.k(a,"__xRadioRefs");return $APP.n(a)?
8
- $APP.k(a,"control").focus():null},zt=function(a){return function(b){var c=b.key,d=tt(a),e=d.length,g=d.indexOf(a);if($APP.B.i(c," ")||$APP.B.i(c,"Enter"))return b.preventDefault(),xt(a);if($APP.B.i(c,"ArrowDown")||$APP.B.i(c,"ArrowRight")){if(b.preventDefault(),e>0)return b=d[$APP.fd(g+1,e)],xt(b),yt(b)}else if($APP.B.i(c,"ArrowUp")||$APP.B.i(c,"ArrowLeft"))if(b.preventDefault(),e>0)return b=d[$APP.fd(g-1,e)],xt(b),yt(b);return null}},At=function(a){return function(){return xt(a)}},Bt=function(a){var b=
9
- $APP.k(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.k(a,"__xRadioHandlers");if($APP.n(c)){b=$APP.k(b,"control");a.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xRadioHandlers=null;return}}return null},Ct=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return qt(this,c,$APP.F(d))}})},Dt=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,
10
- get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.N(d)?pt(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},Ft=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Et}});Ct(b,"checked","checked");Ct(b,"disabled","disabled");Ct(b,"readOnly","readonly");Ct(b,"required","required");Dt(b,"name","name");Dt(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.k(this,
11
- "__xRadioRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("button"),g=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-radio-size:16px;--x-radio-border-width:2px;--x-radio-border-color:var(--x-color-border,#6b7280);--x-radio-bg:var(--x-color-surface,#ffffff);--x-radio-checked-color:var(--x-color-primary,#2563eb);--x-radio-dot-size:6px;--x-radio-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-radio-disabled-opacity:0.45;--x-radio-transition:background var(--x-transition-duration,120ms) var(--x-transition-easing,ease),border-color var(--x-transition-duration,120ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-radio-border-color:var(--x-color-border,#9ca3af);--x-radio-bg:var(--x-color-surface,#1f2937);--x-radio-checked-color:var(--x-color-primary,#3b82f6);--x-radio-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--x-radio-size);height:var(--x-radio-size);border:var(--x-radio-border-width) solid var(--x-radio-border-color);border-radius:50%;background:var(--x-radio-bg);transition:var(--x-radio-transition);cursor:pointer;flex-shrink:0;position:relative;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-radio-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-radio-focus-ring);}:host([data-checked]) [part\x3dcontrol]{border-color:var(--x-radio-checked-color);}[part\x3ddot]{display:block;width:var(--x-radio-dot-size);height:var(--x-radio-dot-size);border-radius:50%;background:var(--x-radio-checked-color);opacity:0;transition:opacity 100ms ease;}:host([data-checked]) [part\x3ddot]{opacity:1;}@media (prefers-reduced-motion:reduce){[part\x3dcontrol]{transition:none;}[part\x3ddot]{transition:none;}}";
12
- e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","radio");g.setAttribute("part","dot");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xRadioRefs={root:c,control:e,dot:g};$APP.n(this.attachInternals)&&(this.__xRadioInternals=this.attachInternals())}Bt(this);c=$APP.k(this,"__xRadioRefs");$APP.n(c)&&(c=$APP.k(c,"control"),d=At(this),e=zt(this),g={click:d,keydown:e},this.addEventListener("click",d),c.addEventListener("keydown",e),this.__xRadioHandlers=
13
- g);st(this);return ut(this)};b.disconnectedCallback=function(){return Bt(this)};b.attributeChangedCallback=function(){return st(this)};b.formDisabledCallback=function(c){qt(this,"disabled",$APP.F(c));return st(this)};b.formResetCallback=function(){this.removeAttribute("checked");return st(this)};return a},Gt=function(){return $APP.n(customElements.get("x-radio"))?null:customElements.define("x-radio",Ft())};var Et="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Pd(["x-radio-change-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,3,[$APP.Yi,$APP.Y,$APP.vk,$APP.Zj,$APP.Vl,$APP.Zj],null)],null),"x-radio-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Yi,$APP.Y,$APP.Sm,$APP.Zj],null)],null)]);$APP.ha("baredom.exports.x_radio.init",Gt);export const init=Gt;
2
+ var yu=function(a){a=$APP.Lf([$APP.Mm,$APP.Fh,$APP.cj,$APP.oj,$APP.Fk,$APP.Xk,$APP.Dh,$APP.fl,$APP.Ok],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.J(a);a=$APP.C(b,$APP.fl);var c=$APP.C(b,$APP.Ok),d=$APP.C(b,$APP.Mm),e=$APP.C(b,$APP.Fh),f=$APP.C(b,$APP.cj),h=$APP.C(b,$APP.oj),l=$APP.C(b,
3
+ $APP.Fk),m=$APP.C(b,$APP.Xk);b=$APP.C(b,$APP.Dh);l=$APP.E(l);f=$APP.E(f);return $APP.Lf([$APP.xj,$APP.sj,$APP.ro,$APP.Qk,$APP.ij,$APP.Nk,$APP.Gh,$APP.ll,$APP.mo,$APP.gn,$APP.Y],[f,l?"true":"false",$APP.E(m),l,$APP.n(f)?l:!0,d,b!=null?b:"on",h,c,a,$APP.E(e)])},zu=function(a){var b=$APP.k(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=yu(a);var d=$APP.Y.g(b),e=$APP.Qk.g(b);$APP.ah(c,"aria-checked",$APP.sj.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");$APP.ah(c,"aria-required",
4
+ $APP.n($APP.xj.g(b))?"true":"false");$APP.ah(c,"aria-readonly",$APP.n($APP.ro.g(b))?"true":"false");var f=$APP.gn.g(b);$APP.n(f)?c.setAttribute("aria-label",f):c.removeAttribute("aria-label");f=$APP.ll.g(b);$APP.n(f)?c.setAttribute("aria-labelledby",f):c.removeAttribute("aria-labelledby");f=$APP.mo.g(b);$APP.n(f)?c.setAttribute("aria-describedby",f):c.removeAttribute("aria-describedby");$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");$APP.bh(a,"data-checked",e);$APP.bh(a,"data-disabled",
5
+ d);a=$APP.k(a,"__xRadioInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.Gh.g(b):null):null}return null},Au=function(a){var b=a.getAttribute("name"),c=$APP.n(a.form)?a.form:null;c=$APP.n(c)?c:document;if($APP.n($APP.n(b)?$APP.M(b,""):b)){var d=[];c.querySelectorAll("x-radio").forEach(function(e){return $APP.B.i(e.getAttribute("name"),b)?d.push(e):null});return d}return[a]},Bu=function(a){a=Au(a);var b=a.find(function(d){return d.hasAttribute("checked")}),c=a.length>0?a[0]:null;return a.forEach(function(d){var e=
6
+ $APP.k(d,"__xRadioRefs");return $APP.n(e)?(e=$APP.k(e,"control"),d=$APP.n(b)?$APP.B.i(d,b)?0:-1:$APP.B.i(d,c)?0:-1,e.tabIndex=d):null})},Cu=function(a){var b=yu(a),c=$APP.Y.g(b),d=$APP.ro.g(b),e=$APP.Qk.g(b);if($APP.n($APP.n(c)?c:$APP.n(d)?d:e))return null;b=$APP.Gh.g(b);return $APP.ch(a,"x-radio-change-request",{value:b,previousChecked:!1,nextChecked:!0})?(a.setAttribute("checked",""),zu(a),Au(a).forEach(function(f){var h=$APP.M(f,a);return $APP.n(h?f.hasAttribute("checked"):h)?(f.removeAttribute("checked"),
7
+ zu(f)):null}),Bu(a),$APP.P(a,"x-radio-change",{value:b,checked:!0})):null},Du=function(a){a=$APP.k(a,"__xRadioRefs");return $APP.n(a)?$APP.k(a,"control").focus():null},Eu=function(a){return function(b){var c=b.key,d=Au(a),e=d.length,f=d.indexOf(a);if($APP.B.i(c," ")||$APP.B.i(c,"Enter"))return b.preventDefault(),Cu(a);if($APP.B.i(c,"ArrowDown")||$APP.B.i(c,"ArrowRight")){if(b.preventDefault(),e>0)return b=d[$APP.od(f+1,e)],Cu(b),Du(b)}else if($APP.B.i(c,"ArrowUp")||$APP.B.i(c,"ArrowLeft"))if(b.preventDefault(),
8
+ e>0)return b=d[$APP.od(f-1,e)],Cu(b),Du(b);return null}},Fu=function(a){return function(){return Cu(a)}},Gu=function(a){var b=$APP.k(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.k(a,"__xRadioHandlers");if($APP.n(c)){b=$APP.k(b,"control");a.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xRadioHandlers=null;return}}return null},Hu=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return zu(a)},Iu=function(a){a.removeAttribute("checked");return zu(a)},
9
+ Ju=function(a){if(!$APP.n($APP.k(a,"__xRadioRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("button"),e=document.createElement("span");c.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-radio-size:16px;--x-radio-border-width:2px;--x-radio-border-color:var(--x-color-border,#6b7280);--x-radio-bg:var(--x-color-surface,#ffffff);--x-radio-checked-color:var(--x-color-primary,#2563eb);--x-radio-dot-size:6px;--x-radio-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-radio-disabled-opacity:0.45;--x-radio-transition:background var(--x-transition-duration,120ms) var(--x-transition-easing,ease),border-color var(--x-transition-duration,120ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-radio-border-color:var(--x-color-border,#9ca3af);--x-radio-bg:var(--x-color-surface,#1f2937);--x-radio-checked-color:var(--x-color-primary,#3b82f6);--x-radio-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--x-radio-size);height:var(--x-radio-size);border:var(--x-radio-border-width) solid var(--x-radio-border-color);border-radius:50%;background:var(--x-radio-bg);transition:var(--x-radio-transition);cursor:pointer;flex-shrink:0;position:relative;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-radio-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-radio-focus-ring);}:host([data-checked]) [part\x3dcontrol]{border-color:var(--x-radio-checked-color);}[part\x3ddot]{display:block;width:var(--x-radio-dot-size);height:var(--x-radio-dot-size);border-radius:50%;background:var(--x-radio-checked-color);opacity:0;transition:opacity 100ms ease;}:host([data-checked]) [part\x3ddot]{opacity:1;}@media (prefers-reduced-motion:reduce){[part\x3dcontrol]{transition:none;}[part\x3ddot]{transition:none;}}";
10
+ d.setAttribute("part","control");d.setAttribute("type","button");d.setAttribute("role","radio");e.setAttribute("part","dot");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xRadioRefs={root:b,control:d,dot:e};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xRadioInternals=b)}Gu(a);b=$APP.k(a,"__xRadioRefs");$APP.n(b)&&(b=$APP.k(b,"control"),c=Fu(a),d=Eu(a),e={click:c,keydown:d},a.addEventListener("click",c),b.addEventListener("keydown",d),a.__xRadioHandlers=e);zu(a);return Bu(a)},Ku=
11
+ function(a){return Gu(a)},Lu=function(a){return zu(a)},Nu=function(a){return $APP.jh(a,Mu)},Pu=function(){return $APP.Yg("x-radio",new $APP.N(null,8,[$APP.Pg,Ou,$APP.Qg,Ju,$APP.Rg,Ku,$APP.Sg,Lu,$APP.Tg,!0,$APP.Ug,Hu,$APP.Vg,Iu,$APP.Wg,Nu],null))};var Ou="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" "),Mu=new $APP.N(null,6,[$APP.eo,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"checked"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.Hn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),$APP.Ll,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"required"],null),$APP.Nk,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"name"],null),$APP.Gh,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,
12
+ "value"],null)],null);$APP.Yd(["x-radio-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.U,$APP.Dl,$APP.T,$APP.mn,$APP.T],null)],null),"x-radio-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.U,$APP.eo,$APP.T],null)],null)]);$APP.ca("baredom.exports.x_radio.init",Pu);export const init=Pu;
@@ -1,13 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var mT=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?25:Math.min(100,Math.max(1,a))}return 25},nT=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?800:Math.min(5E3,Math.max(100,a))}return 800},oT=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.04:Math.min(.2,Math.max(.005,a))}return.04},pT=function(a){var b=$APP.k(a,
3
- "__xRippleRefs");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.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:inline-block;position:relative;}:host([disabled]){cursor:default;}[part\x3dcontainer]{display:block;width:100%;height:100%;}";d.setAttribute("part","container");d.appendChild(e);g.setAttribute("part","filters");g.style.position="absolute";
4
- g.style.width="0";g.style.height="0";g.style.overflow="hidden";b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xRippleRefs=new $APP.Q(null,3,[$APP.Hi,b,$APP.Hj,d,$APP.mk,g],null);a.__xRippleCounter=0;a.__xRippleFrames=[];return $APP.k(a,"__xRippleRefs")},sT=function(a){a=new $APP.Q(null,4,[$APP.Gk,a.getAttribute("intensity"),$APP.Vi,a.getAttribute("duration"),qT,a.getAttribute("frequency"),$APP.Ol,a.hasAttribute("disabled")],null);var b=$APP.M(a);a=$APP.D(b,$APP.Gk);var c=$APP.D(b,$APP.Vi),
5
- d=$APP.D(b,qT);b=$APP.D(b,$APP.Ol);return new $APP.Q(null,4,[$APP.xk,mT(a),$APP.fl,nT(c),rT,oT(d),$APP.X,$APP.F(b)],null)},vT=function(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg","filter"),e=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),g=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");d.setAttribute("id",b);d.setAttribute("x","-10%");d.setAttribute("y","-10%");d.setAttribute("width","120%");d.setAttribute("height","120%");
6
- e.setAttribute("type","turbulence");e.setAttribute("baseFrequency",""+$APP.T.g(c));e.setAttribute("numOctaves","3");e.setAttribute("seed",""+$APP.T.g(Math.floor(Math.random()*1E3)));e.setAttribute("result","turbulence");g.setAttribute("in","SourceGraphic");g.setAttribute("in2","turbulence");g.setAttribute("scale","0");g.setAttribute("xChannelSelector","R");g.setAttribute("yChannelSelector","G");d.appendChild(e);d.appendChild(g);a.appendChild(d);return new $APP.Q(null,3,[$APP.kl,d,tT,e,uT,g],null)},
7
- wT=function(a,b){var c=sT(a);if(!$APP.n($APP.X.g(c))){c=$APP.M(c);var d=$APP.D(c,$APP.xk),e=$APP.D(c,$APP.fl),g=$APP.D(c,rT);c=pT(a);c=$APP.M(c);var h=$APP.D(c,$APP.Hj),l=$APP.D(c,$APP.mk),m=$APP.k(a,"__xRippleCounter");c="xr-"+$APP.T.g(m);a.__xRippleCounter=m+1;m=vT(l,c,g);m=$APP.M(m);var p=$APP.D(m,$APP.kl),q=$APP.D(m,tT),v=$APP.D(m,uT),x=b.clientX,y=b.clientY,A=performance.now(),C=$APP.k(a,"__xRippleFrames");b=$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches);h.style.filter=
8
- "url(#"+$APP.T.g(c)+")";a.dispatchEvent(new CustomEvent("x-ripple-effect-start",{detail:{x,y},bubbles:!0,composed:!0}));b?(v.setAttribute("scale",""+$APP.T.g(d/2)),b=requestAnimationFrame(function(){v.setAttribute("scale","0");l.removeChild(p);h.style.filter="";return a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}))})):b=requestAnimationFrame(function H(){var G=performance.now()-A;G=Math.min(1,G/e);var J=1-G;J=1-J*J*J;var R=g*(1-J*.7);v.setAttribute("scale",
9
- ""+$APP.T.g(d*(1-J)));q.setAttribute("baseFrequency",""+$APP.T.g(R));if(G>=1)return l.removeChild(p),l.childNodes.length===0&&(h.style.filter=""),a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}));G=requestAnimationFrame(H);return C.push(G)});C.push(b)}},xT=function(a){function b(c){c.button===0&&wT(a,c);return null}a.addEventListener("pointerdown",b);a.__xRippleHandler=b},yT=function(a){var b=$APP.k(a,"__xRippleFrames");if($APP.n(b)){for(var c=b.length,
10
- d=0;;)if(d<c)cancelAnimationFrame(b[d]),d+=1;else break;b.length=0}b=$APP.k(a,"__xRippleRefs");if($APP.n(b)){c=$APP.M(b);b=$APP.D(c,$APP.mk);for(c=$APP.D(c,$APP.Hj);;)if(d=b.firstChild,$APP.n(d))b.removeChild(d);else break;c.style.filter=""}b=$APP.k(a,"__xRippleHandler");$APP.n(b)&&(a.removeEventListener("pointerdown",b),a.__xRippleHandler=null)},zT=function(a){Object.defineProperty(a,"intensity",{get:function(){return mT(this.getAttribute("intensity"))},set:function(b){return b==null?this.removeAttribute("intensity"):
11
- this.setAttribute("intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"duration",{get:function(){return nT(this.getAttribute("duration"))},set:function(b){return b==null?this.removeAttribute("duration"):this.setAttribute("duration",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frequency",{get:function(){return oT(this.getAttribute("frequency"))},set:function(b){return b==null?this.removeAttribute("frequency"):this.setAttribute("frequency",
12
- ""+$APP.T.g(b))},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})},BT=function(){var a=class extends HTMLElement{};a.observedAttributes=AT;a.prototype.connectedCallback=function(){pT(this);yT(this);xT(this);return null};a.prototype.disconnectedCallback=function(){yT(this);return null};a.prototype.attributeChangedCallback=
13
- function(){return null};zT(a.prototype);return a},CT=function(){$APP.n(customElements.get("x-ripple-effect"))||customElements.define("x-ripple-effect",BT());return null},tT=new $APP.K(null,"turb","turb",-804768361),qT=new $APP.K(null,"frequency-raw","frequency-raw",-1367383022),uT=new $APP.K(null,"disp","disp",-2047544334),rT=new $APP.K(null,"frequency","frequency",-1408891382);var AT=["intensity","duration","frequency","disabled"];$APP.Pd(["x-ripple-effect-start",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.Ll,$APP.W,$APP.Kl,$APP.W],null),$APP.lm,!1],null),"x-ripple-effect-end",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.Ll,$APP.W,$APP.Kl,$APP.W],null),$APP.lm,!1],null)]);$APP.ha("baredom.exports.x_ripple_effect.init",CT);export const init=CT;
2
+ var nX=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?25:Math.min(100,Math.max(1,a))}return 25},oX=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?800:Math.min(5E3,Math.max(100,a))}return 800},pX=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.04:Math.min(.2,Math.max(.005,a))}return.04},qX=function(a){var b=$APP.k(a,
3
+ "__xRippleRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),f=document.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:inline-block;position:relative;}:host([disabled]){cursor:default;}[part\x3dcontainer]{display:block;width:100%;height:100%;}";d.setAttribute("part","container");d.appendChild(e);f.setAttribute("part","filters");f.style.position="absolute";
4
+ f.style.width="0";f.style.height="0";f.style.overflow="hidden";b.appendChild(c);b.appendChild(d);b.appendChild(f);a.__xRippleRefs=new $APP.N(null,3,[$APP.Uh,b,$APP.Vh,d,$APP.tl,f],null);a.__xRippleCounter=0;a.__xRippleFrames=[];return $APP.k(a,"__xRippleRefs")},tX=function(a){a=new $APP.N(null,4,[$APP.Ol,a.getAttribute("intensity"),$APP.dk,a.getAttribute("duration"),rX,a.getAttribute("frequency"),$APP.Fh,a.hasAttribute("disabled")],null);var b=$APP.J(a);a=$APP.C(b,$APP.Ol);var c=$APP.C(b,$APP.dk),
5
+ d=$APP.C(b,rX);b=$APP.C(b,$APP.Fh);return new $APP.N(null,4,[$APP.Fl,nX(a),$APP.rm,oX(c),sX,pX(d),$APP.Y,$APP.E(b)],null)},wX=function(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg","filter"),e=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),f=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");d.setAttribute("id",b);d.setAttribute("x","-10%");d.setAttribute("y","-10%");d.setAttribute("width","120%");d.setAttribute("height","120%");
6
+ e.setAttribute("type","turbulence");e.setAttribute("baseFrequency",""+$APP.Q.g(c));e.setAttribute("numOctaves","3");e.setAttribute("seed",""+$APP.Q.g(Math.floor(Math.random()*1E3)));e.setAttribute("result","turbulence");f.setAttribute("in","SourceGraphic");f.setAttribute("in2","turbulence");f.setAttribute("scale","0");f.setAttribute("xChannelSelector","R");f.setAttribute("yChannelSelector","G");d.appendChild(e);d.appendChild(f);a.appendChild(d);return new $APP.N(null,3,[$APP.wm,d,uX,e,vX,f],null)},
7
+ xX=function(a,b){var c=tX(a);if(!$APP.n($APP.Y.g(c))){c=$APP.J(c);var d=$APP.C(c,$APP.Fl),e=$APP.C(c,$APP.rm),f=$APP.C(c,sX);c=qX(a);c=$APP.J(c);var h=$APP.C(c,$APP.Vh),l=$APP.C(c,$APP.tl),m=$APP.k(a,"__xRippleCounter");c="xr-"+$APP.Q.g(m);a.__xRippleCounter=m+1;m=wX(l,c,f);m=$APP.J(m);var q=$APP.C(m,$APP.wm),r=$APP.C(m,uX),v=$APP.C(m,vX),x=b.clientX,y=b.clientY,A=performance.now(),D=$APP.k(a,"__xRippleFrames");b=$APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches);h.style.filter=
8
+ "url(#"+$APP.Q.g(c)+")";$APP.P(a,"x-ripple-effect-start",{x,y});b?(v.setAttribute("scale",""+$APP.Q.g(d/2)),b=requestAnimationFrame(function(){v.setAttribute("scale","0");l.removeChild(q);h.style.filter="";return $APP.P(a,"x-ripple-effect-end",{x,y})})):b=requestAnimationFrame(function I(){var H=performance.now()-A;H=Math.min(1,H/e);var K=1-H;K=1-K*K*K;var W=f*(1-K*.7);v.setAttribute("scale",""+$APP.Q.g(d*(1-K)));r.setAttribute("baseFrequency",""+$APP.Q.g(W));if(H>=1)return l.removeChild(q),l.childNodes.length===
9
+ 0&&(h.style.filter=""),$APP.P(a,"x-ripple-effect-end",{x,y});H=requestAnimationFrame(I);return D.push(H)});D.push(b)}},yX=function(a){function b(c){c.button===0&&xX(a,c);return null}a.addEventListener("pointerdown",b);a.__xRippleHandler=b},zX=function(a){var b=$APP.k(a,"__xRippleFrames");if($APP.n(b)){for(var c=b.length,d=0;;)if(d<c)cancelAnimationFrame(b[d]),d+=1;else break;b.length=0}b=$APP.k(a,"__xRippleRefs");if($APP.n(b)){c=$APP.J(b);b=$APP.C(c,$APP.tl);for(c=$APP.C(c,$APP.Vh);;)if(d=b.firstChild,
10
+ $APP.n(d))b.removeChild(d);else break;c.style.filter=""}b=$APP.k(a,"__xRippleHandler");$APP.n(b)&&(a.removeEventListener("pointerdown",b),a.__xRippleHandler=null)},AX=function(a){Object.defineProperty(a,"intensity",{get:function(){return nX(this.getAttribute("intensity"))},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"duration",{get:function(){return oX(this.getAttribute("duration"))},
11
+ set:function(b){return b==null?this.removeAttribute("duration"):this.setAttribute("duration",""+$APP.Q.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frequency",{get:function(){return pX(this.getAttribute("frequency"))},set:function(b){return b==null?this.removeAttribute("frequency"):this.setAttribute("frequency",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});return $APP.dh(a,"disabled","disabled")},BX=function(a){qX(a);zX(a);yX(a);return null},CX=function(a){zX(a);return null},
12
+ DX=function(){return null},FX=function(){return $APP.Yg("x-ripple-effect",new $APP.N(null,5,[$APP.Pg,EX,$APP.Qg,BX,$APP.Rg,CX,$APP.Sg,DX,$APP.Wg,AX],null))},uX=new $APP.F(null,"turb","turb",-804768361),rX=new $APP.F(null,"frequency-raw","frequency-raw",-1367383022),vX=new $APP.F(null,"disp","disp",-2047544334),sX=new $APP.F(null,"frequency","frequency",-1408891382);var EX=["intensity","duration","frequency","disabled"];$APP.Yd(["x-ripple-effect-start",new $APP.N(null,2,[$APP.Z,new $APP.N(null,2,[$APP.cn,$APP.V,$APP.bn,$APP.V],null),$APP.Fn,!1],null),"x-ripple-effect-end",new $APP.N(null,2,[$APP.Z,new $APP.N(null,2,[$APP.cn,$APP.V,$APP.bn,$APP.V],null),$APP.Fn,!1],null)]);$APP.ca("baredom.exports.x_ripple_effect.init",FX);export const init=FX;
@@ -1,20 +1,19 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var zZ=function(a){return new $APP.Q(null,1,[$APP.cm,a],null)},AZ=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.Q(null,4,[$APP.Hi,b,$APP.mj,d,$APP.kj,e,$APP.Fi,g],null);return $APP.k(a,"__xScrollParallaxRefs")},HZ=function(a){a=new $APP.Q(null,5,[$APP.Zi,a.getAttribute("direction"),BZ,a.getAttribute("source"),CZ,a.getAttribute("easing"),$APP.ej,
4
- $APP.n(a.hasAttribute("disabled"))?"":null,$APP.pi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Zi),d=$APP.D(b,BZ),e=$APP.D(b,CZ);a=$APP.D(b,$APP.ej);b=$APP.D(b,$APP.pi);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.I(DZ,c)?c:"vertical";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.I(EZ,d)?d:"document";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.I(FZ,e)?e:"none";return new $APP.Q(null,5,[$APP.tj,c,$APP.sl,d,GZ,e,$APP.X,a!=null,$APP.U,$APP.n(b)?
5
- b:""],null)},IZ=function(a){a=AZ(a);a=$APP.M(a);return $APP.D(a,$APP.kj).assignedElements()},JZ=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.Q(null,4,[$APP.Gj,b,$APP.ti,c,$APP.qi,$APP.B.i("fade",a.getAttribute("data-opacity")),$APP.aj,$APP.B.i("grow",a.getAttribute("data-scale"))],null)},KZ=function(a){var b=
6
- $APP.k(a,"__xScrollParallaxChildCache");if($APP.n(b))return b;b=IZ(a);b=$APP.We.m($APP.fe,$APP.ae.g(JZ),$APP.uc(b));return a.__xScrollParallaxChildCache=b},LZ=function(a){a.__xScrollParallaxChildCache=null},MZ=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},NZ=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},OZ=function(a,b,c){b=new CustomEvent(b,{detail:$APP.Hh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},PZ=function(a){var b=function(){var H=$APP.k(a,"__xScrollParallaxModel");return $APP.n(H)?H:HZ(a)}();if(!$APP.n($APP.X.g(b))){var c=a.getBoundingClientRect();b=$APP.B.i("vertical",$APP.tj.g(b));var d=window.innerHeight,e=b?d:window.innerWidth,g=$APP.oh.i(0,$APP.ph.i(1,(d-c.top)/(d+
8
- c.height)));c=$APP.k(a,"__xScrollParallaxLastProg");d=IZ(a);for(var h=KZ(a),l=MZ(a),m=NZ(a),p=d.length,q=0;;)if(q<p){if(q<$APP.z(h)){var v=d[q],x=$APP.pc(h,q),y=$APP.M(x),A=$APP.D(y,$APP.Gj),C=$APP.D(y,$APP.ti);x=$APP.D(y,$APP.qi);y=$APP.D(y,$APP.aj);A=(g-.5)*e*(A-1)+C;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,OZ(a,"x-scroll-parallax-progress",zZ(g))}a.__xScrollParallaxRAF=null},QZ=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.ja(a,"__xScrollParallaxRAF",requestAnimationFrame(function(){return PZ(a)})):
10
- null},RZ=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)},SZ=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)},TZ=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},1E3)},UZ=function(a,b){b=b[0].isIntersecting;
11
- var c=$APP.M($APP.k(a,"__xScrollParallaxRefs"));c=$APP.D(c,$APP.Fi);a.__xScrollParallaxVisible=b;if($APP.n(b))return RZ(a),PZ(a),TZ(c,"Parallax section entered viewport"),OZ(a,"x-scroll-parallax-enter",zZ(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()));SZ(a);TZ(c,"Parallax section left viewport");return OZ(a,"x-scroll-parallax-leave",zZ(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()))},VZ=function(a){function b(){return $APP.n($APP.k(a,
12
- "__xScrollParallaxVisible"))?(LZ(a),PZ(a)):null}function c(){LZ(a);return $APP.n($APP.k(a,"__xScrollParallaxVisible"))?PZ(a):null}var d=AZ(a);d=$APP.M(d);$APP.D(d,$APP.kj).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ja(a,"__xScrollParallaxHandlers",{scroll:function(){return QZ(a)},slot:c,resize:b,scrollAttached:!1})},WZ=function(a){var b=$APP.k(a,"__xScrollParallaxHandlers");if($APP.n(b)){SZ(a);var c=$APP.k(a,"__xScrollParallaxRefs");if($APP.n(c)){c=$APP.kj.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},XZ=function(a){var b=$APP.k(a,"__xScrollParallaxIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return UZ(a,c)},{threshold:[0]});b.observe(a);a.__xScrollParallaxIO=b},YZ=function(a){var b=HZ(a);if($APP.N($APP.k(a,
14
- "__xScrollParallaxModel"),b)){var c=$APP.M(b),d=$APP.D(c,$APP.tj);b=$APP.D(c,$APP.X);var e=$APP.D(c,$APP.U),g=AZ(a);g=$APP.M(g);g=$APP.D(g,$APP.mj);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)&&PZ(a)}},ZZ=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})},a_=function(){var a=class extends HTMLElement{};a.observedAttributes=$Z;a.prototype.connectedCallback=function(){AZ(this);WZ(this);VZ(this);XZ(this);YZ(this);return null};a.prototype.disconnectedCallback=function(){for(var b=IZ(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"),OZ(this,"x-scroll-parallax-leave",zZ($APP.n(b)?b:0)));WZ(this);b=$APP.k(this,"__xScrollParallaxIO");$APP.n(b)&&(b.disconnect(),this.__xScrollParallaxIO=null);LZ(this);this.__xScrollParallaxVisible=!1;return this.__xScrollParallaxLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&YZ(this);return null};ZZ(a.prototype);return a},
19
- b_=function(){$APP.n(customElements.get("x-scroll-parallax"))||customElements.define("x-scroll-parallax",a_());return null},BZ=new $APP.K(null,"source-raw","source-raw",396083546),CZ=new $APP.K(null,"easing-raw","easing-raw",440485546),GZ=new $APP.K(null,"easing","easing",735372043);var $Z=["direction","source","easing","disabled","label"];$APP.Pd(["x-scroll-parallax-enter",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,1,[$APP.cm,$APP.W],null),$APP.lm,!1],null),"x-scroll-parallax-leave",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,1,[$APP.cm,$APP.W],null),$APP.lm,!1],null),"x-scroll-parallax-progress",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,1,[$APP.cm,$APP.W],null),$APP.lm,!1],null)]);
20
- var DZ=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),EZ=new $APP.S(null,new $APP.Q(null,1,["document",null],null),null),FZ=new $APP.S(null,new $APP.Q(null,2,["none",null,"smooth",null],null),null);$APP.ha("baredom.exports.x_scroll_parallax.init",b_);export const init=b_;
2
+ var N2=function(a){return new $APP.N(null,1,[$APP.vn,a],null)},O2=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"),f=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);f.setAttribute("part","live");f.setAttribute("aria-live","polite");f.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(f);a.__xScrollParallaxRefs=new $APP.N(null,4,[$APP.Uh,b,$APP.vk,d,$APP.tk,e,$APP.Oj,f],null);return $APP.k(a,"__xScrollParallaxRefs")},V2=function(a){a=new $APP.N(null,5,[$APP.gk,a.getAttribute("direction"),P2,a.getAttribute("source"),Q2,a.getAttribute("easing"),$APP.mk,
4
+ $APP.n(a.hasAttribute("disabled"))?"":null,$APP.Ch,a.getAttribute("label")],null);var b=$APP.J(a),c=$APP.C(b,$APP.gk),d=$APP.C(b,P2),e=$APP.C(b,Q2);a=$APP.C(b,$APP.mk);b=$APP.C(b,$APP.Ch);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.Zc(R2,c)?c:"vertical";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.Zc(S2,d)?d:"document";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.Zc(T2,e)?e:"none";return new $APP.N(null,5,[$APP.Gk,c,$APP.Em,d,U2,e,$APP.Y,a!=null,$APP.X,$APP.n(b)?
5
+ b:""],null)},W2=function(a){a=O2(a);a=$APP.J(a);return $APP.C(a,$APP.tk).assignedElements()},X2=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.N(null,4,[$APP.Sk,b,$APP.Cj,c,$APP.zj,$APP.B.i("fade",a.getAttribute("data-opacity")),$APP.ik,$APP.B.i("grow",a.getAttribute("data-scale"))],null)},Y2=function(a){var b=
6
+ $APP.k(a,"__xScrollParallaxChildCache");if($APP.n(b))return b;b=W2(a);b=$APP.hf.l($APP.pe,$APP.he.g(X2),$APP.Bc(b));return a.__xScrollParallaxChildCache=b},Z2=function(a){a.__xScrollParallaxChildCache=null},$2=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},a3=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},b3=function(a){var b=function(){var I=$APP.k(a,"__xScrollParallaxModel");return $APP.n(I)?I:V2(a)}();if(!$APP.n($APP.Y.g(b))){var c=a.getBoundingClientRect();b=$APP.B.i("vertical",$APP.Gk.g(b));var d=window.innerHeight,e=b?d:window.innerWidth,f=$APP.Hi.i(0,$APP.Ii.i(1,(d-c.top)/(d+c.height)));c=$APP.k(a,"__xScrollParallaxLastProg");d=W2(a);for(var h=Y2(a),l=$2(a),m=a3(a),q=d.length,r=0;;)if(r<q){if(r<
8
+ $APP.z(h)){var v=d[r],x=$APP.wc(h,r),y=$APP.J(x),A=$APP.C(y,$APP.Sk),D=$APP.C(y,$APP.Cj);x=$APP.C(y,$APP.zj);y=$APP.C(y,$APP.ik);A=(f-.5)*e*(A-1)+D;var G=b?"translateY("+$APP.Q.g(A)+"px)":"translateX("+$APP.Q.g(A)+"px)";A=$APP.n(y)?function(){var I=m+(1-m)*(1-Math.abs(f-.5)*2);return""+$APP.Q.g(G)+" scale("+$APP.Q.g(I)+")"}():G;v.style.transform=A;$APP.n(x)&&(v.style.opacity=""+$APP.Q.g(f<l?f/l:f>1-l?(1-f)/l:1))}r+=1}else break;if(c==null||Math.abs(f-c)>.001)a.__xScrollParallaxLastProg=f,$APP.P(a,
9
+ "x-scroll-parallax-progress",$APP.Xi(N2(f)))}a.__xScrollParallaxRAF=null},c3=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollParallaxVisible"),$APP.n(b)?!$APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches):b):b}())?$APP.n($APP.k(a,"__xScrollParallaxRAF"))?null:$APP.fa(a,"__xScrollParallaxRAF",requestAnimationFrame(function(){return b3(a)})):null},d3=function(a){a=$APP.k(a,"__xScrollParallaxHandlers");$APP.n($APP.n(a)?$APP.p($APP.k(a,
10
+ "scrollAttached")):a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},e3=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)},f3=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},1E3)},g3=function(a,b){b=b[0].isIntersecting;var c=$APP.J($APP.k(a,"__xScrollParallaxRefs"));c=$APP.C(c,$APP.Oj);a.__xScrollParallaxVisible=
11
+ b;if($APP.n(b))return d3(a),b3(a),f3(c,"Parallax section entered viewport"),$APP.P(a,"x-scroll-parallax-enter",$APP.Xi(N2(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}())));e3(a);f3(c,"Parallax section left viewport");return $APP.P(a,"x-scroll-parallax-leave",$APP.Xi(N2(function(){var d=$APP.k(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}())))},h3=function(a){function b(){return $APP.n($APP.k(a,"__xScrollParallaxVisible"))?(Z2(a),b3(a)):null}function c(){Z2(a);
12
+ return $APP.n($APP.k(a,"__xScrollParallaxVisible"))?b3(a):null}var d=O2(a);d=$APP.J(d);$APP.C(d,$APP.tk).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.fa(a,"__xScrollParallaxHandlers",{scroll:function(){return c3(a)},slot:c,resize:b,scrollAttached:!1})},i3=function(a){var b=$APP.k(a,"__xScrollParallaxHandlers");if($APP.n(b)){e3(a);var c=$APP.k(a,"__xScrollParallaxRefs");if($APP.n(c)){c=$APP.tk.g(c);var d=$APP.k(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=
13
+ $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},j3=function(a){var b=$APP.k(a,"__xScrollParallaxIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return g3(a,c)},{threshold:[0]});b.observe(a);a.__xScrollParallaxIO=b},k3=function(a){var b=V2(a);if($APP.M($APP.k(a,"__xScrollParallaxModel"),b)){var c=$APP.J(b),d=$APP.C(c,$APP.Gk);
14
+ b=$APP.C(c,$APP.Y);var e=$APP.C(c,$APP.X),f=O2(a);f=$APP.J(f);f=$APP.C(f,$APP.vk);a.setAttribute("data-direction",d);$APP.t(e)?f.setAttribute("aria-label",e):f.removeAttribute("aria-label");a.__xScrollParallaxModel=c;c=$APP.k(a,"__xScrollParallaxVisible");$APP.n($APP.n(c)?$APP.p(b):c)&&b3(a)}},l3=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)?this.setAttribute("direction",""+$APP.Q.g(b)):
15
+ 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.Q.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)?this.setAttribute("easing",""+$APP.Q.g(b)):
16
+ this.removeAttribute("easing")},enumerable:!0,configurable:!0});$APP.dh(a,"disabled","disabled");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.M(b,""):b)?this.setAttribute("label",""+$APP.Q.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"progress",{get:function(){var b=$APP.k(this,"__xScrollParallaxLastProg");return $APP.n(b)?b:0},enumerable:!0,
17
+ configurable:!0})},m3=function(a){O2(a);i3(a);h3(a);j3(a);k3(a);return null},n3=function(a){for(var b=W2(a),c=b.length,d=0;;)if(d<c){var e=b[d];e.style.transform="";e.style.opacity="";d+=1}else break;$APP.n($APP.k(a,"__xScrollParallaxVisible"))&&(b=$APP.k(a,"__xScrollParallaxLastProg"),$APP.P(a,"x-scroll-parallax-leave",$APP.Xi(N2($APP.n(b)?b:0))));i3(a);b=$APP.k(a,"__xScrollParallaxIO");$APP.n(b)&&(b.disconnect(),a.__xScrollParallaxIO=null);Z2(a);a.__xScrollParallaxVisible=!1;return a.__xScrollParallaxLastProg=
18
+ null},o3=function(a,b,c,d){$APP.M(c,d)&&k3(a);return null},q3=function(){return $APP.Yg("x-scroll-parallax",new $APP.N(null,5,[$APP.Pg,p3,$APP.Qg,m3,$APP.Rg,n3,$APP.Sg,o3,$APP.Wg,l3],null))},P2=new $APP.F(null,"source-raw","source-raw",396083546),Q2=new $APP.F(null,"easing-raw","easing-raw",440485546),U2=new $APP.F(null,"easing","easing",735372043);var p3=["direction","source","easing","disabled","label"];$APP.Yd(["x-scroll-parallax-enter",new $APP.N(null,2,[$APP.Z,new $APP.N(null,1,[$APP.vn,$APP.V],null),$APP.Fn,!1],null),"x-scroll-parallax-leave",new $APP.N(null,2,[$APP.Z,new $APP.N(null,1,[$APP.vn,$APP.V],null),$APP.Fn,!1],null),"x-scroll-parallax-progress",new $APP.N(null,2,[$APP.Z,new $APP.N(null,1,[$APP.vn,$APP.V],null),$APP.Fn,!1],null)]);
19
+ var R2=new $APP.O(null,new $APP.N(null,2,["vertical",null,"horizontal",null],null),null),S2=new $APP.O(null,new $APP.N(null,1,["document",null],null),null),T2=new $APP.O(null,new $APP.N(null,2,["none",null,"smooth",null],null),null);$APP.ca("baredom.exports.x_scroll_parallax.init",q3);export const init=q3;
@@ -1,20 +1,19 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var uF=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:b):b},wF=function(a){return typeof a==="string"&&$APP.I(vF,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},xF=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},yF=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},zF=function(a){var b=$APP.k(a,"__xScrollStackRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
2
+ var rI=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.p(isNaN(a))&&a>0?a:b):b},tI=function(a){return typeof a==="string"&&$APP.Zc(sI,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},uI=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},vI=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},wI=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
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.Q(null,3,[$APP.Hi,b,$APP.Hj,d,$APP.kj,e],null);return $APP.k(a,"__xScrollStackRefs")},DF=function(a){a=new $APP.Q(null,5,[$APP.em,a.getAttribute("peek"),AF,a.getAttribute("rotation"),BF,a.getAttribute("scroll-distance"),$APP.Xi,a.getAttribute("align"),$APP.ej,$APP.n(a.hasAttribute("disabled"))?"":null],null);var b=$APP.M(a);a=$APP.D(b,$APP.em);var c=$APP.D(b,
5
- AF),d=$APP.D(b,BF),e=$APP.D(b,$APP.Xi);b=$APP.D(b,$APP.ej);return new $APP.Q(null,5,[$APP.bj,uF(a,6),$APP.bm,uF(c,3),CF,uF(d,150),$APP.vj,wF(e),$APP.X,b!=null],null)},EF=function(a){a=zF(a);a=$APP.M(a);return $APP.D(a,$APP.kj).assignedElements()},FF=function(a,b,c){b=new CustomEvent(b,{detail:$APP.Hh(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},GF=function(a){var b=$APP.k(a,"__xScrollStackModel");b=$APP.n(b)?b:DF(a);var c=EF(a).length;b=window.innerHeight+c*CF.g(b);a.style.height=
6
- ""+$APP.T.g(b)+"px"},MF=function(a){var b=function(){var la=$APP.k(a,"__xScrollStackModel");return $APP.n(la)?la:DF(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=EF(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.B.i(g.length,e)&&$APP.B.i(h.length,e):h:g:la}())){var l=CF.g(b),m=$APP.bj.g(b),p=$APP.bm.g(b),q=$APP.vj.g(b),v=g[0],x=$APP.n(a.hasAttribute("align"))?function(){var la=
7
- (e-1)*m+h[e-1],Ca=$APP.M($APP.k(a,"__xScrollStackRefs"));Ca=$APP.D(Ca,$APP.Hj).clientHeight;a:switch(q){case "top":la=32;break a;case "bottom":la=Ca-la-32;break a;default:la=(Ca-la)/2}return la-v}():0;b=yF(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}(),C=0;;)if(C<e){var E=d[C],H=xF(c,C,l),G=new $APP.Q(null,3,[HF,C*m,IF,p*Math.sin(C*2.3),JF,2*Math.cos(C*3.7)],null),J=g[C];J=v+HF.g(G)-J;J=H*J+
8
- H*x;var R=H*IF.g(G);G=H*JF.g(G);var aa=H>0?""+$APP.T.g(C):"";E.style.transform=H===0?"":"translate("+$APP.T.g(G.toFixed(2))+"px,"+$APP.T.g(J.toFixed(2))+"px) rotate("+$APP.T.g(R.toFixed(3))+"deg)";E.style.zIndex=aa;C+=1}else break;$APP.N(y,A)&&(a.__xScrollStackStackedCount=y,FF(a,"x-scroll-stack-change",new $APP.Q(null,3,[KF,y,LF,e,$APP.cm,b],null)));c=$APP.k(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,FF(a,"x-scroll-stack-progress",new $APP.Q(null,3,[$APP.cm,
9
- b,KF,y,LF,e],null))}a.__xScrollStackRAF=null},NF=function(a){a=$APP.k(a,"__xScrollStackModel");return $APP.n(a)?$APP.X.g(a):a},OF=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollStackVisible"),$APP.n(b)?$APP.r(NF(a)):b):b}())?$APP.n($APP.k(a,"__xScrollStackRAF"))?null:$APP.ja(a,"__xScrollStackRAF",requestAnimationFrame(function(){return MF(a)})):null},PF=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)},QF=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},RF=function(a){var b=$APP.k(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.ja(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=
11
- null;if($APP.n(a.isConnected)){var c=EF(a),d=c.length;if(d>0){var e=$APP.M($APP.k(a,"__xScrollStackRefs")),g=$APP.D(e,$APP.Hj);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 MF(a)}return null}))},SF=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(NF(a))?c=null:(PF(a),c=RF(a)):c=QF(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},TF=function(a){a=EF(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},UF=function(a){function b(){GF(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?RF(a):null}function c(){GF(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?
13
- RF(a):null}var d=zF(a);d=$APP.M(d);$APP.D(d,$APP.kj).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ja(a,"__xScrollStackHandlers",{scroll:function(){return OF(a)},slot:c,resize:b,scrollAttached:!1})},VF=function(a){var b=$APP.k(a,"__xScrollStackHandlers");if($APP.n(b)){QF(a);var c=$APP.k(a,"__xScrollStackRefs");if($APP.n(c)){c=$APP.kj.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},WF=function(a){var b=DF(a);if($APP.N($APP.k(a,"__xScrollStackModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.X);a.__xScrollStackModel=b;$APP.n(c)?(TF(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,QF(a)):$APP.n($APP.k(a,"__xScrollStackVisible"))&&(PF(a),RF(a))}},
15
- XF=function(a){Object.defineProperty(a,"peek",{get:function(){return uF(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 uF(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 uF(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 wF(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(){GF(this);return $APP.n($APP.k(this,
18
- "__xScrollStackVisible"))?RF(this):null},enumerable:!0,configurable:!0})},ZF=function(){var a=class extends HTMLElement{};a.observedAttributes=YF;a.prototype.connectedCallback=function(){zF(this);VF(this);UF(this);SF(this);WF(this);GF(this);return null};a.prototype.disconnectedCallback=function(){TF(this);VF(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)&&(WF(this),GF(this),$APP.n($APP.k(this,"__xScrollStackVisible"))&&RF(this));return null};XF(a.prototype);return a},$F=function(){$APP.n(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",ZF());return null},IF=new $APP.K(null,"stack-rot","stack-rot",-949440704),LF=new $APP.K(null,"totalCount","totalCount",2101470328),BF=new $APP.K(null,"scroll-distance-raw",
20
- "scroll-distance-raw",1537519796),JF=new $APP.K(null,"stack-x","stack-x",-1557848736),HF=new $APP.K(null,"stack-y","stack-y",146748620),AF=new $APP.K(null,"rotation-raw","rotation-raw",318004495),KF=new $APP.K(null,"stackedCount","stackedCount",137366007),CF=new $APP.K(null,"scroll-distance","scroll-distance",-544947824);var YF=["peek","rotation","scroll-distance","align","disabled"];$APP.Pd(["x-scroll-stack-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[KF,$APP.W,LF,$APP.W,$APP.cm,$APP.W],null),$APP.lm,!1],null),"x-scroll-stack-progress",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.cm,$APP.W,KF,$APP.W,LF,$APP.W],null),$APP.lm,!1],null)]);var vF=new $APP.S(null,new $APP.Q(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ha("baredom.exports.x_scroll_stack.init",$F);export const init=$F;
4
+ d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.N(null,3,[$APP.Uh,b,$APP.Vh,d,$APP.tk,e],null);return $APP.k(a,"__xScrollStackRefs")},AI=function(a){a=new $APP.N(null,5,[$APP.xn,a.getAttribute("peek"),xI,a.getAttribute("rotation"),yI,a.getAttribute("scroll-distance"),$APP.fk,a.getAttribute("align"),$APP.mk,$APP.n(a.hasAttribute("disabled"))?"":null],null);var b=$APP.J(a);a=$APP.C(b,$APP.xn);var c=$APP.C(b,
5
+ xI),d=$APP.C(b,yI),e=$APP.C(b,$APP.fk);b=$APP.C(b,$APP.mk);return new $APP.N(null,5,[$APP.jk,rI(a,6),$APP.un,rI(c,3),zI,rI(d,150),$APP.Ik,tI(e),$APP.Y,b!=null],null)},BI=function(a){a=wI(a);a=$APP.J(a);return $APP.C(a,$APP.tk).assignedElements()},CI=function(a){var b=$APP.k(a,"__xScrollStackModel");b=$APP.n(b)?b:AI(a);var c=BI(a).length;b=window.innerHeight+c*zI.g(b);a.style.height=""+$APP.Q.g(b)+"px"},II=function(a){var b=function(){var va=$APP.k(a,"__xScrollStackModel");return $APP.n(va)?va:AI(a)}(),
6
+ c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=BI(a),e=d.length,f=$APP.k(a,"__xScrollStackNaturalOffsets"),h=$APP.k(a,"__xScrollStackChildHeights");if($APP.n(function(){var va=e>0;return va?$APP.n(f)?$APP.n(h)?$APP.B.i(f.length,e)&&$APP.B.i(h.length,e):h:f:va}())){var l=zI.g(b),m=$APP.jk.g(b),q=$APP.un.g(b),r=$APP.Ik.g(b),v=f[0],x=$APP.n(a.hasAttribute("align"))?function(){var va=(e-1)*m+h[e-1],Pa=$APP.J($APP.k(a,"__xScrollStackRefs"));Pa=$APP.C(Pa,$APP.Vh).clientHeight;a:switch(r){case "top":va=
7
+ 32;break a;case "bottom":va=Pa-va-32;break a;default:va=(Pa-va)/2}return va-v}():0;b=vI(c,e,l);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,l)))),A=function(){var va=$APP.k(a,"__xScrollStackStackedCount");return $APP.n(va)?va:0}(),D=0;;)if(D<e){var G=d[D],I=uI(c,D,l),H=new $APP.N(null,3,[DI,D*m,EI,q*Math.sin(D*2.3),FI,2*Math.cos(D*3.7)],null),K=f[D];K=v+DI.g(H)-K;K=I*K+I*x;var W=I*EI.g(H);H=I*FI.g(H);var ea=I>0?""+$APP.Q.g(D):"";G.style.transform=I===0?"":"translate("+$APP.Q.g(H.toFixed(2))+
8
+ "px,"+$APP.Q.g(K.toFixed(2))+"px) rotate("+$APP.Q.g(W.toFixed(3))+"deg)";G.style.zIndex=ea;D+=1}else break;$APP.M(y,A)&&(a.__xScrollStackStackedCount=y,$APP.P(a,"x-scroll-stack-change",$APP.Xi(new $APP.N(null,3,[GI,y,HI,e,$APP.vn,b],null))));c=$APP.k(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,$APP.P(a,"x-scroll-stack-progress",$APP.Xi(new $APP.N(null,3,[$APP.vn,b,GI,y,HI,e],null)))}a.__xScrollStackRAF=null},JI=function(a){a=$APP.k(a,"__xScrollStackModel");
9
+ return $APP.n(a)?$APP.Y.g(a):a},KI=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollStackVisible"),$APP.n(b)?$APP.p(JI(a)):b):b}())?$APP.n($APP.k(a,"__xScrollStackRAF"))?null:$APP.fa(a,"__xScrollStackRAF",requestAnimationFrame(function(){return II(a)})):null},LI=function(a){a=$APP.k(a,"__xScrollStackHandlers");$APP.n($APP.n(a)?$APP.p($APP.k(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},
10
+ MI=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},NI=function(a){var b=$APP.k(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.fa(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=null;if($APP.n(a.isConnected)){var c=BI(a),d=c.length;if(d>0){var e=$APP.J($APP.k(a,
11
+ "__xScrollStackRefs")),f=$APP.C(e,$APP.Vh);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;f.offsetHeight;f=f.getBoundingClientRect();for(l=0;;)if(l<d)m=c[l].getBoundingClientRect(),e[l]=m.top-f.top,h[l]=m.height,l+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return II(a)}return null}))},OI=function(a){var b=$APP.k(a,"__xScrollStackIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){c=
12
+ c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.n(c)?$APP.n(JI(a))?c=null:(LI(a),c=NI(a)):c=MI(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},PI=function(a){a=BI(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},QI=function(a){function b(){CI(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?NI(a):null}function c(){CI(a);return $APP.n($APP.k(a,"__xScrollStackVisible"))?NI(a):null}var d=wI(a);d=$APP.J(d);$APP.C(d,$APP.tk).addEventListener("slotchange",
13
+ c);window.addEventListener("resize",b);$APP.fa(a,"__xScrollStackHandlers",{scroll:function(){return KI(a)},slot:c,resize:b,scrollAttached:!1})},RI=function(a){var b=$APP.k(a,"__xScrollStackHandlers");if($APP.n(b)){MI(a);var c=$APP.k(a,"__xScrollStackRefs");if($APP.n(c)){c=$APP.tk.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",b)}b=$APP.k(a,"__xScrollStackRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=
14
+ null);b=$APP.k(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},SI=function(a){var b=AI(a);if($APP.M($APP.k(a,"__xScrollStackModel"),b)){b=$APP.J(b);var c=$APP.C(b,$APP.Y);a.__xScrollStackModel=b;$APP.n(c)?(PI(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,MI(a)):$APP.n($APP.k(a,"__xScrollStackVisible"))&&(LI(a),NI(a))}},TI=function(a){Object.defineProperty(a,"peek",{get:function(){return rI(this.getAttribute("peek"),
15
+ 6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.Q.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return rI(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.Q.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",{get:function(){return rI(this.getAttribute("scroll-distance"),150)},set:function(b){return b!=
16
+ null?this.setAttribute("scroll-distance",""+$APP.Q.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return tI(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.Q.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});$APP.dh(a,"disabled","disabled");Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.k(this,"__xScrollStackStackedCount");return $APP.n(b)?
17
+ 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});return Object.defineProperty(a,"refresh",{value:function(){CI(this);return $APP.n($APP.k(this,"__xScrollStackVisible"))?NI(this):null},enumerable:!0,configurable:!0})},UI=function(a){wI(a);RI(a);QI(a);OI(a);SI(a);CI(a);return null},VI=function(a){PI(a);RI(a);var b=$APP.k(a,"__xScrollStackIO");$APP.n(b)&&(b.disconnect(),
18
+ a.__xScrollStackIO=null);a.__xScrollStackVisible=!1;a.__xScrollStackStackedCount=0;a.__xScrollStackLastProg=null;a.__xScrollStackNaturalOffsets=null;return a.__xScrollStackChildHeights=null},WI=function(a,b,c,d){$APP.M(c,d)&&(SI(a),CI(a),$APP.n($APP.k(a,"__xScrollStackVisible"))&&NI(a));return null},YI=function(){return $APP.Yg("x-scroll-stack",new $APP.N(null,5,[$APP.Pg,XI,$APP.Qg,UI,$APP.Rg,VI,$APP.Sg,WI,$APP.Wg,TI],null))},EI=new $APP.F(null,"stack-rot","stack-rot",-949440704),HI=new $APP.F(null,
19
+ "totalCount","totalCount",2101470328),yI=new $APP.F(null,"scroll-distance-raw","scroll-distance-raw",1537519796),FI=new $APP.F(null,"stack-x","stack-x",-1557848736),DI=new $APP.F(null,"stack-y","stack-y",146748620),xI=new $APP.F(null,"rotation-raw","rotation-raw",318004495),GI=new $APP.F(null,"stackedCount","stackedCount",137366007),zI=new $APP.F(null,"scroll-distance","scroll-distance",-544947824);var XI=["peek","rotation","scroll-distance","align","disabled"];$APP.Yd(["x-scroll-stack-change",new $APP.N(null,2,[$APP.Z,new $APP.N(null,3,[GI,$APP.V,HI,$APP.V,$APP.vn,$APP.V],null),$APP.Fn,!1],null),"x-scroll-stack-progress",new $APP.N(null,2,[$APP.Z,new $APP.N(null,3,[$APP.vn,$APP.V,GI,$APP.V,HI,$APP.V],null),$APP.Fn,!1],null)]);var sI=new $APP.O(null,new $APP.N(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ca("baredom.exports.x_scroll_stack.init",YI);export const init=YI;