@mattilsynet/design 1.0.7 → 1.0.8

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.
@@ -7,6 +7,8 @@ type ButtonBaseProps<Href> = {
7
7
  "data-nowrap"?: boolean;
8
8
  "data-variant"?: "primary" | "secondary" | "tertiary";
9
9
  href?: Href;
10
+ popovertarget?: string;
11
+ popovertargetaction?: string;
10
12
  };
11
13
  export type ButtonProps<Href, As extends React.ElementType = Href extends string ? "a" : "button"> = PolymorphicComponentPropWithRef<As, ButtonBaseProps<Href>>;
12
14
  type ButtonComponent = <Href, As extends React.ElementType = Href extends string ? "a" : "button">(props: ButtonProps<Href, As>) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sources":["../../designsystem/button/button.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype ButtonBaseProps<Href> = {\n\t\"data-arrow\"?: \"left\" | \"right\" | true;\n\t\"data-color\"?: \"main\" | \"danger\";\n\t\"data-justify\"?: \"start\" | \"center\" | \"right\";\n\t\"data-nowrap\"?: boolean;\n\t\"data-variant\"?: \"primary\" | \"secondary\" | \"tertiary\";\n\thref?: Href;\n};\n\nexport type ButtonProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n> = PolymorphicComponentPropWithRef<As, ButtonBaseProps<Href>>;\n\ntype ButtonComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>(\n\tprops: ButtonProps<Href, As>,\n) => JSX.Element;\n\nexport const Button: ButtonComponent = forwardRef<null>(function Button<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>({ as, className, ...rest }: ButtonProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"button\");\n\n\treturn <Tag className={clsx(styles.button, className)} ref={ref} {...rest} />;\n}) as ButtonComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Button","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AA6Ba,MAAAA,IAA0BC,EAAiB,SAGtD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAA0BC,GAA0B;AAC9E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAE9B,SAAA,gBAAAG,EAACD,GAAI,EAAA,WAAWE,EAAKC,EAAO,QAAQN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC5E,CAAC;"}
1
+ {"version":3,"file":"button.js","sources":["../../designsystem/button/button.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype ButtonBaseProps<Href> = {\n\t\"data-arrow\"?: \"left\" | \"right\" | true;\n\t\"data-color\"?: \"main\" | \"danger\";\n\t\"data-justify\"?: \"start\" | \"center\" | \"right\";\n\t\"data-nowrap\"?: boolean;\n\t\"data-variant\"?: \"primary\" | \"secondary\" | \"tertiary\";\n\thref?: Href;\n\tpopovertarget?: string;\n\tpopovertargetaction?: string;\n};\n\nexport type ButtonProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n> = PolymorphicComponentPropWithRef<As, ButtonBaseProps<Href>>;\n\ntype ButtonComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>(\n\tprops: ButtonProps<Href, As>,\n) => JSX.Element;\n\nexport const Button: ButtonComponent = forwardRef<null>(function Button<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"button\",\n>({ as, className, ...rest }: ButtonProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"button\");\n\n\treturn <Tag className={clsx(styles.button, className)} ref={ref} {...rest} />;\n}) as ButtonComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Button","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles"],"mappings":";;;;AA+Ba,MAAAA,IAA0BC,EAAiB,SAGtD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAK,GAA0BC,GAA0B;AAC9E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAE9B,SAAA,gBAAAG,EAACD,GAAI,EAAA,WAAWE,EAAKC,EAAO,QAAQN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAM,CAAA;AAC5E,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"fieldset-observer.js","sources":["../../designsystem/fieldset/fieldset-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { IS_BROWSER, attr, isInputLike, onMutation, useId } from \"../utils\";\n\nconst CSS_FIELDSET = styles.fieldset.split(\" \")[0];\nconst CSS_VALIDATION = styles.validation.split(\" \")[0];\n\nfunction handleMutation(fieldsets: HTMLCollectionOf<Element>) {\n for (const fieldset of fieldsets) {\n const inputs: HTMLInputElement[] = [];\n let validationId: string | null = null;\n\n for (const el of fieldset.getElementsByTagName(\"*\")) {\n if (el.classList.contains(CSS_VALIDATION)) validationId = useId(el);\n else if (isInputLike(el)) inputs.push(el);\n }\n\n for (const input of inputs) {\n attr(input, \"aria-describedby\", validationId);\n attr(input, \"aria-invalid\", `${!!validationId}`);\n }\n }\n}\n\nif (IS_BROWSER) {\n onMutation(document.documentElement, CSS_FIELDSET, handleMutation);\n}"],"names":["CSS_FIELDSET","styles","CSS_VALIDATION","handleMutation","fieldsets","fieldset","inputs","validationId","el","useId","isInputLike","input","attr","IS_BROWSER","onMutation"],"mappings":";;AAGA,MAAMA,IAAeC,EAAO,SAAS,MAAM,GAAG,EAAE,CAAC,GAC3CC,IAAiBD,EAAO,WAAW,MAAM,GAAG,EAAE,CAAC;AAErD,SAASE,EAAeC,GAAsC;AAC5D,aAAWC,KAAYD,GAAW;AAChC,UAAME,IAA6B,CAAC;AACpC,QAAIC,IAA8B;AAElC,eAAWC,KAAMH,EAAS,qBAAqB,GAAG;AAChD,MAAIG,EAAG,UAAU,SAASN,CAAc,IAAGK,IAAeE,EAAMD,CAAE,IACzDE,EAAYF,CAAE,KAAGF,EAAO,KAAKE,CAAE;AAG1C,eAAWG,KAASL;AACb,MAAAM,EAAAD,GAAO,oBAAoBJ,CAAY,GAC5CK,EAAKD,GAAO,gBAAgB,GAAG,CAAC,CAACJ,CAAY,EAAE;AAAA,EACjD;AAEJ;AAEIM,KACSC,EAAA,SAAS,iBAAiBd,GAAcG,CAAc;"}
1
+ {"version":3,"file":"fieldset-observer.js","sources":["../../designsystem/fieldset/fieldset-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { IS_BROWSER, attr, isInputLike, onMutation, useId } from \"../utils\";\n\nconst CSS_FIELDSET = styles.fieldset.split(\" \")[0];\nconst CSS_VALIDATION = styles.validation.split(\" \")[0];\n\nfunction handleMutation(fieldsets: HTMLCollectionOf<Element>) {\n for (const fieldset of fieldsets) {\n const inputs: HTMLInputElement[] = [];\n let validationId: string | null = null;\n\n for (const el of fieldset.getElementsByTagName(\"*\")) {\n if (el.classList.contains(CSS_VALIDATION)) validationId = useId(el);\n else if (isInputLike(el)) inputs.push(el);\n }\n\n for (const input of inputs) {\n attr(input, \"aria-describedby\", validationId);\n attr(input, \"aria-invalid\", `${!!validationId}`);\n }\n }\n}\n\nif (IS_BROWSER)\n onMutation(document.documentElement, CSS_FIELDSET, handleMutation);"],"names":["CSS_FIELDSET","styles","CSS_VALIDATION","handleMutation","fieldsets","fieldset","inputs","validationId","el","useId","isInputLike","input","attr","IS_BROWSER","onMutation"],"mappings":";;AAGA,MAAMA,IAAeC,EAAO,SAAS,MAAM,GAAG,EAAE,CAAC,GAC3CC,IAAiBD,EAAO,WAAW,MAAM,GAAG,EAAE,CAAC;AAErD,SAASE,EAAeC,GAAsC;AAC5D,aAAWC,KAAYD,GAAW;AAChC,UAAME,IAA6B,CAAC;AACpC,QAAIC,IAA8B;AAElC,eAAWC,KAAMH,EAAS,qBAAqB,GAAG;AAChD,MAAIG,EAAG,UAAU,SAASN,CAAc,IAAGK,IAAeE,EAAMD,CAAE,IACzDE,EAAYF,CAAE,KAAGF,EAAO,KAAKE,CAAE;AAG1C,eAAWG,KAASL;AACb,MAAAM,EAAAD,GAAO,oBAAoBJ,CAAY,GAC5CK,EAAKD,GAAO,gBAAgB,GAAG,CAAC,CAACJ,CAAY,EAAE;AAAA,EACjD;AAEJ;AAEIM,KACSC,EAAA,SAAS,iBAAiBd,GAAcG,CAAc;"}
@@ -1,4 +1,4 @@
1
- var mtds=function(W){"use strict";const Qn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),s=Math.min(Math.max(t+Math.ceil(o),n),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&s<e&&a.splice(-2,2,0,e),a},Jn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Qn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),Yt="_alert_zm1dk_1 _ds-alert_oaddr_1",Kt="_avatar_zm1dk_1 _ds-avatar_oaddr_1",Wt="_badge_zm1dk_1",qt="_breadcrumbs_zm1dk_1 _ds-breadcrumbs_oaddr_1",Xt="__onInjectCrumb_zm1dk_1",Gt="_button_zm1dk_1 _ds-button_oaddr_1",Qt="_card_zm1dk_1",Jt="_info_zm1dk_1",Zt="_group_zm1dk_1",te="_chip_zm1dk_1 _ds-chip_oaddr_1",ee="_details_zm1dk_1 _ds-details_oaddr_1",ne="_dialog_zm1dk_1 _ds-dialog_oaddr_1",oe="_divider_zm1dk_1",ie="_errorsummary_zm1dk_1 _ds-error-summary_oaddr_1",se="__errorsummary_zm1dk_1",ae="_field_zm1dk_1 _ds-field_oaddr_1",re="_affixes_zm1dk_1 _ds-field-affixes_oaddr_1",le="_fieldset_zm1dk_1 _ds-fieldset_oaddr_1",de="_heading_zm1dk_1 _ds-heading_oaddr_1",ce="_helptext_zm1dk_1 _ds-focus_oaddr_1",ue="_input_zm1dk_1 _ds-input_oaddr_1",fe="_app_zm1dk_1",pe="_grid_zm1dk_1",he="_flex_zm1dk_1",me="_prose_zm1dk_1",_e="_link_zm1dk_1",ve="_logo_zm1dk_1",be="__onInjectLogo_zm1dk_1",ge="_pagination_zm1dk_1 _ds-pagination_oaddr_1",ye="_popover_zm1dk_1",Ee="_skeleton_zm1dk_1 _ds-skeleton_oaddr_1",$e="__skeleton_zm1dk_1",we="_spinner_zm1dk_1",Te="_table_zm1dk_1 _ds-table_oaddr_1",Ie="__onInjectTable_zm1dk_1",ke="__scrollShadow_zm1dk_1",Se="_tabs_zm1dk_1 _ds-tabs_oaddr_1",Ce="_tag_zm1dk_1 _ds-tag_oaddr_1",xe="__tooltip_zm1dk_1",Le="_validation_zm1dk_1 _ds-validation-message_oaddr_1",Ae="_body_zm1dk_127",b={alert:Yt,avatar:Kt,badge:Wt,breadcrumbs:qt,_onInjectCrumb:Xt,button:Gt,card:Qt,info:Jt,group:Zt,chip:te,details:ee,dialog:ne,divider:oe,errorsummary:ie,_errorsummary:se,field:ae,affixes:re,fieldset:le,heading:de,helptext:ce,input:ue,app:fe,grid:pe,flex:he,prose:me,link:_e,logo:ve,_onInjectLogo:be,pagination:ge,popover:ye,skeleton:Ee,_skeleton:$e,spinner:we,table:Te,_onInjectTable:Ie,_scrollShadow:ke,tabs:Se,tag:Ce,_tooltip:xe,validation:Le,body:Ae},Zn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:se,_onInjectCrumb:Xt,_onInjectLogo:be,_onInjectTable:Ie,_scrollShadow:ke,_skeleton:$e,_tooltip:xe,affixes:re,alert:Yt,app:fe,avatar:Kt,badge:Wt,body:Ae,breadcrumbs:qt,button:Gt,card:Qt,chip:te,default:b,details:ee,dialog:ne,divider:oe,errorsummary:ie,field:ae,fieldset:le,flex:he,grid:pe,group:Zt,heading:de,helptext:ce,info:Jt,input:ue,link:_e,logo:ve,pagination:ge,popover:ye,prose:me,skeleton:Ee,spinner:we,table:Te,tabs:Se,tag:Ce,validation:Le},Symbol.toStringTag,{value:"Module"})),g=typeof window<"u"&&typeof document<"u",_={capture:!0,passive:!0};function to(t,e){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function c(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 eo=0;const no=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function N(t){return t.id||(t.id=`${no}${++eo}`),t.id}const oo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},v=(t,...e)=>oo("add",t,e),q=new Map,$=g?document.createElement("div"):null;$&&c($,"style","position:absolute;padding:1px;top:0;left:0px"),g&&v(window,"load,resize,scroll",()=>{for(const[t,e]of q)e()},_);const C={top:0,right:1,bottom:2,left:3};function B(t,e,n){var Gn;if(e===!1||!e.isConnected||!t.isConnected)return q.delete(t);if($!=null&&$.isConnected||document.body.append($||""),!q.has(t)){const Hi=C[n]??C.bottom;return(Gn=q.set(t,()=>B(t,e,Hi)).get(t))==null?void 0:Gn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:s,offsetHeight:a}=e,{width:r,height:d,left:l,top:f}=e.getBoundingClientRect(),h=Math.round(l-(s-r)/2),y=Math.round(f-(a-d)/2),T=h-o>0,jt=s+s+o<window.innerWidth,H=y-i>0,ft=y+a+i<window.innerHeight,m=n===C.bottom&&jt||!T,Y=n===C.bottom&&ft||!H,K=Math.min(Math.max(10,h-(o-s)/2),window.innerWidth-o-10),Vt=Math.min(Math.max(10,y-(i-a)/2),window.innerHeight-i-10),Xn=n===C.top||n===C.bottom;t.style.left=`${Math.round(Xn?K:m?h+s:h-o)}px`,t.style.top=`${Math.round(Xn?Y?y+a:y-i:Vt)}px`,$==null||$.style.setProperty("translate",`${Math.round(window.scrollX+h+s+o+30)} ${Math.round(window.scrollY+y+a+i+30)}px`)}function Oe(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const z=new WeakMap,io=t=>{var n;const e=z.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),z.delete(t);else for(const[,o]of e.collections)o()},Me=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=z.get(t);i||(i={collections:new Map,observer:Oe(()=>io(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),z.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e),i.collections.size||(i.observer.disconnect(),z.delete(t))},pt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),so=b.breadcrumbs.split(" ")[0],De=g&&document.getElementsByClassName(so);function ao(t){if(!(!De||t.animationName!==b._onInjectCrumb))for(const e of De)e.querySelectorAll("li a").forEach((n,o,{length:i})=>{c(n,"aria-current",o===i-1?"page":null)})}g&&v(document,"animationend",to(ao,100),_);function ro(t){var n;if(t.animationName!==b._errorsummary)return;const e=(n=t.target)==null?void 0:n.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}g&&v(document,"animationend",ro,_);const lo=b.dialog.split(" ")[0],co=g?document.getElementsByClassName(lo):[],Pe=t=>{t.stopImmediatePropagation(),t.stopPropagation()},uo=()=>{for(const t of co)t.matches('[open]:not([data-modal="false"]):not(:modal)')&&(t.addEventListener("close",Pe,_),t.close(),t.showModal(),window.requestAnimationFrame(()=>t.removeEventListener("close",Pe,_)))};g&&(v(document,"click",({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&c(n,"data-closedby")==="any"){const{top:i,right:s,bottom:a,left:r}=n.getBoundingClientRect();i<=e&&e<=a&&r<=t&&t<=s||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())},_),Oe(uo).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0}));var fo=Object.defineProperty,Re=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable,He=(t,e,n)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mo=(t,e)=>{for(var n in e||(e={}))po.call(e,n)&&He(t,n,e[n]);if(Re)for(var n of Re(e))ho.call(e,n)&&He(t,n,e[n]);return t},x=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",_o=x&&/android/i.test(navigator.userAgent),ht=x&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ne=x&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Be;x&&/^Mac/i.test(((Be=navigator.userAgentData)==null?void 0:Be.platform)||navigator.platform);var vo=`${_o?"data":"aria"}-labelledby`,ze=`${Ne?"aria":"data"}-multiselectable`,Fe=":host(:not([hidden])) { display: block }",bo="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ue=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 je=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},mt=(t,...e)=>je("add",t,e),_t=(t,...e)=>je("remove",t,e),Ve=(t,e)=>t.attachShadow({mode:"open"}).append(bt("slot"),bt("style",e)),X=new WeakMap,Ye=(t,e)=>{if(e===void 0)return X.get(t);try{X.get(t).disconnect(),X.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),X.set(t,n)}},Ke=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},go=0,vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++go).toString(32)}`),t.id):"",bt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},We={define:(t,e)=>!x||window.customElements.get(t)||window.customElements.define(t,e)},yo=t=>{const e=bt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),e};function qe(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 gt="disabled",F="selected",Eo=class extends Ue{static get observedAttributes(){return[gt,F]}constructor(){super(),Ve(this,`${Fe}:host(:focus){${bo}}:host{ cursor: pointer }`)}connectedCallback(){ht||(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[F]}set defaultSelected(e){this[F]=e}get disabled(){return p(this,gt)!==null}set disabled(e){p(this,gt,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,F)!==null}set selected(e){p(this,F,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)}};We.define("u-option",Eo);var yt=!1,Xe,$o=0,L,wo=Ne&&!ht,Ge="click,focusout,input,keydown,mousedown,mouseup",Qe={singular:"%d hit",plural:"%d hits"},Je=class extends Ue{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=mo({},Qe),Ve(this,`${Fe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...qe(Qe)]}connectedCallback(){this.hidden=!0,this._root=Ke(this),L||(L=yo("assertive")),L.isConnected||document.body.appendChild(L),p(this,"role","listbox"),mt(this._root,"focusin",this),mt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){_t(this._root||this,"focus",this,!0),_t(this._root||this,"focusin",this),Et(this),this._root=null}attributeChangedCallback(e,n,o){var i;qe(this._texts,e,o);const s=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const a of s||[])tn(this,a)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ko(this,e),(n==="focus"||n==="focusin")&&To(this,e),n==="focusout"&&Io(this),n==="keydown"&&So(this,e),(n==="mutation"||n==="input")&&nn(this,e),n==="mouseup"&&(yt=!1),n==="mousedown"&&(yt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},To=(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&&Et(t),t._input=e,p(t,vo,vt((n=t._input.labels)==null?void 0:n[0])),mt(t._root||t,Ge,t),Ye(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),A(t,!0))},Io=t=>{yt||(t._blurTimer=setTimeout(()=>Et(t)))},ko=(t,{target:e})=>{var n,o,i,s,a;const r=p(t,ze)!=="true",d=[...t.options].find(l=>l.contains(e));if(t._input===e)A(t,!0);else if(d&&G(d)){for(const l of t.options)l===d?l.selected=!0:r&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,d.value),r&&((i=t._input)==null||i.focus(),A(t,!1)),(s=t._input)==null||s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(a=t._input)==null||a.dispatchEvent(new Event("change",{bubbles:!0}))}},So=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&A(t,!0);const{key:i}=e,s=(n=t._root)==null?void 0:n.activeElement,a=Ze(t),r=a.indexOf(s);let d=-1;if(i==="ArrowDown"&&(d=(r+1)%a.length),i==="ArrowUp"&&(d=(~r?r:a.length)-1),~r&&((i==="Home"||i==="PageUp")&&(d=0),(i==="End"||i==="PageDown")&&(d=a.length-1),i==="Enter"))return a[r].click(),e.preventDefault();if(a[d])for(const l of a)l.tabIndex=-1;a[d]&&e.preventDefault(),(o=a[d]||t._input)==null||o.focus(),i==="Escape"&&A(t,!1)},A=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&tn(t,t._input,e),e&&nn(t)},Et=t=>{_t(t._root||t,Ge,t),Ye(t,!1),A(t,!1),t._input=null},Ze=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),G=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",tn=(t,e,n=!1)=>{p(e,"popovertarget",vt(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",vt(t)),p(e,"aria-expanded",`${wo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},en=t=>(t==null?void 0:t.toLowerCase().trim())||"",nn=(t,e)=>{var n;const o=en((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const s=t.hidden,a=p(t,ze)!=="true",r=e instanceof InputEvent&&!Lo(e);t.hidden=!0,t._value=o;for(const l of t.options){const f=[l.value,l.label,l.text].map(en);l.hidden=!f.some(h=>h.includes(o)),a&&r&&G(l)&&(l.selected=f.includes(o))}t.hidden=s;const d=Ze(t);clearTimeout(Xe),Xe=setTimeout(()=>{const{length:l}=d.filter(G),f=++$o%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;L&&(L.textContent=`${!l&&t.innerText.trim()||h}${f}`)},1e3),ht&&d.map((l,f,h)=>{l.title=`${f+1}/${h}`})};x&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ke(this).getElementById(p(this,"list")||"")}}),We.define("u-datalist",Je);var Co=" ".repeat(100),xo="insertReplacementText";function Lo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===xo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(s=>s.value===o&&!G(s));t.target.value=o.split(Co)[i?1:0]}return n}const on=b.field.split(" ")[0],Ao="--mtds-text-count-over",Oo="--mtds-text-count-under",sn=b.validation.split(" "),Mo=sn[0];function Do(t){for(const e of t){const n=[],o=[];let i=null,s=null,a=!0;for(const r of e.getElementsByTagName("*"))r instanceof HTMLLabelElement?n.push(r):r instanceof Je?s=r:pt(r)?i=r:r.classList.contains(Mo)?(a=c(r,"data-color")==="success",o.unshift(N(r))):r instanceof HTMLParagraphElement&&o.push(N(r));if(i){for(const r of n)r.htmlFor=N(i);Po(i,s),rn(i),an(i),c(i,"aria-describedby",o.join(" ")),c(i,"aria-invalid",`${!a}`)}}}function an(t){t instanceof HTMLTextAreaElement&&(t.style.setProperty("--mtds-textarea-height","auto"),t.style.setProperty("--mtds-textarea-height",`${t.scrollHeight}px`))}function Po(t,e){if(c(t,"list",e?N(e):null),!e)return;t.hasAttribute("placeholder")||c(t,"placeholder","");const n=window.getComputedStyle(e),o=t.closest("u-tags"),i=s=>n.getPropertyValue(`--mtds-text-${s}`);c(e,"data-sr-plural",i("datalist-plural")),c(e,"data-sr-singular",i("datalist-singular")),o&&(c(o,"data-sr-added",i("tags-added")),c(o,"data-sr-empty",i("tags-empty")),c(o,"data-sr-found",i("tags-found")),c(o,"data-sr-of",i("tags-of")),c(o,"data-sr-remove",i("tags-remove")),c(o,"data-sr-removed",i("tags-removed")))}function rn(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&c(e,"data-count");if(e&&n){const s=Number(n)-t.value.length,a=s<0,r=c(e,"aria-live")==="polite",d=window.getComputedStyle(e||t),l=((o=d.getPropertyValue(Ao))==null?void 0:o.slice(1,-1))||"",f=((i=d.getPropertyValue(Oo))==null?void 0:i.slice(1,-1))||"";if(r!==a){c(e,"aria-live",a?"polite":"off");for(const h of sn)e.classList.toggle(h,a)}e.textContent=(a?l:f).replace("%d",`${Math.abs(s)}`)}}function Ro({target:t}){pt(t)&&(rn(t),an(t))}function Ho(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${on}`)&&t.preventDefault()}g&&(Me(document.documentElement,on,Do),v(document,"input",Ro,_),v(document,"invalid",Ho,!0));const No=b.fieldset.split(" ")[0],Bo=b.validation.split(" ")[0];function zo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Bo)?o=N(i):pt(i)&&n.push(i);for(const i of n)c(i,"aria-describedby",o),c(i,"aria-invalid",`${!!o}`)}}g&&Me(document.documentElement,No,zo);const $t="--mtds-app-expanded",ln="mtds-app-menu",Fo=({target:t})=>{t!=null&&t.closest('[data-command="toggle-app-expanded"]')&&(document.startViewTransition?document.startViewTransition(()=>Tt(!wt())):Tt(!wt()))},wt=()=>{var t;return!((t=document.documentElement.style.getPropertyValue($t))!=null&&t.includes("--false"))},Tt=t=>{document.documentElement.style.setProperty($t,`var(${$t}--${t})`),window.localStorage.setItem(ln,`${t}`)};if(g){const t=window.localStorage.getItem(ln);Tt(t?t==="true":wt()),v(document,"click",Fo,_)}let It;function Uo(t){if(t.animationName!==b._onInjectLogo)return;const e=t.target,n=e==null?void 0:e.firstElementChild;if(!n)return;if(!It){const r=document.head.getElementsByTagName("link[rel~='icon']"),d=document.createElement("link");for(const l of r)l.remove();It=document.head.appendChild(Object.assign(d,{rel:"icon"}))}const o=e==null?void 0:e.hasAttribute("data-env"),i=window.getComputedStyle(n),s=i.getPropertyValue("color"),a=i.getPropertyValue("--mtds-logo-color");It.href=`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":a}' width='51' height='51' x='2' y='2' stroke='${s}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${n.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${s}"`)}</g></svg>`)}`}g&&v(document,"animationend",Uo,_);const dn=b.popover.split(" ")[0];function jo({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(dn)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?B(t,!1):o&&B(t,o,c(t,"data-position")||"bottom")}}function Vo({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(),s=((o=i.getElementById)==null?void 0:o.call(i,c(e,"popovertarget")||""))||e.closest(`.${dn}`),a=c(e,"popovertargetaction")||"toggle";s==null||s.togglePopover(a==="show"||(a==="hide"?!1:void 0))}}g&&(v(document,"beforetoggle",jo,_),v(document,"click",Vo));function Yo(t){if(t.animationName!==b._onInjectTable)return;const e=t.target,n=[];c(e,"role","table"),e.caption&&c(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){c(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const s of o.rows){c(s,"role","row");for(const a of s.cells)i?c(a,"data-th",n[a.cellIndex]||":empty"):n.push(a.innerText.trim()),a.nodeName==="TD"?c(a,"role","cell"):(c(a,"role",i?"rowheader":"columnheader"),c(a,"scope",i?"row":"col"))}}}g&&v(document,"animationend",Yo,_);const cn="aria-describedby",un="Escape",Q="aria-labelledby",Ko="--mtds-tooltip-position",Wo=300,kt="mtds-tooltip";let w=null,fn=Number.NEGATIVE_INFINITY,pn=0,I=null;const qo=()=>Object.assign(document.createElement("div"),{className:b._tooltip,id:kt,popover:"manual"});function St({target:t,type:e,key:n}){if(e==="keydown"&&n!==un)return;const o=fn+Wo-Date.now();clearTimeout(pn),pn=setTimeout(Xo,Math.max(o,0),n===un?null:t)}function Xo(t){var r,d;if(fn=Date.now(),I||(I=document.body.appendChild(qo())),t===I)return;let e=((r=t==null?void 0:t.closest)==null?void 0:r.call(t,"[data-tooltip]"))||null;if(e===w)return;const n=e&&c(e,"data-tooltip")||"",o=e&&c(e,"data-tooltip-position")||((d=window.getComputedStyle(e||document.body).getPropertyValue(Ko))==null?void 0:d.trim())||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(I.textContent=n);const s=w&&c(w,Q)===kt,a=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(Q))||(e==null?void 0:e.hasAttribute("aria-label"));w==null||w.removeAttribute(s?Q:cn),B(I,!1),w=e,w&&c(w,a?cn:Q,kt),I.togglePopover(!!e),B(I,e||!1,o)}v(document,"blur,focus,mouseout,mouseover",St,_),v(window,"keydown",St,_),v(window,"blur",St,_);var hn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",mn;hn&&/^Mac/i.test(((mn=navigator.userAgentData)==null?void 0:mn.platform)||navigator.platform);var Go=":host(:not([hidden])) { display: block }",_n=typeof HTMLElement>"u"?class{}:HTMLElement;function k(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 vn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},bn=(t,...e)=>vn("add",t,e),gn=(t,...e)=>vn("remove",t,e),Qo=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Jo=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},Ct=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,s]of Object.entries(n))k(o,i,s);return o},yn={define:(t,e)=>!hn||window.customElements.get(t)||window.customElements.define(t,e)},Zo=class extends _n{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(Ct("slot",null,{name:"summary"}),Ct("slot",null,{part:"details-content"}),Ct("style",`${Go}
1
+ var mtds=function(W){"use strict";const Qn=(t,e,n)=>{const o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),s=Math.min(Math.max(t+Math.ceil(o),n),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&s<e&&a.splice(-2,2,0,e),a},Jn=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Qn(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))}),Yt="_alert_zm1dk_1 _ds-alert_oaddr_1",Kt="_avatar_zm1dk_1 _ds-avatar_oaddr_1",Wt="_badge_zm1dk_1",qt="_breadcrumbs_zm1dk_1 _ds-breadcrumbs_oaddr_1",Xt="__onInjectCrumb_zm1dk_1",Gt="_button_zm1dk_1 _ds-button_oaddr_1",Qt="_card_zm1dk_1",Jt="_info_zm1dk_1",Zt="_group_zm1dk_1",te="_chip_zm1dk_1 _ds-chip_oaddr_1",ee="_details_zm1dk_1 _ds-details_oaddr_1",ne="_dialog_zm1dk_1 _ds-dialog_oaddr_1",oe="_divider_zm1dk_1",ie="_errorsummary_zm1dk_1 _ds-error-summary_oaddr_1",se="__errorsummary_zm1dk_1",ae="_field_zm1dk_1 _ds-field_oaddr_1",re="_affixes_zm1dk_1 _ds-field-affixes_oaddr_1",le="_fieldset_zm1dk_1 _ds-fieldset_oaddr_1",de="_heading_zm1dk_1 _ds-heading_oaddr_1",ce="_helptext_zm1dk_1 _ds-focus_oaddr_1",ue="_input_zm1dk_1 _ds-input_oaddr_1",fe="_app_zm1dk_1",pe="_grid_zm1dk_1",he="_flex_zm1dk_1",me="_prose_zm1dk_1",_e="_link_zm1dk_1",ve="_logo_zm1dk_1",be="__onInjectLogo_zm1dk_1",ge="_pagination_zm1dk_1 _ds-pagination_oaddr_1",ye="_popover_zm1dk_1",Ee="_skeleton_zm1dk_1 _ds-skeleton_oaddr_1",$e="__skeleton_zm1dk_1",we="_spinner_zm1dk_1",Te="_table_zm1dk_1 _ds-table_oaddr_1",Ie="__onInjectTable_zm1dk_1",ke="__scrollShadow_zm1dk_1",Se="_tabs_zm1dk_1 _ds-tabs_oaddr_1",Ce="_tag_zm1dk_1 _ds-tag_oaddr_1",xe="__tooltip_zm1dk_1",Le="_validation_zm1dk_1 _ds-validation-message_oaddr_1",Ae="_body_zm1dk_127",g={alert:Yt,avatar:Kt,badge:Wt,breadcrumbs:qt,_onInjectCrumb:Xt,button:Gt,card:Qt,info:Jt,group:Zt,chip:te,details:ee,dialog:ne,divider:oe,errorsummary:ie,_errorsummary:se,field:ae,affixes:re,fieldset:le,heading:de,helptext:ce,input:ue,app:fe,grid:pe,flex:he,prose:me,link:_e,logo:ve,_onInjectLogo:be,pagination:ge,popover:ye,skeleton:Ee,_skeleton:$e,spinner:we,table:Te,_onInjectTable:Ie,_scrollShadow:ke,tabs:Se,tag:Ce,_tooltip:xe,validation:Le,body:Ae},Zn=Object.freeze(Object.defineProperty({__proto__:null,_errorsummary:se,_onInjectCrumb:Xt,_onInjectLogo:be,_onInjectTable:Ie,_scrollShadow:ke,_skeleton:$e,_tooltip:xe,affixes:re,alert:Yt,app:fe,avatar:Kt,badge:Wt,body:Ae,breadcrumbs:qt,button:Gt,card:Qt,chip:te,default:g,details:ee,dialog:ne,divider:oe,errorsummary:ie,field:ae,fieldset:le,flex:he,grid:pe,group:Zt,heading:de,helptext:ce,info:Jt,input:ue,link:_e,logo:ve,pagination:ge,popover:ye,prose:me,skeleton:Ee,spinner:we,table:Te,tabs:Se,tag:Ce,validation:Le},Symbol.toStringTag,{value:"Module"})),_=typeof window<"u"&&typeof document<"u",v={capture:!0,passive:!0};function to(t,e){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function c(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 eo=0;const no=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function N(t){return t.id||(t.id=`${no}${++eo}`),t.id}const oo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},b=(t,...e)=>oo("add",t,e),q=new Map,$=_?document.createElement("div"):null;$&&c($,"style","position:absolute;padding:1px;top:0;left:0px"),_&&b(window,"load,resize,scroll",()=>{for(const[t,e]of q)e()},v);const C={top:0,right:1,bottom:2,left:3};function B(t,e,n){var Gn;if(e===!1||!e.isConnected||!t.isConnected)return q.delete(t);if($!=null&&$.isConnected||document.body.append($||""),!q.has(t)){const Hi=C[n]??C.bottom;return(Gn=q.set(t,()=>B(t,e,Hi)).get(t))==null?void 0:Gn()}const{offsetWidth:o,offsetHeight:i}=t,{offsetWidth:s,offsetHeight:a}=e,{width:r,height:d,left:l,top:f}=e.getBoundingClientRect(),h=Math.round(l-(s-r)/2),y=Math.round(f-(a-d)/2),T=h-o>0,jt=s+s+o<window.innerWidth,H=y-i>0,ft=y+a+i<window.innerHeight,m=n===C.bottom&&jt||!T,Y=n===C.bottom&&ft||!H,K=Math.min(Math.max(10,h-(o-s)/2),window.innerWidth-o-10),Vt=Math.min(Math.max(10,y-(i-a)/2),window.innerHeight-i-10),Xn=n===C.top||n===C.bottom;t.style.left=`${Math.round(Xn?K:m?h+s:h-o)}px`,t.style.top=`${Math.round(Xn?Y?y+a:y-i:Vt)}px`,$==null||$.style.setProperty("translate",`${Math.round(window.scrollX+h+s+o+30)} ${Math.round(window.scrollY+y+a+i+30)}px`)}function Oe(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const z=new WeakMap,io=t=>{var n;const e=z.get(t);if(!e||!t.isConnected)(n=e==null?void 0:e.observer)==null||n.disconnect(),z.delete(t);else for(const[,o]of e.collections)o()},Me=(t,e,n)=>{const o=t.getElementsByClassName(e);let i=z.get(t);i||(i={collections:new Map,observer:Oe(()=>io(t))},i.observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),z.set(t,i)),n?i.collections.set(e,()=>n(o)):i.collections.delete(e),i.collections.size||(i.observer.disconnect(),z.delete(t))},pt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),so=g.breadcrumbs.split(" ")[0],De=_&&document.getElementsByClassName(so);function ao(t){if(!(!De||t.animationName!==g._onInjectCrumb))for(const e of De)e.querySelectorAll("li a").forEach((n,o,{length:i})=>{c(n,"aria-current",o===i-1?"page":null)})}_&&b(document,"animationend",to(ao,100),v);function ro(t){var n;if(t.animationName!==g._errorsummary)return;const e=(n=t.target)==null?void 0:n.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}_&&b(document,"animationend",ro,v);const lo=g.dialog.split(" ")[0],co=_?document.getElementsByClassName(lo):[],Pe=t=>{t.stopImmediatePropagation(),t.stopPropagation()},uo=()=>{for(const t of co)t.matches('[open]:not([data-modal="false"]):not(:modal)')&&(t.addEventListener("close",Pe,v),t.close(),t.showModal(),window.requestAnimationFrame(()=>t.removeEventListener("close",Pe,v)))};_&&(b(document,"click",({clientX:t,clientY:e,target:n})=>{var o;if(n instanceof HTMLDialogElement&&c(n,"data-closedby")==="any"){const{top:i,right:s,bottom:a,left:r}=n.getBoundingClientRect();i<=e&&e<=a&&r<=t&&t<=s||n.close()}else n instanceof Element&&n.closest('button[data-command="close"]')&&((o=n==null?void 0:n.closest("dialog"))==null||o.close())},v),Oe(uo).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0}));var fo=Object.defineProperty,Re=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable,He=(t,e,n)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mo=(t,e)=>{for(var n in e||(e={}))po.call(e,n)&&He(t,n,e[n]);if(Re)for(var n of Re(e))ho.call(e,n)&&He(t,n,e[n]);return t},x=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",_o=x&&/android/i.test(navigator.userAgent),ht=x&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ne=x&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Be;x&&/^Mac/i.test(((Be=navigator.userAgentData)==null?void 0:Be.platform)||navigator.platform);var vo=`${_o?"data":"aria"}-labelledby`,ze=`${Ne?"aria":"data"}-multiselectable`,Fe=":host(:not([hidden])) { display: block }",bo="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ue=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 je=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},mt=(t,...e)=>je("add",t,e),_t=(t,...e)=>je("remove",t,e),Ve=(t,e)=>t.attachShadow({mode:"open"}).append(bt("slot"),bt("style",e)),X=new WeakMap,Ye=(t,e)=>{if(e===void 0)return X.get(t);try{X.get(t).disconnect(),X.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),X.set(t,n)}},Ke=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},go=0,vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++go).toString(32)}`),t.id):"",bt=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},We={define:(t,e)=>!x||window.customElements.get(t)||window.customElements.define(t,e)},yo=t=>{const e=bt("div");return e.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(e,"aria-live",t),e};function qe(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 gt="disabled",F="selected",Eo=class extends Ue{static get observedAttributes(){return[gt,F]}constructor(){super(),Ve(this,`${Fe}:host(:focus){${bo}}:host{ cursor: pointer }`)}connectedCallback(){ht||(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[F]}set defaultSelected(e){this[F]=e}get disabled(){return p(this,gt)!==null}set disabled(e){p(this,gt,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,F)!==null}set selected(e){p(this,F,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)}};We.define("u-option",Eo);var yt=!1,Xe,$o=0,L,wo=Ne&&!ht,Ge="click,focusout,input,keydown,mousedown,mouseup",Qe={singular:"%d hit",plural:"%d hits"},Je=class extends Ue{constructor(){super(),this._blurTimer=0,this._input=null,this._root=null,this._value="",this._texts=mo({},Qe),Ve(this,`${Fe}::slotted(u-option[disabled]) { display: none !important }`)}static get observedAttributes(){return["id",...qe(Qe)]}connectedCallback(){this.hidden=!0,this._root=Ke(this),L||(L=yo("assertive")),L.isConnected||document.body.appendChild(L),p(this,"role","listbox"),mt(this._root,"focusin",this),mt(this._root,"focus",this,!0),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){_t(this._root||this,"focus",this,!0),_t(this._root||this,"focusin",this),Et(this),this._root=null}attributeChangedCallback(e,n,o){var i;qe(this._texts,e,o);const s=(i=this._root)==null?void 0:i.querySelectorAll(`input[list="${this.id}"]`);for(const a of s||[])tn(this,a)}handleEvent(e){const{type:n}=e;e.defaultPrevented||(n==="click"&&ko(this,e),(n==="focus"||n==="focusin")&&To(this,e),n==="focusout"&&Io(this),n==="keydown"&&So(this,e),(n==="mutation"||n==="input")&&nn(this,e),n==="mouseup"&&(yt=!1),n==="mousedown"&&(yt=this.contains(e.target)))}get options(){return this.getElementsByTagName("u-option")}},To=(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&&Et(t),t._input=e,p(t,vo,vt((n=t._input.labels)==null?void 0:n[0])),mt(t._root||t,Ge,t),Ye(t,{attributeFilter:["value"],attributes:!0,childList:!0,subtree:!0}),A(t,!0))},Io=t=>{yt||(t._blurTimer=setTimeout(()=>Et(t)))},ko=(t,{target:e})=>{var n,o,i,s,a;const r=p(t,ze)!=="true",d=[...t.options].find(l=>l.contains(e));if(t._input===e)A(t,!0);else if(d&&G(d)){for(const l of t.options)l===d?l.selected=!0:r&&(l.selected=!1);(o=(n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:n.set)==null||o.call(t._input,d.value),r&&((i=t._input)==null||i.focus(),A(t,!1)),(s=t._input)==null||s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),(a=t._input)==null||a.dispatchEvent(new Event("change",{bubbles:!0}))}},So=(t,e)=>{var n,o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;e.key!=="Escape"&&A(t,!0);const{key:i}=e,s=(n=t._root)==null?void 0:n.activeElement,a=Ze(t),r=a.indexOf(s);let d=-1;if(i==="ArrowDown"&&(d=(r+1)%a.length),i==="ArrowUp"&&(d=(~r?r:a.length)-1),~r&&((i==="Home"||i==="PageUp")&&(d=0),(i==="End"||i==="PageDown")&&(d=a.length-1),i==="Enter"))return a[r].click(),e.preventDefault();if(a[d])for(const l of a)l.tabIndex=-1;a[d]&&e.preventDefault(),(o=a[d]||t._input)==null||o.focus(),i==="Escape"&&A(t,!1)},A=(t,e)=>{t.hidden=!e,t.popover&&t.togglePopover(e),t._input&&tn(t,t._input,e),e&&nn(t)},Et=t=>{_t(t._root||t,Ge,t),Ye(t,!1),A(t,!1),t._input=null},Ze=t=>[...t.options].filter(e=>!e.disabled&&e.offsetWidth&&e.offsetHeight),G=t=>t instanceof HTMLOptionElement||t.getAttribute("role")==="option",tn=(t,e,n=!1)=>{p(e,"popovertarget",vt(t)),p(e,"aria-autocomplete","list"),p(e,"aria-controls",vt(t)),p(e,"aria-expanded",`${wo||n}`),p(e,"autocomplete","off"),p(e,"role","combobox")},en=t=>(t==null?void 0:t.toLowerCase().trim())||"",nn=(t,e)=>{var n;const o=en((n=t._input)==null?void 0:n.value);if(!((e==null?void 0:e.type)==="mutation"||t._value!==o))return;const s=t.hidden,a=p(t,ze)!=="true",r=e instanceof InputEvent&&!Lo(e);t.hidden=!0,t._value=o;for(const l of t.options){const f=[l.value,l.label,l.text].map(en);l.hidden=!f.some(h=>h.includes(o)),a&&r&&G(l)&&(l.selected=f.includes(o))}t.hidden=s;const d=Ze(t);clearTimeout(Xe),Xe=setTimeout(()=>{const{length:l}=d.filter(G),f=++$o%2?" ":"",h=`${`${t._texts[l===1?"singular":"plural"]}`.replace("%d",`${l}`)}`;L&&(L.textContent=`${!l&&t.innerText.trim()||h}${f}`)},1e3),ht&&d.map((l,f,h)=>{l.title=`${f+1}/${h}`})};x&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ke(this).getElementById(p(this,"list")||"")}}),We.define("u-datalist",Je);var Co=" ".repeat(100),xo="insertReplacementText";function Lo(t){var e;const n=t instanceof Event&&t.type==="input"&&t.target instanceof HTMLInputElement&&(!t.inputType||t.inputType===xo);if(n){const o=t.target.value,i=Array.from(((e=t.target.list)==null?void 0:e.options)||[]).some(s=>s.value===o&&!G(s));t.target.value=o.split(Co)[i?1:0]}return n}const on=g.field.split(" ")[0],Ao="--mtds-text-count-over",Oo="--mtds-text-count-under",sn=g.validation.split(" "),Mo=sn[0];function Do(t){for(const e of t){const n=[],o=[];let i=null,s=null,a=!0;for(const r of e.getElementsByTagName("*"))r instanceof HTMLLabelElement?n.push(r):r instanceof Je?s=r:pt(r)?i=r:r.classList.contains(Mo)?(a=c(r,"data-color")==="success",o.unshift(N(r))):r instanceof HTMLParagraphElement&&o.push(N(r));if(i){for(const r of n)r.htmlFor=N(i);Po(i,s),rn(i),an(i),c(i,"aria-describedby",o.join(" ")),c(i,"aria-invalid",`${!a}`)}}}function an(t){t instanceof HTMLTextAreaElement&&(t.style.setProperty("--mtds-textarea-height","auto"),t.style.setProperty("--mtds-textarea-height",`${t.scrollHeight}px`))}function Po(t,e){if(c(t,"list",e?N(e):null),!e)return;t.hasAttribute("placeholder")||c(t,"placeholder","");const n=window.getComputedStyle(e),o=t.closest("u-tags"),i=s=>n.getPropertyValue(`--mtds-text-${s}`);c(e,"data-sr-plural",i("datalist-plural")),c(e,"data-sr-singular",i("datalist-singular")),o&&(c(o,"data-sr-added",i("tags-added")),c(o,"data-sr-empty",i("tags-empty")),c(o,"data-sr-found",i("tags-found")),c(o,"data-sr-of",i("tags-of")),c(o,"data-sr-remove",i("tags-remove")),c(o,"data-sr-removed",i("tags-removed")))}function rn(t){var o,i;const e=t==null?void 0:t.nextElementSibling,n=e&&c(e,"data-count");if(e&&n){const s=Number(n)-t.value.length,a=s<0,r=c(e,"aria-live")==="polite",d=window.getComputedStyle(e||t),l=((o=d.getPropertyValue(Ao))==null?void 0:o.slice(1,-1))||"",f=((i=d.getPropertyValue(Oo))==null?void 0:i.slice(1,-1))||"";if(r!==a){c(e,"aria-live",a?"polite":"off");for(const h of sn)e.classList.toggle(h,a)}e.textContent=(a?l:f).replace("%d",`${Math.abs(s)}`)}}function Ro({target:t}){pt(t)&&(rn(t),an(t))}function Ho(t){var e,n;(n=(e=t.target)==null?void 0:e.closest)!=null&&n.call(e,`.${on}`)&&t.preventDefault()}_&&(Me(document.documentElement,on,Do),b(document,"input",Ro,v),b(document,"invalid",Ho,!0));const No=g.fieldset.split(" ")[0],Bo=g.validation.split(" ")[0];function zo(t){for(const e of t){const n=[];let o=null;for(const i of e.getElementsByTagName("*"))i.classList.contains(Bo)?o=N(i):pt(i)&&n.push(i);for(const i of n)c(i,"aria-describedby",o),c(i,"aria-invalid",`${!!o}`)}}_&&Me(document.documentElement,No,zo);const $t="--mtds-app-expanded",ln="mtds-app-menu",Fo=({target:t})=>{t!=null&&t.closest('[data-command="toggle-app-expanded"]')&&(document.startViewTransition?document.startViewTransition(()=>Tt(!wt())):Tt(!wt()))},wt=()=>{var t;return!((t=document.documentElement.style.getPropertyValue($t))!=null&&t.includes("--false"))},Tt=t=>{document.documentElement.style.setProperty($t,`var(${$t}--${t})`),window.localStorage.setItem(ln,`${t}`)};if(_){const t=window.localStorage.getItem(ln);Tt(t?t==="true":wt()),b(document,"click",Fo,v)}let It;function Uo(t){if(t.animationName!==g._onInjectLogo)return;const e=t.target,n=e==null?void 0:e.firstElementChild;if(!n)return;if(!It){const r=document.head.getElementsByTagName("link[rel~='icon']"),d=document.createElement("link");for(const l of r)l.remove();It=document.head.appendChild(Object.assign(d,{rel:"icon"}))}const o=e==null?void 0:e.hasAttribute("data-env"),i=window.getComputedStyle(n),s=i.getPropertyValue("color"),a=i.getPropertyValue("--mtds-logo-color");It.href=`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":a}' width='51' height='51' x='2' y='2' stroke='${s}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${n.outerHTML.replace(/(fill|width|height|xmlns)=\S+/gi,"").replace("<svg",`<svg width="40" height="40" fill="${s}"`)}</g></svg>`)}`}_&&b(document,"animationend",Uo,v);const dn=g.popover.split(" ")[0];function jo({target:t,newState:e}){var n;if(t instanceof HTMLElement&&t.classList.contains(dn)){const o=(n=t.getRootNode())==null?void 0:n.querySelector(`[popovertarget="${t.id}"]`);e==="closed"?B(t,!1):o&&B(t,o,c(t,"data-position")||"bottom")}}function Vo({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(),s=((o=i.getElementById)==null?void 0:o.call(i,c(e,"popovertarget")||""))||e.closest(`.${dn}`),a=c(e,"popovertargetaction")||"toggle";s==null||s.togglePopover(a==="show"||(a==="hide"?!1:void 0))}}_&&(b(document,"beforetoggle",jo,v),b(document,"click",Vo));function Yo(t){if(t.animationName!==g._onInjectTable)return;const e=t.target,n=[];c(e,"role","table"),e.caption&&c(e.caption,"role","caption");for(const o of[e.tHead,e.tFoot,...e.tBodies])if(o){c(o,"role","rowgroup");const i=o.nodeName==="TBODY";for(const s of o.rows){c(s,"role","row");for(const a of s.cells)i?c(a,"data-th",n[a.cellIndex]||":empty"):n.push(a.innerText.trim()),a.nodeName==="TD"?c(a,"role","cell"):(c(a,"role",i?"rowheader":"columnheader"),c(a,"scope",i?"row":"col"))}}}_&&b(document,"animationend",Yo,v);const cn="aria-describedby",un="Escape",Q="aria-labelledby",Ko="--mtds-tooltip-position",Wo=300,kt="mtds-tooltip";let w=null,fn=Number.NEGATIVE_INFINITY,pn=0,I=null;const qo=()=>Object.assign(document.createElement("div"),{className:g._tooltip,id:kt,popover:"manual"});function St({target:t,type:e,key:n}){if(e==="keydown"&&n!==un)return;const o=fn+Wo-Date.now();clearTimeout(pn),pn=setTimeout(Xo,Math.max(o,0),n===un?null:t)}function Xo(t){var r,d;if(fn=Date.now(),I||(I=document.body.appendChild(qo())),t===I)return;let e=((r=t==null?void 0:t.closest)==null?void 0:r.call(t,"[data-tooltip]"))||null;if(e===w)return;const n=e&&c(e,"data-tooltip")||"",o=e&&c(e,"data-tooltip-position")||((d=window.getComputedStyle(e||document.body).getPropertyValue(Ko))==null?void 0:d.trim())||"top";(!n||n==="false"||n==="true"||o==="none")&&(e=null),e&&(I.textContent=n);const s=w&&c(w,Q)===kt,a=!!(e!=null&&e.innerText.trim())||(e==null?void 0:e.hasAttribute(Q))||(e==null?void 0:e.hasAttribute("aria-label"));w==null||w.removeAttribute(s?Q:cn),B(I,!1),w=e,w&&c(w,a?cn:Q,kt),I.togglePopover(!!e),B(I,e||!1,o)}_&&(b(document,"blur,focus,mouseout,mouseover",St,v),b(window,"keydown",St,v),b(window,"blur",St,v));var hn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",mn;hn&&/^Mac/i.test(((mn=navigator.userAgentData)==null?void 0:mn.platform)||navigator.platform);var Go=":host(:not([hidden])) { display: block }",_n=typeof HTMLElement>"u"?class{}:HTMLElement;function k(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 vn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},bn=(t,...e)=>vn("add",t,e),gn=(t,...e)=>vn("remove",t,e),Qo=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},Jo=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},Ct=(t,e,n)=>{const o=document.createElement(t);if(e&&(o.textContent=e),n)for(const[i,s]of Object.entries(n))k(o,i,s);return o},yn={define:(t,e)=>!hn||window.customElements.get(t)||window.customElements.define(t,e)},Zo=class extends _n{constructor(){super(),this._content=null,this.attachShadow({mode:"open"}).append(Ct("slot",null,{name:"summary"}),Ct("slot",null,{part:"details-content"}),Ct("style",`${Go}
2
2
  ::slotted(u-summary) { cursor: pointer; display: block }
3
3
  ::slotted(u-summary)::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
4
4
  ::slotted(u-summary[aria-expanded="true"])::before { rotate: 90deg }