@mattilsynet/design 3.1.18 → 3.1.19

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(E){"use strict";var Mr=Object.defineProperty,ro=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,so=(t,e,n)=>e in t?Mr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ir=(t,e)=>{for(var n in e||(e={}))Rr.call(e,n)&&so(t,n,e[n]);if(ro)for(var n of ro(e))Or.call(e,n)&&so(t,n,e[n]);return t},Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Dr=Jt&&/android/i.test(navigator.userAgent),lo=Jt&&/iPad|iPhone|iPod/.test(navigator.userAgent),co;Jt&&/^Mac/i.test(((co=navigator.userAgentData)==null?void 0:co.platform)||navigator.platform);var Pr="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Hr=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 uo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},Zt=(t,...e)=>uo("add",t,e),Nr=(t,...e)=>uo("remove",t,e),te=new WeakMap,Ue=(t,e)=>{if(e===void 0)return te.get(t);try{te.get(t).disconnect(),te.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),te.set(t,n)}},Br=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},fo=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},Fr=0,mo=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Fr).toString(32)}`),t.id):"",$t=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,a]of Object.entries(n))$(o,i,a);return o},Ur={define:(t,e)=>!Jt||window.customElements.get(t)||window.customElements.define(t,e)},jr=t=>{var e;const n=$(t,"aria-label")||"";return[...(((e=$(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var r;return i||((r=a?.innerText)==null?void 0:r.trim())||""},n)},ct,qr=0,je=t=>{ct||(ct=$t("div"),ct.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",$(ct,"aria-live","assertive")),ct.isConnected||document.body.append(ct),t&&(ct.textContent=`${t}${qr++%2?" ":""}`)},po=(t,e,n="")=>{var o,i;const a={bubbles:!0,composed:!0,data:e,inputType:n},r=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(o=Object.getOwnPropertyDescriptor(r,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},qe=!1,We=t=>(t?.type==="mouseup"&&(qe=!1),t?.type==="mousedown"&&(qe=!0,Zt(document,"mouseup",We,{once:!0})),qe),Wr=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Ge=`: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(E){"use strict";var Ms=Object.defineProperty,rn=Object.getOwnPropertySymbols,Rs=Object.prototype.hasOwnProperty,Is=Object.prototype.propertyIsEnumerable,ln=(t,e,o)=>e in t?Ms(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Os=(t,e)=>{for(var o in e||(e={}))Rs.call(e,o)&&ln(t,o,e[o]);if(rn)for(var o of rn(e))Is.call(e,o)&&ln(t,o,e[o]);return t},Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ds=Jt&&/android/i.test(navigator.userAgent),cn=Jt&&/iPad|iPhone|iPod/.test(navigator.userAgent),dn;Jt&&/^Mac/i.test(((dn=navigator.userAgentData)==null?void 0:dn.platform)||navigator.platform);var Ps="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Hs=typeof HTMLElement>"u"?class{}:HTMLElement;function $(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var un=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Zt=(t,...e)=>un("add",t,e),Ns=(t,...e)=>un("remove",t,e),te=new WeakMap,Ue=(t,e)=>{if(e===void 0)return te.get(t);try{te.get(t).disconnect(),te.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),te.set(t,o)}},qs=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},fn=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Bs=0,mn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Bs).toString(32)}`),t.id):"",Tt=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,a]of Object.entries(o))$(n,i,a);return n},Us={define:(t,e)=>!Jt||window.customElements.get(t)||window.customElements.define(t,e)},Fs=t=>{var e;const o=$(t,"aria-label")||"";return[...(((e=$(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var s;return i||((s=a?.innerText)==null?void 0:s.trim())||""},o)},dt,Ws=0,Fe=t=>{dt||(dt=Tt("div"),dt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",$(dt,"aria-live","assertive")),dt.isConnected||document.body.append(dt),t&&(dt.textContent=`${t}${Ws++%2?" ":""}`)},pn=(t,e,o="")=>{var n,i;const a={bubbles:!0,composed:!0,data:e,inputType:o},s=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(n=Object.getOwnPropertyDescriptor(s,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},We=!1,Ge=t=>(t?.type==="mouseup"&&(We=!1),t?.type==="mousedown"&&(We=!0,Zt(document,"mouseup",Ge,{once:!0})),We),Gs=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Ve=`: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,27 +6,27 @@ var mtds=(function(E){"use strict";var Mr=Object.defineProperty,ro=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) { ${Pr} }`,Gr=Wr(Ge),ho="beforeinput,blur,focus,click,input,keydown,mousedown",go={once:!0,capture:!0,passive:!0},ee="false",ne=Dr||lo,bo="​".repeat(5),vo="deleteContentBackward",Vr="insertText",zr=" ",oe={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"},Ve=class extends Hr{constructor(){super(),this._item="",this._speak="",this._texts=Ir({},oe),this._value="",this.shadowRoot||this.attachShadow({mode:"open"}).append($t("slot",null,{"aria-orientation":"horizontal",tabindex:"-1",role:"listbox",name:"items"}),$t("slot"),$t("div",'<div role="option" tabindex="-1"></div>',{"aria-hidden":"true",role:"listbox"}),$t("style",Ge))}static get observedAttributes(){return Object.keys(oe).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=fo(this),Zt(this,ho,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ie,0,this),setTimeout(ae,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];oe[o]&&(this._texts[o]=n||oe[o])}disconnectedCallback(){Ue(this,!1),Nr(this,ho,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;Xe(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Kr(this),t.type==="click"&&Qr(this,t),t.type==="focus"&&Xr(this,t),t.type==="input"&&Jr(this,t),t.type==="keydown"&&Zr(this,t),t.type==="mousedown"&&We(t),t.type==="mutation"&&ie(this,t))}get multiple(){var t;return((t=$(this,"data-multiple"))!=null?t:ee)!==ee}set multiple(t){$(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=$(this,"data-creatable"))!=null?t:ee)!==ee}set creatable(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)}},dt=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},ze=t=>t instanceof HTMLDataElement,Xe=({control:t})=>t?.disabled||t?.readOnly||!1,ie=(t,e)=>{var n,o;const{_focus:i,_texts:a,items:r,control:s,list:c,multiple:l}=t;if(!s)return;const d=jr(s),u=d.endsWith(bo)?$(s,"data-label"):d;$(s,"data-label",u);let m=`${u}${l?`, ${r.length?a.found.replace("%d",`${r.length}`):a.empty}`:""}`;const p=[];for(const{addedNodes:y,removedNodes:T}of e?.detail||[]){for(const S of y)ze(S)&&p.unshift(S);for(const S of T)ze(S)&&p.push(S)}const v=l?p.length===1:p[0]===i;if(i&&v){const y=$(s,"aria-expanded"),T=$(s,"inputmode"),S=ze(i)?s:i,R=!p[0].isConnected;t._speak=`${a[R?"removed":"added"]} ${dt(p[0])}, `,(ne||i===s)&&je(t._speak),s!==S&&(ne&&$(s,"aria-expanded",null),ne&&$(s,"inputmode","none"),m=zr,s.focus()),setTimeout(()=>{var j;$(s,"aria-expanded",y),$(s,"inputmode",R?"none":T),(j=S?.focus)==null||j.call(S),$(s,"inputmode",T),t._speak="",ne?setTimeout(ie,100,t):Zt(t,"blur",()=>ie(t),go)},100)}let f=0;const g=t.querySelector("select"),h=Xe(t)?"":a.remove,w=(n=t.shadowRoot)==null?void 0:n.firstElementChild;w&&$(w,"aria-label",a.items);for(const y of r){const T=g?.options[f++],S=dt(y),R=y.value||S,j=`${t._speak}${S}, ${h}`;$(y,"aria-label",j),$(y,"aria-selected","true"),$(y,"role","option"),$(y,"slot","items"),$(y,"tabindex","-1"),$(y,"value",R),T?Object.assign(T,{textContent:S,value:R}):g?.appendChild(new Option(S,R,!0,!0)),lo&&$(y,"title",`${f} ${a.of} ${r.length}`)}g&&$(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(f))y.remove();!l&&f>1&&console.warn(t," Multiple <data> found in single mode."),c&&($(c,"aria-multiselectable",`${l}`),$(s,"list",mo(c)),$(s,"aria-label",`${t._speak}${m}${bo}`),c.hasAttribute("popover")&&($(s,"popovertarget",mo(c)),$(c,"popover","manual")),c._of=a.of);const _=dt(r[0]);_!==t._item&&ae(t),t._item=_,wo(t),yo(t),(o=Ue(t))==null||o.takeRecords()},wo=t=>{var e;t.clear&&$(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||Xe(t))},yo=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const a of o){const r=(e=$(a,"value"))!=null?e:dt(a);$(a,"aria-label",n?`${n}${dt(a)}`:null),$(a,"selected",i.includes(r)?"":null)}},ae=t=>{const{multiple:e,control:n,items:o}=t,i=dt(o[0]);!e&&n&&i!==n.value&&po(n,i,i?Vr:vo)},Ke=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:a,control:r,items:s,multiple:c}=t,l=((n=r?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(p=>($(p,"label")||dt(p)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(p=>p.selected)),e)return yo(t),u?Tt(t,u,!1):a&&l?Tt(t,{value:l},!1):(!c&&!l&&s[0]?Tt(t,s[0]):ae(t),je(o.invalid));for(const p of i)p.selected=p===u},Tt=(t,e,n=!0)=>{var o,i,a;const{control:r,items:s,multiple:c}=t,l=$t("data",e.label||e.value,{value:e.value}),d=[...s].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!n)return ae(t);if(d===((o=fo(t))==null?void 0:o.activeElement)&&((a=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||a.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const p of[...s])p.remove();d?d.remove():r?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Xr=(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=$(o,"form"),$(o,"form","#")),je()},Kr=t=>We()||setTimeout(Yr,0,t),Yr=t=>{const{_focus:e,_root:n,_form:o,multiple:i,control:a}=t;!e||t.contains(n?.activeElement)||(i||Ke(t),o&&a&&$(a,"form",o),t._focus=t._form=void 0)},Qr=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:a,control:r,items:s}=t;if(a?.contains(i))return r&&po(r,"",vo),r?.focus();for(const c of s){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return Tt(t,c);if(o>=l&&o<=u&&n>=m&&n<=d)return c.focus()}i===t&&r?.focus()},Jr=(t,e)=>{var n;const{options:o=[],control:i,multiple:a}=t,r=((n=i?.value)==null?void 0:n.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!r){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of o)if(c.value&&c.value===r)return Tt(t,c,a)}else a||Ke(t,!1);wo(t)},Zr=(t,e)=>{var n;const{clear:o,control:i,items:a}=t,{key:r,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?a.length:[...a].indexOf(c);if(l&&r==="Tab"&&!e.shiftKey&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=0,o.focus(),Zt(o,"blur",()=>$(o,"tabindex",null),go)),!(!l&&Br(e)||m===-1||u)){if(r==="ArrowRight"&&!l)m+=1;else if(r==="ArrowLeft"&&!d)m-=1;else{if(r==="Enter"&&l)return Ke(t);if(r==="Backspace"&&!d){if(e.preventDefault(),!s&&a[m])return Tt(t,a[m]);l&&(m-=1)}else return l||i?.focus()}e.preventDefault(),(n=a[Math.max(0,m)]||i)==null||n.focus()}};Ur.define("u-combobox",Ve);var Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ts=Ye&&/android/i.test(navigator.userAgent),_o;Ye&&/^Mac/i.test(((_o=navigator.userAgentData)==null?void 0:_o.platform)||navigator.platform);var es=`${ts?"data":"aria"}-labelledby`,Qe=":host(:not([hidden])) { display: block }",re=typeof HTMLElement>"u"?class{}:HTMLElement;function C(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 xo=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},ns=(t,...e)=>xo("add",t,e),os=(t,...e)=>xo("remove",t,e),se=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(To("slot"),To("style",e)),le=new WeakMap,Eo=(t,e)=>{if(e===void 0)return le.get(t);try{le.get(t).disconnect(),le.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),le.set(t,n)}},is=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},So=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},as=0,$o=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++as).toString(32)}`),t.id):"",To=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},ce={define:(t,e)=>!Ye||window.customElements.get(t)||window.customElements.define(t,e)},de=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Je=Qe,Ze=Qe,tn=Qe,en=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',rs=de(Je),ss=de(Ze),ls=de(en),cs=de(tn),ue="aria-controls",kt="aria-selected",ko="data-utabs",nn=class extends re{constructor(){super(),se(this,Je)}connectedCallback(){C(this,ko,"")}get tabList(){return fe("tablist",this)[0]||null}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fn(this.tabs[t])}get tabs(){return fe("tab",this)}get panels(){return fe("tabpanel",this)}},on=class extends re{constructor(){super(),se(this,Ze)}connectedCallback(){C(this,"role","tablist"),ns(this,"click,keydown",this),Eo(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){os(this,"click,keydown",this),Eo(this,!1)}handleEvent(t){var e,n;if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(kt,"true")}const{key:o}=t,i=[...this.tabs],a=i.findIndex(s=>s.contains(t.target));let r=a;if(!(t.defaultPrevented||a===-1)&&(t.type==="click"&&fn(i[a]),t.type==="keydown"&&!is(t))){if(o==="ArrowDown"||o==="ArrowRight")r=(a+1)%i.length;else if(o==="ArrowUp"||o==="ArrowLeft")r=(a||i.length)-1;else if(o==="End")r=i.length-1;else if(o==="Home")r=0;else if(o==="Tab")r=me(i);else return;setTimeout(()=>{C(i[a],"tabindex","-1"),C(i[r],"tabindex","0")}),o!=="Tab"&&(t.preventDefault(),(n=(e=i[r]).focus)==null||n.call(e))}}get tabsElement(){return dn(this)}get tabs(){return un(this)}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fn(this.tabs[t])}},an=!1,rn=class extends re{static get observedAttributes(){return["id",kt,ue]}constructor(){super(),se(this,en)}connectedCallback(){C(this,"role","tab"),C(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!an&&this.selected&&this.tabList){an=!0;const t=this.tabList?un(this.tabList):[],e=fe("tabpanel",this.tabsElement||this),n=cn(this,e[[...t].indexOf(this)]);n&&C(n,es,$o(this));let o=0;for(const i of t){const a=cn(i,e[o++]);C(i,"tabindex",i===this?"0":"-1"),C(i,kt,`${i===this}`),a?.id&&C(i,ue,a.id),a&&(a.hidden=a!==n)}an=!1}}get tabsElement(){return dn(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return C(this,kt)==="true"}set selected(t){C(this,kt,`${!!t}`)}get index(){const t=this.tabList;return t?[...un(t)].indexOf(this):0}get panel(){return cn(this)}},sn=!1,ln=class extends re{static get observedAttributes(){return["id","hidden"]}constructor(){super(),se(this,tn)}connectedCallback(){var t,e;C(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(sn)return;sn=!0;const t=ds(this.firstChild);this.hidden=me(this.tabs)===-1,C(this,"aria-hidden",`${this.hidden}`),C(this,"tabindex",this.hidden||t?null:"0"),sn=!1}get tabsElement(){return dn(this)}get tabs(){return So(this).querySelectorAll(`[role="tab"][${ue}="${this.id}"]`)}},fe=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),cn=(t,e)=>So(t).getElementById(C(t,ue)||$o(e)),me=t=>[...t].findIndex(e=>C(e,kt)==="true"),dn=t=>t.closest(`[${ko}]`),un=t=>t.querySelectorAll(':scope > [role="tab"]'),fn=t=>t&&C(t,"aria-disabled")!=="true"&&C(t,"aria-selected","true"),ds=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ce.define("u-tabs",nn),ce.define("u-tablist",on),ce.define("u-tab",rn),ce.define("u-tabpanel",ln);var Ao=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Co;Ao&&/^Mac/i.test(((Co=navigator.userAgentData)==null?void 0:Co.platform)||navigator.platform);var us=":host(:not([hidden])) { display: block }",Lo=typeof HTMLElement>"u"?class{}:HTMLElement;function J(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)},Ro=(t,...e)=>Mo("add",t,e),Oo=(t,...e)=>Mo("remove",t,e),fs=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},ms=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},mn=(t,e,n)=>{const o=document.createElement(t);if(e&&(o[t==="style"?"textContent":"innerHTML"]=e),n)for(const[i,a]of Object.entries(n))J(o,i,a);return o},Io={define:(t,e)=>!Ao||window.customElements.get(t)||window.customElements.define(t,e)},ps=`${us}
9
+ ::slotted(data:focus) { ${Ps} }`,Vs=Gs(Ve),hn="beforeinput,blur,focus,click,input,keydown,mousedown",gn={once:!0,capture:!0,passive:!0},ee="false",oe=Ds||cn,bn="​".repeat(5),vn="deleteContentBackward",zs="insertText",Xs=" ",ne={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"},ze=class extends Hs{constructor(){super(),this._item="",this._speak="",this._texts=Os({},ne),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",Ve))}static get observedAttributes(){return Object.keys(ne).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=fn(this),Zt(this,hn,this,!0),Ue(this,{attributeFilter:["value","id","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ie,0,this),setTimeout(ae,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];ne[n]&&(this._texts[n]=o||ne[n])}disconnectedCallback(){Ue(this,!1),Ns(this,hn,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"&&Ks(this),t.type==="click"&&Qs(this,t),t.type==="focus"&&js(this,t),t.type==="input"&&Js(this,t),t.type==="keydown"&&Zs(this,t),t.type==="mousedown"&&Ge(t),t.type==="mutation"&&ie(this,t))}get multiple(){var t;return((t=$(this,"data-multiple"))!=null?t:ee)!==ee}set multiple(t){$(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=$(this,"data-creatable"))!=null?t:ee)!==ee}set creatable(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 o=(e=(t=this.list)==null?void 0:t.querySelector('[role="option"],option'))==null?void 0:e.nodeName;o&&(this._options=this.getElementsByTagName(o))}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},ut=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Xe=t=>t instanceof HTMLDataElement,je=({control:t})=>t?.disabled||t?.readOnly||!1,ie=(t,e)=>{var o,n;const{_focus:i,_texts:a,items:s,control:r,list:c,multiple:l}=t;if(!r)return;const d=Fs(r),u=d.endsWith(bn)?$(r,"data-label"):d;$(r,"data-label",u);let m=`${u}${l?`, ${s.length?a.found.replace("%d",`${s.length}`):a.empty}`:""}`;const p=[];for(const{addedNodes:y,removedNodes:T}of e?.detail||[]){for(const S of y)Xe(S)&&p.unshift(S);for(const S of T)Xe(S)&&p.push(S)}const v=l?p.length===1:p[0]===i;if(i&&v){const y=$(r,"aria-expanded"),T=$(r,"inputmode"),S=Xe(i)?r:i,R=!p[0].isConnected;t._speak=`${a[R?"removed":"added"]} ${ut(p[0])}, `,(oe||i===r)&&Fe(t._speak),r!==S&&(oe&&$(r,"aria-expanded",null),oe&&$(r,"inputmode","none"),m=Xs,r.focus()),setTimeout(()=>{var F;$(r,"aria-expanded",y),$(r,"inputmode",R?"none":T),(F=S?.focus)==null||F.call(S),$(r,"inputmode",T),t._speak="",oe?setTimeout(ie,100,t):Zt(t,"blur",()=>ie(t),gn)},100)}let f=0;const g=t.querySelector("select"),h=je(t)?"":a.remove,w=(o=t.shadowRoot)==null?void 0:o.firstElementChild;w&&$(w,"aria-label",a.items);for(const y of s){const T=g?.options[f++],S=ut(y),R=y.value||S,F=`${t._speak}${S}, ${h}`;$(y,"aria-label",F),$(y,"aria-selected","true"),$(y,"role","option"),$(y,"slot","items"),$(y,"tabindex","-1"),$(y,"value",R),T?Object.assign(T,{textContent:S,value:R}):g?.appendChild(new Option(S,R,!0,!0)),cn&&$(y,"title",`${f} ${a.of} ${s.length}`)}g&&$(g,"multiple",l?"":null);for(const y of[...g?.options||[]].slice(f))y.remove();!l&&f>1&&console.warn(t," Multiple <data> found in single mode."),c&&($(c,"aria-multiselectable",`${l}`),$(r,"list",mn(c)),$(r,"aria-label",`${t._speak}${m}${bn}`),c.hasAttribute("popover")&&($(r,"popovertarget",mn(c)),$(c,"popover","manual")),c._of=a.of);const _=ut(s[0]);_!==t._item&&ae(t),t._item=_,wn(t),yn(t),(n=Ue(t))==null||n.takeRecords()},wn=t=>{var e;t.clear&&$(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||je(t))},yn=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const a of n){const s=(e=$(a,"value"))!=null?e:ut(a);$(a,"aria-label",o?`${o}${ut(a)}`:null),$(a,"selected",i.includes(s)?"":null)}},ae=t=>{const{multiple:e,control:o,items:n}=t,i=ut(n[0]);!e&&o&&i!==o.value&&pn(o,i,i?zs:vn)},Ke=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:a,control:s,items:r,multiple:c}=t,l=((o=s?.value)==null?void 0:o.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(p=>($(p,"label")||ut(p)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(p=>p.selected)),e)return yn(t),u?kt(t,u,!1):a&&l?kt(t,{value:l},!1):(!c&&!l&&r[0]?kt(t,r[0]):ae(t),Fe(n.invalid));for(const p of i)p.selected=p===u},kt=(t,e,o=!0)=>{var n,i,a;const{control:s,items:r,multiple:c}=t,l=Tt("data",e.label||e.value,{value:e.value}),d=[...r].find(p=>p.value===e.value),u={bubbles:!0,cancelable:!0,detail:d||l};if(d&&!o)return ae(t);if(d===((n=fn(t))==null?void 0:n.activeElement)&&((a=(i=t.shadowRoot)==null?void 0:i.querySelector('[role="option"]'))==null||a.focus()),t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!c)for(const p of[...r])p.remove();d?d.remove():s?.insertAdjacentElement("beforebegin",l),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},js=(t,{target:e})=>{const{_form:o,control:n,multiple:i}=t;e instanceof HTMLElement&&(t._focus=e),i&&o===void 0&&n&&e===n&&(t._form=$(n,"form"),$(n,"form","#")),Fe()},Ks=t=>Ge()||setTimeout(Ys,0,t),Ys=t=>{const{_focus:e,_root:o,_form:n,multiple:i,control:a}=t;!e||t.contains(o?.activeElement)||(i||Ke(t),n&&a&&$(a,"form",n),t._focus=t._form=void 0)},Qs=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:a,control:s,items:r}=t;if(a?.contains(i))return s&&pn(s,"",vn),s?.focus();for(const c of r){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return kt(t,c);if(n>=l&&n<=u&&o>=m&&o<=d)return c.focus()}i===t&&s?.focus()},Js=(t,e)=>{var o;const{options:n=[],control:i,multiple:a}=t,s=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!s){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const c of n)if(c.value&&c.value===s)return kt(t,c,a)}else a||Ke(t,!1);wn(t)},Zs=(t,e)=>{var o;const{clear:n,control:i,items:a}=t,{key:s,repeat:r,target:c}=e,l=i&&i===c,d=l&&i.selectionEnd,u=e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt";let m=l?a.length:[...a].indexOf(c);if(l&&s==="Tab"&&!e.shiftKey&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=0,n.focus(),Zt(n,"blur",()=>$(n,"tabindex",null),gn)),!(!l&&qs(e)||m===-1||u)){if(s==="ArrowRight"&&!l)m+=1;else if(s==="ArrowLeft"&&!d)m-=1;else{if(s==="Enter"&&l)return Ke(t);if(s==="Backspace"&&!d){if(e.preventDefault(),!r&&a[m])return kt(t,a[m]);l&&(m-=1)}else return l||i?.focus()}e.preventDefault(),(o=a[Math.max(0,m)]||i)==null||o.focus()}};Us.define("u-combobox",ze);var Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",tr=Ye&&/android/i.test(navigator.userAgent),_n;Ye&&/^Mac/i.test(((_n=navigator.userAgentData)==null?void 0:_n.platform)||navigator.platform);var er=`${tr?"data":"aria"}-labelledby`,Qe=":host(:not([hidden])) { display: block }",se=typeof HTMLElement>"u"?class{}:HTMLElement;function C(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var xn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},or=(t,...e)=>xn("add",t,e),nr=(t,...e)=>xn("remove",t,e),re=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Tn("slot"),Tn("style",e)),le=new WeakMap,En=(t,e)=>{if(e===void 0)return le.get(t);try{le.get(t).disconnect(),le.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),le.set(t,o)}},ir=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},Sn=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},ar=0,$n=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ar).toString(32)}`),t.id):"",Tn=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},ce={define:(t,e)=>!Ye||window.customElements.get(t)||window.customElements.define(t,e)},de=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Je=Qe,Ze=Qe,to=Qe,eo=':host(:not([hidden])) { display: inline-block; cursor: pointer }:host([aria-disabled="true"]) { cursor: default }',sr=de(Je),rr=de(Ze),lr=de(eo),cr=de(to),ue="aria-controls",At="aria-selected",kn="data-utabs",oo=class extends se{constructor(){super(),re(this,Je)}connectedCallback(){C(this,kn,"")}get tabList(){return fe("tablist",this)[0]||null}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}get tabs(){return fe("tab",this)}get panels(){return fe("tabpanel",this)}},no=class extends se{constructor(){super(),re(this,Ze)}connectedCallback(){C(this,"role","tablist"),or(this,"click,keydown",this),En(this,{childList:!0}),requestAnimationFrame(()=>this.handleEvent())}disconnectedCallback(){nr(this,"click,keydown",this),En(this,!1)}handleEvent(t){var e,o;if(!t||t.type==="mutation"){const r=this.tabs[Math.max(this.selectedIndex,0)];return r?.setAttribute(At,"true")}const{key:n}=t,i=[...this.tabs],a=i.findIndex(r=>r.contains(t.target));let s=a;if(!(t.defaultPrevented||a===-1)&&(t.type==="click"&&fo(i[a]),t.type==="keydown"&&!ir(t))){if(n==="ArrowDown"||n==="ArrowRight")s=(a+1)%i.length;else if(n==="ArrowUp"||n==="ArrowLeft")s=(a||i.length)-1;else if(n==="End")s=i.length-1;else if(n==="Home")s=0;else if(n==="Tab")s=me(i);else return;setTimeout(()=>{C(i[a],"tabindex","-1"),C(i[s],"tabindex","0")}),n!=="Tab"&&(t.preventDefault(),(o=(e=i[s]).focus)==null||o.call(e))}}get tabsElement(){return co(this)}get tabs(){return uo(this)}get selectedIndex(){return me(this.tabs)}set selectedIndex(t){fo(this.tabs[t])}},io=!1,ao=class extends se{static get observedAttributes(){return["id",At,ue]}constructor(){super(),re(this,eo)}connectedCallback(){C(this,"role","tab"),C(this,"tabindex",this.selected?"0":"-1")}attributeChangedCallback(){if(!io&&this.selected&&this.tabList){io=!0;const t=this.tabList?uo(this.tabList):[],e=fe("tabpanel",this.tabsElement||this),o=lo(this,e[[...t].indexOf(this)]);o&&C(o,er,$n(this));let n=0;for(const i of t){const a=lo(i,e[n++]);C(i,"tabindex",i===this?"0":"-1"),C(i,At,`${i===this}`),a?.id&&C(i,ue,a.id),a&&(a.hidden=a!==o)}io=!1}}get tabsElement(){return co(this)}get tabList(){const t=this.parentElement;return t?.getAttribute("role")==="tablist"?t:null}get selected(){return C(this,At)==="true"}set selected(t){C(this,At,`${!!t}`)}get index(){const t=this.tabList;return t?[...uo(t)].indexOf(this):0}get panel(){return lo(this)}},so=!1,ro=class extends se{static get observedAttributes(){return["id","hidden"]}constructor(){super(),re(this,to)}connectedCallback(){var t,e;C(this,"role","tabpanel"),(e=(t=this.tabsElement)==null?void 0:t.tabList)==null||e.handleEvent(),this.attributeChangedCallback()}attributeChangedCallback(){if(so)return;so=!0;const t=dr(this.firstChild);this.hidden=me(this.tabs)===-1,C(this,"aria-hidden",`${this.hidden}`),C(this,"tabindex",this.hidden||t?null:"0"),so=!1}get tabsElement(){return co(this)}get tabs(){return Sn(this).querySelectorAll(`[role="tab"][${ue}="${this.id}"]`)}},fe=(t,e)=>e.querySelectorAll(`[role="${t}"]:not(:scope [role="tabpanel"] [role="${t}"])`),lo=(t,e)=>Sn(t).getElementById(C(t,ue)||$n(e)),me=t=>[...t].findIndex(e=>C(e,At)==="true"),co=t=>t.closest(`[${kn}]`),uo=t=>t.querySelectorAll(':scope > [role="tab"]'),fo=t=>t&&C(t,"aria-disabled")!=="true"&&C(t,"aria-selected","true"),dr=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');ce.define("u-tabs",oo),ce.define("u-tablist",no),ce.define("u-tab",ao),ce.define("u-tabpanel",ro);var An=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Cn;An&&/^Mac/i.test(((Cn=navigator.userAgentData)==null?void 0:Cn.platform)||navigator.platform);var ur=":host(:not([hidden])) { display: block }",Ln=typeof HTMLElement>"u"?class{}:HTMLElement;function J(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Mn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Rn=(t,...e)=>Mn("add",t,e),In=(t,...e)=>Mn("remove",t,e),fr=t=>{var e;const o=t.key===" "||t.key==="Enter";return o&&((e=t.preventDefault)==null||e.call(t)),o&&t.target instanceof HTMLElement&&t.target.dispatchEvent(new MouseEvent("click",t)),o},mr=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},mo=(t,e,o)=>{const n=document.createElement(t);if(e&&(n[t==="style"?"textContent":"innerHTML"]=e),o)for(const[i,a]of Object.entries(o))J(n,i,a);return n},On={define:(t,e)=>!An||window.customElements.get(t)||window.customElements.define(t,e)},pr=`${ur}
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 }`,hs=class extends Lo{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(mn("slot",null,{name:"summary"}),mn("slot",null,{part:"details-content"}),mn("style",ps)),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],J(this,"role","group"),Ro(this._content,"beforematch",this),Ro(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&Oo(this._content,"beforematch",this),Oo(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const a of this.children)a.nodeName==="U-SUMMARY"&&J(a,"aria-expanded",`${i}`);if(this._content&&(J(this._content,"aria-hidden",`${!i}`),J(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const a=ms(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const r of a)r!==this&&(r.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"&&fs(t),n&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){J(this,"open",t?"":null)}get name(){return J(this,"name")||""}set name(t){J(this,"name",t)}},gs=class extends Lo{connectedCallback(){J(this,"role","button"),this.slot="summary",this.tabIndex=0}};Io.define("u-details",hs),Io.define("u-summary",gs);const F={passive:!0,capture:!0},At=()=>typeof window<"u"&&typeof document<"u",bs=()=>At()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),pe=typeof HTMLElement>"u"?class{}:HTMLElement;function Ct(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const ut=(t,...e)=>typeof window>"u"||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),x=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),vs=/^["']|["']$/g,Pt=(t,e)=>{let n=x(t,e);return n||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(vs,"").trim()||null,n||ut(`Missing ${e} on:`,t),n},O=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>pn(t,...e)},pn=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},it=(t,e)=>{At()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))};let hn=!1;const ft=(t,e,n)=>{let o=0,i=()=>{if(!t.isConnected)return a();e(r),r.takeRecords(),o=0},a=()=>r?.disconnect?.(),r=new MutationObserver(()=>{!hn&&!o&&(o=requestAnimationFrame(i))});return r.observe(t,n),requestAnimationFrame(i),a},gn=(t,e)=>{hn=!0,t.textContent=e,requestAnimationFrame(ws)},ws=()=>{hn=!1},Do=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))x(n,o,i);return n},Z={define:(t,e)=>!At()||window.customElements.get(t)||window.customElements.define(t,e)};let ys=0;const _s=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function mt(t){return t&&!t.id&&(t.id=`${_s}${++ys}`),t?.id||""}let X,xs=0,Po=0;const bn=t=>{clearTimeout(Po),X&&gn(X,`${t}${xs++%2?" ":""}`),t&&(Po=setTimeout(bn,2e3,""))},Es=()=>{document.readyState==="complete"&&(X||(X=Do("div",{"aria-live":"assertive"}),X.style.overflow="hidden",X.style.position="fixed",X.style.whiteSpace="nowrap",X.style.width="1px"),X.isConnected||document.body.appendChild(X))};it("announce",()=>[O(document,"focus mouseover",Es,F)]);const Ho=":click-delegate-hover",No="data-clickdelegatefor",Ss=`[${No}]`,$s=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.isTrusted&&t.button<2&&Bo(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 he;const Ts=t=>{let e=Bo(t);he!==e&&(he&&he.classList.remove(Ho),e&&e.classList.add(Ho),he=e)},Bo=({target:t})=>{let e=(t instanceof Element?t.closest(Ss):null)?.getAttribute(No),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};it("clickdelegatefor",()=>[O(window,"click auxclick",$s,!0),O(document,"mouseover",Ts,F)]);let vn=!1;const ks=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();vn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!vn&&x(e,"closedby")==="any";vn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},As=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))x(t,"aria-haspopup","dialog")},Cs=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();it("dialog",()=>[O(document,"command",Cs,F),O(document,"pointerdown pointerup",ks,F),ft(document,As,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Lt=Math.min,N=Math.max,ge=Math.round,be=Math.floor,K=t=>({x:t,y:t}),Ls={left:"right",right:"left",bottom:"top",top:"bottom"};function Fo(t,e,n){return N(t,Lt(e,n))}function pt(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function wn(t){return t==="x"?"y":"x"}function Uo(t){return t==="y"?"height":"width"}function Y(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function jo(t){return wn(Y(t))}function Ms(t,e,n){n===void 0&&(n=!1);const o=Ht(t),i=jo(t),a=Uo(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(r=ve(r)),[r,ve(r)]}function Rs(t){const e=ve(t);return[yn(t),e,yn(e)]}function yn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const qo=["left","right"],Wo=["right","left"],Os=["top","bottom"],Is=["bottom","top"];function Ds(t,e,n){switch(t){case"top":case"bottom":return n?e?Wo:qo:e?qo:Wo;case"left":case"right":return e?Os:Is;default:return[]}}function Ps(t,e,n,o){const i=Ht(t);let a=Ds(tt(t),n==="start",o);return i&&(a=a.map(r=>r+"-"+i),e&&(a=a.concat(a.map(yn)))),a}function ve(t){const e=tt(t);return Ls[e]+t.slice(e.length)}function Hs(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ns(t){return typeof t!="number"?Hs(t):{top:t,right:t,bottom:t,left:t}}function we(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 Go(t,e,n){let{reference:o,floating:i}=t;const a=Y(e),r=jo(e),s=Uo(r),c=tt(e),l=a==="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 p;switch(c){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-i.width,y:u};break;default:p={x:o.x,y:o.y}}switch(Ht(e)){case"start":p[r]-=m*(n&&l?-1:1);break;case"end":p[r]+=m*(n&&l?-1:1);break}return p}async function Bs(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:a,rects:r,elements:s,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=pt(e,t),v=Ns(p),g=s[m?u==="floating"?"reference":"floating":u],h=we(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},T=we(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:_,strategy:c}):w);return{top:(h.top-T.top+v.top)/y.y,bottom:(T.bottom-h.bottom+v.bottom)/y.y,left:(h.left-T.left+v.left)/y.x,right:(T.right-h.right+v.right)/y.x}}const Fs=50,Us=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:r}=n,s=r.detectOverflow?r:{...r,detectOverflow:Bs},c=await(r.isRTL==null?void 0:r.isRTL(e));let l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Go(l,o,c),m=o,p=0;const v={};for(let f=0;f<a.length;f++){const g=a[f];if(!g)continue;const{name:h,fn:w}=g,{x:_,y,data:T,reset:S}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:v,rects:l,platform:s,elements:{reference:t,floating:e}});d=_??d,u=y??u,v[h]={...v[h],...T},S&&p<Fs&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(l=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:d,y:u}=Go(l,m,c)),f=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:v}},js=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:a,rects:r,initialPlacement:s,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=pt(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),w=Y(s),_=tt(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=m||(_||!f?[ve(s)]:Rs(s)),S=v!=="none";!m&&S&&T.push(...Ps(s,f,v,y));const R=[s,...T],j=await c.detectOverflow(e,g),xt=[];let ot=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&xt.push(j[h]),u){const Et=Ms(i,r,y);xt.push(j[Et[0]],j[Et[1]])}if(ot=[...ot,{placement:i,overflows:xt}],!xt.every(Et=>Et<=0)){var Xt,Kt;const Et=(((Xt=a.flip)==null?void 0:Xt.index)||0)+1,ao=R[Et];if(ao&&(!(u==="alignment"?w!==Y(ao):!1)||ot.every(z=>Y(z.placement)===w?z.overflows[0]>0:!0)))return{data:{index:Et,overflows:ot},reset:{placement:ao}};let Qt=(Kt=ot.filter(St=>St.overflows[0]<=0).sort((St,z)=>St.overflows[1]-z.overflows[1])[0])==null?void 0:Kt.placement;if(!Qt)switch(p){case"bestFit":{var Yt;const St=(Yt=ot.filter(z=>{if(S){const lt=Y(z.placement);return lt===w||lt==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(lt=>lt>0).reduce((lt,lu)=>lt+lu,0)]).sort((z,lt)=>z[1]-lt[1])[0])==null?void 0:Yt[0];St&&(Qt=St);break}case"initialPlacement":Qt=s;break}if(i!==Qt)return{reset:{placement:Qt}}}return{}}}},Vo=new Set(["left","top"]);async function qs(t,e){const{placement:n,platform:o,elements:i}=t,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=tt(n),s=Ht(n),c=Y(n)==="y",l=Vo.has(r)?-1:1,d=a&&c?-1:1,u=pt(e,t);let{mainAxis:m,crossAxis:p,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"&&(p=s==="end"?v*-1:v),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const Ws=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:a,placement:r,middlewareData:s}=e,c=await qs(e,t);return r===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:r}}}}},Gs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:a}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:h=>{let{x:w,y:_}=h;return{x:w,y:_}}},...l}=pt(t,e),d={x:n,y:o},u=await a.detectOverflow(e,l),m=Y(tt(i)),p=wn(m);let v=d[p],f=d[m];if(r){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",_=v+u[h],y=v-u[w];v=Fo(_,v,y)}if(s){const h=m==="y"?"top":"left",w=m==="y"?"bottom":"right",_=f+u[h],y=f-u[w];f=Fo(_,f,y)}const g=c.fn({...e,[p]:v,[m]:f});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[p]:r,[m]:s}}}}}},Vs=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:a,middlewareData:r}=e,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pt(t,e),d={x:n,y:o},u=Y(i),m=wn(u);let p=d[m],v=d[u];const f=pt(s,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=m==="y"?"height":"width",y=a.reference[m]-a.floating[_]+g.mainAxis,T=a.reference[m]+a.reference[_]-g.mainAxis;p<y?p=y:p>T&&(p=T)}if(l){var h,w;const _=m==="y"?"width":"height",y=Vo.has(tt(i)),T=a.reference[u]-a.floating[_]+(y&&((h=r.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),S=a.reference[u]+a.reference[_]+(y?0:((w=r.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);v<T?v=T:v>S&&(v=S)}return{[m]:p,[u]:v}}}},zs=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:a,platform:r,elements:s}=e,{apply:c=()=>{},...l}=pt(t,e),d=await r.detectOverflow(e,l),u=tt(i),m=Ht(i),p=Y(i)==="y",{width:v,height:f}=a.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=m===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(h=u,g=m==="end"?"top":"bottom");const w=f-d.top-d.bottom,_=v-d.left-d.right,y=Lt(f-d[g],w),T=Lt(v-d[h],_),S=!e.middlewareData.shift;let R=y,j=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(j=_),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=w),S&&!m){const ot=N(d.left,0),Xt=N(d.right,0),Kt=N(d.top,0),Yt=N(d.bottom,0);p?j=v-2*(ot!==0||Xt!==0?ot+Xt:N(d.left,d.right)):R=f-2*(Kt!==0||Yt!==0?Kt+Yt:N(d.top,d.bottom))}await c({...e,availableWidth:j,availableHeight:R});const xt=await r.getDimensions(s.floating);return v!==xt.width||f!==xt.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function Mt(t){return zo(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Q(t){var e;return(e=(zo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zo(t){return ye()?t instanceof Node||t instanceof B(t).Node:!1}function q(t){return ye()?t instanceof Element||t instanceof B(t).Element:!1}function et(t){return ye()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Xo(t){return!ye()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}function Nt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Xs(t){return/^(table|td|th)$/.test(Mt(t))}function _e(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Ks=/transform|translate|scale|rotate|perspective|filter/,Ys=/paint|layout|strict|content/,ht=t=>!!t&&t!=="none";let _n;function xn(t){const e=q(t)?W(t):t;return ht(e.transform)||ht(e.translate)||ht(e.scale)||ht(e.rotate)||ht(e.perspective)||!En()&&(ht(e.backdropFilter)||ht(e.filter))||Ks.test(e.willChange||"")||Ys.test(e.contain||"")}function Qs(t){let e=at(t);for(;et(e)&&!Rt(e);){if(xn(e))return e;if(_e(e))return null;e=at(e)}return null}function En(){return _n==null&&(_n=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_n}function Rt(t){return/^(html|body|#document)$/.test(Mt(t))}function W(t){return B(t).getComputedStyle(t)}function xe(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function at(t){if(Mt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Xo(t)&&t.host||Q(t);return Xo(e)?e.host:e}function Ko(t){const e=at(t);return Rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:et(e)&&Nt(e)?e:Ko(e)}function Bt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ko(t),a=i===((o=t.ownerDocument)==null?void 0:o.body),r=B(i);if(a){const s=Sn(r);return e.concat(r,r.visualViewport||[],Nt(i)?i:[],s&&n?Bt(s):[])}else return e.concat(i,Bt(i,[],n))}function Sn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yo(t){const e=W(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=et(t),a=i?t.offsetWidth:n,r=i?t.offsetHeight:o,s=ge(n)!==a||ge(o)!==r;return s&&(n=a,o=r),{width:n,height:o,$:s}}function $n(t){return q(t)?t:t.contextElement}function Ot(t){const e=$n(t);if(!et(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:a}=Yo(e);let r=(a?ge(n.width):n.width)/o,s=(a?ge(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const Js=K(0);function Qo(t){const e=B(t);return!En()||!e.visualViewport?Js:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Zs(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function gt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),a=$n(t);let r=K(1);e&&(o?q(o)&&(r=Ot(o)):r=Ot(t));const s=Zs(a,n,o)?Qo(a):K(0);let c=(i.left+s.x)/r.x,l=(i.top+s.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(a){const m=B(a),p=o&&q(o)?B(o):o;let v=m,f=Sn(v);for(;f&&o&&p!==v;){const g=Ot(f),h=f.getBoundingClientRect(),w=W(f),_=h.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=_,l+=y,v=B(f),f=Sn(v)}}return we({width:d,height:u,x:c,y:l})}function Ee(t,e){const n=xe(t).scrollLeft;return e?e.left+n:gt(Q(t)).left+n}function Jo(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Ee(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function tl(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const a=i==="fixed",r=Q(o),s=e?_e(e.floating):!1;if(o===r||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=K(1);const d=K(0),u=et(o);if((u||!u&&!a)&&((Mt(o)!=="body"||Nt(r))&&(c=xe(o)),u)){const p=gt(o);l=Ot(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const m=r&&!u&&!a?Jo(r,c):K(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 el(t){return Array.from(t.getClientRects())}function nl(t){const e=Q(t),n=xe(t),o=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=N(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Ee(t);const s=-n.scrollTop;return W(o).direction==="rtl"&&(r+=N(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:r,y:s}}const Zo=25;function ol(t,e){const n=B(t),o=Q(t),i=n.visualViewport;let a=o.clientWidth,r=o.clientHeight,s=0,c=0;if(i){a=i.width,r=i.height;const d=En();(!d||d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=Ee(o);if(l<=0){const d=o.ownerDocument,u=d.body,m=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(o.clientWidth-u.clientWidth-p);v<=Zo&&(a-=v)}else l<=Zo&&(a+=l);return{width:a,height:r,x:s,y:c}}function il(t,e){const n=gt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,a=et(t)?Ot(t):K(1),r=t.clientWidth*a.x,s=t.clientHeight*a.y,c=i*a.x,l=o*a.y;return{width:r,height:s,x:c,y:l}}function ti(t,e,n){let o;if(e==="viewport")o=ol(t,n);else if(e==="document")o=nl(Q(t));else if(q(e))o=il(e,n);else{const i=Qo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return we(o)}function ei(t,e){const n=at(t);return n===e||!q(n)||Rt(n)?!1:W(n).position==="fixed"||ei(n,e)}function al(t,e){const n=e.get(t);if(n)return n;let o=Bt(t,[],!1).filter(s=>q(s)&&Mt(s)!=="body"),i=null;const a=W(t).position==="fixed";let r=a?at(t):t;for(;q(r)&&!Rt(r);){const s=W(r),c=xn(r);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Nt(r)&&!c&&ei(t,r))?o=o.filter(d=>d!==r):i=s,r=at(r)}return e.set(t,o),o}function rl(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?_e(e)?[]:al(e,this._c):[].concat(n),o],s=ti(e,r[0],i);let c=s.top,l=s.right,d=s.bottom,u=s.left;for(let m=1;m<r.length;m++){const p=ti(e,r[m],i);c=N(p.top,c),l=Lt(p.right,l),d=Lt(p.bottom,d),u=N(p.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function sl(t){const{width:e,height:n}=Yo(t);return{width:e,height:n}}function ll(t,e,n){const o=et(e),i=Q(e),a=n==="fixed",r=gt(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const c=K(0);function l(){c.x=Ee(i)}if(o||!o&&!a)if((Mt(e)!=="body"||Nt(i))&&(s=xe(e)),o){const p=gt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else i&&l();a&&!o&&i&&l();const d=i&&!o&&!a?Jo(i,s):K(0),u=r.left+s.scrollLeft-c.x-d.x,m=r.top+s.scrollTop-c.y-d.y;return{x:u,y:m,width:r.width,height:r.height}}function Tn(t){return W(t).position==="static"}function ni(t,e){if(!et(t)||W(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Q(t)===n&&(n=n.ownerDocument.body),n}function oi(t,e){const n=B(t);if(_e(t))return n;if(!et(t)){let i=at(t);for(;i&&!Rt(i);){if(q(i)&&!Tn(i))return i;i=at(i)}return n}let o=ni(t,e);for(;o&&Xs(o)&&Tn(o);)o=ni(o,e);return o&&Rt(o)&&Tn(o)&&!xn(o)?n:o||Qs(t)||n}const cl=async function(t){const e=this.getOffsetParent||oi,n=this.getDimensions,o=await n(t.floating);return{reference:ll(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function dl(t){return W(t).direction==="rtl"}const ul={convertOffsetParentRelativeRectToViewportRelativeRect:tl,getDocumentElement:Q,getClippingRect:rl,getOffsetParent:oi,getElementRects:cl,getClientRects:el,getDimensions:sl,getScale:Ot,isElement:q,isRTL:dl};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fl(t,e){let n=null,o;const i=Q(t);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function r(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:p}=l;if(s||e(),!m||!p)return;const v=be(u),f=be(i.clientWidth-(d+m)),g=be(i.clientHeight-(u+p)),h=be(d),_={rootMargin:-v+"px "+-f+"px "+-g+"px "+-h+"px",threshold:N(0,Lt(1,c))||1};let y=!0;function T(S){const R=S[0].intersectionRatio;if(R!==c){if(!y)return r();R?r(!1,R):o=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!ii(l,t.getBoundingClientRect())&&r(),y=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(t)}return r(!0),a}function ml(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=$n(t),d=i||a?[...l?Bt(l):[],...e?Bt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),a&&h.addEventListener("resize",n)});const u=l&&s?fl(l,n):null;let m=-1,p=null;r&&(p=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&p&&e&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(e)})),n()}),l&&!c&&p.observe(l),e&&p.observe(e));let v,f=c?gt(t):null;c&&g();function g(){const h=gt(t);f&&!ii(f,h)&&n(),f=h,v=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u?.(),(h=p)==null||h.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const pl=Ws,hl=Gs,gl=js,bl=zs,vl=Vs,wl=(t,e,n)=>{const o=new Map,i={platform:ul,...n},a={...i.platform,_c:o};return Us(t,e,{...i,platform:a})},ai="data-placement",ri="data-autoplacement",Ft=new Map;function yl(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,a=o instanceof HTMLElement&&si(o,"--_ds-floating");if(!a)return;if(e==="closed")return Ft.get(o)?.();if(!i){let v=o.getRootNode(),f=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&v?.querySelector?.(f)||void 0}if(!i||i===o||n&&n===e)return;let r=si(o,"--_ds-floating-overscroll"),s=x(o,ai)||x(i,ai)||a,c=x(o,ri)||x(i,ri),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:[pl(l||0),hl({padding:10,limiter:vl({offset:{mainAxis:u}})}),xl(),...c==="false"?[]:[gl({padding:10,crossAxis:!1})],...r?[bl({apply({availableHeight:v}){r==="fit"&&(o.style.width=`${i.clientWidth}px`),o.style.maxHeight=`${Math.max(50,v-20)}px`}})]:[]]},p=ml(i,o,async()=>{if(!i?.isConnected)return Ft.get(o)?.();let{x:v,y:f}=await wl(i,o,m);o.style.translate=`${v}px ${f}px`});Ft.set(o,()=>Ft.delete(o)&&p())}let Se;const _l=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Ft)e.showPopover()};it("popover",()=>[O(document,"mousedown scroll mouseup",_l,!0),O(document,"toggle ds-toggle-source",yl,F)]);const si=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),xl=()=>({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),x(e,"data-floating",t.placement),t}}),kn=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||x(t,"aria-readonly")==="true"),El=t=>{if(t.key!=="Tab"&&kn(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&x(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()}},Sl=t=>{let e=t.target?.closest?.("label")?.control||t.target;kn(e)&&(t.preventDefault(),e.focus())},$l=t=>{t.target instanceof HTMLSelectElement&&kn(t.target)&&t.preventDefault()};it("readonly",()=>[O(document,"keydown",El),O(document,"click",Sl),O(document,"mousedown",$l)]);const An="data-toggle-group",li=`[${An}]`,Tl=Ct(()=>{for(let t of document.querySelectorAll(li))x(t,"aria-label",Pt(t,An))},0),kl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(li);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,a=o;for(let r=0;r<n.length;r++)if(a=(n.length+a+i)%n.length,!n[a]?.disabled){n[a]?.focus();break}}};it("toggle-group",()=>[O(document,"keydown",kl),ft(document,Tl,{attributeFilter:[An],attributes:!0,childList:!0,subtree:!0})]);let L,Ut,ci=0,di=0;const bt="data-tooltip",Cn="data-color",ui="aria-label",fi="aria-description",Al=`[${Cn}]`,Cl=`[${bt}]`,Ln="data-color-scheme",Ll=`[${Ln}]`,mi=t=>{t&&!(t instanceof HTMLElement)&&ut("setTooltipElement expects an HTMLElement, got: ",t),L=t||void 0},Ml=Ct(()=>{for(let t of document.querySelectorAll(Cl)){let e=t.getAttribute(ui)||t.getAttribute(fi),n=t.getAttribute(bt)||Pt(t,bt);if(e!==n){let a=x(t,"role")!=="img"&&t.textContent?.trim();x(t,bt,n),x(t,ui,a?null:n),x(t,fi,a?n:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||ut('Missing tabindex="0" attribute on: ',t)}let o=t===Ut&&L?.matches(":popover-open"),i=o&&n&&L?.textContent!==n;o&&i&&(L&&gn(L,n),document.activeElement===t&&bn(n))}},0),pi=({type:t,target:e})=>{if(clearTimeout(ci),e===L)return;if(t==="mouseover"&&!Ut){ci=setTimeout(pi,300,{target:e});return}let n=e?.closest?.(`[${bt}]`);if(n===Ut)return;if(!n)return hi();L||=Do("div",{class:"ds-tooltip"}),L.isConnected||document.body.appendChild(L);let o=n.closest(Al),i=n.closest(Ll),a=o!==i&&o?.contains(i);clearTimeout(di),x(L,"popover","manual"),x(L,Ln,i?.getAttribute(Ln)||null),x(L,Cn,a&&o?.getAttribute(Cn)||null),gn(L,x(n,bt)),L.showPopover(),L.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),Ut=n},hi=()=>L?.isConnected&&L.popover&&L.hidePopover(),gi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&hi();t?t.target===L&&t.newState==="closed"&&(di=setTimeout(gi,300)):Ut=void 0};it("tooltip",()=>[O(document,"blur focus mouseover",pi,F),O(document,"toggle keydown",gi,F),ft(document,Ml,{attributeFilter:[bt],attributes:!0,childList:!0,subtree:!0})]);const Mn="aria-label";var bi=class extends pe{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Mn]}connectedCallback(){this._label=Pt(this,Mn),this._items=this.getElementsByTagName("a"),this._render=Ct(()=>Rl(this),100),this._unresize=O(window,"resize",this._render),this._unmutate=ft(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 Rl=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;x(t,"role",o?null:"navigation"),x(t,Mn,o?null:t._label);for(let i of t._items||[])x(i,"aria-current",i===n?"page":null)};Z.define("ds-breadcrumbs",bi);var vi=class extends pe{connectedCallback(){O(this,"animationend",this,F),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let n=this.querySelector("h2,h3,h4,h5,h6");n&&x(this,"aria-labelledby",mt(n)),x(this,"tabindex","-1"),this.focus()}disconnectedCallback(){pn(this,"animationend",this,F)}};Z.define("ds-error-summary",vi);const wi="data-indeterminate",Rn=new Set,yi=new WeakMap,Ol=At()?document.getElementsByTagName("fieldset"):[],Il=At()&&CSS.supports("field-sizing","content"),Dl=bs()?800:200,_i=new WeakSet,xi=Ct(()=>{for(let t of Ol)x(t,"aria-labelledby",`${mt(t.querySelector("legend"))} ${mt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of Rn){let e=[],n=[],o,i,a=!1,r=!1;for(let s of t.getElementsByTagName("*"))if(s instanceof HTMLLabelElement&&n.push(s),!s.hidden)if(Hl(s))o?ut("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),a=!0,r||=Si(s)):c&&e.push(s)}if(!o)ut("Field is missing input element:",t);else{i&&yi.set(o,i);for(let d of n)x(d,"for",mt(o));let s=o.type==="radio"||o.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(a=!0,r||=Si(c),e.unshift(c));let l=x(o,wi);l&&(o.indeterminate=l==="true"),x(t,"data-clickdelegatefor",s?mt(o):null),x(o,"aria-describedby",e.map(mt).join(" ")||null),(a||_i.has(o))&&(_i[a?"add":"delete"](o),x(o,"aria-invalid",`${r}`)),Ei(o)}}},0),Ei=t=>{let e=t.target||t,n=yi.get(e);if(n?.isConnected){let o=(Number(x(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",a=Pt(n,`data-${i}`)?.replace("%d",`${Math.abs(o)}`);x(n,"data-label",a),x(n,"data-state",i),x(n,"data-color",o<0?"danger":null),t.type==="input"&&a&&Pl(e,a)}!Il&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Pl=Ct((t,e)=>{document.activeElement===t&&bn(e)},Dl),Si=t=>t.getAttribute("data-color")!=="success",Hl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var $e=class extends pe{connectedCallback(){Rn.add(this),xi()}disconnectedCallback(){Rn.delete(this)}};Z.define("ds-field",$e),it("field",()=>[O(document,"input",Ei,F),ft(document,xi,{attributeFilter:["data-field","data-limit","hidden","value",wi],attributes:!0,childList:!0,subtree:!0})]);const On="aria-label",Te="data-current",ke="data-total",$i="data-href",Ti=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:Bl(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var ki=class extends pe{_unmutate;_render;static get observedAttributes(){return[On,Te,ke,$i]}connectedCallback(){let t=x(this,ke),e=x(this,Te);e&&!t&&ut(`Missing ${ke} attribute on:`,this),t&&!e&&ut(`Missing ${Te} attribute on:`,this),x(this,On,Pt(this,On)),x(this,"role","navigation"),this._render=Ct(()=>Nl(this),0),this._unmutate=ft(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(x(t,Te)),n=Number(x(t,ke));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,a=x(t,$i),{next:r,prev:s,pages:c}=Ti({current:e,total:n,show:i});o.forEach((l,d)=>{let u=d?o[d+1]?c[d-1]?.page:r:s;x(l,"aria-current",c[d-1]?.current?"true":null),x(l,"aria-label",`${u??"hidden"}`),x(l,"role",u?null:"none"),x(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&x(l,"value",`${u}`),a&&l instanceof HTMLAnchorElement&&x(l,"href",a.replace("%d",`${u}`))})}},Bl=(t,e,n=1/0)=>{let o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),a=Math.min(Math.max(t+Math.ceil(o),n),e),r=Array.from({length:a+1-i},(s,c)=>c+i);return n>4&&i>1&&r.splice(0,2,1,0),n>3&&a<e&&r.splice(-2,2,0,e),r};Z.define("ds-pagination",ki);var Ai=class extends Ve{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Fl(this),this._unmutate=ft(this,this._render,{childList:!0}),O(this,"toggle",Ci,F)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,pn(this,"toggle",Ci,F)}};const Fl=({control:t,list:e})=>{t&&!t.placeholder&&x(t,"placeholder"," "),t&&x(t,"popovertarget",mt(e)||null),e&&x(e,"popover","manual")},Ci=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};Z.define("ds-suggestion",Ai);var Li=class extends nn{},Mi=class extends on{},Ri=class extends rn{},Oi=class extends ln{};Z.define("ds-tabs",Li),Z.define("ds-tablist",Mi),Z.define("ds-tab",Ri),Z.define("ds-tabpanel",Oi);function Ul(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function jl(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,g,h=!0){Object.defineProperty(f,g,{...Object.getOwnPropertyDescriptor(f,g),enumerable:h})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}const n=new WeakMap,o=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:_}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");n.set(this,w||null),o.set(this,_!==void 0?String(_):"")}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 a extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const r=new WeakMap;function s(f){Object.defineProperties(f.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"),r.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?r.set(this,g):r.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=r.get(this);if(g)return g.isConnected?g:(r.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(f){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(const g of f)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(f=>{for(const g of f){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(f){if(u.has(f)||(u.add(f),f.defaultPrevented)||f.type!=="click")return;const g=f.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=f.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw f.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 T=h.hasAttribute("command")?"command":"commandfor",S=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${T} attribute must also have a ${S} 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 _=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(_),_.defaultPrevented)return;const y=_.command.toLowerCase();if(w.popover){const T=!w.matches(":popover-open");T&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!T&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const T=!w.hasAttribute("open");T&&y=="show-modal"?w.showModal():!T&&y=="close"?w.close(h.value?h.value:void 0):!T&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const S=new Event("cancel",{cancelable:!0});this.dispatchEvent(S),S.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function p(f){f.addEventListener("click",m,!0)}function v(f,g){const h=f.prototype.attachShadow;f.prototype.attachShadow=function(_){const y=h.call(this,_);return g(y),y};const w=f.prototype.attachInternals;f.prototype.attachInternals=function(){const _=w.call(this);return _.shadowRoot&&g(_.shadowRoot),_}}s(HTMLButtonElement),v(HTMLElement,f=>{p(f),d.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),p(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:a})}var Ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ql=Ae&&/android/i.test(navigator.userAgent),Wl=Ae&&/firefox/i.test(navigator.userAgent),Ii;Ae&&/^Mac/i.test(((Ii=navigator.userAgentData)==null?void 0:Ii.platform)||navigator.platform);function Di(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(Ae&&ql&&Wl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const n=e.parentElement;Di(e,"role","button"),Di(e,"aria-expanded",`${!!n&&!!n.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Gl=Object.defineProperty,Pi=Object.getOwnPropertySymbols,Vl=Object.prototype.hasOwnProperty,zl=Object.prototype.propertyIsEnumerable,Hi=(t,e,n)=>e in t?Gl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xl=(t,e)=>{for(var n in e||(e={}))Vl.call(e,n)&&Hi(t,n,e[n]);if(Pi)for(var n of Pi(e))zl.call(e,n)&&Hi(t,n,e[n]);return t},jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Le=jt&&/android/i.test(navigator.userAgent),In=jt&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ni;jt&&/^Mac/i.test(((Ni=navigator.userAgentData)==null?void 0:Ni.platform)||navigator.platform);var Kl=`${Le?"data":"aria"}-labelledby`,Yl=":host(:not([hidden])) { display: block }",Ql="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Bi=typeof HTMLElement>"u"?class{}:HTMLElement;function k(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 Fi=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},qt=(t,...e)=>Fi("add",t,e),Me=(t,...e)=>Fi("remove",t,e),Jl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Hn("slot"),Hn("style",e)),Re=new WeakMap,Dn=(t,e)=>{if(e===void 0)return Re.get(t);try{Re.get(t).disconnect(),Re.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Re.set(t,n)}},Ui=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,Pn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Zl).toString(32)}`),t.id):"",Hn=(t,e,n)=>{const o=document.createElement(t);return e&&(o[t==="style"?"textContent":"innerHTML"]=e),o},ji={define:(t,e)=>!jt||window.customElements.get(t)||window.customElements.define(t,e)},vt,tc=0,qi=t=>{vt||(vt=Hn("div"),vt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(vt,"aria-live","assertive")),vt.isConnected||document.body.append(vt),t&&(vt.textContent=`${t}${tc++%2?" ":""}`)},ec=(t,e,n="")=>{var o,i;const a={bubbles:!0,composed:!0,data:e,inputType:n},r=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(o=Object.getOwnPropertyDescriptor(r,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Nn=!1,Bn=t=>(t?.type==="mouseup"&&(Nn=!1),t?.type==="mousedown"&&(Nn=!0,qt(document,"mouseup",Bn,{once:!0})),Nn),nc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Fn="disabled",Wt="selected",oc=class extends Bi{static get observedAttributes(){return[Fn,Wt]}connectedCallback(){In||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Wt]}set defaultSelected(t){this[Wt]=t}get disabled(){return k(this,Fn)!==null}set disabled(t){k(this,Fn,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=k(this,"label"))!=null?t:this.text}set label(t){k(this,"label",t)}get selected(){return k(this,Wt)!==null}set selected(t){k(this,Wt,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=k(this,"value"))!=null?t:this.text}set value(t){k(this,"value",t)}};ji.define("u-option",oc);var Un=`${Yl}
13
+ :host > [part="details-content"]:not([hidden=""]) { display: block }`,hr=class extends Ln{constructor(){super(),this._content=null,this.shadowRoot||this.attachShadow({mode:"open"}).append(mo("slot",null,{name:"summary"}),mo("slot",null,{part:"details-content"}),mo("style",pr)),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],J(this,"role","group"),Rn(this._content,"beforematch",this),Rn(this,"click,keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&In(this._content,"beforematch",this),In(this,"click,keydown",this),this._content=null}attributeChangedCallback(t,e,o){const n="onbeforematch"in this?"until-found":!0,i=this.open;for(const a of this.children)a.nodeName==="U-SUMMARY"&&J(a,"aria-expanded",`${i}`);if(this._content&&(J(this._content,"aria-hidden",`${!i}`),J(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:n),i&&this.name){const a=mr(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const s of a)s!==this&&(s.open=!1)}t==="open"&&e===null!=(o===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e;const o=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),o&&t.type==="keydown"&&fr(t),o&&t.type==="click"&&(this.open=!this.open))}get open(){return this.hasAttribute("open")}set open(t){J(this,"open",t?"":null)}get name(){return J(this,"name")||""}set name(t){J(this,"name",t)}},gr=class extends Ln{connectedCallback(){J(this,"role","button"),this.slot="summary",this.tabIndex=0}};On.define("u-details",hr),On.define("u-summary",gr);const B={passive:!0,capture:!0},Z=()=>typeof window<"u"&&typeof document<"u",br=()=>Z()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),pe=typeof HTMLElement>"u"?class{}:HTMLElement;function Ct(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const ft=(t,...e)=>!Z()||window.dsWarnings===!1||console.warn(`Designsystemet: ${t}`,...e),x=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),vr=/^["']|["']$/g,Pt=(t,e)=>{let o=x(t,e);return o||=getComputedStyle(t).getPropertyValue(`--_ds-${e}`).replace(vr,"").trim()||null,o||ft(`Missing ${e} on:`,t),o},I=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.addEventListener(i,...n);return()=>po(t,...e)},po=(t,...e)=>{let[o,...n]=e;for(let i of o.split(" "))t.removeEventListener(i,...n)},at=(t,e)=>{Z()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(o=>o()),window._dsHotReloadCleanup?.set(t,e()))};let ho=!1;const mt=(t,e,o)=>{let n=0,i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{!ho&&!n&&(n=requestAnimationFrame(i))});return s.observe(t,o),requestAnimationFrame(i),a},go=(t,e)=>{ho=!0,t.textContent=e,requestAnimationFrame(wr)},wr=()=>{ho=!1},Dn=(t,e)=>{let o=document.createElement(t);if(e)for(let[n,i]of Object.entries(e))x(o,n,i);return o},tt={define:(t,e)=>!Z()||window.customElements.get(t)||window.customElements.define(t,e)};let yr=0;function pt(t){return Z()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++yr}`}let j,_r=0,Pn=0;const bo=t=>{clearTimeout(Pn),j&&go(j,`${t}${_r++%2?" ":""}`),t&&(Pn=setTimeout(bo,2e3,""))},xr=()=>{document.readyState==="complete"&&(j||(j=Dn("div",{"aria-live":"assertive"}),j.style.overflow="hidden",j.style.position="fixed",j.style.whiteSpace="nowrap",j.style.width="1px"),j.isConnected||document.body.appendChild(j))};at("announce",()=>[I(document,"focus mouseover",xr,B)]);const Hn=":click-delegate-hover",Nn="data-clickdelegatefor",Er=`[${Nn}]`,Sr=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,o=t.isTrusted&&t.button<2&&qn(t);if(!(!o||o.contains(t.target))){if(e&&o instanceof HTMLAnchorElement)return window.open(o.href,void 0,o.rel);t.stopImmediatePropagation(),o.click()}};let he;const $r=t=>{let e=qn(t);he!==e&&(he&&he.classList.remove(Hn),e&&e.classList.add(Hn),he=e)},qn=({target:t})=>{let e=(t instanceof Element?t.closest(Er):null)?.getAttribute(Nn),o=e&&document.getElementById(e)||void 0,n=o&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!n||n===o)&&!o?.disabled?o:void 0};at("clickdelegatefor",()=>[I(window,"click auxclick",Sr,!0),I(document,"mouseover",$r,B)]);let vo=!1;const Tr=({type:t,target:e,clientX:o=0,clientY:n=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();vo=!!(i&&i.top<=n&&n<=i.bottom&&i.left<=o&&o<=i.right)}else{let i=e instanceof HTMLDialogElement&&!vo&&x(e,"closedby")==="any";vo=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},kr=()=>{for(let t of document.querySelectorAll('button[command="show-modal"]'))x(t,"aria-haspopup","dialog")},Ar=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();at("dialog",()=>[I(document,"command",Ar,B),I(document,"pointerdown pointerup",Tr,B),mt(document,kr,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Lt=Math.min,N=Math.max,ge=Math.round,be=Math.floor,K=t=>({x:t,y:t}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"};function Bn(t,e,o){return N(t,Lt(e,o))}function ht(t,e){return typeof t=="function"?t(e):t}function et(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function wo(t){return t==="x"?"y":"x"}function Un(t){return t==="y"?"height":"width"}function Y(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Fn(t){return wo(Y(t))}function Lr(t,e,o){o===void 0&&(o=!1);const n=Ht(t),i=Fn(t),a=Un(i);let s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=ve(s)),[s,ve(s)]}function Mr(t){const e=ve(t);return[yo(t),e,yo(e)]}function yo(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Wn=["left","right"],Gn=["right","left"],Rr=["top","bottom"],Ir=["bottom","top"];function Or(t,e,o){switch(t){case"top":case"bottom":return o?e?Gn:Wn:e?Wn:Gn;case"left":case"right":return e?Rr:Ir;default:return[]}}function Dr(t,e,o,n){const i=Ht(t);let a=Or(et(t),o==="start",n);return i&&(a=a.map(s=>s+"-"+i),e&&(a=a.concat(a.map(yo)))),a}function ve(t){const e=et(t);return Cr[e]+t.slice(e.length)}function Pr(t){return{top:0,right:0,bottom:0,left:0,...t}}function Hr(t){return typeof t!="number"?Pr(t):{top:t,right:t,bottom:t,left:t}}function we(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Vn(t,e,o){let{reference:n,floating:i}=t;const a=Y(e),s=Fn(e),r=Un(s),c=et(e),l=a==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,m=n[r]/2-i[r]/2;let p;switch(c){case"top":p={x:d,y:n.y-i.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-i.width,y:u};break;default:p={x:n.x,y:n.y}}switch(Ht(e)){case"start":p[s]-=m*(o&&l?-1:1);break;case"end":p[s]+=m*(o&&l?-1:1);break}return p}async function Nr(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:s,elements:r,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=ht(e,t),v=Hr(p),g=r[m?u==="floating"?"reference":"floating":u],h=we(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(g)))==null||o?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(r.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(r.floating)),y=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},T=we(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:_,strategy:c}):w);return{top:(h.top-T.top+v.top)/y.y,bottom:(T.bottom-h.bottom+v.bottom)/y.y,left:(h.left-T.left+v.left)/y.x,right:(T.right-h.right+v.right)/y.x}}const qr=50,Br=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,r=s.detectOverflow?s:{...s,detectOverflow:Nr},c=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Vn(l,n,c),m=n,p=0;const v={};for(let f=0;f<a.length;f++){const g=a[f];if(!g)continue;const{name:h,fn:w}=g,{x:_,y,data:T,reset:S}=await w({x:d,y:u,initialPlacement:n,placement:m,strategy:i,middlewareData:v,rects:l,platform:r,elements:{reference:t,floating:e}});d=_??d,u=y??u,v[h]={...v[h],...T},S&&p<qr&&(p++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(l=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:d,y:u}=Vn(l,m,c)),f=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:v}},Ur=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:a,rects:s,initialPlacement:r,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:f=!0,...g}=ht(t,e);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const h=et(i),w=Y(r),_=et(r)===r,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),T=m||(_||!f?[ve(r)]:Mr(r)),S=v!=="none";!m&&S&&T.push(...Dr(r,f,v,y));const R=[r,...T],F=await c.detectOverflow(e,g),Et=[];let it=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&Et.push(F[h]),u){const St=Lr(i,s,y);Et.push(F[St[0]],F[St[1]])}if(it=[...it,{placement:i,overflows:Et}],!Et.every(St=>St<=0)){var jt,Kt;const St=(((jt=a.flip)==null?void 0:jt.index)||0)+1,sn=R[St];if(sn&&(!(u==="alignment"?w!==Y(sn):!1)||it.every(X=>Y(X.placement)===w?X.overflows[0]>0:!0)))return{data:{index:St,overflows:it},reset:{placement:sn}};let Qt=(Kt=it.filter($t=>$t.overflows[0]<=0).sort(($t,X)=>$t.overflows[1]-X.overflows[1])[0])==null?void 0:Kt.placement;if(!Qt)switch(p){case"bestFit":{var Yt;const $t=(Yt=it.filter(X=>{if(S){const ct=Y(X.placement);return ct===w||ct==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(ct=>ct>0).reduce((ct,lu)=>ct+lu,0)]).sort((X,ct)=>X[1]-ct[1])[0])==null?void 0:Yt[0];$t&&(Qt=$t);break}case"initialPlacement":Qt=r;break}if(i!==Qt)return{reset:{placement:Qt}}}return{}}}},zn=new Set(["left","top"]);async function Fr(t,e){const{placement:o,platform:n,elements:i}=t,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=et(o),r=Ht(o),c=Y(o)==="y",l=zn.has(s)?-1:1,d=a&&c?-1:1,u=ht(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return r&&typeof v=="number"&&(p=r==="end"?v*-1:v),c?{x:p*d,y:m*l}:{x:m*l,y:p*d}}const Wr=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:a,placement:s,middlewareData:r}=e,c=await Fr(e,t);return s===((o=r.offset)==null?void 0:o.placement)&&(n=r.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},Gr=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i,platform:a}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:h=>{let{x:w,y:_}=h;return{x:w,y:_}}},...l}=ht(t,e),d={x:o,y:n},u=await a.detectOverflow(e,l),m=Y(et(i)),p=wo(m);let v=d[p],f=d[m];if(s){const h=p==="y"?"top":"left",w=p==="y"?"bottom":"right",_=v+u[h],y=v-u[w];v=Bn(_,v,y)}if(r){const h=m==="y"?"top":"left",w=m==="y"?"bottom":"right",_=f+u[h],y=f-u[w];f=Bn(_,f,y)}const g=c.fn({...e,[p]:v,[m]:f});return{...g,data:{x:g.x-o,y:g.y-n,enabled:{[p]:s,[m]:r}}}}}},Vr=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:a,middlewareData:s}=e,{offset:r=0,mainAxis:c=!0,crossAxis:l=!0}=ht(t,e),d={x:o,y:n},u=Y(i),m=wo(u);let p=d[m],v=d[u];const f=ht(r,e),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const _=m==="y"?"height":"width",y=a.reference[m]-a.floating[_]+g.mainAxis,T=a.reference[m]+a.reference[_]-g.mainAxis;p<y?p=y:p>T&&(p=T)}if(l){var h,w;const _=m==="y"?"width":"height",y=zn.has(et(i)),T=a.reference[u]-a.floating[_]+(y&&((h=s.offset)==null?void 0:h[u])||0)+(y?0:g.crossAxis),S=a.reference[u]+a.reference[_]+(y?0:((w=s.offset)==null?void 0:w[u])||0)-(y?g.crossAxis:0);v<T?v=T:v>S&&(v=S)}return{[m]:p,[u]:v}}}},zr=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:a,platform:s,elements:r}=e,{apply:c=()=>{},...l}=ht(t,e),d=await s.detectOverflow(e,l),u=et(i),m=Ht(i),p=Y(i)==="y",{width:v,height:f}=a.floating;let g,h;u==="top"||u==="bottom"?(g=u,h=m===(await(s.isRTL==null?void 0:s.isRTL(r.floating))?"start":"end")?"left":"right"):(h=u,g=m==="end"?"top":"bottom");const w=f-d.top-d.bottom,_=v-d.left-d.right,y=Lt(f-d[g],w),T=Lt(v-d[h],_),S=!e.middlewareData.shift;let R=y,F=T;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(F=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(R=w),S&&!m){const it=N(d.left,0),jt=N(d.right,0),Kt=N(d.top,0),Yt=N(d.bottom,0);p?F=v-2*(it!==0||jt!==0?it+jt:N(d.left,d.right)):R=f-2*(Kt!==0||Yt!==0?Kt+Yt:N(d.top,d.bottom))}await c({...e,availableWidth:F,availableHeight:R});const Et=await s.getDimensions(r.floating);return v!==Et.width||f!==Et.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function Mt(t){return Xn(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Q(t){var e;return(e=(Xn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xn(t){return ye()?t instanceof Node||t instanceof q(t).Node:!1}function W(t){return ye()?t instanceof Element||t instanceof q(t).Element:!1}function ot(t){return ye()?t instanceof HTMLElement||t instanceof q(t).HTMLElement:!1}function jn(t){return!ye()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof q(t).ShadowRoot}function Nt(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&i!=="inline"&&i!=="contents"}function Xr(t){return/^(table|td|th)$/.test(Mt(t))}function _e(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const jr=/transform|translate|scale|rotate|perspective|filter/,Kr=/paint|layout|strict|content/,gt=t=>!!t&&t!=="none";let _o;function xo(t){const e=W(t)?G(t):t;return gt(e.transform)||gt(e.translate)||gt(e.scale)||gt(e.rotate)||gt(e.perspective)||!Eo()&&(gt(e.backdropFilter)||gt(e.filter))||jr.test(e.willChange||"")||Kr.test(e.contain||"")}function Yr(t){let e=st(t);for(;ot(e)&&!Rt(e);){if(xo(e))return e;if(_e(e))return null;e=st(e)}return null}function Eo(){return _o==null&&(_o=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_o}function Rt(t){return/^(html|body|#document)$/.test(Mt(t))}function G(t){return q(t).getComputedStyle(t)}function xe(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if(Mt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jn(t)&&t.host||Q(t);return jn(e)?e.host:e}function Kn(t){const e=st(t);return Rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&Nt(e)?e:Kn(e)}function qt(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Kn(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=q(i);if(a){const r=So(s);return e.concat(s,s.visualViewport||[],Nt(i)?i:[],r&&o?qt(r):[])}else return e.concat(i,qt(i,[],o))}function So(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yn(t){const e=G(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=ot(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,r=ge(o)!==a||ge(n)!==s;return r&&(o=a,n=s),{width:o,height:n,$:r}}function $o(t){return W(t)?t:t.contextElement}function It(t){const e=$o(t);if(!ot(e))return K(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:a}=Yn(e);let s=(a?ge(o.width):o.width)/n,r=(a?ge(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!r||!Number.isFinite(r))&&(r=1),{x:s,y:r}}const Qr=K(0);function Qn(t){const e=q(t);return!Eo()||!e.visualViewport?Qr:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jr(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==q(t)?!1:e}function bt(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),a=$o(t);let s=K(1);e&&(n?W(n)&&(s=It(n)):s=It(t));const r=Jr(a,o,n)?Qn(a):K(0);let c=(i.left+r.x)/s.x,l=(i.top+r.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(a){const m=q(a),p=n&&W(n)?q(n):n;let v=m,f=So(v);for(;f&&n&&p!==v;){const g=It(f),h=f.getBoundingClientRect(),w=G(f),_=h.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,y=h.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=_,l+=y,v=q(f),f=So(v)}}return we({width:d,height:u,x:c,y:l})}function Ee(t,e){const o=xe(t).scrollLeft;return e?e.left+o:bt(Q(t)).left+o}function Jn(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-Ee(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Zr(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const a=i==="fixed",s=Q(n),r=e?_e(e.floating):!1;if(n===s||r&&a)return o;let c={scrollLeft:0,scrollTop:0},l=K(1);const d=K(0),u=ot(n);if((u||!u&&!a)&&((Mt(n)!=="body"||Nt(s))&&(c=xe(n)),u)){const p=bt(n);l=It(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=s&&!u&&!a?Jn(s,c):K(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-c.scrollLeft*l.x+d.x+m.x,y:o.y*l.y-c.scrollTop*l.y+d.y+m.y}}function tl(t){return Array.from(t.getClientRects())}function el(t){const e=Q(t),o=xe(t),n=t.ownerDocument.body,i=N(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=N(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Ee(t);const r=-o.scrollTop;return G(n).direction==="rtl"&&(s+=N(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:r}}const Zn=25;function ol(t,e){const o=q(t),n=Q(t),i=o.visualViewport;let a=n.clientWidth,s=n.clientHeight,r=0,c=0;if(i){a=i.width,s=i.height;const d=Eo();(!d||d&&e==="fixed")&&(r=i.offsetLeft,c=i.offsetTop)}const l=Ee(n);if(l<=0){const d=n.ownerDocument,u=d.body,m=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(n.clientWidth-u.clientWidth-p);v<=Zn&&(a-=v)}else l<=Zn&&(a+=l);return{width:a,height:s,x:r,y:c}}function nl(t,e){const o=bt(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=ot(t)?It(t):K(1),s=t.clientWidth*a.x,r=t.clientHeight*a.y,c=i*a.x,l=n*a.y;return{width:s,height:r,x:c,y:l}}function ti(t,e,o){let n;if(e==="viewport")n=ol(t,o);else if(e==="document")n=el(Q(t));else if(W(e))n=nl(e,o);else{const i=Qn(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return we(n)}function ei(t,e){const o=st(t);return o===e||!W(o)||Rt(o)?!1:G(o).position==="fixed"||ei(o,e)}function il(t,e){const o=e.get(t);if(o)return o;let n=qt(t,[],!1).filter(r=>W(r)&&Mt(r)!=="body"),i=null;const a=G(t).position==="fixed";let s=a?st(t):t;for(;W(s)&&!Rt(s);){const r=G(s),c=xo(s);!c&&r.position==="fixed"&&(i=null),(a?!c&&!i:!c&&r.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Nt(s)&&!c&&ei(t,s))?n=n.filter(d=>d!==s):i=r,s=st(s)}return e.set(t,n),n}function al(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_e(e)?[]:il(e,this._c):[].concat(o),n],r=ti(e,s[0],i);let c=r.top,l=r.right,d=r.bottom,u=r.left;for(let m=1;m<s.length;m++){const p=ti(e,s[m],i);c=N(p.top,c),l=Lt(p.right,l),d=Lt(p.bottom,d),u=N(p.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function sl(t){const{width:e,height:o}=Yn(t);return{width:e,height:o}}function rl(t,e,o){const n=ot(e),i=Q(e),a=o==="fixed",s=bt(t,!0,a,e);let r={scrollLeft:0,scrollTop:0};const c=K(0);function l(){c.x=Ee(i)}if(n||!n&&!a)if((Mt(e)!=="body"||Nt(i))&&(r=xe(e)),n){const p=bt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else i&&l();a&&!n&&i&&l();const d=i&&!n&&!a?Jn(i,r):K(0),u=s.left+r.scrollLeft-c.x-d.x,m=s.top+r.scrollTop-c.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function To(t){return G(t).position==="static"}function oi(t,e){if(!ot(t)||G(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return Q(t)===o&&(o=o.ownerDocument.body),o}function ni(t,e){const o=q(t);if(_e(t))return o;if(!ot(t)){let i=st(t);for(;i&&!Rt(i);){if(W(i)&&!To(i))return i;i=st(i)}return o}let n=oi(t,e);for(;n&&Xr(n)&&To(n);)n=oi(n,e);return n&&Rt(n)&&To(n)&&!xo(n)?o:n||Yr(t)||o}const ll=async function(t){const e=this.getOffsetParent||ni,o=this.getDimensions,n=await o(t.floating);return{reference:rl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function cl(t){return G(t).direction==="rtl"}const dl={convertOffsetParentRelativeRectToViewportRelativeRect:Zr,getDocumentElement:Q,getClippingRect:al,getOffsetParent:ni,getElementRects:ll,getClientRects:tl,getDimensions:sl,getScale:It,isElement:W,isRTL:cl};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ul(t,e){let o=null,n;const i=Q(t);function a(){var r;clearTimeout(n),(r=o)==null||r.disconnect(),o=null}function s(r,c){r===void 0&&(r=!1),c===void 0&&(c=1),a();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:p}=l;if(r||e(),!m||!p)return;const v=be(u),f=be(i.clientWidth-(d+m)),g=be(i.clientHeight-(u+p)),h=be(d),_={rootMargin:-v+"px "+-f+"px "+-g+"px "+-h+"px",threshold:N(0,Lt(1,c))||1};let y=!0;function T(S){const R=S[0].intersectionRatio;if(R!==c){if(!y)return s();R?s(!1,R):n=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!ii(l,t.getBoundingClientRect())&&s(),y=!1}try{o=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{o=new IntersectionObserver(T,_)}o.observe(t)}return s(!0),a}function fl(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=$o(t),d=i||a?[...l?qt(l):[],...e?qt(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",o,{passive:!0}),a&&h.addEventListener("resize",o)});const u=l&&r?ul(l,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&p&&e&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(e)})),o()}),l&&!c&&p.observe(l),e&&p.observe(e));let v,f=c?bt(t):null;c&&g();function g(){const h=bt(t);f&&!ii(f,h)&&o(),f=h,v=requestAnimationFrame(g)}return o(),()=>{var h;d.forEach(w=>{i&&w.removeEventListener("scroll",o),a&&w.removeEventListener("resize",o)}),u?.(),(h=p)==null||h.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const ml=Wr,pl=Gr,hl=Ur,gl=zr,bl=Vr,vl=(t,e,o)=>{const n=new Map,i={platform:dl,...o},a={...i.platform,_c:n};return Br(t,e,{...i,platform:a})},ai="data-placement",si="data-autoplacement",Bt=new Map;function wl(t){let{newState:e,oldState:o,target:n,source:i=t.detail}=t,a=n instanceof HTMLElement&&x(n,"popover")!==null&&ri(n,"--_ds-floating");if(!a)return;if(e==="closed")return Bt.get(n)?.();if(!i){let v=n.getRootNode(),f=`[popovertarget="${n.id}"],[commandfor="${n.id}"]`;i=n.id&&v?.querySelector?.(f)||void 0}if(!i||i===n||o&&o===e)return;let s=ri(n,"--_ds-floating-overscroll"),r=x(n,ai)||x(i,ai)||a,c=x(n,si)||x(i,si),l=parseFloat(getComputedStyle(n,"::before").height)||0,d=r.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+l;if(r==="none")return;let m={strategy:"absolute",placement:r,middleware:[ml(l||0),pl({padding:10,limiter:bl({offset:{mainAxis:u}})}),_l(),...c==="false"?[]:[hl({padding:10,crossAxis:!1})],...s?[gl({apply({availableHeight:v}){s==="fit"&&(n.style.width=`${i.clientWidth}px`),n.style.maxHeight=`${Math.max(50,v-20)}px`}})]:[]]},p=fl(i,n,async()=>{if(!i?.isConnected)return Bt.get(n)?.();let{x:v,y:f}=await vl(i,n,m);n.style.translate=`${v}px ${f}px`});Bt.set(n,()=>Bt.delete(n)&&p())}let Se;const yl=({type:t})=>{if(t==="mousedown"&&(Se=!1),t==="scroll"&&Se===!1&&(Se=!0),t==="mouseup"&&Se)for(let[e]of Bt)e.showPopover()};at("popover",()=>[I(document,"mousedown scroll mouseup",yl,!0),I(document,"toggle ds-toggle-source",wl,B)]);const ri=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),_l=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,o=t.rects.reference,n=`${Math.round(o.width/2+o.x-t.x)}px`,i=`${Math.round(o.height/2+o.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",n),e.style.setProperty("--_ds-floating-arrow-y",i),x(e,"data-floating",t.placement),t}}),ko=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||x(t,"aria-readonly")==="true"),xl=t=>{if(t.key!=="Tab"&&ko(t.target)&&(t.preventDefault(),t.key?.startsWith("Arrow")&&x(t.target,"type")==="radio")){let e=document.querySelectorAll(`input[name="${t.target.name}"]`),o=t.key?.match(/Arrow(Right|Down)/)?1:-1;e[(e.length+[...e].indexOf(t.target)+o)%e.length]?.focus()}},El=t=>{let e=t.target?.closest?.("label")?.control||t.target;ko(e)&&(t.preventDefault(),e.focus())},Sl=t=>{t.target instanceof HTMLSelectElement&&ko(t.target)&&t.preventDefault()};at("readonly",()=>[I(document,"keydown",xl),I(document,"click",El),I(document,"mousedown",Sl)]);const Ao="data-toggle-group",li=`[${Ao}]`,$l=Ct(()=>{for(let t of document.querySelectorAll(li))x(t,"aria-label",Pt(t,Ao))},0),Tl=t=>{let e=t.target instanceof HTMLInputElement&&t.target.closest(li);if(e&&(t.key==="Enter"&&t.target.click(),t.key?.startsWith("Arrow"))){t.preventDefault?.();let o=[...e.getElementsByTagName("input")],n=o.indexOf(t.target),i=t.key.match(/Arrow(Right|Down)/)?1:-1,a=n;for(let s=0;s<o.length;s++)if(a=(o.length+a+i)%o.length,!o[a]?.disabled){o[a]?.focus();break}}};at("toggle-group",()=>[I(document,"keydown",Tl),mt(document,$l,{attributeFilter:[Ao],attributes:!0,childList:!0,subtree:!0})]);let L,Ut,ci=0,di=0;const kl=Z()&&/iPad|iPhone|iPod/.test(navigator.userAgent),vt="data-tooltip",Co="data-color",ui="aria-label",fi="aria-description",Al=`[${Co}]`,Cl=`[${vt}]`,Lo="data-color-scheme",Ll=`[${Lo}]`,mi=t=>{t&&!(t instanceof HTMLElement)&&ft("setTooltipElement expects an HTMLElement, got: ",t),L=t||void 0},Ml=Ct(()=>{for(let t of document.querySelectorAll(Cl)){let e=t.getAttribute(ui)||t.getAttribute(fi),o=t.getAttribute(vt)||Pt(t,vt);if(e!==o){let a=x(t,"role")!=="img"&&t.textContent?.trim();x(t,vt,o),x(t,ui,a?null:o),x(t,fi,a?o:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||ft('Missing tabindex="0" attribute on: ',t)}let n=t===Ut&&L?.matches(":popover-open"),i=n&&o&&L?.textContent!==o;n&&i&&(L&&go(L,o),document.activeElement===t&&bo(o))}},0),pi=({type:t,target:e})=>{if(clearTimeout(ci),e===L)return;if(t==="mouseover"&&!Ut&&!kl){ci=setTimeout(pi,300,{target:e});return}let o=e?.closest?.(`[${vt}]`);if(o===Ut)return;if(!o)return hi();L||=Dn("div",{class:"ds-tooltip"}),L.isConnected||document.body.appendChild(L);let n=o.closest(Al),i=o.closest(Ll),a=n!==i&&n?.contains(i);clearTimeout(di),x(L,"popover","manual"),x(L,Lo,i?.getAttribute(Lo)||null),x(L,Co,a&&n?.getAttribute(Co)||null),go(L,x(o,vt)),L.showPopover(),L.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),Ut=o},hi=()=>L?.isConnected&&L.popover&&L.hidePopover(),gi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&hi();t?t.target===L&&t.newState==="closed"&&(di=setTimeout(gi,300)):Ut=void 0};at("tooltip",()=>[I(document,"blur focus mouseover",pi,B),I(document,"toggle keydown",gi,B),mt(document,Ml,{attributeFilter:[vt],attributes:!0,childList:!0,subtree:!0})]);const Mo="aria-label";var bi=class extends pe{_items;_label=null;_render;_unresize;_unmutate;static get observedAttributes(){return[Mo]}connectedCallback(){this._label=Pt(this,Mo),this._items=this.getElementsByTagName("a"),this._render=Ct(()=>Rl(this),100),this._unresize=I(window,"resize",this._render),this._unmutate=mt(this,this._render,{childList:!0,subtree:!0})}attributeChangedCallback(e,o,n){n&&(this._label=n),this._render?.()}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._render=this._items=void 0}};const Rl=t=>{let e=t._items?.[t._items.length-1],o=e?.parentElement===t?null:e,n=!o?.offsetHeight;x(t,"role",n?null:"navigation"),x(t,Mo,n?null:t._label);for(let i of t._items||[])x(i,"aria-current",i===o?"page":null)};tt.define("ds-breadcrumbs",bi);var vi=class extends pe{connectedCallback(){I(this,"animationend",this,B),requestAnimationFrame(()=>this.handleEvent({target:this}))}handleEvent({target:e}){if(e!==this)return;let o=this.querySelector("h2,h3,h4,h5,h6");o&&x(this,"aria-labelledby",pt(o)),x(this,"tabindex","-1"),this.focus()}disconnectedCallback(){po(this,"animationend",this,B)}};tt.define("ds-error-summary",vi);const wi="data-indeterminate",Ro=new Set,yi=new WeakMap,Il=Z()?document.getElementsByTagName("fieldset"):[],Ol=Z()&&CSS.supports("field-sizing","content"),Dl=br()?800:200,_i=new WeakSet,xi=Ct(()=>{for(let t of Il)x(t,"aria-labelledby",`${pt(t.querySelector("legend"))} ${pt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null);for(let t of Ro){let e=[],o=[],n,i,a=!1,s=!1;for(let r of t.getElementsByTagName("*"))if(r instanceof HTMLLabelElement&&o.push(r),!r.hidden)if(Hl(r))n?ft("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):n=r;else{let c=r.getAttribute("data-field");c==="counter"&&(i=r),c==="validation"?(e.unshift(r),a=!0,s||=Si(r)):c&&e.push(r)}if(!n)ft("Field is missing input element:",t);else{i&&yi.set(n,i);for(let d of o)x(d,"for",pt(n));let r=n.type==="radio"||n.type==="checkbox",c=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');c&&!c?.hidden&&(a=!0,s||=Si(c),e.unshift(c));let l=x(n,wi);l&&(n.indeterminate=l==="true"),x(t,"data-clickdelegatefor",r?pt(n):null),x(n,"aria-describedby",e.map(pt).join(" ")||null),(a||_i.has(n))&&(_i[a?"add":"delete"](n),x(n,"aria-invalid",`${s}`)),Ei(n)}}},0),Ei=t=>{let e=t.target||t,o=yi.get(e);if(o?.isConnected){let n=(Number(x(o,"data-limit"))||0)-e.value.length,i=n<0?"over":"under",a=Pt(o,`data-${i}`)?.replace("%d",`${Math.abs(n)}`);x(o,"data-label",a),x(o,"data-state",i),x(o,"data-color",n<0?"danger":null),t.type==="input"&&a&&Pl(e,a)}!Ol&&e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},Pl=Ct((t,e)=>{document.activeElement===t&&bo(e)},Dl),Si=t=>t.getAttribute("data-color")!=="success",Hl=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var $e=class extends pe{connectedCallback(){Ro.add(this),xi()}disconnectedCallback(){Ro.delete(this)}};tt.define("ds-field",$e),at("field",()=>[I(document,"input",Ei,B),mt(document,xi,{attributeFilter:["data-field","data-limit","hidden","value",wi],attributes:!0,childList:!0,subtree:!0})]);const Io="aria-label",Te="data-current",ke="data-total",$i="data-href",Ti=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:ql(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))});var ki=class extends pe{_unmutate;_render;static get observedAttributes(){return[Io,Te,ke,$i]}connectedCallback(){let t=x(this,ke),e=x(this,Te);e&&!t&&ft(`Missing ${ke} attribute on:`,this),t&&!e&&ft(`Missing ${Te} attribute on:`,this),x(this,Io,Pt(this,Io)),x(this,"role","navigation"),this._render=Ct(()=>Nl(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 Nl=t=>{let e=Number(x(t,Te)),o=Number(x(t,ke));if(e&&o){let n=t.querySelectorAll("button,a"),i=n.length-2,a=x(t,$i),{next:s,prev:r,pages:c}=Ti({current:e,total:o,show:i});n.forEach((l,d)=>{let u=d?n[d+1]?c[d-1]?.page:s:r;x(l,"aria-current",c[d-1]?.current?"true":null),x(l,"aria-label",`${u??"hidden"}`),x(l,"role",u?null:"none"),x(l,"tabindex",u?null:"-1"),l instanceof HTMLButtonElement&&x(l,"value",`${u}`),a&&l instanceof HTMLAnchorElement&&x(l,"href",a.replace("%d",`${u}`))})}},ql=(t,e,o=1/0)=>{let n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),a=Math.min(Math.max(t+Math.ceil(n),o),e),s=Array.from({length:a+1-i},(r,c)=>c+i);return o>4&&i>1&&s.splice(0,2,1,0),o>3&&a<e&&s.splice(-2,2,0,e),s};tt.define("ds-pagination",ki);var Ai=class extends ze{_unmutate;_render;connectedCallback(){super.connectedCallback(),this._render=()=>Bl(this),this._unmutate=mt(this,this._render,{childList:!0}),I(this,"toggle",Ci,B)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=this._render=void 0,po(this,"toggle",Ci,B)}};const Bl=({control:t,list:e})=>{t&&!t.placeholder&&x(t,"placeholder"," "),t&&x(t,"popovertarget",pt(e)||null),e&&x(e,"popover","manual")},Ci=t=>{let e=t.currentTarget,o=t.newState==="open"&&e.control;o&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o}))};tt.define("ds-suggestion",Ai);var Li=class extends oo{},Mi=class extends no{},Ri=class extends ao{},Ii=class extends ro{};tt.define("ds-tabs",Li),tt.define("ds-tablist",Mi),tt.define("ds-tab",Ri),tt.define("ds-tabpanel",Ii);function Ul(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Fl(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,g,h=!0){Object.defineProperty(f,g,{...Object.getOwnPropertyDescriptor(f,g),enumerable:h})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}const o=new WeakMap,n=new WeakMap;class i extends Event{constructor(g,h={}){super(g,h);const{source:w,command:_}=h;if(w!=null&&!(w instanceof Element))throw new TypeError("source must be an element");o.set(this,w||null),n.set(this,_!==void 0?String(_):"")}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!o.has(this))throw new TypeError("illegal invocation");const g=o.get(this);if(!(g instanceof Element))return null;const h=e(g);return h!==e(this.target||document)?h.host:g}get command(){if(!n.has(this))throw new TypeError("illegal invocation");return n.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 a extends Event{constructor(g,h={}){throw super(g,h),new Error("InvokeEvent has been deprecated, it has been renamed to `CommandEvent`")}}const s=new WeakMap;function r(f){Object.defineProperties(f.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"),s.delete(this);else if(g instanceof Element){this.setAttribute("commandfor","");const h=e(g);e(this)===h||h===this.ownerDocument?s.set(this,g):s.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=s.get(this);if(g)return g.isConnected?g:(s.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(f){const g=c.get(this)||null;g&&this.removeEventListener("command",g),c.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(const g of f)g.oncommand=new Function("event",g.getAttribute("oncommand"))}const d=new MutationObserver(f=>{for(const g of f){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(f){if(u.has(f)||(u.add(f),f.defaultPrevented)||f.type!=="click")return;const g=f.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=f.target.closest("button[commandfor], button[command]");if(!h)return;if(h.form&&h.getAttribute("type")!=="button")throw f.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 T=h.hasAttribute("command")?"command":"commandfor",S=h.hasAttribute("command")?"commandfor":"command";throw new Error(`Element with ${T} attribute must also have a ${S} 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 _=new i("command",{command:h.command,source:h,cancelable:!0});if(w.dispatchEvent(_),_.defaultPrevented)return;const y=_.command.toLowerCase();if(w.popover){const T=!w.matches(":popover-open");T&&(y==="toggle-popover"||y==="show-popover")?w.showPopover({source:h}):!T&&y==="hide-popover"&&w.hidePopover()}else if(w.localName==="dialog"){const T=!w.hasAttribute("open");T&&y=="show-modal"?w.showModal():!T&&y=="close"?w.close(h.value?h.value:void 0):!T&&y=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){const S=new Event("cancel",{cancelable:!0});this.dispatchEvent(S),S.defaultPrevented||this.close()}),w.requestClose(h.value?h.value:void 0))}}function p(f){f.addEventListener("click",m,!0)}function v(f,g){const h=f.prototype.attachShadow;f.prototype.attachShadow=function(_){const y=h.call(this,_);return g(y),y};const w=f.prototype.attachInternals;f.prototype.attachInternals=function(){const _=w.call(this);return _.shadowRoot&&g(_.shadowRoot),_}}r(HTMLButtonElement),v(HTMLElement,f=>{p(f),d.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),p(document),Object.assign(globalThis,{CommandEvent:i,InvokeEvent:a})}var Ae=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Wl=Ae&&/android/i.test(navigator.userAgent),Gl=Ae&&/firefox/i.test(navigator.userAgent),Oi;Ae&&/^Mac/i.test(((Oi=navigator.userAgentData)==null?void 0:Oi.platform)||navigator.platform);function Di(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Ce="__uDetailsPolyfillSummarys";if(Ae&&Wl&&Gl&&!window[Ce]){window[Ce]=document.getElementsByTagName("summary");const t=()=>{if(window[Ce])for(const e of window[Ce]){const o=e.parentElement;Di(e,"role","button"),Di(e,"aria-expanded",`${!!o&&!!o.open}`)}};requestAnimationFrame(t),new MutationObserver(t).observe(document,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}var Vl=Object.defineProperty,Pi=Object.getOwnPropertySymbols,zl=Object.prototype.hasOwnProperty,Xl=Object.prototype.propertyIsEnumerable,Hi=(t,e,o)=>e in t?Vl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,jl=(t,e)=>{for(var o in e||(e={}))zl.call(e,o)&&Hi(t,o,e[o]);if(Pi)for(var o of Pi(e))Xl.call(e,o)&&Hi(t,o,e[o]);return t},Ft=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Le=Ft&&/android/i.test(navigator.userAgent),Oo=Ft&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ni;Ft&&/^Mac/i.test(((Ni=navigator.userAgentData)==null?void 0:Ni.platform)||navigator.platform);var Kl=`${Le?"data":"aria"}-labelledby`,Yl=":host(:not([hidden])) { display: block }",Ql="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",qi=typeof HTMLElement>"u"?class{}:HTMLElement;function k(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var Bi=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},Wt=(t,...e)=>Bi("add",t,e),Me=(t,...e)=>Bi("remove",t,e),Jl=(t,e)=>t.shadowRoot||t.attachShadow({mode:"open"}).append(Ho("slot"),Ho("style",e)),Re=new WeakMap,Do=(t,e)=>{if(e===void 0)return Re.get(t);try{Re.get(t).disconnect(),Re.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),Re.set(t,o)}},Ui=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},Zl=0,Po=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++Zl).toString(32)}`),t.id):"",Ho=(t,e,o)=>{const n=document.createElement(t);return e&&(n[t==="style"?"textContent":"innerHTML"]=e),n},Fi={define:(t,e)=>!Ft||window.customElements.get(t)||window.customElements.define(t,e)},wt,tc=0,Wi=t=>{wt||(wt=Ho("div"),wt.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",k(wt,"aria-live","assertive")),wt.isConnected||document.body.append(wt),t&&(wt.textContent=`${t}${tc++%2?" ":""}`)},ec=(t,e,o="")=>{var n,i;const a={bubbles:!0,composed:!0,data:e,inputType:o},s=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",a)),(i=(n=Object.getOwnPropertyDescriptor(s,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",a)),t.dispatchEvent(new Event("change",{bubbles:!0}))},No=!1,qo=t=>(t?.type==="mouseup"&&(No=!1),t?.type==="mousedown"&&(No=!0,Wt(document,"mouseup",qo,{once:!0})),No),oc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Bo="disabled",Gt="selected",nc=class extends qi{static get observedAttributes(){return[Bo,Gt]}connectedCallback(){Oo||(this.tabIndex=-1),this.hasAttribute("role")||k(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){k(this,"aria-disabled",`${this.disabled}`),k(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[Gt]}set defaultSelected(t){this[Gt]=t}get disabled(){return k(this,Bo)!==null}set disabled(t){k(this,Bo,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=k(this,"label"))!=null?t:this.text}set label(t){k(this,"label",t)}get selected(){return k(this,Gt)!==null}set selected(t){k(this,Gt,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=k(this,"value"))!=null?t:this.text}set value(t){k(this,"value",t)}};Fi.define("u-option",nc);var Uo=`${Yl}
15
15
  ::slotted([role="option"]) { display: block; cursor: pointer }
16
16
  ::slotted([role="option"]:focus) { ${Ql} }
17
17
  ::slotted([role="option"][aria-hidden="true"]),
18
18
  ::slotted([role="option"][disabled]),
19
- ::slotted([role="option"][hidden]) { display: none !important }`,ic=nc(Un),Wi,Gi=0,ac=In||Le,Vi="click,focusout,input,keydown,mousedown,mouseup",zi="focus,focusin,blur,focusout",Oe={singular:"%d hit",plural:"%d hits"},Xi=class extends Bi{constructor(){super(),this._texts=Xl({},Oe),this._value="",this._of="/",Jl(this,Un)}static get observedAttributes(){return["id",...Object.keys(Oe).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ui(this),k(this,"role","listbox"),k(this,"tabindex","-1"),qt(this._root,"focusin",this),qt(this._root,"focus",this,!0),Dn(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),Dn(this,!1),jn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Oe[o])this._texts[o]=n||Oe[o];else if(this._root){this._input&&qn(this,this._input);for(const a of this._root.querySelectorAll(i))qn(this,a)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&lc(this,t),(n==="focus"||n==="focusin")&&rc(this,t),(n==="blur"||n==="focusout")&&sc(this,t),n==="keydown"&&cc(this,t),n==="mousedown"&&this.contains(e)&&Bn(t),(n==="mutation"||n==="input")&&(clearTimeout(Gi),Gi=setTimeout(Qi,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")}},Ki=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=Ki(t?._input)||!e,(n=Dn(t))==null||n.takeRecords();const a=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&qn(t,t._input,e),a&&k(t,"popover","manual"),a&&t.togglePopover(e),e&&Qi(t)},jn=t=>{t._input&&(Me(t._input||t,zi,t),Me(t._root||t,Vi,t),Gt(t,!1),t._input=void 0)},qn=(t,e,n=!1)=>{t.popover&&k(e,"popovertarget",Pn(t)),qt(e,zi,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",Pn(t)),k(e,"aria-expanded",`${!ac||n}`),k(e,"autocomplete","off"),k(e,"role",Ki(e)?null:"combobox")},rc=(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&&jn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,Kl,Pn((n=t._input.labels)==null?void 0:n[0])),qt(t._root||t,Vi,t),Gt(t,k(t._input,"inputmode")!=="none"),qi())},sc=(t,e)=>{!Le&&!Bn()&&t._input&&setTimeout(Yi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Yi=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})),jn(t))},lc=(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 k(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),ec(t._input,o.value);Le&&Yi(t)},cc=(t,e)=>{var n;const{key:o,target:i,altKey:a,ctrlKey:r,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(a||r||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(p=>k(p,"aria-hidden")!=="true"&&p.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 p of d)p.tabIndex=-1;d[m]&&e.preventDefault(),(n=d[m]||t._input)==null||n.focus(),!d[m]&&o==="ArrowUp"&&setTimeout(()=>{var p;return(p=t._input)==null?void 0:p.setSelectionRange(999,999)})},Qi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:a}=t,r=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const m of a)(m.disabled||m.hidden||s&&!m.label.toLowerCase().includes(r)?c:l).push(m);for(const m of c)k(m,"aria-hidden","true");for(const m of l)k(m,"aria-hidden","false");const d=l.length;clearTimeout(Wi),e?.type==="input"&&r!==t._value&&(Wi=setTimeout(()=>{const m=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&qi(m),t._value=r},1e3));let u=0;if(In)for(const m of l)k(m,"title",`${++u} ${t._of} ${d}`)};jt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ui(this).getElementById(k(this,"list")||"")}}),ji.define("u-datalist",Xi),At()&&!Ul()&&jl();const dc="3.1.18",Ji="_alert_jc0nn_1 _ds-alert_c9r86_3",Zi="_app_jc0nn_1",ta="_sticky_jc0nn_1",ea="_avatar_jc0nn_1 _ds-avatar_c9r86_1",na="_badge_jc0nn_1",oa="_breadcrumbs_jc0nn_1 _ds-breadcrumbs_c9r86_5",ia="_button_jc0nn_1 _ds-button_c9r86_1",aa="_card_jc0nn_1",ra="_group_jc0nn_1",sa="_chip_jc0nn_1 _ds-chip_c9r86_5",la="_details_jc0nn_1 _ds-details_c9r86_3",ca="_dialog_jc0nn_1 _ds-dialog_c9r86_5",da="__drawer_jc0nn_1",ua="_divider_jc0nn_1",fa="_errorsummary_jc0nn_1 _ds-error-summary_c9r86_5",ma="_field_jc0nn_1 _ds-field_c9r86_1",pa="_suggestion_jc0nn_1 _ds-suggestion_c9r86_5",ha="_affixes_jc0nn_1 _ds-field-affixes_c9r86_3",ga="_fieldset_jc0nn_1 _ds-fieldset_c9r86_3",ba="_fileupload_jc0nn_1",va="_helptext_jc0nn_1 _ds-focus_c9r86_1",wa="_input_jc0nn_1 _ds-input_c9r86_1",ya="_law_jc0nn_1",_a="_grid_jc0nn_1",xa="_flex_jc0nn_1",Ea="_link_jc0nn_1",Sa="_logo_jc0nn_1",$a="__logo_jc0nn_1",Ta="_pagination_jc0nn_1 _ds-pagination_c9r86_5",ka="_popover_jc0nn_1 _ds-popover_c9r86_3",Aa="_print_jc0nn_1",Ca="_progress_jc0nn_1",La="__indeterminate_jc0nn_1",Ma="_skeleton_jc0nn_1 _ds-skeleton_c9r86_5",Ra="__skeleton_jc0nn_1",Oa="_spinner_jc0nn_1",Ia="_steps_jc0nn_1",Da="_table_jc0nn_1 _ds-table_c9r86_5",Pa="__scrollShadow_jc0nn_1",Ha="_tabs_jc0nn_1 _ds-tabs_c9r86_5",Na="__scrollMask_jc0nn_1",Ba="_tag_jc0nn_1 _ds-tag_c9r86_5",Fa="_toast_jc0nn_1",Ua="__toastClose_jc0nn_1",ja="__toastOpen_jc0nn_1",qa="__toastTimeout_jc0nn_1",Wa="_togglegroup_jc0nn_1 _ds-toggle-group_c9r86_5",Ga="__tooltip_jc0nn_1 _ds-tooltip_c9r86_5",Va="_heading_jc0nn_1 _ds-heading_c9r86_1",za="_ingress_jc0nn_1",Xa="_muted_jc0nn_1",Ka="_info_jc0nn_1",Ya="_prose_jc0nn_1",Qa="_validation_jc0nn_1 _ds-validation-message_c9r86_1",Ja="_body_jc0nn_162",Za="__checked_jc0nn_1",A={alert:Ji,app:Zi,sticky:ta,avatar:ea,badge:na,breadcrumbs:oa,button:ia,card:aa,group:ra,chip:sa,details:la,dialog:ca,_drawer:da,divider:ua,errorsummary:fa,field:ma,suggestion:pa,affixes:ha,fieldset:ga,fileupload:ba,helptext:va,input:wa,law:ya,grid:_a,flex:xa,link:Ea,logo:Sa,_logo:$a,pagination:Ta,popover:ka,print:Aa,progress:Ca,_indeterminate:La,skeleton:Ma,_skeleton:Ra,spinner:Oa,steps:Ia,table:Da,_scrollShadow:Pa,tabs:Ha,_scrollMask:Na,tag:Ba,toast:Fa,_toastClose:Ua,_toastOpen:ja,_toastTimeout:qa,togglegroup:Wa,_tooltip:Ga,heading:Va,ingress:za,muted:Xa,info:Ka,prose:Ya,validation:Qa,body:Ja,_checked:Za},uc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Za,_drawer:da,_indeterminate:La,_logo:$a,_scrollMask:Na,_scrollShadow:Pa,_skeleton:Ra,_toastClose:Ua,_toastOpen:ja,_toastTimeout:qa,_tooltip:Ga,affixes:ha,alert:Ji,app:Zi,avatar:ea,badge:na,body:Ja,breadcrumbs:oa,button:ia,card:aa,chip:sa,default:A,details:la,dialog:ca,divider:ua,errorsummary:fa,field:ma,fieldset:ga,fileupload:ba,flex:xa,grid:_a,group:ra,heading:Va,helptext:va,info:Ka,ingress:za,input:wa,law:ya,link:Ea,logo:Sa,muted:Xa,pagination:Ta,popover:ka,print:Aa,progress:Ca,prose:Ya,skeleton:Ma,spinner:Oa,steps:Ia,sticky:ta,suggestion:pa,table:Da,tabs:Ha,tag:Ba,toast:Fa,togglegroup:Wa,validation:Qa},Symbol.toStringTag,{value:"Module"}));function tr(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=tr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function fc(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=tr(t))&&(o&&(o+=" "),o+=e);return o}const Vt={capture:!0,passive:!0},G=()=>typeof window<"u"&&typeof document<"u",wt=t=>G()?document.getElementsByClassName(A[t].split(" ")[0]):[];function It(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),I=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>er(t,...e)},er=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},rt=(t,e)=>{if(!G())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?I(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Ie=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return a();e(r),r.takeRecords(),o=0},a=()=>r?.disconnect?.(),r=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return r.observe(t,n),i(),a},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,a]of Object.entries(e))b(o,i,a);return o},mc=typeof HTMLElement>"u"?class{}:HTMLElement,pc=(t,e)=>!G()||window.customElements.get(t)||window.customElements.define(t,e),hc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,gc=(t,e)=>{if(!hc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},bc=`[data-command="toggle-app-expanded"],.${A.app.split(" ")[0]} > [command="show-modal"]`,vc=`.${A.breadcrumbs.split(" ")[0]}`,wc=`.${A.card.split(" ")[0]}`,nr=`.${A.chip.split(" ")[0]}`,yc=`.${A.helptext.split(" ")[0]}`,_c=`.${A.pagination.split(" ")[0]}`,xc='summary,u-summary,a,button,[role="tab"],[role="button"]',Wn="mattilsynet.matomo.cloud",Ec=["setCustomUrl","setDocumentTitle","setReferrerUrl"],V="mtds-analytics-banner",Sc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function or(t,e={}){if(G()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Wn}/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:a}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&$c();const r=a?`https://cdn.matomo.cloud/${Wn}/container_${a}.js`:`https://cdn.matomo.cloud/${Wn}/matomo.js`;document.querySelector(`script[src="${r}"]`)||document.head.append(M("script",{async:"",src:r}))}}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:a}=e,r=["trackEvent",n,o,i,a];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(r.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;Ec.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function $c(){if(document.getElementById(V)||window.localStorage.getItem(V))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${V}" data-analytics="ignore"><style>
20
- #${V}[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 }
21
- #${V} 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 }
22
- #${V} button:focus-visible { outline: 2px solid }
23
- #${V} button:hover { background: #0a4e4f }
24
- #${V} button:active { background: #054449; scale: .9 }
25
- #${V} p { margin: 0 .25em }
19
+ ::slotted([role="option"][hidden]) { display: none !important }`,ic=oc(Uo),Gi,Vi=0,ac=Oo||Le,zi="click,focusout,input,keydown,mousedown,mouseup",Xi="focus,focusin,blur,focusout",Ie={singular:"%d hit",plural:"%d hits"},ji=class extends qi{constructor(){super(),this._texts=jl({},Ie),this._value="",this._of="/",Jl(this,Uo)}static get observedAttributes(){return["id",...Object.keys(Ie).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ui(this),k(this,"role","listbox"),k(this,"tabindex","-1"),Wt(this._root,"focusin",this),Wt(this._root,"focus",this,!0),Do(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),Do(this,!1),Fo(this),this._root=void 0}attributeChangedCallback(t,e,o){const n=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ie[n])this._texts[n]=o||Ie[n];else if(this._root){this._input&&Wo(this,this._input);for(const a of this._root.querySelectorAll(i))Wo(this,a)}}handleEvent(t){const{target:e,type:o}=t;t.defaultPrevented||(o==="click"&&lc(this,t),(o==="focus"||o==="focusin")&&sc(this,t),(o==="blur"||o==="focusout")&&rc(this,t),o==="keydown"&&cc(this,t),o==="mousedown"&&this.contains(e)&&qo(t),(o==="mutation"||o==="input")&&(clearTimeout(Vi),Vi=setTimeout(Qi,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")}},Ki=t=>t?.disabled||t?.readOnly||!1,Vt=(t,e)=>{var o,n,i;if(t.hidden!==e)return;t.hidden=Ki(t?._input)||!e,(o=Do(t))==null||o.takeRecords();const a=t.isConnected&&t.popover&&((n=t._input)==null?void 0:n.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Wo(t,t._input,e),a&&k(t,"popover","manual"),a&&t.togglePopover(e),e&&Qi(t)},Fo=t=>{t._input&&(Me(t._input||t,Xi,t),Me(t._root||t,zi,t),Vt(t,!1),t._input=void 0)},Wo=(t,e,o=!1)=>{t.popover&&k(e,"popovertarget",Po(t)),Wt(e,Xi,t,!0),k(e,"aria-autocomplete","list"),k(e,"aria-controls",Po(t)),k(e,"aria-expanded",`${!ac||o}`),k(e,"autocomplete","off"),k(e,"role",Ki(e)?null:"combobox")},sc=(t,e)=>{var o;const n=e.target instanceof HTMLInputElement;n&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&n&&e.target.list===t&&(t._input&&Fo(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),k(t,Kl,Po((o=t._input.labels)==null?void 0:o[0])),Wt(t._root||t,zi,t),Vt(t,k(t._input,"inputmode")!=="none"),Wi())},rc=(t,e)=>{!Le&&!qo()&&t._input&&setTimeout(Yi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Yi=t=>{var e;const o=((e=t._root)==null?void 0:e.activeElement)||null,n=t._input;n&&n!==o&&!t.contains(o)&&(n.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o})),Fo(t))},lc=(t,{target:e})=>{var o;if(!t._input||t._input===e)return Vt(t,!0);for(const n of t.options)if(n.contains(e))return k(t,"aria-multiselectable")!=="true"&&((o=t._input)==null||o.focus(),Vt(t,!1)),ec(t._input,n.value);Le&&Yi(t)},cc=(t,e)=>{var o;const{key:n,target:i,altKey:a,ctrlKey:s,shiftKey:r,metaKey:c}=e,l=n==="Escape"||n==="Esc";if(a||s||c||r||n==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Vt(t,!l);const d=[...t.options].filter(p=>k(p,"aria-hidden")!=="true"&&p.offsetHeight),u=d.indexOf(i);let m=-1;if(n==="ArrowDown"&&(m=(u+1)%d.length),n==="ArrowUp"&&(m=(~u?u:d.length)-1),~u&&((n==="Home"||n==="PageUp")&&(m=0),(n==="End"||n==="PageDown")&&(m=d.length-1),n==="Enter"))return d[u].click(),e.preventDefault();if(d[m])for(const p of d)p.tabIndex=-1;d[m]&&e.preventDefault(),(o=d[m]||t._input)==null||o.focus(),!d[m]&&n==="ArrowUp"&&setTimeout(()=>{var p;return(p=t._input)==null?void 0:p.setSelectionRange(999,999)})},Qi=(t,e)=>{const{_texts:o,_root:n,_input:i,options:a}=t,s=i?.value.toLowerCase().trim()||"",r=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const m of a)(m.disabled||m.hidden||r&&!m.label.toLowerCase().includes(s)?c:l).push(m);for(const m of c)k(m,"aria-hidden","true");for(const m of l)k(m,"aria-hidden","false");const d=l.length;clearTimeout(Gi),e?.type==="input"&&s!==t._value&&(Gi=setTimeout(()=>{const m=`${!d&&t.innerText.trim()||`${o[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&n?.activeElement===i&&Wi(m),t._value=s},1e3));let u=0;if(Oo)for(const m of l)k(m,"title",`${++u} ${t._of} ${d}`)};Ft&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ui(this).getElementById(k(this,"list")||"")}}),Fi.define("u-datalist",ji),Z()&&!Ul()&&Fl();const dc="3.1.19",Ji="_alert_1gd8q_1 _ds-alert_1hobb_3",Zi="_app_1gd8q_1",ta="_sticky_1gd8q_1",ea="_avatar_1gd8q_1 _ds-avatar_1hobb_1",oa="_badge_1gd8q_1",na="_breadcrumbs_1gd8q_1 _ds-breadcrumbs_1hobb_5",ia="_button_1gd8q_1 _ds-button_1hobb_1",aa="_card_1gd8q_1",sa="_group_1gd8q_1",ra="_chip_1gd8q_1 _ds-chip_1hobb_5",la="_details_1gd8q_1 _ds-details_1hobb_3",ca="_dialog_1gd8q_1 _ds-dialog_1hobb_5",da="__drawer_1gd8q_1",ua="_divider_1gd8q_1",fa="_errorsummary_1gd8q_1 _ds-error-summary_1hobb_5",ma="_field_1gd8q_1 _ds-field_1hobb_1",pa="_suggestion_1gd8q_1 _ds-suggestion_1hobb_5",ha="_affixes_1gd8q_1 _ds-field-affixes_1hobb_3",ga="_fieldset_1gd8q_1 _ds-fieldset_1hobb_3",ba="_fileupload_1gd8q_1",va="_helptext_1gd8q_1 _ds-focus_1hobb_1",wa="_input_1gd8q_1 _ds-input_1hobb_1",ya="_law_1gd8q_1",_a="_grid_1gd8q_1",xa="_flex_1gd8q_1",Ea="_link_1gd8q_1",Sa="_logo_1gd8q_1",$a="__logo_1gd8q_1",Ta="_pagination_1gd8q_1 _ds-pagination_1hobb_5",ka="_popover_1gd8q_1 _ds-popover_1hobb_3",Aa="_print_1gd8q_1",Ca="_progress_1gd8q_1",La="__indeterminate_1gd8q_1",Ma="_skeleton_1gd8q_1 _ds-skeleton_1hobb_5",Ra="__skeleton_1gd8q_1",Ia="_spinner_1gd8q_1",Oa="_steps_1gd8q_1",Da="_table_1gd8q_1 _ds-table_1hobb_5",Pa="__scrollShadow_1gd8q_1",Ha="_tabs_1gd8q_1 _ds-tabs_1hobb_5",Na="__scrollMask_1gd8q_1",qa="_tag_1gd8q_1 _ds-tag_1hobb_5",Ba="_toast_1gd8q_1",Ua="__toastClose_1gd8q_1",Fa="__toastOpen_1gd8q_1",Wa="__toastTimeout_1gd8q_1",Ga="_togglegroup_1gd8q_1 _ds-toggle-group_1hobb_5",Va="__tooltip_1gd8q_1 _ds-tooltip_1hobb_5",za="_heading_1gd8q_1 _ds-heading_1hobb_1",Xa="_ingress_1gd8q_1",ja="_muted_1gd8q_1",Ka="_info_1gd8q_1",Ya="_prose_1gd8q_1",Qa="_validation_1gd8q_1 _ds-validation-message_1hobb_1",Ja="_body_1gd8q_162",Za="__checked_1gd8q_1",A={alert:Ji,app:Zi,sticky:ta,avatar:ea,badge:oa,breadcrumbs:na,button:ia,card:aa,group:sa,chip:ra,details:la,dialog:ca,_drawer:da,divider:ua,errorsummary:fa,field:ma,suggestion:pa,affixes:ha,fieldset:ga,fileupload:ba,helptext:va,input:wa,law:ya,grid:_a,flex:xa,link:Ea,logo:Sa,_logo:$a,pagination:Ta,popover:ka,print:Aa,progress:Ca,_indeterminate:La,skeleton:Ma,_skeleton:Ra,spinner:Ia,steps:Oa,table:Da,_scrollShadow:Pa,tabs:Ha,_scrollMask:Na,tag:qa,toast:Ba,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,togglegroup:Ga,_tooltip:Va,heading:za,ingress:Xa,muted:ja,info:Ka,prose:Ya,validation:Qa,body:Ja,_checked:Za},uc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Za,_drawer:da,_indeterminate:La,_logo:$a,_scrollMask:Na,_scrollShadow:Pa,_skeleton:Ra,_toastClose:Ua,_toastOpen:Fa,_toastTimeout:Wa,_tooltip:Va,affixes:ha,alert:Ji,app:Zi,avatar:ea,badge:oa,body:Ja,breadcrumbs:na,button:ia,card:aa,chip:ra,default:A,details:la,dialog:ca,divider:ua,errorsummary:fa,field:ma,fieldset:ga,fileupload:ba,flex:xa,grid:_a,group:sa,heading:za,helptext:va,info:Ka,ingress:Xa,input:wa,law:ya,link:Ea,logo:Sa,muted:ja,pagination:Ta,popover:ka,print:Aa,progress:Ca,prose:Ya,skeleton:Ma,spinner:Ia,steps:Oa,sticky:ta,suggestion:pa,table:Da,tabs:Ha,tag:qa,toast:Ba,togglegroup:Ga,validation:Qa},Symbol.toStringTag,{value:"Module"}));function ts(t){var e,o,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(o=ts(t[e]))&&(n&&(n+=" "),n+=o)}else for(o in t)t[o]&&(n&&(n+=" "),n+=o);return n}function fc(){for(var t,e,o=0,n="",i=arguments.length;o<i;o++)(t=arguments[o])&&(e=ts(t))&&(n&&(n+=" "),n+=e);return n}const zt={capture:!0,passive:!0},V=()=>typeof window<"u"&&typeof document<"u",yt=t=>V()?document.getElementsByClassName(A[t].split(" ")[0]):[];function Ot(t,e){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>t.apply(this,n),e)}}const b=(t,e,o)=>o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null),O=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.addEventListener(i,...n);return()=>es(t,...e)},es=(t,...e)=>{const[o,...n]=e;for(const i of o.split(" "))t.removeEventListener(i,...n)},rt=(t,e)=>{if(!V())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const o=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(n=>n()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?O(window,"load",o):document.fonts?.ready?.then(o)||setTimeout(o,0)},Oe=(t,e,o)=>{let n=0;const i=()=>{if(!t.isConnected)return a();e(s),s.takeRecords(),n=0},a=()=>s?.disconnect?.(),s=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))});return s.observe(t,o),i(),a},M=(t,e,o)=>{const n=document.createElement(t);if(o&&(n.textContent=o),e)for(const[i,a]of Object.entries(e))b(n,i,a);return n},mc=typeof HTMLElement>"u"?class{}:HTMLElement,pc=(t,e)=>!V()||window.customElements.get(t)||window.customElements.define(t,e),hc=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,gc=(t,e)=>{if(!hc)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const o=new CSSStyleSheet;o.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[o]},bc=`[data-command="toggle-app-expanded"],.${A.app.split(" ")[0]} > [command="show-modal"]`,vc=`.${A.breadcrumbs.split(" ")[0]}`,wc=`.${A.card.split(" ")[0]}`,os=`.${A.chip.split(" ")[0]}`,yc=`.${A.helptext.split(" ")[0]}`,_c=`.${A.pagination.split(" ")[0]}`,xc='summary,u-summary,a,button,[role="tab"],[role="button"]',Go="mattilsynet.matomo.cloud",Ec=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",Sc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ns(t,e={}){if(V()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Go}/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:o,enabled:n,matomoId:i,matomoTagManagerId:a}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),n){o!=="custom"&&$c();const s=a?`https://cdn.matomo.cloud/${Go}/container_${a}.js`:`https://cdn.matomo.cloud/${Go}/matomo.js`;document.querySelector(`script[src="${s}"]`)||document.head.append(M("script",{async:"",src:s}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:o,title:n}=e;window._paq.push(["setCustomUrl",o||location.href]),window._paq.push(["setDocumentTitle",n||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:o,action:n,name:i,value:a}=e,s=["trackEvent",o,n,i,a];let r=location.href;window._paq.push([function(){r=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",r.split("#")[0]]),window._paq.push(s.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",r])}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else if(t==="matomo"){const o=e;Ec.includes(o?.[0])&&typeof o[1]!="string"&&(o[1]=`${o[1]??""}`),window._paq.push(o)}}}}function $c(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
20
+ #${z}[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 }
21
+ #${z} 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 }
22
+ #${z} button:focus-visible { outline: 2px solid }
23
+ #${z} button:hover { background: #0a4e4f }
24
+ #${z} button:active { background: #054449; scale: .9 }
25
+ #${z} p { margin: 0 .25em }
26
26
  </style>
27
27
  <p>Vi bruker <a href="${Sc}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
28
28
  <form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">&times;</button></form>
29
- </dialog>`);const e=document.getElementById(V),n=()=>window.localStorage.setItem(V,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function Tc(t){window._mtdsTracking?.enabled&&setTimeout(kc,0,t)}function kc({type:t,target:e}){const n=t==="click"?e?.closest?.(xc):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",a=ir(n)||Lc(n)||b(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",a=a||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const r=b(n,"type"),s=r==="checkbox"||r==="radio"?n.closest("fieldset"):null;i=n.closest(nr)?"Chip":"Form",o="change",a=ir(s||n)||zt(s?.querySelector("legend"))||zt(n?.labels?.[0])}else if(b(n,"role")==="tab")i="Tab",o="navigate";else if(b(n,"popovertarget")){if(!Ac(n)?.matches(":popover-open"))return;i=n.closest(yc)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(bc)){const r=Cc(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=r?"expand":"minimize",a=r&&b(n,"data-tooltip")||zt(n)}else if(n.closest(vc))i="Breadcrumbs",o="navigate";else if(n.closest(_c))i="Pagination",o="navigate";else if(n.closest(wc))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(nr))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");or("event",{category:b(n,"data-analytics-category")??i,action:b(n,"data-analytics-action")??o,name:b(n,"data-analytics-name")??a})}const zt=t=>t?.textContent?.trim()||"",ir=t=>t&&b(t,"aria-label")||"",Ac=t=>document.getElementById(b(t,"popovertarget")||""),Cc=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Lc=t=>{const e=zt(t),n=zt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};rt("analytics",()=>[I(document,"click toggle submit change",Tc,Vt)]),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 Gn=A.app.split(" ")[0],Mc=`[data-command="toggle-app-expanded"],.${Gn} > [command="show-modal"]`,Vn=`.${Gn} > dialog,.${Gn} dialog ~ main`,ar=wt("sticky"),rr=t=>{document.startViewTransition?document.startViewTransition(t):t()},sr=t=>rr(()=>window.mtdsToggleAppExpanded?.(t));function Rc(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(Vn))return lr();if(n||!(e instanceof HTMLButtonElement)||!e.matches(Mc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?sr():rr(()=>{const a=document.querySelector(Vn);a?.setAttribute("closedby","any"),a?.showModal()})}function lr(){document.querySelector(Vn)?.close()}let zn=0,Dt,nt=0,Xn=0,De=0,Kn=!1,Yn=0,yt=0;function Oc(){if(!ar?.length)return;const t=ar[0],e=window.scrollY,n=e<yt;yt=e,n!==Dt&&(zn=(t.parentElement?.getBoundingClientRect().top||0)+yt,Dt=n,Xn=t.offsetHeight,De=t.getBoundingClientRect().top+yt,Kn=t.offsetHeight<=window.innerHeight,Yn=window.innerHeight),!(nt===-1&&Kn)&&(nt!==-1&&(Kn||Dt&&yt<=De)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),nt=-1):nt===-1&&!Dt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,yt-zn)}px`),nt=0):nt!==1&&!Dt&&yt+Yn>=De+Xn?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Yn-Xn}px`),nt=1):nt===1&&Dt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${De-zn}px`),nt=0))}rt("app",()=>[I(document,"click",Rc,!0),I(window,"resize",It(lr,100),Vt),I(window,"scroll",Oc,Vt)]);const Ic=/<[^>]+\bid="([^"]+)[^>]+>/gi,cr=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Dc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Pc=/kapittel-\d+-ledd-\d+/,Hc=/<button[^>]+>.*?<\/button>/g,Nc=/►m\d+/i,Pe=/<[^>]+>/g,Bc=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Fc=/<(\/?)(article|footer|section)/gi,Uc=/(src|href)="([^"]+)"/gi,jc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,qc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Wc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,dr="https://lovdata.no/",Gc="https://www.mattilsynet.no/regelveiledning/?regelverk=",Vc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Qn=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),Xc=(t,e)=>{const n=Qn(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&b(o,"aria-checked",`${b(o,"aria-checked")!=="true"}`)})},Kc=(t,e)=>{const n=Qn(t);e?.querySelectorAll("button").forEach(o=>{b(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Yc=(t,e)=>{const n=ur(e);return Qn(t).map(o=>Jc(o,n)).filter(o=>!!o)},Qc=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Vc};for(const o of e.matchAll(Bc)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},ur=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Fc,"<$1div").replace(jc,"$1$2$3").replace(Uc,(e,n,o)=>`${n}="${o.includes(":")?"":dr}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Wc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${_t("id",n)}-ledd-0">${i}</div>`).replace(qc,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(Ic,(e,n,o,i)=>{const a=fr(e,n,o,i);return`${e}${a?`<button type="button" role="checkbox" aria-label="${a}" value="${n}"></button>`:""}`}):t,Jc=(t,e)=>{const n=Pc.test(t),o=t.split("-").map((l,d,u)=>d%2?Zc(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,a=o.filter(({url:l})=>l).pop(),r=o.filter(l=>l.className==="section"&&cr.test(l.label)).pop(),s=a?`${dr}${a.url}`:"",c=o.slice(o.indexOf(r||o[0])).map(({label:l})=>l).join(", ");return{...o.slice(-1)[0],path:o,label:c,url:s,guideUrl:i}},Zc=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),a=_t("class",i),r=_t("data-lovdata-url",i),s=fr(i,t,o,e),[c,l,d]=r.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:a,guideUrl:r&&`${Gc}${u}_${t}`,html:td(t,e),url:r,label:!n&&a==="section"&&s?.match(cr)?.[0]||s}},_t=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},td=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,a=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")a++;else if(--a<0)break;const r=e.indexOf(">",i)+1;return i?e.slice(n,r).replace(Hc,""):""},fr=(t,e,n,o)=>ed[_t("class",t)]?.(t,e,n,o)||"",ed={numberedLegalP:t=>`nr. ${_t("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(Dc)?.[2]?.replace(Pe,"")?.replace(Nc,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(Pe,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,a]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(a==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),a=` id="${i.slice(0,-2).join("-")}"`,r=o.lastIndexOf(a,n),s=o.slice(o.indexOf("<ol",r),n),c=_t("data-name",t)||"-",l=_t("type",s)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(Pe,"")}`},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(Pe,"")}`}};function P(t,e={}){const n=document.getElementById(e.id||"")||M("dialog");return b(n,"aria-busy",e.busy?"true":null),b(n,"class",fc(A.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,I(n,"animationend",nd,{once:!0}),document.body.appendChild(n),n.id}function nd({animationName:t,target:e}){t===A._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:a,...r}=n,s=P(o,{busy:!0,...r});try{const c=await e();return P.success(i,{id:s,busy:!1}),c}catch(c){throw P.danger(a,{id:s,busy:!1}),c}};const od=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
29
+ </dialog>`);const e=document.getElementById(z),o=()=>window.localStorage.setItem(z,"seen");e.addEventListener("close",o,{once:!0}),e.show()}function Tc(t){window._mtdsTracking?.enabled&&setTimeout(kc,0,t)}function kc({type:t,target:e}){const o=t==="click"?e?.closest?.(xc):e;if(!(o instanceof Element)||o.closest('[data-analytics="ignore"]'))return;let n="click",i="Button",a=is(o)||Lc(o)||b(o,"data-tooltip")||"";if(t==="submit")i="Form",n="submit",a=a||document.title;else if(t==="toggle"){if(!o.matches("dialog:modal"))return;i="Dialog",n="open"}else if(t==="change"){const s=b(o,"type"),r=s==="checkbox"||s==="radio"?o.closest("fieldset"):null;i=o.closest(os)?"Chip":"Form",n="change",a=is(r||o)||Xt(r?.querySelector("legend"))||Xt(o?.labels?.[0])}else if(b(o,"role")==="tab")i="Tab",n="navigate";else if(b(o,"popovertarget")){if(!Ac(o)?.matches(":popover-open"))return;i=o.closest(yc)?"HelpText":"Popover",n="open"}else if(o.nodeName.endsWith("SUMMARY")){if(!o.parentElement.open)return;i="Details",n="open"}else if(o.matches(bc)){const s=Cc(o,"--mtds-tooltip-position")==="none";i="Sidebar",n=s?"expand":"minimize",a=s&&b(o,"data-tooltip")||Xt(o)}else if(o.closest(vc))i="Breadcrumbs",n="navigate";else if(o.closest(_c))i="Pagination",n="navigate";else if(o.closest(wc))i="Card",n=o instanceof HTMLAnchorElement?"navigate":"click";else if(o.closest(os))i="Chip",n=o.hasAttribute("data-removable")?"remove":"click";else if(o.closest("th[aria-sort]"))i="Table",n="sort";else if(o instanceof HTMLAnchorElement)i="Link",n=o.protocol==="mailto:"?"email":"navigate",o.hasAttribute("download")?n="download":o.hash&&o.href.startsWith(location.href.split("#")[0])&&(n="anchor");else if(o.hasAttribute("aria-expanded")){if(b(o,"aria-expanded")!=="true")return;i="Expand",n="open"}else o.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",n="open");ns("event",{category:b(o,"data-analytics-category")??i,action:b(o,"data-analytics-action")??n,name:b(o,"data-analytics-name")??a})}const Xt=t=>t?.textContent?.trim()||"",is=t=>t&&b(t,"aria-label")||"",Ac=t=>document.getElementById(b(t,"popovertarget")||""),Cc=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),Lc=t=>{const e=Xt(t),o=Xt(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(o)&&o||e.slice(0,100).trim()};rt("analytics",()=>[O(document,"click toggle submit change",Tc,zt)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,o=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=n=>{try{const i=n??!o();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(o())})();const Vo=A.app.split(" ")[0],Mc=`[data-command="toggle-app-expanded"],.${Vo} > [command="show-modal"]`,zo=`.${Vo} > dialog,.${Vo} dialog ~ main`,as=yt("sticky"),ss=t=>{document.startViewTransition?document.startViewTransition(t):t()},rs=t=>ss(()=>window.mtdsToggleAppExpanded?.(t));function Rc(t){const{target:e,defaultPrevented:o}=t,n=e?.closest?.("a");if(n?.closest("dialog")&&n?.closest(zo))return ls();if(o||!(e instanceof HTMLButtonElement)||!e.matches(Mc))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?rs():ss(()=>{const a=document.querySelector(zo);a?.setAttribute("closedby","any"),a?.showModal()})}function ls(){document.querySelector(zo)?.close()}let Xo=0,Dt,nt=0,jo=0,De=0,Ko=!1,Yo=0,_t=0;function Ic(){if(!as?.length)return;const t=as[0],e=window.scrollY,o=e<_t;_t=e,o!==Dt&&(Xo=(t.parentElement?.getBoundingClientRect().top||0)+_t,Dt=o,jo=t.offsetHeight,De=t.getBoundingClientRect().top+_t,Ko=t.offsetHeight<=window.innerHeight,Yo=window.innerHeight),!(nt===-1&&Ko)&&(nt!==-1&&(Ko||Dt&&_t<=De)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),nt=-1):nt===-1&&!Dt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,_t-Xo)}px`),nt=0):nt!==1&&!Dt&&_t+Yo>=De+jo?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Yo-jo}px`),nt=1):nt===1&&Dt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${De-Xo}px`),nt=0))}rt("app",()=>[O(document,"click",Rc,!0),O(window,"resize",Ot(ls,100),zt),O(window,"scroll",Ic,zt)]);const Oc=/<[^>]+\bid="([^"]+)[^>]+>/gi,cs=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,Dc=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,Pc=/kapittel-\d+-ledd-\d+/,Hc=/<button[^>]+>.*?<\/button>/g,Nc=/►m\d+/i,Pe=/<[^>]+>/g,qc=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,Bc=/<(\/?)(article|footer|section)/gi,Uc=/(src|href)="([^"]+)"/gi,Fc=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Wc=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Gc=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ds="https://lovdata.no/",Vc="https://www.mattilsynet.no/regelveiledning/?regelverk=",zc={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Qo=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Xc=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),jc=(t,e)=>{const o=Qo(t);e?.querySelectorAll("button").forEach(n=>{o.includes(n.value)&&b(n,"aria-checked",`${b(n,"aria-checked")!=="true"}`)})},Kc=(t,e)=>{const o=Qo(t);e?.querySelectorAll("button").forEach(n=>{b(n,"aria-checked",`${o.includes(n.value)||!1}`)})},Yc=(t,e)=>{const o=us(e);return Qo(t).map(n=>Jc(n,o)).filter(n=>!!n)},Qc=t=>{const e=t.slice(0,t.indexOf("</dl>")),o={...zc};for(const n of e.matchAll(qc)){const i=n[2].replace(/-/g,"").toLowerCase();o[i]={label:n[3],value:n[4]}}return o},us=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(Bc,"<$1div").replace(Fc,"$1$2$3").replace(Uc,(e,o,n)=>`${o}="${n.includes(":")?"":ds}${n}" ${o==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Gc,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span><div class="legalP" id="${xt("id",o)}-ledd-0">${i}</div>`).replace(Wc,(e,o,n,i)=>`${o}<span class="data-originalId">${n}</span>${i}`).replace(Oc,(e,o,n,i)=>{const a=fs(e,o,n,i);return`${e}${a?`<button type="button" role="checkbox" aria-label="${a}" value="${o}"></button>`:""}`}):t,Jc=(t,e)=>{const o=Pc.test(t),n=t.split("-").map((l,d,u)=>d%2?Zc(u.slice(0,d+1).join("-"),e,o):null).filter(l=>!!l);if(!n.length)return null;const i=n.filter(({guideUrl:l})=>l).pop()?.guideUrl,a=n.filter(({url:l})=>l).pop(),s=n.filter(l=>l.className==="section"&&cs.test(l.label)).pop(),r=a?`${ds}${a.url}`:"",c=n.slice(n.indexOf(s||n[0])).map(({label:l})=>l).join(", ");return{...n.slice(-1)[0],path:n,label:c,url:r,guideUrl:i}},Zc=(t,e,o)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(n,e.indexOf(">",n)+1),a=xt("class",i),s=xt("data-lovdata-url",i),r=fs(i,t,n,e),[c,l,d]=s.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${l?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:a,guideUrl:s&&`${Vc}${u}_${t}`,html:td(t,e),url:s,label:!o&&a==="section"&&r?.match(cs)?.[0]||r}},xt=(t,e)=>{const o=` ${t.toLowerCase()}="`,n=e.toLowerCase().indexOf(o),i=n+o.length;return n===-1?"":e.slice(i,e.indexOf('"',i))},td=(t,e)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),n=e.length;let i=o+1,a=0;for(;i&&i<n;)if(i=e.indexOf("<",i)+1,e[i]!=="/")a++;else if(--a<0)break;const s=e.indexOf(">",i)+1;return i?e.slice(o,s).replace(Hc,""):""},fs=(t,e,o,n)=>ed[xt("class",t)]?.(t,e,o,n)||"",ed={numberedLegalP:t=>`nr. ${xt("data-numerator",t)}.`,section:(t,e,o,n)=>n.slice(o).match(Dc)?.[2]?.replace(Pe,"")?.replace(Nc,"").trim()||"",legalArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("legalArticleValue",o));return n.slice(i+1,n.indexOf("</span>",i)).replace(Pe,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[o,n,i,a]=e.split("-").reverse();return`avsnitt ${(n==="nummer"?1:Number(o))+(a==="nummer"?1:0)}`},listArticle:(t,e,o,n)=>{const i=e.split("-"),a=` id="${i.slice(0,-2).join("-")}"`,s=n.lastIndexOf(a,o),r=n.slice(n.indexOf("<ol",s),o),c=xt("data-name",t)||"-",l=xt("type",r)||"-";let d="punkt";return l==="1"&&(d="tall"),l==="a"&&(d="bokstav"),l==="i"&&(d="romtertall"),`${d} ${c==="-"?i.pop():c.replace(Pe,"")}`},marginIdArticle:(t,e,o,n)=>{const i=n.indexOf(">",n.indexOf("data-marginOriginalId",o));return`nr. ${n.slice(i+1,n.indexOf("</span>",i)).replace(Pe,"")}`}};function P(t,e={}){const o=document.getElementById(e.id||"")||M("dialog");return b(o,"aria-busy",e.busy?"true":null),b(o,"class",fc(A.toast,e.className)),b(o,"closedby",e.closedby||null),b(o,"data-color",e.color||null),b(o,"data-icon",`${e.icon??""}`||null),b(o,"data-timeout",`${e.timeout??""}`||null),b(o,"id",e.id||`${Date.now()}`),b(o,"open",e.open===!1?null:""),o.innerHTML=t,O(o,"animationend",od,{once:!0}),document.body.appendChild(o),o.id}function od({animationName:t,target:e}){t===A._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,o){const{loading:n,success:i,error:a,...s}=o,r=P(n,{busy:!0,...s});try{const c=await e();return P.success(i,{id:r,busy:!1}),c}catch(c){throw P.danger(a,{id:r,busy:!1}),c}};const nd=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
30
30
  :host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
31
31
  [data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
32
32
 
@@ -193,8 +193,8 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
193
193
  vertical-align: middle;
194
194
  width: var(--mtds-5);
195
195
  }
196
- `,id=[.1,.2,.25,.5,1];function ad(t,{aspect:e,type:n}){const i=n==="stacked",a=t[0].reduce((v,f,g)=>{const h=t.map(_=>_[g].number),w=h.reduce((_,y)=>_+y,0);return Math.max(v,...i?[w]:h)},0),r=a/10,s=10**`${Math.round(r)}`.length,c=r/s,l=(id.find(v=>v>c)||1)*s,d=Math.ceil(a/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const m=u.appendChild(M("div",{class:"axisSteps"})),p=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(v,f)=>rd(l*f)).reverse().map(v=>m.append(M("div",{class:"axisStep","data-label":v}))),{total:d,groups:p,axis:u}}const rd=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}),a=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(r=>r[o+1]).map(({tooltip:r,color:s,number:c})=>{const l=M("div",{"aria-label":r,"data-event":n,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",s),l.style.setProperty("--value",`${c}`),a.appendChild(l)}),i})}function ld(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,a=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...r])=>{const s=M("div",{class:"lineContainer",role:"list"});s.style.setProperty("--color",r[0].color);const c=cd(r.map(({number:u},m,{length:p})=>[100/(p-1)*m,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)}r.forEach(({number:u,tooltip:m,event:p})=>{const v=M("div",{role:"listitem"}),f=M("div",{"aria-label":m,"data-event":p,tabindex:"0",class:"linePoint",role:"img"});f.style.setProperty("--value",`${u}`),v.appendChild(f),s.append(v)}),s.appendChild(l).append(d),a.append(s)}),a}const cd=(t,e)=>t.map(([n,o],i,a)=>i?dd(i,a,e):`M${n},${o}`).join(" "),mr=([t,e],[n,o])=>[t+n,e+o],pr=([t,e],[n,o])=>[t-n,e-o],hr=(t,[e,n])=>[t*e,t*n],dd=(t,e,n)=>{const o=e[t-1],i=e[t],[a,r]=mr(o,hr(n,pr(i,e[t-2]||o))),[s,c]=mr(i,hr(n,pr(o,e[t+1]||i)));return`C ${a},${r} ${s},${c} ${i[0]},${i[1]}`};function ud(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 a=50,r=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,color:u}])=>{if(!l)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=i/s;i+=l;const v=Math.min(i/s,.99999),f=v-p>.5?1:0,g=2*Math.PI*(p-.25),h=2*Math.PI*(v-.25),w=Math.cos(g),_=Math.sin(g),y=Math.cos(h),T=Math.sin(h),S=`M ${a+r*w} ${a+r*_} L ${a+a*w} ${a+a*_} A ${a} ${a} 0 ${f} 1 ${a+a*y} ${a+a*T} L ${a+r*y} ${a+r*T} A ${r} ${r} 0 ${f} 0 ${a+r*w} ${a+r*_}`;m.style.setProperty("--color",u),b(m,"aria-label",c),b(m,"data-event",d),b(m,"d",S),b(m,"role","img"),b(m,"tabindex","0"),o.appendChild(m)}),o}const gr="click keydown mousemove mouseout",br="mtds-chart-tooltip",st=G()?document.getElementById(br)||M("div",{"aria-hidden":"true",class:A._tooltip,hidden:"",id:br}):null;class fd extends mc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=It(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Ie(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),I(this,gr,this)}disconnectedCallback(){st&&(st.hidden=!0),er(this,gr,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=hd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[n,o]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,a=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=M("div",{class:"legend"},l);a.appendChild(u).style.setProperty("--color",d)});const{axis:r,groups:s,total:c}=ad(e,{aspect:i,type:o});(n==="column"||n==="bar")&&s.append(...sd(e)),(n==="line"||n==="area")&&s.append(ld(e,{total:c,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(ud(e,{aspect:i,variant:n})),this.shadowRoot?.append(r,a),gc(this,od)}handleEvent(e){e.type==="click"||e.type==="keydown"?md(e,this):pd(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 md(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,a]=n instanceof Element&&b(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[a]?.querySelector("a,button")?.click?.()}let vr="";function pd(t){if(!st)return;st?.isConnected||document.body.append(st);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(st.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==vr&&(n&&(st.textContent=n),vr=n,st.hidden=!n)}const Jn=t=>t?.textContent?.trim()||"",hd=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,a)=>{const r=Jn(e.cells[0]),s=Jn(t?.rows[0].cells[a]),c=Jn(i),l=o===2?`${s}: ${c}`:`${r}: ${c}${s?` (${s})`:""}`;return b(i,"tabindex","-1"),{number:a&&n&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${n}-${a}`,color:`var(--mtdsc-chart-color-${n}-${a}, var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:b(i,"data-tooltip")||l}}));pc("mtds-chart",fd);const wr=new WeakSet,H=t=>!wr.has(t)&&wr.add(t),D=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),gd=wt("togglegroup"),yr=A.button.split(" "),bd=()=>{for(const t of gd){H(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),D('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))H(e)&&!e.classList.contains(yr[0])&&(e.classList.add(...yr),D('Only setting class="styles.button"','<label class="styles.button">',e))}},vd=wt("breadcrumbs"),wd=()=>{for(const t of vd)H(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...A.breadcrumbs.split(" ")),D('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},yd=wt("errorsummary"),_d=()=>{for(const t of yd)H(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&D('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},xd=wt("dialog"),_r=()=>{for(const t of xd){if(H(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),D(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&D('<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)')?(D('<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()))}},Ed=()=>{for(const t of document.querySelectorAll("[data-count]"))if(H(t)){const e=b(t,"data-count");t.classList.add(...A.validation.split(" ")),b(t,"data-limit",e),D(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Sd=()=>{for(const t of document.querySelectorAll("[data-command]"))if(H(t)){const e=b(t,"data-command");e==="row"?D(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):D(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},$d=G()?document.getElementsByTagName("u-tabs"):[],Td=()=>{for(const t of $d)H(t)&&D("u-tabs","ds-tabs",t)},Zn=A.suggestion.split(" "),kd=G()?document.getElementsByTagName("u-combobox"):[],Ad=G()?document.getElementsByTagName("ds-suggestion"):[],Cd=()=>{for(const t of kd)H(t)&&(t.classList.add(...Zn),D("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Ad)H(t)&&!t.classList.contains(Zn[0])&&(t.classList.add(...Zn),D("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Ld=({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()},Md=wt("field"),He=new Set,Rd=()=>{for(const t of Md)t.nodeName!=="DS-FIELD"&&(H(t)||D('Only setting class="styles.field"','<ds-field class="styles.field">',t),!He.has(t)&&He.add(t)&&$e.prototype.connectedCallback.call(t))},Od=()=>{for(const t of He)$e.prototype.disconnectedCallback.call(t),He.delete(t)},Id=`[data-description], .${A.field.split(" ")[0]} label + p`,Dd=()=>{for(const t of document.querySelectorAll(Id))H(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),D("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Pd=wt("validation"),Hd=()=>{for(const t of Pd)H(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),D('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Nd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))H(t)&&(b(t,"data-placement",b(t,"data-position")),D("data-position","data-placement",t))},Bd=It(()=>{Ed(),Sd(),wd(),_r(),_d(),Dd(),Hd(),Nd(),Rd(),bd(),Cd(),Td()},200);rt("deprecations",()=>[Od,I(document,"click",Ld,Vt),I(document,"toggle",_r,!0),Ie(document,Bd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Fd=It(t=>{if(t.animationName!==A._logo)return;const e=t.target.closest?.(`.${A.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),a=i.getPropertyValue("color"),r=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="${a}"`);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":r}' width='51' height='51' x='2' y='2' stroke='${a}' 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);rt("logo",()=>[I(document,"animationend",Fd)]);const Ud=A.popover.split(" ")[0];function jd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),n=e instanceof HTMLButtonElement,o=e&&b(e,"popovertarget"),i=o?document.getElementById(o):e?.closest("[popover]");if(!(o&&n)&&i?.classList.contains(Ud)&&e){const a=b(e,"popovertargetaction"),r=a==="show"||(a==="hide"?!1:void 0);if(n&&!a&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(r)}}rt("popover",()=>[I(document,"click",jd)]);const qd=G()?document.getElementsByTagName("table"):[],Wd=()=>{for(const t of qd){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")}};rt("table",()=>[Ie(document,It(Wd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const xr=A.toast.split(" ")[0],Ne="data-sort";function Gd({animationName:t,target:e}){const n=e;if(t===A._toastTimeout&&n.close(),t!==A._toastOpen)return;const o=Number(b(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(Ne)||b(n,Ne,`${Date.now()}`),b(n,"tabindex","0"),[...document.querySelectorAll(`.${xr}[open]`)].sort((i,a)=>Number(b(a,Ne))-Number(b(i,Ne))).reduce((i,a)=>(a.style.translate=`0 ${a===e?0:i}px`,i+a.offsetHeight+5),0)}function Vd({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(xr)&&b(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=window.getComputedStyle(t,"::after"),r=o.top+Number.parseInt(i.paddingTop,10),s=r+Number.parseInt(a.height,10),c=o.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(a.width,10);r<=n&&n<=s&&l<=e&&e<=c&&t.close()}}rt("toast",()=>[I(document,"animationstart",Gd),I(document,"click",Vd)]),G()&&mi(document.getElementById("mtds-tooltip")||M("div",{class:A._tooltip,id:"mtds-tooltip",popover:"manual"}));const to=`.${A.field.split(" ")[0]}`,zd=`${to} :is(input,textarea,select)`,Xd="ds-suggestion,u-combobox",Kd=A.validation.split(" ")[0],Be=t=>t instanceof HTMLFormElement&&b(t,"data-validation")==="form",eo=t=>t.closest(to),no=t=>t?.querySelectorAll(zd)||[],Fe=t=>t?.getElementsByClassName(Kd)||[],Er=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||b(t,"aria-readonly")==="true"||b(t,"aria-disabled")==="true",n=t.closest(Xd)?.items,o=b(t,"aria-required")!=="true"||!!n?.length;return n&&t.setCustomValidity(e||o?"":"Required"),e?!1:t.matches(":user-invalid")},Sr=t=>{const e=t.target?.form||t.target;let n;if(Be(e)){for(const o of e.querySelectorAll(to)){const i=[...no(o)].find(Er);!n&&i&&(n=i);for(const a of Fe(o))b(a,"hidden",i?null:"")}for(const o of e.querySelectorAll("fieldset")){const i=[...no(o)].some(Er);for(const a of Fe(o))eo(a)||b(a,"hidden",i?null:"")}n&&(t.preventDefault(),n.focus())}},Yd=({target:t})=>{const e=t;if(!Be(e.form))for(const n of Fe(e.closest("fieldset")||eo(e)))b(n,"hidden","")},Qd=t=>Be(t.target.form)&&t?.preventDefault(),Jd=G()?Fe(document):[],Zd=()=>{for(const t of Jd)if(!t.hasAttribute("data-validation")){const e=no(eo(t))[0];b(t,"data-validation","form"),Be(e?.form)&&b(t,"hidden","")}};rt("validations",()=>[I(document,"input comboboxbeforeselect",Yd,!0),I(document,"invalid",Qd,!0),I(document,"invalid",It(Sr,10),Vt),I(document,"submit",Sr,!0),Ie(document,Zd,{childList:!0,subtree:!0})]);var oo=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",$r=oo&&/iPad|iPhone|iPod/.test(navigator.userAgent),Tr;oo&&/^Mac/i.test(((Tr=navigator.userAgentData)==null?void 0:Tr.platform)||navigator.platform);var tu=typeof HTMLElement>"u"?class{}:HTMLElement;function U(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 eu=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},nu=0,ou=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++nu).toString(32)}`),t.id):"",iu=(t,e,n)=>{const o=document.createElement(t);return o.textContent=e,o},au={define:(t,e)=>!oo||window.customElements.get(t)||window.customElements.define(t,e)},ru=t=>{var e;const n=U(t,"aria-label")||"";return[...(((e=U(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var r;return i||((r=a?.innerText)==null?void 0:r.trim())||""},n)},su=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
196
+ `,id=[.1,.2,.25,.5,1];function ad(t,{aspect:e,type:o}){const i=o==="stacked",a=t[0].reduce((v,f,g)=>{const h=t.map(_=>_[g].number),w=h.reduce((_,y)=>_+y,0);return Math.max(v,...i?[w]:h)},0),s=a/10,r=10**`${Math.round(s)}`.length,c=s/r,l=(id.find(v=>v>c)||1)*r,d=Math.ceil(a/l)*l,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const m=u.appendChild(M("div",{class:"axisSteps"})),p=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/l+1},(v,f)=>sd(l*f)).reverse().map(v=>m.append(M("div",{class:"axisStep","data-label":v}))),{total:d,groups:p,axis:u}}const sd=new Intl.NumberFormat().format;function rd(t){return t[0].slice(1).map(({value:e,event:o},n)=>{const i=M("div",{class:"axisGroup","data-label":e}),a=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(s=>s[n+1]).map(({tooltip:s,color:r,number:c})=>{const l=M("div",{"aria-label":s,"data-event":o,class:"bar",role:"img",tabindex:"0"});return l.style.setProperty("--color",r),l.style.setProperty("--value",`${c}`),a.appendChild(l)}),i})}function ld(t,{total:e,type:o,variant:n}){const i=Number.parseFloat(o||"0")||0,a=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...s])=>{const r=M("div",{class:"lineContainer",role:"list"});r.style.setProperty("--color",s[0].color);const c=cd(s.map(({number:u},m,{length:p})=>[100/(p-1)*m,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"),n==="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)}s.forEach(({number:u,tooltip:m,event:p})=>{const v=M("div",{role:"listitem"}),f=M("div",{"aria-label":m,"data-event":p,tabindex:"0",class:"linePoint",role:"img"});f.style.setProperty("--value",`${u}`),v.appendChild(f),r.append(v)}),r.appendChild(l).append(d),a.append(r)}),a}const cd=(t,e)=>t.map(([o,n],i,a)=>i?dd(i,a,e):`M${o},${n}`).join(" "),ms=([t,e],[o,n])=>[t+o,e+n],ps=([t,e],[o,n])=>[t-o,e-n],hs=(t,[e,o])=>[t*e,t*o],dd=(t,e,o)=>{const n=e[t-1],i=e[t],[a,s]=ms(n,hs(o,ps(i,e[t-2]||n))),[r,c]=ms(i,hs(o,ps(n,e[t+1]||i)));return`C ${a},${s} ${r},${c} ${i[0]},${i[1]}`};function ud(t,{aspect:e,variant:o}){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&n.style.setProperty("--mtdsc-chart-aspect",e),b(n,"class","pie"),b(n,"viewBox","0 0 100 100");let i=0;const a=50,s=o==="doughnut"?25:0,r=t.slice(1).reduce((c,[,l])=>c+l.number,0);return t.slice(1).forEach(([,{tooltip:c,number:l,event:d,color:u}])=>{if(!l)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=i/r;i+=l;const v=Math.min(i/r,.99999),f=v-p>.5?1:0,g=2*Math.PI*(p-.25),h=2*Math.PI*(v-.25),w=Math.cos(g),_=Math.sin(g),y=Math.cos(h),T=Math.sin(h),S=`M ${a+s*w} ${a+s*_} L ${a+a*w} ${a+a*_} A ${a} ${a} 0 ${f} 1 ${a+a*y} ${a+a*T} L ${a+s*y} ${a+s*T} A ${s} ${s} 0 ${f} 0 ${a+s*w} ${a+s*_}`;m.style.setProperty("--color",u),b(m,"aria-label",c),b(m,"data-event",d),b(m,"d",S),b(m,"role","img"),b(m,"tabindex","0"),n.appendChild(m)}),n}const gs="click keydown mousemove mouseout",bs="mtds-chart-tooltip",lt=V()?document.getElementById(bs)||M("div",{"aria-hidden":"true",class:A._tooltip,hidden:"",id:bs}):null;class fd extends mc{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=Ot(()=>this.attributeChangedCallback(),100),o=new ResizeObserver(()=>this.handleResize());o.observe(this),this.#e=()=>o.disconnect(),this.#t=Oe(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),O(this,gs,this)}disconnectedCallback(){lt&&(lt.hidden=!0),es(this,gs,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=hd(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(l=>l.remove());const[o,n]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,a=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:l,color:d}])=>{const u=M("div",{class:"legend"},l);a.appendChild(u).style.setProperty("--color",d)});const{axis:s,groups:r,total:c}=ad(e,{aspect:i,type:n});(o==="column"||o==="bar")&&r.append(...rd(e)),(o==="line"||o==="area")&&r.append(ld(e,{total:c,variant:o,type:n})),(o==="doughnut"||o==="pie")&&this.shadowRoot?.append(ud(e,{aspect:i,variant:o})),this.shadowRoot?.append(s,a),gc(this,nd)}handleEvent(e){e.type==="click"||e.type==="keydown"?md(e,this):pd(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,o=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(o?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(o?.offsetWidth||0)<500)}}function md(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const o=t.composedPath()[0],n=e.querySelector("table"),[i,a]=o instanceof Element&&b(o,"data-event")?.split("-").map(Number)||[];n?.rows[i]?.cells[a]?.querySelector("a,button")?.click?.()}let vs="";function pd(t){if(!lt)return;lt?.isConnected||document.body.append(lt);const e=t.composedPath()[0],o=e instanceof Element&&e.getAttribute("aria-label")||"";o&&(lt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),o!==vs&&(o&&(lt.textContent=o),vs=o,lt.hidden=!o)}const Jo=t=>t?.textContent?.trim()||"",hd=t=>Array.from(t?.rows||[]).map((e,o,{length:n})=>Array.from(e.cells,(i,a)=>{const s=Jo(e.cells[0]),r=Jo(t?.rows[0].cells[a]),c=Jo(i),l=n===2?`${r}: ${c}`:`${s}: ${c}${r?` (${r})`:""}`;return b(i,"tabindex","-1"),{number:a&&o&&Number.parseFloat(c)||0,event:i.querySelector("a,button")&&`${o}-${a}`,color:`var(--mtdsc-chart-color-${o}-${a}, var(--mtdsc-chart-color-${o}, var(--mtdsc-chart-color-base)))`,value:c,tooltip:b(i,"data-tooltip")||l}}));pc("mtds-chart",fd);const ws=new WeakSet,H=t=>!ws.has(t)&&ws.add(t),D=(t,e,o)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,o),gd=yt("togglegroup"),ys=A.button.split(" "),bd=()=>{for(const t of gd){H(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),D('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))H(e)&&!e.classList.contains(ys[0])&&(e.classList.add(...ys),D('Only setting class="styles.button"','<label class="styles.button">',e))}},vd=yt("breadcrumbs"),wd=()=>{for(const t of vd)H(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...A.breadcrumbs.split(" ")),D('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},yd=yt("errorsummary"),_d=()=>{for(const t of yd)H(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&D('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},xd=yt("dialog"),_s=()=>{for(const t of xd){if(H(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),D(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&D('<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)')?(D('<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()))}},Ed=()=>{for(const t of document.querySelectorAll("[data-count]"))if(H(t)){const e=b(t,"data-count");t.classList.add(...A.validation.split(" ")),b(t,"data-limit",e),D(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},Sd=()=>{for(const t of document.querySelectorAll("[data-command]"))if(H(t)){const e=b(t,"data-command");e==="row"?D(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):D(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},$d=V()?document.getElementsByTagName("u-tabs"):[],Td=()=>{for(const t of $d)H(t)&&D("u-tabs","ds-tabs",t)},Zo=A.suggestion.split(" "),kd=V()?document.getElementsByTagName("u-combobox"):[],Ad=V()?document.getElementsByTagName("ds-suggestion"):[],Cd=()=>{for(const t of kd)H(t)&&(t.classList.add(...Zo),D("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of Ad)H(t)&&!t.classList.contains(Zo[0])&&(t.classList.add(...Zo),D("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},Ld=({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 n=t?.closest("dialog");n&&t?.closest('[data-command="close"]')&&n.close()},Md=yt("field"),He=new Set,Rd=()=>{for(const t of Md)t.nodeName!=="DS-FIELD"&&(H(t)||D('Only setting class="styles.field"','<ds-field class="styles.field">',t),!He.has(t)&&He.add(t)&&$e.prototype.connectedCallback.call(t))},Id=()=>{for(const t of He)$e.prototype.disconnectedCallback.call(t),He.delete(t)},Od=`[data-description], .${A.field.split(" ")[0]} label + p`,Dd=()=>{for(const t of document.querySelectorAll(Od))H(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),D("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Pd=yt("validation"),Hd=()=>{for(const t of Pd)H(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),D('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Nd=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))H(t)&&(b(t,"data-placement",b(t,"data-position")),D("data-position","data-placement",t))},qd=Ot(()=>{Ed(),Sd(),wd(),_s(),_d(),Dd(),Hd(),Nd(),Rd(),bd(),Cd(),Td()},200);rt("deprecations",()=>[Id,O(document,"click",Ld,zt),O(document,"toggle",_s,!0),Oe(document,qd,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Bd=Ot(t=>{if(t.animationName!==A._logo)return;const e=t.target.closest?.(`.${A.logo.split(" ")[0]}`),o=e?.firstElementChild;if(o instanceof SVGSVGElement){for(const c of document.head.querySelectorAll("link[rel~='icon']"))c.setAttribute("rel","disabled");const n=e?.hasAttribute("data-env"),i=window.getComputedStyle(o),a=i.getPropertyValue("color"),s=i.getPropertyValue("--mtdsc-logo-background"),r=o.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${a}"`);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='${n?"none":s}' width='51' height='51' x='2' y='2' stroke='${a}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${n?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${r}</g></svg>`)}`,rel:"icon"}))}},200);rt("logo",()=>[O(document,"animationend",Bd)]);const Ud=A.popover.split(" ")[0];function Fd({target:t}){const e=t?.closest?.('a,button,[role="button"]'),o=e instanceof HTMLButtonElement,n=e&&b(e,"popovertarget"),i=n?document.getElementById(n):e?.closest("[popover]");if(!(n&&o)&&i?.classList.contains(Ud)&&e){const a=b(e,"popovertargetaction"),s=a==="show"||(a==="hide"?!1:void 0);if(o&&!a&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(s)}}rt("popover",()=>[O(document,"click",Fd)]);const Wd=V()?document.getElementsByTagName("table"):[],Gd=()=>{for(const t of Wd){const e=Array.from(t.tHead?.rows[0]?.cells||[],o=>o.innerText.trim());for(const o of t.tBodies)for(const n of o.rows)for(const i of n.cells)b(i,"data-th",e[i.cellIndex]||":empty")}};rt("table",()=>[Oe(document,Ot(Gd,200),{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const xs=A.toast.split(" ")[0],Ne="data-sort";function Vd({animationName:t,target:e}){const o=e;if(t===A._toastTimeout&&o.close(),t!==A._toastOpen)return;const n=Number(b(o,"data-timeout"));o.style.setProperty("--mtdsc-toast-timeout",n?`${n}ms`:null),o.hasAttribute(Ne)||b(o,Ne,`${Date.now()}`),b(o,"tabindex","0"),[...document.querySelectorAll(`.${xs}[open]`)].sort((i,a)=>Number(b(a,Ne))-Number(b(i,Ne))).reduce((i,a)=>(a.style.translate=`0 ${a===e?0:i}px`,i+a.offsetHeight+5),0)}function zd({target:t,clientX:e,clientY:o}){if(t instanceof HTMLDialogElement&&t.classList.contains(xs)&&b(t,"data-closedby")!=="none"){const n=t.getBoundingClientRect(),i=window.getComputedStyle(t),a=window.getComputedStyle(t,"::after"),s=n.top+Number.parseInt(i.paddingTop,10),r=s+Number.parseInt(a.height,10),c=n.right-Number.parseInt(i.paddingRight,10),l=c-Number.parseInt(a.width,10);s<=o&&o<=r&&l<=e&&e<=c&&t.close()}}rt("toast",()=>[O(document,"animationstart",Vd),O(document,"click",zd)]),V()&&mi(document.getElementById("mtds-tooltip")||M("div",{class:A._tooltip,id:"mtds-tooltip",popover:"manual"}));const tn=`.${A.field.split(" ")[0]}`,Xd=`${tn} :is(input,textarea,select)`,jd="ds-suggestion,u-combobox",Kd=A.validation.split(" ")[0],qe=t=>t instanceof HTMLFormElement&&b(t,"data-validation")==="form",en=t=>t.closest(tn),on=t=>t?.querySelectorAll(Xd)||[],Be=t=>t?.getElementsByClassName(Kd)||[],Es=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||b(t,"aria-readonly")==="true"||b(t,"aria-disabled")==="true",o=t.closest(jd)?.items,n=b(t,"aria-required")!=="true"||!!o?.length;return o&&t.setCustomValidity(e||n?"":"Required"),e?!1:t.matches(":user-invalid")},Ss=t=>{const e=t.target?.form||t.target;let o;if(qe(e)){for(const n of e.querySelectorAll(tn)){const i=[...on(n)].find(Es);!o&&i&&(o=i);for(const a of Be(n))b(a,"hidden",i?null:"")}for(const n of e.querySelectorAll("fieldset")){const i=[...on(n)].some(Es);for(const a of Be(n))en(a)||b(a,"hidden",i?null:"")}o&&(t.preventDefault(),o.focus())}},Yd=({target:t})=>{const e=t;if(!qe(e.form))for(const o of Be(e.closest("fieldset")||en(e)))b(o,"hidden","")},Qd=t=>qe(t.target.form)&&t?.preventDefault(),Jd=V()?Be(document):[],Zd=()=>{for(const t of Jd)if(!t.hasAttribute("data-validation")){const e=on(en(t))[0];b(t,"data-validation","form"),qe(e?.form)&&b(t,"hidden","")}};rt("validations",()=>[O(document,"input comboboxbeforeselect",Yd,!0),O(document,"invalid",Qd,!0),O(document,"invalid",Ot(Ss,10),zt),O(document,"submit",Ss,!0),Oe(document,Zd,{childList:!0,subtree:!0})]);var nn=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",$s=nn&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ts;nn&&/^Mac/i.test(((Ts=navigator.userAgentData)==null?void 0:Ts.platform)||navigator.platform);var tu=typeof HTMLElement>"u"?class{}:HTMLElement;function U(t,e,o){return o===void 0?t.getAttribute(e):(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}var eu=t=>{var e;const o=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return o instanceof Document||o instanceof ShadowRoot?o:document},ou=0,nu=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ou).toString(32)}`),t.id):"",iu=(t,e,o)=>{const n=document.createElement(t);return n.textContent=e,n},au={define:(t,e)=>!nn||window.customElements.get(t)||window.customElements.define(t,e)},su=t=>{var e;const o=U(t,"aria-label")||"";return[...(((e=U(t,"aria-labelledby"))==null?void 0:e.trim().split(/\s+/))||[]).map(i=>document.getElementById(i)),...Array.from(t.labels||[])].reduce((i,a)=>{var s;return i||((s=a?.innerText)==null?void 0:s.trim())||""},o)},ru=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
197
197
  :host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
198
198
  :host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
199
199
  @media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
200
- @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,io=!1,kr=class extends tu{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(iu("style",su))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(io)return;io=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=ru(this);$r&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),U(this,"aria-busy",`${this.position===-1}`),U(this,"aria-label",e.trim()),U(this,"aria-labelledby",null),U(this,"aria-valuemax","100"),U(this,"aria-valuemin","0"),U(this,"aria-valuenow",`${t}`),U(this,"role",$r?"img":"progressbar"),io=!1}get labels(){const t=this.closest("label:not([for])"),e=ou(this);return t&&(t.htmlFor=e),eu(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return Cr(this,"value")}set value(t){Lr(this,"value",t)}get max(){return Cr(this,"max")||1}set max(t){Lr(this,"max",t)}};kr.formAssociated=!0;var Ar=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),Cr=(t,e)=>{const n=U(t,e);return Ar(n)?Math.max(0,Number.parseFloat(n)):null},Lr=(t,e,n)=>{if(n===null||Ar(n))U(t,e,`${n}`);else throw new Error(`Failed to set non-numeric '${U}': '${n}'`)};return au.define("u-progress",kr),E.DSBreadcrumbsElement=bi,E.DSErrorSummaryElement=vi,E.DSFieldElement=$e,E.DSPaginationElement=ki,E.DSSuggestionElement=Ai,E.DSTabElement=Ri,E.DSTabListElement=Mi,E.DSTabPanelElement=Oi,E.DSTabsElement=Li,E.UHTMLComboboxElement=Ve,E.UHTMLComboboxShadowRoot=Gr,E.UHTMLComboboxStyle=Ge,E.UHTMLDataListElement=Xi,E.UHTMLDataListShadowRoot=ic,E.UHTMLDataListStyle=Un,E.UHTMLTabElement=rn,E.UHTMLTabListElement=on,E.UHTMLTabListShadowRoot=ss,E.UHTMLTabListStyle=Ze,E.UHTMLTabPanelElement=ln,E.UHTMLTabPanelShadowRoot=cs,E.UHTMLTabPanelStyle=tn,E.UHTMLTabShadowRoot=ls,E.UHTMLTabStyle=en,E.UHTMLTabsElement=nn,E.UHTMLTabsShadowRoot=rs,E.UHTMLTabsStyle=Je,E.analytics=or,E.fixLawHtml=ur,E.getLawChecked=zc,E.pagination=Ti,E.parseLawIds=Yc,E.parseLawMeta=Qc,E.setLawChecked=Kc,E.setTooltipElement=mi,E.styles=uc,E.toast=P,E.toggleAppExpanded=sr,E.toggleLawChecked=Xc,E.version=dc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E})({});
200
+ @keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,an=!1,ks=class extends tu{static get observedAttributes(){return["aria-label","aria-labelledby","value","max"]}constructor(){super(),this.shadowRoot||this.attachShadow({mode:"open"}).append(iu("style",ru))}connectedCallback(){this.attributeChangedCallback()}attributeChangedCallback(){if(an)return;an=!0;const t=Math.max(0,Math.round(this.position*100));this.style.setProperty("--percentage",`${t}%`);let e=su(this);$s&&(e=`${e.replace(/\d+%$/,"")} ${t}%`),U(this,"aria-busy",`${this.position===-1}`),U(this,"aria-label",e.trim()),U(this,"aria-labelledby",null),U(this,"aria-valuemax","100"),U(this,"aria-valuemin","0"),U(this,"aria-valuenow",`${t}`),U(this,"role",$s?"img":"progressbar"),an=!1}get labels(){const t=this.closest("label:not([for])"),e=nu(this);return t&&(t.htmlFor=e),eu(this).querySelectorAll(`label[for="${e}"]`)}get position(){return this.value===null?-1:Math.min(this.value/this.max,1)}get value(){return Cs(this,"value")}set value(t){Ls(this,"value",t)}get max(){return Cs(this,"max")||1}set max(t){Ls(this,"max",t)}};ks.formAssociated=!0;var As=t=>!Number.isNaN(Number.parseFloat(`${t}`))&&Number.isFinite(Number(t)),Cs=(t,e)=>{const o=U(t,e);return As(o)?Math.max(0,Number.parseFloat(o)):null},Ls=(t,e,o)=>{if(o===null||As(o))U(t,e,`${o}`);else throw new Error(`Failed to set non-numeric '${U}': '${o}'`)};return au.define("u-progress",ks),E.DSBreadcrumbsElement=bi,E.DSErrorSummaryElement=vi,E.DSFieldElement=$e,E.DSPaginationElement=ki,E.DSSuggestionElement=Ai,E.DSTabElement=Ri,E.DSTabListElement=Mi,E.DSTabPanelElement=Ii,E.DSTabsElement=Li,E.UHTMLComboboxElement=ze,E.UHTMLComboboxShadowRoot=Vs,E.UHTMLComboboxStyle=Ve,E.UHTMLDataListElement=ji,E.UHTMLDataListShadowRoot=ic,E.UHTMLDataListStyle=Uo,E.UHTMLTabElement=ao,E.UHTMLTabListElement=no,E.UHTMLTabListShadowRoot=rr,E.UHTMLTabListStyle=Ze,E.UHTMLTabPanelElement=ro,E.UHTMLTabPanelShadowRoot=cr,E.UHTMLTabPanelStyle=to,E.UHTMLTabShadowRoot=lr,E.UHTMLTabStyle=eo,E.UHTMLTabsElement=oo,E.UHTMLTabsShadowRoot=sr,E.UHTMLTabsStyle=Je,E.analytics=ns,E.fixLawHtml=us,E.getLawChecked=Xc,E.pagination=Ti,E.parseLawIds=Yc,E.parseLawMeta=Qc,E.setLawChecked=Kc,E.setTooltipElement=mi,E.styles=uc,E.toast=P,E.toggleAppExpanded=rs,E.toggleLawChecked=jc,E.version=dc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E})({});