@vanelsas/baredom 2.7.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 (107) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/custom-elements.json +344 -5
  3. package/dist/baredom.d.ts +4 -0
  4. package/dist/base.js +451 -427
  5. package/dist/integrity.json +97 -93
  6. package/dist/x-alert.js +17 -18
  7. package/dist/x-avatar-group.js +9 -10
  8. package/dist/x-avatar.js +15 -15
  9. package/dist/x-badge.js +9 -10
  10. package/dist/x-bento-grid.js +5 -5
  11. package/dist/x-bento-item.js +4 -4
  12. package/dist/x-breadcrumbs.js +13 -14
  13. package/dist/x-button.js +16 -18
  14. package/dist/x-cancel-dialogue.js +13 -17
  15. package/dist/x-card.js +7 -7
  16. package/dist/x-carousel.js +33 -34
  17. package/dist/x-chart.d.ts +26 -0
  18. package/dist/x-chart.js +47 -46
  19. package/dist/x-checkbox.js +11 -10
  20. package/dist/x-chip.js +1 -9
  21. package/dist/x-collapse.js +10 -10
  22. package/dist/x-color-picker.js +44 -44
  23. package/dist/x-combobox.js +26 -26
  24. package/dist/x-command-palette.js +26 -26
  25. package/dist/x-container.js +4 -4
  26. package/dist/x-context-menu.d.ts +31 -2
  27. package/dist/x-context-menu.js +20 -18
  28. package/dist/x-copy.js +20 -23
  29. package/dist/x-currency-field.js +23 -23
  30. package/dist/x-date-picker.d.ts +27 -0
  31. package/dist/x-date-picker.js +42 -41
  32. package/dist/x-divider.js +9 -9
  33. package/dist/x-drawer.js +10 -11
  34. package/dist/x-dropdown.js +11 -10
  35. package/dist/x-fieldset.js +5 -6
  36. package/dist/x-file-download.js +7 -7
  37. package/dist/x-file-upload.js +20 -20
  38. package/dist/x-form-field.js +15 -15
  39. package/dist/x-form.js +9 -8
  40. package/dist/x-gaussian-blur.js +13 -19
  41. package/dist/x-grid.js +6 -6
  42. package/dist/x-i18n-provider.d.ts +43 -0
  43. package/dist/x-i18n-provider.js +8 -0
  44. package/dist/x-i18n.d.ts +14 -0
  45. package/dist/x-i18n.js +5 -0
  46. package/dist/x-icon.js +6 -7
  47. package/dist/x-image.js +18 -19
  48. package/dist/x-kinetic-canvas.d.ts +18 -0
  49. package/dist/x-kinetic-canvas.js +26 -0
  50. package/dist/x-kinetic-font.js +27 -28
  51. package/dist/x-kinetic-typography.js +33 -39
  52. package/dist/x-liquid-dock.js +39 -39
  53. package/dist/x-liquid-fill.js +45 -45
  54. package/dist/x-liquid-glass.js +47 -47
  55. package/dist/x-menu-item.js +8 -9
  56. package/dist/x-menu.js +10 -11
  57. package/dist/x-metaball-cursor.js +27 -27
  58. package/dist/x-modal.js +11 -12
  59. package/dist/x-morph-stack.js +37 -38
  60. package/dist/x-multi-combobox.d.ts +50 -0
  61. package/dist/x-multi-combobox.js +37 -0
  62. package/dist/x-navbar.js +12 -12
  63. package/dist/x-neural-glow.js +33 -33
  64. package/dist/x-notification-center.js +9 -9
  65. package/dist/x-organic-divider.js +17 -18
  66. package/dist/x-organic-progress.js +38 -38
  67. package/dist/x-organic-shape.js +13 -13
  68. package/dist/x-pagination.js +15 -16
  69. package/dist/x-particle-button.js +51 -51
  70. package/dist/x-popover.js +26 -24
  71. package/dist/x-progress-circle.js +9 -10
  72. package/dist/x-progress.js +10 -11
  73. package/dist/x-radio.js +11 -10
  74. package/dist/x-ripple-effect.js +11 -12
  75. package/dist/x-scroll-parallax.js +18 -19
  76. package/dist/x-scroll-stack.js +17 -18
  77. package/dist/x-scroll-story.js +34 -36
  78. package/dist/x-scroll-timeline.js +45 -46
  79. package/dist/x-scroll.js +40 -41
  80. package/dist/x-search-field.js +15 -15
  81. package/dist/x-select.js +10 -9
  82. package/dist/x-sidebar.js +17 -17
  83. package/dist/x-skeleton-group.js +12 -12
  84. package/dist/x-skeleton.js +1 -1
  85. package/dist/x-slider.js +15 -16
  86. package/dist/x-soft-body.js +22 -22
  87. package/dist/x-spacer.js +4 -5
  88. package/dist/x-spinner.js +4 -5
  89. package/dist/x-splash.js +12 -13
  90. package/dist/x-stat.js +10 -12
  91. package/dist/x-stepper.js +14 -15
  92. package/dist/x-switch.js +10 -9
  93. package/dist/x-tab.js +7 -8
  94. package/dist/x-table-cell.js +20 -24
  95. package/dist/x-table-row.js +8 -9
  96. package/dist/x-table.js +12 -15
  97. package/dist/x-tabs.js +11 -11
  98. package/dist/x-text-area.js +18 -18
  99. package/dist/x-theme.js +25 -25
  100. package/dist/x-timeline-item.js +21 -23
  101. package/dist/x-timeline.js +8 -9
  102. package/dist/x-toast.js +22 -24
  103. package/dist/x-toaster.js +8 -8
  104. package/dist/x-tooltip.js +12 -11
  105. package/dist/x-typography.js +9 -11
  106. package/dist/x-welcome-tour.js +60 -64
  107. package/package.json +21 -1
package/dist/x-copy.js CHANGED
@@ -1,25 +1,22 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var KF=function(a){return a==null?!0:$APP.B.i(a,"false")?!1:$APP.B.i(a,"0")?!1:!0},LF=function(a){return typeof a==="string"&&$APP.N(a,"")?(a=parseInt(a,10),$APP.q(isNaN(a))&&a>0?a:1200):1200},MF=function(a){return Math.min(1E4,Math.max(100,a))},$F=function(a){var b=$APP.M(a);a=$APP.D(b,NF);var c=$APP.D(b,OF),d=$APP.D(b,PF),e=$APP.D(b,$APP.bi),g=$APP.D(b,$APP.Pl),h=$APP.D(b,QF),l=$APP.D(b,RF),m=$APP.D(b,$APP.fm),p=$APP.D(b,SF);b=$APP.D(b,TF);return $APP.zf([UF,$APP.Oj,VF,WF,XF,$APP.qi,YF,$APP.X,ZF,
3
- $APP.Ul],[KF(b),$APP.B.i(g,"html")?"html":"text",typeof l==="string"&&$APP.N(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():null,MF(LF(c)),typeof d==="string"&&$APP.N(d.trim(),"")?d.trim():null,function(){var r;if(r=typeof h==="string")r=(r=$APP.N(h,""))?h:r;return $APP.n(r)?r:"Copy failed"}(),$APP.F(m),function(){var r;if(r=typeof p==="string")r=(r=$APP.N(p,""))?p:r;return $APP.n(r)?r:"Copied"}(),typeof e==="string"&&$APP.N(e.trim(),"")?e.trim():null])},aG=function(a){var b=
4
- $APP.M(a);a=$APP.D(b,$APP.Ul);var c=$APP.D(b,$APP.qi),d=$APP.D(b,VF);b=$APP.D(b,$APP.Oj);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},bG=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
2
+ var JH=function(a){return a==null?!0:$APP.B.i(a,"false")?!1:$APP.B.i(a,"0")?!1:!0},KH=function(a){return typeof a==="string"&&$APP.M(a,"")?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:1200):1200},LH=function(a){return Math.min(1E4,Math.max(100,a))},ZH=function(a){var b=$APP.J(a);a=$APP.C(b,MH);var c=$APP.C(b,NH),d=$APP.C(b,OH),e=$APP.C(b,$APP.$i),f=$APP.C(b,$APP.Jm),h=$APP.C(b,PH),l=$APP.C(b,QH),m=$APP.C(b,$APP.Fh),q=$APP.C(b,RH);b=$APP.C(b,SH);return $APP.Lf([TH,$APP.Jk,UH,VH,WH,$APP.kj,XH,$APP.Y,YH,
3
+ $APP.Om],[JH(b),$APP.B.i(f,"html")?"html":"text",typeof l==="string"&&$APP.M(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.M(a.trim(),"")?a.trim():null,LH(KH(c)),typeof d==="string"&&$APP.M(d.trim(),"")?d.trim():null,function(){var r;if(r=typeof h==="string")r=(r=$APP.M(h,""))?h:r;return $APP.n(r)?r:"Copy failed"}(),$APP.E(m),function(){var r;if(r=typeof q==="string")r=(r=$APP.M(q,""))?q:r;return $APP.n(r)?r:"Copied"}(),typeof e==="string"&&$APP.M(e.trim(),"")?e.trim():null])},$H=function(a){var b=
4
+ $APP.J(a);a=$APP.C(b,$APP.Om);var c=$APP.C(b,$APP.kj),d=$APP.C(b,UH);b=$APP.C(b,$APP.Jk);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},aI=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),f=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
5
5
  c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-copy-tooltip-bg:var(--x-color-bg,#1e293b);--x-copy-tooltip-fg:var(--x-color-text,#f8fafc);--x-copy-tooltip-success-bg:var(--x-color-primary,#15803d);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#b91c1c);--x-copy-tooltip-error-fg:#fef2f2;--x-copy-tooltip-radius:var(--x-radius-md,6px);--x-copy-tooltip-padding:4px 8px;--x-copy-tooltip-font-size:var(--x-font-size-sm,0.8125rem);--x-copy-tooltip-z:100;}@media (prefers-color-scheme:dark){:host{--x-copy-tooltip-bg:var(--x-color-bg,#0f172a);--x-copy-tooltip-fg:var(--x-color-text,#e2e8f0);--x-copy-tooltip-success-bg:var(--x-color-primary,#166534);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#991b1b);--x-copy-tooltip-error-fg:#fee2e2;}}[part\x3dwrap]{display:inline-flex;align-items:center;justify-content:center;}[part\x3dtrigger]{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;}[part\x3dtrigger]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}:host([disabled]) [part\x3dtrigger]{opacity:0.55;pointer-events:none;cursor:default;}[part\x3dtooltip]{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--x-copy-tooltip-bg);color:var(--x-copy-tooltip-fg);border-radius:var(--x-copy-tooltip-radius);padding:var(--x-copy-tooltip-padding);font-size:var(--x-copy-tooltip-font-size);z-index:var(--x-copy-tooltip-z);pointer-events:none;}:host([data-tooltip-open]) [part\x3dtooltip]{display:block;}:host([data-tooltip-kind\x3dsuccess]) [part\x3dtooltip]{background:var(--x-copy-tooltip-success-bg);color:var(--x-copy-tooltip-success-fg);}:host([data-tooltip-kind\x3derror]) [part\x3dtooltip]{background:var(--x-copy-tooltip-error-bg);color:var(--x-copy-tooltip-error-fg);}@media (prefers-reduced-motion:reduce){[part\x3dtrigger]{transition:none;}}";
6
- d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},cG=function(a){return $F($APP.zf([PF,
7
- $APP.bi,$APP.Pl,QF,RF,$APP.fm,SF,TF,NF,OF],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},dG=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.N(b,""))return b;b=a.getAttribute("from");
8
- return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},eG=function(a){var b=dG(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Zh(new $APP.O(null,
9
- 1,5,$APP.P,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var g=document.createElement("textarea");g.value=b;document.body.appendChild(g);g.select();document.execCommand("copy");g.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
10
- d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},fG=function(a,b,c,d){var e=
11
- $APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},gG=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);
12
- var b=cG(a),c=aG(b);return $APP.Rg(a,"x-copy-request",c)?eG(a).then(function(d){$APP.Qg(a,"x-copy-success",{text:$APP.n(d)?d:""});$APP.n(UF.g(b))&&fG(a,"success",ZF.g(b),XF.g(b));return d}).catch(function(d){$APP.Qg(a,"x-copy-error",{error:""+$APP.S.g(d)});$APP.n(UF.g(b))&&fG(a,"error",YF.g(b),XF.g(b));return Promise.reject(d)}):Promise.resolve(null)},hG=function(a,b){if(typeof b==="string"&&$APP.N(b,"")){var c=b.toLowerCase().split("+");b=$APP.xc(c);var d=$APP.F($APP.Td(function(h){return $APP.B.i(h,
13
- "ctrl")},c)),e=$APP.F($APP.Td(function(h){return $APP.B.i(h,"shift")},c)),g=$APP.F($APP.Td(function(h){return $APP.B.i(h,"alt")},c));c=$APP.F($APP.Td(function(h){return $APP.B.i(h,"meta")},c));return $APP.B.i(a.key.toLowerCase(),b)&&$APP.B.i(d,a.ctrlKey)&&$APP.B.i(e,a.shiftKey)&&$APP.B.i(g,a.altKey)&&$APP.B.i(c,a.metaKey)}return null},iG=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.n(hG(e,g))?(e.preventDefault(),gG(a)):null}function c(){return gG(a)}var d=bG(a);$APP.k(d,"trigger").addEventListener("click",
14
- c);document.addEventListener("keydown",b);$APP.ja(a,"__xCopyHandlers",{click:c,keydown:b})},jG=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},kG=function(a){var b=bG(a),c=a.hasAttribute("disabled");
15
- $APP.k(b,"trigger").disabled=$APP.F(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},lG=function(a){bG(a);jG(a);iG(a);kG(a);return null},mG=function(a){jG(a);return null},nG=function(a,b,c,d){$APP.N(c,d)&&kG(a);return null},oG=function(a){for(var b=$APP.t(new $APP.O(null,7,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["text","text"],null),new $APP.O(null,2,5,$APP.P,["from","from"],null),new $APP.O(null,2,5,$APP.P,["fromAttr","from-attr"],null),new $APP.O(null,2,5,$APP.P,
16
- ["mode","mode"],null),new $APP.O(null,2,5,$APP.P,["successMessage","success-message"],null),new $APP.O(null,2,5,$APP.P,["errorMessage","error-message"],null),new $APP.O(null,2,5,$APP.P,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null);Object.defineProperty(a,h,{get:function(r,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,g,h,l),set:function(r,v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):
17
- this.setAttribute(E,""+$APP.S.g(H))}}(b,c,d,e,g,h,l),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.xb(g),e=$APP.yb(g),c=b,d=$APP.z(b),b=e;else{l=$APP.u(g);var m=$APP.Ac(l,0,null),p=$APP.Ac(l,1,null);Object.defineProperty(a,m,{get:function(r,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,l,m,p,g,h),set:function(r,v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.S.g(H))}}(b,c,d,e,l,m,p,g,h),
18
- enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(r){return $APP.n(r)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return KF(this.getAttribute("show-tooltip"))},set:function(r){return $APP.n(r)?this.setAttribute("show-tooltip","true"):this.setAttribute("show-tooltip","false")},
19
- enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return LF(this.getAttribute("tooltip-ms"))},set:function(r){return r==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.S.g(r|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(r){this.__xCopyTextValue=typeof r==="string"?r:void 0},enumerable:!0,configurable:!0});return Object.defineProperty(a,"copy",
20
- {value:function(){return gG(this)},enumerable:!0,configurable:!0,writable:!0})},qG=function(){return $APP.Lg("x-copy",new $APP.Q(null,5,[$APP.Cg,pG,$APP.Dg,lG,$APP.Eg,mG,$APP.Fg,nG,$APP.Jg,oG],null))},UF=new $APP.K(null,"show-tooltip?","show-tooltip?",-1214081087),OF=new $APP.K(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),ZF=new $APP.K(null,"success-message","success-message",-96541601),QF=new $APP.K(null,"error-message-raw","error-message-raw",1910536231),WF=new $APP.K(null,"hotkey","hotkey",
21
- -329017295),YF=new $APP.K(null,"error-message","error-message",1756021561),rG=new $APP.K(null,"fromAttr","fromAttr",-1768252533),RF=new $APP.K(null,"from-attr-raw","from-attr-raw",761657416),XF=new $APP.K(null,"tooltip-ms","tooltip-ms",1062450417),SF=new $APP.K(null,"success-message-raw","success-message-raw",388691116),PF=new $APP.K(null,"from-raw","from-raw",-44462428),VF=new $APP.K(null,"from-attr","from-attr",1217901743),NF=new $APP.K(null,"hotkey-raw","hotkey-raw",1972404222),TF=new $APP.K(null,
22
- "show-tooltip-raw","show-tooltip-raw",453600717);var pG="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
23
- $APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.kk,new $APP.K(null,"textValue","textValue",-598870870),$APP.Oj,rG,new $APP.K(null,"tooltipMs","tooltipMs",1056463375),WF,$APP.qi,new $APP.K(null,"showTooltip","showTooltip",482349691),new $APP.K(null,"successMessage","successMessage",-789572803),$APP.Ul],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"error-message"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"disabled"],null),new $APP.Q(null,3,[$APP.Z,$APP.Y,$APP.$k,null,new $APP.K(null,
24
- "note","note",1426297904),"property-only override"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"mode"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"from-attr"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.$k,"tooltip-ms"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"hotkey"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"from"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"show-tooltip"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"success-message"],null),new $APP.Q(null,2,[$APP.Z,
25
- $APP.Y,$APP.$k,"text"],null)]);$APP.Pd(["x-copy-request",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,4,[$APP.Ul,$APP.Y,$APP.Oj,$APP.Y,$APP.qi,$APP.Y,rG,$APP.Y],null)],null),"x-copy-success",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Ul,$APP.Y],null)],null),"x-copy-error",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Wi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_copy.init",qG);export const init=qG;
6
+ d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(f);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},bI=function(a){return ZH($APP.Lf([OH,
7
+ $APP.$i,$APP.Jm,PH,QH,$APP.Fh,RH,SH,MH,NH],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},cI=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.M(b,""))return b;b=a.getAttribute("from");
8
+ return typeof b==="string"&&$APP.M(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.M(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},dI=function(a){var b=cI(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Xi(new $APP.De(null,
9
+ 1,5,$APP.Ee,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var f=document.createElement("textarea");f.value=b;document.body.appendChild(f);f.select();document.execCommand("copy");f.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.g?e.g(f):e.call(null,f);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
10
+ d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return f=document.createElement("textarea"),f.value=b,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select(),document.execCommand("copy"),f.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.g?e.g(f):e.call(null,f);throw h;}}})},eI=function(a,b,c,d){var e=
11
+ $APP.k(a,"__xCopyRefs");if($APP.n(e)){var f=$APP.k(a,"__xCopyTid");$APP.n(f)&&(clearTimeout(f),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.fa(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},fI=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);
12
+ var b=bI(a),c=$H(b);return $APP.ch(a,"x-copy-request",c)?dI(a).then(function(d){$APP.P(a,"x-copy-success",{text:$APP.n(d)?d:""});$APP.n(TH.g(b))&&eI(a,"success",YH.g(b),WH.g(b));return d}).catch(function(d){$APP.P(a,"x-copy-error",{error:""+$APP.Q.g(d)});$APP.n(TH.g(b))&&eI(a,"error",XH.g(b),WH.g(b));return Promise.reject(d)}):Promise.resolve(null)},gI=function(a,b){if(typeof b==="string"&&$APP.M(b,"")){var c=b.toLowerCase().split("+");b=$APP.Ec(c);var d=$APP.E($APP.be(function(h){return $APP.B.i(h,
13
+ "ctrl")},c)),e=$APP.E($APP.be(function(h){return $APP.B.i(h,"shift")},c)),f=$APP.E($APP.be(function(h){return $APP.B.i(h,"alt")},c));c=$APP.E($APP.be(function(h){return $APP.B.i(h,"meta")},c));return $APP.B.i(a.key.toLowerCase(),b)&&$APP.B.i(d,a.ctrlKey)&&$APP.B.i(e,a.shiftKey)&&$APP.B.i(f,a.altKey)&&$APP.B.i(c,a.metaKey)}return null},hI=function(a){function b(e){var f=a.getAttribute("hotkey");return $APP.n(gI(e,f))?(e.preventDefault(),fI(a)):null}function c(){return fI(a)}var d=aI(a);$APP.k(d,"trigger").addEventListener("click",
14
+ c);document.addEventListener("keydown",b);$APP.fa(a,"__xCopyHandlers",{click:c,keydown:b})},iI=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},jI=function(a){var b=aI(a),c=a.hasAttribute("disabled");
15
+ $APP.k(b,"trigger").disabled=$APP.E(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},kI=function(a){aI(a);iI(a);hI(a);jI(a);return null},lI=function(a){iI(a);return null},mI=function(a,b,c,d){$APP.M(c,d)&&jI(a);return null},nI=function(a){$APP.fh(a,"text","text");$APP.fh(a,"from","from");$APP.fh(a,"fromAttr","from-attr");$APP.fh(a,"mode","mode");$APP.fh(a,"successMessage","success-message");$APP.fh(a,"errorMessage","error-message");$APP.fh(a,"hotkey","hotkey");
16
+ $APP.dh(a,"disabled","disabled");Object.defineProperty(a,"showTooltip",{get:function(){return JH(this.getAttribute("show-tooltip"))},set:function(b){return $APP.n(b)?this.setAttribute("show-tooltip","true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return KH(this.getAttribute("tooltip-ms"))},set:function(b){return b==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.Q.g(b|0))},enumerable:!0,
17
+ configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(b){this.__xCopyTextValue=typeof b==="string"?b:void 0},enumerable:!0,configurable:!0});return Object.defineProperty(a,"copy",{value:function(){return fI(this)},enumerable:!0,configurable:!0,writable:!0})},pI=function(){return $APP.Yg("x-copy",new $APP.N(null,5,[$APP.Pg,oI,$APP.Qg,kI,$APP.Rg,lI,$APP.Sg,mI,$APP.Wg,nI],null))},TH=new $APP.F(null,"show-tooltip?","show-tooltip?",-1214081087),
18
+ NH=new $APP.F(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),YH=new $APP.F(null,"success-message","success-message",-96541601),PH=new $APP.F(null,"error-message-raw","error-message-raw",1910536231),VH=new $APP.F(null,"hotkey","hotkey",-329017295),XH=new $APP.F(null,"error-message","error-message",1756021561),qI=new $APP.F(null,"fromAttr","fromAttr",-1768252533),QH=new $APP.F(null,"from-attr-raw","from-attr-raw",761657416),WH=new $APP.F(null,"tooltip-ms","tooltip-ms",1062450417),RH=new $APP.F(null,
19
+ "success-message-raw","success-message-raw",388691116),OH=new $APP.F(null,"from-raw","from-raw",-44462428),UH=new $APP.F(null,"from-attr","from-attr",1217901743),MH=new $APP.F(null,"hotkey-raw","hotkey-raw",1972404222),SH=new $APP.F(null,"show-tooltip-raw","show-tooltip-raw",453600717);var oI="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
20
+ $APP.Lf([new $APP.F(null,"errorMessage","errorMessage",982744869),$APP.al,new $APP.F(null,"textValue","textValue",-598870870),$APP.Jk,qI,new $APP.F(null,"tooltipMs","tooltipMs",1056463375),VH,$APP.kj,new $APP.F(null,"showTooltip","showTooltip",482349691),new $APP.F(null,"successMessage","successMessage",-789572803),$APP.Om],[new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"error-message"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,null,new $APP.F(null,
21
+ "note","note",1426297904),"property-only override"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"mode"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"from-attr"],null),new $APP.N(null,2,[$APP.R,$APP.V,$APP.S,"tooltip-ms"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"hotkey"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"from"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"show-tooltip"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"success-message"],null),new $APP.N(null,2,[$APP.R,$APP.U,
22
+ $APP.S,"text"],null)]);$APP.Yd(["x-copy-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,4,[$APP.Om,$APP.U,$APP.Jk,$APP.U,$APP.kj,$APP.U,qI,$APP.U],null)],null),"x-copy-success",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Om,$APP.U],null)],null),"x-copy-error",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Nj,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_copy.init",pI);export const init=pI;
@@ -1,24 +1,24 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var VR=function(a){a=(""+$APP.S.g($APP.n(a)?a:"")).trim().toUpperCase();return $APP.B.i(a,"")?"USD":a},WR=function(a,b){try{var c=(new Intl.NumberFormat($APP.B.i(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.Td(function(e){return $APP.B.i("currency",e.type)?e.value:null},$APP.uc(c));return $APP.n(d)?d:a}catch(e){return a}},YR=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.B.i(b,"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},
3
- ZR=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),g=document.createElement("div"),h=document.createElement("span"),l=document.createElement("input"),m=document.createElement("span"),p=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-currency-field-bg:var(--x-color-surface,#ffffff);--x-currency-field-color:var(--x-color-text,#111827);--x-currency-field-border:1px solid var(--x-color-border,#d1d5db);--x-currency-field-border-radius:var(--x-radius-md,6px);--x-currency-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-currency-field-symbol-color:var(--x-color-text-muted,#6b7280);--x-currency-field-label-color:var(--x-color-text-muted,#374151);--x-currency-field-hint-color:var(--x-color-text-muted,#6b7280);--x-currency-field-error-color:var(--x-color-danger,#dc2626);--x-currency-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-currency-field-bg:var(--x-color-surface-hover,#1f2937);--x-currency-field-color:var(--x-color-text,#f9fafb);--x-currency-field-border:1px solid var(--x-color-border,#4b5563);--x-currency-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-currency-field-symbol-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-label-color:var(--x-color-text-muted,#d1d5db);--x-currency-field-hint-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-error-color:var(--x-color-danger,#f87171);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:0.875rem;font-weight:500;color:var(--x-currency-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:flex;align-items:center;background:var(--x-currency-field-bg);border:var(--x-currency-field-border);border-radius:var(--x-currency-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput-wrapper]:focus-within{border-color:var(--x-currency-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput-wrapper]{border-color:var(--x-currency-field-error-color);}:host([data-invalid]) [part\x3dinput-wrapper]:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-error-color) 20%,transparent);}[part\x3dsymbol]{flex-shrink:0;padding:0.5rem 0 0.5rem 0.75rem;font-size:1rem;color:var(--x-currency-field-symbol-color);user-select:none;pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.75rem;background:transparent;color:var(--x-currency-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]:disabled{opacity:1;cursor:not-allowed;}:host([disabled]) [part\x3dinput-wrapper]{opacity:var(--x-currency-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-currency-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-currency-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput-wrapper]{transition:none;}}";
4
- d.setAttribute("part","field");e.setAttribute("part","label");e.setAttribute("id","label");e.setAttribute("for","input");g.setAttribute("part","input-wrapper");h.setAttribute("part","symbol");h.setAttribute("aria-hidden","true");l.setAttribute("part","input");l.setAttribute("id","input");l.setAttribute("inputmode","decimal");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",
5
- "error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");g.appendChild(h);g.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(m);d.appendChild(p);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:g,symbol:h,input:l,hint:m,error:p}},$R=function(a,b,c,d){var e=a.hasAttribute("error");var g=a.getAttribute("error");g=$APP.n(g)?g:"";var h=a.hasAttribute("required"),l=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var p=
6
- $APP.q(isNaN(a));l=$APP.n(l)?parseFloat(l):null;m=$APP.n(m)?parseFloat(m):null;return $APP.n(e)?b.setValidity({customError:!0},g,c):$APP.n($APP.n(h)?$APP.B.i(d,""):h)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):$APP.N(d,"")&&!p?b.setValidity({badInput:!0},"Please enter a valid number.",c):$APP.n(p?$APP.n(l)?$APP.q(isNaN(l))&&a<l:l:p)?b.setValidity({rangeUnderflow:!0},"Value must be at least "+$APP.S.g(l)+".",c):$APP.n(p?$APP.n(m)?$APP.q(isNaN(m))&&a>m:m:p)?b.setValidity({rangeOverflow:!0},
7
- "Value must be at most "+$APP.S.g(m)+".",c):b.setValidity({},"",c)},eS=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"symbol"),e=$APP.k(b,"input"),g=$APP.k(b,"hint");b=$APP.k(b,"error");var h=$APP.zf([$APP.Hi,aS,$APP.Sl,$APP.aj,$APP.rj,$APP.fm,bS,$APP.ei,$APP.rl,$APP.dk,$APP.Wm,cS,$APP.gj],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),
8
- a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.M(h);h=$APP.D(l,$APP.gj);var m=$APP.D(l,$APP.Hi),p=$APP.D(l,aS),r=$APP.D(l,$APP.Sl),v=$APP.D(l,$APP.aj),x=$APP.D(l,$APP.rj),y=$APP.D(l,$APP.fm),A=$APP.D(l,bS),C=$APP.D(l,$APP.ei),E=$APP.D(l,$APP.rl),H=$APP.D(l,$APP.dk),G=$APP.D(l,$APP.Wm);l=$APP.D(l,cS);var J=$APP.n(v)?v:"",U=$APP.n(x)?x:"",aa=$APP.n(m)?m:"";h=$APP.zf([$APP.Bk,$APP.Ei,
9
- $APP.wn,$APP.Rm,$APP.Mi,$APP.xn,$APP.Sj,$APP.pj,$APP.Vl,$APP.sl,$APP.qm,dS,$APP.nl,$APP.T,$APP.Wi,$APP.X],[$APP.n(A)?A:"",$APP.F(C),$APP.F(H),$APP.n(h)?h:"",typeof x==="string"&&$APP.N(x,""),$APP.n(l)?l:"",$APP.n(r)?r:"",$APP.n(G)?G:"",typeof m==="string"&&$APP.N(m,""),typeof v==="string"&&$APP.N(v,""),U,VR(p),$APP.n(E)?E:"",aa,J,$APP.F(y)]);m=$APP.sl.g(h);$APP.n(m)?p=null:(v=$APP.M(h),p=$APP.D(v,$APP.pj),r=$APP.D(v,$APP.Bk),v=$APP.D(v,$APP.nl),x=parseFloat(p),y=$APP.N(p,"")&&$APP.q(isNaN(x)),A=$APP.N(r,
10
- "")?parseFloat(r):null,C=$APP.N(v,"")?parseFloat(v):null,p=$APP.N(p,"")&&!y?"Please enter a valid number.":$APP.n(y?$APP.n(A)?$APP.q(isNaN(A))&&x<A:A:y)?"Value must be at least "+$APP.S.g(r)+".":$APP.n(y?$APP.n(C)?$APP.q(isNaN(C))&&x>C:C:y)?"Value must be at most "+$APP.S.g(v)+".":"");r=p;p=$APP.n(m)?m:$APP.N($APP.n(r)?r:"","");m=$APP.n(m)?$APP.Wi.g(h):$APP.n(r)?r:"";r=$APP.Mi.g(h);v=$APP.Vl.g(h);y=dS.g(h);x=$APP.xn.g(h);d.textContent=WR(y,x);e.name=$APP.Sj.g(h);e.placeholder=$APP.Rm.g(h);e.disabled=
11
- $APP.X.g(h);e.readOnly=$APP.wn.g(h);e.required=$APP.Ei.g(h);$APP.Og(e,"aria-required",$APP.n($APP.Ei.g(h))?"true":"false");e.setAttribute("aria-invalid",$APP.n(p)?"true":"false");d=$APP.n($APP.n(r)?p:r)?"hint error":$APP.n(r)?"hint":$APP.n(p)?"error":null;$APP.n(d)?e.setAttribute("aria-describedby",d):e.removeAttribute("aria-describedby");$APP.B.i(e,a.shadowRoot.activeElement)||(d=$APP.pj.g(h),e.value=$APP.B.i(d,"")?"":YR(d,x));c.textContent=$APP.T.g(h);$APP.n(v)?c.classList.remove("label-hidden"):
12
- c.classList.add("label-hidden");g.textContent=$APP.qm.g(h);$APP.n(r)?g.classList.remove("hint-hidden"):g.classList.add("hint-hidden");b.textContent=m;$APP.n(p)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");$APP.Pg(a,"data-invalid",p);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(g=a.getAttribute("value"),a=$R(a,c,e,$APP.n(g)?g:"")):a=null;return a}return null},fS=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=
13
- a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}},gS=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=function(){var g=a.getAttribute("value");return $APP.n(g)?g:""}(),e=function(){var g=a.getAttribute("name");return $APP.n(g)?g:""}();return $APP.Rg(a,"x-currency-field-change-request",{name:e,value:c,previousValue:d})?(d=$APP.k(a,"__xCurrencyFieldInternals"),$APP.n(d)&&(d.setFormValue(c),$R(a,d,b,c)),$APP.Qg(a,
14
- "x-currency-field-input",{name:e,value:c})):b.value=d}return null}},hS=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.S.g(d);var e=function(){var g=a.getAttribute("value");return $APP.n(g)?g:""}();d=function(){var g=a.getAttribute("name");return $APP.n(g)?g:""}();return $APP.Rg(a,"x-currency-field-change-request",{name:d,value:c,previousValue:e})?(a.setAttribute("value",c),e=$APP.k(a,
15
- "__xCurrencyFieldInternals"),$APP.n(e)&&(e.setFormValue(c),$R(a,e,b,c)),$APP.Qg(a,"x-currency-field-change",{name:d,value:c})):b.value=e}return null}},iS=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=fS(a),d=gS(a),e=hS(a);b.addEventListener("focus",c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},jS=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xCurrencyFieldHandlers");
16
- if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("focus",$APP.k(c,"focus"));b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xCurrencyFieldHandlers=null;return}}return null},kS=function(a,b){$APP.Pg(a,"disabled",$APP.F(b));return eS(a)},lS=function(a){a.removeAttribute("value");var b=$APP.k(a,"__xCurrencyFieldRefs");$APP.n(b)&&($APP.k(b,"input").value="");b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue("");return eS(a)},
17
- mS=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||(ZR(a),$APP.n(a.attachInternals)&&$APP.ja(a,"__xCurrencyFieldInternals",a.attachInternals()));jS(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");VR(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=YR(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?
18
- e:""}());iS(a);return eS(a)},nS=function(a){return jS(a)},oS=function(a,b,c,d){$APP.B.i(b,"value")&&(b=$APP.k(a,"__xCurrencyFieldRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),$APP.B.i(b,a.shadowRoot.activeElement)||(VR(a.getAttribute("currency")),c=a.getAttribute("locale"),c=$APP.n(c)?c:"",b.value=d==null||$APP.B.i(d,"")?"":YR(d,c))));return eS(a)},pS=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=
19
- b!=null&&$APP.N(b)?""+$APP.S.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");VR(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.B.i(c,this.shadowRoot.activeElement)?null:c.value=$APP.B.i(b,"")?"":YR(b,d)}return null}})},qS=function(a){pS(a);$APP.Tg(a,"name","name","");$APP.Tg(a,"currency","currency","");$APP.Tg(a,"locale","locale","");$APP.Tg(a,"min","min","");$APP.Tg(a,"max","max","");$APP.Tg(a,
20
- "placeholder","placeholder","");$APP.Tg(a,"label","label","");$APP.Tg(a,"hint","hint","");$APP.Tg(a,"error","error","");$APP.Sg(a,"disabled","disabled");$APP.Sg(a,"readOnly","readonly");$APP.Sg(a,"required","required");a.checkValidity=function(){var b=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.checkValidity():!0};return a.reportValidity=function(){var b=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.reportValidity():!0}},sS=function(){return $APP.Lg("x-currency-field",
21
- new $APP.Q(null,8,[$APP.Cg,rS,$APP.Dg,mS,$APP.Eg,nS,$APP.Fg,oS,$APP.Gg,!0,$APP.Hg,kS,$APP.Ig,lS,$APP.Jg,qS],null))},bS=new $APP.K(null,"min-raw","min-raw",183137548),dS=new $APP.K(null,"currency","currency",-898327568),cS=new $APP.K(null,"locale-raw","locale-raw",385401846),aS=new $APP.K(null,"currency-raw","currency-raw",1169887491);var rS="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
22
- $APP.zf([$APP.Bk,$APP.Rm,$APP.kk,$APP.xn,$APP.Sj,$APP.pj,$APP.qm,dS,$APP.Mm,$APP.nl,$APP.T,$APP.Wi,$APP.Vk],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"min"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"locale"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"hint"],
23
- null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"currency"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"max"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"error"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"required"],null)]);
24
- $APP.Pd(["x-currency-field-change-request",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,3,[$APP.Sj,$APP.Y,$APP.pj,$APP.Y,$APP.kl,$APP.Y],null)],null),"x-currency-field-input",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[$APP.Sj,$APP.Y,$APP.pj,$APP.Y],null)],null),"x-currency-field-change",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[$APP.Sj,$APP.Y,$APP.pj,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_currency_field.init",sS);export const init=sS;
2
+ var lU=function(a){a=(""+$APP.Q.g($APP.n(a)?a:"")).trim().toUpperCase();return $APP.B.i(a,"")?"USD":a},mU=function(a,b){try{var c=(new Intl.NumberFormat($APP.B.i(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.be(function(e){return $APP.B.i("currency",e.type)?e.value:null},$APP.Bc(c));return $APP.n(d)?d:a}catch(e){return a}},nU=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.B.i(b,"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},
3
+ oU=function(a){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("span"),l=document.createElement("input"),m=document.createElement("span"),q=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-currency-field-bg:var(--x-color-surface,#ffffff);--x-currency-field-color:var(--x-color-text,#111827);--x-currency-field-border:1px solid var(--x-color-border,#d1d5db);--x-currency-field-border-radius:var(--x-radius-md,6px);--x-currency-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-currency-field-symbol-color:var(--x-color-text-muted,#6b7280);--x-currency-field-label-color:var(--x-color-text-muted,#374151);--x-currency-field-hint-color:var(--x-color-text-muted,#6b7280);--x-currency-field-error-color:var(--x-color-danger,#dc2626);--x-currency-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-currency-field-bg:var(--x-color-surface-hover,#1f2937);--x-currency-field-color:var(--x-color-text,#f9fafb);--x-currency-field-border:1px solid var(--x-color-border,#4b5563);--x-currency-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-currency-field-symbol-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-label-color:var(--x-color-text-muted,#d1d5db);--x-currency-field-hint-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-error-color:var(--x-color-danger,#f87171);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:0.875rem;font-weight:500;color:var(--x-currency-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:flex;align-items:center;background:var(--x-currency-field-bg);border:var(--x-currency-field-border);border-radius:var(--x-currency-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput-wrapper]:focus-within{border-color:var(--x-currency-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput-wrapper]{border-color:var(--x-currency-field-error-color);}:host([data-invalid]) [part\x3dinput-wrapper]:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-error-color) 20%,transparent);}[part\x3dsymbol]{flex-shrink:0;padding:0.5rem 0 0.5rem 0.75rem;font-size:1rem;color:var(--x-currency-field-symbol-color);user-select:none;pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.75rem;background:transparent;color:var(--x-currency-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]:disabled{opacity:1;cursor:not-allowed;}:host([disabled]) [part\x3dinput-wrapper]{opacity:var(--x-currency-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-currency-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-currency-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput-wrapper]{transition:none;}}";
4
+ d.setAttribute("part","field");e.setAttribute("part","label");e.setAttribute("id","label");e.setAttribute("for","input");f.setAttribute("part","input-wrapper");h.setAttribute("part","symbol");h.setAttribute("aria-hidden","true");l.setAttribute("part","input");l.setAttribute("id","input");l.setAttribute("inputmode","decimal");l.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");q.setAttribute("part","error");q.setAttribute("id",
5
+ "error");q.setAttribute("role","alert");q.setAttribute("aria-live","assertive");f.appendChild(h);f.appendChild(l);d.appendChild(e);d.appendChild(f);d.appendChild(m);d.appendChild(q);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:f,symbol:h,input:l,hint:m,error:q}},pU=function(a,b,c,d){var e=a.hasAttribute("error");var f=a.getAttribute("error");f=$APP.n(f)?f:"";var h=a.hasAttribute("required"),l=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var q=
6
+ $APP.p(isNaN(a));l=$APP.n(l)?parseFloat(l):null;m=$APP.n(m)?parseFloat(m):null;return $APP.n(e)?b.setValidity({customError:!0},f,c):$APP.n($APP.n(h)?$APP.B.i(d,""):h)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):$APP.M(d,"")&&!q?b.setValidity({badInput:!0},"Please enter a valid number.",c):$APP.n(q?$APP.n(l)?$APP.p(isNaN(l))&&a<l:l:q)?b.setValidity({rangeUnderflow:!0},"Value must be at least "+$APP.Q.g(l)+".",c):$APP.n(q?$APP.n(m)?$APP.p(isNaN(m))&&a>m:m:q)?b.setValidity({rangeOverflow:!0},
7
+ "Value must be at most "+$APP.Q.g(m)+".",c):b.setValidity({},"",c)},uU=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"symbol"),e=$APP.k(b,"input"),f=$APP.k(b,"hint");b=$APP.k(b,"error");var h=$APP.Lf([$APP.Ch,qU,$APP.Mm,$APP.Rj,$APP.hk,$APP.Fh,rU,$APP.cj,$APP.im,$APP.Xk,$APP.Dh,sU,$APP.Xj],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),
8
+ a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.J(h);h=$APP.C(l,$APP.Xj);var m=$APP.C(l,$APP.Ch),q=$APP.C(l,qU),r=$APP.C(l,$APP.Mm),v=$APP.C(l,$APP.Rj),x=$APP.C(l,$APP.hk),y=$APP.C(l,$APP.Fh),A=$APP.C(l,rU),D=$APP.C(l,$APP.cj),G=$APP.C(l,$APP.im),I=$APP.C(l,$APP.Xk),H=$APP.C(l,$APP.Dh);l=$APP.C(l,sU);var K=$APP.n(v)?v:"",W=$APP.n(x)?x:"",ea=$APP.n(m)?m:"";h=$APP.Lf([$APP.ql,$APP.xj,
9
+ $APP.ro,$APP.Mn,$APP.Dj,$APP.qo,$APP.Nk,$APP.Gh,$APP.Pm,$APP.jm,$APP.rn,tU,$APP.em,$APP.X,$APP.Nj,$APP.Y],[$APP.n(A)?A:"",$APP.E(D),$APP.E(I),$APP.n(h)?h:"",typeof x==="string"&&$APP.M(x,""),$APP.n(l)?l:"",$APP.n(r)?r:"",$APP.n(H)?H:"",typeof m==="string"&&$APP.M(m,""),typeof v==="string"&&$APP.M(v,""),W,lU(q),$APP.n(G)?G:"",ea,K,$APP.E(y)]);m=$APP.jm.g(h);$APP.n(m)?q=null:(v=$APP.J(h),q=$APP.C(v,$APP.Gh),r=$APP.C(v,$APP.ql),v=$APP.C(v,$APP.em),x=parseFloat(q),y=$APP.M(q,"")&&$APP.p(isNaN(x)),A=$APP.M(r,
10
+ "")?parseFloat(r):null,D=$APP.M(v,"")?parseFloat(v):null,q=$APP.M(q,"")&&!y?"Please enter a valid number.":$APP.n(y?$APP.n(A)?$APP.p(isNaN(A))&&x<A:A:y)?"Value must be at least "+$APP.Q.g(r)+".":$APP.n(y?$APP.n(D)?$APP.p(isNaN(D))&&x>D:D:y)?"Value must be at most "+$APP.Q.g(v)+".":"");r=q;q=$APP.n(m)?m:$APP.M($APP.n(r)?r:"","");m=$APP.n(m)?$APP.Nj.g(h):$APP.n(r)?r:"";r=$APP.Dj.g(h);v=$APP.Pm.g(h);y=tU.g(h);x=$APP.qo.g(h);d.textContent=mU(y,x);e.name=$APP.Nk.g(h);e.placeholder=$APP.Mn.g(h);e.disabled=
11
+ $APP.Y.g(h);e.readOnly=$APP.ro.g(h);e.required=$APP.xj.g(h);$APP.ah(e,"aria-required",$APP.n($APP.xj.g(h))?"true":"false");e.setAttribute("aria-invalid",$APP.n(q)?"true":"false");d=$APP.n($APP.n(r)?q:r)?"hint error":$APP.n(r)?"hint":$APP.n(q)?"error":null;$APP.n(d)?e.setAttribute("aria-describedby",d):e.removeAttribute("aria-describedby");$APP.B.i(e,a.shadowRoot.activeElement)||(d=$APP.Gh.g(h),e.value=$APP.B.i(d,"")?"":nU(d,x));c.textContent=$APP.X.g(h);$APP.n(v)?c.classList.remove("label-hidden"):
12
+ c.classList.add("label-hidden");f.textContent=$APP.rn.g(h);$APP.n(r)?f.classList.remove("hint-hidden"):f.classList.add("hint-hidden");b.textContent=m;$APP.n(q)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");$APP.bh(a,"data-invalid",q);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(f=a.getAttribute("value"),a=pU(a,c,e,$APP.n(f)?f:"")):a=null;return a}return null},vU=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=
13
+ a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}},wU=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=function(){var f=a.getAttribute("value");return $APP.n(f)?f:""}(),e=function(){var f=a.getAttribute("name");return $APP.n(f)?f:""}();return $APP.ch(a,"x-currency-field-change-request",{name:e,value:c,previousValue:d})?(d=$APP.k(a,"__xCurrencyFieldInternals"),$APP.n(d)&&(d.setFormValue(c),pU(a,d,b,c)),$APP.P(a,
14
+ "x-currency-field-input",{name:e,value:c})):b.value=d}return null}},xU=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.Q.g(d);var e=function(){var f=a.getAttribute("value");return $APP.n(f)?f:""}();d=function(){var f=a.getAttribute("name");return $APP.n(f)?f:""}();return $APP.ch(a,"x-currency-field-change-request",{name:d,value:c,previousValue:e})?(a.setAttribute("value",c),e=$APP.k(a,
15
+ "__xCurrencyFieldInternals"),$APP.n(e)&&(e.setFormValue(c),pU(a,e,b,c)),$APP.P(a,"x-currency-field-change",{name:d,value:c})):b.value=e}return null}},yU=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=vU(a),d=wU(a),e=xU(a);b.addEventListener("focus",c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},zU=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xCurrencyFieldHandlers");
16
+ if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("focus",$APP.k(c,"focus"));b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xCurrencyFieldHandlers=null;return}}return null},AU=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return uU(a)},BU=function(a){a.removeAttribute("value");var b=$APP.k(a,"__xCurrencyFieldRefs");$APP.n(b)&&($APP.k(b,"input").value="");b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue("");return uU(a)},
17
+ CU=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||(oU(a),$APP.n(a.attachInternals)&&$APP.fa(a,"__xCurrencyFieldInternals",a.attachInternals()));zU(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");lU(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=nU(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?
18
+ e:""}());yU(a);return uU(a)},DU=function(a){return zU(a)},EU=function(a,b,c,d){$APP.B.i(b,"value")&&(b=$APP.k(a,"__xCurrencyFieldRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),$APP.B.i(b,a.shadowRoot.activeElement)||(lU(a.getAttribute("currency")),c=a.getAttribute("locale"),c=$APP.n(c)?c:"",b.value=d==null||$APP.B.i(d,"")?"":nU(d,c))));return uU(a)},FU=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=
19
+ b!=null&&$APP.M(b)?""+$APP.Q.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");lU(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.B.i(c,this.shadowRoot.activeElement)?null:c.value=$APP.B.i(b,"")?"":nU(b,d)}return null}})},GU=function(a){FU(a);$APP.eh(a,"name","name","");$APP.eh(a,"currency","currency","");$APP.eh(a,"locale","locale","");$APP.eh(a,"min","min","");$APP.eh(a,"max","max","");$APP.eh(a,
20
+ "placeholder","placeholder","");$APP.eh(a,"label","label","");$APP.eh(a,"hint","hint","");$APP.eh(a,"error","error","");$APP.dh(a,"disabled","disabled");$APP.dh(a,"readOnly","readonly");$APP.dh(a,"required","required");a.checkValidity=function(){var b=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.checkValidity():!0};return a.reportValidity=function(){var b=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.reportValidity():!0}},IU=function(){return $APP.Yg("x-currency-field",
21
+ new $APP.N(null,8,[$APP.Pg,HU,$APP.Qg,CU,$APP.Rg,DU,$APP.Sg,EU,$APP.Tg,!0,$APP.Ug,AU,$APP.Vg,BU,$APP.Wg,GU],null))},rU=new $APP.F(null,"min-raw","min-raw",183137548),tU=new $APP.F(null,"currency","currency",-898327568),sU=new $APP.F(null,"locale-raw","locale-raw",385401846),qU=new $APP.F(null,"currency-raw","currency-raw",1169887491);var HU="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
22
+ $APP.Lf([$APP.ql,$APP.Mn,$APP.al,$APP.qo,$APP.Nk,$APP.Gh,$APP.rn,tU,$APP.Hn,$APP.em,$APP.X,$APP.Nj,$APP.Ll],[new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"min"],null),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,"locale"],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.U,$APP.S,"hint"],null),new $APP.N(null,
23
+ 2,[$APP.R,$APP.U,$APP.S,"currency"],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,"max"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"error"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"required"],null)]);
24
+ $APP.Yd(["x-currency-field-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,3,[$APP.Nk,$APP.U,$APP.Gh,$APP.U,$APP.am,$APP.U],null)],null),"x-currency-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-currency-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_currency_field.init",IU);export const init=IU;
@@ -2,6 +2,12 @@
2
2
 
3
3
  export function init(): void;
4
4
 
5
+ export interface XDatePickerEventMap {
6
+ "x-date-picker-input": CustomEvent<{ value: string; mode: string }>;
7
+ "x-date-picker-change-request": CustomEvent<{ value: string; mode: string; reason: string }>;
8
+ "x-date-picker-change": CustomEvent<{ value: string; mode: string; reason: string }>;
9
+ }
10
+
5
11
  export interface XDatePicker extends HTMLElement {
6
12
  mode: string;
7
13
  value: string;
@@ -11,6 +17,27 @@ export interface XDatePicker extends HTMLElement {
11
17
  readOnly: boolean;
12
18
  required: boolean;
13
19
  open: boolean;
20
+
21
+ addEventListener<K extends keyof XDatePickerEventMap>(
22
+ type: K,
23
+ listener: (this: XDatePicker, ev: XDatePickerEventMap[K]) => any,
24
+ options?: boolean | AddEventListenerOptions
25
+ ): void;
26
+ addEventListener(
27
+ type: string,
28
+ listener: EventListenerOrEventListenerObject,
29
+ options?: boolean | AddEventListenerOptions
30
+ ): void;
31
+ removeEventListener<K extends keyof XDatePickerEventMap>(
32
+ type: K,
33
+ listener: (this: XDatePicker, ev: XDatePickerEventMap[K]) => any,
34
+ options?: boolean | EventListenerOptions
35
+ ): void;
36
+ removeEventListener(
37
+ type: string,
38
+ listener: EventListenerOrEventListenerObject,
39
+ options?: boolean | EventListenerOptions
40
+ ): void;
14
41
  }
15
42
 
16
43
  declare global {
@@ -1,42 +1,43 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LX=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},MX=function(a){return a<10?"0"+$APP.S.g(a):""+$APP.S.g(a)},NX=function(a){return $APP.n(a)?""+$APP.S.g(a.getUTCFullYear())+"-"+$APP.S.g(MX(a.getUTCMonth()+1))+"-"+$APP.S.g(MX(a.getUTCDate())):null},OX=function(a){var b=(b=typeof a==="string")?$APP.eg(/\d{4}-\d{2}-\d{2}/,a):b;return $APP.n(b)?(a=new Date(""+$APP.S.g(a)+"T00:00:00.000Z"),$APP.n(isNaN(a.getTime()))?null:a):null},PX=function(a,b){if(a==null&&b==null)return 0;
3
- if(a==null)return-1;if(b==null)return 1;a=a.getTime();b=b.getTime();return a<b?-1:a>b?1:0},QX=function(a,b){return $APP.n(a)?new Date(a.getTime()+b*864E5):null},RX=function(a){return $APP.n(a)?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)):null},SX=function(a,b){if($APP.n(a)){var c=a.getUTCFullYear(),d=a.getUTCDate();a=a.getUTCMonth()+b;b=(new Date(Date.UTC(c,a+1,0))).getUTCDate();return new Date(Date.UTC(c,a,$APP.Kh.i(d,b)))}return null},TX=function(a,b,c){a=$APP.n($APP.n(b)?$APP.n(a)?
4
- PX(a,b)<0:a:b)?b:a;return $APP.n($APP.n(c)?$APP.n(a)?PX(a,c)>0:a:c)?c:a},UX=function(a,b,c){if($APP.n($APP.n(a)?$APP.n(b)?c:b:a)){var d=PX(b,c)<0?c:b;return!(PX(a,PX(b,c)<0?b:c)<0)&&!(PX(a,d)>0)}return null},XX=function(a,b){var c=$APP.M(b);b=$APP.D(c,VX);c=$APP.D(c,$APP.xn);return $APP.n(a)?$APP.B.i(b,WX)?(new Intl.DateTimeFormat($APP.n(c)?c:"default",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})).format(a):NX(a):null},$X=function(a){a=LX(a);a=$APP.n(a)?OX(a):null;return new $APP.Q(null,
5
- 2,[YX,a!=null,ZX,a],null)},oY=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.cj),d=$APP.D(b,$APP.wl),e=$APP.D(b,$APP.Bk);a=$APP.D(b,VX);var g=$APP.D(b,$APP.xn),h=$APP.D(b,aY),l=$APP.D(b,$APP.pj),m=$APP.D(b,$APP.Oj),p=$APP.D(b,$APP.Lm),r=$APP.D(b,$APP.nl),v=$APP.D(b,bY);b=$APP.B.i(m,"range")?cY:dY;a=$APP.B.i(a,"localized")?WX:eY;g=LX(g);m=function(){var A=LX(d);return $APP.n(A)?A:" - "}();e=OX(e);r=OX(r);v=$APP.F(v);h=$APP.F(h);if($APP.B.i(b,dY))return b=OX(l),$APP.zf([VX,fY,$APP.xn,gY,$APP.Oj,hY,bY,
6
- $APP.Dl,$APP.wl,iY,jY],[a,b,g,h,dY,r,v,b!=null,m,e,function(){var A=LX(l);return $APP.n(A)?A:""}()]);var x=OX(p),y=OX(c);b=x!=null&&y!=null;return $APP.zf([kY,VX,lY,$APP.xn,gY,$APP.Oj,hY,mY,nY,bY,$APP.Dl,$APP.wl,iY],[function(){var A=LX(c);return $APP.n(A)?A:""}(),a,x,g,h,cY,r,function(){var A=LX(p);return $APP.n(A)?A:""}(),y,v,b,m,e])},qY=function(a){if($APP.n(a)){var b=RX(a),c=QX(b,-($APP.n(b)?b.getUTCDay():0));return $APP.fe(function(d){d=QX(c,d);var e=$APP.B.i(d.getUTCMonth(),a.getUTCMonth());
7
- return new $APP.Q(null,2,[ZX,d,pY,e],null)},$APP.dg(0,42))}return null},rY=function(a){return document.createElement(a)},sY=function(a){var b=a.getAttribute("mode");b=oY($APP.zf([$APP.Bk,VX,$APP.xn,aY,$APP.pj,$APP.Oj,$APP.Lm,$APP.nl,bY,$APP.cj,$APP.wl],[a.getAttribute("min"),a.getAttribute("format"),a.getAttribute("locale"),$APP.ah(a.getAttribute("range-allow-same-day")),a.getAttribute("value"),b,a.getAttribute("start"),a.getAttribute("max"),$APP.ah(a.getAttribute("auto-swap")),a.getAttribute("end"),
8
- a.getAttribute("separator")]));var c=new $APP.Q(null,2,[VX,VX.g(b),$APP.xn,$APP.xn.g(b)],null);var d=$APP.M(c);var e=$APP.D(d,VX);d=$APP.D(d,$APP.xn);e=new $APP.Q(null,2,[VX,e,$APP.xn,d],null);if($APP.B.i($APP.Oj.g(b),dY))e=$APP.n(fY.g(b))?XX(fY.g(b),e):"";else{d=$APP.wl.g(b);var g=lY.g(b);g=$APP.n(g)?nY.g(b):g;e=$APP.n(g)?""+$APP.S.g(XX(lY.g(b),e))+$APP.S.g(d)+$APP.S.g(XX(nY.g(b),e)):$APP.n(lY.g(b))?XX(lY.g(b),e):""}d=$APP.k(a,"__xDatePickerState");d=$APP.n(d)?$APP.k(d,"month"):null;g=fY.g(b);$APP.n(g)||
9
- (g=lY.g(b),g=$APP.n(g)?g:new Date(Date.now()));d=$APP.n(d)?d:RX(g);a.__xDatePickerState={canon:b,cfg:c,disp:e,month:d}},tY=function(a,b){var c=iY.g(b);c=$APP.n(c)?PX(a,iY.g(b))<0:c;if($APP.n(c))return c;c=hY.g(b);return $APP.n(c)?PX(a,hY.g(b))>0:c},wY=function(a,b){if($APP.B.i($APP.Oj.g(b),dY))return new $APP.Q(null,3,[$APP.uj,function(){var l=fY.g(b);return $APP.n(l)?$APP.B.i(0,PX(a,fY.g(b))):l}(),uY,!1,vY,!1],null);var c=lY.g(b),d=nY.g(b),e=function(){var l=$APP.n(c)?$APP.B.i(0,PX(a,c)):c;return $APP.n(l)?
10
- l:$APP.n(d)?$APP.B.i(0,PX(a,d)):d}(),g=$APP.n(c)?$APP.n(d)?UX(a,c,d):d:c,h=function(){var l=$APP.n(c)?$APP.B.i(0,PX(a,c)):c;return $APP.n(l)?l:$APP.n(d)?$APP.B.i(0,PX(a,d)):d}();return new $APP.Q(null,3,[$APP.uj,e,uY,g,vY,h],null)},xY=function(a,b){a.__xDatePickerGridFocus=b;a=$APP.k(a,"__xDatePickerRefs");a=$APP.n(a)?$APP.k(a,"grid"):null;if($APP.n(a)){var c=a.querySelector('[tabindex\x3d"0"]');$APP.n(c)&&c.setAttribute("tabindex","-1");b=a.querySelector('[data-iso\x3d"'+$APP.S.g(b)+'"]');if($APP.n(b))return b.setAttribute("tabindex",
11
- "0"),b.focus()}return null},yY=function(a){var b=$APP.k(a,"__xDatePickerRefs");if($APP.n(b)){var c=$APP.k(b,"month-label"),d=$APP.k(b,"grid"),e=$APP.k(b,"weekdays"),g=$APP.k(a,"__xDatePickerState");b=$APP.n(g)?$APP.k(g,"canon"):null;var h=$APP.n(g)?$APP.k(g,"month"):null;g=$APP.n(g)?$APP.k(g,"cfg"):null;g=$APP.n(g)?$APP.xn.g(g):null;$APP.n(c)&&(h=(new Intl.DateTimeFormat($APP.n(g)?g:"default",{year:"numeric",month:"long",timeZone:"UTC"})).format(h),c.textContent=h);if(!$APP.n($APP.k(a,"__xDatePickerWeekdaysDone")))for(a.__xDatePickerWeekdaysDone=
12
- !0,c="Su Mo Tu We Th Fr Sa".split(" "),h=0;;)if(h<7)g=rY("div"),g.setAttribute("part","weekday"),g.setAttribute("aria-hidden","true"),g.textContent=c[h],e.appendChild(g),h+=1;else break;if($APP.n($APP.n(d)?b:d)){d.textContent="";e=$APP.k(a,"__xDatePickerState");e=qY($APP.n(e)?$APP.k(e,"month"):null);c=$APP.t(e);h=null;for(var l=g=0;;)if(l<g){e=h.F(null,l);e=$APP.M(e);var m=$APP.D(e,ZX);e=$APP.D(e,pY);var p=rY("button"),r=NX(m),v=m.getUTCDate(),x=tY(m,b);m=wY(m,b);var y=$APP.M(m);m=$APP.D(y,$APP.uj);
13
- var A=$APP.D(y,uY);y=$APP.D(y,vY);p.setAttribute("part","day");p.setAttribute("type","button");p.setAttribute("role","gridcell");p.setAttribute("data-iso",r);p.setAttribute("data-outside",$APP.n(e)?"false":"true");p.setAttribute("data-disabled",$APP.n(x)?"true":"false");p.setAttribute("data-selected",$APP.n(m)?"true":"false");p.setAttribute("data-in-range",$APP.n(A)?"true":"false");p.setAttribute("data-range-edge",$APP.n(y)?"true":"false");p.setAttribute("aria-selected",$APP.n(m)?"true":"false");
14
- p.setAttribute("aria-disabled",$APP.n(x)?"true":"false");p.setAttribute("tabindex","-1");p.textContent=""+$APP.S.g(v);d.appendChild(p);l+=1}else if(e=$APP.t(c))c=e,$APP.Nc(c)?(h=$APP.xb(c),c=$APP.yb(c),e=h,g=$APP.z(h),h=e):(e=$APP.u(c),e=$APP.M(e),m=$APP.D(e,ZX),e=$APP.D(e,pY),h=rY("button"),g=NX(m),l=m.getUTCDate(),p=tY(m,b),m=wY(m,b),v=$APP.M(m),m=$APP.D(v,$APP.uj),r=$APP.D(v,uY),v=$APP.D(v,vY),h.setAttribute("part","day"),h.setAttribute("type","button"),h.setAttribute("role","gridcell"),h.setAttribute("data-iso",
15
- g),h.setAttribute("data-outside",$APP.n(e)?"false":"true"),h.setAttribute("data-disabled",$APP.n(p)?"true":"false"),h.setAttribute("data-selected",$APP.n(m)?"true":"false"),h.setAttribute("data-in-range",$APP.n(r)?"true":"false"),h.setAttribute("data-range-edge",$APP.n(v)?"true":"false"),h.setAttribute("aria-selected",$APP.n(m)?"true":"false"),h.setAttribute("aria-disabled",$APP.n(p)?"true":"false"),h.setAttribute("tabindex","-1"),h.textContent=""+$APP.S.g(l),d.appendChild(h),c=$APP.w(c),h=null,g=
16
- 0),l=0;else break;d=$APP.k(a,"__xDatePickerGridFocus");a=$APP.k(a,"__xDatePickerRefs");a=$APP.n(a)?$APP.k(a,"grid"):null;$APP.n($APP.n(a)?d:a)?(a=a.querySelector('[data-iso\x3d"'+$APP.S.g(d)+'"]'),a=$APP.n(a)?a.setAttribute("tabindex","0"):null):a=null;return a}}return null},zY=function(a){var b=$APP.k(a,"__xDatePickerRefs");b=$APP.n(b)?$APP.k(b,"input"):null;var c=$APP.k(a,"__xDatePickerState");c=$APP.n(c)?$APP.k(c,"disp"):null;a=$APP.k(a,"__xDatePickerFocused");return $APP.n($APP.n(b)?$APP.q(a):
17
- b)?b.value=$APP.n(c)?c:"":null},AY=function(a){var b=$APP.k(a,"__xDatePickerRefs");if($APP.n(b)){var c=$APP.k(b,"input");b=$APP.k(b,"btn");var d=a.hasAttribute("disabled"),e=a.hasAttribute("readonly"),g=a.getAttribute("placeholder"),h=a.getAttribute("aria-label"),l=a.getAttribute("aria-describedby"),m=a.hasAttribute("open");$APP.n(b)&&($APP.n(d)?b.setAttribute("disabled",""):b.removeAttribute("disabled"));$APP.n($APP.n(d)?m:d)&&a.removeAttribute("open");$APP.n(c)&&(c.setAttribute("aria-expanded",
18
- $APP.n(m)?"true":"false"),$APP.n(d)?(c.setAttribute("disabled",""),c.setAttribute("aria-disabled","true")):(c.removeAttribute("disabled"),c.removeAttribute("aria-disabled")),$APP.n(e)&&c.setAttribute("readonly",""),$APP.n(e)||c.removeAttribute("readonly"),$APP.n(g)&&c.setAttribute("placeholder",g),$APP.n(h)&&c.setAttribute("aria-label",h),$APP.n(l)&&c.setAttribute("aria-describedby",l));zY(a);return yY(a)}return null},BY=function(a,b){$APP.n(b)?a.setAttribute("value",NX(b)):a.removeAttribute("value")},
19
- CY=function(a,b,c){if($APP.n(a.hasAttribute("readonly")))return null;var d=$APP.k(a,"__xDatePickerState");d=$APP.n(d)?$APP.k(d,"canon"):null;var e=$APP.n(d)?$APP.Oj.g(d):null,g=$APP.B.i(e,cY)?"range":"single",h=$APP.B.i(e,dY)?{value:NX(b),mode:g,reason:c}:{date:NX(b),mode:g,reason:c};if($APP.Rg(a,"x-date-picker-change-request",h)){if($APP.B.i(e,dY))return d=NX(b),BY(a,b),sY(a),AY(a),$APP.Qg(a,"x-date-picker-change",{value:d,mode:g,reason:c}),$APP.n(a.hasAttribute("close-on-select"))?(a.removeAttribute("open"),
20
- AY(a)):null;e=function(){var y=$APP.k(a,"__xDatePickerRangeStep");return $APP.n(y)?y:0}();h=lY.g(d);if($APP.B.i(e,0))a.setAttribute("start",NX(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1;else if($APP.B.i(e,1)){var l=gY.g(d),m=PX(b,h);if($APP.n(function(){var y=m>0;return y?y:$APP.n(l)?m===0:l}())){var p=$APP.n(bY.g(d))?PX(h,b)<0?h:b:h,r=$APP.n(bY.g(d))?PX(h,b)>0?h:b:b;a.setAttribute("start",NX(p));a.setAttribute("end",NX(r));a.__xDatePickerRangeStep=0;$APP.n(function(){var y=a.hasAttribute("close-on-select");
21
- return $APP.n(y)?p!=null&&r!=null:y}())&&a.removeAttribute("open")}else a.setAttribute("start",NX(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1}else a.setAttribute("start",NX(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1;sY(a);AY(a);b=$APP.k(a,"__xDatePickerState");b=$APP.n(b)?$APP.k(b,"canon"):null;var v=$APP.n(lY.g(b))?NX(lY.g(b)):null,x=$APP.n(nY.g(b))?NX(nY.g(b)):null;b=function(){var y={mode:g,reason:c};$APP.n(v)&&(y.start=v);$APP.n(x)&&(y.end=x);return y}();return $APP.Qg(a,
22
- "x-date-picker-change",b)}return null},DY=function(a,b){var c=$APP.k(a,"__xDatePickerRefs");c=$APP.n(c)?$APP.k(c,"input"):null;var d=$APP.n(c)?c.value:null;c=$APP.k(a,"__xDatePickerState");var e=$APP.n(c)?$APP.k(c,"canon"):null,g=$APP.Oj.g(e);c=$APP.B.i(g,cY)?"range":"single";$APP.Qg(a,"x-date-picker-input",{value:d,mode:c});if($APP.B.i(g,dY)){if(d=$X(d),e=$APP.M(d),d=$APP.D(e,YX),e=$APP.D(e,ZX),$APP.n(d)){g=NX(e);d=$APP.Rg(a,"x-date-picker-change-request",{value:g,mode:c,reason:b});if($APP.n(d.defaultPrevented))return null;
23
- BY(a,e);sY(a);AY(a);return $APP.Qg(a,"x-date-picker-change",{value:g,mode:c,reason:b})}}else if(e=new $APP.Q(null,1,[$APP.wl,$APP.wl.g(e)],null),e=$APP.M(e),e=$APP.D(e,$APP.wl),e=typeof e==="string"&&e.length>0?e:" - ",d=LX(d),d==null?d=new $APP.Q(null,3,[YX,!1,$APP.Lm,null,$APP.cj,null],null):(g=d.indexOf(e),g<0?(d=$X(d),e=$APP.M(d),d=$APP.D(e,YX),e=$APP.D(e,ZX),d=new $APP.Q(null,3,[YX,d,$APP.Lm,e,$APP.cj,null],null)):(e=d.substring(g+e.length).trim(),d=OX(d.substring(0,g).trim()),e=OX(e),d=new $APP.Q(null,
24
- 3,[YX,d!=null&&e!=null,$APP.Lm,d,$APP.cj,e],null))),g=$APP.M(d),d=$APP.D(g,YX),e=$APP.D(g,$APP.Lm),g=$APP.D(g,$APP.cj),$APP.n(d)){e=NX(e);g=NX(g);d=$APP.Rg(a,"x-date-picker-change-request",{start:e,end:g,mode:c,reason:b});if($APP.n(d.defaultPrevented))return null;a.setAttribute("start",e);a.setAttribute("end",g);a.__xDatePickerRangeStep=0;sY(a);AY(a);return $APP.Qg(a,"x-date-picker-change",{start:e,end:g,mode:c,reason:b})}return null},EY=function(a,b){var c=$APP.k(a,"__xDatePickerState"),d=$APP.n(c)?
25
- $APP.k(c,"month"):null;if($APP.n(d)){var e=d.getUTCFullYear();d=d.getUTCMonth();b=$APP.B.i(b,$APP.ok)?new Date(Date.UTC(e,d+1,1)):new Date(Date.UTC(e,d-1,1));c.month=b;return yY(a)}return null},FY=function(a){return $APP.n(a.hasAttribute("open"))?a.removeAttribute("open"):null},GY=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.currentTarget.getAttribute("data-nav");return $APP.B.i(b,"prev")?EY(a,$APP.ik):EY(a,$APP.ok)},HY=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
26
- var c=b.key,d=$APP.k(a,"__xDatePickerGridFocus"),e=$APP.n(d)?OX(d):null;d=$APP.k(a,"__xDatePickerState");var g=$APP.n(d)?$APP.k(d,"canon"):null,h=$APP.n(d)?$APP.k(d,"month"):null,l=$APP.n(e)?function(){switch(c){case "ArrowLeft":return QX(e,-1);case "ArrowRight":return QX(e,1);case "ArrowUp":return QX(e,-7);case "ArrowDown":return QX(e,7);case "PageUp":return SX(e,-1);case "PageDown":return SX(e,1);case "Home":return $APP.n(e)?QX(e,-($APP.n(e)?e.getUTCDay():0)):null;case "End":return $APP.n(e)?QX(e,
27
- 6-($APP.n(e)?e.getUTCDay():0)):null;default:return null}}():null;return l!=null?(b.preventDefault(),b=TX(l,iY.g(g),hY.g(g)),g=NX(b),$APP.n($APP.n(h)?$APP.N(b.getUTCMonth(),h.getUTCMonth()):h)&&($APP.ja(d,"month",RX(b)),yY(a)),xY(a,g)):$APP.n(function(){var m=$APP.B.i(c,"Enter")||$APP.B.i(c," ");return m?$APP.n(e)?$APP.q(a.hasAttribute("readonly")):e:m}())?(b.preventDefault(),$APP.n(tY(e,g))?null:CY(a,e,"keyboard")):$APP.B.i(c,"Escape")?(b.preventDefault(),FY(a),d=$APP.k(a,"__xDatePickerRefs"),d=$APP.n(d)?
28
- $APP.k(d,"input"):null,$APP.n(d)?d.focus():null):null},IY=function(a){function b(G){return $APP.n(a.hasAttribute("open"))?$APP.n(G.composedPath().some(function(J){return J===a}))?null:FY(a):null}function c(G){return G.preventDefault()}function d(G){return HY(a,G)}function e(G){var J=a.hasAttribute("disabled");$APP.n($APP.n(J)?J:a.hasAttribute("readonly"))?G=null:(G=G.target.closest("button[data-iso]"),$APP.n($APP.n(G)?$APP.N("true",G.getAttribute("data-disabled")):G)?(G=G.getAttribute("data-iso"),
29
- G=OX(G),G=$APP.n(G)?CY(a,G,"click"):null):G=null);return G}function g(G){return GY(a,G)}function h(G){return GY(a,G)}function l(){var G=a.hasAttribute("disabled");if($APP.n($APP.n(G)?G:a.hasAttribute("readonly")))G=null;else if($APP.n(a.hasAttribute("open")))G=FY(a);else if($APP.n(a.hasAttribute("open")))G=null;else{a.setAttribute("open","");G=$APP.k(a,"__xDatePickerState");G=$APP.n(G)?$APP.k(G,"canon"):null;var J=fY.g(G);$APP.n(J)?G=J:(G=lY.g(G),G=$APP.n(G)?G:new Date(Date.now()));G=NX(G);G=xY(a,
30
- G)}return G}function m(){a.__xDatePickerFocused=!1;$APP.n(a.hasAttribute("disabled"))||DY(a,"blur");return zY(a)}function p(){a.__xDatePickerFocused=!0}function r(G){if($APP.n(a.hasAttribute("disabled")))G=null;else{var J=G.key;$APP.B.i(J,"Enter")?(G.preventDefault(),G=DY(a,"keyboard")):G=$APP.B.i(J,"Escape")?FY(a):null}return G}function v(){var G=$APP.k(a,"__xDatePickerRefs");G=$APP.n(G)?$APP.k(G,"input"):null;var J=$APP.k(a,"__xDatePickerState");J=$APP.B.i($APP.Oj.g($APP.n(J)?$APP.k(J,"canon"):
31
- null),cY)?"range":"single";a.__xDatePickerDisplay=$APP.n(G)?G.value:null;return $APP.Qg(a,"x-date-picker-input",{value:$APP.n(G)?G.value:null,mode:J})}var x=$APP.k(a,"__xDatePickerRefs"),y=$APP.k(x,"input"),A=$APP.k(x,"btn"),C=$APP.k(x,"nav-prev"),E=$APP.k(x,"nav-next"),H=$APP.k(x,"grid");x=$APP.k(x,"popover");y.addEventListener("input",v);y.addEventListener("keydown",r);y.addEventListener("focus",p);y.addEventListener("blur",m);A.addEventListener("click",l);C.addEventListener("click",h);E.addEventListener("click",
32
- g);H.addEventListener("click",e);H.addEventListener("keydown",d);x.addEventListener("pointerdown",c);document.addEventListener("pointerdown",b,!0);$APP.ja(a,"__xDatePickerHandlers",{"pop-md":c,keydown:r,grid:e,"grid-kd":d,next:g,blur:m,prev:h,focus:p,input:v,btn:l,"doc-click":b})},JY=function(a){var b=$APP.k(a,"__xDatePickerRefs");a=$APP.k(a,"__xDatePickerHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,"btn"),e=$APP.k(b,"nav-prev"),g=$APP.k(b,"nav-next"),h=$APP.k(b,"grid");
33
- b=$APP.k(b,"popover");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));c.removeEventListener("focus",$APP.k(a,"focus"));c.removeEventListener("blur",$APP.k(a,"blur"));d.removeEventListener("click",$APP.k(a,"btn"));e.removeEventListener("click",$APP.k(a,"prev"));g.removeEventListener("click",$APP.k(a,"next"));h.removeEventListener("click",$APP.k(a,"grid"));h.removeEventListener("keydown",$APP.k(a,"grid-kd"));b.removeEventListener("pointerdown",$APP.k(a,
34
- "pop-md"));return document.removeEventListener("pointerdown",$APP.k(a,"doc-click"),!0)}return null},KY=function(a){if(!$APP.n($APP.k(a,"__xDatePickerRefs"))){var b=a.attachShadow({mode:"open"}),c=rY("style"),d=rY("div"),e=rY("input"),g=rY("button"),h=rY("div"),l=rY("div"),m=rY("button"),p=rY("div"),r=rY("button"),v=rY("div"),x=rY("div"),y=rY("div");c.textContent=":host{display:block;color-scheme:light dark;--x-date-picker-border:var(--x-color-border,#cbd5e1);--x-date-picker-radius:var(--x-radius-md,8px);--x-date-picker-input-bg:var(--x-color-surface,#fff);--x-date-picker-text:inherit;--x-date-picker-focus:var(--x-color-focus-ring,#60a5fa);--x-date-picker-placeholder:var(--x-color-text-muted,#94a3b8);--x-date-picker-btn-bg:var(--x-color-surface-hover,#f8fafc);--x-date-picker-btn-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-popover-bg:var(--x-color-bg,#fff);--x-date-picker-popover-radius:var(--x-radius-lg,12px);--x-date-picker-nav-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-weekday:var(--x-color-text-muted,#94a3b8);--x-date-picker-day-text:inherit;--x-date-picker-day-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-selected-bg:var(--x-color-primary,#2563eb);--x-date-picker-selected-text:#fff;--x-date-picker-range-bg:var(--x-color-surface-active,#dbeafe);--x-date-picker-range-text:var(--x-color-primary-active,#1e40af);}[part\x3dcontainer]{position:relative;display:flex;align-items:stretch;gap:8px;width:100%;}[part\x3dinput]{flex:1;min-width:0;appearance:none;box-sizing:border-box;border:1px solid var(--x-date-picker-border,#cbd5e1);border-radius:var(--x-date-picker-radius,8px);padding:8px 12px;font-size:0.9375rem;background:var(--x-date-picker-input-bg,#fff);color:var(--x-date-picker-text,inherit);outline:none;}[part\x3dinput]:focus{border-color:var(--x-date-picker-focus,#60a5fa);box-shadow:0 0 0 3px rgba(96,165,250,0.25);}[part\x3dinput][disabled]{opacity:0.5;cursor:default;}[part\x3dbtn][disabled]{opacity:0.5;cursor:default;pointer-events:none;}[part\x3dinput]::placeholder{color:var(--x-date-picker-placeholder,#94a3b8);}[part\x3dbtn]{all:unset;cursor:pointer;flex:0 0 auto;width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--x-date-picker-border,#cbd5e1);border-radius:var(--x-date-picker-radius,8px);background:var(--x-date-picker-btn-bg,#f8fafc);color:var(--x-date-picker-text,inherit);box-sizing:border-box;}[part\x3dbtn]:hover{background:var(--x-date-picker-btn-hover,#f1f5f9);}[part\x3dbtn]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dpopover]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;background:var(--x-date-picker-popover-bg,#fff);border:1px solid var(--x-date-picker-border,#e2e8f0);border-radius:var(--x-date-picker-popover-radius,12px);box-shadow:0 8px 32px rgba(0,0,0,0.12),0 2px 8px rgba(0,0,0,0.06);padding:16px;width:var(--x-date-picker-popover-width,304px);max-width:calc(100vw - 1rem);box-sizing:border-box;}:host([open]) [part\x3dpopover]{display:block;}[part\x3dnav]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}[part\x3dnavbtn]{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;color:var(--x-date-picker-text,inherit);}[part\x3dnavbtn]:hover{background:var(--x-date-picker-nav-hover,#f1f5f9);}[part\x3dnavbtn]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dmonthlabel]{font-weight:600;font-size:0.9375rem;}[part\x3dweekdays]{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:4px;}[part\x3dweekday]{text-align:center;font-size:0.75rem;font-weight:600;color:var(--x-date-picker-weekday,#94a3b8);padding:4px 0;}[part\x3dgrid]{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}[part\x3dday]{all:unset;cursor:pointer;box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:36px;border-radius:6px;font-size:0.875rem;color:var(--x-date-picker-day-text,inherit);}[part\x3dday]:hover:not([disabled]){background:var(--x-date-picker-day-hover,#f1f5f9);}[part\x3dday]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dday][data-outside\x3dtrue]{opacity:0.4;}[part\x3dday][data-disabled\x3dtrue]{opacity:0.3;cursor:default;pointer-events:none;}[part\x3dday][data-selected\x3dtrue]{background:var(--x-date-picker-selected-bg,#2563eb);color:var(--x-date-picker-selected-text,#fff);font-weight:600;}[part\x3dday][data-in-range\x3dtrue]:not([data-range-edge\x3dtrue]){background:var(--x-date-picker-range-bg,#dbeafe);color:var(--x-date-picker-range-text,#1e40af);border-radius:0;}[part\x3dday][data-range-edge\x3dtrue]{background:var(--x-date-picker-selected-bg,#2563eb);color:var(--x-date-picker-selected-text,#fff);font-weight:600;}[part\x3dsr-status]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}@media (prefers-color-scheme:dark){:host{--x-date-picker-border:var(--x-color-border,#334155);--x-date-picker-input-bg:var(--x-color-surface,#0f172a);--x-date-picker-btn-bg:var(--x-color-surface-hover,#1e293b);--x-date-picker-btn-hover:var(--x-color-surface-active,#334155);--x-date-picker-popover-bg:var(--x-color-bg,#1e293b);--x-date-picker-day-hover:var(--x-color-surface-active,#334155);--x-date-picker-selected-bg:var(--x-color-primary,#3b82f6);--x-date-picker-range-bg:var(--x-color-surface-active,#1e3a8a);--x-date-picker-range-text:var(--x-color-focus-ring,#93c5fd);--x-date-picker-nav-hover:var(--x-color-surface-active,#334155);}}@media (prefers-reduced-motion:reduce){[part\x3dpopover]{transition:none;}}";
35
- d.setAttribute("part","container");e.setAttribute("part","input");e.setAttribute("type","text");e.setAttribute("inputmode","none");e.setAttribute("autocomplete","off");e.setAttribute("role","combobox");e.setAttribute("aria-haspopup","dialog");e.setAttribute("aria-expanded","false");g.setAttribute("part","btn");g.setAttribute("type","button");g.setAttribute("aria-label","Open calendar");g.textContent="\ud83d\udcc5";h.setAttribute("part","popover");h.setAttribute("role","dialog");h.setAttribute("aria-modal",
36
- "true");h.setAttribute("aria-label","Calendar");l.setAttribute("part","nav");m.setAttribute("part","navbtn");m.setAttribute("data-nav","prev");m.setAttribute("type","button");m.setAttribute("aria-label","Previous month");m.textContent="‹";p.setAttribute("part","monthlabel");p.setAttribute("aria-live","polite");r.setAttribute("part","navbtn");r.setAttribute("data-nav","next");r.setAttribute("type","button");r.setAttribute("aria-label","Next month");r.textContent="›";v.setAttribute("part","weekdays");
37
- v.setAttribute("aria-hidden","true");x.setAttribute("part","grid");x.setAttribute("role","grid");x.setAttribute("aria-label","Calendar grid");y.setAttribute("part","sr-status");y.setAttribute("aria-live","polite");y.setAttribute("aria-atomic","true");l.appendChild(m);l.appendChild(p);l.appendChild(r);h.appendChild(l);h.appendChild(v);h.appendChild(x);h.appendChild(y);d.appendChild(e);d.appendChild(g);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xDatePickerRefs={weekdays:v,grid:x,popover:h,
38
- "nav-next":r,"month-label":p,input:e,btn:g,sr:y,"nav-prev":m}}JY(a);IY(a);sY(a);return AY(a)},LY=function(a){return JY(a)},MY=function(a){sY(a);return AY(a)},NY=function(a){a.focus=function(){var b=$APP.k(this,"__xDatePickerRefs");b=$APP.n(b)?$APP.k(b,"input"):null;return $APP.n(b)?b.focus():null};a.commit=function(){return DY(this,"programmatic")};return a.clear=function(){var b=$APP.k(this,"__xDatePickerState");$APP.B.i($APP.Oj.g($APP.n(b)?$APP.k(b,"canon"):null),dY)?this.removeAttribute("value"):
39
- (this.removeAttribute("start"),this.removeAttribute("end"));sY(this);return AY(this)}},OY=function(a){$APP.Ug(a,"mode","mode");$APP.Ug(a,"value","value");$APP.Ug(a,"start","start");$APP.Ug(a,"end","end");$APP.Sg(a,"open","open");$APP.Sg(a,"disabled","disabled");$APP.Sg(a,"readOnly","readonly");$APP.Sg(a,"required","required");return NY(a)},QY=function(){return $APP.Lg("x-date-picker",new $APP.Q(null,5,[$APP.Cg,PY,$APP.Dg,KY,$APP.Eg,LY,$APP.Fg,MY,$APP.Jg,OY],null))},lY=new $APP.K(null,"start-d","start-d",
40
- -1546785820),ZX=new $APP.K(null,"date","date",-1463434462),bY=new $APP.K(null,"auto-swap?","auto-swap?",-1675454411),vY=new $APP.K(null,"edge?","edge?",203916303),hY=new $APP.K(null,"max-d","max-d",-814680979),dY=new $APP.K(null,"single","single",1551466437),mY=new $APP.K(null,"start-str","start-str",1077409677),cY=new $APP.K(null,"range","range",1639692286),eY=new $APP.K(null,"iso","iso",-1366207543),pY=new $APP.K(null,"in-month?","in-month?",-1630426251),iY=new $APP.K(null,"min-d","min-d",-1118792932),
41
- gY=new $APP.K(null,"allow-same-day?","allow-same-day?",-1971558934),YX=new $APP.K(null,"ok?","ok?",447310304),kY=new $APP.K(null,"end-str","end-str",-558112319),WX=new $APP.K(null,"localized","localized",1722109655),jY=new $APP.K(null,"value-str","value-str",989198845),VX=new $APP.K(null,"format","format",-1306924766),fY=new $APP.K(null,"value-d","value-d",-1768534876),uY=new $APP.K(null,"in-range?","in-range?",-291779262),nY=new $APP.K(null,"end-d","end-d",-1316370898),aY=new $APP.K(null,"range-allow-same-day?",
42
- "range-allow-same-day?",-714516856);var PY="mode value start end min max format locale separator auto-swap range-allow-same-day close-on-select placeholder disabled readonly required name autocomplete aria-label aria-describedby open".split(" ");$APP.ha("baredom.exports.x_date_picker.init",QY);export const init=QY;
2
+ var a_=function(a){return typeof a==="string"?(a=a.trim(),$APP.M(a,"")?a:null):null},b_=function(a){return a<10?"0"+$APP.Q.g(a):""+$APP.Q.g(a)},c_=function(a){return $APP.n(a)?""+$APP.Q.g(a.getUTCFullYear())+"-"+$APP.Q.g(b_(a.getUTCMonth()+1))+"-"+$APP.Q.g(b_(a.getUTCDate())):null},d_=function(a){var b=(b=typeof a==="string")?$APP.rg(/\d{4}-\d{2}-\d{2}/,a):b;return $APP.n(b)?(a=new Date(""+$APP.Q.g(a)+"T00:00:00.000Z"),$APP.n(isNaN(a.getTime()))?null:a):null},e_=function(a,b){if(a==null&&b==null)return 0;
3
+ if(a==null)return-1;if(b==null)return 1;a=a.getTime();b=b.getTime();return a<b?-1:a>b?1:0},f_=function(a,b){return $APP.n(a)?new Date(a.getTime()+b*864E5):null},g_=function(a){return $APP.n(a)?new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1)):null},h_=function(a,b){if($APP.n(a)){var c=a.getUTCFullYear(),d=a.getUTCDate();a=a.getUTCMonth()+b;b=(new Date(Date.UTC(c,a+1,0))).getUTCDate();return new Date(Date.UTC(c,a,$APP.Ii.i(d,b)))}return null},i_=function(a,b,c){a=$APP.n($APP.n(b)?$APP.n(a)?
4
+ e_(a,b)<0:a:b)?b:a;return $APP.n($APP.n(c)?$APP.n(a)?e_(a,c)>0:a:c)?c:a},j_=function(a,b,c){if($APP.n($APP.n(a)?$APP.n(b)?c:b:a)){var d=e_(b,c)<0?c:b;return!(e_(a,e_(b,c)<0?b:c)<0)&&!(e_(a,d)>0)}return null},m_=function(a,b){var c=$APP.J(b);b=$APP.C(c,k_);c=$APP.C(c,$APP.qo);return $APP.n(a)?$APP.B.i(b,l_)?(new Intl.DateTimeFormat($APP.n(c)?c:"default",{year:"numeric",month:"long",day:"numeric",timeZone:"UTC"})).format(a):c_(a):null},p_=function(a){a=a_(a);a=$APP.n(a)?d_(a):null;return new $APP.N(null,
5
+ 2,[n_,a!=null,o_,a],null)},E_=function(a){var b=$APP.J(a),c=$APP.C(b,$APP.Tj),d=$APP.C(b,$APP.om),e=$APP.C(b,$APP.ql);a=$APP.C(b,k_);var f=$APP.C(b,$APP.qo),h=$APP.C(b,q_),l=$APP.C(b,$APP.Gh),m=$APP.C(b,$APP.Jk),q=$APP.C(b,$APP.Gn),r=$APP.C(b,$APP.em),v=$APP.C(b,r_);b=$APP.B.i(m,"range")?s_:t_;a=$APP.B.i(a,"localized")?l_:u_;f=a_(f);m=function(){var A=a_(d);return $APP.n(A)?A:" - "}();e=d_(e);r=d_(r);v=$APP.E(v);h=$APP.E(h);if($APP.B.i(b,t_))return b=d_(l),$APP.Lf([k_,v_,$APP.qo,w_,$APP.Jk,x_,r_,
6
+ $APP.xm,$APP.om,y_,z_],[a,b,f,h,t_,r,v,b!=null,m,e,function(){var A=a_(l);return $APP.n(A)?A:""}()]);var x=d_(q),y=d_(c);b=x!=null&&y!=null;return $APP.Lf([A_,k_,B_,$APP.qo,w_,$APP.Jk,x_,C_,D_,r_,$APP.xm,$APP.om,y_],[function(){var A=a_(c);return $APP.n(A)?A:""}(),a,x,f,h,s_,r,function(){var A=a_(q);return $APP.n(A)?A:""}(),y,v,b,m,e])},G_=function(a){if($APP.n(a)){var b=g_(a),c=f_(b,-($APP.n(b)?b.getUTCDay():0));return $APP.qe(function(d){d=f_(c,d);var e=$APP.B.i(d.getUTCMonth(),a.getUTCMonth());
7
+ return new $APP.N(null,2,[o_,d,F_,e],null)},$APP.pg(0,42))}return null},H_=function(a){return document.createElement(a)},I_=function(a){var b=a.getAttribute("mode");b=E_($APP.Lf([$APP.ql,k_,$APP.qo,q_,$APP.Gh,$APP.Jk,$APP.Gn,$APP.em,r_,$APP.Tj,$APP.om],[a.getAttribute("min"),a.getAttribute("format"),a.getAttribute("locale"),$APP.sh(a.getAttribute("range-allow-same-day")),a.getAttribute("value"),b,a.getAttribute("start"),a.getAttribute("max"),$APP.sh(a.getAttribute("auto-swap")),a.getAttribute("end"),
8
+ a.getAttribute("separator")]));var c=new $APP.N(null,2,[k_,k_.g(b),$APP.qo,$APP.qo.g(b)],null);var d=$APP.J(c);var e=$APP.C(d,k_);d=$APP.C(d,$APP.qo);e=new $APP.N(null,2,[k_,e,$APP.qo,d],null);if($APP.B.i($APP.Jk.g(b),t_))e=$APP.n(v_.g(b))?m_(v_.g(b),e):"";else{d=$APP.om.g(b);var f=B_.g(b);f=$APP.n(f)?D_.g(b):f;e=$APP.n(f)?""+$APP.Q.g(m_(B_.g(b),e))+$APP.Q.g(d)+$APP.Q.g(m_(D_.g(b),e)):$APP.n(B_.g(b))?m_(B_.g(b),e):""}d=$APP.k(a,"__xDatePickerState");d=$APP.n(d)?$APP.k(d,"month"):null;f=v_.g(b);$APP.n(f)||
9
+ (f=B_.g(b),f=$APP.n(f)?f:new Date(Date.now()));d=$APP.n(d)?d:g_(f);a.__xDatePickerState={canon:b,cfg:c,disp:e,month:d}},J_=function(a,b){var c=y_.g(b);c=$APP.n(c)?e_(a,y_.g(b))<0:c;if($APP.n(c))return c;c=x_.g(b);return $APP.n(c)?e_(a,x_.g(b))>0:c},M_=function(a,b){if($APP.B.i($APP.Jk.g(b),t_))return new $APP.N(null,3,[$APP.kk,function(){var l=v_.g(b);return $APP.n(l)?$APP.B.i(0,e_(a,v_.g(b))):l}(),K_,!1,L_,!1],null);var c=B_.g(b),d=D_.g(b),e=function(){var l=$APP.n(c)?$APP.B.i(0,e_(a,c)):c;return $APP.n(l)?
10
+ l:$APP.n(d)?$APP.B.i(0,e_(a,d)):d}(),f=$APP.n(c)?$APP.n(d)?j_(a,c,d):d:c,h=function(){var l=$APP.n(c)?$APP.B.i(0,e_(a,c)):c;return $APP.n(l)?l:$APP.n(d)?$APP.B.i(0,e_(a,d)):d}();return new $APP.N(null,3,[$APP.kk,e,K_,f,L_,h],null)},N_=function(a,b){a.__xDatePickerGridFocus=b;a=$APP.k(a,"__xDatePickerRefs");a=$APP.n(a)?$APP.k(a,"grid"):null;if($APP.n(a)){var c=a.querySelector('[tabindex\x3d"0"]');$APP.n(c)&&c.setAttribute("tabindex","-1");b=a.querySelector('[data-iso\x3d"'+$APP.Q.g(b)+'"]');if($APP.n(b))return b.setAttribute("tabindex",
11
+ "0"),b.focus()}return null},O_=function(a){var b=$APP.k(a,"__xDatePickerRefs");if($APP.n(b)){var c=$APP.k(b,"month-label"),d=$APP.k(b,"grid"),e=$APP.k(b,"weekdays"),f=$APP.k(a,"__xDatePickerState");b=$APP.n(f)?$APP.k(f,"canon"):null;var h=$APP.n(f)?$APP.k(f,"month"):null;f=$APP.n(f)?$APP.k(f,"cfg"):null;f=$APP.n(f)?$APP.qo.g(f):null;$APP.n(c)&&(h=(new Intl.DateTimeFormat($APP.n(f)?f:"default",{year:"numeric",month:"long",timeZone:"UTC"})).format(h),c.textContent=h);if(!$APP.n($APP.k(a,"__xDatePickerWeekdaysDone")))for(a.__xDatePickerWeekdaysDone=
12
+ !0,c="Su Mo Tu We Th Fr Sa".split(" "),h=0;;)if(h<7)f=H_("div"),f.setAttribute("part","weekday"),f.setAttribute("aria-hidden","true"),f.textContent=c[h],e.appendChild(f),h+=1;else break;if($APP.n($APP.n(d)?b:d)){d.textContent="";e=$APP.k(a,"__xDatePickerState");e=G_($APP.n(e)?$APP.k(e,"month"):null);c=$APP.t(e);h=null;for(var l=f=0;;)if(l<f){e=h.F(null,l);e=$APP.J(e);var m=$APP.C(e,o_);e=$APP.C(e,F_);var q=H_("button"),r=c_(m),v=m.getUTCDate(),x=J_(m,b);m=M_(m,b);var y=$APP.J(m);m=$APP.C(y,$APP.kk);
13
+ var A=$APP.C(y,K_);y=$APP.C(y,L_);q.setAttribute("part","day");q.setAttribute("type","button");q.setAttribute("role","gridcell");q.setAttribute("data-iso",r);q.setAttribute("data-outside",$APP.n(e)?"false":"true");q.setAttribute("data-disabled",$APP.n(x)?"true":"false");q.setAttribute("data-selected",$APP.n(m)?"true":"false");q.setAttribute("data-in-range",$APP.n(A)?"true":"false");q.setAttribute("data-range-edge",$APP.n(y)?"true":"false");q.setAttribute("aria-selected",$APP.n(m)?"true":"false");
14
+ q.setAttribute("aria-disabled",$APP.n(x)?"true":"false");q.setAttribute("tabindex","-1");q.textContent=""+$APP.Q.g(v);d.appendChild(q);l+=1}else if(e=$APP.t(c))c=e,$APP.Vc(c)?(h=$APP.Db(c),c=$APP.Eb(c),e=h,f=$APP.z(h),h=e):(e=$APP.u(c),e=$APP.J(e),m=$APP.C(e,o_),e=$APP.C(e,F_),h=H_("button"),f=c_(m),l=m.getUTCDate(),q=J_(m,b),m=M_(m,b),v=$APP.J(m),m=$APP.C(v,$APP.kk),r=$APP.C(v,K_),v=$APP.C(v,L_),h.setAttribute("part","day"),h.setAttribute("type","button"),h.setAttribute("role","gridcell"),h.setAttribute("data-iso",
15
+ f),h.setAttribute("data-outside",$APP.n(e)?"false":"true"),h.setAttribute("data-disabled",$APP.n(q)?"true":"false"),h.setAttribute("data-selected",$APP.n(m)?"true":"false"),h.setAttribute("data-in-range",$APP.n(r)?"true":"false"),h.setAttribute("data-range-edge",$APP.n(v)?"true":"false"),h.setAttribute("aria-selected",$APP.n(m)?"true":"false"),h.setAttribute("aria-disabled",$APP.n(q)?"true":"false"),h.setAttribute("tabindex","-1"),h.textContent=""+$APP.Q.g(l),d.appendChild(h),c=$APP.w(c),h=null,f=
16
+ 0),l=0;else break;d=$APP.k(a,"__xDatePickerGridFocus");a=$APP.k(a,"__xDatePickerRefs");a=$APP.n(a)?$APP.k(a,"grid"):null;$APP.n($APP.n(a)?d:a)?(a=a.querySelector('[data-iso\x3d"'+$APP.Q.g(d)+'"]'),a=$APP.n(a)?a.setAttribute("tabindex","0"):null):a=null;return a}}return null},P_=function(a){var b=$APP.k(a,"__xDatePickerRefs");b=$APP.n(b)?$APP.k(b,"input"):null;var c=$APP.k(a,"__xDatePickerState");c=$APP.n(c)?$APP.k(c,"disp"):null;a=$APP.k(a,"__xDatePickerFocused");return $APP.n($APP.n(b)?$APP.p(a):
17
+ b)?b.value=$APP.n(c)?c:"":null},Q_=function(a){var b=$APP.k(a,"__xDatePickerRefs");if($APP.n(b)){var c=$APP.k(b,"input");b=$APP.k(b,"btn");var d=a.hasAttribute("disabled"),e=a.hasAttribute("readonly"),f=a.getAttribute("placeholder"),h=a.getAttribute("aria-label"),l=a.getAttribute("aria-describedby"),m=a.hasAttribute("open");$APP.n(b)&&($APP.n(d)?b.setAttribute("disabled",""):b.removeAttribute("disabled"));$APP.n($APP.n(d)?m:d)&&a.removeAttribute("open");$APP.n(c)&&(c.setAttribute("aria-expanded",
18
+ $APP.n(m)?"true":"false"),$APP.n(d)?(c.setAttribute("disabled",""),c.setAttribute("aria-disabled","true")):(c.removeAttribute("disabled"),c.removeAttribute("aria-disabled")),$APP.n(e)&&c.setAttribute("readonly",""),$APP.n(e)||c.removeAttribute("readonly"),$APP.n(f)&&c.setAttribute("placeholder",f),$APP.n(h)&&c.setAttribute("aria-label",h),$APP.n(l)&&c.setAttribute("aria-describedby",l));P_(a);return O_(a)}return null},R_=function(a,b){$APP.n(b)?a.setAttribute("value",c_(b)):a.removeAttribute("value")},
19
+ S_=function(a,b,c){if($APP.n(a.hasAttribute("readonly")))return null;var d=$APP.k(a,"__xDatePickerState");d=$APP.n(d)?$APP.k(d,"canon"):null;var e=$APP.n(d)?$APP.Jk.g(d):null,f=$APP.B.i(e,s_)?"range":"single",h=$APP.B.i(e,t_)?{value:c_(b),mode:f,reason:c}:{date:c_(b),mode:f,reason:c};if($APP.ch(a,"x-date-picker-change-request",h)){if($APP.B.i(e,t_))return d=c_(b),R_(a,b),I_(a),Q_(a),$APP.P(a,"x-date-picker-change",{value:d,mode:f,reason:c}),$APP.n(a.hasAttribute("close-on-select"))?(a.removeAttribute("open"),
20
+ Q_(a)):null;e=function(){var y=$APP.k(a,"__xDatePickerRangeStep");return $APP.n(y)?y:0}();h=B_.g(d);if($APP.B.i(e,0))a.setAttribute("start",c_(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1;else if($APP.B.i(e,1)){var l=w_.g(d),m=e_(b,h);if($APP.n(function(){var y=m>0;return y?y:$APP.n(l)?m===0:l}())){var q=$APP.n(r_.g(d))?e_(h,b)<0?h:b:h,r=$APP.n(r_.g(d))?e_(h,b)>0?h:b:b;a.setAttribute("start",c_(q));a.setAttribute("end",c_(r));a.__xDatePickerRangeStep=0;$APP.n(function(){var y=a.hasAttribute("close-on-select");
21
+ return $APP.n(y)?q!=null&&r!=null:y}())&&a.removeAttribute("open")}else a.setAttribute("start",c_(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1}else a.setAttribute("start",c_(b)),a.removeAttribute("end"),a.__xDatePickerRangeStep=1;I_(a);Q_(a);b=$APP.k(a,"__xDatePickerState");b=$APP.n(b)?$APP.k(b,"canon"):null;var v=$APP.n(B_.g(b))?c_(B_.g(b)):null,x=$APP.n(D_.g(b))?c_(D_.g(b)):null;b=function(){var y={mode:f,reason:c};$APP.n(v)&&(y.start=v);$APP.n(x)&&(y.end=x);return y}();return $APP.P(a,
22
+ "x-date-picker-change",b)}return null},T_=function(a,b){var c=$APP.k(a,"__xDatePickerRefs");c=$APP.n(c)?$APP.k(c,"input"):null;var d=$APP.n(c)?c.value:null;c=$APP.k(a,"__xDatePickerState");var e=$APP.n(c)?$APP.k(c,"canon"):null,f=$APP.Jk.g(e);c=$APP.B.i(f,s_)?"range":"single";$APP.P(a,"x-date-picker-input",{value:d,mode:c});if($APP.B.i(f,t_)){if(d=p_(d),e=$APP.J(d),d=$APP.C(e,n_),e=$APP.C(e,o_),$APP.n(d)){f=c_(e);d=$APP.ch(a,"x-date-picker-change-request",{value:f,mode:c,reason:b});if($APP.n(d.defaultPrevented))return null;
23
+ R_(a,e);I_(a);Q_(a);return $APP.P(a,"x-date-picker-change",{value:f,mode:c,reason:b})}}else if(e=new $APP.N(null,1,[$APP.om,$APP.om.g(e)],null),e=$APP.J(e),e=$APP.C(e,$APP.om),e=typeof e==="string"&&e.length>0?e:" - ",d=a_(d),d==null?d=new $APP.N(null,3,[n_,!1,$APP.Gn,null,$APP.Tj,null],null):(f=d.indexOf(e),f<0?(d=p_(d),e=$APP.J(d),d=$APP.C(e,n_),e=$APP.C(e,o_),d=new $APP.N(null,3,[n_,d,$APP.Gn,e,$APP.Tj,null],null)):(e=d.substring(f+e.length).trim(),d=d_(d.substring(0,f).trim()),e=d_(e),d=new $APP.N(null,
24
+ 3,[n_,d!=null&&e!=null,$APP.Gn,d,$APP.Tj,e],null))),f=$APP.J(d),d=$APP.C(f,n_),e=$APP.C(f,$APP.Gn),f=$APP.C(f,$APP.Tj),$APP.n(d)){e=c_(e);f=c_(f);d=$APP.ch(a,"x-date-picker-change-request",{start:e,end:f,mode:c,reason:b});if($APP.n(d.defaultPrevented))return null;a.setAttribute("start",e);a.setAttribute("end",f);a.__xDatePickerRangeStep=0;I_(a);Q_(a);return $APP.P(a,"x-date-picker-change",{start:e,end:f,mode:c,reason:b})}return null},U_=function(a,b){var c=$APP.k(a,"__xDatePickerState"),d=$APP.n(c)?
25
+ $APP.k(c,"month"):null;if($APP.n(d)){var e=d.getUTCFullYear();d=d.getUTCMonth();b=$APP.B.i(b,$APP.el)?new Date(Date.UTC(e,d+1,1)):new Date(Date.UTC(e,d-1,1));c.month=b;return O_(a)}return null},V_=function(a){return $APP.n(a.hasAttribute("open"))?a.removeAttribute("open"):null},W_=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.currentTarget.getAttribute("data-nav");return $APP.B.i(b,"prev")?U_(a,$APP.Zk):U_(a,$APP.el)},X_=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
26
+ var c=b.key,d=$APP.k(a,"__xDatePickerGridFocus"),e=$APP.n(d)?d_(d):null;d=$APP.k(a,"__xDatePickerState");var f=$APP.n(d)?$APP.k(d,"canon"):null,h=$APP.n(d)?$APP.k(d,"month"):null,l=$APP.n(e)?function(){switch(c){case "ArrowLeft":return f_(e,-1);case "ArrowRight":return f_(e,1);case "ArrowUp":return f_(e,-7);case "ArrowDown":return f_(e,7);case "PageUp":return h_(e,-1);case "PageDown":return h_(e,1);case "Home":return $APP.n(e)?f_(e,-($APP.n(e)?e.getUTCDay():0)):null;case "End":return $APP.n(e)?f_(e,
27
+ 6-($APP.n(e)?e.getUTCDay():0)):null;default:return null}}():null;return l!=null?(b.preventDefault(),b=i_(l,y_.g(f),x_.g(f)),f=c_(b),$APP.n($APP.n(h)?$APP.M(b.getUTCMonth(),h.getUTCMonth()):h)&&($APP.fa(d,"month",g_(b)),O_(a)),N_(a,f)):$APP.n(function(){var m=$APP.B.i(c,"Enter")||$APP.B.i(c," ");return m?$APP.n(e)?$APP.p(a.hasAttribute("readonly")):e:m}())?(b.preventDefault(),$APP.n(J_(e,f))?null:S_(a,e,"keyboard")):$APP.B.i(c,"Escape")?(b.preventDefault(),V_(a),d=$APP.k(a,"__xDatePickerRefs"),d=$APP.n(d)?
28
+ $APP.k(d,"input"):null,$APP.n(d)?d.focus():null):null},Y_=function(a){function b(H){return $APP.n(a.hasAttribute("open"))?$APP.n(H.composedPath().some(function(K){return K===a}))?null:V_(a):null}function c(H){return H.preventDefault()}function d(H){return X_(a,H)}function e(H){var K=a.hasAttribute("disabled");$APP.n($APP.n(K)?K:a.hasAttribute("readonly"))?H=null:(H=H.target.closest("button[data-iso]"),$APP.n($APP.n(H)?$APP.M("true",H.getAttribute("data-disabled")):H)?(H=H.getAttribute("data-iso"),
29
+ H=d_(H),H=$APP.n(H)?S_(a,H,"click"):null):H=null);return H}function f(H){return W_(a,H)}function h(H){return W_(a,H)}function l(){var H=a.hasAttribute("disabled");if($APP.n($APP.n(H)?H:a.hasAttribute("readonly")))H=null;else if($APP.n(a.hasAttribute("open")))H=V_(a);else if($APP.n(a.hasAttribute("open")))H=null;else{a.setAttribute("open","");H=$APP.k(a,"__xDatePickerState");H=$APP.n(H)?$APP.k(H,"canon"):null;var K=v_.g(H);$APP.n(K)?H=K:(H=B_.g(H),H=$APP.n(H)?H:new Date(Date.now()));H=c_(H);H=N_(a,
30
+ H)}return H}function m(){a.__xDatePickerFocused=!1;$APP.n(a.hasAttribute("disabled"))||T_(a,"blur");return P_(a)}function q(){a.__xDatePickerFocused=!0}function r(H){if($APP.n(a.hasAttribute("disabled")))H=null;else{var K=H.key;$APP.B.i(K,"Enter")?(H.preventDefault(),H=T_(a,"keyboard")):H=$APP.B.i(K,"Escape")?V_(a):null}return H}function v(){var H=$APP.k(a,"__xDatePickerRefs");H=$APP.n(H)?$APP.k(H,"input"):null;var K=$APP.k(a,"__xDatePickerState");K=$APP.B.i($APP.Jk.g($APP.n(K)?$APP.k(K,"canon"):
31
+ null),s_)?"range":"single";a.__xDatePickerDisplay=$APP.n(H)?H.value:null;return $APP.P(a,"x-date-picker-input",{value:$APP.n(H)?H.value:null,mode:K})}var x=$APP.k(a,"__xDatePickerRefs"),y=$APP.k(x,"input"),A=$APP.k(x,"btn"),D=$APP.k(x,"nav-prev"),G=$APP.k(x,"nav-next"),I=$APP.k(x,"grid");x=$APP.k(x,"popover");y.addEventListener("input",v);y.addEventListener("keydown",r);y.addEventListener("focus",q);y.addEventListener("blur",m);A.addEventListener("click",l);D.addEventListener("click",h);G.addEventListener("click",
32
+ f);I.addEventListener("click",e);I.addEventListener("keydown",d);x.addEventListener("pointerdown",c);document.addEventListener("pointerdown",b,!0);$APP.fa(a,"__xDatePickerHandlers",{"pop-md":c,keydown:r,grid:e,"grid-kd":d,next:f,blur:m,prev:h,focus:q,input:v,btn:l,"doc-click":b})},Z_=function(a){var b=$APP.k(a,"__xDatePickerRefs");a=$APP.k(a,"__xDatePickerHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,"btn"),e=$APP.k(b,"nav-prev"),f=$APP.k(b,"nav-next"),h=$APP.k(b,"grid");
33
+ b=$APP.k(b,"popover");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));c.removeEventListener("focus",$APP.k(a,"focus"));c.removeEventListener("blur",$APP.k(a,"blur"));d.removeEventListener("click",$APP.k(a,"btn"));e.removeEventListener("click",$APP.k(a,"prev"));f.removeEventListener("click",$APP.k(a,"next"));h.removeEventListener("click",$APP.k(a,"grid"));h.removeEventListener("keydown",$APP.k(a,"grid-kd"));b.removeEventListener("pointerdown",$APP.k(a,
34
+ "pop-md"));return document.removeEventListener("pointerdown",$APP.k(a,"doc-click"),!0)}return null},$_=function(a){if(!$APP.n($APP.k(a,"__xDatePickerRefs"))){var b=a.attachShadow({mode:"open"}),c=H_("style"),d=H_("div"),e=H_("input"),f=H_("button"),h=H_("div"),l=H_("div"),m=H_("button"),q=H_("div"),r=H_("button"),v=H_("div"),x=H_("div"),y=H_("div");c.textContent=":host{display:block;color-scheme:light dark;--x-date-picker-border:var(--x-color-border,#cbd5e1);--x-date-picker-radius:var(--x-radius-md,8px);--x-date-picker-input-bg:var(--x-color-surface,#fff);--x-date-picker-text:inherit;--x-date-picker-focus:var(--x-color-focus-ring,#60a5fa);--x-date-picker-placeholder:var(--x-color-text-muted,#94a3b8);--x-date-picker-btn-bg:var(--x-color-surface-hover,#f8fafc);--x-date-picker-btn-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-popover-bg:var(--x-color-bg,#fff);--x-date-picker-popover-radius:var(--x-radius-lg,12px);--x-date-picker-nav-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-weekday:var(--x-color-text-muted,#94a3b8);--x-date-picker-day-text:inherit;--x-date-picker-day-hover:var(--x-color-surface-active,#f1f5f9);--x-date-picker-selected-bg:var(--x-color-primary,#2563eb);--x-date-picker-selected-text:#fff;--x-date-picker-range-bg:var(--x-color-surface-active,#dbeafe);--x-date-picker-range-text:var(--x-color-primary-active,#1e40af);}[part\x3dcontainer]{position:relative;display:flex;align-items:stretch;gap:8px;width:100%;}[part\x3dinput]{flex:1;min-width:0;appearance:none;box-sizing:border-box;border:1px solid var(--x-date-picker-border,#cbd5e1);border-radius:var(--x-date-picker-radius,8px);padding:8px 12px;font-size:0.9375rem;background:var(--x-date-picker-input-bg,#fff);color:var(--x-date-picker-text,inherit);outline:none;}[part\x3dinput]:focus{border-color:var(--x-date-picker-focus,#60a5fa);box-shadow:0 0 0 3px rgba(96,165,250,0.25);}[part\x3dinput][disabled]{opacity:0.5;cursor:default;}[part\x3dbtn][disabled]{opacity:0.5;cursor:default;pointer-events:none;}[part\x3dinput]::placeholder{color:var(--x-date-picker-placeholder,#94a3b8);}[part\x3dbtn]{all:unset;cursor:pointer;flex:0 0 auto;width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--x-date-picker-border,#cbd5e1);border-radius:var(--x-date-picker-radius,8px);background:var(--x-date-picker-btn-bg,#f8fafc);color:var(--x-date-picker-text,inherit);box-sizing:border-box;}[part\x3dbtn]:hover{background:var(--x-date-picker-btn-hover,#f1f5f9);}[part\x3dbtn]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dpopover]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;background:var(--x-date-picker-popover-bg,#fff);border:1px solid var(--x-date-picker-border,#e2e8f0);border-radius:var(--x-date-picker-popover-radius,12px);box-shadow:0 8px 32px rgba(0,0,0,0.12),0 2px 8px rgba(0,0,0,0.06);padding:16px;width:var(--x-date-picker-popover-width,304px);max-width:calc(100vw - 1rem);box-sizing:border-box;}:host([open]) [part\x3dpopover]{display:block;}[part\x3dnav]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}[part\x3dnavbtn]{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;color:var(--x-date-picker-text,inherit);}[part\x3dnavbtn]:hover{background:var(--x-date-picker-nav-hover,#f1f5f9);}[part\x3dnavbtn]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dmonthlabel]{font-weight:600;font-size:0.9375rem;}[part\x3dweekdays]{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:4px;}[part\x3dweekday]{text-align:center;font-size:0.75rem;font-weight:600;color:var(--x-date-picker-weekday,#94a3b8);padding:4px 0;}[part\x3dgrid]{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;}[part\x3dday]{all:unset;cursor:pointer;box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:36px;border-radius:6px;font-size:0.875rem;color:var(--x-date-picker-day-text,inherit);}[part\x3dday]:hover:not([disabled]){background:var(--x-date-picker-day-hover,#f1f5f9);}[part\x3dday]:focus-visible{outline:2px solid var(--x-date-picker-focus,#60a5fa);}[part\x3dday][data-outside\x3dtrue]{opacity:0.4;}[part\x3dday][data-disabled\x3dtrue]{opacity:0.3;cursor:default;pointer-events:none;}[part\x3dday][data-selected\x3dtrue]{background:var(--x-date-picker-selected-bg,#2563eb);color:var(--x-date-picker-selected-text,#fff);font-weight:600;}[part\x3dday][data-in-range\x3dtrue]:not([data-range-edge\x3dtrue]){background:var(--x-date-picker-range-bg,#dbeafe);color:var(--x-date-picker-range-text,#1e40af);border-radius:0;}[part\x3dday][data-range-edge\x3dtrue]{background:var(--x-date-picker-selected-bg,#2563eb);color:var(--x-date-picker-selected-text,#fff);font-weight:600;}[part\x3dsr-status]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}@media (prefers-color-scheme:dark){:host{--x-date-picker-border:var(--x-color-border,#334155);--x-date-picker-input-bg:var(--x-color-surface,#0f172a);--x-date-picker-btn-bg:var(--x-color-surface-hover,#1e293b);--x-date-picker-btn-hover:var(--x-color-surface-active,#334155);--x-date-picker-popover-bg:var(--x-color-bg,#1e293b);--x-date-picker-day-hover:var(--x-color-surface-active,#334155);--x-date-picker-selected-bg:var(--x-color-primary,#3b82f6);--x-date-picker-range-bg:var(--x-color-surface-active,#1e3a8a);--x-date-picker-range-text:var(--x-color-focus-ring,#93c5fd);--x-date-picker-nav-hover:var(--x-color-surface-active,#334155);}}@media (prefers-reduced-motion:reduce){[part\x3dpopover]{transition:none;}}";
35
+ d.setAttribute("part","container");e.setAttribute("part","input");e.setAttribute("type","text");e.setAttribute("inputmode","none");e.setAttribute("autocomplete","off");e.setAttribute("role","combobox");e.setAttribute("aria-haspopup","dialog");e.setAttribute("aria-expanded","false");f.setAttribute("part","btn");f.setAttribute("type","button");f.setAttribute("aria-label","Open calendar");f.textContent="\ud83d\udcc5";h.setAttribute("part","popover");h.setAttribute("role","dialog");h.setAttribute("aria-modal",
36
+ "true");h.setAttribute("aria-label","Calendar");l.setAttribute("part","nav");m.setAttribute("part","navbtn");m.setAttribute("data-nav","prev");m.setAttribute("type","button");m.setAttribute("aria-label","Previous month");m.textContent="‹";q.setAttribute("part","monthlabel");q.setAttribute("aria-live","polite");r.setAttribute("part","navbtn");r.setAttribute("data-nav","next");r.setAttribute("type","button");r.setAttribute("aria-label","Next month");r.textContent="›";v.setAttribute("part","weekdays");
37
+ v.setAttribute("aria-hidden","true");x.setAttribute("part","grid");x.setAttribute("role","grid");x.setAttribute("aria-label","Calendar grid");y.setAttribute("part","sr-status");y.setAttribute("aria-live","polite");y.setAttribute("aria-atomic","true");l.appendChild(m);l.appendChild(q);l.appendChild(r);h.appendChild(l);h.appendChild(v);h.appendChild(x);h.appendChild(y);d.appendChild(e);d.appendChild(f);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xDatePickerRefs={weekdays:v,grid:x,popover:h,
38
+ "nav-next":r,"month-label":q,input:e,btn:f,sr:y,"nav-prev":m}}Z_(a);Y_(a);I_(a);return Q_(a)},a0=function(a){return Z_(a)},b0=function(a){I_(a);return Q_(a)},c0=function(a){a.focus=function(){var b=$APP.k(this,"__xDatePickerRefs");b=$APP.n(b)?$APP.k(b,"input"):null;return $APP.n(b)?b.focus():null};a.commit=function(){return T_(this,"programmatic")};return a.clear=function(){var b=$APP.k(this,"__xDatePickerState");$APP.B.i($APP.Jk.g($APP.n(b)?$APP.k(b,"canon"):null),t_)?this.removeAttribute("value"):
39
+ (this.removeAttribute("start"),this.removeAttribute("end"));I_(this);return Q_(this)}},e0=function(a){$APP.jh(a,d0);return c0(a)},g0=function(){return $APP.Yg("x-date-picker",new $APP.N(null,5,[$APP.Pg,f0,$APP.Qg,$_,$APP.Rg,a0,$APP.Sg,b0,$APP.Wg,e0],null))},B_=new $APP.F(null,"start-d","start-d",-1546785820),o_=new $APP.F(null,"date","date",-1463434462),r_=new $APP.F(null,"auto-swap?","auto-swap?",-1675454411),L_=new $APP.F(null,"edge?","edge?",203916303),x_=new $APP.F(null,"max-d","max-d",-814680979),
40
+ t_=new $APP.F(null,"single","single",1551466437),C_=new $APP.F(null,"start-str","start-str",1077409677),s_=new $APP.F(null,"range","range",1639692286),u_=new $APP.F(null,"iso","iso",-1366207543),F_=new $APP.F(null,"in-month?","in-month?",-1630426251),y_=new $APP.F(null,"min-d","min-d",-1118792932),w_=new $APP.F(null,"allow-same-day?","allow-same-day?",-1971558934),n_=new $APP.F(null,"ok?","ok?",447310304),A_=new $APP.F(null,"end-str","end-str",-558112319),l_=new $APP.F(null,"localized","localized",
41
+ 1722109655),z_=new $APP.F(null,"value-str","value-str",989198845),k_=new $APP.F(null,"format","format",-1306924766),v_=new $APP.F(null,"value-d","value-d",-1768534876),K_=new $APP.F(null,"in-range?","in-range?",-291779262),D_=new $APP.F(null,"end-d","end-d",-1316370898),q_=new $APP.F(null,"range-allow-same-day?","range-allow-same-day?",-714516856);var f0="mode value start end min max format locale separator auto-swap range-allow-same-day close-on-select placeholder disabled readonly required name autocomplete aria-label aria-describedby open".split(" "),d0=new $APP.N(null,8,[$APP.Jk,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"mode"],null),$APP.Gh,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),$APP.Gn,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"start"],null),$APP.Tj,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"end"],null),$APP.al,new $APP.N(null,
42
+ 2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.Hn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),$APP.Ll,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"required"],null),$APP.Bn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null)],null);
43
+ $APP.Yd(["x-date-picker-input",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.U,$APP.Jk,$APP.U],null)],null),"x-date-picker-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.U,$APP.Jk,$APP.U,$APP.Yj,$APP.U],null)],null),"x-date-picker-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.U,$APP.Jk,$APP.U,$APP.Yj,$APP.U],null)],null)]);$APP.ca("baredom.exports.x_date_picker.init",g0);export const init=g0;