@oslokommune/punkt-react 13.4.0 → 13.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/punkt-react.es.js +130 -130
- package/dist/punkt-react.umd.js +27 -27
- package/package.json +3 -3
package/dist/punkt-react.es.js
CHANGED
|
@@ -22355,7 +22355,120 @@ $v([
|
|
|
22355
22355
|
dh = $v([
|
|
22356
22356
|
fr("pkt-icon")
|
|
22357
22357
|
], dh);
|
|
22358
|
-
|
|
22358
|
+
/**
|
|
22359
|
+
* @license
|
|
22360
|
+
* Copyright 2018 Google LLC
|
|
22361
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22362
|
+
*/
|
|
22363
|
+
const Zt = (e) => e ?? Ye;
|
|
22364
|
+
var t8 = Object.defineProperty, n8 = Object.getOwnPropertyDescriptor, Jo = (e, t, a, o) => {
|
|
22365
|
+
for (var u = o > 1 ? void 0 : o ? n8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22366
|
+
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22367
|
+
return o && u && t8(t, a, u), u;
|
|
22368
|
+
};
|
|
22369
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.4/animations/";
|
|
22370
|
+
let vo = class extends ka {
|
|
22371
|
+
constructor() {
|
|
22372
|
+
super(), this.defaultSlot = gn(), 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 ni(this, this.defaultSlot);
|
|
22373
|
+
}
|
|
22374
|
+
// Lifecycle
|
|
22375
|
+
connectedCallback() {
|
|
22376
|
+
super.connectedCallback(), this.addEventListener(
|
|
22377
|
+
"click",
|
|
22378
|
+
(t) => {
|
|
22379
|
+
(this.disabled || this.hasAttribute("disabled") || this.isLoading) && (t.preventDefault(), t.stopImmediatePropagation());
|
|
22380
|
+
},
|
|
22381
|
+
!0
|
|
22382
|
+
), this.addEventListener(
|
|
22383
|
+
"keydown",
|
|
22384
|
+
(t) => {
|
|
22385
|
+
(this.disabled || this.hasAttribute("disabled") || this.isLoading) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopImmediatePropagation());
|
|
22386
|
+
},
|
|
22387
|
+
!0
|
|
22388
|
+
);
|
|
22389
|
+
}
|
|
22390
|
+
attributeChangedCallback(t, a, o) {
|
|
22391
|
+
super.attributeChangedCallback(t, a, o), t === "disabled" && o === "false" && (this.disabled = !1), (t === "isloading" || t === "isLoading") && o === "false" && (this.isLoading = !1);
|
|
22392
|
+
}
|
|
22393
|
+
firstUpdated(t) {
|
|
22394
|
+
super.firstUpdated(t), this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1);
|
|
22395
|
+
}
|
|
22396
|
+
// Render
|
|
22397
|
+
render() {
|
|
22398
|
+
const t = this.form ?? this.getAttribute("form") ?? void 0, a = {
|
|
22399
|
+
"pkt-btn": !0,
|
|
22400
|
+
[`pkt-btn--${this.size}`]: !!this.size,
|
|
22401
|
+
[`pkt-btn--${this.skin}`]: !!this.skin,
|
|
22402
|
+
[`pkt-btn--${this.variant}`]: !!this.variant,
|
|
22403
|
+
[`pkt-btn--${this.color}`]: !!this.color,
|
|
22404
|
+
[`pkt-btn--${this.state}`]: !!this.state,
|
|
22405
|
+
"pkt-btn--disabled": !!this.disabled,
|
|
22406
|
+
"pkt-btn--isLoading": !!this.isLoading
|
|
22407
|
+
};
|
|
22408
|
+
return ke`
|
|
22409
|
+
<button
|
|
22410
|
+
class=${Qt(a)}
|
|
22411
|
+
type=${this.type}
|
|
22412
|
+
?disabled=${!!this.disabled}
|
|
22413
|
+
aria-busy=${Zt(this.isLoading ? "true" : void 0)}
|
|
22414
|
+
aria-disabled=${Zt(this.disabled || this.isLoading ? "true" : void 0)}
|
|
22415
|
+
form=${Zt(t)}
|
|
22416
|
+
>
|
|
22417
|
+
${this.isLoading ? ke`<pkt-icon
|
|
22418
|
+
class="pkt-btn__icon pkt-btn__spinner"
|
|
22419
|
+
name="spinner-blue"
|
|
22420
|
+
path=${Zt(this.loadingAnimationPath)}
|
|
22421
|
+
></pkt-icon>` : Ye}
|
|
22422
|
+
${this.variant !== "label-only" ? ke`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>` : Ye}
|
|
22423
|
+
<span class="pkt-btn__text" ${dn(this.defaultSlot)}></span>
|
|
22424
|
+
${this.variant === "icons-right-and-left" ? ke`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>` : Ye}
|
|
22425
|
+
</button>
|
|
22426
|
+
`;
|
|
22427
|
+
}
|
|
22428
|
+
};
|
|
22429
|
+
Jo([
|
|
22430
|
+
G({ type: String })
|
|
22431
|
+
], vo.prototype, "iconName", 2);
|
|
22432
|
+
Jo([
|
|
22433
|
+
G({ type: String })
|
|
22434
|
+
], vo.prototype, "secondIconName", 2);
|
|
22435
|
+
Jo([
|
|
22436
|
+
G({ type: String })
|
|
22437
|
+
], vo.prototype, "mode", 2);
|
|
22438
|
+
Jo([
|
|
22439
|
+
G({ type: String })
|
|
22440
|
+
], vo.prototype, "size", 2);
|
|
22441
|
+
Jo([
|
|
22442
|
+
G({ type: String })
|
|
22443
|
+
], vo.prototype, "color", 2);
|
|
22444
|
+
Jo([
|
|
22445
|
+
G({ type: String })
|
|
22446
|
+
], vo.prototype, "skin", 2);
|
|
22447
|
+
Jo([
|
|
22448
|
+
G({ type: String })
|
|
22449
|
+
], vo.prototype, "variant", 2);
|
|
22450
|
+
Jo([
|
|
22451
|
+
G({ type: String, reflect: !0 })
|
|
22452
|
+
], vo.prototype, "state", 2);
|
|
22453
|
+
Jo([
|
|
22454
|
+
G({ type: String, reflect: !0 })
|
|
22455
|
+
], vo.prototype, "type", 2);
|
|
22456
|
+
Jo([
|
|
22457
|
+
G({ type: String })
|
|
22458
|
+
], vo.prototype, "form", 2);
|
|
22459
|
+
Jo([
|
|
22460
|
+
G({ type: Boolean, reflect: !0 })
|
|
22461
|
+
], vo.prototype, "isLoading", 2);
|
|
22462
|
+
Jo([
|
|
22463
|
+
G({ type: Boolean, reflect: !0 })
|
|
22464
|
+
], vo.prototype, "disabled", 2);
|
|
22465
|
+
Jo([
|
|
22466
|
+
G({ type: String })
|
|
22467
|
+
], vo.prototype, "loadingAnimationPath", 2);
|
|
22468
|
+
vo = Jo([
|
|
22469
|
+
fr("pkt-button")
|
|
22470
|
+
], vo);
|
|
22471
|
+
const r8 = {
|
|
22359
22472
|
skin: {
|
|
22360
22473
|
default: "info"
|
|
22361
22474
|
},
|
|
@@ -22369,12 +22482,12 @@ const t8 = {
|
|
|
22369
22482
|
default: !1
|
|
22370
22483
|
}
|
|
22371
22484
|
}, lS = {
|
|
22372
|
-
props:
|
|
22485
|
+
props: r8
|
|
22373
22486
|
};
|
|
22374
|
-
var
|
|
22375
|
-
for (var u = o > 1 ? void 0 : o ?
|
|
22487
|
+
var a8 = Object.defineProperty, i8 = Object.getOwnPropertyDescriptor, pc = (e, t, a, o) => {
|
|
22488
|
+
for (var u = o > 1 ? void 0 : o ? i8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22376
22489
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22377
|
-
return o && u &&
|
|
22490
|
+
return o && u && a8(t, a, u), u;
|
|
22378
22491
|
};
|
|
22379
22492
|
let pl = class extends ka {
|
|
22380
22493
|
constructor() {
|
|
@@ -22472,16 +22585,10 @@ pc([
|
|
|
22472
22585
|
pl = pc([
|
|
22473
22586
|
fr("pkt-alert")
|
|
22474
22587
|
], pl);
|
|
22475
|
-
|
|
22476
|
-
|
|
22477
|
-
* Copyright 2018 Google LLC
|
|
22478
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22479
|
-
*/
|
|
22480
|
-
const Zt = (e) => e ?? Ye;
|
|
22481
|
-
var a8 = Object.defineProperty, i8 = Object.getOwnPropertyDescriptor, Bv = (e, t, a, o) => {
|
|
22482
|
-
for (var u = o > 1 ? void 0 : o ? i8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22588
|
+
var o8 = Object.defineProperty, s8 = Object.getOwnPropertyDescriptor, Bv = (e, t, a, o) => {
|
|
22589
|
+
for (var u = o > 1 ? void 0 : o ? s8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22483
22590
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22484
|
-
return o && u &&
|
|
22591
|
+
return o && u && o8(t, a, u), u;
|
|
22485
22592
|
};
|
|
22486
22593
|
let um = class extends im {
|
|
22487
22594
|
constructor() {
|
|
@@ -22539,10 +22646,10 @@ Bv([
|
|
|
22539
22646
|
um = Bv([
|
|
22540
22647
|
fr("pkt-accordion")
|
|
22541
22648
|
], um);
|
|
22542
|
-
var
|
|
22543
|
-
for (var u = o > 1 ? void 0 : o ?
|
|
22649
|
+
var l8 = Object.defineProperty, u8 = Object.getOwnPropertyDescriptor, mh = (e, t, a, o) => {
|
|
22650
|
+
for (var u = o > 1 ? void 0 : o ? u8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22544
22651
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22545
|
-
return o && u &&
|
|
22652
|
+
return o && u && l8(t, a, u), u;
|
|
22546
22653
|
};
|
|
22547
22654
|
let Dp = class extends ka {
|
|
22548
22655
|
constructor() {
|
|
@@ -22605,10 +22712,10 @@ mh([
|
|
|
22605
22712
|
Dp = mh([
|
|
22606
22713
|
fr("pkt-accordion-item")
|
|
22607
22714
|
], Dp);
|
|
22608
|
-
var
|
|
22609
|
-
for (var u = o > 1 ? void 0 : o ?
|
|
22715
|
+
var c8 = Object.defineProperty, d8 = Object.getOwnPropertyDescriptor, zS = (e, t, a, o) => {
|
|
22716
|
+
for (var u = o > 1 ? void 0 : o ? d8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22610
22717
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22611
|
-
return o && u &&
|
|
22718
|
+
return o && u && c8(t, a, u), u;
|
|
22612
22719
|
};
|
|
22613
22720
|
let cm = class extends ka {
|
|
22614
22721
|
constructor() {
|
|
@@ -22635,124 +22742,17 @@ let cm = class extends ka {
|
|
|
22635
22742
|
}
|
|
22636
22743
|
};
|
|
22637
22744
|
zS([
|
|
22638
|
-
G({ type: String
|
|
22745
|
+
G({ type: String })
|
|
22639
22746
|
], cm.prototype, "href", 2);
|
|
22640
22747
|
zS([
|
|
22641
|
-
G({ type: String
|
|
22748
|
+
G({ type: String })
|
|
22642
22749
|
], cm.prototype, "text", 2);
|
|
22643
22750
|
zS([
|
|
22644
|
-
G({ type: String
|
|
22751
|
+
G({ type: String })
|
|
22645
22752
|
], cm.prototype, "ariaLabel", 2);
|
|
22646
22753
|
cm = zS([
|
|
22647
22754
|
fr("pkt-backlink")
|
|
22648
22755
|
], cm);
|
|
22649
|
-
var c8 = Object.defineProperty, d8 = Object.getOwnPropertyDescriptor, Jo = (e, t, a, o) => {
|
|
22650
|
-
for (var u = o > 1 ? void 0 : o ? d8(t, a) : t, d = e.length - 1, f; d >= 0; d--)
|
|
22651
|
-
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22652
|
-
return o && u && c8(t, a, u), u;
|
|
22653
|
-
};
|
|
22654
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.4/animations/";
|
|
22655
|
-
let vo = class extends ka {
|
|
22656
|
-
constructor() {
|
|
22657
|
-
super(), this.defaultSlot = gn(), 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 ni(this, this.defaultSlot);
|
|
22658
|
-
}
|
|
22659
|
-
// Lifecycle
|
|
22660
|
-
connectedCallback() {
|
|
22661
|
-
super.connectedCallback(), this.addEventListener(
|
|
22662
|
-
"click",
|
|
22663
|
-
(t) => {
|
|
22664
|
-
(this.disabled || this.hasAttribute("disabled") || this.isLoading) && (t.preventDefault(), t.stopImmediatePropagation());
|
|
22665
|
-
},
|
|
22666
|
-
!0
|
|
22667
|
-
), this.addEventListener(
|
|
22668
|
-
"keydown",
|
|
22669
|
-
(t) => {
|
|
22670
|
-
(this.disabled || this.hasAttribute("disabled") || this.isLoading) && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopImmediatePropagation());
|
|
22671
|
-
},
|
|
22672
|
-
!0
|
|
22673
|
-
);
|
|
22674
|
-
}
|
|
22675
|
-
attributeChangedCallback(t, a, o) {
|
|
22676
|
-
super.attributeChangedCallback(t, a, o), t === "disabled" && o === "false" && (this.disabled = !1), (t === "isloading" || t === "isLoading") && o === "false" && (this.isLoading = !1);
|
|
22677
|
-
}
|
|
22678
|
-
firstUpdated(t) {
|
|
22679
|
-
super.firstUpdated(t), this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1);
|
|
22680
|
-
}
|
|
22681
|
-
// Render
|
|
22682
|
-
render() {
|
|
22683
|
-
const t = this.form ?? this.getAttribute("form") ?? void 0, a = {
|
|
22684
|
-
"pkt-btn": !0,
|
|
22685
|
-
[`pkt-btn--${this.size}`]: !!this.size,
|
|
22686
|
-
[`pkt-btn--${this.skin}`]: !!this.skin,
|
|
22687
|
-
[`pkt-btn--${this.variant}`]: !!this.variant,
|
|
22688
|
-
[`pkt-btn--${this.color}`]: !!this.color,
|
|
22689
|
-
[`pkt-btn--${this.state}`]: !!this.state,
|
|
22690
|
-
"pkt-btn--disabled": !!this.disabled,
|
|
22691
|
-
"pkt-btn--isLoading": !!this.isLoading
|
|
22692
|
-
};
|
|
22693
|
-
return ke`
|
|
22694
|
-
<button
|
|
22695
|
-
class=${Qt(a)}
|
|
22696
|
-
type=${this.type}
|
|
22697
|
-
?disabled=${!!this.disabled}
|
|
22698
|
-
aria-busy=${Zt(this.isLoading ? "true" : void 0)}
|
|
22699
|
-
aria-disabled=${Zt(this.disabled || this.isLoading ? "true" : void 0)}
|
|
22700
|
-
form=${Zt(t)}
|
|
22701
|
-
>
|
|
22702
|
-
${this.isLoading ? ke`<pkt-icon
|
|
22703
|
-
class="pkt-btn__icon pkt-btn__spinner"
|
|
22704
|
-
name="spinner-blue"
|
|
22705
|
-
path=${Zt(this.loadingAnimationPath)}
|
|
22706
|
-
></pkt-icon>` : Ye}
|
|
22707
|
-
${this.variant !== "label-only" ? ke`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>` : Ye}
|
|
22708
|
-
<span class="pkt-btn__text" ${dn(this.defaultSlot)}></span>
|
|
22709
|
-
${this.variant === "icons-right-and-left" ? ke`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>` : Ye}
|
|
22710
|
-
</button>
|
|
22711
|
-
`;
|
|
22712
|
-
}
|
|
22713
|
-
};
|
|
22714
|
-
Jo([
|
|
22715
|
-
G({ type: String })
|
|
22716
|
-
], vo.prototype, "iconName", 2);
|
|
22717
|
-
Jo([
|
|
22718
|
-
G({ type: String })
|
|
22719
|
-
], vo.prototype, "secondIconName", 2);
|
|
22720
|
-
Jo([
|
|
22721
|
-
G({ type: String })
|
|
22722
|
-
], vo.prototype, "mode", 2);
|
|
22723
|
-
Jo([
|
|
22724
|
-
G({ type: String })
|
|
22725
|
-
], vo.prototype, "size", 2);
|
|
22726
|
-
Jo([
|
|
22727
|
-
G({ type: String })
|
|
22728
|
-
], vo.prototype, "color", 2);
|
|
22729
|
-
Jo([
|
|
22730
|
-
G({ type: String })
|
|
22731
|
-
], vo.prototype, "skin", 2);
|
|
22732
|
-
Jo([
|
|
22733
|
-
G({ type: String })
|
|
22734
|
-
], vo.prototype, "variant", 2);
|
|
22735
|
-
Jo([
|
|
22736
|
-
G({ type: String, reflect: !0 })
|
|
22737
|
-
], vo.prototype, "state", 2);
|
|
22738
|
-
Jo([
|
|
22739
|
-
G({ type: String, reflect: !0 })
|
|
22740
|
-
], vo.prototype, "type", 2);
|
|
22741
|
-
Jo([
|
|
22742
|
-
G({ type: String })
|
|
22743
|
-
], vo.prototype, "form", 2);
|
|
22744
|
-
Jo([
|
|
22745
|
-
G({ type: Boolean, reflect: !0 })
|
|
22746
|
-
], vo.prototype, "isLoading", 2);
|
|
22747
|
-
Jo([
|
|
22748
|
-
G({ type: Boolean, reflect: !0 })
|
|
22749
|
-
], vo.prototype, "disabled", 2);
|
|
22750
|
-
Jo([
|
|
22751
|
-
G({ type: String })
|
|
22752
|
-
], vo.prototype, "loadingAnimationPath", 2);
|
|
22753
|
-
vo = Jo([
|
|
22754
|
-
fr("pkt-button")
|
|
22755
|
-
], vo);
|
|
22756
22756
|
const aU = 6048e5, p8 = 864e5, vO = Symbol.for("constructDateFrom");
|
|
22757
22757
|
function dc(e, t) {
|
|
22758
22758
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && vO in e ? e[vO](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -335,7 +335,29 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
335
335
|
* @license
|
|
336
336
|
* Copyright 2017 Google LLC
|
|
337
337
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
338
|
-
*/let Dk=class extends py{};Dk.directiveName="unsafeSVG",Dk.resultType=2;const d2=$p(Dk);var wz=Object.defineProperty,_z=Object.getOwnPropertyDescriptor,Um=(e,t,a,o)=>{for(var u=o>1?void 0:o?_z(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&wz(t,a,u),u};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/13.4/icons/";const Cz=e=>new Promise(t=>setTimeout(t,e)),hy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Tk={},Dz=async(e,t)=>{let a=0;for(;Tk[t+e+".svg"]==="fetching"&&(a++,!(a>50));)await Cz(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.pktFetch=="function"?(Tk[t+e+".svg"]="fetching",Promise.resolve(window.pktFetch(t+e+".svg").then(o=>o.ok?o.text():(console.error("Missing icon: "+t+e+".svg"),hy)).then(o=>(o!==hy&&localStorage.setItem(t+e+".svg",o),Tk[t+e+".svg"]="fetched",o)))):Promise.resolve(hy)};let Up=class extends pa{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=d2(hy),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=d2(await Dz(this.name||"",this.path).then(a=>a)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return Se`${this.name&&this.icon}`}};Um([G({type:String,reflect:!1})],Up.prototype,"path",2),Um([G({type:String,reflect:!0})],Up.prototype,"name",2),Um([G({type:SVGElement})],Up.prototype,"icon",2),Um([G({type:Array,noAccessor:!0})],Up.prototype,"_updatedProps",2),Up=Um([hr("pkt-icon")],Up)
|
|
338
|
+
*/let Dk=class extends py{};Dk.directiveName="unsafeSVG",Dk.resultType=2;const d2=$p(Dk);var wz=Object.defineProperty,_z=Object.getOwnPropertyDescriptor,Um=(e,t,a,o)=>{for(var u=o>1?void 0:o?_z(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&wz(t,a,u),u};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/13.4/icons/";const Cz=e=>new Promise(t=>setTimeout(t,e)),hy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Tk={},Dz=async(e,t)=>{let a=0;for(;Tk[t+e+".svg"]==="fetching"&&(a++,!(a>50));)await Cz(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.pktFetch=="function"?(Tk[t+e+".svg"]="fetching",Promise.resolve(window.pktFetch(t+e+".svg").then(o=>o.ok?o.text():(console.error("Missing icon: "+t+e+".svg"),hy)).then(o=>(o!==hy&&localStorage.setItem(t+e+".svg",o),Tk[t+e+".svg"]="fetched",o)))):Promise.resolve(hy)};let Up=class extends pa{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=d2(hy),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=d2(await Dz(this.name||"",this.path).then(a=>a)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return Se`${this.name&&this.icon}`}};Um([G({type:String,reflect:!1})],Up.prototype,"path",2),Um([G({type:String,reflect:!0})],Up.prototype,"name",2),Um([G({type:SVGElement})],Up.prototype,"icon",2),Um([G({type:Array,noAccessor:!0})],Up.prototype,"_updatedProps",2),Up=Um([hr("pkt-icon")],Up);/**
|
|
339
|
+
* @license
|
|
340
|
+
* Copyright 2018 Google LLC
|
|
341
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
342
|
+
*/const Zt=e=>e??Ke;var Tz=Object.defineProperty,Az=Object.getOwnPropertyDescriptor,wo=(e,t,a,o)=>{for(var u=o>1?void 0:o?Az(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Tz(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.4/animations/";let Xi=class extends pa{constructor(){super(),this.defaultSlot=gn(),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 za(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),t==="disabled"&&o==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&o==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,a={"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 Se`
|
|
343
|
+
<button
|
|
344
|
+
class=${en(a)}
|
|
345
|
+
type=${this.type}
|
|
346
|
+
?disabled=${!!this.disabled}
|
|
347
|
+
aria-busy=${Zt(this.isLoading?"true":void 0)}
|
|
348
|
+
aria-disabled=${Zt(this.disabled||this.isLoading?"true":void 0)}
|
|
349
|
+
form=${Zt(t)}
|
|
350
|
+
>
|
|
351
|
+
${this.isLoading?Se`<pkt-icon
|
|
352
|
+
class="pkt-btn__icon pkt-btn__spinner"
|
|
353
|
+
name="spinner-blue"
|
|
354
|
+
path=${Zt(this.loadingAnimationPath)}
|
|
355
|
+
></pkt-icon>`:Ke}
|
|
356
|
+
${this.variant!=="label-only"?Se`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>`:Ke}
|
|
357
|
+
<span class="pkt-btn__text" ${fn(this.defaultSlot)}></span>
|
|
358
|
+
${this.variant==="icons-right-and-left"?Se`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`:Ke}
|
|
359
|
+
</button>
|
|
360
|
+
`}};wo([G({type:String})],Xi.prototype,"iconName",2),wo([G({type:String})],Xi.prototype,"secondIconName",2),wo([G({type:String})],Xi.prototype,"mode",2),wo([G({type:String})],Xi.prototype,"size",2),wo([G({type:String})],Xi.prototype,"color",2),wo([G({type:String})],Xi.prototype,"skin",2),wo([G({type:String})],Xi.prototype,"variant",2),wo([G({type:String,reflect:!0})],Xi.prototype,"state",2),wo([G({type:String,reflect:!0})],Xi.prototype,"type",2),wo([G({type:String})],Xi.prototype,"form",2),wo([G({type:Boolean,reflect:!0})],Xi.prototype,"isLoading",2),wo([G({type:Boolean,reflect:!0})],Xi.prototype,"disabled",2),wo([G({type:String})],Xi.prototype,"loadingAnimationPath",2),Xi=wo([hr("pkt-button")],Xi);const xz={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},gy={props:xz};var Rz=Object.defineProperty,Nz=Object.getOwnPropertyDescriptor,mu=(e,t,a,o)=>{for(var u=o>1?void 0:o?Nz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Rz(t,a,u),u};let Os=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.compact=gy.props.compact.default,this.title="",this.skin=gy.props.skin.default,this.ariaLive=gy.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=gy.props.closeAlert.default,this.date=null,this.role="status",this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0,composed:!0}))},this.slotController=new za(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(t,a,o){t==="ariaLive"&&(this["aria-live"]=o),super.attributeChangedCallback(t,a,o)}updated(t){super.updated(t),t.has("ariaLive")&&(this["aria-live"]=this.ariaLive),t.has("_isClosed")&&c2(this,"pkt-hide",this._isClosed)}render(){const t={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},a={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return Se`
|
|
339
361
|
<div class=${en(t)} aria-live=${this["aria-live"]}>
|
|
340
362
|
<div class=${en(a)}>
|
|
341
363
|
<pkt-icon
|
|
@@ -366,11 +388,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
366
388
|
${this.date?Se`<div class="pkt-alert__date">Sist oppdatert: ${this.date}</div>`:Ke}
|
|
367
389
|
</div>
|
|
368
390
|
</div>
|
|
369
|
-
`}};mu([G({type:Boolean,reflect:!1})],Os.prototype,"compact",2),mu([G({type:String,reflect:!0})],Os.prototype,"title",2),mu([G({type:String,reflect:!0})],Os.prototype,"skin",2),mu([G({type:String})],Os.prototype,"ariaLive",2),mu([G({type:String,reflect:!0})],Os.prototype,"aria-live",2),mu([G({type:Boolean,reflect:!0})],Os.prototype,"closeAlert",2),mu([G({type:String,reflect:!0})],Os.prototype,"date",2),mu([G({type:String,reflect:!0})],Os.prototype,"role",2),mu([Fn()],Os.prototype,"_isClosed",2),Os=mu([hr("pkt-alert")],Os)
|
|
370
|
-
* @license
|
|
371
|
-
* Copyright 2018 Google LLC
|
|
372
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
373
|
-
*/const Zt=e=>e??Ke;var Rz=Object.defineProperty,Nz=Object.getOwnPropertyDescriptor,jm=(e,t,a,o)=>{for(var u=o>1?void 0:o?Nz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Rz(t,a,u),u};let Ih=class extends xh{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless",this.name=""}updated(t){t.has("skin")&&this.requestUpdate(),t.has("name")&&this.updateAccordionItemNames()}updateAccordionItemNames(){var t;if(this.name){const a=(t=this.renderRoot)==null?void 0:t.querySelector("slot");a&&a.assignedElements().forEach(o=>{o.tagName.toLowerCase()==="pkt-accordion-item"&&(o.hasAttribute("name")||o.setAttribute("name",this.name))})}}firstUpdated(){var t;const a=(t=this.renderRoot)==null?void 0:t.querySelector("slot");a&&a.addEventListener("slotchange",()=>{this.updateAccordionItemNames()})}render(){const t={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return Se`
|
|
391
|
+
`}};mu([G({type:Boolean,reflect:!1})],Os.prototype,"compact",2),mu([G({type:String,reflect:!0})],Os.prototype,"title",2),mu([G({type:String,reflect:!0})],Os.prototype,"skin",2),mu([G({type:String})],Os.prototype,"ariaLive",2),mu([G({type:String,reflect:!0})],Os.prototype,"aria-live",2),mu([G({type:Boolean,reflect:!0})],Os.prototype,"closeAlert",2),mu([G({type:String,reflect:!0})],Os.prototype,"date",2),mu([G({type:String,reflect:!0})],Os.prototype,"role",2),mu([Fn()],Os.prototype,"_isClosed",2),Os=mu([hr("pkt-alert")],Os);var Iz=Object.defineProperty,Oz=Object.getOwnPropertyDescriptor,jm=(e,t,a,o)=>{for(var u=o>1?void 0:o?Oz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Iz(t,a,u),u};let Ih=class extends xh{constructor(){super(...arguments),this.ariaLabelledBy="",this.compact=!1,this.skin="borderless",this.name=""}updated(t){t.has("skin")&&this.requestUpdate(),t.has("name")&&this.updateAccordionItemNames()}updateAccordionItemNames(){var t;if(this.name){const a=(t=this.renderRoot)==null?void 0:t.querySelector("slot");a&&a.assignedElements().forEach(o=>{o.tagName.toLowerCase()==="pkt-accordion-item"&&(o.hasAttribute("name")||o.setAttribute("name",this.name))})}}firstUpdated(){var t;const a=(t=this.renderRoot)==null?void 0:t.querySelector("slot");a&&a.addEventListener("slotchange",()=>{this.updateAccordionItemNames()})}render(){const t={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return Se`
|
|
374
392
|
<div
|
|
375
393
|
part="container"
|
|
376
394
|
class=${en(t)}
|
|
@@ -379,7 +397,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
379
397
|
>
|
|
380
398
|
<slot></slot>
|
|
381
399
|
</div>
|
|
382
|
-
`}};jm([G({type:String,reflect:!0,attribute:"aria-labelledby"})],Ih.prototype,"ariaLabelledBy",2),jm([G({type:Boolean,reflect:!0,attribute:"compact"})],Ih.prototype,"compact",2),jm([G({type:String,reflect:!0,attribute:"skin"})],Ih.prototype,"skin",2),jm([G({type:String,reflect:!0,attribute:"name"})],Ih.prototype,"name",2),Ih=jm([hr("pkt-accordion")],Ih);var
|
|
400
|
+
`}};jm([G({type:String,reflect:!0,attribute:"aria-labelledby"})],Ih.prototype,"ariaLabelledBy",2),jm([G({type:Boolean,reflect:!0,attribute:"compact"})],Ih.prototype,"compact",2),jm([G({type:String,reflect:!0,attribute:"skin"})],Ih.prototype,"skin",2),jm([G({type:String,reflect:!0,attribute:"name"})],Ih.prototype,"name",2),Ih=jm([hr("pkt-accordion")],Ih);var Lz=Object.defineProperty,Fz=Object.getOwnPropertyDescriptor,jp=(e,t,a,o)=>{for(var u=o>1?void 0:o?Fz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Lz(t,a,u),u};let Rd=class extends pa{constructor(){super(),this.defaultOpen=!1,this.title="",this.skin=void 0,this.compact=!1,this.isOpen=!1,this.name=void 0,this.accordionItemRef=gn(),this.defaultSlot=gn(),this.slotController=new za(this,this.defaultSlot)}firstUpdated(t){this.defaultOpen&&(this.isOpen=!0)}render(){const t={"pkt-accordion-item":!0,"pkt-accordion-item--compact":this.compact,[`pkt-accordion-item--${this.skin}`]:!!this.skin};return Se`
|
|
383
401
|
<details
|
|
384
402
|
class=${en(t)}
|
|
385
403
|
id=${this.id}
|
|
@@ -403,7 +421,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
403
421
|
<div class="pkt-accordion-item__content-inner" ${fn(this.defaultSlot)}></div>
|
|
404
422
|
</div>
|
|
405
423
|
</details>
|
|
406
|
-
`}};jp([G({type:Boolean})],Rd.prototype,"defaultOpen",2),jp([G({type:String})],Rd.prototype,"title",2),jp([G({type:String,reflect:!0})],Rd.prototype,"skin",2),jp([G({type:Boolean,reflect:!0})],Rd.prototype,"compact",2),jp([G({type:Boolean,reflect:!0})],Rd.prototype,"isOpen",2),jp([G({type:String,reflect:!0})],Rd.prototype,"name",2),Rd=jp([hr("pkt-accordion-item")],Rd);var
|
|
424
|
+
`}};jp([G({type:Boolean})],Rd.prototype,"defaultOpen",2),jp([G({type:String})],Rd.prototype,"title",2),jp([G({type:String,reflect:!0})],Rd.prototype,"skin",2),jp([G({type:Boolean,reflect:!0})],Rd.prototype,"compact",2),jp([G({type:Boolean,reflect:!0})],Rd.prototype,"isOpen",2),jp([G({type:String,reflect:!0})],Rd.prototype,"name",2),Rd=jp([hr("pkt-accordion-item")],Rd);var Mz=Object.defineProperty,Pz=Object.getOwnPropertyDescriptor,my=(e,t,a,o)=>{for(var u=o>1?void 0:o?Pz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Mz(t,a,u),u};let Oh=class extends pa{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(t,a,o){t==="arialabel"&&this.removeAttribute("arialabel"),t==="href"&&this.removeAttribute("href"),t==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(t,a,o)}render(){return Se`<nav
|
|
407
425
|
class="pkt-back-link"
|
|
408
426
|
aria-label=${this.ariaLabel||"Gå tilbake til forrige side"}
|
|
409
427
|
>
|
|
@@ -415,25 +433,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
415
433
|
></pkt-icon
|
|
416
434
|
><span class="pkt-back-link__text">${this.text}</span></a
|
|
417
435
|
>
|
|
418
|
-
</nav>`}};my([G({type:String,reflect:!0})],Oh.prototype,"href",2),my([G({type:String,reflect:!0})],Oh.prototype,"text",2),my([G({type:String,reflect:!0})],Oh.prototype,"ariaLabel",2),Oh=my([hr("pkt-backlink")],Oh);var Mz=Object.defineProperty,Pz=Object.getOwnPropertyDescriptor,wo=(e,t,a,o)=>{for(var u=o>1?void 0:o?Pz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Mz(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.4/animations/";let Xi=class extends pa{constructor(){super(),this.defaultSlot=gn(),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 za(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),t==="disabled"&&o==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&o==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,a={"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 Se`
|
|
419
|
-
<button
|
|
420
|
-
class=${en(a)}
|
|
421
|
-
type=${this.type}
|
|
422
|
-
?disabled=${!!this.disabled}
|
|
423
|
-
aria-busy=${Zt(this.isLoading?"true":void 0)}
|
|
424
|
-
aria-disabled=${Zt(this.disabled||this.isLoading?"true":void 0)}
|
|
425
|
-
form=${Zt(t)}
|
|
426
|
-
>
|
|
427
|
-
${this.isLoading?Se`<pkt-icon
|
|
428
|
-
class="pkt-btn__icon pkt-btn__spinner"
|
|
429
|
-
name="spinner-blue"
|
|
430
|
-
path=${Zt(this.loadingAnimationPath)}
|
|
431
|
-
></pkt-icon>`:Ke}
|
|
432
|
-
${this.variant!=="label-only"?Se`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>`:Ke}
|
|
433
|
-
<span class="pkt-btn__text" ${fn(this.defaultSlot)}></span>
|
|
434
|
-
${this.variant==="icons-right-and-left"?Se`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`:Ke}
|
|
435
|
-
</button>
|
|
436
|
-
`}};wo([G({type:String})],Xi.prototype,"iconName",2),wo([G({type:String})],Xi.prototype,"secondIconName",2),wo([G({type:String})],Xi.prototype,"mode",2),wo([G({type:String})],Xi.prototype,"size",2),wo([G({type:String})],Xi.prototype,"color",2),wo([G({type:String})],Xi.prototype,"skin",2),wo([G({type:String})],Xi.prototype,"variant",2),wo([G({type:String,reflect:!0})],Xi.prototype,"state",2),wo([G({type:String,reflect:!0})],Xi.prototype,"type",2),wo([G({type:String})],Xi.prototype,"form",2),wo([G({type:Boolean,reflect:!0})],Xi.prototype,"isLoading",2),wo([G({type:Boolean,reflect:!0})],Xi.prototype,"disabled",2),wo([G({type:String})],Xi.prototype,"loadingAnimationPath",2),Xi=wo([hr("pkt-button")],Xi);const p2=6048e5,$z=864e5,f2=Symbol.for("constructDateFrom");function bu(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&f2 in e?e[f2](t):e instanceof Date?new e.constructor(t):new Date(t)}function _o(e,t){return bu(t||e,e)}function Ak(e,t,a){const o=_o(e,void 0);return isNaN(t)?bu(e,NaN):(t&&o.setDate(o.getDate()+t),o)}let Bz={};function by(){return Bz}function zm(e,t){var a,o,u,d;const f=by(),y=(t==null?void 0:t.weekStartsOn)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.weekStartsOn)??f.weekStartsOn??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,E=_o(e,t==null?void 0:t.in),_=E.getDay(),T=(_<y?7:0)+_-y;return E.setDate(E.getDate()-T),E.setHours(0,0,0,0),E}function vy(e,t){return zm(e,{...t,weekStartsOn:1})}function h2(e,t){const a=_o(e,void 0),o=a.getFullYear(),u=bu(a,0);u.setFullYear(o+1,0,4),u.setHours(0,0,0,0);const d=vy(u),f=bu(a,0);f.setFullYear(o,0,4),f.setHours(0,0,0,0);const y=vy(f);return a.getTime()>=d.getTime()?o+1:a.getTime()>=y.getTime()?o:o-1}function g2(e){const t=_o(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function m2(e,...t){const a=bu.bind(null,t.find(o=>typeof o=="object"));return t.map(a)}function xk(e,t){const a=_o(e,void 0);return a.setHours(0,0,0,0),a}function Uz(e,t,a){const[o,u]=m2(void 0,e,t),d=xk(o),f=xk(u),y=+d-g2(d),E=+f-g2(f);return Math.round((y-E)/$z)}function jz(e,t){const a=h2(e),o=bu(e,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),vy(o)}function zz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qz(e){return!(!zz(e)&&typeof e!="number"||isNaN(+_o(e)))}function Hz(e,t){const a=_o(e,void 0);return a.setHours(23,59,59,999),a}function Gz(e,t){const[a,o]=m2(e,t.start,t.end);return{start:a,end:o}}function Rk(e,t){const{start:a,end:o}=Gz(void 0,e);let u=+a>+o;const d=u?+a:+o,f=u?o:a;f.setHours(0,0,0,0);let y=1;const E=[];for(;+f<=d;)E.push(bu(a,f)),f.setDate(f.getDate()+y),f.setHours(0,0,0,0);return u?E.reverse():E}function Vz(e,t){const a=_o(e,void 0);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const Wz={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"}},Yz=(e,t,a)=>{let o;const u=Wz[e];return typeof u=="string"?o=u:t===1?o=u.one:o=u.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+o:o+" ago":o};function Nk(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const Kz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jz={date:Nk({formats:Kz,defaultWidth:"full"}),time:Nk({formats:Xz,defaultWidth:"full"}),dateTime:Nk({formats:Zz,defaultWidth:"full"})},Qz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eq=(e,t,a,o)=>Qz[e];function qm(e){return(t,a)=>{const o=a!=null&&a.context?String(a.context):"standalone";let u;if(o==="formatting"&&e.formattingValues){const f=e.defaultFormattingWidth||e.defaultWidth,y=a!=null&&a.width?String(a.width):f;u=e.formattingValues[y]||e.formattingValues[f]}else{const f=e.defaultWidth,y=a!=null&&a.width?String(a.width):e.defaultWidth;u=e.values[y]||e.values[f]}const d=e.argumentCallback?e.argumentCallback(t):t;return u[d]}}const tq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rq={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"]},aq={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"]},iq={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"}},oq={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"}},sq=(e,t)=>{const a=Number(e),o=a%100;if(o>20||o<10)switch(o%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},lq={ordinalNumber:sq,era:qm({values:tq,defaultWidth:"wide"}),quarter:qm({values:nq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qm({values:rq,defaultWidth:"wide"}),day:qm({values:aq,defaultWidth:"wide"}),dayPeriod:qm({values:iq,defaultWidth:"wide",formattingValues:oq,defaultFormattingWidth:"wide"})};function Hm(e){return(t,a={})=>{const o=a.width,u=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],d=t.match(u);if(!d)return null;const f=d[0],y=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],E=Array.isArray(y)?cq(y,x=>x.test(f)):uq(y,x=>x.test(f));let _;_=e.valueCallback?e.valueCallback(E):E,_=a.valueCallback?a.valueCallback(_):_;const T=t.slice(f.length);return{value:_,rest:T}}}function uq(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function cq(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function dq(e){return(t,a={})=>{const o=t.match(e.matchPattern);if(!o)return null;const u=o[0],d=t.match(e.parsePattern);if(!d)return null;let f=e.valueCallback?e.valueCallback(d[0]):d[0];f=a.valueCallback?a.valueCallback(f):f;const y=t.slice(u.length);return{value:f,rest:y}}}const pq=/^(\d+)(th|st|nd|rd)?/i,fq=/\d+/i,hq={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},gq={any:[/^b/i,/^(a|c)/i]},mq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bq={any:[/1/i,/2/i,/3/i,/4/i]},vq={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},yq={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]},Eq={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},Sq={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]},kq={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},wq={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}},_q={ordinalNumber:dq({matchPattern:pq,parsePattern:fq,valueCallback:e=>parseInt(e,10)}),era:Hm({matchPatterns:hq,defaultMatchWidth:"wide",parsePatterns:gq,defaultParseWidth:"any"}),quarter:Hm({matchPatterns:mq,defaultMatchWidth:"wide",parsePatterns:bq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Hm({matchPatterns:vq,defaultMatchWidth:"wide",parsePatterns:yq,defaultParseWidth:"any"}),day:Hm({matchPatterns:Eq,defaultMatchWidth:"wide",parsePatterns:Sq,defaultParseWidth:"any"}),dayPeriod:Hm({matchPatterns:kq,defaultMatchWidth:"any",parsePatterns:wq,defaultParseWidth:"any"})},Cq={code:"en-US",formatDistance:Yz,formatLong:Jz,formatRelative:eq,localize:lq,match:_q,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Dq(e,t){const a=_o(e,void 0);return Uz(a,Vz(a))+1}function Tq(e,t){const a=_o(e,void 0),o=+vy(a)-+jz(a);return Math.round(o/p2)+1}function b2(e,t){var a,o,u,d;const f=_o(e,t==null?void 0:t.in),y=f.getFullYear(),E=by(),_=(t==null?void 0:t.firstWeekContainsDate)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.firstWeekContainsDate)??E.firstWeekContainsDate??((d=(u=E.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,T=bu((t==null?void 0:t.in)||e,0);T.setFullYear(y+1,0,_),T.setHours(0,0,0,0);const x=zm(T,t),N=bu((t==null?void 0:t.in)||e,0);N.setFullYear(y,0,_),N.setHours(0,0,0,0);const L=zm(N,t);return+f>=+x?y+1:+f>=+L?y:y-1}function Aq(e,t){var a,o,u,d;const f=by(),y=(t==null?void 0:t.firstWeekContainsDate)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.firstWeekContainsDate)??f.firstWeekContainsDate??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,E=b2(e,t),_=bu((t==null?void 0:t.in)||e,0);return _.setFullYear(E,0,y),_.setHours(0,0,0,0),zm(_,t)}function v2(e,t){const a=_o(e,t==null?void 0:t.in),o=+zm(a,t)-+Aq(a,t);return Math.round(o/p2)+1}function sr(e,t){const a=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return a+o}const Nd={y(e,t){const a=e.getFullYear(),o=a>0?a:1-a;return sr(t==="yy"?o%100:o,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):sr(a+1,2)},d(e,t){return sr(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return sr(e.getHours()%12||12,t.length)},H(e,t){return sr(e.getHours(),t.length)},m(e,t){return sr(e.getMinutes(),t.length)},s(e,t){return sr(e.getSeconds(),t.length)},S(e,t){const a=t.length,o=e.getMilliseconds(),u=Math.trunc(o*Math.pow(10,a-3));return sr(u,t.length)}},Lh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},y2={G:function(e,t,a){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const o=e.getFullYear(),u=o>0?o:1-o;return a.ordinalNumber(u,{unit:"year"})}return Nd.y(e,t)},Y:function(e,t,a,o){const u=b2(e,o),d=u>0?u:1-u;if(t==="YY"){const f=d%100;return sr(f,2)}return t==="Yo"?a.ordinalNumber(d,{unit:"year"}):sr(d,t.length)},R:function(e,t){const a=h2(e);return sr(a,t.length)},u:function(e,t){const a=e.getFullYear();return sr(a,t.length)},Q:function(e,t,a){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return sr(o,2);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,a){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return sr(o,2);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,a){const o=e.getMonth();switch(t){case"M":case"MM":return Nd.M(e,t);case"Mo":return a.ordinalNumber(o+1,{unit:"month"});case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,a){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return sr(o+1,2);case"Lo":return a.ordinalNumber(o+1,{unit:"month"});case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,a,o){const u=v2(e,o);return t==="wo"?a.ordinalNumber(u,{unit:"week"}):sr(u,t.length)},I:function(e,t,a){const o=Tq(e);return t==="Io"?a.ordinalNumber(o,{unit:"week"}):sr(o,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nd.d(e,t)},D:function(e,t,a){const o=Dq(e);return t==="Do"?a.ordinalNumber(o,{unit:"dayOfYear"}):sr(o,t.length)},E:function(e,t,a){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,a,o){const u=e.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(d);case"ee":return sr(d,2);case"eo":return a.ordinalNumber(d,{unit:"day"});case"eee":return a.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(u,{width:"short",context:"formatting"});case"eeee":default:return a.day(u,{width:"wide",context:"formatting"})}},c:function(e,t,a,o){const u=e.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(d);case"cc":return sr(d,t.length);case"co":return a.ordinalNumber(d,{unit:"day"});case"ccc":return a.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(u,{width:"narrow",context:"standalone"});case"cccccc":return a.day(u,{width:"short",context:"standalone"});case"cccc":default:return a.day(u,{width:"wide",context:"standalone"})}},i:function(e,t,a){const o=e.getDay(),u=o===0?7:o;switch(t){case"i":return String(u);case"ii":return sr(u,t.length);case"io":return a.ordinalNumber(u,{unit:"day"});case"iii":return a.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(o,{width:"short",context:"formatting"});case"iiii":default:return a.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,a){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,a){const o=e.getHours();let u;switch(o===12?u=Lh.noon:o===0?u=Lh.midnight:u=o/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(e,t,a){const o=e.getHours();let u;switch(o>=17?u=Lh.evening:o>=12?u=Lh.afternoon:o>=4?u=Lh.morning:u=Lh.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),a.ordinalNumber(o,{unit:"hour"})}return Nd.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nd.H(e,t)},K:function(e,t,a){const o=e.getHours()%12;return t==="Ko"?a.ordinalNumber(o,{unit:"hour"}):sr(o,t.length)},k:function(e,t,a){let o=e.getHours();return o===0&&(o=24),t==="ko"?a.ordinalNumber(o,{unit:"hour"}):sr(o,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nd.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nd.s(e,t)},S:function(e,t){return Nd.S(e,t)},X:function(e,t,a){const o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return S2(o);case"XXXX":case"XX":return zp(o);case"XXXXX":case"XXX":default:return zp(o,":")}},x:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"x":return S2(o);case"xxxx":case"xx":return zp(o);case"xxxxx":case"xxx":default:return zp(o,":")}},O:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+E2(o,":");case"OOOO":default:return"GMT"+zp(o,":")}},z:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+E2(o,":");case"zzzz":default:return"GMT"+zp(o,":")}},t:function(e,t,a){const o=Math.trunc(+e/1e3);return sr(o,t.length)},T:function(e,t,a){return sr(+e,t.length)}};function E2(e,t=""){const a=e>0?"-":"+",o=Math.abs(e),u=Math.trunc(o/60),d=o%60;return d===0?a+String(u):a+String(u)+t+sr(d,2)}function S2(e,t){return e%60===0?(e>0?"-":"+")+sr(Math.abs(e)/60,2):zp(e,t)}function zp(e,t=""){const a=e>0?"-":"+",o=Math.abs(e),u=sr(Math.trunc(o/60),2),d=sr(o%60,2);return a+u+t+d}const k2=(e,t)=>{switch(e){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"})}},w2=(e,t)=>{switch(e){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"})}},xq=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return k2(e,t);let d;switch(o){case"P":d=t.dateTime({width:"short"});break;case"PP":d=t.dateTime({width:"medium"});break;case"PPP":d=t.dateTime({width:"long"});break;case"PPPP":default:d=t.dateTime({width:"full"});break}return d.replace("{{date}}",k2(o,t)).replace("{{time}}",w2(u,t))},Rq={p:w2,P:xq},Nq=/^D+$/,Iq=/^Y+$/,Oq=["D","DD","YY","YYYY"];function Lq(e){return Nq.test(e)}function Fq(e){return Iq.test(e)}function Mq(e,t,a){const o=Pq(e,t,a);if(console.warn(o),Oq.includes(e))throw new RangeError(o)}function Pq(e,t,a){const o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uq=/^'([^]*?)'?$/,jq=/''/g,zq=/[a-zA-Z]/;function qq(e,t,a){var o,u,d,f;const y=by(),E=y.locale??Cq,_=y.firstWeekContainsDate??((u=(o=y.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??1,T=y.weekStartsOn??((f=(d=y.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,x=_o(e,void 0);if(!qz(x))throw new RangeError("Invalid time value");let N=t.match(Bq).map(P=>{const j=P[0];if(j==="p"||j==="P"){const $=Rq[j];return $(P,E.formatLong)}return P}).join("").match($q).map(P=>{if(P==="''")return{isToken:!1,value:"'"};const j=P[0];if(j==="'")return{isToken:!1,value:Hq(P)};if(y2[j])return{isToken:!0,value:P};if(j.match(zq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:P}});E.localize.preprocessor&&(N=E.localize.preprocessor(x,N));const L={firstWeekContainsDate:_,weekStartsOn:T,locale:E};return N.map(P=>{if(!P.isToken)return P.value;const j=P.value;(Fq(j)||Lq(j))&&Mq(j,t,String(e));const $=y2[j[0]];return $(x,j,E.localize,L)}).join("")}function Hq(e){const t=e.match(Uq);return t?t[1].replace(jq,"'"):e}function Gq(e,t){const a=_o(e,void 0).getDay();return a===0?7:a}const _2={},Gm={};function Vm(e,t){try{const a=(_2[e]||(_2[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return a in Gm?Gm[a]:C2(a,a.split(":"))}catch{if(e in Gm)return Gm[e];const a=e==null?void 0:e.match(Vq);return a?C2(e,a.slice(1)):NaN}}const Vq=/([+-]\d\d):?(\d\d)?/;function C2(e,t){const a=+t[0],o=+(t[1]||0);return Gm[e]=a>0?a*60+o:a*60-o}let Wm=class ey extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Vm(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)),T2(this),Ik(this)):this.setTime(Date.now())}static tz(t,...a){return a.length?new ey(...a,t):new ey(Date.now(),t)}withTimeZone(t){return new ey(+this,t)}getTimezoneOffset(){return-Vm(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ik(this),+this}[Symbol.for("constructDateFrom")](t){return new ey(+new Date(t),this.timeZone)}};const D2=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!D2.test(e))return;const t=e.replace(D2,"$1UTC");Wm.prototype[t]&&(e.startsWith("get")?Wm.prototype[e]=function(){return this.internal[t]()}:(Wm.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Wq(this),+this},Wm.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ik(this),+this}))});function Ik(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Wq(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),T2(e)}function T2(e){const t=Vm(e.timeZone,e),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),u=-new Date(+a).getTimezoneOffset(),d=o-u,f=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();d&&f&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+d);const y=o-t;y&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const E=Vm(e.timeZone,e),_=-new Date(+e).getTimezoneOffset()-E,T=E!==t,x=_-y;if(T&&x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x);const N=Vm(e.timeZone,e),L=E-N;L&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+L),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+L))}}let Yq=class ty extends Wm{static tz(t,...a){return a.length?new ty(...a,t):new ty(Date.now(),t)}toISOString(){const[t,a,o]=this.tzComponents(),u=`${t}${a}:${o}`;return this.internal.toISOString().slice(0,-1)+u}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,a,o,u]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${o} ${a} ${u}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[a,o,u]=this.tzComponents();return`${t} GMT${a}${o}${u} (${Kq(this.timeZone,this)})`}toLocaleString(t,a){return Date.prototype.toLocaleString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}toLocaleDateString(t,a){return Date.prototype.toLocaleDateString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}toLocaleTimeString(t,a){return Date.prototype.toLocaleTimeString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),a=t>0?"-":"+",o=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),u=String(Math.abs(t)%60).padStart(2,"0");return[a,o,u]}withTimeZone(t){return new ty(+this,t)}[Symbol.for("constructDateFrom")](t){return new ty(+new Date(t),this.timeZone)}};function Kq(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const Xq=(e=window.pktTz)=>{const t=new Yq(new Date().toISOString(),e);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function qp(e){if(!e||e==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const[t,a,o]=e.split("-").map(Number);return new Date(t,a-1,o)}if(/^\d{4}-\d{2}$/.test(e)){const[t,a]=e.split("-").map(Number);return new Date(t,a-1,1)}return/^\d{4}$/.test(e)?new Date(Number(e),0,1):new Date(e)}const qa=e=>{if(!e||isNaN(e.getTime()))return"";const t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${o}`},Ok=e=>{if(!e)return null;const t=qp(e);return isNaN(t.getTime())?null:t},A2=(e,t)=>{const a=wi(e);return isNaN(a.getTime())?"":qq(a,t)},wi=(e="",t)=>{const a=typeof e=="string"?qp(e):e;return!a||isNaN(a.getTime())?new Date:t?t==="end"?Hz(a):xk(a):a},Id=(e,t,a=1)=>{if(typeof e!="number"||typeof t!="number"||typeof a!="number"||isNaN(e)||isNaN(t)||isNaN(a))return new Date;const o=new Date(e,t,a);return isNaN(o.getTime())?new Date:o},Zq=e=>!e||isNaN(e.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(e),x2=e=>{if(Array.isArray(e))return e;if(typeof e=="string")return e.split(",")},Jq=e=>e?qp(e):null,Qq=e=>{if(typeof e=="string")return e.split(",").map(t=>qp(t));if(Array.isArray(e))return e.map(t=>qp(t))},Fh={csvToArray:x2,stringToDate:Jq,stringsToDate:Qq},eH={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Hp={props:eH};var tH=Object.defineProperty,nH=Object.getOwnPropertyDescriptor,gr=(e,t,a,o)=>{for(var u=o>1?void 0:o?nH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&tH(t,a,u),u};let lr=class extends pa{constructor(){super(...arguments),this.multiple=Hp.props.multiple.default,this.maxMultiple=Hp.props.maxMultiple.default,this.range=Hp.props.range.default,this.weeknumbers=Hp.props.weeknumbers.default,this.withcontrols=Hp.props.withcontrols.default,this.selected=[],this.earliest=Hp.props.earliest.default,this.latest=Hp.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,a,o){t==="selected"&&o&&this.convertSelected(),super.attributeChangedCallback(t,a,o)}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=>qp(t)),this.range&&this.selected.length===2){const t=Rk({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const a={};for(let o=0;o<t.length;o++)a[qa(t[o])]=this.isInRange(t[o]);this.inRange=a}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const t=qp(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,a){var o,u,d;if(((o=t.target)==null?void 0:o.nodeName)==="INPUT"||((u=t.target)==null?void 0:u.nodeName)==="SELECT"||((d=t.target)==null?void 0:d.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const f=this.focusedDate?wi(this.focusedDate):Id(this.year,this.month,1);let y=Ak(f,a);if(y){let E=this.querySelector(`div[data-date="${qa(y)}"]`);if(E instanceof HTMLDivElement){if(E.dataset.disabled){y=Ak(y,a);let _=this.querySelector(`div[data-date="${qa(y)}"]`);for(;_&&_ instanceof HTMLDivElement&&_.dataset.disabled;)y=Ak(y,a),_=this.querySelector(`div[data-date="${qa(y)}"]`);E=_}E instanceof HTMLDivElement&&!E.dataset.disabled&&(this.focusedDate=qa(y),E.focus())}}}render(){return Se`
|
|
436
|
+
</nav>`}};my([G({type:String})],Oh.prototype,"href",2),my([G({type:String})],Oh.prototype,"text",2),my([G({type:String})],Oh.prototype,"ariaLabel",2),Oh=my([hr("pkt-backlink")],Oh);const p2=6048e5,$z=864e5,f2=Symbol.for("constructDateFrom");function bu(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&f2 in e?e[f2](t):e instanceof Date?new e.constructor(t):new Date(t)}function _o(e,t){return bu(t||e,e)}function Ak(e,t,a){const o=_o(e,void 0);return isNaN(t)?bu(e,NaN):(t&&o.setDate(o.getDate()+t),o)}let Bz={};function by(){return Bz}function zm(e,t){var a,o,u,d;const f=by(),y=(t==null?void 0:t.weekStartsOn)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.weekStartsOn)??f.weekStartsOn??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,E=_o(e,t==null?void 0:t.in),_=E.getDay(),T=(_<y?7:0)+_-y;return E.setDate(E.getDate()-T),E.setHours(0,0,0,0),E}function vy(e,t){return zm(e,{...t,weekStartsOn:1})}function h2(e,t){const a=_o(e,void 0),o=a.getFullYear(),u=bu(a,0);u.setFullYear(o+1,0,4),u.setHours(0,0,0,0);const d=vy(u),f=bu(a,0);f.setFullYear(o,0,4),f.setHours(0,0,0,0);const y=vy(f);return a.getTime()>=d.getTime()?o+1:a.getTime()>=y.getTime()?o:o-1}function g2(e){const t=_o(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function m2(e,...t){const a=bu.bind(null,t.find(o=>typeof o=="object"));return t.map(a)}function xk(e,t){const a=_o(e,void 0);return a.setHours(0,0,0,0),a}function Uz(e,t,a){const[o,u]=m2(void 0,e,t),d=xk(o),f=xk(u),y=+d-g2(d),E=+f-g2(f);return Math.round((y-E)/$z)}function jz(e,t){const a=h2(e),o=bu(e,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),vy(o)}function zz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qz(e){return!(!zz(e)&&typeof e!="number"||isNaN(+_o(e)))}function Hz(e,t){const a=_o(e,void 0);return a.setHours(23,59,59,999),a}function Gz(e,t){const[a,o]=m2(e,t.start,t.end);return{start:a,end:o}}function Rk(e,t){const{start:a,end:o}=Gz(void 0,e);let u=+a>+o;const d=u?+a:+o,f=u?o:a;f.setHours(0,0,0,0);let y=1;const E=[];for(;+f<=d;)E.push(bu(a,f)),f.setDate(f.getDate()+y),f.setHours(0,0,0,0);return u?E.reverse():E}function Vz(e,t){const a=_o(e,void 0);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const Wz={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"}},Yz=(e,t,a)=>{let o;const u=Wz[e];return typeof u=="string"?o=u:t===1?o=u.one:o=u.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+o:o+" ago":o};function Nk(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const Kz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jz={date:Nk({formats:Kz,defaultWidth:"full"}),time:Nk({formats:Xz,defaultWidth:"full"}),dateTime:Nk({formats:Zz,defaultWidth:"full"})},Qz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eq=(e,t,a,o)=>Qz[e];function qm(e){return(t,a)=>{const o=a!=null&&a.context?String(a.context):"standalone";let u;if(o==="formatting"&&e.formattingValues){const f=e.defaultFormattingWidth||e.defaultWidth,y=a!=null&&a.width?String(a.width):f;u=e.formattingValues[y]||e.formattingValues[f]}else{const f=e.defaultWidth,y=a!=null&&a.width?String(a.width):e.defaultWidth;u=e.values[y]||e.values[f]}const d=e.argumentCallback?e.argumentCallback(t):t;return u[d]}}const tq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rq={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"]},aq={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"]},iq={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"}},oq={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"}},sq=(e,t)=>{const a=Number(e),o=a%100;if(o>20||o<10)switch(o%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},lq={ordinalNumber:sq,era:qm({values:tq,defaultWidth:"wide"}),quarter:qm({values:nq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qm({values:rq,defaultWidth:"wide"}),day:qm({values:aq,defaultWidth:"wide"}),dayPeriod:qm({values:iq,defaultWidth:"wide",formattingValues:oq,defaultFormattingWidth:"wide"})};function Hm(e){return(t,a={})=>{const o=a.width,u=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],d=t.match(u);if(!d)return null;const f=d[0],y=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],E=Array.isArray(y)?cq(y,x=>x.test(f)):uq(y,x=>x.test(f));let _;_=e.valueCallback?e.valueCallback(E):E,_=a.valueCallback?a.valueCallback(_):_;const T=t.slice(f.length);return{value:_,rest:T}}}function uq(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function cq(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function dq(e){return(t,a={})=>{const o=t.match(e.matchPattern);if(!o)return null;const u=o[0],d=t.match(e.parsePattern);if(!d)return null;let f=e.valueCallback?e.valueCallback(d[0]):d[0];f=a.valueCallback?a.valueCallback(f):f;const y=t.slice(u.length);return{value:f,rest:y}}}const pq=/^(\d+)(th|st|nd|rd)?/i,fq=/\d+/i,hq={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},gq={any:[/^b/i,/^(a|c)/i]},mq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bq={any:[/1/i,/2/i,/3/i,/4/i]},vq={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},yq={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]},Eq={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},Sq={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]},kq={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},wq={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}},_q={ordinalNumber:dq({matchPattern:pq,parsePattern:fq,valueCallback:e=>parseInt(e,10)}),era:Hm({matchPatterns:hq,defaultMatchWidth:"wide",parsePatterns:gq,defaultParseWidth:"any"}),quarter:Hm({matchPatterns:mq,defaultMatchWidth:"wide",parsePatterns:bq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Hm({matchPatterns:vq,defaultMatchWidth:"wide",parsePatterns:yq,defaultParseWidth:"any"}),day:Hm({matchPatterns:Eq,defaultMatchWidth:"wide",parsePatterns:Sq,defaultParseWidth:"any"}),dayPeriod:Hm({matchPatterns:kq,defaultMatchWidth:"any",parsePatterns:wq,defaultParseWidth:"any"})},Cq={code:"en-US",formatDistance:Yz,formatLong:Jz,formatRelative:eq,localize:lq,match:_q,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Dq(e,t){const a=_o(e,void 0);return Uz(a,Vz(a))+1}function Tq(e,t){const a=_o(e,void 0),o=+vy(a)-+jz(a);return Math.round(o/p2)+1}function b2(e,t){var a,o,u,d;const f=_o(e,t==null?void 0:t.in),y=f.getFullYear(),E=by(),_=(t==null?void 0:t.firstWeekContainsDate)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.firstWeekContainsDate)??E.firstWeekContainsDate??((d=(u=E.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,T=bu((t==null?void 0:t.in)||e,0);T.setFullYear(y+1,0,_),T.setHours(0,0,0,0);const x=zm(T,t),N=bu((t==null?void 0:t.in)||e,0);N.setFullYear(y,0,_),N.setHours(0,0,0,0);const L=zm(N,t);return+f>=+x?y+1:+f>=+L?y:y-1}function Aq(e,t){var a,o,u,d;const f=by(),y=(t==null?void 0:t.firstWeekContainsDate)??((o=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:o.firstWeekContainsDate)??f.firstWeekContainsDate??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,E=b2(e,t),_=bu((t==null?void 0:t.in)||e,0);return _.setFullYear(E,0,y),_.setHours(0,0,0,0),zm(_,t)}function v2(e,t){const a=_o(e,t==null?void 0:t.in),o=+zm(a,t)-+Aq(a,t);return Math.round(o/p2)+1}function sr(e,t){const a=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return a+o}const Nd={y(e,t){const a=e.getFullYear(),o=a>0?a:1-a;return sr(t==="yy"?o%100:o,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):sr(a+1,2)},d(e,t){return sr(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return sr(e.getHours()%12||12,t.length)},H(e,t){return sr(e.getHours(),t.length)},m(e,t){return sr(e.getMinutes(),t.length)},s(e,t){return sr(e.getSeconds(),t.length)},S(e,t){const a=t.length,o=e.getMilliseconds(),u=Math.trunc(o*Math.pow(10,a-3));return sr(u,t.length)}},Lh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},y2={G:function(e,t,a){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const o=e.getFullYear(),u=o>0?o:1-o;return a.ordinalNumber(u,{unit:"year"})}return Nd.y(e,t)},Y:function(e,t,a,o){const u=b2(e,o),d=u>0?u:1-u;if(t==="YY"){const f=d%100;return sr(f,2)}return t==="Yo"?a.ordinalNumber(d,{unit:"year"}):sr(d,t.length)},R:function(e,t){const a=h2(e);return sr(a,t.length)},u:function(e,t){const a=e.getFullYear();return sr(a,t.length)},Q:function(e,t,a){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return sr(o,2);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,a){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return sr(o,2);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,a){const o=e.getMonth();switch(t){case"M":case"MM":return Nd.M(e,t);case"Mo":return a.ordinalNumber(o+1,{unit:"month"});case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,a){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return sr(o+1,2);case"Lo":return a.ordinalNumber(o+1,{unit:"month"});case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,a,o){const u=v2(e,o);return t==="wo"?a.ordinalNumber(u,{unit:"week"}):sr(u,t.length)},I:function(e,t,a){const o=Tq(e);return t==="Io"?a.ordinalNumber(o,{unit:"week"}):sr(o,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nd.d(e,t)},D:function(e,t,a){const o=Dq(e);return t==="Do"?a.ordinalNumber(o,{unit:"dayOfYear"}):sr(o,t.length)},E:function(e,t,a){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,a,o){const u=e.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(d);case"ee":return sr(d,2);case"eo":return a.ordinalNumber(d,{unit:"day"});case"eee":return a.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(u,{width:"short",context:"formatting"});case"eeee":default:return a.day(u,{width:"wide",context:"formatting"})}},c:function(e,t,a,o){const u=e.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(d);case"cc":return sr(d,t.length);case"co":return a.ordinalNumber(d,{unit:"day"});case"ccc":return a.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(u,{width:"narrow",context:"standalone"});case"cccccc":return a.day(u,{width:"short",context:"standalone"});case"cccc":default:return a.day(u,{width:"wide",context:"standalone"})}},i:function(e,t,a){const o=e.getDay(),u=o===0?7:o;switch(t){case"i":return String(u);case"ii":return sr(u,t.length);case"io":return a.ordinalNumber(u,{unit:"day"});case"iii":return a.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(o,{width:"short",context:"formatting"});case"iiii":default:return a.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,a){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,a){const o=e.getHours();let u;switch(o===12?u=Lh.noon:o===0?u=Lh.midnight:u=o/12>=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(e,t,a){const o=e.getHours();let u;switch(o>=17?u=Lh.evening:o>=12?u=Lh.afternoon:o>=4?u=Lh.morning:u=Lh.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),a.ordinalNumber(o,{unit:"hour"})}return Nd.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nd.H(e,t)},K:function(e,t,a){const o=e.getHours()%12;return t==="Ko"?a.ordinalNumber(o,{unit:"hour"}):sr(o,t.length)},k:function(e,t,a){let o=e.getHours();return o===0&&(o=24),t==="ko"?a.ordinalNumber(o,{unit:"hour"}):sr(o,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nd.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nd.s(e,t)},S:function(e,t){return Nd.S(e,t)},X:function(e,t,a){const o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return S2(o);case"XXXX":case"XX":return zp(o);case"XXXXX":case"XXX":default:return zp(o,":")}},x:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"x":return S2(o);case"xxxx":case"xx":return zp(o);case"xxxxx":case"xxx":default:return zp(o,":")}},O:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+E2(o,":");case"OOOO":default:return"GMT"+zp(o,":")}},z:function(e,t,a){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+E2(o,":");case"zzzz":default:return"GMT"+zp(o,":")}},t:function(e,t,a){const o=Math.trunc(+e/1e3);return sr(o,t.length)},T:function(e,t,a){return sr(+e,t.length)}};function E2(e,t=""){const a=e>0?"-":"+",o=Math.abs(e),u=Math.trunc(o/60),d=o%60;return d===0?a+String(u):a+String(u)+t+sr(d,2)}function S2(e,t){return e%60===0?(e>0?"-":"+")+sr(Math.abs(e)/60,2):zp(e,t)}function zp(e,t=""){const a=e>0?"-":"+",o=Math.abs(e),u=sr(Math.trunc(o/60),2),d=sr(o%60,2);return a+u+t+d}const k2=(e,t)=>{switch(e){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"})}},w2=(e,t)=>{switch(e){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"})}},xq=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return k2(e,t);let d;switch(o){case"P":d=t.dateTime({width:"short"});break;case"PP":d=t.dateTime({width:"medium"});break;case"PPP":d=t.dateTime({width:"long"});break;case"PPPP":default:d=t.dateTime({width:"full"});break}return d.replace("{{date}}",k2(o,t)).replace("{{time}}",w2(u,t))},Rq={p:w2,P:xq},Nq=/^D+$/,Iq=/^Y+$/,Oq=["D","DD","YY","YYYY"];function Lq(e){return Nq.test(e)}function Fq(e){return Iq.test(e)}function Mq(e,t,a){const o=Pq(e,t,a);if(console.warn(o),Oq.includes(e))throw new RangeError(o)}function Pq(e,t,a){const o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Uq=/^'([^]*?)'?$/,jq=/''/g,zq=/[a-zA-Z]/;function qq(e,t,a){var o,u,d,f;const y=by(),E=y.locale??Cq,_=y.firstWeekContainsDate??((u=(o=y.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??1,T=y.weekStartsOn??((f=(d=y.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,x=_o(e,void 0);if(!qz(x))throw new RangeError("Invalid time value");let N=t.match(Bq).map(P=>{const j=P[0];if(j==="p"||j==="P"){const $=Rq[j];return $(P,E.formatLong)}return P}).join("").match($q).map(P=>{if(P==="''")return{isToken:!1,value:"'"};const j=P[0];if(j==="'")return{isToken:!1,value:Hq(P)};if(y2[j])return{isToken:!0,value:P};if(j.match(zq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:P}});E.localize.preprocessor&&(N=E.localize.preprocessor(x,N));const L={firstWeekContainsDate:_,weekStartsOn:T,locale:E};return N.map(P=>{if(!P.isToken)return P.value;const j=P.value;(Fq(j)||Lq(j))&&Mq(j,t,String(e));const $=y2[j[0]];return $(x,j,E.localize,L)}).join("")}function Hq(e){const t=e.match(Uq);return t?t[1].replace(jq,"'"):e}function Gq(e,t){const a=_o(e,void 0).getDay();return a===0?7:a}const _2={},Gm={};function Vm(e,t){try{const a=(_2[e]||(_2[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return a in Gm?Gm[a]:C2(a,a.split(":"))}catch{if(e in Gm)return Gm[e];const a=e==null?void 0:e.match(Vq);return a?C2(e,a.slice(1)):NaN}}const Vq=/([+-]\d\d):?(\d\d)?/;function C2(e,t){const a=+t[0],o=+(t[1]||0);return Gm[e]=a>0?a*60+o:a*60-o}let Wm=class ey extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Vm(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)),T2(this),Ik(this)):this.setTime(Date.now())}static tz(t,...a){return a.length?new ey(...a,t):new ey(Date.now(),t)}withTimeZone(t){return new ey(+this,t)}getTimezoneOffset(){return-Vm(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ik(this),+this}[Symbol.for("constructDateFrom")](t){return new ey(+new Date(t),this.timeZone)}};const D2=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!D2.test(e))return;const t=e.replace(D2,"$1UTC");Wm.prototype[t]&&(e.startsWith("get")?Wm.prototype[e]=function(){return this.internal[t]()}:(Wm.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Wq(this),+this},Wm.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ik(this),+this}))});function Ik(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Wq(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),T2(e)}function T2(e){const t=Vm(e.timeZone,e),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),u=-new Date(+a).getTimezoneOffset(),d=o-u,f=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();d&&f&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+d);const y=o-t;y&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const E=Vm(e.timeZone,e),_=-new Date(+e).getTimezoneOffset()-E,T=E!==t,x=_-y;if(T&&x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x);const N=Vm(e.timeZone,e),L=E-N;L&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+L),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+L))}}let Yq=class ty extends Wm{static tz(t,...a){return a.length?new ty(...a,t):new ty(Date.now(),t)}toISOString(){const[t,a,o]=this.tzComponents(),u=`${t}${a}:${o}`;return this.internal.toISOString().slice(0,-1)+u}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,a,o,u]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${o} ${a} ${u}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[a,o,u]=this.tzComponents();return`${t} GMT${a}${o}${u} (${Kq(this.timeZone,this)})`}toLocaleString(t,a){return Date.prototype.toLocaleString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}toLocaleDateString(t,a){return Date.prototype.toLocaleDateString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}toLocaleTimeString(t,a){return Date.prototype.toLocaleTimeString.call(this,t,{...a,timeZone:(a==null?void 0:a.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),a=t>0?"-":"+",o=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),u=String(Math.abs(t)%60).padStart(2,"0");return[a,o,u]}withTimeZone(t){return new ty(+this,t)}[Symbol.for("constructDateFrom")](t){return new ty(+new Date(t),this.timeZone)}};function Kq(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const Xq=(e=window.pktTz)=>{const t=new Yq(new Date().toISOString(),e);return t.setHours(0,0,0,0),isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate())};function qp(e){if(!e||e==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const[t,a,o]=e.split("-").map(Number);return new Date(t,a-1,o)}if(/^\d{4}-\d{2}$/.test(e)){const[t,a]=e.split("-").map(Number);return new Date(t,a-1,1)}return/^\d{4}$/.test(e)?new Date(Number(e),0,1):new Date(e)}const qa=e=>{if(!e||isNaN(e.getTime()))return"";const t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${o}`},Ok=e=>{if(!e)return null;const t=qp(e);return isNaN(t.getTime())?null:t},A2=(e,t)=>{const a=wi(e);return isNaN(a.getTime())?"":qq(a,t)},wi=(e="",t)=>{const a=typeof e=="string"?qp(e):e;return!a||isNaN(a.getTime())?new Date:t?t==="end"?Hz(a):xk(a):a},Id=(e,t,a=1)=>{if(typeof e!="number"||typeof t!="number"||typeof a!="number"||isNaN(e)||isNaN(t)||isNaN(a))return new Date;const o=new Date(e,t,a);return isNaN(o.getTime())?new Date:o},Zq=e=>!e||isNaN(e.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(e),x2=e=>{if(Array.isArray(e))return e;if(typeof e=="string")return e.split(",")},Jq=e=>e?qp(e):null,Qq=e=>{if(typeof e=="string")return e.split(",").map(t=>qp(t));if(Array.isArray(e))return e.map(t=>qp(t))},Fh={csvToArray:x2,stringToDate:Jq,stringsToDate:Qq},eH={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},Hp={props:eH};var tH=Object.defineProperty,nH=Object.getOwnPropertyDescriptor,gr=(e,t,a,o)=>{for(var u=o>1?void 0:o?nH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&tH(t,a,u),u};let lr=class extends pa{constructor(){super(...arguments),this.multiple=Hp.props.multiple.default,this.maxMultiple=Hp.props.maxMultiple.default,this.range=Hp.props.range.default,this.weeknumbers=Hp.props.weeknumbers.default,this.withcontrols=Hp.props.withcontrols.default,this.selected=[],this.earliest=Hp.props.earliest.default,this.latest=Hp.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,a,o){t==="selected"&&o&&this.convertSelected(),super.attributeChangedCallback(t,a,o)}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=>qp(t)),this.range&&this.selected.length===2){const t=Rk({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(t)&&t.length){const a={};for(let o=0;o<t.length;o++)a[qa(t[o])]=this.isInRange(t[o]);this.inRange=a}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const t=qp(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,a){var o,u,d;if(((o=t.target)==null?void 0:o.nodeName)==="INPUT"||((u=t.target)==null?void 0:u.nodeName)==="SELECT"||((d=t.target)==null?void 0:d.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const f=this.focusedDate?wi(this.focusedDate):Id(this.year,this.month,1);let y=Ak(f,a);if(y){let E=this.querySelector(`div[data-date="${qa(y)}"]`);if(E instanceof HTMLDivElement){if(E.dataset.disabled){y=Ak(y,a);let _=this.querySelector(`div[data-date="${qa(y)}"]`);for(;_&&_ instanceof HTMLDivElement&&_.dataset.disabled;)y=Ak(y,a),_=this.querySelector(`div[data-date="${qa(y)}"]`);E=_}E instanceof HTMLDivElement&&!E.dataset.disabled&&(this.focusedDate=qa(y),E.focus())}}}render(){return Se`
|
|
437
437
|
<div
|
|
438
438
|
class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":Ke}"
|
|
439
439
|
@focusout=${this.closeEvent}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.1",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
40
40
|
"@lit/react": "^1.0.7",
|
|
41
|
-
"@oslokommune/punkt-elements": "^13.4.
|
|
41
|
+
"@oslokommune/punkt-elements": "^13.4.1",
|
|
42
42
|
"prettier": "^3.3.3",
|
|
43
43
|
"react-element-to-jsx-string": "^15.0.0",
|
|
44
44
|
"react-hook-form": "^7.53.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "5768a452bf48f03c7448b9706ad1cb2c06d3fdc4"
|
|
114
114
|
}
|