@mattilsynet/design 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import P from "../styles.module.css.js";
2
2
  import { getByCSSModule as _, onHotReload as h, on as r, QUICK_EVENT as m, debounce as E } from "../utils.js";
3
- import "./app-toggle.js";
3
+ import "./app-toggle2.js";
4
4
  const y = P.app.split(" ")[0], I = `[data-command="toggle-app-expanded"],.${y} > [command="show-modal"]`, u = `.${y} > dialog,.${y} dialog ~ main`, S = _("sticky"), w = (t) => {
5
5
  document.startViewTransition ? document.startViewTransition(t) : t();
6
6
  }, x = (t) => (
@@ -1,11 +1,27 @@
1
- typeof window < "u" && window.CSSStyleSheet && document.adoptedStyleSheets && (() => {
2
- const e = "--mtds-app-expanded", d = new CSSStyleSheet(), o = () => !window.localStorage.getItem(e)?.includes("false");
3
- document.adoptedStyleSheets.push(d), window.mtdsToggleAppExpanded = (n) => {
4
- try {
5
- const t = n ?? !o();
6
- d.replaceSync?.(`:root { ${e}: var(${e}--${t})}`), window.localStorage.setItem(e, t);
7
- } catch {
8
- }
9
- }, window.mtdsToggleAppExpanded(o());
10
- })();
1
+ const t = `if (
2
+ typeof window !== "undefined" &&
3
+ window.CSSStyleSheet &&
4
+ document.adoptedStyleSheets
5
+ )
6
+ (() => {
7
+ const key = "--mtds-app-expanded";
8
+ const sheet = new CSSStyleSheet();
9
+ const prev = () => !window.localStorage.getItem(key)?.includes("false");
10
+
11
+ document.adoptedStyleSheets.push(sheet);
12
+ window.mtdsToggleAppExpanded = (force) => {
13
+ try {
14
+ const next = force ?? !prev();
15
+ sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
16
+ window.localStorage.setItem(key, next);
17
+ } catch (_err) {} // localStorage is full or replaceSync is not supported
18
+ };
19
+
20
+ // Set and store initial state
21
+ window.mtdsToggleAppExpanded(prev());
22
+ })();
23
+ `;
24
+ export {
25
+ t as default
26
+ };
11
27
  //# sourceMappingURL=app-toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (\n\ttypeof window !== \"undefined\" &&\n\twindow.CSSStyleSheet &&\n\tdocument.adoptedStyleSheets\n)\n\t(() => {\n\t\tconst key = \"--mtds-app-expanded\";\n\t\tconst sheet = new CSSStyleSheet();\n\t\tconst prev = () => !window.localStorage.getItem(key)?.includes(\"false\");\n\n\t\tdocument.adoptedStyleSheets.push(sheet);\n\t\twindow.mtdsToggleAppExpanded = (force) => {\n\t\t\ttry {\n\t\t\t\tconst next = force ?? !prev();\n\t\t\t\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\n\t\t\t\twindow.localStorage.setItem(key, next);\n\t\t\t} catch (_err) {} // localStorage is full or replaceSync is not supported\n\t\t};\n\n\t\t// Set and store initial state\n\t\twindow.mtdsToggleAppExpanded(prev());\n\t})();\n"],"names":["key","sheet","prev","force","next"],"mappings":"AACC,OAAO,SAAW,OAClB,OAAO,iBACP,SAAS,uBAER,MAAM;AACN,QAAMA,IAAM,uBACNC,IAAQ,IAAI,cAAa,GACzBC,IAAO,MAAM,CAAC,OAAO,aAAa,QAAQF,CAAG,GAAG,SAAS,OAAO;AAEtE,WAAS,mBAAmB,KAAKC,CAAK,GACtC,OAAO,wBAAwB,CAACE,MAAU;AACzC,QAAI;AACH,YAAMC,IAAOD,KAAS,CAACD,EAAI;AAC3B,MAAAD,EAAM,cAAc,WAAWD,CAAG,SAASA,CAAG,KAAKI,CAAI,IAAI,GAC3D,OAAO,aAAa,QAAQJ,GAAKI,CAAI;AAAA,IACtC,QAAe;AAAA,IAAC;AAAA,EACjB,GAGA,OAAO,sBAAsBF,GAAM;AACpC,GAAC;"}
1
+ {"version":3,"file":"app-toggle.js","sources":["../../designsystem/app/app-toggle.js?raw"],"sourcesContent":["export default \"if (\\n\\ttypeof window !== \\\"undefined\\\" &&\\n\\twindow.CSSStyleSheet &&\\n\\tdocument.adoptedStyleSheets\\n)\\n\\t(() => {\\n\\t\\tconst key = \\\"--mtds-app-expanded\\\";\\n\\t\\tconst sheet = new CSSStyleSheet();\\n\\t\\tconst prev = () => !window.localStorage.getItem(key)?.includes(\\\"false\\\");\\n\\n\\t\\tdocument.adoptedStyleSheets.push(sheet);\\n\\t\\twindow.mtdsToggleAppExpanded = (force) => {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tconst next = force ?? !prev();\\n\\t\\t\\t\\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\\n\\t\\t\\t\\twindow.localStorage.setItem(key, next);\\n\\t\\t\\t} catch (_err) {} // localStorage is full or replaceSync is not supported\\n\\t\\t};\\n\\n\\t\\t// Set and store initial state\\n\\t\\twindow.mtdsToggleAppExpanded(prev());\\n\\t})();\\n\""],"names":["script"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,27 +1,11 @@
1
- const t = `if (
2
- typeof window !== "undefined" &&
3
- window.CSSStyleSheet &&
4
- document.adoptedStyleSheets
5
- )
6
- (() => {
7
- const key = "--mtds-app-expanded";
8
- const sheet = new CSSStyleSheet();
9
- const prev = () => !window.localStorage.getItem(key)?.includes("false");
10
-
11
- document.adoptedStyleSheets.push(sheet);
12
- window.mtdsToggleAppExpanded = (force) => {
13
- try {
14
- const next = force ?? !prev();
15
- sheet.replaceSync?.(\`:root { \${key}: var(\${key}--\${next})}\`);
16
- window.localStorage.setItem(key, next);
17
- } catch (_err) {} // localStorage is full or replaceSync is not supported
18
- };
19
-
20
- // Set and store initial state
21
- window.mtdsToggleAppExpanded(prev());
22
- })();
23
- `;
24
- export {
25
- t as default
26
- };
1
+ typeof window < "u" && window.CSSStyleSheet && document.adoptedStyleSheets && (() => {
2
+ const e = "--mtds-app-expanded", d = new CSSStyleSheet(), o = () => !window.localStorage.getItem(e)?.includes("false");
3
+ document.adoptedStyleSheets.push(d), window.mtdsToggleAppExpanded = (n) => {
4
+ try {
5
+ const t = n ?? !o();
6
+ d.replaceSync?.(`:root { ${e}: var(${e}--${t})}`), window.localStorage.setItem(e, t);
7
+ } catch {
8
+ }
9
+ }, window.mtdsToggleAppExpanded(o());
10
+ })();
27
11
  //# sourceMappingURL=app-toggle2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js?raw"],"sourcesContent":["export default \"if (\\n\\ttypeof window !== \\\"undefined\\\" &&\\n\\twindow.CSSStyleSheet &&\\n\\tdocument.adoptedStyleSheets\\n)\\n\\t(() => {\\n\\t\\tconst key = \\\"--mtds-app-expanded\\\";\\n\\t\\tconst sheet = new CSSStyleSheet();\\n\\t\\tconst prev = () => !window.localStorage.getItem(key)?.includes(\\\"false\\\");\\n\\n\\t\\tdocument.adoptedStyleSheets.push(sheet);\\n\\t\\twindow.mtdsToggleAppExpanded = (force) => {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tconst next = force ?? !prev();\\n\\t\\t\\t\\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\\n\\t\\t\\t\\twindow.localStorage.setItem(key, next);\\n\\t\\t\\t} catch (_err) {} // localStorage is full or replaceSync is not supported\\n\\t\\t};\\n\\n\\t\\t// Set and store initial state\\n\\t\\twindow.mtdsToggleAppExpanded(prev());\\n\\t})();\\n\""],"names":["script"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"app-toggle2.js","sources":["../../designsystem/app/app-toggle.js"],"sourcesContent":["if (\n\ttypeof window !== \"undefined\" &&\n\twindow.CSSStyleSheet &&\n\tdocument.adoptedStyleSheets\n)\n\t(() => {\n\t\tconst key = \"--mtds-app-expanded\";\n\t\tconst sheet = new CSSStyleSheet();\n\t\tconst prev = () => !window.localStorage.getItem(key)?.includes(\"false\");\n\n\t\tdocument.adoptedStyleSheets.push(sheet);\n\t\twindow.mtdsToggleAppExpanded = (force) => {\n\t\t\ttry {\n\t\t\t\tconst next = force ?? !prev();\n\t\t\t\tsheet.replaceSync?.(`:root { ${key}: var(${key}--${next})}`);\n\t\t\t\twindow.localStorage.setItem(key, next);\n\t\t\t} catch (_err) {} // localStorage is full or replaceSync is not supported\n\t\t};\n\n\t\t// Set and store initial state\n\t\twindow.mtdsToggleAppExpanded(prev());\n\t})();\n"],"names":["key","sheet","prev","force","next"],"mappings":"AACC,OAAO,SAAW,OAClB,OAAO,iBACP,SAAS,uBAER,MAAM;AACN,QAAMA,IAAM,uBACNC,IAAQ,IAAI,cAAa,GACzBC,IAAO,MAAM,CAAC,OAAO,aAAa,QAAQF,CAAG,GAAG,SAAS,OAAO;AAEtE,WAAS,mBAAmB,KAAKC,CAAK,GACtC,OAAO,wBAAwB,CAACE,MAAU;AACzC,QAAI;AACH,YAAMC,IAAOD,KAAS,CAACD,EAAI;AAC3B,MAAAD,EAAM,cAAc,WAAWD,CAAG,SAASA,CAAG,KAAKI,CAAI,IAAI,GAC3D,OAAO,aAAa,QAAQJ,GAAKI,CAAI;AAAA,IACtC,QAAe;AAAA,IAAC;AAAA,EACjB,GAGA,OAAO,sBAAsBF,GAAM;AACpC,GAAC;"}
package/mtds/app/app.js CHANGED
@@ -3,7 +3,7 @@ import a from "clsx";
3
3
  import { forwardRef as n } from "react";
4
4
  import { Button as m } from "../button/button.js";
5
5
  import s from "../styles.module.css.js";
6
- import d from "./app-toggle2.js";
6
+ import d from "./app-toggle.js";
7
7
  const u = n(function({ as: r, className: t, ...p }, e) {
8
8
  return /* @__PURE__ */ o(r || "div", { className: a(s.app, t), ref: e, ...p });
9
9
  }), f = n(function({ as: r, className: t, ...p }, e) {
@@ -24,7 +24,7 @@ class m extends C {
24
24
  "style",
25
25
  null,
26
26
  `@layer leaflet{${f}}
27
- @layer mt.v3-1-0design{${b}`
27
+ @layer mt.v3-1-2design{${b}`
28
28
  ),
29
29
  r("figure")
30
30
  );
@@ -3,6 +3,7 @@ import { PolymorphicComponentPropWithRef, Sizes } from '../react-types';
3
3
  type CardBaseProps<Href> = {
4
4
  "data-pad"?: Sizes;
5
5
  "data-radius"?: "sm" | "md" | "lg" | "xl";
6
+ "data-clickdelegatefor"?: string;
6
7
  href?: Href;
7
8
  };
8
9
  export type CardProps<Href, As extends React.ElementType = Href extends string ? "a" : "div"> = PolymorphicComponentPropWithRef<As, CardBaseProps<Href>>;
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype CardBaseProps<Href> = {\n\t\"data-pad\"?: Sizes;\n\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\thref?: Href;\n};\n\nexport type CardProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n> = PolymorphicComponentPropWithRef<As, CardBaseProps<Href>>;\n\ntype CardComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>(\n\tprops: CardProps<Href, As>,\n) => JSX.Element;\n\nexport const Card: CardComponent = forwardRef<null>(function Card<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>({ as, className, ...rest }: CardProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"div\");\n\n\treturn <Tag className={clsx(styles.card, className)} ref={ref} {...rest} />;\n}) as CardComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type GroupProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, { \"data-pad\"?: Sizes }>;\n\ntype GroupComponent = <As extends React.ElementType = \"div\">(\n\tprops: GroupProps<As>,\n) => JSX.Element;\n\nexport const Group: GroupComponent = forwardRef<null>(function Group<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GroupProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\tif (Tag === \"button\" && !rest.type) Object.assign(rest, { type: \"button\" }); // Default type for button to avoid accidental submits\n\treturn <Tag className={clsx(styles.group, className)} ref={ref} {...rest} />;\n}) as GroupComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Card","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles","Group"],"mappings":";;;;AA2BO,MAAMA,IAAsBC,EAAiB,SAGlD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA6BC,GAA0B;AAC5E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,MAAMN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GASYM,IAAwBT,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AACvE,QAAMC,IAAMJ,KAAM;AAClB,SAAII,MAAQ,YAAY,CAACF,EAAK,QAAM,OAAO,OAAOA,GAAM,EAAE,MAAM,SAAA,CAAU,GACnE,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
1
+ {"version":3,"file":"card.js","sources":["../../designsystem/card/card.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n\tSizes,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\ntype CardBaseProps<Href> = {\n\t\"data-pad\"?: Sizes;\n\t\"data-radius\"?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n\t\"data-clickdelegatefor\"?: string;\n\thref?: Href;\n};\n\nexport type CardProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n> = PolymorphicComponentPropWithRef<As, CardBaseProps<Href>>;\n\ntype CardComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>(\n\tprops: CardProps<Href, As>,\n) => JSX.Element;\n\nexport const Card: CardComponent = forwardRef<null>(function Card<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"div\",\n>({ as, className, ...rest }: CardProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"div\");\n\n\treturn <Tag className={clsx(styles.card, className)} ref={ref} {...rest} />;\n}) as CardComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type GroupProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, { \"data-pad\"?: Sizes }>;\n\ntype GroupComponent = <As extends React.ElementType = \"div\">(\n\tprops: GroupProps<As>,\n) => JSX.Element;\n\nexport const Group: GroupComponent = forwardRef<null>(function Group<\n\tAs extends React.ElementType = \"div\",\n>({ as, className, ...rest }: GroupProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"div\";\n\tif (Tag === \"button\" && !rest.type) Object.assign(rest, { type: \"button\" }); // Default type for button to avoid accidental submits\n\treturn <Tag className={clsx(styles.group, className)} ref={ref} {...rest} />;\n}) as GroupComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Card","forwardRef","as","className","rest","ref","Tag","jsx","clsx","styles","Group"],"mappings":";;;;AA4BO,MAAMA,IAAsBC,EAAiB,SAGlD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA6BC,GAA0B;AAC5E,QAAMC,IAAMJ,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,MAAMN,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC,GASYM,IAAwBT,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AACvE,QAAMC,IAAMJ,KAAM;AAClB,SAAII,MAAQ,YAAY,CAACF,EAAK,QAAM,OAAO,OAAOA,GAAM,EAAE,MAAM,SAAA,CAAU,GACnE,gBAAAG,EAACD,GAAA,EAAI,WAAWE,EAAKC,EAAO,OAAON,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC;"}
@@ -196,7 +196,7 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
196
196
  ::slotted([role="option"]:focus) { ${Jl} }
197
197
  ::slotted([role="option"][aria-hidden="true"]),
198
198
  ::slotted([role="option"][disabled]),
199
- ::slotted([role="option"][hidden]) { display: none !important }`,_l=Yl(qn),Wi,Pi=0,$l=Ln||Oe,Vi="click,focusout,input,keydown,mousedown,mouseup",Ui="focus,focusin,blur,focusout",Ne={singular:"%d hit",plural:"%d hits"},Di=class extends Mi{constructor(){super(),this._texts=Bl({},Ne),this._value="",this._of="/",Xl(this,qn)}static get observedAttributes(){return["id",...Object.keys(Ne).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ni(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),Cn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Cn(this,!1),Wn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ne[o])this._texts[o]=n||Ne[o];else if(this._root){this._input&&Pn(this,this._input);for(const r of this._root.querySelectorAll(i))Pn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&nc(this,t),(n==="focus"||n==="focusin")&&tc(this,t),(n==="blur"||n==="focusout")&&ec(this,t),n==="keydown"&&oc(this,t),n==="mousedown"&&this.contains(e)&&Nn(t),(n==="mutation"||n==="input")&&(clearTimeout(Pi),Pi=setTimeout(Bi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},zi=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=zi(t?._input)||!e,(n=Cn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Pn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&Bi(t)},Wn=t=>{t._input&&(Me(t._input||t,Ui,t),Me(t._root||t,Vi,t),Gt(t,!1),t._input=void 0)},Pn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",On(t)),Ft(e,Ui,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",On(t)),L(e,"aria-expanded",`${!$l||n}`),L(e,"autocomplete","off"),L(e,"role",zi(e)?null:"combobox")},tc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Wn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Gl,On((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Vi,t),Gt(t,L(t._input,"inputmode")!=="none"),qi())},ec=(t,e)=>{!Oe&&!Nn()&&t._input&&setTimeout(Fi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Fi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Wn(t))},nc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),Kl(t._input,o.value);Oe&&Fi(t)},oc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},Bi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(Wi),e?.type==="input"&&a!==t._value&&(Wi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&qi(p),t._value=a},1e3));let u=0;if(Ln)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ni(this).getElementById(L(this,"list")||"")}}),Ri.define("u-datalist",Di),lt()&&!Wl()&&Pl();const ic="3.1.0",Gi="_alert_1d3iq_1 _ds-alert_1p2fg_3",Hi="_app_1d3iq_1",Ji="_sticky_1d3iq_1",Xi="_avatar_1d3iq_1 _ds-avatar_1p2fg_1",ji="_badge_1d3iq_1",Zi="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_1p2fg_5",Ki="_button_1d3iq_1 _ds-button_1p2fg_1",Yi="_card_1d3iq_1",Qi="_group_1d3iq_1",_i="_chip_1d3iq_1 _ds-chip_1p2fg_5",$i="_details_1d3iq_1 _ds-details_1p2fg_3",tr="_dialog_1d3iq_1 _ds-dialog_1p2fg_5",er="__drawer_1d3iq_1",nr="_divider_1d3iq_1",or="_errorsummary_1d3iq_1 _ds-error-summary_1p2fg_5",ir="_field_1d3iq_1 _ds-field_1p2fg_1",rr="_suggestion_1d3iq_1 _ds-suggestion_1p2fg_5",ar="_affixes_1d3iq_1 _ds-field-affixes_1p2fg_3",sr="_fieldset_1d3iq_1 _ds-fieldset_1p2fg_3",lr="_fileupload_1d3iq_1",cr="_helptext_1d3iq_1 _ds-focus_1p2fg_1",dr="_input_1d3iq_1 _ds-input_1p2fg_1",ur="_law_1d3iq_1",pr="_grid_1d3iq_1",mr="_flex_1d3iq_1",fr="_link_1d3iq_1",hr="_logo_1d3iq_1",gr="__logo_1d3iq_1",vr="_pagination_1d3iq_1 _ds-pagination_1p2fg_5",br="_popover_1d3iq_1 _ds-popover_1p2fg_3",wr="_progress_1d3iq_1",yr="__indeterminate_1d3iq_1",xr="_skeleton_1d3iq_1 _ds-skeleton_1p2fg_5",Er="__skeleton_1d3iq_1",Sr="_spinner_1d3iq_1",kr="_steps_1d3iq_1",Tr="_table_1d3iq_1 _ds-table_1p2fg_5",Ar="__scrollShadow_1d3iq_1",Lr="_tabs_1d3iq_1 _ds-tabs_1p2fg_5",Cr="__scrollMask_1d3iq_1",Or="_tag_1d3iq_1 _ds-tag_1p2fg_5",Mr="_toast_1d3iq_1",Ir="__toastClose_1d3iq_1",Nr="__toastOpen_1d3iq_1",Rr="__toastTimeout_1d3iq_1",qr="_togglegroup_1d3iq_1 _ds-toggle-group_1p2fg_5",Wr="__tooltip_1d3iq_1 _ds-tooltip_1p2fg_5",Pr="_heading_1d3iq_1 _ds-heading_1p2fg_1",Vr="_ingress_1d3iq_1",Ur="_muted_1d3iq_1",Dr="_info_1d3iq_1",zr="_prose_1d3iq_1",Fr="_validation_1d3iq_1 _ds-validation-message_1p2fg_1",Br="_body_1d3iq_161",Gr="__checked_1d3iq_1",C={alert:Gi,app:Hi,sticky:Ji,avatar:Xi,badge:ji,breadcrumbs:Zi,button:Ki,card:Yi,group:Qi,chip:_i,details:$i,dialog:tr,_drawer:er,divider:nr,errorsummary:or,field:ir,suggestion:rr,affixes:ar,fieldset:sr,fileupload:lr,helptext:cr,input:dr,law:ur,grid:pr,flex:mr,link:fr,logo:hr,_logo:gr,pagination:vr,popover:br,progress:wr,_indeterminate:yr,skeleton:xr,_skeleton:Er,spinner:Sr,steps:kr,table:Tr,_scrollShadow:Ar,tabs:Lr,_scrollMask:Cr,tag:Or,toast:Mr,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,togglegroup:qr,_tooltip:Wr,heading:Pr,ingress:Vr,muted:Ur,info:Dr,prose:zr,validation:Fr,body:Br,_checked:Gr},rc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Gr,_drawer:er,_indeterminate:yr,_logo:gr,_scrollMask:Cr,_scrollShadow:Ar,_skeleton:Er,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,_tooltip:Wr,affixes:ar,alert:Gi,app:Hi,avatar:Xi,badge:ji,body:Br,breadcrumbs:Zi,button:Ki,card:Yi,chip:_i,default:C,details:$i,dialog:tr,divider:nr,errorsummary:or,field:ir,fieldset:sr,fileupload:lr,flex:mr,grid:pr,group:Qi,heading:Pr,helptext:cr,info:Dr,ingress:Vr,input:dr,law:ur,link:fr,logo:hr,muted:Ur,pagination:vr,popover:br,progress:wr,prose:zr,skeleton:xr,spinner:Sr,steps:kr,sticky:Ji,suggestion:rr,table:Tr,tabs:Lr,tag:Or,toast:Mr,togglegroup:qr,validation:Fr},Symbol.toStringTag,{value:"Module"}));function Hr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Hr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function ac(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Hr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},Q=()=>typeof window<"u"&&typeof document<"u",ht=t=>Q()?document.getElementsByClassName(C[t].split(" ")[0]):[];function gt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const b=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),W=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Jr(t,...e)},Jr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},vt=(t,e)=>{if(!Q())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?W(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Re=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))b(o,i,r);return o},sc=typeof HTMLElement>"u"?class{}:HTMLElement,lc=(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e),cc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,dc=`.${C.breadcrumbs.split(" ")[0]}`,uc=`.${C.card.split(" ")[0]}`,Xr=`.${C.chip.split(" ")[0]}`,pc=`.${C.helptext.split(" ")[0]}`,mc=`.${C.pagination.split(" ")[0]}`,fc='summary,u-summary,a,button,[role="tab"],[role="button"]',Vn="mattilsynet.matomo.cloud",hc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],J="mtds-analytics-banner",gc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function jr(t,e={}){if(Q()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Vn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&vc();const a=r?`https://cdn.matomo.cloud/${Vn}/container_${r}.js`:`https://cdn.matomo.cloud/${Vn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;hc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function vc(){if(document.getElementById(J)||window.localStorage.getItem(J))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${J}" data-analytics="ignore"><style>
199
+ ::slotted([role="option"][hidden]) { display: none !important }`,_l=Yl(qn),Wi,Pi=0,$l=Ln||Oe,Vi="click,focusout,input,keydown,mousedown,mouseup",Ui="focus,focusin,blur,focusout",Ne={singular:"%d hit",plural:"%d hits"},Di=class extends Mi{constructor(){super(),this._texts=Bl({},Ne),this._value="",this._of="/",Xl(this,qn)}static get observedAttributes(){return["id",...Object.keys(Ne).map(t=>`data-sr-${t}`)]}connectedCallback(){this.hidden=!0,this._root=Ni(this),L(this,"role","listbox"),L(this,"tabindex","-1"),Ft(this._root,"focusin",this),Ft(this._root,"focus",this,!0),Cn(this,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),setTimeout(()=>this.attributeChangedCallback())}disconnectedCallback(){Me(this._root||this,"focus",this,!0),Me(this._root||this,"focusin",this),Cn(this,!1),Wn(this),this._root=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1],i=`input[list="${this.id}"]`;if(Ne[o])this._texts[o]=n||Ne[o];else if(this._root){this._input&&Pn(this,this._input);for(const r of this._root.querySelectorAll(i))Pn(this,r)}}handleEvent(t){const{target:e,type:n}=t;t.defaultPrevented||(n==="click"&&nc(this,t),(n==="focus"||n==="focusin")&&tc(this,t),(n==="blur"||n==="focusout")&&ec(this,t),n==="keydown"&&oc(this,t),n==="mousedown"&&this.contains(e)&&Nn(t),(n==="mutation"||n==="input")&&(clearTimeout(Pi),Pi=setTimeout(Bi,0,this,t)))}get options(){var t;if(!this._options){const e=(t=this.querySelector('[role="option"],option'))==null?void 0:t.nodeName;e&&(this._options=this.getElementsByTagName(e))}return this._options||this.getElementsByTagName("option")}},zi=t=>t?.disabled||t?.readOnly||!1,Gt=(t,e)=>{var n,o,i;if(t.hidden!==e)return;t.hidden=zi(t?._input)||!e,(n=Cn(t))==null||n.takeRecords();const r=t.isConnected&&t.popover&&((o=t._input)==null?void 0:o.isConnected)&&((i=t._input)==null?void 0:i.popoverTargetElement)===t;t._input&&Pn(t,t._input,e),r&&L(t,"popover","manual"),r&&t.togglePopover(e),e&&Bi(t)},Wn=t=>{t._input&&(Me(t._input||t,Ui,t),Me(t._root||t,Vi,t),Gt(t,!1),t._input=void 0)},Pn=(t,e,n=!1)=>{t.popover&&L(e,"popovertarget",On(t)),Ft(e,Ui,t,!0),L(e,"aria-autocomplete","list"),L(e,"aria-controls",On(t)),L(e,"aria-expanded",`${!$l||n}`),L(e,"autocomplete","off"),L(e,"role",zi(e)?null:"combobox")},tc=(t,e)=>{var n;const o=e.target instanceof HTMLInputElement;o&&e.isTrusted&&e.stopImmediatePropagation(),t._input!==e.target&&o&&e.target.list===t&&(t._input&&Wn(t),t._input=e.target,t._input.dispatchEvent(new FocusEvent("focus")),t._input.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),L(t,Gl,On((n=t._input.labels)==null?void 0:n[0])),Ft(t._root||t,Vi,t),Gt(t,L(t._input,"inputmode")!=="none"),qi())},ec=(t,e)=>{!Oe&&!Nn()&&t._input&&setTimeout(Fi,0,t),e.target===t._input&&e.isTrusted&&e.stopImmediatePropagation()},Fi=t=>{var e;const n=((e=t._root)==null?void 0:e.activeElement)||null,o=t._input;o&&o!==n&&!t.contains(n)&&(o.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n})),Wn(t))},nc=(t,{target:e})=>{var n;if(!t._input||t._input===e)return Gt(t,!0);for(const o of t.options)if(o.contains(e))return L(t,"aria-multiselectable")!=="true"&&((n=t._input)==null||n.focus(),Gt(t,!1)),Kl(t._input,o.value);Oe&&Fi(t)},oc=(t,e)=>{var n;const{key:o,target:i,altKey:r,ctrlKey:a,shiftKey:s,metaKey:c}=e,l=o==="Escape"||o==="Esc";if(r||a||c||s||o==="Tab")return;l&&!t.hidden&&e?.preventDefault(),Gt(t,!l);const d=[...t.options].filter(f=>L(f,"aria-hidden")!=="true"&&f.offsetHeight),u=d.indexOf(i);let p=-1;if(o==="ArrowDown"&&(p=(u+1)%d.length),o==="ArrowUp"&&(p=(~u?u:d.length)-1),~u&&((o==="Home"||o==="PageUp")&&(p=0),(o==="End"||o==="PageDown")&&(p=d.length-1),o==="Enter"))return d[u].click(),e.preventDefault();if(d[p])for(const f of d)f.tabIndex=-1;d[p]&&e.preventDefault(),(n=d[p]||t._input)==null||n.focus(),!d[p]&&o==="ArrowUp"&&setTimeout(()=>{var f;return(f=t._input)==null?void 0:f.setSelectionRange(999,999)})},Bi=(t,e)=>{const{_texts:n,_root:o,_input:i,options:r}=t,a=i?.value.toLowerCase().trim()||"",s=!t.hasAttribute("data-nofilter"),c=[],l=[];for(const p of r)(p.disabled||p.hidden||s&&!p.label.toLowerCase().includes(a)?c:l).push(p);for(const p of c)L(p,"aria-hidden","true");for(const p of l)L(p,"aria-hidden","false");const d=l.length;clearTimeout(Wi),e?.type==="input"&&a!==t._value&&(Wi=setTimeout(()=>{const p=`${!d&&t.innerText.trim()||`${n[d===1?"singular":"plural"]}`.replace("%d",`${d}`)}`;!t.hidden&&o?.activeElement===i&&qi(p),t._value=a},1e3));let u=0;if(Ln)for(const p of l)L(p,"title",`${++u} ${t._of} ${d}`)};zt&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){return Ni(this).getElementById(L(this,"list")||"")}}),Ri.define("u-datalist",Di),lt()&&!Wl()&&Pl();const ic="3.1.2",Gi="_alert_1d3iq_1 _ds-alert_1p2fg_3",Hi="_app_1d3iq_1",Ji="_sticky_1d3iq_1",Xi="_avatar_1d3iq_1 _ds-avatar_1p2fg_1",ji="_badge_1d3iq_1",Zi="_breadcrumbs_1d3iq_1 _ds-breadcrumbs_1p2fg_5",Ki="_button_1d3iq_1 _ds-button_1p2fg_1",Yi="_card_1d3iq_1",Qi="_group_1d3iq_1",_i="_chip_1d3iq_1 _ds-chip_1p2fg_5",$i="_details_1d3iq_1 _ds-details_1p2fg_3",tr="_dialog_1d3iq_1 _ds-dialog_1p2fg_5",er="__drawer_1d3iq_1",nr="_divider_1d3iq_1",or="_errorsummary_1d3iq_1 _ds-error-summary_1p2fg_5",ir="_field_1d3iq_1 _ds-field_1p2fg_1",rr="_suggestion_1d3iq_1 _ds-suggestion_1p2fg_5",ar="_affixes_1d3iq_1 _ds-field-affixes_1p2fg_3",sr="_fieldset_1d3iq_1 _ds-fieldset_1p2fg_3",lr="_fileupload_1d3iq_1",cr="_helptext_1d3iq_1 _ds-focus_1p2fg_1",dr="_input_1d3iq_1 _ds-input_1p2fg_1",ur="_law_1d3iq_1",pr="_grid_1d3iq_1",mr="_flex_1d3iq_1",fr="_link_1d3iq_1",hr="_logo_1d3iq_1",gr="__logo_1d3iq_1",vr="_pagination_1d3iq_1 _ds-pagination_1p2fg_5",br="_popover_1d3iq_1 _ds-popover_1p2fg_3",wr="_progress_1d3iq_1",yr="__indeterminate_1d3iq_1",xr="_skeleton_1d3iq_1 _ds-skeleton_1p2fg_5",Er="__skeleton_1d3iq_1",Sr="_spinner_1d3iq_1",kr="_steps_1d3iq_1",Tr="_table_1d3iq_1 _ds-table_1p2fg_5",Ar="__scrollShadow_1d3iq_1",Lr="_tabs_1d3iq_1 _ds-tabs_1p2fg_5",Cr="__scrollMask_1d3iq_1",Or="_tag_1d3iq_1 _ds-tag_1p2fg_5",Mr="_toast_1d3iq_1",Ir="__toastClose_1d3iq_1",Nr="__toastOpen_1d3iq_1",Rr="__toastTimeout_1d3iq_1",qr="_togglegroup_1d3iq_1 _ds-toggle-group_1p2fg_5",Wr="__tooltip_1d3iq_1 _ds-tooltip_1p2fg_5",Pr="_heading_1d3iq_1 _ds-heading_1p2fg_1",Vr="_ingress_1d3iq_1",Ur="_muted_1d3iq_1",Dr="_info_1d3iq_1",zr="_prose_1d3iq_1",Fr="_validation_1d3iq_1 _ds-validation-message_1p2fg_1",Br="_body_1d3iq_161",Gr="__checked_1d3iq_1",C={alert:Gi,app:Hi,sticky:Ji,avatar:Xi,badge:ji,breadcrumbs:Zi,button:Ki,card:Yi,group:Qi,chip:_i,details:$i,dialog:tr,_drawer:er,divider:nr,errorsummary:or,field:ir,suggestion:rr,affixes:ar,fieldset:sr,fileupload:lr,helptext:cr,input:dr,law:ur,grid:pr,flex:mr,link:fr,logo:hr,_logo:gr,pagination:vr,popover:br,progress:wr,_indeterminate:yr,skeleton:xr,_skeleton:Er,spinner:Sr,steps:kr,table:Tr,_scrollShadow:Ar,tabs:Lr,_scrollMask:Cr,tag:Or,toast:Mr,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,togglegroup:qr,_tooltip:Wr,heading:Pr,ingress:Vr,muted:Ur,info:Dr,prose:zr,validation:Fr,body:Br,_checked:Gr},rc=Object.freeze(Object.defineProperty({__proto__:null,_checked:Gr,_drawer:er,_indeterminate:yr,_logo:gr,_scrollMask:Cr,_scrollShadow:Ar,_skeleton:Er,_toastClose:Ir,_toastOpen:Nr,_toastTimeout:Rr,_tooltip:Wr,affixes:ar,alert:Gi,app:Hi,avatar:Xi,badge:ji,body:Br,breadcrumbs:Zi,button:Ki,card:Yi,chip:_i,default:C,details:$i,dialog:tr,divider:nr,errorsummary:or,field:ir,fieldset:sr,fileupload:lr,flex:mr,grid:pr,group:Qi,heading:Pr,helptext:cr,info:Dr,ingress:Vr,input:dr,law:ur,link:fr,logo:hr,muted:Ur,pagination:vr,popover:br,progress:wr,prose:zr,skeleton:xr,spinner:Sr,steps:kr,sticky:Ji,suggestion:rr,table:Tr,tabs:Lr,tag:Or,toast:Mr,togglegroup:qr,validation:Fr},Symbol.toStringTag,{value:"Module"}));function Hr(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Hr(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function ac(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Hr(t))&&(o&&(o+=" "),o+=e);return o}const Ht={capture:!0,passive:!0},Q=()=>typeof window<"u"&&typeof document<"u",ht=t=>Q()?document.getElementsByClassName(C[t].split(" ")[0]):[];function gt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const b=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),W=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Jr(t,...e)},Jr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},vt=(t,e)=>{if(!Q())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?W(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},Re=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))b(o,i,r);return o},sc=typeof HTMLElement>"u"?class{}:HTMLElement,lc=(t,e)=>!Q()||window.customElements.get(t)||window.customElements.define(t,e),cc=`[data-command="toggle-app-expanded"],.${C.app.split(" ")[0]} > [command="show-modal"]`,dc=`.${C.breadcrumbs.split(" ")[0]}`,uc=`.${C.card.split(" ")[0]}`,Xr=`.${C.chip.split(" ")[0]}`,pc=`.${C.helptext.split(" ")[0]}`,mc=`.${C.pagination.split(" ")[0]}`,fc='summary,u-summary,a,button,[role="tab"],[role="button"]',Vn="mattilsynet.matomo.cloud",hc=["setCustomUrl","setDocumentTitle","setReferrerUrl"],J="mtds-analytics-banner",gc="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function jr(t,e={}){if(Q()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${Vn}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&vc();const a=r?`https://cdn.matomo.cloud/${Vn}/container_${r}.js`:`https://cdn.matomo.cloud/${Vn}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(c=>c!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;hc.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function vc(){if(document.getElementById(J)||window.localStorage.getItem(J))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${J}" data-analytics="ignore"><style>
200
200
  #${J}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
201
201
  #${J} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
202
202
  #${J} button:focus-visible { outline: 2px solid }
@@ -1,4 +1,4 @@
1
- const o = "3.1.0";
1
+ const o = "3.1.2";
2
2
  export {
3
3
  o as version
4
4
  };