@oslokommune/punkt-elements 12.42.11 → 12.42.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/{accordionitem-aQHOrGzf.js → accordionitem-C9FI-NXW.js} +3 -3
- package/dist/{accordionitem-C4NQFQHo.cjs → accordionitem-DjAWPtsn.cjs} +1 -1
- package/dist/{alert-sBHt7DSh.js → alert-B0OUR9oD.js} +5 -5
- package/dist/{alert-DUWuhtFC.cjs → alert-BH0lJ2ny.cjs} +1 -1
- package/dist/{backlink-BnlrDl9O.js → backlink-B13JTp9D.js} +2 -2
- package/dist/{backlink-CcAZfB1d.cjs → backlink-C5jQRMwJ.cjs} +1 -1
- package/dist/{button-BT-FRGMk.cjs → button-CDocR7iN.cjs} +1 -1
- package/dist/{button-B4Oe8Ar0.js → button-DrrEvUy9.js} +4 -4
- package/dist/{calendar-D4qfcRtv.cjs → calendar-BZe2D4Sr.cjs} +1 -1
- package/dist/{calendar-Df6-FDRW.js → calendar-DevQhOup.js} +4 -4
- package/dist/{card-CXhVAeOG.cjs → card-Bx36j0q4.cjs} +1 -1
- package/dist/{card-0Kf9L0A_.js → card-Djnd-pgo.js} +6 -6
- package/dist/{checkbox-CiXWukkL.cjs → checkbox-CJ4tK9RC.cjs} +1 -1
- package/dist/{checkbox-B67_cfqW.js → checkbox-cD_5LDzV.js} +4 -4
- package/dist/{class-map-DWDPOqjO.cjs → class-map-BBG2gMX4.cjs} +1 -1
- package/dist/{class-map-m7ZCZ49w.js → class-map-BpTj9gtz.js} +1 -1
- package/dist/{combobox-Dq7F5v-u.cjs → combobox-Cv6i7BEk.cjs} +1 -1
- package/dist/{combobox-CsFDvh8U.js → combobox-kWGI4RHI.js} +11 -11
- package/dist/{consent-B17ZIuwm.js → consent-CftYu8Di.js} +3 -3
- package/dist/{consent-CILYIgC-.cjs → consent-DrS71kvz.cjs} +1 -1
- package/dist/{datepicker-DOf9XK9v.cjs → datepicker-BJe92Vor.cjs} +1 -1
- package/dist/{datepicker-Cz6seIz1.js → datepicker-LpbYHx8L.js} +11 -11
- package/dist/{directive-helpers-v9b0v7lu.cjs → directive-helpers-BBbxqP2W.cjs} +1 -1
- package/dist/{directive-helpers--4ibN__v.js → directive-helpers-r-kOS_Mf.js} +1 -1
- package/dist/element-6DBpyGQm.cjs +238 -0
- package/dist/{element-gAd63VwC.js → element-CgEWt74-.js} +7039 -7516
- package/dist/heading-BRE_iFtR.cjs +1 -0
- package/dist/heading-D6jXE_Mz.js +58 -0
- package/dist/{helptext-BG_b6ytC.js → helptext-B7eI0iBQ.js} +5 -5
- package/dist/{helptext-CC3qLmEz.cjs → helptext-CzQX6YVE.cjs} +1 -1
- package/dist/{icon-B1_BRNqf.cjs → icon-B_ryAy4Q.cjs} +1 -1
- package/dist/{icon-CO1TLSs5.js → icon-CC1js8eR.js} +1 -1
- package/dist/{if-defined-Cj-3Kdsr.js → if-defined-CmuO4Vz9.js} +1 -1
- package/dist/{if-defined-C8eotHpL.cjs → if-defined-Cni-RHLS.cjs} +1 -1
- package/dist/index.d.ts +33 -32
- package/dist/input-element-CHjLWeKt.cjs +1 -0
- package/dist/input-element-Cco4PA2M.js +700 -0
- package/dist/{input-wrapper-Dk0rKRlz.cjs → input-wrapper-BxZf8wEP.cjs} +1 -1
- package/dist/{input-wrapper-CC_R5w7V.js → input-wrapper-gz7ppKrK.js} +6 -6
- package/dist/{link-C9X0huxP.js → link-C76H6Qf1.js} +4 -4
- package/dist/{link-qTz-qNVI.cjs → link-DTkjNlmy.cjs} +1 -1
- package/dist/{linkcard-Bhk2ttou.js → linkcard-BVEsUPwG.js} +3 -3
- package/dist/{linkcard-CaBz6i7A.cjs → linkcard-BlMhPNry.cjs} +1 -1
- package/dist/{listbox-AjDNhDsQ.cjs → listbox-C4supLfR.cjs} +1 -1
- package/dist/{listbox-DCWdrjFp.js → listbox-CLsSW32I.js} +5 -5
- package/dist/{loader-BqYcg8Di.cjs → loader-CHPxY9c6.cjs} +1 -1
- package/dist/{loader-DMp859px.js → loader-Da4IOk_T.js} +5 -5
- package/dist/{messagebox-Do_nAUo3.cjs → messagebox-CqUBJs_D.cjs} +1 -1
- package/dist/{messagebox-_1f12rDq.js → messagebox-DwGdcdm7.js} +5 -5
- package/dist/{modal-C1inKvts.cjs → modal-BdA5aWGU.cjs} +1 -1
- package/dist/{modal-C3kEgTMj.js → modal-DcXPnFus.js} +5 -5
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +29 -29
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-BrXtjUvh.cjs → progressbar-DhMBXkww.cjs} +1 -1
- package/dist/{progressbar-BSO0KWzv.js → progressbar-Dj_mI_A6.js} +5 -5
- package/dist/{radiobutton-x10h-JEh.cjs → radiobutton-0vVqu-GU.cjs} +1 -1
- package/dist/{radiobutton-BaIDDCwK.js → radiobutton-BcFRJFvI.js} +5 -5
- package/dist/{ref-DnSbnXsj.js → ref-BBYSqgeW.js} +2 -2
- package/dist/{ref-B-w1vCo8.cjs → ref-iJtiv3o2.cjs} +1 -1
- package/dist/{repeat-lUFq9w5d.js → repeat-C8BeHwYx.js} +2 -2
- package/dist/{repeat-CxQA3AeF.cjs → repeat-CDsZqct8.cjs} +1 -1
- package/dist/{select-BlL8T2BX.js → select-BaLHLuvH.js} +6 -6
- package/dist/{select-BkVSXR5K.cjs → select-CFpdOlDE.cjs} +1 -1
- package/dist/{state-BxrO4zNJ.js → state-Bo2bck5_.js} +1 -1
- package/dist/{state-D-Recv7U.cjs → state-DPobt-Yz.cjs} +1 -1
- package/dist/{tag-m7OTZaCG.js → tag-BWm6s48d.js} +6 -6
- package/dist/{tag-DrbI0ng3.cjs → tag-DPk3fpEg.cjs} +1 -1
- package/dist/{textarea-Dc1sUaxx.cjs → textarea-CViiuZdR.cjs} +1 -1
- package/dist/{textarea-Dk8hQMD2.js → textarea-EIFo7GZz.js} +9 -9
- package/dist/{textinput-6Ip-0aVY.js → textinput-BHS7b-Jt.js} +8 -8
- package/dist/{textinput-DuLZ26DB.cjs → textinput-_ZdyMA9O.cjs} +1 -1
- package/package.json +3 -3
- package/src/components/heading/heading.ts +64 -37
- package/dist/element-90YeMNbV.cjs +0 -238
- package/dist/heading-CGGKEZve.js +0 -59
- package/dist/heading-Cmh5bbTl.cjs +0 -1
- package/dist/input-element-BEvaQK4g.js +0 -229
- package/dist/input-element-CInrWeac.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.42.13](https://github.com/oslokommune/punkt/compare/12.42.12...12.42.13) (2025-06-24)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [12.42.12](https://github.com/oslokommune/punkt/compare/12.42.11...12.42.12) (2025-06-23)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
Ingen
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
Ingen
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
|
|
8
42
|
## [12.42.9](https://github.com/oslokommune/punkt/compare/12.42.8...12.42.9) (2025-06-19)
|
|
9
43
|
|
|
10
44
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as k, x as u, n as s, a as f, P as _ } from "./element-
|
|
2
|
-
import { e as y } from "./class-map-
|
|
1
|
+
import { i as k, x as u, n as s, a as f, P as _ } from "./element-CgEWt74-.js";
|
|
2
|
+
import { e as y } from "./class-map-BpTj9gtz.js";
|
|
3
3
|
import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
4
|
-
import { e as m, n as h } from "./ref-
|
|
4
|
+
import { e as m, n as h } from "./ref-BBYSqgeW.js";
|
|
5
5
|
var $ = Object.defineProperty, P = Object.getOwnPropertyDescriptor, d = (e, o, c, i) => {
|
|
6
6
|
for (var t = i > 1 ? void 0 : i ? P(o, c) : o, a = e.length - 1, n; a >= 0; a--)
|
|
7
7
|
(n = e[a]) && (t = (i ? n(o, c, t) : n(t)) || t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-6DBpyGQm.cjs"),h=require("./class-map-BBG2gMX4.cjs"),m=require("./pkt-slot-controller-BzddBp7z.cjs"),d=require("./ref-iJtiv3o2.cjs");var f=Object.defineProperty,k=Object.getOwnPropertyDescriptor,u=(o,i,n,r)=>{for(var t=r>1?void 0:r?k(i,n):i,s=o.length-1,a;s>=0;s--)(a=o[s])&&(t=(r?a(i,n,t):a(t))||t);return r&&t&&f(i,n,t),t};let l=class extends e.i{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless"}updated(o){o.has("skin")&&this.requestUpdate()}render(){const o={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e.x`
|
|
2
2
|
<div
|
|
3
3
|
part="container"
|
|
4
4
|
class=${h.e(o)}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e as u } from "./class-map-
|
|
2
|
-
import { P as f, E as h, x as p, n as a, a as v } from "./element-
|
|
3
|
-
import { r as k } from "./state-
|
|
1
|
+
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { P as f, E as h, x as p, n as a, a as v } from "./element-CgEWt74-.js";
|
|
3
|
+
import { r as k } from "./state-Bo2bck5_.js";
|
|
4
4
|
import { P as m } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
5
|
-
import { e as _, n as b } from "./ref-
|
|
5
|
+
import { e as _, n as b } from "./ref-BBYSqgeW.js";
|
|
6
6
|
import { u as y } from "./classutils-RQs1k6D9.js";
|
|
7
|
-
import "./icon-
|
|
7
|
+
import "./icon-CC1js8eR.js";
|
|
8
8
|
const C = {
|
|
9
9
|
skin: {
|
|
10
10
|
default: "info"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("./class-map-
|
|
1
|
+
"use strict";const c=require("./class-map-BBG2gMX4.cjs"),t=require("./element-6DBpyGQm.cjs"),d=require("./state-DPobt-Yz.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-iJtiv3o2.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-B_ryAy4Q.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},a={props:v};var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,s,l)=>{for(var r=l>1?void 0:l?_(e,s):e,p=o.length-1,n;p>=0;p--)(n=o[p])&&(r=(l?n(e,s,r):n(r))||r);return l&&r&&f(e,s,r),r};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.compact=a.props.compact.default,this.title="",this.skin=a.props.skin.default,this.ariaLive=a.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=a.props.closeAlert.default,this.date=null,this.role="status",this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new h.PktSlotController(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,s,l){e==="ariaLive"&&(this["aria-live"]=l),super.attributeChangedCallback(e,s,l)}updated(e){super.updated(e),e.has("ariaLive")&&(this["aria-live"]=this.ariaLive),e.has("_isClosed")&&k.updateClassAttribute(this,"pkt-hide",this._isClosed)}render(){const e={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},s={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t.x`
|
|
2
2
|
<div class=${c.e(e)} aria-live=${this["aria-live"]}>
|
|
3
3
|
<div class=${c.e(s)}>
|
|
4
4
|
<pkt-icon
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as c, x as k, n as o, a as f } from "./element-
|
|
2
|
-
import { o as h } from "./if-defined-
|
|
1
|
+
import { P as c, x as k, n as o, a as f } from "./element-CgEWt74-.js";
|
|
2
|
+
import { o as h } from "./if-defined-CmuO4Vz9.js";
|
|
3
3
|
var b = Object.defineProperty, u = Object.getOwnPropertyDescriptor, s = (t, r, i, l) => {
|
|
4
4
|
for (var e = l > 1 ? void 0 : l ? u(r, i) : r, n = t.length - 1, p; n >= 0; n--)
|
|
5
5
|
(p = t[n]) && (e = (l ? p(r, i, e) : p(e)) || e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("./element-
|
|
1
|
+
"use strict";const i=require("./element-6DBpyGQm.cjs"),c=require("./if-defined-Cni-RHLS.cjs");var p=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=(k,t,a,r)=>{for(var e=r>1?void 0:r?o(t,a):t,l=k.length-1,s;l>=0;l--)(s=k[l])&&(e=(r?s(t,a,e):s(e))||e);return r&&e&&p(t,a,e),e};exports.PktBackLink=class extends i.PktElement{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(t,a,r){t==="arialabel"&&this.removeAttribute("arialabel"),t==="href"&&this.removeAttribute("href"),t==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(t,a,r)}render(){return i.x`<nav
|
|
2
2
|
class="pkt-back-link"
|
|
3
3
|
aria-label=${this.ariaLabel||"Gå tilbake til forrige side"}
|
|
4
4
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-6DBpyGQm.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./class-map-BBG2gMX4.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),d=require("./ref-iJtiv3o2.cjs");var c=Object.defineProperty,k=Object.getOwnPropertyDescriptor,e=(r,i,s,n)=>{for(var o=n>1?void 0:n?k(i,s):i,p=r.length-1,l;p>=0;p--)(l=r[p])&&(o=(n?l(i,s,o):l(o))||o);return n&&o&&c(i,s,o),o};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktButton=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new h.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.preventDefault(),i.stopImmediatePropagation())},!0),this.addEventListener("keydown",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopImmediatePropagation())},!0)}attributeChangedCallback(i,s,n){super.attributeChangedCallback(i,s,n),i==="disabled"&&n==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&n==="false"&&(this.isLoading=!1)}firstUpdated(i){super.firstUpdated(i),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const i=this.form??this.getAttribute("form")??void 0,s={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(s)}
|
|
4
4
|
type=${this.type}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as b, E as c, x as p, n as s, a as f } from "./element-
|
|
1
|
+
import { P as b, E as c, x as p, n as s, a as f } from "./element-CgEWt74-.js";
|
|
2
2
|
import { P as m } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
3
|
-
import { e as u } from "./class-map-
|
|
4
|
-
import { o as l } from "./if-defined-
|
|
5
|
-
import { e as y, n as k } from "./ref-
|
|
3
|
+
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
4
|
+
import { o as l } from "./if-defined-CmuO4Vz9.js";
|
|
5
|
+
import { e as y, n as k } from "./ref-BBYSqgeW.js";
|
|
6
6
|
var g = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, e = (t, o, n, r) => {
|
|
7
7
|
for (var a = r > 1 ? void 0 : r ? $(o, n) : o, d = t.length - 1, h; d >= 0; d--)
|
|
8
8
|
(h = t[d]) && (a = (r ? h(o, n, a) : h(a)) || a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const lt=require("./class-map-DWDPOqjO.cjs"),o=require("./element-90YeMNbV.cjs"),F=require("./state-D-Recv7U.cjs");require("./icon-B1_BRNqf.cjs");const et=6048e5,ut=864e5,j=Symbol.for("constructDateFrom");function S(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&j in n?n[j](t):n instanceof Date?new n.constructor(t):new Date(t)}function k(n,t){return S(t||n,n)}function L(n,t,e){const r=k(n,e==null?void 0:e.in);return isNaN(t)?S(n,NaN):(t&&r.setDate(r.getDate()+t),r)}let ht={};function I(){return ht}function A(n,t){var c,l,u,f;const e=I(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,a=k(n,t==null?void 0:t.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function H(n,t){return A(n,{...t,weekStartsOn:1})}function nt(n,t){const e=k(n,t==null?void 0:t.in),r=e.getFullYear(),a=S(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=H(a),i=S(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=H(i);return e.getTime()>=s.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function G(n){const t=k(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function rt(n,...t){const e=S.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function z(n,t){const e=k(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function dt(n,t,e){const[r,a]=rt(e==null?void 0:e.in,n,t),s=z(r),i=z(a),c=+s-G(s),l=+i-G(i);return Math.round((c-l)/ut)}function ft(n,t){const e=nt(n,t),r=S(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),H(r)}function mt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function gt(n){return!(!mt(n)&&typeof n!="number"||isNaN(+k(n)))}function yt(n,t){const e=k(n,t==null?void 0:t.in);return e.setHours(23,59,59,999),e}function pt(n,t){const[e,r]=rt(n,t.start,t.end);return{start:e,end:r}}function R(n,t){const{start:e,end:r}=pt(t==null?void 0:t.in,n);let a=+e>+r;const s=a?+e:+r,i=a?r:e;i.setHours(0,0,0,0);let c=1;const l=[];for(;+i<=s;)l.push(S(e,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return a?l.reverse():l}function wt(n,t){const e=k(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const bt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kt=(n,t,e)=>{let r;const a=bt[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function U(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Dt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},St={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mt={date:U({formats:Dt,defaultWidth:"full"}),time:U({formats:vt,defaultWidth:"full"}),dateTime:U({formats:St,defaultWidth:"full"})},xt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tt=(n,t,e,r)=>xt[n];function $(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=e!=null&&e.width?String(e.width):i;a=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[c]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(t):t;return a[s]}}const Pt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ot={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ct={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Nt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$t={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wt=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Yt={ordinalNumber:Wt,era:$({values:Pt,defaultWidth:"wide"}),quarter:$({values:Ot,defaultWidth:"wide",argumentCallback:n=>n-1}),month:$({values:Ct,defaultWidth:"wide"}),day:$({values:Nt,defaultWidth:"wide"}),dayPeriod:$({values:$t,defaultWidth:"wide",formattingValues:Et,defaultFormattingWidth:"wide"})};function E(n){return(t,e={})=>{const r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=t.match(a);if(!s)return null;const i=s[0],c=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Ft(c,p=>p.test(i)):At(c,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function At(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Ft(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function _t(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const a=r[0],s=t.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const c=t.slice(a.length);return{value:i,rest:c}}}const Ht=/^(\d+)(th|st|nd|rd)?/i,It=/\d+/i,qt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Lt={any:[/^b/i,/^(a|c)/i]},Rt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ut={any:[/1/i,/2/i,/3/i,/4/i]},Bt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vt={ordinalNumber:_t({matchPattern:Ht,parsePattern:It,valueCallback:n=>parseInt(n,10)}),era:E({matchPatterns:qt,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),quarter:E({matchPatterns:Rt,defaultMatchWidth:"wide",parsePatterns:Ut,defaultParseWidth:"any",valueCallback:n=>n+1}),month:E({matchPatterns:Bt,defaultMatchWidth:"wide",parsePatterns:zt,defaultParseWidth:"any"}),day:E({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),dayPeriod:E({matchPatterns:Gt,defaultMatchWidth:"any",parsePatterns:Xt,defaultParseWidth:"any"})},Jt={code:"en-US",formatDistance:kt,formatLong:Mt,formatRelative:Tt,localize:Yt,match:Vt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Kt(n,t){const e=k(n,t==null?void 0:t.in);return dt(e,wt(e))+1}function Zt(n,t){const e=k(n,t==null?void 0:t.in),r=+H(e)-+ft(e);return Math.round(r/et)+1}function at(n,t){var f,p,w,m;const e=k(n,t==null?void 0:t.in),r=e.getFullYear(),a=I(),s=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(w=a.locale)==null?void 0:w.options)==null?void 0:m.firstWeekContainsDate)??1,i=S((t==null?void 0:t.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=A(i,t),l=S((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=A(l,t);return+e>=+c?r+1:+e>=+u?r:r-1}function te(n,t){var c,l,u,f;const e=I(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=at(n,t),s=S((t==null?void 0:t.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),A(s,t)}function st(n,t){const e=k(n,t==null?void 0:t.in),r=+A(e,t)-+te(e,t);return Math.round(r/et)+1}function h(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const M={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return h(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):h(e+1,2)},d(n,t){return h(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return h(n.getHours()%12||12,t.length)},H(n,t){return h(n.getHours(),t.length)},m(n,t){return h(n.getMinutes(),t.length)},s(n,t){return h(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return h(a,t.length)}},C={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},X={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return M.y(n,t)},Y:function(n,t,e,r){const a=at(n,r),s=a>0?a:1-a;if(t==="YY"){const i=s%100;return h(i,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):h(s,t.length)},R:function(n,t){const e=nt(n);return h(e,t.length)},u:function(n,t){const e=n.getFullYear();return h(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return h(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return h(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return M.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return h(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const a=st(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):h(a,t.length)},I:function(n,t,e){const r=Zt(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):h(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):M.d(n,t)},D:function(n,t,e){const r=Kt(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):h(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return h(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return h(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return h(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return M.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):M.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):M.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):M.s(n,t)},S:function(n,t){return M.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return J(r);case"XXXX":case"XX":return P(r);case"XXXXX":case"XXX":default:return P(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return J(r);case"xxxx":case"xx":return P(r);case"xxxxx":case"xxx":default:return P(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+V(r,":");case"OOOO":default:return"GMT"+P(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+V(r,":");case"zzzz":default:return"GMT"+P(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return h(r,t.length)},T:function(n,t,e){return h(+n,t.length)}};function V(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?e+String(a):e+String(a)+t+h(s,2)}function J(n,t){return n%60===0?(n>0?"-":"+")+h(Math.abs(n)/60,2):P(n,t)}function P(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=h(Math.trunc(r/60),2),s=h(r%60,2);return e+a+t+s}const K=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},it=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ee=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return K(n,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",K(r,t)).replace("{{time}}",it(a,t))},ne={p:it,P:ee},re=/^D+$/,ae=/^Y+$/,se=["D","DD","YY","YYYY"];function ie(n){return re.test(n)}function oe(n){return ae.test(n)}function ce(n,t,e){const r=le(n,t,e);if(console.warn(r),se.includes(n))throw new RangeError(r)}function le(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ue=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,me=/[a-zA-Z]/;function ge(n,t,e){var f,p,w,m;const r=I(),a=r.locale??Jt,s=r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(w=r.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??0,c=k(n,e==null?void 0:e.in);if(!gt(c))throw new RangeError("Invalid time value");let l=t.match(he).map(g=>{const b=g[0];if(b==="p"||b==="P"){const q=ne[b];return q(g,a.formatLong)}return g}).join("").match(ue).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const b=g[0];if(b==="'")return{isToken:!1,value:ye(g)};if(X[b])return{isToken:!0,value:g};if(b.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(l=a.localize.preprocessor(c,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(g=>{if(!g.isToken)return g.value;const b=g.value;(oe(b)||ie(b))&&ce(b,t,String(n));const q=X[b[0]];return q(c,b,a.localize,u)}).join("")}function ye(n){const t=n.match(de);return t?t[1].replace(fe,"'"):n}function pe(n,t){const e=k(n,t==null?void 0:t.in).getDay();return e===0?7:e}const B={},W={};function Y(n,t){try{const r=(B[n]||(B[n]=new Intl.DateTimeFormat("en-GB",{timeZone:n,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in W?W[r]:Z(r,r.split(":"))}catch{if(n in W)return W[n];const e=n==null?void 0:n.match(we);return e?Z(n,e.slice(1)):NaN}}const we=/([+-]\d\d):?(\d\d)?/;function Z(n,t){const e=+t[0],r=+(t[1]||0);return W[n]=e>0?e*60+r:e*60-r}class v extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Y(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ot(this),Q(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new v(...e,t):new v(Date.now(),t)}withTimeZone(t){return new v(+this,t)}getTimezoneOffset(){return-Y(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Q(this),+this}[Symbol.for("constructDateFrom")](t){return new v(+new Date(t),this.timeZone)}}const tt=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!tt.test(n))return;const t=n.replace(tt,"$1UTC");v.prototype[t]&&(n.startsWith("get")?v.prototype[n]=function(){return this.internal[t]()}:(v.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),be(this),+this},v.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Q(this),+this}))});function Q(n){n.internal.setTime(+n),n.internal.setUTCMinutes(n.internal.getUTCMinutes()-n.getTimezoneOffset())}function be(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),ot(n)}function ot(n){const t=Y(n.timeZone,n),e=new Date(+n);e.setUTCHours(e.getUTCHours()-1);const r=-new Date(+n).getTimezoneOffset(),a=-new Date(+e).getTimezoneOffset(),s=r-a,i=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();s&&i&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+s);const c=r-t;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);const l=Y(n.timeZone,n),f=-new Date(+n).getTimezoneOffset()-l,p=l!==t,w=f-c;if(p&&w){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+w);const m=Y(n.timeZone,n),g=l-m;g&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+g))}}class N extends v{static tz(t,...e){return e.length?new N(...e,t):new N(Date.now(),t)}toISOString(){const[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${ke(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,r,a]}withTimeZone(t){return new N(+this,t)}[Symbol.for("constructDateFrom")](t){return new N(+new Date(t),this.timeZone)}}function ke(n,t){return new Intl.DateTimeFormat("en-GB",{timeZone:n,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const De=(n=window.pktTz)=>{const t=new N(new Date().toISOString(),n);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function O(n){if(!n||n==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(n)){const[t,e,r]=n.split("-").map(Number);return new Date(t,e-1,r)}if(/^\d{4}-\d{2}$/.test(n)){const[t,e]=n.split("-").map(Number);return new Date(t,e-1,1)}return/^\d{4}$/.test(n)?new Date(Number(n),0,1):new Date(n)}const y=n=>{if(!n||isNaN(n.getTime()))return"";const t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${t}-${e}-${r}`},ve=n=>{if(!n)return null;const t=O(n);return isNaN(t.getTime())?null:t},Se=(n,t)=>{const e=D(n);return isNaN(e.getTime())?"":ge(e,t)},D=(n="",t)=>{const e=typeof n=="string"?O(n):n;return!e||isNaN(e.getTime())?new Date:t?t==="end"?yt(e):z(e):e},x=(n,t,e=1)=>{if(typeof n!="number"||typeof t!="number"||typeof e!="number"||isNaN(n)||isNaN(t)||isNaN(e))return new Date;const r=new Date(n,t,e);return isNaN(r.getTime())?new Date:r},Me=n=>!n||isNaN(n.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(n),ct=n=>{if(Array.isArray(n))return n;if(typeof n=="string")return n.split(",")},xe=n=>n?O(n):null,Te=n=>{if(typeof n=="string")return n.split(",").map(t=>O(t));if(Array.isArray(n))return n.map(t=>O(t))},_={csvToArray:ct,stringToDate:xe,stringsToDate:Te},Pe={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},T={props:Pe};var Oe=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,d=(n,t,e,r)=>{for(var a=r>1?void 0:r?Ce(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=(r?i(t,e,a):i(a))||a);return r&&a&&Oe(t,e,a),a};exports.PktCalendar=class extends o.PktElement{constructor(){super(...arguments),this.multiple=T.props.multiple.default,this.maxMultiple=T.props.maxMultiple.default,this.range=T.props.range.default,this.weeknumbers=T.props.weeknumbers.default,this.withcontrols=T.props.withcontrols.default,this.selected=[],this.earliest=T.props.earliest.default,this.latest=T.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(t,e,r){t==="selected"&&r&&this.convertSelected(),super.attributeChangedCallback(t,e,r)}updated(t){super.updated(t),t.has("selected")&&this.convertSelected()}firstUpdated(t){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(t=>O(t)),this.range&&this.selected.length===2){const t=R({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let r=0;r<t.length;r++)e[y(t[r])]=this.isInRange(t[r]);this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const t=O(this.selected[this.selected.length-1]);this.currentmonth=isNaN(t.getTime())?new Date:t}else this.currentmonth===null&&(this.currentmonth=new Date);(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=new Date),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var s,i,c;if(((s=t.target)==null?void 0:s.nodeName)==="INPUT"||((i=t.target)==null?void 0:i.nodeName)==="SELECT"||((c=t.target)==null?void 0:c.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const r=this.focusedDate?D(this.focusedDate):x(this.year,this.month,1);let a=L(r,e);if(a){let l=this.querySelector(`div[data-date="${y(a)}"]`);if(l instanceof HTMLDivElement){if(l.dataset.disabled){a=L(a,e);let u=this.querySelector(`div[data-date="${y(a)}"]`);for(;u&&u instanceof HTMLDivElement&&u.dataset.disabled;)a=L(a,e),u=this.querySelector(`div[data-date="${y(a)}"]`);l=u}l instanceof HTMLDivElement&&!l.dataset.disabled&&(this.focusedDate=y(a),l.focus())}}}render(){return o.x`
|
|
1
|
+
"use strict";const lt=require("./class-map-BBG2gMX4.cjs"),o=require("./element-6DBpyGQm.cjs"),F=require("./state-DPobt-Yz.cjs");require("./icon-B_ryAy4Q.cjs");const et=6048e5,ut=864e5,j=Symbol.for("constructDateFrom");function S(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&j in n?n[j](t):n instanceof Date?new n.constructor(t):new Date(t)}function k(n,t){return S(t||n,n)}function L(n,t,e){const r=k(n,e==null?void 0:e.in);return isNaN(t)?S(n,NaN):(t&&r.setDate(r.getDate()+t),r)}let ht={};function I(){return ht}function A(n,t){var c,l,u,f;const e=I(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,a=k(n,t==null?void 0:t.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function H(n,t){return A(n,{...t,weekStartsOn:1})}function nt(n,t){const e=k(n,t==null?void 0:t.in),r=e.getFullYear(),a=S(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=H(a),i=S(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=H(i);return e.getTime()>=s.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function G(n){const t=k(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function rt(n,...t){const e=S.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function z(n,t){const e=k(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function dt(n,t,e){const[r,a]=rt(e==null?void 0:e.in,n,t),s=z(r),i=z(a),c=+s-G(s),l=+i-G(i);return Math.round((c-l)/ut)}function ft(n,t){const e=nt(n,t),r=S(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),H(r)}function mt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function gt(n){return!(!mt(n)&&typeof n!="number"||isNaN(+k(n)))}function yt(n,t){const e=k(n,t==null?void 0:t.in);return e.setHours(23,59,59,999),e}function pt(n,t){const[e,r]=rt(n,t.start,t.end);return{start:e,end:r}}function R(n,t){const{start:e,end:r}=pt(t==null?void 0:t.in,n);let a=+e>+r;const s=a?+e:+r,i=a?r:e;i.setHours(0,0,0,0);let c=1;const l=[];for(;+i<=s;)l.push(S(e,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return a?l.reverse():l}function wt(n,t){const e=k(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const bt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kt=(n,t,e)=>{let r;const a=bt[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function U(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Dt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},St={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mt={date:U({formats:Dt,defaultWidth:"full"}),time:U({formats:vt,defaultWidth:"full"}),dateTime:U({formats:St,defaultWidth:"full"})},xt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tt=(n,t,e,r)=>xt[n];function $(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=e!=null&&e.width?String(e.width):i;a=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[c]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(t):t;return a[s]}}const Pt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ot={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ct={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Nt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$t={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Et={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wt=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Yt={ordinalNumber:Wt,era:$({values:Pt,defaultWidth:"wide"}),quarter:$({values:Ot,defaultWidth:"wide",argumentCallback:n=>n-1}),month:$({values:Ct,defaultWidth:"wide"}),day:$({values:Nt,defaultWidth:"wide"}),dayPeriod:$({values:$t,defaultWidth:"wide",formattingValues:Et,defaultFormattingWidth:"wide"})};function E(n){return(t,e={})=>{const r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=t.match(a);if(!s)return null;const i=s[0],c=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Ft(c,p=>p.test(i)):At(c,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function At(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Ft(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function _t(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const a=r[0],s=t.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const c=t.slice(a.length);return{value:i,rest:c}}}const Ht=/^(\d+)(th|st|nd|rd)?/i,It=/\d+/i,qt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Lt={any:[/^b/i,/^(a|c)/i]},Rt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ut={any:[/1/i,/2/i,/3/i,/4/i]},Bt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Qt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vt={ordinalNumber:_t({matchPattern:Ht,parsePattern:It,valueCallback:n=>parseInt(n,10)}),era:E({matchPatterns:qt,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),quarter:E({matchPatterns:Rt,defaultMatchWidth:"wide",parsePatterns:Ut,defaultParseWidth:"any",valueCallback:n=>n+1}),month:E({matchPatterns:Bt,defaultMatchWidth:"wide",parsePatterns:zt,defaultParseWidth:"any"}),day:E({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),dayPeriod:E({matchPatterns:Gt,defaultMatchWidth:"any",parsePatterns:Xt,defaultParseWidth:"any"})},Jt={code:"en-US",formatDistance:kt,formatLong:Mt,formatRelative:Tt,localize:Yt,match:Vt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Kt(n,t){const e=k(n,t==null?void 0:t.in);return dt(e,wt(e))+1}function Zt(n,t){const e=k(n,t==null?void 0:t.in),r=+H(e)-+ft(e);return Math.round(r/et)+1}function at(n,t){var f,p,w,m;const e=k(n,t==null?void 0:t.in),r=e.getFullYear(),a=I(),s=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(w=a.locale)==null?void 0:w.options)==null?void 0:m.firstWeekContainsDate)??1,i=S((t==null?void 0:t.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=A(i,t),l=S((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=A(l,t);return+e>=+c?r+1:+e>=+u?r:r-1}function te(n,t){var c,l,u,f;const e=I(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=at(n,t),s=S((t==null?void 0:t.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),A(s,t)}function st(n,t){const e=k(n,t==null?void 0:t.in),r=+A(e,t)-+te(e,t);return Math.round(r/et)+1}function h(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const M={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return h(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):h(e+1,2)},d(n,t){return h(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return h(n.getHours()%12||12,t.length)},H(n,t){return h(n.getHours(),t.length)},m(n,t){return h(n.getMinutes(),t.length)},s(n,t){return h(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return h(a,t.length)}},C={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},X={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return M.y(n,t)},Y:function(n,t,e,r){const a=at(n,r),s=a>0?a:1-a;if(t==="YY"){const i=s%100;return h(i,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):h(s,t.length)},R:function(n,t){const e=nt(n);return h(e,t.length)},u:function(n,t){const e=n.getFullYear();return h(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return h(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return h(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return M.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return h(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const a=st(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):h(a,t.length)},I:function(n,t,e){const r=Zt(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):h(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):M.d(n,t)},D:function(n,t,e){const r=Kt(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):h(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return h(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return h(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return h(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return M.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):M.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):M.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):M.s(n,t)},S:function(n,t){return M.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return J(r);case"XXXX":case"XX":return P(r);case"XXXXX":case"XXX":default:return P(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return J(r);case"xxxx":case"xx":return P(r);case"xxxxx":case"xxx":default:return P(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+V(r,":");case"OOOO":default:return"GMT"+P(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+V(r,":");case"zzzz":default:return"GMT"+P(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return h(r,t.length)},T:function(n,t,e){return h(+n,t.length)}};function V(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?e+String(a):e+String(a)+t+h(s,2)}function J(n,t){return n%60===0?(n>0?"-":"+")+h(Math.abs(n)/60,2):P(n,t)}function P(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=h(Math.trunc(r/60),2),s=h(r%60,2);return e+a+t+s}const K=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},it=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ee=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return K(n,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",K(r,t)).replace("{{time}}",it(a,t))},ne={p:it,P:ee},re=/^D+$/,ae=/^Y+$/,se=["D","DD","YY","YYYY"];function ie(n){return re.test(n)}function oe(n){return ae.test(n)}function ce(n,t,e){const r=le(n,t,e);if(console.warn(r),se.includes(n))throw new RangeError(r)}function le(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ue=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,me=/[a-zA-Z]/;function ge(n,t,e){var f,p,w,m;const r=I(),a=r.locale??Jt,s=r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(w=r.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??0,c=k(n,e==null?void 0:e.in);if(!gt(c))throw new RangeError("Invalid time value");let l=t.match(he).map(g=>{const b=g[0];if(b==="p"||b==="P"){const q=ne[b];return q(g,a.formatLong)}return g}).join("").match(ue).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const b=g[0];if(b==="'")return{isToken:!1,value:ye(g)};if(X[b])return{isToken:!0,value:g};if(b.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(l=a.localize.preprocessor(c,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(g=>{if(!g.isToken)return g.value;const b=g.value;(oe(b)||ie(b))&&ce(b,t,String(n));const q=X[b[0]];return q(c,b,a.localize,u)}).join("")}function ye(n){const t=n.match(de);return t?t[1].replace(fe,"'"):n}function pe(n,t){const e=k(n,t==null?void 0:t.in).getDay();return e===0?7:e}const B={},W={};function Y(n,t){try{const r=(B[n]||(B[n]=new Intl.DateTimeFormat("en-GB",{timeZone:n,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in W?W[r]:Z(r,r.split(":"))}catch{if(n in W)return W[n];const e=n==null?void 0:n.match(we);return e?Z(n,e.slice(1)):NaN}}const we=/([+-]\d\d):?(\d\d)?/;function Z(n,t){const e=+t[0],r=+(t[1]||0);return W[n]=e>0?e*60+r:e*60-r}class v extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Y(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ot(this),Q(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new v(...e,t):new v(Date.now(),t)}withTimeZone(t){return new v(+this,t)}getTimezoneOffset(){return-Y(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Q(this),+this}[Symbol.for("constructDateFrom")](t){return new v(+new Date(t),this.timeZone)}}const tt=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!tt.test(n))return;const t=n.replace(tt,"$1UTC");v.prototype[t]&&(n.startsWith("get")?v.prototype[n]=function(){return this.internal[t]()}:(v.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),be(this),+this},v.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Q(this),+this}))});function Q(n){n.internal.setTime(+n),n.internal.setUTCMinutes(n.internal.getUTCMinutes()-n.getTimezoneOffset())}function be(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),ot(n)}function ot(n){const t=Y(n.timeZone,n),e=new Date(+n);e.setUTCHours(e.getUTCHours()-1);const r=-new Date(+n).getTimezoneOffset(),a=-new Date(+e).getTimezoneOffset(),s=r-a,i=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();s&&i&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+s);const c=r-t;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);const l=Y(n.timeZone,n),f=-new Date(+n).getTimezoneOffset()-l,p=l!==t,w=f-c;if(p&&w){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+w);const m=Y(n.timeZone,n),g=l-m;g&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+g))}}class N extends v{static tz(t,...e){return e.length?new N(...e,t):new N(Date.now(),t)}toISOString(){const[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${ke(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,r,a]}withTimeZone(t){return new N(+this,t)}[Symbol.for("constructDateFrom")](t){return new N(+new Date(t),this.timeZone)}}function ke(n,t){return new Intl.DateTimeFormat("en-GB",{timeZone:n,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const De=(n=window.pktTz)=>{const t=new N(new Date().toISOString(),n);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function O(n){if(!n||n==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(n)){const[t,e,r]=n.split("-").map(Number);return new Date(t,e-1,r)}if(/^\d{4}-\d{2}$/.test(n)){const[t,e]=n.split("-").map(Number);return new Date(t,e-1,1)}return/^\d{4}$/.test(n)?new Date(Number(n),0,1):new Date(n)}const y=n=>{if(!n||isNaN(n.getTime()))return"";const t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${t}-${e}-${r}`},ve=n=>{if(!n)return null;const t=O(n);return isNaN(t.getTime())?null:t},Se=(n,t)=>{const e=D(n);return isNaN(e.getTime())?"":ge(e,t)},D=(n="",t)=>{const e=typeof n=="string"?O(n):n;return!e||isNaN(e.getTime())?new Date:t?t==="end"?yt(e):z(e):e},x=(n,t,e=1)=>{if(typeof n!="number"||typeof t!="number"||typeof e!="number"||isNaN(n)||isNaN(t)||isNaN(e))return new Date;const r=new Date(n,t,e);return isNaN(r.getTime())?new Date:r},Me=n=>!n||isNaN(n.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(n),ct=n=>{if(Array.isArray(n))return n;if(typeof n=="string")return n.split(",")},xe=n=>n?O(n):null,Te=n=>{if(typeof n=="string")return n.split(",").map(t=>O(t));if(Array.isArray(n))return n.map(t=>O(t))},_={csvToArray:ct,stringToDate:xe,stringsToDate:Te},Pe={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},T={props:Pe};var Oe=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,d=(n,t,e,r)=>{for(var a=r>1?void 0:r?Ce(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=(r?i(t,e,a):i(a))||a);return r&&a&&Oe(t,e,a),a};exports.PktCalendar=class extends o.PktElement{constructor(){super(...arguments),this.multiple=T.props.multiple.default,this.maxMultiple=T.props.maxMultiple.default,this.range=T.props.range.default,this.weeknumbers=T.props.weeknumbers.default,this.withcontrols=T.props.withcontrols.default,this.selected=[],this.earliest=T.props.earliest.default,this.latest=T.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(t,e,r){t==="selected"&&r&&this.convertSelected(),super.attributeChangedCallback(t,e,r)}updated(t){super.updated(t),t.has("selected")&&this.convertSelected()}firstUpdated(t){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(t=>O(t)),this.range&&this.selected.length===2){const t=R({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let r=0;r<t.length;r++)e[y(t[r])]=this.isInRange(t[r]);this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const t=O(this.selected[this.selected.length-1]);this.currentmonth=isNaN(t.getTime())?new Date:t}else this.currentmonth===null&&(this.currentmonth=new Date);(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=new Date),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var s,i,c;if(((s=t.target)==null?void 0:s.nodeName)==="INPUT"||((i=t.target)==null?void 0:i.nodeName)==="SELECT"||((c=t.target)==null?void 0:c.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const r=this.focusedDate?D(this.focusedDate):x(this.year,this.month,1);let a=L(r,e);if(a){let l=this.querySelector(`div[data-date="${y(a)}"]`);if(l instanceof HTMLDivElement){if(l.dataset.disabled){a=L(a,e);let u=this.querySelector(`div[data-date="${y(a)}"]`);for(;u&&u instanceof HTMLDivElement&&u.dataset.disabled;)a=L(a,e),u=this.querySelector(`div[data-date="${y(a)}"]`);l=u}l instanceof HTMLDivElement&&!l.dataset.disabled&&(this.focusedDate=y(a),l.focus())}}}render(){return o.x`
|
|
2
2
|
<div
|
|
3
3
|
class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":o.E}"
|
|
4
4
|
@focusout=${this.closeEvent}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as ht } from "./class-map-
|
|
2
|
-
import { P as dt, E as I, x as k, n as m, a as ft } from "./element-
|
|
3
|
-
import { r as H } from "./state-
|
|
4
|
-
import "./icon-
|
|
1
|
+
import { e as ht } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { P as dt, E as I, x as k, n as m, a as ft } from "./element-CgEWt74-.js";
|
|
3
|
+
import { r as H } from "./state-Bo2bck5_.js";
|
|
4
|
+
import "./icon-CC1js8eR.js";
|
|
5
5
|
const at = 6048e5, mt = 864e5, V = Symbol.for("constructDateFrom");
|
|
6
6
|
function M(t, e) {
|
|
7
7
|
return typeof t == "function" ? t(e) : t && typeof t == "object" && V in t ? t[V](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./class-map-
|
|
1
|
+
"use strict";const l=require("./class-map-BBG2gMX4.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),t=require("./element-6DBpyGQm.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-iJtiv3o2.cjs");require("./icon-B_ryAy4Q.cjs");require("./tag-DPk3fpEg.cjs");const k={layout:{default:"vertical"},skin:{default:"outlined"},padding:{default:"default"}},h={props:k};var u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,e=(d,a,i,s)=>{for(var r=s>1?void 0:s?m(a,i):a,n=d.length-1,o;n>=0;n--)(o=d[n])&&(r=(s?o(a,i,r):o(r))||r);return s&&r&&u(a,i,r),r};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=h.props.layout.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=h.props.padding.default,this.skin=h.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new g.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var r,n;const a={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},i=((r=this.ariaLabel)==null?void 0:r.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),s=((n=this.ariaLabel)==null?void 0:n.trim())||(this.heading?this.heading:"kort");return t.x`
|
|
2
2
|
<article
|
|
3
3
|
class=${l.e(a)}
|
|
4
4
|
aria-label=${p.o(this.clickCardLink?i:s)}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e as g } from "./class-map-
|
|
2
|
-
import { o as c } from "./if-defined-
|
|
3
|
-
import { P as m, E as d, x as t, n as i, a as u } from "./element-
|
|
1
|
+
import { e as g } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { o as c } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import { P as m, E as d, x as t, n as i, a as u } from "./element-CgEWt74-.js";
|
|
4
4
|
import { P as $ } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
5
|
-
import { e as y, n as _ } from "./ref-
|
|
6
|
-
import "./icon-
|
|
7
|
-
import "./tag-
|
|
5
|
+
import { e as y, n as _ } from "./ref-BBYSqgeW.js";
|
|
6
|
+
import "./icon-CC1js8eR.js";
|
|
7
|
+
import "./tag-BWm6s48d.js";
|
|
8
8
|
const b = {
|
|
9
9
|
layout: {
|
|
10
10
|
default: "vertical"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-6DBpyGQm.cjs"),a=require("./input-element-CHjLWeKt.cjs"),k=require("./ref-iJtiv3o2.cjs"),o=require("./class-map-BBG2gMX4.cjs");var r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(l,t,s,h)=>{for(var i=h>1?void 0:h?u(t,s):t,n=l.length-1,p;n>=0;n--)(p=l[n])&&(i=(h?p(t,s,i):p(i))||i);return h&&i&&r(t,s,i),i};exports.PktCheckbox=class extends a.PktInputElement{constructor(){super(...arguments),this.inputRef=k.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.type="checkbox"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,s,h){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,s,h)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}render(){const t=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),s=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),h=o.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
2
|
<label class=${h} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as n, x as r, n as s, a as d } from "./element-
|
|
2
|
-
import { P as k } from "./input-element-
|
|
3
|
-
import { e as b, n as f } from "./ref-
|
|
4
|
-
import { e as u } from "./class-map-
|
|
1
|
+
import { E as n, x as r, n as s, a as d } from "./element-CgEWt74-.js";
|
|
2
|
+
import { P as k } from "./input-element-Cco4PA2M.js";
|
|
3
|
+
import { e as b, n as f } from "./ref-BBYSqgeW.js";
|
|
4
|
+
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
5
5
|
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (e, h, c, l) => {
|
|
6
6
|
for (var p = l > 1 ? void 0 : l ? y(h, c) : h, a = e.length - 1, o; a >= 0; a--)
|
|
7
7
|
(o = e[a]) && (p = (l ? o(h, c, p) : o(p)) || p);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./element-
|
|
1
|
+
"use strict";const a=require("./element-6DBpyGQm.cjs"),r=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./element-
|
|
1
|
+
"use strict";const a=require("./element-6DBpyGQm.cjs"),c=require("./if-defined-Cni-RHLS.cjs"),d=require("./state-DPobt-Yz.cjs"),r=require("./ref-iJtiv3o2.cjs"),O=require("./class-map-BBG2gMX4.cjs"),I=require("./repeat-CDsZqct8.cjs"),$=require("./input-element-CHjLWeKt.cjs"),y=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BxZf8wEP.cjs");require("./icon-B_ryAy4Q.cjs");require("./tag-DPk3fpEg.cjs");require("./listbox-C4supLfR.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(b,e,t,i)=>{for(var s=i>1?void 0:i?S(e,t):e,l=b.length-1,n;l>=0;l--)(n=b[l])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&V(e,t,s),s};exports.PktCombobox=class extends $.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new y.PktOptionsSlotController(this),this.slotController=new w.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){var e;if(super.connectedCallback(),document&&document.body.addEventListener("click",t=>{this._isOptionsOpen&&!this.contains(t.target)&&this.handleFocusOut(t)}),this._options=[],this.defaultOptions&&this.defaultOptions.length){const t=((e=this.options)==null?void 0:e.filter(i=>i.userAdded))||[];this.options=[...t,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=[...this.options]}if(this.optionsController.nodes.length){const t=[];this.optionsController.nodes.forEach(i=>{if(!i.textContent&&!i.getAttribute("value"))return null;const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||""};i.getAttribute("data-prefix")&&(s.prefix=i.getAttribute("data-prefix")||void 0),i.getAttribute("tagskincolor")&&(s.tagSkinColor=i.getAttribute("tagskincolor")),i.getAttribute("description")&&(s.description=i.getAttribute("description")||void 0),s.fulltext=s.value+s.label+(s.prefix||""),t.push(s)}),t.length&&(this.options=[...t],this._options=[...t])}}updated(e){var t;if(e.has("_value")&&this.valueChanged(this._value,e.get("_value")),e.has("value")&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),e.has("defaultOptions")&&this.defaultOptions.length){const i=((t=this.options)==null?void 0:t.filter(s=>s.userAdded))||[];this.options=[...i,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=[...this.options]}if(e.has("options")&&this.options.length){const s=this._options.filter(l=>l.userAdded).filter(l=>!this.options.some(n=>n.value===l.value));this._options=[...s,...this.options],this._options.forEach(l=>{if(l.value&&!l.label&&(l.label=l.value),l.selected&&!this._value.includes(l.value)){const n=[...this._value];this._value=[...this._value,l.value],this.valueChanged(this._value,n)}l.fulltext=l.value+l.label+(l.prefix||""),l.selected=l.selected||this._value.includes(l.value)})}e.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(e)}attributeChangedCallback(e,t,i){e==="value"&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),e==="options"&&(this._options=this.options,this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(e,t,i)}render(){return a.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helptext=${this.helptext}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { E as y, x as d, n as r, a as k } from "./element-
|
|
2
|
-
import { o as f } from "./if-defined-
|
|
3
|
-
import { r as c } from "./state-
|
|
4
|
-
import { e as _, n as v } from "./ref-
|
|
5
|
-
import { e as w } from "./class-map-
|
|
6
|
-
import { c as R } from "./repeat-
|
|
7
|
-
import { P as V } from "./input-element-
|
|
1
|
+
import { E as y, x as d, n as r, a as k } from "./element-CgEWt74-.js";
|
|
2
|
+
import { o as f } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import { r as c } from "./state-Bo2bck5_.js";
|
|
4
|
+
import { e as _, n as v } from "./ref-BBYSqgeW.js";
|
|
5
|
+
import { e as w } from "./class-map-BpTj9gtz.js";
|
|
6
|
+
import { c as R } from "./repeat-C8BeHwYx.js";
|
|
7
|
+
import { P as V } from "./input-element-Cco4PA2M.js";
|
|
8
8
|
import { P as S } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
9
9
|
import { P as C } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
11
|
-
import "./icon-
|
|
12
|
-
import "./tag-
|
|
13
|
-
import "./listbox-
|
|
10
|
+
import "./input-wrapper-gz7ppKrK.js";
|
|
11
|
+
import "./icon-CC1js8eR.js";
|
|
12
|
+
import "./tag-BWm6s48d.js";
|
|
13
|
+
import "./listbox-CLsSW32I.js";
|
|
14
14
|
const A = {
|
|
15
15
|
displayValueAs: {
|
|
16
16
|
default: "label"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as p, x as c, n as a, a as g } from "./element-
|
|
2
|
-
import "./button-
|
|
3
|
-
import "./icon-
|
|
1
|
+
import { P as p, x as c, n as a, a as g } from "./element-CgEWt74-.js";
|
|
2
|
+
import "./button-DrrEvUy9.js";
|
|
3
|
+
import "./icon-CC1js8eR.js";
|
|
4
4
|
const u = {
|
|
5
5
|
i18n: {
|
|
6
6
|
nb: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./element-
|
|
1
|
+
"use strict";const o=require("./element-6DBpyGQm.cjs");require("./button-CDocR7iN.cjs");require("./icon-B_ryAy4Q.cjs");const k={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(r,e,t,n)=>{for(var i=n>1?void 0:n?p(e,t):e,a=r.length-1,l;a>=0;a--)(l=r[a])&&(i=(n?l(e,t,i):l(i))||i);return n&&i&&d(e,t,i),i};let c=null;function u(){return c||(c=new Promise((r,e)=>{if(document.querySelector("#oslo-consent-script")){r();return}const t=document.createElement("script");t.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",t.id="oslo-consent-script",t.onload=()=>r(),t.onerror=e,document.head.appendChild(t);const n=document.createElement("link");n.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",n.type="text/css",n.rel="stylesheet",n.id="oslo-consent-styles",document.head.appendChild(n)}),c)}exports.PktConsent=class extends o.PktElement{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||k.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var e;super.disconnectedCallback(),this._cookieEventHandler&&((e=window.__cookieEvents)==null||e.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(e){let t;try{t=JSON.parse(e)}catch{t=e}return t}emitCookieConsents(e){const n=this.returnJsonOrObject(e.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:n,bubbles:!0,cancelable:!1}))}async firstUpdated(e){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await u(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(e=>{if(e){const n={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(n),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(e){var t;e.preventDefault(),(t=window.cookieBanner)!=null&&t.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?o.x`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?o.x`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
|
|
2
2
|
<pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
|
|
3
3
|
${this.triggerText}
|
|
4
4
|
</a>`:this.triggerType==="icon"?o.x`<pkt-button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-
|
|
1
|
+
"use strict";const d=require("./class-map-BBG2gMX4.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),s=require("./element-6DBpyGQm.cjs"),m=require("./state-DPobt-Yz.cjs"),h=require("./calendar-BZe2D4Sr.cjs"),k=require("./input-element-CHjLWeKt.cjs"),r=require("./ref-iJtiv3o2.cjs"),v=require("./repeat-CDsZqct8.cjs");require("./icon-B_ryAy4Q.cjs");require("./input-wrapper-BxZf8wEP.cjs");require("./tag-DPk3fpEg.cjs");const $=require("./pkt-slot-controller-BzddBp7z.cjs"),y={dateformat:{default:"dd.MM.yyyy"},min:{default:null},max:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},o={props:y};var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var a=i>1?void 0:i?x(t,e):t,n=c.length-1,u;n>=0;n--)(u=c[n])&&(a=(i?u(t,e,a):u(a))||a);return i&&a&&b(t,e,a),a};const g=c=>new Promise(t=>setTimeout(t,c));exports.PktDatepicker=class extends k.PktInputElement{constructor(){super(),this.value="",this._value=this.value?Array.isArray(this.value)?this.value:this.value.split(","):[],this.label="Datovelger",this.dateformat=o.props.dateformat.default,this.multiple=o.props.multiple.default,this.maxlength=null,this.range=o.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=o.props.weeknumbers.default,this.withcontrols=o.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.buttonClasses={},this.inputRef=r.e(),this.inputRefTo=r.e(),this.btnRef=r.e(),this.calRef=r.e(),this.popupRef=r.e(),this.helptextSlot=r.e(),this.addToSelected=t=>{const e=t.target;if(!e.value)return;const i=this.min?h.newDate(this.min):null,a=this.max?h.newDate(this.max):null,n=h.newDate(e.value.split(",")[0]);n&&!isNaN(n.getTime())&&(!i||n>=i)&&(!a||n<=a)&&this.calRef.value&&this.calRef.value.handleDateSelect(n),e.value=""},this.slotController=new $.PktSlotController(this,this.helptextSlot)}async connectedCallback(){super.connectedCallback();const t=navigator.userAgent,e=/iP(hone|od|ad)/.test(t);this.inputType=e?"text":"date",document&&document.body.addEventListener("click",i=>{var a,n;(a=this.inputRef)!=null&&a.value&&((n=this.btnRef)!=null&&n.value)&&!this.inputRef.value.contains(i.target)&&!(this.inputRefTo.value&&this.inputRefTo.value.contains(i.target))&&!this.btnRef.value.contains(i.target)&&!i.target.closest(".pkt-calendar-popup")&&this.calendarOpen&&(this.onBlur(),this.hideCalendar())}),this.value.length&&this._value.length===0&&(this._value=Array.isArray(this.value)?this.value:this.value.split(",")),this.min=this.min||o.props.min.default,this.max=this.max||o.props.max.default,typeof this.excludedates=="string"&&(this.excludedates=this.excludedates.split(",")),typeof this.excludeweekdays=="string"&&(this.excludeweekdays=this.excludeweekdays.split(",")),(this.multiple||this.range)&&this.name&&!this.name.endsWith("[]")&&(this.name=this.name+"[]"),this.calendarOpen&&(await g(20),this.handleCalendarPosition())}disconnectedCallback(){super.disconnectedCallback(),document&&document.body.removeEventListener("click",t=>{var e,i;(e=this.inputRef)!=null&&e.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(t.target)&&!this.btnRef.value.contains(t.target)&&this.hideCalendar()})}attributeChangedCallback(t,e,i){if(t==="value"){if(this.range&&(i==null?void 0:i.split(",").length)===1)return;this.value!==e&&this.valueChanged(i,e)}t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=(i==null?void 0:i.split(","))??[]),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=(i==null?void 0:i.split(","))??[]),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){if(this.range&&this.value.length===1)return;this.valueChanged(this.value,t.get("value"))}super.updated(t)}renderInput(){return s.x`
|
|
2
2
|
<input
|
|
3
3
|
class="${d.e(this.inputClasses)}"
|
|
4
4
|
.type=${this.inputType}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { e as f } from "./class-map-
|
|
2
|
-
import { o } from "./if-defined-
|
|
3
|
-
import { x as u, E as g, n as r, a as w } from "./element-
|
|
4
|
-
import { r as k } from "./state-
|
|
5
|
-
import { n as v, f as $, a as R, b as y, d as x } from "./calendar-
|
|
6
|
-
import { P as C } from "./input-element-
|
|
7
|
-
import { e as m, n as p } from "./ref-
|
|
8
|
-
import { c as T } from "./repeat-
|
|
9
|
-
import "./icon-
|
|
10
|
-
import "./input-wrapper-
|
|
11
|
-
import "./tag-
|
|
1
|
+
import { e as f } from "./class-map-BpTj9gtz.js";
|
|
2
|
+
import { o } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import { x as u, E as g, n as r, a as w } from "./element-CgEWt74-.js";
|
|
4
|
+
import { r as k } from "./state-Bo2bck5_.js";
|
|
5
|
+
import { n as v, f as $, a as R, b as y, d as x } from "./calendar-DevQhOup.js";
|
|
6
|
+
import { P as C } from "./input-element-Cco4PA2M.js";
|
|
7
|
+
import { e as m, n as p } from "./ref-BBYSqgeW.js";
|
|
8
|
+
import { c as T } from "./repeat-C8BeHwYx.js";
|
|
9
|
+
import "./icon-CC1js8eR.js";
|
|
10
|
+
import "./input-wrapper-gz7ppKrK.js";
|
|
11
|
+
import "./tag-BWm6s48d.js";
|
|
12
12
|
import { P as _ } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
13
13
|
const S = {
|
|
14
14
|
dateformat: {
|