@oslokommune/punkt-react 7.1.6 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(P,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],v):(P=typeof globalThis<"u"?globalThis:P||self,v(P["punkt-react"]={},P.React))})(this,function(P,v){"use strict";function Xe(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ce={exports:{}},Q={};/**
1
+ (function(T,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(T=typeof globalThis<"u"?globalThis:T||self,E(T["punkt-react"]={},T.React))})(this,function(T,E){"use strict";function At(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const _=At(E);function Ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we={exports:{}},ae={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ne;function Ze(){if(Ne)return Q;Ne=1;var n=v,u=Symbol.for("react.element"),c=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function p(o,d,T){var y,N={},S=null,j=null;T!==void 0&&(S=""+T),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(j=d.ref);for(y in d)i.call(d,y)&&!f.hasOwnProperty(y)&&(N[y]=d[y]);if(o&&o.defaultProps)for(y in d=o.defaultProps,d)N[y]===void 0&&(N[y]=d[y]);return{$$typeof:u,type:o,key:S,ref:j,props:N,_owner:l.current}}return Q.Fragment=c,Q.jsx=p,Q.jsxs=p,Q}var ee={};/**
9
+ */var ze;function Wt(){if(ze)return ae;ze=1;var e=E,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(c,f,m){var h,v={},x=null,P=null;m!==void 0&&(x=""+m),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(P=f.ref);for(h in f)l.call(f,h)&&!i.hasOwnProperty(h)&&(v[h]=f[h]);if(c&&c.defaultProps)for(h in f=c.defaultProps,f)v[h]===void 0&&(v[h]=f[h]);return{$$typeof:n,type:c,key:x,ref:P,props:v,_owner:a.current}}return ae.Fragment=r,ae.jsx=s,ae.jsxs=s,ae}var oe={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,18 +14,45 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ye;function Qe(){return ye||(ye=1,process.env.NODE_ENV!=="production"&&function(){var n=v,u=Symbol.for("react.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),A=Symbol.iterator,W="@@iterator";function I(e){if(e===null||typeof e!="object")return null;var r=A&&e[A]||e[W];return typeof r=="function"?r:null}var O=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,a=new Array(r>1?r-1:0),m=1;m<r;m++)a[m-1]=arguments[m];U("error",e,a)}}function U(e,r,a){{var m=O.ReactDebugCurrentFrame,g=m.getStackAddendum();g!==""&&(r+="%s",a=a.concat([g]));var w=a.map(function(_){return String(_)});w.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,w)}}var B=!1,q=!1,L=!1,H=!1,F=!1,D;D=Symbol.for("react.module.reference");function V(e){return!!(typeof e=="string"||typeof e=="function"||e===i||e===f||F||e===l||e===T||e===y||H||e===j||B||q||L||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===N||e.$$typeof===p||e.$$typeof===o||e.$$typeof===d||e.$$typeof===D||e.getModuleId!==void 0))}function J(e,r,a){var m=e.displayName;if(m)return m;var g=r.displayName||r.name||"";return g!==""?a+"("+g+")":a}function k(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i:return"Fragment";case c:return"Portal";case f:return"Profiler";case l:return"StrictMode";case T:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o:var r=e;return k(r)+".Consumer";case p:var a=e;return k(a._context)+".Provider";case d:return J(e,e.render,"ForwardRef");case N:var m=e.displayName||null;return m!==null?m:x(e.type)||"Memo";case S:{var g=e,w=g._payload,_=g._init;try{return x(_(w))}catch{return null}}}return null}var M=Object.assign,K=0,Re,Se,je,Oe,$e,Ie,Fe;function De(){}De.__reactDisabledLog=!0;function kt(){{if(K===0){Re=console.log,Se=console.info,je=console.warn,Oe=console.error,$e=console.group,Ie=console.groupCollapsed,Fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function ht(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:Re}),info:M({},e,{value:Se}),warn:M({},e,{value:je}),error:M({},e,{value:Oe}),group:M({},e,{value:$e}),groupCollapsed:M({},e,{value:Ie}),groupEnd:M({},e,{value:Fe})})}K<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=O.ReactCurrentDispatcher,me;function ae(e,r,a){{if(me===void 0)try{throw Error()}catch(g){var m=g.stack.trim().match(/\n( *(at )?)/);me=m&&m[1]||""}return`
18
- `+me+e}}var ke=!1,le;{var _t=typeof WeakMap=="function"?WeakMap:Map;le=new _t}function Ae(e,r){if(!e||ke)return"";{var a=le.get(e);if(a!==void 0)return a}var m;ke=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=de.current,de.current=null,kt();try{if(r){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(z){m=z}Reflect.construct(e,[],_)}else{try{_.call()}catch(z){m=z}e.call(_.prototype)}}else{try{throw Error()}catch(z){m=z}e()}}catch(z){if(z&&m&&typeof z.stack=="string"){for(var h=z.stack.split(`
19
- `),$=m.stack.split(`
20
- `),C=h.length-1,R=$.length-1;C>=1&&R>=0&&h[C]!==$[R];)R--;for(;C>=1&&R>=0;C--,R--)if(h[C]!==$[R]){if(C!==1||R!==1)do if(C--,R--,R<0||h[C]!==$[R]){var Y=`
21
- `+h[C].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),typeof e=="function"&&le.set(e,Y),Y}while(C>=1&&R>=0);break}}}finally{ke=!1,de.current=w,ht(),Error.prepareStackTrace=g}var Z=e?e.displayName||e.name:"",Ke=Z?ae(Z):"";return typeof e=="function"&&le.set(e,Ke),Ke}function vt(e,r,a){return Ae(e,!1)}function bt(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function oe(e,r,a){if(e==null)return"";if(typeof e=="function")return Ae(e,bt(e));if(typeof e=="string")return ae(e);switch(e){case T:return ae("Suspense");case y:return ae("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return vt(e.render);case N:return oe(e.type,r,a);case S:{var m=e,g=m._payload,w=m._init;try{return oe(w(g),r,a)}catch{}}}return""}var ie=Object.prototype.hasOwnProperty,Le={},Me=O.ReactDebugCurrentFrame;function se(e){if(e){var r=e._owner,a=oe(e.type,e._source,r?r.type:null);Me.setExtraStackFrame(a)}else Me.setExtraStackFrame(null)}function gt(e,r,a,m,g){{var w=Function.call.bind(ie);for(var _ in e)if(w(e,_)){var h=void 0;try{if(typeof e[_]!="function"){var $=Error((m||"React class")+": "+a+" type `"+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[_]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}h=e[_](r,_,m,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(C){h=C}h&&!(h instanceof Error)&&(se(g),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",m||"React class",a,_,typeof h),se(null)),h instanceof Error&&!(h.message in Le)&&(Le[h.message]=!0,se(g),E("Failed %s type: %s",a,h.message),se(null))}}}var Nt=Array.isArray;function he(e){return Nt(e)}function yt(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,a=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a}}function wt(e){try{return We(e),!1}catch{return!0}}function We(e){return""+e}function Be(e){if(wt(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yt(e)),We(e)}var re=O.ReactCurrentOwner,Pt={key:!0,ref:!0,__self:!0,__source:!0},Ye,Ue,_e;_e={};function Et(e){if(ie.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Tt(e){if(ie.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function xt(e,r){if(typeof e.ref=="string"&&re.current&&r&&re.current.stateNode!==r){var a=x(re.current.type);_e[a]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(re.current.type),e.ref),_e[a]=!0)}}function Ct(e,r){{var a=function(){Ye||(Ye=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}}function Rt(e,r){{var a=function(){Ue||(Ue=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};a.isReactWarning=!0,Object.defineProperty(e,"ref",{get:a,configurable:!0})}}var St=function(e,r,a,m,g,w,_){var h={$$typeof:u,type:e,key:r,ref:a,props:_,_owner:w};return h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(h,"_self",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.defineProperty(h,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h};function jt(e,r,a,m,g){{var w,_={},h=null,$=null;a!==void 0&&(Be(a),h=""+a),Tt(r)&&(Be(r.key),h=""+r.key),Et(r)&&($=r.ref,xt(r,g));for(w in r)ie.call(r,w)&&!Pt.hasOwnProperty(w)&&(_[w]=r[w]);if(e&&e.defaultProps){var C=e.defaultProps;for(w in C)_[w]===void 0&&(_[w]=C[w])}if(h||$){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;h&&Ct(_,R),$&&Rt(_,R)}return St(e,h,$,g,m,re.current,_)}}var ve=O.ReactCurrentOwner,Ve=O.ReactDebugCurrentFrame;function X(e){if(e){var r=e._owner,a=oe(e.type,e._source,r?r.type:null);Ve.setExtraStackFrame(a)}else Ve.setExtraStackFrame(null)}var be;be=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function He(){{if(ve.current){var e=x(ve.current.type);if(e)return`
17
+ */var Ge;function Vt(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&function(){var e=E,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),j=Symbol.iterator,S="@@iterator";function D(t){if(t===null||typeof t!="object")return null;var u=j&&t[j]||t[S];return typeof u=="function"?u:null}var R=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(t){{for(var u=arguments.length,d=new Array(u>1?u-1:0),k=1;k<u;k++)d[k-1]=arguments[k];L("error",t,d)}}function L(t,u,d){{var k=R.ReactDebugCurrentFrame,C=k.getStackAddendum();C!==""&&(u+="%s",d=d.concat([C]));var O=d.map(function(w){return String(w)});O.unshift("Warning: "+u),Function.prototype.apply.call(console[t],console,O)}}var U=!1,Y=!1,W=!1,G=!1,M=!1,B;B=Symbol.for("react.module.reference");function z(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===i||M||t===a||t===m||t===h||G||t===P||U||Y||W||typeof t=="object"&&t!==null&&(t.$$typeof===x||t.$$typeof===v||t.$$typeof===s||t.$$typeof===c||t.$$typeof===f||t.$$typeof===B||t.getModuleId!==void 0))}function K(t,u,d){var k=t.displayName;if(k)return k;var C=u.displayName||u.name||"";return C!==""?d+"("+C+")":d}function b(t){return t.displayName||"Context"}function I(t){if(t==null)return null;if(typeof t.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case m:return"Suspense";case h:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case c:var u=t;return b(u)+".Consumer";case s:var d=t;return b(d._context)+".Provider";case f:return K(t,t.render,"ForwardRef");case v:var k=t.displayName||null;return k!==null?k:I(t.type)||"Memo";case x:{var C=t,O=C._payload,w=C._init;try{return I(w(O))}catch{return null}}}return null}var J=Object.assign,Q=0,kt,vt,_t,bt,gt,Nt,yt;function Et(){}Et.__reactDisabledLog=!0;function Wn(){{if(Q===0){kt=console.log,vt=console.info,_t=console.warn,bt=console.error,gt=console.group,Nt=console.groupCollapsed,yt=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Q++}}function Vn(){{if(Q--,Q===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},t,{value:kt}),info:J({},t,{value:vt}),warn:J({},t,{value:_t}),error:J({},t,{value:bt}),group:J({},t,{value:gt}),groupCollapsed:J({},t,{value:Nt}),groupEnd:J({},t,{value:yt})})}Q<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ue=R.ReactCurrentDispatcher,We;function be(t,u,d){{if(We===void 0)try{throw Error()}catch(C){var k=C.stack.trim().match(/\n( *(at )?)/);We=k&&k[1]||""}return`
18
+ `+We+t}}var Ve=!1,ge;{var Mn=typeof WeakMap=="function"?WeakMap:Map;ge=new Mn}function wt(t,u){if(!t||Ve)return"";{var d=ge.get(t);if(d!==void 0)return d}var k;Ve=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Ue.current,Ue.current=null,Wn();try{if(u){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(X){k=X}Reflect.construct(t,[],w)}else{try{w.call()}catch(X){k=X}t.call(w.prototype)}}else{try{throw Error()}catch(X){k=X}t()}}catch(X){if(X&&k&&typeof X.stack=="string"){for(var y=X.stack.split(`
19
+ `),V=k.stack.split(`
20
+ `),F=y.length-1,$=V.length-1;F>=1&&$>=0&&y[F]!==V[$];)$--;for(;F>=1&&$>=0;F--,$--)if(y[F]!==V[$]){if(F!==1||$!==1)do if(F--,$--,$<0||y[F]!==V[$]){var H=`
21
+ `+y[F].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),typeof t=="function"&&ge.set(t,H),H}while(F>=1&&$>=0);break}}}finally{Ve=!1,Ue.current=O,Vn(),Error.prepareStackTrace=C}var re=t?t.displayName||t.name:"",$t=re?be(re):"";return typeof t=="function"&&ge.set(t,$t),$t}function Bn(t,u,d){return wt(t,!1)}function Yn(t){var u=t.prototype;return!!(u&&u.isReactComponent)}function Ne(t,u,d){if(t==null)return"";if(typeof t=="function")return wt(t,Yn(t));if(typeof t=="string")return be(t);switch(t){case m:return be("Suspense");case h:return be("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return Bn(t.render);case v:return Ne(t.type,u,d);case x:{var k=t,C=k._payload,O=k._init;try{return Ne(O(C),u,d)}catch{}}}return""}var ye=Object.prototype.hasOwnProperty,xt={},Ct=R.ReactDebugCurrentFrame;function Ee(t){if(t){var u=t._owner,d=Ne(t.type,t._source,u?u.type:null);Ct.setExtraStackFrame(d)}else Ct.setExtraStackFrame(null)}function Jn(t,u,d,k,C){{var O=Function.call.bind(ye);for(var w in t)if(O(t,w)){var y=void 0;try{if(typeof t[w]!="function"){var V=Error((k||"React class")+": "+d+" type `"+w+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[w]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}y=t[w](u,w,k,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){y=F}y&&!(y instanceof Error)&&(Ee(C),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",k||"React class",d,w,typeof y),Ee(null)),y instanceof Error&&!(y.message in xt)&&(xt[y.message]=!0,Ee(C),g("Failed %s type: %s",d,y.message),Ee(null))}}}var Hn=Array.isArray;function Me(t){return Hn(t)}function zn(t){{var u=typeof Symbol=="function"&&Symbol.toStringTag,d=u&&t[Symbol.toStringTag]||t.constructor.name||"Object";return d}}function Gn(t){try{return Pt(t),!1}catch{return!0}}function Pt(t){return""+t}function Rt(t){if(Gn(t))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",zn(t)),Pt(t)}var se=R.ReactCurrentOwner,qn={key:!0,ref:!0,__self:!0,__source:!0},St,Ot,Be;Be={};function Kn(t){if(ye.call(t,"ref")){var u=Object.getOwnPropertyDescriptor(t,"ref").get;if(u&&u.isReactWarning)return!1}return t.ref!==void 0}function Xn(t){if(ye.call(t,"key")){var u=Object.getOwnPropertyDescriptor(t,"key").get;if(u&&u.isReactWarning)return!1}return t.key!==void 0}function Zn(t,u){if(typeof t.ref=="string"&&se.current&&u&&se.current.stateNode!==u){var d=I(se.current.type);Be[d]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(se.current.type),t.ref),Be[d]=!0)}}function Qn(t,u){{var d=function(){St||(St=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"key",{get:d,configurable:!0})}}function er(t,u){{var d=function(){Ot||(Ot=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};d.isReactWarning=!0,Object.defineProperty(t,"ref",{get:d,configurable:!0})}}var tr=function(t,u,d,k,C,O,w){var y={$$typeof:n,type:t,key:u,ref:d,props:w,_owner:O};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:C}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function nr(t,u,d,k,C){{var O,w={},y=null,V=null;d!==void 0&&(Rt(d),y=""+d),Xn(u)&&(Rt(u.key),y=""+u.key),Kn(u)&&(V=u.ref,Zn(u,C));for(O in u)ye.call(u,O)&&!qn.hasOwnProperty(O)&&(w[O]=u[O]);if(t&&t.defaultProps){var F=t.defaultProps;for(O in F)w[O]===void 0&&(w[O]=F[O])}if(y||V){var $=typeof t=="function"?t.displayName||t.name||"Unknown":t;y&&Qn(w,$),V&&er(w,$)}return tr(t,y,V,C,k,se.current,w)}}var Ye=R.ReactCurrentOwner,Tt=R.ReactDebugCurrentFrame;function ne(t){if(t){var u=t._owner,d=Ne(t.type,t._source,u?u.type:null);Tt.setExtraStackFrame(d)}else Tt.setExtraStackFrame(null)}var Je;Je=!1;function He(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function jt(){{if(Ye.current){var t=I(Ye.current.type);if(t)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function Ot(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),a=e.lineNumber;return`
23
+ Check the render method of \``+t+"`."}return""}}function rr(t){{if(t!==void 0){var u=t.fileName.replace(/^.*[\\\/]/,""),d=t.lineNumber;return`
24
24
 
25
- Check your code at `+r+":"+a+"."}return""}}var Ge={};function $t(e){{var r=He();if(!r){var a=typeof e=="string"?e:e.displayName||e.name;a&&(r=`
25
+ Check your code at `+u+":"+d+"."}return""}}var Dt={};function ar(t){{var u=jt();if(!u){var d=typeof t=="string"?t:t.displayName||t.name;d&&(u=`
26
26
 
27
- Check the top-level render call using <`+a+">.")}return r}}function qe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=$t(r);if(Ge[a])return;Ge[a]=!0;var m="";e&&e._owner&&e._owner!==ve.current&&(m=" It was passed a child from "+x(e._owner.type)+"."),X(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,m),X(null)}}function Je(e,r){{if(typeof e!="object")return;if(he(e))for(var a=0;a<e.length;a++){var m=e[a];ge(m)&&qe(m,r)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var g=I(e);if(typeof g=="function"&&g!==e.entries)for(var w=g.call(e),_;!(_=w.next()).done;)ge(_.value)&&qe(_.value,r)}}}function It(e){{var r=e.type;if(r==null||typeof r=="string")return;var a;if(typeof r=="function")a=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===N))a=r.propTypes;else return;if(a){var m=x(r);gt(a,e.props,"prop",m,e)}else if(r.PropTypes!==void 0&&!be){be=!0;var g=x(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ft(e){{for(var r=Object.keys(e.props),a=0;a<r.length;a++){var m=r[a];if(m!=="children"&&m!=="key"){X(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",m),X(null);break}}e.ref!==null&&(X(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),X(null))}}function ze(e,r,a,m,g,w){{var _=V(e);if(!_){var h="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $=Ot(g);$?h+=$:h+=He();var C;e===null?C="null":he(e)?C="array":e!==void 0&&e.$$typeof===u?(C="<"+(x(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):C=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,h)}var R=jt(e,r,a,g,w);if(R==null)return R;if(_){var Y=r.children;if(Y!==void 0)if(m)if(he(Y)){for(var Z=0;Z<Y.length;Z++)Je(Y[Z],e);Object.freeze&&Object.freeze(Y)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Je(Y,e)}return e===i?Ft(R):It(R),R}}function Dt(e,r,a){return ze(e,r,a,!0)}function At(e,r,a){return ze(e,r,a,!1)}var Lt=At,Mt=Dt;ee.Fragment=i,ee.jsx=Lt,ee.jsxs=Mt}()),ee}process.env.NODE_ENV==="production"?ce.exports=Ze():ce.exports=Qe();var ue=ce.exports;const G=ue.Fragment,t=ue.jsx,s=ue.jsxs,fe={},et='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function tt(n,u){return!fe[n]&&typeof window.fetch=="function"&&(fe[n]=window.fetch(u+n+".svg").then(c=>c.ok?c.text():(console.error("Missing icon: "+u+n+".svg"),et)).then(c=>c)),Promise.resolve(fe[n])}const b=({name:n,path:u,className:c="",...i})=>{const l="https://punkt-cdn.oslo.kommune.no/7.1/icons/",[f,p]=v.useState(null);return v.useEffect(()=>{if(!n)return;tt(n,u||l).then(d=>p(d))},[n,u,l]),f?t("span",{className:`pkt-icon ${c}`,dangerouslySetInnerHTML:{__html:f},...i}):null},pe=v.forwardRef(({children:n,className:u,skin:c="info",closeAlert:i=!1,onClose:l,title:f,date:p,ariaLive:o="polite",...d},T)=>{const y=[u,"pkt-alert",c&&`pkt-alert--${c}`].filter(Boolean).join(" "),[N,S]=v.useState(!0),j=()=>{S(!1),l&&l()};return N?s("div",{...d,className:y,"aria-live":o,ref:T,children:[t(b,{className:"pkt-alert__icon",name:c==="info"?"alert-information":`alert-${c}`}),i&&t("div",{className:"pkt-alert__close",children:t("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:j,children:t(b,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),f&&t("div",{className:"pkt-alert__title",children:f}),t("div",{className:"pkt-alert__text",children:n}),p&&s("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",p]})]}):null}),rt=v.forwardRef(({href:n,text:u,onClick:c,className:i,...l},f)=>{const p=[i,"pkt-back-link"].filter(Boolean).join(" ");return t("nav",{ref:f,className:p,"aria-label":"Gå tilbake et steg",children:s("a",{href:n||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{c&&c()},...l,children:[t(b,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),t("span",{className:"pkt-back-link__text",children:u||"Forsiden"})]})})}),te=v.forwardRef(({children:n,className:u,iconName:c="user",secondIconName:i="user",size:l="medium",skin:f="primary",type:p="button",variant:o="label-only",color:d,...T},y)=>{const N=[u,"pkt-btn",l&&`pkt-btn--${l}`,f&&`pkt-btn--${f}`,o&&`pkt-btn--${o}`,d&&`pkt-btn--${d}`].filter(Boolean).join(" ");return s("button",{...T,className:N,type:p,ref:y,children:[o!=="label-only"&&t(b,{className:"pkt-btn__icon",name:c}),t("span",{className:"pkt-btn__text",children:n}),o==="icons-right-and-left"&&t(b,{className:"pkt-btn__icon",name:i})]})});te.displayName="PktButton";const nt=({columnOne:n,columnTwo:u,socialLinks:c,className:i})=>{var f,p;const l=[i,"pkt-footer"].filter(Boolean).join(" ");return t("footer",{className:l,"data-mode":"dark",children:s("div",{className:"pkt-footer__container",children:[s("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:n.title}),s("ul",{className:"pkt-footer__list",children:[n.text&&t("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((o,d)=>t("li",{className:"pkt-footer__list-item",children:s("a",{className:`pkt-footer__link ${o.external?"pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),o.text]})},`links-${d}`))]})]}),s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:u.title}),s("ul",{className:"pkt-footer__list",children:[u.text&&t("li",{className:"pkt-footer__text",children:u.text}),(p=u.links)==null?void 0:p.map((o,d)=>t("li",{className:"pkt-footer__list-item",children:s("a",{className:`pkt-footer__link ${o.external?"pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),o.text]})},`links-${d}`))]})]}),s("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[t("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),s("ul",{className:"pkt-footer__list",children:[t("li",{className:"pkt-footer__list-item",children:s("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t("li",{className:"pkt-footer__list-item",children:s("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[t(b,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),c&&s("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[t("div",{className:"pkt-footer__social-languages",children:c.filter(o=>o.language).map((o,d)=>t("div",{className:"pkt-footer__social-language",children:t("a",{href:o.href,"aria-label":`til ${o.language} versjon av nettsiden`,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:o.language})},`sociallinks-language-${d}`))}),t("div",{className:"pkt-footer__social-icons",children:c.filter(o=>o.iconName).map((o,d)=>t(v.Fragment,{children:t("a",{href:o.href,"aria-label":`til ${o.iconName}`,className:"pkt-footer__social-icon-link",target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:t(b,{className:"pkt-footer__social-icon",name:o.iconName})})},`sociallinks-${d}`))})]})]})})},at=({links:n=[],className:u})=>{const c=[u,"pkt-footer-simple"].filter(Boolean).join(" ");return t("footer",{className:c,"data-mode":"dark",children:t("div",{className:"pkt-footer-simple__container",children:s("ul",{className:"pkt-footer-simple__list",children:[n.map((i,l)=>t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:`pkt-footer-simple__link ${i.external?" pkt-link--external":""}`,href:i.href,target:i.openInNewTab?"_blank":"_self",rel:i.openInNewTab?"noopener noreferrer":void 0,children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),i.text]})},l)),t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),t("li",{className:"pkt-footer-simple__list-item",children:s("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[t(b,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var we={exports:{}};/*!
27
+ Check the top-level render call using <`+d+">.")}return u}}function Lt(t,u){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var d=ar(u);if(Dt[d])return;Dt[d]=!0;var k="";t&&t._owner&&t._owner!==Ye.current&&(k=" It was passed a child from "+I(t._owner.type)+"."),ne(t),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,k),ne(null)}}function It(t,u){{if(typeof t!="object")return;if(Me(t))for(var d=0;d<t.length;d++){var k=t[d];He(k)&&Lt(k,u)}else if(He(t))t._store&&(t._store.validated=!0);else if(t){var C=D(t);if(typeof C=="function"&&C!==t.entries)for(var O=C.call(t),w;!(w=O.next()).done;)He(w.value)&&Lt(w.value,u)}}}function or(t){{var u=t.type;if(u==null||typeof u=="string")return;var d;if(typeof u=="function")d=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===v))d=u.propTypes;else return;if(d){var k=I(u);Jn(d,t.props,"prop",k,t)}else if(u.PropTypes!==void 0&&!Je){Je=!0;var C=I(u);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(t){{for(var u=Object.keys(t.props),d=0;d<u.length;d++){var k=u[d];if(k!=="children"&&k!=="key"){ne(t),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),ne(null);break}}t.ref!==null&&(ne(t),g("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}}function Ft(t,u,d,k,C,O){{var w=z(t);if(!w){var y="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=rr(C);V?y+=V:y+=jt();var F;t===null?F="null":Me(t)?F="array":t!==void 0&&t.$$typeof===n?(F="<"+(I(t.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):F=typeof t,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,y)}var $=nr(t,u,d,C,O);if($==null)return $;if(w){var H=u.children;if(H!==void 0)if(k)if(Me(H)){for(var re=0;re<H.length;re++)It(H[re],t);Object.freeze&&Object.freeze(H)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else It(H,t)}return t===l?lr($):or($),$}}function ir(t,u,d){return Ft(t,u,d,!0)}function sr(t,u,d){return Ft(t,u,d,!1)}var cr=sr,ur=ir;oe.Fragment=l,oe.jsx=cr,oe.jsxs=ur}()),oe}process.env.NODE_ENV==="production"?we.exports=Wt():we.exports=Vt();var xe=we.exports;const q=xe.Fragment,o=xe.jsx,p=xe.jsxs,Ce={},Mt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function Bt(e,n){return!Ce[e]&&typeof window.fetch=="function"&&(Ce[e]=window.fetch(n+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+n+e+".svg"),Mt)).then(r=>r)),Promise.resolve(Ce[e])}const N=({name:e,path:n,className:r="",...l})=>{const a="https://punkt-cdn.oslo.kommune.no/7.2/icons/",[i,s]=E.useState(null);return E.useEffect(()=>{if(!e)return;Bt(e,n||a).then(f=>s(f))},[e,n,a]),i?o("span",{className:`pkt-icon ${r}`,dangerouslySetInnerHTML:{__html:i},...l}):null},qe=E.forwardRef(({children:e,className:n,skin:r="info",closeAlert:l=!1,onClose:a,title:i,date:s,ariaLive:c="polite",...f},m)=>{const h=[n,"pkt-alert",r&&`pkt-alert--${r}`].filter(Boolean).join(" "),[v,x]=E.useState(!0),P=()=>{x(!1),a&&a()};return v?p("div",{...f,className:h,"aria-live":c,ref:m,children:[o(N,{className:"pkt-alert__icon",name:r==="info"?"alert-information":`alert-${r}`}),l&&o("div",{className:"pkt-alert__close",children:o("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:P,children:o(N,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),i&&o("div",{className:"pkt-alert__title",children:i}),o("div",{className:"pkt-alert__text",children:e}),s&&p("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Yt=E.forwardRef(({href:e,text:n,onClick:r,className:l,...a},i)=>{const s=[l,"pkt-back-link"].filter(Boolean).join(" ");return o("nav",{ref:i,className:s,"aria-label":"Gå tilbake et steg",children:p("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{r&&r()},...a,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),o("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
28
+ * @remix-run/router v1.7.1
29
+ *
30
+ * Copyright (c) Remix Software Inc.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE.md file in the root directory of this source tree.
34
+ *
35
+ * @license MIT
36
+ */function Pe(){return Pe=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},Pe.apply(this,arguments)}var Ke;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ke||(Ke={}));function A(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ce(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Re(e){let{pathname:n="/",search:r="",hash:l=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Xe(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let l=e.indexOf("?");l>=0&&(n.search=e.substr(l),e=e.substr(0,l)),e&&(n.pathname=e)}return n}var Ze;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ze||(Ze={}));function Se(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,l=e.charAt(r);return l&&l!=="/"?null:e.slice(r)||"/"}function Jt(e,n){n===void 0&&(n="/");let{pathname:r,search:l="",hash:a=""}=typeof e=="string"?Xe(e):e;return{pathname:r?r.startsWith("/")?r:Ht(r,n):n,search:zt(l),hash:Gt(a)}}function Ht(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Oe(e,n,r,l){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(l)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Qe(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function et(e,n,r,l){l===void 0&&(l=!1);let a;typeof e=="string"?a=Xe(e):(a=Pe({},e),A(!a.pathname||!a.pathname.includes("?"),Oe("?","pathname","search",a)),A(!a.pathname||!a.pathname.includes("#"),Oe("#","pathname","hash",a)),A(!a.search||!a.search.includes("#"),Oe("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(l||s==null)c=r;else{let v=n.length-1;if(s.startsWith("..")){let x=s.split("/");for(;x[0]==="..";)x.shift(),v-=1;a.pathname=x.join("/")}c=v>=0?n[v]:"/"}let f=Jt(a,c),m=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(m||h)&&(f.pathname+="/"),f}const Te=e=>e.join("/").replace(/\/\/+/g,"/"),zt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,tt=["post","put","patch","delete"];new Set(tt);const qt=["get",...tt];new Set(qt);/**
37
+ * React Router v6.14.1
38
+ *
39
+ * Copyright (c) Remix Software Inc.
40
+ *
41
+ * This source code is licensed under the MIT license found in the
42
+ * LICENSE.md file in the root directory of this source tree.
43
+ *
44
+ * @license MIT
45
+ */function je(){return je=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},je.apply(this,arguments)}const ue=_.createContext(null);process.env.NODE_ENV!=="production"&&(ue.displayName="DataRouter");const nt=_.createContext(null);process.env.NODE_ENV!=="production"&&(nt.displayName="DataRouterState");const Kt=_.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="Await");const Z=_.createContext(null);process.env.NODE_ENV!=="production"&&(Z.displayName="Navigation");const De=_.createContext(null);process.env.NODE_ENV!=="production"&&(De.displayName="Location");const te=_.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(te.displayName="Route");const Xt=_.createContext(null);process.env.NODE_ENV!=="production"&&(Xt.displayName="RouteError");function Zt(e,n){let{relative:r}=n===void 0?{}:n;Le()||(process.env.NODE_ENV!=="production"?A(!1,"useHref() may be used only in the context of a <Router> component."):A(!1));let{basename:l,navigator:a}=_.useContext(Z),{hash:i,pathname:s,search:c}=fe(e,{relative:r}),f=s;return l!=="/"&&(f=s==="/"?l:Te([l,s])),a.createHref({pathname:f,search:c,hash:i})}function Le(){return _.useContext(De)!=null}function le(){return Le()||(process.env.NODE_ENV!=="production"?A(!1,"useLocation() may be used only in the context of a <Router> component."):A(!1)),_.useContext(De).location}const rt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function at(e){_.useContext(Z).static||_.useLayoutEffect(e)}function Qt(){let{isDataRoute:e}=_.useContext(te);return e?an():en()}function en(){Le()||(process.env.NODE_ENV!=="production"?A(!1,"useNavigate() may be used only in the context of a <Router> component."):A(!1));let e=_.useContext(ue),{basename:n,navigator:r}=_.useContext(Z),{matches:l}=_.useContext(te),{pathname:a}=le(),i=JSON.stringify(Qe(l).map(f=>f.pathnameBase)),s=_.useRef(!1);return at(()=>{s.current=!0}),_.useCallback(function(f,m){if(m===void 0&&(m={}),process.env.NODE_ENV!=="production"&&ce(s.current,rt),!s.current)return;if(typeof f=="number"){r.go(f);return}let h=et(f,JSON.parse(i),a,m.relative==="path");e==null&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Te([n,h.pathname])),(m.replace?r.replace:r.push)(h,m.state,m)},[n,r,i,a,e])}function fe(e,n){let{relative:r}=n===void 0?{}:n,{matches:l}=_.useContext(te),{pathname:a}=le(),i=JSON.stringify(Qe(l).map(s=>s.pathnameBase));return _.useMemo(()=>et(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}var Ie;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ie||(Ie={}));var de;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(de||(de={}));function ot(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function tn(e){let n=_.useContext(ue);return n||(process.env.NODE_ENV!=="production"?A(!1,ot(e)):A(!1)),n}function nn(e){let n=_.useContext(te);return n||(process.env.NODE_ENV!=="production"?A(!1,ot(e)):A(!1)),n}function lt(e){let n=nn(e),r=n.matches[n.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?A(!1,e+' can only be used on routes that contain a unique "id"'):A(!1)),r.route.id}function rn(){return lt(de.UseRouteId)}function an(){let{router:e}=tn(Ie.UseNavigateStable),n=lt(de.UseNavigateStable),r=_.useRef(!1);return at(()=>{r.current=!0}),_.useCallback(function(a,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&ce(r.current,rt),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,je({fromRouteId:n},i)))},[e,n])}var it;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(it||(it={})),new Promise(()=>{});/**
46
+ * React Router DOM v6.14.1
47
+ *
48
+ * Copyright (c) Remix Software Inc.
49
+ *
50
+ * This source code is licensed under the MIT license found in the
51
+ * LICENSE.md file in the root directory of this source tree.
52
+ *
53
+ * @license MIT
54
+ */function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},ee.apply(this,arguments)}function Fe(e,n){if(e==null)return{};var r={},l=Object.keys(e),a,i;for(i=0;i<l.length;i++)a=l[i],!(n.indexOf(a)>=0)&&(r[a]=e[a]);return r}const pe="get",me="application/x-www-form-urlencoded";function he(e){return e!=null&&typeof e.tagName=="string"}function on(e){return he(e)&&e.tagName.toLowerCase()==="button"}function ln(e){return he(e)&&e.tagName.toLowerCase()==="form"}function sn(e){return he(e)&&e.tagName.toLowerCase()==="input"}function cn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function un(e,n){return e.button===0&&(!n||n==="_self")&&!cn(e)}let ke=null;function fn(){if(ke===null)try{new FormData(document.createElement("form"),0),ke=!1}catch{ke=!0}return ke}const dn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $e(e){return e!=null&&!dn.has(e)?(process.env.NODE_ENV!=="production"&&ce(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+me+'"')),null):e}function pn(e,n){let r,l,a,i,s;if(ln(e)){let c=e.getAttribute("action");l=c?Se(c,n):null,r=e.getAttribute("method")||pe,a=$e(e.getAttribute("enctype"))||me,i=new FormData(e)}else if(on(e)||sn(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(l=f?Se(f,n):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||pe,a=$e(e.getAttribute("formenctype"))||$e(c.getAttribute("enctype"))||me,i=new FormData(c,e),!fn()){let{name:m,type:h,value:v}=e;if(h==="image"){let x=m?m+".":"";i.append(x+"x","0"),i.append(x+"y","0")}else m&&i.append(m,v)}}else{if(he(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=pe,l=null,a=me,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:l,method:r.toLowerCase(),encType:a,formData:i,body:s}}const mn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],hn=["aria-current","caseSensitive","className","end","style","to","children"],kn=["reloadDocument","replace","method","action","onSubmit","submit","relative","preventScrollReset"];process.env.NODE_ENV;const vn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_n=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ve=_.forwardRef(function(n,r){let{onClick:l,relative:a,reloadDocument:i,replace:s,state:c,target:f,to:m,preventScrollReset:h}=n,v=Fe(n,mn),{basename:x}=_.useContext(Z),P,j=!1;if(typeof m=="string"&&_n.test(m)&&(P=m,vn))try{let g=new URL(window.location.href),L=m.startsWith("//")?new URL(g.protocol+m):new URL(m),U=Se(L.pathname,x);L.origin===g.origin&&U!=null?m=U+L.search+L.hash:j=!0}catch{process.env.NODE_ENV!=="production"&&ce(!1,'<Link to="'+m+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let S=Zt(m,{relative:a}),D=En(m,{replace:s,state:c,target:f,preventScrollReset:h,relative:a});function R(g){l&&l(g),g.defaultPrevented||D(g)}return _.createElement("a",ee({},v,{href:P||S,onClick:j||i?l:R,ref:r,target:f}))});process.env.NODE_ENV!=="production"&&(ve.displayName="Link");const bn=_.forwardRef(function(n,r){let{"aria-current":l="page",caseSensitive:a=!1,className:i="",end:s=!1,style:c,to:f,children:m}=n,h=Fe(n,hn),v=fe(f,{relative:h.relative}),x=le(),P=_.useContext(nt),{navigator:j}=_.useContext(Z),S=j.encodeLocation?j.encodeLocation(v).pathname:v.pathname,D=x.pathname,R=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;a||(D=D.toLowerCase(),R=R?R.toLowerCase():null,S=S.toLowerCase());let g=D===S||!s&&D.startsWith(S)&&D.charAt(S.length)==="/",L=R!=null&&(R===S||!s&&R.startsWith(S)&&R.charAt(S.length)==="/"),U=g?l:void 0,Y;typeof i=="function"?Y=i({isActive:g,isPending:L}):Y=[i,g?"active":null,L?"pending":null].filter(Boolean).join(" ");let W=typeof c=="function"?c({isActive:g,isPending:L}):c;return _.createElement(ve,ee({},h,{"aria-current":U,className:Y,ref:r,style:W,to:f}),typeof m=="function"?m({isActive:g,isPending:L}):m)});process.env.NODE_ENV!=="production"&&(bn.displayName="NavLink");const gn=_.forwardRef((e,n)=>{let r=xn();return _.createElement(st,ee({},e,{submit:r,ref:n}))});process.env.NODE_ENV!=="production"&&(gn.displayName="Form");const st=_.forwardRef((e,n)=>{let{reloadDocument:r,replace:l,method:a=pe,action:i,onSubmit:s,submit:c,relative:f,preventScrollReset:m}=e,h=Fe(e,kn),v=a.toLowerCase()==="get"?"get":"post",x=Cn(i,{relative:f}),P=j=>{if(s&&s(j),j.defaultPrevented)return;j.preventDefault();let S=j.nativeEvent.submitter,D=(S==null?void 0:S.getAttribute("formmethod"))||a;c(S||j.currentTarget,{method:D,replace:l,relative:f,preventScrollReset:m})};return _.createElement("form",ee({ref:n,method:v,action:x,onSubmit:r?s:P},h))});process.env.NODE_ENV!=="production"&&(st.displayName="FormImpl"),process.env.NODE_ENV;var Ae;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ae||(Ae={}));var ct;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ct||(ct={}));function Nn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function yn(e){let n=_.useContext(ue);return n||(process.env.NODE_ENV!=="production"?A(!1,Nn(e)):A(!1)),n}function En(e,n){let{target:r,replace:l,state:a,preventScrollReset:i,relative:s}=n===void 0?{}:n,c=Qt(),f=le(),m=fe(e,{relative:s});return _.useCallback(h=>{if(un(h,r)){h.preventDefault();let v=l!==void 0?l:Re(f)===Re(m);c(e,{replace:v,state:a,preventScrollReset:i,relative:s})}},[f,c,m,l,a,r,e,i,s])}function wn(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function xn(){let{router:e}=yn(Ae.UseSubmit),{basename:n}=_.useContext(Z),r=rn();return _.useCallback(function(l,a){a===void 0&&(a={}),wn();let{action:i,method:s,encType:c,formData:f,body:m}=pn(l,n);e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:f,body:m,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,fromRouteId:r})},[e,n,r])}function Cn(e,n){let{relative:r}=n===void 0?{}:n,{basename:l}=_.useContext(Z),a=_.useContext(te);a||(process.env.NODE_ENV!=="production"?A(!1,"useFormAction must be used inside a RouteContext"):A(!1));let[i]=a.matches.slice(-1),s=ee({},fe(e||".",{relative:r})),c=le();if(e==null&&(s.search=c.search,s.hash=c.hash,i.route.index)){let f=new URLSearchParams(s.search);f.delete("index"),s.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:Te([l,s.pathname])),Re(s)}const Pn=E.forwardRef(({breadcrumbs:e,navigationType:n,className:r,...l},a)=>{const i=e.slice(0,4),s=i[i.length-2],c=[r,"pkt-breadcrumbs"].filter(Boolean).join(" ");return p("nav",{ref:a,"aria-label":"brødsmulemeny",className:c,children:[o("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:i.map((f,m)=>o("li",{className:"pkt-breadcrumbs__item",children:m===i.length-1?o("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:o("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?p(ve,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):p("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[o(N,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),o("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${m}`))}),n==="router"?p(ve,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):p("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[o(N,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),o("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),ie=E.forwardRef(({children:e,className:n,iconName:r="user",secondIconName:l="user",size:a="medium",skin:i="primary",type:s="button",variant:c="label-only",color:f,...m},h)=>{const v=[n,"pkt-btn",a&&`pkt-btn--${a}`,i&&`pkt-btn--${i}`,c&&`pkt-btn--${c}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return p("button",{...m,className:v,type:s,ref:h,children:[c!=="label-only"&&o(N,{className:"pkt-btn__icon",name:r}),o("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&o(N,{className:"pkt-btn__icon",name:l})]})});ie.displayName="PktButton";const Rn=({columnOne:e,columnTwo:n,socialLinks:r,className:l})=>{var i,s;const a=[l,"pkt-footer"].filter(Boolean).join(" ");return o("footer",{className:a,"data-mode":"dark",children:p("div",{className:"pkt-footer__container",children:[p("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:e.title}),p("ul",{className:"pkt-footer__list",children:[e.text&&o("li",{className:"pkt-footer__text",children:e.text}),(i=e.links)==null?void 0:i.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:n.title}),p("ul",{className:"pkt-footer__list",children:[n.text&&o("li",{className:"pkt-footer__text",children:n.text}),(s=n.links)==null?void 0:s.map((c,f)=>o("li",{className:"pkt-footer__list-item",children:p("a",{className:`pkt-footer__link ${c.external?"pkt-link--external":""}`,href:c.href,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),c.text]})},`links-${f}`))]})]}),p("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[o("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),p("ul",{className:"pkt-footer__list",children:[o("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer__list-item",children:p("a",{className:"pkt-footer__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),r&&p("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[o("div",{className:"pkt-footer__social-languages",children:r.filter(c=>c.language).map((c,f)=>o("div",{className:"pkt-footer__social-language",children:o("a",{href:c.href,"aria-label":`til ${c.language} versjon av nettsiden`,target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:c.language})},`sociallinks-language-${f}`))}),o("div",{className:"pkt-footer__social-icons",children:r.filter(c=>c.iconName).map((c,f)=>o(E.Fragment,{children:o("a",{href:c.href,"aria-label":`til ${c.iconName}`,className:"pkt-footer__social-icon-link",target:c.openInNewTab?"_blank":"_self",rel:c.openInNewTab?"noopener noreferrer":void 0,children:o(N,{className:"pkt-footer__social-icon",name:c.iconName})})},`sociallinks-${f}`))})]})]})})},Sn=({links:e=[],className:n})=>{const r=[n,"pkt-footer-simple"].filter(Boolean).join(" ");return o("footer",{className:r,"data-mode":"dark",children:o("div",{className:"pkt-footer-simple__container",children:p("ul",{className:"pkt-footer-simple__list",children:[e.map((l,a)=>o("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:`pkt-footer-simple__link ${l.external?" pkt-link--external":""}`,href:l.href,target:l.openInNewTab?"_blank":"_self",rel:l.openInNewTab?"noopener noreferrer":void 0,children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),l.text]})},a)),o("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),o("li",{className:"pkt-footer-simple__list-item",children:p("a",{className:"pkt-footer-simple__link",href:"https://www.oslo.kommune.no/tilgjengelighet/",children:[o(N,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var ut={exports:{}};/*!
28
55
  Copyright (c) 2018 Jed Watson.
29
56
  Licensed under the MIT License (MIT), see
30
57
  http://jedwatson.github.io/classnames
31
- */(function(n){(function(){var u={}.hasOwnProperty;function c(){for(var i=[],l=0;l<arguments.length;l++){var f=arguments[l];if(f){var p=typeof f;if(p==="string"||p==="number")i.push(f);else if(Array.isArray(f)){if(f.length){var o=c.apply(null,f);o&&i.push(o)}}else if(p==="object"){if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]")){i.push(f.toString());continue}for(var d in f)u.call(f,d)&&f[d]&&i.push(d)}}}return i.join(" ")}n.exports?(c.default=c,n.exports=c):window.classNames=c})()})(we);var lt=we.exports;const Pe=Xe(lt),ot=v.forwardRef(({logoLink:n="https://www.oslo.kommune.no/",serviceName:u,fixed:c=!0,scrollToHide:i=!0,user:l,userMenu:f,representing:p,userOptions:o,userMenuFooter:d,canChangeRepresentation:T=!0,showMenuButton:y=!1,showLogOutButton:N=!1,openMenu:S,logOut:j,changeRepresentation:A,...W},I)=>{const O=v.useMemo(()=>typeof(l==null?void 0:l.lastLoggedIn)=="string"?l.lastLoggedIn:l!=null&&l.lastLoggedIn?new Date(l.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[l]),[E,U]=v.useState(!1),[B,q]=v.useState(0),[L,H]=v.useState(!1),F=v.useRef(null);v.useEffect(()=>(document.addEventListener("mouseup",V),window.addEventListener("scroll",J),()=>{document.removeEventListener("mouseup",V),window.removeEventListener("scroll",J)}));const D=()=>{H(!L)},V=k=>{F.current&&!F.current.contains(k.target)&&H(!1)},J=()=>{if(i){const k=window.pageYOffset||document.documentElement.scrollTop;if(k<0||Math.abs(k-B)<60)return;U(k>B),q(k)}};return s("header",{...W,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Pe("pkt-header",{"pkt-header--fixed":c,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":E}),ref:I,children:[s("div",{className:"pkt-header__logo",children:[typeof n=="string"?t("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}):t("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:t(b,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.1/logos/"})}),t("span",{className:"pkt-header__logo-service",children:u})]}),t("nav",{className:"pkt-header__actions",children:s("ul",{className:"pkt-header__actions-row",children:[y&&t("li",{children:t(te,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:S,children:"Meny"})}),(l||p)&&s("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${L&&!E?"pkt-header--open-dropdown":""}`,ref:F,children:[s("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":L,onClick:D,children:[t(b,{name:"user",className:"pkt-btn__icon"}),t("span",{className:"pkt-header__user-fullname",children:(p==null?void 0:p.name)||(l==null?void 0:l.name)}),t("span",{className:"pkt-header__user-shortname",children:(p==null?void 0:p.shortname)||(l==null?void 0:l.shortname)}),t(b,{name:"chevron-thin-down",className:"pkt-btn--closed"}),t(b,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),s("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[l&&s("li",{children:[t("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),t("div",{className:"pkt-user-menu__name",children:l.name}),l.lastLoggedIn&&s("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",t("time",{children:O})]})]}),f&&t("li",{children:t("ul",{className:"pkt-list",children:f.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userMenu-${x}`))})}),(p||T)&&s("li",{children:[p&&s(G,{children:[t("div",{className:"pkt-user-menu__label",children:"Representerer"}),t("div",{className:"pkt-user-menu__name",children:p.name}),p.orgNumber&&s("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",p.orgNumber]})]}),t("ul",{className:"pkt-list mt-size-16",children:T&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:A,children:[t(b,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),t("li",{children:t("ul",{className:"pkt-list",children:(o||!N)&&s(G,{children:[o==null?void 0:o.map((k,x)=>t("li",{children:typeof k.target=="string"?s("a",{href:k.target,className:"pkt-link",children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]}):s("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:[k.iconName&&t(b,{name:k.iconName,className:"pkt-link__icon"}),k.title]})},`userOptions-${x}`)),!N&&t("li",{children:s("button",{className:"pkt-link-button pkt-link",onClick:j,children:[t(b,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),d&&t("li",{className:"footer",children:t("ul",{className:"pkt-list-horizontal bordered",children:d.map((k,x)=>t("li",{children:typeof k.target=="string"?t("a",{href:k.target,className:"pkt-link",children:k.title}):t("button",{className:"pkt-link-button pkt-link",onClick:k.target,children:k.title})},`userMenuFooter-${x}`))})})]})]}),N&&t("li",{children:t(te,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:j,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Ee=v.forwardRef(({label:n,id:u,children:c,...i},l)=>s("div",{className:"pkt-form-group",children:[t("label",{htmlFor:u,className:"pkt-form-label",children:n}),t("input",{className:"pkt-form-input",id:u,...i,ref:l}),c]}));Ee.displayName="PktInput";const ne=v.forwardRef(({forId:n,label:u,helptext:c,helptextDropdown:i,helptextDropdownButton:l,optional:f,required:p,hasError:o,errorMessage:d,disabled:T,inline:y,ariaDescribedby:N,useWrapper:S=!0,children:j,className:A},W)=>{const[I,O]=v.useState(!1),E=()=>{O(!I)},U=()=>f?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":p?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",B=f?"Valgfritt":p?"Må fylles ut":"",q=T?"pkt-inputwrapper--disabled":"",L=y?"pkt-inputwrapper--inline":"",H=o?"pkt-inputwrapper--error":"",F=!!i&&i!=="",D=l||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',V=F?"div":"label",J=F?"h2":"span",k=N||(c?`${n}-helptext`:void 0);return s("div",{className:["pkt-inputwrapper",A,q,L,H].join(" "),ref:W,children:[S?s(G,{children:[t(V,{htmlFor:n,className:"pkt-inputwrapper__label","aria-describedby":F?"":N,children:s(J,{id:`${n}-label`,children:[u,B!==""&&t("span",{className:U(),children:B})]})}),c&&t("div",{className:"pkt-inputwrapper__helptext",id:`${n}-helptext`,children:c}),F&&i!==""&&s("div",{children:[t(te,{skin:"tertiary",size:"small",variant:"icon-right",iconName:I?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:E,children:t("span",{dangerouslySetInnerHTML:{__html:D}})}),t("div",{className:`pkt-inputwrapper__helptext ${I?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:t(pe,{children:t("span",{dangerouslySetInnerHTML:{__html:i}})})}),t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,children:u})]}),t(G,{children:j})]}):s(G,{children:[t("label",{htmlFor:n,className:"pkt-sr-only","aria-describedby":k,id:`${n}-label`,children:u}),j]}),o&&t("div",{children:t(pe,{skin:"error","aria-live":"assertive",children:d})})]})});ne.displayName="PktInputWrapper";const Te=v.forwardRef(({children:n,className:u,iconName:c="user",openInNewTab:i=!1,skin:l="normal",href:f="#",external:p=!1,title:o},d)=>{const T=[u,"pkt-linkcard",l&&`pkt-linkcard--${l}`].filter(Boolean).join(" ");return s("a",{href:f,className:`pkt-linkcard pkt-link ${T}`,target:i?"_blank":"_self",rel:i?"noopener noreferrer":void 0,ref:d,children:[t(b,{className:"pkt-link__icon",name:c}),s("div",{className:"pkt-linkcard__content",children:[t("div",{className:`pkt-linkcard__title ${p?"pkt-link pkt-link--external":""}`,children:o}),t("div",{className:"pkt-linkcard__text",children:n})]})]})});Te.displayName="PktLinkCard";const it=({children:n,skin:u="beige",title:c,className:i,...l})=>{const f=["pkt-messagebox",u&&`pkt-messagebox--${u}`,i].filter(Boolean).join(" ");return s("div",{...l,className:f,children:[t("div",{className:"pkt-messagebox__title",children:c}),t("div",{className:"pkt-messagebox__text",children:n})]})},xe=v.forwardRef(({id:n,name:u,label:c,value:i,...l},f)=>s("div",{className:"pkt-form-group",children:[t("input",{type:"radio",className:"pkt-form-check-input",id:n,name:u,value:i,ref:f,...l}),t("label",{className:"pkt-form-label",htmlFor:n,children:c})]}));xe.displayName="PktRadio";const st=({label:n,children:u})=>s(G,{children:[t("p",{children:n}),t("div",{className:"pkt-form-group",children:u})]}),ct=({isResponsive:n,children:u})=>n?t("div",{className:"pkt-table-container",children:u}):t(G,{children:u}),ut=({isResponsive:n,modifiers:{info:u=!1,success:c=!1,strong:i=!1,shadow:l=!1}={},children:f})=>t(ct,{isResponsive:n,children:t("table",{className:Pe("pkt-table",{"pkt-table--info":u,"pkt-table--success":c,"pkt-table--strong":i,"pkt-table--shadow":l}),children:f})}),ft=({children:n})=>t("td",{className:"pkt-table__th",children:n}),pt=({children:n})=>t("th",{className:"pkt-table__th",children:n}),Ce=v.forwardRef(({children:n,className:u,skin:c="blue",textStyle:i="normal-text",size:l="medium",closeTag:f=!1,iconName:p="",type:o="button",ariaLabel:d="close",onClick:T=()=>{}},y)=>{const[N,S]=v.useState(!1),j=O=>{S(!0),T(O)},A=["pkt-tag",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,u].filter(Boolean).join(" "),W=["pkt-tag","pkt-btn","pkt-btn--tertiary",l&&`pkt-tag--${l}`,c&&`pkt-tag--${c}`,i&&`pkt-tag--${i}`,p&&f?"pkt-btn--icons-right-and-left":null,f&&!p?"pkt-btn--icon-right":null,u].filter(Boolean).join(" "),I=!N;return f&&p?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__icon",name:p}),n,t(b,{className:"pkt-tag__close-btn",name:"close"})]})}):f?t(G,{children:I&&s("button",{className:W,type:o,"aria-label":d,onClick:j,ref:y,children:[t(b,{className:"pkt-tag__close-btn",name:"close"}),n]})}):p?s("span",{className:A,children:[t(b,{className:"pkt-tag__icon",name:p}),n]}):t("span",{className:A,children:n})});Ce.displayName="PktTag";const dt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,counter:i,counterMaxLength:l,className:f,disabled:p,errorMessage:o,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,name:A,optional:W,placeholder:I,required:O,rows:E,useWrapper:U,onChange:B,...q},L)=>{const H=[f,"pkt-textinput","pkt-textarea"].join(" "),F=c||`${n}-label`,D=v.useRef(null),[V,J]=v.useState(0),k=x=>{var M,K;if(i&&J(((K=(M=x.currentTarget)==null?void 0:M.value)==null?void 0:K.length)||0),B)return B(x)};return v.useEffect(()=>{var x,M;typeof L=="function"&&L(D.current),i&&J(((M=(x=D==null?void 0:D.current)==null?void 0:x.value)==null?void 0:M.length)||0)},[L]),s(ne,{ariaDescribedby:u,className:H,disabled:p,errorMessage:o,forId:n,hasError:d,helptext:T,helptextDropdown:y,helptextDropdownButton:N,inline:S,label:j,optional:W,required:O,useWrapper:U,children:[t("textarea",{ref:D,className:`pkt-textinput__input ${l&&V>l?"pkt-textinput__input--counter-error":""}`,name:A||n,id:n,placeholder:I,disabled:p,rows:E,"aria-labelledby":F,"aria-invalid":d,"aria-required":O,...q,onChange:k}),i&&s("div",{className:"pkt-textinput__counter","aria-live":"polite","aria-atomic":!0,children:[V||0,l&&`/${l}`]})]})}),mt=v.forwardRef(({id:n,ariaDescribedby:u,ariaLabelledby:c,autocomplete:i="off",className:l,disabled:f=!1,errorMessage:p,hasError:o=!1,helptext:d,helptextDropdown:T,helptextDropdownButton:y,iconNameRight:N,inline:S=!1,label:j,name:A,optional:W=!1,placeholder:I,prefix:O,required:E=!1,suffix:U,type:B="text",useWrapper:q=!0,value:L,...H},F)=>{const D=[l,"pkt-textinput"].join(" "),V=c||`${n}-label`;return t(ne,{ariaDescribedby:u,className:D,disabled:f,errorMessage:p,forId:n,hasError:o,helptext:d,helptextDropdown:T,helptextDropdownButton:y,inline:S,label:j,optional:W,required:E,useWrapper:q,children:s("div",{className:"pkt-textinput__container",children:[O&&t("div",{className:"pkt-textinput__input-prefix",children:O}),t("input",{ref:F,className:"pkt-textinput__input",type:B,name:A||n,id:n,placeholder:I,autoComplete:i,value:L,disabled:f,"aria-required":E,"aria-invalid":o,"aria-labelledby":V,...H}),U&&s("p",{className:"pkt-textinput__input-suffix",children:[U,N&&t(b,{className:"pkt-textinput__input-suffix-icon",name:N})]}),!U&&N&&t(b,{className:"pkt-textinput__input-icon",name:N})]})})});P.PktAlert=pe,P.PktBackLink=rt,P.PktButton=te,P.PktFooter=nt,P.PktFooterSimple=at,P.PktHeader=ot,P.PktIcon=b,P.PktInput=Ee,P.PktInputWrapper=ne,P.PktLinkCard=Te,P.PktMessagebox=it,P.PktRadio=xe,P.PktRadioGroup=st,P.PktTable=ut,P.PktTableData=ft,P.PktTableHeader=pt,P.PktTag=Ce,P.PktTextarea=dt,P.PktTextinput=mt,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
58
+ */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var l=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var s=typeof i;if(s==="string"||s==="number")l.push(i);else if(Array.isArray(i)){if(i.length){var c=r.apply(null,i);c&&l.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){l.push(i.toString());continue}for(var f in i)n.call(i,f)&&i[f]&&l.push(f)}}}return l.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ut);var On=ut.exports;const ft=Ut(On),Tn=E.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:l=!0,user:a,userMenu:i,representing:s,userOptions:c,userMenuFooter:f,canChangeRepresentation:m=!0,showMenuButton:h=!1,showLogOutButton:v=!1,openMenu:x,logOut:P,changeRepresentation:j,...S},D)=>{const R=E.useMemo(()=>typeof(a==null?void 0:a.lastLoggedIn)=="string"?a.lastLoggedIn:a!=null&&a.lastLoggedIn?new Date(a.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[a]),[g,L]=E.useState(!1),[U,Y]=E.useState(0),[W,G]=E.useState(!1),M=E.useRef(null);E.useEffect(()=>(document.addEventListener("mouseup",z),window.addEventListener("scroll",K),()=>{document.removeEventListener("mouseup",z),window.removeEventListener("scroll",K)}));const B=()=>{G(!W)},z=b=>{M.current&&!M.current.contains(b.target)&&G(!1)},K=()=>{if(l){const b=window.pageYOffset||document.documentElement.scrollTop;if(b<0||Math.abs(b-U)<60)return;L(b>U),Y(b)}};return p("header",{...S,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ft("pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":g}),ref:D,children:[p("div",{className:"pkt-header__logo",children:[typeof e=="string"?o("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.2/logos/"})}):o("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:o(N,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/7.2/logos/"})}),o("span",{className:"pkt-header__logo-service",children:n})]}),o("nav",{className:"pkt-header__actions",children:p("ul",{className:"pkt-header__actions-row",children:[h&&o("li",{children:o(ie,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:x,children:"Meny"})}),(a||s)&&p("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!g?"pkt-header--open-dropdown":""}`,ref:M,children:[p("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":W,onClick:B,children:[o(N,{name:"user",className:"pkt-btn__icon"}),o("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(a==null?void 0:a.name)}),o("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(a==null?void 0:a.shortname)}),o(N,{name:"chevron-thin-down",className:"pkt-btn--closed"}),o(N,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),p("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[a&&p("li",{children:[o("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),o("div",{className:"pkt-user-menu__name",children:a.name}),a.lastLoggedIn&&p("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",o("time",{children:R})]})]}),i&&o("li",{children:o("ul",{className:"pkt-list",children:i.map((b,I)=>o("li",{children:typeof b.target=="string"?p("a",{href:b.target,className:"pkt-link",children:[b.iconName&&o(N,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):p("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&o(N,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userMenu-${I}`))})}),(s||m)&&p("li",{children:[s&&p(q,{children:[o("div",{className:"pkt-user-menu__label",children:"Representerer"}),o("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&p("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),o("ul",{className:"pkt-list mt-size-16",children:m&&o("li",{children:p("button",{className:"pkt-link-button pkt-link",onClick:j,children:[o(N,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),o("li",{children:o("ul",{className:"pkt-list",children:(c||!v)&&p(q,{children:[c==null?void 0:c.map((b,I)=>o("li",{children:typeof b.target=="string"?p("a",{href:b.target,className:"pkt-link",children:[b.iconName&&o(N,{name:b.iconName,className:"pkt-link__icon"}),b.title]}):p("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:[b.iconName&&o(N,{name:b.iconName,className:"pkt-link__icon"}),b.title]})},`userOptions-${I}`)),!v&&o("li",{children:p("button",{className:"pkt-link-button pkt-link",onClick:P,children:[o(N,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&o("li",{className:"footer",children:o("ul",{className:"pkt-list-horizontal bordered",children:f.map((b,I)=>o("li",{children:typeof b.target=="string"?o("a",{href:b.target,className:"pkt-link",children:b.title}):o("button",{className:"pkt-link-button pkt-link",onClick:b.target,children:b.title})},`userMenuFooter-${I}`))})})]})]}),v&&o("li",{children:o(ie,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),dt=E.forwardRef(({label:e,id:n,children:r,...l},a)=>p("div",{className:"pkt-form-group",children:[o("label",{htmlFor:n,className:"pkt-form-label",children:e}),o("input",{className:"pkt-form-input",id:n,...l,ref:a}),r]}));dt.displayName="PktInput";const _e=E.forwardRef(({forId:e,label:n,helptext:r,helptextDropdown:l,helptextDropdownButton:a,optional:i,required:s,hasError:c,errorMessage:f,disabled:m,inline:h,ariaDescribedby:v,useWrapper:x=!0,children:P,className:j},S)=>{const[D,R]=E.useState(!1),g=()=>{R(!D)},L=()=>i?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":s?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",U=i?"Valgfritt":s?"Må fylles ut":"",Y=m?"pkt-inputwrapper--disabled":"",W=h?"pkt-inputwrapper--inline":"",G=c?"pkt-inputwrapper--error":"",M=!!l&&l!=="",B=a||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',z=M?"div":"label",K=M?"h2":"span",b=v||(r?`${e}-helptext`:void 0);return p("div",{className:["pkt-inputwrapper",j,Y,W,G].join(" "),ref:S,children:[x?p(q,{children:[o(z,{htmlFor:e,className:"pkt-inputwrapper__label","aria-describedby":M?"":v,children:p(K,{id:`${e}-label`,children:[n,U!==""&&o("span",{className:L(),children:U})]})}),r&&o("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:r}),M&&l!==""&&p("div",{children:[o(ie,{skin:"tertiary",size:"small",variant:"icon-right",iconName:D?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:g,children:o("span",{dangerouslySetInnerHTML:{__html:B}})}),o("div",{className:`pkt-inputwrapper__helptext ${D?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:o("span",{dangerouslySetInnerHTML:{__html:l}})}),o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":b,children:n})]}),o(q,{children:P})]}):p(q,{children:[o("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":b,id:`${e}-label`,children:n}),P]}),c&&o("div",{children:o(qe,{skin:"error","aria-live":"assertive",children:f})})]})});_e.displayName="PktInputWrapper";const pt=E.forwardRef(({children:e,className:n,iconName:r="user",openInNewTab:l=!1,skin:a="normal",href:i="#",external:s=!1,title:c},f)=>{const m=[n,"pkt-linkcard",a&&`pkt-linkcard--${a}`].filter(Boolean).join(" ");return p("a",{href:i,className:`pkt-linkcard pkt-link ${m}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:f,children:[o(N,{className:"pkt-link__icon",name:r}),p("div",{className:"pkt-linkcard__content",children:[o("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:c}),o("div",{className:"pkt-linkcard__text",children:e})]})]})});pt.displayName="PktLinkCard";const jn=({children:e,skin:n="beige",title:r,className:l,...a})=>{const i=["pkt-messagebox",n&&`pkt-messagebox--${n}`,l].filter(Boolean).join(" ");return p("div",{...a,className:i,children:[o("div",{className:"pkt-messagebox__title",children:r}),o("div",{className:"pkt-messagebox__text",children:e})]})},mt=E.forwardRef(({id:e,name:n,label:r,value:l,...a},i)=>p("div",{className:"pkt-form-group",children:[o("input",{type:"radio",className:"pkt-form-check-input",id:e,name:n,value:l,ref:i,...a}),o("label",{className:"pkt-form-label",htmlFor:e,children:r})]}));mt.displayName="PktRadio";const Dn=({label:e,children:n})=>p(q,{children:[o("p",{children:e}),o("div",{className:"pkt-form-group",children:n})]}),Ln=({isResponsive:e,children:n})=>e?o("div",{className:"pkt-table-container",children:n}):o(q,{children:n}),In=({isResponsive:e,modifiers:{info:n=!1,success:r=!1,strong:l=!1,shadow:a=!1}={},children:i})=>o(Ln,{isResponsive:e,children:o("table",{className:ft("pkt-table",{"pkt-table--info":n,"pkt-table--success":r,"pkt-table--strong":l,"pkt-table--shadow":a}),children:i})}),Fn=({children:e})=>o("td",{className:"pkt-table__th",children:e}),$n=({children:e})=>o("th",{className:"pkt-table__th",children:e}),ht=E.forwardRef(({children:e,className:n,skin:r="blue",textStyle:l="normal-text",size:a="medium",closeTag:i=!1,iconName:s="",type:c="button",ariaLabel:f="close",onClick:m=()=>{}},h)=>{const[v,x]=E.useState(!1),P=R=>{x(!0),m(R)},j=["pkt-tag",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),S=["pkt-tag","pkt-btn","pkt-btn--tertiary",a&&`pkt-tag--${a}`,r&&`pkt-tag--${r}`,l&&`pkt-tag--${l}`,s&&i?"pkt-btn--icons-right-and-left":null,i&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),D=!v;return i&&s?o(q,{children:D&&p("button",{className:S,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__icon",name:s}),e,o(N,{className:"pkt-tag__close-btn",name:"close"})]})}):i?o(q,{children:D&&p("button",{className:S,type:c,"aria-label":f,onClick:P,ref:h,children:[o(N,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?p("span",{className:j,children:[o(N,{className:"pkt-tag__icon",name:s}),e]}):o("span",{className:j,children:e})});ht.displayName="PktTag";const An=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,counter:l,counterMaxLength:a,className:i,disabled:s,errorMessage:c,hasError:f,helptext:m,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,name:j,optional:S,placeholder:D,required:R,rows:g,useWrapper:L,onChange:U,...Y},W)=>{const G=[i,"pkt-textinput","pkt-textarea"].join(" "),M=r||`${e}-label`,B=E.useRef(null),[z,K]=E.useState(0),b=I=>{var J,Q;if(l&&K(((Q=(J=I.currentTarget)==null?void 0:J.value)==null?void 0:Q.length)||0),U)return U(I)};return E.useEffect(()=>{var I,J;typeof W=="function"&&W(B.current),l&&K(((J=(I=B==null?void 0:B.current)==null?void 0:I.value)==null?void 0:J.length)||0)},[W]),p(_e,{ariaDescribedby:n,className:G,disabled:s,errorMessage:c,forId:e,hasError:f,helptext:m,helptextDropdown:h,helptextDropdownButton:v,inline:x,label:P,optional:S,required:R,useWrapper:L,children:[o("textarea",{ref:B,className:`pkt-textinput__input ${a&&z>a?"pkt-textinput__input--counter-error":""}`,name:j||e,id:e,placeholder:D,disabled:s,rows:g,"aria-labelledby":M,"aria-invalid":f,"aria-required":R,...Y,onChange:b}),l&&p("div",{className:"pkt-textinput__counter","aria-live":"polite","aria-atomic":!0,children:[z||0,a&&`/${a}`]})]})}),Un=E.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:r,autocomplete:l="off",className:a,disabled:i=!1,errorMessage:s,hasError:c=!1,helptext:f,helptextDropdown:m,helptextDropdownButton:h,iconNameRight:v,inline:x=!1,label:P,name:j,optional:S=!1,placeholder:D,prefix:R,required:g=!1,suffix:L,type:U="text",useWrapper:Y=!0,value:W,...G},M)=>{const B=[a,"pkt-textinput"].join(" "),z=r||`${e}-label`;return o(_e,{ariaDescribedby:n,className:B,disabled:i,errorMessage:s,forId:e,hasError:c,helptext:f,helptextDropdown:m,helptextDropdownButton:h,inline:x,label:P,optional:S,required:g,useWrapper:Y,children:p("div",{className:"pkt-textinput__container",children:[R&&o("div",{className:"pkt-textinput__input-prefix",children:R}),o("input",{ref:M,className:"pkt-textinput__input",type:U,name:j||e,id:e,placeholder:D,autoComplete:l,value:W,disabled:i,"aria-required":g,"aria-invalid":c,"aria-labelledby":z,...G}),L&&p("p",{className:"pkt-textinput__input-suffix",children:[L,v&&o(N,{className:"pkt-textinput__input-suffix-icon",name:v})]}),!L&&v&&o(N,{className:"pkt-textinput__input-icon",name:v})]})})});T.PktAlert=qe,T.PktBackLink=Yt,T.PktBreadcrumbs=Pn,T.PktButton=ie,T.PktFooter=Rn,T.PktFooterSimple=Sn,T.PktHeader=Tn,T.PktIcon=N,T.PktInput=dt,T.PktInputWrapper=_e,T.PktLinkCard=pt,T.PktMessagebox=jn,T.PktRadio=mt,T.PktRadioGroup=Dn,T.PktTable=In,T.PktTableData=Fn,T.PktTableHeader=$n,T.PktTag=ht,T.PktTextarea=An,T.PktTextinput=Un,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "7.1.6",
3
+ "version": "7.2.0",
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",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@oslokommune/punkt-assets": "^7.0.0",
35
- "@oslokommune/punkt-css": "^7.1.6",
35
+ "@oslokommune/punkt-css": "^7.2.0",
36
36
  "@testing-library/jest-dom": "^5.16.5",
37
37
  "@testing-library/react": "^14.0.0",
38
38
  "@testing-library/user-event": "^14.4.3",
@@ -90,5 +90,5 @@
90
90
  "url": "https://github.com/oslokommune/punkt/issues"
91
91
  },
92
92
  "license": "MIT",
93
- "gitHead": "baeec3b03bbbe29c7f8bd5adac16d9516c948bc3"
93
+ "gitHead": "f66d7532315a855442edf9e19cf883d7862a787f"
94
94
  }
@@ -0,0 +1,63 @@
1
+ import { render } from '@testing-library/react';
2
+ import { axe, toHaveNoViolations } from 'jest-axe'
3
+ import { BrowserRouter as Router } from 'react-router-dom';
4
+
5
+ import { PktBreadcrumbs } from './Breadcrumbs';
6
+
7
+ expect.extend(toHaveNoViolations)
8
+
9
+ describe('PktBreadcrumbs Component', () => {
10
+ const breadcrumbs = [
11
+ { text: 'Home', href: '/' },
12
+ { text: 'Products', href: '/products' },
13
+ { text: 'Item', href: '/products/item' },
14
+ ];
15
+
16
+ it('renders breadcrumbs correctly with react-router navigation', () => {
17
+ const { getAllByText } = render(
18
+ <Router>
19
+ <PktBreadcrumbs breadcrumbs={breadcrumbs} navigationType="router" />
20
+ </Router>
21
+ );
22
+
23
+ expect(getAllByText('Home')).toBeTruthy();
24
+ expect(getAllByText('Products')).toBeTruthy();
25
+ expect(getAllByText('Item')).toBeTruthy();
26
+ });
27
+
28
+ it('renders breadcrumbs correctly with anchor navigation', () => {
29
+ const { getAllByText } = render(<PktBreadcrumbs breadcrumbs={breadcrumbs} navigationType="anchor" />);
30
+
31
+ expect(getAllByText('Home')).toBeTruthy();
32
+ expect(getAllByText('Products')).toBeTruthy();
33
+ expect(getAllByText('Item')).toBeTruthy();
34
+ });
35
+
36
+ it('renders back link correctly on mobile with router navigation', () => {
37
+ const { getAllByText } = render(
38
+ <Router>
39
+ <PktBreadcrumbs breadcrumbs={breadcrumbs} navigationType="router" />
40
+ </Router>
41
+ );
42
+
43
+ expect(getAllByText('Home')).toBeTruthy();
44
+ expect(getAllByText('Products')).toBeTruthy();
45
+ expect(getAllByText('Item')).toBeTruthy();
46
+ });
47
+
48
+ it('renders back link correctly on mobile with anchor navigation', () => {
49
+ const { getAllByText } = render(<PktBreadcrumbs breadcrumbs={breadcrumbs} navigationType="anchor" />);
50
+
51
+ expect(getAllByText('Home')).toBeTruthy();
52
+ expect(getAllByText('Products')).toBeTruthy();
53
+ expect(getAllByText('Item')).toBeTruthy();
54
+ });
55
+
56
+ it('renders with no wcag errors with axe', async () => {
57
+ const { container } = render(<PktBreadcrumbs breadcrumbs={breadcrumbs} navigationType="anchor" />)
58
+ const results = await axe(container)
59
+
60
+ expect(results).toHaveNoViolations()
61
+ })
62
+ });
63
+
@@ -0,0 +1,114 @@
1
+ import React, { ForwardedRef, forwardRef } from 'react';
2
+ import { Link } from 'react-router-dom';
3
+
4
+ import PktIcon from '../icon/Icon'; // Import your Icon component
5
+
6
+ export interface IBreadcrumbs {
7
+ text: string;
8
+ href: string;
9
+ }
10
+
11
+ export interface IPktBreadcrumbs extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
12
+ breadcrumbs: IBreadcrumbs[];
13
+ navigationType?: 'router' | 'anchor';
14
+ }
15
+
16
+
17
+ export const PktBreadcrumbs = forwardRef(
18
+ ({ breadcrumbs, navigationType, className, ...props }: IPktBreadcrumbs, ref: ForwardedRef<HTMLAnchorElement>) => {
19
+
20
+ // Slice the breadcrumb to maximum links
21
+ const slicedBreadcrumbs = breadcrumbs.slice(0, 4);
22
+ // Define the backLink function
23
+ const backLink = slicedBreadcrumbs[slicedBreadcrumbs.length - 2];
24
+
25
+ // Define the classes
26
+ const classes = [
27
+ className,
28
+ 'pkt-breadcrumbs',
29
+ ].filter(Boolean)
30
+ .join(' ')
31
+
32
+
33
+ // If navigationType is router, then use react-router Link, else use anchor tag
34
+ // Mobile and desktop have different markup
35
+ return (
36
+ <nav ref={ref} aria-label="brødsmulemeny" className={classes}>
37
+
38
+ <ol className="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
39
+ {slicedBreadcrumbs.map((item, index) => (
40
+ <li
41
+ key={`breadcrumb-${index}`}
42
+ className="pkt-breadcrumbs__item"
43
+ >
44
+
45
+ {index === slicedBreadcrumbs.length - 1 ? (
46
+ <span className="pkt-breadcrumbs__label" aria-current="true">
47
+ <span className="pkt-breadcrumbs__text">{item.text}</span>
48
+ </span>
49
+ ) : (
50
+ navigationType === 'router' ? (
51
+ <Link
52
+ to={item.href}
53
+ className="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
54
+ {...props}
55
+ >
56
+ <PktIcon
57
+ className="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
58
+ name="chevron-thin-right"
59
+ />
60
+ <span className="pkt-breadcrumbs__text">{item.text}</span>
61
+ </Link>
62
+
63
+ ) : (
64
+ <a
65
+ href={item.href}
66
+ className="pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link"
67
+ {...props}
68
+ >
69
+ <PktIcon
70
+ className="pkt-icon pkt-breadcrumbs__icon pkt-link__icon"
71
+ name="chevron-thin-right"
72
+ />
73
+ <span className="pkt-breadcrumbs__text">{item.text}</span>
74
+ </a>
75
+ )
76
+
77
+ )}
78
+ </li>
79
+ ))}
80
+ </ol>
81
+
82
+ {
83
+ navigationType === 'router' ? (
84
+ <Link
85
+ to={backLink.href}
86
+ className="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
87
+ {...props}
88
+ >
89
+ <PktIcon
90
+ className="pkt-back-link__icon pkt-icon pkt-link__icon"
91
+ name="chevron-thin-left"
92
+ />
93
+ <span className="pkt-breadcrumbs__text">{backLink.text}</span>
94
+ </Link>
95
+ ) : (
96
+ <a
97
+ href={backLink.href}
98
+ className="pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile"
99
+ {...props}
100
+ >
101
+ <PktIcon
102
+ className="pkt-back-link__icon pkt-icon pkt-link__icon"
103
+ name="chevron-thin-left"
104
+ />
105
+ <span className="pkt-breadcrumbs__text">{backLink.text}</span>
106
+ </a>
107
+ )
108
+ }
109
+ </nav>
110
+ );
111
+ }
112
+ );
113
+
114
+ export default PktBreadcrumbs;
@@ -1,5 +1,6 @@
1
1
  export { PktAlert } from './alert/Alert'
2
2
  export { PktBackLink } from './backlink/BackLink'
3
+ export { PktBreadcrumbs } from './breadcrumbs/Breadcrumbs'
3
4
  export { PktButton } from './button/Button'
4
5
  export { PktFooter } from './footer/Footer'
5
6
  export { PktFooterSimple } from './footerSimple/FooterSimple'
@@ -121,9 +121,7 @@ export const PktInputWrapper = forwardRef(
121
121
  : 'pkt-inputwrapper__helptext-expandable-closed'
122
122
  }`}
123
123
  >
124
- <PktAlert>
125
- <span dangerouslySetInnerHTML={{ __html: helptextDropdown }} />
126
- </PktAlert>
124
+ <span dangerouslySetInnerHTML={{ __html: helptextDropdown }} />
127
125
  </div>
128
126
  <label htmlFor={forId} className="pkt-sr-only" aria-describedby={describedBy}>
129
127
  {label}