@myparcel-dev/pdk-checkout-js 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +893 -893
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
1
|
+
var ge = /* @__PURE__ */ ((e) => (e.Billing = "billing", e.Shipping = "shipping", e))(ge || {}), M = /* @__PURE__ */ ((e) => (e.Address1 = "address1", e.Address2 = "address2", e.City = "city", e.Country = "country", e.PostalCode = "postalCode", e))(M || {}), ae = /* @__PURE__ */ ((e) => (e.AddressType = "addressType", e.ShippingMethod = "shippingMethod", e))(ae || {}), rt = /* @__PURE__ */ ((e) => (e.CheckoutUpdate = "checkoutUpdate", e.CheckoutUpdated = "checkoutUpdated", e.StoreInitialize = "storeInitialize", e.StoreInitialized = "storeInitialized", e))(rt || {});
|
|
2
|
+
const gs = "myparcelnl", ys = ":", ar = "store", At = "checkout", Rn = "initialize", Un = `${Rn}d`, wr = "update", Wn = `${wr}d`, Oe = (...e) => [gs, ...e].join(ys);
|
|
3
3
|
Oe(At, wr);
|
|
4
4
|
Oe(At, Wn);
|
|
5
5
|
Oe(ar, Un);
|
|
6
|
-
var we = /* @__PURE__ */ ((e) => (e.Update = "update", e))(we || {}),
|
|
6
|
+
var we = /* @__PURE__ */ ((e) => (e.Update = "update", e))(we || {}), P = /* @__PURE__ */ ((e) => (e.CreateStore = "createStore", e.DoRequest = "doRequest", e.FieldsEqual = "fieldsEqual", e.GetAddressField = "getAddressField", e.GetAddressFieldValue = "getAddressFieldValue", e.GetElement = "getElement", e.GetFieldValue = "getFieldValue", e.IsEnumValue = "isEnumValue", e.IsOfType = "isOfType", e.SetFieldValue = "setFieldValue", e.TriggerEvent = "triggerEvent", e))(P || {}), zn = /* @__PURE__ */ ((e) => (e.FetchCheckoutContext = "fetchCheckoutContext", e.ProxyAddressesList = "proxyAddressList", e.ProxyAddressValidate = "proxyAddressValidate", e.ProxyCapabilities = "proxyCapabilities", e))(zn || {});
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function
|
|
8
|
+
function ms(e) {
|
|
9
9
|
const t = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
for (const r of e.split(",")) t[r] = 1;
|
|
11
11
|
return (r) => r in t;
|
|
12
12
|
}
|
|
13
13
|
const br = {}, Ot = () => {
|
|
14
|
-
}, kr = Object.assign,
|
|
14
|
+
}, kr = Object.assign, vs = (e, t) => {
|
|
15
15
|
const r = e.indexOf(t);
|
|
16
16
|
r > -1 && e.splice(r, 1);
|
|
17
|
-
},
|
|
17
|
+
}, ws = Object.prototype.hasOwnProperty, or = (e, t) => ws.call(e, t), J = Array.isArray, it = (e) => $t(e) === "[object Map]", bs = (e) => $t(e) === "[object Set]", se = (e) => typeof e == "function", ks = (e) => typeof e == "string", Ae = (e) => typeof e == "symbol", xe = (e) => e !== null && typeof e == "object", Ds = (e) => (xe(e) || se(e)) && se(e.then) && se(e.catch), Ss = Object.prototype.toString, $t = (e) => Ss.call(e), _s = (e) => $t(e).slice(8, -1), Ps = (e) => $t(e) === "[object Object]", qt = (e) => ks(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Es = (e) => {
|
|
18
18
|
const t = /* @__PURE__ */ Object.create(null);
|
|
19
19
|
return (r) => t[r] || (t[r] = e(r));
|
|
20
|
-
}, Zt =
|
|
20
|
+
}, Zt = Es((e) => e.charAt(0).toUpperCase() + e.slice(1)), ee = (e, t) => !Object.is(e, t);
|
|
21
21
|
let sn;
|
|
22
|
-
const
|
|
22
|
+
const Dr = () => sn || (sn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
23
23
|
let x;
|
|
24
|
-
class
|
|
24
|
+
class Os {
|
|
25
25
|
// TODO isolatedDeclarations "__v_skip"
|
|
26
26
|
constructor(t = !1) {
|
|
27
27
|
this.detached = t, this._active = !0, this._on = 0, this.effects = [], this.cleanups = [], this._isPaused = !1, this._warnOnRun = !0, this.__v_skip = !0, !t && x && (x.active ? (this.parent = x, this.index = (x.scopes || (x.scopes = [])).push(
|
|
@@ -121,18 +121,18 @@ class Ts {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
return new
|
|
124
|
+
function Ts(e) {
|
|
125
|
+
return new Os(e);
|
|
126
126
|
}
|
|
127
127
|
function $n() {
|
|
128
128
|
return x;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Cs(e, t = !1) {
|
|
131
131
|
x && x.cleanups.push(e);
|
|
132
132
|
}
|
|
133
133
|
let T;
|
|
134
134
|
const er = /* @__PURE__ */ new WeakSet();
|
|
135
|
-
class
|
|
135
|
+
class As {
|
|
136
136
|
constructor(t) {
|
|
137
137
|
this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, x && (x.active ? x.effects.push(this) : this.flags &= -2);
|
|
138
138
|
}
|
|
@@ -188,7 +188,7 @@ function Hn(e, t = !1) {
|
|
|
188
188
|
}
|
|
189
189
|
e.next = st, st = e;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Sr() {
|
|
192
192
|
qn++;
|
|
193
193
|
}
|
|
194
194
|
function _r() {
|
|
@@ -225,7 +225,7 @@ function Yn(e) {
|
|
|
225
225
|
let t, r = e.depsTail, n = r;
|
|
226
226
|
for (; n; ) {
|
|
227
227
|
const i = n.prevDep;
|
|
228
|
-
n.version === -1 ? (n === r && (r = i), Pr(n),
|
|
228
|
+
n.version === -1 ? (n === r && (r = i), Pr(n), xs(n)) : t = n, n.dep.activeLink = n.prevActiveLink, n.prevActiveLink = void 0, n = i;
|
|
229
229
|
}
|
|
230
230
|
e.deps = t, e.depsTail = r;
|
|
231
231
|
}
|
|
@@ -260,7 +260,7 @@ function Pr(e, t = !1) {
|
|
|
260
260
|
}
|
|
261
261
|
!t && !--r.sc && r.map && r.map.delete(r.key);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function xs(e) {
|
|
264
264
|
const { prevDep: t, nextDep: r } = e;
|
|
265
265
|
t && (t.nextDep = r, e.prevDep = void 0), r && (r.prevDep = t, e.nextDep = void 0);
|
|
266
266
|
}
|
|
@@ -286,7 +286,7 @@ function an(e) {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
let ct = 0;
|
|
289
|
-
class
|
|
289
|
+
class Ms {
|
|
290
290
|
constructor(t, r) {
|
|
291
291
|
this.sub = t, this.dep = r, this.version = r.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
292
292
|
}
|
|
@@ -301,7 +301,7 @@ class Er {
|
|
|
301
301
|
return;
|
|
302
302
|
let r = this.activeLink;
|
|
303
303
|
if (r === void 0 || r.sub !== T)
|
|
304
|
-
r = this.activeLink = new
|
|
304
|
+
r = this.activeLink = new Ms(T, this), T.deps ? (r.prevDep = T.depsTail, T.depsTail.nextDep = r, T.depsTail = r) : T.deps = T.depsTail = r, Kn(r);
|
|
305
305
|
else if (r.version === -1 && (r.version = this.version, r.nextDep)) {
|
|
306
306
|
const n = r.nextDep;
|
|
307
307
|
n.prevDep = r.prevDep, r.prevDep && (r.prevDep.nextDep = n), r.prevDep = T.depsTail, r.nextDep = void 0, T.depsTail.nextDep = r, T.depsTail = r, T.deps === r && (T.deps = n);
|
|
@@ -312,7 +312,7 @@ class Er {
|
|
|
312
312
|
this.version++, ct++, this.notify(t);
|
|
313
313
|
}
|
|
314
314
|
notify(t) {
|
|
315
|
-
|
|
315
|
+
Sr();
|
|
316
316
|
try {
|
|
317
317
|
for (let r = this.subs; r; r = r.prevSub)
|
|
318
318
|
r.sub.notify() && r.sub.dep.notify();
|
|
@@ -348,7 +348,7 @@ function R(e, t, r) {
|
|
|
348
348
|
i || (n.set(r, i = new Er()), i.map = n, i.key = r), i.track();
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ye(e, t, r, n, i, s) {
|
|
352
352
|
const a = xt.get(e);
|
|
353
353
|
if (!a) {
|
|
354
354
|
ct++;
|
|
@@ -357,19 +357,19 @@ function ge(e, t, r, n, i, s) {
|
|
|
357
357
|
const o = (c) => {
|
|
358
358
|
c && c.trigger();
|
|
359
359
|
};
|
|
360
|
-
if (
|
|
360
|
+
if (Sr(), t === "clear")
|
|
361
361
|
a.forEach(o);
|
|
362
362
|
else {
|
|
363
|
-
const c = J(e),
|
|
363
|
+
const c = J(e), l = c && qt(r);
|
|
364
364
|
if (c && r === "length") {
|
|
365
|
-
const
|
|
365
|
+
const u = Number(n);
|
|
366
366
|
a.forEach((d, p) => {
|
|
367
|
-
(p === "length" || p === lt || !Ae(p) && p >=
|
|
367
|
+
(p === "length" || p === lt || !Ae(p) && p >= u) && o(d);
|
|
368
368
|
});
|
|
369
369
|
} else
|
|
370
|
-
switch ((r !== void 0 || a.has(void 0)) && o(a.get(r)),
|
|
370
|
+
switch ((r !== void 0 || a.has(void 0)) && o(a.get(r)), l && o(a.get(lt)), t) {
|
|
371
371
|
case "add":
|
|
372
|
-
c ?
|
|
372
|
+
c ? l && o(a.get("length")) : (o(a.get(Te)), it(e) && o(a.get(lr)));
|
|
373
373
|
break;
|
|
374
374
|
case "delete":
|
|
375
375
|
c || (o(a.get(Te)), it(e) && o(a.get(lr)));
|
|
@@ -381,21 +381,21 @@ function ge(e, t, r, n, i, s) {
|
|
|
381
381
|
}
|
|
382
382
|
_r();
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function js(e, t) {
|
|
385
385
|
const r = xt.get(e);
|
|
386
386
|
return r && r.get(t);
|
|
387
387
|
}
|
|
388
388
|
function Fe(e) {
|
|
389
|
-
const t = /* @__PURE__ */
|
|
390
|
-
return t === e ? t : (R(t, "iterate", lt), /* @__PURE__ */ G(e) ? t : t.map(
|
|
389
|
+
const t = /* @__PURE__ */ _(e);
|
|
390
|
+
return t === e ? t : (R(t, "iterate", lt), /* @__PURE__ */ G(e) ? t : t.map(oe));
|
|
391
391
|
}
|
|
392
392
|
function Or(e) {
|
|
393
|
-
return R(e = /* @__PURE__ */
|
|
393
|
+
return R(e = /* @__PURE__ */ _(e), "iterate", lt), e;
|
|
394
394
|
}
|
|
395
395
|
function Z(e, t) {
|
|
396
|
-
return /* @__PURE__ */ be(e) ? jt(/* @__PURE__ */ ot(e) ?
|
|
396
|
+
return /* @__PURE__ */ be(e) ? jt(/* @__PURE__ */ ot(e) ? oe(t) : t) : oe(t);
|
|
397
397
|
}
|
|
398
|
-
const
|
|
398
|
+
const Ns = {
|
|
399
399
|
__proto__: null,
|
|
400
400
|
[Symbol.iterator]() {
|
|
401
401
|
return tr(this, Symbol.iterator, (e) => Z(this, e));
|
|
@@ -512,50 +512,50 @@ function tr(e, t, r) {
|
|
|
512
512
|
return s.done || (s.value = r(s.value)), s;
|
|
513
513
|
}), i;
|
|
514
514
|
}
|
|
515
|
-
const
|
|
515
|
+
const Fs = Array.prototype;
|
|
516
516
|
function ne(e, t, r, n, i, s) {
|
|
517
517
|
const a = Or(e), o = a !== e && !/* @__PURE__ */ G(e), c = a[t];
|
|
518
|
-
if (c !==
|
|
518
|
+
if (c !== Fs[t]) {
|
|
519
519
|
const d = c.apply(e, s);
|
|
520
|
-
return o ?
|
|
520
|
+
return o ? oe(d) : d;
|
|
521
521
|
}
|
|
522
|
-
let
|
|
523
|
-
a !== e && (o ?
|
|
522
|
+
let l = r;
|
|
523
|
+
a !== e && (o ? l = function(d, p) {
|
|
524
524
|
return r.call(this, Z(e, d), p, e);
|
|
525
|
-
} : r.length > 2 && (
|
|
525
|
+
} : r.length > 2 && (l = function(d, p) {
|
|
526
526
|
return r.call(this, d, p, e);
|
|
527
527
|
}));
|
|
528
|
-
const
|
|
529
|
-
return o && i ? i(
|
|
528
|
+
const u = c.call(a, l, n);
|
|
529
|
+
return o && i ? i(u) : u;
|
|
530
530
|
}
|
|
531
531
|
function on(e, t, r, n) {
|
|
532
532
|
const i = Or(e), s = i !== e && !/* @__PURE__ */ G(e);
|
|
533
533
|
let a = r, o = !1;
|
|
534
|
-
i !== e && (s ? (o = n.length === 0, a = function(
|
|
535
|
-
return o && (o = !1,
|
|
536
|
-
}) : r.length > 3 && (a = function(
|
|
537
|
-
return r.call(this,
|
|
534
|
+
i !== e && (s ? (o = n.length === 0, a = function(l, u, d) {
|
|
535
|
+
return o && (o = !1, l = Z(e, l)), r.call(this, l, Z(e, u), d, e);
|
|
536
|
+
}) : r.length > 3 && (a = function(l, u, d) {
|
|
537
|
+
return r.call(this, l, u, d, e);
|
|
538
538
|
}));
|
|
539
539
|
const c = i[t](a, ...n);
|
|
540
540
|
return o ? Z(e, c) : c;
|
|
541
541
|
}
|
|
542
542
|
function rr(e, t, r) {
|
|
543
|
-
const n = /* @__PURE__ */
|
|
543
|
+
const n = /* @__PURE__ */ _(e);
|
|
544
544
|
R(n, "iterate", lt);
|
|
545
545
|
const i = n[t](...r);
|
|
546
|
-
return (i === -1 || i === !1) && /* @__PURE__ */ ni(r[0]) ? (r[0] = /* @__PURE__ */
|
|
546
|
+
return (i === -1 || i === !1) && /* @__PURE__ */ ni(r[0]) ? (r[0] = /* @__PURE__ */ _(r[0]), n[t](...r)) : i;
|
|
547
547
|
}
|
|
548
548
|
function Xe(e, t, r = []) {
|
|
549
|
-
Ht(),
|
|
550
|
-
const n = (/* @__PURE__ */
|
|
549
|
+
Ht(), Sr();
|
|
550
|
+
const n = (/* @__PURE__ */ _(e))[t].apply(e, r);
|
|
551
551
|
return _r(), Bt(), n;
|
|
552
552
|
}
|
|
553
|
-
const
|
|
553
|
+
const Ls = /* @__PURE__ */ ms("__proto__,__v_isRef,__isVue"), Xn = new Set(
|
|
554
554
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Ae)
|
|
555
555
|
);
|
|
556
|
-
function
|
|
556
|
+
function Is(e) {
|
|
557
557
|
Ae(e) || (e = String(e));
|
|
558
|
-
const t = /* @__PURE__ */
|
|
558
|
+
const t = /* @__PURE__ */ _(this);
|
|
559
559
|
return R(t, "has", e), t.hasOwnProperty(e);
|
|
560
560
|
}
|
|
561
561
|
class Qn {
|
|
@@ -572,16 +572,16 @@ class Qn {
|
|
|
572
572
|
if (r === "__v_isShallow")
|
|
573
573
|
return s;
|
|
574
574
|
if (r === "__v_raw")
|
|
575
|
-
return n === (i ? s ?
|
|
575
|
+
return n === (i ? s ? Ys : ri : s ? ti : ei).get(t) || // receiver is not the reactive proxy, but has the same prototype
|
|
576
576
|
// this means the receiver is a user proxy of the reactive proxy
|
|
577
577
|
Object.getPrototypeOf(t) === Object.getPrototypeOf(n) ? t : void 0;
|
|
578
578
|
const a = J(t);
|
|
579
579
|
if (!i) {
|
|
580
580
|
let c;
|
|
581
|
-
if (a && (c =
|
|
581
|
+
if (a && (c = Ns[r]))
|
|
582
582
|
return c;
|
|
583
583
|
if (r === "hasOwnProperty")
|
|
584
|
-
return
|
|
584
|
+
return Is;
|
|
585
585
|
}
|
|
586
586
|
const o = Reflect.get(
|
|
587
587
|
t,
|
|
@@ -591,7 +591,7 @@ class Qn {
|
|
|
591
591
|
// its class methods
|
|
592
592
|
/* @__PURE__ */ H(t) ? t : n
|
|
593
593
|
);
|
|
594
|
-
if ((Ae(r) ? Xn.has(r) :
|
|
594
|
+
if ((Ae(r) ? Xn.has(r) : Ls(r)) || (i || R(t, "get", r), s))
|
|
595
595
|
return o;
|
|
596
596
|
if (/* @__PURE__ */ H(o)) {
|
|
597
597
|
const c = a && qt(r) ? o : o.value;
|
|
@@ -608,9 +608,9 @@ class Zn extends Qn {
|
|
|
608
608
|
let s = t[r];
|
|
609
609
|
const a = J(t) && qt(r);
|
|
610
610
|
if (!this._isShallow) {
|
|
611
|
-
const
|
|
612
|
-
if (!/* @__PURE__ */ G(n) && !/* @__PURE__ */ be(n) && (s = /* @__PURE__ */
|
|
613
|
-
return
|
|
611
|
+
const l = /* @__PURE__ */ be(s);
|
|
612
|
+
if (!/* @__PURE__ */ G(n) && !/* @__PURE__ */ be(n) && (s = /* @__PURE__ */ _(s), n = /* @__PURE__ */ _(n)), !a && /* @__PURE__ */ H(s) && !/* @__PURE__ */ H(n))
|
|
613
|
+
return l || (s.value = n), !0;
|
|
614
614
|
}
|
|
615
615
|
const o = a ? Number(r) < t.length : or(t, r), c = Reflect.set(
|
|
616
616
|
t,
|
|
@@ -618,13 +618,13 @@ class Zn extends Qn {
|
|
|
618
618
|
n,
|
|
619
619
|
/* @__PURE__ */ H(t) ? t : i
|
|
620
620
|
);
|
|
621
|
-
return t === /* @__PURE__ */
|
|
621
|
+
return t === /* @__PURE__ */ _(i) && c && (o ? ee(n, s) && ye(t, "set", r, n) : ye(t, "add", r, n)), c;
|
|
622
622
|
}
|
|
623
623
|
deleteProperty(t, r) {
|
|
624
624
|
const n = or(t, r);
|
|
625
625
|
t[r];
|
|
626
626
|
const i = Reflect.deleteProperty(t, r);
|
|
627
|
-
return i && n &&
|
|
627
|
+
return i && n && ye(t, "delete", r, void 0), i;
|
|
628
628
|
}
|
|
629
629
|
has(t, r) {
|
|
630
630
|
const n = Reflect.has(t, r);
|
|
@@ -638,7 +638,7 @@ class Zn extends Qn {
|
|
|
638
638
|
), Reflect.ownKeys(t);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
class
|
|
641
|
+
class Vs extends Qn {
|
|
642
642
|
constructor(t = !1) {
|
|
643
643
|
super(!0, t);
|
|
644
644
|
}
|
|
@@ -649,23 +649,23 @@ class Rs extends Qn {
|
|
|
649
649
|
return !0;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
const
|
|
653
|
-
function
|
|
652
|
+
const Rs = /* @__PURE__ */ new Zn(), Us = /* @__PURE__ */ new Vs(), Ws = /* @__PURE__ */ new Zn(!0), ur = (e) => e, kt = (e) => Reflect.getPrototypeOf(e);
|
|
653
|
+
function zs(e, t, r) {
|
|
654
654
|
return function(...n) {
|
|
655
|
-
const i = this.__v_raw, s = /* @__PURE__ */
|
|
655
|
+
const i = this.__v_raw, s = /* @__PURE__ */ _(i), a = it(s), o = e === "entries" || e === Symbol.iterator && a, c = e === "keys" && a, l = i[e](...n), u = r ? ur : t ? jt : oe;
|
|
656
656
|
return !t && R(
|
|
657
657
|
s,
|
|
658
658
|
"iterate",
|
|
659
659
|
c ? lr : Te
|
|
660
660
|
), kr(
|
|
661
661
|
// inheriting all iterator properties
|
|
662
|
-
Object.create(
|
|
662
|
+
Object.create(l),
|
|
663
663
|
{
|
|
664
664
|
// iterator protocol
|
|
665
665
|
next() {
|
|
666
|
-
const { value: d, done: p } =
|
|
666
|
+
const { value: d, done: p } = l.next();
|
|
667
667
|
return p ? { value: d, done: p } : {
|
|
668
|
-
value: o ? [
|
|
668
|
+
value: o ? [u(d[0]), u(d[1])] : u(d),
|
|
669
669
|
done: p
|
|
670
670
|
};
|
|
671
671
|
}
|
|
@@ -673,17 +673,17 @@ function $s(e, t, r) {
|
|
|
673
673
|
);
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Dt(e) {
|
|
677
677
|
return function(...t) {
|
|
678
678
|
return e === "delete" ? !1 : e === "clear" ? void 0 : this;
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function $s(e, t) {
|
|
682
682
|
const r = {
|
|
683
683
|
get(n) {
|
|
684
|
-
const i = this.__v_raw, s = /* @__PURE__ */
|
|
684
|
+
const i = this.__v_raw, s = /* @__PURE__ */ _(i), a = /* @__PURE__ */ _(n);
|
|
685
685
|
e || (ee(n, a) && R(s, "get", n), R(s, "get", a));
|
|
686
|
-
const { has: o } = kt(s), c = t ? ur : e ? jt :
|
|
686
|
+
const { has: o } = kt(s), c = t ? ur : e ? jt : oe;
|
|
687
687
|
if (o.call(s, n))
|
|
688
688
|
return c(i.get(n));
|
|
689
689
|
if (o.call(s, a))
|
|
@@ -692,47 +692,47 @@ function qs(e, t) {
|
|
|
692
692
|
},
|
|
693
693
|
get size() {
|
|
694
694
|
const n = this.__v_raw;
|
|
695
|
-
return !e && R(/* @__PURE__ */
|
|
695
|
+
return !e && R(/* @__PURE__ */ _(n), "iterate", Te), n.size;
|
|
696
696
|
},
|
|
697
697
|
has(n) {
|
|
698
|
-
const i = this.__v_raw, s = /* @__PURE__ */
|
|
698
|
+
const i = this.__v_raw, s = /* @__PURE__ */ _(i), a = /* @__PURE__ */ _(n);
|
|
699
699
|
return e || (ee(n, a) && R(s, "has", n), R(s, "has", a)), n === a ? i.has(n) : i.has(n) || i.has(a);
|
|
700
700
|
},
|
|
701
701
|
forEach(n, i) {
|
|
702
|
-
const s = this, a = s.__v_raw, o = /* @__PURE__ */
|
|
703
|
-
return !e && R(o, "iterate", Te), a.forEach((
|
|
702
|
+
const s = this, a = s.__v_raw, o = /* @__PURE__ */ _(a), c = t ? ur : e ? jt : oe;
|
|
703
|
+
return !e && R(o, "iterate", Te), a.forEach((l, u) => n.call(i, c(l), c(u), s));
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
return kr(
|
|
707
707
|
r,
|
|
708
708
|
e ? {
|
|
709
|
-
add:
|
|
710
|
-
set:
|
|
711
|
-
delete:
|
|
712
|
-
clear:
|
|
709
|
+
add: Dt("add"),
|
|
710
|
+
set: Dt("set"),
|
|
711
|
+
delete: Dt("delete"),
|
|
712
|
+
clear: Dt("clear")
|
|
713
713
|
} : {
|
|
714
714
|
add(n) {
|
|
715
|
-
const i = /* @__PURE__ */
|
|
716
|
-
return s.has.call(i, o) || ee(n, o) && s.has.call(i, n) || ee(a, o) && s.has.call(i, a) || (i.add(o),
|
|
715
|
+
const i = /* @__PURE__ */ _(this), s = kt(i), a = /* @__PURE__ */ _(n), o = !t && !/* @__PURE__ */ G(n) && !/* @__PURE__ */ be(n) ? a : n;
|
|
716
|
+
return s.has.call(i, o) || ee(n, o) && s.has.call(i, n) || ee(a, o) && s.has.call(i, a) || (i.add(o), ye(i, "add", o, o)), this;
|
|
717
717
|
},
|
|
718
718
|
set(n, i) {
|
|
719
|
-
!t && !/* @__PURE__ */ G(i) && !/* @__PURE__ */ be(i) && (i = /* @__PURE__ */
|
|
720
|
-
const s = /* @__PURE__ */
|
|
719
|
+
!t && !/* @__PURE__ */ G(i) && !/* @__PURE__ */ be(i) && (i = /* @__PURE__ */ _(i));
|
|
720
|
+
const s = /* @__PURE__ */ _(this), { has: a, get: o } = kt(s);
|
|
721
721
|
let c = a.call(s, n);
|
|
722
|
-
c || (n = /* @__PURE__ */
|
|
723
|
-
const
|
|
724
|
-
return s.set(n, i), c ? ee(i,
|
|
722
|
+
c || (n = /* @__PURE__ */ _(n), c = a.call(s, n));
|
|
723
|
+
const l = o.call(s, n);
|
|
724
|
+
return s.set(n, i), c ? ee(i, l) && ye(s, "set", n, i) : ye(s, "add", n, i), this;
|
|
725
725
|
},
|
|
726
726
|
delete(n) {
|
|
727
|
-
const i = /* @__PURE__ */
|
|
727
|
+
const i = /* @__PURE__ */ _(this), { has: s, get: a } = kt(i);
|
|
728
728
|
let o = s.call(i, n);
|
|
729
|
-
o || (n = /* @__PURE__ */
|
|
729
|
+
o || (n = /* @__PURE__ */ _(n), o = s.call(i, n)), a && a.call(i, n);
|
|
730
730
|
const c = i.delete(n);
|
|
731
|
-
return o &&
|
|
731
|
+
return o && ye(i, "delete", n, void 0), c;
|
|
732
732
|
},
|
|
733
733
|
clear() {
|
|
734
|
-
const n = /* @__PURE__ */
|
|
735
|
-
return i &&
|
|
734
|
+
const n = /* @__PURE__ */ _(this), i = n.size !== 0, s = n.clear();
|
|
735
|
+
return i && ye(
|
|
736
736
|
n,
|
|
737
737
|
"clear",
|
|
738
738
|
void 0,
|
|
@@ -746,25 +746,25 @@ function qs(e, t) {
|
|
|
746
746
|
"entries",
|
|
747
747
|
Symbol.iterator
|
|
748
748
|
].forEach((n) => {
|
|
749
|
-
r[n] =
|
|
749
|
+
r[n] = zs(n, e, t);
|
|
750
750
|
}), r;
|
|
751
751
|
}
|
|
752
752
|
function Tr(e, t) {
|
|
753
|
-
const r =
|
|
753
|
+
const r = $s(e, t);
|
|
754
754
|
return (n, i, s) => i === "__v_isReactive" ? !e : i === "__v_isReadonly" ? e : i === "__v_raw" ? n : Reflect.get(
|
|
755
755
|
or(r, i) && i in n ? r : n,
|
|
756
756
|
i,
|
|
757
757
|
s
|
|
758
758
|
);
|
|
759
759
|
}
|
|
760
|
-
const
|
|
760
|
+
const qs = {
|
|
761
761
|
get: /* @__PURE__ */ Tr(!1, !1)
|
|
762
|
-
},
|
|
762
|
+
}, Hs = {
|
|
763
763
|
get: /* @__PURE__ */ Tr(!1, !0)
|
|
764
|
-
},
|
|
764
|
+
}, Bs = {
|
|
765
765
|
get: /* @__PURE__ */ Tr(!0, !1)
|
|
766
|
-
}, ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), ri = /* @__PURE__ */ new WeakMap(),
|
|
767
|
-
function
|
|
766
|
+
}, ei = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), ri = /* @__PURE__ */ new WeakMap(), Ys = /* @__PURE__ */ new WeakMap();
|
|
767
|
+
function Gs(e) {
|
|
768
768
|
switch (e) {
|
|
769
769
|
case "Object":
|
|
770
770
|
case "Array":
|
|
@@ -783,8 +783,8 @@ function qe(e) {
|
|
|
783
783
|
return /* @__PURE__ */ be(e) ? e : Cr(
|
|
784
784
|
e,
|
|
785
785
|
!1,
|
|
786
|
-
|
|
787
|
-
|
|
786
|
+
Rs,
|
|
787
|
+
qs,
|
|
788
788
|
ei
|
|
789
789
|
);
|
|
790
790
|
}
|
|
@@ -793,8 +793,8 @@ function cn(e) {
|
|
|
793
793
|
return Cr(
|
|
794
794
|
e,
|
|
795
795
|
!1,
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
Ws,
|
|
797
|
+
Hs,
|
|
798
798
|
ti
|
|
799
799
|
);
|
|
800
800
|
}
|
|
@@ -803,8 +803,8 @@ function Mt(e) {
|
|
|
803
803
|
return Cr(
|
|
804
804
|
e,
|
|
805
805
|
!0,
|
|
806
|
-
|
|
807
|
-
|
|
806
|
+
Us,
|
|
807
|
+
Bs,
|
|
808
808
|
ri
|
|
809
809
|
);
|
|
810
810
|
}
|
|
@@ -814,7 +814,7 @@ function Cr(e, t, r, n, i) {
|
|
|
814
814
|
const s = i.get(e);
|
|
815
815
|
if (s)
|
|
816
816
|
return s;
|
|
817
|
-
const a =
|
|
817
|
+
const a = Gs(_s(e));
|
|
818
818
|
if (a === 0)
|
|
819
819
|
return e;
|
|
820
820
|
const o = new Proxy(
|
|
@@ -840,11 +840,11 @@ function ni(e) {
|
|
|
840
840
|
return e ? !!e.__v_raw : !1;
|
|
841
841
|
}
|
|
842
842
|
// @__NO_SIDE_EFFECTS__
|
|
843
|
-
function
|
|
843
|
+
function _(e) {
|
|
844
844
|
const t = e && e.__v_raw;
|
|
845
|
-
return t ? /* @__PURE__ */
|
|
845
|
+
return t ? /* @__PURE__ */ _(t) : e;
|
|
846
846
|
}
|
|
847
|
-
const
|
|
847
|
+
const oe = (e) => xe(e) ? /* @__PURE__ */ qe(e) : e, jt = (e) => xe(e) ? /* @__PURE__ */ Mt(e) : e;
|
|
848
848
|
// @__NO_SIDE_EFFECTS__
|
|
849
849
|
function H(e) {
|
|
850
850
|
return e ? e.__v_isRef === !0 : !1;
|
|
@@ -858,18 +858,18 @@ function ii(e) {
|
|
|
858
858
|
return si(e, !0);
|
|
859
859
|
}
|
|
860
860
|
function si(e, t) {
|
|
861
|
-
return /* @__PURE__ */ H(e) ? e : new
|
|
861
|
+
return /* @__PURE__ */ H(e) ? e : new Js(e, t);
|
|
862
862
|
}
|
|
863
|
-
class
|
|
863
|
+
class Js {
|
|
864
864
|
constructor(t, r) {
|
|
865
|
-
this.dep = new Er(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = r ? t : /* @__PURE__ */
|
|
865
|
+
this.dep = new Er(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = r ? t : /* @__PURE__ */ _(t), this._value = r ? t : oe(t), this.__v_isShallow = r;
|
|
866
866
|
}
|
|
867
867
|
get value() {
|
|
868
868
|
return this.dep.track(), this._value;
|
|
869
869
|
}
|
|
870
870
|
set value(t) {
|
|
871
871
|
const r = this._rawValue, n = this.__v_isShallow || /* @__PURE__ */ G(t) || /* @__PURE__ */ be(t);
|
|
872
|
-
t = n ? t : /* @__PURE__ */
|
|
872
|
+
t = n ? t : /* @__PURE__ */ _(t), ee(t, r) && (this._rawValue = t, this._value = n ? t : oe(t), this.dep.trigger());
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
function gt(e) {
|
|
@@ -879,15 +879,15 @@ function v(e) {
|
|
|
879
879
|
return se(e) ? e() : gt(e);
|
|
880
880
|
}
|
|
881
881
|
// @__NO_SIDE_EFFECTS__
|
|
882
|
-
function
|
|
882
|
+
function Ks(e) {
|
|
883
883
|
const t = J(e) ? new Array(e.length) : {};
|
|
884
884
|
for (const r in e)
|
|
885
|
-
t[r] =
|
|
885
|
+
t[r] = Qs(e, r);
|
|
886
886
|
return t;
|
|
887
887
|
}
|
|
888
|
-
class
|
|
888
|
+
class Xs {
|
|
889
889
|
constructor(t, r, n) {
|
|
890
|
-
this._object = t, this._defaultValue = n, this.__v_isRef = !0, this._value = void 0, this._key = Ae(r) ? r : String(r), this._raw = /* @__PURE__ */
|
|
890
|
+
this._object = t, this._defaultValue = n, this.__v_isRef = !0, this._value = void 0, this._key = Ae(r) ? r : String(r), this._raw = /* @__PURE__ */ _(t);
|
|
891
891
|
let i = !0, s = t;
|
|
892
892
|
if (!J(t) || Ae(this._key) || !qt(this._key))
|
|
893
893
|
do
|
|
@@ -910,13 +910,13 @@ class Qs {
|
|
|
910
910
|
this._object[this._key] = t;
|
|
911
911
|
}
|
|
912
912
|
get dep() {
|
|
913
|
-
return
|
|
913
|
+
return js(this._raw, this._key);
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
return new
|
|
916
|
+
function Qs(e, t, r) {
|
|
917
|
+
return new Xs(e, t, r);
|
|
918
918
|
}
|
|
919
|
-
class
|
|
919
|
+
class Zs {
|
|
920
920
|
constructor(t, r, n) {
|
|
921
921
|
this.fn = t, this.setter = r, this._value = void 0, this.dep = new Er(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = ct - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !r, this.isSSR = n;
|
|
922
922
|
}
|
|
@@ -937,26 +937,26 @@ class ea {
|
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
// @__NO_SIDE_EFFECTS__
|
|
940
|
-
function
|
|
940
|
+
function ea(e, t, r = !1) {
|
|
941
941
|
let n, i;
|
|
942
|
-
return se(e) ? n = e : (n = e.get, i = e.set), new
|
|
942
|
+
return se(e) ? n = e : (n = e.get, i = e.set), new Zs(n, i, r);
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const St = {}, Nt = /* @__PURE__ */ new WeakMap();
|
|
945
945
|
let _e;
|
|
946
|
-
function
|
|
946
|
+
function ta(e, t = !1, r = _e) {
|
|
947
947
|
if (r) {
|
|
948
948
|
let n = Nt.get(r);
|
|
949
949
|
n || Nt.set(r, n = []), n.push(e);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
const { immediate: n, deep: i, once: s, scheduler: a, augmentJob: o, call: c } = r,
|
|
954
|
-
let
|
|
955
|
-
if (/* @__PURE__ */ H(e) ? (d = () => e.value, w = /* @__PURE__ */ G(e)) : /* @__PURE__ */ ot(e) ? (d = () =>
|
|
952
|
+
function ra(e, t, r = br) {
|
|
953
|
+
const { immediate: n, deep: i, once: s, scheduler: a, augmentJob: o, call: c } = r, l = (b) => i ? b : /* @__PURE__ */ G(b) || i === !1 || i === 0 ? me(b, 1) : me(b);
|
|
954
|
+
let u, d, p, f, w = !1, h = !1;
|
|
955
|
+
if (/* @__PURE__ */ H(e) ? (d = () => e.value, w = /* @__PURE__ */ G(e)) : /* @__PURE__ */ ot(e) ? (d = () => l(e), w = !0) : J(e) ? (h = !0, w = e.some((b) => /* @__PURE__ */ ot(b) || /* @__PURE__ */ G(b)), d = () => e.map((b) => {
|
|
956
956
|
if (/* @__PURE__ */ H(b))
|
|
957
957
|
return b.value;
|
|
958
958
|
if (/* @__PURE__ */ ot(b))
|
|
959
|
-
return
|
|
959
|
+
return l(b);
|
|
960
960
|
if (se(b))
|
|
961
961
|
return c ? c(b, 2) : b();
|
|
962
962
|
})) : se(e) ? t ? d = c ? () => c(e, 2) : e : d = () => {
|
|
@@ -969,7 +969,7 @@ function na(e, t, r = br) {
|
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
const b = _e;
|
|
972
|
-
_e =
|
|
972
|
+
_e = u;
|
|
973
973
|
try {
|
|
974
974
|
return c ? c(e, 3, [f]) : e(f);
|
|
975
975
|
} finally {
|
|
@@ -977,32 +977,32 @@ function na(e, t, r = br) {
|
|
|
977
977
|
}
|
|
978
978
|
} : d = Ot, t && i) {
|
|
979
979
|
const b = d, $ = i === !0 ? 1 / 0 : i;
|
|
980
|
-
d = () =>
|
|
980
|
+
d = () => me(b(), $);
|
|
981
981
|
}
|
|
982
982
|
const O = $n(), re = () => {
|
|
983
|
-
|
|
983
|
+
u.stop(), O && O.active && vs(O.effects, u);
|
|
984
984
|
};
|
|
985
985
|
if (s && t) {
|
|
986
986
|
const b = t;
|
|
987
987
|
t = (...$) => {
|
|
988
|
-
const
|
|
989
|
-
return re(),
|
|
988
|
+
const Se = b(...$);
|
|
989
|
+
return re(), Se;
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
let z = h ? new Array(e.length).fill(
|
|
993
|
-
const
|
|
994
|
-
if (!(!(
|
|
992
|
+
let z = h ? new Array(e.length).fill(St) : St;
|
|
993
|
+
const De = (b) => {
|
|
994
|
+
if (!(!(u.flags & 1) || !u.dirty && !b))
|
|
995
995
|
if (t) {
|
|
996
|
-
const $ =
|
|
997
|
-
if (b || i || w || (h ? $.some((
|
|
996
|
+
const $ = u.run();
|
|
997
|
+
if (b || i || w || (h ? $.some((Se, Ne) => ee(Se, z[Ne])) : ee($, z))) {
|
|
998
998
|
p && p();
|
|
999
|
-
const
|
|
1000
|
-
_e =
|
|
999
|
+
const Se = _e;
|
|
1000
|
+
_e = u;
|
|
1001
1001
|
try {
|
|
1002
1002
|
const Ne = [
|
|
1003
1003
|
$,
|
|
1004
1004
|
// pass undefined as the old value when it's changed for the first time
|
|
1005
|
-
z ===
|
|
1005
|
+
z === St ? void 0 : h && z[0] === St ? [] : z,
|
|
1006
1006
|
f
|
|
1007
1007
|
];
|
|
1008
1008
|
z = $, c ? c(t, 3, Ne) : (
|
|
@@ -1010,40 +1010,40 @@ function na(e, t, r = br) {
|
|
|
1010
1010
|
t(...Ne)
|
|
1011
1011
|
);
|
|
1012
1012
|
} finally {
|
|
1013
|
-
_e =
|
|
1013
|
+
_e = Se;
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
} else
|
|
1017
|
-
|
|
1017
|
+
u.run();
|
|
1018
1018
|
};
|
|
1019
|
-
return o && o(
|
|
1020
|
-
const b = Nt.get(
|
|
1019
|
+
return o && o(De), u = new As(d), u.scheduler = a ? () => a(De, !1) : De, f = (b) => ta(b, !1, u), p = u.onStop = () => {
|
|
1020
|
+
const b = Nt.get(u);
|
|
1021
1021
|
if (b) {
|
|
1022
1022
|
if (c)
|
|
1023
1023
|
c(b, 4);
|
|
1024
1024
|
else
|
|
1025
1025
|
for (const $ of b) $();
|
|
1026
|
-
Nt.delete(
|
|
1026
|
+
Nt.delete(u);
|
|
1027
1027
|
}
|
|
1028
|
-
}, t ? n ?
|
|
1028
|
+
}, t ? n ? De(!0) : z = u.run() : a ? a(De.bind(null, !0), !0) : u.run(), re.pause = u.pause.bind(u), re.resume = u.resume.bind(u), re.stop = re, re;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function me(e, t = 1 / 0, r) {
|
|
1031
1031
|
if (t <= 0 || !xe(e) || e.__v_skip || (r = r || /* @__PURE__ */ new Map(), (r.get(e) || 0) >= t))
|
|
1032
1032
|
return e;
|
|
1033
1033
|
if (r.set(e, t), t--, /* @__PURE__ */ H(e))
|
|
1034
|
-
|
|
1034
|
+
me(e.value, t, r);
|
|
1035
1035
|
else if (J(e))
|
|
1036
1036
|
for (let n = 0; n < e.length; n++)
|
|
1037
|
-
|
|
1038
|
-
else if (
|
|
1037
|
+
me(e[n], t, r);
|
|
1038
|
+
else if (bs(e) || it(e))
|
|
1039
1039
|
e.forEach((n) => {
|
|
1040
|
-
|
|
1040
|
+
me(n, t, r);
|
|
1041
1041
|
});
|
|
1042
|
-
else if (
|
|
1042
|
+
else if (Ps(e)) {
|
|
1043
1043
|
for (const n in e)
|
|
1044
|
-
|
|
1044
|
+
me(e[n], t, r);
|
|
1045
1045
|
for (const n of Object.getOwnPropertySymbols(e))
|
|
1046
|
-
Object.prototype.propertyIsEnumerable.call(e, n) &&
|
|
1046
|
+
Object.prototype.propertyIsEnumerable.call(e, n) && me(e[n], t, r);
|
|
1047
1047
|
}
|
|
1048
1048
|
return e;
|
|
1049
1049
|
}
|
|
@@ -1072,12 +1072,12 @@ function ai(e, t, r, n = !0) {
|
|
|
1072
1072
|
const i = t ? t.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: a } = t && t.appContext.config || br;
|
|
1073
1073
|
if (t) {
|
|
1074
1074
|
let o = t.parent;
|
|
1075
|
-
const c = t.proxy,
|
|
1075
|
+
const c = t.proxy, l = `https://vuejs.org/error-reference/#runtime-${r}`;
|
|
1076
1076
|
for (; o; ) {
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
for (let d = 0; d <
|
|
1080
|
-
if (
|
|
1077
|
+
const u = o.ec;
|
|
1078
|
+
if (u) {
|
|
1079
|
+
for (let d = 0; d < u.length; d++)
|
|
1080
|
+
if (u[d](e, c, l) === !1)
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
1083
|
o = o.parent;
|
|
@@ -1086,14 +1086,14 @@ function ai(e, t, r, n = !0) {
|
|
|
1086
1086
|
Ht(), Ar(s, null, 10, [
|
|
1087
1087
|
e,
|
|
1088
1088
|
c,
|
|
1089
|
-
|
|
1089
|
+
l
|
|
1090
1090
|
]), Bt();
|
|
1091
1091
|
return;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
|
|
1094
|
+
na(e, r, i, n, a);
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function na(e, t, r, n = !0, i = !1) {
|
|
1097
1097
|
if (i)
|
|
1098
1098
|
throw e;
|
|
1099
1099
|
console.error(e);
|
|
@@ -1101,14 +1101,14 @@ function ia(e, t, r, n = !0, i = !1) {
|
|
|
1101
1101
|
const Y = [];
|
|
1102
1102
|
let ie = -1;
|
|
1103
1103
|
const We = [];
|
|
1104
|
-
let
|
|
1104
|
+
let he = null, Ve = 0;
|
|
1105
1105
|
const oi = /* @__PURE__ */ Promise.resolve();
|
|
1106
1106
|
let Ft = null;
|
|
1107
1107
|
function ci(e) {
|
|
1108
1108
|
const t = Ft || oi;
|
|
1109
1109
|
return e ? t.then(this ? e.bind(this) : e) : t;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function ia(e) {
|
|
1112
1112
|
let t = ie + 1, r = Y.length;
|
|
1113
1113
|
for (; t < r; ) {
|
|
1114
1114
|
const n = t + r >>> 1, i = Y[n], s = ut(i);
|
|
@@ -1116,33 +1116,33 @@ function sa(e) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return t;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function sa(e) {
|
|
1120
1120
|
if (!(e.flags & 1)) {
|
|
1121
1121
|
const t = ut(e), r = Y[Y.length - 1];
|
|
1122
1122
|
!r || // fast path when the job id is larger than the tail
|
|
1123
|
-
!(e.flags & 2) && t >= ut(r) ? Y.push(e) : Y.splice(
|
|
1123
|
+
!(e.flags & 2) && t >= ut(r) ? Y.push(e) : Y.splice(ia(t), 0, e), e.flags |= 1, li();
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
1126
|
function li() {
|
|
1127
1127
|
Ft || (Ft = oi.then(ui));
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
J(e) ? We.push(...e) :
|
|
1129
|
+
function aa(e) {
|
|
1130
|
+
J(e) ? We.push(...e) : he && e.id === -1 ? he.splice(Ve + 1, 0, e) : e.flags & 1 || (We.push(e), e.flags |= 1), li();
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function oa(e) {
|
|
1133
1133
|
if (We.length) {
|
|
1134
1134
|
const t = [...new Set(We)].sort(
|
|
1135
1135
|
(r, n) => ut(r) - ut(n)
|
|
1136
1136
|
);
|
|
1137
|
-
if (We.length = 0,
|
|
1138
|
-
|
|
1137
|
+
if (We.length = 0, he) {
|
|
1138
|
+
he.push(...t);
|
|
1139
1139
|
return;
|
|
1140
1140
|
}
|
|
1141
|
-
for (
|
|
1142
|
-
const r =
|
|
1141
|
+
for (he = t, Ve = 0; Ve < he.length; Ve++) {
|
|
1142
|
+
const r = he[Ve];
|
|
1143
1143
|
r.flags & 4 && (r.flags &= -2), r.flags & 8 || r(), r.flags &= -2;
|
|
1144
1144
|
}
|
|
1145
|
-
|
|
1145
|
+
he = null, Ve = 0;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
1148
|
const ut = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
|
|
@@ -1161,13 +1161,13 @@ function ui(e) {
|
|
|
1161
1161
|
const t = Y[ie];
|
|
1162
1162
|
t && (t.flags &= -2);
|
|
1163
1163
|
}
|
|
1164
|
-
ie = -1, Y.length = 0,
|
|
1164
|
+
ie = -1, Y.length = 0, oa(), Ft = null, (Y.length || We.length) && ui();
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
let
|
|
1167
|
+
let ca = null;
|
|
1168
1168
|
function di(e, t, r = !1) {
|
|
1169
1169
|
const n = Mr();
|
|
1170
|
-
if (n ||
|
|
1170
|
+
if (n || ha) {
|
|
1171
1171
|
let i = n ? n.parent == null || n.ce ? n.vnode.appContext && n.vnode.appContext.provides : n.parent.provides : void 0;
|
|
1172
1172
|
if (i && e in i)
|
|
1173
1173
|
return i[e];
|
|
@@ -1175,8 +1175,8 @@ function di(e, t, r = !1) {
|
|
|
1175
1175
|
return r && se(t) ? t.call(n && n.proxy) : t;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
const
|
|
1179
|
-
function
|
|
1178
|
+
const la = /* @__PURE__ */ Symbol.for("v-scx"), ua = () => di(la);
|
|
1179
|
+
function da(e, t) {
|
|
1180
1180
|
return pi(e, null, t);
|
|
1181
1181
|
}
|
|
1182
1182
|
function He(e, t, r) {
|
|
@@ -1184,55 +1184,55 @@ function He(e, t, r) {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
function pi(e, t, r = br) {
|
|
1186
1186
|
const { immediate: n, deep: i, flush: s, once: a } = r, o = kr({}, r), c = t && n || !t && s !== "post";
|
|
1187
|
-
let
|
|
1187
|
+
let l;
|
|
1188
1188
|
if (dt) {
|
|
1189
1189
|
if (s === "sync") {
|
|
1190
|
-
const f =
|
|
1191
|
-
|
|
1190
|
+
const f = ua();
|
|
1191
|
+
l = f.__watcherHandles || (f.__watcherHandles = []);
|
|
1192
1192
|
} else if (!c) {
|
|
1193
1193
|
const f = () => {
|
|
1194
1194
|
};
|
|
1195
1195
|
return f.stop = Ot, f.resume = Ot, f.pause = Ot, f;
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
const
|
|
1199
|
-
o.call = (f, w, h) => xr(f,
|
|
1198
|
+
const u = Be;
|
|
1199
|
+
o.call = (f, w, h) => xr(f, u, w, h);
|
|
1200
1200
|
let d = !1;
|
|
1201
1201
|
s === "post" ? o.scheduler = (f) => {
|
|
1202
|
-
|
|
1202
|
+
ga(f, u && u.suspense);
|
|
1203
1203
|
} : s !== "sync" && (d = !0, o.scheduler = (f, w) => {
|
|
1204
|
-
w ? f() :
|
|
1204
|
+
w ? f() : sa(f);
|
|
1205
1205
|
}), o.augmentJob = (f) => {
|
|
1206
|
-
t && (f.flags |= 4), d && (f.flags |= 2,
|
|
1206
|
+
t && (f.flags |= 4), d && (f.flags |= 2, u && (f.id = u.uid, f.i = u));
|
|
1207
1207
|
};
|
|
1208
|
-
const p =
|
|
1209
|
-
return dt && (
|
|
1208
|
+
const p = ra(e, t, o);
|
|
1209
|
+
return dt && (l ? l.push(p) : c && p()), p;
|
|
1210
1210
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
function
|
|
1211
|
+
Dr().requestIdleCallback;
|
|
1212
|
+
Dr().cancelIdleCallback;
|
|
1213
|
+
function pa(e, t, r = Be, n = !1) {
|
|
1214
1214
|
if (r) {
|
|
1215
1215
|
const i = r[e] || (r[e] = []), s = t.__weh || (t.__weh = (...a) => {
|
|
1216
1216
|
Ht();
|
|
1217
|
-
const o =
|
|
1217
|
+
const o = ma(r), c = xr(t, r, e, a);
|
|
1218
1218
|
return o(), Bt(), c;
|
|
1219
1219
|
});
|
|
1220
1220
|
return n ? i.unshift(s) : i.push(s), s;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
const fi = (e) => (t, r = Be) => {
|
|
1224
|
-
(!dt || e === "sp") &&
|
|
1225
|
-
}, hi = fi("m"),
|
|
1226
|
-
let
|
|
1227
|
-
const
|
|
1228
|
-
function
|
|
1229
|
-
t && t.pendingBranch ? J(e) ? t.effects.push(...e) : t.effects.push(e) :
|
|
1224
|
+
(!dt || e === "sp") && pa(e, (...n) => t(...n), r);
|
|
1225
|
+
}, hi = fi("m"), fa = fi("um");
|
|
1226
|
+
let ha = null;
|
|
1227
|
+
const ga = ya;
|
|
1228
|
+
function ya(e, t) {
|
|
1229
|
+
t && t.pendingBranch ? J(e) ? t.effects.push(...e) : t.effects.push(e) : aa(e);
|
|
1230
1230
|
}
|
|
1231
1231
|
let Be = null;
|
|
1232
|
-
const Mr = () => Be ||
|
|
1232
|
+
const Mr = () => Be || ca;
|
|
1233
1233
|
let dr;
|
|
1234
1234
|
{
|
|
1235
|
-
const e =
|
|
1235
|
+
const e = Dr(), t = (r, n) => {
|
|
1236
1236
|
let i;
|
|
1237
1237
|
return (i = e[r]) || (i = e[r] = []), i.push(n), (s) => {
|
|
1238
1238
|
i.length > 1 ? i.forEach((a) => a(s)) : i[0](s);
|
|
@@ -1246,30 +1246,30 @@ let dr;
|
|
|
1246
1246
|
(r) => dt = r
|
|
1247
1247
|
);
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1249
|
+
const ma = (e) => {
|
|
1250
1250
|
const t = Be;
|
|
1251
1251
|
return dr(e), e.scope.on(), () => {
|
|
1252
1252
|
e.scope.off(), dr(t);
|
|
1253
1253
|
};
|
|
1254
1254
|
};
|
|
1255
1255
|
let dt = !1;
|
|
1256
|
-
const y = (e, t) => /* @__PURE__ */
|
|
1257
|
-
let
|
|
1256
|
+
const y = (e, t) => /* @__PURE__ */ ea(e, t, dt);
|
|
1257
|
+
let va;
|
|
1258
1258
|
const ln = typeof window < "u" && window.trustedTypes;
|
|
1259
1259
|
if (ln)
|
|
1260
1260
|
try {
|
|
1261
|
-
|
|
1261
|
+
va = /* @__PURE__ */ ln.createPolicy("vue", {
|
|
1262
1262
|
createHTML: (e) => e
|
|
1263
1263
|
});
|
|
1264
1264
|
} catch {
|
|
1265
1265
|
}
|
|
1266
|
-
var
|
|
1266
|
+
var wa = Object.defineProperty, ba = (e, t, r) => t in e ? wa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, S = (e, t, r) => ba(e, typeof t != "symbol" ? t + "" : t, r);
|
|
1267
1267
|
function Tt(e, t) {
|
|
1268
1268
|
return (e == null ? void 0 : e[t]) !== void 0;
|
|
1269
1269
|
}
|
|
1270
1270
|
class un {
|
|
1271
1271
|
constructor() {
|
|
1272
|
-
|
|
1272
|
+
S(this, "fns"), this.fns = [];
|
|
1273
1273
|
}
|
|
1274
1274
|
delete(t) {
|
|
1275
1275
|
const r = this.fns.indexOf(t);
|
|
@@ -1281,24 +1281,24 @@ class un {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
class pt extends Error {
|
|
1283
1283
|
constructor(t) {
|
|
1284
|
-
super(t),
|
|
1284
|
+
super(t), S(this, "name", "user"), Object.setPrototypeOf(this, pt.prototype), this.name = "UserException";
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
1287
|
class jr extends Error {
|
|
1288
1288
|
constructor(t) {
|
|
1289
|
-
super(t.message),
|
|
1289
|
+
super(t.message), S(this, "data"), Object.setPrototypeOf(this, jr.prototype), this.name = "ApiException", this.data = t;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
const
|
|
1292
|
+
const ka = (e, t) => {
|
|
1293
1293
|
if (t) {
|
|
1294
1294
|
const r = Object.entries(t).map(([n, i]) => `${n}=${i}`);
|
|
1295
1295
|
r.length && (e += `?${r.join("&")}`);
|
|
1296
1296
|
}
|
|
1297
1297
|
return e;
|
|
1298
|
-
}, Da = "https://api.myparcel.nl",
|
|
1299
|
-
class
|
|
1298
|
+
}, Da = "https://api.myparcel.nl", Sa = ["POST", "PUT"];
|
|
1299
|
+
class _a {
|
|
1300
1300
|
constructor(t) {
|
|
1301
|
-
|
|
1301
|
+
S(this, "interceptors"), S(this, "baseUrl"), S(this, "headers"), S(this, "parameters"), S(this, "options"), S(this, "_requiredHeaders", []), this.baseUrl = ((t == null ? void 0 : t.baseUrl) ?? Da).replace(/\/+$/, ""), this.headers = (t == null ? void 0 : t.headers) ?? {}, this.parameters = (t == null ? void 0 : t.parameters) ?? {}, this.options = (t == null ? void 0 : t.options) ?? {}, this.interceptors = {
|
|
1302
1302
|
request: new un(),
|
|
1303
1303
|
response: new un()
|
|
1304
1304
|
};
|
|
@@ -1356,7 +1356,7 @@ class Pa {
|
|
|
1356
1356
|
let n = t.getPath();
|
|
1357
1357
|
if (n.length && !n.startsWith("/") && (n = `/${n}`), r != null && r.path && (n = this.substitutePath(n, r.path)), n.includes("/:"))
|
|
1358
1358
|
throw new pt(`One or more path variables are missing in ${n}`);
|
|
1359
|
-
return r != null && r.parameters && (n =
|
|
1359
|
+
return r != null && r.parameters && (n = ka(n, r.parameters)), this.baseUrl + n;
|
|
1360
1360
|
}
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Replace path variables in an url path. Deletes optional parameters if
|
|
@@ -1405,7 +1405,7 @@ class Pa {
|
|
|
1405
1405
|
...t.getParameters()
|
|
1406
1406
|
},
|
|
1407
1407
|
headers: {
|
|
1408
|
-
...
|
|
1408
|
+
...Sa.includes(t.method) ? { "Content-Type": "application/json" } : {},
|
|
1409
1409
|
...this.getHeaders(),
|
|
1410
1410
|
...r.headers,
|
|
1411
1411
|
...t.getHeaders()
|
|
@@ -1424,45 +1424,45 @@ class Pa {
|
|
|
1424
1424
|
return n;
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
|
-
const
|
|
1427
|
+
const Pa = (e) => {
|
|
1428
1428
|
try {
|
|
1429
1429
|
return JSON.parse(e), !0;
|
|
1430
1430
|
} catch {
|
|
1431
1431
|
return !1;
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
|
-
class
|
|
1434
|
+
class Ea extends _a {
|
|
1435
1435
|
constructor(t) {
|
|
1436
|
-
super(t),
|
|
1436
|
+
super(t), S(this, "request", async (r, n) => {
|
|
1437
1437
|
var i, s, a;
|
|
1438
1438
|
for (const d of this.interceptors.request.fns)
|
|
1439
1439
|
n = await d(n);
|
|
1440
|
-
const o = r.getTimeout() ?? n.timeout, c = new AbortController(),
|
|
1440
|
+
const o = r.getTimeout() ?? n.timeout, c = new AbortController(), l = {
|
|
1441
1441
|
method: r.method,
|
|
1442
1442
|
headers: n.headers,
|
|
1443
1443
|
signal: c.signal
|
|
1444
1444
|
};
|
|
1445
|
-
let
|
|
1446
|
-
o && (
|
|
1445
|
+
let u;
|
|
1446
|
+
o && (u = setTimeout(() => {
|
|
1447
1447
|
c.abort();
|
|
1448
|
-
}, o)), Tt(n, "body") && (n.body instanceof FormData ?
|
|
1448
|
+
}, o)), Tt(n, "body") && (n.body instanceof FormData ? l.body = n.body : l.body = JSON.stringify(n.body));
|
|
1449
1449
|
try {
|
|
1450
|
-
const d = await fetch(this.createUrl(r, n),
|
|
1450
|
+
const d = await fetch(this.createUrl(r, n), l);
|
|
1451
1451
|
if (d.body) {
|
|
1452
1452
|
if ((i = d.headers.get("Content-Disposition")) != null && i.includes("attachment") || (s = d.headers.get("Content-Type")) != null && s.includes("application/pdf"))
|
|
1453
1453
|
return d.blob();
|
|
1454
1454
|
const p = await d.text();
|
|
1455
|
-
return (a = d.headers.get("Content-Type")) != null && a.includes("application/json") &&
|
|
1455
|
+
return (a = d.headers.get("Content-Type")) != null && a.includes("application/json") && Pa(p) ? JSON.parse(p) : p;
|
|
1456
1456
|
}
|
|
1457
1457
|
} finally {
|
|
1458
|
-
|
|
1458
|
+
u && clearTimeout(u);
|
|
1459
1459
|
}
|
|
1460
1460
|
});
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
class
|
|
1463
|
+
class Oa {
|
|
1464
1464
|
constructor(t) {
|
|
1465
|
-
|
|
1465
|
+
S(this, "method", "GET"), S(this, "property"), S(this, "responseProperty"), S(this, "timeout"), S(this, "useDataEnvelope", !0), S(this, "headers"), S(this, "parameters"), this.headers = (t == null ? void 0 : t.headers) ?? {}, this.parameters = (t == null ? void 0 : t.parameters) ?? {};
|
|
1466
1466
|
}
|
|
1467
1467
|
getHeaders() {
|
|
1468
1468
|
return this.headers;
|
|
@@ -1486,9 +1486,9 @@ class Ta {
|
|
|
1486
1486
|
return this.useDataEnvelope;
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
class Yt extends
|
|
1489
|
+
class Yt extends Oa {
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function Ta(e, t) {
|
|
1492
1492
|
if (!t.length)
|
|
1493
1493
|
throw new pt("At least one endpoint must be passed.");
|
|
1494
1494
|
return {
|
|
@@ -1502,28 +1502,28 @@ function Ca(e, t) {
|
|
|
1502
1502
|
client: e
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
const
|
|
1506
|
-
class
|
|
1505
|
+
const Ca = (e, t) => Ta(e, t);
|
|
1506
|
+
class Aa extends Yt {
|
|
1507
1507
|
constructor() {
|
|
1508
|
-
super(...arguments),
|
|
1508
|
+
super(...arguments), S(this, "name", "getCarrier"), S(this, "path", "carriers/:carrier"), S(this, "property", "carriers");
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
class
|
|
1511
|
+
class xa extends Yt {
|
|
1512
1512
|
constructor() {
|
|
1513
|
-
super(...arguments),
|
|
1513
|
+
super(...arguments), S(this, "name", "getCarriers"), S(this, "path", "carriers"), S(this, "property", "carriers");
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
class
|
|
1516
|
+
class Ma extends Yt {
|
|
1517
1517
|
constructor() {
|
|
1518
|
-
super(...arguments),
|
|
1518
|
+
super(...arguments), S(this, "name", "getDeliveryOptions"), S(this, "path", "delivery_options"), S(this, "property", "deliveries");
|
|
1519
1519
|
}
|
|
1520
1520
|
getHeaders() {
|
|
1521
1521
|
return { ...super.getHeaders(), Accept: "application/json;version=2.0" };
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
|
-
class
|
|
1524
|
+
class ja extends Yt {
|
|
1525
1525
|
constructor() {
|
|
1526
|
-
super(...arguments),
|
|
1526
|
+
super(...arguments), S(this, "name", "getPickupLocations"), S(this, "path", "pickup_locations"), S(this, "property", "pickup_locations");
|
|
1527
1527
|
}
|
|
1528
1528
|
}
|
|
1529
1529
|
function Lt(e, t) {
|
|
@@ -1532,29 +1532,29 @@ function Lt(e, t) {
|
|
|
1532
1532
|
function Gt(e, t) {
|
|
1533
1533
|
return (e == null ? void 0 : e[t]) !== void 0;
|
|
1534
1534
|
}
|
|
1535
|
-
var
|
|
1535
|
+
var Na = (e, t) => (e ?? []).reduce(
|
|
1536
1536
|
(r, n) => (r[t(n) ? 0 : 1].push(n), r),
|
|
1537
1537
|
[[], []]
|
|
1538
1538
|
), gi = /* @__PURE__ */ ((e) => (e.PostNl = "postnl", e.Bpost = "bpost", e.CheapCargo = "cheapcargo", e.Dpd = "dpd", e.Instabox = "instabox", e.Dhl = "dhl", e.Bol = "bol.com", e.BolCom = "bol.com", e.Ups = "ups", e.DhlForYou = "dhlforyou", e.DhlParcelConnect = "dhlparcelconnect", e.DhlEuroPlus = "dhleuroplus", e.UpsStandard = "upsstandard", e.UpsExpressSaver = "upsexpresssaver", e.Gls = "gls", e.Brt = "brt", e.Trunkrs = "trunkrs", e.InPost = "inpost", e))(gi || {}), Ce = /* @__PURE__ */ ((e) => (e.Morning = "morning", e.Standard = "standard", e.Evening = "evening", e.Pickup = "pickup", e.Express = "express", e))(Ce || {}), A = /* @__PURE__ */ ((e) => (e.Package = "package", e.Mailbox = "mailbox", e.Letter = "letter", e.DigitalStamp = "digital_stamp", e.Pallet = "pallet", e.PackageSmall = "package_small", e.Envelope = "envelope", e))(A || {}), Nr = /* @__PURE__ */ ((e) => (e.MyParcel = "myparcel", e.Flespakket = "flespakket", e.SendMyParcel = "belgie", e.Italy = "italy", e))(Nr || {}), yi = /* @__PURE__ */ ((e) => (e.AgeCheck = "age_check", e.Collect = "collect", e.CooledDelivery = "cooled_delivery", e.Insurance = "insurance", e.LargeFormat = "large_format", e.OnlyRecipient = "only_recipient", e.PrinterlessReturn = "printerless_return", e.PriorityDelivery = "priority_delivery", e.Return = "return", e.SameDayDelivery = "same_day_delivery", e.Signature = "signature", e))(yi || {});
|
|
1539
1539
|
const Fr = "carrierSettings";
|
|
1540
|
-
var g = /* @__PURE__ */ ((e) => (e.AllowEveningDelivery = "allowEveningDelivery", e.AllowMondayDelivery = "allowMondayDelivery", e.AllowMorningDelivery = "allowMorningDelivery", e.AllowOnlyRecipient = "allowOnlyRecipient", e.AllowPickupLocations = "allowPickupLocations", e.AllowSameDayDelivery = "allowSameDayDelivery", e.AllowSaturdayDelivery = "allowSaturdayDelivery", e.AllowSignature = "allowSignature", e.AllowStandardDelivery = "allowStandardDelivery", e.AllowExpressDelivery = "allowExpressDelivery", e.AllowPriorityDelivery = "allowPriorityDelivery", e.Collect = "collect", e.CutoffTime = "cutoffTime", e.CutoffTimeSameDay = "cutoffTimeSameDay", e.DeliveryDaysWindow = "deliveryDaysWindow", e.DropOffDays = "dropOffDays", e.DropOffDelay = "dropOffDelay", e.PackageType = "packageType", e.PriceEveningDelivery = "priceEveningDelivery", e.PriceMondayDelivery = "priceMondayDelivery", e.PriceMorningDelivery = "priceMorningDelivery", e.PriceOnlyRecipient = "priceOnlyRecipient", e.PricePriorityDelivery = "pricePriorityDelivery", e.PricePackageTypeDigitalStamp = "pricePackageTypeDigitalStamp", e.PricePackageTypeEnvelope = "pricePackageTypeEnvelope", e.PricePackageTypeMailbox = "pricePackageTypeMailbox", e.PricePackageTypePackageSmall = "pricePackageTypePackageSmall", e.PricePickup = "pricePickup", e.PriceSameDayDelivery = "priceSameDayDelivery", e.PriceExpressDelivery = "priceExpressDelivery", e.PriceSaturdayDelivery = "priceSaturdayDelivery", e.PriceSignature = "priceSignature", e.PriceStandardDelivery = "priceStandardDelivery", e))(g || {}), m = /* @__PURE__ */ ((e) => (e.ApiBaseUrl = "apiBaseUrl", e.ProxyCapabilities = "proxyCapabilities", e.ApiKey = "apiKey", e.Currency = "currency", e.Locale = "locale", e.PickupLocationsDefaultView = "pickupLocationsDefaultView", e.AllowPickupLocationsViewSelection = "allowPickupLocationsViewSelection", e.PickupLocationsMapTileLayerData = "pickupLocationsMapTileLayerData", e.PickupMapAllowLoadMore = "pickupMapAllowLoadMore", e.PickupShowDistance = "pickupShowDistance", e.Platform = "platform", e.ShowPriceSurcharge = "showPriceSurcharge", e.ShowPrices = "showPrices", e.ShowPriceZeroAsFree = "showPriceZeroAsFree", e.ClosedDays = "closedDays", e.CompactView = "compactView", e.ExcludeParcelLockers = "excludeParcelLockers", e.PopUpMap = "popUpMap", e.IsBusiness = "isBusiness", e))(m || {}), mi = /* @__PURE__ */ ((e) => (e.Map = "map", e.List = "list", e))(mi || {}), U = /* @__PURE__ */ ((e) => (e.Country = "cc", e.City = "city", e.Number = "number", e.PostalCode = "postalCode", e.Street = "street", e))(U || {}),
|
|
1541
|
-
function
|
|
1542
|
-
return $n() ? (
|
|
1540
|
+
var g = /* @__PURE__ */ ((e) => (e.AllowEveningDelivery = "allowEveningDelivery", e.AllowMondayDelivery = "allowMondayDelivery", e.AllowMorningDelivery = "allowMorningDelivery", e.AllowOnlyRecipient = "allowOnlyRecipient", e.AllowPickupLocations = "allowPickupLocations", e.AllowSameDayDelivery = "allowSameDayDelivery", e.AllowSaturdayDelivery = "allowSaturdayDelivery", e.AllowSignature = "allowSignature", e.AllowStandardDelivery = "allowStandardDelivery", e.AllowExpressDelivery = "allowExpressDelivery", e.AllowPriorityDelivery = "allowPriorityDelivery", e.Collect = "collect", e.CutoffTime = "cutoffTime", e.CutoffTimeSameDay = "cutoffTimeSameDay", e.DeliveryDaysWindow = "deliveryDaysWindow", e.DropOffDays = "dropOffDays", e.DropOffDelay = "dropOffDelay", e.PackageType = "packageType", e.PriceEveningDelivery = "priceEveningDelivery", e.PriceMondayDelivery = "priceMondayDelivery", e.PriceMorningDelivery = "priceMorningDelivery", e.PriceOnlyRecipient = "priceOnlyRecipient", e.PricePriorityDelivery = "pricePriorityDelivery", e.PricePackageTypeDigitalStamp = "pricePackageTypeDigitalStamp", e.PricePackageTypeEnvelope = "pricePackageTypeEnvelope", e.PricePackageTypeMailbox = "pricePackageTypeMailbox", e.PricePackageTypePackageSmall = "pricePackageTypePackageSmall", e.PricePickup = "pricePickup", e.PriceSameDayDelivery = "priceSameDayDelivery", e.PriceExpressDelivery = "priceExpressDelivery", e.PriceSaturdayDelivery = "priceSaturdayDelivery", e.PriceSignature = "priceSignature", e.PriceStandardDelivery = "priceStandardDelivery", e))(g || {}), m = /* @__PURE__ */ ((e) => (e.ApiBaseUrl = "apiBaseUrl", e.ProxyCapabilities = "proxyCapabilities", e.ApiKey = "apiKey", e.Currency = "currency", e.Locale = "locale", e.PickupLocationsDefaultView = "pickupLocationsDefaultView", e.AllowPickupLocationsViewSelection = "allowPickupLocationsViewSelection", e.PickupLocationsMapTileLayerData = "pickupLocationsMapTileLayerData", e.PickupMapAllowLoadMore = "pickupMapAllowLoadMore", e.PickupShowDistance = "pickupShowDistance", e.Platform = "platform", e.ShowPriceSurcharge = "showPriceSurcharge", e.ShowPrices = "showPrices", e.ShowPriceZeroAsFree = "showPriceZeroAsFree", e.ClosedDays = "closedDays", e.CompactView = "compactView", e.ExcludeParcelLockers = "excludeParcelLockers", e.PopUpMap = "popUpMap", e.IsBusiness = "isBusiness", e))(m || {}), mi = /* @__PURE__ */ ((e) => (e.Map = "map", e.List = "list", e))(mi || {}), U = /* @__PURE__ */ ((e) => (e.Country = "cc", e.City = "city", e.Number = "number", e.PostalCode = "postalCode", e.Street = "street", e))(U || {}), j = /* @__PURE__ */ ((e) => (e.String = "string", e.Boolean = "boolean", e.Number = "number", e.Currency = "currency", e.Date = "date", e.Time = "time", e.Select = "select", e.MultiSelect = "multiSelect", e))(j || {}), vi = /* @__PURE__ */ ((e) => (e.Allow = "allow", e.Price = "price", e.CutoffTime = "cutoffTime", e))(vi || {}), It = /* @__PURE__ */ ((e) => (e.Default = "default", e.Locker = "locker", e))(It || {}), ce = /* @__PURE__ */ ((e) => (e.SameDay = "same_day", e.Monday = "monday", e.Saturday = "saturday", e))(ce || {});
|
|
1541
|
+
function Fa(e) {
|
|
1542
|
+
return $n() ? (Cs(e), !0) : !1;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function La(e, t) {
|
|
1545
1545
|
return gt(e);
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function Ia(e) {
|
|
1548
1548
|
return gt(e) != null;
|
|
1549
1549
|
}
|
|
1550
1550
|
function Lr(e) {
|
|
1551
1551
|
return typeof e == "function" ? e() : gt(e);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const Va = typeof window < "u" && typeof document < "u";
|
|
1554
1554
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1555
|
-
const
|
|
1555
|
+
const Ra = (e) => typeof e < "u", Ua = Object.prototype.toString, Wa = (e) => Ua.call(e) === "[object Object]", wi = () => {
|
|
1556
1556
|
};
|
|
1557
|
-
function
|
|
1557
|
+
function za(e, t) {
|
|
1558
1558
|
function r(...n) {
|
|
1559
1559
|
return new Promise((i, s) => {
|
|
1560
1560
|
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(i).catch(s);
|
|
@@ -1563,7 +1563,7 @@ function $a(e, t) {
|
|
|
1563
1563
|
return r;
|
|
1564
1564
|
}
|
|
1565
1565
|
const bi = (e) => e();
|
|
1566
|
-
function
|
|
1566
|
+
function $a(e = bi) {
|
|
1567
1567
|
const t = /* @__PURE__ */ N(!0);
|
|
1568
1568
|
function r() {
|
|
1569
1569
|
t.value = !1;
|
|
@@ -1575,29 +1575,29 @@ function qa(e = bi) {
|
|
|
1575
1575
|
t.value && e(...i);
|
|
1576
1576
|
} };
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function qa(e) {
|
|
1579
1579
|
return Mr();
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Ha(e, t, r = {}) {
|
|
1582
1582
|
const {
|
|
1583
1583
|
eventFilter: n = bi,
|
|
1584
1584
|
...i
|
|
1585
1585
|
} = r;
|
|
1586
1586
|
return He(
|
|
1587
1587
|
e,
|
|
1588
|
-
|
|
1588
|
+
za(
|
|
1589
1589
|
n,
|
|
1590
1590
|
t
|
|
1591
1591
|
),
|
|
1592
1592
|
i
|
|
1593
1593
|
);
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function Ba(e, t, r = {}) {
|
|
1596
1596
|
const {
|
|
1597
1597
|
eventFilter: n,
|
|
1598
1598
|
...i
|
|
1599
|
-
} = r, { eventFilter: s, pause: a, resume: o, isActive: c } =
|
|
1600
|
-
return { stop:
|
|
1599
|
+
} = r, { eventFilter: s, pause: a, resume: o, isActive: c } = $a(n);
|
|
1600
|
+
return { stop: Ha(
|
|
1601
1601
|
e,
|
|
1602
1602
|
t,
|
|
1603
1603
|
{
|
|
@@ -1606,11 +1606,11 @@ function Ya(e, t, r = {}) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
), pause: a, resume: o, isActive: c };
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1609
|
+
function Ya(e, t = !0, r) {
|
|
1610
|
+
qa() ? hi(e, r) : t ? e() : ci(e);
|
|
1611
1611
|
}
|
|
1612
|
-
const
|
|
1613
|
-
function
|
|
1612
|
+
const Ga = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i;
|
|
1613
|
+
function Ja(e) {
|
|
1614
1614
|
if (e === null)
|
|
1615
1615
|
return new Date(Number.NaN);
|
|
1616
1616
|
if (e === void 0)
|
|
@@ -1618,7 +1618,7 @@ function Ka(e) {
|
|
|
1618
1618
|
if (e instanceof Date)
|
|
1619
1619
|
return new Date(e);
|
|
1620
1620
|
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
1621
|
-
const t = e.match(
|
|
1621
|
+
const t = e.match(Ga);
|
|
1622
1622
|
if (t) {
|
|
1623
1623
|
const r = t[2] - 1 || 0, n = (t[7] || "0").substring(0, 3);
|
|
1624
1624
|
return new Date(t[1], r, t[3] || 1, t[4] || 0, t[5] || 0, t[6] || 0, n);
|
|
@@ -1626,7 +1626,7 @@ function Ka(e) {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
return new Date(e);
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function Ka(e, t, r) {
|
|
1630
1630
|
return He(
|
|
1631
1631
|
e,
|
|
1632
1632
|
t,
|
|
@@ -1636,7 +1636,7 @@ function Xa(e, t, r) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
);
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function Xa(e, t, r) {
|
|
1640
1640
|
let n;
|
|
1641
1641
|
/* @__PURE__ */ H(r) ? n = {
|
|
1642
1642
|
evaluating: r
|
|
@@ -1646,13 +1646,13 @@ function Qa(e, t, r) {
|
|
|
1646
1646
|
evaluating: s = void 0,
|
|
1647
1647
|
shallow: a = !0,
|
|
1648
1648
|
onError: o = wi
|
|
1649
|
-
} = n, c = /* @__PURE__ */ N(!i),
|
|
1650
|
-
let
|
|
1651
|
-
return
|
|
1649
|
+
} = n, c = /* @__PURE__ */ N(!i), l = a ? /* @__PURE__ */ ii(t) : /* @__PURE__ */ N(t);
|
|
1650
|
+
let u = 0;
|
|
1651
|
+
return da(async (d) => {
|
|
1652
1652
|
if (!c.value)
|
|
1653
1653
|
return;
|
|
1654
|
-
|
|
1655
|
-
const p =
|
|
1654
|
+
u++;
|
|
1655
|
+
const p = u;
|
|
1656
1656
|
let f = !1;
|
|
1657
1657
|
s && Promise.resolve().then(() => {
|
|
1658
1658
|
s.value = !0;
|
|
@@ -1663,64 +1663,64 @@ function Qa(e, t, r) {
|
|
|
1663
1663
|
s && (s.value = !1), f || h();
|
|
1664
1664
|
});
|
|
1665
1665
|
});
|
|
1666
|
-
p ===
|
|
1666
|
+
p === u && (l.value = w);
|
|
1667
1667
|
} catch (w) {
|
|
1668
1668
|
o(w);
|
|
1669
1669
|
} finally {
|
|
1670
|
-
s && p ===
|
|
1670
|
+
s && p === u && (s.value = !1), f = !0;
|
|
1671
1671
|
}
|
|
1672
|
-
}), i ? y(() => (c.value = !0,
|
|
1672
|
+
}), i ? y(() => (c.value = !0, l.value)) : l;
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function Qa(e) {
|
|
1675
1675
|
var t;
|
|
1676
1676
|
const r = Lr(e);
|
|
1677
1677
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
1678
1678
|
}
|
|
1679
|
-
const ft =
|
|
1679
|
+
const ft = Va ? window : void 0;
|
|
1680
1680
|
function pr(...e) {
|
|
1681
1681
|
let t, r, n, i;
|
|
1682
1682
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, i] = e, t = ft) : [t, r, n, i] = e, !t)
|
|
1683
1683
|
return wi;
|
|
1684
1684
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
1685
1685
|
const s = [], a = () => {
|
|
1686
|
-
s.forEach((
|
|
1687
|
-
}, o = (
|
|
1688
|
-
() => [
|
|
1689
|
-
([
|
|
1690
|
-
if (a(), !
|
|
1686
|
+
s.forEach((u) => u()), s.length = 0;
|
|
1687
|
+
}, o = (u, d, p, f) => (u.addEventListener(d, p, f), () => u.removeEventListener(d, p, f)), c = He(
|
|
1688
|
+
() => [Qa(t), Lr(i)],
|
|
1689
|
+
([u, d]) => {
|
|
1690
|
+
if (a(), !u)
|
|
1691
1691
|
return;
|
|
1692
|
-
const p =
|
|
1692
|
+
const p = Wa(d) ? { ...d } : d;
|
|
1693
1693
|
s.push(
|
|
1694
|
-
...r.flatMap((f) => n.map((w) => o(
|
|
1694
|
+
...r.flatMap((f) => n.map((w) => o(u, f, w, p)))
|
|
1695
1695
|
);
|
|
1696
1696
|
},
|
|
1697
1697
|
{ immediate: !0, flush: "post" }
|
|
1698
|
-
),
|
|
1698
|
+
), l = () => {
|
|
1699
1699
|
c(), a();
|
|
1700
1700
|
};
|
|
1701
|
-
return
|
|
1701
|
+
return Fa(l), l;
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function Za() {
|
|
1704
1704
|
const e = /* @__PURE__ */ N(!1), t = Mr();
|
|
1705
1705
|
return t && hi(() => {
|
|
1706
1706
|
e.value = !0;
|
|
1707
1707
|
}, t), e;
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1710
|
-
const t =
|
|
1709
|
+
function eo(e) {
|
|
1710
|
+
const t = Za();
|
|
1711
1711
|
return y(() => (t.value, !!e()));
|
|
1712
1712
|
}
|
|
1713
|
-
const _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Pt = "__vueuse_ssr_handlers__",
|
|
1714
|
-
function
|
|
1713
|
+
const _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Pt = "__vueuse_ssr_handlers__", to = /* @__PURE__ */ ro();
|
|
1714
|
+
function ro() {
|
|
1715
1715
|
return Pt in _t || (_t[Pt] = _t[Pt] || {}), _t[Pt];
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return
|
|
1717
|
+
function no(e, t) {
|
|
1718
|
+
return to[e] || t;
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function io(e) {
|
|
1721
1721
|
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
1722
1722
|
}
|
|
1723
|
-
const
|
|
1723
|
+
const so = {
|
|
1724
1724
|
boolean: {
|
|
1725
1725
|
read: (e) => e === "true",
|
|
1726
1726
|
write: (e) => String(e)
|
|
@@ -1754,25 +1754,25 @@ const ao = {
|
|
|
1754
1754
|
write: (e) => e.toISOString()
|
|
1755
1755
|
}
|
|
1756
1756
|
}, dn = "vueuse-storage";
|
|
1757
|
-
function
|
|
1757
|
+
function ao(e, t, r, n = {}) {
|
|
1758
1758
|
var i;
|
|
1759
1759
|
const {
|
|
1760
1760
|
flush: s = "pre",
|
|
1761
1761
|
deep: a = !0,
|
|
1762
1762
|
listenToStorageChanges: o = !0,
|
|
1763
1763
|
writeDefaults: c = !0,
|
|
1764
|
-
mergeDefaults:
|
|
1765
|
-
shallow:
|
|
1764
|
+
mergeDefaults: l = !1,
|
|
1765
|
+
shallow: u,
|
|
1766
1766
|
window: d = ft,
|
|
1767
1767
|
eventFilter: p,
|
|
1768
1768
|
onError: f = (k) => {
|
|
1769
1769
|
console.error(k);
|
|
1770
1770
|
},
|
|
1771
1771
|
initOnMounted: w
|
|
1772
|
-
} = n, h = (
|
|
1772
|
+
} = n, h = (u ? ii : N)(t);
|
|
1773
1773
|
if (!r)
|
|
1774
1774
|
try {
|
|
1775
|
-
r =
|
|
1775
|
+
r = no("getDefaultStorage", () => {
|
|
1776
1776
|
var k;
|
|
1777
1777
|
return (k = ft) == null ? void 0 : k.localStorage;
|
|
1778
1778
|
})();
|
|
@@ -1781,13 +1781,13 @@ function oo(e, t, r, n = {}) {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
if (!r)
|
|
1783
1783
|
return h;
|
|
1784
|
-
const O = Lr(t), re =
|
|
1784
|
+
const O = Lr(t), re = io(O), z = (i = n.serializer) != null ? i : so[re], { pause: De, resume: b } = Ba(
|
|
1785
1785
|
h,
|
|
1786
|
-
() =>
|
|
1786
|
+
() => Se(h.value),
|
|
1787
1787
|
{ flush: s, deep: a, eventFilter: p }
|
|
1788
1788
|
);
|
|
1789
|
-
d && o &&
|
|
1790
|
-
pr(d, "storage", bt), pr(d, dn,
|
|
1789
|
+
d && o && Ya(() => {
|
|
1790
|
+
pr(d, "storage", bt), pr(d, dn, hs), w && bt();
|
|
1791
1791
|
}), w || bt();
|
|
1792
1792
|
function $(k, V) {
|
|
1793
1793
|
d && d.dispatchEvent(new CustomEvent(dn, {
|
|
@@ -1799,14 +1799,14 @@ function oo(e, t, r, n = {}) {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
}));
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function Se(k) {
|
|
1803
1803
|
try {
|
|
1804
1804
|
const V = r.getItem(e);
|
|
1805
1805
|
if (k == null)
|
|
1806
1806
|
$(V, null), r.removeItem(e);
|
|
1807
1807
|
else {
|
|
1808
|
-
const
|
|
1809
|
-
V !==
|
|
1808
|
+
const pe = z.write(k);
|
|
1809
|
+
V !== pe && (r.setItem(e, pe), $(V, pe));
|
|
1810
1810
|
}
|
|
1811
1811
|
} catch (V) {
|
|
1812
1812
|
f(V);
|
|
@@ -1816,9 +1816,9 @@ function oo(e, t, r, n = {}) {
|
|
|
1816
1816
|
const V = k ? k.newValue : r.getItem(e);
|
|
1817
1817
|
if (V == null)
|
|
1818
1818
|
return c && O != null && r.setItem(e, z.write(O)), O;
|
|
1819
|
-
if (!k &&
|
|
1820
|
-
const
|
|
1821
|
-
return typeof
|
|
1819
|
+
if (!k && l) {
|
|
1820
|
+
const pe = z.read(V);
|
|
1821
|
+
return typeof l == "function" ? l(pe, O) : re === "object" && !Array.isArray(pe) ? { ...O, ...pe } : pe;
|
|
1822
1822
|
} else return typeof V != "string" ? V : z.read(V);
|
|
1823
1823
|
}
|
|
1824
1824
|
function bt(k) {
|
|
@@ -1828,7 +1828,7 @@ function oo(e, t, r, n = {}) {
|
|
|
1828
1828
|
return;
|
|
1829
1829
|
}
|
|
1830
1830
|
if (!(k && k.key !== e)) {
|
|
1831
|
-
|
|
1831
|
+
De();
|
|
1832
1832
|
try {
|
|
1833
1833
|
(k == null ? void 0 : k.newValue) !== z.write(h.value) && (h.value = Ne(k));
|
|
1834
1834
|
} catch (V) {
|
|
@@ -1839,28 +1839,28 @@ function oo(e, t, r, n = {}) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function hs(k) {
|
|
1843
1843
|
bt(k.detail);
|
|
1844
1844
|
}
|
|
1845
1845
|
return h;
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function oo(e, t, r = {}) {
|
|
1848
1848
|
const { window: n = ft } = r;
|
|
1849
|
-
return
|
|
1849
|
+
return ao(e, t, n == null ? void 0 : n.localStorage, r);
|
|
1850
1850
|
}
|
|
1851
1851
|
function C(e, t) {
|
|
1852
|
-
const r = t != null && t.cache ? /* @__PURE__ */ cn(t.cache) : /* @__PURE__ */ cn(/* @__PURE__ */ new Map()), n = (...
|
|
1853
|
-
r.delete(n(...
|
|
1852
|
+
const r = t != null && t.cache ? /* @__PURE__ */ cn(t.cache) : /* @__PURE__ */ cn(/* @__PURE__ */ new Map()), n = (...l) => t != null && t.getKey ? t.getKey(...l) : JSON.stringify(l), i = (l, ...u) => (r.set(l, e(...u)), r.get(l)), s = (...l) => i(n(...l), ...l), a = (...l) => {
|
|
1853
|
+
r.delete(n(...l));
|
|
1854
1854
|
}, o = () => {
|
|
1855
1855
|
r.clear();
|
|
1856
|
-
}, c = (...
|
|
1857
|
-
const
|
|
1858
|
-
return r.has(
|
|
1856
|
+
}, c = (...l) => {
|
|
1857
|
+
const u = n(...l);
|
|
1858
|
+
return r.has(u) ? r.get(u) : i(u, ...l);
|
|
1859
1859
|
};
|
|
1860
1860
|
return c.load = s, c.delete = a, c.clear = o, c.generateKey = n, c.cache = r, c;
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const { window: t = ft } = e, r = t == null ? void 0 : t.navigator, n =
|
|
1862
|
+
function co(e = {}) {
|
|
1863
|
+
const { window: t = ft } = e, r = t == null ? void 0 : t.navigator, n = eo(() => r && "language" in r), i = /* @__PURE__ */ N(r == null ? void 0 : r.language);
|
|
1864
1864
|
return pr(t, "languagechange", () => {
|
|
1865
1865
|
r && (i.value = r.language);
|
|
1866
1866
|
}), {
|
|
@@ -1868,9 +1868,9 @@ function lo(e = {}) {
|
|
|
1868
1868
|
language: i
|
|
1869
1869
|
};
|
|
1870
1870
|
}
|
|
1871
|
-
const nr =
|
|
1871
|
+
const nr = oo("logLevel", 0, {
|
|
1872
1872
|
writeDefaults: !1
|
|
1873
|
-
}),
|
|
1873
|
+
}), ue = C(() => {
|
|
1874
1874
|
const e = (...r) => {
|
|
1875
1875
|
nr.value < 3 || console.log("%c[DEBUG]", "color: #999", ...r);
|
|
1876
1876
|
}, t = (...r) => {
|
|
@@ -1900,11 +1900,11 @@ const nr = co("logLevel", 0, {
|
|
|
1900
1900
|
sameDayDelivery: "same_day_delivery",
|
|
1901
1901
|
mondayDelivery: "monday_delivery",
|
|
1902
1902
|
saturdayDelivery: "saturday_delivery"
|
|
1903
|
-
},
|
|
1903
|
+
}, lo = Object.freeze(["mondayDelivery", "saturdayDelivery"]), de = {
|
|
1904
1904
|
requiresSignature: "signature",
|
|
1905
1905
|
recipientOnlyDelivery: "only_recipient",
|
|
1906
1906
|
priorityDelivery: "priority_delivery"
|
|
1907
|
-
},
|
|
1907
|
+
}, uo = {
|
|
1908
1908
|
PACKAGE: "package",
|
|
1909
1909
|
MAILBOX: "mailbox",
|
|
1910
1910
|
DIGITAL_STAMP: "digital_stamp",
|
|
@@ -1912,22 +1912,22 @@ const nr = co("logLevel", 0, {
|
|
|
1912
1912
|
UNFRANKED: "letter",
|
|
1913
1913
|
ENVELOPE: "envelope",
|
|
1914
1914
|
PALLET: "pallet"
|
|
1915
|
-
}, Ir = (e) => e.replace(/_([a-z])/g, (t, r) => r.toUpperCase()),
|
|
1915
|
+
}, Ir = (e) => e.replace(/_([a-z])/g, (t, r) => r.toUpperCase()), po = (e) => e.charAt(0).toUpperCase() + e.slice(1), Jt = (e) => po(Ir(e)), Vr = (e) => e === "pickup" ? g.AllowPickupLocations : `allow${Jt(e)}Delivery`, fo = (e) => e === "pickup" ? g.PricePickup : `price${Jt(e)}Delivery`, ke = (e) => `allow${Jt(e)}`, pn = (e) => `price${Jt(e)}`, Rr = (e) => e.replace(/_delivery$/, "");
|
|
1916
1916
|
Object.freeze(Object.values(Ye));
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1919
|
-
),
|
|
1920
|
-
Object.values(
|
|
1921
|
-
),
|
|
1917
|
+
const ho = Object.freeze(Object.values(de)), go = Object.freeze(
|
|
1918
|
+
lo.map((e) => Rr(Me[e]))
|
|
1919
|
+
), yo = Object.fromEntries(
|
|
1920
|
+
Object.values(de).map((e) => [ke(e), !0])
|
|
1921
|
+
), mo = [
|
|
1922
1922
|
...Object.values(Ye).map((e) => [
|
|
1923
1923
|
Vr(e),
|
|
1924
|
-
|
|
1924
|
+
fo(e)
|
|
1925
1925
|
]),
|
|
1926
1926
|
...Object.values(Me).map((e) => [
|
|
1927
1927
|
ke(e),
|
|
1928
1928
|
pn(e)
|
|
1929
1929
|
]),
|
|
1930
|
-
...Object.values(
|
|
1930
|
+
...Object.values(de).map((e) => [
|
|
1931
1931
|
ke(e),
|
|
1932
1932
|
pn(e)
|
|
1933
1933
|
])
|
|
@@ -1935,12 +1935,12 @@ const go = Object.freeze(Object.values(ue)), yo = Object.freeze(
|
|
|
1935
1935
|
// derives identical keys from both; keep the first occurrence of each pair.
|
|
1936
1936
|
].filter(([e], t, r) => r.findIndex(([n]) => n === e) === t), ki = {
|
|
1937
1937
|
...Ye
|
|
1938
|
-
}, Si = {
|
|
1939
|
-
...po
|
|
1940
1938
|
}, Di = {
|
|
1941
|
-
...
|
|
1942
|
-
},
|
|
1943
|
-
...
|
|
1939
|
+
...uo
|
|
1940
|
+
}, Si = {
|
|
1941
|
+
...de
|
|
1942
|
+
}, vo = /* @__PURE__ */ new Set([
|
|
1943
|
+
...Object.keys(de),
|
|
1944
1944
|
...Object.keys(Me),
|
|
1945
1945
|
// Known options not relevant to the widget UI
|
|
1946
1946
|
"additionalInsurance",
|
|
@@ -1966,9 +1966,9 @@ const go = Object.freeze(Object.values(ue)), yo = Object.freeze(
|
|
|
1966
1966
|
Object.fromEntries(
|
|
1967
1967
|
Object.entries(Me).map(([e, t]) => [e, ke(t)])
|
|
1968
1968
|
);
|
|
1969
|
-
const
|
|
1969
|
+
const wo = Object.fromEntries(
|
|
1970
1970
|
Object.entries(Me).map(([e, t]) => [e, Rr(t)])
|
|
1971
|
-
),
|
|
1971
|
+
), bo = [
|
|
1972
1972
|
...Object.entries(Ye).map(([e, t]) => [
|
|
1973
1973
|
Vr(t),
|
|
1974
1974
|
{ type: "deliveryType", name: e }
|
|
@@ -1977,33 +1977,33 @@ const bo = Object.fromEntries(
|
|
|
1977
1977
|
ke(t),
|
|
1978
1978
|
{ type: "option", name: e }
|
|
1979
1979
|
]),
|
|
1980
|
-
...Object.entries(
|
|
1980
|
+
...Object.entries(de).map(([e, t]) => [
|
|
1981
1981
|
ke(t),
|
|
1982
1982
|
{ type: "option", name: e }
|
|
1983
1983
|
])
|
|
1984
1984
|
];
|
|
1985
|
-
|
|
1985
|
+
bo.reduce((e, [t, r]) => ((e[t] ?? (e[t] = [])).push(r), e), {});
|
|
1986
1986
|
Object.fromEntries(
|
|
1987
1987
|
Object.entries(ki).map(([e, t]) => [t, e])
|
|
1988
1988
|
);
|
|
1989
1989
|
Object.fromEntries(
|
|
1990
|
-
Object.entries(Di).map(([e, t]) => [t, e])
|
|
1991
|
-
);
|
|
1992
|
-
const So = Object.fromEntries(
|
|
1993
1990
|
Object.entries(Si).map(([e, t]) => [t, e])
|
|
1991
|
+
);
|
|
1992
|
+
const ko = Object.fromEntries(
|
|
1993
|
+
Object.entries(Di).map(([e, t]) => [t, e])
|
|
1994
1994
|
), Do = (e) => {
|
|
1995
1995
|
const t = ki[e];
|
|
1996
|
-
return t ||
|
|
1997
|
-
},
|
|
1998
|
-
const t = Si[e];
|
|
1999
|
-
return t || le().debug(`Unmapped capability package type: "${e}"`), t;
|
|
2000
|
-
}, Ur = (e) => {
|
|
1996
|
+
return t || ue().debug(`Unmapped capability delivery type: "${e}"`), t;
|
|
1997
|
+
}, So = (e) => {
|
|
2001
1998
|
const t = Di[e];
|
|
2002
|
-
return
|
|
2003
|
-
},
|
|
1999
|
+
return t || ue().debug(`Unmapped capability package type: "${e}"`), t;
|
|
2000
|
+
}, Ur = (e) => {
|
|
2001
|
+
const t = Si[e];
|
|
2002
|
+
return !t && !vo.has(e) && ue().debug(`Unmapped capability option: "${e}"`), t;
|
|
2003
|
+
}, _o = (e) => ko[e], Po = (e) => wo[e], _i = (e) => {
|
|
2004
2004
|
const t = e.deliveryTypes.map(Do).filter((r) => r !== void 0);
|
|
2005
2005
|
for (const r of Object.keys(e.options)) {
|
|
2006
|
-
const n =
|
|
2006
|
+
const n = Po(r);
|
|
2007
2007
|
n && !t.includes(n) && t.push(n);
|
|
2008
2008
|
}
|
|
2009
2009
|
return t;
|
|
@@ -2015,30 +2015,30 @@ Object.freeze([
|
|
|
2015
2015
|
A.PackageSmall,
|
|
2016
2016
|
A.Envelope
|
|
2017
2017
|
]);
|
|
2018
|
-
const fn = "carriers",
|
|
2018
|
+
const fn = "carriers", Eo = "deliveryOptions", Pi = "pickupLocations", fr = "weekday", Oo = g.CutoffTime, To = g.CutoffTimeSameDay, Ei = 1, Co = 2, Ao = 3, xo = 4, Mo = 5, Oi = 6, jo = 0, No = ":", Fo = "y-MM-dd HH:mm:ss", Lo = 3212, Io = 3501, Vo = 3506, Ro = 3516, Uo = 3731, Wo = 10832, zo = Object.freeze([
|
|
2019
2019
|
0,
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
]),
|
|
2024
|
-
[
|
|
2020
|
+
Vo,
|
|
2021
|
+
Wo,
|
|
2022
|
+
Ro
|
|
2023
|
+
]), $o = Object.freeze({
|
|
2024
|
+
[Uo]: Io
|
|
2025
2025
|
}), Ti = (e, t, r) => (Object.defineProperty(e, t, {
|
|
2026
2026
|
get() {
|
|
2027
2027
|
return r;
|
|
2028
2028
|
}
|
|
2029
|
-
}), e),
|
|
2029
|
+
}), e), qo = (e, t) => Ti(e, "loading", t), Ho = (e, t) => t ? t(e) : Array.isArray(e) ? e.length > 0 : !!e, Ci = (e, t) => new Promise((r) => {
|
|
2030
2030
|
const n = He(
|
|
2031
2031
|
e,
|
|
2032
2032
|
async (i) => {
|
|
2033
|
-
await
|
|
2033
|
+
await Ho(i, t == null ? void 0 : t.condition) && (n(), r(void 0));
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
2036
|
immediate: !0,
|
|
2037
2037
|
...t
|
|
2038
2038
|
}
|
|
2039
2039
|
);
|
|
2040
|
-
}), Ai = (e, t, r) => Ti(
|
|
2041
|
-
const n = /* @__PURE__ */ N(!1), i = /* @__PURE__ */ N(!1), s =
|
|
2040
|
+
}), Ai = (e, t, r) => Ti(qo(e, r), "load", t), Wr = (e, t, r) => {
|
|
2041
|
+
const n = /* @__PURE__ */ N(!1), i = /* @__PURE__ */ N(!1), s = Xa(
|
|
2042
2042
|
async (o) => v(n) ? e(o) : t,
|
|
2043
2043
|
t,
|
|
2044
2044
|
{
|
|
@@ -2051,35 +2051,35 @@ const fn = "carriers", Oo = "deliveryOptions", Pi = "pickupLocations", fr = "wee
|
|
|
2051
2051
|
i
|
|
2052
2052
|
);
|
|
2053
2053
|
return r != null && r.immediate && a.load(), a;
|
|
2054
|
-
},
|
|
2054
|
+
}, Bo = (e = "") => `https://assets.myparcel.nl/${e.replace(/^\/+/, "")}`;
|
|
2055
2055
|
function F(e) {
|
|
2056
2056
|
const t = Object.prototype.toString.call(e);
|
|
2057
2057
|
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
2058
2058
|
}
|
|
2059
|
-
function
|
|
2059
|
+
function le(e, t) {
|
|
2060
2060
|
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
2061
2061
|
}
|
|
2062
|
-
function
|
|
2062
|
+
function Yo(e, t) {
|
|
2063
2063
|
const r = F(e);
|
|
2064
|
-
return isNaN(t) ?
|
|
2064
|
+
return isNaN(t) ? le(e, NaN) : (r.setDate(r.getDate() + t), r);
|
|
2065
2065
|
}
|
|
2066
|
-
const xi = 6048e5,
|
|
2067
|
-
let
|
|
2066
|
+
const xi = 6048e5, Go = 864e5;
|
|
2067
|
+
let Jo = {};
|
|
2068
2068
|
function Kt() {
|
|
2069
|
-
return
|
|
2069
|
+
return Jo;
|
|
2070
2070
|
}
|
|
2071
2071
|
function ht(e, t) {
|
|
2072
|
-
var o, c,
|
|
2073
|
-
const r = Kt(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : c.weekStartsOn) ?? r.weekStartsOn ?? ((
|
|
2072
|
+
var o, c, l, u;
|
|
2073
|
+
const r = Kt(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : c.weekStartsOn) ?? r.weekStartsOn ?? ((u = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : u.weekStartsOn) ?? 0, i = F(e), s = i.getDay(), a = (s < n ? 7 : 0) + s - n;
|
|
2074
2074
|
return i.setDate(i.getDate() - a), i.setHours(0, 0, 0, 0), i;
|
|
2075
2075
|
}
|
|
2076
2076
|
function Vt(e) {
|
|
2077
2077
|
return ht(e, { weekStartsOn: 1 });
|
|
2078
2078
|
}
|
|
2079
2079
|
function Mi(e) {
|
|
2080
|
-
const t = F(e), r = t.getFullYear(), n =
|
|
2080
|
+
const t = F(e), r = t.getFullYear(), n = le(e, 0);
|
|
2081
2081
|
n.setFullYear(r + 1, 0, 4), n.setHours(0, 0, 0, 0);
|
|
2082
|
-
const i = Vt(n), s =
|
|
2082
|
+
const i = Vt(n), s = le(e, 0);
|
|
2083
2083
|
s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0);
|
|
2084
2084
|
const a = Vt(s);
|
|
2085
2085
|
return t.getTime() >= i.getTime() ? r + 1 : t.getTime() >= a.getTime() ? r : r - 1;
|
|
@@ -2104,33 +2104,33 @@ function hn(e) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
function ji(e, t) {
|
|
2106
2106
|
const r = B(e), n = B(t), i = +r - hn(r), s = +n - hn(n);
|
|
2107
|
-
return Math.round((i - s) /
|
|
2107
|
+
return Math.round((i - s) / Go);
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2110
|
-
const t = Mi(e), r =
|
|
2109
|
+
function Ko(e) {
|
|
2110
|
+
const t = Mi(e), r = le(e, 0);
|
|
2111
2111
|
return r.setFullYear(t, 0, 4), r.setHours(0, 0, 0, 0), Vt(r);
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2114
|
-
return
|
|
2113
|
+
function Xo(e) {
|
|
2114
|
+
return le(e, Date.now());
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function Qo(e, t) {
|
|
2117
2117
|
const r = B(e), n = B(t);
|
|
2118
2118
|
return +r == +n;
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2120
|
+
function Zo(e) {
|
|
2121
2121
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
2122
2122
|
}
|
|
2123
|
-
function
|
|
2124
|
-
if (!
|
|
2123
|
+
function ec(e) {
|
|
2124
|
+
if (!Zo(e) && typeof e != "number")
|
|
2125
2125
|
return !1;
|
|
2126
2126
|
const t = F(e);
|
|
2127
2127
|
return !isNaN(Number(t));
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
const t = F(e), r =
|
|
2129
|
+
function tc(e) {
|
|
2130
|
+
const t = F(e), r = le(e, 0);
|
|
2131
2131
|
return r.setFullYear(t.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
2132
2132
|
}
|
|
2133
|
-
const
|
|
2133
|
+
const rc = {
|
|
2134
2134
|
lessThanXSeconds: {
|
|
2135
2135
|
one: "less than a second",
|
|
2136
2136
|
other: "less than {{count}} seconds"
|
|
@@ -2192,9 +2192,9 @@ const nc = {
|
|
|
2192
2192
|
one: "almost 1 year",
|
|
2193
2193
|
other: "almost {{count}} years"
|
|
2194
2194
|
}
|
|
2195
|
-
},
|
|
2195
|
+
}, nc = (e, t, r) => {
|
|
2196
2196
|
let n;
|
|
2197
|
-
const i =
|
|
2197
|
+
const i = rc[e];
|
|
2198
2198
|
return typeof i == "string" ? n = i : t === 1 ? n = i.one : n = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
2199
2199
|
};
|
|
2200
2200
|
function ir(e) {
|
|
@@ -2203,42 +2203,42 @@ function ir(e) {
|
|
|
2203
2203
|
return e.formats[r] || e.formats[e.defaultWidth];
|
|
2204
2204
|
};
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2206
|
+
const ic = {
|
|
2207
2207
|
full: "EEEE, MMMM do, y",
|
|
2208
2208
|
long: "MMMM do, y",
|
|
2209
2209
|
medium: "MMM d, y",
|
|
2210
2210
|
short: "MM/dd/yyyy"
|
|
2211
|
-
},
|
|
2211
|
+
}, sc = {
|
|
2212
2212
|
full: "h:mm:ss a zzzz",
|
|
2213
2213
|
long: "h:mm:ss a z",
|
|
2214
2214
|
medium: "h:mm:ss a",
|
|
2215
2215
|
short: "h:mm a"
|
|
2216
|
-
},
|
|
2216
|
+
}, ac = {
|
|
2217
2217
|
full: "{{date}} 'at' {{time}}",
|
|
2218
2218
|
long: "{{date}} 'at' {{time}}",
|
|
2219
2219
|
medium: "{{date}}, {{time}}",
|
|
2220
2220
|
short: "{{date}}, {{time}}"
|
|
2221
|
-
},
|
|
2221
|
+
}, oc = {
|
|
2222
2222
|
date: ir({
|
|
2223
|
-
formats:
|
|
2223
|
+
formats: ic,
|
|
2224
2224
|
defaultWidth: "full"
|
|
2225
2225
|
}),
|
|
2226
2226
|
time: ir({
|
|
2227
|
-
formats:
|
|
2227
|
+
formats: sc,
|
|
2228
2228
|
defaultWidth: "full"
|
|
2229
2229
|
}),
|
|
2230
2230
|
dateTime: ir({
|
|
2231
|
-
formats:
|
|
2231
|
+
formats: ac,
|
|
2232
2232
|
defaultWidth: "full"
|
|
2233
2233
|
})
|
|
2234
|
-
},
|
|
2234
|
+
}, cc = {
|
|
2235
2235
|
lastWeek: "'last' eeee 'at' p",
|
|
2236
2236
|
yesterday: "'yesterday at' p",
|
|
2237
2237
|
today: "'today at' p",
|
|
2238
2238
|
tomorrow: "'tomorrow at' p",
|
|
2239
2239
|
nextWeek: "eeee 'at' p",
|
|
2240
2240
|
other: "P"
|
|
2241
|
-
},
|
|
2241
|
+
}, lc = (e, t, r, n) => cc[e];
|
|
2242
2242
|
function Qe(e) {
|
|
2243
2243
|
return (t, r) => {
|
|
2244
2244
|
const n = r != null && r.context ? String(r.context) : "standalone";
|
|
@@ -2254,15 +2254,15 @@ function Qe(e) {
|
|
|
2254
2254
|
return i[s];
|
|
2255
2255
|
};
|
|
2256
2256
|
}
|
|
2257
|
-
const
|
|
2257
|
+
const uc = {
|
|
2258
2258
|
narrow: ["B", "A"],
|
|
2259
2259
|
abbreviated: ["BC", "AD"],
|
|
2260
2260
|
wide: ["Before Christ", "Anno Domini"]
|
|
2261
|
-
},
|
|
2261
|
+
}, dc = {
|
|
2262
2262
|
narrow: ["1", "2", "3", "4"],
|
|
2263
2263
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2264
2264
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2265
|
-
},
|
|
2265
|
+
}, pc = {
|
|
2266
2266
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2267
2267
|
abbreviated: [
|
|
2268
2268
|
"Jan",
|
|
@@ -2292,7 +2292,7 @@ const dc = {
|
|
|
2292
2292
|
"November",
|
|
2293
2293
|
"December"
|
|
2294
2294
|
]
|
|
2295
|
-
},
|
|
2295
|
+
}, fc = {
|
|
2296
2296
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
2297
2297
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
2298
2298
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -2305,7 +2305,7 @@ const dc = {
|
|
|
2305
2305
|
"Friday",
|
|
2306
2306
|
"Saturday"
|
|
2307
2307
|
]
|
|
2308
|
-
},
|
|
2308
|
+
}, hc = {
|
|
2309
2309
|
narrow: {
|
|
2310
2310
|
am: "a",
|
|
2311
2311
|
pm: "p",
|
|
@@ -2336,7 +2336,7 @@ const dc = {
|
|
|
2336
2336
|
evening: "evening",
|
|
2337
2337
|
night: "night"
|
|
2338
2338
|
}
|
|
2339
|
-
},
|
|
2339
|
+
}, gc = {
|
|
2340
2340
|
narrow: {
|
|
2341
2341
|
am: "a",
|
|
2342
2342
|
pm: "p",
|
|
@@ -2367,7 +2367,7 @@ const dc = {
|
|
|
2367
2367
|
evening: "in the evening",
|
|
2368
2368
|
night: "at night"
|
|
2369
2369
|
}
|
|
2370
|
-
},
|
|
2370
|
+
}, yc = (e, t) => {
|
|
2371
2371
|
const r = Number(e), n = r % 100;
|
|
2372
2372
|
if (n > 20 || n < 10)
|
|
2373
2373
|
switch (n % 10) {
|
|
@@ -2379,29 +2379,29 @@ const dc = {
|
|
|
2379
2379
|
return r + "rd";
|
|
2380
2380
|
}
|
|
2381
2381
|
return r + "th";
|
|
2382
|
-
},
|
|
2383
|
-
ordinalNumber:
|
|
2382
|
+
}, mc = {
|
|
2383
|
+
ordinalNumber: yc,
|
|
2384
2384
|
era: Qe({
|
|
2385
|
-
values:
|
|
2385
|
+
values: uc,
|
|
2386
2386
|
defaultWidth: "wide"
|
|
2387
2387
|
}),
|
|
2388
2388
|
quarter: Qe({
|
|
2389
|
-
values:
|
|
2389
|
+
values: dc,
|
|
2390
2390
|
defaultWidth: "wide",
|
|
2391
2391
|
argumentCallback: (e) => e - 1
|
|
2392
2392
|
}),
|
|
2393
2393
|
month: Qe({
|
|
2394
|
-
values:
|
|
2394
|
+
values: pc,
|
|
2395
2395
|
defaultWidth: "wide"
|
|
2396
2396
|
}),
|
|
2397
2397
|
day: Qe({
|
|
2398
|
-
values:
|
|
2398
|
+
values: fc,
|
|
2399
2399
|
defaultWidth: "wide"
|
|
2400
2400
|
}),
|
|
2401
2401
|
dayPeriod: Qe({
|
|
2402
|
-
values:
|
|
2402
|
+
values: hc,
|
|
2403
2403
|
defaultWidth: "wide",
|
|
2404
|
-
formattingValues:
|
|
2404
|
+
formattingValues: gc,
|
|
2405
2405
|
defaultFormattingWidth: "wide"
|
|
2406
2406
|
})
|
|
2407
2407
|
};
|
|
@@ -2410,30 +2410,30 @@ function Ze(e) {
|
|
|
2410
2410
|
const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], s = t.match(i);
|
|
2411
2411
|
if (!s)
|
|
2412
2412
|
return null;
|
|
2413
|
-
const a = s[0], o = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(o) ?
|
|
2413
|
+
const a = s[0], o = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(o) ? wc(o, (d) => d.test(a)) : (
|
|
2414
2414
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
2415
|
-
|
|
2415
|
+
vc(o, (d) => d.test(a))
|
|
2416
2416
|
);
|
|
2417
|
-
let
|
|
2418
|
-
|
|
2417
|
+
let l;
|
|
2418
|
+
l = e.valueCallback ? e.valueCallback(c) : c, l = r.valueCallback ? (
|
|
2419
2419
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
2420
|
-
r.valueCallback(
|
|
2421
|
-
) :
|
|
2422
|
-
const
|
|
2423
|
-
return { value:
|
|
2420
|
+
r.valueCallback(l)
|
|
2421
|
+
) : l;
|
|
2422
|
+
const u = t.slice(a.length);
|
|
2423
|
+
return { value: l, rest: u };
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function vc(e, t) {
|
|
2427
2427
|
for (const r in e)
|
|
2428
2428
|
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
2429
2429
|
return r;
|
|
2430
2430
|
}
|
|
2431
|
-
function
|
|
2431
|
+
function wc(e, t) {
|
|
2432
2432
|
for (let r = 0; r < e.length; r++)
|
|
2433
2433
|
if (t(e[r]))
|
|
2434
2434
|
return r;
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2436
|
+
function bc(e) {
|
|
2437
2437
|
return (t, r = {}) => {
|
|
2438
2438
|
const n = t.match(e.matchPattern);
|
|
2439
2439
|
if (!n) return null;
|
|
@@ -2445,23 +2445,23 @@ function kc(e) {
|
|
|
2445
2445
|
return { value: a, rest: o };
|
|
2446
2446
|
};
|
|
2447
2447
|
}
|
|
2448
|
-
const
|
|
2448
|
+
const kc = /^(\d+)(th|st|nd|rd)?/i, Dc = /\d+/i, Sc = {
|
|
2449
2449
|
narrow: /^(b|a)/i,
|
|
2450
2450
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2451
2451
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2452
|
-
},
|
|
2452
|
+
}, _c = {
|
|
2453
2453
|
any: [/^b/i, /^(a|c)/i]
|
|
2454
|
-
},
|
|
2454
|
+
}, Pc = {
|
|
2455
2455
|
narrow: /^[1234]/i,
|
|
2456
2456
|
abbreviated: /^q[1234]/i,
|
|
2457
2457
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2458
|
-
},
|
|
2458
|
+
}, Ec = {
|
|
2459
2459
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2460
|
-
},
|
|
2460
|
+
}, Oc = {
|
|
2461
2461
|
narrow: /^[jfmasond]/i,
|
|
2462
2462
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2463
2463
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2464
|
-
},
|
|
2464
|
+
}, Tc = {
|
|
2465
2465
|
narrow: [
|
|
2466
2466
|
/^j/i,
|
|
2467
2467
|
/^f/i,
|
|
@@ -2490,18 +2490,18 @@ const Sc = /^(\d+)(th|st|nd|rd)?/i, Dc = /\d+/i, _c = {
|
|
|
2490
2490
|
/^n/i,
|
|
2491
2491
|
/^d/i
|
|
2492
2492
|
]
|
|
2493
|
-
},
|
|
2493
|
+
}, Cc = {
|
|
2494
2494
|
narrow: /^[smtwf]/i,
|
|
2495
2495
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2496
2496
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2497
2497
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2498
|
-
},
|
|
2498
|
+
}, Ac = {
|
|
2499
2499
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2500
2500
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2501
|
-
},
|
|
2501
|
+
}, xc = {
|
|
2502
2502
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2503
2503
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2504
|
-
},
|
|
2504
|
+
}, Mc = {
|
|
2505
2505
|
any: {
|
|
2506
2506
|
am: /^a/i,
|
|
2507
2507
|
pm: /^p/i,
|
|
@@ -2512,99 +2512,99 @@ const Sc = /^(\d+)(th|st|nd|rd)?/i, Dc = /\d+/i, _c = {
|
|
|
2512
2512
|
evening: /evening/i,
|
|
2513
2513
|
night: /night/i
|
|
2514
2514
|
}
|
|
2515
|
-
},
|
|
2516
|
-
ordinalNumber:
|
|
2517
|
-
matchPattern:
|
|
2515
|
+
}, jc = {
|
|
2516
|
+
ordinalNumber: bc({
|
|
2517
|
+
matchPattern: kc,
|
|
2518
2518
|
parsePattern: Dc,
|
|
2519
2519
|
valueCallback: (e) => parseInt(e, 10)
|
|
2520
2520
|
}),
|
|
2521
2521
|
era: Ze({
|
|
2522
|
-
matchPatterns:
|
|
2522
|
+
matchPatterns: Sc,
|
|
2523
2523
|
defaultMatchWidth: "wide",
|
|
2524
|
-
parsePatterns:
|
|
2524
|
+
parsePatterns: _c,
|
|
2525
2525
|
defaultParseWidth: "any"
|
|
2526
2526
|
}),
|
|
2527
2527
|
quarter: Ze({
|
|
2528
|
-
matchPatterns:
|
|
2528
|
+
matchPatterns: Pc,
|
|
2529
2529
|
defaultMatchWidth: "wide",
|
|
2530
|
-
parsePatterns:
|
|
2530
|
+
parsePatterns: Ec,
|
|
2531
2531
|
defaultParseWidth: "any",
|
|
2532
2532
|
valueCallback: (e) => e + 1
|
|
2533
2533
|
}),
|
|
2534
2534
|
month: Ze({
|
|
2535
|
-
matchPatterns:
|
|
2535
|
+
matchPatterns: Oc,
|
|
2536
2536
|
defaultMatchWidth: "wide",
|
|
2537
|
-
parsePatterns:
|
|
2537
|
+
parsePatterns: Tc,
|
|
2538
2538
|
defaultParseWidth: "any"
|
|
2539
2539
|
}),
|
|
2540
2540
|
day: Ze({
|
|
2541
|
-
matchPatterns:
|
|
2541
|
+
matchPatterns: Cc,
|
|
2542
2542
|
defaultMatchWidth: "wide",
|
|
2543
|
-
parsePatterns:
|
|
2543
|
+
parsePatterns: Ac,
|
|
2544
2544
|
defaultParseWidth: "any"
|
|
2545
2545
|
}),
|
|
2546
2546
|
dayPeriod: Ze({
|
|
2547
|
-
matchPatterns:
|
|
2547
|
+
matchPatterns: xc,
|
|
2548
2548
|
defaultMatchWidth: "any",
|
|
2549
|
-
parsePatterns:
|
|
2549
|
+
parsePatterns: Mc,
|
|
2550
2550
|
defaultParseWidth: "any"
|
|
2551
2551
|
})
|
|
2552
|
-
},
|
|
2552
|
+
}, Nc = {
|
|
2553
2553
|
code: "en-US",
|
|
2554
|
-
formatDistance:
|
|
2555
|
-
formatLong:
|
|
2556
|
-
formatRelative:
|
|
2557
|
-
localize:
|
|
2558
|
-
match:
|
|
2554
|
+
formatDistance: nc,
|
|
2555
|
+
formatLong: oc,
|
|
2556
|
+
formatRelative: lc,
|
|
2557
|
+
localize: mc,
|
|
2558
|
+
match: jc,
|
|
2559
2559
|
options: {
|
|
2560
2560
|
weekStartsOn: 0,
|
|
2561
2561
|
firstWeekContainsDate: 1
|
|
2562
2562
|
}
|
|
2563
2563
|
};
|
|
2564
|
-
function
|
|
2564
|
+
function Fc(e) {
|
|
2565
2565
|
const t = F(e);
|
|
2566
|
-
return ji(t,
|
|
2566
|
+
return ji(t, tc(t)) + 1;
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2569
|
-
const t = F(e), r = +Vt(t) - +
|
|
2568
|
+
function Lc(e) {
|
|
2569
|
+
const t = F(e), r = +Vt(t) - +Ko(t);
|
|
2570
2570
|
return Math.round(r / xi) + 1;
|
|
2571
2571
|
}
|
|
2572
2572
|
function Ni(e, t) {
|
|
2573
|
-
var
|
|
2574
|
-
const r = F(e), n = r.getFullYear(), i = Kt(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (
|
|
2573
|
+
var u, d, p, f;
|
|
2574
|
+
const r = F(e), n = r.getFullYear(), i = Kt(), s = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (u = t == null ? void 0 : t.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((f = (p = i.locale) == null ? void 0 : p.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = le(e, 0);
|
|
2575
2575
|
a.setFullYear(n + 1, 0, s), a.setHours(0, 0, 0, 0);
|
|
2576
|
-
const o = ht(a, t), c =
|
|
2576
|
+
const o = ht(a, t), c = le(e, 0);
|
|
2577
2577
|
c.setFullYear(n, 0, s), c.setHours(0, 0, 0, 0);
|
|
2578
|
-
const
|
|
2579
|
-
return r.getTime() >= o.getTime() ? n + 1 : r.getTime() >=
|
|
2578
|
+
const l = ht(c, t);
|
|
2579
|
+
return r.getTime() >= o.getTime() ? n + 1 : r.getTime() >= l.getTime() ? n : n - 1;
|
|
2580
2580
|
}
|
|
2581
|
-
function
|
|
2582
|
-
var a, o, c,
|
|
2583
|
-
const r = Kt(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((o = (a = t == null ? void 0 : t.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((
|
|
2581
|
+
function Ic(e, t) {
|
|
2582
|
+
var a, o, c, l;
|
|
2583
|
+
const r = Kt(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((o = (a = t == null ? void 0 : t.locale) == null ? void 0 : a.options) == null ? void 0 : o.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((l = (c = r.locale) == null ? void 0 : c.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, i = Ni(e, t), s = le(e, 0);
|
|
2584
2584
|
return s.setFullYear(i, 0, n), s.setHours(0, 0, 0, 0), ht(s, t);
|
|
2585
2585
|
}
|
|
2586
|
-
function
|
|
2587
|
-
const r = F(e), n = +ht(r, t) - +
|
|
2586
|
+
function Vc(e, t) {
|
|
2587
|
+
const r = F(e), n = +ht(r, t) - +Ic(r, t);
|
|
2588
2588
|
return Math.round(n / xi) + 1;
|
|
2589
2589
|
}
|
|
2590
|
-
function
|
|
2590
|
+
function D(e, t) {
|
|
2591
2591
|
const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
2592
2592
|
return r + n;
|
|
2593
2593
|
}
|
|
2594
|
-
const
|
|
2594
|
+
const fe = {
|
|
2595
2595
|
// Year
|
|
2596
2596
|
y(e, t) {
|
|
2597
2597
|
const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
|
|
2598
|
-
return
|
|
2598
|
+
return D(t === "yy" ? n % 100 : n, t.length);
|
|
2599
2599
|
},
|
|
2600
2600
|
// Month
|
|
2601
2601
|
M(e, t) {
|
|
2602
2602
|
const r = e.getMonth();
|
|
2603
|
-
return t === "M" ? String(r + 1) :
|
|
2603
|
+
return t === "M" ? String(r + 1) : D(r + 1, 2);
|
|
2604
2604
|
},
|
|
2605
2605
|
// Day of the month
|
|
2606
2606
|
d(e, t) {
|
|
2607
|
-
return
|
|
2607
|
+
return D(e.getDate(), t.length);
|
|
2608
2608
|
},
|
|
2609
2609
|
// AM or PM
|
|
2610
2610
|
a(e, t) {
|
|
@@ -2623,26 +2623,26 @@ const pe = {
|
|
|
2623
2623
|
},
|
|
2624
2624
|
// Hour [1-12]
|
|
2625
2625
|
h(e, t) {
|
|
2626
|
-
return
|
|
2626
|
+
return D(e.getHours() % 12 || 12, t.length);
|
|
2627
2627
|
},
|
|
2628
2628
|
// Hour [0-23]
|
|
2629
2629
|
H(e, t) {
|
|
2630
|
-
return
|
|
2630
|
+
return D(e.getHours(), t.length);
|
|
2631
2631
|
},
|
|
2632
2632
|
// Minute
|
|
2633
2633
|
m(e, t) {
|
|
2634
|
-
return
|
|
2634
|
+
return D(e.getMinutes(), t.length);
|
|
2635
2635
|
},
|
|
2636
2636
|
// Second
|
|
2637
2637
|
s(e, t) {
|
|
2638
|
-
return
|
|
2638
|
+
return D(e.getSeconds(), t.length);
|
|
2639
2639
|
},
|
|
2640
2640
|
// Fraction of second
|
|
2641
2641
|
S(e, t) {
|
|
2642
2642
|
const r = t.length, n = e.getMilliseconds(), i = Math.trunc(
|
|
2643
2643
|
n * Math.pow(10, r - 3)
|
|
2644
2644
|
);
|
|
2645
|
-
return
|
|
2645
|
+
return D(i, t.length);
|
|
2646
2646
|
}
|
|
2647
2647
|
}, Le = {
|
|
2648
2648
|
midnight: "midnight",
|
|
@@ -2672,21 +2672,21 @@ const pe = {
|
|
|
2672
2672
|
const n = e.getFullYear(), i = n > 0 ? n : 1 - n;
|
|
2673
2673
|
return r.ordinalNumber(i, { unit: "year" });
|
|
2674
2674
|
}
|
|
2675
|
-
return
|
|
2675
|
+
return fe.y(e, t);
|
|
2676
2676
|
},
|
|
2677
2677
|
// Local week-numbering year
|
|
2678
2678
|
Y: function(e, t, r, n) {
|
|
2679
2679
|
const i = Ni(e, n), s = i > 0 ? i : 1 - i;
|
|
2680
2680
|
if (t === "YY") {
|
|
2681
2681
|
const a = s % 100;
|
|
2682
|
-
return
|
|
2682
|
+
return D(a, 2);
|
|
2683
2683
|
}
|
|
2684
|
-
return t === "Yo" ? r.ordinalNumber(s, { unit: "year" }) :
|
|
2684
|
+
return t === "Yo" ? r.ordinalNumber(s, { unit: "year" }) : D(s, t.length);
|
|
2685
2685
|
},
|
|
2686
2686
|
// ISO week-numbering year
|
|
2687
2687
|
R: function(e, t) {
|
|
2688
2688
|
const r = Mi(e);
|
|
2689
|
-
return
|
|
2689
|
+
return D(r, t.length);
|
|
2690
2690
|
},
|
|
2691
2691
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
2692
2692
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -2699,7 +2699,7 @@ const pe = {
|
|
|
2699
2699
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
2700
2700
|
u: function(e, t) {
|
|
2701
2701
|
const r = e.getFullYear();
|
|
2702
|
-
return
|
|
2702
|
+
return D(r, t.length);
|
|
2703
2703
|
},
|
|
2704
2704
|
// Quarter
|
|
2705
2705
|
Q: function(e, t, r) {
|
|
@@ -2708,7 +2708,7 @@ const pe = {
|
|
|
2708
2708
|
case "Q":
|
|
2709
2709
|
return String(n);
|
|
2710
2710
|
case "QQ":
|
|
2711
|
-
return
|
|
2711
|
+
return D(n, 2);
|
|
2712
2712
|
case "Qo":
|
|
2713
2713
|
return r.ordinalNumber(n, { unit: "quarter" });
|
|
2714
2714
|
case "QQQ":
|
|
@@ -2735,7 +2735,7 @@ const pe = {
|
|
|
2735
2735
|
case "q":
|
|
2736
2736
|
return String(n);
|
|
2737
2737
|
case "qq":
|
|
2738
|
-
return
|
|
2738
|
+
return D(n, 2);
|
|
2739
2739
|
case "qo":
|
|
2740
2740
|
return r.ordinalNumber(n, { unit: "quarter" });
|
|
2741
2741
|
case "qqq":
|
|
@@ -2761,7 +2761,7 @@ const pe = {
|
|
|
2761
2761
|
switch (t) {
|
|
2762
2762
|
case "M":
|
|
2763
2763
|
case "MM":
|
|
2764
|
-
return
|
|
2764
|
+
return fe.M(e, t);
|
|
2765
2765
|
case "Mo":
|
|
2766
2766
|
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
2767
2767
|
case "MMM":
|
|
@@ -2785,7 +2785,7 @@ const pe = {
|
|
|
2785
2785
|
case "L":
|
|
2786
2786
|
return String(n + 1);
|
|
2787
2787
|
case "LL":
|
|
2788
|
-
return
|
|
2788
|
+
return D(n + 1, 2);
|
|
2789
2789
|
case "Lo":
|
|
2790
2790
|
return r.ordinalNumber(n + 1, { unit: "month" });
|
|
2791
2791
|
case "LLL":
|
|
@@ -2804,22 +2804,22 @@ const pe = {
|
|
|
2804
2804
|
},
|
|
2805
2805
|
// Local week of year
|
|
2806
2806
|
w: function(e, t, r, n) {
|
|
2807
|
-
const i =
|
|
2808
|
-
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) :
|
|
2807
|
+
const i = Vc(e, n);
|
|
2808
|
+
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) : D(i, t.length);
|
|
2809
2809
|
},
|
|
2810
2810
|
// ISO week of year
|
|
2811
2811
|
I: function(e, t, r) {
|
|
2812
|
-
const n =
|
|
2813
|
-
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) :
|
|
2812
|
+
const n = Lc(e);
|
|
2813
|
+
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : D(n, t.length);
|
|
2814
2814
|
},
|
|
2815
2815
|
// Day of the month
|
|
2816
2816
|
d: function(e, t, r) {
|
|
2817
|
-
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
2817
|
+
return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : fe.d(e, t);
|
|
2818
2818
|
},
|
|
2819
2819
|
// Day of year
|
|
2820
2820
|
D: function(e, t, r) {
|
|
2821
|
-
const n =
|
|
2822
|
-
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) :
|
|
2821
|
+
const n = Fc(e);
|
|
2822
|
+
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : D(n, t.length);
|
|
2823
2823
|
},
|
|
2824
2824
|
// Day of week
|
|
2825
2825
|
E: function(e, t, r) {
|
|
@@ -2856,7 +2856,7 @@ const pe = {
|
|
|
2856
2856
|
case "e":
|
|
2857
2857
|
return String(s);
|
|
2858
2858
|
case "ee":
|
|
2859
|
-
return
|
|
2859
|
+
return D(s, 2);
|
|
2860
2860
|
case "eo":
|
|
2861
2861
|
return r.ordinalNumber(s, { unit: "day" });
|
|
2862
2862
|
case "eee":
|
|
@@ -2888,7 +2888,7 @@ const pe = {
|
|
|
2888
2888
|
case "c":
|
|
2889
2889
|
return String(s);
|
|
2890
2890
|
case "cc":
|
|
2891
|
-
return
|
|
2891
|
+
return D(s, t.length);
|
|
2892
2892
|
case "co":
|
|
2893
2893
|
return r.ordinalNumber(s, { unit: "day" });
|
|
2894
2894
|
case "ccc":
|
|
@@ -2920,7 +2920,7 @@ const pe = {
|
|
|
2920
2920
|
case "i":
|
|
2921
2921
|
return String(i);
|
|
2922
2922
|
case "ii":
|
|
2923
|
-
return
|
|
2923
|
+
return D(i, t.length);
|
|
2924
2924
|
case "io":
|
|
2925
2925
|
return r.ordinalNumber(i, { unit: "day" });
|
|
2926
2926
|
case "iii":
|
|
@@ -3030,33 +3030,33 @@ const pe = {
|
|
|
3030
3030
|
let n = e.getHours() % 12;
|
|
3031
3031
|
return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
|
|
3032
3032
|
}
|
|
3033
|
-
return
|
|
3033
|
+
return fe.h(e, t);
|
|
3034
3034
|
},
|
|
3035
3035
|
// Hour [0-23]
|
|
3036
3036
|
H: function(e, t, r) {
|
|
3037
|
-
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
3037
|
+
return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : fe.H(e, t);
|
|
3038
3038
|
},
|
|
3039
3039
|
// Hour [0-11]
|
|
3040
3040
|
K: function(e, t, r) {
|
|
3041
3041
|
const n = e.getHours() % 12;
|
|
3042
|
-
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) :
|
|
3042
|
+
return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : D(n, t.length);
|
|
3043
3043
|
},
|
|
3044
3044
|
// Hour [1-24]
|
|
3045
3045
|
k: function(e, t, r) {
|
|
3046
3046
|
let n = e.getHours();
|
|
3047
|
-
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) :
|
|
3047
|
+
return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : D(n, t.length);
|
|
3048
3048
|
},
|
|
3049
3049
|
// Minute
|
|
3050
3050
|
m: function(e, t, r) {
|
|
3051
|
-
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
3051
|
+
return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : fe.m(e, t);
|
|
3052
3052
|
},
|
|
3053
3053
|
// Second
|
|
3054
3054
|
s: function(e, t, r) {
|
|
3055
|
-
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
3055
|
+
return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : fe.s(e, t);
|
|
3056
3056
|
},
|
|
3057
3057
|
// Fraction of second
|
|
3058
3058
|
S: function(e, t) {
|
|
3059
|
-
return
|
|
3059
|
+
return fe.S(e, t);
|
|
3060
3060
|
},
|
|
3061
3061
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
3062
3062
|
X: function(e, t, r) {
|
|
@@ -3113,23 +3113,23 @@ const pe = {
|
|
|
3113
3113
|
// Seconds timestamp
|
|
3114
3114
|
t: function(e, t, r) {
|
|
3115
3115
|
const n = Math.trunc(e.getTime() / 1e3);
|
|
3116
|
-
return
|
|
3116
|
+
return D(n, t.length);
|
|
3117
3117
|
},
|
|
3118
3118
|
// Milliseconds timestamp
|
|
3119
3119
|
T: function(e, t, r) {
|
|
3120
3120
|
const n = e.getTime();
|
|
3121
|
-
return
|
|
3121
|
+
return D(n, t.length);
|
|
3122
3122
|
}
|
|
3123
3123
|
};
|
|
3124
3124
|
function yn(e, t = "") {
|
|
3125
3125
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.trunc(n / 60), s = n % 60;
|
|
3126
|
-
return s === 0 ? r + String(i) : r + String(i) + t +
|
|
3126
|
+
return s === 0 ? r + String(i) : r + String(i) + t + D(s, 2);
|
|
3127
3127
|
}
|
|
3128
3128
|
function mn(e, t) {
|
|
3129
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") +
|
|
3129
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + D(Math.abs(e) / 60, 2) : Pe(e, t);
|
|
3130
3130
|
}
|
|
3131
3131
|
function Pe(e, t = "") {
|
|
3132
|
-
const r = e > 0 ? "-" : "+", n = Math.abs(e), i =
|
|
3132
|
+
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = D(Math.trunc(n / 60), 2), s = D(n % 60, 2);
|
|
3133
3133
|
return r + i + t + s;
|
|
3134
3134
|
}
|
|
3135
3135
|
const vn = (e, t) => {
|
|
@@ -3154,7 +3154,7 @@ const vn = (e, t) => {
|
|
|
3154
3154
|
default:
|
|
3155
3155
|
return t.time({ width: "full" });
|
|
3156
3156
|
}
|
|
3157
|
-
},
|
|
3157
|
+
}, Rc = (e, t) => {
|
|
3158
3158
|
const r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
|
|
3159
3159
|
if (!i)
|
|
3160
3160
|
return vn(e, t);
|
|
@@ -3174,53 +3174,53 @@ const vn = (e, t) => {
|
|
|
3174
3174
|
break;
|
|
3175
3175
|
}
|
|
3176
3176
|
return s.replace("{{date}}", vn(n, t)).replace("{{time}}", Fi(i, t));
|
|
3177
|
-
},
|
|
3177
|
+
}, Uc = {
|
|
3178
3178
|
p: Fi,
|
|
3179
|
-
P:
|
|
3180
|
-
},
|
|
3179
|
+
P: Rc
|
|
3180
|
+
}, Wc = /^D+$/, zc = /^Y+$/, $c = ["D", "DD", "YY", "YYYY"];
|
|
3181
|
+
function qc(e) {
|
|
3182
|
+
return Wc.test(e);
|
|
3183
|
+
}
|
|
3181
3184
|
function Hc(e) {
|
|
3182
3185
|
return zc.test(e);
|
|
3183
3186
|
}
|
|
3184
|
-
function Bc(e) {
|
|
3185
|
-
|
|
3187
|
+
function Bc(e, t, r) {
|
|
3188
|
+
const n = Yc(e, t, r);
|
|
3189
|
+
if (console.warn(n), $c.includes(e)) throw new RangeError(n);
|
|
3186
3190
|
}
|
|
3187
3191
|
function Yc(e, t, r) {
|
|
3188
|
-
const n = Gc(e, t, r);
|
|
3189
|
-
if (console.warn(n), qc.includes(e)) throw new RangeError(n);
|
|
3190
|
-
}
|
|
3191
|
-
function Gc(e, t, r) {
|
|
3192
3192
|
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
3193
3193
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
3194
3194
|
}
|
|
3195
|
-
const
|
|
3196
|
-
function
|
|
3197
|
-
var
|
|
3198
|
-
const n = Kt(), i = n.locale ??
|
|
3199
|
-
if (!
|
|
3195
|
+
const Gc = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Jc = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Kc = /^'([^]*?)'?$/, Xc = /''/g, Qc = /[a-zA-Z]/;
|
|
3196
|
+
function Zc(e, t, r) {
|
|
3197
|
+
var u, d, p, f;
|
|
3198
|
+
const n = Kt(), i = n.locale ?? Nc, s = n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, a = n.weekStartsOn ?? ((f = (p = n.locale) == null ? void 0 : p.options) == null ? void 0 : f.weekStartsOn) ?? 0, o = F(e);
|
|
3199
|
+
if (!ec(o))
|
|
3200
3200
|
throw new RangeError("Invalid time value");
|
|
3201
|
-
let c = t.match(
|
|
3201
|
+
let c = t.match(Jc).map((w) => {
|
|
3202
3202
|
const h = w[0];
|
|
3203
3203
|
if (h === "p" || h === "P") {
|
|
3204
|
-
const O =
|
|
3204
|
+
const O = Uc[h];
|
|
3205
3205
|
return O(w, i.formatLong);
|
|
3206
3206
|
}
|
|
3207
3207
|
return w;
|
|
3208
|
-
}).join("").match(
|
|
3208
|
+
}).join("").match(Gc).map((w) => {
|
|
3209
3209
|
if (w === "''")
|
|
3210
3210
|
return { isToken: !1, value: "'" };
|
|
3211
3211
|
const h = w[0];
|
|
3212
3212
|
if (h === "'")
|
|
3213
|
-
return { isToken: !1, value:
|
|
3213
|
+
return { isToken: !1, value: el(w) };
|
|
3214
3214
|
if (gn[h])
|
|
3215
3215
|
return { isToken: !0, value: w };
|
|
3216
|
-
if (h.match(
|
|
3216
|
+
if (h.match(Qc))
|
|
3217
3217
|
throw new RangeError(
|
|
3218
3218
|
"Format string contains an unescaped latin alphabet character `" + h + "`"
|
|
3219
3219
|
);
|
|
3220
3220
|
return { isToken: !1, value: w };
|
|
3221
3221
|
});
|
|
3222
3222
|
i.localize.preprocessor && (c = i.localize.preprocessor(o, c));
|
|
3223
|
-
const
|
|
3223
|
+
const l = {
|
|
3224
3224
|
firstWeekContainsDate: s,
|
|
3225
3225
|
weekStartsOn: a,
|
|
3226
3226
|
locale: i
|
|
@@ -3228,30 +3228,30 @@ function el(e, t, r) {
|
|
|
3228
3228
|
return c.map((w) => {
|
|
3229
3229
|
if (!w.isToken) return w.value;
|
|
3230
3230
|
const h = w.value;
|
|
3231
|
-
(
|
|
3231
|
+
(Hc(h) || qc(h)) && Bc(h, t, String(e));
|
|
3232
3232
|
const O = gn[h[0]];
|
|
3233
|
-
return O(o, h, i.localize,
|
|
3233
|
+
return O(o, h, i.localize, l);
|
|
3234
3234
|
}).join("");
|
|
3235
3235
|
}
|
|
3236
|
-
function
|
|
3237
|
-
const t = e.match(
|
|
3238
|
-
return t ? t[1].replace(
|
|
3236
|
+
function el(e) {
|
|
3237
|
+
const t = e.match(Kc);
|
|
3238
|
+
return t ? t[1].replace(Xc, "'") : e;
|
|
3239
3239
|
}
|
|
3240
3240
|
function Li(e) {
|
|
3241
3241
|
return F(e).getDay();
|
|
3242
3242
|
}
|
|
3243
|
-
function
|
|
3243
|
+
function tl(e) {
|
|
3244
3244
|
return F(e).getHours();
|
|
3245
3245
|
}
|
|
3246
|
-
function
|
|
3246
|
+
function rl(e) {
|
|
3247
3247
|
return F(e).getMinutes();
|
|
3248
3248
|
}
|
|
3249
|
-
function
|
|
3249
|
+
function nl(e, t) {
|
|
3250
3250
|
const r = F(e), n = F(t);
|
|
3251
3251
|
return +r < +n;
|
|
3252
3252
|
}
|
|
3253
3253
|
function Ii(e) {
|
|
3254
|
-
return
|
|
3254
|
+
return Qo(e, Xo(e));
|
|
3255
3255
|
}
|
|
3256
3256
|
const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "string" || e instanceof String, zr = (e) => {
|
|
3257
3257
|
try {
|
|
@@ -3259,7 +3259,7 @@ const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "stri
|
|
|
3259
3259
|
} catch {
|
|
3260
3260
|
return !1;
|
|
3261
3261
|
}
|
|
3262
|
-
},
|
|
3262
|
+
}, il = (e, t = (r) => r === void 0) => e ? Object.keys(e).reduce((r, n) => (t(e[n]) || (r[n] = e[n]), r), {}) : {}, nt = (e, t, r) => {
|
|
3263
3263
|
const n = t.split(/[\.\[\]]/g);
|
|
3264
3264
|
let i = e;
|
|
3265
3265
|
for (const s of n) {
|
|
@@ -3275,19 +3275,19 @@ const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "stri
|
|
|
3275
3275
|
[n]: Xt(e[n]) ? Vi(e[n], i) : i
|
|
3276
3276
|
}),
|
|
3277
3277
|
{}
|
|
3278
|
-
),
|
|
3278
|
+
), sl = (e) => {
|
|
3279
3279
|
if (!e || e.length === 0)
|
|
3280
3280
|
return "";
|
|
3281
3281
|
const t = e.toLowerCase();
|
|
3282
3282
|
return t.substring(0, 1).toUpperCase() + t.substring(1, t.length);
|
|
3283
|
-
},
|
|
3283
|
+
}, al = (e) => {
|
|
3284
3284
|
var r;
|
|
3285
|
-
const t = ((r = e == null ? void 0 : e.replace(/([A-Z])+/g,
|
|
3285
|
+
const t = ((r = e == null ? void 0 : e.replace(/([A-Z])+/g, sl)) == null ? void 0 : r.split(/(?=[A-Z])|[\.\-\s_]/).map((n) => n.toLowerCase())) ?? [];
|
|
3286
3286
|
return t.length === 0 ? "" : t.length === 1 ? t[0] : t.reduce((n, i) => `${n}${i.charAt(0).toUpperCase()}${i.slice(1)}`);
|
|
3287
3287
|
}, Ri = (e) => {
|
|
3288
3288
|
const t = (e == null ? void 0 : e.split(/[\.\-\s_]/).map((r) => r.toLowerCase())) ?? [];
|
|
3289
3289
|
return t.length === 0 ? "" : t.map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join("");
|
|
3290
|
-
}, Q = (e) => e, wn = "boolean",
|
|
3290
|
+
}, Q = (e) => e, wn = "boolean", ol = "object", bn = "string", Ui = "Value must", Ge = (e) => `${Ui} be ${e}`, yt = (e) => Ge(`a ${e}`), cl = (e) => `${Ui} have ${e}`, K = Q(() => ({
|
|
3291
3291
|
validate: (e) => typeof e === bn,
|
|
3292
3292
|
error: yt(bn)
|
|
3293
3293
|
})), Rt = Q(() => ({
|
|
@@ -3302,60 +3302,60 @@ const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "stri
|
|
|
3302
3302
|
return $r().validate(r) ? r >= e && r <= t : !1;
|
|
3303
3303
|
},
|
|
3304
3304
|
error: Ge(`between ${e} and ${t}`)
|
|
3305
|
-
})),
|
|
3305
|
+
})), ll = [
|
|
3306
3306
|
fr,
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
], kn = (e, t) => e ? t.validate(e) : !0,
|
|
3307
|
+
Oo,
|
|
3308
|
+
To
|
|
3309
|
+
], kn = (e, t) => e ? t.validate(e) : !0, ul = Q(() => ({
|
|
3310
3310
|
validate(e) {
|
|
3311
3311
|
return Array.isArray(e) && e.every((t) => {
|
|
3312
3312
|
const r = Gt(t, fr);
|
|
3313
3313
|
if (!zr(t) && !r)
|
|
3314
3314
|
return !1;
|
|
3315
|
-
const n = hr(
|
|
3315
|
+
const n = hr(jo, Oi);
|
|
3316
3316
|
if (!r)
|
|
3317
3317
|
return n.validate(t);
|
|
3318
3318
|
const i = Rt();
|
|
3319
3319
|
return n.validate(t[fr]) && kn(t[g.CutoffTime], i) && kn(t[g.CutoffTimeSameDay], i);
|
|
3320
3320
|
});
|
|
3321
3321
|
},
|
|
3322
|
-
error: Ge(`an array containing numbers and/or objects with keys: ${
|
|
3323
|
-
})),
|
|
3322
|
+
error: Ge(`an array containing numbers and/or objects with keys: ${ll.join(", ")}`)
|
|
3323
|
+
})), dl = Q((e, t) => ({
|
|
3324
3324
|
validate: (r) => Object.keys(r).length >= e,
|
|
3325
|
-
error: t ??
|
|
3325
|
+
error: t ?? cl(`at least ${e} keys`)
|
|
3326
3326
|
})), Ee = Q(() => ({
|
|
3327
3327
|
validate: (e) => typeof e === wn,
|
|
3328
3328
|
error: yt(wn)
|
|
3329
|
-
})),
|
|
3330
|
-
validate: (e) => je(e) && e.length ===
|
|
3329
|
+
})), pl = 2, fl = Q(() => ({
|
|
3330
|
+
validate: (e) => je(e) && e.length === pl,
|
|
3331
3331
|
parse: (e) => e.toUpperCase(),
|
|
3332
3332
|
error: Ge("a valid country code")
|
|
3333
|
-
})),
|
|
3333
|
+
})), hl = Q(() => ({
|
|
3334
3334
|
validate: Xt,
|
|
3335
|
-
error: yt(`n ${
|
|
3336
|
-
})),
|
|
3335
|
+
error: yt(`n ${ol}`)
|
|
3336
|
+
})), gl = Q((e) => ({
|
|
3337
3337
|
validate: (t) => e.includes(t),
|
|
3338
3338
|
error: Ge(`one of ${e.join(", ")}`)
|
|
3339
|
-
})),
|
|
3339
|
+
})), yl = Q((e) => ({
|
|
3340
3340
|
validate: (t) => je(t) && e.test(t),
|
|
3341
3341
|
error: Ge(`in the format ${e}`)
|
|
3342
3342
|
})), Wi = (e) => Xt(e) ? e : { key: e }, q = (e) => {
|
|
3343
3343
|
const t = Wi(e), r = {
|
|
3344
3344
|
validators: [],
|
|
3345
|
-
type:
|
|
3345
|
+
type: j.Boolean,
|
|
3346
3346
|
...t
|
|
3347
3347
|
};
|
|
3348
3348
|
switch (t.type) {
|
|
3349
|
-
case
|
|
3349
|
+
case j.Number:
|
|
3350
3350
|
r.validators.push($r());
|
|
3351
3351
|
break;
|
|
3352
|
-
case
|
|
3352
|
+
case j.String:
|
|
3353
3353
|
r.validators.push(K());
|
|
3354
3354
|
break;
|
|
3355
|
-
case
|
|
3355
|
+
case j.Boolean:
|
|
3356
3356
|
r.validators.push(Ee());
|
|
3357
3357
|
break;
|
|
3358
|
-
case
|
|
3358
|
+
case j.Time:
|
|
3359
3359
|
r.validators.push(Rt());
|
|
3360
3360
|
break;
|
|
3361
3361
|
}
|
|
@@ -3376,50 +3376,50 @@ const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "stri
|
|
|
3376
3376
|
...r,
|
|
3377
3377
|
key: t,
|
|
3378
3378
|
parents: [...n.parents ?? [], n.key],
|
|
3379
|
-
type:
|
|
3379
|
+
type: j.Currency
|
|
3380
3380
|
})
|
|
3381
3381
|
];
|
|
3382
|
-
},
|
|
3383
|
-
...
|
|
3382
|
+
}, ml = C(() => [
|
|
3383
|
+
...mo.flatMap(([e, t]) => et(e, t)),
|
|
3384
3384
|
...et(A.Mailbox, g.PricePackageTypeMailbox),
|
|
3385
3385
|
...et(A.DigitalStamp, g.PricePackageTypeDigitalStamp),
|
|
3386
3386
|
...et(A.PackageSmall, g.PricePackageTypePackageSmall),
|
|
3387
3387
|
...et(A.Envelope, g.PricePackageTypeEnvelope),
|
|
3388
3388
|
q({
|
|
3389
3389
|
key: g.DropOffDelay,
|
|
3390
|
-
type:
|
|
3391
|
-
validators: [hr(
|
|
3390
|
+
type: j.Number,
|
|
3391
|
+
validators: [hr(Ml, xl)]
|
|
3392
3392
|
}),
|
|
3393
3393
|
q({
|
|
3394
3394
|
key: g.DeliveryDaysWindow,
|
|
3395
|
-
type:
|
|
3396
|
-
validators: [hr(
|
|
3395
|
+
type: j.Number,
|
|
3396
|
+
validators: [hr(jl, Nl)]
|
|
3397
3397
|
}),
|
|
3398
3398
|
q({
|
|
3399
3399
|
key: g.CutoffTimeSameDay,
|
|
3400
|
-
type:
|
|
3400
|
+
type: j.Time
|
|
3401
3401
|
}),
|
|
3402
3402
|
q({
|
|
3403
3403
|
key: m.PickupLocationsDefaultView,
|
|
3404
|
-
type:
|
|
3404
|
+
type: j.Select
|
|
3405
3405
|
}),
|
|
3406
3406
|
q(m.AllowPickupLocationsViewSelection),
|
|
3407
3407
|
q(m.PickupShowDistance),
|
|
3408
3408
|
q(m.ShowPriceSurcharge),
|
|
3409
3409
|
q({
|
|
3410
3410
|
key: m.PickupLocationsMapTileLayerData,
|
|
3411
|
-
type:
|
|
3411
|
+
type: j.String
|
|
3412
3412
|
}),
|
|
3413
3413
|
q({
|
|
3414
3414
|
key: m.PickupMapAllowLoadMore,
|
|
3415
|
-
type:
|
|
3415
|
+
type: j.Boolean
|
|
3416
3416
|
}),
|
|
3417
3417
|
q({
|
|
3418
3418
|
key: m.ShowPriceZeroAsFree,
|
|
3419
|
-
type:
|
|
3419
|
+
type: j.Boolean
|
|
3420
3420
|
}),
|
|
3421
3421
|
q(m.ClosedDays)
|
|
3422
|
-
]),
|
|
3422
|
+
]), vl = () => Object.fromEntries(Object.values(de).map((e) => [e, ke(e)])), wl = () => ({
|
|
3423
3423
|
...Object.fromEntries(Object.values(Ye).map((e) => [e, Vr(e)])),
|
|
3424
3424
|
...Object.fromEntries(
|
|
3425
3425
|
Object.values(Me).map((e) => [
|
|
@@ -3429,62 +3429,62 @@ const Xt = (e) => !!e && e.constructor === Object, je = (e) => typeof e == "stri
|
|
|
3429
3429
|
)
|
|
3430
3430
|
}), qr = (e) => {
|
|
3431
3431
|
let t;
|
|
3432
|
-
if (Lt(e, { ...Ce, ...
|
|
3432
|
+
if (Lt(e, { ...Ce, ...ce }) && (t = wl()), Lt(e, yi) && (t = vl()), !t)
|
|
3433
3433
|
throw new Error(`No config key found for ${e}`);
|
|
3434
3434
|
return t[e];
|
|
3435
|
-
},
|
|
3435
|
+
}, bl = (e) => {
|
|
3436
3436
|
switch (e) {
|
|
3437
|
-
case
|
|
3437
|
+
case j.Boolean:
|
|
3438
3438
|
return !1;
|
|
3439
|
-
case
|
|
3440
|
-
case
|
|
3439
|
+
case j.Number:
|
|
3440
|
+
case j.Currency:
|
|
3441
3441
|
return 0;
|
|
3442
|
-
case
|
|
3442
|
+
case j.String:
|
|
3443
3443
|
return "";
|
|
3444
3444
|
default:
|
|
3445
3445
|
return;
|
|
3446
3446
|
}
|
|
3447
|
-
},
|
|
3447
|
+
}, kl = Object.freeze({
|
|
3448
3448
|
[A.Package]: g.PriceStandardDelivery,
|
|
3449
3449
|
[A.Mailbox]: g.PricePackageTypeMailbox,
|
|
3450
3450
|
[A.DigitalStamp]: g.PricePackageTypeDigitalStamp,
|
|
3451
3451
|
[A.PackageSmall]: g.PricePackageTypePackageSmall,
|
|
3452
3452
|
[A.Envelope]: g.PricePackageTypeEnvelope
|
|
3453
|
-
}), Dl = (e) =>
|
|
3453
|
+
}), Dl = (e) => kl[e], Sl = (e) => {
|
|
3454
3454
|
const [t, r] = e.split(":");
|
|
3455
3455
|
return [Number(t), Number(r)];
|
|
3456
|
-
},
|
|
3457
|
-
const [r, n] =
|
|
3456
|
+
}, Dn = 60, _l = (e, t = /* @__PURE__ */ new Date()) => {
|
|
3457
|
+
const [r, n] = Sl(e), i = tl(t) * Dn + rl(t), s = Number(r) * Dn + Number(n);
|
|
3458
3458
|
return i >= s;
|
|
3459
3459
|
}, Hr = (e, t) => ({
|
|
3460
3460
|
key: e,
|
|
3461
3461
|
args: t
|
|
3462
|
-
}),
|
|
3462
|
+
}), Pl = (e) => ({
|
|
3463
3463
|
...Hr(e),
|
|
3464
3464
|
plain: !0
|
|
3465
|
-
}),
|
|
3466
|
-
const [t, r] = e.split(
|
|
3465
|
+
}), El = (e) => je(e) || !Gt(e, "plain"), Ol = (e) => je(e) ? e : e.key, gr = (e) => {
|
|
3466
|
+
const [t, r] = e.split(No);
|
|
3467
3467
|
return [t, r];
|
|
3468
|
-
}, Ut = (e) => Lt(e, gi) ? e : gr(e)[0],
|
|
3468
|
+
}, Ut = (e) => Lt(e, gi) ? e : gr(e)[0], Tl = async (e, t) => {
|
|
3469
3469
|
const r = e(...t ?? []);
|
|
3470
3470
|
await r.load();
|
|
3471
|
-
const n =
|
|
3472
|
-
if (!
|
|
3471
|
+
const n = La(r.data);
|
|
3472
|
+
if (!Ia(n))
|
|
3473
3473
|
throw new Error();
|
|
3474
3474
|
return n;
|
|
3475
|
-
},
|
|
3476
|
-
const e =
|
|
3475
|
+
}, Cl = () => {
|
|
3476
|
+
const e = ml();
|
|
3477
3477
|
return Object.fromEntries(
|
|
3478
|
-
e.filter((t) => Lt(t.key, g)).map((t) => [t.key,
|
|
3478
|
+
e.filter((t) => Lt(t.key, g)).map((t) => [t.key, bl(t.type)])
|
|
3479
3479
|
);
|
|
3480
3480
|
}, zi = A.Package;
|
|
3481
3481
|
A.PackageSmall;
|
|
3482
3482
|
Ce.Standard;
|
|
3483
|
-
const
|
|
3484
|
-
const e =
|
|
3483
|
+
const Al = Nr.MyParcel, xl = 14, Ml = 0, $i = 1, jl = 0, Nl = 14, Je = 7, Fl = "16:00", Ll = "09:30", Il = [Ei, Co, Ao, xo, Mo], qi = () => {
|
|
3484
|
+
const e = co();
|
|
3485
3485
|
return {
|
|
3486
|
-
...
|
|
3487
|
-
[m.Platform]:
|
|
3486
|
+
...Cl(),
|
|
3487
|
+
[m.Platform]: Al,
|
|
3488
3488
|
[m.Locale]: e.language.value,
|
|
3489
3489
|
[m.Currency]: "EUR",
|
|
3490
3490
|
[m.ApiBaseUrl]: "https://api.myparcel.nl",
|
|
@@ -3495,7 +3495,7 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3495
3495
|
[m.PopUpMap]: !1,
|
|
3496
3496
|
[g.PackageType]: zi,
|
|
3497
3497
|
// Drop-off
|
|
3498
|
-
[g.DropOffDays]:
|
|
3498
|
+
[g.DropOffDays]: Il.map((t) => ({ weekday: t })),
|
|
3499
3499
|
[g.DeliveryDaysWindow]: Je,
|
|
3500
3500
|
[g.DropOffDelay]: $i,
|
|
3501
3501
|
// Delivery
|
|
@@ -3504,7 +3504,7 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3504
3504
|
[g.AllowMorningDelivery]: !0,
|
|
3505
3505
|
[g.AllowMondayDelivery]: !0,
|
|
3506
3506
|
[g.AllowSameDayDelivery]: !0,
|
|
3507
|
-
...
|
|
3507
|
+
...yo,
|
|
3508
3508
|
// Pickup
|
|
3509
3509
|
[g.AllowPickupLocations]: !0,
|
|
3510
3510
|
// Misc. config
|
|
@@ -3526,10 +3526,10 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3526
3526
|
}),
|
|
3527
3527
|
[Fr]: {}
|
|
3528
3528
|
};
|
|
3529
|
-
},
|
|
3530
|
-
const { data: n, loading: i } =
|
|
3529
|
+
}, Vl = "noDeliveryOptionsAvailable", Rl = "number", Ul = "street", Ue = (e) => je(e) || zr(e) ? String(e) : Array.isArray(e) ? e.map(Ue).join(":") : JSON.stringify(e), Sn = { results: [] }, Wl = (e, t, r) => {
|
|
3530
|
+
const { data: n, loading: i } = ql(e, t, r), s = (o) => {
|
|
3531
3531
|
const c = Ct(o);
|
|
3532
|
-
return n.value.results.find((
|
|
3532
|
+
return n.value.results.find((l) => Ct(l.carrier) === c);
|
|
3533
3533
|
}, a = y(() => n.value.results.map((o) => Ct(o.carrier)));
|
|
3534
3534
|
return {
|
|
3535
3535
|
capabilities: n,
|
|
@@ -3537,7 +3537,7 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3537
3537
|
availableCarrierNames: a,
|
|
3538
3538
|
loading: y(() => i.value)
|
|
3539
3539
|
};
|
|
3540
|
-
}, tt = /* @__PURE__ */ N([]),
|
|
3540
|
+
}, tt = /* @__PURE__ */ N([]), zl = (e) => {
|
|
3541
3541
|
const t = `error${e.code}`, r = {
|
|
3542
3542
|
code: e.code,
|
|
3543
3543
|
label: t,
|
|
@@ -3545,12 +3545,12 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3545
3545
|
title: e.title ? e.title : void 0,
|
|
3546
3546
|
message: e.message
|
|
3547
3547
|
};
|
|
3548
|
-
if (e.code ===
|
|
3548
|
+
if (e.code === Lo) {
|
|
3549
3549
|
const n = e.message.split(" ");
|
|
3550
3550
|
r.label = {
|
|
3551
3551
|
key: t,
|
|
3552
3552
|
args: {
|
|
3553
|
-
field:
|
|
3553
|
+
field: al(n[0] === Rl ? Ul : n[0])
|
|
3554
3554
|
}
|
|
3555
3555
|
};
|
|
3556
3556
|
}
|
|
@@ -3562,20 +3562,20 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3562
3562
|
return {
|
|
3563
3563
|
addException(r, n) {
|
|
3564
3564
|
n.data.errors.forEach((i) => {
|
|
3565
|
-
const s =
|
|
3566
|
-
a || o || tt.value.push(
|
|
3565
|
+
const s = $o[i.code] ?? i.code, a = zo.includes(s), o = tt.value.some((c) => c.code === s);
|
|
3566
|
+
a || o || tt.value.push(zl({ ...i, code: s }));
|
|
3567
3567
|
});
|
|
3568
3568
|
},
|
|
3569
3569
|
clear: e,
|
|
3570
3570
|
exceptions: tt,
|
|
3571
3571
|
hasExceptions: t
|
|
3572
3572
|
};
|
|
3573
|
-
}),
|
|
3573
|
+
}), $l = async (e, t, r, n) => {
|
|
3574
3574
|
const i = {
|
|
3575
3575
|
Accept: "application/json;charset=utf-8;version=2.0",
|
|
3576
3576
|
"Content-Type": "application/json"
|
|
3577
3577
|
};
|
|
3578
|
-
r && (
|
|
3578
|
+
r && (ue().warning("⚠️ Unsafe use of API key, do not use in production."), i.Authorization = `Bearer ${btoa(r)}`);
|
|
3579
3579
|
const s = await fetch(e, {
|
|
3580
3580
|
method: "POST",
|
|
3581
3581
|
headers: i,
|
|
@@ -3585,24 +3585,24 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3585
3585
|
if (!s.ok)
|
|
3586
3586
|
throw new Error(`Capabilities request failed: ${s.status}`);
|
|
3587
3587
|
return s.json();
|
|
3588
|
-
},
|
|
3589
|
-
const n = /* @__PURE__ */ N(
|
|
3588
|
+
}, ql = (e, t, r) => {
|
|
3589
|
+
const n = /* @__PURE__ */ N(Sn), i = /* @__PURE__ */ N(!0);
|
|
3590
3590
|
let s = "", a = null;
|
|
3591
3591
|
const o = async () => {
|
|
3592
|
-
const
|
|
3592
|
+
const l = v(t), u = v(r), d = v(e);
|
|
3593
3593
|
if (d) {
|
|
3594
3594
|
a && a.abort(), a = new AbortController(), i.value = !0;
|
|
3595
3595
|
try {
|
|
3596
|
-
const p = await
|
|
3596
|
+
const p = await $l(d, l, u, a.signal), f = JSON.stringify(p);
|
|
3597
3597
|
f !== s && (s = f, n.value = p);
|
|
3598
3598
|
} catch (p) {
|
|
3599
3599
|
if (p instanceof DOMException && p.name === "AbortError")
|
|
3600
3600
|
return;
|
|
3601
|
-
|
|
3601
|
+
ue().error("Capabilities request failed:", p), n.value = Sn, s = "";
|
|
3602
3602
|
const { exceptions: f } = Hi();
|
|
3603
3603
|
f.value.some((w) => w.code === 1) || f.value.push({
|
|
3604
3604
|
code: 1,
|
|
3605
|
-
label:
|
|
3605
|
+
label: Vl,
|
|
3606
3606
|
message: p instanceof Error ? p.message : String(p)
|
|
3607
3607
|
});
|
|
3608
3608
|
} finally {
|
|
@@ -3637,10 +3637,10 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3637
3637
|
},
|
|
3638
3638
|
storage: e
|
|
3639
3639
|
};
|
|
3640
|
-
}),
|
|
3640
|
+
}), Hl = (e, t) => {
|
|
3641
3641
|
const { addException: r } = Hi();
|
|
3642
3642
|
r(t, e);
|
|
3643
|
-
},
|
|
3643
|
+
}, Bl = (e, t, r) => async () => {
|
|
3644
3644
|
var n;
|
|
3645
3645
|
try {
|
|
3646
3646
|
const i = await e();
|
|
@@ -3648,12 +3648,12 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3648
3648
|
} catch (i) {
|
|
3649
3649
|
if (!Gt(i, "data"))
|
|
3650
3650
|
throw i;
|
|
3651
|
-
return await ((r == null ? void 0 : r.onError) ??
|
|
3651
|
+
return await ((r == null ? void 0 : r.onError) ?? Hl)(i, t), (r == null ? void 0 : r.fallback) ?? null;
|
|
3652
3652
|
}
|
|
3653
|
-
},
|
|
3653
|
+
}, Yl = (e, t, r, n) => {
|
|
3654
3654
|
const i = /* @__PURE__ */ N(null), s = /* @__PURE__ */ N(!0), a = y(() => s.value), o = async () => {
|
|
3655
3655
|
if (!e.has(t)) {
|
|
3656
|
-
const c =
|
|
3656
|
+
const c = Bl(r, t, n);
|
|
3657
3657
|
e.set(t, c());
|
|
3658
3658
|
}
|
|
3659
3659
|
i.value = await e.get(t), e.set(t, i.value), s.value = !1;
|
|
@@ -3665,23 +3665,23 @@ const xl = Nr.MyParcel, Ml = 14, jl = 0, $i = 1, Nl = 0, Fl = 14, Je = 7, Ll = "
|
|
|
3665
3665
|
loading: a,
|
|
3666
3666
|
load: o
|
|
3667
3667
|
};
|
|
3668
|
-
},
|
|
3668
|
+
}, Gl = (e, t, r) => {
|
|
3669
3669
|
const n = Br();
|
|
3670
|
-
return
|
|
3671
|
-
}, mt = C(
|
|
3670
|
+
return Yl(n, e, t, r);
|
|
3671
|
+
}, mt = C(Gl, { getKey: (e) => Ue(e) });
|
|
3672
3672
|
let Wt;
|
|
3673
3673
|
const Bi = (e) => {
|
|
3674
3674
|
const t = e != null && e.length ? e : void 0;
|
|
3675
3675
|
t !== Wt && (Wt = t, vt.clear(), mt.clear(), Br().clear());
|
|
3676
|
-
}, vt = C(() =>
|
|
3677
|
-
new
|
|
3676
|
+
}, vt = C(() => Ca(
|
|
3677
|
+
new Ea({
|
|
3678
3678
|
...Wt ? { baseUrl: Wt } : {},
|
|
3679
3679
|
headers: {
|
|
3680
3680
|
"X-User-Agent": "MyParcelDeliveryOptions/7.4.5"
|
|
3681
3681
|
}
|
|
3682
3682
|
}),
|
|
3683
|
-
[new
|
|
3684
|
-
)),
|
|
3683
|
+
[new Aa(), new xa(), new Ma(), new ja()]
|
|
3684
|
+
)), Jl = () => mt(
|
|
3685
3685
|
[fn],
|
|
3686
3686
|
async () => vt().getCarriers(),
|
|
3687
3687
|
{
|
|
@@ -3693,8 +3693,8 @@ const Bi = (e) => {
|
|
|
3693
3693
|
});
|
|
3694
3694
|
}
|
|
3695
3695
|
}
|
|
3696
|
-
),
|
|
3697
|
-
const t =
|
|
3696
|
+
), Kl = (e) => {
|
|
3697
|
+
const t = Jl(), r = y(() => {
|
|
3698
3698
|
const i = v(e);
|
|
3699
3699
|
if (!(!i || !t.data.value))
|
|
3700
3700
|
return t.data.value.find((s) => s.name === i);
|
|
@@ -3706,25 +3706,25 @@ const Bi = (e) => {
|
|
|
3706
3706
|
await t.load();
|
|
3707
3707
|
}
|
|
3708
3708
|
};
|
|
3709
|
-
},
|
|
3710
|
-
[
|
|
3709
|
+
}, Xl = (e) => mt(
|
|
3710
|
+
[Eo, e],
|
|
3711
3711
|
() => vt().getDeliveryOptions({ parameters: e }),
|
|
3712
3712
|
{
|
|
3713
3713
|
fallback: [],
|
|
3714
3714
|
onError(t) {
|
|
3715
|
-
|
|
3715
|
+
ue().debug(`Skip delivery moments for ${e.carrier}.`, t);
|
|
3716
3716
|
}
|
|
3717
3717
|
}
|
|
3718
|
-
),
|
|
3718
|
+
), Ql = (e) => mt(
|
|
3719
3719
|
[Pi, e],
|
|
3720
3720
|
() => vt().getPickupLocations({ parameters: e }),
|
|
3721
3721
|
{
|
|
3722
3722
|
fallback: [],
|
|
3723
3723
|
onError(t) {
|
|
3724
|
-
|
|
3724
|
+
ue().debug(`Skip pickup locations for ${e.carrier}.`, t);
|
|
3725
3725
|
}
|
|
3726
3726
|
}
|
|
3727
|
-
),
|
|
3727
|
+
), Zl = (e) => mt(
|
|
3728
3728
|
[Pi, e],
|
|
3729
3729
|
() => vt().getPickupLocations({ parameters: e }),
|
|
3730
3730
|
{
|
|
@@ -3736,17 +3736,17 @@ const Bi = (e) => {
|
|
|
3736
3736
|
onError() {
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
3739
|
-
),
|
|
3739
|
+
), eu = "homeOrPickup", tu = "home", _n = "deliveryDate", ru = "deliveryMoment", nu = "shipmentOptions", iu = "pickupLocation", su = "carrier", Yr = [A.Package, A.PackageSmall], au = Object.values(Ye).filter((e) => e !== "pickup"), ou = "myparcel_update_config", cu = "myparcel_update_delivery_options", qd = "myparcel_updated_address", lu = "myparcel_updated_delivery_options", uu = "myparcel_show_delivery_options", du = "myparcel_hide_delivery_options", Gr = C(() => {
|
|
3740
3740
|
const e = {
|
|
3741
|
-
[
|
|
3741
|
+
[eu]: tu,
|
|
3742
3742
|
[_n]: void 0,
|
|
3743
|
-
[
|
|
3744
|
-
[
|
|
3745
|
-
[
|
|
3746
|
-
[
|
|
3743
|
+
[ru]: void 0,
|
|
3744
|
+
[nu]: [],
|
|
3745
|
+
[iu]: void 0,
|
|
3746
|
+
[su]: void 0
|
|
3747
3747
|
}, t = /* @__PURE__ */ qe({ ...e });
|
|
3748
3748
|
return {
|
|
3749
|
-
.../* @__PURE__ */
|
|
3749
|
+
.../* @__PURE__ */ Ks(t),
|
|
3750
3750
|
clearSelectedValues: () => {
|
|
3751
3751
|
Object.assign(
|
|
3752
3752
|
t,
|
|
@@ -3760,35 +3760,35 @@ const Bi = (e) => {
|
|
|
3760
3760
|
[U.Street]: "",
|
|
3761
3761
|
[U.PostalCode]: ""
|
|
3762
3762
|
}, Jr = /* @__PURE__ */ qe({ ...Yi });
|
|
3763
|
-
function
|
|
3763
|
+
function pu(e) {
|
|
3764
3764
|
Object.assign(Jr, e);
|
|
3765
3765
|
}
|
|
3766
|
-
function
|
|
3766
|
+
function fu() {
|
|
3767
3767
|
Object.assign(Jr, Yi);
|
|
3768
3768
|
}
|
|
3769
3769
|
const Gi = () => ({
|
|
3770
3770
|
state: Jr,
|
|
3771
|
-
update:
|
|
3772
|
-
reset:
|
|
3773
|
-
}), Ji = qi(),
|
|
3774
|
-
function
|
|
3775
|
-
t ? Object.assign(
|
|
3771
|
+
update: pu,
|
|
3772
|
+
reset: fu
|
|
3773
|
+
}), Ji = qi(), ve = /* @__PURE__ */ qe({ ...Ji });
|
|
3774
|
+
function hu(e, t = !0) {
|
|
3775
|
+
t ? Object.assign(ve, Vi(qi(), e)) : Object.assign(ve, e), Bi(ve.apiBaseUrl);
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3778
|
-
for (const e of Object.keys(
|
|
3779
|
-
delete
|
|
3780
|
-
Object.assign(
|
|
3777
|
+
function gu() {
|
|
3778
|
+
for (const e of Object.keys(ve))
|
|
3779
|
+
delete ve[e];
|
|
3780
|
+
Object.assign(ve, Ji), Bi(ve.apiBaseUrl);
|
|
3781
3781
|
}
|
|
3782
3782
|
const te = () => ({
|
|
3783
|
-
state:
|
|
3784
|
-
update:
|
|
3785
|
-
reset:
|
|
3783
|
+
state: ve,
|
|
3784
|
+
update: hu,
|
|
3785
|
+
reset: gu
|
|
3786
3786
|
});
|
|
3787
|
-
U.Country,
|
|
3788
|
-
m.Platform, K(), m.Locale, K(), m.Currency, K(), m.ApiBaseUrl, K(), m.ProxyCapabilities, K(),
|
|
3789
|
-
const
|
|
3787
|
+
U.Country, fl(), U.Street, K(), U.Number, $r(), U.PostalCode, K(), U.City, K();
|
|
3788
|
+
m.Platform, K(), m.Locale, K(), m.Currency, K(), m.ApiBaseUrl, K(), m.ProxyCapabilities, K(), yl(/.+/), m.ApiKey, K(), m.ShowPrices, Ee(), m.ShowPriceSurcharge, Ee(), m.ExcludeParcelLockers, Ee(), m.CompactView, Ee(), m.PopUpMap, Ee(), m.IsBusiness, Ee(), hl(), dl(1), g.DropOffDays, ul(), g.CutoffTime, Rt(), g.CutoffTimeSameDay, Rt(), g.PackageType, gl(Object.values(A));
|
|
3789
|
+
const yu = (e) => Zi(v(e));
|
|
3790
3790
|
let sr = null, Pn = null;
|
|
3791
|
-
const Kr = () => (sr || (Pn =
|
|
3791
|
+
const Kr = () => (sr || (Pn = Ts(), sr = Pn.run(() => {
|
|
3792
3792
|
const { state: e } = te(), { state: t } = Gi(), r = y(() => {
|
|
3793
3793
|
const i = {
|
|
3794
3794
|
recipient: {
|
|
@@ -3798,10 +3798,10 @@ const Kr = () => (sr || (Pn = Cs(), sr = Pn.run(() => {
|
|
|
3798
3798
|
// to the API). Omit it entirely when undefined, so hosts that don't send it keep working.
|
|
3799
3799
|
...e.isBusiness === void 0 ? {} : { isBusiness: e.isBusiness }
|
|
3800
3800
|
}
|
|
3801
|
-
}, s =
|
|
3801
|
+
}, s = _o(e.packageType);
|
|
3802
3802
|
return s && (i.packageType = s), i;
|
|
3803
3803
|
}), n = y(() => e.apiKey);
|
|
3804
|
-
return
|
|
3804
|
+
return Wl(() => e.proxyCapabilities, r, n);
|
|
3805
3805
|
})), sr), Xr = C(() => {
|
|
3806
3806
|
const { state: e } = te(), t = Kr();
|
|
3807
3807
|
return y(() => {
|
|
@@ -3810,14 +3810,14 @@ const Kr = () => (sr || (Pn = Cs(), sr = Pn.run(() => {
|
|
|
3810
3810
|
const a = Ut(i);
|
|
3811
3811
|
n.has(a) || n.set(a, s);
|
|
3812
3812
|
}), r.sort(([i], [s]) => {
|
|
3813
|
-
const [a, o] = gr(i), [c,
|
|
3814
|
-
return a === c ? !o || !
|
|
3813
|
+
const [a, o] = gr(i), [c, l] = gr(s);
|
|
3814
|
+
return a === c ? !o || !l ? o ? 1 : -1 : o.localeCompare(l) : (n.get(a) ?? 0) - (n.get(c) ?? 0);
|
|
3815
3815
|
}).filter(([i]) => {
|
|
3816
3816
|
const s = Ut(i), a = t.getCarrierCapability(s);
|
|
3817
3817
|
return a ? Qi(a, i) || Xi(a, i) : !1;
|
|
3818
3818
|
}).map(([i]) => Zi(i));
|
|
3819
3819
|
});
|
|
3820
|
-
}),
|
|
3820
|
+
}), mu = (e, t) => Number(e.distance) - Number(t.distance), vu = (e, t) => {
|
|
3821
3821
|
const { location: r, address: n } = t;
|
|
3822
3822
|
return {
|
|
3823
3823
|
carrier: e.carrier.value.identifier,
|
|
@@ -3836,35 +3836,35 @@ const Kr = () => (sr || (Pn = Cs(), sr = Pn.run(() => {
|
|
|
3836
3836
|
cc: n.cc,
|
|
3837
3837
|
openingHours: Object.values(r.opening_hours).filter((i) => i.length > 0).map((i, s) => ({ hours: i, weekday: s }))
|
|
3838
3838
|
};
|
|
3839
|
-
},
|
|
3840
|
-
const r =
|
|
3839
|
+
}, wu = async (e, t) => {
|
|
3840
|
+
const r = Bu(t), n = Ki(e, r), i = t ? Zl(n) : Ql(n);
|
|
3841
3841
|
await i.load();
|
|
3842
3842
|
const s = v(i.data) ?? [];
|
|
3843
|
-
return s.length ? s.map((a) =>
|
|
3844
|
-
},
|
|
3845
|
-
const n = v(e).filter(() => !v(t) || v(r) !== !1).map((i) =>
|
|
3843
|
+
return s.length ? s.map((a) => vu(e, a)) : [];
|
|
3844
|
+
}, bu = (e, t, r) => Wr(async () => {
|
|
3845
|
+
const n = v(e).filter(() => !v(t) || v(r) !== !1).map((i) => wu(i, t.value));
|
|
3846
3846
|
return (await Promise.all(n)).flat(1);
|
|
3847
|
-
}, []),
|
|
3847
|
+
}, []), ku = (e, t) => Ka(t, (r) => {
|
|
3848
3848
|
const n = e.value.filter(
|
|
3849
3849
|
(i) => !r.some((s) => i.locationCode === s.locationCode)
|
|
3850
3850
|
);
|
|
3851
3851
|
e.value = [...n, ...r];
|
|
3852
3852
|
}), Du = () => {
|
|
3853
|
-
const e = /* @__PURE__ */ N(void 0), t = /* @__PURE__ */ N([]), { state: r } = te(), n = Xr(), i = y(() => n.value.filter((
|
|
3853
|
+
const e = /* @__PURE__ */ N(void 0), t = /* @__PURE__ */ N([]), { state: r } = te(), n = Xr(), i = y(() => n.value.filter((l) => v(l.hasPickup))), s = bu(
|
|
3854
3854
|
i,
|
|
3855
3855
|
e,
|
|
3856
3856
|
() => r[m.PickupMapAllowLoadMore]
|
|
3857
|
-
), a =
|
|
3857
|
+
), a = ku(t, s), o = Ai(
|
|
3858
3858
|
y(() => {
|
|
3859
|
-
const { excludeParcelLockers:
|
|
3859
|
+
const { excludeParcelLockers: l } = r, u = t.value.filter(
|
|
3860
3860
|
(d) => i.value.some(({ carrier: p }) => p.value.identifier === d.carrier)
|
|
3861
|
-
).sort(
|
|
3862
|
-
return
|
|
3861
|
+
).sort(mu);
|
|
3862
|
+
return l ? u.filter((d) => d.type !== It.Locker) : u;
|
|
3863
3863
|
}),
|
|
3864
3864
|
s.load,
|
|
3865
3865
|
s.loading
|
|
3866
|
-
), c = async (
|
|
3867
|
-
return
|
|
3866
|
+
), c = async (l, u) => (e.value = [l, u], Ci(o.loading, { condition: (d) => !d }));
|
|
3867
|
+
return fa(a), {
|
|
3868
3868
|
carriersWithPickup: i,
|
|
3869
3869
|
locations: o,
|
|
3870
3870
|
loadMoreLocations: c,
|
|
@@ -3877,19 +3877,19 @@ C(Du);
|
|
|
3877
3877
|
const yr = /* @__PURE__ */ qe({
|
|
3878
3878
|
strings: {}
|
|
3879
3879
|
}), mr = C((e) => {
|
|
3880
|
-
const t =
|
|
3881
|
-
if (Object.keys(yr.strings).length === 0 || !
|
|
3880
|
+
const t = Ol(e);
|
|
3881
|
+
if (Object.keys(yr.strings).length === 0 || !El(e))
|
|
3882
3882
|
return t;
|
|
3883
3883
|
const r = nt(yr.strings, t);
|
|
3884
|
-
if (!
|
|
3885
|
-
return
|
|
3884
|
+
if (!Ra(r))
|
|
3885
|
+
return ue(), t;
|
|
3886
3886
|
const n = r.match(/\{(.+?)}/g);
|
|
3887
3887
|
return n != null && n.length && Gt(e, "args") ? (n.reverse(), n.reduce((i, s) => {
|
|
3888
3888
|
var c;
|
|
3889
3889
|
const a = s.slice(1, -1), o = (c = e == null ? void 0 : e.args) == null ? void 0 : c[a];
|
|
3890
3890
|
return o ? i.replace(s, mr(o)) : i;
|
|
3891
3891
|
}, r)) : r;
|
|
3892
|
-
}),
|
|
3892
|
+
}), Su = C(() => {
|
|
3893
3893
|
const { state: e } = te();
|
|
3894
3894
|
return {
|
|
3895
3895
|
locale: y(() => e.locale),
|
|
@@ -3901,9 +3901,9 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3901
3901
|
yr.strings = Object.freeze({ ...t }), mr.clear();
|
|
3902
3902
|
}
|
|
3903
3903
|
};
|
|
3904
|
-
}), Re = "long", Et = "numeric",
|
|
3904
|
+
}), Re = "long", Et = "numeric", _u = "auto", Pu = C((e) => {
|
|
3905
3905
|
const t = new Intl.RelativeTimeFormat(e, {
|
|
3906
|
-
numeric:
|
|
3906
|
+
numeric: _u,
|
|
3907
3907
|
style: Re
|
|
3908
3908
|
});
|
|
3909
3909
|
return (r) => {
|
|
@@ -3914,15 +3914,15 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3914
3914
|
const r = new Intl.DateTimeFormat(e, t);
|
|
3915
3915
|
return (n) => r.format(n);
|
|
3916
3916
|
}), En = (e) => {
|
|
3917
|
-
const { locale: t } =
|
|
3918
|
-
const
|
|
3919
|
-
return je(
|
|
3920
|
-
}), n = y(() =>
|
|
3921
|
-
const
|
|
3922
|
-
return Zt(
|
|
3917
|
+
const { locale: t } = Su(), r = y(() => {
|
|
3918
|
+
const u = v(e);
|
|
3919
|
+
return je(u) ? es(u) : Ja(u);
|
|
3920
|
+
}), n = y(() => Pu(v(t))(r.value)), i = y(() => {
|
|
3921
|
+
const u = Ie(v(t), { weekday: Re });
|
|
3922
|
+
return Zt(u(r.value));
|
|
3923
3923
|
}), s = y(() => {
|
|
3924
|
-
const
|
|
3925
|
-
return
|
|
3924
|
+
const u = Ie(v(t), { weekday: Re });
|
|
3925
|
+
return nl(r.value, Yo(Date.now(), 2)) ? Zt(n.value) : Zt(u(r.value));
|
|
3926
3926
|
}), a = y(() => Ie(v(t), { day: Et })(r.value)), o = y(() => Ie(v(t), {
|
|
3927
3927
|
hour: Et,
|
|
3928
3928
|
minute: Et
|
|
@@ -3930,39 +3930,39 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3930
3930
|
weekday: Re,
|
|
3931
3931
|
day: Et,
|
|
3932
3932
|
month: Re
|
|
3933
|
-
})(r.value)),
|
|
3933
|
+
})(r.value)), l = y(() => Ie(v(t), { month: Re })(r.value));
|
|
3934
3934
|
return {
|
|
3935
3935
|
date: r,
|
|
3936
3936
|
day: a,
|
|
3937
|
-
month:
|
|
3937
|
+
month: l,
|
|
3938
3938
|
relative: n,
|
|
3939
3939
|
standard: c,
|
|
3940
3940
|
time: o,
|
|
3941
3941
|
weekday: i,
|
|
3942
3942
|
relativeWeekday: s
|
|
3943
3943
|
};
|
|
3944
|
-
},
|
|
3944
|
+
}, Eu = (e, t) => {
|
|
3945
3945
|
const r = En(e), n = En(t);
|
|
3946
3946
|
return y(() => `${r.time.value} – ${n.time.value}`);
|
|
3947
|
-
},
|
|
3947
|
+
}, Ou = async (e) => Promise.all(
|
|
3948
3948
|
v(e).filter((t) => v(t.hasDelivery)).map(async (t) => {
|
|
3949
3949
|
const r = t.get(g.DeliveryDaysWindow, Je);
|
|
3950
3950
|
if (!v(t.hasDelivery) || r === 0)
|
|
3951
3951
|
return null;
|
|
3952
|
-
const n = Ki(t), i =
|
|
3952
|
+
const n = Ki(t), i = Xl(n);
|
|
3953
3953
|
await i.load();
|
|
3954
|
-
const s =
|
|
3954
|
+
const s = Tu(t.get(m.ClosedDays));
|
|
3955
3955
|
let a = v(i.data);
|
|
3956
3956
|
if (s.length > 0) {
|
|
3957
3957
|
const o = t.get(g.DropOffDelay), c = Qr(t);
|
|
3958
|
-
a =
|
|
3958
|
+
a = Au(a, s, o, c);
|
|
3959
3959
|
}
|
|
3960
3960
|
return a != null && a.length ? {
|
|
3961
3961
|
carrier: t,
|
|
3962
3962
|
dates: a
|
|
3963
3963
|
} : null;
|
|
3964
3964
|
})
|
|
3965
|
-
),
|
|
3965
|
+
), Tu = (e) => {
|
|
3966
3966
|
if (!e)
|
|
3967
3967
|
return [];
|
|
3968
3968
|
const t = B(/* @__PURE__ */ new Date()), r = new Date(t);
|
|
@@ -3970,7 +3970,7 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3970
3970
|
const i = B(n);
|
|
3971
3971
|
return i >= t && i <= r;
|
|
3972
3972
|
});
|
|
3973
|
-
},
|
|
3973
|
+
}, Cu = (e, t, r, n) => {
|
|
3974
3974
|
const i = B(/* @__PURE__ */ new Date()), s = [...t.map((a) => {
|
|
3975
3975
|
const o = new Date(a);
|
|
3976
3976
|
return B(o);
|
|
@@ -3978,8 +3978,8 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3978
3978
|
if (s.some((a) => a.getTime() === e.getTime())) {
|
|
3979
3979
|
const a = new Date(e);
|
|
3980
3980
|
if (a.setDate(e.getDate() - 1), !s.some((o) => o.getTime() === a.getTime())) {
|
|
3981
|
-
const o = r ?? 0, c = /* @__PURE__ */ new Date() <= n,
|
|
3982
|
-
d.setDate(
|
|
3981
|
+
const o = r ?? 0, c = /* @__PURE__ */ new Date() <= n, l = 1440 * 60 * 1e3, u = c ? i : new Date(i.getTime() + l), d = new Date(u);
|
|
3982
|
+
d.setDate(u.getDate() + o);
|
|
3983
3983
|
const p = B(d);
|
|
3984
3984
|
return s.some(
|
|
3985
3985
|
(f) => f.getTime() === p.getTime()
|
|
@@ -3991,15 +3991,15 @@ const yr = /* @__PURE__ */ qe({
|
|
|
3991
3991
|
const o = r ?? 0, c = new Date(a);
|
|
3992
3992
|
return c.setDate(a.getDate() + 1 + o), e > a && e <= c;
|
|
3993
3993
|
});
|
|
3994
|
-
},
|
|
3994
|
+
}, Au = (e, t, r, n) => {
|
|
3995
3995
|
if (!e)
|
|
3996
3996
|
return null;
|
|
3997
3997
|
const [i = 0, s = 0] = n.split(":").map(Number), a = /* @__PURE__ */ new Date();
|
|
3998
3998
|
return a.setHours(i, s), e.filter((o) => {
|
|
3999
3999
|
const c = B(new Date(o.date.date));
|
|
4000
|
-
return !
|
|
4000
|
+
return !Cu(c, t, r, a);
|
|
4001
4001
|
});
|
|
4002
|
-
},
|
|
4002
|
+
}, xu = (e, t) => {
|
|
4003
4003
|
var n;
|
|
4004
4004
|
const r = e ? e.filter((i) => i !== null) : [];
|
|
4005
4005
|
if (r.length === 0) {
|
|
@@ -4011,44 +4011,44 @@ const yr = /* @__PURE__ */ qe({
|
|
|
4011
4011
|
return [];
|
|
4012
4012
|
}
|
|
4013
4013
|
return r;
|
|
4014
|
-
},
|
|
4014
|
+
}, Mu = (e) => e.reduce((t, { carrier: r, dates: n }) => (n.forEach((i) => {
|
|
4015
4015
|
[...i.possibilities].sort((s, a) => {
|
|
4016
|
-
var
|
|
4017
|
-
const o = ((
|
|
4016
|
+
var l, u;
|
|
4017
|
+
const o = ((l = s.delivery_time_frames[0]) == null ? void 0 : l.date_time.date) ?? "", c = ((u = a.delivery_time_frames[0]) == null ? void 0 : u.date_time.date) ?? "";
|
|
4018
4018
|
return o.localeCompare(c);
|
|
4019
4019
|
}).forEach((s) => {
|
|
4020
|
-
var
|
|
4021
|
-
const [a, o] = s.delivery_time_frames, c = a && o ?
|
|
4020
|
+
var u, d;
|
|
4021
|
+
const [a, o] = s.delivery_time_frames, c = a && o ? Pl(Eu(a.date_time.date, o.date_time.date).value) : Hr(`delivery${Ri(s.type)}Title`), l = Ju(
|
|
4022
4022
|
[...r.deliveryTypes.value],
|
|
4023
|
-
(
|
|
4023
|
+
(u = i.date) == null ? void 0 : u.date,
|
|
4024
4024
|
s.type
|
|
4025
4025
|
);
|
|
4026
|
-
r != null && r.deliveryTypes.value.has(
|
|
4026
|
+
r != null && r.deliveryTypes.value.has(l) && t.push({
|
|
4027
4027
|
carrier: r.carrier.value.identifier,
|
|
4028
4028
|
date: (d = i.date) == null ? void 0 : d.date,
|
|
4029
4029
|
time: c,
|
|
4030
|
-
deliveryType:
|
|
4030
|
+
deliveryType: l,
|
|
4031
4031
|
originalDeliveryType: s.type,
|
|
4032
4032
|
packageType: s.package_type,
|
|
4033
4033
|
shipmentOptions: s.shipment_options
|
|
4034
4034
|
});
|
|
4035
4035
|
});
|
|
4036
|
-
}), t), []),
|
|
4036
|
+
}), t), []), ju = (e, t) => {
|
|
4037
4037
|
var s;
|
|
4038
4038
|
const { state: r } = te();
|
|
4039
4039
|
if (!Yr.includes(r.packageType) || t.length === 0)
|
|
4040
4040
|
return [];
|
|
4041
|
-
const n = new Set(t.map((a) => a.carrier)), i = ((s = t.find((a) => a.date && Ii(es(a.date)))) == null ? void 0 : s.date) ??
|
|
4042
|
-
return e.filter((a) =>
|
|
4041
|
+
const n = new Set(t.map((a) => a.carrier)), i = ((s = t.find((a) => a.date && Ii(es(a.date)))) == null ? void 0 : s.date) ?? Zc(B(/* @__PURE__ */ new Date()), Fo);
|
|
4042
|
+
return e.filter((a) => Ku(a, n) && Qu(a)).map((a) => ({
|
|
4043
4043
|
carrier: v(a.carrier).identifier,
|
|
4044
4044
|
date: i,
|
|
4045
4045
|
isSynthetic: !0,
|
|
4046
|
-
time: Hr(`delivery${Ri(
|
|
4047
|
-
deliveryType:
|
|
4046
|
+
time: Hr(`delivery${Ri(ce.SameDay)}Title`),
|
|
4047
|
+
deliveryType: ce.SameDay,
|
|
4048
4048
|
packageType: r.packageType,
|
|
4049
4049
|
shipmentOptions: []
|
|
4050
4050
|
}));
|
|
4051
|
-
},
|
|
4051
|
+
}, Nu = () => {
|
|
4052
4052
|
const e = Xr(), t = Kr();
|
|
4053
4053
|
return Wr(async () => {
|
|
4054
4054
|
t.loading.value && await new Promise((s) => {
|
|
@@ -4059,30 +4059,30 @@ const yr = /* @__PURE__ */ qe({
|
|
|
4059
4059
|
}
|
|
4060
4060
|
);
|
|
4061
4061
|
});
|
|
4062
|
-
const r = await
|
|
4063
|
-
return [...i, ...
|
|
4062
|
+
const r = await Ou(e), n = xu(r, v(e)), i = Mu(n);
|
|
4063
|
+
return [...i, ...ju(v(e), i)];
|
|
4064
4064
|
}, []);
|
|
4065
|
-
},
|
|
4065
|
+
}, Fu = C(Nu);
|
|
4066
4066
|
Object.freeze([
|
|
4067
4067
|
Ce.Morning,
|
|
4068
4068
|
Ce.Evening,
|
|
4069
4069
|
Ce.Standard
|
|
4070
4070
|
]);
|
|
4071
4071
|
Object.freeze(
|
|
4072
|
-
Object.fromEntries(Object.values(
|
|
4072
|
+
Object.fromEntries(Object.values(de).map((e) => [e, Ir(e)]))
|
|
4073
4073
|
);
|
|
4074
|
-
const
|
|
4074
|
+
const Lu = /* @__PURE__ */ Symbol("width"), Iu = () => di(Lu), Vu = 560;
|
|
4075
4075
|
C(() => {
|
|
4076
|
-
const e =
|
|
4076
|
+
const e = Iu(), t = y(() => ((e == null ? void 0 : e.value) ?? 0) < Vu), r = y(() => !t.value);
|
|
4077
4077
|
return { sm: t, md: r };
|
|
4078
4078
|
});
|
|
4079
|
-
const
|
|
4079
|
+
const Ru = C(() => {
|
|
4080
4080
|
const { state: e } = te(), t = Xr();
|
|
4081
4081
|
return {
|
|
4082
4082
|
/**
|
|
4083
4083
|
* Only a subset of shipment options is available here
|
|
4084
4084
|
*/
|
|
4085
|
-
availableShipmentOptions: y(() =>
|
|
4085
|
+
availableShipmentOptions: y(() => ho),
|
|
4086
4086
|
/**
|
|
4087
4087
|
* Show the delivery-date selector when at least one active delivery carrier has a
|
|
4088
4088
|
* delivery-days window of 1 or more. Each carrier's window falls back to the global
|
|
@@ -4103,10 +4103,10 @@ C(
|
|
|
4103
4103
|
})
|
|
4104
4104
|
);
|
|
4105
4105
|
C(() => {
|
|
4106
|
-
const e =
|
|
4106
|
+
const e = Fu(), { state: t } = te(), { showDeliveryDate: r } = Ru();
|
|
4107
4107
|
return y(() => !r.value || e.loading.value ? [] : e.value.filter((n) => n.packageType === t.packageType).reduce((n, i) => (i.date && !n.some((s) => s.date === i.date) && n.push(i), n), []).sort((n, i) => n.date && i.date ? n.date.localeCompare(i.date) : 0));
|
|
4108
4108
|
});
|
|
4109
|
-
const
|
|
4109
|
+
const Uu = C(() => {
|
|
4110
4110
|
const { deliveryMoment: e } = Gr();
|
|
4111
4111
|
return y(() => {
|
|
4112
4112
|
const t = e.value;
|
|
@@ -4114,61 +4114,61 @@ const Wu = C(() => {
|
|
|
4114
4114
|
});
|
|
4115
4115
|
}), Tn = (e) => e.map(Ur).filter((t) => t !== void 0);
|
|
4116
4116
|
C(() => {
|
|
4117
|
-
const e =
|
|
4118
|
-
var
|
|
4119
|
-
const a = (
|
|
4117
|
+
const e = Uu(), { shipmentOptions: t } = Gr(), r = y(() => {
|
|
4118
|
+
var l;
|
|
4119
|
+
const a = (l = e.value) == null ? void 0 : l.carrier;
|
|
4120
4120
|
if (!a)
|
|
4121
4121
|
return /* @__PURE__ */ new Map();
|
|
4122
|
-
const o =
|
|
4122
|
+
const o = yu(a).capability.value;
|
|
4123
4123
|
if (!o)
|
|
4124
4124
|
return /* @__PURE__ */ new Map();
|
|
4125
4125
|
const c = /* @__PURE__ */ new Map();
|
|
4126
|
-
for (const [
|
|
4127
|
-
const p = Ur(
|
|
4126
|
+
for (const [u, d] of Object.entries(o.options)) {
|
|
4127
|
+
const p = Ur(u);
|
|
4128
4128
|
p && c.set(p, d);
|
|
4129
4129
|
}
|
|
4130
4130
|
return c;
|
|
4131
4131
|
}), n = y(() => {
|
|
4132
|
-
const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), c = (
|
|
4133
|
-
if (o.has(
|
|
4132
|
+
const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), c = (l) => {
|
|
4133
|
+
if (o.has(l))
|
|
4134
4134
|
return;
|
|
4135
|
-
o.add(
|
|
4136
|
-
const
|
|
4137
|
-
if (
|
|
4138
|
-
for (const d of Tn(
|
|
4135
|
+
o.add(l);
|
|
4136
|
+
const u = r.value.get(l);
|
|
4137
|
+
if (u)
|
|
4138
|
+
for (const d of Tn(u.requires))
|
|
4139
4139
|
a.add(d), c(d);
|
|
4140
4140
|
};
|
|
4141
|
-
for (const [
|
|
4142
|
-
|
|
4143
|
-
for (const
|
|
4144
|
-
c(
|
|
4141
|
+
for (const [l, u] of r.value)
|
|
4142
|
+
u.isRequired && (a.add(l), c(l));
|
|
4143
|
+
for (const l of t.value)
|
|
4144
|
+
c(l);
|
|
4145
4145
|
return a;
|
|
4146
4146
|
}), i = y(() => {
|
|
4147
4147
|
const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set([...t.value, ...n.value]);
|
|
4148
4148
|
for (const c of o) {
|
|
4149
|
-
const
|
|
4150
|
-
if (
|
|
4151
|
-
for (const
|
|
4152
|
-
n.value.has(
|
|
4149
|
+
const l = r.value.get(c);
|
|
4150
|
+
if (l)
|
|
4151
|
+
for (const u of Tn(l.excludes))
|
|
4152
|
+
n.value.has(u) || a.add(u);
|
|
4153
4153
|
}
|
|
4154
4154
|
return a;
|
|
4155
4155
|
}), s = y(() => [...r.value.entries()].filter(([, a]) => a.isSelectedByDefault).map(([a]) => a));
|
|
4156
4156
|
return { forcedOn: n, forcedOff: i, defaults: s };
|
|
4157
4157
|
});
|
|
4158
4158
|
Object.freeze(
|
|
4159
|
-
Object.fromEntries(Object.values(
|
|
4159
|
+
Object.fromEntries(Object.values(de).map((e) => [e, `${Ir(e)}Title`]))
|
|
4160
4160
|
);
|
|
4161
|
-
const
|
|
4161
|
+
const Wu = (e) => e.get(g.CutoffTime, Fl), zu = (e) => e.get(g.CutoffTimeSameDay, Ll), Qr = (e) => {
|
|
4162
4162
|
const t = e.get(g.DropOffDays, []), r = Li(/* @__PURE__ */ new Date()), n = t.find((i) => r === Number(i.weekday));
|
|
4163
|
-
return v(e.deliveryTypes).has(
|
|
4164
|
-
},
|
|
4165
|
-
const t = e.get(g.DropOffDays, []), [r, n] =
|
|
4163
|
+
return v(e.deliveryTypes).has(ce.SameDay) ? (n == null ? void 0 : n[g.CutoffTimeSameDay]) ?? zu(e) : (n == null ? void 0 : n.cutoffTime) ?? Wu(e);
|
|
4164
|
+
}, $u = (e) => {
|
|
4165
|
+
const t = e.get(g.DropOffDays, []), [r, n] = Na(t, Xt);
|
|
4166
4166
|
return [...r.map((i) => i.weekday), ...n].sort().join(";");
|
|
4167
4167
|
}, $e = (e, t, r) => {
|
|
4168
4168
|
var s, a;
|
|
4169
4169
|
const { state: n } = te(), i = n[e] ?? r;
|
|
4170
4170
|
return t ? ((a = (s = n[Fr]) == null ? void 0 : s[t]) == null ? void 0 : a[e]) ?? i : i;
|
|
4171
|
-
},
|
|
4171
|
+
}, qu = ({
|
|
4172
4172
|
carrier: e,
|
|
4173
4173
|
packageTypes: t
|
|
4174
4174
|
}) => {
|
|
@@ -4178,7 +4178,7 @@ const zu = (e) => e.get(g.CutoffTime, Ll), $u = (e) => e.get(g.CutoffTimeSameDay
|
|
|
4178
4178
|
A.Package
|
|
4179
4179
|
);
|
|
4180
4180
|
return t.value.has(r) ? r : zi;
|
|
4181
|
-
},
|
|
4181
|
+
}, Hu = `
|
|
4182
4182
|
<div class="mp-relative mp-w-12">
|
|
4183
4183
|
<svg viewBox="0 0 77 92" class="mp-drop-shadow">
|
|
4184
4184
|
<path d="M77 38.3333C77 61.4209 38.5 92 38.5 92C38.5 92 0 61.4209 0 38.3333C0 17.1624 17.237 0 38.5 0C59.763 0 77 17.1624 77 38.3333Z" fill="#FFF"/>
|
|
@@ -4192,21 +4192,21 @@ const zu = (e) => e.get(g.CutoffTime, Ll), $u = (e) => e.get(g.CutoffTimeSameDay
|
|
|
4192
4192
|
</div>
|
|
4193
4193
|
</div>`;
|
|
4194
4194
|
C(
|
|
4195
|
-
(e) => L.Util.template(
|
|
4195
|
+
(e) => L.Util.template(Hu, {
|
|
4196
4196
|
iconAlt: e.human,
|
|
4197
|
-
iconUrl:
|
|
4197
|
+
iconUrl: Bo(e.meta.logo_svg)
|
|
4198
4198
|
}),
|
|
4199
4199
|
{ getKey: (e) => e.name }
|
|
4200
4200
|
);
|
|
4201
4201
|
const Ki = (e, t) => {
|
|
4202
|
-
const { state: r } = te(), { state: n } = Gi(), { carrier: i } = e, s =
|
|
4203
|
-
return
|
|
4202
|
+
const { state: r } = te(), { state: n } = Gi(), { carrier: i } = e, s = qu(e);
|
|
4203
|
+
return il({
|
|
4204
4204
|
platform: r.platform ?? Nr.MyParcel,
|
|
4205
4205
|
carrier: Ut(i.value.identifier),
|
|
4206
4206
|
package_type: s,
|
|
4207
4207
|
cutoff_time: Qr(e),
|
|
4208
4208
|
deliverydays_window: e.get(g.DeliveryDaysWindow, Je),
|
|
4209
|
-
dropoff_days:
|
|
4209
|
+
dropoff_days: $u(e),
|
|
4210
4210
|
dropoff_delay: e.get(g.DropOffDelay, $i),
|
|
4211
4211
|
same_day_delivery: v(e.features).has(g.AllowSameDayDelivery) || void 0,
|
|
4212
4212
|
monday_delivery: v(e.features).has(g.AllowMondayDelivery) || void 0,
|
|
@@ -4219,7 +4219,7 @@ const Ki = (e, t) => {
|
|
|
4219
4219
|
exclude_parcel_lockers: r.excludeParcelLockers ? !0 : void 0,
|
|
4220
4220
|
...t
|
|
4221
4221
|
});
|
|
4222
|
-
},
|
|
4222
|
+
}, Bu = (e) => {
|
|
4223
4223
|
const t = e == null ? void 0 : e[0], r = e == null ? void 0 : e[1];
|
|
4224
4224
|
if (!(!t || !r))
|
|
4225
4225
|
return {
|
|
@@ -4228,7 +4228,7 @@ const Ki = (e, t) => {
|
|
|
4228
4228
|
};
|
|
4229
4229
|
}, Xi = (e, t) => e.deliveryTypes.includes("PICKUP_DELIVERY") && !!$e(g.AllowPickupLocations, t), Qi = (e, t) => {
|
|
4230
4230
|
const r = _i(e);
|
|
4231
|
-
return
|
|
4231
|
+
return au.some((n) => {
|
|
4232
4232
|
const i = qr(n);
|
|
4233
4233
|
return $e(i, t) && r.includes(n);
|
|
4234
4234
|
});
|
|
@@ -4237,10 +4237,10 @@ const Ki = (e, t) => {
|
|
|
4237
4237
|
try {
|
|
4238
4238
|
r = qr(e);
|
|
4239
4239
|
} catch (n) {
|
|
4240
|
-
|
|
4240
|
+
ue().warning(n, "disabling option");
|
|
4241
4241
|
}
|
|
4242
4242
|
return !!(r && $e(r, t));
|
|
4243
|
-
}, An = (e, t) => new Set([...e].filter(t) ?? []),
|
|
4243
|
+
}, An = (e, t) => new Set([...e].filter(t) ?? []), Yu = (e) => {
|
|
4244
4244
|
try {
|
|
4245
4245
|
return qr(e);
|
|
4246
4246
|
} catch {
|
|
@@ -4251,7 +4251,7 @@ const Ki = (e, t) => {
|
|
|
4251
4251
|
(e) => {
|
|
4252
4252
|
const t = Ut(e), r = Wr(
|
|
4253
4253
|
async () => {
|
|
4254
|
-
const h = await
|
|
4254
|
+
const h = await Tl(Kl, [t]);
|
|
4255
4255
|
if (!h) throw new Error();
|
|
4256
4256
|
return { ...h, name: t, identifier: e };
|
|
4257
4257
|
},
|
|
@@ -4261,11 +4261,11 @@ const Ki = (e, t) => {
|
|
|
4261
4261
|
const O = s.value;
|
|
4262
4262
|
return O ? h(O) : /* @__PURE__ */ new Set();
|
|
4263
4263
|
}, o = /* @__PURE__ */ N(/* @__PURE__ */ new Set()), c = y(
|
|
4264
|
-
() => a((h) => /* @__PURE__ */ new Set([..._i(h), ...
|
|
4265
|
-
),
|
|
4264
|
+
() => a((h) => /* @__PURE__ */ new Set([..._i(h), ...go]))
|
|
4265
|
+
), l = y(() => An(c.value, (h) => !o.value.has(h) && Cn(h, e))), u = y(
|
|
4266
4266
|
() => a(
|
|
4267
4267
|
(h) => new Set(
|
|
4268
|
-
h.packageTypes.map(
|
|
4268
|
+
h.packageTypes.map(So).filter((O) => O !== void 0)
|
|
4269
4269
|
)
|
|
4270
4270
|
)
|
|
4271
4271
|
), d = y(
|
|
@@ -4279,15 +4279,15 @@ const Ki = (e, t) => {
|
|
|
4279
4279
|
)
|
|
4280
4280
|
), p = y(() => new Set(
|
|
4281
4281
|
[
|
|
4282
|
-
...[...
|
|
4283
|
-
...[...
|
|
4282
|
+
...[...u.value].map((h) => Dl(h)),
|
|
4283
|
+
...[...l.value, ...d.value].map(Yu).filter((h) => h !== null)
|
|
4284
4284
|
].filter((h) => !!$e(h, e))
|
|
4285
4285
|
)), f = y(() => !!(s.value && Qi(s.value, e))), w = y(() => !!(s.value && Xi(s.value, e)));
|
|
4286
4286
|
return {
|
|
4287
4287
|
carrier: r,
|
|
4288
4288
|
capability: s,
|
|
4289
|
-
deliveryTypes:
|
|
4290
|
-
packageTypes:
|
|
4289
|
+
deliveryTypes: l,
|
|
4290
|
+
packageTypes: u,
|
|
4291
4291
|
shipmentOptions: d,
|
|
4292
4292
|
features: p,
|
|
4293
4293
|
hasDelivery: f,
|
|
@@ -4299,23 +4299,23 @@ const Ki = (e, t) => {
|
|
|
4299
4299
|
}
|
|
4300
4300
|
};
|
|
4301
4301
|
}
|
|
4302
|
-
),
|
|
4303
|
-
[Ei]:
|
|
4304
|
-
[Oi]:
|
|
4305
|
-
}),
|
|
4302
|
+
), Gu = Object.freeze({
|
|
4303
|
+
[Ei]: ce.Monday,
|
|
4304
|
+
[Oi]: ce.Saturday
|
|
4305
|
+
}), Ju = C(
|
|
4306
4306
|
(e, t, r) => {
|
|
4307
4307
|
if (r !== Ce.Standard || !t)
|
|
4308
4308
|
return r;
|
|
4309
4309
|
const n = new Date(t);
|
|
4310
4310
|
if (Ii(n))
|
|
4311
|
-
return
|
|
4312
|
-
const i = Li(n), s =
|
|
4311
|
+
return ce.SameDay;
|
|
4312
|
+
const i = Li(n), s = Gu[i] ?? r;
|
|
4313
4313
|
return e != null && e.includes(s) ? s : r;
|
|
4314
4314
|
}
|
|
4315
|
-
),
|
|
4315
|
+
), Ku = (e, t) => {
|
|
4316
4316
|
const { identifier: r } = v(e.carrier);
|
|
4317
4317
|
return t.has(r) || !v(e.hasDelivery) ? !1 : e.get(g.DeliveryDaysWindow, Je) !== 0;
|
|
4318
|
-
},
|
|
4318
|
+
}, Xu = (e) => v(e.deliveryTypes).has(ce.SameDay), Qu = (e) => Xu(e) ? !_l(Qr(e)) : !1, xn = 10, es = (e) => {
|
|
4319
4319
|
const t = e.substring(0, xn).split("-");
|
|
4320
4320
|
t[1] = (parseInt(t[1]) - 1).toString();
|
|
4321
4321
|
const r = e.substring(xn + 1, e.length), [n, i, s] = r.split(":").map(Number), [a, o, c] = t.map(Number);
|
|
@@ -4332,10 +4332,10 @@ function ts(e, t) {
|
|
|
4332
4332
|
return (e == null ? void 0 : e[t]) !== void 0;
|
|
4333
4333
|
}
|
|
4334
4334
|
var zt = (e, t) => JSON.stringify(e) === JSON.stringify(t), rs = /* @__PURE__ */ ((e) => (e.Package = "package", e.Mailbox = "mailbox", e.Letter = "letter", e.DigitalStamp = "digital_stamp", e.Pallet = "pallet", e.PackageSmall = "package_small", e.Envelope = "envelope", e))(rs || {});
|
|
4335
|
-
const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings,
|
|
4335
|
+
const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, Zu = () => {
|
|
4336
4336
|
const e = Ke();
|
|
4337
4337
|
return Object.entries(e.allowedShippingMethods).flatMap(([, r]) => r);
|
|
4338
|
-
}, jn = "data-context", I = () => window.MyParcelPdk.config,
|
|
4338
|
+
}, jn = "data-context", I = () => window.MyParcelPdk.config, ed = (e, t) => {
|
|
4339
4339
|
const r = I(), n = Ke(), { baseUrl: i, endpoints: s } = n.actions;
|
|
4340
4340
|
return r.doRequest({
|
|
4341
4341
|
...s[e],
|
|
@@ -4345,26 +4345,26 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4345
4345
|
},
|
|
4346
4346
|
baseUrl: i
|
|
4347
4347
|
});
|
|
4348
|
-
}, E = (e) => window.MyParcelPdk.useUtil(e),
|
|
4349
|
-
const e = E(
|
|
4350
|
-
return I().getAddressType(e(
|
|
4351
|
-
}, rd = (e, t, r, n) => (e ?? (e = {}), t ?? (t = {}), Zr(r,
|
|
4348
|
+
}, E = (e) => window.MyParcelPdk.useUtil(e), td = () => {
|
|
4349
|
+
const e = E(P.GetFieldValue);
|
|
4350
|
+
return I().getAddressType(e(ae.AddressType));
|
|
4351
|
+
}, rd = (e, t, r, n) => (e ?? (e = {}), t ?? (t = {}), Zr(r, ae) ? e[r] === t[r] : (n === void 0 && (n = td()), e[n][r] === t[n][r])), W = () => window.MyParcelPdk.stores.checkout, ns = (e, t, r = !0) => {
|
|
4352
4352
|
const n = t ?? W().state.addressType, i = I();
|
|
4353
|
-
return E(
|
|
4354
|
-
},
|
|
4353
|
+
return E(P.GetElement)(i.fields[n][e], r);
|
|
4354
|
+
}, is = (e, t, r) => {
|
|
4355
4355
|
var a, o, c;
|
|
4356
4356
|
const n = W();
|
|
4357
|
-
if (Zr(e,
|
|
4357
|
+
if (Zr(e, ae))
|
|
4358
4358
|
return (a = (t ?? n.state.form)[e]) == null ? void 0 : a.trim();
|
|
4359
4359
|
const i = r ?? n.state.form, s = t ?? n.state.addressType;
|
|
4360
4360
|
return (c = (o = i[s]) == null ? void 0 : o[e]) == null ? void 0 : c.trim();
|
|
4361
|
-
}, nd = (e, t) =>
|
|
4361
|
+
}, nd = (e, t) => is(e, t), ss = (e, t = !0) => {
|
|
4362
4362
|
const r = document.querySelector(e);
|
|
4363
4363
|
return !r && t && console.warn(`Element not found: "${e}"`), r ?? null;
|
|
4364
4364
|
}, id = (e, t, r, n = !0) => {
|
|
4365
|
-
const i =
|
|
4365
|
+
const i = ns(e, r);
|
|
4366
4366
|
if (i && (i.value = t ?? "", i.dispatchEvent(new Event("input", { bubbles: !0 })), n)) {
|
|
4367
|
-
const s = E(
|
|
4367
|
+
const s = E(P.TriggerEvent), a = I();
|
|
4368
4368
|
s("change", void 0, a.getForm());
|
|
4369
4369
|
}
|
|
4370
4370
|
}, sd = (e, t = null, r = document) => {
|
|
@@ -4375,7 +4375,7 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4375
4375
|
}
|
|
4376
4376
|
n == null || n.dispatchEvent(new Event(e));
|
|
4377
4377
|
}, ad = () => {
|
|
4378
|
-
const e = I(), t =
|
|
4378
|
+
const e = I(), t = ss(e.selectors.deliveryOptionsWrapper, !1), r = t == null ? void 0 : t.getAttribute(jn);
|
|
4379
4379
|
if (!t || !r)
|
|
4380
4380
|
throw new Error("No delivery options wrapper or context found.");
|
|
4381
4381
|
t.removeAttribute(jn);
|
|
@@ -4388,12 +4388,12 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4388
4388
|
throw new Error(`Util "${e}" not found.`);
|
|
4389
4389
|
return t;
|
|
4390
4390
|
}, ld = (e) => window.MyParcelPdk.events[e], Hd = () => window.MyParcelPdk.instance, ud = (e, t) => {
|
|
4391
|
-
const r = E(
|
|
4392
|
-
!t || r(e.form, t.form,
|
|
4391
|
+
const r = E(P.FieldsEqual);
|
|
4392
|
+
!t || r(e.form, t.form, ae.AddressType) || (e.addressType = I().getAddressType(e.form[ae.AddressType]));
|
|
4393
4393
|
}, Nn = (e, t) => e[t] ?? "", Fn = () => {
|
|
4394
4394
|
const e = W(), t = I(), r = t.getFormData(), n = {
|
|
4395
|
-
[
|
|
4396
|
-
[
|
|
4395
|
+
[ge.Billing]: {},
|
|
4396
|
+
[ge.Shipping]: {}
|
|
4397
4397
|
};
|
|
4398
4398
|
e.state.addressTypes.forEach((i) => {
|
|
4399
4399
|
Object.entries(t.formData[i]).forEach(([s, a]) => {
|
|
@@ -4402,17 +4402,17 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4402
4402
|
}), Object.entries(t.formData).forEach(([i, s]) => {
|
|
4403
4403
|
e.state.addressTypes.includes(i) || (n[i] = Nn(r, s));
|
|
4404
4404
|
}), e.set({
|
|
4405
|
-
addressType:
|
|
4405
|
+
addressType: t.getAddressType(n[ae.AddressType]),
|
|
4406
4406
|
form: Object.freeze({ ...n })
|
|
4407
4407
|
});
|
|
4408
|
-
}, dd = () => E(
|
|
4408
|
+
}, dd = () => E(P.CreateStore)(Symbol("checkout"), () => ({
|
|
4409
4409
|
state: {
|
|
4410
|
-
addressType:
|
|
4411
|
-
addressTypes: [
|
|
4410
|
+
addressType: ge.Shipping,
|
|
4411
|
+
addressTypes: [ge.Billing, ge.Shipping].filter(od),
|
|
4412
4412
|
context: ad(),
|
|
4413
4413
|
form: {
|
|
4414
|
-
[
|
|
4415
|
-
[
|
|
4414
|
+
[ge.Billing]: {},
|
|
4415
|
+
[ge.Shipping]: {}
|
|
4416
4416
|
}
|
|
4417
4417
|
},
|
|
4418
4418
|
listeners: {
|
|
@@ -4430,16 +4430,16 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4430
4430
|
(o = r[e].listeners)[s] ?? (o[s] = []), (c = r[e].listeners[s]) == null || c.push(a);
|
|
4431
4431
|
},
|
|
4432
4432
|
async set(s) {
|
|
4433
|
-
var
|
|
4433
|
+
var u;
|
|
4434
4434
|
const a = { ...r[e].state }, o = { ...a, ...s };
|
|
4435
4435
|
if (zt(o, a))
|
|
4436
4436
|
return;
|
|
4437
4437
|
Object.assign(r[e].state, s);
|
|
4438
|
-
const c = (
|
|
4438
|
+
const c = (u = r[e].listeners) == null ? void 0 : u[we.Update], l = await Promise.all(
|
|
4439
4439
|
(c == null ? void 0 : c.map(async (d) => d({ ...o }, a))) ?? []
|
|
4440
4440
|
);
|
|
4441
|
-
if (
|
|
4442
|
-
const d =
|
|
4441
|
+
if (l.length) {
|
|
4442
|
+
const d = l.reduce((p, f) => ({ ...p, ...f }), {});
|
|
4443
4443
|
Object.assign(r[e].state, d);
|
|
4444
4444
|
}
|
|
4445
4445
|
}
|
|
@@ -4453,7 +4453,7 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4453
4453
|
}, gd = (e) => e, yd = () => {
|
|
4454
4454
|
const t = I().getForm(), r = new FormData(t);
|
|
4455
4455
|
return Object.fromEntries(r.entries());
|
|
4456
|
-
}, md = (e) =>
|
|
4456
|
+
}, md = (e) => Zu().some((r) => e === r), vd = (e) => ({
|
|
4457
4457
|
formChange: hd,
|
|
4458
4458
|
getAddressType: gd,
|
|
4459
4459
|
getFormData: yd,
|
|
@@ -4492,12 +4492,12 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4492
4492
|
useUtil: cd,
|
|
4493
4493
|
utils: {
|
|
4494
4494
|
createStore: pd,
|
|
4495
|
-
doRequest:
|
|
4495
|
+
doRequest: ed,
|
|
4496
4496
|
fieldsEqual: rd,
|
|
4497
|
-
getAddressField:
|
|
4497
|
+
getAddressField: ns,
|
|
4498
4498
|
getAddressFieldValue: nd,
|
|
4499
|
-
getElement:
|
|
4500
|
-
getFieldValue:
|
|
4499
|
+
getElement: ss,
|
|
4500
|
+
getFieldValue: is,
|
|
4501
4501
|
isEnumValue: Zr,
|
|
4502
4502
|
isOfType: ts,
|
|
4503
4503
|
setFieldValue: id,
|
|
@@ -4517,7 +4517,7 @@ const Ke = () => window.MyParcelPdk.stores.checkout.state.context.settings, ed =
|
|
|
4517
4517
|
}, Yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4518
4518
|
__proto__: null
|
|
4519
4519
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4520
|
-
function
|
|
4520
|
+
function as(e, t = 100) {
|
|
4521
4521
|
let r;
|
|
4522
4522
|
return (...n) => {
|
|
4523
4523
|
clearTimeout(r), r = setTimeout(() => {
|
|
@@ -4525,37 +4525,37 @@ function os(e, t = 100) {
|
|
|
4525
4525
|
}, t);
|
|
4526
4526
|
};
|
|
4527
4527
|
}
|
|
4528
|
-
const
|
|
4529
|
-
const e = I(), r = E(
|
|
4528
|
+
const os = () => {
|
|
4529
|
+
const e = I(), r = E(P.GetElement)(e.selectors.deliveryOptions, !1);
|
|
4530
4530
|
return !r || r.innerHTML !== "";
|
|
4531
|
-
},
|
|
4531
|
+
}, Dd = async () => {
|
|
4532
4532
|
var n, i, s;
|
|
4533
|
-
const e = E(
|
|
4533
|
+
const e = E(P.DoRequest), t = E(P.GetFieldValue);
|
|
4534
4534
|
return ((s = (i = (n = (await e(zn.FetchCheckoutContext, {
|
|
4535
|
-
shippingMethod: t(
|
|
4535
|
+
shippingMethod: t(ae.ShippingMethod)
|
|
4536
4536
|
})).data) == null ? void 0 : n.context) == null ? void 0 : i[0]) == null ? void 0 : s.checkout) ?? {};
|
|
4537
|
-
},
|
|
4538
|
-
const t = E(
|
|
4537
|
+
}, cs = (e) => {
|
|
4538
|
+
const t = E(P.GetAddressFieldValue), r = t(M.Address1, e) ?? "", n = t(M.Address2, e) ?? "";
|
|
4539
4539
|
return {
|
|
4540
|
-
cc: t(
|
|
4541
|
-
postalCode: t(
|
|
4540
|
+
cc: t(M.Country, e) ?? "",
|
|
4541
|
+
postalCode: t(M.PostalCode, e) ?? "",
|
|
4542
4542
|
street: [r, n].join(" ").trim(),
|
|
4543
|
-
city: t(
|
|
4543
|
+
city: t(M.City, e) ?? ""
|
|
4544
4544
|
};
|
|
4545
|
-
},
|
|
4546
|
-
const t = E(
|
|
4545
|
+
}, Sd = (e) => {
|
|
4546
|
+
const t = E(P.IsEnumValue), { allowedShippingMethods: r } = Ke(), n = Object.entries(r).find(([, a]) => a.includes(e)), i = n == null ? void 0 : n[0];
|
|
4547
4547
|
return t(i, rs) ? i : void 0;
|
|
4548
4548
|
};
|
|
4549
|
-
var
|
|
4549
|
+
var ls = /* @__PURE__ */ ((e) => (e.DeliveryOptionsUpdated = "deliveryOptionsUpdated", e))(ls || {}), us = /* @__PURE__ */ ((e) => (e.Single = "single", e.Multi = "multi", e))(us || {});
|
|
4550
4550
|
const _d = (e) => ({
|
|
4551
|
-
mode:
|
|
4551
|
+
mode: us.Multi,
|
|
4552
4552
|
getPackageType: Td,
|
|
4553
4553
|
updateDeliveryOptions: Cd,
|
|
4554
4554
|
...e
|
|
4555
4555
|
}), Pd = (e) => I().hasDeliveryOptions(e), Ed = (e) => {
|
|
4556
|
-
E(
|
|
4556
|
+
E(P.TriggerEvent)(e ? uu : du);
|
|
4557
4557
|
}, wt = () => window.MyParcelPdk.stores.deliveryOptions, Od = async () => {
|
|
4558
|
-
const e = await
|
|
4558
|
+
const e = await Dd(), t = W(), r = wt();
|
|
4559
4559
|
await Promise.all([
|
|
4560
4560
|
t.set({ context: e }),
|
|
4561
4561
|
r.set({
|
|
@@ -4574,42 +4574,42 @@ const _d = (e) => ({
|
|
|
4574
4574
|
]);
|
|
4575
4575
|
}, Td = () => {
|
|
4576
4576
|
const e = W(), { shippingMethod: t } = e.state.form;
|
|
4577
|
-
return
|
|
4577
|
+
return Sd(t);
|
|
4578
4578
|
}, Cd = (e) => {
|
|
4579
4579
|
const t = wt(), r = e.configuration.config, n = t.state.settings.getPackageType() ?? t.state.originalPackageType;
|
|
4580
4580
|
return {
|
|
4581
4581
|
...r,
|
|
4582
4582
|
[g.PackageType]: n
|
|
4583
4583
|
};
|
|
4584
|
-
}, Ad =
|
|
4584
|
+
}, Ad = as(
|
|
4585
4585
|
(e, t) => {
|
|
4586
|
-
!
|
|
4586
|
+
!os() || t && e.enabled === t.enabled || Ed(e.enabled);
|
|
4587
4587
|
}
|
|
4588
|
-
), xd =
|
|
4589
|
-
const r = E(
|
|
4590
|
-
o && s && !zt(n, s) ? r(
|
|
4588
|
+
), xd = as((e, t) => {
|
|
4589
|
+
const r = E(P.TriggerEvent), { config: n, address: i } = e.configuration ?? {}, { config: s, address: a } = (t == null ? void 0 : t.configuration) ?? {}, o = os();
|
|
4590
|
+
o && s && !zt(n, s) ? r(ou, e.configuration) : e.enabled && (!o || !s || !zt(i, a)) && r(cu, e.configuration);
|
|
4591
4591
|
}), Ln = async (e, t) => {
|
|
4592
|
-
|
|
4592
|
+
var c, l;
|
|
4593
4593
|
if (t && zt(e.form, t.form))
|
|
4594
4594
|
return;
|
|
4595
|
-
const
|
|
4596
|
-
t &&
|
|
4597
|
-
const
|
|
4598
|
-
...
|
|
4599
|
-
address:
|
|
4600
|
-
config:
|
|
4601
|
-
strings:
|
|
4595
|
+
const r = wt(), n = (c = t == null ? void 0 : t.form[t.addressType]) == null ? void 0 : c[M.Country], i = (l = e.form[e.addressType]) == null ? void 0 : l[M.Country];
|
|
4596
|
+
t && n !== i && (await r.set({ enabled: !1 }), await Od());
|
|
4597
|
+
const s = await Pd(e.form[ae.ShippingMethod]), a = r.state.settings.updateDeliveryOptions(r.state), o = {
|
|
4598
|
+
...r.state.configuration,
|
|
4599
|
+
address: cs(),
|
|
4600
|
+
config: a,
|
|
4601
|
+
strings: r.state.configuration.strings
|
|
4602
4602
|
};
|
|
4603
|
-
await
|
|
4603
|
+
await r.set({ enabled: s, configuration: o });
|
|
4604
4604
|
}, Md = (e) => {
|
|
4605
|
-
if (!E(
|
|
4605
|
+
if (!E(P.IsOfType)(e, "detail"))
|
|
4606
4606
|
return;
|
|
4607
4607
|
const r = e, n = wt();
|
|
4608
4608
|
n.state.hiddenInput && (n.state.hiddenInput.value = JSON.stringify(r.detail)), n.set({ output: r.detail }), document.dispatchEvent(
|
|
4609
|
-
new CustomEvent(ld(
|
|
4609
|
+
new CustomEvent(ld(ls.DeliveryOptionsUpdated), { detail: r.detail })
|
|
4610
4610
|
);
|
|
4611
4611
|
}, jd = (e) => {
|
|
4612
|
-
const t = E(
|
|
4612
|
+
const t = E(P.CreateStore), r = W(), { config: n, strings: i } = r.state.context;
|
|
4613
4613
|
return t(Symbol("deliveryOptions"), () => ({
|
|
4614
4614
|
state: {
|
|
4615
4615
|
settings: _d(e),
|
|
@@ -4617,7 +4617,7 @@ const _d = (e) => ({
|
|
|
4617
4617
|
* Configuration that is passed to the delivery options library.
|
|
4618
4618
|
*/
|
|
4619
4619
|
configuration: {
|
|
4620
|
-
address:
|
|
4620
|
+
address: cs(),
|
|
4621
4621
|
config: n,
|
|
4622
4622
|
strings: i
|
|
4623
4623
|
},
|
|
@@ -4654,12 +4654,12 @@ const _d = (e) => ({
|
|
|
4654
4654
|
}, Gd = (e) => {
|
|
4655
4655
|
window.MyParcelPdk.stores.deliveryOptions = jd(e), Fd();
|
|
4656
4656
|
const t = W();
|
|
4657
|
-
Ln(t.state), t.on(we.Update, Ln), document.addEventListener(
|
|
4657
|
+
Ln(t.state), t.on(we.Update, Ln), document.addEventListener(lu, Md);
|
|
4658
4658
|
}, Qt = () => {
|
|
4659
|
-
const e = E(
|
|
4659
|
+
const e = E(P.TriggerEvent), t = I();
|
|
4660
4660
|
e("change", void 0, t.getForm());
|
|
4661
4661
|
}, en = (e) => {
|
|
4662
|
-
const t = E(
|
|
4662
|
+
const t = E(P.GetAddressFieldValue), r = Ke(), n = t(M.Country, e);
|
|
4663
4663
|
return !!n && r.countriesWithSeparateAddressFields.includes(n.toUpperCase());
|
|
4664
4664
|
};
|
|
4665
4665
|
var ze = /* @__PURE__ */ ((e) => (e.Street = "street", e.Number = "number", e.NumberSuffix = "numberSuffix", e))(ze || {});
|
|
@@ -4667,13 +4667,13 @@ const Ld = /(.*?)\s?(\d{1,4})[/\s-]{0,2}([A-z]\d{1,3}|-\d{1,4}|\d{2}\w{1,2}|[A-z
|
|
|
4667
4667
|
"street",
|
|
4668
4668
|
"number"
|
|
4669
4669
|
/* Number */
|
|
4670
|
-
],
|
|
4670
|
+
], ds = [
|
|
4671
4671
|
...Id,
|
|
4672
4672
|
"numberSuffix"
|
|
4673
4673
|
/* NumberSuffix */
|
|
4674
|
-
],
|
|
4675
|
-
const t = E(
|
|
4676
|
-
return
|
|
4674
|
+
], ps = (e) => {
|
|
4675
|
+
const t = E(P.GetAddressFieldValue);
|
|
4676
|
+
return ds.reduce(
|
|
4677
4677
|
(r, n) => ({
|
|
4678
4678
|
...r,
|
|
4679
4679
|
[n]: t(n, e) ?? ""
|
|
@@ -4681,38 +4681,38 @@ const Ld = /(.*?)\s?(\d{1,4})[/\s-]{0,2}([A-z]\d{1,3}|-\d{1,4}|\d{2}\w{1,2}|[A-z
|
|
|
4681
4681
|
{}
|
|
4682
4682
|
);
|
|
4683
4683
|
}, tn = (e) => {
|
|
4684
|
-
const t = E(
|
|
4684
|
+
const t = E(P.GetAddressFieldValue);
|
|
4685
4685
|
if (!en(e)) {
|
|
4686
|
-
const n = t(
|
|
4686
|
+
const n = t(M.Address1, e) ?? "", i = t(M.Address2, e) ?? "";
|
|
4687
4687
|
return [n, i].join(" ").trim();
|
|
4688
4688
|
}
|
|
4689
|
-
const r =
|
|
4689
|
+
const r = ps(e);
|
|
4690
4690
|
return Object.values(r).join(" ").trim();
|
|
4691
|
-
},
|
|
4692
|
-
const r = E(
|
|
4693
|
-
r(
|
|
4691
|
+
}, fs = (e, t = !0) => {
|
|
4692
|
+
const r = E(P.SetFieldValue), n = tn(e);
|
|
4693
|
+
r(M.Address1, n, e, t);
|
|
4694
4694
|
}, Vd = (e) => {
|
|
4695
|
-
W().state.addressTypes.filter(en).forEach((n) =>
|
|
4695
|
+
W().state.addressTypes.filter(en).forEach((n) => fs(n, !1)), Qt();
|
|
4696
4696
|
}, rn = (e, t) => {
|
|
4697
|
-
const r = E(
|
|
4697
|
+
const r = E(P.SetFieldValue);
|
|
4698
4698
|
Object.entries(e ?? {}).forEach(([n, i]) => {
|
|
4699
4699
|
i && r(n, i, t, !1);
|
|
4700
4700
|
}), Qt();
|
|
4701
4701
|
}, In = (e, t) => {
|
|
4702
4702
|
ts(e.target, "value") && rn(nn(e.target.value), t);
|
|
4703
4703
|
}, Rd = (e, t) => {
|
|
4704
|
-
const r = E(
|
|
4704
|
+
const r = E(P.FieldsEqual), n = E(P.SetFieldValue), i = E(P.GetAddressFieldValue), a = W().state.addressTypes.filter((o) => ds.some((c) => t && !r(e.form, t.form, c, o)));
|
|
4705
4705
|
a.forEach((o) => {
|
|
4706
|
-
const c =
|
|
4707
|
-
if (!
|
|
4706
|
+
const c = ps(o), l = i(M.Address1, o);
|
|
4707
|
+
if (!l && (!c.number || !c.street))
|
|
4708
4708
|
return;
|
|
4709
|
-
const
|
|
4710
|
-
|
|
4709
|
+
const u = tn(o);
|
|
4710
|
+
l !== u && n(M.Address1, u, o, !1);
|
|
4711
4711
|
}), a.length && Qt();
|
|
4712
4712
|
}, Ud = (e, t) => {
|
|
4713
|
-
const r = E(
|
|
4714
|
-
W().state.addressTypes.filter((i) => t && !r(e.form, t.form,
|
|
4715
|
-
const s = en(i) ? zd(i) : { [
|
|
4713
|
+
const r = E(P.FieldsEqual);
|
|
4714
|
+
W().state.addressTypes.filter((i) => t && !r(e.form, t.form, M.Country, i)).forEach((i) => {
|
|
4715
|
+
const s = en(i) ? zd(i) : { [M.Address1]: tn(i) };
|
|
4716
4716
|
rn(s, i);
|
|
4717
4717
|
});
|
|
4718
4718
|
}, nn = (e) => {
|
|
@@ -4724,12 +4724,12 @@ const Ld = /(.*?)\s?(\d{1,4})[/\s-]{0,2}([A-z]\d{1,3}|-\d{1,4}|\d{2}\w{1,2}|[A-z
|
|
|
4724
4724
|
};
|
|
4725
4725
|
};
|
|
4726
4726
|
function Wd() {
|
|
4727
|
-
const e = E(
|
|
4727
|
+
const e = E(P.GetAddressField);
|
|
4728
4728
|
W().state.addressTypes.forEach((r) => {
|
|
4729
4729
|
const n = e(ze.Street, r);
|
|
4730
4730
|
if (!n)
|
|
4731
4731
|
return;
|
|
4732
|
-
const i = e(
|
|
4732
|
+
const i = e(M.Address1, r);
|
|
4733
4733
|
i == null || i.addEventListener("load", (a) => In(a, r)), i == null || i.addEventListener("animationend", (a) => In(a, r));
|
|
4734
4734
|
const s = n.value;
|
|
4735
4735
|
if (s) {
|
|
@@ -4739,11 +4739,11 @@ function Wd() {
|
|
|
4739
4739
|
return;
|
|
4740
4740
|
}
|
|
4741
4741
|
}
|
|
4742
|
-
|
|
4742
|
+
fs(r, !1);
|
|
4743
4743
|
}), Qt();
|
|
4744
4744
|
}
|
|
4745
4745
|
const zd = (e) => {
|
|
4746
|
-
const t = E(
|
|
4746
|
+
const t = E(P.GetAddressFieldValue), r = t(M.Address1, e) ?? "", n = t(M.Address2, e) ?? "";
|
|
4747
4747
|
return nn([r, n].join(" "));
|
|
4748
4748
|
}, Jd = () => {
|
|
4749
4749
|
const e = W();
|
|
@@ -4760,7 +4760,7 @@ const zd = (e) => {
|
|
|
4760
4760
|
};
|
|
4761
4761
|
var vr = /* @__PURE__ */ ((e) => (e.EoriNumber = "eoriNumber", e.VatNumber = "vatNumber", e))(vr || {});
|
|
4762
4762
|
const Vn = () => {
|
|
4763
|
-
const e = E(
|
|
4763
|
+
const e = E(P.GetAddressField), t = W(), r = $d(), n = I();
|
|
4764
4764
|
t.state.addressTypes.forEach((i) => {
|
|
4765
4765
|
[vr.EoriNumber, vr.VatNumber].forEach((s) => {
|
|
4766
4766
|
const a = e(s, i, !1);
|
|
@@ -4771,34 +4771,34 @@ const Vn = () => {
|
|
|
4771
4771
|
W().on(we.Update, Vn), Vn();
|
|
4772
4772
|
};
|
|
4773
4773
|
export {
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4774
|
+
M as AddressField,
|
|
4775
|
+
ge as AddressType,
|
|
4776
|
+
us as DeliveryOptionsMode,
|
|
4777
|
+
du as EVENT_HIDE_DELIVERY_OPTIONS,
|
|
4778
|
+
uu as EVENT_SHOW_DELIVERY_OPTIONS,
|
|
4779
4779
|
qd as EVENT_UPDATED_ADDRESS,
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4780
|
+
lu as EVENT_UPDATED_DELIVERY_OPTIONS,
|
|
4781
|
+
ou as EVENT_UPDATE_CONFIG,
|
|
4782
|
+
cu as EVENT_UPDATE_DELIVERY_OPTIONS,
|
|
4783
|
+
ls as PdkDeliveryOptionsEvent,
|
|
4784
4784
|
rt as PdkEvent,
|
|
4785
|
-
|
|
4786
|
-
|
|
4785
|
+
ae as PdkField,
|
|
4786
|
+
P as PdkUtil,
|
|
4787
4787
|
Ld as SPLIT_STREET_REGEX,
|
|
4788
4788
|
ze as SeparateAddressField,
|
|
4789
4789
|
we as StoreListener,
|
|
4790
4790
|
vr as TaxField,
|
|
4791
|
-
|
|
4791
|
+
P as Util,
|
|
4792
4792
|
Yd as _,
|
|
4793
4793
|
Bd as createPdkCheckout,
|
|
4794
|
-
|
|
4794
|
+
as as debounce,
|
|
4795
4795
|
Td as defaultGetPackageType,
|
|
4796
4796
|
Cd as defaultUpdateDeliveryOptions,
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4797
|
+
os as deliveryOptionsIsRendered,
|
|
4798
|
+
Dd as fetchCheckoutContext,
|
|
4799
|
+
cs as getDeliveryOptionsAddress,
|
|
4800
|
+
Zu as getEnabledShippingMethods,
|
|
4801
|
+
Sd as getPackageTypeFromShippingMethod,
|
|
4802
4802
|
_d as getResolvedSettings,
|
|
4803
4803
|
Gd as initializeCheckoutDeliveryOptions,
|
|
4804
4804
|
Jd as initializeCheckoutSeparateAddressFields,
|