@mattilsynet/design 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var mtds=function($){"use strict";var Et=typeof window<"u"&&typeof window.docume
5
5
  ::slotted(del) { text-decoration: none }
6
6
  ::slotted(data:not([hidden])) { display: inline-block; pointer-events: none }
7
7
  ::slotted(data)::after { content: '\\00D7'; content: '\\00D7' / ''; padding-inline: .5ch; pointer-events: auto }
8
- ::slotted(data:focus) { ${xn} }`))}static get observedAttributes(){return Object.keys(dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Ln(this),at(this,ve,this,!0),Ct(this,{attributeFilter:["value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ft,0,this),setTimeout(pt,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];dt[n]&&(this._texts[n]=o||dt[n])}disconnectedCallback(){Ct(this,!1),kn(this,ve,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Rn(this),t.type==="click"&&Un(this,t),t.type==="focus"&&Hn(this,t),t.type==="input"&&qn(this,t),t.type==="keydown"&&Fn(this,t),t.type==="mousedown"&&Lt(t),t.type==="mutation"&&ft(this,t)}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:ct)!==ct}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:ct)!==ct}set creatable(t){f(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("u-datalist,datalist")),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=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},At=t=>t instanceof HTMLDataElement,ft=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:a,control:r,list:d,multiple:l}=t;let h=`${O((o=r?.labels)==null?void 0:o[0])}, ${l?a.length?s.found.replace("%d",`${a.length}`):s.empty:""}`;const u=[];for(const{addedNodes:_,removedNodes:I}of e?.detail||[]){for(const m of _)At(m)&&u.unshift(m);for(const m of I)At(m)&&u.push(m)}const T=l?u.length===1:u[0]===i;if(i&&r&&T){const _=f(r,"inputmode"),I=At(i)?r:i;t._speak=`${s[u[0].isConnected?"added":"removed"]} ${O(u[0])}, `,(Nn||i===r)&&kt(t._speak),r!==I&&(f(r,"aria-expanded",null),f(r,"inputmode","none"),h=" ",r.focus()),setTimeout(()=>{var m;f(r,"aria-expanded","true"),f(r,"inputmode",_),(m=I?.focus)==null||m.call(I),t._speak="",Dn?at(t,"blur",()=>ft(t),_e):setTimeout(ft,100,t)},100)}let w=0;const k=t.querySelector("select");for(const _ of a){const I=k?.options[w],m=O(_),A=_.value||m,te=`${t._speak}${m}, ${s.remove}, ${++w} ${s.of} ${a.length}`;f(_,"role","button"),f(_,"value",A),f(_,"tabindex","-1"),f(_,"aria-label",te),I?Object.assign(I,{textContent:m,value:A}):k?.appendChild(new Option(m,A,!0,!0))}k&&f(k,"multiple",l?"":null);for(const _ of[...k?.options||[]].slice(w))_.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),d&&f(d,"aria-multiselectable",`${l}`),r&&f(r,"list",Mn(d)),r&&f(r,"aria-label",`${t._speak}${h}`);const J=O(a[0]);J!==t._itemText&&pt(t,!1),t._itemText=J,ge(t),ye(t),(n=Ct(t))==null||n.takeRecords()},ge=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value))},ye=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const a=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(a)?"":null)}},pt=(t,e=!0)=>{const{multiple:o,control:n,items:i}=t,s=O(i[0]);if(!(o||!n||s===n.value)){if(e)return be(n,s,"insertText");n.value=s}},Mt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:a,items:r,multiple:d}=t,l=((o=a?.value)==null?void 0:o.trim())||"",h=l.toLowerCase()||null;let u=[...i].find(w=>(f(w,"label")||O(w)).trim().toLowerCase()===h);const T={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("beforematch",T))||(u=[...i].find(w=>w.selected)),e)return ye(t),u?q(t,u,!1):s&&l?q(t,{value:l},!1):(!d&&r[0]?q(t,r[0]):pt(t),kt(n.invalid));for(const w of i)w.selected=w===u},q=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,a=lt("data",e.label||e.value,{value:e.value}),r=[...i].find(h=>h.value===e.value),d={bubbles:!0,cancelable:!0,detail:r||a};if(r&&!o)return pt(t);if(t.dispatchEvent(new CustomEvent("beforechange",d))){if(!s)for(const h of[...i])h.remove();r?r.remove():n?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("afterchange",d))}},Hn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),kt()},Rn=t=>Lt()||setTimeout(Bn,0,t),Bn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Mt(t),t._focus=void 0)},Un=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:a,items:r}=t;if(s?.contains(i))return a&&be(a,"","deleteContentBackward"),a?.focus();for(const d of r){const{top:l,right:h,bottom:u,left:T}=d.getBoundingClientRect();if(d.contains(i))return q(t,d);if(n>=l&&n<=u&&o>=T&&o<=h)return d.focus()}i===t&&a?.focus()},qn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const d of n)if(d.value&&d.value===a)return q(t,d,s)}else s||Mt(t,!1);ge(t)},Fn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:a,repeat:r,target:d}=e,l=i&&i===d,h=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(d);if(l&&a==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),at(n,"blur",()=>f(n,"tabindex",null),_e)),!(!l&&In(e)||u===-1)){if(a==="ArrowRight"&&!l)u+=1;else if(a==="ArrowLeft"&&!h)u-=1;else if(a==="Enter"&&l){const T=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",T)),Mt(t)}else if((a==="Backspace"||a==="Delete")&&!h){if(e.preventDefault(),!r&&s[u])return q(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,u)]||i)==null||o.focus()}};On.define("u-combobox",ut);const Vn="1.3.7",E={capture:!0,passive:!0},K=typeof window<"u"&&typeof document<"u";function Yn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let jn=0;const Kn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function Ot(t){return t.id||(t.id=`${Kn}${++jn}`),t.id}const Wn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Wn("add",t,e),W=K?document.createElement("div"):null,ht=new Map,Xn=()=>{for(const[t,e]of ht)e()};W&&(W.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Xn,E));const F={top:0,right:1,bottom:2,left:3};function P(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return ht.delete(t);W?.isConnected||document.body.append(W||""),ht.has(t)||ht.set(t,()=>P(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:a,offsetHeight:r}=t,d=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:h,height:u,left:T,top:w}=e.getBoundingClientRect(),k=window.visualViewport?.width||window.innerWidth,J=window.visualViewport?.height||window.innerHeight,_=window.pageXOffset||document.documentElement.scrollLeft,I=window.pageYOffset||document.documentElement.scrollTop,m=Math.round(T-(d-h)/2),A=Math.round(w-(l-u)/2),te=Math.min(Math.max(10,m-(a-d)/2),k-a-10),as=Math.min(Math.max(10,A-(r-l)/2),J-r-10),rs=m-a>0,ls=m+d+a<k,cs=A-r>0,ds=A+l+r<J,un=i===F.top||i===F.bottom,us=i===F.right&&(n||ls)||!rs,fn=i===F.bottom&&(n||ds)||!cs,fs=Math.round(un?te:us?m+d:m-a),ps=Math.round(un?fn?A+l:A-r:as);t.style.position="absolute",t.style.left=`${fs+_}px`,t.style.top=`${ps+I}px`,W?.style.setProperty("translate",`0px ${Math.round(fn?_+A+l+r+30:0)}px`)}function we(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Pt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Pt.get(t)||[];i.length||(Pt.set(t,i),we((s,a)=>{if(t.isConnected&&i?.length)for(const r of i)r();else a?.disconnect(),Pt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},x=t=>{if(!K)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Dt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Ee="mattilsynet.matomo.cloud";let Nt=!0;function Gn(t,e={}){if(K){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Ee}/matomo.php`]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${Ee}/matomo.js`}))),t==="init"){const{matomoId:o,enabled:n=!0}=e;Nt=n,window._paq.push(["setSiteId",o])}if(Nt==="debug")return console.info(`Analytics: "${t}"`,e);if(!(Nt===!1||window.location.hostname==="localhost"))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:s}=e,a=["trackEvent",o,n,i,s];window._paq.push(a.filter(r=>r!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const zn=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&s<e&&a.splice(-2,2,0,e),a},Qn=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:zn(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),$e="_alert_1bf95_1 _ds-alert_uxa1f_1",Se="_app_1bf95_1",Te="_sticky_1bf95_1",xe="_avatar_1bf95_1 _ds-avatar_uxa1f_1",Ce="_badge_1bf95_1",ke="_breadcrumbs_1bf95_1 _ds-breadcrumbs_uxa1f_1",Ie="_button_1bf95_1 _ds-button_uxa1f_1",Le="_card_1bf95_1",Ae="_group_1bf95_1",Me="_chip_1bf95_1 _ds-chip_uxa1f_1",Oe="_details_1bf95_1 _ds-details_uxa1f_1",Pe="_dialog_1bf95_1 _ds-dialog_uxa1f_1",De="_divider_1bf95_1",Ne="_errorsummary_1bf95_1 _ds-error-summary_uxa1f_1",He="__errorsummary_1bf95_1",Re="_field_1bf95_1 _ds-field_uxa1f_1",Be="__datalist_1bf95_1",Ue="_affixes_1bf95_1 _ds-field-affixes_uxa1f_1",qe="_fieldset_1bf95_1 _ds-fieldset_uxa1f_1",Fe="_heading_1bf95_1 _ds-heading_uxa1f_1",Ve="_ingress_1bf95_1",Ye="_muted_1bf95_1",je="_info_1bf95_1",Ke="_prose_1bf95_1",We="_helptext_1bf95_1 _ds-focus_uxa1f_1",Xe="_input_1bf95_1 _ds-input_uxa1f_1",Ge="_grid_1bf95_1",ze="_flex_1bf95_1",Qe="_link_1bf95_1",Je="_logo_1bf95_1",Ze="_pagination_1bf95_1 _ds-pagination_uxa1f_1",to="_popover_1bf95_1",eo="_progress_1bf95_1",oo="__indeterminate_1bf95_1",no="_skeleton_1bf95_1 _ds-skeleton_uxa1f_1",io="__skeleton_1bf95_1",so="_spinner_1bf95_1",ao="_steps_1bf95_1",ro="_table_1bf95_1 _ds-table_uxa1f_1",lo="__scrollShadow_1bf95_1",co="_tabs_1bf95_1 _ds-tabs_uxa1f_1",uo="__scrollMask_1bf95_1",fo="_tag_1bf95_1 _ds-tag_uxa1f_1",po="_togglegroup_1bf95_1",ho="__tooltip_1bf95_1",mo="_validation_1bf95_1 _ds-validation-message_uxa1f_1",bo="_body_1bf95_153",vo="__checked_1bf95_1",v={alert:$e,app:Se,sticky:Te,avatar:xe,badge:Ce,breadcrumbs:ke,button:Ie,card:Le,group:Ae,chip:Me,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,_errorsummary:He,field:Re,_datalist:Be,affixes:Ue,fieldset:qe,heading:Fe,ingress:Ve,muted:Ye,info:je,prose:Ke,helptext:We,input:Xe,grid:Ge,flex:ze,link:Qe,logo:Je,pagination:Ze,popover:to,progress:eo,_indeterminate:oo,skeleton:no,_skeleton:io,spinner:so,steps:ao,table:ro,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:ho,validation:mo,body:bo,_checked:vo},Jn=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Be,_errorsummary:He,_indeterminate:oo,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:ho,affixes:Ue,alert:$e,app:Se,avatar:xe,badge:Ce,body:bo,breadcrumbs:ke,button:Ie,card:Le,chip:Me,default:v,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,field:Re,fieldset:qe,flex:ze,grid:Ge,group:Ae,heading:Fe,helptext:We,info:je,ingress:Ve,input:Xe,link:Qe,logo:Je,muted:Ye,pagination:Ze,popover:to,progress:eo,prose:Ke,skeleton:no,spinner:so,steps:ao,sticky:Te,table:ro,tabs:co,tag:fo,togglegroup:po,validation:mo},Symbol.toStringTag,{value:"Module"}));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 _o=v.app.split(" ")[0],Zn=v.sticky.split(" ")[0],ti='[data-command="toggle-app-expanded"]',go=`.${_o} > dialog,.${_o} dialog ~ main`,yo=t=>{document.startViewTransition?document.startViewTransition(t):t()},wo=t=>yo(()=>window.mtdsToggleAppExpanded?.(t));function ei({target:t,defaultPrevented:e}){if(!(e||!(t instanceof HTMLButtonElement)||!t.matches(ti))){if(getComputedStyle(t).position==="sticky")return wo();yo(()=>{const o=document.querySelector(go);o?.setAttribute("data-closedby","any"),o?.showModal()})}}function oi(){document.querySelector(go)?.close()}let Ht=0,Y,M=0,g,Rt=0,mt=0,Bt=!1,Ut=0,N=0;function ni([t]){g=t,Eo()}function Eo(){if(!g?.isConnected)return;const t=window.scrollY,e=t<N;N=t,e!==Y&&(Ht=(g.parentElement?.getBoundingClientRect().top||0)+N,Y=e,Rt=g.offsetHeight,mt=g.getBoundingClientRect().top+N,Bt=g.offsetHeight<=window.innerHeight,Ut=window.innerHeight),!(M===-1&&Bt)&&(M!==-1&&(Bt||Y&&N<=mt)?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${Math.max(0,N-Ht)}px`),M=0):M!==1&&!Y&&N+Ut>=mt+Rt?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top",`${Ut-Rt}px`),M=1):M===1&&Y&&(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${mt-Ht}px`),M=0))}x(()=>{V(document.documentElement,Zn,ni),b(document,"click",ei,E),b(window,"resize",Yn(oi,100),E),b(window,"scroll",Eo,E)});const ii=v.breadcrumbs.split(" ")[0];function si(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}x(()=>V(document.documentElement,ii,si));const ai=v.dialog.split(" ")[0],ri=K?document.getElementsByClassName(ai):[],li=()=>{for(const t of ri)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},ci=({clientX:t,clientY:e,target:o})=>{if(o instanceof HTMLDialogElement&&c(o,"data-closedby")==="any"){const{top:n,right:i,bottom:s,left:a}=o.getBoundingClientRect();n<=e&&e<=s&&a<=t&&t<=i||o.close()}else o instanceof Element&&o.closest('button[data-command="close"]')&&o?.closest("dialog")?.close()};x(()=>{b(document,"click",ci,E),we(li).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function di(t){if(t.animationName!==v._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}x(()=>b(document,"animationend",di,E));var ui=Object.defineProperty,$o=Object.getOwnPropertySymbols,fi=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,So=(t,e,o)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,hi=(t,e)=>{for(var o in e||(e={}))fi.call(e,o)&&So(t,o,e[o]);if($o)for(var o of $o(e))pi.call(e,o)&&So(t,o,e[o]);return t},X=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=X&&/android/i.test(navigator.userAgent),qt=X&&/iPad|iPhone|iPod/.test(navigator.userAgent),To;X&&/^Mac/i.test(((To=navigator.userAgentData)==null?void 0:To.platform)||navigator.platform);var mi=`${bt?"data":"aria"}-labelledby`,bi=":host(:not([hidden])) { display: block }",vi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",xo=typeof HTMLElement>"u"?class{}:HTMLElement;function p(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 Co=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},G=(t,...e)=>Co("add",t,e),vt=(t,...e)=>Co("remove",t,e),_i=(t,e)=>t.attachShadow({mode:"open"}).append(Yt("slot"),Yt("style",e)),_t=new WeakMap,Ft=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),_t.set(t,o)}},ko=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},gi=0,Vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++gi).toString(32)}`),t.id):"",Yt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Io={define:(t,e)=>!X||window.customElements.get(t)||window.customElements.define(t,e)},H,yi=0,Lo=t=>{H||(H=Yt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${yi++%2?" ":""}`)},wi=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},jt=!1,Kt=t=>(t?.type==="mouseup"&&(jt=!1),t?.type==="mousedown"&&(jt=!0,G(document,"mouseup",Kt,{once:!0})),jt),Wt="disabled",z="selected",Ei=class extends xo{static get observedAttributes(){return[Wt,z]}connectedCallback(){qt||(this.tabIndex=-1),this.hasAttribute("role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[z]}set defaultSelected(t){this[z]=t}get disabled(){return p(this,Wt)!==null}set disabled(t){p(this,Wt,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=p(this,"label"))!=null?t:this.text}set label(t){p(this,"label",t)}get selected(){return p(this,z)!==null}set selected(t){p(this,z,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=p(this,"value"))!=null?t:this.text}set value(t){p(this,"value",t)}};Io.define("u-option",Ei);var Ao,Mo=0,$i=qt||bt,Oo="click,focusout,input,keydown,mousedown,mouseup",Po="focus,focusin,blur,focusout",gt={singular:"%d hit",plural:"%d hits"},Do=class extends xo{constructor(){super(),this._texts=hi({},gt),this._value="",_i(this,`${bi}
8
+ ::slotted(data:focus) { ${xn} }`))}static get observedAttributes(){return Object.keys(dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Ln(this),at(this,ve,this,!0),Ct(this,{attributeFilter:["value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(ft,0,this),setTimeout(pt,0,this)}attributeChangedCallback(t,e,o){const n=t.split("data-sr-")[1];dt[n]&&(this._texts[n]=o||dt[n])}disconnectedCallback(){Ct(this,!1),kn(this,ve,this,!0),this._items=this._clear=this._focus=this._control=void 0,this._list=this._options=this._root=void 0}handleEvent(t){const e=t.target;t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Rn(this),t.type==="click"&&Un(this,t),t.type==="focus"&&Hn(this,t),t.type==="input"&&qn(this,t),t.type==="keydown"&&Fn(this,t),t.type==="mousedown"&&Lt(t),t.type==="mutation"&&ft(this,t)}get multiple(){var t;return((t=f(this,"data-multiple"))!=null?t:ct)!==ct}set multiple(t){f(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=f(this,"data-creatable"))!=null?t:ct)!==ct}set creatable(t){f(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("u-datalist,datalist")),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=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(o)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},O=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},At=t=>t instanceof HTMLDataElement,ft=(t,e)=>{var o,n;const{_focus:i,_texts:s,items:a,control:r,list:d,multiple:l}=t;let h=`${O((o=r?.labels)==null?void 0:o[0])}, ${l?a.length?s.found.replace("%d",`${a.length}`):s.empty:""}`;const u=[];for(const{addedNodes:_,removedNodes:I}of e?.detail||[]){for(const m of _)At(m)&&u.unshift(m);for(const m of I)At(m)&&u.push(m)}const T=l?u.length===1:u[0]===i;if(i&&r&&T){const _=f(r,"inputmode"),I=At(i)?r:i;t._speak=`${s[u[0].isConnected?"added":"removed"]} ${O(u[0])}, `,(Nn||i===r)&&kt(t._speak),r!==I&&(f(r,"aria-expanded",null),f(r,"inputmode","none"),h=" ",r.focus()),setTimeout(()=>{var m;f(r,"aria-expanded","true"),f(r,"inputmode",_),(m=I?.focus)==null||m.call(I),t._speak="",Dn?at(t,"blur",()=>ft(t),_e):setTimeout(ft,100,t)},100)}let w=0;const k=t.querySelector("select");for(const _ of a){const I=k?.options[w],m=O(_),A=_.value||m,te=`${t._speak}${m}, ${s.remove}, ${++w} ${s.of} ${a.length}`;f(_,"role","button"),f(_,"value",A),f(_,"tabindex","-1"),f(_,"aria-label",te),I?Object.assign(I,{textContent:m,value:A}):k?.appendChild(new Option(m,A,!0,!0))}k&&f(k,"multiple",l?"":null);for(const _ of[...k?.options||[]].slice(w))_.remove();!l&&w>1&&console.warn("u-combobox: Multiple <data> found in single mode."),d&&f(d,"aria-multiselectable",`${l}`),r&&f(r,"list",Mn(d)),r&&f(r,"aria-label",`${t._speak}${h}`);const J=O(a[0]);J!==t._itemText&&pt(t,!1),t._itemText=J,ge(t),ye(t),(n=Ct(t))==null||n.takeRecords()},ge=t=>{var e;t.clear&&f(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value))},ye=t=>{var e;const{_speak:o,options:n=[],values:i}=t;for(const s of n){const a=(e=f(s,"value"))!=null?e:O(s);f(s,"aria-label",o?`${o}${O(s)}`:null),f(s,"selected",i.includes(a)?"":null)}},pt=(t,e=!0)=>{const{multiple:o,control:n,items:i}=t,s=O(i[0]);if(!(o||!n||s===n.value)){if(e)return be(n,s,"insertText");n.value=s}},Mt=(t,e=!0)=>{var o;const{_texts:n,options:i=[],creatable:s,control:a,items:r,multiple:d}=t,l=((o=a?.value)==null?void 0:o.trim())||"",h=l.toLowerCase()||null;let u=[...i].find(w=>(f(w,"label")||O(w)).trim().toLowerCase()===h);const T={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("beforematch",T))||(u=[...i].find(w=>w.selected)),e)return ye(t),u?q(t,u,!1):s&&l?q(t,{value:l},!1):(!d&&r[0]?q(t,r[0]):pt(t),kt(n.invalid));for(const w of i)w.selected=w===u},q=(t,e,o=!0)=>{const{control:n,items:i,multiple:s}=t,a=lt("data",e.label||e.value,{value:e.value}),r=[...i].find(h=>h.value===e.value),d={bubbles:!0,cancelable:!0,detail:r||a};if(r&&!o)return pt(t);if(t.dispatchEvent(new CustomEvent("beforechange",d))){if(!s)for(const h of[...i])h.remove();r?r.remove():n?.insertAdjacentElement("beforebegin",a),t.dispatchEvent(new CustomEvent("afterchange",d))}},Hn=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),kt()},Rn=t=>Lt()||setTimeout(Bn,0,t),Bn=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||Mt(t),t._focus=void 0)},Un=(t,e)=>{const{clientX:o,clientY:n,target:i}=e,{clear:s,control:a,items:r}=t;if(s?.contains(i))return a&&be(a,"","deleteContentBackward"),a?.focus();for(const d of r){const{top:l,right:h,bottom:u,left:T}=d.getBoundingClientRect();if(d.contains(i))return q(t,d);if(n>=l&&n<=u&&o>=T&&o<=h)return d.focus()}i===t&&a?.focus()},qn=(t,e)=>{var o;const{options:n=[],control:i,multiple:s}=t,a=((o=i?.value)==null?void 0:o.trim())||"";if(e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!a){e.stopImmediatePropagation(),i&&(i.value=t._value);for(const d of n)if(d.value&&d.value===a)return q(t,d,s)}else s||Mt(t,!1);ge(t)},Fn=(t,e)=>{var o;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:n,control:i,items:s}=t,{key:a,repeat:r,target:d}=e,l=i&&i===d,h=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(d);if(l&&a==="Tab"&&n&&!n.hidden&&(e.preventDefault(),n.tabIndex=-1,n.focus(),at(n,"blur",()=>f(n,"tabindex",null),_e)),!(!l&&In(e)||u===-1)){if(a==="ArrowRight"&&!l)u+=1;else if(a==="ArrowLeft"&&!h)u-=1;else if(a==="Enter"&&l){const T=f(i,"form");return f(i,"form","#"),requestAnimationFrame(()=>f(i,"form",T)),Mt(t)}else if((a==="Backspace"||a==="Delete")&&!h){if(e.preventDefault(),!r&&s[u])return q(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(o=s[Math.max(0,u)]||i)==null||o.focus()}};On.define("u-combobox",ut);const Vn="1.3.8",E={capture:!0,passive:!0},K=typeof window<"u"&&typeof document<"u";function Yn(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>t(...n),e)}}function c(t,e,o){return o===void 0?t.getAttribute(e)??null:(o===null?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o),null)}let jn=0;const Kn=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function Ot(t){return t.id||(t.id=`${Kn}${++jn}`),t.id}const Wn=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,e[`${t}EventListener`](...o)},b=(t,...e)=>Wn("add",t,e),W=K?document.createElement("div"):null,ht=new Map,Xn=()=>{for(const[t,e]of ht)e()};W&&(W.style.cssText="position:absolute;padding:1px;top:0;left:0px",b(window,"load,resize,scroll",Xn,E));const F={top:0,right:1,bottom:2,left:3};function P(t,e,o,n){const i=F[o]??Number(o)??F.bottom;if(e===!1||!e.isConnected||!t.isConnected)return ht.delete(t);W?.isConnected||document.body.append(W||""),ht.has(t)||ht.set(t,()=>P(t,e,i,n));const s=e instanceof HTMLElement,{offsetWidth:a,offsetHeight:r}=t,d=s?e.offsetWidth:e.clientWidth,l=s?e.offsetHeight:e.clientHeight,{width:h,height:u,left:T,top:w}=e.getBoundingClientRect(),k=window.visualViewport?.width||window.innerWidth,J=window.visualViewport?.height||window.innerHeight,_=window.pageXOffset||document.documentElement.scrollLeft,I=window.pageYOffset||document.documentElement.scrollTop,m=Math.round(T-(d-h)/2),A=Math.round(w-(l-u)/2),te=Math.min(Math.max(10,m-(a-d)/2),k-a-10),as=Math.min(Math.max(10,A-(r-l)/2),J-r-10),rs=m-a>0,ls=m+d+a<k,cs=A-r>0,ds=A+l+r<J,un=i===F.top||i===F.bottom,us=i===F.right&&(n||ls)||!rs,fn=i===F.bottom&&(n||ds)||!cs,fs=Math.round(un?te:us?m+d:m-a),ps=Math.round(un?fn?A+l:A-r:as);t.style.position="absolute",t.style.left=`${fs+_}px`,t.style.top=`${ps+I}px`,W?.style.setProperty("translate",`0px ${Math.round(fn?_+A+l+r+30:0)}px`)}function we(t){let e=0;const o=()=>setTimeout(n,200),n=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(o))});return i}const Pt=new WeakMap,V=(t,e,o)=>{const n=t.getElementsByClassName(e),i=Pt.get(t)||[];i.length||(Pt.set(t,i),we((s,a)=>{if(t.isConnected&&i?.length)for(const r of i)r();else a?.disconnect(),Pt.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>o(n))},x=t=>{if(!K)return;const e=()=>requestAnimationFrame(t);document.readyState==="complete"?e():b(window,"load",e)},Dt=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),Ee="mattilsynet.matomo.cloud";let Nt=!0;function Gn(t,e={}){if(K){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Ee}/matomo.php`]),document.querySelector('script[src*="matomo.js"]')||document.head.append(Object.assign(document.createElement("script"),{async:!0,src:`https://cdn.matomo.cloud/${Ee}/matomo.js`}))),t==="init"){const{matomoId:o,enabled:n=!0}=e;Nt=n,window._paq.push(["setSiteId",o])}if(Nt==="debug")return console.info(`Analytics: "${t}"`,e);if(!(Nt===!1||window.location.hostname==="localhost"))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:s}=e,a=["trackEvent",o,n,i,s];window._paq.push(a.filter(r=>r!==void 0))}else if(t==="search"){const{query:o,category:n=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",o,n,i])}else t==="matomo"&&window._paq.push(e)}}const zn=(t,e,o=Number.POSITIVE_INFINITY)=>{const n=(o-1)/2,i=Math.max(Math.min(t-Math.floor(n),e-o+1),1),s=Math.min(Math.max(t+Math.ceil(n),o),e),a=Array.from({length:s+1-i},(r,d)=>d+i);return o>4&&i>1&&a.splice(0,2,1,0),o>3&&s<e&&a.splice(-2,2,0,e),a},Qn=({current:t=1,total:e=10,show:o=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:zn(t,e,o).map((n,i)=>({current:n===t&&"page",key:`key-${n}-${i}`,page:n}))}),$e="_alert_1bf95_1 _ds-alert_uxa1f_1",Se="_app_1bf95_1",Te="_sticky_1bf95_1",xe="_avatar_1bf95_1 _ds-avatar_uxa1f_1",Ce="_badge_1bf95_1",ke="_breadcrumbs_1bf95_1 _ds-breadcrumbs_uxa1f_1",Ie="_button_1bf95_1 _ds-button_uxa1f_1",Le="_card_1bf95_1",Ae="_group_1bf95_1",Me="_chip_1bf95_1 _ds-chip_uxa1f_1",Oe="_details_1bf95_1 _ds-details_uxa1f_1",Pe="_dialog_1bf95_1 _ds-dialog_uxa1f_1",De="_divider_1bf95_1",Ne="_errorsummary_1bf95_1 _ds-error-summary_uxa1f_1",He="__errorsummary_1bf95_1",Re="_field_1bf95_1 _ds-field_uxa1f_1",Be="__datalist_1bf95_1",Ue="_affixes_1bf95_1 _ds-field-affixes_uxa1f_1",qe="_fieldset_1bf95_1 _ds-fieldset_uxa1f_1",Fe="_heading_1bf95_1 _ds-heading_uxa1f_1",Ve="_ingress_1bf95_1",Ye="_muted_1bf95_1",je="_info_1bf95_1",Ke="_prose_1bf95_1",We="_helptext_1bf95_1 _ds-focus_uxa1f_1",Xe="_input_1bf95_1 _ds-input_uxa1f_1",Ge="_grid_1bf95_1",ze="_flex_1bf95_1",Qe="_link_1bf95_1",Je="_logo_1bf95_1",Ze="_pagination_1bf95_1 _ds-pagination_uxa1f_1",to="_popover_1bf95_1",eo="_progress_1bf95_1",oo="__indeterminate_1bf95_1",no="_skeleton_1bf95_1 _ds-skeleton_uxa1f_1",io="__skeleton_1bf95_1",so="_spinner_1bf95_1",ao="_steps_1bf95_1",ro="_table_1bf95_1 _ds-table_uxa1f_1",lo="__scrollShadow_1bf95_1",co="_tabs_1bf95_1 _ds-tabs_uxa1f_1",uo="__scrollMask_1bf95_1",fo="_tag_1bf95_1 _ds-tag_uxa1f_1",po="_togglegroup_1bf95_1",ho="__tooltip_1bf95_1",mo="_validation_1bf95_1 _ds-validation-message_uxa1f_1",bo="_body_1bf95_153",vo="__checked_1bf95_1",v={alert:$e,app:Se,sticky:Te,avatar:xe,badge:Ce,breadcrumbs:ke,button:Ie,card:Le,group:Ae,chip:Me,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,_errorsummary:He,field:Re,_datalist:Be,affixes:Ue,fieldset:qe,heading:Fe,ingress:Ve,muted:Ye,info:je,prose:Ke,helptext:We,input:Xe,grid:Ge,flex:ze,link:Qe,logo:Je,pagination:Ze,popover:to,progress:eo,_indeterminate:oo,skeleton:no,_skeleton:io,spinner:so,steps:ao,table:ro,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:ho,validation:mo,body:bo,_checked:vo},Jn=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Be,_errorsummary:He,_indeterminate:oo,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:ho,affixes:Ue,alert:$e,app:Se,avatar:xe,badge:Ce,body:bo,breadcrumbs:ke,button:Ie,card:Le,chip:Me,default:v,details:Oe,dialog:Pe,divider:De,errorsummary:Ne,field:Re,fieldset:qe,flex:ze,grid:Ge,group:Ae,heading:Fe,helptext:We,info:je,ingress:Ve,input:Xe,link:Qe,logo:Je,muted:Ye,pagination:Ze,popover:to,progress:eo,prose:Ke,skeleton:no,spinner:so,steps:ao,sticky:Te,table:ro,tabs:co,tag:fo,togglegroup:po,validation:mo},Symbol.toStringTag,{value:"Module"}));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 _o=v.app.split(" ")[0],Zn=v.sticky.split(" ")[0],ti='[data-command="toggle-app-expanded"]',go=`.${_o} > dialog,.${_o} dialog ~ main`,yo=t=>{document.startViewTransition?document.startViewTransition(t):t()},wo=t=>yo(()=>window.mtdsToggleAppExpanded?.(t));function ei({target:t,defaultPrevented:e}){if(!(e||!(t instanceof HTMLButtonElement)||!t.matches(ti))){if(getComputedStyle(t).position==="sticky")return wo();yo(()=>{const o=document.querySelector(go);o?.setAttribute("data-closedby","any"),o?.showModal()})}}function oi(){document.querySelector(go)?.close()}let Ht=0,Y,M=0,g,Rt=0,mt=0,Bt=!1,Ut=0,N=0;function ni([t]){g=t,Eo()}function Eo(){if(!g?.isConnected)return;const t=window.scrollY,e=t<N;N=t,e!==Y&&(Ht=(g.parentElement?.getBoundingClientRect().top||0)+N,Y=e,Rt=g.offsetHeight,mt=g.getBoundingClientRect().top+N,Bt=g.offsetHeight<=window.innerHeight,Ut=window.innerHeight),!(M===-1&&Bt)&&(M!==-1&&(Bt||Y&&N<=mt)?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top","0px"),M=-1):M===-1&&!Y?(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${Math.max(0,N-Ht)}px`),M=0):M!==1&&!Y&&N+Ut>=mt+Rt?(g.style.setProperty("--pos","sticky"),g.style.setProperty("--top",`${Ut-Rt}px`),M=1):M===1&&Y&&(g.style.setProperty("--pos","relative"),g.style.setProperty("--top",`${mt-Ht}px`),M=0))}x(()=>{V(document.documentElement,Zn,ni),b(document,"click",ei,E),b(window,"resize",Yn(oi,100),E),b(window,"scroll",Eo,E)});const ii=v.breadcrumbs.split(" ")[0];function si(t){for(const e of t)e.querySelectorAll("li a").forEach((o,n,{length:i})=>{c(o,"aria-current",n===i-1?"page":null)})}x(()=>V(document.documentElement,ii,si));const ai=v.dialog.split(" ")[0],ri=K?document.getElementsByClassName(ai):[],li=()=>{for(const t of ri)t.isConnected&&t.showModal&&t.close&&(t.matches('[open]:not([data-modal="false"]):not(:modal)')?(c(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(c(t,"open",""),t.close()))},ci=({clientX:t,clientY:e,target:o})=>{if(o instanceof HTMLDialogElement&&c(o,"data-closedby")==="any"){const{top:n,right:i,bottom:s,left:a}=o.getBoundingClientRect();n<=e&&e<=s&&a<=t&&t<=i||o.close()}else o instanceof Element&&o.closest('button[data-command="close"]')&&o?.closest("dialog")?.close()};x(()=>{b(document,"click",ci,E),we(li).observe(document.documentElement,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})});function di(t){if(t.animationName!==v._errorsummary)return;const e=t.target?.firstElementChild;e instanceof HTMLHeadingElement&&(c(e,"tabindex","-1"),e.focus())}x(()=>b(document,"animationend",di,E));var ui=Object.defineProperty,$o=Object.getOwnPropertySymbols,fi=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,So=(t,e,o)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,hi=(t,e)=>{for(var o in e||(e={}))fi.call(e,o)&&So(t,o,e[o]);if($o)for(var o of $o(e))pi.call(e,o)&&So(t,o,e[o]);return t},X=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",bt=X&&/android/i.test(navigator.userAgent),qt=X&&/iPad|iPhone|iPod/.test(navigator.userAgent),To;X&&/^Mac/i.test(((To=navigator.userAgentData)==null?void 0:To.platform)||navigator.platform);var mi=`${bt?"data":"aria"}-labelledby`,bi=":host(:not([hidden])) { display: block }",vi="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",xo=typeof HTMLElement>"u"?class{}:HTMLElement;function p(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 Co=(t,e,o)=>{for(const n of o[0].split(","))o[0]=n,Element.prototype[`${t}EventListener`].apply(e,o)},G=(t,...e)=>Co("add",t,e),vt=(t,...e)=>Co("remove",t,e),_i=(t,e)=>t.attachShadow({mode:"open"}).append(Yt("slot"),Yt("style",e)),_t=new WeakMap,Ft=(t,e)=>{if(e===void 0)return _t.get(t);try{_t.get(t).disconnect(),_t.delete(t)}catch{}if(e){const o=new MutationObserver(n=>t.handleEvent({type:"mutation",detail:n}));o.observe(t,e),_t.set(t,o)}},ko=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},gi=0,Vt=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++gi).toString(32)}`),t.id):"",Yt=(t,e,o)=>{const n=document.createElement(t);return e&&(n.textContent=e),n},Io={define:(t,e)=>!X||window.customElements.get(t)||window.customElements.define(t,e)},H,yi=0,Lo=t=>{H||(H=Yt("div"),H.style.cssText="position:fixed;overflow:hidden;width:1px;white-space:nowrap",p(H,"aria-live","assertive")),H.isConnected||document.body.append(H),t&&(H.textContent=`${t}${yi++%2?" ":""}`)},wi=(t,e,o="")=>{var n,i;const s={bubbles:!0,composed:!0,data:e,inputType:o},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",s)),(i=(n=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:n.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",s)),t.dispatchEvent(new Event("change",{bubbles:!0}))},jt=!1,Kt=t=>(t?.type==="mouseup"&&(jt=!1),t?.type==="mousedown"&&(jt=!0,G(document,"mouseup",Kt,{once:!0})),jt),Wt="disabled",z="selected",Ei=class extends xo{static get observedAttributes(){return[Wt,z]}connectedCallback(){qt||(this.tabIndex=-1),this.hasAttribute("role")||p(this,"role","option"),this.attributeChangedCallback()}attributeChangedCallback(){p(this,"aria-disabled",`${this.disabled}`),p(this,"aria-selected",`${this.selected}`)}get defaultSelected(){return this[z]}set defaultSelected(t){this[z]=t}get disabled(){return p(this,Wt)!==null}set disabled(t){p(this,Wt,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=p(this,"label"))!=null?t:this.text}set label(t){p(this,"label",t)}get selected(){return p(this,z)!==null}set selected(t){p(this,z,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=p(this,"value"))!=null?t:this.text}set value(t){p(this,"value",t)}};Io.define("u-option",Ei);var Ao,Mo=0,$i=qt||bt,Oo="click,focusout,input,keydown,mousedown,mouseup",Po="focus,focusin,blur,focusout",gt={singular:"%d hit",plural:"%d hits"},Do=class extends xo{constructor(){super(),this._texts=hi({},gt),this._value="",_i(this,`${bi}
9
9
  ::slotted(u-option) { display: block; cursor: pointer }
10
10
  ::slotted(u-option:focus) { ${vi} }
11
11
  ::slotted(u-option[aria-hidden="true"]),
@@ -1,4 +1,4 @@
1
- const o = "1.3.7";
1
+ const o = "1.3.8";
2
2
  export {
3
3
  o as version
4
4
  };