@oslokommune/punkt-elements 16.26.7 → 17.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +110 -0
- package/dist/accordion-CbXDxOho.cjs +47 -0
- package/dist/{accordion-CBdIk9gw.js → accordion-DEUHQ4JD.js} +45 -35
- package/dist/{alert-HHTGY0sp.js → alert-CbtVGrHD.js} +31 -17
- package/dist/{alert-B8dLsiTz.cjs → alert-CkUnbPdA.cjs} +5 -5
- package/dist/base-elements/input-element.d.ts +1 -0
- package/dist/button-Cod17rKo.js +115 -0
- package/dist/{button-B5tQpKeG.cjs → button-gvDXtBMC.cjs} +5 -2
- package/dist/{calendar-DIzGBdbh.cjs → calendar-BVXW8DqC.cjs} +1 -1
- package/dist/{calendar-CjlUA-Lb.js → calendar-CjC4qlh6.js} +1 -1
- package/dist/{checkbox-Bt_sC_90.cjs → checkbox-8uxbeU30.cjs} +1 -1
- package/dist/{checkbox-D03BC2Va.js → checkbox-DJDphhqz.js} +1 -1
- package/dist/{combobox-CoQBTWqL.js → combobox-Du5yr-xM.js} +16 -2
- package/dist/combobox-hKrbYLUe.cjs +136 -0
- package/dist/components/accordion/accordion-context.d.ts +7 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordionitem.d.ts +1 -0
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/alert.test.d.ts +1 -0
- package/dist/components/button/button.d.ts +4 -1
- package/dist/components/datepicker/datepicker-base.d.ts +2 -0
- package/dist/components/datepicker/datepicker-utils.d.ts +2 -2
- package/dist/components/footer/footer-base.d.ts +44 -0
- package/dist/components/footer/footer-simple.d.ts +20 -0
- package/dist/components/footer/footer.accessibility.test.d.ts +0 -0
- package/dist/components/footer/footer.d.ts +22 -0
- package/dist/components/footer/footer.test.d.ts +0 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/types.d.ts +16 -0
- package/dist/components/header/header-chrome-controller.d.ts +44 -0
- package/dist/components/header/header-global.accessibility.test.d.ts +0 -0
- package/dist/components/header/header-global.d.ts +78 -0
- package/dist/components/header/header-global.test.d.ts +0 -0
- package/dist/components/header/header-service.accessibility.test.d.ts +0 -0
- package/dist/components/header/header-service.d.ts +6 -21
- package/dist/components/header/header-service.test.d.ts +1 -1
- package/dist/components/header/header.d.ts +11 -3
- package/dist/components/header/header.test.d.ts +0 -0
- package/dist/components/header/index.d.ts +2 -1
- package/dist/components/header/types.d.ts +28 -2
- package/dist/components/header-menu/header-menu.d.ts +4 -5
- package/dist/components/header-menu/types.d.ts +1 -1
- package/dist/components/index.d.ts +5 -3
- package/dist/components/input-wrapper/input-wrapper.d.ts +2 -0
- package/dist/components/input-wrapper/input-wrapper.test.d.ts +1 -0
- package/dist/components/searchinput/searchinput.d.ts +5 -0
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.test.d.ts +1 -0
- package/dist/components/textarea/textarea.test.d.ts +2 -0
- package/dist/components/textinput/textinput.test.d.ts +1 -0
- package/dist/components/timepicker/timepicker.d.ts +2 -0
- package/dist/components/timepicker/timepicker.test.d.ts +3 -0
- package/dist/consent--Nw43WFU.cjs +18 -0
- package/dist/{consent-D5sY6JK3.js → consent-B2hSTCGC.js} +14 -7
- package/dist/consume-BiOhrhEy.js +167 -0
- package/dist/consume-DKf5SmP9.cjs +1 -0
- package/dist/{converters-BKGBRBpS.js → converters-BBfsEJV5.js} +25 -25
- package/dist/{converters-9jHlXDyy.cjs → converters-Cd0fPEly.cjs} +1 -1
- package/dist/{datepicker-BE5Ll0W4.js → datepicker--Fq8q-J3.js} +30 -12
- package/dist/{datepicker-x4xM3KQz.cjs → datepicker-CEoBYTBU.cjs} +11 -7
- package/dist/docs/components/alert.d.ts +3 -0
- package/dist/docs/components/footer.d.ts +9 -0
- package/dist/docs/components/form-sizes.d.ts +10 -0
- package/dist/docs/components/header-global-full.d.ts +20 -0
- package/dist/docs/components/header-global.d.ts +14 -0
- package/dist/docs/components/searchinput.d.ts +6 -3
- package/dist/fetch-header-footer-data-Pc32etrk.js +88 -0
- package/dist/fetch-header-footer-data-xohWFmYC.cjs +1 -0
- package/dist/fileupload-CGKUJrlj.cjs +401 -0
- package/dist/{fileupload-2hf8YNhO.js → fileupload-D4gQN64T.js} +156 -176
- package/dist/focus-trap-DG3pEuyJ.js +60 -0
- package/dist/focus-trap-DSv4Ifqm.cjs +1 -0
- package/dist/footer-BIrJeRuZ.js +303 -0
- package/dist/footer-Ber-jqM1.cjs +114 -0
- package/dist/footer.d.ts +1 -0
- package/dist/header-BFk1an4z.cjs +465 -0
- package/dist/header-Deg_LGJo.js +1287 -0
- package/dist/header-menu-BHqK4QA6.cjs +126 -0
- package/dist/{header-menu-C8b5vd3n.js → header-menu-GFtJKM4j.js} +25 -97
- package/dist/{helptext-OfqH5npD.js → helptext-C_brWCIT.js} +1 -1
- package/dist/{helptext-eckq4JEX.cjs → helptext-Cq5rNaAC.cjs} +1 -1
- package/dist/{input-element-ZGOWsvKM.cjs → input-element-B0qLbEdF.cjs} +1 -1
- package/dist/{input-element-BFHpeoV8.js → input-element-C0RnXi-J.js} +5 -2
- package/dist/{input-wrapper-DwwE0JcO.js → input-wrapper-BweP6t3O.js} +12 -0
- package/dist/{input-wrapper-BRjQB4zM.cjs → input-wrapper-DPkkiG7S.cjs} +13 -11
- package/dist/{input-wrapper-DaA98B5l.js → input-wrapper-fWV5P4MN.js} +22 -15
- package/dist/{input-wrapper-LcZjpt0L.cjs → input-wrapper-wh3fWIhk.cjs} +1 -1
- package/dist/modal-CPnFteYS.cjs +35 -0
- package/dist/{modal-C6pScpdG.js → modal-xNK_wpHk.js} +11 -20
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -0
- package/dist/pkt-footer.js +2 -0
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +2 -2
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +27 -26
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{radiobutton-DGO6H2Ki.js → radiobutton-C6htwDrT.js} +1 -1
- package/dist/{radiobutton-DY1WWepJ.cjs → radiobutton-DjWBoSHv.cjs} +1 -1
- package/dist/scroll-lock-BN8lOhV5.cjs +1 -0
- package/dist/scroll-lock-DAbNKAUy.js +18 -0
- package/dist/searchinput-CfUVfpqL.js +156 -0
- package/dist/searchinput-DGjeN1YI.cjs +60 -0
- package/dist/{select-D4_HQFkh.cjs → select-CZvAW7W2.cjs} +2 -1
- package/dist/{select-BwHUIlwQ.js → select-CsBXXbLP.js} +4 -3
- package/dist/setupTests.d.ts +0 -0
- package/dist/shared-types/footer.d.ts +95 -0
- package/dist/shared-types/{header-menu.d.ts → header-footer.d.ts} +51 -4
- package/dist/shared-types/header.d.ts +1 -1
- package/dist/shared-types/index.d.ts +6 -4
- package/dist/shared-types/searchinput.d.ts +2 -0
- package/dist/shared-types/select.d.ts +3 -2
- package/dist/shared-types/size.d.ts +4 -0
- package/dist/shared-types/timepicker.d.ts +0 -6
- package/dist/shared-utils/datepicker-utils.d.ts +5 -4
- package/dist/shared-utils/fileupload/focus-trap.d.ts +4 -10
- package/dist/shared-utils/focus-trap/index.d.ts +22 -0
- package/dist/shared-utils/{header-menu → header-footer}/example-data.d.ts +5 -4
- package/dist/shared-utils/header-footer/external-domain.d.ts +26 -0
- package/dist/shared-utils/{header-menu → header-footer}/fetch-header-footer-data.d.ts +6 -2
- package/dist/shared-utils/{header-menu → header-footer}/index.d.ts +2 -1
- package/dist/shared-utils/{header-menu → header-footer}/select-megamenu.d.ts +1 -1
- package/dist/shared-utils/scroll-lock/index.d.ts +24 -0
- package/dist/tabs-BqrKLCjd.js +214 -0
- package/dist/tabs-q62MK_-r.cjs +40 -0
- package/dist/{textarea-D6M7ZhtA.js → textarea-Cm392CEI.js} +5 -3
- package/dist/{textarea-Bt_Zs8gq.cjs → textarea-sTcZxOIB.cjs} +3 -2
- package/dist/{textinput-EDKjcUdg.cjs → textinput-DqJbTglM.cjs} +3 -2
- package/dist/{textinput-oU2EvFsi.js → textinput-TSPcBcih.js} +5 -3
- package/dist/{timepicker-CgOL2sd9.cjs → timepicker-CqFYMV8q.cjs} +8 -7
- package/dist/{timepicker-_G0V_HV3.js → timepicker-DWbgTDKq.js} +10 -9
- package/package.json +3 -3
- package/src/components/accordion/accordion-context.ts +8 -0
- package/src/components/accordion/accordion.test.ts +44 -0
- package/src/components/accordion/accordion.ts +13 -3
- package/src/components/accordion/accordionitem.ts +9 -1
- package/src/components/alert/alert.test.ts +51 -2
- package/src/components/alert/alert.ts +11 -5
- package/src/components/breadcrumbs/breadcrumbs.test.ts +11 -3
- package/src/components/button/button.test.ts +23 -0
- package/src/components/button/button.ts +28 -3
- package/src/components/combobox/combobox.core.test.ts +20 -0
- package/src/components/combobox/combobox.ts +2 -0
- package/src/components/consent/consent.test.ts +6 -3
- package/src/components/consent/consent.ts +15 -7
- package/src/components/datepicker/datepicker-base.ts +5 -1
- package/src/components/datepicker/datepicker-utils.test.ts +10 -0
- package/src/components/datepicker/datepicker.core.test.ts +17 -0
- package/src/components/datepicker/datepicker.ts +8 -0
- package/src/components/footer/footer-base.ts +238 -0
- package/src/components/footer/footer-simple.ts +71 -0
- package/src/components/footer/footer.accessibility.test.ts +66 -0
- package/src/components/footer/footer.test.ts +238 -0
- package/src/components/footer/footer.ts +81 -0
- package/src/components/footer/index.ts +4 -0
- package/src/components/footer/types.ts +21 -0
- package/src/components/header/header-chrome-controller.ts +123 -0
- package/src/components/header/header-global.accessibility.test.ts +110 -0
- package/src/components/header/header-global.test.ts +329 -0
- package/src/components/header/header-global.ts +648 -0
- package/src/components/header/header-service.accessibility.test.ts +79 -0
- package/src/components/header/header-service.test.ts +32 -12
- package/src/components/header/header-service.ts +38 -162
- package/src/components/header/header-user-menu.ts +0 -1
- package/src/components/header/header.test.ts +84 -0
- package/src/components/header/header.ts +52 -5
- package/src/components/header/index.ts +6 -0
- package/src/components/header/types.ts +38 -0
- package/src/components/header-menu/header-menu.test.ts +131 -10
- package/src/components/header-menu/header-menu.ts +23 -24
- package/src/components/header-menu/types.ts +1 -1
- package/src/components/index.ts +18 -2
- package/src/components/input-wrapper/input-wrapper.test.ts +45 -0
- package/src/components/input-wrapper/input-wrapper.ts +17 -9
- package/src/components/modal/modal.ts +8 -9
- package/src/components/searchinput/searchinput.test.ts +43 -0
- package/src/components/searchinput/searchinput.ts +29 -12
- package/src/components/select/index.ts +1 -1
- package/src/components/select/select.test.ts +28 -0
- package/src/components/select/select.ts +4 -3
- package/src/components/textarea/textarea.test.ts +16 -0
- package/src/components/textarea/textarea.ts +3 -1
- package/src/components/textinput/textinput.test.ts +28 -0
- package/src/components/textinput/textinput.ts +3 -1
- package/src/components/timepicker/timepicker.test.ts +26 -0
- package/src/components/timepicker/timepicker.ts +12 -6
- package/dist/accordion-FISAiAbX.cjs +0 -47
- package/dist/button-C_YzTSuU.js +0 -96
- package/dist/combobox-D6H9rWPV.cjs +0 -135
- package/dist/consent-X3wvhteO.cjs +0 -10
- package/dist/fileupload-BLVrslUX.cjs +0 -401
- package/dist/header-CFrsaq0c.cjs +0 -310
- package/dist/header-D_xvPR4R.js +0 -801
- package/dist/header-menu-DMdP_c6X.cjs +0 -126
- package/dist/modal-DKU7PnjJ.cjs +0 -35
- package/dist/searchinput-CyO5k4Q4.js +0 -148
- package/dist/searchinput-DG6YetL1.cjs +0 -60
- package/dist/shared-utils/modal-scroll-lock.d.ts +0 -10
- package/dist/tabs-CGo0ODPa.cjs +0 -40
- package/dist/tabs-ChdR0D1C.js +0 -379
- /package/dist/shared-utils/{header-menu → header-footer}/icon-map.d.ts +0 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
//#region node_modules/@lit/context/lib/context-request-event.js
|
|
2
|
+
var e = class extends Event {
|
|
3
|
+
constructor(e, t, n, r) {
|
|
4
|
+
super("context-request", {
|
|
5
|
+
bubbles: !0,
|
|
6
|
+
composed: !0
|
|
7
|
+
}), this.context = e, this.contextTarget = t, this.callback = n, this.subscribe = r ?? !1;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region node_modules/@lit/context/lib/create-context.js
|
|
12
|
+
function t(e) {
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region node_modules/@lit/context/lib/controllers/context-consumer.js
|
|
17
|
+
var n = class {
|
|
18
|
+
constructor(e, t, n, r) {
|
|
19
|
+
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (e, t) => {
|
|
20
|
+
this.unsubscribe && (this.unsubscribe !== t && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = e, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(e, t)), this.unsubscribe = t;
|
|
21
|
+
}, this.host = e, t.context !== void 0) {
|
|
22
|
+
let e = t;
|
|
23
|
+
this.context = e.context, this.callback = e.callback, this.subscribe = e.subscribe ?? !1;
|
|
24
|
+
} else this.context = t, this.callback = n, this.subscribe = r ?? !1;
|
|
25
|
+
this.host.addController(this);
|
|
26
|
+
}
|
|
27
|
+
hostConnected() {
|
|
28
|
+
this.dispatchRequest();
|
|
29
|
+
}
|
|
30
|
+
hostDisconnected() {
|
|
31
|
+
this.unsubscribe &&= (this.unsubscribe(), void 0);
|
|
32
|
+
}
|
|
33
|
+
dispatchRequest() {
|
|
34
|
+
this.host.dispatchEvent(new e(this.context, this.host, this.t, this.subscribe));
|
|
35
|
+
}
|
|
36
|
+
}, r = class {
|
|
37
|
+
get value() {
|
|
38
|
+
return this.o;
|
|
39
|
+
}
|
|
40
|
+
set value(e) {
|
|
41
|
+
this.setValue(e);
|
|
42
|
+
}
|
|
43
|
+
setValue(e, t = !1) {
|
|
44
|
+
let n = t || !Object.is(e, this.o);
|
|
45
|
+
this.o = e, n && this.updateObservers();
|
|
46
|
+
}
|
|
47
|
+
constructor(e) {
|
|
48
|
+
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
49
|
+
for (let [e, { disposer: t }] of this.subscriptions) e(this.o, t);
|
|
50
|
+
}, e !== void 0 && (this.value = e);
|
|
51
|
+
}
|
|
52
|
+
addCallback(e, t, n) {
|
|
53
|
+
if (!n) return void e(this.value);
|
|
54
|
+
this.subscriptions.has(e) || this.subscriptions.set(e, {
|
|
55
|
+
disposer: () => {
|
|
56
|
+
this.subscriptions.delete(e);
|
|
57
|
+
},
|
|
58
|
+
consumerHost: t
|
|
59
|
+
});
|
|
60
|
+
let { disposer: r } = this.subscriptions.get(e);
|
|
61
|
+
e(this.value, r);
|
|
62
|
+
}
|
|
63
|
+
clearCallbacks() {
|
|
64
|
+
this.subscriptions.clear();
|
|
65
|
+
}
|
|
66
|
+
}, i = class extends Event {
|
|
67
|
+
constructor(e, t) {
|
|
68
|
+
super("context-provider", {
|
|
69
|
+
bubbles: !0,
|
|
70
|
+
composed: !0
|
|
71
|
+
}), this.context = e, this.contextTarget = t;
|
|
72
|
+
}
|
|
73
|
+
}, a = class extends r {
|
|
74
|
+
constructor(t, n, r) {
|
|
75
|
+
super(n.context === void 0 ? r : n.initialValue), this.onContextRequest = (e) => {
|
|
76
|
+
if (e.context !== this.context) return;
|
|
77
|
+
let t = e.contextTarget ?? e.composedPath()[0];
|
|
78
|
+
t !== this.host && (e.stopPropagation(), this.addCallback(e.callback, t, e.subscribe));
|
|
79
|
+
}, this.onProviderRequest = (t) => {
|
|
80
|
+
if (t.context !== this.context || (t.contextTarget ?? t.composedPath()[0]) === this.host) return;
|
|
81
|
+
let n = /* @__PURE__ */ new Set();
|
|
82
|
+
for (let [t, { consumerHost: r }] of this.subscriptions) n.has(t) || (n.add(t), r.dispatchEvent(new e(this.context, r, t, !0)));
|
|
83
|
+
t.stopPropagation();
|
|
84
|
+
}, this.host = t, n.context === void 0 ? this.context = n : this.context = n.context, this.attachListeners(), this.host.addController?.(this);
|
|
85
|
+
}
|
|
86
|
+
attachListeners() {
|
|
87
|
+
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
88
|
+
}
|
|
89
|
+
hostConnected() {
|
|
90
|
+
this.host.dispatchEvent(new i(this.context, this.host));
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region node_modules/@lit/context/lib/decorators/provide.js
|
|
95
|
+
function o({ context: e }) {
|
|
96
|
+
return (t, n) => {
|
|
97
|
+
let r = /* @__PURE__ */ new WeakMap();
|
|
98
|
+
if (typeof n == "object") return {
|
|
99
|
+
get() {
|
|
100
|
+
return t.get.call(this);
|
|
101
|
+
},
|
|
102
|
+
set(e) {
|
|
103
|
+
return r.get(this).setValue(e), t.set.call(this, e);
|
|
104
|
+
},
|
|
105
|
+
init(t) {
|
|
106
|
+
return r.set(this, new a(this, {
|
|
107
|
+
context: e,
|
|
108
|
+
initialValue: t
|
|
109
|
+
})), t;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
{
|
|
113
|
+
t.constructor.addInitializer(((t) => {
|
|
114
|
+
r.set(t, new a(t, { context: e }));
|
|
115
|
+
}));
|
|
116
|
+
let i = Object.getOwnPropertyDescriptor(t, n), o;
|
|
117
|
+
if (i === void 0) {
|
|
118
|
+
let e = /* @__PURE__ */ new WeakMap();
|
|
119
|
+
o = {
|
|
120
|
+
get() {
|
|
121
|
+
return e.get(this);
|
|
122
|
+
},
|
|
123
|
+
set(t) {
|
|
124
|
+
r.get(this).setValue(t), e.set(this, t);
|
|
125
|
+
},
|
|
126
|
+
configurable: !0,
|
|
127
|
+
enumerable: !0
|
|
128
|
+
};
|
|
129
|
+
} else {
|
|
130
|
+
let e = i.set;
|
|
131
|
+
o = {
|
|
132
|
+
...i,
|
|
133
|
+
set(t) {
|
|
134
|
+
r.get(this).setValue(t), e?.call(this, t);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
Object.defineProperty(t, n, o);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region node_modules/@lit/context/lib/decorators/consume.js
|
|
145
|
+
function s({ context: e, subscribe: t }) {
|
|
146
|
+
return (r, i) => {
|
|
147
|
+
typeof i == "object" ? i.addInitializer((function() {
|
|
148
|
+
new n(this, {
|
|
149
|
+
context: e,
|
|
150
|
+
callback: (e) => {
|
|
151
|
+
r.set.call(this, e);
|
|
152
|
+
},
|
|
153
|
+
subscribe: t
|
|
154
|
+
});
|
|
155
|
+
})) : r.constructor.addInitializer(((r) => {
|
|
156
|
+
new n(r, {
|
|
157
|
+
context: e,
|
|
158
|
+
callback: (e) => {
|
|
159
|
+
r[i] = e;
|
|
160
|
+
},
|
|
161
|
+
subscribe: t
|
|
162
|
+
});
|
|
163
|
+
}));
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { o as n, t as r, s as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class extends Event{constructor(e,t,n,r){super(`context-request`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=n,this.subscribe=r??!1}};function t(e){return e}var n=class{constructor(e,t,n,r){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(e,t)=>{this.unsubscribe&&(this.unsubscribe!==t&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=e,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(e,t)),this.unsubscribe=t},this.host=e,t.context!==void 0){let e=t;this.context=e.context,this.callback=e.callback,this.subscribe=e.subscribe??!1}else this.context=t,this.callback=n,this.subscribe=r??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&=(this.unsubscribe(),void 0)}dispatchRequest(){this.host.dispatchEvent(new e(this.context,this.host,this.t,this.subscribe))}},r=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},i=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},a=class extends r{constructor(t,n,r){super(n.context===void 0?r:n.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context||(t.contextTarget??t.composedPath()[0])===this.host)return;let n=new Set;for(let[t,{consumerHost:r}]of this.subscriptions)n.has(t)||(n.add(t),r.dispatchEvent(new e(this.context,r,t,!0)));t.stopPropagation()},this.host=t,n.context===void 0?this.context=n:this.context=n.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new i(this.context,this.host))}};function o({context:e}){return(t,n)=>{let r=new WeakMap;if(typeof n==`object`)return{get(){return t.get.call(this)},set(e){return r.get(this).setValue(e),t.set.call(this,e)},init(t){return r.set(this,new a(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{r.set(t,new a(t,{context:e}))}));let i=Object.getOwnPropertyDescriptor(t,n),o;if(i===void 0){let e=new WeakMap;o={get(){return e.get(this)},set(t){r.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{let e=i.set;o={...i,set(t){r.get(this).setValue(t),e?.call(this,t)}}}Object.defineProperty(t,n,o);return}}}function s({context:e,subscribe:t}){return(r,i)=>{typeof i==`object`?i.addInitializer((function(){new n(this,{context:e,callback:e=>{r.set.call(this,e)},subscribe:t})})):r.constructor.addInitializer((r=>{new n(r,{context:e,callback:e=>{r[i]=e},subscribe:t})}))}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -1312,11 +1312,11 @@ var G = class e extends B {
|
|
|
1312
1312
|
//#endregion
|
|
1313
1313
|
//#region ../../shared-utils/date-utils.ts
|
|
1314
1314
|
typeof window < "u" && (window.pktTz = window.pktTz === void 0 ? "Europe/Oslo" : window.pktTz);
|
|
1315
|
-
var je = (e =
|
|
1315
|
+
var K = () => typeof window < "u" && window.pktTz || "Europe/Oslo", je = (e = K()) => {
|
|
1316
1316
|
let t = new G((/* @__PURE__ */ new Date()).toISOString(), e);
|
|
1317
1317
|
return t.setHours(0, 0, 0, 0), isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
1318
1318
|
};
|
|
1319
|
-
function
|
|
1319
|
+
function q(e) {
|
|
1320
1320
|
if (!e || e === "") return /* @__PURE__ */ new Date();
|
|
1321
1321
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
|
|
1322
1322
|
let [t, n, r] = e.split("-").map(Number);
|
|
@@ -1328,15 +1328,15 @@ function K(e) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
return /^\d{4}$/.test(e) ? new Date(Number(e), 0, 1) : new Date(e);
|
|
1330
1330
|
}
|
|
1331
|
-
var
|
|
1331
|
+
var J = (e) => !e || isNaN(e.getTime()) ? "" : `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Y = (e) => {
|
|
1332
1332
|
if (!e) return null;
|
|
1333
|
-
let t =
|
|
1333
|
+
let t = q(e);
|
|
1334
1334
|
return isNaN(t.getTime()) ? null : t;
|
|
1335
1335
|
}, Me = (e, t) => {
|
|
1336
|
-
let n =
|
|
1336
|
+
let n = X(e);
|
|
1337
1337
|
return isNaN(n.getTime()) ? "" : we(n, t);
|
|
1338
|
-
},
|
|
1339
|
-
let n = typeof e == "string" ?
|
|
1338
|
+
}, X = (e = "", t) => {
|
|
1339
|
+
let n = typeof e == "string" ? q(e) : e;
|
|
1340
1340
|
return !n || isNaN(n.getTime()) ? /* @__PURE__ */ new Date() : t ? t === "end" ? y(n) : m(n) : n;
|
|
1341
1341
|
}, Ne = (e, t, n = 1) => {
|
|
1342
1342
|
if (typeof e != "number" || typeof t != "number" || typeof n != "number" || isNaN(e) || isNaN(t) || isNaN(n)) return /* @__PURE__ */ new Date();
|
|
@@ -1344,36 +1344,36 @@ var q = (e) => !e || isNaN(e.getTime()) ? "" : `${e.getFullYear()}-${String(e.ge
|
|
|
1344
1344
|
return isNaN(r.getTime()) ? /* @__PURE__ */ new Date() : r;
|
|
1345
1345
|
}, Pe = (e) => {
|
|
1346
1346
|
let t;
|
|
1347
|
-
return t = new G(e,
|
|
1348
|
-
},
|
|
1347
|
+
return t = new G(e, K()), t.setHours(12, 0, 0, 0), t;
|
|
1348
|
+
}, Z = null, Q = void 0, Fe = (e) => {
|
|
1349
1349
|
if (!e || isNaN(e.getTime())) return "";
|
|
1350
1350
|
let t = typeof window < "u" ? window.pktTz : void 0;
|
|
1351
|
-
return (!
|
|
1351
|
+
return (!Z || Q !== t) && (Z = new Intl.DateTimeFormat("no", {
|
|
1352
1352
|
dateStyle: "full",
|
|
1353
1353
|
timeZone: t
|
|
1354
|
-
}),
|
|
1354
|
+
}), Q = t), Z.format(e);
|
|
1355
1355
|
}, Ie = (e, t, n) => {
|
|
1356
1356
|
if (!e || isNaN(e.getTime())) return !1;
|
|
1357
|
-
let r = t ?
|
|
1357
|
+
let r = t ? X(t) : null, i = n ? X(n) : null;
|
|
1358
1358
|
return !(r && e < r || i && e > i);
|
|
1359
1359
|
}, Le = (e, t) => {
|
|
1360
1360
|
if (!e || isNaN(e.getTime()) || !Array.isArray(t)) return !1;
|
|
1361
|
-
let n =
|
|
1361
|
+
let n = J(e);
|
|
1362
1362
|
return t.includes(n);
|
|
1363
1363
|
}, Re = (e, t) => {
|
|
1364
1364
|
if (!e || isNaN(e.getTime()) || !Array.isArray(t)) return !1;
|
|
1365
1365
|
let n = e.getDay().toString();
|
|
1366
1366
|
return t.includes(n);
|
|
1367
|
-
},
|
|
1368
|
-
let a =
|
|
1369
|
-
return a &&
|
|
1367
|
+
}, $ = (e, t, n, r, i) => !(!e || isNaN(e.getTime()) || !Ie(e, t, n) || r && Le(e, r) || i && Re(e, i)), ze = (e, t, n, r, i) => e.filter((e) => {
|
|
1368
|
+
let a = Y(e);
|
|
1369
|
+
return a && $(a, t, n, r, i);
|
|
1370
1370
|
}), Be = (e) => e.slice().sort((e, t) => {
|
|
1371
|
-
let n =
|
|
1371
|
+
let n = Y(e), r = Y(t);
|
|
1372
1372
|
return !n || !r ? 0 : n.getTime() - r.getTime();
|
|
1373
1373
|
}), Ve = (e, t) => {
|
|
1374
|
-
let n =
|
|
1374
|
+
let n = Y(e), r = Y(t);
|
|
1375
1375
|
return !n || !r ? !1 : n <= r;
|
|
1376
|
-
},
|
|
1376
|
+
}, He = (e) => {
|
|
1377
1377
|
if (!e) return [];
|
|
1378
1378
|
if (Array.isArray(e)) return e.filter(Boolean);
|
|
1379
1379
|
if (typeof e == "string" && e.trimStart().startsWith("[")) try {
|
|
@@ -1381,13 +1381,13 @@ var q = (e) => !e || isNaN(e.getTime()) ? "" : `${e.getFullYear()}-${String(e.ge
|
|
|
1381
1381
|
if (Array.isArray(t)) return t.filter(Boolean);
|
|
1382
1382
|
} catch {}
|
|
1383
1383
|
return String(e).split(",").map((e) => e.trim()).filter(Boolean);
|
|
1384
|
-
},
|
|
1385
|
-
csvToArray: (e) =>
|
|
1386
|
-
stringToDate: (e) => e ?
|
|
1384
|
+
}, Ue = (e) => e.join(","), We = {
|
|
1385
|
+
csvToArray: (e) => He(e),
|
|
1386
|
+
stringToDate: (e) => e ? q(e) : null,
|
|
1387
1387
|
stringsToDate: (e) => {
|
|
1388
|
-
if (typeof e == "string") return e.split(",").map((e) =>
|
|
1389
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1388
|
+
if (typeof e == "string") return e.split(",").map((e) => q(e));
|
|
1389
|
+
if (Array.isArray(e)) return e.map((e) => q(e));
|
|
1390
1390
|
}
|
|
1391
1391
|
};
|
|
1392
1392
|
//#endregion
|
|
1393
|
-
export { D as _,
|
|
1393
|
+
export { D as _, J as a, a as b, Me as c, X as d, Pe as f, je as g, Be as h, ze as i, $ as l, q as m, Ue as n, Fe as o, Ne as p, He as r, Y as s, We as t, Ve as u, p as v, o as y };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=365.2425,t=6048e5,n=864e5,r=3600*24;r*7,r*e/12*3;var i=Symbol.for(`constructDateFrom`);function a(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&i in e?e[i](t):e instanceof Date?new e.constructor(t):new Date(t)}function o(e,t){return a(t||e,e)}var s={};function c(){return s}function l(e,t){let n=c(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=o(e,t?.in),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function u(e,t){return l(e,{...t,weekStartsOn:1})}function d(e,t){let n=o(e,t?.in),r=n.getFullYear(),i=a(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let s=u(i),c=a(n,0);c.setFullYear(r,0,4),c.setHours(0,0,0,0);let l=u(c);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function f(e){let t=o(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function p(e,...t){let n=a.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function m(e,t){let n=o(e,t?.in);return n.setHours(0,0,0,0),n}function h(e,t,r){let[i,a]=p(r?.in,e,t),o=m(i),s=m(a),c=+o-f(o),l=+s-f(s);return Math.round((c-l)/n)}function g(e,t){let n=d(e,t),r=a(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),u(r)}function _(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function v(e){return!(!_(e)&&typeof e!=`number`||isNaN(+o(e)))}function y(e,t){let n=o(e,t?.in);return n.setHours(23,59,59,999),n}function b(e,t){let n=o(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var x={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`}},S=(e,t,n)=>{let r,i=x[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function C(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var ee={date:C({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:C({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:C({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},te={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ne=(e,t,n,r)=>te[e];function w(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var re={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:w({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:w({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:w({values:{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`]},defaultWidth:`wide`}),day:w({values:{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`]},defaultWidth:`wide`}),dayPeriod:w({values:{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`}},defaultWidth:`wide`,formattingValues:{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`}},defaultFormattingWidth:`wide`})};function T(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ae(s,e=>e.test(o)):ie(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ie(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ae(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oe(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var se={code:`en-US`,formatDistance:S,formatLong:ee,formatRelative:ne,localize:re,match:{ordinalNumber:oe({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:T({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),day:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),dayPeriod:T({matchPatterns:{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},defaultMatchWidth:`any`,parsePatterns:{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}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ce(e,t){let n=o(e,t?.in);return h(n,b(n))+1}function le(e,n){let r=o(e,n?.in),i=u(r)-+g(r);return Math.round(i/t)+1}function E(e,t){let n=o(e,t?.in),r=n.getFullYear(),i=c(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=a(t?.in||e,0);u.setFullYear(r+1,0,s),u.setHours(0,0,0,0);let d=l(u,t),f=a(t?.in||e,0);f.setFullYear(r,0,s),f.setHours(0,0,0,0);let p=l(f,t);return+n>=+d?r+1:+n>=+p?r:r-1}function ue(e,t){let n=c(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=E(e,t),o=a(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),l(o,t)}function D(e,n){let r=o(e,n?.in),i=l(r,n)-+ue(r,n);return Math.round(i/t)+1}function O(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var k={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return O(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):O(n+1,2)},d(e,t){return O(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return O(e.getHours()%12||12,t.length)},H(e,t){return O(e.getHours(),t.length)},m(e,t){return O(e.getMinutes(),t.length)},s(e,t){return O(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return O(Math.trunc(r*10**(n-3)),t.length)}},A={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},j={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return k.y(e,t)},Y:function(e,t,n,r){let i=E(e,r),a=i>0?i:1-i;return t===`YY`?O(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):O(a,t.length)},R:function(e,t){return O(d(e),t.length)},u:function(e,t){return O(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return O(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return O(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return k.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return O(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=D(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):O(i,t.length)},I:function(e,t,n){let r=le(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):O(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):k.d(e,t)},D:function(e,t,n){let r=ce(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):O(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return O(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return O(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return O(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?A.noon:r===0?A.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?A.evening:r>=12?A.afternoon:r>=4?A.morning:A.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return k.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):k.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):O(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):O(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):k.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):k.s(e,t)},S:function(e,t){return k.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return N(r);case`XXXX`:case`XX`:return P(r);default:return P(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return N(r);case`xxxx`:case`xx`:return P(r);default:return P(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+M(r,`:`);default:return`GMT`+P(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+M(r,`:`);default:return`GMT`+P(r,`:`)}},t:function(e,t,n){return O(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return O(+e,t.length)}};function M(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+O(a,2)}function N(e,t){return e%60==0?(e>0?`-`:`+`)+O(Math.abs(e)/60,2):P(e,t)}function P(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=O(Math.trunc(r/60),2),a=O(r%60,2);return n+i+t+a}var F=(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`});default:return t.date({width:`full`})}},I=(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`});default:return t.time({width:`full`})}},de={p:I,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return F(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,F(r,t)).replace(`{{time}}`,I(i,t))}},fe=/^D+$/,pe=/^Y+$/,me=[`D`,`DD`,`YY`,`YYYY`];function he(e){return fe.test(e)}function ge(e){return pe.test(e)}function _e(e,t,n){let r=ve(e,t,n);if(console.warn(r),me.includes(e))throw RangeError(r)}function ve(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var ye=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xe=/^'([^]*?)'?$/,Se=/''/g,Ce=/[a-zA-Z]/;function we(e,t,n){let r=c(),i=n?.locale??r.locale??se,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=o(e,n?.in);if(!v(l))throw RangeError(`Invalid time value`);let u=t.match(be).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=de[t];return n(e,i.formatLong)}return e}).join(``).match(ye).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Te(e)};if(j[t])return{isToken:!0,value:e};if(t.match(Ce))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(u=i.localize.preprocessor(l,u));let d={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return u.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&ge(a)||!n?.useAdditionalDayOfYearTokens&&he(a))&&_e(a,t,String(e));let o=j[a[0]];return o(l,a,i.localize,d)}).join(``)}function Te(e){let t=e.match(xe);return t?t[1].replace(Se,`'`):e}function Ee(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var De={},L={};function R(e,t){try{let n=(De[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in L?L[n]:z(n,n.split(`:`))}catch{if(e in L)return L[e];let t=e?.match(Oe);return t?z(e,t.slice(1)):NaN}}var Oe=/([+-]\d\d):?(\d\d)?/;function z(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return L[e]=n*60+r>0?n*60+r+i:n*60-r-i}var B=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(R(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),U(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-R(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),H(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},V=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!V.test(e))return;let t=e.replace(V,`$1UTC`);B.prototype[t]&&(e.startsWith(`get`)?B.prototype[e]=function(){return this.internal[t]()}:(B.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),ke(this),+this},B.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),H(this),+this}))});function H(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-R(e.timeZone,e)*60))}function ke(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()),U(e)}function U(e,t){let n=Array.isArray(t)?Ae(t):+e.internal,r=R(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),s=-new Date(+a).getTimezoneOffset(),c=o-s,l=o;if(c&&o!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=o-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=R(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(l=s)}let u=l-i;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let d=new Date(+e);d.setUTCSeconds(0);let f=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(R(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=R(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-h,_=h!==i,v=g-u,y=h-i,b=n-h*60*1e3,x=y>0&&W(e)-n===y*60*1e3&&W(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=R(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}H(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<1800*1e3&&(Date.prototype.setTime.call(e,+e+S),H(e))}function Ae(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function W(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-R(e.timeZone,n)*60)),+n}var G=class e extends B{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Ee(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};typeof window<`u`&&(window.pktTz=window.pktTz===void 0?`Europe/Oslo`:window.pktTz);var je=(e=window.pktTz)=>{let t=new G(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 K(e){if(!e||e===``)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)}if(/^\d{4}-\d{2}$/.test(e)){let[t,n]=e.split(`-`).map(Number);return new Date(t,n-1,1)}return/^\d{4}$/.test(e)?new Date(Number(e),0,1):new Date(e)}var q=e=>!e||isNaN(e.getTime())?``:`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,J=e=>{if(!e)return null;let t=K(e);return isNaN(t.getTime())?null:t},Me=(e,t)=>{let n=Y(e);return isNaN(n.getTime())?``:we(n,t)},Y=(e=``,t)=>{let n=typeof e==`string`?K(e):e;return!n||isNaN(n.getTime())?new Date:t?t===`end`?y(n):m(n):n},Ne=(e,t,n=1)=>{if(typeof e!=`number`||typeof t!=`number`||typeof n!=`number`||isNaN(e)||isNaN(t)||isNaN(n))return new Date;let r=new Date(e,t,n);return isNaN(r.getTime())?new Date:r},Pe=e=>{let t;return t=new G(e,window.pktTz),t.setHours(12,0,0,0),t},X=null,Z=void 0,Fe=e=>{if(!e||isNaN(e.getTime()))return``;let t=typeof window<`u`?window.pktTz:void 0;return(!X||Z!==t)&&(X=new Intl.DateTimeFormat(`no`,{dateStyle:`full`,timeZone:t}),Z=t),X.format(e)},Ie=(e,t,n)=>{if(!e||isNaN(e.getTime()))return!1;let r=t?Y(t):null,i=n?Y(n):null;return!(r&&e<r||i&&e>i)},Le=(e,t)=>{if(!e||isNaN(e.getTime())||!Array.isArray(t))return!1;let n=q(e);return t.includes(n)},Re=(e,t)=>{if(!e||isNaN(e.getTime())||!Array.isArray(t))return!1;let n=e.getDay().toString();return t.includes(n)},Q=(e,t,n,r,i)=>!(!e||isNaN(e.getTime())||!Ie(e,t,n)||r&&Le(e,r)||i&&Re(e,i)),ze=(e,t,n,r,i)=>e.filter(e=>{let a=J(e);return a&&Q(a,t,n,r,i)}),Be=e=>e.slice().sort((e,t)=>{let n=J(e),r=J(t);return!n||!r?0:n.getTime()-r.getTime()}),Ve=(e,t)=>{let n=J(e),r=J(t);return!n||!r?!1:n<=r},$=e=>{if(!e)return[];if(Array.isArray(e))return e.filter(Boolean);if(typeof e==`string`&&e.trimStart().startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t.filter(Boolean)}catch{}return String(e).split(`,`).map(e=>e.trim()).filter(Boolean)},He=e=>e.join(`,`),Ue={csvToArray:e=>$(e),stringToDate:e=>e?K(e):null,stringsToDate:e=>{if(typeof e==`string`)return e.split(`,`).map(e=>K(e));if(Array.isArray(e))return e.map(e=>K(e))}};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return o}});
|
|
1
|
+
var e=365.2425,t=6048e5,n=864e5,r=3600*24;r*7,r*e/12*3;var i=Symbol.for(`constructDateFrom`);function a(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&i in e?e[i](t):e instanceof Date?new e.constructor(t):new Date(t)}function o(e,t){return a(t||e,e)}var s={};function c(){return s}function l(e,t){let n=c(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=o(e,t?.in),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function u(e,t){return l(e,{...t,weekStartsOn:1})}function d(e,t){let n=o(e,t?.in),r=n.getFullYear(),i=a(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let s=u(i),c=a(n,0);c.setFullYear(r,0,4),c.setHours(0,0,0,0);let l=u(c);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function f(e){let t=o(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function p(e,...t){let n=a.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function m(e,t){let n=o(e,t?.in);return n.setHours(0,0,0,0),n}function h(e,t,r){let[i,a]=p(r?.in,e,t),o=m(i),s=m(a),c=+o-f(o),l=+s-f(s);return Math.round((c-l)/n)}function g(e,t){let n=d(e,t),r=a(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),u(r)}function _(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function v(e){return!(!_(e)&&typeof e!=`number`||isNaN(+o(e)))}function y(e,t){let n=o(e,t?.in);return n.setHours(23,59,59,999),n}function b(e,t){let n=o(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var x={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`}},S=(e,t,n)=>{let r,i=x[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function C(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var ee={date:C({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:C({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:C({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},te={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ne=(e,t,n,r)=>te[e];function w(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var re={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:w({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:w({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:w({values:{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`]},defaultWidth:`wide`}),day:w({values:{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`]},defaultWidth:`wide`}),dayPeriod:w({values:{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`}},defaultWidth:`wide`,formattingValues:{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`}},defaultFormattingWidth:`wide`})};function T(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?ae(s,e=>e.test(o)):ie(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function ie(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ae(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oe(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var se={code:`en-US`,formatDistance:S,formatLong:ee,formatRelative:ne,localize:re,match:{ordinalNumber:oe({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:T({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),day:T({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),dayPeriod:T({matchPatterns:{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},defaultMatchWidth:`any`,parsePatterns:{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}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ce(e,t){let n=o(e,t?.in);return h(n,b(n))+1}function le(e,n){let r=o(e,n?.in),i=u(r)-+g(r);return Math.round(i/t)+1}function E(e,t){let n=o(e,t?.in),r=n.getFullYear(),i=c(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=a(t?.in||e,0);u.setFullYear(r+1,0,s),u.setHours(0,0,0,0);let d=l(u,t),f=a(t?.in||e,0);f.setFullYear(r,0,s),f.setHours(0,0,0,0);let p=l(f,t);return+n>=+d?r+1:+n>=+p?r:r-1}function ue(e,t){let n=c(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=E(e,t),o=a(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),l(o,t)}function D(e,n){let r=o(e,n?.in),i=l(r,n)-+ue(r,n);return Math.round(i/t)+1}function O(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var k={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return O(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):O(n+1,2)},d(e,t){return O(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return O(e.getHours()%12||12,t.length)},H(e,t){return O(e.getHours(),t.length)},m(e,t){return O(e.getMinutes(),t.length)},s(e,t){return O(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return O(Math.trunc(r*10**(n-3)),t.length)}},A={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},j={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return k.y(e,t)},Y:function(e,t,n,r){let i=E(e,r),a=i>0?i:1-i;return t===`YY`?O(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):O(a,t.length)},R:function(e,t){return O(d(e),t.length)},u:function(e,t){return O(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return O(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return O(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return k.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return O(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=D(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):O(i,t.length)},I:function(e,t,n){let r=le(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):O(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):k.d(e,t)},D:function(e,t,n){let r=ce(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):O(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return O(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return O(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return O(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?A.noon:r===0?A.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?A.evening:r>=12?A.afternoon:r>=4?A.morning:A.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return k.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):k.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):O(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):O(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):k.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):k.s(e,t)},S:function(e,t){return k.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return N(r);case`XXXX`:case`XX`:return P(r);default:return P(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return N(r);case`xxxx`:case`xx`:return P(r);default:return P(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+M(r,`:`);default:return`GMT`+P(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+M(r,`:`);default:return`GMT`+P(r,`:`)}},t:function(e,t,n){return O(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return O(+e,t.length)}};function M(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+O(a,2)}function N(e,t){return e%60==0?(e>0?`-`:`+`)+O(Math.abs(e)/60,2):P(e,t)}function P(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=O(Math.trunc(r/60),2),a=O(r%60,2);return n+i+t+a}var F=(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`});default:return t.date({width:`full`})}},I=(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`});default:return t.time({width:`full`})}},de={p:I,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return F(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,F(r,t)).replace(`{{time}}`,I(i,t))}},fe=/^D+$/,pe=/^Y+$/,me=[`D`,`DD`,`YY`,`YYYY`];function he(e){return fe.test(e)}function ge(e){return pe.test(e)}function _e(e,t,n){let r=ve(e,t,n);if(console.warn(r),me.includes(e))throw RangeError(r)}function ve(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var ye=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xe=/^'([^]*?)'?$/,Se=/''/g,Ce=/[a-zA-Z]/;function we(e,t,n){let r=c(),i=n?.locale??r.locale??se,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=o(e,n?.in);if(!v(l))throw RangeError(`Invalid time value`);let u=t.match(be).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=de[t];return n(e,i.formatLong)}return e}).join(``).match(ye).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:Te(e)};if(j[t])return{isToken:!0,value:e};if(t.match(Ce))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(u=i.localize.preprocessor(l,u));let d={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return u.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&ge(a)||!n?.useAdditionalDayOfYearTokens&&he(a))&&_e(a,t,String(e));let o=j[a[0]];return o(l,a,i.localize,d)}).join(``)}function Te(e){let t=e.match(xe);return t?t[1].replace(Se,`'`):e}function Ee(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var De={},L={};function R(e,t){try{let n=(De[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in L?L[n]:z(n,n.split(`:`))}catch{if(e in L)return L[e];let t=e?.match(Oe);return t?z(e,t.slice(1)):NaN}}var Oe=/([+-]\d\d):?(\d\d)?/;function z(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return L[e]=n*60+r>0?n*60+r+i:n*60-r-i}var B=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(R(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),U(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-R(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),H(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},V=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!V.test(e))return;let t=e.replace(V,`$1UTC`);B.prototype[t]&&(e.startsWith(`get`)?B.prototype[e]=function(){return this.internal[t]()}:(B.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),ke(this),+this},B.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),H(this),+this}))});function H(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-R(e.timeZone,e)*60))}function ke(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()),U(e)}function U(e,t){let n=Array.isArray(t)?Ae(t):+e.internal,r=R(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),s=-new Date(+a).getTimezoneOffset(),c=o-s,l=o;if(c&&o!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=o-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=R(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(l=s)}let u=l-i;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let d=new Date(+e);d.setUTCSeconds(0);let f=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(R(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=R(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-h,_=h!==i,v=g-u,y=h-i,b=n-h*60*1e3,x=y>0&&W(e)-n===y*60*1e3&&W(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=R(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}H(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<1800*1e3&&(Date.prototype.setTime.call(e,+e+S),H(e))}function Ae(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function W(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-R(e.timeZone,n)*60)),+n}var G=class e extends B{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Ee(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}};typeof window<`u`&&(window.pktTz=window.pktTz===void 0?`Europe/Oslo`:window.pktTz);var K=()=>typeof window<`u`&&window.pktTz||`Europe/Oslo`,je=(e=K())=>{let t=new G(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 q(e){if(!e||e===``)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)}if(/^\d{4}-\d{2}$/.test(e)){let[t,n]=e.split(`-`).map(Number);return new Date(t,n-1,1)}return/^\d{4}$/.test(e)?new Date(Number(e),0,1):new Date(e)}var J=e=>!e||isNaN(e.getTime())?``:`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,Y=e=>{if(!e)return null;let t=q(e);return isNaN(t.getTime())?null:t},Me=(e,t)=>{let n=X(e);return isNaN(n.getTime())?``:we(n,t)},X=(e=``,t)=>{let n=typeof e==`string`?q(e):e;return!n||isNaN(n.getTime())?new Date:t?t===`end`?y(n):m(n):n},Ne=(e,t,n=1)=>{if(typeof e!=`number`||typeof t!=`number`||typeof n!=`number`||isNaN(e)||isNaN(t)||isNaN(n))return new Date;let r=new Date(e,t,n);return isNaN(r.getTime())?new Date:r},Pe=e=>{let t;return t=new G(e,K()),t.setHours(12,0,0,0),t},Z=null,Q=void 0,Fe=e=>{if(!e||isNaN(e.getTime()))return``;let t=typeof window<`u`?window.pktTz:void 0;return(!Z||Q!==t)&&(Z=new Intl.DateTimeFormat(`no`,{dateStyle:`full`,timeZone:t}),Q=t),Z.format(e)},Ie=(e,t,n)=>{if(!e||isNaN(e.getTime()))return!1;let r=t?X(t):null,i=n?X(n):null;return!(r&&e<r||i&&e>i)},Le=(e,t)=>{if(!e||isNaN(e.getTime())||!Array.isArray(t))return!1;let n=J(e);return t.includes(n)},Re=(e,t)=>{if(!e||isNaN(e.getTime())||!Array.isArray(t))return!1;let n=e.getDay().toString();return t.includes(n)},$=(e,t,n,r,i)=>!(!e||isNaN(e.getTime())||!Ie(e,t,n)||r&&Le(e,r)||i&&Re(e,i)),ze=(e,t,n,r,i)=>e.filter(e=>{let a=Y(e);return a&&$(a,t,n,r,i)}),Be=e=>e.slice().sort((e,t)=>{let n=Y(e),r=Y(t);return!n||!r?0:n.getTime()-r.getTime()}),Ve=(e,t)=>{let n=Y(e),r=Y(t);return!n||!r?!1:n<=r},He=e=>{if(!e)return[];if(Array.isArray(e))return e.filter(Boolean);if(typeof e==`string`&&e.trimStart().startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t.filter(Boolean)}catch{}return String(e).split(`,`).map(e=>e.trim()).filter(Boolean)},Ue=e=>e.join(`,`),We={csvToArray:e=>He(e),stringToDate:e=>e?q(e):null,stringsToDate:e=>{if(typeof e==`string`)return e.split(`,`).map(e=>q(e));if(Array.isArray(e))return e.map(e=>q(e))}};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return o}});
|
|
@@ -4,13 +4,13 @@ import { n as c } from "./element-with-slot-mXLg8gg8.js";
|
|
|
4
4
|
import "./icon-DGFEIlco.js";
|
|
5
5
|
import { t as l } from "./if-defined-D0bnetLJ.js";
|
|
6
6
|
import { n as u, t as d } from "./ref-WGS0u7i2.js";
|
|
7
|
-
import { a as f, c as p, d as m, h, i as g, m as _, n as v, r as y, s as b, t as x, u as S } from "./converters-
|
|
8
|
-
import "./calendar-
|
|
7
|
+
import { a as f, c as p, d as m, h, i as g, m as _, n as v, r as y, s as b, t as x, u as S } from "./converters-BBfsEJV5.js";
|
|
8
|
+
import "./calendar-CjC4qlh6.js";
|
|
9
9
|
import "./tag-DBNga0hg.js";
|
|
10
10
|
import { t as C } from "./repeat-BH0cL82q.js";
|
|
11
11
|
import { n as w, t as T } from "./utils-BwF4QSrq.js";
|
|
12
|
-
import { t as E } from "./input-element-
|
|
13
|
-
import "./input-wrapper-
|
|
12
|
+
import { t as E } from "./input-element-C0RnXi-J.js";
|
|
13
|
+
import "./input-wrapper-fWV5P4MN.js";
|
|
14
14
|
//#region ../../shared-types/datepicker.ts
|
|
15
15
|
var D = { calendar: { buttonAltText: "Åpne kalender" } }, O = {
|
|
16
16
|
calendar: { buttonAltText: "Åpne kalender" },
|
|
@@ -211,6 +211,18 @@ var A = {
|
|
|
211
211
|
reflect: !0,
|
|
212
212
|
category: "ui"
|
|
213
213
|
},
|
|
214
|
+
inputSize: {
|
|
215
|
+
attribute: "input-size",
|
|
216
|
+
name: "Størrelse",
|
|
217
|
+
description: "Størrelsen på komponenten",
|
|
218
|
+
type: [
|
|
219
|
+
"medium",
|
|
220
|
+
"small",
|
|
221
|
+
"xsmall"
|
|
222
|
+
],
|
|
223
|
+
default: "medium",
|
|
224
|
+
category: "ui"
|
|
225
|
+
},
|
|
214
226
|
required: {
|
|
215
227
|
type: "boolean",
|
|
216
228
|
name: "Påkrevd",
|
|
@@ -301,19 +313,21 @@ var A = {
|
|
|
301
313
|
}, j = () => {
|
|
302
314
|
let e = navigator.userAgent;
|
|
303
315
|
return !!(/iP(hone|od|ad)/.test(e) || /Macintosh/.test(e) && "ontouchend" in document);
|
|
304
|
-
}, M = () => j() ? "text" : "date", N = (e) => !e || e.length !== 2 ? !0 : S(e[0], e[1]), ee = (e) => h(e), te = (e, t, n, r, i) => g(e, t, n, r, i), P = (e, t, n, r, i, a) => ({
|
|
316
|
+
}, M = () => j() ? "text" : "date", N = (e) => !e || e.length !== 2 ? !0 : S(e[0], e[1]), ee = (e) => h(e), te = (e, t, n, r, i) => g(e, t, n, r, i), P = (e, t, n, r, i, a, o = "medium") => ({
|
|
305
317
|
"pkt-input": !0,
|
|
306
318
|
"pkt-datepicker__input": !0,
|
|
319
|
+
[`pkt-input--${o}`]: !0,
|
|
307
320
|
"pkt-input--fullwidth": e,
|
|
308
321
|
"pkt-datepicker--hasrangelabels": t,
|
|
309
322
|
"pkt-datepicker--multiple": n,
|
|
310
323
|
"pkt-datepicker--range": r,
|
|
311
324
|
"ios-readonly-hack": i === !1 && a === "text"
|
|
312
|
-
}), F = () => ({
|
|
325
|
+
}), F = (e = "medium") => ({
|
|
313
326
|
"pkt-input-icon": !0,
|
|
314
327
|
"pkt-btn": !0,
|
|
315
328
|
"pkt-btn--icon-only": !0,
|
|
316
329
|
"pkt-btn--tertiary": !0,
|
|
330
|
+
[`pkt-btn--${e}`]: !0,
|
|
317
331
|
"pkt-datepicker__calendar-button": !0
|
|
318
332
|
}), I = (e) => ({
|
|
319
333
|
"pkt-input-prefix": e,
|
|
@@ -321,7 +335,7 @@ var A = {
|
|
|
321
335
|
}), L = (e, t, n) => !t && !n ? Array.isArray(e) ? e[0] || "" : e : Array.isArray(e) ? e.join(",") : e, R = (e, t, n = !1) => {
|
|
322
336
|
if (!e || !t) return;
|
|
323
337
|
let r = t.parentElement?.getBoundingClientRect() || t.getBoundingClientRect(), i = n ? r.height + 30 : r.height, a = e.getBoundingClientRect().height, o = n ? "calc(100% - 30px)" : "100%";
|
|
324
|
-
r && r.top + a > window.innerHeight && r.top - a > 0 && (o = `calc(100% - ${i}px - ${a}px)`), e.style.top = o;
|
|
338
|
+
r && typeof window < "u" && r.top + a > window.innerHeight && r.top - a > 0 && (o = `calc(100% - ${i}px - ${a}px)`), e.style.top = o;
|
|
325
339
|
}, z = (e, t, n, r, i, a) => {
|
|
326
340
|
let { key: o } = e;
|
|
327
341
|
o === "," && (e.preventDefault(), a ? a(e) : i && i()), (o === "Space" || o === " ") && (e.preventDefault(), t(e)), o === "Enter" && (e.preventDefault(), n ? n() : r ? r() : i && i());
|
|
@@ -491,7 +505,7 @@ try {
|
|
|
491
505
|
//#region src/components/datepicker/datepicker-base.ts
|
|
492
506
|
var Y = class extends o {
|
|
493
507
|
constructor(...e) {
|
|
494
|
-
super(...e), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputRef = d(), this.btnRef = d();
|
|
508
|
+
super(...e), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputSize = "medium", this.inputRef = d(), this.btnRef = d();
|
|
495
509
|
}
|
|
496
510
|
get inputElement() {
|
|
497
511
|
return this.inputRef.value;
|
|
@@ -539,7 +553,7 @@ var Y = class extends o {
|
|
|
539
553
|
renderCalendarButton() {
|
|
540
554
|
return i`
|
|
541
555
|
<button
|
|
542
|
-
class="${s(G.getButtonClasses())}"
|
|
556
|
+
class="${s(G.getButtonClasses(this.inputSize))}"
|
|
543
557
|
type="button"
|
|
544
558
|
@click=${(e) => this.dispatchToggleCalendar(e)}
|
|
545
559
|
@keydown=${(e) => {
|
|
@@ -558,7 +572,7 @@ var Y = class extends o {
|
|
|
558
572
|
return this;
|
|
559
573
|
}
|
|
560
574
|
};
|
|
561
|
-
n([r({ type: String })], Y.prototype, "inputType", void 0), n([r({ type: String })], Y.prototype, "id", void 0), n([r({ type: String })], Y.prototype, "min", void 0), n([r({ type: String })], Y.prototype, "max", void 0), n([r({ type: String })], Y.prototype, "placeholder", void 0), n([r({ type: Boolean })], Y.prototype, "readonly", void 0), n([r({ type: Boolean })], Y.prototype, "disabled", void 0), n([r({ type: Object })], Y.prototype, "inputClasses", void 0), n([r({ type: Object })], Y.prototype, "internals", void 0);
|
|
575
|
+
n([r({ type: String })], Y.prototype, "inputType", void 0), n([r({ type: String })], Y.prototype, "id", void 0), n([r({ type: String })], Y.prototype, "min", void 0), n([r({ type: String })], Y.prototype, "max", void 0), n([r({ type: String })], Y.prototype, "placeholder", void 0), n([r({ type: Boolean })], Y.prototype, "readonly", void 0), n([r({ type: Boolean })], Y.prototype, "disabled", void 0), n([r({ type: Object })], Y.prototype, "inputClasses", void 0), n([r({ type: String })], Y.prototype, "inputSize", void 0), n([r({ type: Object })], Y.prototype, "internals", void 0);
|
|
562
576
|
//#endregion
|
|
563
577
|
//#region src/components/datepicker/datepicker-single.ts
|
|
564
578
|
var X = class extends Y {
|
|
@@ -845,7 +859,7 @@ var $ = class extends E {
|
|
|
845
859
|
let t = Array.isArray(this.value) ? this.value.join(",") : this.value, n = e.get("value"), r = Array.isArray(n) ? n.join(",") : n;
|
|
846
860
|
this.valueChanged(t, r);
|
|
847
861
|
}
|
|
848
|
-
e.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = y(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), super.updated(e);
|
|
862
|
+
e.has("multiple") && (this.multiple && !Array.isArray(this._value) ? this._value = y(this.value) : !this.multiple && Array.isArray(this._value) && (this._value = this._value.filter(Boolean)), !this.multiple && !this.range && Array.isArray(this._value) && (this._value = [this._value[0] ?? ""])), this.classList.toggle("pkt-datepicker--medium", this.inputSize === "medium"), this.classList.toggle("pkt-datepicker--small", this.inputSize === "small"), this.classList.toggle("pkt-datepicker--xsmall", this.inputSize === "xsmall"), super.updated(e);
|
|
849
863
|
}
|
|
850
864
|
get inputRef() {
|
|
851
865
|
return { value: this.currentInputElement };
|
|
@@ -877,6 +891,7 @@ var $ = class extends E {
|
|
|
877
891
|
.readonly=${this.readonly}
|
|
878
892
|
.disabled=${this.disabled}
|
|
879
893
|
.inputClasses=${this.inputClasses}
|
|
894
|
+
.inputSize=${this.inputSize}
|
|
880
895
|
.internals=${this.internals}
|
|
881
896
|
.strings=${this.strings}
|
|
882
897
|
@toggle-calendar=${(e) => this.toggleCalendar(e.detail)}
|
|
@@ -910,6 +925,7 @@ var $ = class extends E {
|
|
|
910
925
|
.disabled=${this.disabled}
|
|
911
926
|
.showRangeLabels=${this.showRangeLabels}
|
|
912
927
|
.inputClasses=${this.inputClasses}
|
|
928
|
+
.inputSize=${this.inputSize}
|
|
913
929
|
.internals=${this.internals}
|
|
914
930
|
.strings=${this.strings}
|
|
915
931
|
@toggle-calendar=${(e) => this.toggleCalendar(e.detail)}
|
|
@@ -961,6 +977,7 @@ var $ = class extends E {
|
|
|
961
977
|
.disabled=${this.disabled}
|
|
962
978
|
.maxlength=${this.maxlength}
|
|
963
979
|
.inputClasses=${this.inputClasses}
|
|
980
|
+
.inputSize=${this.inputSize}
|
|
964
981
|
.internals=${this.internals}
|
|
965
982
|
.strings=${this.strings}
|
|
966
983
|
@toggle-calendar=${(e) => this.toggleCalendar(e.detail)}
|
|
@@ -1005,7 +1022,7 @@ var $ = class extends E {
|
|
|
1005
1022
|
`;
|
|
1006
1023
|
}
|
|
1007
1024
|
render() {
|
|
1008
|
-
return this.inputClasses = G.getInputClasses(this.fullwidth, this.showRangeLabels, this.multiple, this.range, this.readonly, this.inputType), i`
|
|
1025
|
+
return this.inputClasses = G.getInputClasses(this.fullwidth, this.showRangeLabels, this.multiple, this.range, this.readonly, this.inputType, this.inputSize), i`
|
|
1009
1026
|
<pkt-input-wrapper
|
|
1010
1027
|
label="${this.label}"
|
|
1011
1028
|
forId="${this.id}-input"
|
|
@@ -1028,6 +1045,7 @@ var $ = class extends E {
|
|
|
1028
1045
|
.helptextDropdown=${this.helptextDropdown}
|
|
1029
1046
|
.helptextDropdownButton=${this.helptextDropdownButton}
|
|
1030
1047
|
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
1048
|
+
.size=${this.inputSize}
|
|
1031
1049
|
class="pkt-datepicker"
|
|
1032
1050
|
>
|
|
1033
1051
|
<div class="pkt-contents" slot="helptext">${c(this, "helptext")}</div>
|