@mattilsynet/design 1.0.1 → 1.0.3

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.
@@ -11,3 +11,4 @@ export declare const React: Story;
11
11
  export declare const Radio: Story;
12
12
  export declare const Checkbox: Story;
13
13
  export declare const Removable: Story;
14
+ export declare const Nowrap: Story;
@@ -1,6 +1,6 @@
1
1
  export type DividerProps = React.ComponentPropsWithoutRef<"hr"> & {
2
- "data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | false;
2
+ "data-gap"?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "18" | "22" | "26" | "30" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 22 | 26 | 30;
3
3
  };
4
4
  export declare const Divider: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
5
- "data-gap"?: "none" | "xs" | "sm" | "md" | "lg" | false;
5
+ "data-gap"?: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "18" | "22" | "26" | "30" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 22 | 26 | 30;
6
6
  } & React.RefAttributes<HTMLHRElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../../designsystem/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type DividerProps = React.ComponentPropsWithoutRef<\"hr\"> & {\n\t\"data-gap\"?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | false;\n};\n\nexport const Divider = forwardRef<HTMLHRElement, DividerProps>(function Divider(\n\t{ className, ...rest },\n\tref,\n) {\n\treturn (\n\t\t// biome-ignore lint/a11y/noAriaHiddenOnFocusable: This is a decorative element\n\t\t<hr\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={clsx(styles.divider, className)}\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n});\n"],"names":["Divider","forwardRef","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAQa,MAAAA,IAAUC,EAAwC,SAC9D,EAAE,WAAAC,GAAW,GAAGC,EAAK,GACrBC,GACC;AACD;AAAA;AAAA,IAEC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,eAAY;AAAA,QACZ,WAAWC,EAAKC,EAAO,SAASL,CAAS;AAAA,QACzC,KAAAE;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"divider.js","sources":["../../designsystem/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport styles from \"../styles.module.css\";\n\nexport type DividerProps = React.ComponentPropsWithoutRef<\"hr\"> & {\n\t\"data-gap\"?:\n\t\t| \"0\"\n\t\t| \"1\"\n\t\t| \"2\"\n\t\t| \"3\"\n\t\t| \"4\"\n\t\t| \"5\"\n\t\t| \"6\"\n\t\t| \"7\"\n\t\t| \"8\"\n\t\t| \"9\"\n\t\t| \"10\"\n\t\t| \"11\"\n\t\t| \"12\"\n\t\t| \"13\"\n\t\t| \"14\"\n\t\t| \"15\"\n\t\t| \"18\"\n\t\t| \"22\"\n\t\t| \"26\"\n\t\t| \"30\"\n\t\t| 0\n\t\t| 1\n\t\t| 2\n\t\t| 3\n\t\t| 4\n\t\t| 5\n\t\t| 6\n\t\t| 7\n\t\t| 8\n\t\t| 9\n\t\t| 10\n\t\t| 11\n\t\t| 12\n\t\t| 13\n\t\t| 14\n\t\t| 15\n\t\t| 18\n\t\t| 22\n\t\t| 26\n\t\t| 30;\n};\n\nexport const Divider = forwardRef<HTMLHRElement, DividerProps>(function Divider(\n\t{ className, ...rest },\n\tref,\n) {\n\treturn (\n\t\t// biome-ignore lint/a11y/noAriaHiddenOnFocusable: This is a decorative element\n\t\t<hr\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={clsx(styles.divider, className)}\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t/>\n\t);\n});\n"],"names":["Divider","forwardRef","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAgDa,MAAAA,IAAUC,EAAwC,SAC9D,EAAE,WAAAC,GAAW,GAAGC,EAAK,GACrBC,GACC;AACD;AAAA;AAAA,IAEC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,eAAY;AAAA,QACZ,WAAWC,EAAKC,EAAO,SAASL,CAAS;AAAA,QACzC,KAAAE;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA;AAGP,CAAC;"}
@@ -1,8 +1,8 @@
1
- var mtds=function(x){"use strict";const Mt="_alert_1u2zm_1 _ds-alert_z5gp5_1",Dt="_avatar_1u2zm_1 _ds-avatar_z5gp5_1",Pt="_badge_1u2zm_1",Rt="_breadcrumbs_1u2zm_1 _ds-breadcrumbs_z5gp5_1",zt="_button_1u2zm_1 _ds-button_z5gp5_1",Ht="_card_1u2zm_1",Nt="_info_1u2zm_1",Bt="_group_1u2zm_1",Ft="_chip_1u2zm_1 _ds-chip_z5gp5_1",Ut="_details_1u2zm_1 _ds-details_z5gp5_1",Vt="_dialog_1u2zm_1 _ds-dialog_z5gp5_1",Yt="_divider_1u2zm_1",Kt="_errorsummary_1u2zm_1 _ds-error-summary_z5gp5_1",jt="_field_1u2zm_1 _ds-field_z5gp5_1",Wt="_affixes_1u2zm_1 _ds-field-affixes_z5gp5_1",Xt="_fieldset_1u2zm_1 _ds-fieldset_z5gp5_1",qt="_helptext_1u2zm_1 _ds-focus_z5gp5_1",Gt="_input_1u2zm_1 _ds-input_z5gp5_1",Qt="_app_1u2zm_1",Jt="_grid_1u2zm_1",Zt="_flex_1u2zm_1",te="_link_1u2zm_1",ee="_logo_1u2zm_1",ne="_pagination_1u2zm_1 _ds-pagination_z5gp5_1",oe="_popover_1u2zm_1",ie="_skeleton_1u2zm_1 _ds-skeleton_z5gp5_1",se="_spinner_1u2zm_1",re="_table_1u2zm_1 _ds-table_z5gp5_1",ae="__scrollShadow_1u2zm_1",le="_tabs_1u2zm_1 _ds-tabs_z5gp5_1",ue="_tag_1u2zm_1 _ds-tag_z5gp5_1",ce="__tooltip_1u2zm_1",de="_heading_1u2zm_1 _ds-heading_z5gp5_1",fe="_prose_1u2zm_1",pe="_validation_1u2zm_1 _ds-validation-message_z5gp5_1",he="_body_1u2zm_106",g={alert:Mt,avatar:Dt,badge:Pt,breadcrumbs:Rt,button:zt,card:Ht,info:Nt,group:Bt,chip:Ft,details:Ut,dialog:Vt,divider:Yt,errorsummary:Kt,field:jt,affixes:Wt,fieldset:Xt,helptext:qt,input:Gt,app:Qt,grid:Jt,flex:Zt,link:te,logo:ee,pagination:ne,popover:oe,skeleton:ie,spinner:se,table:re,_scrollShadow:ae,tabs:le,tag:ue,_tooltip:ce,heading:de,prose:fe,validation:pe,body:he},Mn=Object.freeze(Object.defineProperty({__proto__:null,_scrollShadow:ae,_tooltip:ce,affixes:Wt,alert:Mt,app:Qt,avatar:Dt,badge:Pt,body:he,breadcrumbs:Rt,button:zt,card:Ht,chip:Ft,default:g,details:Ut,dialog:Vt,divider:Yt,errorsummary:Kt,field:jt,fieldset:Xt,flex:Zt,grid:Jt,group:Bt,heading:de,helptext:qt,info:Nt,input:Gt,link:te,logo:ee,pagination:ne,popover:oe,prose:fe,skeleton:ie,spinner:se,table:re,tabs:le,tag:ue,validation:pe},Symbol.toStringTag,{value:"Module"})),Dn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),s=Array.from({length:r+1-i},(a,u)=>u+i);return n>4&&i>1&&s.splice(0,2,1,0),n>3&&r<e&&s.splice(-2,2,0,e),s},Pn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Dn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),P=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function f(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let Rn=0;const zn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${zn}${++Rn}`),t.id}const _e=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},b=(t,...e)=>_e("add",t,e),L=(t,...e)=>_e("remove",t,e),W=new Map,E=P?document.createElement("div"):null;E&&f(E,"style","position:absolute;padding:1px;top:0;left:0px"),P&&b(window,"load,resize,scroll",()=>{for(const[t,e]of W)e()},v);const A={top:0,right:1,bottom:2,left:3};function z(t,e,n){var On;if(!e||!e.isConnected||!t.isConnected)return W.delete(t);if(E!=null&&E.isConnected||document.body.append(E||""),!W.has(t)){const fi=A[n]??A.bottom;return(On=W.set(t,()=>z(t,e,fi)).get(t))==null?void 0:On()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:r,offsetHeight:s}=e,{width:a,height:u,left:l,top:c}=e.getBoundingClientRect(),h=Math.round(l-(r-a)/2),m=Math.round(c-(s-u)/2),S=h-o>0,Ot=r+r+o<window.innerWidth,D=m-i>0,rt=m+s+i<window.innerHeight,_=n===A.bottom&&Ot||!S,K=n===A.bottom&&rt||!D,j=Math.min(Math.max(10,h-(o-r)/2),window.innerWidth-o-10),at=Math.min(Math.max(10,m-(i-s)/2),window.innerHeight-i-10),lt=n===A.top||n===A.bottom;t.style.left=`${Math.round(lt?j:_?h+r:h-o)}px`,t.style.top=`${Math.round(lt?K?m+s:m-i:at)}px`,E==null||E.style.setProperty("translate",`${Math.round(window.scrollX+h+r+o+30)} ${Math.round(window.scrollY+m+s+i+30)}px`)}function Hn(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const X=new WeakMap,Nn=t=>{var n;const e=X.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),X.delete(t);else for(const[,o]of e.collections)o()},T=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=X.get(t);i||(i={collections:new Map,observer:Hn(()=>Nn(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),X.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e)},ut=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Bn=g._tooltip.split(" "),me="aria-describedby",ve="Escape",q="aria-labelledby",Fn="--mtds-tooltip-position",Un=300,G="mtds-tooltip";let $=null,ge=Number.NEGATIVE_INFINITY,be=0,y=null;function ct({target:t,type:e,key:n}){if(e==="keydown"&&n!==ve)return;const o=ge+Un-Date.now();clearTimeout(be),be=setTimeout(Vn,Math.max(o,0),n===ve?null:t)}function Vn(t){var a;if(ge=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===$)return;const n=e&&f(e,"data-tooltip")||"",o=e&&f(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(Fn)||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const r=$&&f($,q)===G,s=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(q))||(e==null?void 0:e.hasAttribute("aria-label"));$==null||$.removeAttribute(r?q:me),z(y,!1),$=e,$&&f($,s?me:q,G),y.togglePopover(!!e),z(y,e,o)}P&&!document.getElementById(G)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...Bn),y.id=G,f(y,"popover","manual"),b(document,"blur,focus,mouseout,mouseover",ct,v),b(window,"keydown",ct,v),b(window,"blur",ct,v));var ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ee;ye&&/^Mac/i.test(((Ee=navigator.userAgentData)==null?void 0:Ee.platform)||navigator.platform);var Yn=":host(:not([hidden])) { display: block }",$e=typeof HTMLElement>"u"?class{}:HTMLElement;function I(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Te=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},we=(t,...e)=>Te("add",t,e),Se=(t,...e)=>Te("remove",t,e),Kn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},jn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))I(o,i,r);return o},Ie={define:(t,e)=>!ye||window.customElements.get(t)||window.customElements.define(t,e)},Wn=class extends $e{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(dt("slot",null,{name:"summary"}),dt("slot",null,{part:"details-content"}),dt("style",`${Yn}
1
+ var mtds=function(x){"use strict";const Mt="_alert_cq24j_1 _ds-alert_z5gp5_1",Dt="_avatar_cq24j_1 _ds-avatar_z5gp5_1",Pt="_badge_cq24j_1",Rt="_breadcrumbs_cq24j_1 _ds-breadcrumbs_z5gp5_1",Ht="_button_cq24j_1 _ds-button_z5gp5_1",jt="_card_cq24j_1",Nt="_info_cq24j_1",Bt="_group_cq24j_1",qt="_chip_cq24j_1 _ds-chip_z5gp5_1",Ft="_details_cq24j_1 _ds-details_z5gp5_1",Ut="_dialog_cq24j_1 _ds-dialog_z5gp5_1",Vt="_divider_cq24j_1",zt="_errorsummary_cq24j_1 _ds-error-summary_z5gp5_1",Yt="__errorsummary_cq24j_1",Kt="_field_cq24j_1 _ds-field_z5gp5_1",Wt="_affixes_cq24j_1 _ds-field-affixes_z5gp5_1",Xt="_fieldset_cq24j_1 _ds-fieldset_z5gp5_1",Gt="_helptext_cq24j_1 _ds-focus_z5gp5_1",Qt="_input_cq24j_1 _ds-input_z5gp5_1",Jt="_app_cq24j_1",Zt="_grid_cq24j_1",te="_flex_cq24j_1",ee="_link_cq24j_1",ne="_logo_cq24j_1",oe="_pagination_cq24j_1 _ds-pagination_z5gp5_1",ie="_popover_cq24j_1",se="_skeleton_cq24j_1 _ds-skeleton_z5gp5_1",re="__skeleton_cq24j_1",ae="_spinner_cq24j_1",le="_table_cq24j_1 _ds-table_z5gp5_1",ce="__scrollShadow_cq24j_1",ue="_tabs_cq24j_1 _ds-tabs_z5gp5_1",de="_tag_cq24j_1 _ds-tag_z5gp5_1",fe="__tooltip_cq24j_1",pe="_heading_cq24j_1 _ds-heading_z5gp5_1",he="_prose_cq24j_1",_e="_validation_cq24j_1 _ds-validation-message_z5gp5_1",me="_body_cq24j_109",b={alert:Mt,avatar:Dt,badge:Pt,breadcrumbs:Rt,button:Ht,card:jt,info:Nt,group:Bt,chip:qt,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,_errorsummary:Yt,field:Kt,affixes:Wt,fieldset:Xt,helptext:Gt,input:Qt,app:Jt,grid:Zt,flex:te,link:ee,logo:ne,pagination:oe,popover:ie,skeleton:se,_skeleton:re,spinner:ae,table:le,_scrollShadow:ce,tabs:ue,tag:de,_tooltip:fe,heading:pe,prose:he,validation:_e,body:me},Pn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:Yt,_scrollShadow:ce,_skeleton:re,_tooltip:fe,affixes:Wt,alert:Mt,app:Jt,avatar:Dt,badge:Pt,body:me,breadcrumbs:Rt,button:Ht,card:jt,chip:qt,default:b,details:Ft,dialog:Ut,divider:Vt,errorsummary:zt,field:Kt,fieldset:Xt,flex:te,grid:Zt,group:Bt,heading:pe,helptext:Gt,info:Nt,input:Qt,link:ee,logo:ne,pagination:oe,popover:ie,prose:he,skeleton:se,spinner:ae,table:le,tabs:ue,tag:de,validation:_e},Symbol.toStringTag,{value:"Module"})),Rn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),s=Array.from({length:r+1-i},(a,c)=>c+i);return n>4&&i>1&&s.splice(0,2,1,0),n>3&&r<e&&s.splice(-2,2,0,e),s},Hn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Rn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),P=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function f(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let jn=0;const Nn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function R(t){return t.id||(t.id=`${Nn}${++jn}`),t.id}const ve=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},g=(t,...e)=>ve("add",t,e),L=(t,...e)=>ve("remove",t,e),K=new Map,E=P?document.createElement("div"):null;E&&f(E,"style","position:absolute;padding:1px;top:0;left:0px"),P&&g(window,"load,resize,scroll",()=>{for(const[t,e]of K)e()},v);const A={top:0,right:1,bottom:2,left:3};function H(t,e,n){var Dn;if(e===!1||!e.isConnected||!t.isConnected)return K.delete(t);if(E!=null&&E.isConnected||document.body.append(E||""),!K.has(t)){const hi=A[n]??A.bottom;return(Dn=K.set(t,()=>H(t,e,hi)).get(t))==null?void 0:Dn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:r,offsetHeight:s}=e,{width:a,height:c,left:l,top:u}=e.getBoundingClientRect(),h=Math.round(l-(r-a)/2),m=Math.round(u-(s-c)/2),S=h-o>0,Ot=r+r+o<window.innerWidth,D=m-i>0,rt=m+s+i<window.innerHeight,_=n===A.bottom&&Ot||!S,z=n===A.bottom&&rt||!D,Y=Math.min(Math.max(10,h-(o-r)/2),window.innerWidth-o-10),at=Math.min(Math.max(10,m-(i-s)/2),window.innerHeight-i-10),lt=n===A.top||n===A.bottom;t.style.left=`${Math.round(lt?Y:_?h+r:h-o)}px`,t.style.top=`${Math.round(lt?z?m+s:m-i:at)}px`,E==null||E.style.setProperty("translate",`${Math.round(window.scrollX+h+r+o+30)} ${Math.round(window.scrollY+m+s+i+30)}px`)}function Bn(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const W=new WeakMap,qn=t=>{var n;const e=W.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),W.delete(t);else for(const[,o]of e.collections)o()},T=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=W.get(t);i||(i={collections:new Map,observer:Bn(()=>qn(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),W.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e)},ct=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Fn=b._tooltip.split(" "),be="aria-describedby",ge="Escape",X="aria-labelledby",Un="--mtds-tooltip-position",Vn=300,G="mtds-tooltip";let $=null,ye=Number.NEGATIVE_INFINITY,Ee=0,y=null;function ut({target:t,type:e,key:n}){if(e==="keydown"&&n!==ge)return;const o=ye+Vn-Date.now();clearTimeout(Ee),Ee=setTimeout(zn,Math.max(o,0),n===ge?null:t)}function zn(t){var a;if(ye=Date.now(),!y||t===y)return;let e=((a=t==null?void 0:t.closest)==null?void 0:a.call(t,"[data-tooltip]"))||null;if(e===$)return;const n=e&&f(e,"data-tooltip")||"",o=e&&f(e,"data-tooltip-position")||window.getComputedStyle(e||document.body).getPropertyValue(Un)||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(y.textContent=n);const r=$&&f($,X)===G,s=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(X))||(e==null?void 0:e.hasAttribute("aria-label"));$==null||$.removeAttribute(r?X:be),H(y,!1),$=e,$&&f($,s?be:X,G),y.togglePopover(!!e),H(y,e||!1,o)}P&&!document.getElementById(G)&&(y=document.body.appendChild(document.createElement("div")),y.classList.add(...Fn),y.id=G,f(y,"popover","manual"),g(document,"blur,focus,mouseout,mouseover",ut,v),g(window,"keydown",ut,v),g(window,"blur",ut,v));var $e=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Te;$e&&/^Mac/i.test(((Te=navigator.userAgentData)==null?void 0:Te.platform)||navigator.platform);var Yn=":host(:not([hidden])) { display: block }",we=typeof HTMLElement>"u"?class{}:HTMLElement;function I(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Se=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ie=(t,...e)=>Se("add",t,e),Ce=(t,...e)=>Se("remove",t,e),Kn=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Wn=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},dt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))I(o,i,r);return o},xe={define:(t,e)=>!$e||window.customElements.get(t)||window.customElements.define(t,e)},Xn=class extends we{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(dt("slot",null,{name:"summary"}),dt("slot",null,{part:"details-content"}),dt("style",`${Yn}
2
2
  ::slotted(u-summary) { cursor: pointer; display: list-item; counter-increment: list-item 0; list-style: disclosure-closed inside }
3
3
  ::slotted(u-summary[aria-expanded="true"]) { list-style-type: disclosure-open }
4
- :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],we(this._content,"beforematch",this),we(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Se(this._content,"beforematch",this),Se(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&I(r,"aria-expanded",`${i}`);if(this._content&&(I(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const r=jn(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of r)s!==this&&(s.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Kn(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){I(this,"open",t?"":null)}get name(){return I(this,"name")||""}set name(t){I(this,"name",t)}},Xn=class extends $e{connectedCallback(){I(this,"role","button"),this.slot="summary",this.tabIndex=0}};Ie.define("u-details",Wn),Ie.define("u-summary",Xn);const Ce=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&f(n,"data-closedby")==="any"){const{top:i,right:r,bottom:s,left:a}=n.getBoundingClientRect();i<=e&&e<=s&&a<=t&&t<=r||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function qn(t){b(t,"click",Ce,v)}function Gn(t){L(t,"click",Ce,v)}var Qn=Object.defineProperty,xe=Object.getOwnPropertySymbols,Jn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,Le=(t,e,n)=>e in t?Qn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,to=(t,e)=>{for(var n in e||(e={}))Jn.call(e,n)&&Le(t,n,e[n]);if(xe)for(var n of xe(e))Zn.call(e,n)&&Le(t,n,e[n]);return t},C=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",eo=C&&/android/i.test(navigator.userAgent),ft=C&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ae=C&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ke;C&&/^Mac/i.test(((ke=navigator.userAgentData)==null?void 0:ke.platform)||navigator.platform);var no=`${eo?"data":"aria"}-labelledby`,Oe=`${Ae?"aria":"data"}-multiselectable`,Me=":host(:not([hidden])) { display: block }",oo="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",De=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Pe=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},pt=(t,...e)=>Pe("add",t,e),ht=(t,...e)=>Pe("remove",t,e),Re=(t,e)=>t.attachShadow({mode:"open"}).append(mt("slot"),mt("style",e)),Q=new WeakMap,ze=(t,e)=>{if(e===void 0)return Q.get(t);try{Q.get(t).disconnect(),Q.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Q.set(t,n)}},He=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},io=0,_t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++io).toString(32)}`),t.id):"",mt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Ne={define:(t,e)=>!C||window.customElements.get(t)||window.customElements.define(t,e)},so=t=>{if(!C)return null;const e=mt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Be(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var vt="disabled",H="selected",ro=class extends De{static get observedAttributes(){return[vt,H]}constructor(){super(),Re(this,`${Me}:host(:focus){${oo}}:host{ cursor: pointer }`)}connectedCallback(){ft||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[H]}set defaultSelected(e){this[H]=e}get disabled(){return p(this,vt)!==null}set disabled(e){p(this,vt,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,H)!==null}set selected(e){p(this,H,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};Ne.define("u-option",ro);var gt=!1,Fe,ao=0,N=so("assertive"),lo=Ae&&!ft,Ue="click,focusout,input,keydown,mousedown,mouseup",Ve={singular:"%d hit",plural:"%d hits"},Ye=class extends De{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=to({},Ve),Re(this,`${Me}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Be(Ve)]}connectedCallback(){this.hidden=!0,this._root=He(this),N&&!N.isConnected&&document.body.append(N),p(this,"role","listbox"),pt(this._root,"focusin",this),pt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ht(this._root||this,"focus",this,!0),ht(this._root||this,"focusin",this),bt(this),this._root=null}attributeChangedCallback(e,n,o){var i;Be(this._texts,e,o);const r=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const s of r||[])je(this,s)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&fo(this,e),(n==="focus"||n==="focusin")&&uo(this,e),n==="focusout"&&co(this),n==="keydown"&&po(this,e),(n==="mutation"||n==="input")&&Xe(this,e),n==="mouseup"&&(gt=!1),n==="mousedown"&&(gt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},uo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&bt(t),t._input=e,p(t,no,_t((n=t._input.labels)==null?void 0:n[0])),pt(t._root||t,Ue,t),ze(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},co=t=>{gt||(t._blurTimer=setTimeout(()=>bt(t)))},fo=(t,{target:e})=>{var n,o,i,r,s;const a=p(t,Oe)!=="true",u=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(u&&J(u)){for(const l of t.options)l===u?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,u.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},po=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=Ke(t),a=s.indexOf(r);let u=-1;if(i==="ArrowDown"&&(u=(a+1)%s.length),i==="ArrowUp"&&(u=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(u=0),(i==="End"||i==="PageDown")&&(u=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[u])for(const l of s)l.tabIndex=-1;s[u]&&e.preventDefault(),(o=s[u]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&je(t,t._input,e),e&&Xe(t)},bt=t=>{ht(t._root||t,Ue,t),ze(t,!1),k(t,!1),t._input=null},Ke=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),J=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",je=(t,e,n=!1)=>{p(e,"popovertarget",_t(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",_t(t)),p(e,"aria-expanded",`${lo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},We=t=>(t==null?void 0:t.toLowerCase().trim())||"",Xe=(t,e)=>{var n;const o=We((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=p(t,Oe)!=="true",a=e instanceof InputEvent&&!mo(e);t.hidden=!0,t._value=o;for(const l of t.options){const c=[l.value,l.label,l.text].map(We);l.hidden=!c.some(h=>h.includes(o)),s&&a&&J(l)&&(l.selected=c.includes(o))}t.hidden=r;const u=Ke(t);clearTimeout(Fe),Fe=setTimeout(()=>{const{length:l}=u.filter(J),c=++ao%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;N&&(N.textContent=`${!l&&t.innerText.trim()||h}${c}`)},1e3),ft&&u.map((l,c,h)=>{l.title=`${c+1}/${h}`})};C&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return He(this).getElementById(p(this,"list")||"")}}),Ne.define("u-datalist",Ye);var ho=" ".repeat(100),_o="insertReplacementText";function mo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===_o);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!J(r));t.target.value=o.split(ho)[i?1:0]}return n}var vo=Object.defineProperty,qe=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable,Ge=(t,e,n)=>e in t?vo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qe=(t,e)=>{for(var n in e||(e={}))go.call(e,n)&&Ge(t,n,e[n]);if(qe)for(var n of qe(e))bo.call(e,n)&&Ge(t,n,e[n]);return t},w=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Je=w&&/android/i.test(navigator.userAgent),yo=w&&/firefox/i.test(navigator.userAgent),Z=w&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ze=w&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),tn,Eo=w&&/^Mac/i.test(((tn=navigator.userAgentData)==null?void 0:tn.platform)||navigator.platform),$o=`${Je?"data":"aria"}-labelledby`,yt=`${Ze?"aria":"data"}-multiselectable`,en=":host(:not([hidden])) { display: block }",nn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Et=typeof HTMLElement>"u"?class{}:HTMLElement;function d(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var on=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},B=(t,...e)=>on("add",t,e),F=(t,...e)=>on("remove",t,e),sn=(t,e)=>t.attachShadow({mode:"open"}).append(O("slot"),O("style",e)),tt=new WeakMap,et=(t,e)=>{if(e===void 0)return tt.get(t);try{tt.get(t).disconnect(),tt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),tt.set(t,n)}},To=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},nt=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},wo=0,$t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++wo).toString(32)}`),t.id):"",O=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))d(o,i,r);return o},Tt={define:(t,e)=>!w||window.customElements.get(t)||window.customElements.define(t,e)},rn=t=>{if(!w)return null;const e=O("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",d(e,"aria-live",t),document.body.appendChild(e)};function ot(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var wt="disabled",U="selected",So=class extends Et{static get observedAttributes(){return[wt,U]}constructor(){super(),sn(this,`${en}:host(:focus){${nn}}:host{ cursor: pointer }`)}connectedCallback(){Z||(this.tabIndex=-1),d(this,"role")||d(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){d(this,"aria-disabled",`${this.disabled}`),d(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[U]}set defaultSelected(t){this[U]=t}get disabled(){return d(this,wt)!==null}set disabled(t){d(this,wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return d(this,"label")||this.text}set label(t){d(this,"label",t)}get selected(){return d(this,U)!==null}set selected(t){d(this,U,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return d(this,"value")||this.text}set value(t){d(this,"value",t)}};Tt.define("u-option",So);var St=!1,an,Io=0,V=rn("assertive"),Co=Ze&&!Z,ln="click,focusout,input,keydown,mousedown,mouseup",un={singular:"%d hit",plural:"%d hits"},xo=class extends Et{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=Qe({},un),sn(this,`${en}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ot(un)]}connectedCallback(){this.hidden=!0,this._root=nt(this),V&&!V.isConnected&&document.body.append(V),d(this,"role","listbox"),B(this._root,"focusin",this),B(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){F(this._root||this,"focus",this,!0),F(this._root||this,"focusin",this),It(this),this._root=null}attributeChangedCallback(t,e,n){var o;ot(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const r of i||[])dn(this,r)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&ko(this,t),(e==="focus"||e==="focusin")&&Lo(this,t),e==="focusout"&&Ao(this),e==="keydown"&&Oo(this,t),(e==="mutation"||e==="input")&&pn(this,t),e==="mouseup"&&(St=!1),e==="mousedown"&&(St=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},Lo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&d(e,"list")===t.id&&(t._input&&It(t),t._input=e,d(t,$o,$t((n=t._input.labels)==null?void 0:n[0])),B(t._root||t,ln,t),et(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),M(t,!0))},Ao=t=>{St||(t._blurTimer=setTimeout(()=>It(t)))},ko=(t,{target:e})=>{var n,o,i,r,s;const a=d(t,yt)!=="true",u=[...t.options].find(l=>l.contains(e));if(t._input===e)M(t,!0);else if(u&&it(u)){for(const l of t.options)l===u?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,u.value),a&&((i=t._input)==null||i.focus(),M(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},Oo=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&M(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=cn(t),a=s.indexOf(r);let u=-1;if(i==="ArrowDown"&&(u=(a+1)%s.length),i==="ArrowUp"&&(u=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(u=0),(i==="End"||i==="PageDown")&&(u=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[u])for(const l of s)l.tabIndex=-1;s[u]&&e.preventDefault(),(o=s[u]||t._input)==null||o.focus(),i==="Escape"&&M(t,!1)},M=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&dn(t,t._input,e),e&&pn(t)},It=t=>{F(t._root||t,ln,t),et(t,!1),M(t,!1),t._input=null},cn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),it=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",dn=(t,e,n=!1)=>{d(e,"popovertarget",$t(t)),d(e,"aria-autocomplete","list"),d(e,"aria-controls",$t(t)),d(e,"aria-expanded",`${Co||n}`),d(e,"autocomplete","off"),d(e,"role","combobox")},fn=t=>(t==null?void 0:t.toLowerCase().trim())||"",pn=(t,e)=>{var n;const o=fn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=d(t,yt)!=="true",a=e instanceof InputEvent&&!_n(e);t.hidden=!0,t._value=o;for(const l of t.options){const c=[l.value,l.label,l.text].map(fn);l.hidden=!c.some(h=>h.includes(o)),s&&a&&it(l)&&(l.selected=c.includes(o))}t.hidden=r;const u=cn(t);clearTimeout(an),an=setTimeout(()=>{const{length:l}=u.filter(it),c=++Io%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;V&&(V.textContent=`${!l&&t.innerText.trim()||h}${c}`)},1e3),Z&&u.map((l,c,h)=>{l.title=`${c+1}/${h}`})};w&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return nt(this).getElementById(d(this,"list")||"")}}),Tt.define("u-datalist",xo);var hn=" ".repeat(100),Mo="insertReplacementText",Ct=({value:t})=>t.split(hn)[0];function _n(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Mo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!it(r));t.target.value=o.split(hn)[i?1:0]}return n}var Do=Je||Z,Po=yo||Eo,Y=rn("polite"),mn="input,focusin,focusout,keydown",vn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},Ro=class extends Et{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=Qe({},vn),this.attachShadow({mode:"open"}).append(O("slot"),O("style",`:host(:not([hidden])){ display: inline-block }
4
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`))}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],Ie(this._content,"beforematch",this),Ie(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Ce(this._content,"beforematch",this),Ce(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&I(r,"aria-expanded",`${i}`);if(this._content&&(I(this._content,"aria-hidden",`${!i}`),this._content.hidden=i?!1:o),i&&this.name){const r=Wn(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of r)s!==this&&(s.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){const e=this.querySelector(":scope > u-summary"),n=e==null?void 0:e.contains(t.target);t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&Kn(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){I(this,"open",t?"":null)}get name(){return I(this,"name")||""}set name(t){I(this,"name",t)}},Gn=class extends we{connectedCallback(){I(this,"role","button"),this.slot="summary",this.tabIndex=0}};xe.define("u-details",Xn),xe.define("u-summary",Gn);const Le=({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&f(n,"data-closedby")==="any"){const{top:i,right:r,bottom:s,left:a}=n.getBoundingClientRect();i<=e&&e<=s&&a<=t&&t<=r||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())};function Qn(t){g(t,"click",Le,v)}function Jn(t){L(t,"click",Le,v)}var Zn=Object.defineProperty,Ae=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,ke=(t,e,n)=>e in t?Zn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,no=(t,e)=>{for(var n in e||(e={}))to.call(e,n)&&ke(t,n,e[n]);if(Ae)for(var n of Ae(e))eo.call(e,n)&&ke(t,n,e[n]);return t},C=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",oo=C&&/android/i.test(navigator.userAgent),ft=C&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oe=C&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Me;C&&/^Mac/i.test(((Me=navigator.userAgentData)==null?void 0:Me.platform)||navigator.platform);var io=`${oo?"data":"aria"}-labelledby`,De=`${Oe?"aria":"data"}-multiselectable`,Pe=":host(:not([hidden])) { display: block }",so="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Re=typeof HTMLElement>"u"?class{}:HTMLElement;function p(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var He=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},pt=(t,...e)=>He("add",t,e),ht=(t,...e)=>He("remove",t,e),je=(t,e)=>t.attachShadow({mode:"open"}).append(mt("slot"),mt("style",e)),Q=new WeakMap,Ne=(t,e)=>{if(e===void 0)return Q.get(t);try{Q.get(t).disconnect(),Q.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Q.set(t,n)}},Be=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ro=0,_t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ro).toString(32)}`),t.id):"",mt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},qe={define:(t,e)=>!C||window.customElements.get(t)||window.customElements.define(t,e)},ao=t=>{if(!C)return null;const e=mt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),document.body.appendChild(e)};function Fe(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var vt="disabled",j="selected",lo=class extends Re{static get observedAttributes(){return[vt,j]}constructor(){super(),je(this,`${Pe}:host(:focus){${so}}:host{ cursor: pointer }`)}connectedCallback(){ft||(this.tabIndex=-1),p(this,"role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[j]}set defaultSelected(e){this[j]=e}get disabled(){return p(this,vt)!==null}set disabled(e){p(this,vt,e?"":null)}get form(){return this.closest("form")}get index(){var e;const n=(e=this.closest("u-datalist"))==null?void 0:e.getElementsByTagName("u-option");return Array.from(n||[this]).indexOf(this)}get label(){return p(this,"label")||this.text}set label(e){p(this,"label",e)}get selected(){return p(this,j)!==null}set selected(e){p(this,j,e?"":null)}get text(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}set text(e){this.textContent=e}get value(){return p(this,"value")||this.text}set value(e){p(this,"value",e)}};qe.define("u-option",lo);var bt=!1,Ue,co=0,N=ao("assertive"),uo=Oe&&!ft,Ve="click,focusout,input,keydown,mousedown,mouseup",ze={singular:"%d hit",plural:"%d hits"},Ye=class extends Re{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=no({},ze),je(this,`${Pe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...Fe(ze)]}connectedCallback(){this.hidden=!0,this._root=Be(this),N&&!N.isConnected&&document.body.append(N),p(this,"role","listbox"),pt(this._root,"focusin",this),pt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){ht(this._root||this,"focus",this,!0),ht(this._root||this,"focusin",this),gt(this),this._root=null}attributeChangedCallback(e,n,o){var i;Fe(this._texts,e,o);const r=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const s of r||[])We(this,s)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ho(this,e),(n==="focus"||n==="focusin")&&fo(this,e),n==="focusout"&&po(this),n==="keydown"&&_o(this,e),(n==="mutation"||n==="input")&&Ge(this,e),n==="mouseup"&&(bt=!1),n==="mousedown"&&(bt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},fo=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&p(e,"list")===t.id&&(t._input&&gt(t),t._input=e,p(t,io,_t((n=t._input.labels)==null?void 0:n[0])),pt(t._root||t,Ve,t),Ne(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),k(t,!0))},po=t=>{bt||(t._blurTimer=setTimeout(()=>gt(t)))},ho=(t,{target:e})=>{var n,o,i,r,s;const a=p(t,De)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)k(t,!0);else if(c&&J(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),k(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},_o=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&k(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=Ke(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&k(t,!1)},k=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&We(t,t._input,e),e&&Ge(t)},gt=t=>{ht(t._root||t,Ve,t),Ne(t,!1),k(t,!1),t._input=null},Ke=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),J=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",We=(t,e,n=!1)=>{p(e,"popovertarget",_t(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",_t(t)),p(e,"aria-expanded",`${uo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},Xe=t=>(t==null?void 0:t.toLowerCase().trim())||"",Ge=(t,e)=>{var n;const o=Xe((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=p(t,De)!=="true",a=e instanceof InputEvent&&!bo(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(Xe);l.hidden=!u.some(h=>h.includes(o)),s&&a&&J(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=Ke(t);clearTimeout(Ue),Ue=setTimeout(()=>{const{length:l}=c.filter(J),u=++co%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;N&&(N.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),ft&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};C&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Be(this).getElementById(p(this,"list")||"")}}),qe.define("u-datalist",Ye);var mo=" ".repeat(100),vo="insertReplacementText";function bo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===vo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!J(r));t.target.value=o.split(mo)[i?1:0]}return n}var go=Object.defineProperty,Qe=Object.getOwnPropertySymbols,yo=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Je=(t,e,n)=>e in t?go(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))yo.call(e,n)&&Je(t,n,e[n]);if(Qe)for(var n of Qe(e))Eo.call(e,n)&&Je(t,n,e[n]);return t},w=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tn=w&&/android/i.test(navigator.userAgent),$o=w&&/firefox/i.test(navigator.userAgent),Z=w&&/iPad|iPhone|iPod/.test(navigator.userAgent),en=w&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),nn,To=w&&/^Mac/i.test(((nn=navigator.userAgentData)==null?void 0:nn.platform)||navigator.platform),wo=`${tn?"data":"aria"}-labelledby`,yt=`${en?"aria":"data"}-multiselectable`,on=":host(:not([hidden])) { display: block }",sn="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Et=typeof HTMLElement>"u"?class{}:HTMLElement;function d(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var rn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},B=(t,...e)=>rn("add",t,e),q=(t,...e)=>rn("remove",t,e),an=(t,e)=>t.attachShadow({mode:"open"}).append(O("slot"),O("style",e)),tt=new WeakMap,et=(t,e)=>{if(e===void 0)return tt.get(t);try{tt.get(t).disconnect(),tt.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),tt.set(t,n)}},So=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},nt=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Io=0,$t=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Io).toString(32)}`),t.id):"",O=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,r]of Object.entries(n))d(o,i,r);return o},Tt={define:(t,e)=>!w||window.customElements.get(t)||window.customElements.define(t,e)},ln=t=>{if(!w)return null;const e=O("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",d(e,"aria-live",t),document.body.appendChild(e)};function ot(t,e,n){if(!e)return Object.keys(t).map(i=>`data-sr-${i}`);const o=(e==null?void 0:e.startsWith("data-sr-"))&&e.slice(8);return o&&n&&t[o]&&(t[o]=n),[]}var wt="disabled",F="selected",Co=class extends Et{static get observedAttributes(){return[wt,F]}constructor(){super(),an(this,`${on}:host(:focus){${sn}}:host{ cursor: pointer }`)}connectedCallback(){Z||(this.tabIndex=-1),d(this,"role")||d(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){d(this,"aria-disabled",`${this.disabled}`),d(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[F]}set defaultSelected(t){this[F]=t}get disabled(){return d(this,wt)!==null}set disabled(t){d(this,wt,t?"":null)}get form(){return this.closest("form")}get index(){var t;const e=(t=this.closest("u-datalist"))==null?void 0:t.getElementsByTagName("u-option");return Array.from(e||[this]).indexOf(this)}get label(){return d(this,"label")||this.text}set label(t){d(this,"label",t)}get selected(){return d(this,F)!==null}set selected(t){d(this,F,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){return d(this,"value")||this.text}set value(t){d(this,"value",t)}};Tt.define("u-option",Co);var St=!1,cn,xo=0,U=ln("assertive"),Lo=en&&!Z,un="click,focusout,input,keydown,mousedown,mouseup",dn={singular:"%d hit",plural:"%d hits"},Ao=class extends Et{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=Ze({},dn),an(this,`${on}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...ot(dn)]}connectedCallback(){this.hidden=!0,this._root=nt(this),U&&!U.isConnected&&document.body.append(U),d(this,"role","listbox"),B(this._root,"focusin",this),B(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){q(this._root||this,"focus",this,!0),q(this._root||this,"focusin",this),It(this),this._root=null}attributeChangedCallback(t,e,n){var o;ot(this._texts,t,n);const i=(o=this._root)==null?void 0:o.querySelectorAll(`input[list="${this.id}"]`);for(const r of i||[])pn(this,r)}handleEvent(t){const{type:e}=t;t.defaultPrevented||(e==="click"&&Mo(this,t),(e==="focus"||e==="focusin")&&ko(this,t),e==="focusout"&&Oo(this),e==="keydown"&&Do(this,t),(e==="mutation"||e==="input")&&_n(this,t),e==="mouseup"&&(St=!1),e==="mousedown"&&(St=this.contains(t.target)))}get options(){return this.getElementsByTagName("u-option")}},ko=(t,{target:e})=>{var n;const o=t._input===e;if(o||t.contains(e))return clearTimeout(t._blurTimer);!o&&e instanceof HTMLInputElement&&d(e,"list")===t.id&&(t._input&&It(t),t._input=e,d(t,wo,$t((n=t._input.labels)==null?void 0:n[0])),B(t._root||t,un,t),et(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),M(t,!0))},Oo=t=>{St||(t._blurTimer=setTimeout(()=>It(t)))},Mo=(t,{target:e})=>{var n,o,i,r,s;const a=d(t,yt)!=="true",c=[...t.options].find(l=>l.contains(e));if(t._input===e)M(t,!0);else if(c&&it(c)){for(const l of t.options)l===c?l.selected=!0:a&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,c.value),a&&((i=t._input)==null||i.focus(),M(t,!1)),(r=t._input)==null||r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(s=t._input)==null||s.dispatchEvent(new Event("change",{bubbles:!0}))}},Do=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&M(t,!0);const{key:i}=e,r=(n=t._root)==null?void 0:n.activeElement,s=fn(t),a=s.indexOf(r);let c=-1;if(i==="ArrowDown"&&(c=(a+1)%s.length),i==="ArrowUp"&&(c=(~a?a:s.length)-1),~a&&((i==="Home"||i==="PageUp")&&(c=0),(i==="End"||i==="PageDown")&&(c=s.length-1),i==="Enter"))return s[a].click(),e.preventDefault();if(s[c])for(const l of s)l.tabIndex=-1;s[c]&&e.preventDefault(),(o=s[c]||t._input)==null||o.focus(),i==="Escape"&&M(t,!1)},M=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&pn(t,t._input,e),e&&_n(t)},It=t=>{q(t._root||t,un,t),et(t,!1),M(t,!1),t._input=null},fn=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),it=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",pn=(t,e,n=!1)=>{d(e,"popovertarget",$t(t)),d(e,"aria-autocomplete","list"),d(e,"aria-controls",$t(t)),d(e,"aria-expanded",`${Lo||n}`),d(e,"autocomplete","off"),d(e,"role","combobox")},hn=t=>(t==null?void 0:t.toLowerCase().trim())||"",_n=(t,e)=>{var n;const o=hn((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const r=t.hidden,s=d(t,yt)!=="true",a=e instanceof InputEvent&&!vn(e);t.hidden=!0,t._value=o;for(const l of t.options){const u=[l.value,l.label,l.text].map(hn);l.hidden=!u.some(h=>h.includes(o)),s&&a&&it(l)&&(l.selected=u.includes(o))}t.hidden=r;const c=fn(t);clearTimeout(cn),cn=setTimeout(()=>{const{length:l}=c.filter(it),u=++xo%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;U&&(U.textContent=`${!l&&t.innerText.trim()||h}${u}`)},1e3),Z&&c.map((l,u,h)=>{l.title=`${u+1}/${h}`})};w&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return nt(this).getElementById(d(this,"list")||"")}}),Tt.define("u-datalist",Ao);var mn=" ".repeat(100),Po="insertReplacementText",Ct=({value:t})=>t.split(mn)[0];function vn(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===Po);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(r=>r.value===o&&!it(r));t.target.value=o.split(mn)[i?1:0]}return n}var Ro=tn||Z,Ho=$o||To,V=ln("polite"),bn="input,focusin,focusout,keydown",gn={added:"Added",remove:"Press to remove",removed:"Removed",empty:"No selected",found:"Navigate left to find %d selected",of:"of"},jo=class extends Et{constructor(){super(),this._blurAnnounceReset=!1,this._blurTimer=0,this._focusIndex=null,this._root=null,this._texts=Ze({},gn),this.attachShadow({mode:"open"}).append(O("slot"),O("style",`:host(:not([hidden])){ display: inline-block }
5
5
  ::slotted(data) { cursor: pointer; display: inline-block; outline: none; pointer-events: none }
6
6
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto }
7
- ::slotted(data:focus)::after { ${nn} }`))}static get observedAttributes(){return ot(vn)}connectedCallback(){this._root=nt(this),Y&&!Y.isConnected&&document.body.append(Y),et(this,{childList:!0}),B(this._root,"click",this),B(this,mn,this),setTimeout(()=>st(this))}attributeChangedCallback(t,e,n){ot(this._texts,t,n)}disconnectedCallback(){et(this,!1),F(this._root||this,"click",this),F(this,mn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&No(this,t),t.type==="focusin"&&zo(this,t),t.type==="focusout"&&Ho(this),t.type==="input"&&Bo(this,t),t.type==="keydown"&&Fo(this,t),t.type==="mutation"&&st(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},xt=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),st=(t,e)=>{var n,o,i,r,s;const a=t._texts,u=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(u==null?void 0:u.addedNodes[0])||(u==null?void 0:u.removedNodes[0]),c=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",m=[];d(t,"role","group"),d(t,"aria-label",h),t.items.forEach((_,K,{length:j})=>{var at;const lt=`${c}${_.textContent}, ${a.remove}, ${K+1} ${a.of} ${j}`;d(_,"aria-label",lt),d(_,"role","button"),_.tabIndex=-1,_.value=_.value||((at=_.textContent)==null?void 0:at.trim())||"",m.push(_.value)});const S=t.control,Ot=`${c}${h}, ${m.length?a.found.replace("%d",`${m.length}`):a.empty}`,D=S&&document.getElementById(d(S,"list")||""),rt=D==null?void 0:D.children;S&&d(S,"aria-label",Ot),D&&d(D,yt,"true");for(const _ of rt||[])_.selected=m.includes(Ct(_));if(c){const _=t.items[(t._focusIndex||1)-1]||S,K=_===((r=nt(t))==null?void 0:r.activeElement),j=rt||t.items;t._blurAnnounceReset=!1,_===S?(K&&(Do&&Y?Y.textContent=c:(s=j[0])==null||s.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!Po)return st(t);t._blurAnnounceReset=!0},500)}},zo=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},Ho=t=>{t._blurAnnounceReset&&st(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},No=(t,{target:e,clientX:n,clientY:o})=>{var i;const r=t.contains(e)?[...t.items]:null,s=r==null?void 0:r.find(u=>u.contains(e)),a=r==null?void 0:r.find(u=>{const{top:l,right:c,bottom:h,left:m}=u.getBoundingClientRect();return o>=l&&o<=h&&n>=m&&n<=c});s?xt(t,s)&&s.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},Bo=(t,e)=>{var n;const o=e.target;if(!_n(e)||!(o!=null&&o.value.trim()))return;const i=Ct(o),r=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(c=>Ct(c)===i),u=r.find(c=>c.value===i),l=O("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!xt(t,u||l)){if(u)return u.remove();if(!r[0])return t.prepend(l);r[r.length-1].insertAdjacentElement("afterend",l)}},Fo=(t,e)=>{var n,o;const{key:i,repeat:r,target:s}=e,a=t.control===s?t.control:null,u=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&To(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!u)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!u){const c=!r&&t.items[l];if(e.preventDefault(),c)return xt(t,c)&&c.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};Tt.define("u-tags",Ro);const Lt=g.field.split(" ")[0],Uo="--mtds-text-count-over",Vo="--mtds-text-count-under",gn=g.validation.split(" "),Yo=gn[0];function Ko(t){for(const e of t){const n=[],o=[];let i=null,r=null,s=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof Ye?r=a:ut(a)?i=a:a.classList.contains(Yo)?(s=f(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);jo(i,r),yn(i),bn(i),f(i,"aria-describedby",o.join(" ")),f(i,"aria-invalid",`${!s}`)}}}function bn(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function jo(t,e){if(f(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||f(t,"placeholder","");const n=window.getComputedStyle(e),o=n.getPropertyValue("--mtds-text-datalist-singular"),i=n.getPropertyValue("--mtds-text-datalist-plural");f(e,"data-sr-plural",i),f(e,"data-sr-singular",o)}function yn(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&f(e,"data-count");if(e&&n){const r=Number(n)-t.value.length,s=r<0,a=f(e,"aria-live")==="polite",u=window.getComputedStyle(e||t),l=((o=u.getPropertyValue(Uo))==null?void 0:o.slice(1,-1))||"",c=((i=u.getPropertyValue(Vo))==null?void 0:i.slice(1,-1))||"";if(a!==s){f(e,"aria-live",s?"polite":"off");for(const h of gn)e.classList.toggle(h,s)}e.textContent=(s?l:c).replace("%d",`${Math.abs(r)}`)}}function En({target:t}){ut(t)&&(yn(t),bn(t))}function $n(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Lt}`)&&t.preventDefault()}function Wo(t){T(t,Lt,Ko),b(t,"input",En,v),b(t,"invalid",$n,!0)}function Xo(t){T(t,Lt,!1),L(t,"input",En,v),L(t,"invalid",$n,!0)}const Tn=g.fieldset.split(" ")[0],qo=g.validation.split(" ")[0];function Go(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(qo)?o=R(i):ut(i)&&n.push(i);for(const i of n)f(i,"aria-describedby",o),f(i,"aria-invalid",`${!!o}`)}}const Qo=t=>T(t,Tn,Go),Jo=t=>T(t,Tn,!1),wn=g.app.split(" ")[0],Zo=`.${wn} > header + :not(main) > button:empty:first-child`,ti="mtds-app-menu",Sn=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(Zo));if(!e)return;const n=e.closest(`.${wn} > *`),o=`${n&&f(n,"data-expanded")==="false"}`,i=()=>n&&f(n,"data-expanded",o);ei(ti,o),document.startViewTransition?document.startViewTransition(()=>i()):i()};function ei(t,e){try{if(e)window.localStorage.setItem(t,e);else return window.localStorage.getItem(t)}catch{return null}}function ni(t){b(t,"click",Sn,v)}function oi(t){L(t,"click",Sn,v)}const At=g.logo.split(" ")[0];let kt;function In(t){var s,a;const e=(s=t[0])==null?void 0:s.firstElementChild;if(!e)return;if(!kt){const u=document.head.getElementsByTagName("link[rel~='icon']"),l=document.createElement("link");for(const c of u)c.remove();kt=document.head.appendChild(Object.assign(l,{rel:"icon"}))}const n=(a=e.parentElement)==null?void 0:a.hasAttribute("data-color"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("background-color");kt.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`))}</g></svg>`}P&&setTimeout(()=>In(document.getElementsByClassName(At)),300);const ii=t=>T(t,At,In),si=t=>T(t,At,!1),Cn=g.popover.split(" ")[0];function ri(t){b(t,"toggle",xn,v),b(t,"click",Ln)}function ai(t){L(t,"toggle",xn,v),L(t,"click",Ln)}function xn({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Cn)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?z(t,!1):o&&z(t,o,f(t,"data-position")||"bottom")}}function Ln({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),r=((o=i.getElementById)==null?void 0:o.call(i,f(e,"popovertarget")||""))||e.closest(`.${Cn}`),s=f(e,"popovertargetaction")||"toggle";r==null||r.togglePopover(s==="show"||(s==="hide"?!1:void 0))}}const An=g.table.split(" ")[0];function li(t){for(const e of t){const n=[];f(e,"role","table"),e.caption&&f(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){f(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const r of o.rows){f(r,"role","row");for(const s of r.cells)i?f(s,"data-th",n[s.cellIndex]||":empty"):n.push(s.innerText.trim()),s.nodeName==="TD"?f(s,"role","cell"):(f(s,"role",i?"rowheader":"columnheader"),f(s,"scope",i?"row":"col"))}}}}const ui=t=>T(t,An,li),ci=t=>T(t,An,!1);if(P){const t=document.readyState==="loading",e=()=>kn(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function kn(t){qn(t),Wo(t),Qo(t),ni(t),ii(t),ri(t),ui(t)}function di(t){Gn(t),Xo(t),Jo(t),oi(t),si(t),ai(t),ci(t)}return x.observe=kn,x.pagination=Pn,x.styles=Mn,x.unobserve=di,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({});
7
+ ::slotted(data:focus)::after { ${sn} }`))}static get observedAttributes(){return ot(gn)}connectedCallback(){this._root=nt(this),V&&!V.isConnected&&document.body.append(V),et(this,{childList:!0}),B(this._root,"click",this),B(this,bn,this),setTimeout(()=>st(this))}attributeChangedCallback(t,e,n){ot(this._texts,t,n)}disconnectedCallback(){et(this,!1),q(this._root||this,"click",this),q(this,bn,this),this._root=null}handleEvent(t){t.defaultPrevented||(t.type==="click"&&qo(this,t),t.type==="focusin"&&No(this,t),t.type==="focusout"&&Bo(this),t.type==="input"&&Fo(this,t),t.type==="keydown"&&Uo(this,t),t.type==="mutation"&&st(this,t))}get items(){return this.querySelectorAll("data")}get control(){return this.querySelector("input")}},xt=(t,e)=>t.dispatchEvent(new CustomEvent("tags",{bubbles:!0,cancelable:!0,detail:{item:e,action:e.isConnected?"remove":"add"}})),st=(t,e)=>{var n,o,i,r,s;const a=t._texts,c=Number.isNaN(t._focusIndex)?null:e==null?void 0:e.detail[0],l=(c==null?void 0:c.addedNodes[0])||(c==null?void 0:c.removedNodes[0]),u=`${l?`${l.isConnected?a.added:a.removed} ${l.textContent}, `:""}`,h=((i=(o=(n=t.control)==null?void 0:n.labels)==null?void 0:o[0])==null?void 0:i.textContent)||"",m=[];d(t,"role","group"),d(t,"aria-label",h),t.items.forEach((_,z,{length:Y})=>{var at;const lt=`${u}${_.textContent}, ${a.remove}, ${z+1} ${a.of} ${Y}`;d(_,"aria-label",lt),d(_,"role","button"),_.tabIndex=-1,_.value=_.value||((at=_.textContent)==null?void 0:at.trim())||"",m.push(_.value)});const S=t.control,Ot=`${u}${h}, ${m.length?a.found.replace("%d",`${m.length}`):a.empty}`,D=S&&document.getElementById(d(S,"list")||""),rt=D==null?void 0:D.children;S&&d(S,"aria-label",Ot),D&&d(D,yt,"true");for(const _ of rt||[])_.selected=m.includes(Ct(_));if(u){const _=t.items[(t._focusIndex||1)-1]||S,z=_===((r=nt(t))==null?void 0:r.activeElement),Y=rt||t.items;t._blurAnnounceReset=!1,_===S?(z&&(Ro&&V?V.textContent=u:(s=Y[0])==null||s.focus()),setTimeout(()=>_==null?void 0:_.focus(),100)):_==null||_.focus(),setTimeout(()=>{if(!Ho)return st(t);t._blurAnnounceReset=!0},500)}},No=(t,{target:e})=>{clearTimeout(t._blurTimer),t._focusIndex=[...t.items].indexOf(e)},Bo=t=>{t._blurAnnounceReset&&st(t),t._blurTimer=setTimeout(()=>{t._focusIndex=null})},qo=(t,{target:e,clientX:n,clientY:o})=>{var i;const r=t.contains(e)?[...t.items]:null,s=r==null?void 0:r.find(c=>c.contains(e)),a=r==null?void 0:r.find(c=>{const{top:l,right:u,bottom:h,left:m}=c.getBoundingClientRect();return o>=l&&o<=h&&n>=m&&n<=u});s?xt(t,s)&&s.remove():a?a.focus():e===t&&((i=t.control)==null||i.focus())},Fo=(t,e)=>{var n;const o=e.target;if(!vn(e)||!(o!=null&&o.value.trim()))return;const i=Ct(o),r=[...t.items],a=[...((n=o==null?void 0:o.list)==null?void 0:n.children)||[]].find(u=>Ct(u)===i),c=r.find(u=>u.value===i),l=O("data",(a==null?void 0:a.text)||i,{value:i});if(o.value="",!!xt(t,c||l)){if(c)return c.remove();if(!r[0])return t.prepend(l);r[r.length-1].insertAdjacentElement("afterend",l)}},Uo=(t,e)=>{var n,o;const{key:i,repeat:r,target:s}=e,a=t.control===s?t.control:null,c=a==null?void 0:a.selectionEnd;let l=a?t.items.length:(n=t._focusIndex)!=null?n:-1;if(!(l===-1||!a&&So(e))){if(i==="ArrowRight"&&!a)l+=1;else if(i==="ArrowLeft"&&!c)l-=1;else{if(i==="Enter"&&a)return e.preventDefault(),a.dispatchEvent(new Event("input",{bubbles:!0}));if((i==="Backspace"||i==="Delete")&&!c){const u=!r&&t.items[l];if(e.preventDefault(),u)return xt(t,u)&&u.remove();a&&(l-=1)}else return}e.preventDefault(),(o=t.items[Math.max(0,l)]||t.control)==null||o.focus()}};Tt.define("u-tags",jo);const Lt=b.field.split(" ")[0],Vo="--mtds-text-count-over",zo="--mtds-text-count-under",yn=b.validation.split(" "),Yo=yn[0];function Ko(t){for(const e of t){const n=[],o=[];let i=null,r=null,s=!0;for(const a of e.getElementsByTagName("*"))a instanceof HTMLLabelElement?n.push(a):a instanceof Ye?r=a:ct(a)?i=a:a.classList.contains(Yo)?(s=f(a,"data-color")==="success",o.unshift(R(a))):a instanceof HTMLParagraphElement&&o.push(R(a));if(i){for(const a of n)a.htmlFor=R(i);Wo(i,r),$n(i),En(i),f(i,"aria-describedby",o.join(" ")),f(i,"aria-invalid",`${!s}`)}}}function En(t){t instanceof HTMLTextAreaElement&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Wo(t,e){if(f(t,"list",e?R(e):null),!e)return;t.hasAttribute("placeholder")||f(t,"placeholder","");const n=window.getComputedStyle(e),o=n.getPropertyValue("--mtds-text-datalist-singular"),i=n.getPropertyValue("--mtds-text-datalist-plural");f(e,"data-sr-plural",i),f(e,"data-sr-singular",o)}function $n(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&f(e,"data-count");if(e&&n){const r=Number(n)-t.value.length,s=r<0,a=f(e,"aria-live")==="polite",c=window.getComputedStyle(e||t),l=((o=c.getPropertyValue(Vo))==null?void 0:o.slice(1,-1))||"",u=((i=c.getPropertyValue(zo))==null?void 0:i.slice(1,-1))||"";if(a!==s){f(e,"aria-live",s?"polite":"off");for(const h of yn)e.classList.toggle(h,s)}e.textContent=(s?l:u).replace("%d",`${Math.abs(r)}`)}}function Tn({target:t}){ct(t)&&($n(t),En(t))}function wn(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${Lt}`)&&t.preventDefault()}function Xo(t){T(t,Lt,Ko),g(t,"input",Tn,v),g(t,"invalid",wn,!0)}function Go(t){T(t,Lt,!1),L(t,"input",Tn,v),L(t,"invalid",wn,!0)}const Sn=b.fieldset.split(" ")[0],Qo=b.validation.split(" ")[0];function Jo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Qo)?o=R(i):ct(i)&&n.push(i);for(const i of n)f(i,"aria-describedby",o),f(i,"aria-invalid",`${!!o}`)}}const Zo=t=>T(t,Sn,Jo),ti=t=>T(t,Sn,!1),In=b.app.split(" ")[0],ei=`.${In} > header + :not(main) > button:empty:first-child`,ni="mtds-app-menu",Cn=({target:t})=>{const e=(t==null?void 0:t.nodeName)==="BUTTON"&&(t==null?void 0:t.closest(ei));if(!e)return;const n=e.closest(`.${In} > *`),o=`${n&&f(n,"data-expanded")==="false"}`,i=()=>n&&f(n,"data-expanded",o);oi(ni,o),document.startViewTransition?document.startViewTransition(()=>i()):i()};function oi(t,e){try{if(e)window.localStorage.setItem(t,e);else return window.localStorage.getItem(t)}catch{return null}}function ii(t){g(t,"click",Cn,v)}function si(t){L(t,"click",Cn,v)}const At=b.logo.split(" ")[0];let kt;function xn(t){var s,a;const e=(s=t[0])==null?void 0:s.firstElementChild;if(!e)return;if(!kt){const c=document.head.getElementsByTagName("link[rel~='icon']"),l=document.createElement("link");for(const u of c)u.remove();kt=document.head.appendChild(Object.assign(l,{rel:"icon"}))}const n=(a=e.parentElement)==null?void 0:a.hasAttribute("data-color"),o=window.getComputedStyle(e),i=o.getPropertyValue("color"),r=o.getPropertyValue("background-color");kt.href=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${n?"none":r}' width='51' height='51' x='2' y='2' stroke='${i}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${encodeURIComponent(e.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${i}"`))}</g></svg>`}P&&setTimeout(()=>xn(document.getElementsByClassName(At)),300);const ri=t=>T(t,At,xn),ai=t=>T(t,At,!1),Ln=b.popover.split(" ")[0];function li(t){g(t,"beforetoggle",An,v),g(t,"click",kn)}function ci(t){L(t,"beforetoggle",An,v),L(t,"click",kn)}function An({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(Ln)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?H(t,!1):o&&H(t,o,f(t,"data-position")||"bottom")}}function kn({target:t}){var n,o;const e=(n=t==null?void 0:t.closest)==null?void 0:n.call(t,"a");if(e){const i=e.getRootNode(),r=((o=i.getElementById)==null?void 0:o.call(i,f(e,"popovertarget")||""))||e.closest(`.${Ln}`),s=f(e,"popovertargetaction")||"toggle";r==null||r.togglePopover(s==="show"||(s==="hide"?!1:void 0))}}const On=b.table.split(" ")[0];function ui(t){for(const e of t){const n=[];f(e,"role","table"),e.caption&&f(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){f(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const r of o.rows){f(r,"role","row");for(const s of r.cells)i?f(s,"data-th",n[s.cellIndex]||":empty"):n.push(s.innerText.trim()),s.nodeName==="TD"?f(s,"role","cell"):(f(s,"role",i?"rowheader":"columnheader"),f(s,"scope",i?"row":"col"))}}}}const di=t=>T(t,On,ui),fi=t=>T(t,On,!1);if(P){const t=document.readyState==="loading",e=()=>Mn(document.body);t?document.addEventListener("DOMContentLoaded",e):e()}function Mn(t){Qn(t),Xo(t),Zo(t),ii(t),ri(t),li(t),di(t)}function pi(t){Jn(t),Go(t),ti(t),si(t),ai(t),ci(t),fi(t)}return x.observe=Mn,x.pagination=Hn,x.styles=Pn,x.unobserve=pi,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x}({});
8
8
  //# sourceMappingURL=index.iife.js.map