@vanelsas/baredom 2.6.0 → 2.7.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 (96) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +12 -41
  3. package/dist/base.js +355 -349
  4. package/dist/integrity.json +93 -93
  5. package/dist/x-alert.js +18 -19
  6. package/dist/x-avatar-group.js +10 -11
  7. package/dist/x-avatar.js +14 -14
  8. package/dist/x-badge.js +10 -11
  9. package/dist/x-bento-grid.js +5 -5
  10. package/dist/x-bento-item.js +4 -4
  11. package/dist/x-breadcrumbs.js +14 -14
  12. package/dist/x-button.js +18 -16
  13. package/dist/x-cancel-dialogue.js +17 -17
  14. package/dist/x-card.js +7 -7
  15. package/dist/x-carousel.js +34 -34
  16. package/dist/x-chart.js +46 -48
  17. package/dist/x-checkbox.js +10 -11
  18. package/dist/x-chip.js +9 -9
  19. package/dist/x-collapse.js +10 -12
  20. package/dist/x-color-picker.js +44 -45
  21. package/dist/x-combobox.js +26 -27
  22. package/dist/x-command-palette.js +26 -27
  23. package/dist/x-container.js +5 -6
  24. package/dist/x-context-menu.js +18 -18
  25. package/dist/x-copy.js +22 -22
  26. package/dist/x-currency-field.js +22 -24
  27. package/dist/x-date-picker.js +41 -42
  28. package/dist/x-divider.js +8 -9
  29. package/dist/x-drawer.js +11 -12
  30. package/dist/x-dropdown.js +10 -11
  31. package/dist/x-fieldset.js +6 -6
  32. package/dist/x-file-download.js +7 -8
  33. package/dist/x-file-upload.js +22 -25
  34. package/dist/x-form-field.js +15 -17
  35. package/dist/x-form.js +8 -10
  36. package/dist/x-gaussian-blur.js +18 -18
  37. package/dist/x-grid.js +6 -6
  38. package/dist/x-icon.js +7 -7
  39. package/dist/x-image.js +19 -19
  40. package/dist/x-kinetic-font.js +28 -29
  41. package/dist/x-kinetic-typography.js +39 -39
  42. package/dist/x-liquid-dock.js +39 -39
  43. package/dist/x-liquid-fill.js +44 -44
  44. package/dist/x-liquid-glass.js +47 -47
  45. package/dist/x-menu-item.js +9 -10
  46. package/dist/x-menu.js +11 -11
  47. package/dist/x-metaball-cursor.js +27 -27
  48. package/dist/x-modal.js +12 -13
  49. package/dist/x-morph-stack.js +38 -39
  50. package/dist/x-navbar.js +12 -13
  51. package/dist/x-neural-glow.js +32 -33
  52. package/dist/x-notification-center.js +9 -10
  53. package/dist/x-organic-divider.js +18 -19
  54. package/dist/x-organic-progress.js +37 -38
  55. package/dist/x-organic-shape.js +13 -14
  56. package/dist/x-pagination.js +16 -17
  57. package/dist/x-particle-button.js +48 -49
  58. package/dist/x-popover.js +24 -25
  59. package/dist/x-progress-circle.js +8 -9
  60. package/dist/x-progress.js +11 -11
  61. package/dist/x-radio.js +10 -12
  62. package/dist/x-ripple-effect.js +11 -11
  63. package/dist/x-scroll-parallax.js +19 -19
  64. package/dist/x-scroll-stack.js +18 -18
  65. package/dist/x-scroll-story.js +35 -35
  66. package/dist/x-scroll-timeline.js +46 -47
  67. package/dist/x-scroll.js +40 -41
  68. package/dist/x-search-field.js +15 -17
  69. package/dist/x-select.js +10 -11
  70. package/dist/x-sidebar.js +16 -16
  71. package/dist/x-skeleton-group.js +12 -14
  72. package/dist/x-skeleton.js +1 -1
  73. package/dist/x-slider.js +16 -18
  74. package/dist/x-soft-body.js +21 -21
  75. package/dist/x-spacer.js +5 -5
  76. package/dist/x-spinner.js +5 -6
  77. package/dist/x-splash.js +13 -13
  78. package/dist/x-stat.js +11 -11
  79. package/dist/x-stepper.js +15 -15
  80. package/dist/x-switch.js +9 -11
  81. package/dist/x-tab.js +7 -7
  82. package/dist/x-table-cell.js +22 -22
  83. package/dist/x-table-row.js +9 -10
  84. package/dist/x-table.js +14 -15
  85. package/dist/x-tabs.js +11 -11
  86. package/dist/x-text-area.js +19 -21
  87. package/dist/x-theme.d.ts +1 -1
  88. package/dist/x-theme.js +25 -25
  89. package/dist/x-timeline-item.js +23 -23
  90. package/dist/x-timeline.js +9 -9
  91. package/dist/x-toast.js +24 -24
  92. package/dist/x-toaster.js +8 -8
  93. package/dist/x-tooltip.js +11 -13
  94. package/dist/x-typography.js +11 -11
  95. package/dist/x-welcome-tour.js +64 -65
  96. package/package.json +181 -181
package/dist/x-drawer.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LJ=function(a){var b=$APP.k(a,"__xDrawerRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-drawer-size:20rem;--x-drawer-bg:var(--x-color-bg,Canvas);--x-drawer-fg:var(--x-color-text,CanvasText);--x-drawer-backdrop:rgb(0 0 0/0.4);--x-drawer-shadow:var(--x-shadow-lg,0 8px 24px rgb(0 0 0/0.18));--x-drawer-duration:var(--x-transition-duration,200ms);--x-drawer-easing:ease;--x-drawer-z:1000;--x-drawer-header-padding:1rem 1.25rem;--x-drawer-body-padding:1rem 1.25rem;--x-drawer-footer-padding:0.75rem 1.25rem;--x-drawer-border:var(--x-color-border,color-mix(in srgb,currentColor 12%,transparent));}[part\x3dbackdrop]{display:none;position:fixed;inset:0;background:var(--x-drawer-backdrop);z-index:var(--x-drawer-z);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{display:block;}[part\x3dpanel]{position:fixed;background:var(--x-drawer-bg);color:var(--x-drawer-fg);box-shadow:var(--x-drawer-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-drawer-z) + 1);transition:transform var(--x-drawer-duration) var(--x-drawer-easing);}:host([data-placement\x3dleft]) [part\x3dpanel],:host([data-placement\x3dright]) [part\x3dpanel]{top:0;bottom:0;width:var(--x-drawer-size);max-width:100%;}:host([data-placement\x3dleft]) [part\x3dpanel]{left:0;transform:translateX(-100%);}:host([data-placement\x3dright]) [part\x3dpanel]{right:0;transform:translateX(100%);}:host([data-placement\x3dtop]) [part\x3dpanel],:host([data-placement\x3dbottom]) [part\x3dpanel]{left:0;right:0;height:var(--x-drawer-size);max-height:100dvh;}:host([data-placement\x3dtop]) [part\x3dpanel]{top:0;transform:translateY(-100%);}:host([data-placement\x3dbottom]) [part\x3dpanel]{bottom:0;transform:translateY(100%);}:host([data-open\x3dtrue]) [part\x3dpanel]{transform:none;}[part\x3dpanel]:focus{outline:none;}[part\x3dheader]{padding:var(--x-drawer-header-padding);border-bottom:1px solid var(--x-drawer-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-drawer-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-drawer-footer-padding);border-top:1px solid var(--x-drawer-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none;}}@media (prefers-color-scheme:dark){:host{--x-drawer-bg:var(--x-color-bg,#1c1d24);--x-drawer-fg:var(--x-color-text,#e2e4ef);--x-drawer-border:var(--x-color-border,rgb(255 255 255/0.08));--x-drawer-shadow:var(--x-shadow-lg,0 8px 40px rgb(0 0 0/0.55));--x-drawer-backdrop:rgb(0 0 0/0.55);}}";
3
- d.setAttribute("part","backdrop");e.setAttribute("part","panel");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");l.setAttribute("part","body");p.setAttribute("part","footer");q.setAttribute("name","footer");g.appendChild(h);l.appendChild(m);p.appendChild(q);e.appendChild(g);e.appendChild(l);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xDrawerRefs={root:b,backdrop:d,panel:e,header:g,body:l,
4
- footer:p};return $APP.k(a,"__xDrawerRefs")},NJ=function(a){a=new $APP.Q(null,3,[$APP.Gi,a.hasAttribute("open"),$APP.jn,a.getAttribute("placement"),$APP.pi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Gi);a=$APP.D(b,$APP.jn);b=$APP.D(b,$APP.pi);c=$APP.F(c);a=typeof a==="string"&&$APP.I(MJ,a)?a:"right";b=typeof b==="string"&&$APP.N(b,"")?b:"Drawer";return new $APP.Q(null,3,[$APP.Om,c,$APP.Qj,a,$APP.U,b],null)},OJ=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,
5
- composed:!0,cancelable:!1}))},PJ=function(a){return $APP.xe($APP.de(function(b){var c=window.getComputedStyle(b);return $APP.N("none",c.display)&&$APP.N("hidden",c.visibility)&&b.offsetWidth>0&&b.offsetHeight>0},$APP.uc(a.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))))},QJ=function(a){var b=$APP.k(a,"__xDrawerRefs");b=$APP.n(b)?$APP.k(b,"panel"):null;var c=$APP.k(a,"__xDrawerRestore"),d=
6
- $APP.k(a,"__xDrawerPanelTab")===!0;a.__xDrawerTabbables=null;a.__xDrawerRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xDrawerPanelTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},RJ=function(a,b){OJ(a,"x-drawer-dismiss",{reason:b});a.removeAttribute("open");return null},SJ=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open","");return null},TJ=function(a){a.removeAttribute("open");return null},UJ=function(a){var b=LJ(a);b=$APP.k(b,"panel");var c=NJ(a),d=
7
- $APP.Om.g(c),e=$APP.k(a,"__xDrawerPrevOpen");a.setAttribute("data-open",$APP.n(d)?"true":"false");a.setAttribute("data-placement",$APP.Qj.g(c));b.setAttribute("aria-label",$APP.U.g(c));$APP.n(d)?b.removeAttribute("aria-hidden"):b.setAttribute("aria-hidden","true");$APP.N(e,d)&&(a.__xDrawerPrevOpen=d,OJ(a,"x-drawer-toggle",{open:d}),$APP.n(d)?setTimeout(function(){var g=$APP.k(a,"__xDrawerRefs");g=$APP.n(g)?$APP.k(g,"panel"):null;var h=PJ(a);a.__xDrawerRestore=document.activeElement;var l=$APP.n(h)?
8
- $APP.Hh(h):null;a.__xDrawerTabbables=l;$APP.t(h)?$APP.u(h).focus():$APP.n(g)&&($APP.n(g.hasAttribute("tabindex"))||(g.setAttribute("tabindex","-1"),a.__xDrawerPanelTab=!0),g.focus());return null},0):QJ(a))},VJ=function(a){function b(g){var h=g.key;if($APP.B.i(h,"Escape"))g.preventDefault(),RJ(a,"escape");else if($APP.B.i(h,"Tab")){h=$APP.k(a,"__xDrawerTabbables");h=$APP.n(h)?$APP.xe($APP.uc(h)):$APP.fe;var l=$APP.k(a,"__xDrawerRefs");l=$APP.n(l)?$APP.k(l,"panel"):null;if($APP.Hc(h))g.preventDefault(),
9
- $APP.n(l)&&l.focus();else{l=document.activeElement;var m=$APP.u(h);h=$APP.xc(h);var p=g.shiftKey;$APP.n($APP.n(p)?$APP.B.i(l,m):p)?(g.preventDefault(),h.focus()):$APP.r(p)&&$APP.B.i(l,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return RJ(a,"backdrop")}var d=LJ(a),e=$APP.k(d,"panel");$APP.k(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ja(a,"__xDrawerHandlers",{backdrop:c,keydown:b})},WJ=function(a){var b=$APP.k(a,"__xDrawerHandlers"),c=$APP.k(a,"__xDrawerRefs");
10
- if($APP.n($APP.n(b)?c:b)){var d=$APP.k(c,"backdrop");c=$APP.k(c,"panel");var e=$APP.k(b,"backdrop");b=$APP.k(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xDrawerHandlers=null},XJ=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?SJ(this):TJ(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"placement",{get:function(){var b=this.getAttribute("placement");
11
- return $APP.n(b)?b:"right"},set:function(b){return b==null?this.removeAttribute("placement"):this.setAttribute("placement",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Drawer"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return SJ(this)},enumerable:!0,configurable:!0,
12
- writable:!0});Object.defineProperty(a,"hide",{value:function(){return TJ(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?TJ(this):SJ(this);return null},enumerable:!0,configurable:!0,writable:!0})},ZJ=function(){if(!$APP.n(customElements.get("x-drawer"))){var a=class extends HTMLElement{};a.observedAttributes=YJ;a.prototype.connectedCallback=function(){LJ(this);WJ(this);VJ(this);UJ(this);return null};a.prototype.disconnectedCallback=
13
- function(){WJ(this);QJ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&UJ(this);return null};XJ(a.prototype);customElements.define("x-drawer",a)}return null},$J=function(){return ZJ()};var MJ=new $APP.S(null,new $APP.Q(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),YJ=["open","placement","label"];$APP.Pd(["x-drawer-toggle",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.im,$APP.Zj],null)],null),"x-drawer-dismiss",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.Qi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_drawer.init",$J);export const init=$J;
2
+ var tL=function(a){var b=$APP.k(a,"__xDrawerRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),r=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-drawer-size:20rem;--x-drawer-bg:var(--x-color-bg,Canvas);--x-drawer-fg:var(--x-color-text,CanvasText);--x-drawer-backdrop:rgb(0 0 0/0.4);--x-drawer-shadow:var(--x-shadow-lg,0 8px 24px rgb(0 0 0/0.18));--x-drawer-duration:var(--x-transition-duration,200ms);--x-drawer-easing:ease;--x-drawer-z:1000;--x-drawer-header-padding:1rem 1.25rem;--x-drawer-body-padding:1rem 1.25rem;--x-drawer-footer-padding:0.75rem 1.25rem;--x-drawer-border:var(--x-color-border,color-mix(in srgb,currentColor 12%,transparent));}[part\x3dbackdrop]{display:none;position:fixed;inset:0;background:var(--x-drawer-backdrop);z-index:var(--x-drawer-z);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{display:block;}[part\x3dpanel]{position:fixed;background:var(--x-drawer-bg);color:var(--x-drawer-fg);box-shadow:var(--x-drawer-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-drawer-z) + 1);transition:transform var(--x-drawer-duration) var(--x-drawer-easing);}:host([data-placement\x3dleft]) [part\x3dpanel],:host([data-placement\x3dright]) [part\x3dpanel]{top:0;bottom:0;width:var(--x-drawer-size);max-width:100%;}:host([data-placement\x3dleft]) [part\x3dpanel]{left:0;transform:translateX(-100%);}:host([data-placement\x3dright]) [part\x3dpanel]{right:0;transform:translateX(100%);}:host([data-placement\x3dtop]) [part\x3dpanel],:host([data-placement\x3dbottom]) [part\x3dpanel]{left:0;right:0;height:var(--x-drawer-size);max-height:100dvh;}:host([data-placement\x3dtop]) [part\x3dpanel]{top:0;transform:translateY(-100%);}:host([data-placement\x3dbottom]) [part\x3dpanel]{bottom:0;transform:translateY(100%);}:host([data-open\x3dtrue]) [part\x3dpanel]{transform:none;}[part\x3dpanel]:focus{outline:none;}[part\x3dheader]{padding:var(--x-drawer-header-padding);border-bottom:1px solid var(--x-drawer-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-drawer-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-drawer-footer-padding);border-top:1px solid var(--x-drawer-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none;}}@media (prefers-color-scheme:dark){:host{--x-drawer-bg:var(--x-color-bg,#1c1d24);--x-drawer-fg:var(--x-color-text,#e2e4ef);--x-drawer-border:var(--x-color-border,rgb(255 255 255/0.08));--x-drawer-shadow:var(--x-shadow-lg,0 8px 40px rgb(0 0 0/0.55));--x-drawer-backdrop:rgb(0 0 0/0.55);}}";
3
+ d.setAttribute("part","backdrop");e.setAttribute("part","panel");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");l.setAttribute("part","body");p.setAttribute("part","footer");r.setAttribute("name","footer");g.appendChild(h);l.appendChild(m);p.appendChild(r);e.appendChild(g);e.appendChild(l);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xDrawerRefs={root:b,backdrop:d,panel:e,header:g,body:l,
4
+ footer:p};return $APP.k(a,"__xDrawerRefs")},vL=function(a){a=new $APP.Q(null,3,[$APP.Yi,a.hasAttribute("open"),$APP.Bn,a.getAttribute("placement"),$APP.Hi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Yi);a=$APP.D(b,$APP.Bn);b=$APP.D(b,$APP.Hi);c=$APP.F(c);a=typeof a==="string"&&$APP.I(uL,a)?a:"right";b=typeof b==="string"&&$APP.N(b,"")?b:"Drawer";return new $APP.Q(null,3,[$APP.fn,c,$APP.lk,a,$APP.T,b],null)},wL=function(a){return $APP.xe($APP.ce(function(b){var c=window.getComputedStyle(b);
5
+ return $APP.N("none",c.display)&&$APP.N("hidden",c.visibility)&&b.offsetWidth>0&&b.offsetHeight>0},$APP.uc(a.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))))},xL=function(a){var b=$APP.k(a,"__xDrawerRefs");b=$APP.n(b)?$APP.k(b,"panel"):null;var c=$APP.k(a,"__xDrawerRestore"),d=$APP.k(a,"__xDrawerPanelTab")===!0;a.__xDrawerTabbables=null;a.__xDrawerRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),
6
+ a.__xDrawerPanelTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},yL=function(a,b){$APP.Qg(a,"x-drawer-dismiss",{reason:b});a.removeAttribute("open");return null},zL=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open","");return null},AL=function(a){a.removeAttribute("open");return null},BL=function(a){var b=tL(a);b=$APP.k(b,"panel");var c=vL(a),d=$APP.fn.g(c),e=$APP.k(a,"__xDrawerPrevOpen");a.setAttribute("data-open",$APP.n(d)?"true":"false");a.setAttribute("data-placement",$APP.lk.g(c));
7
+ b.setAttribute("aria-label",$APP.T.g(c));$APP.n(d)?b.removeAttribute("aria-hidden"):b.setAttribute("aria-hidden","true");$APP.N(e,d)&&(a.__xDrawerPrevOpen=d,$APP.Qg(a,"x-drawer-toggle",{open:d}),$APP.n(d)?setTimeout(function(){var g=$APP.k(a,"__xDrawerRefs");g=$APP.n(g)?$APP.k(g,"panel"):null;var h=wL(a);a.__xDrawerRestore=document.activeElement;var l=$APP.n(h)?$APP.Zh(h):null;a.__xDrawerTabbables=l;$APP.t(h)?$APP.u(h).focus():$APP.n(g)&&($APP.n(g.hasAttribute("tabindex"))||(g.setAttribute("tabindex",
8
+ "-1"),a.__xDrawerPanelTab=!0),g.focus());return null},0):xL(a))},CL=function(a){function b(g){var h=g.key;if($APP.B.i(h,"Escape"))g.preventDefault(),yL(a,"escape");else if($APP.B.i(h,"Tab")){h=$APP.k(a,"__xDrawerTabbables");h=$APP.n(h)?$APP.xe($APP.uc(h)):$APP.ee;var l=$APP.k(a,"__xDrawerRefs");l=$APP.n(l)?$APP.k(l,"panel"):null;if($APP.Hc(h))g.preventDefault(),$APP.n(l)&&l.focus();else{l=document.activeElement;var m=$APP.u(h);h=$APP.xc(h);var p=g.shiftKey;$APP.n($APP.n(p)?$APP.B.i(l,m):p)?(g.preventDefault(),
9
+ h.focus()):$APP.q(p)&&$APP.B.i(l,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return yL(a,"backdrop")}var d=tL(a),e=$APP.k(d,"panel");$APP.k(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ja(a,"__xDrawerHandlers",{backdrop:c,keydown:b})},DL=function(a){var b=$APP.k(a,"__xDrawerHandlers"),c=$APP.k(a,"__xDrawerRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.k(c,"backdrop");c=$APP.k(c,"panel");var e=$APP.k(b,"backdrop");b=$APP.k(b,"keydown");$APP.n(e)&&d.removeEventListener("click",
10
+ e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xDrawerHandlers=null},EL=function(a){tL(a);DL(a);CL(a);BL(a);return null},FL=function(a){DL(a);xL(a);return null},GL=function(a,b,c,d){$APP.N(c,d)&&BL(a);return null},HL=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?zL(this):AL(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"placement",{get:function(){var b=this.getAttribute("placement");return $APP.n(b)?
11
+ b:"right"},set:function(b){return b==null?this.removeAttribute("placement"):this.setAttribute("placement",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Drawer"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return zL(this)},enumerable:!0,configurable:!0,writable:!0});
12
+ Object.defineProperty(a,"hide",{value:function(){return AL(this)},enumerable:!0,configurable:!0,writable:!0});return Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?AL(this):zL(this);return null},enumerable:!0,configurable:!0,writable:!0})},JL=function(){return $APP.Lg("x-drawer",new $APP.Q(null,5,[$APP.Cg,IL,$APP.Dg,EL,$APP.Eg,FL,$APP.Fg,GL,$APP.Jg,HL],null))};var uL=new $APP.R(null,new $APP.Q(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),IL=["open","placement","label"];$APP.Pd(["x-drawer-toggle",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Hm,$APP.uk],null)],null),"x-drawer-dismiss",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.hj,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_drawer.init",JL);export const init=JL;
@@ -1,12 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var nr=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},pr=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(b,"trigger"),d=$APP.k(b,"label");b=$APP.k(b,"panel");var e=a.hasAttribute("open"),g=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.n(h)?h:"";a=a.getAttribute("placement");a=$APP.I(or,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.n(e)?"true":"false");nr(c,"disabled",g);return b.setAttribute("data-placement",
3
- a)}return null},qr=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.r(a.hasAttribute("open"));b=new CustomEvent("x-dropdown-toggle",{detail:{open:c,source:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)?(c?a.setAttribute("open",""):a.removeAttribute("open"),a.dispatchEvent(new CustomEvent("x-dropdown-change",{detail:{open:c},bubbles:!0,composed:!0,cancelable:!1}))):null},rr=function(a){var b=$APP.k(a,"__xDropdownHandlers");if($APP.n(b)){var c=
4
- $APP.k(b,"docClick"),d=$APP.k(b,"docKeydown");return setTimeout(function(){return $APP.n(a.hasAttribute("open"))?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},sr=function(a){a=$APP.k(a,"__xDropdownHandlers");if($APP.n(a)){var b=$APP.k(a,"docKeydown");document.removeEventListener("click",$APP.k(a,"docClick"));return document.removeEventListener("keydown",b)}return null},tr=function(a){return{triggerClick:function(){return qr(a,"pointer")},triggerKeydown:function(b){var c=
5
- b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),qr(a,"keyboard")):null},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.r(a.contains(b))?qr(a,"focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.vc(b.composedPath()),b=$APP.Td(function(c){return c===a},b),$APP.n(b)?null:qr(a,"outside-click")):null},docKeydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?qr(a,
6
- "escape"):null}}},ur=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(a,"__xDropdownHandlers");$APP.n(c)&&(b=$APP.k(b,"trigger"),b.removeEventListener("click",$APP.k(c,"triggerClick")),b.removeEventListener("keydown",$APP.k(c,"triggerKeydown")),a.removeEventListener("focusout",$APP.k(c,"hostFocusout")))}},vr=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return nr(this,c,$APP.F(d))}})},wr=
7
- function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},yr=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return xr}});vr(b,"open","open");vr(b,"disabled","disabled");wr(b,"label","label");wr(b,"placement","placement");b.show=function(){return $APP.n(this.hasAttribute("open"))?
8
- null:qr(this,"programmatic")};b.hide=function(){return $APP.n(this.hasAttribute("open"))?qr(this,"programmatic"):null};b.toggle=function(){return qr(this,"programmatic")};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xDropdownRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("slot");
9
- d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-dropdown-trigger-bg:var(--x-color-surface-hover,#f8fafc);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#e2e8f0);--x-dropdown-trigger-color:var(--x-color-text,#0f172a);--x-dropdown-trigger-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-trigger-radius:var(--x-radius-md,6px);--x-dropdown-trigger-padding:0 0.75rem;--x-dropdown-trigger-height:2.25rem;--x-dropdown-trigger-font-size:var(--x-font-size-sm,0.9375rem);--x-dropdown-trigger-font-weight:500;--x-dropdown-chevron-color:var(--x-color-text-muted,#64748b);--x-dropdown-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-dropdown-panel-bg:var(--x-color-bg,#ffffff);--x-dropdown-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-panel-radius:var(--x-radius-md,8px);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-dropdown-panel-padding:0.25rem;--x-dropdown-panel-min-width:10rem;--x-dropdown-panel-max-height:20rem;--x-dropdown-panel-offset:4px;--x-dropdown-transition-duration:var(--x-transition-duration,150ms);--x-dropdown-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-dropdown-trigger-bg:var(--x-color-surface-hover,#1e293b);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#334155);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#475569);--x-dropdown-trigger-color:var(--x-color-text,#e2e8f0);--x-dropdown-trigger-border:1px solid var(--x-color-border,#334155);--x-dropdown-chevron-color:var(--x-color-text-muted,#94a3b8);--x-dropdown-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-dropdown-panel-bg:var(--x-color-bg,#1e293b);--x-dropdown-panel-border:1px solid var(--x-color-border,#334155);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));}}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:0.375rem;height:var(--x-dropdown-trigger-height);padding:var(--x-dropdown-trigger-padding);background:var(--x-dropdown-trigger-bg);color:var(--x-dropdown-trigger-color);border:var(--x-dropdown-trigger-border);border-radius:var(--x-dropdown-trigger-radius);font-size:var(--x-dropdown-trigger-font-size);font-weight:var(--x-dropdown-trigger-font-weight);font-family:inherit;cursor:pointer;user-select:none;white-space:nowrap;}[part\x3dtrigger]:hover:not(:disabled){background:var(--x-dropdown-trigger-bg-hover);}[part\x3dtrigger]:active:not(:disabled){background:var(--x-dropdown-trigger-bg-active);}[part\x3dtrigger]:disabled{cursor:default;opacity:0.55;}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-dropdown-focus-ring);}[part\x3dtrigger-label]{flex:1;}[part\x3dchevron]{display:inline-block;color:var(--x-dropdown-chevron-color);font-style:normal;flex-shrink:0;transition:transform 200ms ease;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:1000;box-sizing:border-box;background:var(--x-dropdown-panel-bg);border:var(--x-dropdown-panel-border);border-radius:var(--x-dropdown-panel-radius);box-shadow:var(--x-dropdown-panel-shadow);padding:var(--x-dropdown-panel-padding);min-width:var(--x-dropdown-panel-min-width);max-width:calc(100vw - 1rem);max-height:var(--x-dropdown-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s var(--x-dropdown-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:bottom right;}[part\x3dpanel-inner]{display:contents;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
10
- e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-haspopup","true");e.setAttribute("aria-expanded","false");e.setAttribute("aria-controls","panel");g.setAttribute("part","trigger-label");h.setAttribute("part","chevron");h.setAttribute("aria-hidden","true");h.textContent="▾";l.setAttribute("part","panel");l.setAttribute("id","panel");l.setAttribute("data-placement","bottom-start");m.setAttribute("part","panel-inner");e.appendChild(g);e.appendChild(h);m.appendChild(p);
11
- l.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(l);this.__xDropdownRefs={trigger:e,label:g,chevron:h,panel:l}}ur(this);sr(this);this.__xDropdownHandlers=tr(this);d=$APP.k(this,"__xDropdownRefs");$APP.n(d)&&(c=$APP.k(this,"__xDropdownHandlers"),$APP.n(c)&&(d=$APP.k(d,"trigger"),d.addEventListener("click",$APP.k(c,"triggerClick")),d.addEventListener("keydown",$APP.k(c,"triggerKeydown")),this.addEventListener("focusout",$APP.k(c,"hostFocusout"))));$APP.n(this.hasAttribute("open"))&&
12
- rr(this);return pr(this)};b.disconnectedCallback=function(){ur(this);return sr(this)};b.attributeChangedCallback=function(c){$APP.n($APP.k(this,"__xDropdownRefs"))?(pr(this),c=$APP.B.i(c,"open")?$APP.n(this.hasAttribute("open"))?rr(this):sr(this):null):c=null;return c};return a},zr=function(){return $APP.n(customElements.get("x-dropdown"))?null:customElements.define("x-dropdown",yr())};var or=new $APP.S(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),xr=["open","disabled","label","placement"];$APP.Pd(["x-dropdown-toggle",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,2,[$APP.im,$APP.Zj,$APP.sl,$APP.Y],null)],null),"x-dropdown-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.im,$APP.Zj],null)],null)]);$APP.ha("baredom.exports.x_dropdown.init",zr);export const init=zr;
2
+ var Pr=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(b,"trigger"),d=$APP.k(b,"label");b=$APP.k(b,"panel");var e=a.hasAttribute("open"),g=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.n(h)?h:"";a=a.getAttribute("placement");a=$APP.I(Or,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.n(e)?"true":"false");$APP.Pg(c,"disabled",g);return b.setAttribute("data-placement",a)}return null},Qr=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
3
+ var c=$APP.q(a.hasAttribute("open"));return $APP.Rg(a,"x-dropdown-toggle",{open:c,source:b})?(c?a.setAttribute("open",""):a.removeAttribute("open"),$APP.Qg(a,"x-dropdown-change",{open:c})):null},Rr=function(a){var b=$APP.k(a,"__xDropdownHandlers");if($APP.n(b)){var c=$APP.k(b,"docClick"),d=$APP.k(b,"docKeydown");return setTimeout(function(){return $APP.n(a.hasAttribute("open"))?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},Sr=function(a){a=$APP.k(a,
4
+ "__xDropdownHandlers");if($APP.n(a)){var b=$APP.k(a,"docKeydown");document.removeEventListener("click",$APP.k(a,"docClick"));return document.removeEventListener("keydown",b)}return null},Tr=function(a){return{triggerClick:function(){return Qr(a,"pointer")},triggerKeydown:function(b){var c=b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),Qr(a,"keyboard")):null},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.q(a.contains(b))?Qr(a,
5
+ "focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.vc(b.composedPath()),b=$APP.Td(function(c){return c===a},b),$APP.n(b)?null:Qr(a,"outside-click")):null},docKeydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Qr(a,"escape"):null},panelClick:function(b){return $APP.n(a.hasAttribute("open"))?$APP.n(b.target.closest("button, a, [role\x3dmenuitem]"))?Qr(a,"item-select"):null:null}}},Ur=function(a){var b=$APP.k(a,"__xDropdownRefs");
6
+ if($APP.n(b)){var c=$APP.k(a,"__xDropdownHandlers");if($APP.n(c)){var d=$APP.k(b,"trigger");b=$APP.k(b,"panel");d.removeEventListener("click",$APP.k(c,"triggerClick"));d.removeEventListener("keydown",$APP.k(c,"triggerKeydown"));a.removeEventListener("focusout",$APP.k(c,"hostFocusout"));$APP.n(b)&&b.removeEventListener("click",$APP.k(c,"panelClick"))}}},Vr=function(a){if(!$APP.n($APP.k(a,"__xDropdownRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("button"),
7
+ e=document.createElement("span"),g=document.createElement("span"),h=document.createElement("div"),l=document.createElement("div"),m=document.createElement("slot");c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-dropdown-trigger-bg:var(--x-color-surface-hover,#f8fafc);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#e2e8f0);--x-dropdown-trigger-color:var(--x-color-text,#0f172a);--x-dropdown-trigger-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-trigger-radius:var(--x-radius-md,6px);--x-dropdown-trigger-padding:0 0.75rem;--x-dropdown-trigger-height:2.25rem;--x-dropdown-trigger-font-size:var(--x-font-size-sm,0.9375rem);--x-dropdown-trigger-font-weight:500;--x-dropdown-chevron-color:var(--x-color-text-muted,#64748b);--x-dropdown-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-dropdown-panel-bg:var(--x-color-bg,#ffffff);--x-dropdown-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-panel-radius:var(--x-radius-md,8px);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-dropdown-panel-padding:0.25rem;--x-dropdown-panel-min-width:10rem;--x-dropdown-panel-max-height:20rem;--x-dropdown-panel-offset:4px;--x-dropdown-transition-duration:var(--x-transition-duration,150ms);--x-dropdown-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-dropdown-trigger-bg:var(--x-color-surface-hover,#1e293b);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#334155);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#475569);--x-dropdown-trigger-color:var(--x-color-text,#e2e8f0);--x-dropdown-trigger-border:1px solid var(--x-color-border,#334155);--x-dropdown-chevron-color:var(--x-color-text-muted,#94a3b8);--x-dropdown-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-dropdown-panel-bg:var(--x-color-bg,#1e293b);--x-dropdown-panel-border:1px solid var(--x-color-border,#334155);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));}}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:0.375rem;height:var(--x-dropdown-trigger-height);padding:var(--x-dropdown-trigger-padding);background:var(--x-dropdown-trigger-bg);color:var(--x-dropdown-trigger-color);border:var(--x-dropdown-trigger-border);border-radius:var(--x-dropdown-trigger-radius);font-size:var(--x-dropdown-trigger-font-size);font-weight:var(--x-dropdown-trigger-font-weight);font-family:inherit;cursor:pointer;user-select:none;white-space:nowrap;}[part\x3dtrigger]:hover:not(:disabled){background:var(--x-dropdown-trigger-bg-hover);}[part\x3dtrigger]:active:not(:disabled){background:var(--x-dropdown-trigger-bg-active);}[part\x3dtrigger]:disabled{cursor:default;opacity:0.55;}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-dropdown-focus-ring);}[part\x3dtrigger-label]{flex:1;}[part\x3dchevron]{display:inline-block;color:var(--x-dropdown-chevron-color);font-style:normal;flex-shrink:0;transition:transform 200ms ease;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:1000;box-sizing:border-box;background:var(--x-dropdown-panel-bg);border:var(--x-dropdown-panel-border);border-radius:var(--x-dropdown-panel-radius);box-shadow:var(--x-dropdown-panel-shadow);padding:var(--x-dropdown-panel-padding);min-width:var(--x-dropdown-panel-min-width);max-width:calc(100vw - 1rem);max-height:var(--x-dropdown-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s var(--x-dropdown-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:bottom right;}[part\x3dpanel-inner]{display:contents;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
8
+ d.setAttribute("part","trigger");d.setAttribute("type","button");d.setAttribute("aria-haspopup","true");d.setAttribute("aria-expanded","false");d.setAttribute("aria-controls","panel");e.setAttribute("part","trigger-label");g.setAttribute("part","chevron");g.setAttribute("aria-hidden","true");g.textContent="▾";h.setAttribute("part","panel");h.setAttribute("id","panel");h.setAttribute("data-placement","bottom-start");l.setAttribute("part","panel-inner");d.appendChild(e);d.appendChild(g);l.appendChild(m);
9
+ h.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(h);a.__xDropdownRefs={trigger:d,label:e,chevron:g,panel:h}}Ur(a);Sr(a);a.__xDropdownHandlers=Tr(a);d=$APP.k(a,"__xDropdownRefs");$APP.n(d)&&(b=$APP.k(a,"__xDropdownHandlers"),$APP.n(b)&&(c=$APP.k(d,"trigger"),d=$APP.k(d,"panel"),c.addEventListener("click",$APP.k(b,"triggerClick")),c.addEventListener("keydown",$APP.k(b,"triggerKeydown")),a.addEventListener("focusout",$APP.k(b,"hostFocusout")),$APP.n(d)&&d.addEventListener("click",$APP.k(b,
10
+ "panelClick"))));$APP.n(a.hasAttribute("open"))&&Rr(a);return Pr(a)},Wr=function(a){Ur(a);return Sr(a)},Xr=function(a,b){return $APP.n($APP.k(a,"__xDropdownRefs"))?(Pr(a),$APP.B.i(b,"open")?$APP.n(a.hasAttribute("open"))?Rr(a):Sr(a):null):null},Yr=function(a){$APP.Sg(a,"open","open");$APP.Sg(a,"disabled","disabled");$APP.Ug(a,"label","label");$APP.Ug(a,"placement","placement");a.show=function(){return $APP.n(this.hasAttribute("open"))?null:Qr(this,"programmatic")};a.hide=function(){return $APP.n(this.hasAttribute("open"))?
11
+ Qr(this,"programmatic"):null};return a.toggle=function(){return Qr(this,"programmatic")}},$r=function(){return $APP.Lg("x-dropdown",new $APP.Q(null,5,[$APP.Cg,Zr,$APP.Dg,Vr,$APP.Eg,Wr,$APP.Fg,Xr,$APP.Jg,Yr],null))};var Or=new $APP.R(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Zr=["open","disabled","label","placement"];$APP.Pd(["x-dropdown-toggle",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,2,[$APP.Hm,$APP.uk,$APP.Kl,$APP.Y],null)],null),"x-dropdown-change",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Hm,$APP.uk],null)],null)]);$APP.ha("baredom.exports.x_dropdown.init",$r);export const init=$r;
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var tH=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},xH=function(a){var b=$APP.k(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.k(b,"root-el"),d=$APP.k(b,"legend-el");b=$APP.k(b,"content-el");var e=a.getAttribute("legend");e=new $APP.Q(null,4,[uH,e,$APP.Ol,a.hasAttribute("disabled"),$APP.Uj,a.getAttribute("aria-label"),$APP.Cj,a.getAttribute("aria-describedby")],null);var g=$APP.M(e),h=$APP.D(g,uH);var l=$APP.D(g,$APP.Ol);e=$APP.D(g,$APP.Uj);g=$APP.D(g,$APP.Cj);h=$APP.n(h)?
3
- h:"";l=$APP.F(l);l=new $APP.Q(null,5,[vH,h,wH,$APP.N(h,""),$APP.X,l,$APP.Ql,e,$APP.$m,g],null);h=vH.g(l);g=wH.g(l);e=$APP.X.g(l);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.Ql.g(l);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.$m.g(l);$APP.n(d)?c.setAttribute("aria-describedby",d):
4
- c.removeAttribute("aria-describedby");tH(a,"data-disabled",e);return tH(b,"inert",e)}return null},yH=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return tH(this,"disabled",$APP.F(b))}})},zH=function(a){Object.defineProperty(a,"legend",{configurable:!0,enumerable:!0,get:function(){return this.getAttribute("legend")},set:function(b){b!=null&&$APP.N(b)?(b=""+$APP.T.g(b),b=this.setAttribute("legend",
5
- b)):b=this.removeAttribute("legend");return b}})},BH=function(){var a=class extends HTMLElement{},b=a.prototype;a.observedAttributes=AH;zH(b);yH(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFieldsetRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:var(--x-color-border, #d1d5db);--x-fieldset-border-width:1px;--x-fieldset-border-radius:var(--x-radius-md, 8px);--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:var(--x-color-surface,transparent);--x-fieldset-legend-color:var(--x-color-text-muted,#374151);--x-fieldset-legend-font-size:var(--x-font-size-sm, 0.875rem);--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;--x-fieldset-input-bg:var(--x-color-surface,#ffffff);--x-fieldset-input-color:var(--x-color-text,#0f172a);--x-fieldset-input-border:var(--x-color-border,#d1d5db);--x-fieldset-input-radius:var(--x-radius-sm,0.375rem);--x-fieldset-input-focus:var(--x-color-focus-ring,#60a5fa);}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:var(--x-color-border, #374151);--x-fieldset-legend-color:var(--x-color-text-muted,#d1d5db);--x-fieldset-input-bg:var(--x-color-surface,#1f2937);--x-fieldset-input-color:var(--x-color-text,#e5e7eb);--x-fieldset-input-border:var(--x-color-border,#374151);--x-fieldset-input-focus:var(--x-color-focus-ring,#93c5fd);}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
6
- e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(l);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);$APP.n(document.getElementById("x-fieldset-input-styles"))||(d=document.createElement("style"),d.setAttribute("id","x-fieldset-input-styles"),d.textContent="x-fieldset input,x-fieldset select,x-fieldset textarea{background:var(--x-fieldset-input-bg);color:var(--x-fieldset-input-color);border:1px solid var(--x-fieldset-input-border);border-radius:var(--x-fieldset-input-radius);padding:0.5rem 0.75rem;font:inherit;outline:none;box-sizing:border-box;}x-fieldset input:focus,x-fieldset select:focus,x-fieldset textarea:focus{border-color:var(--x-fieldset-input-focus);box-shadow:0 0 0 2px var(--x-fieldset-input-focus);}",
7
- document.head.appendChild(d));this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return xH(this)};b.disconnectedCallback=function(){return null};b.attributeChangedCallback=function(){return xH(this)};return a},CH=function(){return $APP.n(customElements.get("x-fieldset"))?null:customElements.define("x-fieldset",BH())},wH=new $APP.K(null,"legend-visible?","legend-visible?",-281107501),uH=new $APP.K(null,"legend-raw","legend-raw",907427195),vH=new $APP.K(null,"legend","legend",-1027192245);var AH=["legend","disabled","aria-label","aria-describedby"];$APP.ha("baredom.exports.x_fieldset.init",CH);export const init=CH;
2
+ var AI=function(a){var b=$APP.k(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.k(b,"root-el"),d=$APP.k(b,"legend-el");b=$APP.k(b,"content-el");var e=new $APP.Q(null,4,[xI,a.getAttribute("legend"),$APP.fm,a.hasAttribute("disabled"),$APP.pk,a.getAttribute("aria-label"),$APP.Uj,a.getAttribute("aria-describedby")],null),g=$APP.M(e),h=$APP.D(g,xI);var l=$APP.D(g,$APP.fm);e=$APP.D(g,$APP.pk);g=$APP.D(g,$APP.Uj);h=$APP.n(h)?h:"";l=$APP.F(l);l=new $APP.Q(null,5,[yI,h,zI,$APP.N(h,""),$APP.X,l,$APP.hm,e,$APP.sn,
3
+ g],null);h=yI.g(l);g=zI.g(l);e=$APP.X.g(l);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.hm.g(l);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.sn.g(l);$APP.n(d)?c.setAttribute("aria-describedby",d):c.removeAttribute("aria-describedby");$APP.Pg(a,"data-disabled",e);return $APP.Pg(b,
4
+ "inert",e)}return null},BI=function(a){if(!$APP.n($APP.k(a,"__xFieldsetRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:var(--x-color-border, #d1d5db);--x-fieldset-border-width:1px;--x-fieldset-border-radius:var(--x-radius-md, 8px);--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:var(--x-color-surface,transparent);--x-fieldset-legend-color:var(--x-color-text-muted,#374151);--x-fieldset-legend-font-size:var(--x-font-size-sm, 0.875rem);--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;--x-fieldset-input-bg:var(--x-color-surface,#ffffff);--x-fieldset-input-color:var(--x-color-text,#0f172a);--x-fieldset-input-border:var(--x-color-border,#d1d5db);--x-fieldset-input-radius:var(--x-radius-sm,0.375rem);--x-fieldset-input-focus:var(--x-color-focus-ring,#60a5fa);}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:var(--x-color-border, #374151);--x-fieldset-legend-color:var(--x-color-text-muted,#d1d5db);--x-fieldset-input-bg:var(--x-color-surface,#1f2937);--x-fieldset-input-color:var(--x-color-text,#e5e7eb);--x-fieldset-input-border:var(--x-color-border,#374151);--x-fieldset-input-focus:var(--x-color-focus-ring,#93c5fd);}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
5
+ d.setAttribute("part","root");d.setAttribute("role","group");e.setAttribute("part","legend");e.setAttribute("id","x-fieldset-legend");g.setAttribute("part","content");g.appendChild(h);d.appendChild(e);d.appendChild(g);b.appendChild(c);b.appendChild(d);$APP.n(document.getElementById("x-fieldset-input-styles"))||(c=document.createElement("style"),c.setAttribute("id","x-fieldset-input-styles"),c.textContent="x-fieldset input,x-fieldset select,x-fieldset textarea{background:var(--x-fieldset-input-bg);color:var(--x-fieldset-input-color);border:1px solid var(--x-fieldset-input-border);border-radius:var(--x-fieldset-input-radius);padding:0.5rem 0.75rem;font:inherit;outline:none;box-sizing:border-box;}x-fieldset input:focus,x-fieldset select:focus,x-fieldset textarea:focus{border-color:var(--x-fieldset-input-focus);box-shadow:0 0 0 2px var(--x-fieldset-input-focus);}",
6
+ document.head.appendChild(c));a.__xFieldsetRefs={root:b,"root-el":d,"legend-el":e,"content-el":g}}return AI(a)},CI=function(){return null},DI=function(a){return AI(a)},EI=function(a){$APP.Ug(a,"legend","legend");return $APP.Sg(a,"disabled","disabled")},GI=function(){return $APP.Lg("x-fieldset",new $APP.Q(null,5,[$APP.Cg,FI,$APP.Dg,BI,$APP.Eg,CI,$APP.Fg,DI,$APP.Jg,EI],null))},zI=new $APP.K(null,"legend-visible?","legend-visible?",-281107501),xI=new $APP.K(null,"legend-raw","legend-raw",907427195),
7
+ yI=new $APP.K(null,"legend","legend",-1027192245);var FI=["legend","disabled","aria-label","aria-describedby"];$APP.ha("baredom.exports.x_fieldset.init",GI);export const init=GI;
@@ -1,9 +1,8 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Lz=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Pz=function(a){a=new $APP.Q(null,4,[Mz,a.getAttribute("href"),Nz,a.getAttribute("filename"),$APP.Ol,a.hasAttribute("disabled"),$APP.Uj,a.getAttribute("aria-label")],null);var b=$APP.M(a);a=$APP.D(b,Mz);var c=$APP.D(b,Nz),d=$APP.D(b,$APP.Ol);b=$APP.D(b,$APP.Uj);return new $APP.Q(null,4,[$APP.an,$APP.Og(a),Oz,$APP.n(c)?c:"",$APP.X,$APP.F(d),$APP.Ql,b],null)},Qz=function(a){var b=$APP.k(a,"__xFileDownloadRefs");if($APP.n(b)){b=
3
- $APP.k(b,"anchor-el");var c=Pz(a),d=$APP.an.g(c),e=Oz.g(c),g=$APP.X.g(c);c=$APP.Ql.g(c);b.href=d;typeof e==="string"&&$APP.N(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return Lz(a,"data-disabled",g)}return null},Rz=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
- var c=Pz(a);c={href:$APP.an.g(c),filename:Oz.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},Sz=function(a){var b=$APP.k(a,"__xFileDownloadHandlers"),c=$APP.k(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"anchor-el"),b=$APP.k(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},Tz=function(a,b,c){Object.defineProperty(a,
5
- b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Uz=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Lz(this,"disabled",$APP.F(b))}})},Wz=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",
6
- {get:function(){return Vz}});Tz(b,"href","href");Tz(b,"filename","filename");Uz(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFileDownloadRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("a"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:var(--x-color-primary,#2563eb);--x-file-download-color:var(--x-color-surface,#ffffff);--x-file-download-hover-bg:var(--x-color-primary-hover,#1d4ed8);--x-file-download-active-bg:var(--x-color-primary-active,#1e40af);--x-file-download-border-radius:var(--x-radius-md,6px);--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:var(--x-font-size-sm,0.875rem);--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background var(--x-transition-duration,120ms) ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:var(--x-color-primary,#3b82f6);--x-file-download-hover-bg:var(--x-color-primary-hover,#2563eb);--x-file-download-active-bg:var(--x-color-primary-active,#1d4ed8);--x-file-download-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
7
- e.setAttribute("part","anchor");g.setAttribute("part","icon");h.setAttribute("part","content");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
8
- h.appendChild(l);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}Sz(this);c=Rz(this);$APP.k($APP.k(this,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",c);this.__xFileDownloadHandlers={click:c};return Qz(this)};b.disconnectedCallback=function(){return Sz(this)};b.attributeChangedCallback=function(){return Qz(this)};return a},Xz=function(){return $APP.n(customElements.get("x-file-download"))?null:customElements.define("x-file-download",
9
- Wz())},Nz=new $APP.K(null,"filename-raw","filename-raw",-706184256),Mz=new $APP.K(null,"href-raw","href-raw",-1680949453),Oz=new $APP.K(null,"filename","filename",-1428840783);var Vz=["href","filename","disabled","aria-label"];$APP.Pd(["x-file-download-click",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,2,[$APP.an,$APP.Y,Oz,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_file_download.init",Xz);export const init=Xz;
2
+ var CA=function(a){a=new $APP.Q(null,4,[zA,a.getAttribute("href"),AA,a.getAttribute("filename"),$APP.fm,a.hasAttribute("disabled"),$APP.pk,a.getAttribute("aria-label")],null);var b=$APP.M(a);a=$APP.D(b,zA);var c=$APP.D(b,AA),d=$APP.D(b,$APP.fm);b=$APP.D(b,$APP.pk);return new $APP.Q(null,4,[$APP.tn,$APP.eh(a),BA,$APP.n(c)?c:"",$APP.X,$APP.F(d),$APP.hm,b],null)},DA=function(a){var b=$APP.k(a,"__xFileDownloadRefs");if($APP.n(b)){b=$APP.k(b,"anchor-el");var c=CA(a),d=$APP.tn.g(c),e=BA.g(c),g=$APP.X.g(c);
3
+ c=$APP.hm.g(c);b.href=d;typeof e==="string"&&$APP.N(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return $APP.Pg(a,"data-disabled",g)}return null},EA=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
+ var c=CA(a);c={href:$APP.tn.g(c),filename:BA.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},FA=function(a){var b=$APP.k(a,"__xFileDownloadHandlers"),c=$APP.k(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"anchor-el"),b=$APP.k(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},GA=function(a){if(!$APP.n($APP.k(a,"__xFileDownloadRefs"))){var b=
5
+ a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("a"),e=document.createElement("span"),g=document.createElement("span"),h=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:var(--x-color-primary,#2563eb);--x-file-download-color:var(--x-color-surface,#ffffff);--x-file-download-hover-bg:var(--x-color-primary-hover,#1d4ed8);--x-file-download-active-bg:var(--x-color-primary-active,#1e40af);--x-file-download-border-radius:var(--x-radius-md,6px);--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:var(--x-font-size-sm,0.875rem);--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background var(--x-transition-duration,120ms) ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:var(--x-color-primary,#3b82f6);--x-file-download-hover-bg:var(--x-color-primary-hover,#2563eb);--x-file-download-active-bg:var(--x-color-primary-active,#1d4ed8);--x-file-download-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
6
+ d.setAttribute("part","anchor");e.setAttribute("part","icon");g.setAttribute("part","content");e.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
7
+ g.appendChild(h);d.appendChild(e);d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__xFileDownloadRefs={"anchor-el":d,"icon-el":e,"content-el":g}}FA(a);b=EA(a);$APP.k($APP.k(a,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",b);a.__xFileDownloadHandlers={click:b};return DA(a)},HA=function(a){return FA(a)},IA=function(a){return DA(a)},JA=function(a){$APP.Tg(a,"href","href","");$APP.Tg(a,"filename","filename","");return $APP.Sg(a,"disabled","disabled")},LA=function(){return $APP.Lg("x-file-download",
8
+ new $APP.Q(null,5,[$APP.Cg,KA,$APP.Dg,GA,$APP.Eg,HA,$APP.Fg,IA,$APP.Jg,JA],null))},AA=new $APP.K(null,"filename-raw","filename-raw",-706184256),zA=new $APP.K(null,"href-raw","href-raw",-1680949453),BA=new $APP.K(null,"filename","filename",-1428840783);var KA=["href","filename","disabled","aria-label"];$APP.Pd(["x-file-download-click",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,2,[$APP.tn,$APP.Y,BA,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_file_download.init",LA);export const init=LA;
@@ -1,26 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Iv=function(a){return a!=null?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:null):null},Jv=function(a){var b=a.lastIndexOf(".");return b>0?a.substring(b).toLowerCase():null},Kv=function(a,b){if(b==null||$APP.B.i(b,""))return!0;var c=function(){var e=a.type;return $APP.n(e)?e:""}().toLowerCase(),d=Jv(a.name);b=$APP.ae.i($APP.Jg,$APP.Hg(b,/,/));return $APP.F($APP.Td(function(e){e=e.toLowerCase();return $APP.n(e.startsWith("."))?$APP.B.i(e,d):$APP.n(e.endsWith("/*"))?(e=e.substring(0,e.indexOf("/")),
3
- c.startsWith(""+$APP.T.g(e)+"/")):$APP.B.i(e,c)},b))},bw=function(a,b,c,d,e){a=$APP.t(a);for(var g=$APP.fe,h=$APP.fe;;){if($APP.r(a))return new $APP.Q(null,2,[Zv,g,$v,h],null);var l=$APP.u(a);var m=l;var p=b,q=c;m=$APP.Lg(p)&&!Kv(m,p)?new $APP.Q(null,2,[$APP.Th,!1,$APP.Qi,"File type not accepted"],null):q!=null&&m.size>q?new $APP.Q(null,2,[$APP.Th,!1,$APP.Qi,"File too large"],null):new $APP.Q(null,2,[$APP.Th,!0,$APP.Qi,null],null);$APP.r($APP.Th.g(m))?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,
4
- [aw,l,$APP.Qi,$APP.Qi.g(m)],null))):d!=null&&e>=d?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,[aw,l,$APP.Qi,"Maximum files reached"],null))):(a=$APP.w(a),g=$APP.ld.i(g,l),e+=1)}},cw=function(a){return document.createElement(a)},lw=function(a){a=new $APP.Q(null,7,[dw,a.getAttribute("accept"),ew,a.hasAttribute("multiple"),fw,a.getAttribute("max-size"),gw,a.getAttribute("max-files"),$APP.Ol,a.hasAttribute("disabled"),$APP.Nh,a.hasAttribute("required"),$APP.Al,a.getAttribute("name")],null);var b=$APP.M(a);
5
- a=$APP.D(b,dw);var c=$APP.D(b,ew),d=$APP.D(b,fw),e=$APP.D(b,gw),g=$APP.D(b,$APP.Ol),h=$APP.D(b,$APP.Nh);b=$APP.D(b,$APP.Al);return new $APP.Q(null,7,[hw,$APP.n(a)?a:"",iw,$APP.F(c),jw,Iv(d),kw,Iv(e),$APP.X,$APP.F(g),$APP.mi,$APP.F(h),$APP.Aj,$APP.n(b)?b:""],null)},mw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){a=lw(a);var c=$APP.M(a);a=$APP.D(c,hw);var d=$APP.D(c,iw);c=$APP.D(c,$APP.X);var e=$APP.k(b,"fileInput");b=$APP.k(b,"dropZone");$APP.B.i(a,"")?e.removeAttribute("accept"):
6
- e.setAttribute("accept",a);$APP.n(d)?e.setAttribute("multiple",""):e.removeAttribute("multiple");b.setAttribute("tabindex",$APP.n(c)?"-1":"0");a=""+$APP.T.g(c);return b.setAttribute("aria-disabled",a)}return null},nw=function(a){a=$APP.t($APP.uc(a.querySelectorAll("[part\x3dthumbnail]")));for(var b=null,c=0,d=0;;)if(d<c){var e=b.F(null,d);URL.revokeObjectURL(e.src);d+=1}else if(a=$APP.t(a))b=a,$APP.Nc(b)?(a=$APP.yb(b),c=$APP.zb(b),b=a,e=$APP.z(a),a=c,c=e):(e=$APP.u(b),URL.revokeObjectURL(e.src),a=
7
- $APP.w(b),b=null,c=0),d=0;else return null},ow=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){var c=$APP.k(b,"fileList");b=$APP.k(b,"liveRegion");a=$APP.k(a,"__xFileUploadFiles");var d=a.length;nw(c);c.textContent="";for(var e=0;;)if(e<d){var g=a[e],h=cw("div"),l=cw("span"),m=cw("span"),p=cw("button"),q=g.name;h.setAttribute("part","file-item");h.setAttribute("role","listitem");var v=g.type,x=typeof v==="string";$APP.n(x?v.startsWith("image/"):x)&&(v=cw("img"),v.setAttribute("part",
8
- "thumbnail"),v.src=URL.createObjectURL(g),v.setAttribute("alt",q),h.appendChild(v));l.setAttribute("part","file-name");l.textContent=q;m.setAttribute("part","file-size");v=m;g=g.size;g=g<1024?""+$APP.T.g(g)+" B":g<1048576?""+$APP.T.g((g/1024).toFixed(1))+" KB":g<1073741824?""+$APP.T.g((g/1048576).toFixed(1))+" MB":""+$APP.T.g((g/1073741824).toFixed(1))+" GB";v.textContent=g;p.setAttribute("part","remove");p.setAttribute("type","button");g=p;q="Remove "+$APP.T.g(q);g.setAttribute("aria-label",q);q=
9
- p;g=""+$APP.T.g(e);q.setAttribute("data-index",g);p.textContent="×";h.appendChild(l);h.appendChild(m);h.appendChild(p);c.appendChild(h);e+=1}else break;b.textContent=d===0?"":""+$APP.T.g(d)+" file"+$APP.T.g($APP.N(d,1)?"s":null)+" selected"}},pw=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadFiles");a=a.getAttribute("name");a=$APP.n(a)?a:"file";if(c.length===0)b.setFormValue(null);else{for(var d=new FormData,e=c.length,g=0;;)if(g<e)d.append(a,c[g]),
10
- g+=1;else break;b.setFormValue(d)}}},qw=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadRefs");if($APP.n(c)){var d=a.hasAttribute("required");a=$APP.k(a,"__xFileUploadFiles");c=$APP.k(c,"dropZone");return $APP.n($APP.n(d)?a.length===0:d)?b.setValidity({valueMissing:!0},"Please select a file.",c):b.setValidity({},"")}}return null},rw=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},sw=function(a,
11
- b){var c=lw(a);c=$APP.M(c);var d=$APP.D(c,hw),e=$APP.D(c,iw),g=$APP.D(c,jw),h=$APP.D(c,kw);c=$APP.k(a,"__xFileUploadFiles");b=bw($APP.uc(b),d,g,h,c.length);d=$APP.M(b);b=$APP.D(d,Zv);d=$APP.D(d,$v);if($APP.n(e)){e=$APP.t(b);g=null;for(var l=h=0;;)if(l<h){var m=g.F(null,l);c.push(m);l+=1}else if(e=$APP.t(e))g=e,$APP.Nc(g)?(e=$APP.yb(g),l=$APP.zb(g),g=e,h=$APP.z(e),e=l):(e=$APP.u(g),c.push(e),e=$APP.w(g),g=null,h=0),l=0;else break}else c.length=0,$APP.t(b)&&c.push($APP.u(b));ow(a);pw(a);qw(a);return rw(a,
12
- "x-file-upload-select",{files:$APP.zd(b),rejected:$APP.zd($APP.ae.i(function(p){var q=$APP.M(p);p=$APP.D(q,aw);q=$APP.D(q,$APP.Qi);return{file:p,reason:q}},d))})},tw=function(a){return{zoneClick:function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.k(a,"__xFileUploadRefs");return $APP.n(b)?$APP.k(b,"fileInput").click():null},zoneKeydown:function(b){return($APP.B.i(b.key,"Enter")||$APP.B.i(b.key," "))&&$APP.r(a.hasAttribute("disabled"))?(b.preventDefault(),b=$APP.k(a,"__xFileUploadRefs"),
13
- $APP.n(b)?$APP.k(b,"fileInput").click():null):null},fileChange:function(b){b=b.target;var c=b.files;c.length>0&&sw(a,c);return b.value=""},dragenter:function(b){b.preventDefault();if($APP.n(a.hasAttribute("disabled")))return null;b=$APP.k(a,"__xFileUploadDragCtr")+1;a.__xFileUploadDragCtr=b;return $APP.B.i(b,1)?a.setAttribute("data-drag-over",""):null},dragover:function(b){b.preventDefault();return b.dataTransfer.dropEffect="copy"},dragleave:function(){var b=$APP.k(a,"__xFileUploadDragCtr")-1;a.__xFileUploadDragCtr=
14
- b;return b<=0?(a.__xFileUploadDragCtr=0,a.removeAttribute("data-drag-over")):null},drop:function(b){b.preventDefault();a.__xFileUploadDragCtr=0;a.removeAttribute("data-drag-over");if($APP.n(a.hasAttribute("disabled")))return null;b=b.dataTransfer.files;return b.length>0?sw(a,b):null},fileListClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-index"))?b:b.closest("[data-index]");if($APP.n(b)){b=parseInt(b.getAttribute("data-index"),10);if($APP.n(isNaN(b)))b=null;else{var c=$APP.k(a,"__xFileUploadFiles"),
15
- d=c[b];c.splice(b,1);ow(a);pw(a);qw(a);b=rw(a,"x-file-upload-remove",{file:d,remaining:c.slice()})}return b}return null}}},uw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)&&(a=$APP.k(a,"__xFileUploadHandlers"),$APP.n(a))){var c=$APP.k(b,"dropZone"),d=$APP.k(b,"fileInput");b=$APP.k(b,"fileList");c.removeEventListener("click",$APP.k(a,"zoneClick"));c.removeEventListener("keydown",$APP.k(a,"zoneKeydown"));c.removeEventListener("dragenter",$APP.k(a,"dragenter"));c.removeEventListener("dragover",
16
- $APP.k(a,"dragover"));c.removeEventListener("dragleave",$APP.k(a,"dragleave"));c.removeEventListener("drop",$APP.k(a,"drop"));d.removeEventListener("change",$APP.k(a,"fileChange"));b.removeEventListener("click",$APP.k(a,"fileListClick"))}},vw=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.Eg(this,c,$APP.F(d))}})},ww=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=
17
- this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},xw=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return d!=null?(d=parseInt(d,10),$APP.n(isNaN(d))?null:d):null},set:function(d){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},zw=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=
18
- !0;Object.defineProperty(a,"observedAttributes",{get:function(){return yw}});ww(b,"accept","accept");ww(b,"name","name");vw(b,"multiple","multiple");vw(b,"disabled","disabled");vw(b,"required","required");xw(b,"maxSize","max-size");xw(b,"maxFiles","max-files");Object.defineProperty(b,"files",{configurable:!0,enumerable:!0,get:function(){var c=$APP.k(this,"__xFileUploadFiles");return($APP.n(c)?c:[]).slice()}});b.checkValidity=function(){var c=$APP.k(this,"__xFileUploadInternals");return $APP.n(c)?
19
- c.checkValidity():null};b.reportValidity=function(){var c=$APP.k(this,"__xFileUploadInternals");return $APP.n(c)?c.reportValidity():null};b.formDisabledCallback=function(c){$APP.Eg(this,"disabled",c);return mw(this)};b.formResetCallback=function(){$APP.k(this,"__xFileUploadFiles").length=0;var c=$APP.k(this,"__xFileUploadRefs");$APP.n(c)&&nw($APP.k(c,"fileList"));ow(this);pw(this);return qw(this)};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFileUploadRefs"))){var c=this.attachShadow({mode:"open"}),
20
- d=cw("style"),e=cw("div"),g=cw("input"),h=cw("div"),l=cw("slot"),m=cw("div"),p=cw("div"),q=cw("div");d.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-file-upload-bg:var(--x-color-surface,#ffffff);--x-file-upload-fg:var(--x-color-text,#0f172a);--x-file-upload-muted:var(--x-color-text-muted,#64748b);--x-file-upload-border:2px dashed var(--x-color-border,#cbd5e1);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#3b82f6);--x-file-upload-drag-bg:var(--x-color-primary,rgba(59,130,246,0.05));--x-file-upload-radius:var(--x-radius-md,8px);--x-file-upload-padding:var(--x-space-lg,24px);--x-file-upload-font-size:var(--x-font-size-sm,0.9375rem);--x-file-upload-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-upload-disabled-opacity:var(--x-opacity-disabled,0.55);--x-file-upload-transition-duration:var(--x-transition-duration,150ms);--x-file-upload-item-bg:var(--x-color-surface,#f8fafc);--x-file-upload-item-border:1px solid var(--x-color-border,#e2e8f0);--x-file-upload-thumb-size:48px;--x-file-upload-remove-color:var(--x-color-text-muted,#64748b);--x-file-upload-remove-hover:var(--x-color-danger,#ef4444);}@media (prefers-color-scheme:dark){:host{--x-file-upload-bg:var(--x-color-surface,#1e293b);--x-file-upload-fg:var(--x-color-text,#e2e8f0);--x-file-upload-muted:var(--x-color-text-muted,#94a3b8);--x-file-upload-border:2px dashed var(--x-color-border,#334155);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#60a5fa);--x-file-upload-drag-bg:rgba(96,165,250,0.08);--x-file-upload-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-file-upload-item-bg:var(--x-color-surface,#1e293b);--x-file-upload-item-border:1px solid var(--x-color-border,#334155);--x-file-upload-remove-color:var(--x-color-text-muted,#94a3b8);}}[part\x3ddrop-zone]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;padding:var(--x-file-upload-padding);background:var(--x-file-upload-bg);border:var(--x-file-upload-border);border-radius:var(--x-file-upload-radius);cursor:pointer;text-align:center;color:var(--x-file-upload-muted);font-size:var(--x-file-upload-font-size);font-family:inherit;transition:border-color var(--x-file-upload-transition-duration) ease,background var(--x-file-upload-transition-duration) ease;}[part\x3ddrop-zone]:hover{border:var(--x-file-upload-border-hover);}[part\x3ddrop-zone]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}:host([data-drag-over]) [part\x3ddrop-zone]{border:var(--x-file-upload-border-hover);background:var(--x-file-upload-drag-bg);}:host([data-drag-over]) [part\x3dcontent]{visibility:hidden;}:host([data-drag-over]) [part\x3ddrag-overlay]{display:flex;}[part\x3ddrag-overlay]{display:none;position:absolute;inset:0;align-items:center;justify-content:center;border-radius:var(--x-file-upload-radius);font-weight:600;color:var(--x-color-primary,#3b82f6);pointer-events:none;}:host([disabled]){pointer-events:none;cursor:default;}:host([disabled]) [part\x3ddrop-zone]{opacity:var(--x-file-upload-disabled-opacity);}[part\x3dfile-list]{display:flex;flex-direction:column;gap:8px;margin-top:12px;}[part\x3dfile-list]:empty{display:none;}[part\x3dfile-item]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--x-file-upload-item-bg);border:var(--x-file-upload-item-border);border-radius:6px;font-size:var(--x-file-upload-font-size);font-family:inherit;color:var(--x-file-upload-fg);}[part\x3dthumbnail]{width:var(--x-file-upload-thumb-size);height:var(--x-file-upload-thumb-size);object-fit:cover;border-radius:4px;flex-shrink:0;}[part\x3dfile-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dfile-size]{color:var(--x-file-upload-muted);font-size:0.8125rem;flex-shrink:0;}[part\x3dremove]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1rem;color:var(--x-file-upload-remove-color);cursor:pointer;border-radius:4px;flex-shrink:0;}[part\x3dremove]:hover{color:var(--x-file-upload-remove-hover);}[part\x3dremove]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}[part\x3dlive-region]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}input[type\x3dfile]{display:none;}@media (prefers-reduced-motion:reduce){[part\x3ddrop-zone]{transition:none !important;}}@media (pointer:coarse){[part\x3ddrop-zone]{min-height:140px;}[part\x3dremove]{width:2.75rem;height:2.75rem;}}";
21
- e.setAttribute("part","drop-zone");e.setAttribute("role","button");e.setAttribute("tabindex","0");g.setAttribute("type","file");g.setAttribute("aria-hidden","true");g.setAttribute("tabindex","-1");h.setAttribute("part","content");h.appendChild(l);m.setAttribute("part","drag-overlay");m.setAttribute("hidden","");m.textContent="Drop files here";p.setAttribute("part","file-list");p.setAttribute("role","list");q.setAttribute("part","live-region");q.setAttribute("aria-live","polite");q.setAttribute("aria-atomic",
22
- "true");e.appendChild(g);e.appendChild(h);e.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(p);c.appendChild(q);this.__xFileUploadFiles=[];this.__xFileUploadDragCtr=0;this.__xFileUploadRefs={dropZone:e,fileInput:g,content:h,dragOverlay:m,fileList:p,liveRegion:q}}c=this.attachInternals;$APP.n($APP.n(c)?$APP.r($APP.k(this,"__xFileUploadInternals")):c)&&(this.__xFileUploadInternals=this.attachInternals());uw(this);this.__xFileUploadHandlers=tw(this);g=$APP.k(this,"__xFileUploadRefs");
23
- $APP.n(g)&&(c=$APP.k(this,"__xFileUploadHandlers"),$APP.n(c)&&(d=$APP.k(g,"dropZone"),e=$APP.k(g,"fileInput"),g=$APP.k(g,"fileList"),d.addEventListener("click",$APP.k(c,"zoneClick")),d.addEventListener("keydown",$APP.k(c,"zoneKeydown")),d.addEventListener("dragenter",$APP.k(c,"dragenter")),d.addEventListener("dragover",$APP.k(c,"dragover")),d.addEventListener("dragleave",$APP.k(c,"dragleave")),d.addEventListener("drop",$APP.k(c,"drop")),e.addEventListener("change",$APP.k(c,"fileChange")),g.addEventListener("click",
24
- $APP.k(c,"fileListClick"))));mw(this);return qw(this)};b.disconnectedCallback=function(){uw(this);var c=$APP.k(this,"__xFileUploadRefs");return $APP.n(c)?nw($APP.k(c,"fileList")):null};b.attributeChangedCallback=function(){return $APP.n($APP.k(this,"__xFileUploadRefs"))?mw(this):null};return a},Aw=function(){return $APP.n(customElements.get("x-file-upload"))?null:customElements.define("x-file-upload",zw())},hw=new $APP.K(null,"accept","accept",1874130431),$v=new $APP.K(null,"rejected","rejected",
25
- 231052999),Zv=new $APP.K(null,"accepted","accepted",-1953464374),fw=new $APP.K(null,"max-size-raw","max-size-raw",1536077032),jw=new $APP.K(null,"max-size","max-size",-874966132),iw=new $APP.K(null,"multiple?","multiple?",-490002283),dw=new $APP.K(null,"accept-raw","accept-raw",1407413888),kw=new $APP.K(null,"max-files","max-files",534742526),ew=new $APP.K(null,"multiple-present?","multiple-present?",-1754894397),aw=new $APP.K(null,"file","file",-1269645878),gw=new $APP.K(null,"max-files-raw","max-files-raw",
26
- -244409320);var yw="accept multiple max-size max-files disabled required name".split(" ");$APP.Pd(["x-file-upload-select",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[new $APP.K(null,"files","files",-472457450),$APP.Si,$v,$APP.Si],null)],null),"x-file-upload-remove",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[aw,$APP.jl,new $APP.K(null,"remaining","remaining",-138926777),$APP.Si],null)],null)]);$APP.ha("baredom.exports.x_file_upload.init",Aw);export const init=Aw;
2
+ var Cw=function(a){return a!=null?(a=parseInt(a,10),$APP.q(isNaN(a))&&a>0?a:null):null},Dw=function(a){var b=a.lastIndexOf(".");return b>0?a.substring(b).toLowerCase():null},Ew=function(a,b){if(b==null||$APP.B.i(b,""))return!0;var c=function(){var e=a.type;return $APP.n(e)?e:""}().toLowerCase(),d=Dw(a.name);b=$APP.$d.i($APP.$g,$APP.Yg(b,/,/));return $APP.F($APP.Td(function(e){e=e.toLowerCase();return $APP.n(e.startsWith("."))?$APP.B.i(e,d):$APP.n(e.endsWith("/*"))?(e=e.substring(0,e.indexOf("/")),
3
+ c.startsWith(""+$APP.S.g(e)+"/")):$APP.B.i(e,c)},b))},Iw=function(a,b,c,d,e){a=$APP.t(a);for(var g=$APP.ee,h=$APP.ee;;){if($APP.q(a))return new $APP.Q(null,2,[Fw,g,Gw,h],null);var l=$APP.u(a);var m=l;var p=b,r=c;m=$APP.bh(p)&&!Ew(m,p)?new $APP.Q(null,2,[$APP.oi,!1,$APP.hj,"File type not accepted"],null):r!=null&&m.size>r?new $APP.Q(null,2,[$APP.oi,!1,$APP.hj,"File too large"],null):new $APP.Q(null,2,[$APP.oi,!0,$APP.hj,null],null);$APP.q($APP.oi.g(m))?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,
4
+ [Hw,l,$APP.hj,$APP.hj.g(m)],null))):d!=null&&e>=d?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,[Hw,l,$APP.hj,"Maximum files reached"],null))):(a=$APP.w(a),g=$APP.ld.i(g,l),e+=1)}},Jw=function(a){return document.createElement(a)},Sw=function(a){a=new $APP.Q(null,7,[Kw,a.getAttribute("accept"),Lw,a.hasAttribute("multiple"),Mw,a.getAttribute("max-size"),Nw,a.getAttribute("max-files"),$APP.fm,a.hasAttribute("disabled"),$APP.ei,a.hasAttribute("required"),$APP.Sl,a.getAttribute("name")],null);var b=$APP.M(a);
5
+ a=$APP.D(b,Kw);var c=$APP.D(b,Lw),d=$APP.D(b,Mw),e=$APP.D(b,Nw),g=$APP.D(b,$APP.fm),h=$APP.D(b,$APP.ei);b=$APP.D(b,$APP.Sl);return new $APP.Q(null,7,[Ow,$APP.n(a)?a:"",Pw,$APP.F(c),Qw,Cw(d),Rw,Cw(e),$APP.X,$APP.F(g),$APP.Ei,$APP.F(h),$APP.Sj,$APP.n(b)?b:""],null)},Tw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){a=Sw(a);var c=$APP.M(a);a=$APP.D(c,Ow);var d=$APP.D(c,Pw);c=$APP.D(c,$APP.X);var e=$APP.k(b,"fileInput");b=$APP.k(b,"dropZone");$APP.B.i(a,"")?e.removeAttribute("accept"):
6
+ e.setAttribute("accept",a);$APP.n(d)?e.setAttribute("multiple",""):e.removeAttribute("multiple");b.setAttribute("tabindex",$APP.n(c)?"-1":"0");return $APP.Og(b,"aria-disabled",""+$APP.S.g(c))}return null},Uw=function(a){a=$APP.t($APP.uc(a.querySelectorAll("[part\x3dthumbnail]")));for(var b=null,c=0,d=0;;)if(d<c){var e=b.F(null,d);URL.revokeObjectURL(e.src);d+=1}else if(a=$APP.t(a))b=a,$APP.Nc(b)?(a=$APP.xb(b),c=$APP.yb(b),b=a,e=$APP.z(a),a=c,c=e):(e=$APP.u(b),URL.revokeObjectURL(e.src),a=$APP.w(b),
7
+ b=null,c=0),d=0;else return null},Vw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){var c=$APP.k(b,"fileList");b=$APP.k(b,"liveRegion");a=$APP.k(a,"__xFileUploadFiles");var d=a.length;Uw(c);c.textContent="";for(var e=0;;)if(e<d){var g=a[e],h=Jw("div"),l=Jw("span"),m=Jw("span"),p=Jw("button"),r=g.name;h.setAttribute("part","file-item");h.setAttribute("role","listitem");var v=g.type,x=typeof v==="string";$APP.n(x?v.startsWith("image/"):x)&&(v=Jw("img"),v.setAttribute("part","thumbnail"),
8
+ v.src=URL.createObjectURL(g),v.setAttribute("alt",r),h.appendChild(v));l.setAttribute("part","file-name");l.textContent=r;m.setAttribute("part","file-size");v=m;g=g.size;g=g<1024?""+$APP.S.g(g)+" B":g<1048576?""+$APP.S.g((g/1024).toFixed(1))+" KB":g<1073741824?""+$APP.S.g((g/1048576).toFixed(1))+" MB":""+$APP.S.g((g/1073741824).toFixed(1))+" GB";v.textContent=g;p.setAttribute("part","remove");p.setAttribute("type","button");$APP.Og(p,"aria-label","Remove "+$APP.S.g(r));$APP.Og(p,"data-index",""+$APP.S.g(e));
9
+ p.textContent="×";h.appendChild(l);h.appendChild(m);h.appendChild(p);c.appendChild(h);e+=1}else break;b.textContent=d===0?"":""+$APP.S.g(d)+" file"+$APP.S.g($APP.N(d,1)?"s":null)+" selected"}},Ww=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadFiles");a=a.getAttribute("name");a=$APP.n(a)?a:"file";if(c.length===0)b.setFormValue(null);else{for(var d=new FormData,e=c.length,g=0;;)if(g<e)d.append(a,c[g]),g+=1;else break;b.setFormValue(d)}}},Xw=function(a){var b=
10
+ $APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadRefs");if($APP.n(c)){var d=a.hasAttribute("required");a=$APP.k(a,"__xFileUploadFiles");c=$APP.k(c,"dropZone");return $APP.n($APP.n(d)?a.length===0:d)?b.setValidity({valueMissing:!0},"Please select a file.",c):b.setValidity({},"")}}return null},Yw=function(a,b){var c=Sw(a);c=$APP.M(c);var d=$APP.D(c,Ow),e=$APP.D(c,Pw),g=$APP.D(c,Qw),h=$APP.D(c,Rw);c=$APP.k(a,"__xFileUploadFiles");b=Iw($APP.uc(b),d,g,h,c.length);d=$APP.M(b);
11
+ b=$APP.D(d,Fw);d=$APP.D(d,Gw);if($APP.n(e)){e=$APP.t(b);g=null;for(var l=h=0;;)if(l<h){var m=g.F(null,l);c.push(m);l+=1}else if(e=$APP.t(e))g=e,$APP.Nc(g)?(e=$APP.xb(g),l=$APP.yb(g),g=e,h=$APP.z(e),e=l):(e=$APP.u(g),c.push(e),e=$APP.w(g),g=null,h=0),l=0;else break}else c.length=0,$APP.t(b)&&c.push($APP.u(b));Vw(a);Ww(a);Xw(a);return $APP.Qg(a,"x-file-upload-select",{files:$APP.zd(b),rejected:$APP.zd($APP.$d.i(function(p){var r=$APP.M(p);p=$APP.D(r,Hw);r=$APP.D(r,$APP.hj);return{file:p,reason:r}},
12
+ d))})},Zw=function(a){return{zoneClick:function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.k(a,"__xFileUploadRefs");return $APP.n(b)?$APP.k(b,"fileInput").click():null},zoneKeydown:function(b){return($APP.B.i(b.key,"Enter")||$APP.B.i(b.key," "))&&$APP.q(a.hasAttribute("disabled"))?(b.preventDefault(),b=$APP.k(a,"__xFileUploadRefs"),$APP.n(b)?$APP.k(b,"fileInput").click():null):null},fileChange:function(b){b=b.target;var c=b.files;c.length>0&&Yw(a,c);return b.value=""},dragenter:function(b){b.preventDefault();
13
+ if($APP.n(a.hasAttribute("disabled")))return null;b=$APP.k(a,"__xFileUploadDragCtr")+1;a.__xFileUploadDragCtr=b;return $APP.B.i(b,1)?a.setAttribute("data-drag-over",""):null},dragover:function(b){b.preventDefault();return b.dataTransfer.dropEffect="copy"},dragleave:function(){var b=$APP.k(a,"__xFileUploadDragCtr")-1;a.__xFileUploadDragCtr=b;return b<=0?(a.__xFileUploadDragCtr=0,a.removeAttribute("data-drag-over")):null},drop:function(b){b.preventDefault();a.__xFileUploadDragCtr=0;a.removeAttribute("data-drag-over");
14
+ if($APP.n(a.hasAttribute("disabled")))return null;b=b.dataTransfer.files;return b.length>0?Yw(a,b):null},fileListClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-index"))?b:b.closest("[data-index]");if($APP.n(b)){b=parseInt(b.getAttribute("data-index"),10);if($APP.n(isNaN(b)))b=null;else{var c=$APP.k(a,"__xFileUploadFiles"),d=c[b];c.splice(b,1);Vw(a);Ww(a);Xw(a);b=$APP.Qg(a,"x-file-upload-remove",{file:d,remaining:c.slice()})}return b}return null}}},$w=function(a){var b=$APP.k(a,"__xFileUploadRefs");
15
+ if($APP.n(b)&&(a=$APP.k(a,"__xFileUploadHandlers"),$APP.n(a))){var c=$APP.k(b,"dropZone"),d=$APP.k(b,"fileInput");b=$APP.k(b,"fileList");c.removeEventListener("click",$APP.k(a,"zoneClick"));c.removeEventListener("keydown",$APP.k(a,"zoneKeydown"));c.removeEventListener("dragenter",$APP.k(a,"dragenter"));c.removeEventListener("dragover",$APP.k(a,"dragover"));c.removeEventListener("dragleave",$APP.k(a,"dragleave"));c.removeEventListener("drop",$APP.k(a,"drop"));d.removeEventListener("change",$APP.k(a,
16
+ "fileChange"));b.removeEventListener("click",$APP.k(a,"fileListClick"))}},ax=function(a){if(!$APP.n($APP.k(a,"__xFileUploadRefs"))){var b=a.attachShadow({mode:"open"}),c=Jw("style"),d=Jw("div"),e=Jw("input"),g=Jw("div"),h=Jw("slot"),l=Jw("div"),m=Jw("div"),p=Jw("div");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-file-upload-bg:var(--x-color-surface,#ffffff);--x-file-upload-fg:var(--x-color-text,#0f172a);--x-file-upload-muted:var(--x-color-text-muted,#64748b);--x-file-upload-border:2px dashed var(--x-color-border,#cbd5e1);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#3b82f6);--x-file-upload-drag-bg:var(--x-color-primary,rgba(59,130,246,0.05));--x-file-upload-radius:var(--x-radius-md,8px);--x-file-upload-padding:var(--x-space-lg,24px);--x-file-upload-font-size:var(--x-font-size-sm,0.9375rem);--x-file-upload-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-upload-disabled-opacity:var(--x-opacity-disabled,0.55);--x-file-upload-transition-duration:var(--x-transition-duration,150ms);--x-file-upload-item-bg:var(--x-color-surface,#f8fafc);--x-file-upload-item-border:1px solid var(--x-color-border,#e2e8f0);--x-file-upload-thumb-size:48px;--x-file-upload-remove-color:var(--x-color-text-muted,#64748b);--x-file-upload-remove-hover:var(--x-color-danger,#ef4444);}@media (prefers-color-scheme:dark){:host{--x-file-upload-bg:var(--x-color-surface,#1e293b);--x-file-upload-fg:var(--x-color-text,#e2e8f0);--x-file-upload-muted:var(--x-color-text-muted,#94a3b8);--x-file-upload-border:2px dashed var(--x-color-border,#334155);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#60a5fa);--x-file-upload-drag-bg:rgba(96,165,250,0.08);--x-file-upload-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-file-upload-item-bg:var(--x-color-surface,#1e293b);--x-file-upload-item-border:1px solid var(--x-color-border,#334155);--x-file-upload-remove-color:var(--x-color-text-muted,#94a3b8);}}[part\x3ddrop-zone]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;padding:var(--x-file-upload-padding);background:var(--x-file-upload-bg);border:var(--x-file-upload-border);border-radius:var(--x-file-upload-radius);cursor:pointer;text-align:center;color:var(--x-file-upload-muted);font-size:var(--x-file-upload-font-size);font-family:inherit;transition:border-color var(--x-file-upload-transition-duration) ease,background var(--x-file-upload-transition-duration) ease;}[part\x3ddrop-zone]:hover{border:var(--x-file-upload-border-hover);}[part\x3ddrop-zone]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}:host([data-drag-over]) [part\x3ddrop-zone]{border:var(--x-file-upload-border-hover);background:var(--x-file-upload-drag-bg);}:host([data-drag-over]) [part\x3dcontent]{visibility:hidden;}:host([data-drag-over]) [part\x3ddrag-overlay]{display:flex;}[part\x3ddrag-overlay]{display:none;position:absolute;inset:0;align-items:center;justify-content:center;border-radius:var(--x-file-upload-radius);font-weight:600;color:var(--x-color-primary,#3b82f6);pointer-events:none;}:host([disabled]){pointer-events:none;cursor:default;}:host([disabled]) [part\x3ddrop-zone]{opacity:var(--x-file-upload-disabled-opacity);}[part\x3dfile-list]{display:flex;flex-direction:column;gap:8px;margin-top:12px;}[part\x3dfile-list]:empty{display:none;}[part\x3dfile-item]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--x-file-upload-item-bg);border:var(--x-file-upload-item-border);border-radius:6px;font-size:var(--x-file-upload-font-size);font-family:inherit;color:var(--x-file-upload-fg);}[part\x3dthumbnail]{width:var(--x-file-upload-thumb-size);height:var(--x-file-upload-thumb-size);object-fit:cover;border-radius:4px;flex-shrink:0;}[part\x3dfile-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dfile-size]{color:var(--x-file-upload-muted);font-size:0.8125rem;flex-shrink:0;}[part\x3dremove]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1rem;color:var(--x-file-upload-remove-color);cursor:pointer;border-radius:4px;flex-shrink:0;}[part\x3dremove]:hover{color:var(--x-file-upload-remove-hover);}[part\x3dremove]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}[part\x3dlive-region]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}input[type\x3dfile]{display:none;}@media (prefers-reduced-motion:reduce){[part\x3ddrop-zone]{transition:none !important;}}@media (pointer:coarse){[part\x3ddrop-zone]{min-height:140px;}[part\x3dremove]{width:2.75rem;height:2.75rem;}}";
17
+ d.setAttribute("part","drop-zone");d.setAttribute("role","button");d.setAttribute("tabindex","0");e.setAttribute("type","file");e.setAttribute("aria-hidden","true");e.setAttribute("tabindex","-1");g.setAttribute("part","content");g.appendChild(h);l.setAttribute("part","drag-overlay");l.setAttribute("hidden","");l.textContent="Drop files here";m.setAttribute("part","file-list");m.setAttribute("role","list");p.setAttribute("part","live-region");p.setAttribute("aria-live","polite");p.setAttribute("aria-atomic",
18
+ "true");d.appendChild(e);d.appendChild(g);d.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(m);b.appendChild(p);a.__xFileUploadFiles=[];a.__xFileUploadDragCtr=0;a.__xFileUploadRefs={dropZone:d,fileInput:e,content:g,dragOverlay:l,fileList:m,liveRegion:p}}b=a.attachInternals;$APP.n($APP.n(b)?$APP.q($APP.k(a,"__xFileUploadInternals")):b)&&(b=a.attachInternals(),a.__xFileUploadInternals=b);$w(a);a.__xFileUploadHandlers=Zw(a);e=$APP.k(a,"__xFileUploadRefs");$APP.n(e)&&(b=$APP.k(a,"__xFileUploadHandlers"),
19
+ $APP.n(b)&&(c=$APP.k(e,"dropZone"),d=$APP.k(e,"fileInput"),e=$APP.k(e,"fileList"),c.addEventListener("click",$APP.k(b,"zoneClick")),c.addEventListener("keydown",$APP.k(b,"zoneKeydown")),c.addEventListener("dragenter",$APP.k(b,"dragenter")),c.addEventListener("dragover",$APP.k(b,"dragover")),c.addEventListener("dragleave",$APP.k(b,"dragleave")),c.addEventListener("drop",$APP.k(b,"drop")),d.addEventListener("change",$APP.k(b,"fileChange")),e.addEventListener("click",$APP.k(b,"fileListClick"))));Tw(a);
20
+ return Xw(a)},bx=function(a){$w(a);a=$APP.k(a,"__xFileUploadRefs");return $APP.n(a)?Uw($APP.k(a,"fileList")):null},cx=function(a){return $APP.n($APP.k(a,"__xFileUploadRefs"))?Tw(a):null},dx=function(a,b){$APP.Pg(a,"disabled",b);return Tw(a)},ex=function(a){$APP.k(a,"__xFileUploadFiles").length=0;var b=$APP.k(a,"__xFileUploadRefs");$APP.n(b)&&Uw($APP.k(b,"fileList"));Vw(a);Ww(a);return Xw(a)},fx=function(a){$APP.Ug(a,"accept","accept");$APP.Ug(a,"name","name");$APP.Sg(a,"multiple","multiple");$APP.Sg(a,
21
+ "disabled","disabled");$APP.Sg(a,"required","required");$APP.Vg(a,"maxSize","max-size",0);$APP.Vg(a,"maxFiles","max-files",0);Object.defineProperty(a,"files",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xFileUploadFiles");return($APP.n(b)?b:[]).slice()}});a.checkValidity=function(){var b=$APP.k(this,"__xFileUploadInternals");return $APP.n(b)?b.checkValidity():null};return a.reportValidity=function(){var b=$APP.k(this,"__xFileUploadInternals");return $APP.n(b)?b.reportValidity():
22
+ null}},hx=function(){return $APP.Lg("x-file-upload",new $APP.Q(null,8,[$APP.Cg,gx,$APP.Dg,ax,$APP.Eg,bx,$APP.Fg,cx,$APP.Gg,!0,$APP.Hg,dx,$APP.Ig,ex,$APP.Jg,fx],null))},Ow=new $APP.K(null,"accept","accept",1874130431),Gw=new $APP.K(null,"rejected","rejected",231052999),Fw=new $APP.K(null,"accepted","accepted",-1953464374),Mw=new $APP.K(null,"max-size-raw","max-size-raw",1536077032),Qw=new $APP.K(null,"max-size","max-size",-874966132),Pw=new $APP.K(null,"multiple?","multiple?",-490002283),Kw=new $APP.K(null,
23
+ "accept-raw","accept-raw",1407413888),Rw=new $APP.K(null,"max-files","max-files",534742526),Lw=new $APP.K(null,"multiple-present?","multiple-present?",-1754894397),Hw=new $APP.K(null,"file","file",-1269645878),Nw=new $APP.K(null,"max-files-raw","max-files-raw",-244409320);var gx="accept multiple max-size max-files disabled required name".split(" ");$APP.Pd(["x-file-upload-select",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[new $APP.K(null,"files","files",-472457450),$APP.jj,Gw,$APP.jj],null)],null),"x-file-upload-remove",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[Hw,$APP.Bl,new $APP.K(null,"remaining","remaining",-138926777),$APP.jj],null)],null)]);$APP.ha("baredom.exports.x_file_upload.init",hx);export const init=hx;
@@ -1,18 +1,16 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var HV=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},IV=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.B.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},KV=function(a){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"input"),
3
- e=$APP.k(b,"hint");b=$APP.k(b,"error");var g=$APP.zf([$APP.pi,$APP.Al,$APP.Ji,$APP.$i,$APP.Ol,$APP.Nh,$APP.Lj,$APP.Em,$APP.oi,$APP.yi,$APP.Pi],[a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("type"),a.getAttribute("placeholder")]);var h=$APP.M(g),l=$APP.D(h,$APP.Pi),m=$APP.D(h,$APP.pi),p=$APP.D(h,$APP.Al);
4
- g=$APP.D(h,$APP.Ji);var q=$APP.D(h,$APP.$i),v=$APP.D(h,$APP.Ol),x=$APP.D(h,$APP.Nh),y=$APP.D(h,$APP.Lj),A=$APP.D(h,$APP.Em),C=$APP.D(h,$APP.oi),E=$APP.D(h,$APP.yi);h=$APP.n(g)?g:"";var H=$APP.n(q)?q:"",G=$APP.n(m)?m:"",J=[$APP.mi,$APP.dn,$APP.sm,$APP.ui,$APP.Aj,$APP.Yi,$APP.Dl,$APP.Z,$APP.al,$APP.Zl,$APP.U,$APP.Ei,$APP.am,$APP.X];x=$APP.F(x);y=$APP.F(y);l=$APP.n(l)?l:"";q=typeof q==="string"&&$APP.N(q,"")&&q!=null;p=$APP.n(p)?p:"";A=$APP.n(A)?A:"";m=typeof m==="string"&&$APP.N(m,"")&&m!=null;E=typeof E===
5
- "string"&&$APP.I(JV,E)?E:"text";g=$APP.zf(J,[x,y,l,q,p,A,m,E,typeof g==="string"&&$APP.N(g,"")&&g!=null,H,G,h,$APP.n(C)?C:"",$APP.F(v)]);v=$APP.al.g(g);C=$APP.ui.g(g);h=$APP.Dl.g(g);d.type=$APP.Z.g(g);d.name=$APP.Aj.g(g);d.placeholder=$APP.sm.g(g);d.disabled=$APP.X.g(g);d.readOnly=$APP.dn.g(g);d.required=$APP.mi.g(g);d.autocomplete=$APP.am.g(g);H=$APP.n($APP.mi.g(g))?"true":"false";d.setAttribute("aria-required",H);d.setAttribute("aria-invalid",$APP.n(v)?"true":"false");H=$APP.n($APP.n(C)?v:C)?"hint error":
6
- $APP.n(C)?"hint":$APP.n(v)?"error":null;$APP.n(H)?d.setAttribute("aria-describedby",H):d.removeAttribute("aria-describedby");c.textContent=$APP.U.g(g);$APP.n(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.Zl.g(g);$APP.n(C)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Ei.g(g);$APP.n(v)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");HV(a,"data-invalid",v);c=$APP.k(a,"__xFormFieldInternals");return $APP.n(c)?
7
- IV(a,c,d):null}return null},LV=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},MV=function(a){return function(){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),IV(a,e,b));return LV(a,"x-form-field-input",{name:d,value:c})}return null}},NV=function(a){return function(){var b=$APP.k(a,"__xFormFieldRefs");
8
- if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),IV(a,e,b));return LV(a,"x-form-field-change",{name:d,value:c})}return null}},OV=function(a){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xFormFieldHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xFormFieldHandlers=
9
- null;return}}return null},PV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},QV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return HV(this,c,$APP.F(d))}})},RV=function(a){Object.defineProperty(a,"value",{configurable:!0,
10
- enumerable:!0,get:function(){var b=$APP.k(this,"__xFormFieldRefs");if($APP.n(b))return $APP.k(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.N(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xFormFieldRefs");return $APP.n(c)?$APP.k(c,"input").value=b:null}})},TV=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return SV}});RV(b);PV(b,
11
- "label","label");PV(b,"type","type");PV(b,"name","name");PV(b,"placeholder","placeholder");PV(b,"autocomplete","autocomplete");QV(b,"disabled","disabled");QV(b,"readOnly","readonly");QV(b,"required","required");b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFormFieldRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),l=document.createElement("input"),m=document.createElement("span"),
12
- p=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-form-field-label-color:var(--x-color-text-muted,#374151);--x-form-field-label-font-size:var(--x-font-size-sm,0.875rem);--x-form-field-input-bg:var(--x-color-surface,#ffffff);--x-form-field-input-color:var(--x-color-text,#111827);--x-form-field-input-border:1px solid var(--x-color-border,#d1d5db);--x-form-field-input-border-radius:var(--x-radius-md,6px);--x-form-field-input-padding:0.5rem 0.75rem;--x-form-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-form-field-error-color:var(--x-color-danger,#dc2626);--x-form-field-hint-color:var(--x-color-text-muted,#6b7280);--x-form-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-form-field-label-color:var(--x-color-text-muted,#d1d5db);--x-form-field-input-bg:var(--x-color-surface-hover,#1f2937);--x-form-field-input-color:var(--x-color-text,#f9fafb);--x-form-field-input-border:1px solid var(--x-color-border,#4b5563);--x-form-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-form-field-error-color:var(--x-color-danger,#f87171);--x-form-field-hint-color:var(--x-color-text-muted,#9ca3af);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:var(--x-form-field-label-font-size);font-weight:500;color:var(--x-form-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:block;}[part\x3dinput]{display:block;width:100%;box-sizing:border-box;padding:var(--x-form-field-input-padding);background:var(--x-form-field-input-bg);color:var(--x-form-field-input-color);border:var(--x-form-field-input-border);border-radius:var(--x-form-field-input-border-radius);font-size:1rem;line-height:1.5;font-family:inherit;outline:none;transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput]:focus{border-color:var(--x-form-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput]{border-color:var(--x-form-field-error-color);}:host([data-invalid]) [part\x3dinput]:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-error-color) 20%,transparent);}[part\x3dinput]:disabled{opacity:var(--x-form-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-form-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-form-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]{transition:none;}}";
13
- e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","input");h.setAttribute("part","input-wrapper");l.setAttribute("part","input");l.setAttribute("id","input");l.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");p.setAttribute("part","error");p.setAttribute("id","error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");h.appendChild(l);
14
- e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xFormFieldRefs={field:e,label:g,input:l,hint:m,error:p};$APP.n(this.attachInternals)&&(this.__xFormFieldInternals=this.attachInternals())}OV(this);c=$APP.k(this,"__xFormFieldRefs");$APP.n(c)&&(c=$APP.k(c,"input"),d=this.getAttribute("value"),$APP.n(d)&&(c.value=d));c=$APP.k(this,"__xFormFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));c=$APP.k(this,
15
- "__xFormFieldRefs");$APP.n(c)&&(c=$APP.k(c,"input"),d=MV(this),e=NV(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xFormFieldHandlers={input:d,change:e});return KV(this)};b.disconnectedCallback=function(){return OV(this)};b.attributeChangedCallback=function(c,d,e){$APP.B.i(c,"value")&&(c=$APP.k(this,"__xFormFieldRefs"),$APP.n(c)&&(c=$APP.k(c,"input"),$APP.N(c.value,e)&&(c.value=$APP.n(e)?e:"")));return KV(this)};b.formDisabledCallback=function(c){HV(this,"disabled",$APP.F(c));
16
- return KV(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.k(this,"__xFormFieldRefs");$APP.n(c)&&($APP.k(c,"input").value="");c=$APP.k(this,"__xFormFieldInternals");$APP.n(c)&&c.setFormValue("");return KV(this)};return a},UV=function(){return $APP.n(customElements.get("x-form-field"))?null:customElements.define("x-form-field",TV())};var SV="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),JV=new $APP.S(null,new $APP.Q(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
17
- $APP.zf([$APP.sm,$APP.Pj,$APP.Aj,$APP.Yi,$APP.Bj,$APP.Z,$APP.U,$APP.am,$APP.Dk],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"type"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"label"],null),new $APP.Q(null,
18
- 2,[$APP.Z,$APP.Y,$APP.Ik,"autocomplete"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"required"],null)]);$APP.Pd(["x-form-field-input",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Aj,$APP.Y,$APP.Yi,$APP.Y],null)],null),"x-form-field-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Aj,$APP.Y,$APP.Yi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_form_field.init",UV);export const init=UV;
2
+ var wX=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.B.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},yX=function(a){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"input"),e=$APP.k(b,"hint");b=$APP.k(b,"error");var g=$APP.zf([$APP.Hi,$APP.Sl,$APP.aj,
3
+ $APP.rj,$APP.fm,$APP.ei,$APP.dk,$APP.Wm,$APP.Gi,$APP.Qi,$APP.gj],[a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("type"),a.getAttribute("placeholder")]);var h=$APP.M(g),l=$APP.D(h,$APP.gj),m=$APP.D(h,$APP.Hi),p=$APP.D(h,$APP.Sl);g=$APP.D(h,$APP.aj);var r=$APP.D(h,$APP.rj),v=$APP.D(h,$APP.fm),x=$APP.D(h,
4
+ $APP.ei),y=$APP.D(h,$APP.dk),A=$APP.D(h,$APP.Wm),C=$APP.D(h,$APP.Gi),E=$APP.D(h,$APP.Qi);h=$APP.n(g)?g:"";var H=$APP.n(r)?r:"",G=$APP.n(m)?m:"",J=[$APP.Ei,$APP.wn,$APP.Rm,$APP.Mi,$APP.Sj,$APP.pj,$APP.Vl,$APP.Z,$APP.sl,$APP.qm,$APP.T,$APP.Wi,$APP.sm,$APP.X];x=$APP.F(x);y=$APP.F(y);l=$APP.n(l)?l:"";r=typeof r==="string"&&$APP.N(r,"")&&r!=null;p=$APP.n(p)?p:"";A=$APP.n(A)?A:"";m=typeof m==="string"&&$APP.N(m,"")&&m!=null;E=typeof E==="string"&&$APP.I(xX,E)?E:"text";g=$APP.zf(J,[x,y,l,r,p,A,m,E,typeof g===
5
+ "string"&&$APP.N(g,"")&&g!=null,H,G,h,$APP.n(C)?C:"",$APP.F(v)]);v=$APP.sl.g(g);C=$APP.Mi.g(g);h=$APP.Vl.g(g);d.type=$APP.Z.g(g);d.name=$APP.Sj.g(g);d.placeholder=$APP.Rm.g(g);d.disabled=$APP.X.g(g);d.readOnly=$APP.wn.g(g);d.required=$APP.Ei.g(g);d.autocomplete=$APP.sm.g(g);$APP.Og(d,"aria-required",$APP.n($APP.Ei.g(g))?"true":"false");d.setAttribute("aria-invalid",$APP.n(v)?"true":"false");H=$APP.n($APP.n(C)?v:C)?"hint error":$APP.n(C)?"hint":$APP.n(v)?"error":null;$APP.n(H)?d.setAttribute("aria-describedby",
6
+ H):d.removeAttribute("aria-describedby");c.textContent=$APP.T.g(g);$APP.n(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.qm.g(g);$APP.n(C)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Wi.g(g);$APP.n(v)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");$APP.Pg(a,"data-invalid",v);c=$APP.k(a,"__xFormFieldInternals");return $APP.n(c)?wX(a,c,d):null}return null},zX=function(a){return function(){var b=$APP.k(a,
7
+ "__xFormFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),wX(a,e,b));return $APP.Qg(a,"x-form-field-input",{name:d,value:c})}return null}},AX=function(a){return function(){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),wX(a,
8
+ e,b));return $APP.Qg(a,"x-form-field-change",{name:d,value:c})}return null}},BX=function(a){var b=$APP.k(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xFormFieldHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xFormFieldHandlers=null;return}}return null},CX=function(a,b){$APP.Pg(a,"disabled",$APP.F(b));return yX(a)},DX=function(a){a.removeAttribute("value");var b=$APP.k(a,"__xFormFieldRefs");
9
+ $APP.n(b)&&($APP.k(b,"input").value="");b=$APP.k(a,"__xFormFieldInternals");$APP.n(b)&&b.setFormValue("");return yX(a)},EX=function(a){if(!$APP.n($APP.k(a,"__xFormFieldRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),g=document.createElement("div"),h=document.createElement("input"),l=document.createElement("span"),m=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-form-field-label-color:var(--x-color-text-muted,#374151);--x-form-field-label-font-size:var(--x-font-size-sm,0.875rem);--x-form-field-input-bg:var(--x-color-surface,#ffffff);--x-form-field-input-color:var(--x-color-text,#111827);--x-form-field-input-border:1px solid var(--x-color-border,#d1d5db);--x-form-field-input-border-radius:var(--x-radius-md,6px);--x-form-field-input-padding:0.5rem 0.75rem;--x-form-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-form-field-error-color:var(--x-color-danger,#dc2626);--x-form-field-hint-color:var(--x-color-text-muted,#6b7280);--x-form-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-form-field-label-color:var(--x-color-text-muted,#d1d5db);--x-form-field-input-bg:var(--x-color-surface-hover,#1f2937);--x-form-field-input-color:var(--x-color-text,#f9fafb);--x-form-field-input-border:1px solid var(--x-color-border,#4b5563);--x-form-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-form-field-error-color:var(--x-color-danger,#f87171);--x-form-field-hint-color:var(--x-color-text-muted,#9ca3af);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:var(--x-form-field-label-font-size);font-weight:500;color:var(--x-form-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:block;}[part\x3dinput]{display:block;width:100%;box-sizing:border-box;padding:var(--x-form-field-input-padding);background:var(--x-form-field-input-bg);color:var(--x-form-field-input-color);border:var(--x-form-field-input-border);border-radius:var(--x-form-field-input-border-radius);font-size:1rem;line-height:1.5;font-family:inherit;outline:none;transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput]:focus{border-color:var(--x-form-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput]{border-color:var(--x-form-field-error-color);}:host([data-invalid]) [part\x3dinput]:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-error-color) 20%,transparent);}[part\x3dinput]:disabled{opacity:var(--x-form-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-form-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-form-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]{transition:none;}}";
10
+ d.setAttribute("part","field");e.setAttribute("part","label");e.setAttribute("id","label");e.setAttribute("for","input");g.setAttribute("part","input-wrapper");h.setAttribute("part","input");h.setAttribute("id","input");h.setAttribute("aria-labelledby","label");l.setAttribute("part","hint");l.setAttribute("id","hint");l.setAttribute("aria-live","polite");m.setAttribute("part","error");m.setAttribute("id","error");m.setAttribute("role","alert");m.setAttribute("aria-live","assertive");g.appendChild(h);
11
+ d.appendChild(e);d.appendChild(g);d.appendChild(l);d.appendChild(m);b.appendChild(c);b.appendChild(d);a.__xFormFieldRefs={field:d,label:e,input:h,hint:l,error:m};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xFormFieldInternals=b)}BX(a);b=$APP.k(a,"__xFormFieldRefs");$APP.n(b)&&(b=$APP.k(b,"input"),c=a.getAttribute("value"),$APP.n(c)&&(b.value=c));b=$APP.k(a,"__xFormFieldInternals");$APP.n(b)&&(c=b.setFormValue,d=a.getAttribute("value"),c.call(b,$APP.n(d)?d:""));b=$APP.k(a,"__xFormFieldRefs");
12
+ $APP.n(b)&&(b=$APP.k(b,"input"),c=zX(a),d=AX(a),b.addEventListener("input",c),b.addEventListener("change",d),a.__xFormFieldHandlers={input:c,change:d});return yX(a)},FX=function(a){return BX(a)},GX=function(a,b,c,d){$APP.B.i(b,"value")&&(b=$APP.k(a,"__xFormFieldRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),$APP.N(b.value,d)&&(b.value=$APP.n(d)?d:"")));return yX(a)},HX=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xFormFieldRefs");if($APP.n(b))return $APP.k(b,
13
+ "input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.N(b)?""+$APP.S.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xFormFieldRefs");return $APP.n(c)?$APP.k(c,"input").value=b:null}})},IX=function(a){HX(a);$APP.Tg(a,"label","label","");$APP.Tg(a,"type","type","");$APP.Tg(a,"name","name","");$APP.Tg(a,"placeholder","placeholder","");$APP.Tg(a,"autocomplete","autocomplete","");$APP.Sg(a,"disabled","disabled");$APP.Sg(a,"readOnly","readonly");return $APP.Sg(a,
14
+ "required","required")},KX=function(){return $APP.Lg("x-form-field",new $APP.Q(null,8,[$APP.Cg,JX,$APP.Dg,EX,$APP.Eg,FX,$APP.Fg,GX,$APP.Gg,!0,$APP.Hg,CX,$APP.Ig,DX,$APP.Jg,IX],null))};var JX="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),xX=new $APP.R(null,new $APP.Q(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
15
+ $APP.zf([$APP.Rm,$APP.kk,$APP.Sj,$APP.pj,$APP.Tj,$APP.Z,$APP.T,$APP.sm,$APP.Vk],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"type"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"label"],null),new $APP.Q(null,
16
+ 2,[$APP.Z,$APP.Y,$APP.$k,"autocomplete"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"required"],null)]);$APP.Pd(["x-form-field-input",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[$APP.Sj,$APP.Y,$APP.pj,$APP.Y],null)],null),"x-form-field-change",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[$APP.Sj,$APP.Y,$APP.pj,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_form_field.init",KX);export const init=KX;
package/dist/x-form.js CHANGED
@@ -1,11 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var ZR=function(a,b){return a.setAttribute("autocomplete",b)},cS=function(a){a=new $APP.Q(null,3,[$APP.Dm,a.getAttribute("loading"),$R,$APP.n(a.hasAttribute("novalidate"))?"":null,$APP.oi,a.getAttribute("autocomplete")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Dm);a=$APP.D(b,$R);b=$APP.D(b,$APP.oi);c=c!=null&&$APP.N(c,"false");b=$APP.I(aS,b)?b:"on";return new $APP.Q(null,3,[$APP.Ci,c,bS,a!=null,$APP.am,b],null)},dS=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){b=$APP.k(b,"form");a=cS(a);ZR(b,
3
- $APP.am.g(a));if($APP.n($APP.Ci.g(a)))return b.setAttribute("aria-busy","true"),b.setAttribute("data-loading","");b.removeAttribute("aria-busy");return b.removeAttribute("data-loading")}return null},eS=function(a){a=a.querySelectorAll("[name]:not([disabled])");for(var b={},c=a.length,d=0;;)if(d<c){var e=a[d],g=e.name;if($APP.n(function(){var m=g;return $APP.n(m)?$APP.N(g,""):m}())){var h=e.tagName.toLowerCase(),l=e.getAttribute("type");$APP.B.i(l,"checkbox")||$APP.B.i(l,"radio")||$APP.B.i(h,"x-checkbox")?
4
- $APP.n(e.checked)&&(b[g]=function(){var m=e.value;return $APP.n(m)?m:"on"}()):b[g]=function(){var m=e.value;return $APP.n(m)?m:""}()}d+=1}else break;return b},fS=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:d}))},gS=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){b=$APP.k(b,"form");var c=function(g){g.preventDefault();g=cS(a);if($APP.n($APP.Ci.g(g)))g=null;else{g=bS.g(g);if(!$APP.n(g)){g=a.querySelectorAll("[name]:not([disabled])");
5
- for(var h={ok:!0},l=g.length,m=0;;)if(m<l){var p=g[m];$APP.n(p.reportValidity)&&($APP.n(p.reportValidity())||(h.ok=!1));m+=1}else break;g=h.ok}$APP.n(g)?(g=eS(a),g=fS(a,"x-form-submit",{values:g},!0)):g=null}return g},d=function(){for(var g=a.querySelectorAll("[name]"),h=g.length,l=0;;)if(l<h){var m=g[l];$APP.n(m.formResetCallback)&&m.formResetCallback();l+=1}else break;return fS(a,"x-form-reset",{},!1)},e=function(g){a:{g=g.target.closest("button,input[type\x3dsubmit],input[type\x3dreset]");if($APP.n(g)){g=
6
- g.type;var h=$APP.k(a,"__xFormRefs");if($APP.n(h)){h=$APP.k(h,"form");g=$APP.B.i(g,"submit")||$APP.B.i(g,"")?h.requestSubmit():$APP.B.i(g,"reset")?h.reset():null;break a}}g=null}return g};b.addEventListener("submit",c);b.addEventListener("reset",d);a.addEventListener("click",e);$APP.ja(a,"__xFormHandlers",{submit:c,reset:d,click:e})}},hS=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){var c=$APP.k(a,"__xFormHandlers");if($APP.n(c)){b=$APP.k(b,"form");b.removeEventListener("submit",$APP.k(c,
7
- "submit"));b.removeEventListener("reset",$APP.k(c,"reset"));a.removeEventListener("click",$APP.k(c,"click"));a.__xFormHandlers=null;return}}return null},iS=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.F(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},jS=function(a){Object.defineProperty(a,"autocomplete",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("autocomplete");return $APP.n(b)?
8
- b:""},set:function(b){return b!=null&&$APP.N(b)?ZR(this,""+$APP.T.g(b)):this.removeAttribute("autocomplete")}})},lS=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return kS}});iS(b,"loading","loading");iS(b,"novalidate","novalidate");jS(b);b.connectedCallback=function(){if(!$APP.n(this.shadowRoot)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("form"),g=document.createElement("slot");
9
- d.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";e.setAttribute("part","root");e.setAttribute("novalidate","");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xFormRefs={form:e}}hS(this);gS(this);return dS(this)};b.disconnectedCallback=function(){return hS(this)};b.attributeChangedCallback=function(){return dS(this)};b.submit=function(){var c=
10
- $APP.k(this,"__xFormRefs");return $APP.n(c)?$APP.k(c,"form").requestSubmit():null};b.reset=function(){var c=$APP.k(this,"__xFormRefs");return $APP.n(c)?$APP.k(c,"form").reset():null};b.setFieldError=function(c,d){c=this.querySelector('[name\x3d"'+$APP.T.g(c)+'"]');return $APP.n(c)?d==null||$APP.B.i(d,"")||$APP.B.i(d,void 0)?c.removeAttribute("error"):c.setAttribute("error",d):null};b.clearErrors=function(){for(var c=this.querySelectorAll("[error]"),d=c.length,e=0;;)if(e<d)c[e].removeAttribute("error"),
11
- e+=1;else return null};return a},mS=function(){return $APP.n(customElements.get("x-form"))?null:customElements.define("x-form",lS())},$R=new $APP.K(null,"novalidate-raw","novalidate-raw",1783236714),bS=new $APP.K(null,"novalidate?","novalidate?",491529885);var kS=["loading","novalidate","autocomplete"],aS=new $APP.S(null,new $APP.Q(null,2,["off",null,"on",null],null),null);$APP.Pd(["x-form-submit",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,1,[new $APP.K(null,"values","values",372645556),$APP.jl],null)],null),"x-form-reset",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,$APP.Qd],null)]);$APP.ha("baredom.exports.x_form.init",mS);export const init=mS;
2
+ var KT=function(a){a=new $APP.Q(null,3,[$APP.Vm,a.getAttribute("loading"),HT,$APP.n(a.hasAttribute("novalidate"))?"":null,$APP.Gi,a.getAttribute("autocomplete")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Vm);a=$APP.D(b,HT);b=$APP.D(b,$APP.Gi);c=c!=null&&$APP.N(c,"false");b=$APP.I(IT,b)?b:"on";return new $APP.Q(null,3,[$APP.Ui,c,JT,a!=null,$APP.sm,b],null)},LT=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){b=$APP.k(b,"form");a=KT(a);$APP.Og(b,"autocomplete",$APP.sm.g(a));if($APP.n($APP.Ui.g(a)))return b.setAttribute("aria-busy",
3
+ "true"),b.setAttribute("data-loading","");b.removeAttribute("aria-busy");return b.removeAttribute("data-loading")}return null},MT=function(a){a=a.querySelectorAll("[name]:not([disabled])");for(var b={},c=a.length,d=0;;)if(d<c){var e=a[d],g=e.name;if($APP.n(function(){var m=g;return $APP.n(m)?$APP.N(g,""):m}())){var h=e.tagName.toLowerCase(),l=e.getAttribute("type");$APP.B.i(l,"checkbox")||$APP.B.i(l,"radio")||$APP.B.i(h,"x-checkbox")?$APP.n(e.checked)&&(b[g]=function(){var m=e.value;return $APP.n(m)?
4
+ m:"on"}()):b[g]=function(){var m=e.value;return $APP.n(m)?m:""}()}d+=1}else break;return b},NT=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){b=$APP.k(b,"form");var c=function(g){g.preventDefault();g=KT(a);if($APP.n($APP.Ui.g(g)))g=null;else{g=JT.g(g);if(!$APP.n(g)){g=a.querySelectorAll("[name]:not([disabled])");for(var h={ok:!0},l=g.length,m=0;;)if(m<l){var p=g[m];$APP.n(p.reportValidity)&&($APP.n(p.reportValidity())||(h.ok=!1));m+=1}else break;g=h.ok}$APP.n(g)?(g=MT(a),g=$APP.Rg(a,"x-form-submit",
5
+ {values:g})):g=null}return g},d=function(){for(var g=a.querySelectorAll("[name]"),h=g.length,l=0;;)if(l<h){var m=g[l];$APP.n(m.formResetCallback)&&m.formResetCallback();l+=1}else break;return $APP.Qg(a,"x-form-reset",{})},e=function(g){a:{g=g.target.closest("button,input[type\x3dsubmit],input[type\x3dreset]");if($APP.n(g)){g=g.type;var h=$APP.k(a,"__xFormRefs");if($APP.n(h)){h=$APP.k(h,"form");g=$APP.B.i(g,"submit")||$APP.B.i(g,"")?h.requestSubmit():$APP.B.i(g,"reset")?h.reset():null;break a}}g=null}return g};
6
+ b.addEventListener("submit",c);b.addEventListener("reset",d);a.addEventListener("click",e);$APP.ja(a,"__xFormHandlers",{submit:c,reset:d,click:e})}},OT=function(a){var b=$APP.k(a,"__xFormRefs");if($APP.n(b)){var c=$APP.k(a,"__xFormHandlers");if($APP.n(c)){b=$APP.k(b,"form");b.removeEventListener("submit",$APP.k(c,"submit"));b.removeEventListener("reset",$APP.k(c,"reset"));a.removeEventListener("click",$APP.k(c,"click"));a.__xFormHandlers=null;return}}return null},PT=function(a){if(!$APP.n(a.shadowRoot)){var b=
7
+ a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("form"),e=document.createElement("slot");c.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";d.setAttribute("part","root");d.setAttribute("novalidate","");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xFormRefs={form:d}}OT(a);NT(a);return LT(a)},QT=function(a){return OT(a)},
8
+ RT=function(a){return LT(a)},ST=function(a){$APP.Sg(a,"loading","loading");$APP.Sg(a,"novalidate","novalidate");$APP.Ug(a,"autocomplete","autocomplete");a.submit=function(){var b=$APP.k(this,"__xFormRefs");return $APP.n(b)?$APP.k(b,"form").requestSubmit():null};a.reset=function(){var b=$APP.k(this,"__xFormRefs");return $APP.n(b)?$APP.k(b,"form").reset():null};a.setFieldError=function(b,c){b=this.querySelector('[name\x3d"'+$APP.S.g(b)+'"]');return $APP.n(b)?c==null||$APP.B.i(c,"")||$APP.B.i(c,void 0)?
9
+ b.removeAttribute("error"):b.setAttribute("error",c):null};return a.clearErrors=function(){for(var b=this.querySelectorAll("[error]"),c=b.length,d=0;;)if(d<c)b[d].removeAttribute("error"),d+=1;else return null}},UT=function(){return $APP.Lg("x-form",new $APP.Q(null,5,[$APP.Cg,TT,$APP.Dg,PT,$APP.Eg,QT,$APP.Fg,RT,$APP.Jg,ST],null))},HT=new $APP.K(null,"novalidate-raw","novalidate-raw",1783236714),JT=new $APP.K(null,"novalidate?","novalidate?",491529885);var TT=["loading","novalidate","autocomplete"],IT=new $APP.R(null,new $APP.Q(null,2,["off",null,"on",null],null),null);$APP.Pd(["x-form-submit",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,1,[new $APP.K(null,"values","values",372645556),$APP.Bl],null)],null),"x-form-reset",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,$APP.Qd],null)]);$APP.ha("baredom.exports.x_form.init",UT);export const init=UT;