@vanelsas/baredom 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +12 -41
  3. package/custom-elements.json +344 -5
  4. package/dist/baredom.d.ts +4 -0
  5. package/dist/base.js +451 -421
  6. package/dist/integrity.json +97 -93
  7. package/dist/x-alert.js +17 -19
  8. package/dist/x-avatar-group.js +9 -11
  9. package/dist/x-avatar.js +15 -15
  10. package/dist/x-badge.js +9 -11
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +13 -14
  14. package/dist/x-button.js +16 -16
  15. package/dist/x-cancel-dialogue.js +13 -17
  16. package/dist/x-card.js +7 -7
  17. package/dist/x-carousel.js +33 -34
  18. package/dist/x-chart.d.ts +26 -0
  19. package/dist/x-chart.js +47 -48
  20. package/dist/x-checkbox.js +11 -11
  21. package/dist/x-chip.js +1 -9
  22. package/dist/x-collapse.js +10 -12
  23. package/dist/x-color-picker.js +44 -45
  24. package/dist/x-combobox.js +26 -27
  25. package/dist/x-command-palette.js +26 -27
  26. package/dist/x-container.js +5 -6
  27. package/dist/x-context-menu.d.ts +31 -2
  28. package/dist/x-context-menu.js +20 -18
  29. package/dist/x-copy.js +20 -23
  30. package/dist/x-currency-field.js +23 -25
  31. package/dist/x-date-picker.d.ts +27 -0
  32. package/dist/x-date-picker.js +42 -42
  33. package/dist/x-divider.js +9 -10
  34. package/dist/x-drawer.js +10 -12
  35. package/dist/x-dropdown.js +11 -11
  36. package/dist/x-fieldset.js +5 -6
  37. package/dist/x-file-download.js +7 -8
  38. package/dist/x-file-upload.js +22 -25
  39. package/dist/x-form-field.js +15 -17
  40. package/dist/x-form.js +9 -10
  41. package/dist/x-gaussian-blur.js +13 -19
  42. package/dist/x-grid.js +6 -6
  43. package/dist/x-i18n-provider.d.ts +43 -0
  44. package/dist/x-i18n-provider.js +8 -0
  45. package/dist/x-i18n.d.ts +14 -0
  46. package/dist/x-i18n.js +5 -0
  47. package/dist/x-icon.js +6 -7
  48. package/dist/x-image.js +18 -19
  49. package/dist/x-kinetic-canvas.d.ts +18 -0
  50. package/dist/x-kinetic-canvas.js +26 -0
  51. package/dist/x-kinetic-font.js +27 -29
  52. package/dist/x-kinetic-typography.js +33 -39
  53. package/dist/x-liquid-dock.js +39 -39
  54. package/dist/x-liquid-fill.js +45 -45
  55. package/dist/x-liquid-glass.js +47 -47
  56. package/dist/x-menu-item.js +8 -10
  57. package/dist/x-menu.js +10 -11
  58. package/dist/x-metaball-cursor.js +27 -27
  59. package/dist/x-modal.js +11 -13
  60. package/dist/x-morph-stack.js +37 -39
  61. package/dist/x-multi-combobox.d.ts +50 -0
  62. package/dist/x-multi-combobox.js +37 -0
  63. package/dist/x-navbar.js +12 -13
  64. package/dist/x-neural-glow.js +33 -34
  65. package/dist/x-notification-center.js +9 -10
  66. package/dist/x-organic-divider.js +17 -19
  67. package/dist/x-organic-progress.js +38 -39
  68. package/dist/x-organic-shape.js +13 -14
  69. package/dist/x-pagination.js +15 -17
  70. package/dist/x-particle-button.js +51 -52
  71. package/dist/x-popover.js +26 -25
  72. package/dist/x-progress-circle.js +9 -11
  73. package/dist/x-progress.js +10 -11
  74. package/dist/x-radio.js +11 -12
  75. package/dist/x-ripple-effect.js +11 -12
  76. package/dist/x-scroll-parallax.js +18 -19
  77. package/dist/x-scroll-stack.js +17 -18
  78. package/dist/x-scroll-story.js +34 -36
  79. package/dist/x-scroll-timeline.js +45 -47
  80. package/dist/x-scroll.js +40 -42
  81. package/dist/x-search-field.js +15 -17
  82. package/dist/x-select.js +11 -11
  83. package/dist/x-sidebar.js +17 -17
  84. package/dist/x-skeleton-group.js +12 -14
  85. package/dist/x-skeleton.js +1 -1
  86. package/dist/x-slider.js +15 -18
  87. package/dist/x-soft-body.js +22 -22
  88. package/dist/x-spacer.js +4 -5
  89. package/dist/x-spinner.js +4 -6
  90. package/dist/x-splash.js +12 -13
  91. package/dist/x-stat.js +10 -12
  92. package/dist/x-stepper.js +14 -15
  93. package/dist/x-switch.js +10 -11
  94. package/dist/x-tab.js +7 -8
  95. package/dist/x-table-cell.js +20 -24
  96. package/dist/x-table-row.js +8 -10
  97. package/dist/x-table.js +12 -16
  98. package/dist/x-tabs.js +11 -11
  99. package/dist/x-text-area.js +19 -21
  100. package/dist/x-theme.d.ts +1 -1
  101. package/dist/x-theme.js +25 -25
  102. package/dist/x-timeline-item.js +21 -23
  103. package/dist/x-timeline.js +8 -9
  104. package/dist/x-toast.js +22 -24
  105. package/dist/x-toaster.js +8 -8
  106. package/dist/x-tooltip.js +12 -13
  107. package/dist/x-typography.js +9 -11
  108. package/dist/x-welcome-tour.js +60 -65
  109. package/package.json +201 -181
package/dist/x-drawer.js CHANGED
@@ -1,13 +1,11 @@
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 GN=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"),f=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("div"),m=document.createElement("slot"),q=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");f.setAttribute("part","header");h.setAttribute("name","header");l.setAttribute("part","body");q.setAttribute("part","footer");r.setAttribute("name","footer");f.appendChild(h);l.appendChild(m);q.appendChild(r);e.appendChild(f);e.appendChild(l);e.appendChild(q);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xDrawerRefs={root:b,backdrop:d,panel:e,header:f,body:l,
4
+ footer:q};return $APP.k(a,"__xDrawerRefs")},IN=function(a){a=new $APP.N(null,3,[$APP.Pj,a.hasAttribute("open"),$APP.vo,a.getAttribute("placement"),$APP.Ch,a.getAttribute("label")],null);var b=$APP.J(a),c=$APP.C(b,$APP.Pj);a=$APP.C(b,$APP.vo);b=$APP.C(b,$APP.Ch);c=$APP.E(c);a=typeof a==="string"&&$APP.Zc(HN,a)?a:"right";b=typeof b==="string"&&$APP.M(b,"")?b:"Drawer";return new $APP.N(null,3,[$APP.ao,c,$APP.bl,a,$APP.X,b],null)},JN=function(a){return $APP.Je($APP.ne(function(b){var c=window.getComputedStyle(b);
5
+ return $APP.M("none",c.display)&&$APP.M("hidden",c.visibility)&&b.offsetWidth>0&&b.offsetHeight>0},$APP.Bc(a.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))))},KN=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()},LN=function(a,b){$APP.P(a,"x-drawer-dismiss",{reason:b});a.removeAttribute("open");return null},MN=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open","");return null},NN=function(a){a.removeAttribute("open");return null},ON=function(a){var b=GN(a);b=$APP.k(b,"panel");var c=IN(a),d=$APP.ao.g(c),e=$APP.k(a,"__xDrawerPrevOpen");a.setAttribute("data-open",$APP.n(d)?"true":"false");a.setAttribute("data-placement",$APP.bl.g(c));
7
+ b.setAttribute("aria-label",$APP.X.g(c));$APP.n(d)?b.removeAttribute("aria-hidden"):b.setAttribute("aria-hidden","true");$APP.M(e,d)&&(a.__xDrawerPrevOpen=d,$APP.P(a,"x-drawer-toggle",{open:d}),$APP.n(d)?setTimeout(function(){var f=$APP.k(a,"__xDrawerRefs");f=$APP.n(f)?$APP.k(f,"panel"):null;var h=JN(a);a.__xDrawerRestore=document.activeElement;var l=$APP.n(h)?$APP.Xi(h):null;a.__xDrawerTabbables=l;$APP.t(h)?$APP.u(h).focus():$APP.n(f)&&($APP.n(f.hasAttribute("tabindex"))||(f.setAttribute("tabindex",
8
+ "-1"),a.__xDrawerPanelTab=!0),f.focus());return null},0):KN(a))},PN=function(a){function b(f){var h=f.key;if($APP.B.i(h,"Escape"))f.preventDefault(),LN(a,"escape");else if($APP.B.i(h,"Tab")){h=$APP.k(a,"__xDrawerTabbables");h=$APP.n(h)?$APP.Je($APP.Bc(h)):$APP.pe;var l=$APP.k(a,"__xDrawerRefs");l=$APP.n(l)?$APP.k(l,"panel"):null;if($APP.Oc(h))f.preventDefault(),$APP.n(l)&&l.focus();else{l=document.activeElement;var m=$APP.u(h);h=$APP.Ec(h);var q=f.shiftKey;$APP.n($APP.n(q)?$APP.B.i(l,m):q)?(f.preventDefault(),
9
+ h.focus()):$APP.p(q)&&$APP.B.i(l,h)&&(f.preventDefault(),m.focus())}}return null}function c(){return LN(a,"backdrop")}var d=GN(a),e=$APP.k(d,"panel");$APP.k(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.fa(a,"__xDrawerHandlers",{backdrop:c,keydown:b})},QN=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},RN=function(a){GN(a);QN(a);PN(a);ON(a);return null},SN=function(a){QN(a);KN(a);return null},TN=function(a,b,c,d){$APP.M(c,d)&&ON(a);return null},UN=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?MN(this):NN(this)},enumerable:!0,configurable:!0});$APP.eh(a,"placement","placement","right");$APP.eh(a,"label","label","Drawer");Object.defineProperty(a,
11
+ "show",{value:function(){return MN(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return NN(this)},enumerable:!0,configurable:!0,writable:!0});return Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?NN(this):MN(this);return null},enumerable:!0,configurable:!0,writable:!0})},WN=function(){return $APP.Yg("x-drawer",new $APP.N(null,5,[$APP.Pg,VN,$APP.Qg,RN,$APP.Rg,SN,$APP.Sg,TN,$APP.Wg,UN],null))};var HN=new $APP.O(null,new $APP.N(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),VN=["open","placement","label"];$APP.Yd(["x-drawer-toggle",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Bn,$APP.T],null)],null),"x-drawer-dismiss",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Yj,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_drawer.init",WN);export const init=WN;
@@ -1,12 +1,12 @@
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 Js=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"),f=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.n(h)?h:"";a=a.getAttribute("placement");a=$APP.Zc(Is,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.n(e)?"true":"false");$APP.bh(c,"disabled",f);return b.setAttribute("data-placement",a)}return null},Ks=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
3
+ var c=$APP.p(a.hasAttribute("open"));return $APP.ch(a,"x-dropdown-toggle",{open:c,source:b})?(c?a.setAttribute("open",""):a.removeAttribute("open"),$APP.P(a,"x-dropdown-change",{open:c})):null},Ls=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},Ms=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},Ns=function(a){return{triggerClick:function(){return Ks(a,"pointer")},triggerKeydown:function(b){var c=b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),Ks(a,"keyboard")):null},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.p(a.contains(b))?Ks(a,
5
+ "focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.Cc(b.composedPath()),b=$APP.be(function(c){return c===a},b),$APP.n(b)?null:Ks(a,"outside-click")):null},docKeydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Ks(a,"escape"):null},panelClick:function(b){return $APP.n(a.hasAttribute("open"))?$APP.n(b.target.closest("button, a, [role\x3dmenuitem]"))?Ks(a,"item-select"):null:null}}},Os=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"))}}},Ps=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"),f=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");f.setAttribute("part","chevron");f.setAttribute("aria-hidden","true");f.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(f);l.appendChild(m);
9
+ h.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(h);a.__xDropdownRefs={trigger:d,label:e,chevron:f,panel:h}}Os(a);Ms(a);a.__xDropdownHandlers=Ns(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"))&&Ls(a);return Js(a)},Qs=function(a){Os(a);return Ms(a)},Rs=function(a,b){return $APP.n($APP.k(a,"__xDropdownRefs"))?(Js(a),$APP.B.i(b,"open")?$APP.n(a.hasAttribute("open"))?Ls(a):Ms(a):null):null},Ts=function(a){$APP.jh(a,Ss);a.show=function(){return $APP.n(this.hasAttribute("open"))?null:Ks(this,"programmatic")};a.hide=function(){return $APP.n(this.hasAttribute("open"))?Ks(this,"programmatic"):null};return a.toggle=function(){return Ks(this,"programmatic")}},
11
+ Vs=function(){return $APP.Yg("x-dropdown",new $APP.N(null,5,[$APP.Pg,Us,$APP.Qg,Ps,$APP.Rg,Qs,$APP.Sg,Rs,$APP.Wg,Ts],null))};var Is=new $APP.O(null,new $APP.N(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Us=["open","disabled","label","placement"],Ss=new $APP.N(null,4,[$APP.Bn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.X,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),$APP.bl,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"placement"],null)],null);
12
+ $APP.Yd(["x-dropdown-toggle",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,2,[$APP.Bn,$APP.T,$APP.Em,$APP.U],null)],null),"x-dropdown-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Bn,$APP.T],null)],null)]);$APP.ca("baredom.exports.x_dropdown.init",Vs);export const init=Vs;
@@ -1,7 +1,6 @@
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 KK=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.N(null,4,[HK,a.getAttribute("legend"),$APP.Fh,a.hasAttribute("disabled"),$APP.fl,a.getAttribute("aria-label"),$APP.Ok,a.getAttribute("aria-describedby")],null),f=$APP.J(e),h=$APP.C(f,HK);var l=$APP.C(f,$APP.Fh);e=$APP.C(f,$APP.fl);f=$APP.C(f,$APP.Ok);h=$APP.n(h)?h:"";l=$APP.E(l);l=new $APP.N(null,5,[IK,h,JK,$APP.M(h,""),$APP.Y,l,$APP.gn,e,$APP.mo,
3
+ f],null);h=IK.g(l);f=JK.g(l);e=$APP.Y.g(l);d.textContent=h;$APP.n(f)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.gn.g(l);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(f)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.mo.g(l);$APP.n(d)?c.setAttribute("aria-describedby",d):c.removeAttribute("aria-describedby");$APP.bh(a,"data-disabled",e);return $APP.bh(b,
4
+ "inert",e)}return null},LK=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"),f=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");f.setAttribute("part","content");f.appendChild(h);d.appendChild(e);d.appendChild(f);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":f}}return KK(a)},RK=function(){return null},SK=function(a){return KK(a)},mL=function(a){return $APP.jh(a,TK)},oL=function(){return $APP.Yg("x-fieldset",new $APP.N(null,5,[$APP.Pg,nL,$APP.Qg,LK,$APP.Rg,RK,$APP.Sg,SK,$APP.Wg,mL],null))},JK=new $APP.F(null,"legend-visible?","legend-visible?",-281107501),HK=new $APP.F(null,"legend-raw","legend-raw",907427195),IK=new $APP.F(null,"legend","legend",-1027192245);var nL=["legend","disabled","aria-label","aria-describedby"],TK=new $APP.N(null,2,[IK,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"legend"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null)],null);$APP.ca("baredom.exports.x_fieldset.init",oL);export const init=oL;
@@ -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 BC=function(a){a=new $APP.N(null,4,[yC,a.getAttribute("href"),zC,a.getAttribute("filename"),$APP.Fh,a.hasAttribute("disabled"),$APP.fl,a.getAttribute("aria-label")],null);var b=$APP.J(a);a=$APP.C(b,yC);var c=$APP.C(b,zC),d=$APP.C(b,$APP.Fh);b=$APP.C(b,$APP.fl);return new $APP.N(null,4,[$APP.no,$APP.yh(a),AC,$APP.n(c)?c:"",$APP.Y,$APP.E(d),$APP.gn,b],null)},CC=function(a){var b=$APP.k(a,"__xFileDownloadRefs");if($APP.n(b)){b=$APP.k(b,"anchor-el");var c=BC(a),d=$APP.no.g(c),e=AC.g(c),f=$APP.Y.g(c);
3
+ c=$APP.gn.g(c);b.href=d;typeof e==="string"&&$APP.M(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(f)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return $APP.bh(a,"data-disabled",f)}return null},DC=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
+ var c=BC(a);c={href:$APP.no.g(c),filename:AC.g(c)};return $APP.ch(a,"x-file-download-click",c)?null:b.preventDefault()}},EC=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},FC=function(a){if(!$APP.n($APP.k(a,"__xFileDownloadRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("a"),
5
+ e=document.createElement("span"),f=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");f.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
+ f.appendChild(h);d.appendChild(e);d.appendChild(f);b.appendChild(c);b.appendChild(d);a.__xFileDownloadRefs={"anchor-el":d,"icon-el":e,"content-el":f}}EC(a);b=DC(a);$APP.k($APP.k(a,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",b);a.__xFileDownloadHandlers={click:b};return CC(a)},GC=function(a){return EC(a)},HC=function(a){return CC(a)},JC=function(a){return $APP.jh(a,IC)},LC=function(){return $APP.Yg("x-file-download",new $APP.N(null,5,[$APP.Pg,KC,$APP.Qg,FC,$APP.Rg,GC,$APP.Sg,HC,$APP.Wg,
8
+ JC],null))},zC=new $APP.F(null,"filename-raw","filename-raw",-706184256),yC=new $APP.F(null,"href-raw","href-raw",-1680949453),AC=new $APP.F(null,"filename","filename",-1428840783);var KC=["href","filename","disabled","aria-label"],IC=new $APP.N(null,3,[$APP.no,new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"href",$APP.ih,""],null),AC,new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"filename",$APP.ih,""],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null)],null);$APP.Yd(["x-file-download-click",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,2,[$APP.no,$APP.U,AC,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_file_download.init",LC);export const init=LC;
@@ -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 Ey=function(a){return a!=null?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:null):null},Fy=function(a){var b=a.lastIndexOf(".");return b>0?a.substring(b).toLowerCase():null},Gy=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=Fy(a.name);b=$APP.he.i($APP.rh,$APP.ph(b,/,/));return $APP.E($APP.be(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.Q.g(e)+"/")):$APP.B.i(e,c)},b))},Ky=function(a,b,c,d,e){a=$APP.t(a);for(var f=$APP.pe,h=$APP.pe;;){if($APP.p(a))return new $APP.N(null,2,[Hy,f,Iy,h],null);var l=$APP.u(a);var m=l;var q=b,r=c;m=$APP.th(q)&&!Gy(m,q)?new $APP.N(null,2,[$APP.ij,!1,$APP.Yj,"File type not accepted"],null):r!=null&&m.size>r?new $APP.N(null,2,[$APP.ij,!1,$APP.Yj,"File too large"],null):new $APP.N(null,2,[$APP.ij,!0,$APP.Yj,null],null);$APP.p($APP.ij.g(m))?(a=$APP.w(a),h=$APP.ud.i(h,new $APP.N(null,2,
4
+ [Jy,l,$APP.Yj,$APP.Yj.g(m)],null))):d!=null&&e>=d?(a=$APP.w(a),h=$APP.ud.i(h,new $APP.N(null,2,[Jy,l,$APP.Yj,"Maximum files reached"],null))):(a=$APP.w(a),f=$APP.ud.i(f,l),e+=1)}},Ly=function(a){return document.createElement(a)},Uy=function(a){a=new $APP.N(null,7,[My,a.getAttribute("accept"),Ny,a.hasAttribute("multiple"),Oy,a.getAttribute("max-size"),Py,a.getAttribute("max-files"),$APP.Fh,a.hasAttribute("disabled"),$APP.cj,a.hasAttribute("required"),$APP.Mm,a.getAttribute("name")],null);var b=$APP.J(a);
5
+ a=$APP.C(b,My);var c=$APP.C(b,Ny),d=$APP.C(b,Oy),e=$APP.C(b,Py),f=$APP.C(b,$APP.Fh),h=$APP.C(b,$APP.cj);b=$APP.C(b,$APP.Mm);return new $APP.N(null,7,[Qy,$APP.n(a)?a:"",Ry,$APP.E(c),Sy,Ey(d),Ty,Ey(e),$APP.Y,$APP.E(f),$APP.xj,$APP.E(h),$APP.Nk,$APP.n(b)?b:""],null)},Vy=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){a=Uy(a);var c=$APP.J(a);a=$APP.C(c,Qy);var d=$APP.C(c,Ry);c=$APP.C(c,$APP.Y);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.ah(b,"aria-disabled",""+$APP.Q.g(c))}return null},Wy=function(a){a=$APP.t($APP.Bc(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.Vc(b)?(a=$APP.Db(b),c=$APP.Eb(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},Xy=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;Wy(c);c.textContent="";for(var e=0;;)if(e<d){var f=a[e],h=Ly("div"),l=Ly("span"),m=Ly("span"),q=Ly("button"),r=f.name;h.setAttribute("part","file-item");h.setAttribute("role","listitem");var v=f.type,x=typeof v==="string";$APP.n(x?v.startsWith("image/"):x)&&(v=Ly("img"),v.setAttribute("part","thumbnail"),
8
+ v.src=URL.createObjectURL(f),v.setAttribute("alt",r),h.appendChild(v));l.setAttribute("part","file-name");l.textContent=r;m.setAttribute("part","file-size");v=m;f=f.size;f=f<1024?""+$APP.Q.g(f)+" B":f<1048576?""+$APP.Q.g((f/1024).toFixed(1))+" KB":f<1073741824?""+$APP.Q.g((f/1048576).toFixed(1))+" MB":""+$APP.Q.g((f/1073741824).toFixed(1))+" GB";v.textContent=f;q.setAttribute("part","remove");q.setAttribute("type","button");$APP.ah(q,"aria-label","Remove "+$APP.Q.g(r));$APP.ah(q,"data-index",""+$APP.Q.g(e));
9
+ q.textContent="×";h.appendChild(l);h.appendChild(m);h.appendChild(q);c.appendChild(h);e+=1}else break;b.textContent=d===0?"":""+$APP.Q.g(d)+" file"+$APP.Q.g($APP.M(d,1)?"s":null)+" selected"}},Yy=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,f=0;;)if(f<e)d.append(a,c[f]),f+=1;else break;b.setFormValue(d)}}},Zy=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},$y=function(a,b){var c=Uy(a);c=$APP.J(c);var d=$APP.C(c,Qy),e=$APP.C(c,Ry),f=$APP.C(c,Sy),h=$APP.C(c,Ty);c=$APP.k(a,"__xFileUploadFiles");b=Ky($APP.Bc(b),d,f,h,c.length);d=$APP.J(b);
11
+ b=$APP.C(d,Hy);d=$APP.C(d,Iy);if($APP.n(e)){e=$APP.t(b);f=null;for(var l=h=0;;)if(l<h){var m=f.F(null,l);c.push(m);l+=1}else if(e=$APP.t(e))f=e,$APP.Vc(f)?(e=$APP.Db(f),l=$APP.Eb(f),f=e,h=$APP.z(e),e=l):(e=$APP.u(f),c.push(e),e=$APP.w(f),f=null,h=0),l=0;else break}else c.length=0,$APP.t(b)&&c.push($APP.u(b));Xy(a);Yy(a);Zy(a);return $APP.P(a,"x-file-upload-select",{files:$APP.bd(b),rejected:$APP.bd($APP.he.i(function(q){var r=$APP.J(q);q=$APP.C(r,Jy);r=$APP.C(r,$APP.Yj);return{file:q,reason:r}},d))})},
12
+ az=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.p(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&&$y(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?$y(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);Xy(a);Yy(a);Zy(a);b=$APP.P(a,"x-file-upload-remove",{file:d,remaining:c.slice()})}return b}return null}}},bz=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"))}},cz=function(a){if(!$APP.n($APP.k(a,"__xFileUploadRefs"))){var b=a.attachShadow({mode:"open"}),c=Ly("style"),d=Ly("div"),e=Ly("input"),f=Ly("div"),h=Ly("slot"),l=Ly("div"),m=Ly("div"),q=Ly("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");f.setAttribute("part","content");f.appendChild(h);l.setAttribute("part","drag-overlay");l.setAttribute("hidden","");l.textContent="Drop files here";m.setAttribute("part","file-list");m.setAttribute("role","list");q.setAttribute("part","live-region");q.setAttribute("aria-live","polite");q.setAttribute("aria-atomic",
18
+ "true");d.appendChild(e);d.appendChild(f);d.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(m);b.appendChild(q);a.__xFileUploadFiles=[];a.__xFileUploadDragCtr=0;a.__xFileUploadRefs={dropZone:d,fileInput:e,content:f,dragOverlay:l,fileList:m,liveRegion:q}}b=a.attachInternals;$APP.n($APP.n(b)?$APP.p($APP.k(a,"__xFileUploadInternals")):b)&&(b=a.attachInternals(),a.__xFileUploadInternals=b);bz(a);a.__xFileUploadHandlers=az(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"))));Vy(a);
20
+ return Zy(a)},dz=function(a){bz(a);a=$APP.k(a,"__xFileUploadRefs");return $APP.n(a)?Wy($APP.k(a,"fileList")):null},ez=function(a){return $APP.n($APP.k(a,"__xFileUploadRefs"))?Vy(a):null},fz=function(a,b){$APP.bh(a,"disabled",b);return Vy(a)},gz=function(a){$APP.k(a,"__xFileUploadFiles").length=0;var b=$APP.k(a,"__xFileUploadRefs");$APP.n(b)&&Wy($APP.k(b,"fileList"));Xy(a);Yy(a);return Zy(a)},hz=function(a){$APP.fh(a,"accept","accept");$APP.fh(a,"name","name");$APP.dh(a,"multiple","multiple");$APP.dh(a,
21
+ "disabled","disabled");$APP.dh(a,"required","required");$APP.gh(a,"maxSize","max-size",0);$APP.gh(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}},jz=function(){return $APP.Yg("x-file-upload",new $APP.N(null,8,[$APP.Pg,iz,$APP.Qg,cz,$APP.Rg,dz,$APP.Sg,ez,$APP.Tg,!0,$APP.Ug,fz,$APP.Vg,gz,$APP.Wg,hz],null))},Qy=new $APP.F(null,"accept","accept",1874130431),Iy=new $APP.F(null,"rejected","rejected",231052999),Hy=new $APP.F(null,"accepted","accepted",-1953464374),Oy=new $APP.F(null,"max-size-raw","max-size-raw",1536077032),Sy=new $APP.F(null,"max-size","max-size",-874966132),Ry=new $APP.F(null,"multiple?","multiple?",-490002283),My=new $APP.F(null,
23
+ "accept-raw","accept-raw",1407413888),Ty=new $APP.F(null,"max-files","max-files",534742526),Ny=new $APP.F(null,"multiple-present?","multiple-present?",-1754894397),Jy=new $APP.F(null,"file","file",-1269645878),Py=new $APP.F(null,"max-files-raw","max-files-raw",-244409320);var iz="accept multiple max-size max-files disabled required name".split(" ");$APP.Yd(["x-file-upload-select",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[new $APP.F(null,"files","files",-472457450),$APP.ak,Iy,$APP.ak],null)],null),"x-file-upload-remove",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[Jy,$APP.vm,new $APP.F(null,"remaining","remaining",-138926777),$APP.ak],null)],null)]);$APP.ca("baredom.exports.x_file_upload.init",jz);export const init=jz;
@@ -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 MZ=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var f=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.B.i(f,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},OZ=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 f=$APP.Lf([$APP.Ch,$APP.Mm,$APP.Rj,
3
+ $APP.hk,$APP.Fh,$APP.cj,$APP.Xk,$APP.Dh,$APP.yj,$APP.Hj,$APP.Xj],[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.J(f),l=$APP.C(h,$APP.Xj),m=$APP.C(h,$APP.Ch),q=$APP.C(h,$APP.Mm);f=$APP.C(h,$APP.Rj);var r=$APP.C(h,$APP.hk),v=$APP.C(h,$APP.Fh),x=$APP.C(h,
4
+ $APP.cj),y=$APP.C(h,$APP.Xk),A=$APP.C(h,$APP.Dh),D=$APP.C(h,$APP.yj),G=$APP.C(h,$APP.Hj);h=$APP.n(f)?f:"";var I=$APP.n(r)?r:"",H=$APP.n(m)?m:"",K=[$APP.xj,$APP.ro,$APP.Mn,$APP.Dj,$APP.Nk,$APP.Gh,$APP.Pm,$APP.R,$APP.jm,$APP.rn,$APP.X,$APP.Nj,$APP.tn,$APP.Y];x=$APP.E(x);y=$APP.E(y);l=$APP.n(l)?l:"";r=typeof r==="string"&&$APP.M(r,"")&&r!=null;q=$APP.n(q)?q:"";A=$APP.n(A)?A:"";m=typeof m==="string"&&$APP.M(m,"")&&m!=null;G=typeof G==="string"&&$APP.Zc(NZ,G)?G:"text";f=$APP.Lf(K,[x,y,l,r,q,A,m,G,typeof f===
5
+ "string"&&$APP.M(f,"")&&f!=null,I,H,h,$APP.n(D)?D:"",$APP.E(v)]);v=$APP.jm.g(f);D=$APP.Dj.g(f);h=$APP.Pm.g(f);d.type=$APP.R.g(f);d.name=$APP.Nk.g(f);d.placeholder=$APP.Mn.g(f);d.disabled=$APP.Y.g(f);d.readOnly=$APP.ro.g(f);d.required=$APP.xj.g(f);d.autocomplete=$APP.tn.g(f);$APP.ah(d,"aria-required",$APP.n($APP.xj.g(f))?"true":"false");d.setAttribute("aria-invalid",$APP.n(v)?"true":"false");I=$APP.n($APP.n(D)?v:D)?"hint error":$APP.n(D)?"hint":$APP.n(v)?"error":null;$APP.n(I)?d.setAttribute("aria-describedby",
6
+ I):d.removeAttribute("aria-describedby");c.textContent=$APP.X.g(f);$APP.n(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.rn.g(f);$APP.n(D)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Nj.g(f);$APP.n(v)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");$APP.bh(a,"data-invalid",v);c=$APP.k(a,"__xFormFieldInternals");return $APP.n(c)?MZ(a,c,d):null}return null},PZ=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),MZ(a,e,b));return $APP.P(a,"x-form-field-input",{name:d,value:c})}return null}},QZ=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),MZ(a,
8
+ e,b));return $APP.P(a,"x-form-field-change",{name:d,value:c})}return null}},RZ=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},SZ=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return OZ(a)},TZ=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 OZ(a)},UZ=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"),f=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");f.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");f.appendChild(h);
11
+ d.appendChild(e);d.appendChild(f);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)}RZ(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=PZ(a),d=QZ(a),b.addEventListener("input",c),b.addEventListener("change",d),a.__xFormFieldHandlers={input:c,change:d});return OZ(a)},VZ=function(a){return RZ(a)},WZ=function(a,b,c,d){$APP.B.i(b,"value")&&(b=$APP.k(a,"__xFormFieldRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),$APP.M(b.value,d)&&(b.value=$APP.n(d)?d:"")));return OZ(a)},XZ=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.M(b)?""+$APP.Q.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xFormFieldRefs");return $APP.n(c)?$APP.k(c,"input").value=b:null}})},YZ=function(a){XZ(a);$APP.eh(a,"label","label","");$APP.eh(a,"type","type","");$APP.eh(a,"name","name","");$APP.eh(a,"placeholder","placeholder","");$APP.eh(a,"autocomplete","autocomplete","");$APP.dh(a,"disabled","disabled");$APP.dh(a,"readOnly","readonly");return $APP.dh(a,
14
+ "required","required")},$Z=function(){return $APP.Yg("x-form-field",new $APP.N(null,8,[$APP.Pg,ZZ,$APP.Qg,UZ,$APP.Rg,VZ,$APP.Sg,WZ,$APP.Tg,!0,$APP.Ug,SZ,$APP.Vg,TZ,$APP.Wg,YZ],null))};var ZZ="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),NZ=new $APP.O(null,new $APP.N(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
15
+ $APP.Lf([$APP.Mn,$APP.al,$APP.Nk,$APP.Gh,$APP.hh,$APP.R,$APP.X,$APP.tn,$APP.Ll],[new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"placeholder"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"name"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"type"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),new $APP.N(null,2,[$APP.R,
16
+ $APP.U,$APP.S,"autocomplete"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"required"],null)]);$APP.Yd(["x-form-field-input",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Nk,$APP.U,$APP.Gh,$APP.U],null)],null),"x-form-field-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Nk,$APP.U,$APP.Gh,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_form_field.init",$Z);export const init=$Z;