@mattilsynet/design 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mtds/index.iife.js
CHANGED
|
@@ -5,7 +5,7 @@ var mtds=function(I){"use strict";var Ri=Object.defineProperty,en=Object.getOwnP
|
|
|
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; cursor: pointer }
|
|
8
|
-
::slotted(data:focus) { ${Fi} }`))}static get observedAttributes(){return Object.keys(Dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Wi(this),It(this,ln,this,!0),ce(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Pt,0,this),setTimeout(Nt,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];Dt[o]&&(this._texts[o]=n||Dt[o])}disconnectedCallback(){ce(this,!1),Vi(this,ln,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;he(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ji(this),t.type==="click"&&ts(this,t),t.type==="focus"&&Qi(this,t),t.type==="input"&&es(this,t),t.type==="keydown"&&ns(this,t),t.type==="mousedown"&&fe(t),t.type==="mutation"&&Pt(this,t))}get multiple(){var t;return((t=y(this,"data-multiple"))!=null?t:Rt)!==Rt}set multiple(t){y(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=y(this,"data-creatable"))!=null?t:Rt)!==Rt}set creatable(t){y(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 n=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(n)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},Y=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},me=t=>t instanceof HTMLDataElement,he=({control:t})=>t?.disabled||t?.readOnly||!1,Pt=(t,e)=>{var n,o;const{_focus:i,_texts:s,items:r,control:a,list:c,multiple:l}=t;let d=`${Y((n=a?.labels)==null?void 0:n[0])}${l?`, ${r.length?s.found.replace("%d",`${r.length}`):s.empty}`:""}`;const u=[];for(const{addedNodes:h,removedNodes:b}of e?.detail||[]){for(const v of h)me(v)&&u.unshift(v);for(const v of b)me(v)&&u.push(v)}const m=l?u.length===1:u[0]===i;if(i&&a&&m){const h=y(a,"aria-expanded"),b=y(a,"inputmode"),v=me(i)?a:i,S=!u[0].isConnected;t._speak=`${s[S?"removed":"added"]} ${Y(u[0])}, `,(Gi||i===a)&&ue(t._speak),a!==v&&(y(a,"aria-expanded",null),y(a,"inputmode","none"),d=" ",a.focus()),setTimeout(()=>{var E;y(a,"aria-expanded",h),y(a,"inputmode",S?"none":b),(E=v?.focus)==null||E.call(v),y(a,"inputmode",b),t._speak="",Xi?It(t,"blur",()=>Pt(t),cn):setTimeout(Pt,100,t)},100)}let f=0;const g=t.querySelector("select"),_=he(t)?"":`${s.remove}, `;for(const h of r){const b=g?.options[f],v=Y(h),S=h.value||v,E=`${t._speak}${v}, ${_}${++f} ${s.of} ${r.length}`;y(h,"role","button"),y(h,"value",S),y(h,"tabindex","-1"),y(h,"aria-label",E),b?Object.assign(b,{textContent:v,value:S}):g?.appendChild(new Option(v,S,!0,!0))}g&&y(g,"multiple",l?"":null);for(const h of[...g?.options||[]].slice(f))h.remove();!l&&f>1&&console.warn("u-combobox: Multiple <data> found in single mode."),c&&y(c,"aria-multiselectable",`${l}`),a&&y(a,"list",Ki(c)),a&&y(a,"aria-label",`${t._speak}${d}`);const w=Y(r[0]);w!==t._item&&Nt(t),t._item=w,un(t),dn(t),(o=ce(t))==null||o.takeRecords()},un=t=>{var e;t.clear&&y(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||he(t))},dn=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const s of o){const r=(e=y(s,"value"))!=null?e:Y(s);y(s,"aria-label",n?`${n}${Y(s)}`:null),y(s,"selected",i.includes(r)?"":null)}},Nt=t=>{const{multiple:e,control:n,items:o}=t,i=Y(o[0]);!e&&n&&i!==n.value&&an(n,i,i?"insertText":"deleteContent")},ge=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:s,control:r,items:a,multiple:c}=t,l=((n=r?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(y(f,"label")||Y(f)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(f=>f.selected)),e)return dn(t),u?ut(t,u,!1):s&&l?ut(t,{value:l},!1):(!c&&!l&&a[0]?ut(t,a[0]):Nt(t),ue(o.invalid));for(const f of i)f.selected=f===u},ut=(t,e,n=!0)=>{const{control:o,items:i,multiple:s}=t,r=Mt("data",e.label||e.value,{value:e.value}),a=[...i].find(d=>d.value===e.value),c={bubbles:!0,cancelable:!0,detail:a||r};if(a&&!n)return Nt(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",c))){if(!s)for(const d of[...i])d.remove();a?a.remove():o?.insertAdjacentElement("beforebegin",r),t.dispatchEvent(new CustomEvent("comboboxafterselect",c))}},Qi=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),ue()},Ji=t=>fe()||setTimeout(Zi,0,t),Zi=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||ge(t),t._focus=void 0)},ts=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:s,control:r,items:a}=t;if(s?.contains(i))return r&&an(r,"","deleteContentBackward"),r?.focus();for(const c of a){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return ut(t,c);if(o>=l&&o<=u&&n>=m&&n<=d)return c.focus()}i===t&&r?.focus()},es=(t,e)=>{var n;const{options:o=[],control:i,multiple:s}=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 ut(t,c,s)}else s||ge(t,!1);un(t)},ns=(t,e)=>{var n;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:o,control:i,items:s}=t,{key:r,repeat:a,target:c}=e,l=i&&i===c,d=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(c);if(l&&r==="Tab"&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=-1,o.focus(),It(o,"blur",()=>y(o,"tabindex",null),cn)),!(!l&&qi(e)||u===-1)){if(r==="ArrowRight"&&!l)u+=1;else if(r==="ArrowLeft"&&!d)u-=1;else if(r==="Enter"&&l){const m=y(i,"form");return y(i,"form","#"),requestAnimationFrame(()=>y(i,"form",m)),ge(t)}else if((r==="Backspace"||r==="Delete")&&!d){if(e.preventDefault(),!a&&s[u])return ut(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(n=s[Math.max(0,u)]||i)==null||n.focus()}};Yi.define("u-combobox",pe);var ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",os=ve&&/android/i.test(navigator.userAgent),fn;ve&&/^Mac/i.test(((fn=navigator.userAgentData)==null?void 0:fn.platform)||navigator.platform);var is=`${os?"data":"aria"}-labelledby`,be=":host(:not([hidden])) { display: block }",Ht=typeof HTMLElement>"u"?class{}:HTMLElement;function O(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var pn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},ss=(t,...e)=>pn("add",t,e),rs=(t,...e)=>pn("remove",t,e),Bt=(t,e)=>t.attachShadow({mode:"open"}).append(vn("slot"),vn("style",e)),Ft=new WeakMap,mn=(t,e)=>{if(e===void 0)return Ft.get(t);try{Ft.get(t).disconnect(),Ft.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ft.set(t,n)}},as=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},hn=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},ls=0,gn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ls).toString(32)}`),t.id):"",vn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Ut={define:(t,e)=>!ve||window.customElements.get(t)||window.customElements.define(t,e)},Vt="aria-controls",dt="aria-selected",bn=class extends Ht{constructor(){super(),Bt(this,be)}get tabList(){return qt("u-tablist",this)[0]||null}get selectedIndex(){return Wt(this.tabs)}set selectedIndex(t){ye(this.tabs[t])}get tabs(){return qt("u-tab",this)}get panels(){return qt("u-tabpanel",this)}},_n=class extends Ht{constructor(){super(),Bt(this,be)}connectedCallback(){O(this,"role","tablist"),ss(this,"click,keydown",this),mn(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){rs(this,"click,keydown",this),mn(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(dt,"true")}const{key:e}=t,n=[...this.tabs],o=n.findIndex(s=>s.contains(t.target));let i=o;if(!(t.defaultPrevented||o===-1)&&(t.type==="click"&&ye(n[o]),t.type==="keydown"&&!as(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(o+1)%n.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(o||n.length)-1;else if(e==="End")i=n.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=Wt(n);else return;setTimeout(()=>{n[o].tabIndex=-1,n[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),n[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return Wt(this.tabs)}set selectedIndex(t){ye(this.tabs[t])}},_e=!1,wn=class extends Ht{static get observedAttributes(){return["id",dt,Vt]}constructor(){super(),Bt(this,":host(:not([hidden])) { cursor: pointer; display: inline-block }")}connectedCallback(){O(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!_e&&this.selected&&this.tabList){_e=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=qt("u-tabpanel",this.tabsElement||this),n=we(this,e[t.indexOf(this)]);n&&O(n,is,gn(this)),t.forEach((o,i)=>{const s=we(o,e[i]);o.tabIndex=o===this?0:-1,O(o,dt,`${o===this}`),s&&(s.hidden=s!==n),s&&O(o,Vt,s.id)}),_e=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return O(this,dt)==="true"}set selected(t){O(this,dt,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return we(this)}},yn=class extends Ht{static get observedAttributes(){return["hidden"]}constructor(){super(),Bt(this,be)}connectedCallback(){O(this,"role","tabpanel"),this.hidden=Wt(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){this.hidden||cs(this.firstChild)?O(this,"tabindex",null):this.tabIndex=0}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${Vt}="${this.id}"]`;return hn(this).querySelectorAll(t)}},qt=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),we=(t,e)=>{const n=O(t,Vt)||gn(e),o=hn(t).getElementById(n);return o?.nodeName==="U-TABPANEL"?o:null},Wt=t=>[...t].findIndex(e=>O(e,dt)==="true"),ye=t=>t&&O(t,"aria-selected","true"),cs=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');Ut.define("u-tabs",bn),Ut.define("u-tablist",_n),Ut.define("u-tab",wn),Ut.define("u-tabpanel",yn);const us="2.1.5",xn="_alert_1run0_1 _ds-alert_wy3tx_1",En="_app_1run0_1",Sn="_sticky_1run0_1",Tn="_avatar_1run0_1 _ds-avatar_wy3tx_1",$n="_badge_1run0_1",Cn="_breadcrumbs_1run0_1 _ds-breadcrumbs_wy3tx_1",kn="_button_1run0_1 _ds-button_wy3tx_1",An="_card_1run0_1",Ln="_group_1run0_1",In="_chip_1run0_1 _ds-chip_wy3tx_1",On="_details_1run0_1 _ds-details_wy3tx_1",Mn="_dialog_1run0_1 _ds-dialog_wy3tx_1",Rn="__drawer_1run0_1",Dn="_divider_1run0_1",Pn="_errorsummary_1run0_1 _ds-error-summary_wy3tx_1",Nn="__errorsummary_1run0_1",Hn="_field_1run0_1 _ds-field_wy3tx_1",Bn="__datalist_1run0_1",Fn="_affixes_1run0_1 _ds-field-affixes_wy3tx_1",Un="_fieldset_1run0_1 _ds-fieldset_wy3tx_1",Vn="_heading_1run0_1 _ds-heading_wy3tx_1",qn="_ingress_1run0_1",Wn="_muted_1run0_1",jn="_info_1run0_1",Kn="_prose_1run0_1",Yn="_helptext_1run0_1 _ds-focus_wy3tx_1",zn="_input_1run0_1 _ds-input_wy3tx_1",Xn="_grid_1run0_1",Gn="_flex_1run0_1",Qn="_link_1run0_1",Jn="_logo_1run0_1",Zn="_pagination_1run0_1 _ds-pagination_wy3tx_1",to="_popover_1run0_1",eo="_progress_1run0_1",no="__indeterminate_1run0_1",oo="_skeleton_1run0_1 _ds-skeleton_wy3tx_1",io="__skeleton_1run0_1",so="_spinner_1run0_1",ro="_steps_1run0_1",ao="_table_1run0_1 _ds-table_wy3tx_1",lo="__scrollShadow_1run0_1",co="_tabs_1run0_1 _ds-tabs_wy3tx_1",uo="__scrollMask_1run0_1",fo="_tag_1run0_1 _ds-tag_wy3tx_1",po="_togglegroup_1run0_1",mo="__tooltip_1run0_1",ho="_validation_1run0_1 _ds-validation-message_wy3tx_1",go="_body_1run0_153",vo="__checked_1run0_1",T={alert:xn,app:En,sticky:Sn,avatar:Tn,badge:$n,breadcrumbs:Cn,button:kn,card:An,group:Ln,chip:In,details:On,dialog:Mn,_drawer:Rn,divider:Dn,errorsummary:Pn,_errorsummary:Nn,field:Hn,_datalist:Bn,affixes:Fn,fieldset:Un,heading:Vn,ingress:qn,muted:Wn,info:jn,prose:Kn,helptext:Yn,input:zn,grid:Xn,flex:Gn,link:Qn,logo:Jn,pagination:Zn,popover:to,progress:eo,_indeterminate:no,skeleton:oo,_skeleton:io,spinner:so,steps:ro,table:ao,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:mo,validation:ho,body:go,_checked:vo},ds=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Bn,_drawer:Rn,_errorsummary:Nn,_indeterminate:no,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:mo,affixes:Fn,alert:xn,app:En,avatar:Tn,badge:$n,body:go,breadcrumbs:Cn,button:kn,card:An,chip:In,default:T,details:On,dialog:Mn,divider:Dn,errorsummary:Pn,field:Hn,fieldset:Un,flex:Gn,grid:Xn,group:Ln,heading:Vn,helptext:Yn,info:jn,ingress:qn,input:zn,link:Qn,logo:Jn,muted:Wn,pagination:Zn,popover:to,progress:eo,prose:Kn,skeleton:oo,spinner:so,steps:ro,sticky:Sn,table:ao,tabs:co,tag:fo,togglegroup:po,validation:ho},Symbol.toStringTag,{value:"Module"})),ft=Math.min,A=Math.max,jt=Math.round,Kt=Math.floor,U=t=>({x:t,y:t}),fs={left:"right",right:"left",bottom:"top",top:"bottom"},ps={start:"end",end:"start"};function bo(t,e,n){return A(t,ft(e,n))}function Yt(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function zt(t){return t.split("-")[1]}function _o(t){return t==="x"?"y":"x"}function wo(t){return t==="y"?"height":"width"}const ms=new Set(["top","bottom"]);function z(t){return ms.has(tt(t))?"y":"x"}function yo(t){return _o(z(t))}function hs(t,e,n){n===void 0&&(n=!1);const o=zt(t),i=yo(t),s=wo(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Xt(r)),[r,Xt(r)]}function gs(t){const e=Xt(t);return[xe(t),e,xe(e)]}function xe(t){return t.replace(/start|end/g,e=>ps[e])}const xo=["left","right"],Eo=["right","left"],vs=["top","bottom"],bs=["bottom","top"];function _s(t,e,n){switch(t){case"top":case"bottom":return n?e?Eo:xo:e?xo:Eo;case"left":case"right":return e?vs:bs;default:return[]}}function ws(t,e,n,o){const i=zt(t);let s=_s(tt(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(xe)))),s}function Xt(t){return t.replace(/left|right|bottom|top/g,e=>fs[e])}function ys(t){return{top:0,right:0,bottom:0,left:0,...t}}function xs(t){return typeof t!="number"?ys(t):{top:t,right:t,bottom:t,left:t}}function Gt(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 So(t,e,n){let{reference:o,floating:i}=t;const s=z(e),r=yo(e),a=wo(r),c=tt(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[a]/2-i[a]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(zt(e)){case"start":f[r]-=m*(n&&l?-1:1);break;case"end":f[r]+=m*(n&&l?-1:1);break}return f}const Es=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),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}=So(l,o,c),m=o,f={},g=0;for(let _=0;_<a.length;_++){const{name:w,fn:h}=a[_],{x:b,y:v,data:S,reset:E}=await h({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:l,platform:r,elements:{reference:t,floating:e}});d=b??d,u=v??u,f={...f,[w]:{...f[w],...S}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(l=E.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=So(l,m,c)),_=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Ee(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Yt(e,t),g=xs(f),w=a[m?u==="floating"?"reference":"floating":u],h=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},E=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:c}):b);return{top:(h.top-E.top+g.top)/S.y,bottom:(E.bottom-h.bottom+g.bottom)/S.y,left:(h.left-E.left+g.left)/S.x,right:(E.right-h.right+g.right)/S.x}}const Ss=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:_=!0,...w}=Yt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),b=z(a),v=tt(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=m||(v||!_?[Xt(a)]:gs(a)),st=g!=="none";!m&&st&&E.push(...ws(a,_,g,S));const W=[a,...E],rt=await Ee(e,w),at=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&at.push(rt[h]),u){const lt=hs(i,r,S);at.push(rt[lt[0]],rt[lt[1]])}if(K=[...K,{placement:i,overflows:at}],!at.every(lt=>lt<=0)){var Ct,kt;const lt=(((Ct=s.flip)==null?void 0:Ct.index)||0)+1,tn=W[lt];if(tn&&(!(u==="alignment"?b!==z(tn):!1)||K.every(F=>z(F.placement)===b?F.overflows[0]>0:!0)))return{data:{index:lt,overflows:K},reset:{placement:tn}};let Lt=(kt=K.filter(ct=>ct.overflows[0]<=0).sort((ct,F)=>ct.overflows[1]-F.overflows[1])[0])==null?void 0:kt.placement;if(!Lt)switch(f){case"bestFit":{var At;const ct=(At=K.filter(F=>{if(st){const J=z(F.placement);return J===b||J==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(J=>J>0).reduce((J,Sa)=>J+Sa,0)]).sort((F,J)=>F[1]-J[1])[0])==null?void 0:At[0];ct&&(Lt=ct);break}case"initialPlacement":Lt=a;break}if(i!==Lt)return{reset:{placement:Lt}}}return{}}}},Ts=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:w=>{let{x:h,y:b}=w;return{x:h,y:b}}},...c}=Yt(t,e),l={x:n,y:o},d=await Ee(e,c),u=z(tt(i)),m=_o(u);let f=l[m],g=l[u];if(s){const w=m==="y"?"top":"left",h=m==="y"?"bottom":"right",b=f+d[w],v=f-d[h];f=bo(b,f,v)}if(r){const w=u==="y"?"top":"left",h=u==="y"?"bottom":"right",b=g+d[w],v=g-d[h];g=bo(b,g,v)}const _=a.fn({...e,[m]:f,[u]:g});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[m]:s,[u]:r}}}}}},$s=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:s,platform:r,elements:a}=e,{apply:c=()=>{},...l}=Yt(t,e),d=await Ee(e,l),u=tt(i),m=zt(i),f=z(i)==="y",{width:g,height:_}=s.floating;let w,h;u==="top"||u==="bottom"?(w=u,h=m===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(h=u,w=m==="end"?"top":"bottom");const b=_-d.top-d.bottom,v=g-d.left-d.right,S=ft(_-d[w],b),E=ft(g-d[h],v),st=!e.middlewareData.shift;let W=S,rt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(rt=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(W=b),st&&!m){const K=A(d.left,0),Ct=A(d.right,0),kt=A(d.top,0),At=A(d.bottom,0);f?rt=g-2*(K!==0||Ct!==0?K+Ct:A(d.left,d.right)):W=_-2*(kt!==0||At!==0?kt+At:A(d.top,d.bottom))}await c({...e,availableWidth:rt,availableHeight:W});const at=await r.getDimensions(a.floating);return g!==at.width||_!==at.height?{reset:{rects:!0}}:{}}}};function Qt(){return typeof window<"u"}function pt(t){return To(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(To(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function To(t){return Qt()?t instanceof Node||t instanceof L(t).Node:!1}function D(t){return Qt()?t instanceof Element||t instanceof L(t).Element:!1}function q(t){return Qt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function $o(t){return!Qt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}const Cs=new Set(["inline","contents"]);function _t(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=P(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Cs.has(i)}const ks=new Set(["table","td","th"]);function As(t){return ks.has(pt(t))}const Ls=[":popover-open",":modal"];function Jt(t){return Ls.some(e=>{try{return t.matches(e)}catch{return!1}})}const Is=["transform","translate","scale","rotate","perspective"],Os=["transform","translate","scale","rotate","perspective","filter"],Ms=["paint","layout","strict","content"];function Se(t){const e=Te(),n=D(t)?P(t):t;return Is.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Os.some(o=>(n.willChange||"").includes(o))||Ms.some(o=>(n.contain||"").includes(o))}function Rs(t){let e=X(t);for(;q(e)&&!mt(e);){if(Se(e))return e;if(Jt(e))return null;e=X(e)}return null}function Te(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ds=new Set(["html","body","#document"]);function mt(t){return Ds.has(pt(t))}function P(t){return L(t).getComputedStyle(t)}function Zt(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if(pt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||$o(t)&&t.host||V(t);return $o(e)?e.host:e}function Co(t){const e=X(t);return mt(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&_t(e)?e:Co(e)}function wt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Co(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=L(i);if(s){const a=$e(r);return e.concat(r,r.visualViewport||[],_t(i)?i:[],a&&n?wt(a):[])}return e.concat(i,wt(i,[],n))}function $e(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ko(t){const e=P(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=q(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,a=jt(n)!==s||jt(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function Ce(t){return D(t)?t:t.contextElement}function ht(t){const e=Ce(t);if(!q(e))return U(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ko(e);let r=(s?jt(n.width):n.width)/o,a=(s?jt(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ps=U(0);function Ao(t){const e=L(t);return!Te()||!e.visualViewport?Ps:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ns(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function et(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ce(t);let r=U(1);e&&(o?D(o)&&(r=ht(o)):r=ht(t));const a=Ns(s,n,o)?Ao(s):U(0);let c=(i.left+a.x)/r.x,l=(i.top+a.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s){const m=L(s),f=o&&D(o)?L(o):o;let g=m,_=$e(g);for(;_&&o&&f!==g;){const w=ht(_),h=_.getBoundingClientRect(),b=P(_),v=h.left+(_.clientLeft+parseFloat(b.paddingLeft))*w.x,S=h.top+(_.clientTop+parseFloat(b.paddingTop))*w.y;c*=w.x,l*=w.y,d*=w.x,u*=w.y,c+=v,l+=S,g=L(_),_=$e(g)}}return Gt({width:d,height:u,x:c,y:l})}function ke(t,e){const n=Zt(t).scrollLeft;return e?e.left+n:et(V(t)).left+n}function Lo(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:ke(t,o)),s=o.top+e.scrollTop;return{x:i,y:s}}function Hs(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=V(o),a=e?Jt(e.floating):!1;if(o===r||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=U(1);const d=U(0),u=q(o);if((u||!u&&!s)&&((pt(o)!=="body"||_t(r))&&(c=Zt(o)),q(o))){const f=et(o);l=ht(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!u&&!s?Lo(r,c,!0):U(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 Bs(t){return Array.from(t.getClientRects())}function Fs(t){const e=V(t),n=Zt(t),o=t.ownerDocument.body,i=A(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=A(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ke(t);const a=-n.scrollTop;return P(o).direction==="rtl"&&(r+=A(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}function Us(t,e){const n=L(t),o=V(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,c=0;if(i){s=i.width,r=i.height;const l=Te();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:r,x:a,y:c}}const Vs=new Set(["absolute","fixed"]);function qs(t,e){const n=et(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=q(t)?ht(t):U(1),r=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=o*s.y;return{width:r,height:a,x:c,y:l}}function Io(t,e,n){let o;if(e==="viewport")o=Us(t,n);else if(e==="document")o=Fs(V(t));else if(D(e))o=qs(e,n);else{const i=Ao(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Gt(o)}function Oo(t,e){const n=X(t);return n===e||!D(n)||mt(n)?!1:P(n).position==="fixed"||Oo(n,e)}function Ws(t,e){const n=e.get(t);if(n)return n;let o=wt(t,[],!1).filter(a=>D(a)&&pt(a)!=="body"),i=null;const s=P(t).position==="fixed";let r=s?X(t):t;for(;D(r)&&!mt(r);){const a=P(r),c=Se(r);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&Vs.has(i.position)||_t(r)&&!c&&Oo(t,r))?o=o.filter(d=>d!==r):i=a,r=X(r)}return e.set(t,o),o}function js(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Jt(e)?[]:Ws(e,this._c):[].concat(n),o],a=r[0],c=r.reduce((l,d)=>{const u=Io(e,d,i);return l.top=A(u.top,l.top),l.right=ft(u.right,l.right),l.bottom=ft(u.bottom,l.bottom),l.left=A(u.left,l.left),l},Io(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ks(t){const{width:e,height:n}=ko(t);return{width:e,height:n}}function Ys(t,e,n){const o=q(e),i=V(e),s=n==="fixed",r=et(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=U(0);function l(){c.x=ke(i)}if(o||!o&&!s)if((pt(e)!=="body"||_t(i))&&(a=Zt(e)),o){const f=et(e,!0,s,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();s&&!o&&i&&l();const d=i&&!o&&!s?Lo(i,a):U(0),u=r.left+a.scrollLeft-c.x-d.x,m=r.top+a.scrollTop-c.y-d.y;return{x:u,y:m,width:r.width,height:r.height}}function Ae(t){return P(t).position==="static"}function Mo(t,e){if(!q(t)||P(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function Ro(t,e){const n=L(t);if(Jt(t))return n;if(!q(t)){let i=X(t);for(;i&&!mt(i);){if(D(i)&&!Ae(i))return i;i=X(i)}return n}let o=Mo(t,e);for(;o&&As(o)&&Ae(o);)o=Mo(o,e);return o&&mt(o)&&Ae(o)&&!Se(o)?n:o||Rs(t)||n}const zs=async function(t){const e=this.getOffsetParent||Ro,n=this.getDimensions,o=await n(t.floating);return{reference:Ys(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xs(t){return P(t).direction==="rtl"}const Gs={convertOffsetParentRelativeRectToViewportRelativeRect:Hs,getDocumentElement:V,getClippingRect:js,getOffsetParent:Ro,getElementRects:zs,getClientRects:Bs,getDimensions:Ks,getScale:ht,isElement:D,isRTL:Xs};function Do(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Qs(t,e){let n=null,o;const i=V(t);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=l;if(a||e(),!m||!f)return;const g=Kt(u),_=Kt(i.clientWidth-(d+m)),w=Kt(i.clientHeight-(u+f)),h=Kt(d),v={rootMargin:-g+"px "+-_+"px "+-w+"px "+-h+"px",threshold:A(0,ft(1,c))||1};let S=!0;function E(st){const W=st[0].intersectionRatio;if(W!==c){if(!S)return r();W?r(!1,W):o=setTimeout(()=>{r(!1,1e-7)},1e3)}W===1&&!Do(l,t.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(E,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,v)}n.observe(t)}return r(!0),s}function Js(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Ce(t),d=i||s?[...l?wt(l):[],...wt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const u=l&&a?Qs(l,n):null;let m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[b]=h;b&&b.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let g,_=c?et(t):null;c&&w();function w(){const h=et(t);_&&!Do(_,h)&&n(),_=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(g)}}const Le=Ts,Ie=Ss,Po=$s,Zs=(t,e,n)=>{const o=new Map,i={platform:Gs,...n},s={...i.platform,_c:o};return Es(t,e,{...i,platform:s})},M={capture:!0,passive:!0},te=typeof window<"u"&&typeof document<"u";function tr(t,e){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function p(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let er=0;const nr=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ee(t){return t.id||(t.id=`${nr}${++er}`),t.id}const No=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},$=(t,...e)=>{yt&&(t===window||t===document)&&yt.push(()=>or(t,...e)),No("add",t,e)},or=(t,...e)=>No("remove",t,e);let yt=null;const R=t=>{if(!te)return;window._mtdsUnbindEvents||(window._mtdsUnbindEvents=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsUnbindEvents?.get(n)?.forEach(o=>{o()}),yt=[],t(),window._mtdsUnbindEvents?.set(n,yt?.slice(0)),yt=null});document.readyState==="complete"?e():$(window,"load",e)},Oe=new WeakMap;function nt(t,e,n){Oe.get(t)?.(),Oe.delete(t),e&&Oe.set(t,Js(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return nt(t,!1);Zs(e,t,n).then(({x:o,y:i})=>{t.style.left=`${o}px`,t.style.top=`${i}px`})}))}function Ho(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const Me=new WeakMap,gt=(t,e,n)=>{const o=t.getElementsByClassName(e),i=Me.get(t)||[];i.length||(Me.set(t,i),Ho((s,r)=>{if(t.isConnected&&i?.length)for(const a of i)a();else r?.disconnect(),Me.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>n(o))},Re=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),ir=`.${T.breadcrumbs.split(" ")[0]}`,sr=`.${T.chip.split(" ")[0]}`,rr=`.${T.helptext.split(" ")[0]}`,ar=`.${T.pagination.split(" ")[0]}`,lr='summary,u-summary,a,button,[role="tab"],[role="button"]',cr="click,toggle,submit,change",De="mattilsynet.matomo.cloud",N="mtds-analytics-banner",ur="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function Bo(t,e={}){if(te){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${De}/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:s}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&dr();const r=s?`https://cdn.matomo.cloud/${De}/container_${s}.js`:`https://cdn.matomo.cloud/${De}/matomo.js`;document.querySelector(`script[src="${r}"]`)||document.head.append(Object.assign(document.createElement("script"),{async:!0,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:s}=e,r=["trackEvent",n,o,i,s];let a=location.href;window._paq.push([function(){a=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",a.split("#")[0]]),window._paq.push(r.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",a])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else t==="matomo"&&window._paq.push(e)}}}function dr(){if(document.getElementById(N)||window.localStorage.getItem(N))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${N}" data-analytics="ignore"><style>
|
|
8
|
+
::slotted(data:focus) { ${Fi} }`))}static get observedAttributes(){return Object.keys(Dt).map(t=>`data-sr-${t}`)}connectedCallback(){this._root=Wi(this),It(this,ln,this,!0),ce(this,{attributeFilter:["value","id"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(Pt,0,this),setTimeout(Nt,0,this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];Dt[o]&&(this._texts[o]=n||Dt[o])}disconnectedCallback(){ce(this,!1),Vi(this,ln,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;he(this)||(t.type==="beforeinput"&&(this._value=e?.value||""),t.type==="blur"&&Ji(this),t.type==="click"&&ts(this,t),t.type==="focus"&&Qi(this,t),t.type==="input"&&es(this,t),t.type==="keydown"&&ns(this,t),t.type==="mousedown"&&fe(t),t.type==="mutation"&&Pt(this,t))}get multiple(){var t;return((t=y(this,"data-multiple"))!=null?t:Rt)!==Rt}set multiple(t){y(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=y(this,"data-creatable"))!=null?t:Rt)!==Rt}set creatable(t){y(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 n=((t=this.list)==null?void 0:t.nodeName)==="U-DATALIST"?"u-option":"option";this._options=(e=this.list)==null?void 0:e.getElementsByTagName(n)}return this._options}get values(){return[...this.items].map(({value:t})=>t)}},Y=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},me=t=>t instanceof HTMLDataElement,he=({control:t})=>t?.disabled||t?.readOnly||!1,Pt=(t,e)=>{var n,o;const{_focus:i,_texts:s,items:r,control:a,list:c,multiple:l}=t;let d=`${Y((n=a?.labels)==null?void 0:n[0])}${l?`, ${r.length?s.found.replace("%d",`${r.length}`):s.empty}`:""}`;const u=[];for(const{addedNodes:h,removedNodes:b}of e?.detail||[]){for(const v of h)me(v)&&u.unshift(v);for(const v of b)me(v)&&u.push(v)}const m=l?u.length===1:u[0]===i;if(i&&a&&m){const h=y(a,"aria-expanded"),b=y(a,"inputmode"),v=me(i)?a:i,S=!u[0].isConnected;t._speak=`${s[S?"removed":"added"]} ${Y(u[0])}, `,(Gi||i===a)&&ue(t._speak),a!==v&&(y(a,"aria-expanded",null),y(a,"inputmode","none"),d=" ",a.focus()),setTimeout(()=>{var E;y(a,"aria-expanded",h),y(a,"inputmode",S?"none":b),(E=v?.focus)==null||E.call(v),y(a,"inputmode",b),t._speak="",Xi?It(t,"blur",()=>Pt(t),cn):setTimeout(Pt,100,t)},100)}let f=0;const g=t.querySelector("select"),_=he(t)?"":`${s.remove}, `;for(const h of r){const b=g?.options[f],v=Y(h),S=h.value||v,E=`${t._speak}${v}, ${_}${++f} ${s.of} ${r.length}`;y(h,"role","button"),y(h,"value",S),y(h,"tabindex","-1"),y(h,"aria-label",E),b?Object.assign(b,{textContent:v,value:S}):g?.appendChild(new Option(v,S,!0,!0))}g&&y(g,"multiple",l?"":null);for(const h of[...g?.options||[]].slice(f))h.remove();!l&&f>1&&console.warn("u-combobox: Multiple <data> found in single mode."),c&&y(c,"aria-multiselectable",`${l}`),a&&y(a,"list",Ki(c)),a&&y(a,"aria-label",`${t._speak}${d}`);const w=Y(r[0]);w!==t._item&&Nt(t),t._item=w,un(t),dn(t),(o=ce(t))==null||o.takeRecords()},un=t=>{var e;t.clear&&y(t.clear,"role","button"),t.clear&&(t.clear.hidden=!((e=t.control)!=null&&e.value)||he(t))},dn=t=>{var e;const{_speak:n,options:o=[],values:i}=t;for(const s of o){const r=(e=y(s,"value"))!=null?e:Y(s);y(s,"aria-label",n?`${n}${Y(s)}`:null),y(s,"selected",i.includes(r)?"":null)}},Nt=t=>{const{multiple:e,control:n,items:o}=t,i=Y(o[0]);!e&&n&&i!==n.value&&an(n,i,i?"insertText":"deleteContent")},ge=(t,e=!0)=>{var n;const{_texts:o,options:i=[],creatable:s,control:r,items:a,multiple:c}=t,l=((n=r?.value)==null?void 0:n.trim())||"",d=l.toLowerCase()||null;let u=[...i].find(f=>(y(f,"label")||Y(f)).trim().toLowerCase()===d);const m={bubbles:!0,cancelable:!0,detail:u};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",m))||(u=[...i].find(f=>f.selected)),e)return dn(t),u?ut(t,u,!1):s&&l?ut(t,{value:l},!1):(!c&&!l&&a[0]?ut(t,a[0]):Nt(t),ue(o.invalid));for(const f of i)f.selected=f===u},ut=(t,e,n=!0)=>{const{control:o,items:i,multiple:s}=t,r=Mt("data",e.label||e.value,{value:e.value}),a=[...i].find(d=>d.value===e.value),c={bubbles:!0,cancelable:!0,detail:a||r};if(a&&!n)return Nt(t);if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",c))){if(!s)for(const d of[...i])d.remove();a?a.remove():o?.insertAdjacentElement("beforebegin",r),t.dispatchEvent(new CustomEvent("comboboxafterselect",c))}},Qi=(t,{target:e})=>{e instanceof HTMLElement&&(t._focus=e),ue()},Ji=t=>fe()||setTimeout(Zi,0,t),Zi=t=>{var e;!t._focus||t.contains((e=t._root)==null?void 0:e.activeElement)||(t.multiple||ge(t),t._focus=void 0)},ts=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:s,control:r,items:a}=t;if(s?.contains(i))return r&&an(r,"","deleteContentBackward"),r?.focus();for(const c of a){const{top:l,right:d,bottom:u,left:m}=c.getBoundingClientRect();if(c.contains(i))return ut(t,c);if(o>=l&&o<=u&&n>=m&&n<=d)return c.focus()}i===t&&r?.focus()},es=(t,e)=>{var n;const{options:o=[],control:i,multiple:s}=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 ut(t,c,s)}else s||ge(t,!1);un(t)},ns=(t,e)=>{var n;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const{clear:o,control:i,items:s}=t,{key:r,repeat:a,target:c}=e,l=i&&i===c,d=l&&i?.selectionEnd;let u=l?s.length:[...s].indexOf(c);if(l&&r==="Tab"&&o&&!o.hidden&&(e.preventDefault(),o.tabIndex=-1,o.focus(),It(o,"blur",()=>y(o,"tabindex",null),cn)),!(!l&&qi(e)||u===-1)){if(r==="ArrowRight"&&!l)u+=1;else if(r==="ArrowLeft"&&!d)u-=1;else if(r==="Enter"&&l){const m=y(i,"form");return y(i,"form","#"),requestAnimationFrame(()=>y(i,"form",m)),ge(t)}else if((r==="Backspace"||r==="Delete")&&!d){if(e.preventDefault(),!a&&s[u])return ut(t,s[u]);l&&(u-=1)}else return l||i?.focus();e.preventDefault(),(n=s[Math.max(0,u)]||i)==null||n.focus()}};Yi.define("u-combobox",pe);var ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",os=ve&&/android/i.test(navigator.userAgent),fn;ve&&/^Mac/i.test(((fn=navigator.userAgentData)==null?void 0:fn.platform)||navigator.platform);var is=`${os?"data":"aria"}-labelledby`,be=":host(:not([hidden])) { display: block }",Ht=typeof HTMLElement>"u"?class{}:HTMLElement;function O(t,e,n){var o;return n===void 0?(o=t.getAttribute(e))!=null?o:null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}var pn=(t,e,n)=>{for(const o of n[0].split(","))n[0]=o,Element.prototype[`${t}EventListener`].apply(e,n)},ss=(t,...e)=>pn("add",t,e),rs=(t,...e)=>pn("remove",t,e),Bt=(t,e)=>t.attachShadow({mode:"open"}).append(vn("slot"),vn("style",e)),Ft=new WeakMap,mn=(t,e)=>{if(e===void 0)return Ft.get(t);try{Ft.get(t).disconnect(),Ft.delete(t)}catch{}if(e){const n=new MutationObserver(o=>t.handleEvent({type:"mutation",detail:o}));n.observe(t,e),Ft.set(t,n)}},as=t=>{const e="key"in t&&(t.key===" "||t.key==="Enter");return e&&t.preventDefault(),e&&t.target instanceof HTMLElement&&t.target.click(),e},hn=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},ls=0,gn=t=>t?(t.id||(t.id=`:${t.nodeName.toLowerCase()}${(++ls).toString(32)}`),t.id):"",vn=(t,e,n)=>{const o=document.createElement(t);return e&&(o.textContent=e),o},Ut={define:(t,e)=>!ve||window.customElements.get(t)||window.customElements.define(t,e)},Vt="aria-controls",dt="aria-selected",bn=class extends Ht{constructor(){super(),Bt(this,be)}get tabList(){return qt("u-tablist",this)[0]||null}get selectedIndex(){return Wt(this.tabs)}set selectedIndex(t){ye(this.tabs[t])}get tabs(){return qt("u-tab",this)}get panels(){return qt("u-tabpanel",this)}},_n=class extends Ht{constructor(){super(),Bt(this,be)}connectedCallback(){O(this,"role","tablist"),ss(this,"click,keydown",this),mn(this,{childList:!0}),this.tabs.length&&this.handleEvent()}disconnectedCallback(){rs(this,"click,keydown",this),mn(this,!1)}handleEvent(t){if(!t||t.type==="mutation"){const s=this.tabs[Math.max(this.selectedIndex,0)];return s?.setAttribute(dt,"true")}const{key:e}=t,n=[...this.tabs],o=n.findIndex(s=>s.contains(t.target));let i=o;if(!(t.defaultPrevented||o===-1)&&(t.type==="click"&&ye(n[o]),t.type==="keydown"&&!as(t))){if(e==="ArrowDown"||e==="ArrowRight")i=(o+1)%n.length;else if(e==="ArrowUp"||e==="ArrowLeft")i=(o||n.length)-1;else if(e==="End")i=n.length-1;else if(e==="Home")i=0;else if(e==="Tab")i=Wt(n);else return;setTimeout(()=>{n[o].tabIndex=-1,n[i].tabIndex=0}),e!=="Tab"&&(t.preventDefault(),n[i].focus())}}get tabsElement(){return this.closest("u-tabs")}get tabs(){return this.querySelectorAll("u-tab")}get selectedIndex(){return Wt(this.tabs)}set selectedIndex(t){ye(this.tabs[t])}},_e=!1,wn=class extends Ht{static get observedAttributes(){return["id",dt,Vt]}constructor(){super(),Bt(this,":host(:not([hidden])) { cursor: pointer; display: inline-block }")}connectedCallback(){O(this,"role","tab"),this.tabIndex=this.selected?0:-1}attributeChangedCallback(){if(!_e&&this.selected&&this.tabList){_e=!0;const t=[...this.tabList.querySelectorAll("u-tab")],e=qt("u-tabpanel",this.tabsElement||this),n=we(this,e[t.indexOf(this)]);n&&O(n,is,gn(this)),t.forEach((o,i)=>{const s=we(o,e[i]);o.tabIndex=o===this?0:-1,O(o,dt,`${o===this}`),s&&(s.hidden=s!==n),s&&O(o,Vt,s.id)}),_e=!1}}get tabsElement(){return this.closest("u-tabs")}get tabList(){const t=this.parentElement;return t?.nodeName==="U-TABLIST"?t:null}get selected(){return O(this,dt)==="true"}set selected(t){O(this,dt,`${!!t}`)}get index(){const t=this.tabList;return t?[...t.querySelectorAll("u-tab")].indexOf(this):0}get panel(){return we(this)}},yn=class extends Ht{static get observedAttributes(){return["hidden"]}constructor(){super(),Bt(this,be)}connectedCallback(){O(this,"role","tabpanel"),this.hidden=Wt(this.tabs)===-1,this.attributeChangedCallback()}attributeChangedCallback(){this.hidden||cs(this.firstChild)?O(this,"tabindex",null):this.tabIndex=0}get tabsElement(){return this.closest("u-tabs")}get tabs(){const t=`u-tab[${Vt}="${this.id}"]`;return hn(this).querySelectorAll(t)}},qt=(t,e)=>e.querySelectorAll(`${t}:not(:scope u-tabpanel ${t})`),we=(t,e)=>{const n=O(t,Vt)||gn(e),o=hn(t).getElementById(n);return o?.nodeName==="U-TABPANEL"?o:null},Wt=t=>[...t].findIndex(e=>O(e,dt)==="true"),ye=t=>t&&O(t,"aria-selected","true"),cs=t=>t instanceof Element&&!t.matches(':disabled,[tabindex^="-"]')&&t.matches('[contenteditable],[controls],[href],[tabindex],input:not([type="hidden"]),select,textarea,button,summary,iframe');Ut.define("u-tabs",bn),Ut.define("u-tablist",_n),Ut.define("u-tab",wn),Ut.define("u-tabpanel",yn);const us="2.1.6",xn="_alert_1run0_1 _ds-alert_wy3tx_1",En="_app_1run0_1",Sn="_sticky_1run0_1",Tn="_avatar_1run0_1 _ds-avatar_wy3tx_1",$n="_badge_1run0_1",Cn="_breadcrumbs_1run0_1 _ds-breadcrumbs_wy3tx_1",kn="_button_1run0_1 _ds-button_wy3tx_1",An="_card_1run0_1",Ln="_group_1run0_1",In="_chip_1run0_1 _ds-chip_wy3tx_1",On="_details_1run0_1 _ds-details_wy3tx_1",Mn="_dialog_1run0_1 _ds-dialog_wy3tx_1",Rn="__drawer_1run0_1",Dn="_divider_1run0_1",Pn="_errorsummary_1run0_1 _ds-error-summary_wy3tx_1",Nn="__errorsummary_1run0_1",Hn="_field_1run0_1 _ds-field_wy3tx_1",Bn="__datalist_1run0_1",Fn="_affixes_1run0_1 _ds-field-affixes_wy3tx_1",Un="_fieldset_1run0_1 _ds-fieldset_wy3tx_1",Vn="_heading_1run0_1 _ds-heading_wy3tx_1",qn="_ingress_1run0_1",Wn="_muted_1run0_1",jn="_info_1run0_1",Kn="_prose_1run0_1",Yn="_helptext_1run0_1 _ds-focus_wy3tx_1",zn="_input_1run0_1 _ds-input_wy3tx_1",Xn="_grid_1run0_1",Gn="_flex_1run0_1",Qn="_link_1run0_1",Jn="_logo_1run0_1",Zn="_pagination_1run0_1 _ds-pagination_wy3tx_1",to="_popover_1run0_1",eo="_progress_1run0_1",no="__indeterminate_1run0_1",oo="_skeleton_1run0_1 _ds-skeleton_wy3tx_1",io="__skeleton_1run0_1",so="_spinner_1run0_1",ro="_steps_1run0_1",ao="_table_1run0_1 _ds-table_wy3tx_1",lo="__scrollShadow_1run0_1",co="_tabs_1run0_1 _ds-tabs_wy3tx_1",uo="__scrollMask_1run0_1",fo="_tag_1run0_1 _ds-tag_wy3tx_1",po="_togglegroup_1run0_1",mo="__tooltip_1run0_1",ho="_validation_1run0_1 _ds-validation-message_wy3tx_1",go="_body_1run0_153",vo="__checked_1run0_1",T={alert:xn,app:En,sticky:Sn,avatar:Tn,badge:$n,breadcrumbs:Cn,button:kn,card:An,group:Ln,chip:In,details:On,dialog:Mn,_drawer:Rn,divider:Dn,errorsummary:Pn,_errorsummary:Nn,field:Hn,_datalist:Bn,affixes:Fn,fieldset:Un,heading:Vn,ingress:qn,muted:Wn,info:jn,prose:Kn,helptext:Yn,input:zn,grid:Xn,flex:Gn,link:Qn,logo:Jn,pagination:Zn,popover:to,progress:eo,_indeterminate:no,skeleton:oo,_skeleton:io,spinner:so,steps:ro,table:ao,_scrollShadow:lo,tabs:co,_scrollMask:uo,tag:fo,togglegroup:po,_tooltip:mo,validation:ho,body:go,_checked:vo},ds=Object.freeze(Object.defineProperty({__proto__:null,_checked:vo,_datalist:Bn,_drawer:Rn,_errorsummary:Nn,_indeterminate:no,_scrollMask:uo,_scrollShadow:lo,_skeleton:io,_tooltip:mo,affixes:Fn,alert:xn,app:En,avatar:Tn,badge:$n,body:go,breadcrumbs:Cn,button:kn,card:An,chip:In,default:T,details:On,dialog:Mn,divider:Dn,errorsummary:Pn,field:Hn,fieldset:Un,flex:Gn,grid:Xn,group:Ln,heading:Vn,helptext:Yn,info:jn,ingress:qn,input:zn,link:Qn,logo:Jn,muted:Wn,pagination:Zn,popover:to,progress:eo,prose:Kn,skeleton:oo,spinner:so,steps:ro,sticky:Sn,table:ao,tabs:co,tag:fo,togglegroup:po,validation:ho},Symbol.toStringTag,{value:"Module"})),ft=Math.min,A=Math.max,jt=Math.round,Kt=Math.floor,U=t=>({x:t,y:t}),fs={left:"right",right:"left",bottom:"top",top:"bottom"},ps={start:"end",end:"start"};function bo(t,e,n){return A(t,ft(e,n))}function Yt(t,e){return typeof t=="function"?t(e):t}function tt(t){return t.split("-")[0]}function zt(t){return t.split("-")[1]}function _o(t){return t==="x"?"y":"x"}function wo(t){return t==="y"?"height":"width"}const ms=new Set(["top","bottom"]);function z(t){return ms.has(tt(t))?"y":"x"}function yo(t){return _o(z(t))}function hs(t,e,n){n===void 0&&(n=!1);const o=zt(t),i=yo(t),s=wo(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=Xt(r)),[r,Xt(r)]}function gs(t){const e=Xt(t);return[xe(t),e,xe(e)]}function xe(t){return t.replace(/start|end/g,e=>ps[e])}const xo=["left","right"],Eo=["right","left"],vs=["top","bottom"],bs=["bottom","top"];function _s(t,e,n){switch(t){case"top":case"bottom":return n?e?Eo:xo:e?xo:Eo;case"left":case"right":return e?vs:bs;default:return[]}}function ws(t,e,n,o){const i=zt(t);let s=_s(tt(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(xe)))),s}function Xt(t){return t.replace(/left|right|bottom|top/g,e=>fs[e])}function ys(t){return{top:0,right:0,bottom:0,left:0,...t}}function xs(t){return typeof t!="number"?ys(t):{top:t,right:t,bottom:t,left:t}}function Gt(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 So(t,e,n){let{reference:o,floating:i}=t;const s=z(e),r=yo(e),a=wo(r),c=tt(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[a]/2-i[a]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(zt(e)){case"start":f[r]-=m*(n&&l?-1:1);break;case"end":f[r]+=m*(n&&l?-1:1);break}return f}const Es=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),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}=So(l,o,c),m=o,f={},g=0;for(let _=0;_<a.length;_++){const{name:w,fn:h}=a[_],{x:b,y:v,data:S,reset:E}=await h({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:l,platform:r,elements:{reference:t,floating:e}});d=b??d,u=v??u,f={...f,[w]:{...f[w],...S}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(l=E.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=So(l,m,c)),_=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Ee(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Yt(e,t),g=xs(f),w=a[m?u==="floating"?"reference":"floating":u],h=Gt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},E=Gt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:c}):b);return{top:(h.top-E.top+g.top)/S.y,bottom:(E.bottom-h.bottom+g.bottom)/S.y,left:(h.left-E.left+g.left)/S.x,right:(E.right-h.right+g.right)/S.x}}const Ss=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:_=!0,...w}=Yt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const h=tt(i),b=z(a),v=tt(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=m||(v||!_?[Xt(a)]:gs(a)),st=g!=="none";!m&&st&&E.push(...ws(a,_,g,S));const W=[a,...E],rt=await Ee(e,w),at=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&at.push(rt[h]),u){const lt=hs(i,r,S);at.push(rt[lt[0]],rt[lt[1]])}if(K=[...K,{placement:i,overflows:at}],!at.every(lt=>lt<=0)){var Ct,kt;const lt=(((Ct=s.flip)==null?void 0:Ct.index)||0)+1,tn=W[lt];if(tn&&(!(u==="alignment"?b!==z(tn):!1)||K.every(F=>z(F.placement)===b?F.overflows[0]>0:!0)))return{data:{index:lt,overflows:K},reset:{placement:tn}};let Lt=(kt=K.filter(ct=>ct.overflows[0]<=0).sort((ct,F)=>ct.overflows[1]-F.overflows[1])[0])==null?void 0:kt.placement;if(!Lt)switch(f){case"bestFit":{var At;const ct=(At=K.filter(F=>{if(st){const J=z(F.placement);return J===b||J==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(J=>J>0).reduce((J,Sa)=>J+Sa,0)]).sort((F,J)=>F[1]-J[1])[0])==null?void 0:At[0];ct&&(Lt=ct);break}case"initialPlacement":Lt=a;break}if(i!==Lt)return{reset:{placement:Lt}}}return{}}}},Ts=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:w=>{let{x:h,y:b}=w;return{x:h,y:b}}},...c}=Yt(t,e),l={x:n,y:o},d=await Ee(e,c),u=z(tt(i)),m=_o(u);let f=l[m],g=l[u];if(s){const w=m==="y"?"top":"left",h=m==="y"?"bottom":"right",b=f+d[w],v=f-d[h];f=bo(b,f,v)}if(r){const w=u==="y"?"top":"left",h=u==="y"?"bottom":"right",b=g+d[w],v=g-d[h];g=bo(b,g,v)}const _=a.fn({...e,[m]:f,[u]:g});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[m]:s,[u]:r}}}}}},$s=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:s,platform:r,elements:a}=e,{apply:c=()=>{},...l}=Yt(t,e),d=await Ee(e,l),u=tt(i),m=zt(i),f=z(i)==="y",{width:g,height:_}=s.floating;let w,h;u==="top"||u==="bottom"?(w=u,h=m===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(h=u,w=m==="end"?"top":"bottom");const b=_-d.top-d.bottom,v=g-d.left-d.right,S=ft(_-d[w],b),E=ft(g-d[h],v),st=!e.middlewareData.shift;let W=S,rt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(rt=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(W=b),st&&!m){const K=A(d.left,0),Ct=A(d.right,0),kt=A(d.top,0),At=A(d.bottom,0);f?rt=g-2*(K!==0||Ct!==0?K+Ct:A(d.left,d.right)):W=_-2*(kt!==0||At!==0?kt+At:A(d.top,d.bottom))}await c({...e,availableWidth:rt,availableHeight:W});const at=await r.getDimensions(a.floating);return g!==at.width||_!==at.height?{reset:{rects:!0}}:{}}}};function Qt(){return typeof window<"u"}function pt(t){return To(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(To(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function To(t){return Qt()?t instanceof Node||t instanceof L(t).Node:!1}function D(t){return Qt()?t instanceof Element||t instanceof L(t).Element:!1}function q(t){return Qt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function $o(t){return!Qt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}const Cs=new Set(["inline","contents"]);function _t(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=P(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Cs.has(i)}const ks=new Set(["table","td","th"]);function As(t){return ks.has(pt(t))}const Ls=[":popover-open",":modal"];function Jt(t){return Ls.some(e=>{try{return t.matches(e)}catch{return!1}})}const Is=["transform","translate","scale","rotate","perspective"],Os=["transform","translate","scale","rotate","perspective","filter"],Ms=["paint","layout","strict","content"];function Se(t){const e=Te(),n=D(t)?P(t):t;return Is.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Os.some(o=>(n.willChange||"").includes(o))||Ms.some(o=>(n.contain||"").includes(o))}function Rs(t){let e=X(t);for(;q(e)&&!mt(e);){if(Se(e))return e;if(Jt(e))return null;e=X(e)}return null}function Te(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ds=new Set(["html","body","#document"]);function mt(t){return Ds.has(pt(t))}function P(t){return L(t).getComputedStyle(t)}function Zt(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if(pt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||$o(t)&&t.host||V(t);return $o(e)?e.host:e}function Co(t){const e=X(t);return mt(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&_t(e)?e:Co(e)}function wt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Co(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=L(i);if(s){const a=$e(r);return e.concat(r,r.visualViewport||[],_t(i)?i:[],a&&n?wt(a):[])}return e.concat(i,wt(i,[],n))}function $e(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ko(t){const e=P(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=q(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,a=jt(n)!==s||jt(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function Ce(t){return D(t)?t:t.contextElement}function ht(t){const e=Ce(t);if(!q(e))return U(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ko(e);let r=(s?jt(n.width):n.width)/o,a=(s?jt(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ps=U(0);function Ao(t){const e=L(t);return!Te()||!e.visualViewport?Ps:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ns(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function et(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Ce(t);let r=U(1);e&&(o?D(o)&&(r=ht(o)):r=ht(t));const a=Ns(s,n,o)?Ao(s):U(0);let c=(i.left+a.x)/r.x,l=(i.top+a.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s){const m=L(s),f=o&&D(o)?L(o):o;let g=m,_=$e(g);for(;_&&o&&f!==g;){const w=ht(_),h=_.getBoundingClientRect(),b=P(_),v=h.left+(_.clientLeft+parseFloat(b.paddingLeft))*w.x,S=h.top+(_.clientTop+parseFloat(b.paddingTop))*w.y;c*=w.x,l*=w.y,d*=w.x,u*=w.y,c+=v,l+=S,g=L(_),_=$e(g)}}return Gt({width:d,height:u,x:c,y:l})}function ke(t,e){const n=Zt(t).scrollLeft;return e?e.left+n:et(V(t)).left+n}function Lo(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:ke(t,o)),s=o.top+e.scrollTop;return{x:i,y:s}}function Hs(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=V(o),a=e?Jt(e.floating):!1;if(o===r||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=U(1);const d=U(0),u=q(o);if((u||!u&&!s)&&((pt(o)!=="body"||_t(r))&&(c=Zt(o)),q(o))){const f=et(o);l=ht(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=r&&!u&&!s?Lo(r,c,!0):U(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 Bs(t){return Array.from(t.getClientRects())}function Fs(t){const e=V(t),n=Zt(t),o=t.ownerDocument.body,i=A(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=A(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ke(t);const a=-n.scrollTop;return P(o).direction==="rtl"&&(r+=A(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}function Us(t,e){const n=L(t),o=V(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,c=0;if(i){s=i.width,r=i.height;const l=Te();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:r,x:a,y:c}}const Vs=new Set(["absolute","fixed"]);function qs(t,e){const n=et(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=q(t)?ht(t):U(1),r=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=o*s.y;return{width:r,height:a,x:c,y:l}}function Io(t,e,n){let o;if(e==="viewport")o=Us(t,n);else if(e==="document")o=Fs(V(t));else if(D(e))o=qs(e,n);else{const i=Ao(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Gt(o)}function Oo(t,e){const n=X(t);return n===e||!D(n)||mt(n)?!1:P(n).position==="fixed"||Oo(n,e)}function Ws(t,e){const n=e.get(t);if(n)return n;let o=wt(t,[],!1).filter(a=>D(a)&&pt(a)!=="body"),i=null;const s=P(t).position==="fixed";let r=s?X(t):t;for(;D(r)&&!mt(r);){const a=P(r),c=Se(r);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&Vs.has(i.position)||_t(r)&&!c&&Oo(t,r))?o=o.filter(d=>d!==r):i=a,r=X(r)}return e.set(t,o),o}function js(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?Jt(e)?[]:Ws(e,this._c):[].concat(n),o],a=r[0],c=r.reduce((l,d)=>{const u=Io(e,d,i);return l.top=A(u.top,l.top),l.right=ft(u.right,l.right),l.bottom=ft(u.bottom,l.bottom),l.left=A(u.left,l.left),l},Io(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ks(t){const{width:e,height:n}=ko(t);return{width:e,height:n}}function Ys(t,e,n){const o=q(e),i=V(e),s=n==="fixed",r=et(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=U(0);function l(){c.x=ke(i)}if(o||!o&&!s)if((pt(e)!=="body"||_t(i))&&(a=Zt(e)),o){const f=et(e,!0,s,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&l();s&&!o&&i&&l();const d=i&&!o&&!s?Lo(i,a):U(0),u=r.left+a.scrollLeft-c.x-d.x,m=r.top+a.scrollTop-c.y-d.y;return{x:u,y:m,width:r.width,height:r.height}}function Ae(t){return P(t).position==="static"}function Mo(t,e){if(!q(t)||P(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function Ro(t,e){const n=L(t);if(Jt(t))return n;if(!q(t)){let i=X(t);for(;i&&!mt(i);){if(D(i)&&!Ae(i))return i;i=X(i)}return n}let o=Mo(t,e);for(;o&&As(o)&&Ae(o);)o=Mo(o,e);return o&&mt(o)&&Ae(o)&&!Se(o)?n:o||Rs(t)||n}const zs=async function(t){const e=this.getOffsetParent||Ro,n=this.getDimensions,o=await n(t.floating);return{reference:Ys(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Xs(t){return P(t).direction==="rtl"}const Gs={convertOffsetParentRelativeRectToViewportRelativeRect:Hs,getDocumentElement:V,getClippingRect:js,getOffsetParent:Ro,getElementRects:zs,getClientRects:Bs,getDimensions:Ks,getScale:ht,isElement:D,isRTL:Xs};function Do(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Qs(t,e){let n=null,o;const i=V(t);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=l;if(a||e(),!m||!f)return;const g=Kt(u),_=Kt(i.clientWidth-(d+m)),w=Kt(i.clientHeight-(u+f)),h=Kt(d),v={rootMargin:-g+"px "+-_+"px "+-w+"px "+-h+"px",threshold:A(0,ft(1,c))||1};let S=!0;function E(st){const W=st[0].intersectionRatio;if(W!==c){if(!S)return r();W?r(!1,W):o=setTimeout(()=>{r(!1,1e-7)},1e3)}W===1&&!Do(l,t.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(E,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,v)}n.observe(t)}return r(!0),s}function Js(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Ce(t),d=i||s?[...l?wt(l):[],...wt(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const u=l&&a?Qs(l,n):null;let m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[b]=h;b&&b.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(e)})),n()}),l&&!c&&f.observe(l),f.observe(e));let g,_=c?et(t):null;c&&w();function w(){const h=et(t);_&&!Do(_,h)&&n(),_=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,c&&cancelAnimationFrame(g)}}const Le=Ts,Ie=Ss,Po=$s,Zs=(t,e,n)=>{const o=new Map,i={platform:Gs,...n},s={...i.platform,_c:o};return Es(t,e,{...i,platform:s})},M={capture:!0,passive:!0},te=typeof window<"u"&&typeof document<"u";function tr(t,e){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function p(t,e,n){return n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null)}let er=0;const nr=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ee(t){return t.id||(t.id=`${nr}${++er}`),t.id}const No=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},$=(t,...e)=>{yt&&(t===window||t===document)&&yt.push(()=>or(t,...e)),No("add",t,e)},or=(t,...e)=>No("remove",t,e);let yt=null;const R=t=>{if(!te)return;window._mtdsUnbindEvents||(window._mtdsUnbindEvents=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsUnbindEvents?.get(n)?.forEach(o=>{o()}),yt=[],t(),window._mtdsUnbindEvents?.set(n,yt?.slice(0)),yt=null});document.readyState==="complete"?e():$(window,"load",e)},Oe=new WeakMap;function nt(t,e,n){Oe.get(t)?.(),Oe.delete(t),e&&Oe.set(t,Js(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return nt(t,!1);Zs(e,t,n).then(({x:o,y:i})=>{t.style.left=`${o}px`,t.style.top=`${i}px`})}))}function Ho(t){let e=0;const n=()=>setTimeout(o,200),o=()=>{t([],i),i.takeRecords(),e=0},i=new MutationObserver(()=>{e||(e=requestAnimationFrame(n))});return i}const Me=new WeakMap,gt=(t,e,n)=>{const o=t.getElementsByClassName(e),i=Me.get(t)||[];i.length||(Me.set(t,i),Ho((s,r)=>{if(t.isConnected&&i?.length)for(const a of i)a();else r?.disconnect(),Me.delete(t)}).observe(t,{attributeFilter:["class","hidden"],attributes:!0,childList:!0,subtree:!0})),i.push(()=>n(o))},Re=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),ir=`.${T.breadcrumbs.split(" ")[0]}`,sr=`.${T.chip.split(" ")[0]}`,rr=`.${T.helptext.split(" ")[0]}`,ar=`.${T.pagination.split(" ")[0]}`,lr='summary,u-summary,a,button,[role="tab"],[role="button"]',cr="click,toggle,submit,change",De="mattilsynet.matomo.cloud",N="mtds-analytics-banner",ur="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function Bo(t,e={}){if(te){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${De}/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:s}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&dr();const r=s?`https://cdn.matomo.cloud/${De}/container_${s}.js`:`https://cdn.matomo.cloud/${De}/matomo.js`;document.querySelector(`script[src="${r}"]`)||document.head.append(Object.assign(document.createElement("script"),{async:!0,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:s}=e,r=["trackEvent",n,o,i,s];let a=location.href;window._paq.push([function(){a=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",a.split("#")[0]]),window._paq.push(r.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",a])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else t==="matomo"&&window._paq.push(e)}}}function dr(){if(document.getElementById(N)||window.localStorage.getItem(N))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${N}" data-analytics="ignore"><style>
|
|
9
9
|
#${N}[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 }
|
|
10
10
|
#${N} 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 }
|
|
11
11
|
#${N} button:focus-visible { outline: 2px solid }
|
|
@@ -9,7 +9,7 @@ export default meta;
|
|
|
9
9
|
type Story = StoryObj<typeof meta>;
|
|
10
10
|
export declare const Default: Story;
|
|
11
11
|
export declare const React: Story;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const Types: Story;
|
|
13
13
|
export declare const Select: Story;
|
|
14
14
|
export declare const Textarea: Story;
|
|
15
15
|
export declare const Checkbox: Story;
|
|
@@ -21,3 +21,4 @@ export declare const Disabled: Story;
|
|
|
21
21
|
export declare const TypeSearch: Story;
|
|
22
22
|
export declare const TypeDate: Story;
|
|
23
23
|
export declare const TypeNumber: Story;
|
|
24
|
+
export declare const VariantInline: Story;
|
package/mtds/package.json.js
CHANGED