@oslokommune/punkt-react 14.0.4 → 14.1.1

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.
@@ -1021,15 +1021,15 @@ var Cr = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, ss = (i, t
1021
1021
  (r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
1022
1022
  return s && n && Cr(t, e, n), n;
1023
1023
  };
1024
- const Gs = "https://punkt-cdn.oslo.kommune.no/14.0/icons/";
1024
+ const Gs = "https://punkt-cdn.oslo.kommune.no/14.1/icons/";
1025
1025
  typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || Gs);
1026
1026
  const Nr = (i) => new Promise((t) => setTimeout(t, i)), ms = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', Fs = {}, Ar = async (i, t) => {
1027
1027
  let e = 0;
1028
1028
  for (; Fs[t + i + ".svg"] === "fetching" && (e++, !(e > 50)); )
1029
1029
  await Nr(50);
1030
- const s = typeof Storage < "u" && typeof localStorage < "u";
1031
- return s && localStorage.getItem(t + i + ".svg") ? Promise.resolve(localStorage.getItem(t + i + ".svg")) : typeof window < "u" && typeof window.pktFetch == "function" ? (Fs[t + i + ".svg"] = "fetching", Promise.resolve(
1032
- window.pktFetch(t + i + ".svg").then((n) => n.ok ? n.text() : (console.error("Missing icon: " + t + i + ".svg"), ms)).then((n) => (n !== ms && s && localStorage.setItem(t + i + ".svg", n), Fs[t + i + ".svg"] = "fetched", n))
1030
+ const s = typeof Storage < "u" && typeof sessionStorage < "u";
1031
+ return s && sessionStorage.getItem(t + i + ".svg") ? Promise.resolve(sessionStorage.getItem(t + i + ".svg")) : typeof window < "u" && typeof window.pktFetch == "function" ? (Fs[t + i + ".svg"] = "fetching", Promise.resolve(
1032
+ window.pktFetch(t + i + ".svg").then((n) => n.ok ? n.text() : (console.error("Missing icon: " + t + i + ".svg"), ms)).then((n) => (n !== ms && s && sessionStorage.setItem(t + i + ".svg", n), Fs[t + i + ".svg"] = "fetched", n))
1033
1033
  )) : Promise.resolve(ms);
1034
1034
  };
1035
1035
  let Qe = class extends G {
@@ -1080,7 +1080,7 @@ var Er = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, bt = (i, t
1080
1080
  (r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
1081
1081
  return s && n && Er(t, e, n), n;
1082
1082
  };
1083
- window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.0/animations/";
1083
+ window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.1/animations/";
1084
1084
  let dt = class extends G {
1085
1085
  constructor() {
1086
1086
  super(), this.defaultSlot = O(), this.iconName = "user", this.secondIconName = "user", this.mode = "light", this.size = "medium", this.fullWidth = !1, this.fullWidthOnMobile = !1, this.skin = "primary", this.variant = "label-only", this.state = "normal", this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = window.pktAnimationPath, this.slotController = new at(this, this.defaultSlot);
@@ -8046,7 +8046,7 @@ var Ch = Object.defineProperty, Th = Object.getOwnPropertyDescriptor, J = (i, t,
8046
8046
  (r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
8047
8047
  return s && n && Ch(t, e, n), n;
8048
8048
  };
8049
- const Nh = "https://punkt-cdn.oslo.kommune.no/14.0/logos/";
8049
+ const Nh = "https://punkt-cdn.oslo.kommune.no/14.1/logos/";
8050
8050
  let Y = class extends G {
8051
8051
  constructor() {
8052
8052
  super(), this.searchPlaceholder = "Søk", this.searchValue = "", this.mobileBreakpoint = 768, this.tabletBreakpoint = 1280, this.openedMenu = "none", this.logOutButtonPlacement = "none", this.position = "fixed", this.scrollBehavior = "hide", this.hideLogo = !1, this.compact = !1, this.showSearch = !1, this.canChangeRepresentation = !1, this.hasLogOut = !1, this.isMobile = !1, this.isTablet = !1, this.openMenu = "none", this.isHidden = !1, this.componentWidth = typeof window < "u" ? window.innerWidth : 0, this.hasSlotContent = !1, this.alignSlotRight = !1, this.alignSearchRight = !1, this.defaultSlot = O(), this.headerRef = O(), this.userContainerRef = O(), this.slotContainerRef = O(), this.searchContainerRef = O(), this.slotContentRef = O(), this.searchMenuRef = O(), this.lastScrollPosition = 0, this.savedScrollY = 0, this.lastFocusedElement = null, this.shouldRestoreFocus = !1, this.handleScroll = () => {
@@ -8742,7 +8742,7 @@ var Ph = Object.defineProperty, Dh = Object.getOwnPropertyDescriptor, Ne = (i, t
8742
8742
  (r = i[a]) && (n = (s ? r(t, e, n) : r(n)) || n);
8743
8743
  return s && n && Ph(t, e, n), n;
8744
8744
  };
8745
- window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.0/animations/";
8745
+ window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.1/animations/";
8746
8746
  let re = class extends G {
8747
8747
  constructor() {
8748
8748
  super(), this.defaultSlot = O(), this.delay = 0, this.inline = !1, this.isLoading = !0, this.message = null, this.size = "medium", this.variant = "shapes", this.loadingAnimationPath = window.pktAnimationPath, this._shouldDisplayLoader = !1, this.slotController = new at(this, this.defaultSlot);
@@ -10173,7 +10173,7 @@ const Ku = X(
10173
10173
  ] });
10174
10174
  }
10175
10175
  );
10176
- window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.0/animations/";
10176
+ window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/14.1/animations/";
10177
10177
  const xe = X(
10178
10178
  ({
10179
10179
  children: i,
@@ -11055,7 +11055,7 @@ const Sc = X(
11055
11055
  {
11056
11056
  name: "oslologo",
11057
11057
  "aria-hidden": "true",
11058
- path: "https://punkt-cdn.oslo.kommune.no/14.0/logos/"
11058
+ path: "https://punkt-cdn.oslo.kommune.no/14.1/logos/"
11059
11059
  }
11060
11060
  ) }) : et ? /* @__PURE__ */ h(
11061
11061
  "button",
@@ -11068,7 +11068,7 @@ const Sc = X(
11068
11068
  {
11069
11069
  name: "oslologo",
11070
11070
  "aria-hidden": "true",
11071
- path: "https://punkt-cdn.oslo.kommune.no/14.0/logos/"
11071
+ path: "https://punkt-cdn.oslo.kommune.no/14.1/logos/"
11072
11072
  }
11073
11073
  )
11074
11074
  }
@@ -11077,7 +11077,7 @@ const Sc = X(
11077
11077
  {
11078
11078
  name: "oslologo",
11079
11079
  "aria-hidden": "true",
11080
- path: "https://punkt-cdn.oslo.kommune.no/14.0/logos/"
11080
+ path: "https://punkt-cdn.oslo.kommune.no/14.1/logos/"
11081
11081
  }
11082
11082
  ) }),
11083
11083
  T && /* @__PURE__ */ h("span", { className: "pkt-header-service__service-name", children: b ? /* @__PURE__ */ h(ln, { href: b, className: "pkt-header-service__service-link ", children: T }) : w ? /* @__PURE__ */ h("button", { className: "pkt-link-button pkt-link pkt-header-service__service-link", onClick: w, children: T }) : /* @__PURE__ */ h("span", { className: "pkt-header-service__service-link", children: T }) })
@@ -95,11 +95,11 @@
95
95
  * @license
96
96
  * Copyright 2017 Google LLC
97
97
  * SPDX-License-Identifier: BSD-3-Clause
98
- */let Ui=class extends gi{};Ui.directiveName="unsafeSVG",Ui.resultType=2;const Un=He(Ui);var Hr=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Ls=(s,t,e,i)=>{for(var n=i>1?void 0:i?Vr(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Hr(t,e,n),n};const zi="https://punkt-cdn.oslo.kommune.no/14.0/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||zi);const Ur=s=>new Promise(t=>setTimeout(t,s)),vi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',qi={},zr=async(s,t)=>{let e=0;for(;qi[t+s+".svg"]==="fetching"&&(e++,!(e>50));)await Ur(50);const i=typeof Storage<"u"&&typeof localStorage<"u";return i&&localStorage.getItem(t+s+".svg")?Promise.resolve(localStorage.getItem(t+s+".svg")):typeof window<"u"&&typeof window.pktFetch=="function"?(qi[t+s+".svg"]="fetching",Promise.resolve(window.pktFetch(t+s+".svg").then(n=>n.ok?n.text():(console.error("Missing icon: "+t+s+".svg"),vi)).then(n=>(n!==vi&&i&&localStorage.setItem(t+s+".svg",n),qi[t+s+".svg"]="fetched",n)))):Promise.resolve(vi)};let Ue=class extends X{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:zi,this.name="",this.icon=Un(vi),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path=typeof window<"u"?window.pktIconPath:zi),this.icon=Un(await zr(this.name||"",this.path).then(e=>e)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return d`${this.name&&this.icon}`}};Ls([o({type:String,reflect:!1})],Ue.prototype,"path",2),Ls([o({type:String,reflect:!0})],Ue.prototype,"name",2),Ls([o({type:SVGElement})],Ue.prototype,"icon",2),Ls([o({type:Array,noAccessor:!0})],Ue.prototype,"_updatedProps",2),Ue=Ls([F("pkt-icon")],Ue);/**
98
+ */let Ui=class extends gi{};Ui.directiveName="unsafeSVG",Ui.resultType=2;const Un=He(Ui);var Hr=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Ls=(s,t,e,i)=>{for(var n=i>1?void 0:i?Vr(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Hr(t,e,n),n};const zi="https://punkt-cdn.oslo.kommune.no/14.1/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||zi);const Ur=s=>new Promise(t=>setTimeout(t,s)),vi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',qi={},zr=async(s,t)=>{let e=0;for(;qi[t+s+".svg"]==="fetching"&&(e++,!(e>50));)await Ur(50);const i=typeof Storage<"u"&&typeof sessionStorage<"u";return i&&sessionStorage.getItem(t+s+".svg")?Promise.resolve(sessionStorage.getItem(t+s+".svg")):typeof window<"u"&&typeof window.pktFetch=="function"?(qi[t+s+".svg"]="fetching",Promise.resolve(window.pktFetch(t+s+".svg").then(n=>n.ok?n.text():(console.error("Missing icon: "+t+s+".svg"),vi)).then(n=>(n!==vi&&i&&sessionStorage.setItem(t+s+".svg",n),qi[t+s+".svg"]="fetched",n)))):Promise.resolve(vi)};let Ue=class extends X{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:zi,this.name="",this.icon=Un(vi),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path=typeof window<"u"?window.pktIconPath:zi),this.icon=Un(await zr(this.name||"",this.path).then(e=>e)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return d`${this.name&&this.icon}`}};Ls([o({type:String,reflect:!1})],Ue.prototype,"path",2),Ls([o({type:String,reflect:!0})],Ue.prototype,"name",2),Ls([o({type:SVGElement})],Ue.prototype,"icon",2),Ls([o({type:Array,noAccessor:!0})],Ue.prototype,"_updatedProps",2),Ue=Ls([F("pkt-icon")],Ue);/**
99
99
  * @license
100
100
  * Copyright 2018 Google LLC
101
101
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const C=s=>s??y;var qr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,vt=(s,t,e,i)=>{for(var n=i>1?void 0:i?Wr(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&qr(t,e,n),n};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.0/animations/";let pt=class extends X{constructor(){super(),this.defaultSlot=E(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new rt(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&i==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&i==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,e={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return d`
102
+ */const C=s=>s??y;var qr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,vt=(s,t,e,i)=>{for(var n=i>1?void 0:i?Wr(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&qr(t,e,n),n};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.1/animations/";let pt=class extends X{constructor(){super(),this.defaultSlot=E(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new rt(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&i==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&i==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,e={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return d`
103
103
  <button
104
104
  class=${N(e)}
105
105
  type=${this.type}
@@ -1175,7 +1175,7 @@
1175
1175
  `:y}
1176
1176
  </ul>
1177
1177
  </nav>
1178
- `}};Xe([o({type:Object})],Pe.prototype,"user",2),Xe([o({type:String,attribute:"formatted-last-logged-in"})],Pe.prototype,"formattedLastLoggedIn",2),Xe([o({type:Object})],Pe.prototype,"representing",2),Xe([o({type:Array,attribute:"user-menu"})],Pe.prototype,"userMenu",2),Xe([o({type:Boolean,attribute:"can-change-representation",converter:Yt})],Pe.prototype,"canChangeRepresentation",2),Xe([o({type:Boolean,attribute:"logout-on-click",converter:Yt})],Pe.prototype,"logoutOnClick",2),Pe=Xe([F("pkt-header-user-menu")],Pe);var Hh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Q=(s,t,e,i)=>{for(var n=i>1?void 0:i?Vh(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Hh(t,e,n),n};const Uh="https://punkt-cdn.oslo.kommune.no/14.0/logos/";let G=class extends X{constructor(){super(),this.searchPlaceholder="Søk",this.searchValue="",this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu="none",this.logOutButtonPlacement="none",this.position="fixed",this.scrollBehavior="hide",this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1,this.isMobile=!1,this.isTablet=!1,this.openMenu="none",this.isHidden=!1,this.componentWidth=typeof window<"u"?window.innerWidth:0,this.hasSlotContent=!1,this.alignSlotRight=!1,this.alignSearchRight=!1,this.defaultSlot=E(),this.headerRef=E(),this.userContainerRef=E(),this.slotContainerRef=E(),this.searchContainerRef=E(),this.slotContentRef=E(),this.searchMenuRef=E(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;const t=window.pageYOffset||document.documentElement.scrollTop;t<0||Math.abs(t-this.lastScrollPosition)<60||(this.isHidden=t>this.lastScrollPosition,this.lastScrollPosition=t)},this.handleClickOutside=t=>{const e=t.target;this.user&&this.openMenu==="user"&&!e.closest(".pkt-header-service__user-container")&&(this.openMenu="none"),this.openMenu==="slot"&&!e.closest(".pkt-header-service__slot-container")&&(this.openMenu="none"),this.openMenu==="search"&&!e.closest(".pkt-header-service__search-container")&&!e.closest(".pkt-header-service__search-input")&&(this.openMenu="none")},this.handleFocusOut=(t,e)=>{const i=t.relatedTarget;let n;switch(e){case"user":n=this.userContainerRef;break;case"slot":n=this.slotContainerRef;break;case"search":n=this.searchContainerRef;break;default:return}const a=n.value;a&&(!i||!a.contains(i))&&(this.openMenu="none")},this.handleEscapeKey=t=>{t.key==="Escape"&&this.openMenu!=="none"&&(t.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu="none")},this.slotController=new rt(this,this.defaultSlot)}updateSlots(t){this.hasSlotContent=t.has(null)||t.has(void 0)}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.resizeObserver)==null||t.disconnect(),window.removeEventListener("scroll",this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(t){if(super.updated(t),t.has("openedMenu")&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(t.has("mobileBreakpoint")||t.has("tabletBreakpoint"))&&(this.updateIsMobile(),this.updateIsTablet()),t.has("openMenu")){const e=t.get("openMenu");this.openMenu!=="none"&&(e==="none"||e===void 0)?(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleEscapeKey),(this.openMenu==="slot"||this.openMenu==="search")&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu==="none"&&e!=="none"&&(document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleEscapeKey),this.restoreFocus())}(t.has("openMenu")||t.has("isMobile"))&&this.updateScrollLock()}setupResizeObserver(){const t=this.headerRef.value;t&&(this.componentWidth=t.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(e=>{for(const i of e)i.borderBoxSize&&i.borderBoxSize.length>0?this.componentWidth=i.borderBoxSize[0].inlineSize:this.componentWidth=i.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(t))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position==="fixed"&&this.isMobile&&this.openMenu!=="none"?this.lockScroll():this.unlockScroll()}lockScroll(){const t=document.body,e=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;const i=window.innerWidth-e.clientWidth;i>0&&(t.style.paddingRight=`${i}px`),t.style.position="fixed",t.style.top=`-${this.savedScrollY}px`,t.style.left="0",t.style.right="0",t.style.width="100%",t.style.overflow="hidden",e.classList.add("is-scroll-locked")}unlockScroll(){const t=document.body,e=document.documentElement;e.classList.contains("is-scroll-locked")&&(t.style.removeProperty("position"),t.style.removeProperty("top"),t.style.removeProperty("left"),t.style.removeProperty("right"),t.style.removeProperty("width"),t.style.removeProperty("overflow"),t.style.removeProperty("padding-right"),e.classList.remove("is-scroll-locked"),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener("scroll",this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(t){const e=t==="slot"?this.slotContainerRef:this.searchContainerRef,i=t==="slot"?this.slotContentRef:this.searchMenuRef;if(!e.value||!i.value||!this.isTablet||this.isMobile)return;const n=e.value.getBoundingClientRect(),a=i.value.offsetWidth,r=n.left+a>window.innerWidth;t==="slot"?this.alignSlotRight=r:this.alignSearchRight=r}handleMenuToggle(t){this.openMenu!=="none"?this.openMenu="none":(this.lastFocusedElement=document.activeElement,this.openMenu=t)}handleLogoClick(t){this.dispatchEvent(new CustomEvent("logo-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}handleServiceClick(t){this.dispatchEvent(new CustomEvent("service-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}handleLogout(){this.dispatchEvent(new CustomEvent("log-out",{bubbles:!0,composed:!0}))}handleSearch(t){this.dispatchEvent(new CustomEvent("search",{detail:{query:t},bubbles:!0,composed:!0}))}handleSearchChange(t){this.dispatchEvent(new CustomEvent("search-change",{detail:{query:t},bubbles:!0,composed:!0}))}handleSearchInputChange(t){const e=t.target.value;this.handleSearchChange(e)}handleSearchKeyDown(t){t.key==="Enter"&&this.handleSearch(t.target.value)}get formattedLastLoggedIn(){var t;return Bh((t=this.user)==null?void 0:t.lastLoggedIn)}get isFixed(){return this.position==="fixed"}get shouldHideOnScroll(){return this.scrollBehavior==="hide"}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement==="header"||this.logOutButtonPlacement==="both")}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement==="userMenu"||this.logOutButtonPlacement==="both")}renderLogo(){if(this.hideLogo)return y;const t=d`
1178
+ `}};Xe([o({type:Object})],Pe.prototype,"user",2),Xe([o({type:String,attribute:"formatted-last-logged-in"})],Pe.prototype,"formattedLastLoggedIn",2),Xe([o({type:Object})],Pe.prototype,"representing",2),Xe([o({type:Array,attribute:"user-menu"})],Pe.prototype,"userMenu",2),Xe([o({type:Boolean,attribute:"can-change-representation",converter:Yt})],Pe.prototype,"canChangeRepresentation",2),Xe([o({type:Boolean,attribute:"logout-on-click",converter:Yt})],Pe.prototype,"logoutOnClick",2),Pe=Xe([F("pkt-header-user-menu")],Pe);var Hh=Object.defineProperty,Vh=Object.getOwnPropertyDescriptor,Q=(s,t,e,i)=>{for(var n=i>1?void 0:i?Vh(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Hh(t,e,n),n};const Uh="https://punkt-cdn.oslo.kommune.no/14.1/logos/";let G=class extends X{constructor(){super(),this.searchPlaceholder="Søk",this.searchValue="",this.mobileBreakpoint=768,this.tabletBreakpoint=1280,this.openedMenu="none",this.logOutButtonPlacement="none",this.position="fixed",this.scrollBehavior="hide",this.hideLogo=!1,this.compact=!1,this.showSearch=!1,this.canChangeRepresentation=!1,this.hasLogOut=!1,this.isMobile=!1,this.isTablet=!1,this.openMenu="none",this.isHidden=!1,this.componentWidth=typeof window<"u"?window.innerWidth:0,this.hasSlotContent=!1,this.alignSlotRight=!1,this.alignSearchRight=!1,this.defaultSlot=E(),this.headerRef=E(),this.userContainerRef=E(),this.slotContainerRef=E(),this.searchContainerRef=E(),this.slotContentRef=E(),this.searchMenuRef=E(),this.lastScrollPosition=0,this.savedScrollY=0,this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(!this.shouldHideOnScroll)return;const t=window.pageYOffset||document.documentElement.scrollTop;t<0||Math.abs(t-this.lastScrollPosition)<60||(this.isHidden=t>this.lastScrollPosition,this.lastScrollPosition=t)},this.handleClickOutside=t=>{const e=t.target;this.user&&this.openMenu==="user"&&!e.closest(".pkt-header-service__user-container")&&(this.openMenu="none"),this.openMenu==="slot"&&!e.closest(".pkt-header-service__slot-container")&&(this.openMenu="none"),this.openMenu==="search"&&!e.closest(".pkt-header-service__search-container")&&!e.closest(".pkt-header-service__search-input")&&(this.openMenu="none")},this.handleFocusOut=(t,e)=>{const i=t.relatedTarget;let n;switch(e){case"user":n=this.userContainerRef;break;case"slot":n=this.slotContainerRef;break;case"search":n=this.searchContainerRef;break;default:return}const a=n.value;a&&(!i||!a.contains(i))&&(this.openMenu="none")},this.handleEscapeKey=t=>{t.key==="Escape"&&this.openMenu!=="none"&&(t.preventDefault(),this.shouldRestoreFocus=!0,this.openMenu="none")},this.slotController=new rt(this,this.defaultSlot)}updateSlots(t){this.hasSlotContent=t.has(null)||t.has(void 0)}connectedCallback(){super.connectedCallback(),this.setupScrollListener()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.resizeObserver)==null||t.disconnect(),window.removeEventListener("scroll",this.handleScroll),this.unlockScroll()}firstUpdated(){this.setupResizeObserver()}updated(t){if(super.updated(t),t.has("openedMenu")&&this.openedMenu!==this.openMenu&&(this.openMenu=this.openedMenu),(t.has("mobileBreakpoint")||t.has("tabletBreakpoint"))&&(this.updateIsMobile(),this.updateIsTablet()),t.has("openMenu")){const e=t.get("openMenu");this.openMenu!=="none"&&(e==="none"||e===void 0)?(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleEscapeKey),(this.openMenu==="slot"||this.openMenu==="search")&&requestAnimationFrame(()=>{this.checkDropdownAlignment(this.openMenu)})):this.openMenu==="none"&&e!=="none"&&(document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleEscapeKey),this.restoreFocus())}(t.has("openMenu")||t.has("isMobile"))&&this.updateScrollLock()}setupResizeObserver(){const t=this.headerRef.value;t&&(this.componentWidth=t.offsetWidth,this.updateIsMobile(),this.updateIsTablet(),this.resizeObserver=new ResizeObserver(e=>{for(const i of e)i.borderBoxSize&&i.borderBoxSize.length>0?this.componentWidth=i.borderBoxSize[0].inlineSize:this.componentWidth=i.contentRect.width,this.updateIsMobile(),this.updateIsTablet()}),this.resizeObserver.observe(t))}updateIsMobile(){this.isMobile=this.componentWidth<this.mobileBreakpoint}updateIsTablet(){this.isTablet=this.componentWidth<this.tabletBreakpoint}updateScrollLock(){this.position==="fixed"&&this.isMobile&&this.openMenu!=="none"?this.lockScroll():this.unlockScroll()}lockScroll(){const t=document.body,e=document.documentElement;this.savedScrollY=window.scrollY||window.pageYOffset;const i=window.innerWidth-e.clientWidth;i>0&&(t.style.paddingRight=`${i}px`),t.style.position="fixed",t.style.top=`-${this.savedScrollY}px`,t.style.left="0",t.style.right="0",t.style.width="100%",t.style.overflow="hidden",e.classList.add("is-scroll-locked")}unlockScroll(){const t=document.body,e=document.documentElement;e.classList.contains("is-scroll-locked")&&(t.style.removeProperty("position"),t.style.removeProperty("top"),t.style.removeProperty("left"),t.style.removeProperty("right"),t.style.removeProperty("width"),t.style.removeProperty("overflow"),t.style.removeProperty("padding-right"),e.classList.remove("is-scroll-locked"),window.scrollTo({top:this.savedScrollY}))}setupScrollListener(){window.addEventListener("scroll",this.handleScroll)}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}checkDropdownAlignment(t){const e=t==="slot"?this.slotContainerRef:this.searchContainerRef,i=t==="slot"?this.slotContentRef:this.searchMenuRef;if(!e.value||!i.value||!this.isTablet||this.isMobile)return;const n=e.value.getBoundingClientRect(),a=i.value.offsetWidth,r=n.left+a>window.innerWidth;t==="slot"?this.alignSlotRight=r:this.alignSearchRight=r}handleMenuToggle(t){this.openMenu!=="none"?this.openMenu="none":(this.lastFocusedElement=document.activeElement,this.openMenu=t)}handleLogoClick(t){this.dispatchEvent(new CustomEvent("logo-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}handleServiceClick(t){this.dispatchEvent(new CustomEvent("service-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}handleLogout(){this.dispatchEvent(new CustomEvent("log-out",{bubbles:!0,composed:!0}))}handleSearch(t){this.dispatchEvent(new CustomEvent("search",{detail:{query:t},bubbles:!0,composed:!0}))}handleSearchChange(t){this.dispatchEvent(new CustomEvent("search-change",{detail:{query:t},bubbles:!0,composed:!0}))}handleSearchInputChange(t){const e=t.target.value;this.handleSearchChange(e)}handleSearchKeyDown(t){t.key==="Enter"&&this.handleSearch(t.target.value)}get formattedLastLoggedIn(){var t;return Bh((t=this.user)==null?void 0:t.lastLoggedIn)}get isFixed(){return this.position==="fixed"}get shouldHideOnScroll(){return this.scrollBehavior==="hide"}get showLogoutInHeader(){return this.hasLogOut&&(this.logOutButtonPlacement==="header"||this.logOutButtonPlacement==="both")}get showLogoutInUserMenu(){return this.hasLogOut&&(this.logOutButtonPlacement==="userMenu"||this.logOutButtonPlacement==="both")}renderLogo(){if(this.hideLogo)return y;const t=d`
1179
1179
  <pkt-icon name="oslologo" aria-hidden="true" path=${Uh}></pkt-icon>
1180
1180
  `;return this.logoLink&&typeof this.logoLink=="string"?d`
1181
1181
  <span class="pkt-header-service__logo">
@@ -1406,7 +1406,7 @@
1406
1406
 
1407
1407
  <div class="pkt-linkcard__text" ${M(this.defaultSlot)}></div>
1408
1408
  </a>
1409
- `}};Je([o({type:String,reflect:!0})],De.prototype,"title",2),Je([o({type:String,reflect:!0})],De.prototype,"href",2),Je([o({type:String,reflect:!0})],De.prototype,"iconName",2),Je([o({type:Boolean,reflect:!0})],De.prototype,"external",2),Je([o({type:Boolean,reflect:!0})],De.prototype,"openInNewTab",2),Je([o({type:String,reflect:!0})],De.prototype,"skin",2),De=Je([F("pkt-linkcard")],De);var Kh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,ke=(s,t,e,i)=>{for(var n=i>1?void 0:i?Yh(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Kh(t,e,n),n};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.0/animations/";let ie=class extends X{constructor(){super(),this.defaultSlot=E(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new rt(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=N({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),e=N({"pkt-contents":!0,"pkt-hide":this.isLoading});return d`<div
1409
+ `}};Je([o({type:String,reflect:!0})],De.prototype,"title",2),Je([o({type:String,reflect:!0})],De.prototype,"href",2),Je([o({type:String,reflect:!0})],De.prototype,"iconName",2),Je([o({type:Boolean,reflect:!0})],De.prototype,"external",2),Je([o({type:Boolean,reflect:!0})],De.prototype,"openInNewTab",2),Je([o({type:String,reflect:!0})],De.prototype,"skin",2),De=Je([F("pkt-linkcard")],De);var Kh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,ke=(s,t,e,i)=>{for(var n=i>1?void 0:i?Yh(t,e):t,a=s.length-1,r;a>=0;a--)(r=s[a])&&(n=(i?r(t,e,n):r(n))||n);return i&&n&&Kh(t,e,n),n};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.1/animations/";let ie=class extends X{constructor(){super(),this.defaultSlot=E(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new rt(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=N({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),e=N({"pkt-contents":!0,"pkt-hide":this.isLoading});return d`<div
1410
1410
  role="status"
1411
1411
  aria-live="polite"
1412
1412
  aria-busy=${this.isLoading?"true":"false"}
@@ -1712,4 +1712,4 @@
1712
1712
  Copyright (c) 2018 Jed Watson.
1713
1713
  Licensed under the MIT License (MIT), see
1714
1714
  http://jedwatson.github.io/classnames
1715
- */var Ta;function wc(){return Ta||(Ta=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var a="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(a=n(a,i(h)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return e.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var r="";for(var h in a)t.call(a,h)&&a[h]&&(r=n(r,h));return r}function n(a,r){return r?a?a+" "+r:a+r:a}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(nn)),nn.exports}var xc=wc();const Z=_c(xc),an=({children:s,closeAlert:t,compact:e,title:i,date:n,ariaLive:a,"aria-live":r="polite",role:h="status",skin:c="info",className:p,...m})=>{const[v,$]=_.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${c}`]:c,"pkt-hide":v},k={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!n},x=_.useCallback(()=>{$(!0),m.onClose&&m.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[m.onClose,$]),T=a||r;return l.jsx("div",{...m,"aria-live":T,role:h,className:Z(b,p),children:l.jsxs("div",{className:Z(k),children:[l.jsx(q,{className:"pkt-alert__icon","aria-hidden":"true",name:c==="info"?"alert-information":`alert-${c}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(pe,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:x,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),n&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",n]})]})})};an.displayName="PktAlert";const Na=Jt({tagName:"pkt-backlink",elementClass:ds,react:_,displayName:"PktBackLink"});Na.displayName="PktBackLink";const Sc=_.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},n)=>{const a=s,r=a[a.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:n,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:a.map((c,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===a.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})}):t==="router"?l.jsxs(dn.Link,{to:c.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(q,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):l.jsxs("a",{href:c.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(q,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(dn.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(q,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(q,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.0/animations/";const pe=_.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",iconPath:n,secondIconPath:a,size:r="medium",fullWidth:h=!1,fullWidthOnMobile:c=!1,skin:p="primary",type:m="button",variant:v="label-only",state:$,color:b,isLoading:k=void 0,disabled:x=void 0,loadingAnimationPath:T=window.pktAnimationPath,...S},A)=>{const I=[t,"pkt-btn",r&&`pkt-btn--${r}`,h&&"pkt-btn--full",c&&"pkt-btn--full-small",p&&`pkt-btn--${p}`,v&&`pkt-btn--${v}`,b&&`pkt-btn--${b}`,$&&`pkt-btn--${$}`,k&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...S,"aria-busy":k||void 0,"aria-disabled":x||void 0,disabled:x,className:I,type:m,ref:A,children:[k&&l.jsx(q,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:T}),v!=="label-only"&&l.jsx(q,{className:"pkt-btn__icon",name:e,...n&&{path:n}}),l.jsx("span",{className:"pkt-btn__text",children:s}),v==="icons-right-and-left"&&l.jsx(q,{className:"pkt-btn__icon",name:i,...a&&{path:a}})]})});pe.displayName="PktButton";const Cc=Jt({tagName:"pkt-card",elementClass:ft,react:_,displayName:"PktCard",events:{}}),Ea=_.forwardRef(({children:s,...t},e)=>l.jsx(Cc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));Ea.displayName="PktCard";const Ma=_.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:n,hasError:a=!1,className:r,isSwitch:h=!1,hideLabel:c=!1,labelPosition:p="right",defaultChecked:m,checked:v,indeterminate:$,optionalTag:b,optionalText:k="Valgfritt",requiredTag:x,requiredText:T="Må fylles ut",tagText:S,...A},I)=>{const O=_.useRef(null);_.useEffect(()=>{O.current&&$!==void 0&&(O.current.indeterminate=$)},[$]),_.useEffect(()=>{typeof I=="function"?I(O.current):I&&(I.current=O.current)},[I]);const R=[r,"pkt-input-check"].filter(Boolean).join(" "),et=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,c?"pkt-sr-only":""].filter(Boolean).join(" "),Ot=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),Nt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),it=()=>l.jsxs(l.Fragment,{children:[S&&l.jsx("span",{className:Nt+" pkt-tag--gray",children:S}),b&&l.jsx("span",{className:Nt+" pkt-tag--blue-light",children:k}),x&&l.jsx("span",{className:Nt+" pkt-tag--beige",children:T})]});return l.jsx("div",{className:R,children:l.jsxs("div",{className:Ot,children:[p==="left"&&l.jsxs("label",{className:et,htmlFor:s,children:[i," ",it(),n&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:n})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:O,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...v!==void 0?{checked:v}:{defaultChecked:m},...A}),p==="right"&&l.jsxs("label",{className:et,htmlFor:s,children:[i," ",it(),n&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:n})]})]})})});Ma.displayName="PktCheckbox";const Tc=Jt({tagName:"pkt-combobox",elementClass:nt,react:_,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Aa=_.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Tc,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));Aa.displayName="PktCombobox";const Mi=Jt({tagName:"pkt-consent",elementClass:Rt,react:_,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});Mi.displayName="PktConsent";const Nc=Jt({tagName:"pkt-datepicker",elementClass:ht,react:_,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Oa=_.forwardRef(({helptext:s,...t},e)=>l.jsx(Nc,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));Oa.displayName="PktDatepicker";const Ec=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:n=!1,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:c=null,googleAnalyticsId:p=null,devMode:m=!1,cookieDomain:v=null,cookieSecure:$=null,cookieExpiryDays:b=null,onToggleConsent:k=x=>{console.log(x.detail)}})=>{var T,S;const x=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:x,"data-mode":"dark",children:l.jsxs("div",{className:"pkt-footer__container",children:[l.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(T=s.links)==null?void 0:T.map((A,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(S=t.links)==null?void 0:S.map((A,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),l.jsxs("ul",{className:"pkt-footer__list",children:[l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:a,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:r,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(Mi,{triggerType:"footerlink",hotjarId:c,googleAnalyticsId:p,devMode:m,cookieDomain:v,cookieSecure:$,cookieExpiryDays:b,onToggleConsent:k})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(A=>A.language).map((A,I)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:A.href,"aria-label":`til ${A.language} versjon av nettsiden`,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:A.language})},`sociallinks-language-${I}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(A=>A.iconName).map((A,I)=>l.jsx(_.Fragment,{children:l.jsx("a",{href:A.href,"aria-label":`til ${A.iconName}`,className:"pkt-footer__social-icon-link",target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:l.jsx(q,{className:"pkt-footer__social-icon",name:A.iconName})})},`sociallinks-${I}`))})]})]})})},Mc=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:n=!1,hotjarId:a=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:c=null,cookieSecure:p=null,cookieExpiryDays:m=null,onToggleConsent:v=b=>{console.log(b.detail)},className:$})=>{const b=[$,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((k,x)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${k.external?" pkt-link--external":""}`,href:k.href,target:k.openInNewTab||t?"_blank":"_self",rel:k.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),k.text]})},x)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),n&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(Mi,{triggerType:"footerlink",hotjarId:a,googleAnalyticsId:r,devMode:h,cookieDomain:c,cookieSecure:p,cookieExpiryDays:m,onToggleConsent:v})})]})})})},Ai=({href:s,iconName:t,className:e,iconPosition:i,external:n,target:a,children:r,...h})=>{const c={"pkt-link":!0,"pkt-link--icon-left":!!t&&i==="left"||!!(t&&!i),"pkt-link--icon-right":!!t&&i==="right","pkt-link--external":n};return l.jsxs("a",{...h,className:Z(c,e),href:s,target:a,rel:n?"noopener noreferrer":void 0,children:[t&&l.jsx(q,{name:t,className:"pkt-link__icon"}),r]})};Ai.displayName="PktLink";const Ac=s=>typeof s.target=="string"?{title:s.title,iconName:s.iconName,href:s.target}:{title:s.title,iconName:s.iconName,onClick:s.target},Oi=({item:s,className:t})=>"href"in s?l.jsx(Ai,{iconName:s.iconName,href:s.href,"aria-hidden":"true",className:Z("pkt-user-menu__link",t),children:s.title}):l.jsxs("button",{className:Z("pkt-user-menu__link pkt-link-button pkt-link pkt-link--icon-left",t),type:"button",onClick:()=>{"onClick"in s&&typeof s.onClick=="function"?s.onClick():console.error("UserMenuButton item is missing onClick handler or onClick is not a function:",s)},children:[s.iconName&&l.jsx(q,{name:s.iconName,className:"pkt-link__icon","aria-hidden":"true"}),s.title]}),Oc=({links:s})=>l.jsx("ul",{className:"pkt-user-menu__sublist",children:s.map((t,e)=>l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:t})},e))}),Pc=_.forwardRef(({user:s,formattedLastLoggedIn:t,representing:e,userMenu:i,canChangeRepresentation:n,changeRepresentation:a,logoutOnClick:r},h)=>{const c=i==null?void 0:i.map(Ac);return l.jsx("nav",{className:"pkt-user-menu",ref:h,"aria-label":"Meny for innlogget bruker",children:l.jsxs("ul",{className:"pkt-user-menu__list",children:[s&&l.jsxs("li",{className:"pkt-user-menu__item",children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:s.name}),t&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:t})]})]}),c&&c.length>0&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx(Oc,{links:c})}),e&&l.jsxs("li",{className:"pkt-user-menu__item",children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:e.name}),e.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",e.orgNumber]}),n&&a&&l.jsx("ul",{className:"pkt-user-menu__sublist mt-size-16",children:l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:{title:"Endre organisasjon",iconName:"cogwheel",onClick:a}})})})]}),!e&&n&&a&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx("ul",{className:"pkt-user-menu__sublist",children:l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:{title:"Endre organisasjon",iconName:"cogwheel",onClick:a}})})})}),r&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx(Oi,{item:{title:"Logg ut",iconName:"exit",onClick:r}})})]})})}),ti=_.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:n,counter:a,counterCurrent:r=0,counterMaxLength:h,optionalTag:c=!1,optionalText:p="Valgfritt",requiredTag:m=!1,requiredText:v="Må fylles ut",tagText:$=null,hasError:b=!1,errorMessage:k,disabled:x=!1,inline:T=!1,ariaDescribedby:S,useWrapper:A=!0,children:I,className:O="",hasFieldset:R=!1,role:et="group",counterPosition:Ot="bottom"},Nt)=>{const[it,kt]=_.useState(!1),zt=S||(e?`${s}-helptext`:void 0),Et=!!a,dt=Et&&Ot==="top",ae=Et&&Ot==="bottom",fe=()=>kt(ut=>!ut),V=["pkt-inputwrapper",O,b?"pkt-inputwrapper--error":"",x?"pkt-inputwrapper--disabled":"",T?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),xt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Gt=()=>Et?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,$e=()=>l.jsxs(l.Fragment,{children:[$&&l.jsx("span",{className:xt+" pkt-tag--gray",children:$}),c&&l.jsx("span",{className:xt+" pkt-tag--blue-light",children:p}),m&&l.jsx("span",{className:xt+" pkt-tag--beige",children:v})]}),ge=()=>{const ut=l.jsxs(l.Fragment,{children:[t," ",$e()]});return A?R?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ut}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":zt,id:`${s}-label`,children:ut}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":zt,id:`${s}-label`,children:t})},re=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&A&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(pe,{skin:"tertiary",size:"small",variant:"icon-right",iconName:it?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:fe,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:n??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${it?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),Bt=l.jsxs(l.Fragment,{children:[ge(),re(),dt&&l.jsx(Gt,{}),I,ae&&l.jsx(Gt,{}),b&&k&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(an,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:k})})]});return l.jsx("div",{className:V,ref:Nt,role:et,children:R?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":zt,children:Bt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:Bt})})});ti.displayName="PktInputWrapper";const rn=_.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:n,counterMaxLength:a,className:r,disabled:h=!1,errorMessage:c,hasError:p=!1,helptext:m,helptextDropdown:v,helptextDropdownButton:$,iconNameRight:b,inline:k=!1,fullwidth:x=!1,label:T,name:S,optionalTag:A=!1,optionalText:I,requiredTag:O=!1,requiredText:R,tagText:et=null,placeholder:Ot,prefix:Nt,suffix:it,type:kt="text",useWrapper:zt=!0,omitSearchIcon:Et=!1,value:dt,minLength:ae,maxLength:fe,min:V,max:xt,step:Gt,size:$e,readonly:ge,required:re,dataTestid:Bt,onChange:ut,skipForwardTestid:_e=!1,...we},Zt)=>{const Ss=[r,"pkt-textinput"].join(" "),Ie=kt==="search"&&!b&&!Et,es=kt==="date"&&dt?dt.slice(0,10):dt,[ss,xe]=_.useState((dt==null?void 0:dt.length)||0),Xt=`${s}`,Se=`${Xt}-label`,is=e||Se,Mt=yt=>{var Cs,Le;n&&xe(((Le=(Cs=yt.currentTarget)==null?void 0:Cs.value)==null?void 0:Le.length)||0),ut&&ut(yt)};return _.useEffect(()=>{dt!==void 0&&xe((dt==null?void 0:dt.length)||0)},[dt]),l.jsx(ti,{ariaDescribedby:t,className:Ss,disabled:h,errorMessage:c,forId:Xt,hasError:p,helptext:m,helptextDropdown:v,helptextDropdownButton:$,inline:k,label:T,optionalTag:A,optionalText:I,requiredTag:O,requiredText:R,tagText:et,useWrapper:zt,counter:n,counterCurrent:ss,counterMaxLength:a,children:l.jsxs("div",{className:"pkt-input__container","data-testid":Bt,"data-skip-forward-testid":_e?"true":void 0,children:[Nt&&l.jsx("div",{className:"pkt-input-prefix",children:Nt}),l.jsx("input",{...we,ref:Zt,className:`pkt-input ${x?"pkt-input--fullwidth":""} ${a&&ss>a?"pkt-input--counter-error":""}`,type:kt,name:`${S||s}`,value:es,id:Xt,placeholder:Ot,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":is,min:V,max:xt,onChange:Mt,step:Gt,minLength:ae,maxLength:fe,size:$e,required:re}),it&&l.jsxs("p",{className:"pkt-input-suffix",children:[it,b&&l.jsx(q,{className:"pkt-input-suffix-icon",name:b}),Ie&&l.jsx(q,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!it&&b&&l.jsx(q,{className:"pkt-input-icon",name:b}),!it&&Ie&&l.jsx(q,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})}),Dc=(s,t)=>{const e=()=>typeof window>"u"?0:window.innerWidth,[i,n]=_.useState(e);return _.useEffect(()=>{const a=s.current;if(!a)return;if(n(a.offsetWidth),typeof ResizeObserver>"u"){const h=()=>{a&&n(a.offsetWidth)};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)}const r=new ResizeObserver(h=>{for(const c of h)c.borderBoxSize&&c.borderBoxSize.length>0?n(c.borderBoxSize[0].inlineSize):n(c.contentRect.width)});return r.observe(a),()=>{r.disconnect()}},[s]),i};function Ic(s){const t=_.useRef(0);_.useEffect(()=>{const e=document.body,i=document.documentElement;if(s){t.current=window.scrollY||window.pageYOffset;const n=window.innerWidth-i.clientWidth;n>0&&(e.style.paddingRight=`${n}px`),e.style.position="fixed",e.style.top=`-${t.current}px`,e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden",i.classList.add("is-scroll-locked")}else e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("right"),e.style.removeProperty("width"),e.style.removeProperty("overflow"),e.style.removeProperty("padding-right"),document.documentElement.classList.remove("is-scroll-locked"),window.scrollTo({top:t.current});return()=>{s&&(e.style.cssText="",document.documentElement.classList.remove("is-scroll-locked"),window.scrollTo({top:t.current}))}},[s])}const Pa=_.forwardRef(({mobileBreakpoint:s=768,tabletBreakpoint:t=1280,children:e,compact:i=!1,"data-mode":n,logOutButtonPlacement:a="none",logOut:r,openedMenu:h,showSearch:c=!1,onSearch:p,onSearchChange:m,searchValue:v,searchPlaceholder:$="Søk",representing:b,serviceLink:k,serviceClick:x,serviceName:T,user:S,userMenu:A,userMenuFooter:I,userOptions:O,canChangeRepresentation:R=!1,changeRepresentation:et,hideLogo:Ot=!1,logoLink:Nt,logoClick:it,position:kt="fixed",scrollBehavior:zt="hide"},Et)=>{const dt=kt==="fixed",ae=zt==="hide";_.useEffect(()=>{I&&console.warn('PktHeaderService: The "userMenuFooter" prop is deprecated and will be removed in a future version. Please use "userMenu" instead.')},[I]),_.useEffect(()=>{O&&console.warn('PktHeaderService: The "userOptions" prop is no longer available. Please use "userMenu" instead.')},[O]),_.useEffect(()=>{S!=null&&S.shortname&&console.warn('PktHeaderService: The "shortname" property on the user object is deprecated and will be removed in a future version.'),b!=null&&b.shortname&&console.warn('PktHeaderService: The "shortname" property on the representing object is deprecated and will be removed in a future version.')},[S==null?void 0:S.shortname,b==null?void 0:b.shortname]);const fe=_.useMemo(()=>{if(S!=null&&S.lastLoggedIn)return typeof S.lastLoggedIn=="string"?S.lastLoggedIn:new Date(S.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"})},[S==null?void 0:S.lastLoggedIn]),[V,xt]=_.useState(h||"none"),[Gt,$e]=_.useState(!1),[ge,re]=_.useState(0),[Bt,ut]=_.useState(!1),[_e,we]=_.useState(!1),Zt=_.useRef(null),Ss=_.useRef(null),Ie=_.useRef(null),es=_.useRef(null),ss=_.useRef(null),xe=_.useRef(null),Xt=_.useRef(null),Se=_.useRef(!1),is=Dc(Zt),Mt=is<s,yt=is<t,Cs=_.useCallback(j=>{Zt.current=j,typeof Et=="function"?Et(j):Et&&(Et.current=j)},[Et]);Ic(dt&&Mt&&V!=="none");const Le=_.useCallback((j,Pt)=>{const f=j.relatedTarget;let u;switch(Pt){case"user":u=Ss;break;case"slot":u=Ie;break;case"search":u=es;break;default:return}const g=u.current;g&&(!f||!g.contains(f))&&xt("none")},[]),si=_.useCallback(()=>{Se.current&&Xt.current&&document.contains(Xt.current)&&Xt.current.focus(),Xt.current=null,Se.current=!1},[]);_.useEffect(()=>{const j=f=>{S&&V==="user"&&!f.target.closest(".pkt-header-service__user-container")&&xt("none"),V==="slot"&&!f.target.closest(".pkt-header-service__slot-container")&&xt("none"),V==="search"&&!f.target.closest(".pkt-header-service__search-container")&&!f.target.closest(".pkt-header-service__search-input")&&xt("none")},Pt=f=>{f.key==="Escape"&&V!=="none"&&(f.preventDefault(),Se.current=!0,xt("none"))};if(V!=="none")return document.addEventListener("mousedown",j),document.addEventListener("keydown",Pt),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",Pt)};si()},[V,S,si]),_.useEffect(()=>{const j=()=>{if(ae){const Pt=window.pageYOffset||document.documentElement.scrollTop;if(Pt<0||Math.abs(Pt-ge)<60)return;$e(Pt>ge),re(Pt)}};return document&&window.addEventListener("scroll",j),()=>{document&&window.removeEventListener("scroll",j)}},[ae,ge]);const Pi=_.useCallback(j=>{const Pt=j==="slot"?Ie:es,f=j==="slot"?ss:xe;if(!Pt.current||!f.current||!yt||Mt)return;const u=Pt.current.getBoundingClientRect(),g=f.current.offsetWidth,w=u.left+g>window.innerWidth;j==="slot"?ut(w):we(w)},[yt,Mt]),Ts=_.useCallback(j=>{V!=="none"?xt("none"):(Xt.current=document.activeElement,xt(j))},[V]);_.useEffect(()=>{(V==="slot"||V==="search")&&requestAnimationFrame(()=>{Pi(V)})},[V,Pi]);const ii=l.jsxs("header",{className:Z("pkt-header-service",i&&"pkt-header-service--compact",Mt&&"pkt-header-service--mobile",yt&&"pkt-header-service--tablet",dt&&"pkt-header-service--fixed",ae&&"pkt-header-service--scroll-to-hide",Gt&&"pkt-header-service--hidden"),"data-mode":n,ref:Cs,children:[l.jsxs("div",{className:Z("pkt-header-service__logo-area",(!T||T==="")&&"pkt-header-service__logo-area--without-service"),children:[!Ot&&l.jsx("span",{className:"pkt-header-service__logo",children:Nt?l.jsx("a",{href:Nt,"aria-label":"Tilbake til forside",children:l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.0/logos/"})}):it?l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header-service__logo-link",onClick:it,children:l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.0/logos/"})}):l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.0/logos/"})}),T&&l.jsx("span",{className:"pkt-header-service__service-name",children:k?l.jsx(Ai,{href:k,className:"pkt-header-service__service-link ",children:T}):x?l.jsx("button",{className:"pkt-link-button pkt-link pkt-header-service__service-link",onClick:x,children:T}):l.jsx("span",{className:"pkt-header-service__service-link",children:T})})]}),l.jsxs("div",{className:"pkt-header-service__content",children:[l.jsxs("div",{className:Z("pkt-header-service__slot-container",V==="slot"&&"is-open"),onBlur:j=>Le(j,"slot"),ref:Ie,children:[yt&&e&&l.jsx(pe,{skin:"secondary",variant:"icon-only",iconName:"menu",size:Mt?"small":"medium",state:V==="slot"?"active":"normal",onClick:()=>Ts("slot"),"aria-expanded":V==="slot","aria-controls":"mobile-slot-menu","aria-label":"Åpne meny",children:"Meny"}),l.jsx("div",{className:Z("pkt-header-service__slot-content",Bt&&"align-right"),id:"mobile-slot-menu",role:yt?"menu":void 0,"aria-label":yt?"Meny":void 0,ref:ss,children:l.jsx("div",{className:"pkt-contents",children:e})})]}),c&&l.jsx(l.Fragment,{children:yt?l.jsxs("div",{className:Z("pkt-header-service__search-container",V==="search"&&"is-open"),onBlur:j=>Le(j,"search"),ref:es,children:[l.jsx(pe,{skin:"secondary",variant:"icon-only",iconName:"magnifying-glass-big",size:Mt?"small":"medium",onClick:()=>Ts("search"),state:V==="search"?"active":"normal","aria-expanded":V==="search","aria-controls":"mobile-search-menu","aria-label":"Åpne søkefelt",children:"Søk"}),l.jsx("div",{className:Z("pkt-header-service__mobile-menu",V==="search"&&"is-open",_e&&"align-right"),ref:xe,children:V==="search"&&l.jsx(rn,{id:"mobile-search-menu",className:"pkt-header-service__search-input",type:"search",label:"Søk",useWrapper:!1,placeholder:$,value:v,autoFocus:!0,fullwidth:!0,onChange:j=>m==null?void 0:m(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(p==null||p(j.target.value))}})})]}):l.jsx(rn,{id:"header-service-search",className:"pkt-header-service__search-input",type:"search",label:"Søk",useWrapper:!1,placeholder:$,value:v,onChange:j=>m==null?void 0:m(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(p==null||p(j.target.value))}})}),yt&&r&&(a==="header"||a==="both")&&l.jsx(pe,{skin:"secondary",size:Mt?"small":"medium",variant:"icon-only",iconName:"exit",onClick:r,children:"Logg ut"})]}),l.jsxs("div",{className:"pkt-header-service__user",children:[S&&l.jsxs("div",{className:"pkt-header-service__user-container",onBlur:j=>Le(j,"user"),ref:Ss,children:[l.jsxs(pe,{className:Z("pkt-header-service__user-button",Mt&&"pkt-header-service__user-button--mobile"),skin:"secondary",size:Mt?"small":"medium",state:V==="user"?"active":"normal",variant:"icons-right-and-left",iconName:"user",secondIconName:V==="user"?"chevron-thin-up":"chevron-thin-down",onClick:()=>Ts("user"),children:[l.jsx("span",{className:"pkt-sr-only",children:"Brukermeny: "}),(b==null?void 0:b.name)||S.name]}),V==="user"&&S&&l.jsx("div",{className:Z(Mt?"pkt-header-service__mobile-menu":"pkt-header-service__user-menu","is-open"),children:l.jsx(Pc,{user:S,formattedLastLoggedIn:fe,representing:b,userMenu:A,canChangeRepresentation:R,changeRepresentation:et,logoutOnClick:a==="userMenu"||a==="both"?r:void 0})})]}),!Mt&&r&&(a==="header"||a==="both")&&l.jsx(pe,{skin:"tertiary",size:"medium",variant:"icon-right",iconName:"exit",onClick:r,children:"Logg ut"})]})]});return dt?l.jsxs("div",{className:"pkt-header-service-wrapper",children:[ii,l.jsx("div",{className:Z("pkt-header-service-spacer",i&&"pkt-header-service-spacer--compact",S&&"pkt-header-service-spacer--has-user",Mt&&"pkt-header-service-spacer--mobile",yt&&"pkt-header-service-spacer--tablet")})]}):ii}),Da=_.forwardRef((s,t)=>l.jsx(Pa,{...s,ref:t}));Da.displayName="PktHeader";const Lc=Jt({tagName:"pkt-heading",elementClass:Ae,react:_,displayName:"PktHeading"}),Ia=_.forwardRef(({children:s,...t},e)=>l.jsx(Lc,{"data-testid":"pkt-heading",...t,ref:e,children:s}));Ia.displayName="PktHeading";const Bc=Jt({tagName:"pkt-helptext",elementClass:ve,react:_,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),La=_.forwardRef(({children:s,...t},e)=>l.jsx(Bc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));La.displayName="PktHelptext";const Ba=_.forwardRef(({label:s,id:t,children:e,...i},n)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:n}),e]}));Ba.displayName="PktInput";const Fa=({children:s,skin:t,title:e,href:i,iconName:n,openInNewTab:a,external:r,className:h,...c})=>{const p=["pkt-linkcard",t&&`pkt-linkcard--${t}`].filter(Boolean).join(" "),m=["pkt-linkcard__title",r&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return l.jsxs("a",{...c,href:i,className:Z(p,h),target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[n&&l.jsx(q,{className:"pkt-link__icon",name:n}),e&&l.jsx("div",{className:Z(m),children:e}),l.jsx("div",{className:"pkt-linkcard__text",children:s})]})};Fa.displayName="PktLinkCard";const Fc=Jt({tagName:"pkt-loader",elementClass:ie,react:_,displayName:"PktLoader",events:{}}),ja=_.forwardRef(({children:s,...t},e)=>l.jsx(Fc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));ja.displayName="PktLoader";const Ha=({children:s,className:t,skin:e,title:i,compact:n,closable:a,onClose:r,...h})=>{const[c,p]=_.useState(!1),m={"pkt-messagebox":!0,"pkt-messagebox--compact":n,[`pkt-messagebox--${e}`]:e,"pkt-messagebox--closable":a,"pkt-hide":c},v=_.createRef(),$=_.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:Z(m,t),ref:v,children:[a&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:$,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(q,{name:"close",className:"pkt-link__icon"})})}),i&&l.jsx("div",{className:"pkt-messagebox__title",children:i}),l.jsx("div",{className:"pkt-messagebox__text",children:s})]})};Ha.displayName="PktMessagebox";const jc=Jt({tagName:"pkt-modal",elementClass:Vt,react:_,displayName:"PktModal",events:{}}),Va=_.forwardRef(({children:s,...t},e)=>l.jsx(jc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));Va.displayName="PktModal";const Hc=Jt({tagName:"pkt-progressbar",elementClass:ct,react:_,displayName:"PktProgressbar",events:{}}),Ua=_.forwardRef(({children:s,...t},e)=>l.jsx(Hc,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));Ua.displayName="PktProgressbar";const za=_.forwardRef(({id:s,name:t,label:e,className:i,hasTile:n=!1,disabled:a=!1,checkHelptext:r,hasError:h=!1,defaultChecked:c,checked:p,optionalTag:m,optionalText:v,requiredTag:$,requiredText:b,tagText:k,...x},T)=>{const S=[i,"pkt-input-check"].filter(Boolean).join(" "),A=["pkt-input-check__input",n?"pkt-input-check__input--tile":"",a&&n?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),I=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),O=["pkt-input-check__input-label",a?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),R=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),et=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:R+" pkt-tag--gray",children:k}),m&&l.jsx("span",{className:R+" pkt-tag--blue-light",children:v}),$&&l.jsx("span",{className:R+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:S,children:l.jsxs("div",{className:A,children:[l.jsx("input",{ref:T,id:s,type:"radio",name:t,disabled:a,className:I,...p!==void 0?{checked:p}:{defaultChecked:c},...x}),l.jsxs("label",{className:O,htmlFor:s,children:[e," ",et(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});za.displayName="PktRadioButton";const Vc=_.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:n,name:a,placeholder:r="Søk…",suggestions:h,value:c="",action:p,method:m,onChange:v,onSearch:$,onSuggestionClick:b,...k},x)=>{const T=(O,R)=>{O?O():b&&b(R)},S=O=>{c=O.target.value},A=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let I;return p?I=O=>l.jsx("form",{role:"search",className:A,action:p,method:m,children:O}):I=O=>l.jsx("div",{role:"search",className:A,children:O}),I(l.jsxs(l.Fragment,{children:[n&&l.jsx("label",{htmlFor:n?i:void 0,className:n?"pkt-inputwrapper__label":"",children:n}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:a||i,id:i,placeholder:r,defaultValue:c,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:x,"aria-controls":`${i}-suggestions`,onChange:v||S,onKeyUp:$&&(O=>{O.key==="Enter"&&(O.preventDefault(),$(c))}),...k}),l.jsx(pe,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:$&&(O=>{O.preventDefault(),$(c)}),children:n||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((O,R)=>l.jsx("li",{children:_.createElement(O.href?"a":O.onClick?"button":"div",{href:O.href,className:`pkt-searchinput__suggestion ${O.onClick?"pkt-link-button":""} ${O.href||O.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:O.onClick?"button":void 0,onClick:()=>T(O.onClick,R),onKeyUp:et=>et.key==="Enter"&&T(O.onClick,R)},l.jsxs(l.Fragment,{children:[O.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:O.title}),O.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:O.text})]}))},`search-suggestion-${R}`))})]}))}),Uc=_.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:n=!1,errorMessage:a,hasError:r,helptext:h,helptextDropdown:c,helptextDropdownButton:p,id:m,inline:v=!1,fullwidth:$=!1,label:b,name:k,optionalTag:x=!1,optionalText:T,requiredTag:S=!1,requiredText:A,tagText:I,...O},R)=>{const et=[i,"pkt-select"].join(" ");return l.jsx(ti,{className:et,forId:`${m}-input`,label:b,helptext:h,helptextDropdown:c,helptextDropdownButton:p,optionalTag:x,optionalText:T,requiredTag:S,requiredText:A,tagText:I,hasError:r,errorMessage:a,disabled:n,inline:v,ariaDescribedby:s,children:l.jsx("select",{ref:R,className:`pkt-input ${$?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${m}-error`,"aria-labelledby":t||void 0,disabled:n,id:`${m}-input`,name:k||m,...O,children:e})})}),zc=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),qc=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Wc=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Rc=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:Z("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:Z("pkt-step__indicator"),children:e==="current"?qc:e==="completed"?Wc:zc}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Kc=_.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:n=!0,orientation:a="vertical",...r},h)=>{const c=Z(t,"pkt-stepper",a==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=_.Children.map(e,(m,v)=>_.isValidElement(m)?_.cloneElement(m,{className:Z(m.props.className,{"pkt-step--hideStep":i&&v!==s,"pkt-step--hideContent":n&&v!==s})}):m);return l.jsx("ol",{"data-testid":"pkt-stepper",className:c,ref:h,...r,children:p})}),Yc=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:n,...a})=>l.jsx("table",{"data-testid":"pkt-table",className:Z(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...a,children:n}),Gc=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:Z(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),Zc=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:Z(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),Xc=({className:s,children:t,...e})=>l.jsx("thead",{className:Z(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),Jc=({className:s,children:t,...e})=>l.jsx("th",{className:Z(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),Qc=({className:s,children:t,...e})=>l.jsx("tr",{className:Z(s,"pkt-table__row",{}),role:"row",...e,children:t}),on=_.forwardRef(({children:s,skin:t,textStyle:e,size:i,closeTag:n,className:a,iconName:r,ariaLabel:h,onClose:c,type:p,"aria-description":m,...v},$)=>{const[b,k]=_.useState(!1),x=_.useCallback(()=>{k(!0),c&&c()},[k]),T=_.useRef(null),[S,A]=_.useState("");_.useEffect(()=>{var et,Ot;A(((Ot=(et=T.current)==null?void 0:et.textContent)==null?void 0:Ot.trim())??"")},[s]);const I=_.useMemo(()=>{if(n&&!h)return S&&`Klikk for å fjerne ${S}`||m},[n,h,S,m]),O={"pkt-tag":!0,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,[`pkt-tag--${e}`]:!!e},R={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${e}`]:!!e,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,"pkt-btn--icons-right-and-left":n&&!!r,"pkt-hide":b};return n?l.jsxs("button",{...v,className:Z(R,a),type:p,onClick:x,"aria-label":h,"aria-description":I,ref:$,children:[r&&l.jsx(q,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:T,children:s}),l.jsx(q,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...v,className:Z(O,a),ref:$,children:[r&&l.jsx(q,{className:"pkt-tag__icon",name:r,"aria-hidden":"true"}),l.jsx("span",{ref:T,children:s})]})});on.displayName="PktTag";const ln=_.forwardRef(({children:s,active:t,href:e,onClick:i,icon:n,controls:a,tag:r,tagSkin:h,index:c=0},p)=>{const{arrowNav:m,registerTabRef:v,handleKeyPress:$,selectTab:b}=td(),x={"aria-selected":m?!!t:void 0,"aria-controls":a,role:m?"tab":void 0,onKeyUp:S=>$(c,S),onClick:S=>{b(c),i==null||i(S)},tabIndex:t||!m?void 0:-1,ref:S=>{v(c,S),typeof p=="function"?p(S):p&&(p.current=S)}},T=l.jsxs(l.Fragment,{children:[n&&l.jsx(q,{name:n,className:"pkt-icon--small"}),s,r&&l.jsx(on,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...x,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:T}):l.jsx("button",{...x,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:T})});ln.displayName="PktTabItem";const qa=_.createContext(null),td=()=>{const s=_.useContext(qa);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},ed=_.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:n},a)=>{const r=_.useRef([]),h=s&&!t,p=n&&_.Children.count(n)>0?_.Children.count(n):(e==null?void 0:e.length)||0;_.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const m=k=>{const x=e==null?void 0:e[k];x!=null&&x.action&&x.action(k),i&&i(k)},v=(k,x)=>{var T,S;h&&(x.code==="ArrowLeft"&&k!==0&&((T=r.current[k-1])==null||T.focus()),x.code==="ArrowRight"&&k<p-1&&((S=r.current[k+1])==null||S.focus()),(x.code==="ArrowDown"||x.code==="Space")&&m(k))},$=(k,x)=>{r.current[k]=x},b=e==null?void 0:e.map((k,x)=>{var T,S;return l.jsx(ln,{active:k.active,href:k.href,onClick:()=>m(x),icon:k.icon,controls:k.controls,tag:(T=k.tag)==null?void 0:T.text,tagSkin:(S=k.tag)==null?void 0:S.skin,index:x,children:k.text},x)});return l.jsx(qa.Provider,{value:{arrowNav:h,registerTabRef:$,handleKeyPress:v,selectTab:m},children:l.jsx("div",{className:"pkt-tabs",ref:a,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:n||b})})})}),sd=_.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:n,className:a,disabled:r,errorMessage:h,hasError:c,helptext:p,helptextDropdown:m,helptextDropdownButton:v,inline:$,fullwidth:b=!1,label:k,name:x,optionalTag:T=!1,optionalText:S,requiredTag:A=!1,requiredText:I,tagText:O=null,placeholder:R,rows:et,useWrapper:Ot=!0,onChange:Nt,value:it,autoComplete:kt="off",minLength:zt,maxLength:Et,readOnly:dt=!1,skipForwardTestid:ae=!1,...fe},V)=>{const xt=[a,"pkt-textinput","pkt-textarea"].join(" "),Gt=`${s}-input`,$e=`${Gt}-label`,ge=e||$e,[re,Bt]=_.useState(0),ut=_e=>{var we,Zt;if(i&&Bt(((Zt=(we=_e.currentTarget)==null?void 0:we.value)==null?void 0:Zt.length)||0),Nt)return Nt(_e)};return _.useEffect(()=>{it!==void 0&&Bt((it==null?void 0:it.length)||0)},[it]),l.jsx(ti,{ariaDescribedby:t,className:xt,disabled:r,errorMessage:h,forId:Gt,hasError:c,helptext:p,helptextDropdown:m,helptextDropdownButton:v,inline:$,label:k,optionalTag:T,optionalText:S,requiredTag:A,requiredText:I,tagText:O,useWrapper:Ot,counter:i,counterCurrent:re,counterMaxLength:n,children:l.jsx("textarea",{ref:V,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${n&&re>n?"pkt-input--counter-error":""}`,name:`${x||s}`,id:Gt,placeholder:R,disabled:r,rows:et,"aria-labelledby":ge,"aria-invalid":c,"aria-errormessage":`${s}-error`,...fe,onChange:ut,value:it,autoComplete:kt,minLength:zt,maxLength:Et,"data-skip-forward-testid":ae?"true":void 0})})});var ws=window.CustomEvent;(!ws||typeof ws=="object")&&(ws=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},ws.prototype=window.Event.prototype);function Wa(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function id(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,n){return!(t[i]===void 0||t[i]===n)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function ei(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function Ra(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function nd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function hn(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function Ka(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var n=s.querySelectorAll("*"),a=0;a<n.length&&!(n[a].tagName&&n[a].shadowRoot&&(i=Ka(n[a].shadowRoot),i));a++);return i}function Ya(s){return s.isConnected||document.body.contains(s)}function Ga(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=W.formSubmitter;if(!e){var i=s.target,n="getRootNode"in i&&i.getRootNode()||document;e=n.activeElement}return!e||e.form!==t?null:e}function ad(s){if(!s.defaultPrevented){var t=s.target,e=W.imagemapUseValue,i=Ga(s);e===null&&i&&(e=i.value);var n=ei(t);if(n){var a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&(s.preventDefault(),e!=null?n.close(e):n.close())}}}function Za(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",ad,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),n,a=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(n),n=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,a)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}Za.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&Ya(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),W.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=Ka(this.dialog_)),Ra(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!Ya(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!W.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");id(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,W.needsCentering(this.dialog_)?(W.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new ws("close",{bubbles:!1,cancelable:!1});Wa(this.dialog_,t)}};var W={};if(W.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},W.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var n=0;n<i.length;++n){var a=i[n],r=null;try{r=document.querySelectorAll(a.selectorText)}catch{}if(!(!r||!nd(r,s))){var h=a.style.getPropertyValue("top"),c=a.style.getPropertyValue("bottom");if(h&&h!=="auto"||c&&c!=="auto")return!0}}}return!1},W.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!W.isInlinePositionSetByStylesheet(s)},W.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new Za(s)},W.registerDialog=function(s){s.showModal||W.forceRegisterDialog(s)},W.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var n=0,a;a=i.removedNodes[n];++n){if(a instanceof Element)a.localName==="dialog"&&e.push(a);else continue;e=e.concat(a.querySelectorAll("dialog"))}}),e.length&&s(e)}))},W.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},W.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},W.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var n=i.dialog.parentNode||document.body;n.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},W.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=ei(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},W.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),Ra(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,n=i.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},W.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new ws("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&Wa(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},W.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},W.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},W.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},W.dm=new W.DialogManager,W.formSubmitter=null,W.imagemapUseValue=null,window.HTMLDialogElement===void 0){var Xa=document.createElement("form");if(Xa.setAttribute("method","dialog"),Xa.method!=="dialog"){var xs=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(xs){var rd=xs.get;xs.get=function(){return hn(this)?"dialog":rd.call(this)};var od=xs.set;xs.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):od.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",xs)}}document.addEventListener("click",function(s){if(W.formSubmitter=null,W.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!hn(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;W.imagemapUseValue=s.offsetX+","+s.offsetY}var n=ei(t);n&&(W.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=ei(t);if(!e){var i=Ga(s),n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&s.preventDefault()}});var ld=HTMLFormElement.prototype.submit,hd=function(){if(!hn(this))return ld.call(this);var s=ei(this);s&&s.close()};HTMLFormElement.prototype.submit=hd}const cd=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));P.PktAccordion=pn,P.PktAccordionItem=Ca,P.PktAlert=an,P.PktBackLink=Na,P.PktBreadcrumbs=Sc,P.PktButton=pe,P.PktCard=Ea,P.PktCheckbox=Ma,P.PktCombobox=Aa,P.PktConsent=Mi,P.PktDatepicker=Oa,P.PktFooter=Ec,P.PktFooterSimple=Mc,P.PktHeader=Da,P.PktHeaderService=Pa,P.PktHeading=Ia,P.PktHelptext=La,P.PktIcon=q,P.PktInput=Ba,P.PktInputWrapper=ti,P.PktLink=Ai,P.PktLinkCard=Fa,P.PktLoader=ja,P.PktMessagebox=Ha,P.PktModal=Va,P.PktProgressbar=Ua,P.PktRadioButton=za,P.PktSearchInput=Vc,P.PktSelect=Uc,P.PktStep=Rc,P.PktStepper=Kc,P.PktTabItem=ln,P.PktTable=Yc,P.PktTableBody=Gc,P.PktTableDataCell=Zc,P.PktTableHeader=Xc,P.PktTableHeaderCell=Jc,P.PktTableRow=Qc,P.PktTabs=ed,P.PktTag=on,P.PktTextarea=sd,P.PktTextinput=rn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
1715
+ */var Ta;function wc(){return Ta||(Ta=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var a="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(a=n(a,i(h)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return e.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var r="";for(var h in a)t.call(a,h)&&a[h]&&(r=n(r,h));return r}function n(a,r){return r?a?a+" "+r:a+r:a}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(nn)),nn.exports}var xc=wc();const Z=_c(xc),an=({children:s,closeAlert:t,compact:e,title:i,date:n,ariaLive:a,"aria-live":r="polite",role:h="status",skin:c="info",className:p,...m})=>{const[v,$]=_.useState(!1),b={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${c}`]:c,"pkt-hide":v},k={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!n},x=_.useCallback(()=>{$(!0),m.onClose&&m.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[m.onClose,$]),T=a||r;return l.jsx("div",{...m,"aria-live":T,role:h,className:Z(b,p),children:l.jsxs("div",{className:Z(k),children:[l.jsx(q,{className:"pkt-alert__icon","aria-hidden":"true",name:c==="info"?"alert-information":`alert-${c}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(pe,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:x,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),n&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",n]})]})})};an.displayName="PktAlert";const Na=Jt({tagName:"pkt-backlink",elementClass:ds,react:_,displayName:"PktBackLink"});Na.displayName="PktBackLink";const Sc=_.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},n)=>{const a=s,r=a[a.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:n,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:a.map((c,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===a.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})}):t==="router"?l.jsxs(dn.Link,{to:c.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(q,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]}):l.jsxs("a",{href:c.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(q,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:c.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(dn.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(q,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(q,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/14.1/animations/";const pe=_.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",iconPath:n,secondIconPath:a,size:r="medium",fullWidth:h=!1,fullWidthOnMobile:c=!1,skin:p="primary",type:m="button",variant:v="label-only",state:$,color:b,isLoading:k=void 0,disabled:x=void 0,loadingAnimationPath:T=window.pktAnimationPath,...S},A)=>{const I=[t,"pkt-btn",r&&`pkt-btn--${r}`,h&&"pkt-btn--full",c&&"pkt-btn--full-small",p&&`pkt-btn--${p}`,v&&`pkt-btn--${v}`,b&&`pkt-btn--${b}`,$&&`pkt-btn--${$}`,k&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...S,"aria-busy":k||void 0,"aria-disabled":x||void 0,disabled:x,className:I,type:m,ref:A,children:[k&&l.jsx(q,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:T}),v!=="label-only"&&l.jsx(q,{className:"pkt-btn__icon",name:e,...n&&{path:n}}),l.jsx("span",{className:"pkt-btn__text",children:s}),v==="icons-right-and-left"&&l.jsx(q,{className:"pkt-btn__icon",name:i,...a&&{path:a}})]})});pe.displayName="PktButton";const Cc=Jt({tagName:"pkt-card",elementClass:ft,react:_,displayName:"PktCard",events:{}}),Ea=_.forwardRef(({children:s,...t},e)=>l.jsx(Cc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));Ea.displayName="PktCard";const Ma=_.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:n,hasError:a=!1,className:r,isSwitch:h=!1,hideLabel:c=!1,labelPosition:p="right",defaultChecked:m,checked:v,indeterminate:$,optionalTag:b,optionalText:k="Valgfritt",requiredTag:x,requiredText:T="Må fylles ut",tagText:S,...A},I)=>{const O=_.useRef(null);_.useEffect(()=>{O.current&&$!==void 0&&(O.current.indeterminate=$)},[$]),_.useEffect(()=>{typeof I=="function"?I(O.current):I&&(I.current=O.current)},[I]);const R=[r,"pkt-input-check"].filter(Boolean).join(" "),et=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,c?"pkt-sr-only":""].filter(Boolean).join(" "),Ot=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),Nt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),it=()=>l.jsxs(l.Fragment,{children:[S&&l.jsx("span",{className:Nt+" pkt-tag--gray",children:S}),b&&l.jsx("span",{className:Nt+" pkt-tag--blue-light",children:k}),x&&l.jsx("span",{className:Nt+" pkt-tag--beige",children:T})]});return l.jsx("div",{className:R,children:l.jsxs("div",{className:Ot,children:[p==="left"&&l.jsxs("label",{className:et,htmlFor:s,children:[i," ",it(),n&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:n})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:O,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...v!==void 0?{checked:v}:{defaultChecked:m},...A}),p==="right"&&l.jsxs("label",{className:et,htmlFor:s,children:[i," ",it(),n&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:n})]})]})})});Ma.displayName="PktCheckbox";const Tc=Jt({tagName:"pkt-combobox",elementClass:nt,react:_,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Aa=_.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Tc,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));Aa.displayName="PktCombobox";const Mi=Jt({tagName:"pkt-consent",elementClass:Rt,react:_,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});Mi.displayName="PktConsent";const Nc=Jt({tagName:"pkt-datepicker",elementClass:ht,react:_,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Oa=_.forwardRef(({helptext:s,...t},e)=>l.jsx(Nc,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));Oa.displayName="PktDatepicker";const Ec=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:n=!1,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:c=null,googleAnalyticsId:p=null,devMode:m=!1,cookieDomain:v=null,cookieSecure:$=null,cookieExpiryDays:b=null,onToggleConsent:k=x=>{console.log(x.detail)}})=>{var T,S;const x=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:x,"data-mode":"dark",children:l.jsxs("div",{className:"pkt-footer__container",children:[l.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(T=s.links)==null?void 0:T.map((A,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(S=t.links)==null?void 0:S.map((A,I)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${I}`))]})]}),l.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[l.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),l.jsxs("ul",{className:"pkt-footer__list",children:[l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:a,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:"pkt-footer__link",href:r,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(Mi,{triggerType:"footerlink",hotjarId:c,googleAnalyticsId:p,devMode:m,cookieDomain:v,cookieSecure:$,cookieExpiryDays:b,onToggleConsent:k})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(A=>A.language).map((A,I)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:A.href,"aria-label":`til ${A.language} versjon av nettsiden`,target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:A.language})},`sociallinks-language-${I}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(A=>A.iconName).map((A,I)=>l.jsx(_.Fragment,{children:l.jsx("a",{href:A.href,"aria-label":`til ${A.iconName}`,className:"pkt-footer__social-icon-link",target:A.openInNewTab||n?"_blank":"_self",rel:A.openInNewTab||n?"noopener noreferrer":void 0,children:l.jsx(q,{className:"pkt-footer__social-icon",name:A.iconName})})},`sociallinks-${I}`))})]})]})})},Mc=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:n=!1,hotjarId:a=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:c=null,cookieSecure:p=null,cookieExpiryDays:m=null,onToggleConsent:v=b=>{console.log(b.detail)},className:$})=>{const b=[$,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((k,x)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${k.external?" pkt-link--external":""}`,href:k.href,target:k.openInNewTab||t?"_blank":"_self",rel:k.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),k.text]})},x)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(q,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),n&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(Mi,{triggerType:"footerlink",hotjarId:a,googleAnalyticsId:r,devMode:h,cookieDomain:c,cookieSecure:p,cookieExpiryDays:m,onToggleConsent:v})})]})})})},Ai=({href:s,iconName:t,className:e,iconPosition:i,external:n,target:a,children:r,...h})=>{const c={"pkt-link":!0,"pkt-link--icon-left":!!t&&i==="left"||!!(t&&!i),"pkt-link--icon-right":!!t&&i==="right","pkt-link--external":n};return l.jsxs("a",{...h,className:Z(c,e),href:s,target:a,rel:n?"noopener noreferrer":void 0,children:[t&&l.jsx(q,{name:t,className:"pkt-link__icon"}),r]})};Ai.displayName="PktLink";const Ac=s=>typeof s.target=="string"?{title:s.title,iconName:s.iconName,href:s.target}:{title:s.title,iconName:s.iconName,onClick:s.target},Oi=({item:s,className:t})=>"href"in s?l.jsx(Ai,{iconName:s.iconName,href:s.href,"aria-hidden":"true",className:Z("pkt-user-menu__link",t),children:s.title}):l.jsxs("button",{className:Z("pkt-user-menu__link pkt-link-button pkt-link pkt-link--icon-left",t),type:"button",onClick:()=>{"onClick"in s&&typeof s.onClick=="function"?s.onClick():console.error("UserMenuButton item is missing onClick handler or onClick is not a function:",s)},children:[s.iconName&&l.jsx(q,{name:s.iconName,className:"pkt-link__icon","aria-hidden":"true"}),s.title]}),Oc=({links:s})=>l.jsx("ul",{className:"pkt-user-menu__sublist",children:s.map((t,e)=>l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:t})},e))}),Pc=_.forwardRef(({user:s,formattedLastLoggedIn:t,representing:e,userMenu:i,canChangeRepresentation:n,changeRepresentation:a,logoutOnClick:r},h)=>{const c=i==null?void 0:i.map(Ac);return l.jsx("nav",{className:"pkt-user-menu",ref:h,"aria-label":"Meny for innlogget bruker",children:l.jsxs("ul",{className:"pkt-user-menu__list",children:[s&&l.jsxs("li",{className:"pkt-user-menu__item",children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:s.name}),t&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:t})]})]}),c&&c.length>0&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx(Oc,{links:c})}),e&&l.jsxs("li",{className:"pkt-user-menu__item",children:[l.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),l.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:e.name}),e.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",e.orgNumber]}),n&&a&&l.jsx("ul",{className:"pkt-user-menu__sublist mt-size-16",children:l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:{title:"Endre organisasjon",iconName:"cogwheel",onClick:a}})})})]}),!e&&n&&a&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx("ul",{className:"pkt-user-menu__sublist",children:l.jsx("li",{className:"pkt-user-menu__subitem",children:l.jsx(Oi,{item:{title:"Endre organisasjon",iconName:"cogwheel",onClick:a}})})})}),r&&l.jsx("li",{className:"pkt-user-menu__item",children:l.jsx(Oi,{item:{title:"Logg ut",iconName:"exit",onClick:r}})})]})})}),ti=_.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:n,counter:a,counterCurrent:r=0,counterMaxLength:h,optionalTag:c=!1,optionalText:p="Valgfritt",requiredTag:m=!1,requiredText:v="Må fylles ut",tagText:$=null,hasError:b=!1,errorMessage:k,disabled:x=!1,inline:T=!1,ariaDescribedby:S,useWrapper:A=!0,children:I,className:O="",hasFieldset:R=!1,role:et="group",counterPosition:Ot="bottom"},Nt)=>{const[it,kt]=_.useState(!1),zt=S||(e?`${s}-helptext`:void 0),Et=!!a,dt=Et&&Ot==="top",ae=Et&&Ot==="bottom",fe=()=>kt(ut=>!ut),V=["pkt-inputwrapper",O,b?"pkt-inputwrapper--error":"",x?"pkt-inputwrapper--disabled":"",T?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),xt=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Gt=()=>Et?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,$e=()=>l.jsxs(l.Fragment,{children:[$&&l.jsx("span",{className:xt+" pkt-tag--gray",children:$}),c&&l.jsx("span",{className:xt+" pkt-tag--blue-light",children:p}),m&&l.jsx("span",{className:xt+" pkt-tag--beige",children:v})]}),ge=()=>{const ut=l.jsxs(l.Fragment,{children:[t," ",$e()]});return A?R?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ut}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":zt,id:`${s}-label`,children:ut}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":zt,id:`${s}-label`,children:t})},re=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&A&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(pe,{skin:"tertiary",size:"small",variant:"icon-right",iconName:it?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:fe,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:n??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${it?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),Bt=l.jsxs(l.Fragment,{children:[ge(),re(),dt&&l.jsx(Gt,{}),I,ae&&l.jsx(Gt,{}),b&&k&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(an,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:k})})]});return l.jsx("div",{className:V,ref:Nt,role:et,children:R?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":zt,children:Bt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:Bt})})});ti.displayName="PktInputWrapper";const rn=_.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:n,counterMaxLength:a,className:r,disabled:h=!1,errorMessage:c,hasError:p=!1,helptext:m,helptextDropdown:v,helptextDropdownButton:$,iconNameRight:b,inline:k=!1,fullwidth:x=!1,label:T,name:S,optionalTag:A=!1,optionalText:I,requiredTag:O=!1,requiredText:R,tagText:et=null,placeholder:Ot,prefix:Nt,suffix:it,type:kt="text",useWrapper:zt=!0,omitSearchIcon:Et=!1,value:dt,minLength:ae,maxLength:fe,min:V,max:xt,step:Gt,size:$e,readonly:ge,required:re,dataTestid:Bt,onChange:ut,skipForwardTestid:_e=!1,...we},Zt)=>{const Ss=[r,"pkt-textinput"].join(" "),Ie=kt==="search"&&!b&&!Et,es=kt==="date"&&dt?dt.slice(0,10):dt,[ss,xe]=_.useState((dt==null?void 0:dt.length)||0),Xt=`${s}`,Se=`${Xt}-label`,is=e||Se,Mt=yt=>{var Cs,Le;n&&xe(((Le=(Cs=yt.currentTarget)==null?void 0:Cs.value)==null?void 0:Le.length)||0),ut&&ut(yt)};return _.useEffect(()=>{dt!==void 0&&xe((dt==null?void 0:dt.length)||0)},[dt]),l.jsx(ti,{ariaDescribedby:t,className:Ss,disabled:h,errorMessage:c,forId:Xt,hasError:p,helptext:m,helptextDropdown:v,helptextDropdownButton:$,inline:k,label:T,optionalTag:A,optionalText:I,requiredTag:O,requiredText:R,tagText:et,useWrapper:zt,counter:n,counterCurrent:ss,counterMaxLength:a,children:l.jsxs("div",{className:"pkt-input__container","data-testid":Bt,"data-skip-forward-testid":_e?"true":void 0,children:[Nt&&l.jsx("div",{className:"pkt-input-prefix",children:Nt}),l.jsx("input",{...we,ref:Zt,className:`pkt-input ${x?"pkt-input--fullwidth":""} ${a&&ss>a?"pkt-input--counter-error":""}`,type:kt,name:`${S||s}`,value:es,id:Xt,placeholder:Ot,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":is,min:V,max:xt,onChange:Mt,step:Gt,minLength:ae,maxLength:fe,size:$e,required:re}),it&&l.jsxs("p",{className:"pkt-input-suffix",children:[it,b&&l.jsx(q,{className:"pkt-input-suffix-icon",name:b}),Ie&&l.jsx(q,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!it&&b&&l.jsx(q,{className:"pkt-input-icon",name:b}),!it&&Ie&&l.jsx(q,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})}),Dc=(s,t)=>{const e=()=>typeof window>"u"?0:window.innerWidth,[i,n]=_.useState(e);return _.useEffect(()=>{const a=s.current;if(!a)return;if(n(a.offsetWidth),typeof ResizeObserver>"u"){const h=()=>{a&&n(a.offsetWidth)};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)}const r=new ResizeObserver(h=>{for(const c of h)c.borderBoxSize&&c.borderBoxSize.length>0?n(c.borderBoxSize[0].inlineSize):n(c.contentRect.width)});return r.observe(a),()=>{r.disconnect()}},[s]),i};function Ic(s){const t=_.useRef(0);_.useEffect(()=>{const e=document.body,i=document.documentElement;if(s){t.current=window.scrollY||window.pageYOffset;const n=window.innerWidth-i.clientWidth;n>0&&(e.style.paddingRight=`${n}px`),e.style.position="fixed",e.style.top=`-${t.current}px`,e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflow="hidden",i.classList.add("is-scroll-locked")}else e.style.removeProperty("position"),e.style.removeProperty("top"),e.style.removeProperty("left"),e.style.removeProperty("right"),e.style.removeProperty("width"),e.style.removeProperty("overflow"),e.style.removeProperty("padding-right"),document.documentElement.classList.remove("is-scroll-locked"),window.scrollTo({top:t.current});return()=>{s&&(e.style.cssText="",document.documentElement.classList.remove("is-scroll-locked"),window.scrollTo({top:t.current}))}},[s])}const Pa=_.forwardRef(({mobileBreakpoint:s=768,tabletBreakpoint:t=1280,children:e,compact:i=!1,"data-mode":n,logOutButtonPlacement:a="none",logOut:r,openedMenu:h,showSearch:c=!1,onSearch:p,onSearchChange:m,searchValue:v,searchPlaceholder:$="Søk",representing:b,serviceLink:k,serviceClick:x,serviceName:T,user:S,userMenu:A,userMenuFooter:I,userOptions:O,canChangeRepresentation:R=!1,changeRepresentation:et,hideLogo:Ot=!1,logoLink:Nt,logoClick:it,position:kt="fixed",scrollBehavior:zt="hide"},Et)=>{const dt=kt==="fixed",ae=zt==="hide";_.useEffect(()=>{I&&console.warn('PktHeaderService: The "userMenuFooter" prop is deprecated and will be removed in a future version. Please use "userMenu" instead.')},[I]),_.useEffect(()=>{O&&console.warn('PktHeaderService: The "userOptions" prop is no longer available. Please use "userMenu" instead.')},[O]),_.useEffect(()=>{S!=null&&S.shortname&&console.warn('PktHeaderService: The "shortname" property on the user object is deprecated and will be removed in a future version.'),b!=null&&b.shortname&&console.warn('PktHeaderService: The "shortname" property on the representing object is deprecated and will be removed in a future version.')},[S==null?void 0:S.shortname,b==null?void 0:b.shortname]);const fe=_.useMemo(()=>{if(S!=null&&S.lastLoggedIn)return typeof S.lastLoggedIn=="string"?S.lastLoggedIn:new Date(S.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"})},[S==null?void 0:S.lastLoggedIn]),[V,xt]=_.useState(h||"none"),[Gt,$e]=_.useState(!1),[ge,re]=_.useState(0),[Bt,ut]=_.useState(!1),[_e,we]=_.useState(!1),Zt=_.useRef(null),Ss=_.useRef(null),Ie=_.useRef(null),es=_.useRef(null),ss=_.useRef(null),xe=_.useRef(null),Xt=_.useRef(null),Se=_.useRef(!1),is=Dc(Zt),Mt=is<s,yt=is<t,Cs=_.useCallback(j=>{Zt.current=j,typeof Et=="function"?Et(j):Et&&(Et.current=j)},[Et]);Ic(dt&&Mt&&V!=="none");const Le=_.useCallback((j,Pt)=>{const f=j.relatedTarget;let u;switch(Pt){case"user":u=Ss;break;case"slot":u=Ie;break;case"search":u=es;break;default:return}const g=u.current;g&&(!f||!g.contains(f))&&xt("none")},[]),si=_.useCallback(()=>{Se.current&&Xt.current&&document.contains(Xt.current)&&Xt.current.focus(),Xt.current=null,Se.current=!1},[]);_.useEffect(()=>{const j=f=>{S&&V==="user"&&!f.target.closest(".pkt-header-service__user-container")&&xt("none"),V==="slot"&&!f.target.closest(".pkt-header-service__slot-container")&&xt("none"),V==="search"&&!f.target.closest(".pkt-header-service__search-container")&&!f.target.closest(".pkt-header-service__search-input")&&xt("none")},Pt=f=>{f.key==="Escape"&&V!=="none"&&(f.preventDefault(),Se.current=!0,xt("none"))};if(V!=="none")return document.addEventListener("mousedown",j),document.addEventListener("keydown",Pt),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",Pt)};si()},[V,S,si]),_.useEffect(()=>{const j=()=>{if(ae){const Pt=window.pageYOffset||document.documentElement.scrollTop;if(Pt<0||Math.abs(Pt-ge)<60)return;$e(Pt>ge),re(Pt)}};return document&&window.addEventListener("scroll",j),()=>{document&&window.removeEventListener("scroll",j)}},[ae,ge]);const Pi=_.useCallback(j=>{const Pt=j==="slot"?Ie:es,f=j==="slot"?ss:xe;if(!Pt.current||!f.current||!yt||Mt)return;const u=Pt.current.getBoundingClientRect(),g=f.current.offsetWidth,w=u.left+g>window.innerWidth;j==="slot"?ut(w):we(w)},[yt,Mt]),Ts=_.useCallback(j=>{V!=="none"?xt("none"):(Xt.current=document.activeElement,xt(j))},[V]);_.useEffect(()=>{(V==="slot"||V==="search")&&requestAnimationFrame(()=>{Pi(V)})},[V,Pi]);const ii=l.jsxs("header",{className:Z("pkt-header-service",i&&"pkt-header-service--compact",Mt&&"pkt-header-service--mobile",yt&&"pkt-header-service--tablet",dt&&"pkt-header-service--fixed",ae&&"pkt-header-service--scroll-to-hide",Gt&&"pkt-header-service--hidden"),"data-mode":n,ref:Cs,children:[l.jsxs("div",{className:Z("pkt-header-service__logo-area",(!T||T==="")&&"pkt-header-service__logo-area--without-service"),children:[!Ot&&l.jsx("span",{className:"pkt-header-service__logo",children:Nt?l.jsx("a",{href:Nt,"aria-label":"Tilbake til forside",children:l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.1/logos/"})}):it?l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header-service__logo-link",onClick:it,children:l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.1/logos/"})}):l.jsx(q,{name:"oslologo","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/14.1/logos/"})}),T&&l.jsx("span",{className:"pkt-header-service__service-name",children:k?l.jsx(Ai,{href:k,className:"pkt-header-service__service-link ",children:T}):x?l.jsx("button",{className:"pkt-link-button pkt-link pkt-header-service__service-link",onClick:x,children:T}):l.jsx("span",{className:"pkt-header-service__service-link",children:T})})]}),l.jsxs("div",{className:"pkt-header-service__content",children:[l.jsxs("div",{className:Z("pkt-header-service__slot-container",V==="slot"&&"is-open"),onBlur:j=>Le(j,"slot"),ref:Ie,children:[yt&&e&&l.jsx(pe,{skin:"secondary",variant:"icon-only",iconName:"menu",size:Mt?"small":"medium",state:V==="slot"?"active":"normal",onClick:()=>Ts("slot"),"aria-expanded":V==="slot","aria-controls":"mobile-slot-menu","aria-label":"Åpne meny",children:"Meny"}),l.jsx("div",{className:Z("pkt-header-service__slot-content",Bt&&"align-right"),id:"mobile-slot-menu",role:yt?"menu":void 0,"aria-label":yt?"Meny":void 0,ref:ss,children:l.jsx("div",{className:"pkt-contents",children:e})})]}),c&&l.jsx(l.Fragment,{children:yt?l.jsxs("div",{className:Z("pkt-header-service__search-container",V==="search"&&"is-open"),onBlur:j=>Le(j,"search"),ref:es,children:[l.jsx(pe,{skin:"secondary",variant:"icon-only",iconName:"magnifying-glass-big",size:Mt?"small":"medium",onClick:()=>Ts("search"),state:V==="search"?"active":"normal","aria-expanded":V==="search","aria-controls":"mobile-search-menu","aria-label":"Åpne søkefelt",children:"Søk"}),l.jsx("div",{className:Z("pkt-header-service__mobile-menu",V==="search"&&"is-open",_e&&"align-right"),ref:xe,children:V==="search"&&l.jsx(rn,{id:"mobile-search-menu",className:"pkt-header-service__search-input",type:"search",label:"Søk",useWrapper:!1,placeholder:$,value:v,autoFocus:!0,fullwidth:!0,onChange:j=>m==null?void 0:m(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(p==null||p(j.target.value))}})})]}):l.jsx(rn,{id:"header-service-search",className:"pkt-header-service__search-input",type:"search",label:"Søk",useWrapper:!1,placeholder:$,value:v,onChange:j=>m==null?void 0:m(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(p==null||p(j.target.value))}})}),yt&&r&&(a==="header"||a==="both")&&l.jsx(pe,{skin:"secondary",size:Mt?"small":"medium",variant:"icon-only",iconName:"exit",onClick:r,children:"Logg ut"})]}),l.jsxs("div",{className:"pkt-header-service__user",children:[S&&l.jsxs("div",{className:"pkt-header-service__user-container",onBlur:j=>Le(j,"user"),ref:Ss,children:[l.jsxs(pe,{className:Z("pkt-header-service__user-button",Mt&&"pkt-header-service__user-button--mobile"),skin:"secondary",size:Mt?"small":"medium",state:V==="user"?"active":"normal",variant:"icons-right-and-left",iconName:"user",secondIconName:V==="user"?"chevron-thin-up":"chevron-thin-down",onClick:()=>Ts("user"),children:[l.jsx("span",{className:"pkt-sr-only",children:"Brukermeny: "}),(b==null?void 0:b.name)||S.name]}),V==="user"&&S&&l.jsx("div",{className:Z(Mt?"pkt-header-service__mobile-menu":"pkt-header-service__user-menu","is-open"),children:l.jsx(Pc,{user:S,formattedLastLoggedIn:fe,representing:b,userMenu:A,canChangeRepresentation:R,changeRepresentation:et,logoutOnClick:a==="userMenu"||a==="both"?r:void 0})})]}),!Mt&&r&&(a==="header"||a==="both")&&l.jsx(pe,{skin:"tertiary",size:"medium",variant:"icon-right",iconName:"exit",onClick:r,children:"Logg ut"})]})]});return dt?l.jsxs("div",{className:"pkt-header-service-wrapper",children:[ii,l.jsx("div",{className:Z("pkt-header-service-spacer",i&&"pkt-header-service-spacer--compact",S&&"pkt-header-service-spacer--has-user",Mt&&"pkt-header-service-spacer--mobile",yt&&"pkt-header-service-spacer--tablet")})]}):ii}),Da=_.forwardRef((s,t)=>l.jsx(Pa,{...s,ref:t}));Da.displayName="PktHeader";const Lc=Jt({tagName:"pkt-heading",elementClass:Ae,react:_,displayName:"PktHeading"}),Ia=_.forwardRef(({children:s,...t},e)=>l.jsx(Lc,{"data-testid":"pkt-heading",...t,ref:e,children:s}));Ia.displayName="PktHeading";const Bc=Jt({tagName:"pkt-helptext",elementClass:ve,react:_,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),La=_.forwardRef(({children:s,...t},e)=>l.jsx(Bc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));La.displayName="PktHelptext";const Ba=_.forwardRef(({label:s,id:t,children:e,...i},n)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:n}),e]}));Ba.displayName="PktInput";const Fa=({children:s,skin:t,title:e,href:i,iconName:n,openInNewTab:a,external:r,className:h,...c})=>{const p=["pkt-linkcard",t&&`pkt-linkcard--${t}`].filter(Boolean).join(" "),m=["pkt-linkcard__title",r&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return l.jsxs("a",{...c,href:i,className:Z(p,h),target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[n&&l.jsx(q,{className:"pkt-link__icon",name:n}),e&&l.jsx("div",{className:Z(m),children:e}),l.jsx("div",{className:"pkt-linkcard__text",children:s})]})};Fa.displayName="PktLinkCard";const Fc=Jt({tagName:"pkt-loader",elementClass:ie,react:_,displayName:"PktLoader",events:{}}),ja=_.forwardRef(({children:s,...t},e)=>l.jsx(Fc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));ja.displayName="PktLoader";const Ha=({children:s,className:t,skin:e,title:i,compact:n,closable:a,onClose:r,...h})=>{const[c,p]=_.useState(!1),m={"pkt-messagebox":!0,"pkt-messagebox--compact":n,[`pkt-messagebox--${e}`]:e,"pkt-messagebox--closable":a,"pkt-hide":c},v=_.createRef(),$=_.useCallback(()=>{p(!0),r&&r()},[p,r]);return l.jsxs("div",{...h,className:Z(m,t),ref:v,children:[a&&l.jsx("div",{className:"pkt-messagebox__close",children:l.jsx("button",{onClick:$,className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only","aria-label":"Lukk",children:l.jsx(q,{name:"close",className:"pkt-link__icon"})})}),i&&l.jsx("div",{className:"pkt-messagebox__title",children:i}),l.jsx("div",{className:"pkt-messagebox__text",children:s})]})};Ha.displayName="PktMessagebox";const jc=Jt({tagName:"pkt-modal",elementClass:Vt,react:_,displayName:"PktModal",events:{}}),Va=_.forwardRef(({children:s,...t},e)=>l.jsx(jc,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));Va.displayName="PktModal";const Hc=Jt({tagName:"pkt-progressbar",elementClass:ct,react:_,displayName:"PktProgressbar",events:{}}),Ua=_.forwardRef(({children:s,...t},e)=>l.jsx(Hc,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));Ua.displayName="PktProgressbar";const za=_.forwardRef(({id:s,name:t,label:e,className:i,hasTile:n=!1,disabled:a=!1,checkHelptext:r,hasError:h=!1,defaultChecked:c,checked:p,optionalTag:m,optionalText:v,requiredTag:$,requiredText:b,tagText:k,...x},T)=>{const S=[i,"pkt-input-check"].filter(Boolean).join(" "),A=["pkt-input-check__input",n?"pkt-input-check__input--tile":"",a&&n?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),I=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),O=["pkt-input-check__input-label",a?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),R=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),et=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:R+" pkt-tag--gray",children:k}),m&&l.jsx("span",{className:R+" pkt-tag--blue-light",children:v}),$&&l.jsx("span",{className:R+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:S,children:l.jsxs("div",{className:A,children:[l.jsx("input",{ref:T,id:s,type:"radio",name:t,disabled:a,className:I,...p!==void 0?{checked:p}:{defaultChecked:c},...x}),l.jsxs("label",{className:O,htmlFor:s,children:[e," ",et(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});za.displayName="PktRadioButton";const Vc=_.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:n,name:a,placeholder:r="Søk…",suggestions:h,value:c="",action:p,method:m,onChange:v,onSearch:$,onSuggestionClick:b,...k},x)=>{const T=(O,R)=>{O?O():b&&b(R)},S=O=>{c=O.target.value},A=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let I;return p?I=O=>l.jsx("form",{role:"search",className:A,action:p,method:m,children:O}):I=O=>l.jsx("div",{role:"search",className:A,children:O}),I(l.jsxs(l.Fragment,{children:[n&&l.jsx("label",{htmlFor:n?i:void 0,className:n?"pkt-inputwrapper__label":"",children:n}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:a||i,id:i,placeholder:r,defaultValue:c,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:x,"aria-controls":`${i}-suggestions`,onChange:v||S,onKeyUp:$&&(O=>{O.key==="Enter"&&(O.preventDefault(),$(c))}),...k}),l.jsx(pe,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:$&&(O=>{O.preventDefault(),$(c)}),children:n||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((O,R)=>l.jsx("li",{children:_.createElement(O.href?"a":O.onClick?"button":"div",{href:O.href,className:`pkt-searchinput__suggestion ${O.onClick?"pkt-link-button":""} ${O.href||O.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:O.onClick?"button":void 0,onClick:()=>T(O.onClick,R),onKeyUp:et=>et.key==="Enter"&&T(O.onClick,R)},l.jsxs(l.Fragment,{children:[O.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:O.title}),O.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:O.text})]}))},`search-suggestion-${R}`))})]}))}),Uc=_.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:n=!1,errorMessage:a,hasError:r,helptext:h,helptextDropdown:c,helptextDropdownButton:p,id:m,inline:v=!1,fullwidth:$=!1,label:b,name:k,optionalTag:x=!1,optionalText:T,requiredTag:S=!1,requiredText:A,tagText:I,...O},R)=>{const et=[i,"pkt-select"].join(" ");return l.jsx(ti,{className:et,forId:`${m}-input`,label:b,helptext:h,helptextDropdown:c,helptextDropdownButton:p,optionalTag:x,optionalText:T,requiredTag:S,requiredText:A,tagText:I,hasError:r,errorMessage:a,disabled:n,inline:v,ariaDescribedby:s,children:l.jsx("select",{ref:R,className:`pkt-input ${$?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${m}-error`,"aria-labelledby":t||void 0,disabled:n,id:`${m}-input`,name:k||m,...O,children:e})})}),zc=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),qc=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Wc=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Rc=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:Z("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:Z("pkt-step__indicator"),children:e==="current"?qc:e==="completed"?Wc:zc}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Kc=_.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:n=!0,orientation:a="vertical",...r},h)=>{const c=Z(t,"pkt-stepper",a==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=_.Children.map(e,(m,v)=>_.isValidElement(m)?_.cloneElement(m,{className:Z(m.props.className,{"pkt-step--hideStep":i&&v!==s,"pkt-step--hideContent":n&&v!==s})}):m);return l.jsx("ol",{"data-testid":"pkt-stepper",className:c,ref:h,...r,children:p})}),Yc=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:n,...a})=>l.jsx("table",{"data-testid":"pkt-table",className:Z(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...a,children:n}),Gc=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:Z(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),Zc=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:Z(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),Xc=({className:s,children:t,...e})=>l.jsx("thead",{className:Z(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),Jc=({className:s,children:t,...e})=>l.jsx("th",{className:Z(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),Qc=({className:s,children:t,...e})=>l.jsx("tr",{className:Z(s,"pkt-table__row",{}),role:"row",...e,children:t}),on=_.forwardRef(({children:s,skin:t,textStyle:e,size:i,closeTag:n,className:a,iconName:r,ariaLabel:h,onClose:c,type:p,"aria-description":m,...v},$)=>{const[b,k]=_.useState(!1),x=_.useCallback(()=>{k(!0),c&&c()},[k]),T=_.useRef(null),[S,A]=_.useState("");_.useEffect(()=>{var et,Ot;A(((Ot=(et=T.current)==null?void 0:et.textContent)==null?void 0:Ot.trim())??"")},[s]);const I=_.useMemo(()=>{if(n&&!h)return S&&`Klikk for å fjerne ${S}`||m},[n,h,S,m]),O={"pkt-tag":!0,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,[`pkt-tag--${e}`]:!!e},R={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${e}`]:!!e,[`pkt-tag--${i}`]:!!i,[`pkt-tag--${t}`]:!!t,"pkt-btn--icons-right-and-left":n&&!!r,"pkt-hide":b};return n?l.jsxs("button",{...v,className:Z(R,a),type:p,onClick:x,"aria-label":h,"aria-description":I,ref:$,children:[r&&l.jsx(q,{className:"pkt-tag__icon",name:r}),l.jsx("span",{ref:T,children:s}),l.jsx(q,{className:"pkt-tag__close-btn",name:"close"})]}):l.jsxs("span",{...v,className:Z(O,a),ref:$,children:[r&&l.jsx(q,{className:"pkt-tag__icon",name:r,"aria-hidden":"true"}),l.jsx("span",{ref:T,children:s})]})});on.displayName="PktTag";const ln=_.forwardRef(({children:s,active:t,href:e,onClick:i,icon:n,controls:a,tag:r,tagSkin:h,index:c=0},p)=>{const{arrowNav:m,registerTabRef:v,handleKeyPress:$,selectTab:b}=td(),x={"aria-selected":m?!!t:void 0,"aria-controls":a,role:m?"tab":void 0,onKeyUp:S=>$(c,S),onClick:S=>{b(c),i==null||i(S)},tabIndex:t||!m?void 0:-1,ref:S=>{v(c,S),typeof p=="function"?p(S):p&&(p.current=S)}},T=l.jsxs(l.Fragment,{children:[n&&l.jsx(q,{name:n,className:"pkt-icon--small"}),s,r&&l.jsx(on,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...x,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:T}):l.jsx("button",{...x,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:T})});ln.displayName="PktTabItem";const qa=_.createContext(null),td=()=>{const s=_.useContext(qa);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},ed=_.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:n},a)=>{const r=_.useRef([]),h=s&&!t,p=n&&_.Children.count(n)>0?_.Children.count(n):(e==null?void 0:e.length)||0;_.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const m=k=>{const x=e==null?void 0:e[k];x!=null&&x.action&&x.action(k),i&&i(k)},v=(k,x)=>{var T,S;h&&(x.code==="ArrowLeft"&&k!==0&&((T=r.current[k-1])==null||T.focus()),x.code==="ArrowRight"&&k<p-1&&((S=r.current[k+1])==null||S.focus()),(x.code==="ArrowDown"||x.code==="Space")&&m(k))},$=(k,x)=>{r.current[k]=x},b=e==null?void 0:e.map((k,x)=>{var T,S;return l.jsx(ln,{active:k.active,href:k.href,onClick:()=>m(x),icon:k.icon,controls:k.controls,tag:(T=k.tag)==null?void 0:T.text,tagSkin:(S=k.tag)==null?void 0:S.skin,index:x,children:k.text},x)});return l.jsx(qa.Provider,{value:{arrowNav:h,registerTabRef:$,handleKeyPress:v,selectTab:m},children:l.jsx("div",{className:"pkt-tabs",ref:a,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:n||b})})})}),sd=_.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:n,className:a,disabled:r,errorMessage:h,hasError:c,helptext:p,helptextDropdown:m,helptextDropdownButton:v,inline:$,fullwidth:b=!1,label:k,name:x,optionalTag:T=!1,optionalText:S,requiredTag:A=!1,requiredText:I,tagText:O=null,placeholder:R,rows:et,useWrapper:Ot=!0,onChange:Nt,value:it,autoComplete:kt="off",minLength:zt,maxLength:Et,readOnly:dt=!1,skipForwardTestid:ae=!1,...fe},V)=>{const xt=[a,"pkt-textinput","pkt-textarea"].join(" "),Gt=`${s}-input`,$e=`${Gt}-label`,ge=e||$e,[re,Bt]=_.useState(0),ut=_e=>{var we,Zt;if(i&&Bt(((Zt=(we=_e.currentTarget)==null?void 0:we.value)==null?void 0:Zt.length)||0),Nt)return Nt(_e)};return _.useEffect(()=>{it!==void 0&&Bt((it==null?void 0:it.length)||0)},[it]),l.jsx(ti,{ariaDescribedby:t,className:xt,disabled:r,errorMessage:h,forId:Gt,hasError:c,helptext:p,helptextDropdown:m,helptextDropdownButton:v,inline:$,label:k,optionalTag:T,optionalText:S,requiredTag:A,requiredText:I,tagText:O,useWrapper:Ot,counter:i,counterCurrent:re,counterMaxLength:n,children:l.jsx("textarea",{ref:V,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${n&&re>n?"pkt-input--counter-error":""}`,name:`${x||s}`,id:Gt,placeholder:R,disabled:r,rows:et,"aria-labelledby":ge,"aria-invalid":c,"aria-errormessage":`${s}-error`,...fe,onChange:ut,value:it,autoComplete:kt,minLength:zt,maxLength:Et,"data-skip-forward-testid":ae?"true":void 0})})});var ws=window.CustomEvent;(!ws||typeof ws=="object")&&(ws=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},ws.prototype=window.Event.prototype);function Wa(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function id(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,n){return!(t[i]===void 0||t[i]===n)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function ei(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function Ra(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function nd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function hn(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function Ka(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var n=s.querySelectorAll("*"),a=0;a<n.length&&!(n[a].tagName&&n[a].shadowRoot&&(i=Ka(n[a].shadowRoot),i));a++);return i}function Ya(s){return s.isConnected||document.body.contains(s)}function Ga(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=W.formSubmitter;if(!e){var i=s.target,n="getRootNode"in i&&i.getRootNode()||document;e=n.activeElement}return!e||e.form!==t?null:e}function ad(s){if(!s.defaultPrevented){var t=s.target,e=W.imagemapUseValue,i=Ga(s);e===null&&i&&(e=i.value);var n=ei(t);if(n){var a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&(s.preventDefault(),e!=null?n.close(e):n.close())}}}function Za(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",ad,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),n,a=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(n),n=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,a)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}Za.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&Ya(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),W.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=Ka(this.dialog_)),Ra(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!Ya(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!W.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");id(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,W.needsCentering(this.dialog_)?(W.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new ws("close",{bubbles:!1,cancelable:!1});Wa(this.dialog_,t)}};var W={};if(W.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},W.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var n=0;n<i.length;++n){var a=i[n],r=null;try{r=document.querySelectorAll(a.selectorText)}catch{}if(!(!r||!nd(r,s))){var h=a.style.getPropertyValue("top"),c=a.style.getPropertyValue("bottom");if(h&&h!=="auto"||c&&c!=="auto")return!0}}}return!1},W.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!W.isInlinePositionSetByStylesheet(s)},W.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new Za(s)},W.registerDialog=function(s){s.showModal||W.forceRegisterDialog(s)},W.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var n=0,a;a=i.removedNodes[n];++n){if(a instanceof Element)a.localName==="dialog"&&e.push(a);else continue;e=e.concat(a.querySelectorAll("dialog"))}}),e.length&&s(e)}))},W.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},W.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},W.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var n=i.dialog.parentNode||document.body;n.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},W.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=ei(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},W.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),Ra(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,n=i.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},W.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new ws("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&Wa(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},W.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},W.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},W.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},W.dm=new W.DialogManager,W.formSubmitter=null,W.imagemapUseValue=null,window.HTMLDialogElement===void 0){var Xa=document.createElement("form");if(Xa.setAttribute("method","dialog"),Xa.method!=="dialog"){var xs=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(xs){var rd=xs.get;xs.get=function(){return hn(this)?"dialog":rd.call(this)};var od=xs.set;xs.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):od.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",xs)}}document.addEventListener("click",function(s){if(W.formSubmitter=null,W.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!hn(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;W.imagemapUseValue=s.offsetX+","+s.offsetY}var n=ei(t);n&&(W.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=ei(t);if(!e){var i=Ga(s),n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&s.preventDefault()}});var ld=HTMLFormElement.prototype.submit,hd=function(){if(!hn(this))return ld.call(this);var s=ei(this);s&&s.close()};HTMLFormElement.prototype.submit=hd}const cd=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));P.PktAccordion=pn,P.PktAccordionItem=Ca,P.PktAlert=an,P.PktBackLink=Na,P.PktBreadcrumbs=Sc,P.PktButton=pe,P.PktCard=Ea,P.PktCheckbox=Ma,P.PktCombobox=Aa,P.PktConsent=Mi,P.PktDatepicker=Oa,P.PktFooter=Ec,P.PktFooterSimple=Mc,P.PktHeader=Da,P.PktHeaderService=Pa,P.PktHeading=Ia,P.PktHelptext=La,P.PktIcon=q,P.PktInput=Ba,P.PktInputWrapper=ti,P.PktLink=Ai,P.PktLinkCard=Fa,P.PktLoader=ja,P.PktMessagebox=Ha,P.PktModal=Va,P.PktProgressbar=Ua,P.PktRadioButton=za,P.PktSearchInput=Vc,P.PktSelect=Uc,P.PktStep=Rc,P.PktStepper=Kc,P.PktTabItem=ln,P.PktTable=Yc,P.PktTableBody=Gc,P.PktTableDataCell=Zc,P.PktTableHeader=Xc,P.PktTableHeaderCell=Jc,P.PktTableRow=Qc,P.PktTabs=ed,P.PktTag=on,P.PktTextarea=sd,P.PktTextinput=rn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "14.0.4",
3
+ "version": "14.1.1",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -39,15 +39,15 @@
39
39
  "dependencies": {
40
40
  "@lit-labs/ssr-dom-shim": "^1.2.1",
41
41
  "@lit/react": "^1.0.7",
42
- "@oslokommune/punkt-elements": "^14.0.4",
42
+ "@oslokommune/punkt-elements": "^14.1.1",
43
43
  "classnames": "^2.5.1",
44
44
  "prettier": "^3.3.3",
45
45
  "react-hook-form": "^7.53.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/plugin-transform-private-property-in-object": "^7.25.9",
49
- "@oslokommune/punkt-assets": "^14.0.4",
50
- "@oslokommune/punkt-css": "^14.0.4",
49
+ "@oslokommune/punkt-assets": "^14.1.1",
50
+ "@oslokommune/punkt-css": "^14.1.1",
51
51
  "@testing-library/jest-dom": "^6.5.0",
52
52
  "@testing-library/react": "^16.0.1",
53
53
  "@testing-library/user-event": "^14.5.2",
@@ -103,5 +103,5 @@
103
103
  "url": "https://github.com/oslokommune/punkt/issues"
104
104
  },
105
105
  "license": "MIT",
106
- "gitHead": "c543946b703fde8d94a20140d940becfe5c65aec"
106
+ "gitHead": "bad9850577009db58342c5a676c22688a9cad2b4"
107
107
  }