@vanelsas/baredom 2.9.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +1 -1
  3. package/custom-elements.json +3393 -2954
  4. package/dist/baredom.d.ts +106 -86
  5. package/dist/base.js +550 -455
  6. package/dist/integrity.json +103 -102
  7. package/dist/x-alert.js +16 -17
  8. package/dist/x-avatar-group.js +9 -9
  9. package/dist/x-avatar.js +14 -15
  10. package/dist/x-badge.js +9 -9
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +14 -13
  14. package/dist/x-button.js +1 -17
  15. package/dist/x-cancel-dialogue.js +14 -13
  16. package/dist/x-card.d.ts +1 -1
  17. package/dist/x-card.js +7 -7
  18. package/dist/x-carousel.d.ts +3 -0
  19. package/dist/x-carousel.js +35 -33
  20. package/dist/x-chart.js +47 -47
  21. package/dist/x-checkbox.js +1 -11
  22. package/dist/x-chip.js +1 -1
  23. package/dist/x-collapse.d.ts +1 -0
  24. package/dist/x-collapse.js +11 -10
  25. package/dist/x-color-picker.js +46 -45
  26. package/dist/x-combobox.d.ts +2 -0
  27. package/dist/x-combobox.js +30 -26
  28. package/dist/x-command-palette.d.ts +3 -0
  29. package/dist/x-command-palette.js +28 -26
  30. package/dist/x-confetti.js +24 -22
  31. package/dist/x-container.js +5 -5
  32. package/dist/x-context-menu.d.ts +4 -0
  33. package/dist/x-context-menu.js +21 -20
  34. package/dist/x-copy.js +20 -20
  35. package/dist/x-currency-field.d.ts +2 -0
  36. package/dist/x-currency-field.js +24 -23
  37. package/dist/x-date-picker.d.ts +3 -0
  38. package/dist/x-date-picker.js +42 -42
  39. package/dist/x-divider.js +10 -9
  40. package/dist/x-drawer.js +11 -10
  41. package/dist/x-dropdown.d.ts +3 -0
  42. package/dist/x-dropdown.js +12 -11
  43. package/dist/x-fieldset.js +6 -5
  44. package/dist/x-file-download.js +7 -7
  45. package/dist/x-file-upload.d.ts +2 -0
  46. package/dist/x-file-upload.js +23 -22
  47. package/dist/x-form-field.js +15 -15
  48. package/dist/x-form.d.ts +4 -0
  49. package/dist/x-form.js +10 -9
  50. package/dist/x-gaussian-blur.js +13 -12
  51. package/dist/x-grid.js +6 -6
  52. package/dist/x-i18n-provider.js +7 -7
  53. package/dist/x-i18n.js +4 -4
  54. package/dist/x-icon.js +7 -7
  55. package/dist/x-image.js +17 -18
  56. package/dist/x-kbd.js +16 -16
  57. package/dist/x-kinetic-canvas.js +26 -25
  58. package/dist/x-kinetic-font.js +27 -27
  59. package/dist/x-kinetic-typography.js +35 -33
  60. package/dist/x-liquid-dock.js +34 -38
  61. package/dist/x-liquid-fill.js +42 -45
  62. package/dist/x-liquid-glass.js +41 -47
  63. package/dist/x-menu-item.js +8 -8
  64. package/dist/x-menu.js +10 -10
  65. package/dist/x-metaball-cursor.js +23 -26
  66. package/dist/x-modal.js +12 -11
  67. package/dist/x-morph-stack.d.ts +4 -0
  68. package/dist/x-morph-stack.js +37 -38
  69. package/dist/x-multi-combobox.js +36 -36
  70. package/dist/x-navbar.js +15 -12
  71. package/dist/x-neural-glow.js +30 -33
  72. package/dist/x-notification-center.d.ts +2 -0
  73. package/dist/x-notification-center.js +9 -9
  74. package/dist/x-organic-divider.js +18 -17
  75. package/dist/x-organic-progress.js +35 -37
  76. package/dist/x-organic-shape.js +14 -13
  77. package/dist/x-otp-input.js +22 -22
  78. package/dist/x-pagination.js +14 -15
  79. package/dist/x-particle-button.js +51 -51
  80. package/dist/x-popover.d.ts +3 -0
  81. package/dist/x-popover.js +27 -26
  82. package/dist/x-progress-circle.d.ts +3 -0
  83. package/dist/x-progress-circle.js +9 -9
  84. package/dist/x-progress.js +8 -10
  85. package/dist/x-proximity-list.js +20 -19
  86. package/dist/x-radio.js +11 -11
  87. package/dist/x-ripple-effect.js +10 -11
  88. package/dist/x-scroll-parallax.js +17 -18
  89. package/dist/x-scroll-stack.js +16 -17
  90. package/dist/x-scroll-story.js +33 -34
  91. package/dist/x-scroll-timeline.js +46 -45
  92. package/dist/x-scroll.d.ts +3 -0
  93. package/dist/x-scroll.js +38 -40
  94. package/dist/x-search-field.d.ts +2 -0
  95. package/dist/x-search-field.js +1 -15
  96. package/dist/x-select.js +1 -11
  97. package/dist/x-sidebar.js +18 -17
  98. package/dist/x-skeleton-group.js +12 -12
  99. package/dist/x-skeleton.js +1 -1
  100. package/dist/x-slider.js +16 -15
  101. package/dist/x-soft-body.js +20 -22
  102. package/dist/x-spacer.js +4 -4
  103. package/dist/x-spinner.js +4 -4
  104. package/dist/x-splash.js +12 -13
  105. package/dist/x-spotlight-card.js +12 -12
  106. package/dist/x-stat.js +10 -10
  107. package/dist/x-stepper.js +13 -14
  108. package/dist/x-switch.js +11 -10
  109. package/dist/x-tab.js +6 -6
  110. package/dist/x-table-cell.js +21 -20
  111. package/dist/x-table-row.js +8 -8
  112. package/dist/x-table.d.ts +32 -32
  113. package/dist/x-table.js +13 -12
  114. package/dist/x-tabs.js +11 -11
  115. package/dist/x-text-area.js +19 -19
  116. package/dist/x-theme.js +25 -25
  117. package/dist/x-timeline-item.js +20 -21
  118. package/dist/x-timeline.js +8 -8
  119. package/dist/x-toast.d.ts +1 -0
  120. package/dist/x-toast.js +22 -23
  121. package/dist/x-toaster.js +7 -8
  122. package/dist/x-tooltip.d.ts +2 -0
  123. package/dist/x-tooltip.js +12 -12
  124. package/dist/x-trace-history.d.ts +242 -0
  125. package/dist/x-trace-history.js +121 -0
  126. package/dist/x-typography.js +9 -9
  127. package/dist/x-welcome-tour.js +63 -60
  128. package/package.json +9 -2
@@ -16,6 +16,10 @@ export interface XContextMenu extends HTMLElement {
16
16
  placement: string;
17
17
  offset: string;
18
18
  zIndex: string;
19
+ openAt(x: number, y: number): void;
20
+ toggleAt(x: number, y: number): void;
21
+ openForElement(anchor: Record<string, any>): void;
22
+ close(): void;
19
23
 
20
24
  addEventListener<K extends keyof XContextMenuEventMap>(
21
25
  type: K,
@@ -1,21 +1,22 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var $8=function(a){return $APP.n(a)?a.shadowRoot.querySelector("[part\x3dpanel]"):null},a9=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:b):b},Bfa=function(a){return $APP.B.j(a,"bottom-start")?"top-start":$APP.B.j(a,"bottom-end")?"top-end":$APP.B.j(a,"top-start")?"bottom-start":$APP.B.j(a,"top-end")?"bottom-end":$APP.B.j(a,"right-start")?"left-start":$APP.B.j(a,"left-start")?"right-start":a},Cfa=function(a,b,c,d){var e=$APP.H(c);c=$APP.C(e,$APP.kn);var f=$APP.C(e,
3
- $APP.jn),h=$APP.C(e,$APP.ji);e=$APP.C(e,$APP.ki);var l=$APP.H(d);d=$APP.C(l,$APP.ji);l=$APP.C(l,$APP.ki);switch(a){case "bottom-start":return new $APP.P(null,2,[$APP.kn,c,$APP.jn,f+e+b],null);case "bottom-end":return new $APP.P(null,2,[$APP.kn,c+h-d,$APP.jn,f+e+b],null);case "top-start":return new $APP.P(null,2,[$APP.kn,c,$APP.jn,f-l-b],null);case "top-end":return new $APP.P(null,2,[$APP.kn,c+h-d,$APP.jn,f-l-b],null);case "right-start":return new $APP.P(null,2,[$APP.kn,c+h+b,$APP.jn,f],null);case "left-start":return new $APP.P(null,
4
- 2,[$APP.kn,c-d-b,$APP.jn,f],null);default:return new $APP.P(null,2,[$APP.kn,c,$APP.jn,f+e+b],null)}},b9=function(a,b,c,d,e){function f(w){var y=Cfa(w,b,c,d);y=$APP.H(y);var A=$APP.C(y,$APP.kn),D=$APP.C(y,$APP.jn);y=A>=8&&A+m<=h-8;var G=D>=8&&D+q<=l-8;A=$APP.Di.j($APP.Ci.j(A,8),h-m-8);D=$APP.Di.j($APP.Ci.j(D,8),l-q-8);return new $APP.P(null,5,[$APP.kn,A,$APP.jn,D,$APP.Hj,w,$APP.En,y&&G,$APP.Xl,$APP.Ci.j(40,l-D-8)],null)}e=$APP.H(e);var h=$APP.C(e,$APP.ji),l=$APP.C(e,$APP.ki);e=$APP.H(d);var m=$APP.C(e,
5
- $APP.ji),q=$APP.C(e,$APP.ki),r=f(a),v=f(Bfa(a));return $APP.n(function(){var w=$APP.En.i(r);return $APP.n(w)?w:$APP.p($APP.En.i(v))}())?r:v},f9=function(a){a=new $APP.P(null,5,[$APP.Sj,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Eh,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.Oo,a.getAttribute("placement"),c9,a.getAttribute("offset"),d9,a.getAttribute("z-index")],null);var b=$APP.H(a),c=$APP.C(b,$APP.Sj),d=$APP.C(b,$APP.Eh),e=$APP.C(b,$APP.Oo);a=$APP.C(b,
6
- c9);b=$APP.C(b,d9);c=$APP.rh(c);d=$APP.rh(d);e=typeof e==="string"&&$APP.Vc(Dfa,e)?e:"bottom-start";return new $APP.P(null,5,[$APP.to,c,$APP.Y,d,$APP.gl,e,$APP.Ej,a9(a,8),e9,a9(b,1E3)],null)},g9=function(a){return $APP.xc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},h9=function(a){return $APP.n(a)?a.focus():null},i9=function(a,b){a=$APP.yh(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
7
- b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},j9=function(a,b,c,d){var e=$APP.H(d);d=$APP.C(e,e9);e=$APP.C(e,$APP.Xl);a.style.zIndex=""+$APP.R.i(d);a=$8(a);$APP.n(a)&&(a.style.left=""+$APP.R.i(b)+"px",a.style.top=""+$APP.R.i(c)+"px",a.style.maxHeight=""+$APP.R.i(e)+"px")},k9=function(a,b){a=$APP.t($APP.xc(a.children));for(var c=null,d=0,e=0;;)if(e<d){var f=c.G(null,e);b.appendChild(f.cloneNode(!0));
8
- e+=1}else if(a=$APP.t(a))c=a,$APP.Rc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,f=$APP.z(a),a=d,d=f):(f=$APP.u(c),b.appendChild(f.cloneNode(!0)),a=$APP.x(c),c=null,d=0),e=0;else break},m9=function(a,b){function c(e){e.stopPropagation();e=e.target.closest("[role\x3dmenuitem]");return $APP.n(e)?($APP.ah(a,"x-context-menu-select",{item:e}),l9.j?l9.j(a,"select"):l9.call(null,a,"select")):null}var d=$8(b);$APP.zh(b,b,"keydown",function(e){var f=e.key,h=b.shadowRoot.activeElement;return $APP.B.j(f,"Tab")?l9.j?l9.j(a,
9
- "keyboard"):l9.call(null,a,"keyboard"):$APP.B.j(f,"ArrowDown")?(e.preventDefault(),$APP.n(h)?(e=g9(d),h=$APP.Yc(e).indexOf(h),h=$APP.Dc(e,$APP.jd(h+1,$APP.z(e)),null),h=h9(h)):h=h9($APP.u(g9(d))),h):$APP.B.j(f,"ArrowUp")?(e.preventDefault(),$APP.n(h)?(e=g9(d),f=$APP.z(e),h=$APP.Yc(e).indexOf(h),h=$APP.Dc(e,$APP.jd(h+(f-1),f),null),h=h9(h)):h=h9($APP.u(g9(d))),h):($APP.B.j(f,"Enter")||$APP.B.j(f," "))&&$APP.n(h)?(e.preventDefault(),h.click()):null},!0);$APP.n(d)&&$APP.zh(b,d,"click",c,!1)},n9=function(a){function b(d){var e=
10
- $APP.k(a,"__xContextMenuLayer");if($APP.n(e)){var f=$8(e);d=d.composedPath();d=$APP.Yd(function(h){return h===f},$APP.xc(d));return $APP.n($APP.n(f)?$APP.p(d):f)?l9.j?l9.j(a,"backdrop"):l9.call(null,a,"backdrop"):null}return null}function c(d){return $APP.B.j(d.key,"Escape")?(d.preventDefault(),l9.j?l9.j(a,"keyboard"):l9.call(null,a,"keyboard")):null}setTimeout(function(){if($APP.n(a.hasAttribute("open")))document.addEventListener("keydown",c),document.addEventListener("click",b),a.__xContextMenuDocH=
11
- {keydown:c,click:b};else return null},0)},l9=function(a,b){if($APP.n(a.hasAttribute("open"))&&$APP.bh(a,"x-context-menu-close-request",{reason:b})){var c=$APP.k(a,"__xContextMenuDocH");$APP.n(c)&&(document.removeEventListener("keydown",$APP.k(c,"keydown")),document.removeEventListener("click",$APP.k(c,"click")),a.__xContextMenuDocH=null);a.removeAttribute("open");$APP.Ah($APP.k(a,"__xContextMenuLayer"));a.__xContextMenuLayer=null;return $APP.ah(a,"x-context-menu-close",{reason:b})}return null},o9=
12
- function(a,b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;if($APP.bh(a,"x-context-menu-open-request",{reason:d})){var e=f9(a);e=$APP.H(e);var f=$APP.C(e,$APP.gl),h=$APP.C(e,$APP.Ej),l=$APP.C(e,e9),m=window.innerWidth,q=window.innerHeight,r=new $APP.P(null,4,[$APP.kn,b,$APP.jn,c,$APP.ji,1,$APP.ki,1],null);b=b9(f,h,r,new $APP.P(null,2,[$APP.ji,200,$APP.ki,300],null),new $APP.P(null,2,[$APP.ji,m,$APP.ki,q],null));var v=i9(a,l);k9(a,$8(v));m9(a,v);j9(v,$APP.kn.i(b),$APP.jn.i(b),$APP.Ai.m(b,
13
- e9,l));a.setAttribute("open","");a.__xContextMenuLayer=v;n9(a);requestAnimationFrame(function(){var w=$8(v);if($APP.n(w)){var y=b9(f,h,r,new $APP.P(null,2,[$APP.ji,w.offsetWidth,$APP.ki,w.offsetHeight],null),new $APP.P(null,2,[$APP.ji,m,$APP.ki,q],null));j9(v,$APP.kn.i(y),$APP.jn.i(y),$APP.Ai.m(y,e9,l));return h9($APP.u(g9(w)))}return null});return $APP.ah(a,"x-context-menu-open",{reason:d})}return null},Efa=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();
14
- var c=f9(a);c=$APP.H(c);var d=$APP.C(c,$APP.gl),e=$APP.C(c,$APP.Ej),f=$APP.C(c,e9),h=window.innerWidth,l=window.innerHeight,m=new $APP.P(null,4,[$APP.kn,b.left,$APP.jn,b.top,$APP.ji,b.width,$APP.ki,b.height],null);if($APP.bh(a,"x-context-menu-open-request",{reason:"programmatic"})){b=b9(d,e,m,new $APP.P(null,2,[$APP.ji,200,$APP.ki,300],null),new $APP.P(null,2,[$APP.ji,h,$APP.ki,l],null));var q=i9(a,f);k9(a,$8(q));m9(a,q);j9(q,$APP.kn.i(b),$APP.jn.i(b),$APP.Ai.m(b,e9,f));a.setAttribute("open","");
15
- a.__xContextMenuLayer=q;n9(a);requestAnimationFrame(function(){var r=$8(q);if($APP.n(r)){var v=b9(d,e,m,new $APP.P(null,2,[$APP.ji,r.offsetWidth,$APP.ki,r.offsetHeight],null),new $APP.P(null,2,[$APP.ji,h,$APP.ki,l],null));j9(q,$APP.kn.i(v),$APP.jn.i(v),$APP.Ai.m(v,e9,f));return h9($APP.u(g9(r)))}return null});return $APP.ah(a,"x-context-menu-open",{reason:"programmatic"})}return null},Ffa=function(a){if(!$APP.n($APP.k(a,"__xContextMenuRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),
16
- d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);c={};c.root=b;c.slot=d;a.__xContextMenuRefs=c}return $APP.n(a.hasAttribute("open"))?a.removeAttribute("open"):null},Gfa=function(a){var b=$APP.k(a,"__xContextMenuLayer");if($APP.n(b))$APP.Ah(b),a.__xContextMenuLayer=null;else return null},Hfa=function(a,b){if($APP.B.j(b,"open")){if($APP.n(a.hasAttribute("open")))return null;b=$APP.k(a,"__xContextMenuLayer");if($APP.n(b)){$APP.Ah(b);
17
- a.__xContextMenuLayer=null;return}}return null},Ifa=function(a){a.openAt=function(b,c){return o9(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?l9(this,"toggle"):o9(this,b,c,"toggle")};a.openForElement=function(b){return Efa(this,b)};return a.close=function(){return l9(this,"programmatic")}},Kfa=function(a){$APP.ih(a,Jfa);return Ifa(a)},p9=function(){return $APP.Wg("x-context-menu",new $APP.P(null,5,[$APP.Mg,Lfa,$APP.Ng,Ffa,$APP.Og,Gfa,$APP.Qg,Hfa,$APP.Ug,
18
- Kfa],null))},d9=new $APP.F(null,"z-index-raw","z-index-raw",-1179679257),e9=new $APP.F(null,"z-index","z-index",1892827090),c9=new $APP.F(null,"offset-raw","offset-raw",-1418404095);var Lfa=["open","disabled","placement","offset","z-index"],Dfa=new $APP.Q(null,new $APP.P(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null),Jfa=new $APP.P(null,5,[$APP.Qn,new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"open"],null),$APP.fl,new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"disabled"],null),$APP.gl,new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"placement"],null),$APP.Ej,new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"offset"],null),new $APP.F(null,
19
- "zIndex","zIndex",-1588341609),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"z-index"],null)],null);
20
- $APP.Ud(["x-context-menu-open-request",new $APP.P(null,2,[$APP.Un,!0,$APP.Z,new $APP.P(null,1,[$APP.bk,$APP.V],null)],null),"x-context-menu-open",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,1,[$APP.bk,$APP.V],null)],null),"x-context-menu-close-request",new $APP.P(null,2,[$APP.Un,!0,$APP.Z,new $APP.P(null,1,[$APP.bk,$APP.V],null)],null),"x-context-menu-close",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,1,[$APP.bk,$APP.V],null)],null),"x-context-menu-select",new $APP.P(null,2,[$APP.Un,
21
- !1,$APP.Z,new $APP.P(null,1,[$APP.Kl,$APP.Im],null)],null)]);$APP.da("baredom.exports.x_context_menu.init",p9);export const init=p9;
2
+ var W8=function(a){return $APP.n(a)?a.shadowRoot.querySelector("[part\x3dpanel]"):null},X8=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:b):b},Gna=function(a){return $APP.y.j(a,"bottom-start")?"top-start":$APP.y.j(a,"bottom-end")?"top-end":$APP.y.j(a,"top-start")?"bottom-start":$APP.y.j(a,"top-end")?"bottom-end":$APP.y.j(a,"right-start")?"left-start":$APP.y.j(a,"left-start")?"right-start":a},Hna=function(a,b,c,d){var e=$APP.H(c);c=$APP.C(e,$APP.mr);var f=$APP.C(e,
3
+ $APP.lr),h=$APP.C(e,$APP.Vl);e=$APP.C(e,$APP.Wl);var k=$APP.H(d);d=$APP.C(k,$APP.Vl);k=$APP.C(k,$APP.Wl);switch(a){case "bottom-start":return new $APP.N(null,2,[$APP.mr,c,$APP.lr,f+e+b],null);case "bottom-end":return new $APP.N(null,2,[$APP.mr,c+h-d,$APP.lr,f+e+b],null);case "top-start":return new $APP.N(null,2,[$APP.mr,c,$APP.lr,f-k-b],null);case "top-end":return new $APP.N(null,2,[$APP.mr,c+h-d,$APP.lr,f-k-b],null);case "right-start":return new $APP.N(null,2,[$APP.mr,c+h+b,$APP.lr,f],null);case "left-start":return new $APP.N(null,
4
+ 2,[$APP.mr,c-d-b,$APP.lr,f],null);default:return new $APP.N(null,2,[$APP.mr,c,$APP.lr,f+e+b],null)}},Ina=function(a,b,c,d){function e(z){var A=Hna(z,b,c,d);A=$APP.H(A);var D=$APP.C(A,$APP.mr),G=$APP.C(A,$APP.lr);A=D>=8&&D+m<=h-8;var J=G>=8&&G+q<=k-8;D=$APP.Hm.j($APP.Gm.j(D,8),h-m-8);G=$APP.Hm.j($APP.Gm.j(G,8),k-q-8);return new $APP.N(null,5,[$APP.mr,D,$APP.lr,G,$APP.En,z,$APP.xr,A&&J,$APP.$p,$APP.Gm.j(40,k-G-8)],null)}var f=$APP.H(new $APP.N(null,2,[$APP.Vl,window.innerWidth,$APP.Wl,window.innerHeight],
5
+ null)),h=$APP.C(f,$APP.Vl),k=$APP.C(f,$APP.Wl);f=$APP.H(d);var m=$APP.C(f,$APP.Vl),q=$APP.C(f,$APP.Wl),u=e(a),x=e(Gna(a));return $APP.n(function(){var z=$APP.xr.i(u);return $APP.n(z)?z:$APP.p($APP.xr.i(x))}())?u:x},a9=function(a){a=new $APP.N(null,5,[$APP.Rn,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Wi,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.Gs,a.getAttribute("placement"),Y8,a.getAttribute("offset"),Z8,a.getAttribute("z-index")],null);var b=$APP.H(a),
6
+ c=$APP.C(b,$APP.Rn),d=$APP.C(b,$APP.Wi),e=$APP.C(b,$APP.Gs);a=$APP.C(b,Y8);b=$APP.C(b,Z8);c=$APP.Uh(c);d=$APP.Uh(d);e=typeof e==="string"&&$APP.$c(Jna,e)?e:"bottom-start";return new $APP.N(null,5,[$APP.ls,c,$APP.cj,d,$APP.Yo,e,$APP.Bn,X8(a,8),$8,X8(b,1E3)],null)},b9=function(a){return $APP.Ac(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},c9=function(a){return $APP.n(a)?a.focus():null},Kna=function(a,b){a=$APP.uj(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
7
+ b);b=document.createElement("div");$APP.T(b,"part","panel");$APP.T(b,"role","menu");$APP.T(b,"tabindex","-1");a.shadowRoot.appendChild(b);return a},Lna=function(a,b){a=$APP.r($APP.Ac(a.children));for(var c=null,d=0,e=0;;)if(e<d){var f=c.F(null,e);b.appendChild(f.cloneNode(!0));e+=1}else if(a=$APP.r(a))c=a,$APP.Wc(c)?(a=$APP.Cb(c),d=$APP.Db(c),c=a,f=$APP.w(a),a=d,d=f):(f=$APP.t(c),b.appendChild(f.cloneNode(!0)),a=$APP.v(c),c=null,d=0),e=0;else break},d9=function(a,b,c,d,e,f){d=Ina(c,d,b,e);b=$APP.mr.i(d);
8
+ c=$APP.lr.i(d);f=$APP.Vk.m(d,$8,f);d=$APP.H(f);f=$APP.C(d,$8);d=$APP.C(d,$APP.$p);a.style.zIndex=""+$APP.P.i(f);a=W8(a);$APP.n(a)&&(a.style.left=""+$APP.P.i(b)+"px",a.style.top=""+$APP.P.i(c)+"px",a.style.maxHeight=""+$APP.P.i(d)+"px")},Mna=function(a,b){function c(e){e.stopPropagation();e=e.target.closest("[role\x3dmenuitem]");return $APP.n(e)?($APP.pi(a,"x-context-menu-select",{item:e}),e9.j?e9.j(a,"select"):e9.call(null,a,"select")):null}var d=W8(b);$APP.vj(b,b,"keydown",function(e){var f=e.key,
9
+ h=b.shadowRoot.activeElement;return $APP.y.j(f,"Tab")?e9.j?e9.j(a,"keyboard"):e9.call(null,a,"keyboard"):$APP.y.j(f,"ArrowDown")?(e.preventDefault(),$APP.n(h)?(e=b9(d),h=$APP.dd(e).indexOf(h),h=$APP.B(e,$APP.qd(h+1,$APP.w(e)),null),h=c9(h)):h=c9($APP.t(b9(d))),h):$APP.y.j(f,"ArrowUp")?(e.preventDefault(),$APP.n(h)?(e=b9(d),f=$APP.w(e),h=$APP.dd(e).indexOf(h),h=$APP.B(e,$APP.qd(h+(f-1),f),null),h=c9(h)):h=c9($APP.t(b9(d))),h):($APP.y.j(f,"Enter")||$APP.y.j(f," "))&&$APP.n(h)?(e.preventDefault(),h.click()):
10
+ null},!0);$APP.n(d)&&$APP.vj(b,d,"click",c,!1)},Nna=function(a){function b(d){var e=$APP.l(a,"__xContextMenuLayer");if($APP.n(e)){var f=W8(e);d=d.composedPath();d=$APP.fe(function(h){return h===f},$APP.Ac(d));return $APP.n($APP.n(f)?$APP.p(d):f)?e9.j?e9.j(a,"backdrop"):e9.call(null,a,"backdrop"):null}return null}function c(d){return $APP.y.j(d.key,"Escape")?(d.preventDefault(),e9.j?e9.j(a,"keyboard"):e9.call(null,a,"keyboard")):null}$APP.yj(a,"__xContextMenuDocDeferral",function(){return $APP.n(a.hasAttribute("open"))?
11
+ (document.addEventListener("keydown",c),document.addEventListener("click",b),$APP.R(a,"__xContextMenuDocH",{keydown:c,click:b})):null})},f9=function(a){$APP.xj(a,"__xContextMenuDocDeferral");var b=$APP.l(a,"__xContextMenuDocH");$APP.n(b)&&(document.removeEventListener("keydown",$APP.l(b,"keydown")),document.removeEventListener("click",$APP.l(b,"click")),$APP.R(a,"__xContextMenuDocH",null))},e9=function(a,b){return $APP.n(a.hasAttribute("open"))&&$APP.ri(a,"x-context-menu-close-request",{reason:b})?
12
+ (f9(a),$APP.U(a,"open"),$APP.wj($APP.l(a,"__xContextMenuLayer")),$APP.R(a,"__xContextMenuLayer",null),$APP.R(a,"__xContextMenuAnchor",null),$APP.R(a,"__xContextMenuModel",null),$APP.pi(a,"x-context-menu-close",{reason:b})):null},g9=function(a,b,c){if($APP.n(a.hasAttribute("disabled")))return null;$APP.n($APP.l(a,"__xContextMenuLayer"))&&e9(a,"programmatic");if($APP.ri(a,"x-context-menu-open-request",{reason:c})){var d=a9(a);d=$APP.H(d);var e=$APP.C(d,$APP.Yo),f=$APP.C(d,$APP.Bn),h=$APP.C(d,$8),k=
13
+ Kna(a,h);Lna(a,W8(k));Mna(a,k);d9(k,b,e,f,new $APP.N(null,2,[$APP.Vl,200,$APP.Wl,300],null),h);$APP.T(a,"open","");$APP.R(a,"__xContextMenuLayer",k);$APP.R(a,"__xContextMenuAnchor",b);$APP.R(a,"__xContextMenuModel",d);Nna(a);requestAnimationFrame(function(){var m=W8(k);$APP.n(m)&&d9(k,b,e,f,new $APP.N(null,2,[$APP.Vl,m.offsetWidth,$APP.Wl,m.offsetHeight],null),h);return $APP.n(m)?c9($APP.t(b9(m))):null});return $APP.pi(a,"x-context-menu-open",{reason:c})}return null},Ona=function(a){if(!$APP.fi(a,
14
+ "__xContextMenuInitialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);$APP.R(a,"__xContextMenuInitialized",!0)}return $APP.n(a.hasAttribute("open"))?$APP.U(a,"open"):null},Pna=function(a){f9(a);var b=$APP.l(a,"__xContextMenuLayer");return $APP.n(b)?($APP.wj(b),$APP.R(a,"__xContextMenuLayer",null),$APP.R(a,"__xContextMenuAnchor",null),$APP.R(a,
15
+ "__xContextMenuModel",null)):null},Qna=function(a,b,c,d){if($APP.I(c,d))if($APP.y.j(b,"open")&&$APP.p(a.hasAttribute("open"))){if(b=$APP.l(a,"__xContextMenuLayer"),$APP.n(b))return f9(a),$APP.wj(b),$APP.R(a,"__xContextMenuLayer",null),$APP.R(a,"__xContextMenuAnchor",null),$APP.R(a,"__xContextMenuModel",null)}else if(c=$APP.l(a,"__xContextMenuLayer"),b=$APP.n(c)?$APP.y.j(b,"placement")||$APP.y.j(b,"offset")||$APP.y.j(b,"z-index"):c,$APP.n(b)&&(b=a9(a),$APP.I(b,$APP.l(a,"__xContextMenuModel")))){c=
16
+ $APP.l(a,"__xContextMenuLayer");if($APP.n(c)&&(d=$APP.l(a,"__xContextMenuAnchor"),$APP.n(d))){var e=a9(a),f=$APP.H(e);e=$APP.C(f,$APP.Yo);var h=$APP.C(f,$APP.Bn);f=$APP.C(f,$8);var k=W8(c);d9(c,d,e,h,$APP.n(k)?new $APP.N(null,2,[$APP.Vl,k.offsetWidth,$APP.Wl,k.offsetHeight],null):new $APP.N(null,2,[$APP.Vl,200,$APP.Wl,300],null),f)}return $APP.R(a,"__xContextMenuModel",b)}return null},Rna=function(a){Object.defineProperty(a,"openAt",{value:function(b,c){return g9(this,new $APP.N(null,4,[$APP.mr,b,
17
+ $APP.lr,c,$APP.Vl,1,$APP.Wl,1],null),"programmatic")},writable:!0,configurable:!0});Object.defineProperty(a,"toggleAt",{value:function(b,c){return $APP.n(this.hasAttribute("open"))?e9(this,"toggle"):g9(this,new $APP.N(null,4,[$APP.mr,b,$APP.lr,c,$APP.Vl,1,$APP.Wl,1],null),"toggle")},writable:!0,configurable:!0});Object.defineProperty(a,"openForElement",{value:function(b){b=b.getBoundingClientRect();return g9(this,new $APP.N(null,4,[$APP.mr,b.left,$APP.lr,b.top,$APP.Vl,b.width,$APP.Wl,b.height],null),
18
+ "programmatic")},writable:!0,configurable:!0});return Object.defineProperty(a,"close",{value:function(){return e9(this,"programmatic")},writable:!0,configurable:!0})},Tna=function(a){$APP.Ei(a,Sna);return Rna(a)},h9=function(){return $APP.Kh("x-context-menu",new $APP.N(null,5,[$APP.Bh,Una,$APP.zh,Ona,$APP.qh,Pna,$APP.ph,Qna,$APP.Ah,Tna],null))},Z8=new $APP.F(null,"z-index-raw","z-index-raw",-1179679257),$8=new $APP.F(null,"z-index","z-index",1892827090),Y8=new $APP.F(null,"offset-raw","offset-raw",
19
+ -1418404095);var Una=["open","disabled","placement","offset","z-index"],Jna=new $APP.rg(null,new $APP.N(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null),Sna=new $APP.N(null,5,[$APP.Ir,new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"open"],null),$APP.Hk,new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"disabled"],null),$APP.Yo,new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"placement"],null),$APP.Bn,new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"offset"],null),
20
+ new $APP.F(null,"zIndex","zIndex",-1588341609),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"z-index"],null)],null);
21
+ $APP.be(["x-context-menu-open-request",new $APP.N(null,2,[$APP.Mr,!0,$APP.V,new $APP.N(null,1,[$APP.$n,$APP.Y],null)],null),"x-context-menu-open",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,1,[$APP.$n,$APP.Y],null)],null),"x-context-menu-close-request",new $APP.N(null,2,[$APP.Mr,!0,$APP.V,new $APP.N(null,1,[$APP.$n,$APP.Y],null)],null),"x-context-menu-close",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,1,[$APP.$n,$APP.Y],null)],null),"x-context-menu-select",new $APP.N(null,2,[$APP.Mr,
22
+ !1,$APP.V,new $APP.N(null,1,[$APP.Op,$APP.Mq],null)],null)]);$APP.fa("baredom.exports.x_context_menu.init",h9);export const init=h9;
package/dist/x-copy.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var QI=function(a){return a==null?!0:$APP.B.j(a,"false")?!1:$APP.B.j(a,"0")?!1:!0},RI=function(a){return typeof a==="string"&&$APP.M(a,"")?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:1200):1200},SI=function(a){return Math.min(1E4,Math.max(100,a))},fJ=function(a){var b=$APP.H(a);a=$APP.C(b,TI);var c=$APP.C(b,UI),d=$APP.C(b,VI),e=$APP.C(b,$APP.$i),f=$APP.C(b,$APP.Wm),h=$APP.C(b,WI),l=$APP.C(b,XI),m=$APP.C(b,$APP.Eh),q=$APP.C(b,YI);b=$APP.C(b,ZI);return $APP.Hf([$I,$APP.Kk,aJ,bJ,cJ,$APP.mj,dJ,$APP.Y,eJ,
3
- $APP.an],[QI(b),$APP.B.j(f,"html")?"html":"text",typeof l==="string"&&$APP.M(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.M(a.trim(),"")?a.trim():null,SI(RI(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])},gJ=function(a){var b=
4
- $APP.H(a);a=$APP.C(b,$APP.an);var c=$APP.C(b,$APP.mj),d=$APP.C(b,aJ);b=$APP.C(b,$APP.Kk);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},hJ=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");
2
+ var RM=function(a){return a==null?!0:$APP.y.j(a,"false")?!1:$APP.y.j(a,"0")?!1:!0},SM=function(a){return typeof a==="string"&&$APP.I(a,"")?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:1200):1200},TM=function(a){return Math.min(1E4,Math.max(100,a))},gN=function(a){var b=$APP.H(a);a=$APP.C(b,UM);var c=$APP.C(b,VM),d=$APP.C(b,WM),e=$APP.C(b,$APP.an),f=$APP.C(b,$APP.$q),h=$APP.C(b,XM),k=$APP.C(b,YM),m=$APP.C(b,$APP.Wi),q=$APP.C(b,ZM);b=$APP.C(b,$M);return $APP.Yf([aN,$APP.Jo,bN,cN,dN,$APP.mn,eN,$APP.cj,
3
+ fN,$APP.cr],[RM(b),$APP.y.j(f,"html")?"html":"text",typeof k==="string"&&$APP.I(k.trim(),"")?k.trim():null,typeof a==="string"&&$APP.I(a.trim(),"")?a.trim():null,TM(SM(c)),typeof d==="string"&&$APP.I(d.trim(),"")?d.trim():null,function(){var u;if(u=typeof h==="string")u=(u=$APP.I(h,""))?h:u;return $APP.n(u)?u:"Copy failed"}(),$APP.E(m),function(){var u;if(u=typeof q==="string")u=(u=$APP.I(q,""))?q:u;return $APP.n(u)?u:"Copied"}(),typeof e==="string"&&$APP.I(e.trim(),"")?e.trim():null])},hN=function(a){var b=
4
+ $APP.H(a);a=$APP.C(b,$APP.cr);var c=$APP.C(b,$APP.mn),d=$APP.C(b,bN);b=$APP.C(b,$APP.Jo);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},iN=function(a){var b=$APP.l(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"),k=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(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")},iJ=function(a){return fJ($APP.Hf([VI,
7
- $APP.$i,$APP.Wm,WI,XI,$APP.Eh,YI,ZI,TI,UI],[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")]))},jJ=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:""):""},kJ=function(a){var b=jJ(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.j(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Wi(new $APP.N(null,
9
- 1,5,$APP.O,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.i?d.i(b):d.call(null,b)}).catch(function(h){return e.i?e.i(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.i?d.i(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.i?e.i(f):e.call(null,f);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.i?
10
- d.i(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.i?d.i(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.i?e.i(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.i?d.i(b):d.call(null,b)}catch(h){if(h instanceof Error)return f=h,e.i?e.i(f):e.call(null,f);throw h;}}})},lJ=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))}},mJ=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);
12
- var b=iJ(a),c=gJ(b);return $APP.bh(a,"x-copy-request",c)?kJ(a).then(function(d){$APP.ah(a,"x-copy-success",{text:$APP.n(d)?d:""});$APP.n($I.i(b))&&lJ(a,"success",eJ.i(b),cJ.i(b));return d}).catch(function(d){$APP.ah(a,"x-copy-error",{error:""+$APP.R.i(d)});$APP.n($I.i(b))&&lJ(a,"error",dJ.i(b),cJ.i(b));return Promise.reject(d)}):Promise.resolve(null)},nJ=function(a,b){if(typeof b==="string"&&$APP.M(b,"")){var c=b.toLowerCase().split("+");b=$APP.Ac(c);var d=$APP.E($APP.Yd(function(h){return $APP.B.j(h,
13
- "ctrl")},c)),e=$APP.E($APP.Yd(function(h){return $APP.B.j(h,"shift")},c)),f=$APP.E($APP.Yd(function(h){return $APP.B.j(h,"alt")},c));c=$APP.E($APP.Yd(function(h){return $APP.B.j(h,"meta")},c));return $APP.B.j(a.key.toLowerCase(),b)&&$APP.B.j(d,a.ctrlKey)&&$APP.B.j(e,a.shiftKey)&&$APP.B.j(f,a.altKey)&&$APP.B.j(c,a.metaKey)}return null},oJ=function(a){function b(e){var f=a.getAttribute("hotkey");return $APP.n(nJ(e,f))?(e.preventDefault(),mJ(a)):null}function c(){return mJ(a)}var d=hJ(a);$APP.k(d,"trigger").addEventListener("click",
14
- c);document.addEventListener("keydown",b);$APP.fa(a,"__xCopyHandlers",{click:c,keydown:b})},pJ=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},qJ=function(a){var b=hJ(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")},rJ=function(a){hJ(a);pJ(a);oJ(a);qJ(a);return null},sJ=function(a){pJ(a);return null},tJ=function(a,b,c,d){$APP.M(c,d)&&qJ(a);return null},uJ=function(a){$APP.eh(a,"text","text");$APP.eh(a,"from","from");$APP.eh(a,"fromAttr","from-attr");$APP.eh(a,"mode","mode");$APP.eh(a,"successMessage","success-message");$APP.eh(a,"errorMessage","error-message");$APP.eh(a,"hotkey","hotkey");
16
- $APP.ch(a,"disabled","disabled");Object.defineProperty(a,"showTooltip",{get:function(){return QI(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 RI(this.getAttribute("tooltip-ms"))},set:function(b){return b==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.R.i(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 mJ(this)},enumerable:!0,configurable:!0,writable:!0})},wJ=function(){return $APP.Wg("x-copy",new $APP.P(null,5,[$APP.Mg,vJ,$APP.Ng,rJ,$APP.Og,sJ,$APP.Qg,tJ,$APP.Ug,uJ],null))},$I=new $APP.F(null,"show-tooltip?","show-tooltip?",-1214081087),
18
- UI=new $APP.F(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),eJ=new $APP.F(null,"success-message","success-message",-96541601),WI=new $APP.F(null,"error-message-raw","error-message-raw",1910536231),bJ=new $APP.F(null,"hotkey","hotkey",-329017295),dJ=new $APP.F(null,"error-message","error-message",1756021561),xJ=new $APP.F(null,"fromAttr","fromAttr",-1768252533),XI=new $APP.F(null,"from-attr-raw","from-attr-raw",761657416),cJ=new $APP.F(null,"tooltip-ms","tooltip-ms",1062450417),YI=new $APP.F(null,
19
- "success-message-raw","success-message-raw",388691116),VI=new $APP.F(null,"from-raw","from-raw",-44462428),aJ=new $APP.F(null,"from-attr","from-attr",1217901743),TI=new $APP.F(null,"hotkey-raw","hotkey-raw",1972404222),ZI=new $APP.F(null,"show-tooltip-raw","show-tooltip-raw",453600717);var vJ="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
20
- $APP.Hf([new $APP.F(null,"errorMessage","errorMessage",982744869),$APP.fl,new $APP.F(null,"textValue","textValue",-598870870),$APP.Kk,xJ,new $APP.F(null,"tooltipMs","tooltipMs",1056463375),bJ,$APP.mj,new $APP.F(null,"showTooltip","showTooltip",482349691),new $APP.F(null,"successMessage","successMessage",-789572803),$APP.an],[new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"error-message"],null),new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"disabled"],null),new $APP.P(null,3,[$APP.S,$APP.V,$APP.T,null,new $APP.F(null,
21
- "note","note",1426297904),"property-only override"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"mode"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"from-attr"],null),new $APP.P(null,2,[$APP.S,$APP.W,$APP.T,"tooltip-ms"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"hotkey"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"from"],null),new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"show-tooltip"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"success-message"],null),new $APP.P(null,2,[$APP.S,$APP.V,
22
- $APP.T,"text"],null)]);$APP.Ud(["x-copy-request",new $APP.P(null,2,[$APP.Un,!0,$APP.Z,new $APP.P(null,4,[$APP.an,$APP.V,$APP.Kk,$APP.V,$APP.mj,$APP.V,xJ,$APP.V],null)],null),"x-copy-success",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,1,[$APP.an,$APP.V],null)],null),"x-copy-error",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,1,[$APP.Qj,$APP.V],null)],null)]);$APP.da("baredom.exports.x_copy.init",wJ);export const init=wJ;
6
+ $APP.T(d,"part","wrap");$APP.T(e,"part","trigger");$APP.T(e,"type","button");e.appendChild(f);$APP.T(h,"part","tooltip");$APP.T(h,"role","status");$APP.T(h,"aria-live","polite");$APP.T(k,"name","tooltip");$APP.T(m,"part","tooltip-text");h.appendChild(k);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);$APP.R(a,"__xCopyRefs",{root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:k,tooltipText:m});return $APP.l(a,"__xCopyRefs")},jN=function(a){return gN($APP.Yf([WM,$APP.an,
7
+ $APP.$q,XM,YM,$APP.Wi,ZM,$M,UM,VM],[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")]))},kN=function(a){var b=$APP.l(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.I(b,""))return b;b=a.getAttribute("from");return typeof b===
8
+ "string"&&$APP.I(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.I(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},lN=function(a){var b=document.createElement("textarea");b.value=a;b.style.position="fixed";b.style.opacity="0";document.body.appendChild(b);b.select();document.execCommand("copy");b.remove()},mN=function(a){var b={};b["text/html"]=new Blob([a],{type:"text/html"});b["text/plain"]=new Blob([a],{type:"text/plain"});return b},
9
+ nN=function(a){return $APP.n(function(){var b=navigator.clipboard;return $APP.n(b)?window.ClipboardItem:b}())?navigator.clipboard.write($APP.Xm(new $APP.K(null,1,5,$APP.M,[new ClipboardItem(mN(a))],null))).then(function(){return a}):new Promise(function(b,c){try{return lN(a),b.i?b.i(a):b.call(null,a)}catch(d){if(d instanceof Error)return b=d,c.i?c.i(b):c.call(null,b);throw d;}})},oN=function(a){return $APP.n(navigator.clipboard)?navigator.clipboard.writeText(a).then(function(){return a}).catch(function(b){return new Promise(function(c,
10
+ d){try{return lN(a),c.i?c.i(a):c.call(null,a)}catch(e){if(e instanceof Error)return d.i?d.i(b):d.call(null,b);throw e;}})}):new Promise(function(b,c){try{return lN(a),b.i?b.i(a):b.call(null,a)}catch(d){if(d instanceof Error)return b=d,c.i?c.i(b):c.call(null,b);throw d;}})},pN=function(a){var b=kN(a);a=a.getAttribute("mode");return $APP.y.j($APP.n(a)?a:"text","html")?nN(b):oN(b)},qN=function(a,b,c,d){var e=$APP.l(a,"__xCopyRefs");if($APP.n(e)){var f=$APP.l(a,"__xCopyTid");$APP.n(f)&&(clearTimeout(f),
11
+ $APP.R(a,"__xCopyTid",null));$APP.T(a,"data-tooltip-open","");$APP.T(a,"data-tooltip-kind",b);$APP.l(e,"tooltipText").textContent=c;$APP.R(a,"__xCopyTid",setTimeout(function(){$APP.R(a,"__xCopyTid",null);$APP.U(a,"data-tooltip-open");$APP.U(a,"data-tooltip-kind");var h=$APP.l(a,"__xCopyRefs");return $APP.n(h)?$APP.l(h,"tooltipText").textContent="":null},d))}},rN=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);var b=jN(a),c=hN(b);return $APP.ri(a,"x-copy-request",c)?
12
+ pN(a).then(function(d){$APP.pi(a,"x-copy-success",{text:$APP.n(d)?d:""});$APP.n(aN.i(b))&&qN(a,"success",fN.i(b),dN.i(b));return d}).catch(function(d){$APP.pi(a,"x-copy-error",{error:""+$APP.P.i(d)});$APP.n(aN.i(b))&&qN(a,"error",eN.i(b),dN.i(b));return Promise.reject(d)}):Promise.resolve(null)},sN=function(a,b){if(typeof b==="string"&&$APP.I(b,"")){var c=b.toLowerCase().split("+");b=$APP.Ec(c);var d=$APP.E($APP.fe(function(h){return $APP.y.j(h,"ctrl")},c)),e=$APP.E($APP.fe(function(h){return $APP.y.j(h,
13
+ "shift")},c)),f=$APP.E($APP.fe(function(h){return $APP.y.j(h,"alt")},c));c=$APP.E($APP.fe(function(h){return $APP.y.j(h,"meta")},c));return $APP.y.j(a.key.toLowerCase(),b)&&$APP.y.j(d,a.ctrlKey)&&$APP.y.j(e,a.shiftKey)&&$APP.y.j(f,a.altKey)&&$APP.y.j(c,a.metaKey)}return null},tN=function(a){function b(e){var f=a.getAttribute("hotkey");return $APP.n(sN(e,f))?(e.preventDefault(),rN(a)):null}function c(){return rN(a)}var d=iN(a);$APP.l(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",
14
+ b);$APP.R(a,"__xCopyHandlers",{click:c,keydown:b})},uN=function(a){var b=$APP.l(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),$APP.R(a,"__xCopyTid",null));b=$APP.l(a,"__xCopyHandlers");var c=$APP.l(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.l(c,"trigger");var d=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}return $APP.R(a,"__xCopyHandlers",null)},vN=function(a){if($APP.n($APP.l(a,"__xCopyRefs"))){var b=
15
+ jN(a);if($APP.I($APP.l(a,"__xCopyModel"),b)){var c=iN(a);c=$APP.l(c,"trigger");var d=$APP.cj.i(b);c.disabled=$APP.E(d);$APP.n(d)?$APP.T(a,"aria-disabled","true"):$APP.U(a,"aria-disabled");a=$APP.R(a,"__xCopyModel",b)}else a=null;return a}return null},wN=function(a){iN(a);uN(a);tN(a);return vN(a)},xN=function(a){return uN(a)},yN=function(a,b,c,d){return $APP.I(c,d)?vN(a):null},zN=function(a){$APP.yi(a,"text","text");$APP.yi(a,"from","from");$APP.yi(a,"fromAttr","from-attr");$APP.yi(a,"mode","mode");
16
+ $APP.yi(a,"successMessage","success-message");$APP.yi(a,"errorMessage","error-message");$APP.yi(a,"hotkey","hotkey");$APP.ui(a,"disabled","disabled");Object.defineProperty(a,"showTooltip",{get:function(){return RM(this.getAttribute("show-tooltip"))},set:function(b){return $APP.n(b)?$APP.T(this,"show-tooltip","true"):$APP.T(this,"show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return SM(this.getAttribute("tooltip-ms"))},set:function(b){return b==
17
+ null?$APP.U(this,"tooltip-ms"):$APP.T(this,"tooltip-ms",""+$APP.P.i(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.l(this,"__xCopyTextValue")},set:function(b){return typeof b==="string"?$APP.R(this,"__xCopyTextValue",b):$APP.R(this,"__xCopyTextValue")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"copy",{value:function(){return rN(this)},enumerable:!0,configurable:!0,writable:!0})},BN=function(){return $APP.Kh("x-copy",new $APP.N(null,
18
+ 5,[$APP.Bh,AN,$APP.zh,wN,$APP.qh,xN,$APP.ph,yN,$APP.Ah,zN],null))},aN=new $APP.F(null,"show-tooltip?","show-tooltip?",-1214081087),VM=new $APP.F(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),fN=new $APP.F(null,"success-message","success-message",-96541601),XM=new $APP.F(null,"error-message-raw","error-message-raw",1910536231),cN=new $APP.F(null,"hotkey","hotkey",-329017295),eN=new $APP.F(null,"error-message","error-message",1756021561),CN=new $APP.F(null,"fromAttr","fromAttr",-1768252533),YM=
19
+ new $APP.F(null,"from-attr-raw","from-attr-raw",761657416),dN=new $APP.F(null,"tooltip-ms","tooltip-ms",1062450417),ZM=new $APP.F(null,"success-message-raw","success-message-raw",388691116),WM=new $APP.F(null,"from-raw","from-raw",-44462428),bN=new $APP.F(null,"from-attr","from-attr",1217901743),UM=new $APP.F(null,"hotkey-raw","hotkey-raw",1972404222),$M=new $APP.F(null,"show-tooltip-raw","show-tooltip-raw",453600717);var AN="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
20
+ $APP.Yf([new $APP.F(null,"errorMessage","errorMessage",982744869),$APP.Hk,new $APP.F(null,"textValue","textValue",-598870870),$APP.Jo,CN,new $APP.F(null,"tooltipMs","tooltipMs",1056463375),cN,$APP.mn,new $APP.F(null,"showTooltip","showTooltip",482349691),new $APP.F(null,"successMessage","successMessage",-789572803),$APP.cr],[new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"error-message"],null),new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"disabled"],null),new $APP.N(null,3,[$APP.O,$APP.Y,$APP.W,null,new $APP.F(null,
21
+ "note","note",1426297904),"property-only override"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"mode"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"from-attr"],null),new $APP.N(null,2,[$APP.O,$APP.Z,$APP.W,"tooltip-ms"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"hotkey"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"from"],null),new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"show-tooltip"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"success-message"],null),new $APP.N(null,2,[$APP.O,$APP.Y,
22
+ $APP.W,"text"],null)]);$APP.be(["x-copy-request",new $APP.N(null,2,[$APP.Mr,!0,$APP.V,new $APP.N(null,4,[$APP.cr,$APP.Y,$APP.Jo,$APP.Y,$APP.mn,$APP.Y,CN,$APP.Y],null)],null),"x-copy-success",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,1,[$APP.cr,$APP.Y],null)],null),"x-copy-error",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,1,[$APP.On,$APP.Y],null)],null)]);$APP.fa("baredom.exports.x_copy.init",BN);export const init=BN;
@@ -22,6 +22,8 @@ export interface XCurrencyField extends HTMLElement {
22
22
  label: string;
23
23
  error: string;
24
24
  required: boolean;
25
+ checkValidity(): boolean;
26
+ reportValidity(): boolean;
25
27
 
26
28
  addEventListener<K extends keyof XCurrencyFieldEventMap>(
27
29
  type: K,
@@ -1,24 +1,25 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var GX=function(a){a=(""+$APP.R.i($APP.n(a)?a:"")).trim().toUpperCase();return $APP.B.j(a,"")?"USD":a},HX=function(a,b){try{var c=(new Intl.NumberFormat($APP.B.j(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.Yd(function(e){return $APP.B.j("currency",e.type)?e.value:null},$APP.xc(c));return $APP.n(d)?d:a}catch(e){return a}},IX=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.B.j(b,"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},
3
- JX=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}},KX=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.j(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.R.i(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.R.i(m)+".",c):b.setValidity({},"",c)},PX=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.Hf([$APP.Bh,LX,$APP.Zm,$APP.Uj,$APP.lk,$APP.Eh,MX,$APP.dj,$APP.vm,$APP.al,$APP.Ch,NX,$APP.ak],[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.H(h);h=$APP.C(l,$APP.ak);var m=$APP.C(l,$APP.Bh),q=$APP.C(l,LX),r=$APP.C(l,$APP.Zm),v=$APP.C(l,$APP.Uj),w=$APP.C(l,$APP.lk),y=$APP.C(l,$APP.Eh),A=$APP.C(l,MX),D=$APP.C(l,$APP.dj),G=$APP.C(l,$APP.vm),I=$APP.C(l,$APP.al),J=$APP.C(l,$APP.Ch);l=$APP.C(l,NX);var K=$APP.n(v)?v:"",ba=$APP.n(w)?w:"",ia=$APP.n(m)?m:"";h=$APP.Hf([$APP.yl,$APP.zj,
9
- $APP.Ko,$APP.bo,$APP.Gj,$APP.Jo,$APP.Ok,$APP.Fh,$APP.bn,$APP.wm,$APP.Gn,OX,$APP.qm,$APP.X,$APP.Qj,$APP.Y],[$APP.n(A)?A:"",$APP.E(D),$APP.E(I),$APP.n(h)?h:"",typeof w==="string"&&$APP.M(w,""),$APP.n(l)?l:"",$APP.n(r)?r:"",$APP.n(J)?J:"",typeof m==="string"&&$APP.M(m,""),typeof v==="string"&&$APP.M(v,""),ba,GX(q),$APP.n(G)?G:"",ia,K,$APP.E(y)]);m=$APP.wm.i(h);$APP.n(m)?q=null:(v=$APP.H(h),q=$APP.C(v,$APP.Fh),r=$APP.C(v,$APP.yl),v=$APP.C(v,$APP.qm),w=parseFloat(q),y=$APP.M(q,"")&&$APP.p(isNaN(w)),A=
10
- $APP.M(r,"")?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))&&w<A:A:y)?"Value must be at least "+$APP.R.i(r)+".":$APP.n(y?$APP.n(D)?$APP.p(isNaN(D))&&w>D:D:y)?"Value must be at most "+$APP.R.i(v)+".":"");r=q;q=$APP.n(m)?m:$APP.M($APP.n(r)?r:"","");m=$APP.n(m)?$APP.Qj.i(h):$APP.n(r)?r:"";r=$APP.Gj.i(h);v=$APP.bn.i(h);y=OX.i(h);w=$APP.Jo.i(h);d.textContent=HX(y,w);e.name=$APP.Ok.i(h);e.placeholder=$APP.bo.i(h);
11
- e.disabled=$APP.Y.i(h);e.readOnly=$APP.Ko.i(h);e.required=$APP.zj.i(h);$APP.Zg(e,"aria-required",$APP.n($APP.zj.i(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.j(e,a.shadowRoot.activeElement)||(d=$APP.Fh.i(h),e.value=$APP.B.j(d,"")?"":IX(d,w));c.textContent=$APP.X.i(h);$APP.n(v)?c.classList.remove("label-hidden"):
12
- c.classList.add("label-hidden");f.textContent=$APP.Gn.i(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.$g(a,"data-invalid",q);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(f=a.getAttribute("value"),a=KX(a,c,e,$APP.n(f)?f:"")):a=null;return a}return null},QX=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}},RX=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.bh(a,"x-currency-field-change-request",{name:e,value:c,previousValue:d})?(d=$APP.k(a,"__xCurrencyFieldInternals"),$APP.n(d)&&(d.setFormValue(c),KX(a,d,b,c)),$APP.ah(a,
14
- "x-currency-field-input",{name:e,value:c})):b.value=d}return null}},SX=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.R.i(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.bh(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),KX(a,e,b,c)),$APP.ah(a,"x-currency-field-change",{name:d,value:c})):b.value=e}return null}},TX=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=QX(a),d=RX(a),e=SX(a);b.addEventListener("focus",c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},UX=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},VX=function(a,b){$APP.$g(a,"disabled",$APP.E(b));return PX(a)},WX=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 PX(a)},
17
- XX=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||(JX(a),$APP.n(a.attachInternals)&&$APP.fa(a,"__xCurrencyFieldInternals",a.attachInternals()));UX(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");GX(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=IX(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?
18
- e:""}());TX(a);return PX(a)},YX=function(a){return UX(a)},ZX=function(a,b,c,d){$APP.B.j(b,"value")&&(b=$APP.k(a,"__xCurrencyFieldRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),$APP.B.j(b,a.shadowRoot.activeElement)||(GX(a.getAttribute("currency")),c=a.getAttribute("locale"),c=$APP.n(c)?c:"",b.value=d==null||$APP.B.j(d,"")?"":IX(d,c))));return PX(a)},$X=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.R.i(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");GX(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.B.j(c,this.shadowRoot.activeElement)?null:c.value=$APP.B.j(b,"")?"":IX(b,d)}return null}})},aY=function(a){$X(a);$APP.dh(a,"name","name","");$APP.dh(a,"currency","currency","");$APP.dh(a,"locale","locale","");$APP.dh(a,"min","min","");$APP.dh(a,"max","max","");$APP.dh(a,
20
- "placeholder","placeholder","");$APP.dh(a,"label","label","");$APP.dh(a,"hint","hint","");$APP.dh(a,"error","error","");$APP.ch(a,"disabled","disabled");$APP.ch(a,"readOnly","readonly");$APP.ch(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}},cY=function(){return $APP.Wg("x-currency-field",
21
- new $APP.P(null,8,[$APP.Mg,bY,$APP.Ng,XX,$APP.Og,YX,$APP.Qg,ZX,$APP.Rg,!0,$APP.Sg,VX,$APP.Tg,WX,$APP.Ug,aY],null))},MX=new $APP.F(null,"min-raw","min-raw",183137548),OX=new $APP.F(null,"currency","currency",-898327568),NX=new $APP.F(null,"locale-raw","locale-raw",385401846),LX=new $APP.F(null,"currency-raw","currency-raw",1169887491);var bY="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
22
- $APP.Hf([$APP.yl,$APP.bo,$APP.fl,$APP.Jo,$APP.Ok,$APP.Fh,$APP.Gn,OX,$APP.Wn,$APP.qm,$APP.X,$APP.Qj,$APP.Wl],[new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"min"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"placeholder"],null),new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"disabled"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"locale"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"name"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"value"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"hint"],null),new $APP.P(null,
23
- 2,[$APP.S,$APP.V,$APP.T,"currency"],null),new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"readonly"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"max"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"label"],null),new $APP.P(null,2,[$APP.S,$APP.V,$APP.T,"error"],null),new $APP.P(null,2,[$APP.S,$APP.U,$APP.T,"required"],null)]);
24
- $APP.Ud(["x-currency-field-change-request",new $APP.P(null,2,[$APP.Un,!0,$APP.Z,new $APP.P(null,3,[$APP.Ok,$APP.V,$APP.Fh,$APP.V,$APP.mm,$APP.V],null)],null),"x-currency-field-input",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,2,[$APP.Ok,$APP.V,$APP.Fh,$APP.V],null)],null),"x-currency-field-change",new $APP.P(null,2,[$APP.Un,!1,$APP.Z,new $APP.P(null,2,[$APP.Ok,$APP.V,$APP.Fh,$APP.V],null)],null)]);$APP.da("baredom.exports.x_currency_field.init",cY);export const init=cY;
2
+ var QZ=function(a){a=(""+$APP.P.i($APP.n(a)?a:"")).trim().toUpperCase();return $APP.y.j(a,"")?"USD":a},rga=function(a,b){try{var c=(new Intl.NumberFormat($APP.y.j(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.fe(function(e){return $APP.y.j("currency",e.type)?e.value:null},$APP.Ac(c));return $APP.n(d)?d:a}catch(e){return a}},RZ=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.y.j(b,"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},
3
+ sga=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"),k=document.createElement("input"),m=document.createElement("span"),q=document.createElement("span"),u={};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
+ $APP.T(d,"part","field");$APP.T(e,"part","label");$APP.T(e,"id","label");$APP.T(e,"for","input");$APP.T(f,"part","input-wrapper");$APP.T(h,"part","symbol");$APP.T(h,"aria-hidden","true");$APP.T(k,"part","input");$APP.T(k,"id","input");$APP.T(k,"inputmode","decimal");$APP.T(k,"aria-labelledby","label");$APP.T(m,"part","hint");$APP.T(m,"id","hint");$APP.T(m,"aria-live","polite");$APP.T(q,"part","error");$APP.T(q,"id","error");$APP.T(q,"role","alert");$APP.T(q,"aria-live","assertive");f.appendChild(h);
5
+ f.appendChild(k);d.appendChild(e);d.appendChild(f);d.appendChild(m);d.appendChild(q);b.appendChild(c);b.appendChild(d);u.field=d;u.label=e;u.wrapper=f;u.symbol=h;u.input=k;u.hint=m;u.error=q;$APP.R(a,"__xCurrencyFieldRefs",u)},SZ=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"),k=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var q=$APP.p(isNaN(a));k=$APP.n(k)?parseFloat(k):null;m=$APP.n(m)?parseFloat(m):
6
+ null;$APP.n(e)?b.setValidity({customError:!0},f,c):$APP.n($APP.n(h)?$APP.y.j(d,""):h)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):$APP.I(d,"")&&!q?b.setValidity({badInput:!0},"Please enter a valid number.",c):$APP.n(q?$APP.n(k)?$APP.p(isNaN(k))&&a<k:k:q)?b.setValidity({rangeUnderflow:!0},"Value must be at least "+$APP.P.i(k)+".",c):$APP.n(q?$APP.n(m)?$APP.p(isNaN(m))&&a>m:m:q)?b.setValidity({rangeOverflow:!0},"Value must be at most "+$APP.P.i(m)+".",c):b.setValidity({},"",c)},
7
+ TZ=function(a,b,c,d){a.textContent=b;$APP.n(c)?a.classList.remove(d):a.classList.add(d)},ZZ=function(a){if($APP.n($APP.l(a,"__xCurrencyFieldRefs"))){var b=$APP.Yf([$APP.Vi,UZ,$APP.Si,$APP.Un,$APP.ko,$APP.Wi,VZ,$APP.Xi,$APP.yq,$APP.hk,$APP.Ti,WZ,$APP.Ui],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),
8
+ a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var c=$APP.H(b);b=$APP.C(c,$APP.Ui);var d=$APP.C(c,$APP.Vi),e=$APP.C(c,UZ),f=$APP.C(c,$APP.Si),h=$APP.C(c,$APP.Un),k=$APP.C(c,$APP.ko),m=$APP.C(c,$APP.Wi),q=$APP.C(c,VZ),u=$APP.C(c,$APP.Xi),x=$APP.C(c,$APP.yq),z=$APP.C(c,$APP.hk),A=$APP.C(c,$APP.Ti);c=$APP.C(c,WZ);var D=$APP.n(h)?h:"",G=$APP.n(k)?k:"",J=$APP.n(d)?d:"";b=$APP.Yf([$APP.Dp,$APP.dj,$APP.mk,$APP.aj,$APP.Dn,$APP.Cs,$APP.$i,$APP.ei,$APP.dr,$APP.zq,$APP.zr,XZ,
9
+ $APP.sq,$APP.bj,$APP.On,$APP.cj],[$APP.n(q)?q:"",$APP.E(u),$APP.E(z),$APP.n(b)?b:"",typeof k==="string"&&$APP.I(k,""),$APP.n(c)?c:"",$APP.n(f)?f:"",$APP.n(A)?A:"",typeof d==="string"&&$APP.I(d,""),typeof h==="string"&&$APP.I(h,""),G,QZ(e),$APP.n(x)?x:"",J,D,$APP.E(m)]);$APP.I($APP.l(a,"__xCurrencyFieldModel"),b)?(f=$APP.l(a,"__xCurrencyFieldRefs"),$APP.n(f)?(h=$APP.l(f,"label"),q=$APP.l(f,"symbol"),d=$APP.l(f,"input"),e=$APP.l(f,"hint"),f=$APP.l(f,"error"),u=$APP.H(b),k=$APP.C(u,$APP.zq),m=$APP.C(u,
10
+ $APP.On),$APP.n(k)?u=null:(z=$APP.H(u),u=$APP.C(z,$APP.ei),x=$APP.C(z,$APP.Dp),z=$APP.C(z,$APP.sq),A=parseFloat(u),c=$APP.I(u,"")&&$APP.p(isNaN(A)),D=$APP.I(x,"")?parseFloat(x):null,G=$APP.I(z,"")?parseFloat(z):null,u=$APP.I(u,"")&&!c?"Please enter a valid number.":$APP.n(c?$APP.n(D)?$APP.p(isNaN(D))&&A<D:D:c)?"Value must be at least "+$APP.P.i(x)+".":$APP.n(c?$APP.n(G)?$APP.p(isNaN(G))&&A>G:G:c)?"Value must be at most "+$APP.P.i(z)+".":""),k=new $APP.N(null,2,[$APP.zq,$APP.n(k)?k:$APP.I($APP.n(u)?
11
+ u:"",""),YZ,$APP.n(k)?m:$APP.n(u)?u:""],null),m=$APP.H(k),k=$APP.C(m,$APP.zq),m=$APP.C(m,YZ),x=$APP.H(b),u=$APP.C(x,XZ),x=$APP.C(x,$APP.Cs),q.textContent=rga(u,x),A=$APP.H(b),q=$APP.C(A,$APP.$i),u=$APP.C(A,$APP.aj),x=$APP.C(A,$APP.cj),z=$APP.C(A,$APP.mk),A=$APP.C(A,$APP.dj),d.name=q,d.placeholder=u,d.disabled=x,d.readOnly=z,d.required=A,$APP.T(d,"aria-required",$APP.n($APP.dj.i(b))?"true":"false"),$APP.T(d,"aria-invalid",$APP.n(k)?"true":"false"),q=$APP.H(b),q=$APP.C(q,$APP.Dn),q=$APP.n($APP.n(q)?
12
+ k:q)?"hint error":$APP.n(q)?"hint":$APP.n(k)?"error":null,$APP.n(q)?$APP.T(d,"aria-describedby",q):$APP.U(d,"aria-describedby"),u=$APP.H(b),q=$APP.C(u,$APP.ei),$APP.C(u,XZ),u=$APP.C(u,$APP.Cs),$APP.y.j(d,a.shadowRoot.activeElement)||(d.value=$APP.y.j(q,"")?"":RZ(q,u)),u=$APP.H(b),q=$APP.C(u,$APP.bj),u=$APP.C(u,$APP.dr),TZ(h,q,u,"label-hidden"),q=$APP.H(b),h=$APP.C(q,$APP.zr),q=$APP.C(q,$APP.Dn),TZ(e,h,q,"hint-hidden"),TZ(f,m,k,"error-hidden"),$APP.ki(a,"data-invalid",k),e=$APP.l(a,"__xCurrencyFieldInternals"),
13
+ $APP.n(e)&&(f=a.getAttribute("value"),SZ(a,e,d,$APP.n(f)?f:"")),a=$APP.R(a,"__xCurrencyFieldModel",b)):a=null):a=null;return a}return null},tga=function(a){var b=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.l(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.ri(a,"x-currency-field-change-request",{name:e,value:c,previousValue:d})?(d=$APP.l(a,"__xCurrencyFieldInternals"),
14
+ $APP.n(d)&&(d.setFormValue(c),SZ(a,d,b,c)),$APP.pi(a,"x-currency-field-input",{name:e,value:c})):b.value=d}return null},uga=function(a){var b=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.P.i(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.ri(a,"x-currency-field-change-request",{name:d,value:c,previousValue:e})?($APP.T(a,
15
+ "value",c),e=$APP.l(a,"__xCurrencyFieldInternals"),$APP.n(e)&&(e.setFormValue(c),SZ(a,e,b,c)),$APP.pi(a,"x-currency-field-change",{name:d,value:c})):b.value=e}return null},vga=function(a){var b=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=function(){var h=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(h)){h=$APP.l(h,"input");var k=a.getAttribute("value");h=h.value=$APP.n(k)?k:""}else h=null;return h},d=function(){return tga(a)},e=function(){return uga(a)},f={};b.addEventListener("focus",
16
+ c);b.addEventListener("input",d);b.addEventListener("change",e);f.focus=c;f.input=d;f.change=e;$APP.R(a,"__xCurrencyFieldHandlers",f)}},$Z=function(a){var b=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.l(a,"__xCurrencyFieldHandlers");if($APP.n(c))return b=$APP.l(b,"input"),b.removeEventListener("focus",$APP.l(c,"focus")),b.removeEventListener("input",$APP.l(c,"input")),b.removeEventListener("change",$APP.l(c,"change")),$APP.R(a,"__xCurrencyFieldHandlers",null)}return null},wga=function(a,
17
+ b){$APP.ki(a,"disabled",$APP.E(b));return ZZ(a)},xga=function(a){$APP.U(a,"value");var b=$APP.l(a,"__xCurrencyFieldRefs");$APP.n(b)&&($APP.l(b,"input").value="");b=$APP.l(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue("");return ZZ(a)},yga=function(a){$APP.n($APP.l(a,"__xCurrencyFieldRefs"))||(sga(a),$APP.n(a.attachInternals)&&$APP.R(a,"__xCurrencyFieldInternals",a.attachInternals()));$Z(a);var b=$APP.l(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=a.getAttribute("value");
18
+ QZ(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=RZ(c,d))}b=$APP.l(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?e:""}());vga(a);return ZZ(a)},zga=function(a){return $Z(a)},Aga=function(a,b,c,d){return $APP.I(c,d)?($APP.y.j(b,"value")&&(b=$APP.l(a,"__xCurrencyFieldRefs"),$APP.n(b)&&(b=$APP.l(b,"input"),$APP.y.j(b,a.shadowRoot.activeElement)||(QZ(a.getAttribute("currency")),
19
+ c=a.getAttribute("locale"),c=$APP.n(c)?c:"",b.value=d==null||$APP.y.j(d,"")?"":RZ(d,c)))),ZZ(a)):null},Bga=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=b!=null&&$APP.I(b)?""+$APP.P.i(b):"";$APP.T(this,"value",b);var c=$APP.l(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.l(c,"input");QZ(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.y.j(c,
20
+ this.shadowRoot.activeElement)?null:c.value=$APP.y.j(b,"")?"":RZ(b,d)}return null}})},Cga=function(a){Object.defineProperty(a,"checkValidity",{value:function(){var b=$APP.l(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.checkValidity():!0},writable:!0,configurable:!0});return Object.defineProperty(a,"reportValidity",{value:function(){var b=$APP.l(this,"__xCurrencyFieldInternals");return $APP.n(b)?b.reportValidity():!0},writable:!0,configurable:!0})},Dga=function(a){Bga(a);$APP.xi(a,"name","name",
21
+ "");$APP.xi(a,"currency","currency","");$APP.xi(a,"locale","locale","");$APP.xi(a,"min","min","");$APP.xi(a,"max","max","");$APP.xi(a,"placeholder","placeholder","");$APP.xi(a,"label","label","");$APP.xi(a,"hint","hint","");$APP.xi(a,"error","error","");$APP.ui(a,"disabled","disabled");$APP.ui(a,"readOnly","readonly");$APP.ui(a,"required","required");return Cga(a)},a_=function(){return $APP.Kh("x-currency-field",new $APP.N(null,8,[$APP.Bh,Ega,$APP.zh,yga,$APP.qh,zga,$APP.ph,Aga,$APP.rh,!0,$APP.oh,
22
+ wga,$APP.nh,xga,$APP.Ah,Dga],null))},VZ=new $APP.F(null,"min-raw","min-raw",183137548),XZ=new $APP.F(null,"currency","currency",-898327568),YZ=new $APP.F(null,"display-error","display-error",-179691836),WZ=new $APP.F(null,"locale-raw","locale-raw",385401846),UZ=new $APP.F(null,"currency-raw","currency-raw",1169887491);var Ega="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
23
+ $APP.Yf([$APP.Dp,$APP.aj,$APP.Hk,$APP.Cs,$APP.$i,$APP.ei,$APP.zr,XZ,$APP.Or,$APP.sq,$APP.bj,$APP.On,$APP.Zp],[new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"min"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"placeholder"],null),new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"disabled"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"locale"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"name"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"value"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"hint"],null),
24
+ new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"currency"],null),new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"readonly"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"max"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"label"],null),new $APP.N(null,2,[$APP.O,$APP.Y,$APP.W,"error"],null),new $APP.N(null,2,[$APP.O,$APP.Ci,$APP.W,"required"],null)]);
25
+ $APP.be(["x-currency-field-change-request",new $APP.N(null,2,[$APP.Mr,!0,$APP.V,new $APP.N(null,3,[$APP.$i,$APP.Y,$APP.ei,$APP.Y,$APP.oq,$APP.Y],null)],null),"x-currency-field-input",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,2,[$APP.$i,$APP.Y,$APP.ei,$APP.Y],null)],null),"x-currency-field-change",new $APP.N(null,2,[$APP.Mr,!1,$APP.V,new $APP.N(null,2,[$APP.$i,$APP.Y,$APP.ei,$APP.Y],null)],null)]);$APP.fa("baredom.exports.x_currency_field.init",a_);export const init=a_;
@@ -17,6 +17,9 @@ export interface XDatePicker extends HTMLElement {
17
17
  readOnly: boolean;
18
18
  required: boolean;
19
19
  open: boolean;
20
+ focus(): void;
21
+ commit(): void;
22
+ clear(): void;
20
23
 
21
24
  addEventListener<K extends keyof XDatePickerEventMap>(
22
25
  type: K,