@mattilsynet/design 3.1.4 → 3.1.6

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.
@@ -1,4 +1,4 @@
1
- var mtds=(function(S){"use strict";var wa=Object.defineProperty,Qn=Object.getOwnPropertySymbols,ya=Object.prototype.hasOwnProperty,xa=Object.prototype.propertyIsEnumerable,_n=(t,e,n)=>e in t?wa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ea=(t,e)=>{for(var n in e||(e={}))ya.call(e,n)&&_n(t,n,e[n]);if(Qn)for(var n of Qn(e))xa.call(e,n)&&_n(t,n,e[n]);return t},Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Sa=Yt&&/android/i.test(navigator.userAgent),$n=Yt&&/iPad|iPhone|iPod/.test(navigator.userAgent),to;Yt&&/^Mac/i.test(((to=navigator.userAgentData)==null?void 0:to.platform)||navigator.platform);var ka="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ta=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var eo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qt=(t,...e)=>eo("add",t,e),Aa=(t,...e)=>eo("remove",t,e),_t=new WeakMap,Ue=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),_t.set(t,n)}},La=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},no=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},Ca=0,oo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Ca).toString(32)}`),t.id):"",St=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))T(o,i,r);return o},Oa={define:(t,e)=>!Yt||window.customElements.get(t)||window.customElements.define(t,e)},Ma=t=>{var e;const n=T(t,"aria-label")||"";return[...(((e=T(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},at,Ia=0,De=t=>{at||(at=St("div"),at.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(at,"aria-live","assertive")),at.isConnected||document.body.append(at),t&&(at.textContent=`${t}${Ia++%2?" ":""}`)},io=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},ze=!1,Fe=t=>(t?.type==="mouseup"&&(ze=!1),t?.type==="mousedown"&&(ze=!0,Qt(document,"mouseup",Fe,{once:!0})),ze),Na=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Be=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
1
+ var mtds=(function(S){"use strict";var ya=Object.defineProperty,_n=Object.getOwnPropertySymbols,xa=Object.prototype.hasOwnProperty,Ea=Object.prototype.propertyIsEnumerable,$n=(t,e,n)=>e in t?ya(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sa=(t,e)=>{for(var n in e||(e={}))xa.call(e,n)&&$n(t,n,e[n]);if(_n)for(var n of _n(e))Ea.call(e,n)&&$n(t,n,e[n]);return t},Yt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ka=Yt&&/android/i.test(navigator.userAgent),to=Yt&&/iPad|iPhone|iPod/.test(navigator.userAgent),eo;Yt&&/^Mac/i.test(((eo=navigator.userAgentData)==null?void 0:eo.platform)||navigator.platform);var Ta="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Aa=typeof HTMLElement>"u"?class{}:HTMLElement;function T(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var no=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Qt=(t,...e)=>no("add",t,e),La=(t,...e)=>no("remove",t,e),_t=new WeakMap,Ue=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),_t.set(t,n)}},Ca=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},oo=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},Ma=0,io=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Ma).toString(32)}`),t.id):"",Tt=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))T(o,i,r);return o},Oa={define:(t,e)=>!Yt||window.customElements.get(t)||window.customElements.define(t,e)},Ia=t=>{var e;const n=T(t,"aria-label")||"";return[...(((e=T(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},st,Na=0,De=t=>{st||(st=Tt("div"),st.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",T(st,"aria-live","assertive")),st.isConnected||document.body.append(st),t&&(st.textContent=`${t}${Na++%2?" ":""}`)},ro=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},ze=!1,Fe=t=>(t?.type==="mouseup"&&(ze=!1),t?.type==="mousedown"&&(ze=!0,Qt(document,"mouseup",Fe,{once:!0})),ze),Ra=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Be=`:host(:not([hidden])) { display: block; -webkit-tap-highlight-color: rgba(0, 0, 0, 0) } /* Must be display block in Safari to allow focus inside */
2
2
  :host(:not([data-multiple])) ::slotted(data),
3
3
  :host([data-multiple="false"]) ::slotted(data) { display: none } /* Hide data if not multiple */
4
4
  [role="listbox"] { position: absolute } /* Avoid affecting CSS like flex on the <u-combobox> */
@@ -6,12 +6,12 @@ var mtds=(function(S){"use strict";var wa=Object.defineProperty,Qn=Object.getOwn
6
6
  ::slotted(del) { text-decoration: none }
7
7
  ::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
8
8
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto; cursor: pointer }
9
- ::slotted(data:focus) { ${ka} }`,Ra=Na(Be),ro="beforeinput,blur,focus,click,input,keydown,mousedown",ao={once:!0,capture:!0,passive:!0},$t="false",te=Sa||$n,so="​".repeat(5),lo="deleteContentBackward",qa="insertText",Wa=" ",ee={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},Ge=class extends Ta{constructor(){super(),this._item="",this._speak="",this._texts=Ea({},ee),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(St("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),St("slot"),St("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),St("style",Be))}static get observedAttributes(){return Object.keys(ee).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=no(this),Qt(this,ro,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ne,0,this),setTimeout(oe,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];ee[o]&&(this._texts[o]=n||ee[o])}disconnectedCallback(){Ue(this,!1),Aa(this,ro,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;Je(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Va(this),t.type==="click"&&Da(this,t),t.type==="focus"&&Pa(this,t),t.type==="input"&&za(this,t),t.type==="keydown"&&Fa(this,t),t.type==="mousedown"&&Fe(t),t.type==="mutation"&&ne(this,t))}get multiple(){var t;return((t=T(this,"data-multiple"))!=null?t:$t)!==$t}set multiple(t){T(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=T(this,"data-creatable"))!=null?t:$t)!==$t}set creatable(t){T(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;n&&(this._options=this.getElementsByTagName(n))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},st=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},He=t=>t instanceof HTMLDataElement,Je=({control:t})=>t?.disabled||t?.readOnly||!1,ne=(t,e)=>{var n,o;const{_focus:i,_texts:r,items:a,control:s,list:c,multiple:l}=t;if(!s)return;const d=Ma(s),u=d.endsWith(so)?T(s,"data-label"):d;T(s,"data-label",u);let p=`${u}${l?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const f=[];for(const{addedNodes:y,removedNodes:A}of e?.detail||[]){for(const k of y)He(k)&&f.unshift(k);for(const k of A)He(k)&&f.push(k)}const v=l?f.length===1:f[0]===i;if(i&&v){const y=T(s,"aria-expanded"),A=T(s,"inputmode"),k=He(i)?s:i,I=!f[0].isConnected;t._speak=`${r[I?"removed":"added"]} ${st(f[0])}, `,(te||i===s)&&De(t._speak),s!==k&&(te&&T(s,"aria-expanded",null),te&&T(s,"inputmode","none"),p=Wa,s.focus()),setTimeout(()=>{var F;T(s,"aria-expanded",y),T(s,"inputmode",I?"none":A),(F=k?.focus)==null||F.call(k),T(s,"inputmode",A),t._speak="",te?setTimeout(ne,100,t):Qt(t,"blur",()=>ne(t),ao)},100)}let m=0;const g=t.querySelector("select"),h=Je(t)?"":r.remove,w=(n=t.shadowRoot)==null?void 0:n.firstElementChild;w&&T(w,"aria-label",r.items);for(const y of a){const A=g?.options[m++],k=st(y),I=y.value||k,F=`${t._speak}${k}, ${h}`;T(y,"aria-label",F),T(y,"aria-selected","true"),T(y,"role","option"),T(y,"slot","items"),T(y,"tabindex","-1"),T(y,"value",I),A?Object.assign(A,{textContent:k,value:I}):g?.appendChild(new Option(k,I,!0,!0)),$n&&T(y,"title",`${m} ${r.of} ${a.length}`)}g&&T(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(m))y.remove();!l&&m>1&&console.warn(t," Multiple <data> found in single mode."),c&&(T(c,"aria-multiselectable",`${l}`),T(s,"list",oo(c)),T(s,"aria-label",`${t._speak}${p}${so}`),c.hasAttribute("popover")&&(T(s,"popovertarget",oo(c)),T(c,"popover","manual")),c._of=r.of);const x=st(a[0]);x!==t._item&&oe(t),t._item=x,co(t),uo(t),(o=Ue(t))==null||o.takeRecords()},co=t=>{var e;t.clear&&T(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Je(t))},uo=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=T(r,"value"))!=null?e:st(r);T(r,"aria-label",n?`${n}${st(r)}`:null),T(r,"selected",i.includes(a)?"":null)}},oe=t=>{const{multiple:e,control:n,items:o}=t,i=st(o[0]);!e&&n&&i!==n.value&&io(n,i,i?qa:lo)},Xe=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:c}=t,l=((n=a?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(T(f,"label")||st(f)).trim().toLowerCase()===d);const p={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",p))||(u=[...i].find(f=>f.selected)),e)return uo(t),u?kt(t,u,!1):r&&l?kt(t,{value:l},!1):(!c&&!l&&s[0]?kt(t,s[0]):oe(t),De(o.invalid));for(const f of i)f.selected=f===u},kt=(t,e,n=!0)=>{var o,i,r;const{control:a,items:s,multiple:c}=t,l=St("data",e.label||e.value,{value:e.value}),d=[...s].find(f=>f.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!n)return oe(t);if(d===((o=no(t))==null?void 0:o.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const f of[...s])f.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Pa=(t,{target:e})=>{const{_form:n,control:o,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&n===void 0&&o&&e===o&&(t._form=T(o,"form"),T(o,"form","#")),De()},Va=t=>Fe()||setTimeout(Ua,0,t),Ua=t=>{const{_focus:e,_root:n,_form:o,multiple:i,control:r}=t;!e||t.contains(n?.activeElement)||(i||Xe(t),o&&r&&T(r,"form",o),t._focus=t._form=void 0)},Da=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&io(a,"",lo),a?.focus();for(const c of s){const{top:l,right:d,bottom:u,left:p}=c.getBoundingClientRect();if(c.contains(i))return kt(t,c);if(o>=l&&o<=u&&n>=p&&n<=d)return c.focus()}i===t&&a?.focus()},za=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of o)if(c.value&&c.value===a)return kt(t,c,r)}else r||Xe(t,!1);co(t)},Fa=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let p=l?r.length:[...r].indexOf(c);if(l&&a==="Tab"&&!e.shiftKey&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Qt(o,"blur",()=>T(o,"tabindex",null),ao)),!(!l&&La(e)||p===-1||u)){if(a==="ArrowRight"&&!l)p+=1;else if(a==="ArrowLeft"&&!d)p-=1;else{if(a==="Enter"&&l)return Xe(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[p])return kt(t,r[p]);l&&(p-=1)}else return l||i?.focus()}e.preventDefault(),(n=r[Math.max(0,p)]||i)==null||n.focus()}};Oa.define("u-combobox",Ge);var je=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ba=je&&/android/i.test(navigator.userAgent),po;je&&/^Mac/i.test(((po=navigator.userAgentData)==null?void 0:po.platform)||navigator.platform);var Ga=`${Ba?"data":"aria"}-labelledby`,Ze=":host(:not([hidden])) { display: block }",ie=typeof HTMLElement>"u"?class{}:HTMLElement;function O(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var mo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ha=(t,...e)=>mo("add",t,e),Ja=(t,...e)=>mo("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(vo("slot"),vo("style",e)),ae=new WeakMap,fo=(t,e)=>{if(e===void 0)return ae.get(t);try{ae.get(t).disconnect(),ae.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ae.set(t,n)}},Xa=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},ho=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},ja=0,go=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ja).toString(32)}`),t.id):"",vo=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},se={define:(t,e)=>!je||window.customElements.get(t)||window.customElements.define(t,e)},le=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Ke=Ze,Ye=Ze,Qe=Ze,_e=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',Za=le(Ke),Ka=le(Ye),Ya=le(_e),Qa=le(Qe),ce="aria-controls",Tt="aria-selected",bo="data-utabs",$e=class extends ie{constructor(){super(),re(this,Ke)}connectedCallback(){O(this,bo,"")}get tabList(){return de("tablist",this)[0]||null}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){cn(this.tabs[t])}get tabs(){return de("tab",this)}get panels(){return de("tabpanel",this)}},tn=class extends ie{constructor(){super(),re(this,Ye)}connectedCallback(){O(this,"role","tablist"),Ha(this,"click,keydown",this),fo(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){Ja(this,"click,keydown",this),fo(this,!1)}handleEvent(t){var e,n;if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(Tt,"true")}const{key:o}=t,i=[...this.tabs],r=i.findIndex(s=>s.contains(t.target));let a=r;if(!(t.defaultPrevented||r===-1)&&(t.type==="click"&&cn(i[r]),t.type==="keydown"&&!Xa(t))){if(o==="ArrowDown"||o==="ArrowRight")a=(r+1)%i.length;else if(o==="ArrowUp"||o==="ArrowLeft")a=(r||i.length)-1;else if(o==="End")a=i.length-1;else if(o==="Home")a=0;else if(o==="Tab")a=ue(i);else return;setTimeout(()=>{O(i[r],"tabindex","-1"),O(i[a],"tabindex","0")}),o!=="Tab"&&(t.preventDefault(),(n=(e=i[a]).focus)==null||n.call(e))}}get tabsElement(){return sn(this)}get tabs(){return ln(this)}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){cn(this.tabs[t])}},en=!1,nn=class extends ie{static get observedAttributes(){return["id",Tt,ce]}constructor(){super(),re(this,_e)}connectedCallback(){O(this,"role","tab"),O(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!en&&this.selected&&this.tabList){en=!0;const t=this.tabList?ln(this.tabList):[],e=de("tabpanel",this.tabsElement||this),n=an(this,e[[...t].indexOf(this)]);n&&O(n,Ga,go(this));let o=0;for(const i of t){const r=an(i,e[o++]);O(i,"tabindex",i===this?"0":"-1"),O(i,Tt,`${i===this}`),r?.id&&O(i,ce,r.id),r&&(r.hidden=r!==n)}en=!1}}get tabsElement(){return sn(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return O(this,Tt)==="true"}set selected(t){O(this,Tt,`${!!t}`)}get index(){const t=this.tabList;return t?[...ln(t)].indexOf(this):0}get panel(){return an(this)}},on=!1,rn=class extends ie{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,Qe)}connectedCallback(){var t,e;O(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(on)return;on=!0;const t=_a(this.firstChild);this.hidden=ue(this.tabs)===-1,O(this,"aria-hidden",`${this.hidden}`),O(this,"tabindex",this.hidden||t?null:"0"),on=!1}get tabsElement(){return sn(this)}get tabs(){return ho(this).querySelectorAll(`[role="tab"][${ce}="${this.id}"]`)}},de=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),an=(t,e)=>ho(t).getElementById(O(t,ce)||go(e)),ue=t=>[...t].findIndex(e=>O(e,Tt)==="true"),sn=t=>t.closest(`[${bo}]`),ln=t=>t.querySelectorAll(':scope > [role="tab"]'),cn=t=>t&&O(t,"aria-disabled")!=="true"&&O(t,"aria-selected","true"),_a=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');se.define("u-tabs",$e),se.define("u-tablist",tn),se.define("u-tab",nn),se.define("u-tabpanel",rn);var wo=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",yo;wo&&/^Mac/i.test(((yo=navigator.userAgentData)==null?void 0:yo.platform)||navigator.platform);var $a=":host(:not([hidden])) { display: block }",xo=typeof HTMLElement>"u"?class{}:HTMLElement;function _(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Eo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},So=(t,...e)=>Eo("add",t,e),ko=(t,...e)=>Eo("remove",t,e),ts=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},es=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},dn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))_(o,i,r);return o},To={define:(t,e)=>!wo||window.customElements.get(t)||window.customElements.define(t,e)},ns=`${$a}
9
+ ::slotted(data:focus) { ${Ta} }`,qa=Ra(Be),ao="beforeinput,blur,focus,click,input,keydown,mousedown",so={once:!0,capture:!0,passive:!0},$t="false",te=ka||to,lo="​".repeat(5),co="deleteContentBackward",Wa="insertText",Pa=" ",ee={added:"Added",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},Ge=class extends Aa{constructor(){super(),this._item="",this._speak="",this._texts=Sa({},ee),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append(Tt("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),Tt("slot"),Tt("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),Tt("style",Be))}static get observedAttributes(){return Object.keys(ee).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=oo(this),Qt(this,ao,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ne,0,this),setTimeout(oe,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];ee[o]&&(this._texts[o]=n||ee[o])}disconnectedCallback(){Ue(this,!1),La(this,ao,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=this._form=void 0}handleEvent(t){const e=t.target;Je(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ua(this),t.type==="click"&&za(this,t),t.type==="focus"&&Va(this,t),t.type==="input"&&Fa(this,t),t.type==="keydown"&&Ba(this,t),t.type==="mousedown"&&Fe(t),t.type==="mutation"&&ne(this,t))}get multiple(){var t;return((t=T(this,"data-multiple"))!=null?t:$t)!==$t}set multiple(t){T(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=T(this,"data-creatable"))!=null?t:$t)!==$t}set creatable(t){T(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector('datalist,[role="listbox"]')),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector("del")),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e;if(!this._options){const n=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;n&&(this._options=this.getElementsByTagName(n))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},lt=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},He=t=>t instanceof HTMLDataElement,Je=({control:t})=>t?.disabled||t?.readOnly||!1,ne=(t,e)=>{var n,o;const{_focus:i,_texts:r,items:a,control:s,list:c,multiple:l}=t;if(!s)return;const d=Ia(s),u=d.endsWith(lo)?T(s,"data-label"):d;T(s,"data-label",u);let m=`${u}${l?`, ${a.length?r.found.replace("%d",`${a.length}`):r.empty}`:""}`;const f=[];for(const{addedNodes:y,removedNodes:A}of e?.detail||[]){for(const k of y)He(k)&&f.unshift(k);for(const k of A)He(k)&&f.push(k)}const b=l?f.length===1:f[0]===i;if(i&&b){const y=T(s,"aria-expanded"),A=T(s,"inputmode"),k=He(i)?s:i,I=!f[0].isConnected;t._speak=`${r[I?"removed":"added"]} ${lt(f[0])}, `,(te||i===s)&&De(t._speak),s!==k&&(te&&T(s,"aria-expanded",null),te&&T(s,"inputmode","none"),m=Pa,s.focus()),setTimeout(()=>{var F;T(s,"aria-expanded",y),T(s,"inputmode",I?"none":A),(F=k?.focus)==null||F.call(k),T(s,"inputmode",A),t._speak="",te?setTimeout(ne,100,t):Qt(t,"blur",()=>ne(t),so)},100)}let p=0;const g=t.querySelector("select"),h=Je(t)?"":r.remove,w=(n=t.shadowRoot)==null?void 0:n.firstElementChild;w&&T(w,"aria-label",r.items);for(const y of a){const A=g?.options[p++],k=lt(y),I=y.value||k,F=`${t._speak}${k}, ${h}`;T(y,"aria-label",F),T(y,"aria-selected","true"),T(y,"role","option"),T(y,"slot","items"),T(y,"tabindex","-1"),T(y,"value",I),A?Object.assign(A,{textContent:k,value:I}):g?.appendChild(new Option(k,I,!0,!0)),to&&T(y,"title",`${p} ${r.of} ${a.length}`)}g&&T(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(p))y.remove();!l&&p>1&&console.warn(t," Multiple <data> found in single mode."),c&&(T(c,"aria-multiselectable",`${l}`),T(s,"list",io(c)),T(s,"aria-label",`${t._speak}${m}${lo}`),c.hasAttribute("popover")&&(T(s,"popovertarget",io(c)),T(c,"popover","manual")),c._of=r.of);const x=lt(a[0]);x!==t._item&&oe(t),t._item=x,uo(t),mo(t),(o=Ue(t))==null||o.takeRecords()},uo=t=>{var e;t.clear&&T(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Je(t))},mo=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const r of o){const a=(e=T(r,"value"))!=null?e:lt(r);T(r,"aria-label",n?`${n}${lt(r)}`:null),T(r,"selected",i.includes(a)?"":null)}},oe=t=>{const{multiple:e,control:n,items:o}=t,i=lt(o[0]);!e&&n&&i!==n.value&&ro(n,i,i?Wa:co)},Xe=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:r,control:a,items:s,multiple:c}=t,l=((n=a?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(T(f,"label")||lt(f)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(f=>f.selected)),e)return mo(t),u?At(t,u,!1):r&&l?At(t,{value:l},!1):(!c&&!l&&s[0]?At(t,s[0]):oe(t),De(o.invalid));for(const f of i)f.selected=f===u},At=(t,e,n=!0)=>{var o,i,r;const{control:a,items:s,multiple:c}=t,l=Tt("data",e.label||e.value,{value:e.value}),d=[...s].find(f=>f.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!n)return oe(t);if(d===((o=oo(t))==null?void 0:o.activeElement)&&((r=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||r.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const f of[...s])f.remove();d?d.remove():a?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Va=(t,{target:e})=>{const{_form:n,control:o,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&n===void 0&&o&&e===o&&(t._form=T(o,"form"),T(o,"form","#")),De()},Ua=t=>Fe()||setTimeout(Da,0,t),Da=t=>{const{_focus:e,_root:n,_form:o,multiple:i,control:r}=t;!e||t.contains(n?.activeElement)||(i||Xe(t),o&&r&&T(r,"form",o),t._focus=t._form=void 0)},za=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s}=t;if(r?.contains(i))return a&&ro(a,"",co),a?.focus();for(const c of s){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return At(t,c);if(o>=l&&o<=u&&n>=m&&n<=d)return c.focus()}i===t&&a?.focus()},Fa=(t,e)=>{var n;const{options:o=[],control:i,multiple:r}=t,a=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of o)if(c.value&&c.value===a)return At(t,c,r)}else r||Xe(t,!1);uo(t)},Ba=(t,e)=>{var n;const{clear:o,control:i,items:r}=t,{key:a,repeat:s,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let m=l?r.length:[...r].indexOf(c);if(l&&a==="Tab"&&!e.shiftKey&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Qt(o,"blur",()=>T(o,"tabindex",null),so)),!(!l&&Ca(e)||m===-1||u)){if(a==="ArrowRight"&&!l)m+=1;else if(a==="ArrowLeft"&&!d)m-=1;else{if(a==="Enter"&&l)return Xe(t);if(a==="Backspace"&&!d){if(e.preventDefault(),!s&&r[m])return At(t,r[m]);l&&(m-=1)}else return l||i?.focus()}e.preventDefault(),(n=r[Math.max(0,m)]||i)==null||n.focus()}};Oa.define("u-combobox",Ge);var je=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ga=je&&/android/i.test(navigator.userAgent),po;je&&/^Mac/i.test(((po=navigator.userAgentData)==null?void 0:po.platform)||navigator.platform);var Ha=`${Ga?"data":"aria"}-labelledby`,Ze=":host(:not([hidden])) { display: block }",ie=typeof HTMLElement>"u"?class{}:HTMLElement;function M(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var fo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ja=(t,...e)=>fo("add",t,e),Xa=(t,...e)=>fo("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(bo("slot"),bo("style",e)),ae=new WeakMap,ho=(t,e)=>{if(e===void 0)return ae.get(t);try{ae.get(t).disconnect(),ae.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),ae.set(t,n)}},ja=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},go=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},Za=0,vo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Za).toString(32)}`),t.id):"",bo=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},se={define:(t,e)=>!je||window.customElements.get(t)||window.customElements.define(t,e)},le=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Ke=Ze,Ye=Ze,Qe=Ze,_e=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',Ka=le(Ke),Ya=le(Ye),Qa=le(_e),_a=le(Qe),ce="aria-controls",Lt="aria-selected",wo="data-utabs",$e=class extends ie{constructor(){super(),re(this,Ke)}connectedCallback(){M(this,wo,"")}get tabList(){return de("tablist",this)[0]||null}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){cn(this.tabs[t])}get tabs(){return de("tab",this)}get panels(){return de("tabpanel",this)}},tn=class extends ie{constructor(){super(),re(this,Ye)}connectedCallback(){M(this,"role","tablist"),Ja(this,"click,keydown",this),ho(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){Xa(this,"click,keydown",this),ho(this,!1)}handleEvent(t){var e,n;if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(Lt,"true")}const{key:o}=t,i=[...this.tabs],r=i.findIndex(s=>s.contains(t.target));let a=r;if(!(t.defaultPrevented||r===-1)&&(t.type==="click"&&cn(i[r]),t.type==="keydown"&&!ja(t))){if(o==="ArrowDown"||o==="ArrowRight")a=(r+1)%i.length;else if(o==="ArrowUp"||o==="ArrowLeft")a=(r||i.length)-1;else if(o==="End")a=i.length-1;else if(o==="Home")a=0;else if(o==="Tab")a=ue(i);else return;setTimeout(()=>{M(i[r],"tabindex","-1"),M(i[a],"tabindex","0")}),o!=="Tab"&&(t.preventDefault(),(n=(e=i[a]).focus)==null||n.call(e))}}get tabsElement(){return sn(this)}get tabs(){return ln(this)}get selectedIndex(){return ue(this.tabs)}set selectedIndex(t){cn(this.tabs[t])}},en=!1,nn=class extends ie{static get observedAttributes(){return["id",Lt,ce]}constructor(){super(),re(this,_e)}connectedCallback(){M(this,"role","tab"),M(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!en&&this.selected&&this.tabList){en=!0;const t=this.tabList?ln(this.tabList):[],e=de("tabpanel",this.tabsElement||this),n=an(this,e[[...t].indexOf(this)]);n&&M(n,Ha,vo(this));let o=0;for(const i of t){const r=an(i,e[o++]);M(i,"tabindex",i===this?"0":"-1"),M(i,Lt,`${i===this}`),r?.id&&M(i,ce,r.id),r&&(r.hidden=r!==n)}en=!1}}get tabsElement(){return sn(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return M(this,Lt)==="true"}set selected(t){M(this,Lt,`${!!t}`)}get index(){const t=this.tabList;return t?[...ln(t)].indexOf(this):0}get panel(){return an(this)}},on=!1,rn=class extends ie{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,Qe)}connectedCallback(){var t,e;M(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(on)return;on=!0;const t=$a(this.firstChild);this.hidden=ue(this.tabs)===-1,M(this,"aria-hidden",`${this.hidden}`),M(this,"tabindex",this.hidden||t?null:"0"),on=!1}get tabsElement(){return sn(this)}get tabs(){return go(this).querySelectorAll(`[role="tab"][${ce}="${this.id}"]`)}},de=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),an=(t,e)=>go(t).getElementById(M(t,ce)||vo(e)),ue=t=>[...t].findIndex(e=>M(e,Lt)==="true"),sn=t=>t.closest(`[${wo}]`),ln=t=>t.querySelectorAll(':scope > [role="tab"]'),cn=t=>t&&M(t,"aria-disabled")!=="true"&&M(t,"aria-selected","true"),$a=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');se.define("u-tabs",$e),se.define("u-tablist",tn),se.define("u-tab",nn),se.define("u-tabpanel",rn);var yo=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",xo;yo&&/^Mac/i.test(((xo=navigator.userAgentData)==null?void 0:xo.platform)||navigator.platform);var ts=":host(:not([hidden])) { display: block }",Eo=typeof HTMLElement>"u"?class{}:HTMLElement;function _(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var So=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},ko=(t,...e)=>So("add",t,e),To=(t,...e)=>So("remove",t,e),es=t=>{var e;const n=t.key===" "||t.key==="Enter";return n&&((e=t.preventDefault)==null||e.call(t)),n&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),n},ns=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},dn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,r]of Object.entries(n))_(o,i,r);return o},Ao={define:(t,e)=>!yo||window.customElements.get(t)||window.customElements.define(t,e)},os=`${ts}
10
10
  ::slotted([slot="summary"]) { cursor: pointer; display: block }
11
11
  ::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
12
12
  ::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
13
- :host > [part="details-content"]:not([hidden=""]) { display: block }`,os=class extends xo{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(dn("slot",null,{name:"summary"}),dn("slot",null,{part:"details-content"}),dn("style",ns)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
14
- Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],_(this,"role","group"),So(this._content,"beforematch",this),So(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&ko(this._content,"beforematch",this),ko(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"&&_(r,"aria-expanded",`${i}`);if(this._content&&(_(this._content,"aria-hidden",`${!i}`),_(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=es(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const n=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&ts(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){_(this,"open",t?"":null)}get name(){return _(this,"name")||""}set name(t){_(this,"name",t)}},is=class extends xo{connectedCallback(){_(this,"role","button"),this.slot="summary",this.tabIndex=0}};To.define("u-details",os),To.define("u-summary",is);const rs=`@font-face {
13
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`,is=class extends Eo{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(dn("slot",null,{name:"summary"}),dn("slot",null,{part:"details-content"}),dn("style",os)),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
14
+ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}static get observedAttributes(){return["open"]}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],_(this,"role","group"),ko(this._content,"beforematch",this),ko(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&To(this._content,"beforematch",this),To(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"&&_(r,"aria-expanded",`${i}`);if(this._content&&(_(this._content,"aria-hidden",`${!i}`),_(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=ns(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const n=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),n&&t.type==="keydown"&&es(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){_(this,"open",t?"":null)}get name(){return _(this,"name")||""}set name(t){_(this,"name",t)}},rs=class extends Eo{connectedCallback(){_(this,"role","button"),this.slot="summary",this.tabIndex=0}};Ao.define("u-details",is),Ao.define("u-summary",rs);const as=`@font-face {
15
15
  font-family: 'Mattilsynet Sans';
16
16
  font-style: normal italic;
17
17
  font-weight: 100 900;
@@ -191,12 +191,12 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
191
191
  }
192
192
  @bottom-center { content: none }
193
193
  @bottom-right { content: none }
194
- }`,B={passive:!0,capture:!0},lt=()=>typeof window<"u"&&typeof document<"u",as=()=>lt()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),pe=typeof HTMLElement>"u"?class{}:HTMLElement;function At(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const Lt=(t,...e)=>typeof window>"u"||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),E=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),ss=/^["']|["']$/g,Rt=(t,e)=>{let n=E(t,e);return n||(n=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(ss,"").trim()||null,E(t,e,n)),n||Lt(`Missing ${e} on:`,t),n},R=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>un(t,...e)},un=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},ct=(t,e)=>{lt()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))};let pn=!1;const dt=(t,e,n)=>{let o=0,i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{!pn&&!o&&(o=requestAnimationFrame(i))});return a.observe(t,n),requestAnimationFrame(i),r},Ao=(t,e)=>{pn=!0,t.textContent=e,requestAnimationFrame(ls)},ls=()=>{pn=!1},Lo=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))E(n,o,i);return n},$={define:(t,e)=>!lt()||window.customElements.get(t)||window.customElements.define(t,e)};let cs=0;const ds=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ut(t){return t&&!t.id&&(t.id=`${ds}${++cs}`),t?.id||""}const Co=":click-delegate-hover",Oo="data-clickdelegatefor",us=`[${Oo}]`,ps=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.isTrusted&&t.button<2&&Mo(t);n instanceof HTMLAnchorElement&&e?window.open(n.href,void 0,n.rel):n instanceof HTMLElement&&!n.contains(t.target)&&(t.stopImmediatePropagation(),n.click())};let me;const ms=t=>{let e=Mo(t);me!==e&&(me&&me.classList.remove(Co),e&&e.classList.add(Co),me=e)},Mo=({target:t})=>{let e=(t instanceof Element?t.closest(us):null)?.getAttribute(Oo),n=e&&document.getElementById(e),o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&n||void 0};ct("clickdelegatefor",()=>[R(window,"click auxclick",ps,!0),R(document,"mouseover",ms,B)]);let mn=!1;const fs=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();mn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!mn&&E(e,"closedby")==="any";mn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},hs=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))E(t,"aria-haspopup","dialog")},gs=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();ct("dialog",()=>[R(document,"command",gs,B),R(document,"pointerdown pointerup",fs,B),dt(document,hs,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Ct=Math.min,U=Math.max,fe=Math.round,he=Math.floor,j=t=>({x:t,y:t}),vs={left:"right",right:"left",bottom:"top",top:"bottom"},bs={start:"end",end:"start"};function Io(t,e,n){return U(t,Ct(e,n))}function pt(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function qt(t){return t.split("-")[1]}function fn(t){return t==="x"?"y":"x"}function No(t){return t==="y"?"height":"width"}const ws=new Set(["top","bottom"]);function Z(t){return ws.has(tt(t))?"y":"x"}function Ro(t){return fn(Z(t))}function ys(t,e,n){n===void 0&&(n=!1);const o=qt(t),i=Ro(t),r=No(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ge(a)),[a,ge(a)]}function xs(t){const e=ge(t);return[hn(t),e,hn(e)]}function hn(t){return t.replace(/start|end/g,e=>bs[e])}const qo=["left","right"],Wo=["right","left"],Es=["top","bottom"],Ss=["bottom","top"];function ks(t,e,n){switch(t){case"top":case"bottom":return n?e?Wo:qo:e?qo:Wo;case"left":case"right":return e?Es:Ss;default:return[]}}function Ts(t,e,n,o){const i=qt(t);let r=ks(tt(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(hn)))),r}function ge(t){return t.replace(/left|right|bottom|top/g,e=>vs[e])}function As(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ls(t){return typeof t!="number"?As(t):{top:t,right:t,bottom:t,left:t}}function ve(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Po(t,e,n){let{reference:o,floating:i}=t;const r=Z(e),a=Ro(e),s=No(a),c=tt(e),l=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(qt(e)){case"start":f[a]-=p*(n&&l?-1:1);break;case"end":f[a]+=p*(n&&l?-1:1);break}return f}async function Cs(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=pt(e,t),v=Ls(f),g=s[p?u==="floating"?"reference":"floating":u],h=ve(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),y=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},A=ve(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(h.top-A.top+v.top)/y.y,bottom:(A.bottom-h.bottom+v.bottom)/y.y,left:(h.left-A.left+v.left)/y.x,right:(A.right-h.right+v.right)/y.x}}const Os=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Po(l,o,c),p=o,f={},v=0;for(let g=0;g<s.length;g++){var m;const{name:h,fn:w}=s[g],{x,y,data:A,reset:k}=await w({x:d,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:l,platform:{...a,detectOverflow:(m=a.detectOverflow)!=null?m:Cs},elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[h]:{...f[h],...A}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:d,y:u}=Po(l,p,c)),g=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:f}},Ms=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...g}=pt(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),w=Z(s),x=tt(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),A=p||(x||!m?[ge(s)]:xs(s)),k=v!=="none";!p&&k&&A.push(...Ts(s,m,v,y));const I=[s,...A],F=await c.detectOverflow(e,g),yt=[];let nt=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&yt.push(F[h]),u){const xt=ys(i,a,y);yt.push(F[xt[0]],F[xt[1]])}if(nt=[...nt,{placement:i,overflows:yt}],!yt.every(xt=>xt<=0)){var Xt,jt;const xt=(((Xt=r.flip)==null?void 0:Xt.index)||0)+1,Yn=I[xt];if(Yn&&(!(u==="alignment"?w!==Z(Yn):!1)||nt.every(X=>Z(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:xt,overflows:nt},reset:{placement:Yn}};let Kt=(jt=nt.filter(Et=>Et.overflows[0]<=0).sort((Et,X)=>Et.overflows[1]-X.overflows[1])[0])==null?void 0:jt.placement;if(!Kt)switch(f){case"bestFit":{var Zt;const Et=(Zt=nt.filter(X=>{if(k){const rt=Z(X.placement);return rt===w||rt==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(rt=>rt>0).reduce((rt,_d)=>rt+_d,0)]).sort((X,rt)=>X[1]-rt[1])[0])==null?void 0:Zt[0];Et&&(Kt=Et);break}case"initialPlacement":Kt=s;break}if(i!==Kt)return{reset:{placement:Kt}}}return{}}}},Vo=new Set(["left","top"]);async function Is(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=tt(n),s=qt(n),c=Z(n)==="y",l=Vo.has(a)?-1:1,d=r&&c?-1:1,u=pt(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),c?{x:f*d,y:p*l}:{x:p*l,y:f*d}}const Ns=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=e,c=await Is(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:a}}}}},Rs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:h=>{let{x:w,y:x}=h;return{x:w,y:x}}},...l}=pt(t,e),d={x:n,y:o},u=await r.detectOverflow(e,l),p=Z(tt(i)),f=fn(p);let v=d[f],m=d[p];if(a){const h=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=v+u[h],y=v-u[w];v=Io(x,v,y)}if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=m+u[h],y=m-u[w];m=Io(x,m,y)}const g=c.fn({...e,[f]:v,[p]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:a,[p]:s}}}}}},qs=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pt(t,e),d={x:n,y:o},u=Z(i),p=fn(u);let f=d[p],v=d[u];const m=pt(s,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=p==="y"?"height":"width",y=r.reference[p]-r.floating[x]+g.mainAxis,A=r.reference[p]+r.reference[x]-g.mainAxis;f<y?f=y:f>A&&(f=A)}if(l){var h,w;const x=p==="y"?"width":"height",y=Vo.has(tt(i)),A=r.reference[u]-r.floating[x]+(y&&((h=a.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[x]+(y?0:((w=a.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);v<A?v=A:v>k&&(v=k)}return{[p]:f,[u]:v}}}},Ws=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:c=()=>{},...l}=pt(t,e),d=await a.detectOverflow(e,l),u=tt(i),p=qt(i),f=Z(i)==="y",{width:v,height:m}=r.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(h=u,g=p==="end"?"top":"bottom");const w=m-d.top-d.bottom,x=v-d.left-d.right,y=Ct(m-d[g],w),A=Ct(v-d[h],x),k=!e.middlewareData.shift;let I=y,F=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(F=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(I=w),k&&!p){const nt=U(d.left,0),Xt=U(d.right,0),jt=U(d.top,0),Zt=U(d.bottom,0);f?F=v-2*(nt!==0||Xt!==0?nt+Xt:U(d.left,d.right)):I=m-2*(jt!==0||Zt!==0?jt+Zt:U(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:I});const yt=await a.getDimensions(s.floating);return v!==yt.width||m!==yt.height?{reset:{rects:!0}}:{}}}};function be(){return typeof window<"u"}function Ot(t){return Uo(t)?(t.nodeName||"").toLowerCase():"#document"}function D(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function K(t){var e;return(e=(Uo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Uo(t){return be()?t instanceof Node||t instanceof D(t).Node:!1}function G(t){return be()?t instanceof Element||t instanceof D(t).Element:!1}function Y(t){return be()?t instanceof HTMLElement||t instanceof D(t).HTMLElement:!1}function Do(t){return!be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof D(t).ShadowRoot}const Ps=new Set(["inline","contents"]);function Wt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ps.has(i)}const Vs=new Set(["table","td","th"]);function Us(t){return Vs.has(Ot(t))}const Ds=[":popover-open",":modal"];function we(t){return Ds.some(e=>{try{return t.matches(e)}catch{return!1}})}const zs=["transform","translate","scale","rotate","perspective"],Fs=["transform","translate","scale","rotate","perspective","filter"],Bs=["paint","layout","strict","content"];function gn(t){const e=vn(),n=G(t)?H(t):t;return zs.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Fs.some(o=>(n.willChange||"").includes(o))||Bs.some(o=>(n.contain||"").includes(o))}function Gs(t){let e=ot(t);for(;Y(e)&&!Mt(e);){if(gn(e))return e;if(we(e))return null;e=ot(e)}return null}function vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Hs=new Set(["html","body","#document"]);function Mt(t){return Hs.has(Ot(t))}function H(t){return D(t).getComputedStyle(t)}function ye(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ot(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Do(t)&&t.host||K(t);return Do(e)?e.host:e}function zo(t){const e=ot(t);return Mt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&Wt(e)?e:zo(e)}function Pt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=zo(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=D(i);if(r){const s=bn(a);return e.concat(a,a.visualViewport||[],Wt(i)?i:[],s&&n?Pt(s):[])}return e.concat(i,Pt(i,[],n))}function bn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Fo(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Y(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=fe(n)!==r||fe(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function wn(t){return G(t)?t:t.contextElement}function It(t){const e=wn(t);if(!Y(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Fo(e);let a=(r?fe(n.width):n.width)/o,s=(r?fe(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Js=j(0);function Bo(t){const e=D(t);return!vn()||!e.visualViewport?Js:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xs(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==D(t)?!1:e}function mt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=wn(t);let a=j(1);e&&(o?G(o)&&(a=It(o)):a=It(t));const s=Xs(r,n,o)?Bo(r):j(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const p=D(r),f=o&&G(o)?D(o):o;let v=p,m=bn(v);for(;m&&o&&f!==v;){const g=It(m),h=m.getBoundingClientRect(),w=H(m),x=h.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=x,l+=y,v=D(m),m=bn(v)}}return ve({width:d,height:u,x:c,y:l})}function xe(t,e){const n=ye(t).scrollLeft;return e?e.left+n:mt(K(t)).left+n}function Go(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-xe(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function js(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=K(o),s=e?we(e.floating):!1;if(o===a||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=j(1);const d=j(0),u=Y(o);if((u||!u&&!r)&&((Ot(o)!=="body"||Wt(a))&&(c=ye(o)),Y(o))){const f=mt(o);l=It(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const p=a&&!u&&!r?Go(a,c):j(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Zs(t){return Array.from(t.getClientRects())}function Ks(t){const e=K(t),n=ye(t),o=t.ownerDocument.body,i=U(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=U(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+xe(t);const s=-n.scrollTop;return H(o).direction==="rtl"&&(a+=U(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Ho=25;function Ys(t,e){const n=D(t),o=K(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;const d=vn();(!d||d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=xe(o);if(l<=0){const d=o.ownerDocument,u=d.body,p=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(o.clientWidth-u.clientWidth-f);v<=Ho&&(r-=v)}else l<=Ho&&(r+=l);return{width:r,height:a,x:s,y:c}}const Qs=new Set(["absolute","fixed"]);function _s(t,e){const n=mt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Y(t)?It(t):j(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:a,height:s,x:c,y:l}}function Jo(t,e,n){let o;if(e==="viewport")o=Ys(t,n);else if(e==="document")o=Ks(K(t));else if(G(e))o=_s(e,n);else{const i=Bo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ve(o)}function Xo(t,e){const n=ot(t);return n===e||!G(n)||Mt(n)?!1:H(n).position==="fixed"||Xo(n,e)}function $s(t,e){const n=e.get(t);if(n)return n;let o=Pt(t,[],!1).filter(s=>G(s)&&Ot(s)!=="body"),i=null;const r=H(t).position==="fixed";let a=r?ot(t):t;for(;G(a)&&!Mt(a);){const s=H(a),c=gn(a);!c&&s.position==="fixed"&&(i=null),(r?!c&&!i:!c&&s.position==="static"&&!!i&&Qs.has(i.position)||Wt(a)&&!c&&Xo(t,a))?o=o.filter(d=>d!==a):i=s,a=ot(a)}return e.set(t,o),o}function tl(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?we(e)?[]:$s(e,this._c):[].concat(n),o],s=a[0],c=a.reduce((l,d)=>{const u=Jo(e,d,i);return l.top=U(u.top,l.top),l.right=Ct(u.right,l.right),l.bottom=Ct(u.bottom,l.bottom),l.left=U(u.left,l.left),l},Jo(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function el(t){const{width:e,height:n}=Fo(t);return{width:e,height:n}}function nl(t,e,n){const o=Y(e),i=K(e),r=n==="fixed",a=mt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=j(0);function l(){c.x=xe(i)}if(o||!o&&!r)if((Ot(e)!=="body"||Wt(i))&&(s=ye(e)),o){const f=mt(e,!0,r,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();r&&!o&&i&&l();const d=i&&!o&&!r?Go(i,s):j(0),u=a.left+s.scrollLeft-c.x-d.x,p=a.top+s.scrollTop-c.y-d.y;return{x:u,y:p,width:a.width,height:a.height}}function yn(t){return H(t).position==="static"}function jo(t,e){if(!Y(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return K(t)===n&&(n=n.ownerDocument.body),n}function Zo(t,e){const n=D(t);if(we(t))return n;if(!Y(t)){let i=ot(t);for(;i&&!Mt(i);){if(G(i)&&!yn(i))return i;i=ot(i)}return n}let o=jo(t,e);for(;o&&Us(o)&&yn(o);)o=jo(o,e);return o&&Mt(o)&&yn(o)&&!gn(o)?n:o||Gs(t)||n}const ol=async function(t){const e=this.getOffsetParent||Zo,n=this.getDimensions,o=await n(t.floating);return{reference:nl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function il(t){return H(t).direction==="rtl"}const rl={convertOffsetParentRelativeRectToViewportRelativeRect:js,getDocumentElement:K,getClippingRect:tl,getOffsetParent:Zo,getElementRects:ol,getClientRects:Zs,getDimensions:el,getScale:It,isElement:G,isRTL:il};function Ko(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function al(t,e){let n=null,o;const i=K(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();const l=t.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=l;if(s||e(),!p||!f)return;const v=he(u),m=he(i.clientWidth-(d+p)),g=he(i.clientHeight-(u+f)),h=he(d),x={rootMargin:-v+"px "+-m+"px "+-g+"px "+-h+"px",threshold:U(0,Ct(1,c))||1};let y=!0;function A(k){const I=k[0].intersectionRatio;if(I!==c){if(!y)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!Ko(l,t.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return a(!0),r}function sl(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=wn(t),d=i||r?[...l?Pt(l):[],...Pt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=l&&s?al(l,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let v,m=c?mt(t):null;c&&g();function g(){const h=mt(t);m&&!Ko(m,h)&&n(),m=h,v=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(v)}}const ll=Ns,cl=Rs,dl=Ms,ul=Ws,pl=qs,ml=(t,e,n)=>{const o=new Map,i={platform:rl,...n},r={...i.platform,_c:o};return Os(t,e,{...i,platform:r})},Yo="data-placement",Qo="data-autoplacement",Vt=new Map;function fl(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&_o(o,"--_ds-floating");if(!r)return;if(e==="closed")return Vt.get(o)?.();if(!i){let v=o.getRootNode(),m=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&v?.querySelector?.(m)||void 0}if(!i||i===o||n&&n===e)return;let a=_o(o,"--_ds-floating-overscroll"),s=E(o,Yo)||E(i,Yo)||r,c=E(o,Qo)||E(i,Qo),l=parseFloat(getComputedStyle(o,"::before").height)||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(s==="none")return;let p={strategy:"absolute",placement:s,middleware:[ll(l||0),cl({padding:10,limiter:pl({offset:{mainAxis:u}})}),gl(),...c==="false"?[]:[dl({padding:10,crossAxis:!1})],...a?[ul({apply({availableHeight:v}){a==="fit"&&(o.style.width=`${i.clientWidth}px`),o.style.maxHeight=`${Math.max(50,v-20)}px`}})]:[]]},f=sl(i,o,async()=>{if(!i?.isConnected)return Vt.get(o)?.();let{x:v,y:m}=await ml(i,o,p);o.style.translate=`${v}px ${m}px`});Vt.set(o,()=>Vt.delete(o)&&f())}let Ee;const hl=({type:t})=>{if(t==="mousedown"&&(Ee=!1),t==="scroll"&&Ee===!1&&(Ee=!0),t==="mouseup"&&Ee)for(let[e]of Vt)e.showPopover()};ct("popover",()=>[R(document,"mousedown scroll mouseup",hl,!0),R(document,"toggle ds-toggle-source",fl,B)]);const _o=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),gl=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),E(e,"data-floating",t.placement),t}}),xn=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||E(t,"aria-readonly")==="true"),vl=t=>{if(t.key!=="Tab"&&xn(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&E(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),n=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+n)%e.length]?.focus()}},bl=t=>{let e=t.target?.closest?.("label")?.control||t.target;xn(e)&&(t.preventDefault(),e.focus())},wl=t=>{t.target instanceof HTMLSelectElement&&xn(t.target)&&t.preventDefault()};ct("readonly",()=>[R(document,"keydown",vl),R(document,"click",bl),R(document,"mousedown",wl)]);const En="data-toggle-group",$o=`[${En}]`,yl=At(()=>{for(let t of document.querySelectorAll($o))E(t,"aria-label",Rt(t,En))},0),xl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest($o);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let n=e.getElementsByTagName("input"),o=[...n].indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+o+i)%n.length]?.focus()}};ct("toggle-group",()=>[R(document,"keydown",xl),dt(document,yl,{attributeFilter:[En],attributes:!0,childList:!0,subtree:!0})]);let q,Se,ti=0,ei=0;const Sn="data-color",ni="aria-label",oi="aria-description",El=`[${Sn}]`,kn="data-color-scheme",Sl=`[${kn}]`,ii=t=>{q=t||void 0},kl=At(()=>{for(let t of document.querySelectorAll("[data-tooltip]")){let e=t.getAttribute(ni)||t.getAttribute(oi),n=Rt(t,"data-tooltip");if(e!==n){let o=t.textContent?.trim();E(t,ni,o?null:n),E(t,oi,o?n:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||Lt('Missing tabindex="0" attribute on: ',t)}}},0),ri=({type:t,target:e})=>{if(clearTimeout(ti),e===q)return;if(t==="mouseover"&&!Se){ti=setTimeout(ri,300,{target:e});return}let n=e?.closest?.("[data-tooltip]");if(n===Se)return;if(!n)return Tl();q||=Lo("div",{class:"ds-tooltip"}),q.isConnected||document.body.appendChild(q);let o=n.closest(El),i=n.closest(Sl),r=o!==i&&o?.contains(i);clearTimeout(ei),E(q,"popover","manual"),E(q,kn,i?.getAttribute(kn)),E(q,Sn,r?null:o?.getAttribute(Sn)),Ao(q,E(n,"data-tooltip")),q.showPopover(),q.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),Se=n},Tl=()=>q?.isConnected&&q.popover&&q.hidePopover(),ai=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&q?.hidePopover();t?t.target===q&&t.newState==="closed"&&(ei=setTimeout(ai,300)):Se=void 0};ct("tooltip",()=>[R(document,"blur focus mouseover",ri,B),R(document,"toggle keydown",ai,B),dt(document,kl,{attributeFilter:["data-tooltip"],attributes:!0,childList:!0,subtree:!0})]);const Ut="aria-label",Tn="data-label";var si=class extends pe{_items;_render;_unresize;_unmutate;static get observedAttributes(){return[Ut]}connectedCallback(){E(this,Tn)||Rt(this,Ut),this._items=this.getElementsByTagName("a"),this._render=At(()=>Al(this),100),this._unresize=R(window,"resize",this._render),this._unmutate=dt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Al=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight,i=E(t,Tn),r=E(t,Ut);E(t,"role",o?null:"navigation"),!o&&!r&&i?E(t,Ut,i):o&&r&&(E(t,Tn,r),E(t,Ut,null));for(let a of t._items||[])E(a,"aria-current",a===n?"page":null)};$.define("ds-breadcrumbs",si);var li=class extends pe{connectedCallback(){R(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let n=this.querySelector("h2,h3,h4,h5,h6");n&&E(this,"aria-labelledby",ut(n)),E(this,"tabindex","-1"),this.focus()}disconnectedCallback(){un(this,"animationend",this,B)}};$.define("ds-error-summary",li);const ci="data-indeterminate",An=new Set,di=new WeakMap,Ll=lt()?document.getElementsByTagName("fieldset"):[],Cl=lt()&&CSS.supports("field-sizing","content"),Ol=as()?800:200,ui=new WeakSet,pi=At(()=>{for(let t of Ll)E(t,"aria-labelledby",`${ut(t.querySelector("legend"))} ${ut(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of An){let e=[],n=[],o,i,r=!1,a=!1;for(let s of t.getElementsByTagName("*"))if(s instanceof HTMLLabelElement&&n.push(s),!s.hidden)if(Il(s))o?Lt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):o=s;else{let c=s.getAttribute("data-field");c==="counter"?i=s:c==="validation"?(e.unshift(s),r=!0,a||=fi(s)):c&&e.push(s)}if(!o)Lt("Field is missing input element:",t);else{i&&di.set(o,i);for(let d of n)E(d,"for",ut(o));let s=o.type==="radio"||o.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(r=!0,a||=fi(c),e.unshift(c));let l=E(o,ci);l&&(o.indeterminate=l==="true"),E(t,"data-clickdelegatefor",s?ut(o):null),E(o,"aria-describedby",e.map(ut).join(" ")||null),(r||ui.has(o))&&(ui[r?"add":"delete"](o),E(o,"aria-invalid",`${a}`)),mi(o)}}},0),Dt=lt()?Lo("div",{"aria-live":"polite",style:"position:fixed;white-space:nowrap;clip:rect(0 0 0 0)"}):null,mi=t=>{let e=t.target||t,n=di.get(e);if(n?.isConnected){let o=(Number(E(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",r=Rt(n,`data-${i}`)?.replace("%d",`${Math.abs(o)}`);E(n,"data-label",r),E(n,"data-state",i),E(n,"data-color",o<0?"danger":null),t.type==="input"&&Dt&&r&&(Dt?.isConnected||document.body.appendChild(Dt),Ml(e,r))}!Cl&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Ml=At((t,e)=>{let n=document.activeElement===t;Dt?.isConnected&&n&&Ao(Dt,e)},Ol),fi=t=>t.getAttribute("data-color")!=="success",Il=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var ke=class extends pe{connectedCallback(){An.add(this),pi()}disconnectedCallback(){An.delete(this)}};$.define("ds-field",ke),ct("field",()=>[R(document,"input ds-field-update",mi,B),dt(document,pi,{attributeFilter:["hidden","data-field",ci],attributes:!0,childList:!0,subtree:!0})]);const hi="aria-label",Te="data-current",Ae="data-total",gi="data-href",vi=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Rl(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var bi=class extends pe{_unmutate;_render;static get observedAttributes(){return[hi,Te,Ae,gi]}connectedCallback(){let t=E(this,Ae),e=E(this,Te);e&&!t&&Lt(`Missing ${Ae} attribute on:`,this),t&&!e&&Lt(`Missing ${Te} attribute on:`,this),Rt(this,hi),E(this,"role","navigation"),this._render=At(()=>Nl(this),0),this._unmutate=dt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Nl=t=>{let e=Number(E(t,Te)),n=Number(E(t,Ae));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,r=E(t,gi),{next:a,prev:s,pages:c}=vi({current:e,total:n,show:i});o.forEach((l,d)=>{let u=d?o[d+1]?c[d-1]?.page:a:s;E(l,"aria-current",c[d-1]?.current?"true":null),E(l,"aria-label",`${u??"hidden"}`),E(l,"role",u?null:"none"),E(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&E(l,"value",`${u}`),r&&E(l,"href",r.replace("%d",`${u}`))})}},Rl=(t,e,n=1/0)=>{let 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),a=Array.from({length:r+1-i},(s,c)=>c+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a};$.define("ds-pagination",bi);var wi=class extends Ge{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>ql(this),this._unmutate=dt(this,this._render,{childList:!0}),R(this,"toggle",yi,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,un(this,"toggle",yi,B)}};const ql=({control:t,list:e})=>{t&&!t.placeholder&&E(t,"placeholder"," "),t&&E(t,"popovertarget",ut(e)||null),e&&E(e,"popover","manual")},yi=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};$.define("ds-suggestion",wi);var xi=class extends $e{},Ei=class extends tn{},Si=class extends nn{},ki=class extends rn{};$.define("ds-tabs",xi),$.define("ds-tablist",Ei),$.define("ds-tab",Si),$.define("ds-tabpanel",ki);function Wl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Pl(){document.addEventListener("invoke",m=>{m.type=="invoke"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0),document.addEventListener("command",m=>{m.type=="command"&&m.isTrusted&&(m.stopImmediatePropagation(),m.preventDefault())},!0);function t(m,g,h=!0){Object.defineProperty(m,g,{...Object.getOwnPropertyDescriptor(m,g),enumerable:h})}function e(m){return m&&typeof m.getRootNode=="function"?m.getRootNode():m&&m.parentNode?e(m.parentNode):m}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:x}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");n.set(this,w||null),o.set(this,x!==void 0?String(x):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const g=n.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(m){Object.defineProperties(m.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),a.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?a.set(this,g):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=a.get(this);if(g)return g.isConnected?g:(a.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(m){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof m=="object"||typeof m=="function"?m:null),typeof m=="function"&&this.addEventListener("command",m)}}});function l(m){for(const g of m)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(m=>{for(const g of m){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function p(m){if(u.has(m)||(u.add(m),m.defaultPrevented)||m.type!=="click")return;const g=m.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=m.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw m.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const A=h.hasAttribute("command")?"command":"commandfor",k=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${A} attribute must also have a ${k} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const x=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(x),x.defaultPrevented)return;const y=x.command.toLowerCase();if(w.popover){const A=!w.matches(":popover-open");A&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!A&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const A=!w.hasAttribute("open");A&&y=="show-modal"?w.showModal():!A&&y=="close"?w.close(h.value?h.value:void 0):!A&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const k=new Event("cancel",{cancelable:!0});this.dispatchEvent(k),k.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function f(m){m.addEventListener("click",p,!0)}function v(m,g){const h=m.prototype.attachShadow;m.prototype.attachShadow=function(x){const y=h.call(this,x);return g(y),y};const w=m.prototype.attachInternals;m.prototype.attachInternals=function(){const x=w.call(this);return x.shadowRoot&&g(x.shadowRoot),x}}s(HTMLButtonElement),v(HTMLElement,m=>{f(m),d.observe(m,{attributeFilter:["oncommand"]}),l(m.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}var Le=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Vl=Le&&/android/i.test(navigator.userAgent),Ul=Le&&/firefox/i.test(navigator.userAgent),Ti;Le&&/^Mac/i.test(((Ti=navigator.userAgentData)==null?void 0:Ti.platform)||navigator.platform);function Ai(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ce="__uDetailsPolyfillSummarys";if(Le&&Vl&&Ul&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const n=e.parentElement;Ai(e,"role","button"),Ai(e,"aria-expanded",`${!!n&&!!n.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Dl=Object.defineProperty,Li=Object.getOwnPropertySymbols,zl=Object.prototype.hasOwnProperty,Fl=Object.prototype.propertyIsEnumerable,Ci=(t,e,n)=>e in t?Dl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bl=(t,e)=>{for(var n in e||(e={}))zl.call(e,n)&&Ci(t,n,e[n]);if(Li)for(var n of Li(e))Fl.call(e,n)&&Ci(t,n,e[n]);return t},zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Oe=zt&&/android/i.test(navigator.userAgent),Ln=zt&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oi;zt&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);var Gl=`${Oe?"data":"aria"}-labelledby`,Hl=":host(:not([hidden])) { display: block }",Jl="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Mi=typeof HTMLElement>"u"?class{}:HTMLElement;function L(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ii=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ft=(t,...e)=>Ii("add",t,e),Me=(t,...e)=>Ii("remove",t,e),Xl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Mn("slot"),Mn("style",e)),Ie=new WeakMap,Cn=(t,e)=>{if(e===void 0)return Ie.get(t);try{Ie.get(t).disconnect(),Ie.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ie.set(t,n)}},Ni=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},jl=0,On=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++jl).toString(32)}`),t.id):"",Mn=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},Ri={define:(t,e)=>!zt||window.customElements.get(t)||window.customElements.define(t,e)},ft,Zl=0,qi=t=>{ft||(ft=Mn("div"),ft.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",L(ft,"aria-live","assertive")),ft.isConnected||document.body.append(ft),t&&(ft.textContent=`${t}${Zl++%2?" ":""}`)},Kl=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},In=!1,Nn=t=>(t?.type==="mouseup"&&(In=!1),t?.type==="mousedown"&&(In=!0,Ft(document,"mouseup",Nn,{once:!0})),In),Yl=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Rn="disabled",Bt="selected",Ql=class extends Mi{static get observedAttributes(){return[Rn,Bt]}connectedCallback(){Ln||(this.tabIndex=-1),this.hasAttribute("role")||L(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){L(this,"aria-disabled",`${this.disabled}`),L(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Bt]}set defaultSelected(t){this[Bt]=t}get disabled(){return L(this,Rn)!==null}set disabled(t){L(this,Rn,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=L(this,"label"))!=null?t:this.text}set label(t){L(this,"label",t)}get selected(){return L(this,Bt)!==null}set selected(t){L(this,Bt,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=L(this,"value"))!=null?t:this.text}set value(t){L(this,"value",t)}};Ri.define("u-option",Ql);var qn=`${Hl}
194
+ }`,B={passive:!0,capture:!0},ct=()=>typeof window<"u"&&typeof document<"u",ss=()=>ct()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),me=typeof HTMLElement>"u"?class{}:HTMLElement;function Ct(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const dt=(t,...e)=>typeof window>"u"||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),E=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),ls=/^["']|["']$/g,qt=(t,e)=>{let n=E(t,e);return n||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(ls,"").trim()||null,n||dt(`Missing ${e} on:`,t),n},R=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>un(t,...e)},un=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},ut=(t,e)=>{ct()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))};let mn=!1;const mt=(t,e,n)=>{let o=0,i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{!mn&&!o&&(o=requestAnimationFrame(i))});return a.observe(t,n),requestAnimationFrame(i),r},Lo=(t,e)=>{mn=!0,t.textContent=e,requestAnimationFrame(cs)},cs=()=>{mn=!1},Co=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))E(n,o,i);return n},$={define:(t,e)=>!ct()||window.customElements.get(t)||window.customElements.define(t,e)};let ds=0;const us=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function pt(t){return t&&!t.id&&(t.id=`${us}${++ds}`),t?.id||""}const Mo=":click-delegate-hover",Oo="data-clickdelegatefor",ms=`[${Oo}]`,ps=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.isTrusted&&t.button<2&&Io(t);if(!(!n||n.contains(t.target))){if(e&&n instanceof HTMLAnchorElement)return window.open(n.href,void 0,n.rel);t.stopImmediatePropagation(),n.click()}};let pe;const fs=t=>{let e=Io(t);pe!==e&&(pe&&pe.classList.remove(Mo),e&&e.classList.add(Mo),pe=e)},Io=({target:t})=>{let e=(t instanceof Element?t.closest(ms):null)?.getAttribute(Oo),n=e&&document.getElementById(e)||void 0,o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&!n?.disabled?n:void 0};ut("clickdelegatefor",()=>[R(window,"click auxclick",ps,!0),R(document,"mouseover",fs,B)]);let pn=!1;const hs=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();pn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!pn&&E(e,"closedby")==="any";pn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},gs=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))E(t,"aria-haspopup","dialog")},vs=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();ut("dialog",()=>[R(document,"command",vs,B),R(document,"pointerdown pointerup",hs,B),mt(document,gs,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Mt=Math.min,U=Math.max,fe=Math.round,he=Math.floor,j=t=>({x:t,y:t}),bs={left:"right",right:"left",bottom:"top",top:"bottom"},ws={start:"end",end:"start"};function No(t,e,n){return U(t,Mt(e,n))}function ft(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function Wt(t){return t.split("-")[1]}function fn(t){return t==="x"?"y":"x"}function Ro(t){return t==="y"?"height":"width"}const ys=new Set(["top","bottom"]);function Z(t){return ys.has(tt(t))?"y":"x"}function qo(t){return fn(Z(t))}function xs(t,e,n){n===void 0&&(n=!1);const o=Wt(t),i=qo(t),r=Ro(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ge(a)),[a,ge(a)]}function Es(t){const e=ge(t);return[hn(t),e,hn(e)]}function hn(t){return t.replace(/start|end/g,e=>ws[e])}const Wo=["left","right"],Po=["right","left"],Ss=["top","bottom"],ks=["bottom","top"];function Ts(t,e,n){switch(t){case"top":case"bottom":return n?e?Po:Wo:e?Wo:Po;case"left":case"right":return e?Ss:ks;default:return[]}}function As(t,e,n,o){const i=Wt(t);let r=Ts(tt(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(hn)))),r}function ge(t){return t.replace(/left|right|bottom|top/g,e=>bs[e])}function Ls(t){return{top:0,right:0,bottom:0,left:0,...t}}function Cs(t){return typeof t!="number"?Ls(t):{top:t,right:t,bottom:t,left:t}}function ve(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Vo(t,e,n){let{reference:o,floating:i}=t;const r=Z(e),a=qo(e),s=Ro(a),c=tt(e),l=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[s]/2-i[s]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Wt(e)){case"start":f[a]-=m*(n&&l?-1:1);break;case"end":f[a]+=m*(n&&l?-1:1);break}return f}async function Ms(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=ft(e,t),b=Cs(f),g=s[m?u==="floating"?"reference":"floating":u],h=ve(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),y=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},A=ve(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(h.top-A.top+b.top)/y.y,bottom:(A.bottom-h.bottom+b.bottom)/y.y,left:(h.left-A.left+b.left)/y.x,right:(A.right-h.right+b.right)/y.x}}const Os=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Vo(l,o,c),m=o,f={},b=0;for(let g=0;g<s.length;g++){var p;const{name:h,fn:w}=s[g],{x,y,data:A,reset:k}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:l,platform:{...a,detectOverflow:(p=a.detectOverflow)!=null?p:Ms},elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[h]:{...f[h],...A}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(l=k.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:d,y:u}=Vo(l,m,c)),g=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}},Is=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...g}=ft(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),w=Z(s),x=tt(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),A=m||(x||!p?[ge(s)]:Es(s)),k=b!=="none";!m&&k&&A.push(...As(s,p,b,y));const I=[s,...A],F=await c.detectOverflow(e,g),Et=[];let nt=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&Et.push(F[h]),u){const St=xs(i,a,y);Et.push(F[St[0]],F[St[1]])}if(nt=[...nt,{placement:i,overflows:Et}],!Et.every(St=>St<=0)){var Xt,jt;const St=(((Xt=r.flip)==null?void 0:Xt.index)||0)+1,Qn=I[St];if(Qn&&(!(u==="alignment"?w!==Z(Qn):!1)||nt.every(X=>Z(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:St,overflows:nt},reset:{placement:Qn}};let Kt=(jt=nt.filter(kt=>kt.overflows[0]<=0).sort((kt,X)=>kt.overflows[1]-X.overflows[1])[0])==null?void 0:jt.placement;if(!Kt)switch(f){case"bestFit":{var Zt;const kt=(Zt=nt.filter(X=>{if(k){const at=Z(X.placement);return at===w||at==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(at=>at>0).reduce((at,tu)=>at+tu,0)]).sort((X,at)=>X[1]-at[1])[0])==null?void 0:Zt[0];kt&&(Kt=kt);break}case"initialPlacement":Kt=s;break}if(i!==Kt)return{reset:{placement:Kt}}}return{}}}},Uo=new Set(["left","top"]);async function Ns(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=tt(n),s=Wt(n),c=Z(n)==="y",l=Uo.has(a)?-1:1,d=r&&c?-1:1,u=ft(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof b=="number"&&(f=s==="end"?b*-1:b),c?{x:f*d,y:m*l}:{x:m*l,y:f*d}}const Rs=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=e,c=await Ns(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:a}}}}},qs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:h=>{let{x:w,y:x}=h;return{x:w,y:x}}},...l}=ft(t,e),d={x:n,y:o},u=await r.detectOverflow(e,l),m=Z(tt(i)),f=fn(m);let b=d[f],p=d[m];if(a){const h=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=b+u[h],y=b-u[w];b=No(x,b,y)}if(s){const h=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=p+u[h],y=p-u[w];p=No(x,p,y)}const g=c.fn({...e,[f]:b,[m]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:a,[m]:s}}}}}},Ws=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ft(t,e),d={x:n,y:o},u=Z(i),m=fn(u);let f=d[m],b=d[u];const p=ft(s,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const x=m==="y"?"height":"width",y=r.reference[m]-r.floating[x]+g.mainAxis,A=r.reference[m]+r.reference[x]-g.mainAxis;f<y?f=y:f>A&&(f=A)}if(l){var h,w;const x=m==="y"?"width":"height",y=Uo.has(tt(i)),A=r.reference[u]-r.floating[x]+(y&&((h=a.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[x]+(y?0:((w=a.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);b<A?b=A:b>k&&(b=k)}return{[m]:f,[u]:b}}}},Ps=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:c=()=>{},...l}=ft(t,e),d=await a.detectOverflow(e,l),u=tt(i),m=Wt(i),f=Z(i)==="y",{width:b,height:p}=r.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(h=u,g=m==="end"?"top":"bottom");const w=p-d.top-d.bottom,x=b-d.left-d.right,y=Mt(p-d[g],w),A=Mt(b-d[h],x),k=!e.middlewareData.shift;let I=y,F=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(F=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(I=w),k&&!m){const nt=U(d.left,0),Xt=U(d.right,0),jt=U(d.top,0),Zt=U(d.bottom,0);f?F=b-2*(nt!==0||Xt!==0?nt+Xt:U(d.left,d.right)):I=p-2*(jt!==0||Zt!==0?jt+Zt:U(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:I});const Et=await a.getDimensions(s.floating);return b!==Et.width||p!==Et.height?{reset:{rects:!0}}:{}}}};function be(){return typeof window<"u"}function Ot(t){return Do(t)?(t.nodeName||"").toLowerCase():"#document"}function D(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function K(t){var e;return(e=(Do(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Do(t){return be()?t instanceof Node||t instanceof D(t).Node:!1}function G(t){return be()?t instanceof Element||t instanceof D(t).Element:!1}function Y(t){return be()?t instanceof HTMLElement||t instanceof D(t).HTMLElement:!1}function zo(t){return!be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof D(t).ShadowRoot}const Vs=new Set(["inline","contents"]);function Pt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Vs.has(i)}const Us=new Set(["table","td","th"]);function Ds(t){return Us.has(Ot(t))}const zs=[":popover-open",":modal"];function we(t){return zs.some(e=>{try{return t.matches(e)}catch{return!1}})}const Fs=["transform","translate","scale","rotate","perspective"],Bs=["transform","translate","scale","rotate","perspective","filter"],Gs=["paint","layout","strict","content"];function gn(t){const e=vn(),n=G(t)?H(t):t;return Fs.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Bs.some(o=>(n.willChange||"").includes(o))||Gs.some(o=>(n.contain||"").includes(o))}function Hs(t){let e=ot(t);for(;Y(e)&&!It(e);){if(gn(e))return e;if(we(e))return null;e=ot(e)}return null}function vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Js=new Set(["html","body","#document"]);function It(t){return Js.has(Ot(t))}function H(t){return D(t).getComputedStyle(t)}function ye(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ot(t)==="html")return t;const e=t.assignedSlot||t.parentNode||zo(t)&&t.host||K(t);return zo(e)?e.host:e}function Fo(t){const e=ot(t);return It(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&Pt(e)?e:Fo(e)}function Vt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Fo(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=D(i);if(r){const s=bn(a);return e.concat(a,a.visualViewport||[],Pt(i)?i:[],s&&n?Vt(s):[])}return e.concat(i,Vt(i,[],n))}function bn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Bo(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Y(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=fe(n)!==r||fe(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function wn(t){return G(t)?t:t.contextElement}function Nt(t){const e=wn(t);if(!Y(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Bo(e);let a=(r?fe(n.width):n.width)/o,s=(r?fe(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Xs=j(0);function Go(t){const e=D(t);return!vn()||!e.visualViewport?Xs:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function js(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==D(t)?!1:e}function ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=wn(t);let a=j(1);e&&(o?G(o)&&(a=Nt(o)):a=Nt(t));const s=js(r,n,o)?Go(r):j(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const m=D(r),f=o&&G(o)?D(o):o;let b=m,p=bn(b);for(;p&&o&&f!==b;){const g=Nt(p),h=p.getBoundingClientRect(),w=H(p),x=h.left+(p.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(p.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=x,l+=y,b=D(p),p=bn(b)}}return ve({width:d,height:u,x:c,y:l})}function xe(t,e){const n=ye(t).scrollLeft;return e?e.left+n:ht(K(t)).left+n}function Ho(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-xe(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Zs(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=K(o),s=e?we(e.floating):!1;if(o===a||s&&r)return n;let c={scrollLeft:0,scrollTop:0},l=j(1);const d=j(0),u=Y(o);if((u||!u&&!r)&&((Ot(o)!=="body"||Pt(a))&&(c=ye(o)),Y(o))){const f=ht(o);l=Nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=a&&!u&&!r?Ho(a,c):j(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-c.scrollTop*l.y+d.y+m.y}}function Ks(t){return Array.from(t.getClientRects())}function Ys(t){const e=K(t),n=ye(t),o=t.ownerDocument.body,i=U(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=U(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+xe(t);const s=-n.scrollTop;return H(o).direction==="rtl"&&(a+=U(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Jo=25;function Qs(t,e){const n=D(t),o=K(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;const d=vn();(!d||d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=xe(o);if(l<=0){const d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(o.clientWidth-u.clientWidth-f);b<=Jo&&(r-=b)}else l<=Jo&&(r+=l);return{width:r,height:a,x:s,y:c}}const _s=new Set(["absolute","fixed"]);function $s(t,e){const n=ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Y(t)?Nt(t):j(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:a,height:s,x:c,y:l}}function Xo(t,e,n){let o;if(e==="viewport")o=Qs(t,n);else if(e==="document")o=Ys(K(t));else if(G(e))o=$s(e,n);else{const i=Go(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ve(o)}function jo(t,e){const n=ot(t);return n===e||!G(n)||It(n)?!1:H(n).position==="fixed"||jo(n,e)}function tl(t,e){const n=e.get(t);if(n)return n;let o=Vt(t,[],!1).filter(s=>G(s)&&Ot(s)!=="body"),i=null;const r=H(t).position==="fixed";let a=r?ot(t):t;for(;G(a)&&!It(a);){const s=H(a),c=gn(a);!c&&s.position==="fixed"&&(i=null),(r?!c&&!i:!c&&s.position==="static"&&!!i&&_s.has(i.position)||Pt(a)&&!c&&jo(t,a))?o=o.filter(d=>d!==a):i=s,a=ot(a)}return e.set(t,o),o}function el(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?we(e)?[]:tl(e,this._c):[].concat(n),o],s=a[0],c=a.reduce((l,d)=>{const u=Xo(e,d,i);return l.top=U(u.top,l.top),l.right=Mt(u.right,l.right),l.bottom=Mt(u.bottom,l.bottom),l.left=U(u.left,l.left),l},Xo(e,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function nl(t){const{width:e,height:n}=Bo(t);return{width:e,height:n}}function ol(t,e,n){const o=Y(e),i=K(e),r=n==="fixed",a=ht(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const c=j(0);function l(){c.x=xe(i)}if(o||!o&&!r)if((Ot(e)!=="body"||Pt(i))&&(s=ye(e)),o){const f=ht(e,!0,r,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();r&&!o&&i&&l();const d=i&&!o&&!r?Ho(i,s):j(0),u=a.left+s.scrollLeft-c.x-d.x,m=a.top+s.scrollTop-c.y-d.y;return{x:u,y:m,width:a.width,height:a.height}}function yn(t){return H(t).position==="static"}function Zo(t,e){if(!Y(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return K(t)===n&&(n=n.ownerDocument.body),n}function Ko(t,e){const n=D(t);if(we(t))return n;if(!Y(t)){let i=ot(t);for(;i&&!It(i);){if(G(i)&&!yn(i))return i;i=ot(i)}return n}let o=Zo(t,e);for(;o&&Ds(o)&&yn(o);)o=Zo(o,e);return o&&It(o)&&yn(o)&&!gn(o)?n:o||Hs(t)||n}const il=async function(t){const e=this.getOffsetParent||Ko,n=this.getDimensions,o=await n(t.floating);return{reference:ol(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function rl(t){return H(t).direction==="rtl"}const al={convertOffsetParentRelativeRectToViewportRelativeRect:Zs,getDocumentElement:K,getClippingRect:el,getOffsetParent:Ko,getElementRects:il,getClientRects:Ks,getDimensions:nl,getScale:Nt,isElement:G,isRTL:rl};function Yo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function sl(t,e){let n=null,o;const i=K(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),r();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=l;if(s||e(),!m||!f)return;const b=he(u),p=he(i.clientWidth-(d+m)),g=he(i.clientHeight-(u+f)),h=he(d),x={rootMargin:-b+"px "+-p+"px "+-g+"px "+-h+"px",threshold:U(0,Mt(1,c))||1};let y=!0;function A(k){const I=k[0].intersectionRatio;if(I!==c){if(!y)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!Yo(l,t.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,x)}n.observe(t)}return a(!0),r}function ll(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=wn(t),d=i||r?[...l?Vt(l):[],...Vt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=l&&s?sl(l,n):null;let m=-1,f=null;a&&(f=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let b,p=c?ht(t):null;c&&g();function g(){const h=ht(t);p&&!Yo(p,h)&&n(),p=h,b=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",n),r&&w.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(b)}}const cl=Rs,dl=qs,ul=Is,ml=Ps,pl=Ws,fl=(t,e,n)=>{const o=new Map,i={platform:al,...n},r={...i.platform,_c:o};return Os(t,e,{...i,platform:r})},Qo="data-placement",_o="data-autoplacement",Ut=new Map;function hl(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&$o(o,"--_ds-floating");if(!r)return;if(e==="closed")return Ut.get(o)?.();if(!i){let b=o.getRootNode(),p=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&b?.querySelector?.(p)||void 0}if(!i||i===o||n&&n===e)return;let a=$o(o,"--_ds-floating-overscroll"),s=E(o,Qo)||E(i,Qo)||r,c=E(o,_o)||E(i,_o),l=parseFloat(getComputedStyle(o,"::before").height)||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(s==="none")return;let m={strategy:"absolute",placement:s,middleware:[cl(l||0),dl({padding:10,limiter:pl({offset:{mainAxis:u}})}),vl(),...c==="false"?[]:[ul({padding:10,crossAxis:!1})],...a?[ml({apply({availableHeight:b}){a==="fit"&&(o.style.width=`${i.clientWidth}px`),o.style.maxHeight=`${Math.max(50,b-20)}px`}})]:[]]},f=ll(i,o,async()=>{if(!i?.isConnected)return Ut.get(o)?.();let{x:b,y:p}=await fl(i,o,m);o.style.translate=`${b}px ${p}px`});Ut.set(o,()=>Ut.delete(o)&&f())}let Ee;const gl=({type:t})=>{if(t==="mousedown"&&(Ee=!1),t==="scroll"&&Ee===!1&&(Ee=!0),t==="mouseup"&&Ee)for(let[e]of Ut)e.showPopover()};ut("popover",()=>[R(document,"mousedown scroll mouseup",gl,!0),R(document,"toggle ds-toggle-source",hl,B)]);const $o=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),vl=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),E(e,"data-floating",t.placement),t}}),xn=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||E(t,"aria-readonly")==="true"),bl=t=>{if(t.key!=="Tab"&&xn(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&E(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),n=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+n)%e.length]?.focus()}},wl=t=>{let e=t.target?.closest?.("label")?.control||t.target;xn(e)&&(t.preventDefault(),e.focus())},yl=t=>{t.target instanceof HTMLSelectElement&&xn(t.target)&&t.preventDefault()};ut("readonly",()=>[R(document,"keydown",bl),R(document,"click",wl),R(document,"mousedown",yl)]);const En="data-toggle-group",ti=`[${En}]`,xl=Ct(()=>{for(let t of document.querySelectorAll(ti))E(t,"aria-label",qt(t,En))},0),El=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(ti);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let n=e.getElementsByTagName("input"),o=[...n].indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1;n[(n.length+o+i)%n.length]?.focus()}};ut("toggle-group",()=>[R(document,"keydown",El),mt(document,xl,{attributeFilter:[En],attributes:!0,childList:!0,subtree:!0})]);let W,Se,ei=0,ni=0;const gt="data-tooltip",Sn="data-color",oi="aria-label",ii="aria-description",Sl=`[${Sn}]`,kl=`[${gt}]`,kn="data-color-scheme",Tl=`[${kn}]`,ri=t=>{t&&!(t instanceof HTMLElement)&&dt("setTooltipElement expects an HTMLElement, got: ",t),W=t||void 0},Al=Ct(()=>{for(let t of document.querySelectorAll(kl)){let e=t.getAttribute(oi)||t.getAttribute(ii),n=t.getAttribute(gt)||qt(t,gt);if(e!==n){let o=E(t,"role")!=="img"&&t.textContent?.trim();E(t,gt,n),E(t,oi,o?null:n),E(t,ii,o?n:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||dt('Missing tabindex="0" attribute on: ',t)}}},0),ai=({type:t,target:e})=>{if(clearTimeout(ei),e===W)return;if(t==="mouseover"&&!Se){ei=setTimeout(ai,300,{target:e});return}let n=e?.closest?.(`[${gt}]`);if(n===Se)return;if(!n)return si();W||=Co("div",{class:"ds-tooltip"}),W.isConnected||document.body.appendChild(W);let o=n.closest(Sl),i=n.closest(Tl),r=o!==i&&o?.contains(i);clearTimeout(ni),E(W,"popover","manual"),E(W,kn,i?.getAttribute(kn)||null),E(W,Sn,r&&o?.getAttribute(Sn)||null),Lo(W,E(n,gt)),W.showPopover(),W.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),Se=n},si=()=>W?.isConnected&&W.popover&&W.hidePopover(),li=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&si();t?t.target===W&&t.newState==="closed"&&(ni=setTimeout(li,300)):Se=void 0};ut("tooltip",()=>[R(document,"blur focus mouseover",ai,B),R(document,"toggle keydown",li,B),mt(document,Al,{attributeFilter:[gt],attributes:!0,childList:!0,subtree:!0})]);const Tn="aria-label";var ci=class extends me{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Tn]}connectedCallback(){this._label=qt(this,Tn),this._items=this.getElementsByTagName("a"),this._render=Ct(()=>Ll(this),100),this._unresize=R(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,n,o){o&&(this._label=o),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Ll=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;E(t,"role",o?null:"navigation"),E(t,Tn,o?null:t._label);for(let i of t._items||[])E(i,"aria-current",i===n?"page":null)};$.define("ds-breadcrumbs",ci);var di=class extends me{connectedCallback(){R(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let n=this.querySelector("h2,h3,h4,h5,h6");n&&E(this,"aria-labelledby",pt(n)),E(this,"tabindex","-1"),this.focus()}disconnectedCallback(){un(this,"animationend",this,B)}};$.define("ds-error-summary",di);const ui="data-indeterminate",An=new Set,mi=new WeakMap,Cl=ct()?document.getElementsByTagName("fieldset"):[],Ml=ct()&&CSS.supports("field-sizing","content"),Ol=ss()?800:200,pi=new WeakSet,fi=Ct(()=>{for(let t of Cl)E(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of An){let e=[],n=[],o,i,r=!1,a=!1;for(let s of t.getElementsByTagName("*"))if(s instanceof HTMLLabelElement&&n.push(s),!s.hidden)if(Nl(s))o?dt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):o=s;else{let c=s.getAttribute("data-field");c==="counter"&&(i=s),c==="validation"?(e.unshift(s),r=!0,a||=gi(s)):c&&e.push(s)}if(!o)dt("Field is missing input element:",t);else{i&&mi.set(o,i);for(let d of n)E(d,"for",pt(o));let s=o.type==="radio"||o.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(r=!0,a||=gi(c),e.unshift(c));let l=E(o,ui);l&&(o.indeterminate=l==="true"),E(t,"data-clickdelegatefor",s?pt(o):null),E(o,"aria-describedby",e.map(pt).join(" ")||null),(r||pi.has(o))&&(pi[r?"add":"delete"](o),E(o,"aria-invalid",`${a}`)),hi(o)}}},0),Dt=ct()?Co("div",{"aria-live":"polite",style:"position:fixed;white-space:nowrap;clip:rect(0 0 0 0)"}):null,hi=t=>{let e=t.target||t,n=mi.get(e);if(n?.isConnected){let o=(Number(E(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",r=qt(n,`data-${i}`)?.replace("%d",`${Math.abs(o)}`);E(n,"data-label",r),E(n,"data-state",i),E(n,"data-color",o<0?"danger":null),t.type==="input"&&Dt&&r&&(Dt?.isConnected||document.body.appendChild(Dt),Il(e,r))}!Ml&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Il=Ct((t,e)=>{let n=document.activeElement===t;Dt?.isConnected&&n&&Lo(Dt,e)},Ol),gi=t=>t.getAttribute("data-color")!=="success",Nl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var ke=class extends me{connectedCallback(){An.add(this),fi()}disconnectedCallback(){An.delete(this)}};$.define("ds-field",ke),ut("field",()=>[R(document,"input",hi,B),mt(document,fi,{attributeFilter:["data-field","data-limit","hidden","value",ui],attributes:!0,childList:!0,subtree:!0})]);const Ln="aria-label",Te="data-current",Ae="data-total",vi="data-href",bi=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:ql(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var wi=class extends me{_unmutate;_render;static get observedAttributes(){return[Ln,Te,Ae,vi]}connectedCallback(){let t=E(this,Ae),e=E(this,Te);e&&!t&&dt(`Missing ${Ae} attribute on:`,this),t&&!e&&dt(`Missing ${Te} attribute on:`,this),E(this,Ln,qt(this,Ln)),E(this,"role","navigation"),this._render=Ct(()=>Rl(this),0),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(){this._render?.()}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Rl=t=>{let e=Number(E(t,Te)),n=Number(E(t,Ae));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,r=E(t,vi),{next:a,prev:s,pages:c}=bi({current:e,total:n,show:i});o.forEach((l,d)=>{let u=d?o[d+1]?c[d-1]?.page:a:s;E(l,"aria-current",c[d-1]?.current?"true":null),E(l,"aria-label",`${u??"hidden"}`),E(l,"role",u?null:"none"),E(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&E(l,"value",`${u}`),r&&l instanceof HTMLAnchorElement&&E(l,"href",r.replace("%d",`${u}`))})}},ql=(t,e,n=1/0)=>{let 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),a=Array.from({length:r+1-i},(s,c)=>c+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a};$.define("ds-pagination",wi);var yi=class extends Ge{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Wl(this),this._unmutate=mt(this,this._render,{childList:!0}),R(this,"toggle",xi,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,un(this,"toggle",xi,B)}};const Wl=({control:t,list:e})=>{t&&!t.placeholder&&E(t,"placeholder"," "),t&&E(t,"popovertarget",pt(e)||null),e&&E(e,"popover","manual")},xi=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};$.define("ds-suggestion",yi);var Ei=class extends $e{},Si=class extends tn{},ki=class extends nn{},Ti=class extends rn{};$.define("ds-tabs",Ei),$.define("ds-tablist",Si),$.define("ds-tab",ki),$.define("ds-tabpanel",Ti);function Pl(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Vl(){document.addEventListener("invoke",p=>{p.type=="invoke"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0),document.addEventListener("command",p=>{p.type=="command"&&p.isTrusted&&(p.stopImmediatePropagation(),p.preventDefault())},!0);function t(p,g,h=!0){Object.defineProperty(p,g,{...Object.getOwnPropertyDescriptor(p,g),enumerable:h})}function e(p){return p&&typeof p.getRootNode=="function"?p.getRootNode():p&&p.parentNode?e(p.parentNode):p}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:x}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");n.set(this,w||null),o.set(this,x!==void 0?String(x):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw new TypeError("illegal invocation");const g=n.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!o.has(this))throw new TypeError("illegal invocation");return o.get(this)}get action(){throw new Error("CommandEvent#action was renamed to CommandEvent#command")}get invoker(){throw new Error("CommandEvent#invoker was renamed to CommandEvent#source")}}t(i.prototype,"source"),t(i.prototype,"command");class r extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const a=new WeakMap;function s(p){Object.defineProperties(p.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(g){if(this.hasAttribute("invokeaction"))throw new TypeError("Element has deprecated `invokeaction` attribute, replace with `command`");if(this.hasAttribute("invoketarget"))throw new TypeError("Element has deprecated `invoketarget` attribute, replace with `commandfor`");if(g===null)this.removeAttribute("commandfor"),a.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?a.set(this,g):a.delete(this)}else throw new TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button")return null;if(this.hasAttribute("invokeaction")||this.hasAttribute("invoketarget"))return console.warn("Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead"),null;if(this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;const g=a.get(this);if(g)return g.isConnected?g:(a.delete(this),null);const h=e(this),w=this.getAttribute("commandfor");return(h instanceof Document||h instanceof ShadowRoot)&&w&&h.getElementById(w)||null}},command:{enumerable:!0,configurable:!0,get(){const g=this.getAttribute("command")||"";if(g.startsWith("--"))return g;const h=g.toLowerCase();switch(h){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return h}return""},set(g){this.setAttribute("command",g)}},invokeAction:{enumerable:!1,configurable:!0,get(){throw new Error("invokeAction is deprecated. It has been renamed to command")},set(g){throw new Error("invokeAction is deprecated. It has been renamed to command")}},invokeTargetElement:{enumerable:!1,configurable:!0,get(){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")},set(g){throw new Error("invokeTargetElement is deprecated. It has been renamed to command")}}})}const c=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return d.takeRecords(),c.get(this)||null},set(p){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof p=="object"||typeof p=="function"?p:null),typeof p=="function"&&this.addEventListener("command",p)}}});function l(p){for(const g of p)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(p=>{for(const g of p){const{target:h}=g;g.type==="childList"?l(h.querySelectorAll("[oncommand]")):l([h])}});d.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));const u=new WeakSet;function m(p){if(u.has(p)||(u.add(p),p.defaultPrevented)||p.type!=="click")return;const g=p.target.closest("button[invoketarget], button[invokeaction], input[invoketarget], input[invokeaction]");if(g&&(console.warn("Elements with `invoketarget` or `invokeaction` are deprecated and should be renamed to use `commandfor` and `command` respectively"),g.matches("input")))throw new Error("Input elements no longer support `commandfor`");const h=p.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw p.preventDefault(),new Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(h.hasAttribute("command")!==h.hasAttribute("commandfor")){const A=h.hasAttribute("command")?"command":"commandfor",k=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${A} attribute must also have a ${k} attribute to function.`)}if(h.command!=="show-popover"&&h.command!=="hide-popover"&&h.command!=="toggle-popover"&&h.command!=="show-modal"&&h.command!=="request-close"&&h.command!=="close"&&!h.command.startsWith("--")){console.warn(`"${h.command}" is not a valid command value. Custom commands must begin with --`);return}const w=h.commandForElement;if(!w)return;const x=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(x),x.defaultPrevented)return;const y=x.command.toLowerCase();if(w.popover){const A=!w.matches(":popover-open");A&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!A&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const A=!w.hasAttribute("open");A&&y=="show-modal"?w.showModal():!A&&y=="close"?w.close(h.value?h.value:void 0):!A&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const k=new Event("cancel",{cancelable:!0});this.dispatchEvent(k),k.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function f(p){p.addEventListener("click",m,!0)}function b(p,g){const h=p.prototype.attachShadow;p.prototype.attachShadow=function(x){const y=h.call(this,x);return g(y),y};const w=p.prototype.attachInternals;p.prototype.attachInternals=function(){const x=w.call(this);return x.shadowRoot&&g(x.shadowRoot),x}}s(HTMLButtonElement),b(HTMLElement,p=>{f(p),d.observe(p,{attributeFilter:["oncommand"]}),l(p.querySelectorAll("[oncommand]"))}),f(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:r})}var Le=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ul=Le&&/android/i.test(navigator.userAgent),Dl=Le&&/firefox/i.test(navigator.userAgent),Ai;Le&&/^Mac/i.test(((Ai=navigator.userAgentData)==null?void 0:Ai.platform)||navigator.platform);function Li(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ce="__uDetailsPolyfillSummarys";if(Le&&Ul&&Dl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const n=e.parentElement;Li(e,"role","button"),Li(e,"aria-expanded",`${!!n&&!!n.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var zl=Object.defineProperty,Ci=Object.getOwnPropertySymbols,Fl=Object.prototype.hasOwnProperty,Bl=Object.prototype.propertyIsEnumerable,Mi=(t,e,n)=>e in t?zl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gl=(t,e)=>{for(var n in e||(e={}))Fl.call(e,n)&&Mi(t,n,e[n]);if(Ci)for(var n of Ci(e))Bl.call(e,n)&&Mi(t,n,e[n]);return t},zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Me=zt&&/android/i.test(navigator.userAgent),Cn=zt&&/iPad|iPhone|iPod/.test(navigator.userAgent),Oi;zt&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);var Hl=`${Me?"data":"aria"}-labelledby`,Jl=":host(:not([hidden])) { display: block }",Xl="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Ii=typeof HTMLElement>"u"?class{}:HTMLElement;function L(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Ni=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Ft=(t,...e)=>Ni("add",t,e),Oe=(t,...e)=>Ni("remove",t,e),jl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(In("slot"),In("style",e)),Ie=new WeakMap,Mn=(t,e)=>{if(e===void 0)return Ie.get(t);try{Ie.get(t).disconnect(),Ie.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ie.set(t,n)}},Ri=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},Zl=0,On=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Zl).toString(32)}`),t.id):"",In=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},qi={define:(t,e)=>!zt||window.customElements.get(t)||window.customElements.define(t,e)},vt,Kl=0,Wi=t=>{vt||(vt=In("div"),vt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",L(vt,"aria-live","assertive")),vt.isConnected||document.body.append(vt),t&&(vt.textContent=`${t}${Kl++%2?" ":""}`)},Yl=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Nn=!1,Rn=t=>(t?.type==="mouseup"&&(Nn=!1),t?.type==="mousedown"&&(Nn=!0,Ft(document,"mouseup",Rn,{once:!0})),Nn),Ql=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,qn="disabled",Bt="selected",_l=class extends Ii{static get observedAttributes(){return[qn,Bt]}connectedCallback(){Cn||(this.tabIndex=-1),this.hasAttribute("role")||L(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){L(this,"aria-disabled",`${this.disabled}`),L(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Bt]}set defaultSelected(t){this[Bt]=t}get disabled(){return L(this,qn)!==null}set disabled(t){L(this,qn,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=L(this,"label"))!=null?t:this.text}set label(t){L(this,"label",t)}get selected(){return L(this,Bt)!==null}set selected(t){L(this,Bt,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=L(this,"value"))!=null?t:this.text}set value(t){L(this,"value",t)}};qi.define("u-option",_l);var Wn=`${Jl}
195
195
  ::slotted([role="option"]) { display: block; cursor: pointer }
196
- ::slotted([role="option"]:focus) { ${Jl} }
196
+ ::slotted([role="option"]:focus) { ${Xl} }
197
197
  ::slotted([role="option"][aria-hidden="true"]),
198
198
  ::slotted([role="option"][disabled]),
199
- ::slotted([role="option"][hidden]) { display: none !important }`,_l=Yl(qn),Wi,Pi=0,$l=Ln||Oe,Vi="click,focusout,input,keydown,mousedown,mouseup",Ui="focus,focusin,blur,focusout",Ne={singular:"%d hit",plural:"%d hits"},Di=class extends Mi{constructor(){super(),this._texts=Bl({},Ne),this._value="",this._of="/",Xl(this,qn)}static get observedAttributes(){return["id",...Object.keys(Ne).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ni(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),Cn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Cn(this,!1),Wn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ne[o])this._texts[o]=n||Ne[o];else if(this._root){this._input&&Pn(this,this._input);for(const r of this._root.querySelectorAll(i))Pn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&nc(this,t),(n==="focus"||n==="focusin")&&tc(this,t),(n==="blur"||n==="focusout")&&ec(this,t),n==="keydown"&&oc(this,t),n==="mousedown"&&this.contains(e)&&Nn(t),(n==="mutation"||n==="input")&&(clearTimeout(Pi),Pi=setTimeout(Bi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},zi=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=zi(t?._input)||!e,(n=Cn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Pn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&Bi(t)},Wn=t=>{t._input&&(Me(t._input||t,Ui,t),Me(t._root||t,Vi,t),Gt(t,!1),t._input=void 0)},Pn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",On(t)),Ft(e,Ui,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",On(t)),L(e,"aria-expanded",`${!$l||n}`),L(e,"autocomplete","off"),L(e,"role",zi(e)?null:"combobox")},tc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Wn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Gl,On((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Vi,t),Gt(t,L(t._input,"inputmode")!=="none"),qi())},ec=(t,e)=>{!Oe&&!Nn()&&t._input&&setTimeout(Fi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Fi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Wn(t))},nc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),Kl(t._input,o.value);Oe&&Fi(t)},oc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},Bi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(Wi),e?.type==="input"&&a!==t._value&&(Wi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&qi(p),t._value=a},1e3));let u=0;if(Ln)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ni(this).getElementById(L(this,"list")||"")}}),Ri.define("u-datalist",Di),lt()&&!Wl()&&Pl();const ic="3.1.4",Gi="_alert_1d3iq_1 _ds-alert_1p2fg_3",Hi="_app_1d3iq_1",Ji="_sticky_1d3iq_1",Xi="_avatar_1d3iq_1 _ds-avatar_1p2fg_1",ji="_badge_1d3iq_1",Zi="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_1p2fg_5",Ki="_button_1d3iq_1 _ds-button_1p2fg_1",Yi="_card_1d3iq_1",Qi="_group_1d3iq_1",_i="_chip_1d3iq_1 _ds-chip_1p2fg_5",$i="_details_1d3iq_1 _ds-details_1p2fg_3",tr="_dialog_1d3iq_1 _ds-dialog_1p2fg_5",er="__drawer_1d3iq_1",nr="_divider_1d3iq_1",or="_errorsummary_1d3iq_1 _ds-error-summary_1p2fg_5",ir="_field_1d3iq_1 _ds-field_1p2fg_1",rr="_suggestion_1d3iq_1 _ds-suggestion_1p2fg_5",ar="_affixes_1d3iq_1 _ds-field-affixes_1p2fg_3",sr="_fieldset_1d3iq_1 _ds-fieldset_1p2fg_3",lr="_fileupload_1d3iq_1",cr="_helptext_1d3iq_1 _ds-focus_1p2fg_1",dr="_input_1d3iq_1 _ds-input_1p2fg_1",ur="_law_1d3iq_1",pr="_grid_1d3iq_1",mr="_flex_1d3iq_1",fr="_link_1d3iq_1",hr="_logo_1d3iq_1",gr="__logo_1d3iq_1",vr="_pagination_1d3iq_1 _ds-pagination_1p2fg_5",br="_popover_1d3iq_1 _ds-popover_1p2fg_3",wr="_progress_1d3iq_1",yr="__indeterminate_1d3iq_1",xr="_skeleton_1d3iq_1 _ds-skeleton_1p2fg_5",Er="__skeleton_1d3iq_1",Sr="_spinner_1d3iq_1",kr="_steps_1d3iq_1",Tr="_table_1d3iq_1 _ds-table_1p2fg_5",Ar="__scrollShadow_1d3iq_1",Lr="_tabs_1d3iq_1 _ds-tabs_1p2fg_5",Cr="__scrollMask_1d3iq_1",Or="_tag_1d3iq_1 _ds-tag_1p2fg_5",Mr="_toast_1d3iq_1",Ir="__toastClose_1d3iq_1",Nr="__toastOpen_1d3iq_1",Rr="__toastTimeout_1d3iq_1",qr="_togglegroup_1d3iq_1 _ds-toggle-group_1p2fg_5",Wr="__tooltip_1d3iq_1 _ds-tooltip_1p2fg_5",Pr="_heading_1d3iq_1 _ds-heading_1p2fg_1",Vr="_ingress_1d3iq_1",Ur="_muted_1d3iq_1",Dr="_info_1d3iq_1",zr="_prose_1d3iq_1",Fr="_validation_1d3iq_1 _ds-validation-message_1p2fg_1",Br="_body_1d3iq_161",Gr="__checked_1d3iq_1",C={alert:Gi,app:Hi,sticky:Ji,avatar:Xi,badge:ji,breadcrumbs:Zi,button:Ki,card:Yi,group:Qi,chip:_i,details:$i,dialog:tr,_drawer:er,divider:nr,errorsummary:or,field:ir,suggestion:rr,affixes:ar,fieldset:sr,fileupload:lr,helptext:cr,input:dr,law:ur,grid:pr,flex:mr,link:fr,logo:hr,_logo:gr,pagination:vr,popover:br,progress:wr,_indeterminate:yr,skeleton:xr,_skeleton:Er,spinner:Sr,steps:kr,table:Tr,_scrollShadow:Ar,tabs:Lr,_scrollMask:Cr,tag:Or,toast:Mr,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,togglegroup:qr,_tooltip:Wr,heading:Pr,ingress:Vr,muted:Ur,info:Dr,prose:zr,validation:Fr,body:Br,_checked:Gr},rc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Gr,_drawer:er,_indeterminate:yr,_logo:gr,_scrollMask:Cr,_scrollShadow:Ar,_skeleton:Er,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,_tooltip:Wr,affixes:ar,alert:Gi,app:Hi,avatar:Xi,badge:ji,body:Br,breadcrumbs:Zi,button:Ki,card:Yi,chip:_i,default:C,details:$i,dialog:tr,divider:nr,errorsummary:or,field:ir,fieldset:sr,fileupload:lr,flex:mr,grid:pr,group:Qi,heading:Pr,helptext:cr,info:Dr,ingress:Vr,input:dr,law:ur,link:fr,logo:hr,muted:Ur,pagination:vr,popover:br,progress:wr,prose:zr,skeleton:xr,spinner:Sr,steps:kr,sticky:Ji,suggestion:rr,table:Tr,tabs:Lr,tag:Or,toast:Mr,togglegroup:qr,validation:Fr},Symbol.toStringTag,{value:"Module"}));function Hr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Hr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function ac(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Hr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},Q=()=>typeof window<"u"&&typeof document<"u",ht=t=>Q()?document.getElementsByClassName(C[t].split(" ")[0]):[];function gt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const b=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),W=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Jr(t,...e)},Jr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},vt=(t,e)=>{if(!Q())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?W(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Re=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))b(o,i,r);return o},sc=typeof HTMLElement>"u"?class{}:HTMLElement,lc=(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e),cc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,dc=`.${C.breadcrumbs.split(" ")[0]}`,uc=`.${C.card.split(" ")[0]}`,Xr=`.${C.chip.split(" ")[0]}`,pc=`.${C.helptext.split(" ")[0]}`,mc=`.${C.pagination.split(" ")[0]}`,fc='summary,u-summary,a,button,[role="tab"],[role="button"]',Vn="mattilsynet.matomo.cloud",hc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],J="mtds-analytics-banner",gc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function jr(t,e={}){if(Q()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Vn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&vc();const a=r?`https://cdn.matomo.cloud/${Vn}/container_${r}.js`:`https://cdn.matomo.cloud/${Vn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;hc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function vc(){if(document.getElementById(J)||window.localStorage.getItem(J))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${J}" data-analytics="ignore"><style>
199
+ ::slotted([role="option"][hidden]) { display: none !important }`,$l=Ql(Wn),Pi,Vi=0,tc=Cn||Me,Ui="click,focusout,input,keydown,mousedown,mouseup",Di="focus,focusin,blur,focusout",Ne={singular:"%d hit",plural:"%d hits"},zi=class extends Ii{constructor(){super(),this._texts=Gl({},Ne),this._value="",this._of="/",jl(this,Wn)}static get observedAttributes(){return["id",...Object.keys(Ne).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ri(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),Mn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Oe(this._root||this,"focus",this,!0),Oe(this._root||this,"focusin",this),Mn(this,!1),Pn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ne[o])this._texts[o]=n||Ne[o];else if(this._root){this._input&&Vn(this,this._input);for(const r of this._root.querySelectorAll(i))Vn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&oc(this,t),(n==="focus"||n==="focusin")&&ec(this,t),(n==="blur"||n==="focusout")&&nc(this,t),n==="keydown"&&ic(this,t),n==="mousedown"&&this.contains(e)&&Rn(t),(n==="mutation"||n==="input")&&(clearTimeout(Vi),Vi=setTimeout(Gi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},Fi=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Fi(t?._input)||!e,(n=Mn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Vn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&Gi(t)},Pn=t=>{t._input&&(Oe(t._input||t,Di,t),Oe(t._root||t,Ui,t),Gt(t,!1),t._input=void 0)},Vn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",On(t)),Ft(e,Di,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",On(t)),L(e,"aria-expanded",`${!tc||n}`),L(e,"autocomplete","off"),L(e,"role",Fi(e)?null:"combobox")},ec=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Pn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Hl,On((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Ui,t),Gt(t,L(t._input,"inputmode")!=="none"),Wi())},nc=(t,e)=>{!Me&&!Rn()&&t._input&&setTimeout(Bi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Bi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Pn(t))},oc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),Yl(t._input,o.value);Me&&Bi(t)},ic=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let m=-1;if(o==="ArrowDown"&&(m=(u+1)%d.length),o==="ArrowUp"&&(m=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(m=0),(o==="End"||o==="PageDown")&&(m=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[m])for(const f of d)f.tabIndex=-1;d[m]&&e.preventDefault(),(n=d[m]||t._input)==null||n.focus(),!d[m]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},Gi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const m of r)(m.disabled||m.hidden||s&&!m.label.toLowerCase().includes(a)?c:l).push(m);for(const m of c)L(m,"aria-hidden","true");for(const m of l)L(m,"aria-hidden","false");const d=l.length;clearTimeout(Pi),e?.type==="input"&&a!==t._value&&(Pi=setTimeout(()=>{const m=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&Wi(m),t._value=a},1e3));let u=0;if(Cn)for(const m of l)L(m,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ri(this).getElementById(L(this,"list")||"")}}),qi.define("u-datalist",zi),ct()&&!Pl()&&Vl();const rc="3.1.6",Hi="_alert_1d3iq_1 _ds-alert_s9m4f_3",Ji="_app_1d3iq_1",Xi="_sticky_1d3iq_1",ji="_avatar_1d3iq_1 _ds-avatar_s9m4f_1",Zi="_badge_1d3iq_1",Ki="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_s9m4f_5",Yi="_button_1d3iq_1 _ds-button_s9m4f_1",Qi="_card_1d3iq_1",_i="_group_1d3iq_1",$i="_chip_1d3iq_1 _ds-chip_s9m4f_5",tr="_details_1d3iq_1 _ds-details_s9m4f_3",er="_dialog_1d3iq_1 _ds-dialog_s9m4f_5",nr="__drawer_1d3iq_1",or="_divider_1d3iq_1",ir="_errorsummary_1d3iq_1 _ds-error-summary_s9m4f_5",rr="_field_1d3iq_1 _ds-field_s9m4f_1",ar="_suggestion_1d3iq_1 _ds-suggestion_s9m4f_5",sr="_affixes_1d3iq_1 _ds-field-affixes_s9m4f_3",lr="_fieldset_1d3iq_1 _ds-fieldset_s9m4f_3",cr="_fileupload_1d3iq_1",dr="_helptext_1d3iq_1 _ds-focus_s9m4f_1",ur="_input_1d3iq_1 _ds-input_s9m4f_1",mr="_law_1d3iq_1",pr="_grid_1d3iq_1",fr="_flex_1d3iq_1",hr="_link_1d3iq_1",gr="_logo_1d3iq_1",vr="__logo_1d3iq_1",br="_pagination_1d3iq_1 _ds-pagination_s9m4f_5",wr="_popover_1d3iq_1 _ds-popover_s9m4f_3",yr="_progress_1d3iq_1",xr="__indeterminate_1d3iq_1",Er="_skeleton_1d3iq_1 _ds-skeleton_s9m4f_5",Sr="__skeleton_1d3iq_1",kr="_spinner_1d3iq_1",Tr="_steps_1d3iq_1",Ar="_table_1d3iq_1 _ds-table_s9m4f_5",Lr="__scrollShadow_1d3iq_1",Cr="_tabs_1d3iq_1 _ds-tabs_s9m4f_5",Mr="__scrollMask_1d3iq_1",Or="_tag_1d3iq_1 _ds-tag_s9m4f_5",Ir="_toast_1d3iq_1",Nr="__toastClose_1d3iq_1",Rr="__toastOpen_1d3iq_1",qr="__toastTimeout_1d3iq_1",Wr="_togglegroup_1d3iq_1 _ds-toggle-group_s9m4f_5",Pr="__tooltip_1d3iq_1 _ds-tooltip_s9m4f_5",Vr="_heading_1d3iq_1 _ds-heading_s9m4f_1",Ur="_ingress_1d3iq_1",Dr="_muted_1d3iq_1",zr="_info_1d3iq_1",Fr="_prose_1d3iq_1",Br="_validation_1d3iq_1 _ds-validation-message_s9m4f_1",Gr="_body_1d3iq_161",Hr="__checked_1d3iq_1",C={alert:Hi,app:Ji,sticky:Xi,avatar:ji,badge:Zi,breadcrumbs:Ki,button:Yi,card:Qi,group:_i,chip:$i,details:tr,dialog:er,_drawer:nr,divider:or,errorsummary:ir,field:rr,suggestion:ar,affixes:sr,fieldset:lr,fileupload:cr,helptext:dr,input:ur,law:mr,grid:pr,flex:fr,link:hr,logo:gr,_logo:vr,pagination:br,popover:wr,progress:yr,_indeterminate:xr,skeleton:Er,_skeleton:Sr,spinner:kr,steps:Tr,table:Ar,_scrollShadow:Lr,tabs:Cr,_scrollMask:Mr,tag:Or,toast:Ir,_toastClose:Nr,_toastOpen:Rr,_toastTimeout:qr,togglegroup:Wr,_tooltip:Pr,heading:Vr,ingress:Ur,muted:Dr,info:zr,prose:Fr,validation:Br,body:Gr,_checked:Hr},ac=Object.freeze(Object.defineProperty({__proto__:null,_checked:Hr,_drawer:nr,_indeterminate:xr,_logo:vr,_scrollMask:Mr,_scrollShadow:Lr,_skeleton:Sr,_toastClose:Nr,_toastOpen:Rr,_toastTimeout:qr,_tooltip:Pr,affixes:sr,alert:Hi,app:Ji,avatar:ji,badge:Zi,body:Gr,breadcrumbs:Ki,button:Yi,card:Qi,chip:$i,default:C,details:tr,dialog:er,divider:or,errorsummary:ir,field:rr,fieldset:lr,fileupload:cr,flex:fr,grid:pr,group:_i,heading:Vr,helptext:dr,info:zr,ingress:Ur,input:ur,law:mr,link:hr,logo:gr,muted:Dr,pagination:br,popover:wr,progress:yr,prose:Fr,skeleton:Er,spinner:kr,steps:Tr,sticky:Xi,suggestion:ar,table:Ar,tabs:Cr,tag:Or,toast:Ir,togglegroup:Wr,validation:Br},Symbol.toStringTag,{value:"Module"}));function Jr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Jr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function sc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Jr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},Q=()=>typeof window<"u"&&typeof document<"u",bt=t=>Q()?document.getElementsByClassName(C[t].split(" ")[0]):[];function wt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),q=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Xr(t,...e)},Xr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{if(!Q())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?q(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Re=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))v(o,i,r);return o},lc=typeof HTMLElement>"u"?class{}:HTMLElement,cc=(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e),dc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,uc=`.${C.breadcrumbs.split(" ")[0]}`,mc=`.${C.card.split(" ")[0]}`,jr=`.${C.chip.split(" ")[0]}`,pc=`.${C.helptext.split(" ")[0]}`,fc=`.${C.pagination.split(" ")[0]}`,hc='summary,u-summary,a,button,[role="tab"],[role="button"]',Un="mattilsynet.matomo.cloud",gc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],J="mtds-analytics-banner",vc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function Zr(t,e={}){if(Q()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Un}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&bc();const a=r?`https://cdn.matomo.cloud/${Un}/container_${r}.js`:`https://cdn.matomo.cloud/${Un}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;gc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function bc(){if(document.getElementById(J)||window.localStorage.getItem(J))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${J}" data-analytics="ignore"><style>
200
200
  #${J}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
201
201
  #${J} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
202
202
  #${J} button:focus-visible { outline: 2px solid }
@@ -204,9 +204,9 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
204
204
  #${J} button:active { background: #054449; scale: .9 }
205
205
  #${J} p { margin: 0 .25em }
206
206
  </style>
207
- <p>Vi bruker <a href="${gc}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
207
+ <p>Vi bruker <a href="${vc}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
208
208
  <form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">&times;</button></form>
209
- </dialog>`);const e=document.getElementById(J),n=()=>window.localStorage.setItem(J,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function bc(t){window._mtdsTracking?.enabled&&setTimeout(wc,0,t)}function wc({type:t,target:e}){const n=t==="click"?e?.closest?.(fc):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=Zr(n)||Ec(n)||b(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=b(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(Xr)?"Chip":"Form",o="change",r=Zr(s||n)||Jt(s?.querySelector("legend"))||Jt(n?.labels?.[0])}else if(b(n,"role")==="tab")i="Tab",o="navigate";else if(b(n,"popovertarget")){if(!yc(n)?.matches(":popover-open"))return;i=n.closest(pc)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(cc)){const a=xc(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&b(n,"data-tooltip")||Jt(n)}else if(n.closest(dc))i="Breadcrumbs",o="navigate";else if(n.closest(mc))i="Pagination",o="navigate";else if(n.closest(uc))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(Xr))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(b(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");jr("event",{category:b(n,"data-analytics-category")??i,action:b(n,"data-analytics-action")??o,name:b(n,"data-analytics-name")??r})}const Jt=t=>t?.textContent?.trim()||"",Zr=t=>t&&b(t,"aria-label")||"",yc=t=>document.getElementById(b(t,"popovertarget")||""),xc=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Ec=t=>{const e=Jt(t),n=Jt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};vt("analytics",()=>[W(document,"click toggle submit change",bc,Ht)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const Un=C.app.split(" ")[0],Sc=`[data-command="toggle-app-expanded"],.${Un} > [command="show-modal"]`,Dn=`.${Un} > dialog,.${Un} dialog ~ main`,Kr=ht("sticky"),Yr=t=>{document.startViewTransition?document.startViewTransition(t):t()},Qr=t=>Yr(()=>window.mtdsToggleAppExpanded?.(t));function kc(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Dn))return _r();if(n||!(e instanceof HTMLButtonElement)||!e.matches(Sc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?Qr():Yr(()=>{const r=document.querySelector(Dn);r?.setAttribute("closedby","any"),r?.showModal()})}function _r(){document.querySelector(Dn)?.close()}let zn=0,Nt,et=0,Fn=0,qe=0,Bn=!1,Gn=0,bt=0;function Tc(){if(!Kr?.length)return;const t=Kr[0],e=window.scrollY,n=e<bt;bt=e,n!==Nt&&(zn=(t.parentElement?.getBoundingClientRect().top||0)+bt,Nt=n,Fn=t.offsetHeight,qe=t.getBoundingClientRect().top+bt,Bn=t.offsetHeight<=window.innerHeight,Gn=window.innerHeight),!(et===-1&&Bn)&&(et!==-1&&(Bn||Nt&&bt<=qe)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),et=-1):et===-1&&!Nt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,bt-zn)}px`),et=0):et!==1&&!Nt&&bt+Gn>=qe+Fn?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Gn-Fn}px`),et=1):et===1&&Nt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${qe-zn}px`),et=0))}vt("app",()=>[W(document,"click",kc,!0),W(window,"resize",gt(_r,100),Ht),W(window,"scroll",Tc,Ht)]);const Ac=/<[^>]+\bid="([^"]+)[^>]+>/gi,$r=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Lc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Cc=/kapittel-\d+-ledd-\d+/,Oc=/<button[^>]+>.*?<\/button>/g,Mc=/►m\d+/i,We=/<[^>]+>/g,Ic=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Nc=/<(\/?)(article|footer|section)/gi,Rc=/(src|href)="([^"]+)"/gi,qc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Wc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Pc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ta="https://lovdata.no/",Vc="https://www.mattilsynet.no/regelveiledning/?regelverk=",Uc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Hn=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Dc=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),zc=(t,e)=>{const n=Hn(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&b(o,"aria-checked",`${b(o,"aria-checked")!=="true"}`)})},Fc=(t,e)=>{const n=Hn(t);e?.querySelectorAll("button").forEach(o=>{b(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Bc=(t,e)=>{const n=ea(e);return Hn(t).map(o=>Hc(o,n)).filter(o=>!!o)},Gc=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Uc};for(const o of e.matchAll(Ic)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},ea=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Nc,"<$1div").replace(qc,"$1$2$3").replace(Rc,(e,n,o)=>`${n}="${o.includes(":")?"":ta}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Pc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${wt("id",n)}-ledd-0">${i}</div>`).replace(Wc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(Ac,(e,n,o,i)=>{const r=na(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,Hc=(t,e)=>{const n=Cc.test(t),o=t.split("-").map((l,d,u)=>d%2?Jc(u.slice(0,d+1).join("-"),e,n):null).filter(l=>!!l);if(!o.length)return null;const i=o.filter(({guideUrl:l})=>l).pop()?.guideUrl,r=o.filter(({url:l})=>l).pop(),a=o.filter(l=>l.className==="section"&&$r.test(l.label)).pop(),s=r?`${ta}${r.url}`:"",c=o.slice(o.indexOf(a||o[0])).map(({label:l})=>l).join(", ");return{...o.slice(-1)[0],path:o,label:c,url:s,guideUrl:i}},Jc=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=wt("class",i),a=wt("data-lovdata-url",i),s=na(i,t,o,e),[c,l,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${Vc}${u}_${t}`,html:Xc(t,e),url:a,label:!n&&r==="section"&&s?.match($r)?.[0]||s}},wt=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},Xc=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(Oc,""):""},na=(t,e,n,o)=>jc[wt("class",t)]?.(t,e,n,o)||"",jc={numberedLegalP:t=>`nr. ${wt("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Lc)?.[2]?.replace(We,"")?.replace(Mc,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(We,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),c=wt("data-name",t)||"-",l=wt("type",s)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(We,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(We,"")}`}};function P(t,e={}){const n=document.getElementById(e.id||"")||M("dialog");return b(n,"aria-busy",e.busy?"true":null),b(n,"class",ac(C.toast,e.className)),b(n,"closedby",e.closedby||null),b(n,"data-color",e.color||null),b(n,"data-icon",`${e.icon??""}`||null),b(n,"data-timeout",`${e.timeout??""}`||null),b(n,"id",e.id||`${Date.now()}`),b(n,"open",e.open===!1?null:""),n.innerHTML=t,W(n,"animationend",Zc,{once:!0}),document.body.appendChild(n),n.id}function Zc({animationName:t,target:e}){t===C._toastClose&&e.remove()}P.success=(t,e)=>P(t,{color:"success",...e}),P.danger=(t,e)=>P(t,{color:"danger",...e}),P.info=(t,e)=>P(t,{color:"info",...e}),P.warning=(t,e)=>P(t,{color:"warning",...e}),P.neutral=(t,e)=>P(t,{color:"neutral",...e}),P.promise=async function(e,n){const{loading:o,success:i,error:r,...a}=n,s=P(o,{busy:!0,...a});try{const c=await e();return P.success(i,{id:s,busy:!1}),c}catch(c){throw P.danger(r,{id:s,busy:!1}),c}};const oa=new WeakSet,V=t=>!oa.has(t)&&oa.add(t),N=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),Kc=ht("togglegroup"),ia=C.button.split(" "),Yc=()=>{for(const t of Kc){V(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),N('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))V(e)&&!e.classList.contains(ia[0])&&(e.classList.add(...ia),N('Only setting class="styles.button"','<label class="styles.button">',e))}},Qc=ht("breadcrumbs"),_c=()=>{for(const t of Qc)V(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...C.breadcrumbs.split(" ")),N('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},$c=ht("errorsummary"),td=()=>{for(const t of $c)V(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&N('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},ed=ht("dialog"),ra=()=>{for(const t of ed){if(V(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),N(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&N('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(N('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),b(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(b(t,"open",""),t.close()))}},nd=()=>{for(const t of document.querySelectorAll("[data-count]"))if(V(t)){const e=b(t,"data-count");t.classList.add(...C.validation.split(" ")),b(t,"data-limit",e),N(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},od=()=>{for(const t of document.querySelectorAll("[data-command]"))if(V(t)){const e=b(t,"data-command");e==="row"?N(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):N(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},id=Q()?document.getElementsByTagName("u-tabs"):[],rd=()=>{for(const t of id)V(t)&&N("u-tabs","ds-tabs",t)},Jn=C.suggestion.split(" "),ad=Q()?document.getElementsByTagName("u-combobox"):[],sd=Q()?document.getElementsByTagName("ds-suggestion"):[],ld=()=>{for(const t of ad)V(t)&&(t.classList.add(...Jn),N("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of sd)V(t)&&!t.classList.contains(Jn[0])&&(t.classList.add(...Jn),N("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},cd=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},dd=ht("field"),Pe=new Set,ud=()=>{for(const t of dd)t.nodeName!=="DS-FIELD"&&(V(t)||N('Only setting class="styles.field"','<ds-field class="styles.field">',t),!Pe.has(t)&&Pe.add(t)&&ke.prototype.connectedCallback.call(t))},pd=()=>{for(const t of Pe)ke.prototype.disconnectedCallback.call(t),Pe.delete(t)},md=`[data-description], .${C.field.split(" ")[0]} label + p`,fd=()=>{for(const t of document.querySelectorAll(md))V(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),N("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},hd=ht("validation"),gd=()=>{for(const t of hd)V(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),N('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},vd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))V(t)&&(b(t,"data-placement",b(t,"data-position")),N("data-position","data-placement",t))},bd=gt(()=>{nd(),od(),_c(),ra(),td(),fd(),gd(),vd(),ud(),Yc(),ld(),rd()},200);vt("deprecations",()=>[pd,W(document,"click",cd,Ht),W(document,"toggle",ra,!0),Re(document,bd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const wd=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
209
+ </dialog>`);const e=document.getElementById(J),n=()=>window.localStorage.setItem(J,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function wc(t){window._mtdsTracking?.enabled&&setTimeout(yc,0,t)}function yc({type:t,target:e}){const n=t==="click"?e?.closest?.(hc):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=Kr(n)||Sc(n)||v(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=v(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(jr)?"Chip":"Form",o="change",r=Kr(s||n)||Jt(s?.querySelector("legend"))||Jt(n?.labels?.[0])}else if(v(n,"role")==="tab")i="Tab",o="navigate";else if(v(n,"popovertarget")){if(!xc(n)?.matches(":popover-open"))return;i=n.closest(pc)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(dc)){const a=Ec(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&v(n,"data-tooltip")||Jt(n)}else if(n.closest(uc))i="Breadcrumbs",o="navigate";else if(n.closest(fc))i="Pagination",o="navigate";else if(n.closest(mc))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(jr))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(v(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");Zr("event",{category:v(n,"data-analytics-category")??i,action:v(n,"data-analytics-action")??o,name:v(n,"data-analytics-name")??r})}const Jt=t=>t?.textContent?.trim()||"",Kr=t=>t&&v(t,"aria-label")||"",xc=t=>document.getElementById(v(t,"popovertarget")||""),Ec=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Sc=t=>{const e=Jt(t),n=Jt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};it("analytics",()=>[q(document,"click toggle submit change",wc,Ht)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const Dn=C.app.split(" ")[0],kc=`[data-command="toggle-app-expanded"],.${Dn} > [command="show-modal"]`,zn=`.${Dn} > dialog,.${Dn} dialog ~ main`,Yr=bt("sticky"),Qr=t=>{document.startViewTransition?document.startViewTransition(t):t()},_r=t=>Qr(()=>window.mtdsToggleAppExpanded?.(t));function Tc(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(zn))return $r();if(n||!(e instanceof HTMLButtonElement)||!e.matches(kc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?_r():Qr(()=>{const r=document.querySelector(zn);r?.setAttribute("closedby","any"),r?.showModal()})}function $r(){document.querySelector(zn)?.close()}let Fn=0,Rt,et=0,Bn=0,qe=0,Gn=!1,Hn=0,yt=0;function Ac(){if(!Yr?.length)return;const t=Yr[0],e=window.scrollY,n=e<yt;yt=e,n!==Rt&&(Fn=(t.parentElement?.getBoundingClientRect().top||0)+yt,Rt=n,Bn=t.offsetHeight,qe=t.getBoundingClientRect().top+yt,Gn=t.offsetHeight<=window.innerHeight,Hn=window.innerHeight),!(et===-1&&Gn)&&(et!==-1&&(Gn||Rt&&yt<=qe)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),et=-1):et===-1&&!Rt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,yt-Fn)}px`),et=0):et!==1&&!Rt&&yt+Hn>=qe+Bn?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Hn-Bn}px`),et=1):et===1&&Rt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${qe-Fn}px`),et=0))}it("app",()=>[q(document,"click",Tc,!0),q(window,"resize",wt($r,100),Ht),q(window,"scroll",Ac,Ht)]);const Lc=/<[^>]+\bid="([^"]+)[^>]+>/gi,ta=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Cc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Mc=/kapittel-\d+-ledd-\d+/,Oc=/<button[^>]+>.*?<\/button>/g,Ic=/►m\d+/i,We=/<[^>]+>/g,Nc=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Rc=/<(\/?)(article|footer|section)/gi,qc=/(src|href)="([^"]+)"/gi,Wc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Pc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Vc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ea="https://lovdata.no/",Uc="https://www.mattilsynet.no/regelveiledning/?regelverk=",Dc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Jn=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),zc=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Fc=(t,e)=>{const n=Jn(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&v(o,"aria-checked",`${v(o,"aria-checked")!=="true"}`)})},Bc=(t,e)=>{const n=Jn(t);e?.querySelectorAll("button").forEach(o=>{v(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Gc=(t,e)=>{const n=na(e);return Jn(t).map(o=>Jc(o,n)).filter(o=>!!o)},Hc=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Dc};for(const o of e.matchAll(Nc)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},na=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Rc,"<$1div").replace(Wc,"$1$2$3").replace(qc,(e,n,o)=>`${n}="${o.includes(":")?"":ea}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Vc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${xt("id",n)}-ledd-0">${i}</div>`).replace(Pc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(Lc,(e,n,o,i)=>{const r=oa(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,Jc=(t,e)=>{const n=Mc.test(t),o=t.split("-").map((l,d,u)=>d%2?Xc(u.slice(0,d+1).join("-"),e,n):null).filter(l=>!!l);if(!o.length)return null;const i=o.filter(({guideUrl:l})=>l).pop()?.guideUrl,r=o.filter(({url:l})=>l).pop(),a=o.filter(l=>l.className==="section"&&ta.test(l.label)).pop(),s=r?`${ea}${r.url}`:"",c=o.slice(o.indexOf(a||o[0])).map(({label:l})=>l).join(", ");return{...o.slice(-1)[0],path:o,label:c,url:s,guideUrl:i}},Xc=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=xt("class",i),a=xt("data-lovdata-url",i),s=oa(i,t,o,e),[c,l,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${Uc}${u}_${t}`,html:jc(t,e),url:a,label:!n&&r==="section"&&s?.match(ta)?.[0]||s}},xt=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},jc=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(Oc,""):""},oa=(t,e,n,o)=>Zc[xt("class",t)]?.(t,e,n,o)||"",Zc={numberedLegalP:t=>`nr. ${xt("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Cc)?.[2]?.replace(We,"")?.replace(Ic,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(We,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),c=xt("data-name",t)||"-",l=xt("type",s)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(We,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(We,"")}`}};function P(t,e={}){const n=document.getElementById(e.id||"")||O("dialog");return v(n,"aria-busy",e.busy?"true":null),v(n,"class",sc(C.toast,e.className)),v(n,"closedby",e.closedby||null),v(n,"data-color",e.color||null),v(n,"data-icon",`${e.icon??""}`||null),v(n,"data-timeout",`${e.timeout??""}`||null),v(n,"id",e.id||`${Date.now()}`),v(n,"open",e.open===!1?null:""),n.innerHTML=t,q(n,"animationend",Kc,{once:!0}),document.body.appendChild(n),n.id}function Kc({animationName:t,target:e}){t===C._toastClose&&e.remove()}P.success=(t,e)=>P(t,{color:"success",...e}),P.danger=(t,e)=>P(t,{color:"danger",...e}),P.info=(t,e)=>P(t,{color:"info",...e}),P.warning=(t,e)=>P(t,{color:"warning",...e}),P.neutral=(t,e)=>P(t,{color:"neutral",...e}),P.promise=async function(e,n){const{loading:o,success:i,error:r,...a}=n,s=P(o,{busy:!0,...a});try{const c=await e();return P.success(i,{id:s,busy:!1}),c}catch(c){throw P.danger(r,{id:s,busy:!1}),c}};const Yc=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
210
210
  :host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
211
211
  [data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
212
212
 
@@ -373,8 +373,8 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
373
373
  vertical-align: middle;
374
374
  width: var(--mtds-5);
375
375
  }
376
- `,yd=[.1,.2,.25,.5,1];function xd(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((v,m,g)=>{const h=t.map(x=>x[g].number),w=h.reduce((x,y)=>x+y,0);return Math.max(v,...i?[w]:h)},0),a=r/10,s=10**`${Math.round(a)}`.length,c=a/s,l=(yd.find(v=>v>c)||1)*s,d=Math.ceil(r/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure",style:`${e?`--mtdsc-chart-aspect: ${e};`:""} --bars: ${t[0]?.length-1}; --groups: ${t.length-1}; --total: ${d}`}),p=u.appendChild(M("div",{class:"axisSteps"})),f=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(v,m)=>Ed(l*m)).reverse().map(v=>p.append(M("div",{class:"axisStep","data-label":v}))),{total:d,groups:f,axis:u}}const Ed=new Intl.NumberFormat().format;function Sd(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=M("div",{class:"axisGroup","data-label":e}),r=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,style:s,number:c})=>r.appendChild(M("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",style:`${s}; --value: ${c}`,tabindex:"0"}))),i})}function kd(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=M("div",{class:"lineContainer",role:"list",style:a[0].style}),c=Td(a.map(({number:u},p,{length:f})=>[100/(f-1)*p,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");b(l,"aria-hidden","true"),b(l,"preserveAspectRatio","none"),b(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(b(d,"class","line"),b(d,"d",c),b(d,"fill","none"),b(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);b(u,"d",`M-100,100 L${c.slice(1)}L200,100`),b(u,"class","lineShade"),l.append(u)}a.forEach(({number:u,tooltip:p,event:f})=>{const v=M("div",{role:"listitem"});v.appendChild(M("div",{"aria-label":p,"data-event":f,tabindex:"0",class:"linePoint",role:"img",style:`--value: ${u}`})),s.append(v)}),s.appendChild(l).append(d),r.append(s)}),r}const Td=(t,e)=>t.map(([n,o],i,r)=>i?Ad(i,r,e):`M${n},${o}`).join(" "),aa=([t,e],[n,o])=>[t+n,e+o],sa=([t,e],[n,o])=>[t-n,e-o],la=(t,[e,n])=>[t*e,t*n],Ad=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=aa(o,la(n,sa(i,e[t-2]||o))),[s,c]=aa(i,la(n,sa(o,e[t+1]||i)));return`C ${r},${a} ${s},${c} ${i[0]},${i[1]}`};function Ld(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),b(o,"class","pie"),b(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="doughnut"?25:0,s=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,style:u}])=>{if(!l)return;const p=document.createElementNS("http://www.w3.org/2000/svg","path"),f=i/s;i+=l;const v=Math.min(i/s,.99999),m=v-f>.5?1:0,g=2*Math.PI*(f-.25),h=2*Math.PI*(v-.25),w=Math.cos(g),x=Math.sin(g),y=Math.cos(h),A=Math.sin(h),k=`M ${r+a*w} ${r+a*x} L ${r+r*w} ${r+r*x} A ${r} ${r} 0 ${m} 1 ${r+r*y} ${r+r*A} L ${r+a*y} ${r+a*A} A ${a} ${a} 0 ${m} 0 ${r+a*w} ${r+a*x}`;b(p,"aria-label",c),b(p,"data-event",d),b(p,"style",u),b(p,"d",k),b(p,"role","img"),b(p,"tabindex","0"),o.appendChild(p)}),o}const ca="click keydown mousemove mouseout",da="mtds-chart-tooltip",it=Q()?document.getElementById(da)||M("div",{"aria-hidden":"true",class:C._tooltip,hidden:"",id:da}):null;class Cd extends sc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=gt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Re(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),W(this,ca,this)}disconnectedCallback(){it&&(it.hidden=!0),Jr(this,ca,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=Id(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(d=>d.remove());const[n,o]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,r=M("style",{},wd),a=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:d,style:u}])=>{a.appendChild(M("div",{class:"legend",style:u},d))});const{axis:s,groups:c,total:l}=xd(e,{aspect:i,type:o});(n==="column"||n==="bar")&&c.append(...Sd(e)),(n==="line"||n==="area")&&c.append(kd(e,{total:l,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(Ld(e,{aspect:i,variant:n})),this.shadowRoot?.append(s,a,r)}handleEvent(e){e.type==="click"||e.type==="keydown"?Od(e,this):Md(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function Od(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&b(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let ua="";function Md(t){if(!it)return;it?.isConnected||document.body.append(it);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(it.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==ua&&(n&&(it.textContent=n),ua=n,it.hidden=!n)}const Xn=t=>t?.textContent?.trim()||"",Id=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const a=Xn(e.cells[0]),s=Xn(t?.rows[0].cells[r]),c=Xn(i),l=o===2?`${s}: ${c}`:`${a}: ${c}${s?` (${s})`:""}`;return b(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${n}-${r}`,style:`--color: var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base))`,value:c,tooltip:b(i,"data-tooltip")||l}}));lc("mtds-chart",Cd);const Nd=gt(t=>{if(t.animationName!==C._logo)return;const e=t.target.closest?.(`.${C.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(M("link",{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='${r}' 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)">${s}</g></svg>`)}`,rel:"icon"}))}},200);vt("logo",()=>[W(document,"animationend",Nd)]);const Rd=Q()?document.getElementsByTagName("table"):[],qd=()=>{for(const t of Rd){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)b(i,"data-th",e[i.cellIndex]||":empty")}};vt("table",()=>[Re(document,gt(qd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const pa=C.toast.split(" ")[0],Ve="data-sort";function Wd({animationName:t,target:e}){const n=e;if(t===C._toastTimeout&&n.close(),t!==C._toastOpen)return;const o=Number(b(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(Ve)||b(n,Ve,`${Date.now()}`),b(n,"tabindex","0"),[...document.querySelectorAll(`.${pa}[open]`)].sort((i,r)=>Number(b(r,Ve))-Number(b(i,Ve))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Pd({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(pa)&&b(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),c=o.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(r.width,10);a<=n&&n<=s&&l<=e&&e<=c&&t.close()}}vt("toast",()=>[W(document,"animationstart",Wd),W(document,"click",Pd)]),Q()&&ii(document.getElementById("mtds-tooltip")||M("div",{class:C._tooltip,id:"mtds-tooltip"}));const Vd=`.${C.field.split(" ")[0]}`,Ud=":is(input,textarea,select)",Dd="ds-suggestion,u-combobox",zd=C.validation.split(" ")[0],Fd='[data-validation="form"]',jn=t=>{const e=t?.type==="input",n=!e&&t;for(const o of document.forms)if(o.getAttribute("data-validation")==="form"){let i;for(const r of o.querySelectorAll(Ud)){if(!r.clientHeight)continue;const a=r.closest("fieldset")||r.closest(Vd)||o,s=r.closest(Dd),c=s?b(r,"aria-required")==="true"&&!!s?.items.length:r.validity.valid;if(!i&&!c&&(i=r),!e||t.target===r)for(const l of a.getElementsByClassName(zd)){const d=a.nodeName==="FIELDSET"&&l.parentElement!==a;b(l,"hidden",d||!n||c?"":null)}}i&&n&&o.contains(t?.target)&&(t.preventDefault(),i.focus())}},Bd=t=>t.target?.closest?.(Fd)&&t?.preventDefault();vt("validations",()=>[W(document,"submit",jn,!0),W(document,"invalid",Bd,!0),W(document,"invalid input",gt(jn,10),Ht),Re(document,gt(()=>jn(),10),{childList:!0,subtree:!0})]);var Zn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ma=Zn&&/iPad|iPhone|iPod/.test(navigator.userAgent),fa;Zn&&/^Mac/i.test(((fa=navigator.userAgentData)==null?void 0:fa.platform)||navigator.platform);var Gd=typeof HTMLElement>"u"?class{}:HTMLElement;function z(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Hd=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},Jd=0,Xd=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Jd).toString(32)}`),t.id):"",jd=(t,e,n)=>{const o=document.createElement(t);return o.textContent=e,o},Zd={define:(t,e)=>!Zn||window.customElements.get(t)||window.customElements.define(t,e)},Kd=t=>{var e;const n=z(t,"aria-label")||"";return[...(((e=z(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},Yd=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
376
+ `,Qc=[.1,.2,.25,.5,1];function _c(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((b,p,g)=>{const h=t.map(x=>x[g].number),w=h.reduce((x,y)=>x+y,0);return Math.max(b,...i?[w]:h)},0),a=r/10,s=10**`${Math.round(a)}`.length,c=a/s,l=(Qc.find(b=>b>c)||1)*s,d=Math.ceil(r/l)*l,u=O("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure",style:`${e?`--mtdsc-chart-aspect: ${e};`:""} --bars: ${t[0]?.length-1}; --groups: ${t.length-1}; --total: ${d}`}),m=u.appendChild(O("div",{class:"axisSteps"})),f=u.appendChild(O("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(b,p)=>$c(l*p)).reverse().map(b=>m.append(O("div",{class:"axisStep","data-label":b}))),{total:d,groups:f,axis:u}}const $c=new Intl.NumberFormat().format;function td(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=O("div",{class:"axisGroup","data-label":e}),r=i.appendChild(O("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,style:s,number:c})=>r.appendChild(O("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",style:`${s}; --value: ${c}`,tabindex:"0"}))),i})}function ed(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=O("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=O("div",{class:"lineContainer",role:"list",style:a[0].style}),c=nd(a.map(({number:u},m,{length:f})=>[100/(f-1)*m,100-u/e*100]),i/100),l=document.createElementNS("http://www.w3.org/2000/svg","svg");v(l,"aria-hidden","true"),v(l,"preserveAspectRatio","none"),v(l,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(v(d,"class","line"),v(d,"d",c),v(d,"fill","none"),v(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);v(u,"d",`M-100,100 L${c.slice(1)}L200,100`),v(u,"class","lineShade"),l.append(u)}a.forEach(({number:u,tooltip:m,event:f})=>{const b=O("div",{role:"listitem"});b.appendChild(O("div",{"aria-label":m,"data-event":f,tabindex:"0",class:"linePoint",role:"img",style:`--value: ${u}`})),s.append(b)}),s.appendChild(l).append(d),r.append(s)}),r}const nd=(t,e)=>t.map(([n,o],i,r)=>i?od(i,r,e):`M${n},${o}`).join(" "),ia=([t,e],[n,o])=>[t+n,e+o],ra=([t,e],[n,o])=>[t-n,e-o],aa=(t,[e,n])=>[t*e,t*n],od=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=ia(o,aa(n,ra(i,e[t-2]||o))),[s,c]=ia(i,aa(n,ra(o,e[t+1]||i)));return`C ${r},${a} ${s},${c} ${i[0]},${i[1]}`};function id(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),v(o,"class","pie"),v(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="doughnut"?25:0,s=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,style:u}])=>{if(!l)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),f=i/s;i+=l;const b=Math.min(i/s,.99999),p=b-f>.5?1:0,g=2*Math.PI*(f-.25),h=2*Math.PI*(b-.25),w=Math.cos(g),x=Math.sin(g),y=Math.cos(h),A=Math.sin(h),k=`M ${r+a*w} ${r+a*x} L ${r+r*w} ${r+r*x} A ${r} ${r} 0 ${p} 1 ${r+r*y} ${r+r*A} L ${r+a*y} ${r+a*A} A ${a} ${a} 0 ${p} 0 ${r+a*w} ${r+a*x}`;v(m,"aria-label",c),v(m,"data-event",d),v(m,"style",u),v(m,"d",k),v(m,"role","img"),v(m,"tabindex","0"),o.appendChild(m)}),o}const sa="click keydown mousemove mouseout",la="mtds-chart-tooltip",rt=Q()?document.getElementById(la)||O("div",{"aria-hidden":"true",class:C._tooltip,hidden:"",id:la}):null;class rd extends lc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=wt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Re(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),q(this,sa,this)}disconnectedCallback(){rt&&(rt.hidden=!0),Xr(this,sa,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=ld(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(d=>d.remove());const[n,o]=(v(this,"data-variant")||"column").split("-"),i=v(this,"data-aspect")||void 0,r=O("style",{},Yc),a=O("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:d,style:u}])=>{a.appendChild(O("div",{class:"legend",style:u},d))});const{axis:s,groups:c,total:l}=_c(e,{aspect:i,type:o});(n==="column"||n==="bar")&&c.append(...td(e)),(n==="line"||n==="area")&&c.append(ed(e,{total:l,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(id(e,{aspect:i,variant:n})),this.shadowRoot?.append(s,a,r)}handleEvent(e){e.type==="click"||e.type==="keydown"?ad(e,this):sd(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function ad(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&v(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let ca="";function sd(t){if(!rt)return;rt?.isConnected||document.body.append(rt);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(rt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==ca&&(n&&(rt.textContent=n),ca=n,rt.hidden=!n)}const Xn=t=>t?.textContent?.trim()||"",ld=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const a=Xn(e.cells[0]),s=Xn(t?.rows[0].cells[r]),c=Xn(i),l=o===2?`${s}: ${c}`:`${a}: ${c}${s?` (${s})`:""}`;return v(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${n}-${r}`,style:`--color: var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base))`,value:c,tooltip:v(i,"data-tooltip")||l}}));cc("mtds-chart",rd);const da=new WeakSet,V=t=>!da.has(t)&&da.add(t),N=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),cd=bt("togglegroup"),ua=C.button.split(" "),dd=()=>{for(const t of cd){V(t)&&!t.hasAttribute("data-toggle-group")&&(v(t,"data-toggle-group","Valgknapper"),N('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))V(e)&&!e.classList.contains(ua[0])&&(e.classList.add(...ua),N('Only setting class="styles.button"','<label class="styles.button">',e))}},ud=bt("breadcrumbs"),md=()=>{for(const t of ud)V(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...C.breadcrumbs.split(" ")),N('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},pd=bt("errorsummary"),fd=()=>{for(const t of pd)V(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&N('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},hd=bt("dialog"),ma=()=>{for(const t of hd){if(V(t)){const e=v(t,"data-closedby");e&&(v(t,"closedby",e),N(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&N('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(N('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),v(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(v(t,"open",""),t.close()))}},gd=()=>{for(const t of document.querySelectorAll("[data-count]"))if(V(t)){const e=v(t,"data-count");t.classList.add(...C.validation.split(" ")),v(t,"data-limit",e),N(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},vd=()=>{for(const t of document.querySelectorAll("[data-command]"))if(V(t)){const e=v(t,"data-command");e==="row"?N(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):N(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},bd=Q()?document.getElementsByTagName("u-tabs"):[],wd=()=>{for(const t of bd)V(t)&&N("u-tabs","ds-tabs",t)},jn=C.suggestion.split(" "),yd=Q()?document.getElementsByTagName("u-combobox"):[],xd=Q()?document.getElementsByTagName("ds-suggestion"):[],Ed=()=>{for(const t of yd)V(t)&&(t.classList.add(...jn),N("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of xd)V(t)&&!t.classList.contains(jn[0])&&(t.classList.add(...jn),N("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Sd=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},kd=bt("field"),Pe=new Set,Td=()=>{for(const t of kd)t.nodeName!=="DS-FIELD"&&(V(t)||N('Only setting class="styles.field"','<ds-field class="styles.field">',t),!Pe.has(t)&&Pe.add(t)&&ke.prototype.connectedCallback.call(t))},Ad=()=>{for(const t of Pe)ke.prototype.disconnectedCallback.call(t),Pe.delete(t)},Ld=`[data-description], .${C.field.split(" ")[0]} label + p`,Cd=()=>{for(const t of document.querySelectorAll(Ld))V(t)&&t.getAttribute("data-field")!=="description"&&(v(t,"data-field","description"),N("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Md=bt("validation"),Od=()=>{for(const t of Md)V(t)&&!t.hasAttribute("data-field")&&(v(t,"data-field","validation"),N('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Id=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))V(t)&&(v(t,"data-placement",v(t,"data-position")),N("data-position","data-placement",t))},Nd=wt(()=>{gd(),vd(),md(),ma(),fd(),Cd(),Od(),Id(),Td(),dd(),Ed(),wd()},200);it("deprecations",()=>[Ad,q(document,"click",Sd,Ht),q(document,"toggle",ma,!0),Re(document,Nd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Rd=wt(t=>{if(t.animationName!==C._logo)return;const e=t.target.closest?.(`.${C.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(O("link",{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='${r}' 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)">${s}</g></svg>`)}`,rel:"icon"}))}},200);it("logo",()=>[q(document,"animationend",Rd)]);function qd({target:t}){const e=t?.closest?.("a"),n=e&&v(e,"popovertarget"),o=n?document.getElementById(n):e?.closest("[popover]");if(e&&o instanceof HTMLElement&&o.popover){const i=v(e,"popovertargetaction"),r=i==="show"||(i==="hide"?!1:void 0);o.togglePopover(r)}}it("popover",()=>[q(document,"click",qd)]);const Wd=Q()?document.getElementsByTagName("table"):[],Pd=()=>{for(const t of Wd){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>n.innerText.trim());for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)v(i,"data-th",e[i.cellIndex]||":empty")}};it("table",()=>[Re(document,wt(Pd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const pa=C.toast.split(" ")[0],Ve="data-sort";function Vd({animationName:t,target:e}){const n=e;if(t===C._toastTimeout&&n.close(),t!==C._toastOpen)return;const o=Number(v(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(Ve)||v(n,Ve,`${Date.now()}`),v(n,"tabindex","0"),[...document.querySelectorAll(`.${pa}[open]`)].sort((i,r)=>Number(v(r,Ve))-Number(v(i,Ve))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Ud({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(pa)&&v(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),c=o.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(r.width,10);a<=n&&n<=s&&l<=e&&e<=c&&t.close()}}it("toast",()=>[q(document,"animationstart",Vd),q(document,"click",Ud)]),Q()&&ri(document.getElementById("mtds-tooltip")||O("div",{class:C._tooltip,id:"mtds-tooltip",popover:"manual"}));const Dd=`.${C.field.split(" ")[0]}`,zd=":is(input,textarea,select)",Fd="ds-suggestion,u-combobox",Bd=C.validation.split(" ")[0],Gd='[data-validation="form"]',Zn=t=>{const e=t?.type==="input",n=!e&&t;for(const o of document.forms)if(o.getAttribute("data-validation")==="form"){let i;for(const r of o.querySelectorAll(zd)){if(!r.clientHeight)continue;const a=r.closest("fieldset")||r.closest(Dd)||o,s=r.closest(Fd),c=s?v(r,"aria-required")==="true"&&!!s?.items.length:r.validity.valid;if(!i&&!c&&(i=r),!e||t?.target===r)for(const l of a.getElementsByClassName(Bd)){const d=a.nodeName==="FIELDSET"&&l.parentElement!==a;v(l,"hidden",d||!n||c?"":null)}}i&&n&&o.contains(t?.target)&&(t.preventDefault(),i.focus())}},Hd=t=>t.target?.closest?.(Gd)&&t?.preventDefault();it("validations",()=>[q(document,"submit",Zn,!0),q(document,"invalid",Hd,!0),q(document,"invalid input",wt(Zn,10),Ht),Re(document,wt(()=>Zn,0),{childList:!0,subtree:!0})]);var Kn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",fa=Kn&&/iPad|iPhone|iPod/.test(navigator.userAgent),ha;Kn&&/^Mac/i.test(((ha=navigator.userAgentData)==null?void 0:ha.platform)||navigator.platform);var Jd=typeof HTMLElement>"u"?class{}:HTMLElement;function z(t,e,n){return n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var Xd=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},jd=0,Zd=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++jd).toString(32)}`),t.id):"",Kd=(t,e,n)=>{const o=document.createElement(t);return o.textContent=e,o},Yd={define:(t,e)=>!Kn||window.customElements.get(t)||window.customElements.define(t,e)},Qd=t=>{var e;const n=z(t,"aria-label")||"";return[...(((e=z(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n)},_d=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
377
377
  :host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
378
378
  :host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
379
379
  @media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
380
- @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,Kn=!1,ha=class extends Gd{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(jd("style",Yd))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(Kn)return;Kn=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=Kd(this);ma&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),z(this,"aria-busy",`${this.position===-1}`),z(this,"aria-label",e.trim()),z(this,"aria-labelledby",null),z(this,"aria-valuemax","100"),z(this,"aria-valuemin","0"),z(this,"aria-valuenow",`${t}`),z(this,"role",ma?"img":"progressbar"),Kn=!1}get labels(){const t=this.closest("label:not([for])"),e=Xd(this);return t&&(t.htmlFor=e),Hd(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return va(this,"value")}set value(t){ba(this,"value",t)}get max(){return va(this,"max")||1}set max(t){ba(this,"max",t)}};ha.formAssociated=!0;var ga=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),va=(t,e)=>{const n=z(t,e);return ga(n)?Math.max(0,Number.parseFloat(n)):null},ba=(t,e,n)=>{if(n===null||ga(n))z(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${z}': '${n}'`)};Zd.define("u-progress",ha);const Qd=String(rs).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");return S.DSBreadcrumbsElement=si,S.DSErrorSummaryElement=li,S.DSFieldElement=ke,S.DSPaginationElement=bi,S.DSSuggestionElement=wi,S.DSTabElement=Si,S.DSTabListElement=Ei,S.DSTabPanelElement=ki,S.DSTabsElement=xi,S.UHTMLComboboxElement=Ge,S.UHTMLComboboxShadowRoot=Ra,S.UHTMLComboboxStyle=Be,S.UHTMLDataListElement=Di,S.UHTMLDataListShadowRoot=_l,S.UHTMLDataListStyle=qn,S.UHTMLTabElement=nn,S.UHTMLTabListElement=tn,S.UHTMLTabListShadowRoot=Ka,S.UHTMLTabListStyle=Ye,S.UHTMLTabPanelElement=rn,S.UHTMLTabPanelShadowRoot=Qa,S.UHTMLTabPanelStyle=Qe,S.UHTMLTabShadowRoot=Ya,S.UHTMLTabStyle=_e,S.UHTMLTabsElement=$e,S.UHTMLTabsShadowRoot=Za,S.UHTMLTabsStyle=Ke,S.analytics=jr,S.fixLawHtml=ea,S.getLawChecked=Dc,S.pagination=vi,S.parseLawIds=Bc,S.parseLawMeta=Gc,S.printcss=Qd,S.setLawChecked=Fc,S.setTooltipElement=ii,S.styles=rc,S.toast=P,S.toggleAppExpanded=Qr,S.toggleLawChecked=zc,S.version=ic,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),S})({});
380
+ @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,Yn=!1,ga=class extends Jd{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(Kd("style",_d))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(Yn)return;Yn=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=Qd(this);fa&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),z(this,"aria-busy",`${this.position===-1}`),z(this,"aria-label",e.trim()),z(this,"aria-labelledby",null),z(this,"aria-valuemax","100"),z(this,"aria-valuemin","0"),z(this,"aria-valuenow",`${t}`),z(this,"role",fa?"img":"progressbar"),Yn=!1}get labels(){const t=this.closest("label:not([for])"),e=Zd(this);return t&&(t.htmlFor=e),Xd(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return ba(this,"value")}set value(t){wa(this,"value",t)}get max(){return ba(this,"max")||1}set max(t){wa(this,"max",t)}};ga.formAssociated=!0;var va=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),ba=(t,e)=>{const n=z(t,e);return va(n)?Math.max(0,Number.parseFloat(n)):null},wa=(t,e,n)=>{if(n===null||va(n))z(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${z}': '${n}'`)};Yd.define("u-progress",ga);const $d=String(as).replace(/\/\*[^!][^*]*\*\//gs,"").replace(/(\n|\t)/g,"").replace(/\s+/g," ");return S.DSBreadcrumbsElement=ci,S.DSErrorSummaryElement=di,S.DSFieldElement=ke,S.DSPaginationElement=wi,S.DSSuggestionElement=yi,S.DSTabElement=ki,S.DSTabListElement=Si,S.DSTabPanelElement=Ti,S.DSTabsElement=Ei,S.UHTMLComboboxElement=Ge,S.UHTMLComboboxShadowRoot=qa,S.UHTMLComboboxStyle=Be,S.UHTMLDataListElement=zi,S.UHTMLDataListShadowRoot=$l,S.UHTMLDataListStyle=Wn,S.UHTMLTabElement=nn,S.UHTMLTabListElement=tn,S.UHTMLTabListShadowRoot=Ya,S.UHTMLTabListStyle=Ye,S.UHTMLTabPanelElement=rn,S.UHTMLTabPanelShadowRoot=_a,S.UHTMLTabPanelStyle=Qe,S.UHTMLTabShadowRoot=Qa,S.UHTMLTabStyle=_e,S.UHTMLTabsElement=$e,S.UHTMLTabsShadowRoot=Ka,S.UHTMLTabsStyle=Ke,S.analytics=Zr,S.fixLawHtml=na,S.getLawChecked=zc,S.pagination=bi,S.parseLawIds=Gc,S.parseLawMeta=Hc,S.printcss=$d,S.setLawChecked=Bc,S.setTooltipElement=ri,S.styles=ac,S.toast=P,S.toggleAppExpanded=_r,S.toggleLawChecked=Fc,S.version=rc,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),S})({});