@oslokommune/punkt-react 11.5.3 → 11.6.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(T,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(T=typeof globalThis<"u"?globalThis:T||self,g(T["punkt-react"]={},T.React))})(this,function(T,g){"use strict";function Wt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const y=Wt(g);function Bt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={exports:{}},se={};/**
1
+ (function(T,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(T=typeof globalThis<"u"?globalThis:T||self,b(T["punkt-react"]={},T.React))})(this,function(T,b){"use strict";function Wt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const y=Wt(b);function Bt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Re={exports:{}},se={};/**
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 He;function Mt(){if(He)return se;He=1;var e=g,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(c,f,u){var d,k={},_=null,R=null;u!==void 0&&(_=""+u),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(R=f.ref);for(d in f)l.call(f,d)&&!o.hasOwnProperty(d)&&(k[d]=f[d]);if(c&&c.defaultProps)for(d in f=c.defaultProps,f)k[d]===void 0&&(k[d]=f[d]);return{$$typeof:n,type:c,key:_,ref:R,props:k,_owner:r.current}}return se.Fragment=a,se.jsx=s,se.jsxs=s,se}var ce={};/**
9
+ */var He;function Mt(){if(He)return se;He=1;var e=b,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(c,f,u){var d,k={},v=null,S=null;u!==void 0&&(v=""+u),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(S=f.ref);for(d in f)l.call(f,d)&&!o.hasOwnProperty(d)&&(k[d]=f[d]);if(c&&c.defaultProps)for(d in f=c.defaultProps,f)k[d]===void 0&&(k[d]=f[d]);return{$$typeof:n,type:c,key:v,ref:S,props:k,_owner:r.current}}return se.Fragment=a,se.jsx=s,se.jsxs=s,se}var ce={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
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 Xe;function Yt(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&function(){var e=g,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S=Symbol.iterator,$="@@iterator";function I(t){if(t===null||typeof t!="object")return null;var p=S&&t[S]||t[$];return typeof p=="function"?p:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(t){{for(var p=arguments.length,m=new Array(p>1?p-1:0),b=1;b<p;b++)m[b-1]=arguments[b];v("error",t,m)}}function v(t,p,m){{var b=E.ReactDebugCurrentFrame,O=b.getStackAddendum();O!==""&&(p+="%s",m=m.concat([O]));var D=m.map(function(P){return String(P)});D.unshift("Warning: "+p),Function.prototype.apply.call(console[t],console,D)}}var j=!1,V=!1,W=!1,B=!1,J=!1,M;M=Symbol.for("react.module.reference");function G(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===o||J||t===r||t===u||t===d||B||t===R||j||V||W||typeof t=="object"&&t!==null&&(t.$$typeof===_||t.$$typeof===k||t.$$typeof===s||t.$$typeof===c||t.$$typeof===f||t.$$typeof===M||t.getModuleId!==void 0))}function z(t,p,m){var b=t.displayName;if(b)return b;var O=p.displayName||p.name||"";return O!==""?m+"("+O+")":m}function N(t){return t.displayName||"Context"}function L(t){if(t==null)return null;if(typeof t.tag=="number"&&C("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 a:return"Portal";case o:return"Profiler";case r:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case c:var p=t;return N(p)+".Consumer";case s:var m=t;return N(m._context)+".Provider";case f:return z(t,t.render,"ForwardRef");case k:var b=t.displayName||null;return b!==null?b:L(t.type)||"Memo";case _:{var O=t,D=O._payload,P=O._init;try{return L(P(D))}catch{return null}}}return null}var K=Object.assign,q=0,ee,te,me,yt,wt,Et,Ct;function xt(){}xt.__reactDisabledLog=!0;function er(){{if(q===0){ee=console.log,te=console.info,me=console.warn,yt=console.error,wt=console.group,Et=console.groupCollapsed,Ct=console.groupEnd;var t={configurable:!0,enumerable:!0,value:xt,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}q++}}function tr(){{if(q--,q===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},t,{value:ee}),info:K({},t,{value:te}),warn:K({},t,{value:me}),error:K({},t,{value:yt}),group:K({},t,{value:wt}),groupCollapsed:K({},t,{value:Et}),groupEnd:K({},t,{value:Ct})})}q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Be=E.ReactCurrentDispatcher,Me;function Ee(t,p,m){{if(Me===void 0)try{throw Error()}catch(O){var b=O.stack.trim().match(/\n( *(at )?)/);Me=b&&b[1]||""}return`
18
- `+Me+t}}var Ye=!1,Ce;{var nr=typeof WeakMap=="function"?WeakMap:Map;Ce=new nr}function Pt(t,p){if(!t||Ye)return"";{var m=Ce.get(t);if(m!==void 0)return m}var b;Ye=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=Be.current,Be.current=null,er();try{if(p){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(Q){b=Q}Reflect.construct(t,[],P)}else{try{P.call()}catch(Q){b=Q}t.call(P.prototype)}}else{try{throw Error()}catch(Q){b=Q}t()}}catch(Q){if(Q&&b&&typeof Q.stack=="string"){for(var x=Q.stack.split(`
19
- `),Y=b.stack.split(`
20
- `),U=x.length-1,A=Y.length-1;U>=1&&A>=0&&x[U]!==Y[A];)A--;for(;U>=1&&A>=0;U--,A--)if(x[U]!==Y[A]){if(U!==1||A!==1)do if(U--,A--,A<0||x[U]!==Y[A]){var H=`
21
- `+x[U].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),typeof t=="function"&&Ce.set(t,H),H}while(U>=1&&A>=0);break}}}finally{Ye=!1,Be.current=D,tr(),Error.prepareStackTrace=O}var oe=t?t.displayName||t.name:"",Vt=oe?Ee(oe):"";return typeof t=="function"&&Ce.set(t,Vt),Vt}function rr(t,p,m){return Pt(t,!1)}function ar(t){var p=t.prototype;return!!(p&&p.isReactComponent)}function xe(t,p,m){if(t==null)return"";if(typeof t=="function")return Pt(t,ar(t));if(typeof t=="string")return Ee(t);switch(t){case u:return Ee("Suspense");case d:return Ee("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return rr(t.render);case k:return xe(t.type,p,m);case _:{var b=t,O=b._payload,D=b._init;try{return xe(D(O),p,m)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,St={},Rt=E.ReactDebugCurrentFrame;function Se(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);Rt.setExtraStackFrame(m)}else Rt.setExtraStackFrame(null)}function lr(t,p,m,b,O){{var D=Function.call.bind(Pe);for(var P in t)if(D(t,P)){var x=void 0;try{if(typeof t[P]!="function"){var Y=Error((b||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Y.name="Invariant Violation",Y}x=t[P](p,P,b,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){x=U}x&&!(x instanceof Error)&&(Se(O),C("%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).",b||"React class",m,P,typeof x),Se(null)),x instanceof Error&&!(x.message in St)&&(St[x.message]=!0,Se(O),C("Failed %s type: %s",m,x.message),Se(null))}}}var ir=Array.isArray;function Ke(t){return ir(t)}function or(t){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&t[Symbol.toStringTag]||t.constructor.name||"Object";return m}}function sr(t){try{return Tt(t),!1}catch{return!0}}function Tt(t){return""+t}function Ot(t){if(sr(t))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",or(t)),Tt(t)}var he=E.ReactCurrentOwner,cr={key:!0,ref:!0,__self:!0,__source:!0},$t,jt,Je;Je={};function ur(t){if(Pe.call(t,"ref")){var p=Object.getOwnPropertyDescriptor(t,"ref").get;if(p&&p.isReactWarning)return!1}return t.ref!==void 0}function fr(t){if(Pe.call(t,"key")){var p=Object.getOwnPropertyDescriptor(t,"key").get;if(p&&p.isReactWarning)return!1}return t.key!==void 0}function pr(t,p){if(typeof t.ref=="string"&&he.current&&p&&he.current.stateNode!==p){var m=L(he.current.type);Je[m]||(C('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',L(he.current.type),t.ref),Je[m]=!0)}}function dr(t,p){{var m=function(){$t||($t=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"key",{get:m,configurable:!0})}}function mr(t,p){{var m=function(){jt||(jt=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"ref",{get:m,configurable:!0})}}var hr=function(t,p,m,b,O,D,P){var x={$$typeof:n,type:t,key:p,ref:m,props:P,_owner:D};return x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(x,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(x,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x};function kr(t,p,m,b,O){{var D,P={},x=null,Y=null;m!==void 0&&(Ot(m),x=""+m),fr(p)&&(Ot(p.key),x=""+p.key),ur(p)&&(Y=p.ref,pr(p,O));for(D in p)Pe.call(p,D)&&!cr.hasOwnProperty(D)&&(P[D]=p[D]);if(t&&t.defaultProps){var U=t.defaultProps;for(D in U)P[D]===void 0&&(P[D]=U[D])}if(x||Y){var A=typeof t=="function"?t.displayName||t.name||"Unknown":t;x&&dr(P,A),Y&&mr(P,A)}return hr(t,x,Y,O,b,he.current,P)}}var ze=E.ReactCurrentOwner,Dt=E.ReactDebugCurrentFrame;function ie(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);Dt.setExtraStackFrame(m)}else Dt.setExtraStackFrame(null)}var qe;qe=!1;function Ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function It(){{if(ze.current){var t=L(ze.current.type);if(t)return`
17
+ */var Xe;function Yt(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&function(){var e=b,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),x=Symbol.iterator,$="@@iterator";function L(t){if(t===null||typeof t!="object")return null;var p=x&&t[x]||t[$];return typeof p=="function"?p:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(t){{for(var p=arguments.length,m=new Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];_("error",t,m)}}function _(t,p,m){{var g=E.ReactDebugCurrentFrame,O=g.getStackAddendum();O!==""&&(p+="%s",m=m.concat([O]));var D=m.map(function(R){return String(R)});D.unshift("Warning: "+p),Function.prototype.apply.call(console[t],console,D)}}var j=!1,V=!1,W=!1,B=!1,J=!1,M;M=Symbol.for("react.module.reference");function G(t){return!!(typeof t=="string"||typeof t=="function"||t===l||t===o||J||t===r||t===u||t===d||B||t===S||j||V||W||typeof t=="object"&&t!==null&&(t.$$typeof===v||t.$$typeof===k||t.$$typeof===s||t.$$typeof===c||t.$$typeof===f||t.$$typeof===M||t.getModuleId!==void 0))}function z(t,p,m){var g=t.displayName;if(g)return g;var O=p.displayName||p.name||"";return O!==""?m+"("+O+")":m}function N(t){return t.displayName||"Context"}function I(t){if(t==null)return null;if(typeof t.tag=="number"&&C("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 a:return"Portal";case o:return"Profiler";case r:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case c:var p=t;return N(p)+".Consumer";case s:var m=t;return N(m._context)+".Provider";case f:return z(t,t.render,"ForwardRef");case k:var g=t.displayName||null;return g!==null?g:I(t.type)||"Memo";case v:{var O=t,D=O._payload,R=O._init;try{return I(R(D))}catch{return null}}}return null}var K=Object.assign,q=0,ee,te,me,yt,wt,Et,Ct;function xt(){}xt.__reactDisabledLog=!0;function er(){{if(q===0){ee=console.log,te=console.info,me=console.warn,yt=console.error,wt=console.group,Et=console.groupCollapsed,Ct=console.groupEnd;var t={configurable:!0,enumerable:!0,value:xt,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}q++}}function tr(){{if(q--,q===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},t,{value:ee}),info:K({},t,{value:te}),warn:K({},t,{value:me}),error:K({},t,{value:yt}),group:K({},t,{value:wt}),groupCollapsed:K({},t,{value:Et}),groupEnd:K({},t,{value:Ct})})}q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Be=E.ReactCurrentDispatcher,Me;function Ee(t,p,m){{if(Me===void 0)try{throw Error()}catch(O){var g=O.stack.trim().match(/\n( *(at )?)/);Me=g&&g[1]||""}return`
18
+ `+Me+t}}var Ye=!1,Ce;{var nr=typeof WeakMap=="function"?WeakMap:Map;Ce=new nr}function Pt(t,p){if(!t||Ye)return"";{var m=Ce.get(t);if(m!==void 0)return m}var g;Ye=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=Be.current,Be.current=null,er();try{if(p){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(Q){g=Q}Reflect.construct(t,[],R)}else{try{R.call()}catch(Q){g=Q}t.call(R.prototype)}}else{try{throw Error()}catch(Q){g=Q}t()}}catch(Q){if(Q&&g&&typeof Q.stack=="string"){for(var P=Q.stack.split(`
19
+ `),Y=g.stack.split(`
20
+ `),U=P.length-1,A=Y.length-1;U>=1&&A>=0&&P[U]!==Y[A];)A--;for(;U>=1&&A>=0;U--,A--)if(P[U]!==Y[A]){if(U!==1||A!==1)do if(U--,A--,A<0||P[U]!==Y[A]){var H=`
21
+ `+P[U].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),typeof t=="function"&&Ce.set(t,H),H}while(U>=1&&A>=0);break}}}finally{Ye=!1,Be.current=D,tr(),Error.prepareStackTrace=O}var oe=t?t.displayName||t.name:"",Vt=oe?Ee(oe):"";return typeof t=="function"&&Ce.set(t,Vt),Vt}function rr(t,p,m){return Pt(t,!1)}function ar(t){var p=t.prototype;return!!(p&&p.isReactComponent)}function xe(t,p,m){if(t==null)return"";if(typeof t=="function")return Pt(t,ar(t));if(typeof t=="string")return Ee(t);switch(t){case u:return Ee("Suspense");case d:return Ee("SuspenseList")}if(typeof t=="object")switch(t.$$typeof){case f:return rr(t.render);case k:return xe(t.type,p,m);case v:{var g=t,O=g._payload,D=g._init;try{return xe(D(O),p,m)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,St={},Rt=E.ReactDebugCurrentFrame;function Se(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);Rt.setExtraStackFrame(m)}else Rt.setExtraStackFrame(null)}function lr(t,p,m,g,O){{var D=Function.call.bind(Pe);for(var R in t)if(D(t,R)){var P=void 0;try{if(typeof t[R]!="function"){var Y=Error((g||"React class")+": "+m+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Y.name="Invariant Violation",Y}P=t[R](p,R,g,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){P=U}P&&!(P instanceof Error)&&(Se(O),C("%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).",g||"React class",m,R,typeof P),Se(null)),P instanceof Error&&!(P.message in St)&&(St[P.message]=!0,Se(O),C("Failed %s type: %s",m,P.message),Se(null))}}}var ir=Array.isArray;function Ke(t){return ir(t)}function or(t){{var p=typeof Symbol=="function"&&Symbol.toStringTag,m=p&&t[Symbol.toStringTag]||t.constructor.name||"Object";return m}}function sr(t){try{return Tt(t),!1}catch{return!0}}function Tt(t){return""+t}function Ot(t){if(sr(t))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",or(t)),Tt(t)}var he=E.ReactCurrentOwner,cr={key:!0,ref:!0,__self:!0,__source:!0},$t,jt,Je;Je={};function ur(t){if(Pe.call(t,"ref")){var p=Object.getOwnPropertyDescriptor(t,"ref").get;if(p&&p.isReactWarning)return!1}return t.ref!==void 0}function fr(t){if(Pe.call(t,"key")){var p=Object.getOwnPropertyDescriptor(t,"key").get;if(p&&p.isReactWarning)return!1}return t.key!==void 0}function pr(t,p){if(typeof t.ref=="string"&&he.current&&p&&he.current.stateNode!==p){var m=I(he.current.type);Je[m]||(C('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(he.current.type),t.ref),Je[m]=!0)}}function dr(t,p){{var m=function(){$t||($t=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"key",{get:m,configurable:!0})}}function mr(t,p){{var m=function(){jt||(jt=!0,C("%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)",p))};m.isReactWarning=!0,Object.defineProperty(t,"ref",{get:m,configurable:!0})}}var hr=function(t,p,m,g,O,D,R){var P={$$typeof:n,type:t,key:p,ref:m,props:R,_owner:D};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function kr(t,p,m,g,O){{var D,R={},P=null,Y=null;m!==void 0&&(Ot(m),P=""+m),fr(p)&&(Ot(p.key),P=""+p.key),ur(p)&&(Y=p.ref,pr(p,O));for(D in p)Pe.call(p,D)&&!cr.hasOwnProperty(D)&&(R[D]=p[D]);if(t&&t.defaultProps){var U=t.defaultProps;for(D in U)R[D]===void 0&&(R[D]=U[D])}if(P||Y){var A=typeof t=="function"?t.displayName||t.name||"Unknown":t;P&&dr(R,A),Y&&mr(R,A)}return hr(t,P,Y,O,g,he.current,R)}}var ze=E.ReactCurrentOwner,Dt=E.ReactDebugCurrentFrame;function ie(t){if(t){var p=t._owner,m=xe(t.type,t._source,p?p.type:null);Dt.setExtraStackFrame(m)}else Dt.setExtraStackFrame(null)}var qe;qe=!1;function Ge(t){return typeof t=="object"&&t!==null&&t.$$typeof===n}function Lt(){{if(ze.current){var t=I(ze.current.type);if(t)return`
22
22
 
23
23
  Check the render method of \``+t+"`."}return""}}function vr(t){{if(t!==void 0){var p=t.fileName.replace(/^.*[\\\/]/,""),m=t.lineNumber;return`
24
24
 
25
- Check your code at `+p+":"+m+"."}return""}}var Lt={};function _r(t){{var p=It();if(!p){var m=typeof t=="string"?t:t.displayName||t.name;m&&(p=`
25
+ Check your code at `+p+":"+m+"."}return""}}var It={};function _r(t){{var p=Lt();if(!p){var m=typeof t=="string"?t:t.displayName||t.name;m&&(p=`
26
26
 
27
- Check the top-level render call using <`+m+">.")}return p}}function Ft(t,p){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var m=_r(p);if(Lt[m])return;Lt[m]=!0;var b="";t&&t._owner&&t._owner!==ze.current&&(b=" It was passed a child from "+L(t._owner.type)+"."),ie(t),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,b),ie(null)}}function Ut(t,p){{if(typeof t!="object")return;if(Ke(t))for(var m=0;m<t.length;m++){var b=t[m];Ge(b)&&Ft(b,p)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var O=I(t);if(typeof O=="function"&&O!==t.entries)for(var D=O.call(t),P;!(P=D.next()).done;)Ge(P.value)&&Ft(P.value,p)}}}function br(t){{var p=t.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===k))m=p.propTypes;else return;if(m){var b=L(p);lr(m,t.props,"prop",b,t)}else if(p.PropTypes!==void 0&&!qe){qe=!0;var O=L(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(t){{for(var p=Object.keys(t.props),m=0;m<p.length;m++){var b=p[m];if(b!=="children"&&b!=="key"){ie(t),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),ie(null);break}}t.ref!==null&&(ie(t),C("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}function At(t,p,m,b,O,D){{var P=G(t);if(!P){var x="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(x+=" 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 Y=vr(O);Y?x+=Y:x+=It();var U;t===null?U="null":Ke(t)?U="array":t!==void 0&&t.$$typeof===n?(U="<"+(L(t.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):U=typeof t,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,x)}var A=kr(t,p,m,O,D);if(A==null)return A;if(P){var H=p.children;if(H!==void 0)if(b)if(Ke(H)){for(var oe=0;oe<H.length;oe++)Ut(H[oe],t);Object.freeze&&Object.freeze(H)}else C("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 Ut(H,t)}return t===l?gr(A):br(A),A}}function Nr(t,p,m){return At(t,p,m,!0)}function yr(t,p,m){return At(t,p,m,!1)}var wr=yr,Er=Nr;ce.Fragment=l,ce.jsx=wr,ce.jsxs=Er}()),ce}process.env.NODE_ENV==="production"?Re.exports=Mt():Re.exports=Yt();var Te=Re.exports;const X=Te.Fragment,i=Te.jsx,h=Te.jsxs,Oe={},Kt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/11.5/icons/",zt=(e,n)=>(!Oe[e]&&typeof window.fetch=="function"&&(Oe[e]=window.fetch(n+e+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+n+e+".svg"),Kt)).then(a=>a)),Promise.resolve(Oe[e])),qt={fetchIcon:async(e,n)=>zt(e,n||Jt)},Ze=g.createContext(qt),w=({name:e,path:n,className:a="",...l})=>{const[r,o]=g.useState(null),s=g.useContext(Ze);return g.useEffect(()=>{e?s.fetchIcon(e,n).then(o):o(null)},[e,n]),r?i("span",{className:`pkt-icon ${a}`,dangerouslySetInnerHTML:{__html:r},...l}):null},Qe=g.forwardRef(({children:e,className:n,skin:a="info",closeAlert:l=!1,onClose:r,title:o,date:s,ariaLive:c="polite",compact:f=!1,...u},d)=>{const k=[n,"pkt-alert",a&&`pkt-alert--${a}`,f&&"pkt-alert--compact"].filter(Boolean).join(" "),[_,R]=g.useState(!0),S=()=>{R(!1),r&&r()};return _?h("div",{...u,className:k,"aria-live":c,ref:d,children:[i(w,{className:"pkt-alert__icon",name:a==="info"?"alert-information":`alert-${a}`}),l&&i("div",{className:"pkt-alert__close",children:i("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:S,children:i(w,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&i("div",{className:"pkt-alert__title",children:o}),i("div",{className:"pkt-alert__text",children:e}),s&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Gt=g.forwardRef(({href:e,text:n,onClick:a,className:l,...r},o)=>{const s=[l,"pkt-back-link"].filter(Boolean).join(" ");return i("nav",{ref:o,className:s,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:()=>{a&&a()},...r,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),i("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
27
+ Check the top-level render call using <`+m+">.")}return p}}function Ft(t,p){{if(!t._store||t._store.validated||t.key!=null)return;t._store.validated=!0;var m=_r(p);if(It[m])return;It[m]=!0;var g="";t&&t._owner&&t._owner!==ze.current&&(g=" It was passed a child from "+I(t._owner.type)+"."),ie(t),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,g),ie(null)}}function Ut(t,p){{if(typeof t!="object")return;if(Ke(t))for(var m=0;m<t.length;m++){var g=t[m];Ge(g)&&Ft(g,p)}else if(Ge(t))t._store&&(t._store.validated=!0);else if(t){var O=L(t);if(typeof O=="function"&&O!==t.entries)for(var D=O.call(t),R;!(R=D.next()).done;)Ge(R.value)&&Ft(R.value,p)}}}function br(t){{var p=t.type;if(p==null||typeof p=="string")return;var m;if(typeof p=="function")m=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===k))m=p.propTypes;else return;if(m){var g=I(p);lr(m,t.props,"prop",g,t)}else if(p.PropTypes!==void 0&&!qe){qe=!0;var O=I(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(t){{for(var p=Object.keys(t.props),m=0;m<p.length;m++){var g=p[m];if(g!=="children"&&g!=="key"){ie(t),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),ie(null);break}}t.ref!==null&&(ie(t),C("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}function At(t,p,m,g,O,D){{var R=G(t);if(!R){var P="";(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(P+=" 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 Y=vr(O);Y?P+=Y:P+=Lt();var U;t===null?U="null":Ke(t)?U="array":t!==void 0&&t.$$typeof===n?(U="<"+(I(t.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):U=typeof t,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,P)}var A=kr(t,p,m,O,D);if(A==null)return A;if(R){var H=p.children;if(H!==void 0)if(g)if(Ke(H)){for(var oe=0;oe<H.length;oe++)Ut(H[oe],t);Object.freeze&&Object.freeze(H)}else C("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 Ut(H,t)}return t===l?gr(A):br(A),A}}function Nr(t,p,m){return At(t,p,m,!0)}function yr(t,p,m){return At(t,p,m,!1)}var wr=yr,Er=Nr;ce.Fragment=l,ce.jsx=wr,ce.jsxs=Er}()),ce}process.env.NODE_ENV==="production"?Re.exports=Mt():Re.exports=Yt();var Te=Re.exports;const X=Te.Fragment,i=Te.jsx,h=Te.jsxs,Oe={},Kt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Jt="https://punkt-cdn.oslo.kommune.no/11.6/icons/",zt=(e,n)=>(!Oe[e]&&typeof window.fetch=="function"&&(Oe[e]=window.fetch(n+e+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+n+e+".svg"),Kt)).then(a=>a)),Promise.resolve(Oe[e])),qt={fetchIcon:async(e,n)=>zt(e,n||Jt)},Ze=b.createContext(qt),w=({name:e,path:n,className:a="",...l})=>{const[r,o]=b.useState(null),s=b.useContext(Ze);return b.useEffect(()=>{e?s.fetchIcon(e,n).then(o):o(null)},[e,n]),r?i("span",{className:`pkt-icon ${a}`,dangerouslySetInnerHTML:{__html:r},...l}):null},Qe=b.forwardRef(({children:e,className:n,skin:a="info",closeAlert:l=!1,onClose:r,title:o,date:s,ariaLive:c="polite",compact:f=!1,...u},d)=>{const k=[n,"pkt-alert",a&&`pkt-alert--${a}`,f&&"pkt-alert--compact"].filter(Boolean).join(" "),[v,S]=b.useState(!0),x=()=>{S(!1),r&&r()};return v?h("div",{...u,className:k,"aria-live":c,ref:d,children:[i(w,{className:"pkt-alert__icon",name:a==="info"?"alert-information":`alert-${a}`}),l&&i("div",{className:"pkt-alert__close",children:i("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:x,children:i(w,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&i("div",{className:"pkt-alert__title",children:o}),i("div",{className:"pkt-alert__text",children:e}),s&&h("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",s]})]}):null}),Gt=b.forwardRef(({href:e,text:n,onClick:a,className:l,...r},o)=>{const s=[l,"pkt-back-link"].filter(Boolean).join(" ");return i("nav",{ref:o,className:s,"aria-label":"Gå tilbake et steg",children:h("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:f=>{a&&a(f)},...r,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),i("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})});/**
28
28
  * @remix-run/router v1.14.0
29
29
  *
30
30
  * Copyright (c) Remix Software Inc.
@@ -33,7 +33,7 @@ Check the top-level render call using <`+m+">.")}return p}}function Ft(t,p){{if(
33
33
  * LICENSE.md file in the root directory of this source tree.
34
34
  *
35
35
  * @license MIT
36
- */function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},$e.apply(this,arguments)}var et;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(et||(et={}));function F(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ne(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function je(e){let{pathname:n="/",search:a="",hash:l=""}=e;return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function tt(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substr(a),e=e.substr(0,a));let l=e.indexOf("?");l>=0&&(n.search=e.substr(l),e=e.substr(0,l)),e&&(n.pathname=e)}return n}var nt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nt||(nt={}));function rt(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,l]=Ht(e.path,e.caseSensitive,e.end),r=n.match(a);if(!r)return null;let o=r[0],s=o.replace(/(.)\/+$/,"$1"),c=r.slice(1);return{params:l.reduce((u,d,k)=>{let{paramName:_,isOptional:R}=d;if(_==="*"){let $=c[k]||"";s=o.slice(0,o.length-$.length).replace(/(.)\/+$/,"$1")}const S=c[k];return R&&!S?u[_]=void 0:u[_]=Xt(S||"",_),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Ht(e,n,a){n===void 0&&(n=!1),a===void 0&&(a=!0),ne(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let l=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(s,c,f)=>(l.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(l.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),l]}function Xt(e,n){try{return decodeURIComponent(e)}catch(a){return ne(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+a+").")),e}}function ue(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=e.charAt(a);return l&&l!=="/"?null:e.slice(a)||"/"}function Zt(e,n){n===void 0&&(n="/");let{pathname:a,search:l="",hash:r=""}=typeof e=="string"?tt(e):e;return{pathname:a?a.startsWith("/")?a:Qt(a,n):n,search:tn(l),hash:nn(r)}}function Qt(e,n){let a=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?a.length>1&&a.pop():r!=="."&&a.push(r)}),a.length>1?a.join("/"):"/"}function De(e,n,a,l){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(l)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function en(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function at(e,n){let a=en(e);return n?a.map((l,r)=>r===e.length-1?l.pathname:l.pathnameBase):a.map(l=>l.pathnameBase)}function lt(e,n,a,l){l===void 0&&(l=!1);let r;typeof e=="string"?r=tt(e):(r=$e({},e),F(!r.pathname||!r.pathname.includes("?"),De("?","pathname","search",r)),F(!r.pathname||!r.pathname.includes("#"),De("#","pathname","hash",r)),F(!r.search||!r.search.includes("#"),De("#","search","hash",r)));let o=e===""||r.pathname==="",s=o?"/":r.pathname,c;if(s==null)c=a;else if(l){let k=n.length===0?[]:n[n.length-1].replace(/^\//,"").split("/");if(s.startsWith("..")){let _=s.split("/");for(;_[0]==="..";)_.shift(),k.pop();r.pathname=_.join("/")}c="/"+k.join("/")}else{let k=n.length-1;if(s.startsWith("..")){let _=s.split("/");for(;_[0]==="..";)_.shift(),k-=1;r.pathname=_.join("/")}c=k>=0?n[k]:"/"}let f=Zt(r,c),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(u||d)&&(f.pathname+="/"),f}const Ie=e=>e.join("/").replace(/\/\/+/g,"/"),tn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,it=["post","put","patch","delete"];new Set(it);const rn=["get",...it];new Set(rn);/**
36
+ */function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},$e.apply(this,arguments)}var et;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(et||(et={}));function F(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ne(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function je(e){let{pathname:n="/",search:a="",hash:l=""}=e;return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function tt(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substr(a),e=e.substr(0,a));let l=e.indexOf("?");l>=0&&(n.search=e.substr(l),e=e.substr(0,l)),e&&(n.pathname=e)}return n}var nt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nt||(nt={}));function rt(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,l]=Ht(e.path,e.caseSensitive,e.end),r=n.match(a);if(!r)return null;let o=r[0],s=o.replace(/(.)\/+$/,"$1"),c=r.slice(1);return{params:l.reduce((u,d,k)=>{let{paramName:v,isOptional:S}=d;if(v==="*"){let $=c[k]||"";s=o.slice(0,o.length-$.length).replace(/(.)\/+$/,"$1")}const x=c[k];return S&&!x?u[v]=void 0:u[v]=Xt(x||"",v),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Ht(e,n,a){n===void 0&&(n=!1),a===void 0&&(a=!0),ne(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let l=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(s,c,f)=>(l.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(l.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),l]}function Xt(e,n){try{return decodeURIComponent(e)}catch(a){return ne(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+a+").")),e}}function ue(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,l=e.charAt(a);return l&&l!=="/"?null:e.slice(a)||"/"}function Zt(e,n){n===void 0&&(n="/");let{pathname:a,search:l="",hash:r=""}=typeof e=="string"?tt(e):e;return{pathname:a?a.startsWith("/")?a:Qt(a,n):n,search:tn(l),hash:nn(r)}}function Qt(e,n){let a=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?a.length>1&&a.pop():r!=="."&&a.push(r)}),a.length>1?a.join("/"):"/"}function De(e,n,a,l){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(l)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function en(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function at(e,n){let a=en(e);return n?a.map((l,r)=>r===e.length-1?l.pathname:l.pathnameBase):a.map(l=>l.pathnameBase)}function lt(e,n,a,l){l===void 0&&(l=!1);let r;typeof e=="string"?r=tt(e):(r=$e({},e),F(!r.pathname||!r.pathname.includes("?"),De("?","pathname","search",r)),F(!r.pathname||!r.pathname.includes("#"),De("#","pathname","hash",r)),F(!r.search||!r.search.includes("#"),De("#","search","hash",r)));let o=e===""||r.pathname==="",s=o?"/":r.pathname,c;if(s==null)c=a;else if(l){let k=n.length===0?[]:n[n.length-1].replace(/^\//,"").split("/");if(s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),k.pop();r.pathname=v.join("/")}c="/"+k.join("/")}else{let k=n.length-1;if(s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),k-=1;r.pathname=v.join("/")}c=k>=0?n[k]:"/"}let f=Zt(r,c),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(u||d)&&(f.pathname+="/"),f}const Le=e=>e.join("/").replace(/\/\/+/g,"/"),tn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,it=["post","put","patch","delete"];new Set(it);const rn=["get",...it];new Set(rn);/**
37
37
  * React Router v6.21.0
38
38
  *
39
39
  * Copyright (c) Remix Software Inc.
@@ -42,7 +42,7 @@ Check the top-level render call using <`+m+">.")}return p}}function Ft(t,p){{if(
42
42
  * LICENSE.md file in the root directory of this source tree.
43
43
  *
44
44
  * @license MIT
45
- */function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Le.apply(this,arguments)}const ke=y.createContext(null);process.env.NODE_ENV!=="production"&&(ke.displayName="DataRouter");const ot=y.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouterState");const an=y.createContext(null);process.env.NODE_ENV!=="production"&&(an.displayName="Await");const Z=y.createContext(null);process.env.NODE_ENV!=="production"&&(Z.displayName="Navigation");const Fe=y.createContext(null);process.env.NODE_ENV!=="production"&&(Fe.displayName="Location");const re=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const ln=y.createContext(null);process.env.NODE_ENV!=="production"&&(ln.displayName="RouteError");function on(e,n){let{relative:a}=n===void 0?{}:n;Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useHref() may be used only in the context of a <Router> component."):F(!1));let{basename:l,navigator:r}=y.useContext(Z),{hash:o,pathname:s,search:c}=pe(e,{relative:a}),f=s;return l!=="/"&&(f=s==="/"?l:Ie([l,s])),r.createHref({pathname:f,search:c,hash:o})}function Ue(){return y.useContext(Fe)!=null}function fe(){return Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useLocation() may be used only in the context of a <Router> component."):F(!1)),y.useContext(Fe).location}const st="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ct(e){y.useContext(Z).static||y.useLayoutEffect(e)}function sn(){let{isDataRoute:e}=y.useContext(re);return e?dn():cn()}function cn(){Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useNavigate() may be used only in the context of a <Router> component."):F(!1));let e=y.useContext(ke),{basename:n,future:a,navigator:l}=y.useContext(Z),{matches:r}=y.useContext(re),{pathname:o}=fe(),s=JSON.stringify(at(r,a.v7_relativeSplatPath)),c=y.useRef(!1);return ct(()=>{c.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),process.env.NODE_ENV!=="production"&&ne(c.current,st),!c.current)return;if(typeof u=="number"){l.go(u);return}let k=lt(u,JSON.parse(s),o,d.relative==="path");e==null&&n!=="/"&&(k.pathname=k.pathname==="/"?n:Ie([n,k.pathname])),(d.replace?l.replace:l.push)(k,d.state,d)},[n,l,s,o,e])}function pe(e,n){let{relative:a}=n===void 0?{}:n,{future:l}=y.useContext(Z),{matches:r}=y.useContext(re),{pathname:o}=fe(),s=JSON.stringify(at(r,l.v7_relativeSplatPath));return y.useMemo(()=>lt(e,JSON.parse(s),o,a==="path"),[e,s,o,a])}var ut=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ut||{}),Ae=function(e){return 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",e}(Ae||{});function ft(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function un(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?F(!1,ft(e)):F(!1)),n}function fn(e){let n=y.useContext(re);return n||(process.env.NODE_ENV!=="production"?F(!1,ft(e)):F(!1)),n}function pt(e){let n=fn(e),a=n.matches[n.matches.length-1];return a.route.id||(process.env.NODE_ENV!=="production"?F(!1,e+' can only be used on routes that contain a unique "id"'):F(!1)),a.route.id}function pn(){return pt(Ae.UseRouteId)}function dn(){let{router:e}=un(ut.UseNavigateStable),n=pt(Ae.UseNavigateStable),a=y.useRef(!1);return ct(()=>{a.current=!0}),y.useCallback(function(r,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&ne(a.current,st),a.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,Le({fromRouteId:n},o)))},[e,n])}new Promise(()=>{});/**
45
+ */function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Ie.apply(this,arguments)}const ke=y.createContext(null);process.env.NODE_ENV!=="production"&&(ke.displayName="DataRouter");const ot=y.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouterState");const an=y.createContext(null);process.env.NODE_ENV!=="production"&&(an.displayName="Await");const Z=y.createContext(null);process.env.NODE_ENV!=="production"&&(Z.displayName="Navigation");const Fe=y.createContext(null);process.env.NODE_ENV!=="production"&&(Fe.displayName="Location");const re=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(re.displayName="Route");const ln=y.createContext(null);process.env.NODE_ENV!=="production"&&(ln.displayName="RouteError");function on(e,n){let{relative:a}=n===void 0?{}:n;Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useHref() may be used only in the context of a <Router> component."):F(!1));let{basename:l,navigator:r}=y.useContext(Z),{hash:o,pathname:s,search:c}=pe(e,{relative:a}),f=s;return l!=="/"&&(f=s==="/"?l:Le([l,s])),r.createHref({pathname:f,search:c,hash:o})}function Ue(){return y.useContext(Fe)!=null}function fe(){return Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useLocation() may be used only in the context of a <Router> component."):F(!1)),y.useContext(Fe).location}const st="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ct(e){y.useContext(Z).static||y.useLayoutEffect(e)}function sn(){let{isDataRoute:e}=y.useContext(re);return e?dn():cn()}function cn(){Ue()||(process.env.NODE_ENV!=="production"?F(!1,"useNavigate() may be used only in the context of a <Router> component."):F(!1));let e=y.useContext(ke),{basename:n,future:a,navigator:l}=y.useContext(Z),{matches:r}=y.useContext(re),{pathname:o}=fe(),s=JSON.stringify(at(r,a.v7_relativeSplatPath)),c=y.useRef(!1);return ct(()=>{c.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),process.env.NODE_ENV!=="production"&&ne(c.current,st),!c.current)return;if(typeof u=="number"){l.go(u);return}let k=lt(u,JSON.parse(s),o,d.relative==="path");e==null&&n!=="/"&&(k.pathname=k.pathname==="/"?n:Le([n,k.pathname])),(d.replace?l.replace:l.push)(k,d.state,d)},[n,l,s,o,e])}function pe(e,n){let{relative:a}=n===void 0?{}:n,{future:l}=y.useContext(Z),{matches:r}=y.useContext(re),{pathname:o}=fe(),s=JSON.stringify(at(r,l.v7_relativeSplatPath));return y.useMemo(()=>lt(e,JSON.parse(s),o,a==="path"),[e,s,o,a])}var ut=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ut||{}),Ae=function(e){return 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",e}(Ae||{});function ft(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function un(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?F(!1,ft(e)):F(!1)),n}function fn(e){let n=y.useContext(re);return n||(process.env.NODE_ENV!=="production"?F(!1,ft(e)):F(!1)),n}function pt(e){let n=fn(e),a=n.matches[n.matches.length-1];return a.route.id||(process.env.NODE_ENV!=="production"?F(!1,e+' can only be used on routes that contain a unique "id"'):F(!1)),a.route.id}function pn(){return pt(Ae.UseRouteId)}function dn(){let{router:e}=un(ut.UseNavigateStable),n=pt(Ae.UseNavigateStable),a=y.useRef(!1);return ct(()=>{a.current=!0}),y.useCallback(function(r,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&ne(a.current,st),a.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,Ie({fromRouteId:n},o)))},[e,n])}new Promise(()=>{});/**
46
46
  * React Router DOM v6.21.0
47
47
  *
48
48
  * Copyright (c) Remix Software Inc.
@@ -51,8 +51,8 @@ Check the top-level render call using <`+m+">.")}return p}}function Ft(t,p){{if(
51
51
  * LICENSE.md file in the root directory of this source tree.
52
52
  *
53
53
  * @license MIT
54
- */function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ae.apply(this,arguments)}function Ve(e,n){if(e==null)return{};var a={},l=Object.keys(e),r,o;for(o=0;o<l.length;o++)r=l[o],!(n.indexOf(r)>=0)&&(a[r]=e[r]);return a}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function mn(e){return be(e)&&e.tagName.toLowerCase()==="button"}function hn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function kn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function vn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _n(e,n){return e.button===0&&(!n||n==="_self")&&!vn(e)}let ge=null;function bn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const gn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function We(e){return e!=null&&!gn.has(e)?(process.env.NODE_ENV!=="production"&&ne(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function Nn(e,n){let a,l,r,o,s;if(hn(e)){let c=e.getAttribute("action");l=c?ue(c,n):null,a=e.getAttribute("method")||ve,r=We(e.getAttribute("enctype"))||_e,o=new FormData(e)}else if(mn(e)||kn(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?ue(f,n):null,a=e.getAttribute("formmethod")||c.getAttribute("method")||ve,r=We(e.getAttribute("formenctype"))||We(c.getAttribute("enctype"))||_e,o=new FormData(c,e),!bn()){let{name:u,type:d,value:k}=e;if(d==="image"){let _=u?u+".":"";o.append(_+"x","0"),o.append(_+"y","0")}else u&&o.append(u,k)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=ve,l=null,r=_e,s=e}return o&&r==="text/plain"&&(s=o,o=void 0),{action:l,method:a.toLowerCase(),encType:r,formData:o,body:s}}const yn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],En=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],dt=y.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(dt.displayName="ViewTransition");const Cn=y.createContext(new Map);process.env.NODE_ENV!=="production"&&(Cn.displayName="Fetchers"),process.env.NODE_ENV;const xn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=y.forwardRef(function(n,a){let{onClick:l,relative:r,reloadDocument:o,replace:s,state:c,target:f,to:u,preventScrollReset:d,unstable_viewTransition:k}=n,_=Ve(n,yn),{basename:R}=y.useContext(Z),S,$=!1;if(typeof u=="string"&&Pn.test(u)&&(S=u,xn))try{let v=new URL(window.location.href),j=u.startsWith("//")?new URL(v.protocol+u):new URL(u),V=ue(j.pathname,R);j.origin===v.origin&&V!=null?u=V+j.search+j.hash:$=!0}catch{process.env.NODE_ENV!=="production"&&ne(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let I=on(u,{relative:r}),E=On(u,{replace:s,state:c,target:f,preventScrollReset:d,relative:r,unstable_viewTransition:k});function C(v){l&&l(v),v.defaultPrevented||E(v)}return y.createElement("a",ae({},_,{href:S||I,onClick:$||o?l:C,ref:a,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Sn=y.forwardRef(function(n,a){let{"aria-current":l="page",caseSensitive:r=!1,className:o="",end:s=!1,style:c,to:f,unstable_viewTransition:u,children:d}=n,k=Ve(n,wn),_=pe(f,{relative:k.relative}),R=fe(),S=y.useContext(ot),{navigator:$}=y.useContext(Z),I=S!=null&&Fn(_)&&u===!0,E=$.encodeLocation?$.encodeLocation(_).pathname:_.pathname,C=R.pathname,v=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;r||(C=C.toLowerCase(),v=v?v.toLowerCase():null,E=E.toLowerCase());const j=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let V=C===E||!s&&C.startsWith(E)&&C.charAt(j)==="/",W=v!=null&&(v===E||!s&&v.startsWith(E)&&v.charAt(E.length)==="/"),B={isActive:V,isPending:W,isTransitioning:I},J=V?l:void 0,M;typeof o=="function"?M=o(B):M=[o,V?"active":null,W?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let G=typeof c=="function"?c(B):c;return y.createElement(Ne,ae({},k,{"aria-current":J,className:M,ref:a,style:G,to:f,unstable_viewTransition:u}),typeof d=="function"?d(B):d)});process.env.NODE_ENV!=="production"&&(Sn.displayName="NavLink");const Rn=y.forwardRef((e,n)=>{let{fetcherKey:a,navigate:l,reloadDocument:r,replace:o,state:s,method:c=ve,action:f,onSubmit:u,relative:d,preventScrollReset:k,unstable_viewTransition:_}=e,R=Ve(e,En),S=In(),$=Ln(f,{relative:d}),I=c.toLowerCase()==="get"?"get":"post",E=C=>{if(u&&u(C),C.defaultPrevented)return;C.preventDefault();let v=C.nativeEvent.submitter,j=(v==null?void 0:v.getAttribute("formmethod"))||c;S(v||C.currentTarget,{fetcherKey:a,method:j,navigate:l,replace:o,state:s,relative:d,preventScrollReset:k,unstable_viewTransition:_})};return y.createElement("form",ae({ref:n,method:I,action:$,onSubmit:r?u:E},R))});process.env.NODE_ENV!=="production"&&(Rn.displayName="Form"),process.env.NODE_ENV;var ye;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ye||(ye={}));var mt;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mt||(mt={}));function Tn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ht(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?F(!1,Tn(e)):F(!1)),n}function On(e,n){let{target:a,replace:l,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:c}=n===void 0?{}:n,f=sn(),u=fe(),d=pe(e,{relative:s});return y.useCallback(k=>{if(_n(k,a)){k.preventDefault();let _=l!==void 0?l:je(u)===je(d);f(e,{replace:_,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:c})}},[u,f,d,l,r,a,e,o,s,c])}function $n(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let jn=0,Dn=()=>"__"+String(++jn)+"__";function In(){let{router:e}=ht(ye.UseSubmit),{basename:n}=y.useContext(Z),a=pn();return y.useCallback(function(l,r){r===void 0&&(r={}),$n();let{action:o,method:s,encType:c,formData:f,body:u}=Nn(l,n);if(r.navigate===!1){let d=r.fetcherKey||Dn();e.fetch(d,a,r.action||o,{preventScrollReset:r.preventScrollReset,formData:f,body:u,formMethod:r.method||s,formEncType:r.encType||c,unstable_flushSync:r.unstable_flushSync})}else e.navigate(r.action||o,{preventScrollReset:r.preventScrollReset,formData:f,body:u,formMethod:r.method||s,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:a,unstable_flushSync:r.unstable_flushSync,unstable_viewTransition:r.unstable_viewTransition})},[e,n,a])}function Ln(e,n){let{relative:a}=n===void 0?{}:n,{basename:l}=y.useContext(Z),r=y.useContext(re);r||(process.env.NODE_ENV!=="production"?F(!1,"useFormAction must be used inside a RouteContext"):F(!1));let[o]=r.matches.slice(-1),s=ae({},pe(e||".",{relative:a})),c=fe();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),s.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:Ie([l,s.pathname])),je(s)}function Fn(e,n){n===void 0&&(n={});let a=y.useContext(dt);a==null&&(process.env.NODE_ENV!=="production"?F(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):F(!1));let{basename:l}=ht(ye.useViewTransitionState),r=pe(e,{relative:n.relative});if(!a.isTransitioning)return!1;let o=ue(a.currentLocation.pathname,l)||a.currentLocation.pathname,s=ue(a.nextLocation.pathname,l)||a.nextLocation.pathname;return rt(r.pathname,s)!=null||rt(r.pathname,o)!=null}const Un=g.forwardRef(({breadcrumbs:e,navigationType:n,className:a,...l},r)=>{const o=e.slice(0,4),s=o[o.length-2],c=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:r,"aria-label":"brødsmulemeny",className:c,children:[i("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((f,u)=>i("li",{className:"pkt-breadcrumbs__item",children:u===o.length-1?i("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:i("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),le=g.forwardRef(({children:e,className:n,iconName:a="user",secondIconName:l="user",size:r="medium",skin:o="primary",type:s="button",variant:c="label-only",color:f,...u},d)=>{const k=[n,"pkt-btn",r&&`pkt-btn--${r}`,o&&`pkt-btn--${o}`,c&&`pkt-btn--${c}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...u,className:k,type:s,ref:d,children:[c!=="label-only"&&i(w,{className:"pkt-btn__icon",name:a}),i("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&i(w,{className:"pkt-btn__icon",name:l})]})});le.displayName="PktButton";const kt=g.forwardRef(({id:e,hasTile:n=!1,disabled:a=!1,label:l,labelPosition:r="right",hideLabel:o=!1,checkHelptext:s,hasError:c=!1,isSwitch:f=!1,className:u,...d},k)=>{const _=[u,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:_,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${a&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l&&r==="left"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[l,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]}),i("input",{ref:k,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:a,...d}),l&&r==="right"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[l,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});kt.displayName="PktCheckbox";const An=({columnOne:e,columnTwo:n,socialLinks:a,className:l,personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var c,f;const s=[l,"pkt-footer"].filter(Boolean).join(" ");return i("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&i("li",{className:"pkt-footer__text",children:e.text}),(c=e.links)==null?void 0:c.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&i("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:r,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:o,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),a&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[i("div",{className:"pkt-footer__social-languages",children:a.filter(u=>u.language).map((u,d)=>i("div",{className:"pkt-footer__social-language",children:i("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),i("div",{className:"pkt-footer__social-icons",children:a.filter(u=>u.iconName).map((u,d)=>i(g.Fragment,{children:i("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:i(w,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Vn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:a="https://www.oslo.kommune.no/tilgjengelighet/",className:l})=>{const r=[l,"pkt-footer-simple"].filter(Boolean).join(" ");return i("footer",{className:r,"data-mode":"dark",children:i("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((o,s)=>i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:`pkt-footer-simple__link ${o.external?" pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},s)),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:a,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var vt={exports:{}};/*!
54
+ */function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ae.apply(this,arguments)}function Ve(e,n){if(e==null)return{};var a={},l=Object.keys(e),r,o;for(o=0;o<l.length;o++)r=l[o],!(n.indexOf(r)>=0)&&(a[r]=e[r]);return a}const ve="get",_e="application/x-www-form-urlencoded";function be(e){return e!=null&&typeof e.tagName=="string"}function mn(e){return be(e)&&e.tagName.toLowerCase()==="button"}function hn(e){return be(e)&&e.tagName.toLowerCase()==="form"}function kn(e){return be(e)&&e.tagName.toLowerCase()==="input"}function vn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _n(e,n){return e.button===0&&(!n||n==="_self")&&!vn(e)}let ge=null;function bn(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}const gn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function We(e){return e!=null&&!gn.has(e)?(process.env.NODE_ENV!=="production"&&ne(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_e+'"')),null):e}function Nn(e,n){let a,l,r,o,s;if(hn(e)){let c=e.getAttribute("action");l=c?ue(c,n):null,a=e.getAttribute("method")||ve,r=We(e.getAttribute("enctype"))||_e,o=new FormData(e)}else if(mn(e)||kn(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?ue(f,n):null,a=e.getAttribute("formmethod")||c.getAttribute("method")||ve,r=We(e.getAttribute("formenctype"))||We(c.getAttribute("enctype"))||_e,o=new FormData(c,e),!bn()){let{name:u,type:d,value:k}=e;if(d==="image"){let v=u?u+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else u&&o.append(u,k)}}else{if(be(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=ve,l=null,r=_e,s=e}return o&&r==="text/plain"&&(s=o,o=void 0),{action:l,method:a.toLowerCase(),encType:r,formData:o,body:s}}const yn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wn=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],En=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],dt=y.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(dt.displayName="ViewTransition");const Cn=y.createContext(new Map);process.env.NODE_ENV!=="production"&&(Cn.displayName="Fetchers"),process.env.NODE_ENV;const xn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=y.forwardRef(function(n,a){let{onClick:l,relative:r,reloadDocument:o,replace:s,state:c,target:f,to:u,preventScrollReset:d,unstable_viewTransition:k}=n,v=Ve(n,yn),{basename:S}=y.useContext(Z),x,$=!1;if(typeof u=="string"&&Pn.test(u)&&(x=u,xn))try{let _=new URL(window.location.href),j=u.startsWith("//")?new URL(_.protocol+u):new URL(u),V=ue(j.pathname,S);j.origin===_.origin&&V!=null?u=V+j.search+j.hash:$=!0}catch{process.env.NODE_ENV!=="production"&&ne(!1,'<Link to="'+u+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let L=on(u,{relative:r}),E=On(u,{replace:s,state:c,target:f,preventScrollReset:d,relative:r,unstable_viewTransition:k});function C(_){l&&l(_),_.defaultPrevented||E(_)}return y.createElement("a",ae({},v,{href:x||L,onClick:$||o?l:C,ref:a,target:f}))});process.env.NODE_ENV!=="production"&&(Ne.displayName="Link");const Sn=y.forwardRef(function(n,a){let{"aria-current":l="page",caseSensitive:r=!1,className:o="",end:s=!1,style:c,to:f,unstable_viewTransition:u,children:d}=n,k=Ve(n,wn),v=pe(f,{relative:k.relative}),S=fe(),x=y.useContext(ot),{navigator:$}=y.useContext(Z),L=x!=null&&Fn(v)&&u===!0,E=$.encodeLocation?$.encodeLocation(v).pathname:v.pathname,C=S.pathname,_=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(C=C.toLowerCase(),_=_?_.toLowerCase():null,E=E.toLowerCase());const j=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let V=C===E||!s&&C.startsWith(E)&&C.charAt(j)==="/",W=_!=null&&(_===E||!s&&_.startsWith(E)&&_.charAt(E.length)==="/"),B={isActive:V,isPending:W,isTransitioning:L},J=V?l:void 0,M;typeof o=="function"?M=o(B):M=[o,V?"active":null,W?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let G=typeof c=="function"?c(B):c;return y.createElement(Ne,ae({},k,{"aria-current":J,className:M,ref:a,style:G,to:f,unstable_viewTransition:u}),typeof d=="function"?d(B):d)});process.env.NODE_ENV!=="production"&&(Sn.displayName="NavLink");const Rn=y.forwardRef((e,n)=>{let{fetcherKey:a,navigate:l,reloadDocument:r,replace:o,state:s,method:c=ve,action:f,onSubmit:u,relative:d,preventScrollReset:k,unstable_viewTransition:v}=e,S=Ve(e,En),x=Ln(),$=In(f,{relative:d}),L=c.toLowerCase()==="get"?"get":"post",E=C=>{if(u&&u(C),C.defaultPrevented)return;C.preventDefault();let _=C.nativeEvent.submitter,j=(_==null?void 0:_.getAttribute("formmethod"))||c;x(_||C.currentTarget,{fetcherKey:a,method:j,navigate:l,replace:o,state:s,relative:d,preventScrollReset:k,unstable_viewTransition:v})};return y.createElement("form",ae({ref:n,method:L,action:$,onSubmit:r?u:E},S))});process.env.NODE_ENV!=="production"&&(Rn.displayName="Form"),process.env.NODE_ENV;var ye;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ye||(ye={}));var mt;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mt||(mt={}));function Tn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ht(e){let n=y.useContext(ke);return n||(process.env.NODE_ENV!=="production"?F(!1,Tn(e)):F(!1)),n}function On(e,n){let{target:a,replace:l,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:c}=n===void 0?{}:n,f=sn(),u=fe(),d=pe(e,{relative:s});return y.useCallback(k=>{if(_n(k,a)){k.preventDefault();let v=l!==void 0?l:je(u)===je(d);f(e,{replace:v,state:r,preventScrollReset:o,relative:s,unstable_viewTransition:c})}},[u,f,d,l,r,a,e,o,s,c])}function $n(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let jn=0,Dn=()=>"__"+String(++jn)+"__";function Ln(){let{router:e}=ht(ye.UseSubmit),{basename:n}=y.useContext(Z),a=pn();return y.useCallback(function(l,r){r===void 0&&(r={}),$n();let{action:o,method:s,encType:c,formData:f,body:u}=Nn(l,n);if(r.navigate===!1){let d=r.fetcherKey||Dn();e.fetch(d,a,r.action||o,{preventScrollReset:r.preventScrollReset,formData:f,body:u,formMethod:r.method||s,formEncType:r.encType||c,unstable_flushSync:r.unstable_flushSync})}else e.navigate(r.action||o,{preventScrollReset:r.preventScrollReset,formData:f,body:u,formMethod:r.method||s,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:a,unstable_flushSync:r.unstable_flushSync,unstable_viewTransition:r.unstable_viewTransition})},[e,n,a])}function In(e,n){let{relative:a}=n===void 0?{}:n,{basename:l}=y.useContext(Z),r=y.useContext(re);r||(process.env.NODE_ENV!=="production"?F(!1,"useFormAction must be used inside a RouteContext"):F(!1));let[o]=r.matches.slice(-1),s=ae({},pe(e||".",{relative:a})),c=fe();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),s.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(s.pathname=s.pathname==="/"?l:Le([l,s.pathname])),je(s)}function Fn(e,n){n===void 0&&(n={});let a=y.useContext(dt);a==null&&(process.env.NODE_ENV!=="production"?F(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):F(!1));let{basename:l}=ht(ye.useViewTransitionState),r=pe(e,{relative:n.relative});if(!a.isTransitioning)return!1;let o=ue(a.currentLocation.pathname,l)||a.currentLocation.pathname,s=ue(a.nextLocation.pathname,l)||a.nextLocation.pathname;return rt(r.pathname,s)!=null||rt(r.pathname,o)!=null}const Un=b.forwardRef(({breadcrumbs:e,navigationType:n,className:a,...l},r)=>{const o=e.slice(0,4),s=o[o.length-2],c=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return h("nav",{ref:r,"aria-label":"brødsmulemeny",className:c,children:[i("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((f,u)=>i("li",{className:"pkt-breadcrumbs__item",children:u===o.length-1?i("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:i("span",{className:"pkt-breadcrumbs__text",children:f.text})}):n==="router"?h(Ne,{to:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):h("a",{href:f.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[i(w,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),i("span",{className:"pkt-breadcrumbs__text",children:f.text})]})},`breadcrumb-${u}`))}),n==="router"?h(Ne,{to:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:s.text})]}):h("a",{href:s.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[i(w,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),i("span",{className:"pkt-breadcrumbs__text",children:s.text})]})]})}),le=b.forwardRef(({children:e,className:n,iconName:a="user",secondIconName:l="user",size:r="medium",skin:o="primary",type:s="button",variant:c="label-only",color:f,...u},d)=>{const k=[n,"pkt-btn",r&&`pkt-btn--${r}`,o&&`pkt-btn--${o}`,c&&`pkt-btn--${c}`,f&&`pkt-btn--${f}`].filter(Boolean).join(" ");return h("button",{...u,className:k,type:s,ref:d,children:[c!=="label-only"&&i(w,{className:"pkt-btn__icon",name:a}),i("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&i(w,{className:"pkt-btn__icon",name:l})]})});le.displayName="PktButton";const kt=b.forwardRef(({id:e,hasTile:n=!1,disabled:a=!1,label:l,labelPosition:r="right",hideLabel:o=!1,checkHelptext:s,hasError:c=!1,isSwitch:f=!1,className:u,...d},k)=>{const v=[u,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:v,children:h("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${a&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l&&r==="left"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[l,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]}),i("input",{ref:k,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:f?"switch":"checkbox",id:e,disabled:a,...d}),l&&r==="right"&&h("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[l,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});kt.displayName="PktCheckbox";const An=({columnOne:e,columnTwo:n,socialLinks:a,className:l,personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var c,f;const s=[l,"pkt-footer"].filter(Boolean).join(" ");return i("footer",{className:s,"data-mode":"dark",children:h("div",{className:"pkt-footer__container",children:[h("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:e.title}),h("ul",{className:"pkt-footer__list",children:[e.text&&i("li",{className:"pkt-footer__text",children:e.text}),(c=e.links)==null?void 0:c.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:n.title}),h("ul",{className:"pkt-footer__list",children:[n.text&&i("li",{className:"pkt-footer__text",children:n.text}),(f=n.links)==null?void 0:f.map((u,d)=>i("li",{className:"pkt-footer__list-item",children:h("a",{className:`pkt-footer__link ${u.external?"pkt-link--external":""}`,href:u.href,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),u.text]})},`links-${d}`))]})]}),h("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[i("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),h("ul",{className:"pkt-footer__list",children:[i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:r,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer__list-item",children:h("a",{className:"pkt-footer__link",href:o,children:[i(w,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),a&&h("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[i("div",{className:"pkt-footer__social-languages",children:a.filter(u=>u.language).map((u,d)=>i("div",{className:"pkt-footer__social-language",children:i("a",{href:u.href,"aria-label":`til ${u.language} versjon av nettsiden`,target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:u.language})},`sociallinks-language-${d}`))}),i("div",{className:"pkt-footer__social-icons",children:a.filter(u=>u.iconName).map((u,d)=>i(b.Fragment,{children:i("a",{href:u.href,"aria-label":`til ${u.iconName}`,className:"pkt-footer__social-icon-link",target:u.openInNewTab?"_blank":"_self",rel:u.openInNewTab?"noopener noreferrer":void 0,children:i(w,{className:"pkt-footer__social-icon",name:u.iconName})})},`sociallinks-${d}`))})]})]})})},Vn=({links:e=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:a="https://www.oslo.kommune.no/tilgjengelighet/",className:l})=>{const r=[l,"pkt-footer-simple"].filter(Boolean).join(" ");return i("footer",{className:r,"data-mode":"dark",children:i("div",{className:"pkt-footer-simple__container",children:h("ul",{className:"pkt-footer-simple__list",children:[e.map((o,s)=>i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:`pkt-footer-simple__link ${o.external?" pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},s)),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:n,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),i("li",{className:"pkt-footer-simple__list-item",children:h("a",{className:"pkt-footer-simple__link",href:a,children:[i(w,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})};var vt={exports:{}};/*!
55
55
  Copyright (c) 2018 Jed Watson.
56
56
  Licensed under the MIT License (MIT), see
57
57
  http://jedwatson.github.io/classnames
58
- */(function(e){(function(){var n={}.hasOwnProperty;function a(){for(var l=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var s=typeof o;if(s==="string"||s==="number")l.push(o);else if(Array.isArray(o)){if(o.length){var c=a.apply(null,o);c&&l.push(c)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){l.push(o.toString());continue}for(var f in o)n.call(o,f)&&o[f]&&l.push(f)}}}return l.join(" ")}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(vt);var Wn=vt.exports;const _t=Bt(Wn),Bn=g.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:a=!0,scrollToHide:l=!0,user:r,userMenu:o,representing:s,userOptions:c,userMenuFooter:f,canChangeRepresentation:u=!0,showMenuButton:d=!1,showLogOutButton:k=!1,openMenu:_,logOut:R,changeRepresentation:S,...$},I)=>{const E=g.useMemo(()=>typeof(r==null?void 0:r.lastLoggedIn)=="string"?r.lastLoggedIn:r!=null&&r.lastLoggedIn?new Date(r.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[r]),[C,v]=g.useState(!1),[j,V]=g.useState(0),[W,B]=g.useState(!1),J=g.useRef(null);g.useEffect(()=>(document.addEventListener("mouseup",G),window.addEventListener("scroll",z),()=>{document.removeEventListener("mouseup",G),window.removeEventListener("scroll",z)}));const M=()=>{B(!W)},G=N=>{J.current&&!J.current.contains(N.target)&&B(!1)},z=()=>{if(l){const N=window.pageYOffset||document.documentElement.scrollTop;if(N<0||Math.abs(N-j)<60)return;v(N>j),V(N)}};return h("header",{...$,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:_t("pkt-header",{"pkt-header--fixed":a,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":C}),ref:I,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?i("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.5/logos/"})}):i("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.5/logos/"})}),i("span",{className:"pkt-header__logo-service",children:n})]}),i("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[d&&i("li",{children:i(le,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:_,children:"Meny"})}),(r||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!C?"pkt-header--open-dropdown":""}`,ref:J,children:[h("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:M,children:[i(w,{name:"user",className:"pkt-btn__icon"}),i("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(r==null?void 0:r.name)}),i("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(r==null?void 0:r.shortname)}),i(w,{name:"chevron-thin-down",className:"pkt-btn--closed"}),i(w,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[r&&h("li",{children:[i("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),i("div",{className:"pkt-user-menu__name",children:r.name}),r.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",i("time",{children:E})]})]}),o&&i("li",{children:i("ul",{className:"pkt-list",children:o.map((N,L)=>i("li",{children:typeof N.target=="string"?h("a",{href:N.target,className:"pkt-link",children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userMenu-${L}`))})}),(s||u)&&h("li",{children:[s&&h(X,{children:[i("div",{className:"pkt-user-menu__label",children:"Representerer"}),i("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),i("ul",{className:"pkt-list mt-size-16",children:u&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:S,children:[i(w,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),i("li",{children:i("ul",{className:"pkt-list",children:(c||!k)&&h(X,{children:[c==null?void 0:c.map((N,L)=>i("li",{children:typeof N.target=="string"?h("a",{href:N.target,className:"pkt-link",children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userOptions-${L}`)),!k&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:R,children:[i(w,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&i("li",{className:"footer",children:i("ul",{className:"pkt-list-horizontal bordered",children:f.map((N,L)=>i("li",{children:typeof N.target=="string"?i("a",{href:N.target,className:"pkt-link",children:N.title}):i("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:N.title})},`userMenuFooter-${L}`))})})]})]}),k&&i("li",{children:i(le,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:R,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),bt=g.forwardRef(({label:e,id:n,children:a,...l},r)=>h("div",{className:"pkt-form-group",children:[i("label",{htmlFor:n,className:"pkt-form-label",children:e}),i("input",{className:"pkt-form-input",id:n,...l,ref:r}),a]}));bt.displayName="PktInput";const de=g.forwardRef(({forId:e,label:n,helptext:a,helptextDropdown:l,helptextDropdownButton:r,optionalTag:o=!1,optionalText:s="Valgfritt",requiredTag:c=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:k,inline:_,ariaDescribedby:R,useWrapper:S=!0,children:$,className:I,hasFieldset:E=!1},C)=>{const[v,j]=g.useState(!1),V=()=>{j(!v)},W=()=>o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":c?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",B=o?s:c?f:"",J=k?"pkt-inputwrapper--disabled":"",M=_?"pkt-inputwrapper--inline":"",G=u?"pkt-inputwrapper--error":"",z=!!l&&l!=="",N=r||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',L=E?"fieldset":z?"div":"label",K=E?"legend":z?"h2":"span",q=R||(a?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",I,J,M,G].join(" "),ref:C,children:[S?i(X,{children:h(L,{htmlFor:E?void 0:e,"aria-describedby":z?void 0:R,className:`pkt-inputwrapper__label${E?" pkt-inputwrapper__fieldset":""}`,children:[h(K,{id:`${e}-label`,className:`${E?" pkt-inputwrapper__legend":""}`,children:[n,B!==""&&i("span",{className:W(),children:B})]}),a&&i("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:a}}),z&&l!==""&&h("div",{children:[i(le,{skin:"tertiary",size:"small",variant:"icon-right",iconName:v?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:V,children:i("span",{dangerouslySetInnerHTML:{__html:N}})}),i("div",{className:`pkt-inputwrapper__helptext ${v?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i("span",{dangerouslySetInnerHTML:{__html:l}})}),!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":q,children:n})]}),i(X,{children:$})]})}):h(X,{children:[!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":q,id:`${e}-label`,children:n}),$]}),u&&d&&i("div",{children:i(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const gt=g.forwardRef(({children:e,className:n,iconName:a="user",openInNewTab:l=!1,skin:r="normal",href:o="#",external:s=!1,title:c,...f},u)=>{const d=[n,"pkt-linkcard",r&&`pkt-linkcard--${r}`].filter(Boolean).join(" ");return h("a",{...f,href:o,className:`pkt-linkcard pkt-link ${d}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:u,children:[i(w,{className:"pkt-link__icon",name:a}),h("div",{className:"pkt-linkcard__content",children:[i("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:c}),i("div",{className:"pkt-linkcard__text",children:e})]})]})});gt.displayName="PktLinkCard";const Mn=g.forwardRef(({className:e,message:n,size:a="medium",inline:l=!1,isLoading:r=!0,variant:o="rainbow",children:s,...c},f)=>{const u=`pkt-loader pkt-loader--${a}`;return i("div",{role:"status","aria-live":"polite","aria-busy":r,className:`pkt-loader--${l?"inline":"box"}`,children:r?h("div",{className:u,"data-testid":"pkt-loader",ref:f,...c,children:[i(w,{name:(k=>k==="shapes"?"loader":k==="blue"?"spinner-blue":"spinner")(o),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.5/animations/",className:`pkt-loader__svg pkt-loader__${o}`}),n&&i("p",{children:n})]}):s})}),Yn=({children:e,className:n,compact:a=!1,skin:l="beige",title:r,...o})=>{const s=[n,"pkt-messagebox",l&&`pkt-messagebox--${l}`,a&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return h("div",{...o,className:s,children:[r&&i("div",{className:"pkt-messagebox__title",children:r}),i("div",{className:"pkt-messagebox__text",children:e})]})},Nt=g.forwardRef(({id:e,name:n,label:a,className:l,hasTile:r=!1,disabled:o=!1,checkHelptext:s,hasError:c=!1,...f},u)=>{const d=[l,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:d,children:h("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${o&&r?"pkt-input-check__input--tile-disabled":""}`,children:[i("input",{ref:u,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:o,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[a,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});Nt.displayName="PktRadioButton";const Kn=g.forwardRef(({action:e,appearance:n="local",disabled:a=!1,fullwidth:l=!1,id:r,label:o,method:s="get",name:c,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:k,onSuggestionClick:_,...R},S)=>{const $=(v,j)=>{v?v():_&&_(j)},I=`pkt-searchinput pkt-searchinput--${n} ${l?"pkt-searchinput--fullwidth":""}`;return h(e?"form":"div",{className:I,onSubmit:k&&(()=>k(d)),action:e||void 0,method:e?s:void 0,role:"search",ref:S,...R,children:[h(o?"label":"div",{htmlFor:o?r:void 0,className:o?"pkt-inputwrapper__label":"",children:[o&&i(X,{children:o}),h("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[i("input",{className:`pkt-input ${l?"pkt-input--fullwidth":""}`,type:"search",name:c||r,id:r,placeholder:f,value:d,disabled:a,onInput:k&&(v=>k(v.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${r}-suggestions`}),i(le,{className:`pkt-searchinput__button ${n==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:n==="local"?"tertiary":"primary",color:n==="global"?"yellow":void 0,type:"submit",disabled:a,onClick:k&&(()=>k(d)),onKeyUp:k&&(v=>v.key==="Enter"&&k(d)),children:o||f})]})]}),u&&i("ul",{id:`${r}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((v,j)=>i("li",{children:g.createElement(v.href?"a":v.onClick?"button":"div",{href:v.href,className:`pkt-searchinput__suggestion ${v.onClick?"pkt-link-button":""} ${v.href||v.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:v.onClick?"button":void 0,onClick:()=>$(v.onClick,j),onKeyUp:()=>$(v.onClick,j)},h(X,{children:[v.title&&i("h3",{className:"pkt-searchinput__suggestion-title",children:v.title}),v.text&&i("p",{className:"pkt-searchinput__suggestion-text",children:v.text})]}))},`search-suggestion-${j}`))})]})}),Jn=g.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:a,className:l,disabled:r=!1,errorMessage:o,hasError:s,helptext:c,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:k=!1,fullwidth:_=!1,label:R,name:S,optionalTag:$=!1,optionalText:I,requiredTag:E=!1,requiredText:C,...v},j)=>{const V=[l,"pkt-select"].join(" ");return i(de,{className:V,forId:d,label:R,helptext:c,helptextDropdown:f,helptextDropdownButton:u,optionalTag:$,optionalText:I,requiredTag:E,requiredText:C,hasError:s,errorMessage:o,disabled:r,inline:k,ariaDescribedby:e,children:i("select",{ref:j,className:`pkt-input ${_?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${d}-error`,"aria-labelledby":n||`${d}-label`,disabled:r,id:d,name:S||d,...v,children:a})})}),zn=({isResponsive:e,children:n})=>e?i("div",{className:"pkt-table-container",children:n}):i(X,{children:n}),qn=({isResponsive:e,modifiers:{info:n=!1,success:a=!1,strong:l=!1,shadow:r=!1}={},children:o})=>i(zn,{isResponsive:e,children:i("table",{className:_t("pkt-table",{"pkt-table--info":n,"pkt-table--success":a,"pkt-table--strong":l,"pkt-table--shadow":r}),children:o})}),Gn=({children:e})=>i("td",{className:"pkt-table__th",children:e}),Hn=({children:e})=>i("th",{className:"pkt-table__th",children:e}),we=g.forwardRef(({children:e,className:n,skin:a="blue",textStyle:l="normal-text",size:r="medium",closeTag:o=!1,iconName:s="",type:c="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[k,_]=g.useState(!1),R=E=>{_(!0),u(E)},S=["pkt-tag",r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),$=["pkt-tag","pkt-btn","pkt-btn--tertiary",r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,l&&`pkt-tag--${l}`,s&&o?"pkt-btn--icons-right-and-left":null,o&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),I=!k;return o&&s?i(X,{children:I&&h("button",{className:$,type:c,"aria-label":f,onClick:R,ref:d,children:[i(w,{className:"pkt-tag__icon",name:s}),e,i(w,{className:"pkt-tag__close-btn",name:"close"})]})}):o?i(X,{children:I&&h("button",{className:$,type:c,"aria-label":f,onClick:R,ref:d,children:[i(w,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:S,children:[i(w,{className:"pkt-tag__icon",name:s}),e]}):i("span",{className:S,children:e})});we.displayName="PktTag";const Xn=g.forwardRef(({arrowNav:e=!0,tabs:n,onTabSelected:a},l)=>{const r=g.useRef([]);g.useEffect(()=>{r.current=r.current.slice(0,n.length)},[n]);const o=(c,f)=>{f.action&&f.action(c),a&&a(c)},s=(c,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&c!==0&&((u=r.current[c-1])==null||u.focus()),f.code==="ArrowRight"&&c<n.length-1&&((d=r.current[c+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&o(c,n[c]))};return i("div",{className:"pkt-tabs",ref:l,children:i("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:n.map((c,f)=>i(g.Fragment,{children:c.href?h("a",{"aria-selected":!!c.active,role:e?"tab":void 0,href:c.href,"aria-controls":c.controls,className:`pkt-tabs__link ${c.active?"active":""}`,onKeyUp:u=>s(f,u),onClick:()=>o(f,c),tabIndex:c.active||!e?void 0:-1,ref:u=>{r.current[f]=u},children:[c.icon&&i(w,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&i(we,{skin:c.tag.skin,size:"small",children:c.tag.text})]}):h("button",{"aria-selected":!!c.active,role:e?"tab":void 0,type:"button","aria-controls":c.controls,className:`pkt-tabs__button pkt-link-button ${c.active?"active":""}`,onKeyUp:u=>s(f,u),onClick:()=>o(f,c),tabIndex:c.active||!e?void 0:-1,ref:u=>{r.current[f]=u},children:[c.icon&&i(w,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&i(we,{skin:c.tag.skin,size:"small",children:c.tag.text})]},"b-"+f)},f))})})}),Zn=g.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:a,counter:l,counterMaxLength:r,className:o,disabled:s,errorMessage:c,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:_,fullwidth:R=!1,label:S,name:$,optionalTag:I=!1,optionalText:E,requiredTag:C=!1,requiredText:v,placeholder:j,rows:V,useWrapper:W=!0,onChange:B,...J},M)=>{const G=[o,"pkt-textinput","pkt-textarea"].join(" "),z=a||`${e}-label`,N=g.useRef(null),[L,K]=g.useState(0),q=ee=>{var te,me;if(l&&K(((me=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:me.length)||0),B)return B(ee)};return g.useEffect(()=>{var ee,te;typeof M=="function"&&M(N.current),l&&K(((te=(ee=N==null?void 0:N.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[M]),h(de,{ariaDescribedby:n,className:G,disabled:s,errorMessage:c,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:_,label:S,optionalTag:I,optionalText:E,requiredTag:C,requiredText:v,useWrapper:W,children:[i("textarea",{ref:N,className:`pkt-input ${R?"pkt-input--fullwidth":""} ${r&&L>r?"pkt-input--counter-error":""}`,name:$||e,id:e,placeholder:j,disabled:s,rows:V,"aria-labelledby":z,"aria-invalid":f,"aria-errormessage":`${e}-error`,...J,onChange:q}),l&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[L||0,r&&`/${r}`]})]})}),Qn=g.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:a,autocomplete:l="off",className:r,disabled:o=!1,errorMessage:s,hasError:c=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:k,inline:_=!1,fullwidth:R=!1,label:S,name:$,optionalTag:I=!1,optionalText:E,requiredTag:C=!1,requiredText:v,placeholder:j,prefix:V,suffix:W,type:B="text",useWrapper:J=!0,omitSearchIcon:M=!1,value:G,...z},N)=>{const L=[r,"pkt-textinput"].join(" "),K=a||`${e}-label`,q=B==="search"&&!k&&!M;return i(de,{ariaDescribedby:n,className:L,disabled:o,errorMessage:s,forId:e,hasError:c,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:_,label:S,optionalTag:I,optionalText:E,requiredTag:C,requiredText:v,useWrapper:J,children:h("div",{className:"pkt-input__container",children:[V&&i("div",{className:"pkt-input-prefix",children:V}),i("input",{ref:N,className:`pkt-input ${R?"pkt-input--fullwidth":""}`,type:B,name:$||e,id:e,placeholder:j,autoComplete:l,value:G,disabled:o,"aria-invalid":c,"aria-errormessage":`${e}-error`,"aria-labelledby":K,...z}),W&&h("p",{className:"pkt-input-suffix",children:[W,k&&i(w,{className:"pkt-input-suffix-icon",name:k}),q&&i(w,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!W&&k&&i(w,{className:"pkt-input-icon",name:k}),!W&&q&&i(w,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});T.PktAlert=Qe,T.PktBackLink=Gt,T.PktBreadcrumbs=Un,T.PktButton=le,T.PktCheckbox=kt,T.PktFooter=An,T.PktFooterSimple=Vn,T.PktHeader=Bn,T.PktIcon=w,T.PktIconContext=Ze,T.PktInput=bt,T.PktInputWrapper=de,T.PktLinkCard=gt,T.PktLoader=Mn,T.PktMessagebox=Yn,T.PktRadioButton=Nt,T.PktSearchInput=Kn,T.PktSelect=Jn,T.PktTable=qn,T.PktTableData=Gn,T.PktTableHeader=Hn,T.PktTabs=Xn,T.PktTag=we,T.PktTextarea=Zn,T.PktTextinput=Qn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
58
+ */(function(e){(function(){var n={}.hasOwnProperty;function a(){for(var l=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var s=typeof o;if(s==="string"||s==="number")l.push(o);else if(Array.isArray(o)){if(o.length){var c=a.apply(null,o);c&&l.push(c)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){l.push(o.toString());continue}for(var f in o)n.call(o,f)&&o[f]&&l.push(f)}}}return l.join(" ")}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(vt);var Wn=vt.exports;const _t=Bt(Wn),Bn=b.forwardRef(({logoLink:e="https://www.oslo.kommune.no/",serviceName:n,fixed:a=!0,scrollToHide:l=!0,user:r,userMenu:o,representing:s,userOptions:c,userMenuFooter:f,canChangeRepresentation:u=!0,showMenuButton:d=!1,showLogOutButton:k=!1,openMenu:v,logOut:S,changeRepresentation:x,...$},L)=>{const E=b.useMemo(()=>typeof(r==null?void 0:r.lastLoggedIn)=="string"?r.lastLoggedIn:r!=null&&r.lastLoggedIn?new Date(r.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[r]),[C,_]=b.useState(!1),[j,V]=b.useState(0),[W,B]=b.useState(!1),J=b.useRef(null);b.useEffect(()=>(document.addEventListener("mouseup",G),window.addEventListener("scroll",z),()=>{document.removeEventListener("mouseup",G),window.removeEventListener("scroll",z)}));const M=()=>{B(!W)},G=N=>{J.current&&!J.current.contains(N.target)&&B(!1)},z=()=>{if(l){const N=window.pageYOffset||document.documentElement.scrollTop;if(N<0||Math.abs(N-j)<60)return;_(N>j),V(N)}};return h("header",{...$,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:_t("pkt-header",{"pkt-header--fixed":a,"pkt-header--scroll-to-hide":l,"pkt-header--hidden":C}),ref:L,children:[h("div",{className:"pkt-header__logo",children:[typeof e=="string"?i("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:e,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.6/logos/"})}):i("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:e,children:i(w,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.6/logos/"})}),i("span",{className:"pkt-header__logo-service",children:n})]}),i("nav",{className:"pkt-header__actions",children:h("ul",{className:"pkt-header__actions-row",children:[d&&i("li",{children:i(le,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:v,children:"Meny"})}),(r||s)&&h("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${W&&!C?"pkt-header--open-dropdown":""}`,ref:J,children:[h("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:M,children:[i(w,{name:"user",className:"pkt-btn__icon"}),i("span",{className:"pkt-header__user-fullname",children:(s==null?void 0:s.name)||(r==null?void 0:r.name)}),i("span",{className:"pkt-header__user-shortname",children:(s==null?void 0:s.shortname)||(r==null?void 0:r.shortname)}),i(w,{name:"chevron-thin-down",className:"pkt-btn--closed"}),i(w,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),h("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[r&&h("li",{children:[i("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),i("div",{className:"pkt-user-menu__name",children:r.name}),r.lastLoggedIn&&h("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",i("time",{children:E})]})]}),o&&i("li",{children:i("ul",{className:"pkt-list",children:o.map((N,I)=>i("li",{children:typeof N.target=="string"?h("a",{href:N.target,className:"pkt-link",children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userMenu-${I}`))})}),(s||u)&&h("li",{children:[s&&h(X,{children:[i("div",{className:"pkt-user-menu__label",children:"Representerer"}),i("div",{className:"pkt-user-menu__name",children:s.name}),s.orgNumber&&h("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",s.orgNumber]})]}),i("ul",{className:"pkt-list mt-size-16",children:u&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:x,children:[i(w,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),i("li",{children:i("ul",{className:"pkt-list",children:(c||!k)&&h(X,{children:[c==null?void 0:c.map((N,I)=>i("li",{children:typeof N.target=="string"?h("a",{href:N.target,className:"pkt-link",children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):h("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&i(w,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userOptions-${I}`)),!k&&i("li",{children:h("button",{className:"pkt-link-button pkt-link",onClick:S,children:[i(w,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),f&&i("li",{className:"footer",children:i("ul",{className:"pkt-list-horizontal bordered",children:f.map((N,I)=>i("li",{children:typeof N.target=="string"?i("a",{href:N.target,className:"pkt-link",children:N.title}):i("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:N.title})},`userMenuFooter-${I}`))})})]})]}),k&&i("li",{children:i(le,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:S,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),bt=b.forwardRef(({label:e,id:n,children:a,...l},r)=>h("div",{className:"pkt-form-group",children:[i("label",{htmlFor:n,className:"pkt-form-label",children:e}),i("input",{className:"pkt-form-input",id:n,...l,ref:r}),a]}));bt.displayName="PktInput";const de=b.forwardRef(({forId:e,label:n,helptext:a,helptextDropdown:l,helptextDropdownButton:r,optionalTag:o=!1,optionalText:s="Valgfritt",requiredTag:c=!1,requiredText:f="Må fylles ut",hasError:u,errorMessage:d,disabled:k,inline:v,ariaDescribedby:S,useWrapper:x=!0,children:$,className:L,hasFieldset:E=!1},C)=>{const[_,j]=b.useState(!1),V=()=>{j(!_)},W=()=>o?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":c?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",B=o?s:c?f:"",J=k?"pkt-inputwrapper--disabled":"",M=v?"pkt-inputwrapper--inline":"",G=u?"pkt-inputwrapper--error":"",z=!!l&&l!=="",N=r||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',I=E?"fieldset":z?"div":"label",K=E?"legend":z?"h2":"span",q=S||(a?`${e}-helptext`:void 0);return h("div",{className:["pkt-inputwrapper",L,J,M,G].join(" "),ref:C,children:[x?i(X,{children:h(I,{htmlFor:E?void 0:e,"aria-describedby":z?void 0:S,className:`pkt-inputwrapper__label${E?" pkt-inputwrapper__fieldset":""}`,children:[h(K,{id:`${e}-label`,className:`${E?" pkt-inputwrapper__legend":""}`,children:[n,B!==""&&i("span",{className:W(),children:B})]}),a&&i("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,dangerouslySetInnerHTML:{__html:a}}),z&&l!==""&&h("div",{children:[i(le,{skin:"tertiary",size:"small",variant:"icon-right",iconName:_?"chevron-thin-up":"chevron-thin-down",className:"pkt-inputwrapper__helptext-expandable pkt-link pkt-link--icon-right",onClick:V,children:i("span",{dangerouslySetInnerHTML:{__html:N}})}),i("div",{className:`pkt-inputwrapper__helptext ${_?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i("span",{dangerouslySetInnerHTML:{__html:l}})}),!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":q,children:n})]}),i(X,{children:$})]})}):h(X,{children:[!E&&i("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":q,id:`${e}-label`,children:n}),$]}),u&&d&&i("div",{children:i(Qe,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:d})})]})});de.displayName="PktInputWrapper";const gt=b.forwardRef(({children:e,className:n,iconName:a="user",openInNewTab:l=!1,skin:r="normal",href:o="#",external:s=!1,title:c,...f},u)=>{const d=[n,"pkt-linkcard",r&&`pkt-linkcard--${r}`].filter(Boolean).join(" ");return h("a",{...f,href:o,className:`pkt-linkcard pkt-link ${d}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:u,children:[i(w,{className:"pkt-link__icon",name:a}),h("div",{className:"pkt-linkcard__content",children:[i("div",{className:`pkt-linkcard__title ${s?"pkt-link pkt-link--external":""}`,children:c}),i("div",{className:"pkt-linkcard__text",children:e})]})]})});gt.displayName="PktLinkCard";const Mn=b.forwardRef(({className:e,message:n,size:a="medium",inline:l=!1,isLoading:r=!0,variant:o="rainbow",delay:s=0,children:c,...f},u)=>{const d=`pkt-loader pkt-loader--${a}`,[k,v]=b.useState(!(s>0));s>0&&setTimeout(()=>{v(!0)},s);const S=x=>x==="shapes"?"loader":x==="blue"?"spinner-blue":"spinner";return i("div",{role:"status","aria-live":"polite","aria-busy":r,className:`pkt-loader--${l?"inline":"box"} ${e}`,children:r?i(X,{children:k?h("div",{className:d,"data-testid":"pkt-loader",ref:u,...f,children:[i(w,{name:S(o),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.6/animations/",className:`pkt-loader__svg pkt-loader__${o}`}),n&&i("p",{children:n})]}):null}):c})}),Yn=({children:e,className:n,compact:a=!1,skin:l="beige",title:r,...o})=>{const s=[n,"pkt-messagebox",l&&`pkt-messagebox--${l}`,a&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return h("div",{...o,className:s,children:[r&&i("div",{className:"pkt-messagebox__title",children:r}),i("div",{className:"pkt-messagebox__text",children:e})]})},Nt=b.forwardRef(({id:e,name:n,label:a,className:l,hasTile:r=!1,disabled:o=!1,checkHelptext:s,hasError:c=!1,...f},u)=>{const d=[l,"pkt-input-check"].filter(Boolean).join(" ");return i("div",{className:d,children:h("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${o&&r?"pkt-input-check__input--tile-disabled":""}`,children:[i("input",{ref:u,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:o,name:n,...f}),h("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[a,s&&i("div",{className:"pkt-input-check__input-helptext",children:s})]})]})})});Nt.displayName="PktRadioButton";const Kn=b.forwardRef(({action:e,appearance:n="local",disabled:a=!1,fullwidth:l=!1,id:r,label:o,method:s="get",name:c,placeholder:f="Søk…",suggestions:u,value:d="",onSearch:k,onSuggestionClick:v,...S},x)=>{const $=(_,j)=>{_?_():v&&v(j)},L=`pkt-searchinput pkt-searchinput--${n} ${l?"pkt-searchinput--fullwidth":""}`;return h(e?"form":"div",{className:L,onSubmit:k&&(()=>k(d)),action:e||void 0,method:e?s:void 0,role:"search",ref:x,...S,children:[h(o?"label":"div",{htmlFor:o?r:void 0,className:o?"pkt-inputwrapper__label":"",children:[o&&i(X,{children:o}),h("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[i("input",{className:`pkt-input ${l?"pkt-input--fullwidth":""}`,type:"search",name:c||r,id:r,placeholder:f,value:d,disabled:a,onInput:k&&(_=>k(_.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${r}-suggestions`}),i(le,{className:`pkt-searchinput__button ${n==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:n==="local"?"tertiary":"primary",color:n==="global"?"yellow":void 0,type:"submit",disabled:a,onClick:k&&(()=>k(d)),onKeyUp:k&&(_=>_.key==="Enter"&&k(d)),children:o||f})]})]}),u&&i("ul",{id:`${r}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:u.map((_,j)=>i("li",{children:b.createElement(_.href?"a":_.onClick?"button":"div",{href:_.href,className:`pkt-searchinput__suggestion ${_.onClick?"pkt-link-button":""} ${_.href||_.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:_.onClick?"button":void 0,onClick:()=>$(_.onClick,j),onKeyUp:()=>$(_.onClick,j)},h(X,{children:[_.title&&i("h3",{className:"pkt-searchinput__suggestion-title",children:_.title}),_.text&&i("p",{className:"pkt-searchinput__suggestion-text",children:_.text})]}))},`search-suggestion-${j}`))})]})}),Jn=b.forwardRef(({ariaDescribedby:e,ariaLabelledby:n,children:a,className:l,disabled:r=!1,errorMessage:o,hasError:s,helptext:c,helptextDropdown:f,helptextDropdownButton:u,id:d,inline:k=!1,fullwidth:v=!1,label:S,name:x,optionalTag:$=!1,optionalText:L,requiredTag:E=!1,requiredText:C,..._},j)=>{const V=[l,"pkt-select"].join(" ");return i(de,{className:V,forId:d,label:S,helptext:c,helptextDropdown:f,helptextDropdownButton:u,optionalTag:$,optionalText:L,requiredTag:E,requiredText:C,hasError:s,errorMessage:o,disabled:r,inline:k,ariaDescribedby:e,children:i("select",{ref:j,className:`pkt-input ${v?"pkt-input--fullwidth":""}`,"aria-invalid":s,"aria-errormessage":`${d}-error`,"aria-labelledby":n||`${d}-label`,disabled:r,id:d,name:x||d,..._,children:a})})}),zn=({isResponsive:e,children:n})=>e?i("div",{className:"pkt-table-container",children:n}):i(X,{children:n}),qn=({isResponsive:e,modifiers:{info:n=!1,success:a=!1,strong:l=!1,shadow:r=!1}={},children:o})=>i(zn,{isResponsive:e,children:i("table",{className:_t("pkt-table",{"pkt-table--info":n,"pkt-table--success":a,"pkt-table--strong":l,"pkt-table--shadow":r}),children:o})}),Gn=({children:e})=>i("td",{className:"pkt-table__th",children:e}),Hn=({children:e})=>i("th",{className:"pkt-table__th",children:e}),we=b.forwardRef(({children:e,className:n,skin:a="blue",textStyle:l="normal-text",size:r="medium",closeTag:o=!1,iconName:s="",type:c="button",ariaLabel:f="close",onClick:u=()=>{}},d)=>{const[k,v]=b.useState(!1),S=E=>{v(!0),u(E)},x=["pkt-tag",r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),$=["pkt-tag","pkt-btn","pkt-btn--tertiary",r&&`pkt-tag--${r}`,a&&`pkt-tag--${a}`,l&&`pkt-tag--${l}`,s&&o?"pkt-btn--icons-right-and-left":null,o&&!s?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),L=!k;return o&&s?i(X,{children:L&&h("button",{className:$,type:c,"aria-label":f,onClick:S,ref:d,children:[i(w,{className:"pkt-tag__icon",name:s}),e,i(w,{className:"pkt-tag__close-btn",name:"close"})]})}):o?i(X,{children:L&&h("button",{className:$,type:c,"aria-label":f,onClick:S,ref:d,children:[i(w,{className:"pkt-tag__close-btn",name:"close"}),e]})}):s?h("span",{className:x,children:[i(w,{className:"pkt-tag__icon",name:s}),e]}):i("span",{className:x,children:e})});we.displayName="PktTag";const Xn=b.forwardRef(({arrowNav:e=!0,tabs:n,onTabSelected:a},l)=>{const r=b.useRef([]);b.useEffect(()=>{r.current=r.current.slice(0,n.length)},[n]);const o=(c,f)=>{f.action&&f.action(c),a&&a(c)},s=(c,f)=>{var u,d;e&&(f.code==="ArrowLeft"&&c!==0&&((u=r.current[c-1])==null||u.focus()),f.code==="ArrowRight"&&c<n.length-1&&((d=r.current[c+1])==null||d.focus()),(f.code==="ArrowDown"||f.code==="Space")&&o(c,n[c]))};return i("div",{className:"pkt-tabs",ref:l,children:i("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:n.map((c,f)=>i(b.Fragment,{children:c.href?h("a",{"aria-selected":!!c.active,role:e?"tab":void 0,href:c.href,"aria-controls":c.controls,className:`pkt-tabs__link ${c.active?"active":""}`,onKeyUp:u=>s(f,u),onClick:()=>o(f,c),tabIndex:c.active||!e?void 0:-1,ref:u=>{r.current[f]=u},children:[c.icon&&i(w,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&i(we,{skin:c.tag.skin,size:"small",children:c.tag.text})]}):h("button",{"aria-selected":!!c.active,role:e?"tab":void 0,type:"button","aria-controls":c.controls,className:`pkt-tabs__button pkt-link-button ${c.active?"active":""}`,onKeyUp:u=>s(f,u),onClick:()=>o(f,c),tabIndex:c.active||!e?void 0:-1,ref:u=>{r.current[f]=u},children:[c.icon&&i(w,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&i(we,{skin:c.tag.skin,size:"small",children:c.tag.text})]},"b-"+f)},f))})})}),Zn=b.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:a,counter:l,counterMaxLength:r,className:o,disabled:s,errorMessage:c,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:v,fullwidth:S=!1,label:x,name:$,optionalTag:L=!1,optionalText:E,requiredTag:C=!1,requiredText:_,placeholder:j,rows:V,useWrapper:W=!0,onChange:B,...J},M)=>{const G=[o,"pkt-textinput","pkt-textarea"].join(" "),z=a||`${e}-label`,N=b.useRef(null),[I,K]=b.useState(0),q=ee=>{var te,me;if(l&&K(((me=(te=ee.currentTarget)==null?void 0:te.value)==null?void 0:me.length)||0),B)return B(ee)};return b.useEffect(()=>{var ee,te;typeof M=="function"&&M(N.current),l&&K(((te=(ee=N==null?void 0:N.current)==null?void 0:ee.value)==null?void 0:te.length)||0)},[M]),h(de,{ariaDescribedby:n,className:G,disabled:s,errorMessage:c,forId:e,hasError:f,helptext:u,helptextDropdown:d,helptextDropdownButton:k,inline:v,label:x,optionalTag:L,optionalText:E,requiredTag:C,requiredText:_,useWrapper:W,children:[i("textarea",{ref:N,className:`pkt-input ${S?"pkt-input--fullwidth":""} ${r&&I>r?"pkt-input--counter-error":""}`,name:$||e,id:e,placeholder:j,disabled:s,rows:V,"aria-labelledby":z,"aria-invalid":f,"aria-errormessage":`${e}-error`,...J,onChange:q}),l&&h("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[I||0,r&&`/${r}`]})]})}),Qn=b.forwardRef(({id:e,ariaDescribedby:n,ariaLabelledby:a,autocomplete:l="off",className:r,disabled:o=!1,errorMessage:s,hasError:c=!1,helptext:f,helptextDropdown:u,helptextDropdownButton:d,iconNameRight:k,inline:v=!1,fullwidth:S=!1,label:x,name:$,optionalTag:L=!1,optionalText:E,requiredTag:C=!1,requiredText:_,placeholder:j,prefix:V,suffix:W,type:B="text",useWrapper:J=!0,omitSearchIcon:M=!1,value:G,...z},N)=>{const I=[r,"pkt-textinput"].join(" "),K=a||`${e}-label`,q=B==="search"&&!k&&!M;return i(de,{ariaDescribedby:n,className:I,disabled:o,errorMessage:s,forId:e,hasError:c,helptext:f,helptextDropdown:u,helptextDropdownButton:d,inline:v,label:x,optionalTag:L,optionalText:E,requiredTag:C,requiredText:_,useWrapper:J,children:h("div",{className:"pkt-input__container",children:[V&&i("div",{className:"pkt-input-prefix",children:V}),i("input",{ref:N,className:`pkt-input ${S?"pkt-input--fullwidth":""}`,type:B,name:$||e,id:e,placeholder:j,autoComplete:l,value:G,disabled:o,"aria-invalid":c,"aria-errormessage":`${e}-error`,"aria-labelledby":K,...z}),W&&h("p",{className:"pkt-input-suffix",children:[W,k&&i(w,{className:"pkt-input-suffix-icon",name:k}),q&&i(w,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!W&&k&&i(w,{className:"pkt-input-icon",name:k}),!W&&q&&i(w,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});T.PktAlert=Qe,T.PktBackLink=Gt,T.PktBreadcrumbs=Un,T.PktButton=le,T.PktCheckbox=kt,T.PktFooter=An,T.PktFooterSimple=Vn,T.PktHeader=Bn,T.PktIcon=w,T.PktIconContext=Ze,T.PktInput=bt,T.PktInputWrapper=de,T.PktLinkCard=gt,T.PktLoader=Mn,T.PktMessagebox=Yn,T.PktRadioButton=Nt,T.PktSearchInput=Kn,T.PktSelect=Jn,T.PktTable=qn,T.PktTableData=Gn,T.PktTableHeader=Hn,T.PktTabs=Xn,T.PktTag=we,T.PktTextarea=Zn,T.PktTextinput=Qn,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": "11.5.3",
3
+ "version": "11.6.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",
@@ -91,5 +91,5 @@
91
91
  "url": "https://github.com/oslokommune/punkt/issues"
92
92
  },
93
93
  "license": "MIT",
94
- "gitHead": "683cde8f21abc895d5bea931ba2ae5a4eb5315ee"
94
+ "gitHead": "625cf310735226cfcdae9d27c3f18c04d335ed14"
95
95
  }
@@ -5,7 +5,6 @@ import { PktIcon } from '../icon/Icon'
5
5
  export interface IPktBackLink extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
6
6
  href?: string;
7
7
  text?: string;
8
- onClick?: () => void; // Custom navigation handler
9
8
  className?: string;
10
9
  }
11
10
 
@@ -22,9 +21,9 @@ export const PktBackLink = forwardRef(
22
21
  ].filter(Boolean)
23
22
  .join(' ')
24
23
 
25
- const handleClick = () => {
24
+ const handleClick = (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
26
25
  if (onClick) {
27
- onClick();
26
+ onClick(event);
28
27
  }
29
28
  };
30
29
 
@@ -1,4 +1,6 @@
1
- import React, { HTMLAttributes, SVGProps, forwardRef } from 'react'
1
+ 'use client'
2
+
3
+ import React, { HTMLAttributes, forwardRef, useState, ForwardedRef } from 'react'
2
4
  import PktIcon from '../icon/Icon'
3
5
 
4
6
  export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
@@ -18,6 +20,12 @@ export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
18
20
  * "shapes" oslo wave loader. Default is rainbow.
19
21
  */
20
22
  variant?: 'blue' | 'rainbow' | 'shapes'
23
+ /**
24
+ * The `delay` prop controls how much time the loading should be given before the loader is displayed.
25
+ * This is handy for situations where the load time might be so short that loader is not necessary.
26
+ * Delay time is in milliseconds.
27
+ */
28
+ delay?: number
21
29
  }
22
30
 
23
31
  export const PktLoader = forwardRef(
@@ -29,13 +37,21 @@ export const PktLoader = forwardRef(
29
37
  inline = false,
30
38
  isLoading = true,
31
39
  variant = 'rainbow',
40
+ delay = 0,
32
41
  children,
33
42
  ...props
34
43
  }: IPktLoader,
35
- ref: React.ForwardedRef<HTMLDivElement>,
44
+ ref: ForwardedRef<HTMLDivElement>,
36
45
  ) => {
37
46
  const classes = `pkt-loader pkt-loader--${size}`
38
47
 
48
+ const [shouldDisplayLoader, setShouldDisplayLoader] = useState(delay > 0 ? false : true)
49
+
50
+ delay > 0 &&
51
+ setTimeout(() => {
52
+ setShouldDisplayLoader(true)
53
+ }, delay)
54
+
39
55
  const getVariant = (variant: 'blue' | 'rainbow' | 'shapes'): string => {
40
56
  return variant === 'shapes' ? 'loader' : variant === 'blue' ? 'spinner-blue' : 'spinner'
41
57
  }
@@ -45,18 +61,22 @@ export const PktLoader = forwardRef(
45
61
  role="status"
46
62
  aria-live="polite"
47
63
  aria-busy={isLoading}
48
- className={`pkt-loader--${inline ? 'inline' : 'box'}`}
64
+ className={`pkt-loader--${inline ? 'inline' : 'box'} ${className}`}
49
65
  >
50
66
  {isLoading ? (
51
- <div className={classes} data-testid="pkt-loader" ref={ref} {...props}>
52
- <PktIcon
53
- name={getVariant(variant)}
54
- aria-label="loading"
55
- path="https://punkt-cdn.oslo.kommune.no/latest/animations/"
56
- className={`pkt-loader__svg pkt-loader__${variant}`}
57
- />
58
- {message && <p>{message}</p>}
59
- </div>
67
+ <>
68
+ {shouldDisplayLoader ? (
69
+ <div className={classes} data-testid="pkt-loader" ref={ref} {...props}>
70
+ <PktIcon
71
+ name={getVariant(variant)}
72
+ aria-label="loading"
73
+ path="https://punkt-cdn.oslo.kommune.no/latest/animations/"
74
+ className={`pkt-loader__svg pkt-loader__${variant}`}
75
+ />
76
+ {message && <p>{message}</p>}
77
+ </div>
78
+ ) : null}
79
+ </>
60
80
  ) : (
61
81
  children
62
82
  )}