@mattilsynet/design 2.3.5 → 2.3.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/atlas/atlas-element.js +1 -1
- package/mtds/index.iife.js +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/toast/toast.js +27 -24
- package/mtds/toast/toast.js.map +1 -1
- package/mtds/utils.js +31 -31
- package/mtds/utils.js.map +1 -1
- package/package.json +5 -5
package/mtds/index.iife.js
CHANGED
|
@@ -155,7 +155,7 @@ var mtds=(function(L){"use strict";var kr=Object.defineProperty,hn=Object.getOwn
|
|
|
155
155
|
white-space: pre-wrap;
|
|
156
156
|
width: calc(var(--mtdsc-print-inner-width) / 3);
|
|
157
157
|
}
|
|
158
|
-
}`,sa="2.3.5",Dn="_alert_1p489_1 _ds-alert_1331q_3",Un="_app_1p489_1",zn="_sticky_1p489_1",Fn="_avatar_1p489_1 _ds-avatar_1331q_1",Bn="_badge_1p489_1",Gn="_breadcrumbs_1p489_1 _ds-breadcrumbs_1331q_5",Jn="_button_1p489_1 _ds-button_1331q_1",Hn="_card_1p489_1",jn="_group_1p489_1",Xn="_chip_1p489_1 _ds-chip_1331q_5",Zn="_details_1p489_1 _ds-details_1331q_3",Kn="_dialog_1p489_1 _ds-dialog_1331q_5",Yn="__drawer_1p489_1",Qn="_divider_1p489_1",_n="_errorsummary_1p489_1 _ds-error-summary_1331q_5",$n="__errorsummary_1p489_1",to="_field_1p489_1 _ds-field_1331q_1",eo="__datalist_1p489_1",no="_affixes_1p489_1 _ds-field-affixes_1331q_3",oo="_fieldset_1p489_1 _ds-fieldset_1331q_3",io="_fileupload_1p489_1",ro="_helptext_1p489_1 _ds-focus_1331q_1",ao="_input_1p489_1 _ds-input_1331q_1",so="_law_1p489_1",lo="_grid_1p489_1",co="_flex_1p489_1",uo="_link_1p489_1",po="_logo_1p489_1",mo="_pagination_1p489_1 _ds-pagination_1331q_5",fo="_popover_1p489_1",ho="_progress_1p489_1",go="__indeterminate_1p489_1",vo="_skeleton_1p489_1 _ds-skeleton_1331q_5",bo="__skeleton_1p489_1",wo="_spinner_1p489_1",yo="_steps_1p489_1",xo="_table_1p489_1 _ds-table_1331q_5",Eo="__scrollShadow_1p489_1",So="_tabs_1p489_1 _ds-tabs_1331q_5",ko="__scrollMask_1p489_1",To="_tag_1p489_1 _ds-tag_1331q_5",Ao="_toast_1p489_1",Lo="__toastClose_1p489_1",Co="__toastOpen_1p489_1",Oo="__toastTimeout_1p489_1",Io="_togglegroup_1p489_1",Mo="__tooltip_1p489_1",No="_heading_1p489_1 _ds-heading_1331q_1",Po="_ingress_1p489_1",Ro="_muted_1p489_1",Wo="_info_1p489_1",qo="_prose_1p489_1",Vo="_validation_1p489_1 _ds-validation-message_1331q_1",Do="_body_1p489_186",Uo="__checked_1p489_1",k={alert:Dn,app:Un,sticky:zn,avatar:Fn,badge:Bn,breadcrumbs:Gn,button:Jn,card:Hn,group:jn,chip:Xn,details:Zn,dialog:Kn,_drawer:Yn,divider:Qn,errorsummary:_n,_errorsummary:$n,field:to,_datalist:eo,affixes:no,fieldset:oo,fileupload:io,helptext:ro,input:ao,law:so,grid:lo,flex:co,link:uo,logo:po,pagination:mo,popover:fo,progress:ho,_indeterminate:go,skeleton:vo,_skeleton:bo,spinner:wo,steps:yo,table:xo,_scrollShadow:Eo,tabs:So,_scrollMask:ko,tag:To,toast:Ao,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,togglegroup:Io,_tooltip:Mo,heading:No,ingress:Po,muted:Ro,info:Wo,prose:qo,validation:Vo,body:Do,_checked:Uo},la=Object.freeze(Object.defineProperty({__proto__:null,_checked:Uo,_datalist:eo,_drawer:Yn,_errorsummary:$n,_indeterminate:go,_scrollMask:ko,_scrollShadow:Eo,_skeleton:bo,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,_tooltip:Mo,affixes:no,alert:Dn,app:Un,avatar:Fn,badge:Bn,body:Do,breadcrumbs:Gn,button:Jn,card:Hn,chip:Xn,default:k,details:Zn,dialog:Kn,divider:Qn,errorsummary:_n,field:to,fieldset:oo,fileupload:io,flex:co,grid:lo,group:jn,heading:No,helptext:ro,info:Wo,ingress:Po,input:ao,law:so,link:uo,logo:po,muted:Ro,pagination:mo,popover:fo,progress:ho,prose:qo,skeleton:vo,spinner:wo,steps:yo,sticky:zn,table:xo,tabs:So,tag:To,toast:Ao,togglegroup:Io,validation:Vo},Symbol.toStringTag,{value:"Module"})),gt=Math.min,q=Math.max,$t=Math.round,te=Math.floor,J=t=>({x:t,y:t}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},da={start:"end",end:"start"};function zo(t,e,n){return q(t,gt(e,n))}function ee(t,e){return typeof t=="function"?t(e):t}function it(t){return t.split("-")[0]}function ne(t){return t.split("-")[1]}function Fo(t){return t==="x"?"y":"x"}function Bo(t){return t==="y"?"height":"width"}const ua=new Set(["top","bottom"]);function $(t){return ua.has(it(t))?"y":"x"}function Go(t){return Fo($(t))}function pa(t,e,n){n===void 0&&(n=!1);const o=ne(t),i=Go(t),r=Bo(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=oe(a)),[a,oe(a)]}function ma(t){const e=oe(t);return[We(t),e,We(e)]}function We(t){return t.replace(/start|end/g,e=>da[e])}const Jo=["left","right"],Ho=["right","left"],fa=["top","bottom"],ha=["bottom","top"];function ga(t,e,n){switch(t){case"top":case"bottom":return n?e?Ho:Jo:e?Jo:Ho;case"left":case"right":return e?fa:ha;default:return[]}}function va(t,e,n,o){const i=ne(t);let r=ga(it(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(We)))),r}function oe(t){return t.replace(/left|right|bottom|top/g,e=>ca[e])}function ba(t){return{top:0,right:0,bottom:0,left:0,...t}}function wa(t){return typeof t!="number"?ba(t):{top:t,right:t,bottom:t,left:t}}function ie(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 jo(t,e,n){let{reference:o,floating:i}=t;const r=$(e),a=Go(e),s=Bo(a),l=it(e),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-i.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-i.width,y:u};break;default:g={x:o.x,y:o.y}}switch(ne(e)){case"start":g[a]-=h*(n&&c?-1:1);break;case"end":g[a]+=h*(n&&c?-1:1);break}return g}const ya=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=jo(c,o,l),h=o,g={},w=0;for(let p=0;p<s.length;p++){const{name:v,fn:f}=s[p],{x:b,y,data:x,reset:E}=await f({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});d=b??d,u=y??u,g={...g,[v]:{...g[v],...x}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=jo(c,h,l)),p=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}};async function qe(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=ee(e,t),w=wa(g),v=s[h?u==="floating"?"reference":"floating":u],f=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},E=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(f.top-E.top+w.top)/x.y,bottom:(E.bottom-f.bottom+w.bottom)/x.y,left:(f.left-E.left+w.left)/x.x,right:(E.right-f.right+w.right)/x.x}}const xa=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...v}=ee(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const f=it(i),b=$(s),y=it(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(y||!p?[oe(s)]:ma(s)),C=w!=="none";!h&&C&&E.push(...va(s,p,w,x));const B=[s,...E],dt=await qe(e,v),ut=[];let _=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&ut.push(dt[f]),u){const pt=pa(i,a,x);ut.push(dt[pt[0]],dt[pt[1]])}if(_=[..._,{placement:i,overflows:ut}],!ut.every(pt=>pt<=0)){var Wt,qt;const pt=(((Wt=r.flip)==null?void 0:Wt.index)||0)+1,fn=B[pt];if(fn&&(!(u==="alignment"?b!==$(fn):!1)||_.every(G=>$(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:pt,overflows:_},reset:{placement:fn}};let Dt=(qt=_.filter(mt=>mt.overflows[0]<=0).sort((mt,G)=>mt.overflows[1]-G.overflows[1])[0])==null?void 0:qt.placement;if(!Dt)switch(g){case"bestFit":{var Vt;const mt=(Vt=_.filter(G=>{if(C){const et=$(G.placement);return et===b||et==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(et=>et>0).reduce((et,Gc)=>et+Gc,0)]).sort((G,et)=>G[1]-et[1])[0])==null?void 0:Vt[0];mt&&(Dt=mt);break}case"initialPlacement":Dt=s;break}if(i!==Dt)return{reset:{placement:Dt}}}return{}}}},Ea=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:f,y:b}=v;return{x:f,y:b}}},...l}=ee(t,e),c={x:n,y:o},d=await qe(e,l),u=$(it(i)),h=Fo(u);let g=c[h],w=c[u];if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",b=g+d[v],y=g-d[f];g=zo(b,g,y)}if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",b=w+d[v],y=w-d[f];w=zo(b,w,y)}const p=s.fn({...e,[h]:g,[u]:w});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[h]:r,[u]:a}}}}}},Sa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=ee(t,e),d=await qe(e,c),u=it(i),h=ne(i),g=$(i)==="y",{width:w,height:p}=r.floating;let v,f;u==="top"||u==="bottom"?(v=u,f=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(f=u,v=h==="end"?"top":"bottom");const b=p-d.top-d.bottom,y=w-d.left-d.right,x=gt(p-d[v],b),E=gt(w-d[f],y),C=!e.middlewareData.shift;let B=x,dt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(dt=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(B=b),C&&!h){const _=q(d.left,0),Wt=q(d.right,0),qt=q(d.top,0),Vt=q(d.bottom,0);g?dt=w-2*(_!==0||Wt!==0?_+Wt:q(d.left,d.right)):B=p-2*(qt!==0||Vt!==0?qt+Vt:q(d.top,d.bottom))}await l({...e,availableWidth:dt,availableHeight:B});const ut=await a.getDimensions(s.floating);return w!==ut.width||p!==ut.height?{reset:{rects:!0}}:{}}}};function re(){return typeof window<"u"}function vt(t){return Xo(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function H(t){var e;return(e=(Xo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xo(t){return re()?t instanceof Node||t instanceof V(t).Node:!1}function D(t){return re()?t instanceof Element||t instanceof V(t).Element:!1}function j(t){return re()?t instanceof HTMLElement||t instanceof V(t).HTMLElement:!1}function Zo(t){return!re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof V(t).ShadowRoot}const ka=new Set(["inline","contents"]);function Et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!ka.has(i)}const Ta=new Set(["table","td","th"]);function Aa(t){return Ta.has(vt(t))}const La=[":popover-open",":modal"];function ae(t){return La.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ca=["transform","translate","scale","rotate","perspective"],Oa=["transform","translate","scale","rotate","perspective","filter"],Ia=["paint","layout","strict","content"];function Ve(t){const e=De(),n=D(t)?U(t):t;return Ca.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)||Oa.some(o=>(n.willChange||"").includes(o))||Ia.some(o=>(n.contain||"").includes(o))}function Ma(t){let e=tt(t);for(;j(e)&&!bt(e);){if(Ve(e))return e;if(ae(e))return null;e=tt(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Na=new Set(["html","body","#document"]);function bt(t){return Na.has(vt(t))}function U(t){return V(t).getComputedStyle(t)}function se(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if(vt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Zo(t)&&t.host||H(t);return Zo(e)?e.host:e}function Ko(t){const e=tt(t);return bt(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&Et(e)?e:Ko(e)}function St(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ko(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=V(i);if(r){const s=Ue(a);return e.concat(a,a.visualViewport||[],Et(i)?i:[],s&&n?St(s):[])}return e.concat(i,St(i,[],n))}function Ue(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yo(t){const e=U(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=$t(n)!==r||$t(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function ze(t){return D(t)?t:t.contextElement}function wt(t){const e=ze(t);if(!j(e))return J(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Yo(e);let a=(r?$t(n.width):n.width)/o,s=(r?$t(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Pa=J(0);function Qo(t){const e=V(t);return!De()||!e.visualViewport?Pa:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ra(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==V(t)?!1:e}function rt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=ze(t);let a=J(1);e&&(o?D(o)&&(a=wt(o)):a=wt(t));const s=Ra(r,n,o)?Qo(r):J(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const h=V(r),g=o&&D(o)?V(o):o;let w=h,p=Ue(w);for(;p&&o&&g!==w;){const v=wt(p),f=p.getBoundingClientRect(),b=U(p),y=f.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,x=f.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=y,c+=x,w=V(p),p=Ue(w)}}return ie({width:d,height:u,x:l,y:c})}function le(t,e){const n=se(t).scrollLeft;return e?e.left+n:rt(H(t)).left+n}function _o(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-le(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Wa(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=H(o),s=e?ae(e.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=J(1);const d=J(0),u=j(o);if((u||!u&&!r)&&((vt(o)!=="body"||Et(a))&&(l=se(o)),j(o))){const g=rt(o);c=wt(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}const h=a&&!u&&!r?_o(a,l):J(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function qa(t){return Array.from(t.getClientRects())}function Va(t){const e=H(t),n=se(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+le(t);const s=-n.scrollTop;return U(o).direction==="rtl"&&(a+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const $o=25;function Da(t,e){const n=V(t),o=H(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=De();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=le(o);if(c<=0){const d=o.ownerDocument,u=d.body,h=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-u.clientWidth-g);w<=$o&&(r-=w)}else c<=$o&&(r+=c);return{width:r,height:a,x:s,y:l}}const Ua=new Set(["absolute","fixed"]);function za(t,e){const n=rt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?wt(t):J(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function ti(t,e,n){let o;if(e==="viewport")o=Da(t,n);else if(e==="document")o=Va(H(t));else if(D(e))o=za(e,n);else{const i=Qo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ie(o)}function ei(t,e){const n=tt(t);return n===e||!D(n)||bt(n)?!1:U(n).position==="fixed"||ei(n,e)}function Fa(t,e){const n=e.get(t);if(n)return n;let o=St(t,[],!1).filter(s=>D(s)&&vt(s)!=="body"),i=null;const r=U(t).position==="fixed";let a=r?tt(t):t;for(;D(a)&&!bt(a);){const s=U(a),l=Ve(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&Ua.has(i.position)||Et(a)&&!l&&ei(t,a))?o=o.filter(d=>d!==a):i=s,a=tt(a)}return e.set(t,o),o}function Ba(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?ae(e)?[]:Fa(e,this._c):[].concat(n),o],s=a[0],l=a.reduce((c,d)=>{const u=ti(e,d,i);return c.top=q(u.top,c.top),c.right=gt(u.right,c.right),c.bottom=gt(u.bottom,c.bottom),c.left=q(u.left,c.left),c},ti(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ga(t){const{width:e,height:n}=Yo(t);return{width:e,height:n}}function Ja(t,e,n){const o=j(e),i=H(e),r=n==="fixed",a=rt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=J(0);function c(){l.x=le(i)}if(o||!o&&!r)if((vt(e)!=="body"||Et(i))&&(s=se(e)),o){const g=rt(e,!0,r,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else i&&c();r&&!o&&i&&c();const d=i&&!o&&!r?_o(i,s):J(0),u=a.left+s.scrollLeft-l.x-d.x,h=a.top+s.scrollTop-l.y-d.y;return{x:u,y:h,width:a.width,height:a.height}}function Fe(t){return U(t).position==="static"}function ni(t,e){if(!j(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function oi(t,e){const n=V(t);if(ae(t))return n;if(!j(t)){let i=tt(t);for(;i&&!bt(i);){if(D(i)&&!Fe(i))return i;i=tt(i)}return n}let o=ni(t,e);for(;o&&Aa(o)&&Fe(o);)o=ni(o,e);return o&&bt(o)&&Fe(o)&&!Ve(o)?n:o||Ma(t)||n}const Ha=async function(t){const e=this.getOffsetParent||oi,n=this.getDimensions,o=await n(t.floating);return{reference:Ja(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ja(t){return U(t).direction==="rtl"}const Xa={convertOffsetParentRelativeRectToViewportRelativeRect:Wa,getDocumentElement:H,getClippingRect:Ba,getOffsetParent:oi,getElementRects:Ha,getClientRects:qa,getDimensions:Ga,getScale:wt,isElement:D,isRTL:ja};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Za(t,e){let n=null,o;const i=H(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:h,height:g}=c;if(s||e(),!h||!g)return;const w=te(u),p=te(i.clientWidth-(d+h)),v=te(i.clientHeight-(u+g)),f=te(d),y={rootMargin:-w+"px "+-p+"px "+-v+"px "+-f+"px",threshold:q(0,gt(1,l))||1};let x=!0;function E(C){const B=C[0].intersectionRatio;if(B!==l){if(!x)return a();B?a(!1,B):o=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!ii(c,t.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(t)}return a(!0),r}function Ka(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ze(t),d=i||r?[...c?St(c):[],...St(e)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),r&&f.addEventListener("resize",n)});const u=c&&s?Za(c,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(e)})),n()}),c&&!l&&g.observe(c),g.observe(e));let w,p=l?rt(t):null;l&&v();function v(){const f=rt(t);p&&!ii(p,f)&&n(),p=f,w=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u?.(),(f=g)==null||f.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const ri=Ea,ai=xa,Ya=Sa,Qa=(t,e,n)=>{const o=new Map,i={platform:Xa,...n},r={...i.platform,_c:o};return ya(t,e,{...i,platform:r})};function si(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=si(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function _a(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=si(t))&&(o&&(o+=" "),o+=e);return o}const R={capture:!0,passive:!0},I=()=>typeof window<"u"&&typeof document<"u";function li(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const kt=(t,e,...n)=>console.warn(`\x1B[1m@mattilsynet/design - deprecation warning:\x1B[m \x1B[103m${t}\x1B[m is deprecated, please use \x1B[103m${e}\x1B[m instead`,...n);function m(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 $a=0;const ts=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ce(t){return t.id||(t.id=`${ts}${++$a}`),t.id}const ci=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},A=(t,...e)=>(ci("add",t,e),()=>di(t,...e)),di=(t,...e)=>ci("remove",t,e),M=t=>{if(!I()||!window.requestAnimationFrame)return;window._mtdsCleanups||(window._mtdsCleanups=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsCleanups?.get(n)?.map(o=>o()),window._mtdsCleanups?.set(n,t())});document.readyState==="complete"?e():A(window,"load",e)},Be=new WeakMap,es=`.${k.dialog.split(" ")[0]}`;function at(t,e,{contain:n,middleware:o,placement:i,...r}={}){if(Be.get(t)?.(),Be.delete(t),e){const a=t.closest(es)?.querySelector(":scope > footer"),s=Number(m(t,"data-inset"))||20,c={bottom:(a?.clientHeight||0)+s,left:s,right:s,top:s},d=m(t,"data-position")??"bottom";Be.set(t,Ka(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return at(t,!1);Qa(e,t,{...r,placement:i||d,middleware:[ai({padding:c}),ri(),...n?[Ya({padding:c,apply:n})]:[],...o||[]]}).then(({x:u,y:h})=>{t.style.left=`${u}px`,t.style.top=`${h}px`})}))}}function X(t,e){let n=0;const o=Array.isArray(e)||typeof e=="string"?{attr:e}:e,i=()=>setTimeout(r,o?.delay??200),r=()=>{if(!I())return s();t(a),a.takeRecords(),n=0},a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))}),s=()=>{try{a.disconnect()}catch{}};return a.observe(o?.root||document.documentElement,{attributeFilter:[].concat(o.attr),attributes:!0,childList:!0,subtree:!0}),t(a),s}function ns(t,e){const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}const Ge=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))m(o,i,r);return o},os=typeof HTMLElement>"u"?class{}:HTMLElement,is=(t,e)=>!I()||window.customElements.get(t)||window.customElements.define(t,e),rs=`[data-command="toggle-app-expanded"],.${k.app.split(" ")[0]} > [command="show-modal"]`,as=`.${k.breadcrumbs.split(" ")[0]}`,ss=`.${k.card.split(" ")[0]}`,ui=`.${k.chip.split(" ")[0]}`,ls=`.${k.helptext.split(" ")[0]}`,cs=`.${k.pagination.split(" ")[0]}`,ds='summary,u-summary,a,button,[role="tab"],[role="button"]',us="click,toggle,submit,change",Je="mattilsynet.matomo.cloud",ps=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",ms="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function pi(t,e={}){if(I()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Je}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&fs();const a=r?`https://cdn.matomo.cloud/${Je}/container_${r}.js`:`https://cdn.matomo.cloud/${Je}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;ps.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function fs(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
158
|
+
}`,sa="2.3.6",Dn="_alert_1p489_1 _ds-alert_1331q_3",Un="_app_1p489_1",zn="_sticky_1p489_1",Fn="_avatar_1p489_1 _ds-avatar_1331q_1",Bn="_badge_1p489_1",Gn="_breadcrumbs_1p489_1 _ds-breadcrumbs_1331q_5",Jn="_button_1p489_1 _ds-button_1331q_1",Hn="_card_1p489_1",jn="_group_1p489_1",Xn="_chip_1p489_1 _ds-chip_1331q_5",Zn="_details_1p489_1 _ds-details_1331q_3",Kn="_dialog_1p489_1 _ds-dialog_1331q_5",Yn="__drawer_1p489_1",Qn="_divider_1p489_1",_n="_errorsummary_1p489_1 _ds-error-summary_1331q_5",$n="__errorsummary_1p489_1",to="_field_1p489_1 _ds-field_1331q_1",eo="__datalist_1p489_1",no="_affixes_1p489_1 _ds-field-affixes_1331q_3",oo="_fieldset_1p489_1 _ds-fieldset_1331q_3",io="_fileupload_1p489_1",ro="_helptext_1p489_1 _ds-focus_1331q_1",ao="_input_1p489_1 _ds-input_1331q_1",so="_law_1p489_1",lo="_grid_1p489_1",co="_flex_1p489_1",uo="_link_1p489_1",po="_logo_1p489_1",mo="_pagination_1p489_1 _ds-pagination_1331q_5",fo="_popover_1p489_1",ho="_progress_1p489_1",go="__indeterminate_1p489_1",vo="_skeleton_1p489_1 _ds-skeleton_1331q_5",bo="__skeleton_1p489_1",wo="_spinner_1p489_1",yo="_steps_1p489_1",xo="_table_1p489_1 _ds-table_1331q_5",Eo="__scrollShadow_1p489_1",So="_tabs_1p489_1 _ds-tabs_1331q_5",ko="__scrollMask_1p489_1",To="_tag_1p489_1 _ds-tag_1331q_5",Ao="_toast_1p489_1",Lo="__toastClose_1p489_1",Co="__toastOpen_1p489_1",Oo="__toastTimeout_1p489_1",Io="_togglegroup_1p489_1",Mo="__tooltip_1p489_1",No="_heading_1p489_1 _ds-heading_1331q_1",Po="_ingress_1p489_1",Ro="_muted_1p489_1",Wo="_info_1p489_1",qo="_prose_1p489_1",Vo="_validation_1p489_1 _ds-validation-message_1331q_1",Do="_body_1p489_186",Uo="__checked_1p489_1",k={alert:Dn,app:Un,sticky:zn,avatar:Fn,badge:Bn,breadcrumbs:Gn,button:Jn,card:Hn,group:jn,chip:Xn,details:Zn,dialog:Kn,_drawer:Yn,divider:Qn,errorsummary:_n,_errorsummary:$n,field:to,_datalist:eo,affixes:no,fieldset:oo,fileupload:io,helptext:ro,input:ao,law:so,grid:lo,flex:co,link:uo,logo:po,pagination:mo,popover:fo,progress:ho,_indeterminate:go,skeleton:vo,_skeleton:bo,spinner:wo,steps:yo,table:xo,_scrollShadow:Eo,tabs:So,_scrollMask:ko,tag:To,toast:Ao,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,togglegroup:Io,_tooltip:Mo,heading:No,ingress:Po,muted:Ro,info:Wo,prose:qo,validation:Vo,body:Do,_checked:Uo},la=Object.freeze(Object.defineProperty({__proto__:null,_checked:Uo,_datalist:eo,_drawer:Yn,_errorsummary:$n,_indeterminate:go,_scrollMask:ko,_scrollShadow:Eo,_skeleton:bo,_toastClose:Lo,_toastOpen:Co,_toastTimeout:Oo,_tooltip:Mo,affixes:no,alert:Dn,app:Un,avatar:Fn,badge:Bn,body:Do,breadcrumbs:Gn,button:Jn,card:Hn,chip:Xn,default:k,details:Zn,dialog:Kn,divider:Qn,errorsummary:_n,field:to,fieldset:oo,fileupload:io,flex:co,grid:lo,group:jn,heading:No,helptext:ro,info:Wo,ingress:Po,input:ao,law:so,link:uo,logo:po,muted:Ro,pagination:mo,popover:fo,progress:ho,prose:qo,skeleton:vo,spinner:wo,steps:yo,sticky:zn,table:xo,tabs:So,tag:To,toast:Ao,togglegroup:Io,validation:Vo},Symbol.toStringTag,{value:"Module"})),gt=Math.min,q=Math.max,$t=Math.round,te=Math.floor,J=t=>({x:t,y:t}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},da={start:"end",end:"start"};function zo(t,e,n){return q(t,gt(e,n))}function ee(t,e){return typeof t=="function"?t(e):t}function it(t){return t.split("-")[0]}function ne(t){return t.split("-")[1]}function Fo(t){return t==="x"?"y":"x"}function Bo(t){return t==="y"?"height":"width"}const ua=new Set(["top","bottom"]);function $(t){return ua.has(it(t))?"y":"x"}function Go(t){return Fo($(t))}function pa(t,e,n){n===void 0&&(n=!1);const o=ne(t),i=Go(t),r=Bo(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=oe(a)),[a,oe(a)]}function ma(t){const e=oe(t);return[We(t),e,We(e)]}function We(t){return t.replace(/start|end/g,e=>da[e])}const Jo=["left","right"],Ho=["right","left"],fa=["top","bottom"],ha=["bottom","top"];function ga(t,e,n){switch(t){case"top":case"bottom":return n?e?Ho:Jo:e?Jo:Ho;case"left":case"right":return e?fa:ha;default:return[]}}function va(t,e,n,o){const i=ne(t);let r=ga(it(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(We)))),r}function oe(t){return t.replace(/left|right|bottom|top/g,e=>ca[e])}function ba(t){return{top:0,right:0,bottom:0,left:0,...t}}function wa(t){return typeof t!="number"?ba(t):{top:t,right:t,bottom:t,left:t}}function ie(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 jo(t,e,n){let{reference:o,floating:i}=t;const r=$(e),a=Go(e),s=Bo(a),l=it(e),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,h=o[s]/2-i[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-i.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-i.width,y:u};break;default:g={x:o.x,y:o.y}}switch(ne(e)){case"start":g[a]-=h*(n&&c?-1:1);break;case"end":g[a]+=h*(n&&c?-1:1);break}return g}const ya=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=r.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=jo(c,o,l),h=o,g={},w=0;for(let p=0;p<s.length;p++){const{name:v,fn:f}=s[p],{x:b,y,data:x,reset:E}=await f({x:d,y:u,initialPlacement:o,placement:h,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});d=b??d,u=y??u,g={...g,[v]:{...g[v],...x}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:d,y:u}=jo(c,h,l)),p=-1)}return{x:d,y:u,placement:h,strategy:i,middlewareData:g}};async function qe(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=ee(e,t),w=wa(g),v=s[h?u==="floating"?"reference":"floating":u],f=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),x=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},E=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(f.top-E.top+w.top)/x.y,bottom:(E.bottom-f.bottom+w.bottom)/x.y,left:(f.left-E.left+w.left)/x.x,right:(E.right-f.right+w.right)/x.x}}const xa=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...v}=ee(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const f=it(i),b=$(s),y=it(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(y||!p?[oe(s)]:ma(s)),C=w!=="none";!h&&C&&E.push(...va(s,p,w,x));const B=[s,...E],dt=await qe(e,v),ut=[];let _=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&ut.push(dt[f]),u){const pt=pa(i,a,x);ut.push(dt[pt[0]],dt[pt[1]])}if(_=[..._,{placement:i,overflows:ut}],!ut.every(pt=>pt<=0)){var Wt,qt;const pt=(((Wt=r.flip)==null?void 0:Wt.index)||0)+1,fn=B[pt];if(fn&&(!(u==="alignment"?b!==$(fn):!1)||_.every(G=>$(G.placement)===b?G.overflows[0]>0:!0)))return{data:{index:pt,overflows:_},reset:{placement:fn}};let Dt=(qt=_.filter(mt=>mt.overflows[0]<=0).sort((mt,G)=>mt.overflows[1]-G.overflows[1])[0])==null?void 0:qt.placement;if(!Dt)switch(g){case"bestFit":{var Vt;const mt=(Vt=_.filter(G=>{if(C){const et=$(G.placement);return et===b||et==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(et=>et>0).reduce((et,Gc)=>et+Gc,0)]).sort((G,et)=>G[1]-et[1])[0])==null?void 0:Vt[0];mt&&(Dt=mt);break}case"initialPlacement":Dt=s;break}if(i!==Dt)return{reset:{placement:Dt}}}return{}}}},Ea=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:f,y:b}=v;return{x:f,y:b}}},...l}=ee(t,e),c={x:n,y:o},d=await qe(e,l),u=$(it(i)),h=Fo(u);let g=c[h],w=c[u];if(r){const v=h==="y"?"top":"left",f=h==="y"?"bottom":"right",b=g+d[v],y=g-d[f];g=zo(b,g,y)}if(a){const v=u==="y"?"top":"left",f=u==="y"?"bottom":"right",b=w+d[v],y=w-d[f];w=zo(b,w,y)}const p=s.fn({...e,[h]:g,[u]:w});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[h]:r,[u]:a}}}}}},Sa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=ee(t,e),d=await qe(e,c),u=it(i),h=ne(i),g=$(i)==="y",{width:w,height:p}=r.floating;let v,f;u==="top"||u==="bottom"?(v=u,f=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(f=u,v=h==="end"?"top":"bottom");const b=p-d.top-d.bottom,y=w-d.left-d.right,x=gt(p-d[v],b),E=gt(w-d[f],y),C=!e.middlewareData.shift;let B=x,dt=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(dt=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(B=b),C&&!h){const _=q(d.left,0),Wt=q(d.right,0),qt=q(d.top,0),Vt=q(d.bottom,0);g?dt=w-2*(_!==0||Wt!==0?_+Wt:q(d.left,d.right)):B=p-2*(qt!==0||Vt!==0?qt+Vt:q(d.top,d.bottom))}await l({...e,availableWidth:dt,availableHeight:B});const ut=await a.getDimensions(s.floating);return w!==ut.width||p!==ut.height?{reset:{rects:!0}}:{}}}};function re(){return typeof window<"u"}function vt(t){return Xo(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function H(t){var e;return(e=(Xo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xo(t){return re()?t instanceof Node||t instanceof V(t).Node:!1}function D(t){return re()?t instanceof Element||t instanceof V(t).Element:!1}function j(t){return re()?t instanceof HTMLElement||t instanceof V(t).HTMLElement:!1}function Zo(t){return!re()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof V(t).ShadowRoot}const ka=new Set(["inline","contents"]);function Et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!ka.has(i)}const Ta=new Set(["table","td","th"]);function Aa(t){return Ta.has(vt(t))}const La=[":popover-open",":modal"];function ae(t){return La.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ca=["transform","translate","scale","rotate","perspective"],Oa=["transform","translate","scale","rotate","perspective","filter"],Ia=["paint","layout","strict","content"];function Ve(t){const e=De(),n=D(t)?U(t):t;return Ca.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)||Oa.some(o=>(n.willChange||"").includes(o))||Ia.some(o=>(n.contain||"").includes(o))}function Ma(t){let e=tt(t);for(;j(e)&&!bt(e);){if(Ve(e))return e;if(ae(e))return null;e=tt(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Na=new Set(["html","body","#document"]);function bt(t){return Na.has(vt(t))}function U(t){return V(t).getComputedStyle(t)}function se(t){return D(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function tt(t){if(vt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Zo(t)&&t.host||H(t);return Zo(e)?e.host:e}function Ko(t){const e=tt(t);return bt(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&Et(e)?e:Ko(e)}function St(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ko(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=V(i);if(r){const s=Ue(a);return e.concat(a,a.visualViewport||[],Et(i)?i:[],s&&n?St(s):[])}return e.concat(i,St(i,[],n))}function Ue(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Yo(t){const e=U(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=$t(n)!==r||$t(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function ze(t){return D(t)?t:t.contextElement}function wt(t){const e=ze(t);if(!j(e))return J(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Yo(e);let a=(r?$t(n.width):n.width)/o,s=(r?$t(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Pa=J(0);function Qo(t){const e=V(t);return!De()||!e.visualViewport?Pa:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ra(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==V(t)?!1:e}function rt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=ze(t);let a=J(1);e&&(o?D(o)&&(a=wt(o)):a=wt(t));const s=Ra(r,n,o)?Qo(r):J(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const h=V(r),g=o&&D(o)?V(o):o;let w=h,p=Ue(w);for(;p&&o&&g!==w;){const v=wt(p),f=p.getBoundingClientRect(),b=U(p),y=f.left+(p.clientLeft+parseFloat(b.paddingLeft))*v.x,x=f.top+(p.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=y,c+=x,w=V(p),p=Ue(w)}}return ie({width:d,height:u,x:l,y:c})}function le(t,e){const n=se(t).scrollLeft;return e?e.left+n:rt(H(t)).left+n}function _o(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-le(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Wa(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=H(o),s=e?ae(e.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=J(1);const d=J(0),u=j(o);if((u||!u&&!r)&&((vt(o)!=="body"||Et(a))&&(l=se(o)),j(o))){const g=rt(o);c=wt(o),d.x=g.x+o.clientLeft,d.y=g.y+o.clientTop}const h=a&&!u&&!r?_o(a,l):J(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function qa(t){return Array.from(t.getClientRects())}function Va(t){const e=H(t),n=se(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+le(t);const s=-n.scrollTop;return U(o).direction==="rtl"&&(a+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const $o=25;function Da(t,e){const n=V(t),o=H(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=De();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=le(o);if(c<=0){const d=o.ownerDocument,u=d.body,h=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-u.clientWidth-g);w<=$o&&(r-=w)}else c<=$o&&(r+=c);return{width:r,height:a,x:s,y:l}}const Ua=new Set(["absolute","fixed"]);function za(t,e){const n=rt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?wt(t):J(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function ti(t,e,n){let o;if(e==="viewport")o=Da(t,n);else if(e==="document")o=Va(H(t));else if(D(e))o=za(e,n);else{const i=Qo(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ie(o)}function ei(t,e){const n=tt(t);return n===e||!D(n)||bt(n)?!1:U(n).position==="fixed"||ei(n,e)}function Fa(t,e){const n=e.get(t);if(n)return n;let o=St(t,[],!1).filter(s=>D(s)&&vt(s)!=="body"),i=null;const r=U(t).position==="fixed";let a=r?tt(t):t;for(;D(a)&&!bt(a);){const s=U(a),l=Ve(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&Ua.has(i.position)||Et(a)&&!l&&ei(t,a))?o=o.filter(d=>d!==a):i=s,a=tt(a)}return e.set(t,o),o}function Ba(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?ae(e)?[]:Fa(e,this._c):[].concat(n),o],s=a[0],l=a.reduce((c,d)=>{const u=ti(e,d,i);return c.top=q(u.top,c.top),c.right=gt(u.right,c.right),c.bottom=gt(u.bottom,c.bottom),c.left=q(u.left,c.left),c},ti(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ga(t){const{width:e,height:n}=Yo(t);return{width:e,height:n}}function Ja(t,e,n){const o=j(e),i=H(e),r=n==="fixed",a=rt(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=J(0);function c(){l.x=le(i)}if(o||!o&&!r)if((vt(e)!=="body"||Et(i))&&(s=se(e)),o){const g=rt(e,!0,r,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else i&&c();r&&!o&&i&&c();const d=i&&!o&&!r?_o(i,s):J(0),u=a.left+s.scrollLeft-l.x-d.x,h=a.top+s.scrollTop-l.y-d.y;return{x:u,y:h,width:a.width,height:a.height}}function Fe(t){return U(t).position==="static"}function ni(t,e){if(!j(t)||U(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return H(t)===n&&(n=n.ownerDocument.body),n}function oi(t,e){const n=V(t);if(ae(t))return n;if(!j(t)){let i=tt(t);for(;i&&!bt(i);){if(D(i)&&!Fe(i))return i;i=tt(i)}return n}let o=ni(t,e);for(;o&&Aa(o)&&Fe(o);)o=ni(o,e);return o&&bt(o)&&Fe(o)&&!Ve(o)?n:o||Ma(t)||n}const Ha=async function(t){const e=this.getOffsetParent||oi,n=this.getDimensions,o=await n(t.floating);return{reference:Ja(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ja(t){return U(t).direction==="rtl"}const Xa={convertOffsetParentRelativeRectToViewportRelativeRect:Wa,getDocumentElement:H,getClippingRect:Ba,getOffsetParent:oi,getElementRects:Ha,getClientRects:qa,getDimensions:Ga,getScale:wt,isElement:D,isRTL:ja};function ii(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Za(t,e){let n=null,o;const i=H(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:h,height:g}=c;if(s||e(),!h||!g)return;const w=te(u),p=te(i.clientWidth-(d+h)),v=te(i.clientHeight-(u+g)),f=te(d),y={rootMargin:-w+"px "+-p+"px "+-v+"px "+-f+"px",threshold:q(0,gt(1,l))||1};let x=!0;function E(C){const B=C[0].intersectionRatio;if(B!==l){if(!x)return a();B?a(!1,B):o=setTimeout(()=>{a(!1,1e-7)},1e3)}B===1&&!ii(c,t.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(t)}return a(!0),r}function Ka(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ze(t),d=i||r?[...c?St(c):[],...St(e)]:[];d.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),r&&f.addEventListener("resize",n)});const u=c&&s?Za(c,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(f=>{let[b]=f;b&&b.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(e)})),n()}),c&&!l&&g.observe(c),g.observe(e));let w,p=l?rt(t):null;l&&v();function v(){const f=rt(t);p&&!ii(p,f)&&n(),p=f,w=requestAnimationFrame(v)}return n(),()=>{var f;d.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u?.(),(f=g)==null||f.disconnect(),g=null,l&&cancelAnimationFrame(w)}}const ri=Ea,ai=xa,Ya=Sa,Qa=(t,e,n)=>{const o=new Map,i={platform:Xa,...n},r={...i.platform,_c:o};return ya(t,e,{...i,platform:r})};function si(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=si(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function _a(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=si(t))&&(o&&(o+=" "),o+=e);return o}const R={capture:!0,passive:!0},I=()=>typeof window<"u"&&typeof document<"u";function li(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const kt=(t,e,...n)=>console.warn(`\x1B[1m@mattilsynet/design - deprecation warning:\x1B[m \x1B[103m${t}\x1B[m is deprecated, please use \x1B[103m${e}\x1B[m instead`,...n);function m(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 $a=0;const ts=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;function ce(t){return t.id||(t.id=`${ts}${++$a}`),t.id}const ci=(t,e,[...n])=>{for(const o of n[0].split(","))n[0]=o,e[`${t}EventListener`](...n)},A=(t,...e)=>(ci("add",t,e),()=>di(t,...e)),di=(t,...e)=>ci("remove",t,e),M=t=>{if(!I()||!window.requestAnimationFrame)return;window._mtdsCleanups||(window._mtdsCleanups=new Map);const e=()=>requestAnimationFrame(()=>{const n=String(t).replace(/(\n|\s)/g,"");window._mtdsCleanups?.get(n)?.map(o=>o()),window._mtdsCleanups?.set(n,t())});document.readyState==="complete"?e():A(window,"load",e)},Be=new WeakMap,es=`.${k.dialog.split(" ")[0]}`;function at(t,e,{contain:n,middleware:o,placement:i,...r}={}){if(Be.get(t)?.(),Be.delete(t),e){const a=t.closest(es)?.querySelector(":scope > footer"),s=Number(m(t,"data-inset"))||20,c={bottom:(a?.clientHeight||0)+s,left:s,right:s,top:s},d=m(t,"data-position")??"bottom";Be.set(t,Ka(e,t,()=>{if(!t.isConnected||!e.isConnected||t.hidden)return at(t,!1);Qa(e,t,{...r,placement:i||d,middleware:[ai({padding:c}),ri(),...n?[Ya({padding:c,apply:n})]:[],...o||[]]}).then(({x:u,y:h})=>{t.style.left=`${u}px`,t.style.top=`${h}px`})}))}}function X(t,e){let n=0;const o=Array.isArray(e)||typeof e=="string"?{attr:e}:e,i=()=>setTimeout(r,o?.delay??200),r=()=>{if(!I())return s();t(a),a.takeRecords(),n=0},a=new MutationObserver(()=>{n||(n=requestAnimationFrame(i))}),s=()=>{try{a.disconnect()}catch{}},l=o?.root||document;return l instanceof Node&&(a.observe(l,{attributeFilter:[].concat(o.attr),attributes:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>t(a))),s}function ns(t,e){const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}const Ge=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement),O=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))m(o,i,r);return o},os=typeof HTMLElement>"u"?class{}:HTMLElement,is=(t,e)=>!I()||window.customElements.get(t)||window.customElements.define(t,e),rs=`[data-command="toggle-app-expanded"],.${k.app.split(" ")[0]} > [command="show-modal"]`,as=`.${k.breadcrumbs.split(" ")[0]}`,ss=`.${k.card.split(" ")[0]}`,ui=`.${k.chip.split(" ")[0]}`,ls=`.${k.helptext.split(" ")[0]}`,cs=`.${k.pagination.split(" ")[0]}`,ds='summary,u-summary,a,button,[role="tab"],[role="button"]',us="click,toggle,submit,change",Je="mattilsynet.matomo.cloud",ps=["setCustomUrl","setDocumentTitle","setReferrerUrl"],z="mtds-analytics-banner",ms="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function pi(t,e={}){if(I()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Je}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&fs();const a=r?`https://cdn.matomo.cloud/${Je}/container_${r}.js`:`https://cdn.matomo.cloud/${Je}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(O("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;ps.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function fs(){if(document.getElementById(z)||window.localStorage.getItem(z))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${z}" data-analytics="ignore"><style>
|
|
159
159
|
#${z}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
|
|
160
160
|
#${z} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
|
|
161
161
|
#${z} button:focus-visible { outline: 2px solid }
|
package/mtds/package.json.js
CHANGED