@konnectio/core 4.5.2 → 4.5.4
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/{ActionField-W-bZH9YV.js → ActionField-Dw2sZfTW.js} +38 -35
- package/dist/ActionField-Dw2sZfTW.js.br +0 -0
- package/dist/ActionField-Dw2sZfTW.js.gz +0 -0
- package/dist/{AvailabilitySkeleton-DomtgZ0G.js → AvailabilitySkeleton-C3xVBM2W.js} +2 -2
- package/dist/AvailabilitySkeleton-C3xVBM2W.js.br +0 -0
- package/dist/AvailabilitySkeleton-C3xVBM2W.js.gz +0 -0
- package/dist/{CheckoutWindow-BrSAf1mX.js → CheckoutWindow-CO9Ps1iN.js} +1 -1
- package/dist/CheckoutWindow-CO9Ps1iN.js.br +0 -0
- package/dist/CheckoutWindow-CO9Ps1iN.js.gz +0 -0
- package/dist/{ErrorMessage-MZyMFb-7.js → ErrorMessage-oGRbN4x5.js} +2 -2
- package/dist/ErrorMessage-oGRbN4x5.js.br +0 -0
- package/dist/ErrorMessage-oGRbN4x5.js.gz +0 -0
- package/dist/{EventAvailabilityForm-CkmIrZhi.js → EventAvailabilityForm-Dr3s45nS.js} +2 -2
- package/dist/EventAvailabilityForm-Dr3s45nS.js.br +0 -0
- package/dist/EventAvailabilityForm-Dr3s45nS.js.gz +0 -0
- package/dist/{Field-CrC-jcA-.js → Field-Tm_FpGr2.js} +1 -1
- package/dist/Field-Tm_FpGr2.js.br +0 -0
- package/dist/Field-Tm_FpGr2.js.gz +4 -0
- package/dist/{HotelAvailabilityForm-exvP5WH7.js → HotelAvailabilityForm-Cs4Bdx_M.js} +2 -2
- package/dist/HotelAvailabilityForm-Cs4Bdx_M.js.br +0 -0
- package/dist/HotelAvailabilityForm-Cs4Bdx_M.js.gz +0 -0
- package/dist/{SelectField-CGqR4A53.js → SelectField-CEZbxaZf.js} +205 -201
- package/dist/SelectField-CEZbxaZf.js.br +0 -0
- package/dist/SelectField-CEZbxaZf.js.gz +0 -0
- package/dist/{TermsOfService-kPkWHDxH.js → TermsOfService-B1wlPc16.js} +2 -2
- package/dist/TermsOfService-B1wlPc16.js.br +0 -0
- package/dist/TermsOfService-B1wlPc16.js.gz +2 -0
- package/dist/{_-BqsqVDDR.js → _-BX401C4m.js} +1 -1
- package/dist/_-BX401C4m.js.br +0 -0
- package/dist/_-BX401C4m.js.gz +4 -0
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/availability.js.gz +0 -0
- package/dist/cancel-reservation.js +4 -4
- package/dist/cancel-reservation.js.br +0 -0
- package/dist/cancel-reservation.js.gz +0 -0
- package/dist/core.css +1 -1
- package/dist/core.css.br +0 -0
- package/dist/core.css.gz +0 -0
- package/dist/{dist-B8PJFy5H.js → dist-DetXXnpL.js} +3 -3
- package/dist/dist-DetXXnpL.js.br +0 -0
- package/dist/dist-DetXXnpL.js.gz +0 -0
- package/dist/event.js +8 -8
- package/dist/event.js.br +0 -0
- package/dist/event.js.gz +0 -0
- package/dist/gift-card-validation.js +7 -7
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card-validation.js.gz +0 -0
- package/dist/gift-card.js +9 -9
- package/dist/gift-card.js.br +0 -0
- package/dist/gift-card.js.gz +0 -0
- package/dist/{giftCard-D-ElhpAu.js → giftCard-akmKZ_5L.js} +1 -1
- package/dist/giftCard-akmKZ_5L.js.br +0 -0
- package/dist/giftCard-akmKZ_5L.js.gz +0 -0
- package/dist/hotel.js +388 -363
- package/dist/hotel.js.br +0 -0
- package/dist/hotel.js.gz +0 -0
- package/dist/{masonry.plugin-BLgaVwzr.js → masonry.plugin-D6bGOf4q.js} +99 -48
- package/dist/masonry.plugin-D6bGOf4q.js.br +0 -0
- package/dist/masonry.plugin-D6bGOf4q.js.gz +0 -0
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/polyfill.js.gz +0 -0
- package/dist/{style-RstJ0SR4.js → style-ekPp7Tgj.js} +1 -1
- package/dist/style-ekPp7Tgj.js.br +0 -0
- package/dist/style-ekPp7Tgj.js.gz +0 -0
- package/package.json +1 -1
- package/dist/ActionField-W-bZH9YV.js.br +0 -0
- package/dist/ActionField-W-bZH9YV.js.gz +0 -0
- package/dist/AvailabilitySkeleton-DomtgZ0G.js.br +0 -0
- package/dist/AvailabilitySkeleton-DomtgZ0G.js.gz +0 -0
- package/dist/CheckoutWindow-BrSAf1mX.js.br +0 -0
- package/dist/CheckoutWindow-BrSAf1mX.js.gz +0 -0
- package/dist/ErrorMessage-MZyMFb-7.js.br +0 -0
- package/dist/ErrorMessage-MZyMFb-7.js.gz +0 -0
- package/dist/EventAvailabilityForm-CkmIrZhi.js.br +0 -0
- package/dist/EventAvailabilityForm-CkmIrZhi.js.gz +0 -0
- package/dist/Field-CrC-jcA-.js.br +0 -0
- package/dist/Field-CrC-jcA-.js.gz +0 -0
- package/dist/HotelAvailabilityForm-exvP5WH7.js.br +0 -0
- package/dist/HotelAvailabilityForm-exvP5WH7.js.gz +0 -0
- package/dist/SelectField-CGqR4A53.js.br +0 -0
- package/dist/SelectField-CGqR4A53.js.gz +0 -0
- package/dist/TermsOfService-kPkWHDxH.js.br +0 -0
- package/dist/TermsOfService-kPkWHDxH.js.gz +0 -0
- package/dist/_-BqsqVDDR.js.br +0 -0
- package/dist/_-BqsqVDDR.js.gz +0 -0
- package/dist/dist-B8PJFy5H.js.br +0 -0
- package/dist/dist-B8PJFy5H.js.gz +0 -0
- package/dist/giftCard-D-ElhpAu.js.br +0 -0
- package/dist/giftCard-D-ElhpAu.js.gz +0 -0
- package/dist/masonry.plugin-BLgaVwzr.js.br +0 -0
- package/dist/masonry.plugin-BLgaVwzr.js.gz +0 -0
- package/dist/style-RstJ0SR4.js.br +0 -0
- package/dist/style-RstJ0SR4.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e } from "./chunk-BPfpcrXh.js";
|
|
2
|
-
import { $ as t, At as n, Ct as r, D as i, Dt as a, E as o, Et as s, F as c, H as l, I as u, L as d, M as f, O as p, Ot as m, P as h, St as g, T as _, Tt as v, V as y, Y as b, _ as x, _t as S, at as C, bt as w, d as T, dt as E, et as D, ft as O, g as k, h as A, ht as j, i as ee, j as M, k as N, kt as te, l as ne, lt as P, mt as
|
|
2
|
+
import { $ as t, At as n, Ct as r, D as i, Dt as a, E as o, Et as s, F as c, H as l, I as u, L as d, M as f, O as p, Ot as m, P as h, St as g, T as _, Tt as v, V as y, Y as b, _ as x, _t as S, at as C, bt as w, d as T, dt as E, et as D, ft as O, g as k, h as A, ht as j, i as ee, j as M, k as N, kt as te, l as ne, lt as P, mt as re, n as F, nt as ie, o as ae, q as oe, rt as se, t as ce, u as le, vt as ue, wt as de, x as fe, xt as I, y as pe, yt as me } from "./mitt-DrOLO7f9.js";
|
|
3
3
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
4
|
-
function
|
|
4
|
+
function L(e, t) {
|
|
5
5
|
return j() ? (S(e, t), !0) : !1;
|
|
6
6
|
}
|
|
7
7
|
var he = typeof window < "u" && typeof document < "u";
|
|
@@ -12,9 +12,9 @@ function xe() {
|
|
|
12
12
|
return he && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
13
13
|
}
|
|
14
14
|
function Se(...e) {
|
|
15
|
-
if (e.length !== 1) return
|
|
15
|
+
if (e.length !== 1) return de(...e);
|
|
16
16
|
let t = e[0];
|
|
17
|
-
return typeof t == "function" ?
|
|
17
|
+
return typeof t == "function" ? me(re(() => ({
|
|
18
18
|
get: t,
|
|
19
19
|
set: ye
|
|
20
20
|
}))) : w(t);
|
|
@@ -41,7 +41,7 @@ function Te(e = we, t = {}) {
|
|
|
41
41
|
r.value = !0;
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
44
|
-
isActive:
|
|
44
|
+
isActive: I(r),
|
|
45
45
|
pause: i,
|
|
46
46
|
resume: a,
|
|
47
47
|
eventFilter: (...t) => {
|
|
@@ -82,7 +82,7 @@ function Ae(e, t, n = {}) {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
function je(e, t = !0, n) {
|
|
85
|
-
Oe(n) ?
|
|
85
|
+
Oe(n) ? oe(e, n) : t ? e() : l(e);
|
|
86
86
|
}
|
|
87
87
|
function Me(e, t, n = {}) {
|
|
88
88
|
let { immediate: r = !0, immediateCallback: i = !1 } = n, a = g(!1), o;
|
|
@@ -97,8 +97,8 @@ function Me(e, t, n = {}) {
|
|
|
97
97
|
a.value = !1, o = void 0, e(...n);
|
|
98
98
|
}, v(t));
|
|
99
99
|
}
|
|
100
|
-
return r && (a.value = !0, he && l()),
|
|
101
|
-
isPending:
|
|
100
|
+
return r && (a.value = !0, he && l()), L(c), {
|
|
101
|
+
isPending: I(a),
|
|
102
102
|
start: l,
|
|
103
103
|
stop: c
|
|
104
104
|
};
|
|
@@ -207,7 +207,7 @@ function Re(e, t, n = {}) {
|
|
|
207
207
|
}
|
|
208
208
|
function ze() {
|
|
209
209
|
let e = g(!1), t = c();
|
|
210
|
-
return t &&
|
|
210
|
+
return t && oe(() => {
|
|
211
211
|
e.value = !0;
|
|
212
212
|
}, t), e;
|
|
213
213
|
}
|
|
@@ -285,10 +285,10 @@ function He(e = {}) {
|
|
|
285
285
|
return e === "granted" || e === "prompt";
|
|
286
286
|
}
|
|
287
287
|
return {
|
|
288
|
-
copyPending:
|
|
288
|
+
copyPending: I(f),
|
|
289
289
|
isSupported: l,
|
|
290
|
-
text:
|
|
291
|
-
copied:
|
|
290
|
+
text: I(u),
|
|
291
|
+
copied: I(d),
|
|
292
292
|
copy: y
|
|
293
293
|
};
|
|
294
294
|
}
|
|
@@ -441,7 +441,7 @@ function Xe(e, t, n = {}) {
|
|
|
441
441
|
}) : ye, p = () => {
|
|
442
442
|
u(), f(), d.value = !1;
|
|
443
443
|
};
|
|
444
|
-
return
|
|
444
|
+
return L(p), {
|
|
445
445
|
isSupported: c,
|
|
446
446
|
isActive: d,
|
|
447
447
|
pause() {
|
|
@@ -454,10 +454,10 @@ function Xe(e, t, n = {}) {
|
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
456
|
function Ze(e, t = {}) {
|
|
457
|
-
let { threshold: n = 50, onSwipe: r, onSwipeEnd: i, onSwipeStart: a, passive: o = !0 } = t, s =
|
|
457
|
+
let { threshold: n = 50, onSwipe: r, onSwipeEnd: i, onSwipeStart: a, passive: o = !0 } = t, s = ue({
|
|
458
458
|
x: 0,
|
|
459
459
|
y: 0
|
|
460
|
-
}), c =
|
|
460
|
+
}), c = ue({
|
|
461
461
|
x: 0,
|
|
462
462
|
y: 0
|
|
463
463
|
}), l = _(() => s.x - c.x), u = _(() => s.y - c.y), { max: d, abs: f } = Math, p = _(() => d(f(l.value), f(u.value)) >= n), m = g(!1), h = _(() => p.value ? f(l.value) > f(u.value) ? l.value > 0 ? "left" : "right" : u.value > 0 ? "up" : "down" : "none"), v = (e) => [e.touches[0].clientX, e.touches[0].clientY], y = (e, t) => {
|
|
@@ -494,8 +494,8 @@ function Ze(e, t = {}) {
|
|
|
494
494
|
}
|
|
495
495
|
function Qe(e = "history", t = {}) {
|
|
496
496
|
let { initialValue: n = {}, removeNullishValues: r = !0, removeFalsyValues: i = !1, write: a = !0, writeMode: o = "replace", window: s = Pe, stringify: c = (e) => e.toString() } = t;
|
|
497
|
-
if (!s) return
|
|
498
|
-
let u =
|
|
497
|
+
if (!s) return ue(n);
|
|
498
|
+
let u = ue({});
|
|
499
499
|
function d() {
|
|
500
500
|
if (e === "history") return s.location.search || "";
|
|
501
501
|
if (e === "hash") {
|
|
@@ -1485,14 +1485,14 @@ var W = /* @__PURE__ */ function(e) {
|
|
|
1485
1485
|
//#region src/assets/typescript/mixins.ts
|
|
1486
1486
|
function Lr(e) {
|
|
1487
1487
|
switch (e) {
|
|
1488
|
-
case W.PerUnit: return
|
|
1489
|
-
case W.PerPerson: return
|
|
1490
|
-
case W.PerAdult: return
|
|
1491
|
-
case W.PerChild: return
|
|
1492
|
-
case W.PerNight: return
|
|
1493
|
-
case W.PerPersonPerNight: return
|
|
1494
|
-
case W.PerAdultPerNight: return
|
|
1495
|
-
case W.PerChildPerNight: return
|
|
1488
|
+
case W.PerUnit: return F.t("general.perUnit");
|
|
1489
|
+
case W.PerPerson: return F.t("general.perPerson");
|
|
1490
|
+
case W.PerAdult: return F.t("general.perAdult");
|
|
1491
|
+
case W.PerChild: return F.t("general.perChild");
|
|
1492
|
+
case W.PerNight: return F.t("general.perNight");
|
|
1493
|
+
case W.PerPersonPerNight: return F.t("general.perPersonPerNight");
|
|
1494
|
+
case W.PerAdultPerNight: return F.t("general.perAdultPerNight");
|
|
1495
|
+
case W.PerChildPerNight: return F.t("general.perChildPerNight");
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
function Rr(e, t, n, r = 0, i = 0) {
|
|
@@ -1524,10 +1524,10 @@ function Br(e) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
function Vr(e) {
|
|
1526
1526
|
switch (e) {
|
|
1527
|
-
case 2: return
|
|
1528
|
-
case 3: return
|
|
1529
|
-
case 4: return
|
|
1530
|
-
case 5: return
|
|
1527
|
+
case 2: return F.t("booking.reservation.nameTitleMr");
|
|
1528
|
+
case 3: return F.t("booking.reservation.nameTitleMs");
|
|
1529
|
+
case 4: return F.t("booking.reservation.nameTitleMrs");
|
|
1530
|
+
case 5: return F.t("booking.reservation.nameTitleDr");
|
|
1531
1531
|
default: return "";
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
@@ -1718,7 +1718,7 @@ function $r(e) {
|
|
|
1718
1718
|
};
|
|
1719
1719
|
break;
|
|
1720
1720
|
}
|
|
1721
|
-
return t = r.map((e) => i[e]).join(", "), r.length === 1 ? t = `${i[r[0]]}` : r.length === 7 ? t =
|
|
1721
|
+
return t = r.map((e) => i[e]).join(", "), r.length === 1 ? t = `${i[r[0]]}` : r.length === 7 ? t = F.t("general.everyday") : Zr(n, r) ? t = F.t("general.weekends") : Xr(r) && r.length > 1 && (t = `${i[r[0]]} - ${i[r[r.length - 1]]}`), t;
|
|
1722
1722
|
}
|
|
1723
1723
|
function ei(e) {
|
|
1724
1724
|
let t = e, n = e.split(":");
|
|
@@ -3820,7 +3820,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3820
3820
|
let { display: e } = ws(), t = w(0), n = w(""), r = w(""), i = w(""), a = w(!1), o = w(!1);
|
|
3821
3821
|
async function s() {
|
|
3822
3822
|
n.value === "" ? e({
|
|
3823
|
-
message:
|
|
3823
|
+
message: F.t("alert.error.giftCardEmpty"),
|
|
3824
3824
|
type: "error"
|
|
3825
3825
|
}) : (o.value = !0, await J().get("/gift-card/validate", { params: {
|
|
3826
3826
|
giftcardCode: n.value,
|
|
@@ -3828,17 +3828,17 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3828
3828
|
} }).then((n) => {
|
|
3829
3829
|
let { valid: o, amount: s, expirationDate: c, productName: l } = n.data;
|
|
3830
3830
|
o ? (t.value = s, r.value = c, i.value = l, a.value = !0, e({
|
|
3831
|
-
message:
|
|
3831
|
+
message: F.t("alert.success.giftCardApplied"),
|
|
3832
3832
|
type: "success"
|
|
3833
3833
|
})) : (a.value = !1, e({
|
|
3834
|
-
message:
|
|
3834
|
+
message: F.t("alert.error.giftCardInvalid"),
|
|
3835
3835
|
type: "warning"
|
|
3836
3836
|
}));
|
|
3837
3837
|
}), o.value = !1);
|
|
3838
3838
|
}
|
|
3839
3839
|
function c() {
|
|
3840
3840
|
t.value = 0, n.value = "", a.value = !1, e({
|
|
3841
|
-
message:
|
|
3841
|
+
message: F.t("alert.success.giftCardRemoved"),
|
|
3842
3842
|
type: "success"
|
|
3843
3843
|
});
|
|
3844
3844
|
}
|
|
@@ -3853,7 +3853,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3853
3853
|
reset: c
|
|
3854
3854
|
};
|
|
3855
3855
|
}), nc = ne("payment", () => {
|
|
3856
|
-
let { display: e } = ws(), { paymentGatewayId: t } =
|
|
3856
|
+
let { display: e } = ws(), { paymentGatewayId: t } = le(oc()), n = w({}), r = w(), i = w(NaN), a = _(() => t.value !== Ar.None), o = _(() => n.value && n.value.guest ? n.value.guest.name : ""), s = _(() => n.value && n.value.guest ? n.value.guest.email : ""), c = _(() => n.value && n.value.guest ? n.value.guest.phone : ""), l = _(() => n.value.adults), u = _(() => n.value.children), d = _(() => n.value.totalPrice || 0), f = _(() => n.value.totalVAT || 0), p = _(() => n.value.offerDate), m = _(() => d.value - f.value), h = _(() => n.value.orderLines), g = _(() => h.value ? h.value.length > 0 : !1);
|
|
3857
3857
|
function v() {
|
|
3858
3858
|
J().put("/capture/confirm", { confirmationId: r.value });
|
|
3859
3859
|
let e = {
|
|
@@ -3886,19 +3886,19 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3886
3886
|
}
|
|
3887
3887
|
async function y({ callback: a, response: o }) {
|
|
3888
3888
|
if (!o.error) if (!o.offer) e({
|
|
3889
|
-
message:
|
|
3889
|
+
message: F.t("booking.other.errorMessage"),
|
|
3890
3890
|
type: "warning"
|
|
3891
3891
|
});
|
|
3892
3892
|
else if (n.value = o.offer, r.value = o.confirmationId, i.value = o.offer.id, o.easyPayment) if (a(), t.value === Ar.ReePay) {
|
|
3893
3893
|
let t = new Reepay.EmbeddedCheckout(o.easyPayment.paymentID, { html_element: "konnectio-payment-checkout" });
|
|
3894
3894
|
t.addEventHandler(Dr.Accept, () => {
|
|
3895
3895
|
v(), e({
|
|
3896
|
-
message:
|
|
3896
|
+
message: F.t("alert.success.payment"),
|
|
3897
3897
|
type: "success"
|
|
3898
3898
|
}), a();
|
|
3899
3899
|
}), t.addEventHandler(Dr.Error, () => {
|
|
3900
3900
|
e({
|
|
3901
|
-
message:
|
|
3901
|
+
message: F.t("alert.error.payment"),
|
|
3902
3902
|
type: "warning"
|
|
3903
3903
|
});
|
|
3904
3904
|
});
|
|
@@ -3911,7 +3911,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3911
3911
|
}, n = new Dibs.Checkout(t);
|
|
3912
3912
|
n.on("payment-completed", () => {
|
|
3913
3913
|
console.log("Konnectio: Payment completed!"), v(), e({
|
|
3914
|
-
message:
|
|
3914
|
+
message: F.t("alert.success.payment"),
|
|
3915
3915
|
type: "success"
|
|
3916
3916
|
}), a();
|
|
3917
3917
|
}), n.on("pay-initialized", () => {
|
|
@@ -3941,8 +3941,8 @@ var tc = ne("applyGiftCard", () => {
|
|
|
3941
3941
|
pay: y,
|
|
3942
3942
|
clearOfferId: b
|
|
3943
3943
|
};
|
|
3944
|
-
}), rc =
|
|
3945
|
-
let e = hc(), t = ac(), n = nc(), { voucher: r, amount: i } =
|
|
3944
|
+
}), rc = ce(), ic = ne("hotel", () => {
|
|
3945
|
+
let e = hc(), t = ac(), n = nc(), { voucher: r, amount: i } = le(tc()), { display: a } = ws(), { metaData: o } = le(oc()), s = oc(), c = w({}), l = _(() => {
|
|
3946
3946
|
let t = [];
|
|
3947
3947
|
for (let n in c.value) {
|
|
3948
3948
|
let r = parseInt(n), i = P.value.roomGroups.find((e) => e.id === r), a = {
|
|
@@ -4027,8 +4027,8 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4027
4027
|
}
|
|
4028
4028
|
let g = _(() => {
|
|
4029
4029
|
let t = [];
|
|
4030
|
-
for (let n in
|
|
4031
|
-
let r = parseInt(n), i =
|
|
4030
|
+
for (let n in oe.value) {
|
|
4031
|
+
let r = parseInt(n), i = oe.value[r];
|
|
4032
4032
|
if (i > 0) {
|
|
4033
4033
|
let { price: n, name: a, quantityStrategy: o } = rt.value.flatMap((e) => e.addons).find((e) => e.id === r);
|
|
4034
4034
|
t.push({
|
|
@@ -4059,7 +4059,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4059
4059
|
}
|
|
4060
4060
|
return r;
|
|
4061
4061
|
}
|
|
4062
|
-
let y = _(() =>
|
|
4062
|
+
let y = _(() => ce.value.length > 0 ? ce.value.reduce((e, t) => e + t.unitConfigs.reduce((e, n) => e + v(n.addons, t.roomGroupId).reduce((e, { totalPrice: t }) => e + t, 0), 0), 0) : g.value.reduce((e, { totalPrice: t }) => e + t, 0)), b = _(() => {
|
|
4063
4063
|
let e = 0, t = 0 - i.value;
|
|
4064
4064
|
if (Pe.value && rt.value.length > 0) {
|
|
4065
4065
|
let n = rt.value.flatMap((e) => h(e.id) || []);
|
|
@@ -4069,17 +4069,17 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4069
4069
|
e = l.value.flatMap(({ variants: e }) => e).flatMap(({ rooms: e }) => e).flatMap(({ roomAddons: e }) => e).reduce((e, { totalPrice: t }) => e + t, n);
|
|
4070
4070
|
}
|
|
4071
4071
|
return Je.value && Je.value?.providesDiscount && (e -= e * (Je.value.discountPercent / 100)), e;
|
|
4072
|
-
}), x = _(() => nt.value ? nt.value.weekendFee : 0), S = _(() => l.value.flatMap(({ variants: e }) => e).flatMap(({ rooms: e }) => e)), C = _(() => Pe.value ? it.value.length : S.value.length), T = _(() => Pe.value ? it.value.reduce((e, t) => e + t.adults, 0) : S.value.reduce((e, { adultsCount: t }) => e + t, 0)), E = _(() => Pe.value ? it.value.reduce((e, t) => e + t.children, 0) : S.value.reduce((e, { childrenCount: t }) => e + t, 0)), D = _(() => T.value > 0 ? T.value !== e.adults : !1), O = _(() => E.value > 0 ? E.value !== e.children : !1), k = w(e.arrivalDate), A = w(e.departureDate), j = w(e.adults), ee = w(e.children), M = w(e.location || NaN), N = _(() => k.value !== e.arrivalDate && A.value !== e.departureDate), te = _(() => M.value !== e.location), ne = _(() => N.value || te.value), P = w({}),
|
|
4072
|
+
}), x = _(() => nt.value ? nt.value.weekendFee : 0), S = _(() => l.value.flatMap(({ variants: e }) => e).flatMap(({ rooms: e }) => e)), C = _(() => Pe.value ? it.value.length : S.value.length), T = _(() => Pe.value ? it.value.reduce((e, t) => e + t.adults, 0) : S.value.reduce((e, { adultsCount: t }) => e + t, 0)), E = _(() => Pe.value ? it.value.reduce((e, t) => e + t.children, 0) : S.value.reduce((e, { childrenCount: t }) => e + t, 0)), D = _(() => T.value > 0 ? T.value !== e.adults : !1), O = _(() => E.value > 0 ? E.value !== e.children : !1), k = w(e.arrivalDate), A = w(e.departureDate), j = w(e.adults), ee = w(e.children), M = w(e.location || NaN), N = _(() => k.value !== e.arrivalDate && A.value !== e.departureDate), te = _(() => M.value !== e.location), ne = _(() => N.value || te.value), P = w({}), re = w(!0), ie = w(0), ae = w(NaN), oe = w({}), se = w(NaN), ce = w([]), ue = w(""), de = w(""), fe = w(""), I = w(""), pe = w(""), me = w(null), L = w(null), he = B("konnectio_name", "", void 0, { serializer: z.string }), ge = B("konnectio_nameTitle", 2, void 0, { serializer: z.number }), _e = B("konnectio_email", "", void 0, { serializer: z.string }), ve = B("konnectio_phone", "", void 0, { serializer: z.string }), ye = B("konnectio_company", "", void 0, { serializer: z.string }), be = B("konnectio_postal", "", void 0, { serializer: z.string }), xe = B("konnectio_city", "", void 0, { serializer: z.string }), Se = B("konnectio_country", 57, void 0, { serializer: z.number }), Ce = B("konnectio_address", "", void 0, { serializer: z.string }), we = B("konnectio_sortingKeys", { pricesFrom: !1 }, void 0, { serializer: z.object }), Te = w(""), Ee = w(""), De = w(!1), Oe = w(!1), ke = w(!1), Ae = w(null), je = w(void 0), Me = w(), Ne = w(), Pe = _(() => !isNaN(ae.value)), Fe = _(() => s.metaData.hotels.findIndex((t) => t.id === e.location) || 0), R = _(() => s.metaData.hotels[Fe.value]), Ie = _(() => s.metaData.hotels && s.metaData.hotels.length > 1), Le = _(() => s.metaData.hotels ? s.metaData.hotels.flatMap((e) => ({
|
|
4073
4073
|
id: e.id,
|
|
4074
4074
|
name: e.name
|
|
4075
|
-
})) : []), Re = _(() => !!
|
|
4075
|
+
})) : []), Re = _(() => !!me.value), ze = _(() => !!L.value), Be = _(() => R.value.termsOfService ? R.value.termsOfService : ""), Ve = _(() => R.value.hotelMapImage ? R.value.hotelMapImage : null), He = _(() => R.value.useDiscountCard ? R.value.useDiscountCard : !1), Ue = _(() => Be.value !== ""), We = _(() => R.value.country ? R.value.country.name : ""), Ge = _(() => s.metaData.countries ? s.metaData.countries : []), Ke = _(() => s.metaData.cardTypes ? s.metaData.cardTypes : []), qe = _(() => Ke.value.map((e) => ({
|
|
4076
4076
|
value: e.name,
|
|
4077
4077
|
label: e.shortDescription
|
|
4078
|
-
}))), Je = _(() => Ke.value.find((e) => e.name === je.value?.cardType)), Ye = _(() => R.value.name ? R.value.name : ""), Xe = _(() => s.metaData && Object.keys(s.metaData).length !== 0), Ze = _(() => Object.keys(P.value).length !== 0), Qe = _(() => !(!he.value[1] || !_e.value || !(ve.value.length >= 5) || !be.value || !xe.value || !Ce.value)), $e = _(() =>
|
|
4079
|
-
if (tt.value.length > 0) return tt.value.find((e) => e.id ===
|
|
4080
|
-
}), rt = _(() => !nt.value || !
|
|
4078
|
+
}))), Je = _(() => Ke.value.find((e) => e.name === je.value?.cardType)), Ye = _(() => R.value.name ? R.value.name : ""), Xe = _(() => s.metaData && Object.keys(s.metaData).length !== 0), Ze = _(() => Object.keys(P.value).length !== 0), Qe = _(() => !(!he.value[1] || !_e.value || !(ve.value.length >= 5) || !be.value || !xe.value || !Ce.value)), $e = _(() => ie.value === 1 && re.value), et = _(() => ie.value === 3 && re.value), tt = _(() => Ze.value ? P.value.templates.concat(P.value.specialTemplates) : []), nt = _(() => {
|
|
4079
|
+
if (tt.value.length > 0) return tt.value.find((e) => e.id === ae.value);
|
|
4080
|
+
}), rt = _(() => !nt.value || !ce.value ? [] : ce.value.map((e) => nt.value.templateRoomGroups.find((t) => t.id === e.roomGroupId)).filter((e) => e !== void 0)), it = _(() => {
|
|
4081
4081
|
let e = [];
|
|
4082
|
-
return
|
|
4082
|
+
return ce.value.forEach((t, n) => {
|
|
4083
4083
|
t.unitConfigs.forEach((r, i) => {
|
|
4084
4084
|
e.push({
|
|
4085
4085
|
roomGroupId: t.roomGroupId,
|
|
@@ -4090,7 +4090,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4090
4090
|
});
|
|
4091
4091
|
});
|
|
4092
4092
|
}), e;
|
|
4093
|
-
}), at = _(() => U.value ? U.value.offer.offerTemplates[0].totalPrice : rt.value.length === 0 ? 0 :
|
|
4093
|
+
}), at = _(() => U.value ? U.value.offer.offerTemplates[0].totalPrice : rt.value.length === 0 ? 0 : ce.value.reduce((e, t) => e + (rt.value.find((e) => e.id === t.roomGroupId)?.extraPrice ?? 0) * t.unitConfigs.length, 0));
|
|
4094
4094
|
function ot(e, t) {
|
|
4095
4095
|
let n = [];
|
|
4096
4096
|
e && (n = e.filter((e) => !((e.quantityStrategy === W.PerChild || e.quantityStrategy === W.PerChildPerNight) && t == 0)));
|
|
@@ -4104,23 +4104,23 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4104
4104
|
return `[REMARKS]: ${Te.value} \r\n [ALLERGIES]: ${Ee.value} \r\n [REQUESTED ARRIVAL]: ${e} \r\n [REQUESTED DEPARTURE]: ${t}`;
|
|
4105
4105
|
}
|
|
4106
4106
|
function lt(e, t, n, r) {
|
|
4107
|
-
let i = (t ? n : r ?
|
|
4107
|
+
let i = (t ? n : r ? de.value : fe.value).split(":");
|
|
4108
4108
|
return Wr(new Date(e).setUTCHours(parseInt(i[0]), parseInt(i[1]), 0, 0));
|
|
4109
4109
|
}
|
|
4110
4110
|
function ut(t) {
|
|
4111
4111
|
return Gr(e.arrivalDate, e.departureDate) * t;
|
|
4112
4112
|
}
|
|
4113
4113
|
async function dt() {
|
|
4114
|
-
|
|
4114
|
+
re.value = !0;
|
|
4115
4115
|
try {
|
|
4116
4116
|
o.value = (await J().get("/hotel/metadata", { params: { language: Kr() } })).data;
|
|
4117
4117
|
} catch {
|
|
4118
4118
|
a({
|
|
4119
|
-
message:
|
|
4119
|
+
message: F.t("alert.error.couldntFetchMetadata"),
|
|
4120
4120
|
type: "warning"
|
|
4121
4121
|
});
|
|
4122
4122
|
}
|
|
4123
|
-
|
|
4123
|
+
re.value = !1;
|
|
4124
4124
|
}
|
|
4125
4125
|
let ft = w(), pt = _(() => ft.value?.name);
|
|
4126
4126
|
async function mt(t) {
|
|
@@ -4128,7 +4128,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4128
4128
|
let n = await J().post("/hotel/check-guest-discount", { guestDiscountId: t });
|
|
4129
4129
|
if (n.data.isValid) {
|
|
4130
4130
|
a({
|
|
4131
|
-
message:
|
|
4131
|
+
message: F.t("alert.success.guestDiscountCodeApplied"),
|
|
4132
4132
|
type: "success"
|
|
4133
4133
|
});
|
|
4134
4134
|
let t = n.data.guestDiscount;
|
|
@@ -4137,18 +4137,18 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4137
4137
|
return r > i ? (e.updateDates(new Date(t.periods[0].fromDate)), !0) : (e.updateDates(i), !0);
|
|
4138
4138
|
}
|
|
4139
4139
|
return a({
|
|
4140
|
-
message:
|
|
4140
|
+
message: F.t("alert.error.guestDiscountCodeInvalid"),
|
|
4141
4141
|
type: "error"
|
|
4142
4142
|
}), !1;
|
|
4143
4143
|
} catch {
|
|
4144
4144
|
return a({
|
|
4145
|
-
message:
|
|
4145
|
+
message: F.t("booking.other.errorMessage"),
|
|
4146
4146
|
type: "error"
|
|
4147
4147
|
}), !1;
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
4150
|
async function V() {
|
|
4151
|
-
|
|
4151
|
+
ie.value = 1, re.value = !0;
|
|
4152
4152
|
let n = e.location;
|
|
4153
4153
|
isNaN(n) && (n = null);
|
|
4154
4154
|
try {
|
|
@@ -4159,29 +4159,29 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4159
4159
|
childrenCount: e.children,
|
|
4160
4160
|
roomCount: e.roomCount,
|
|
4161
4161
|
roomGroupIds: s.hasActiveIdFilter ? s.activeIdFilter : null,
|
|
4162
|
-
guestDiscountId:
|
|
4163
|
-
guestDiscountCode:
|
|
4162
|
+
guestDiscountId: me.value,
|
|
4163
|
+
guestDiscountCode: L.value,
|
|
4164
4164
|
language: Kr(),
|
|
4165
4165
|
hotelId: n
|
|
4166
4166
|
} });
|
|
4167
|
-
r.status === 200 ? (P.value = r.data, j.value = e.adults, ee.value = e.children, k.value = e.arrivalDate, A.value = e.departureDate, M.value = e.location,
|
|
4168
|
-
message: `${
|
|
4167
|
+
r.status === 200 ? (P.value = r.data, j.value = e.adults, ee.value = e.children, k.value = e.arrivalDate, A.value = e.departureDate, M.value = e.location, de.value = s.defaultArrivalTime(M.value), fe.value = s.defaultDepartureTime(M.value), rc.emit("scrollToTop"), t.viewItemList()) : a({
|
|
4168
|
+
message: `${F.t("booking.other.errorMessage")} (HTTP: ${r.status})`,
|
|
4169
4169
|
type: "warning"
|
|
4170
4170
|
});
|
|
4171
4171
|
} catch {
|
|
4172
4172
|
a({
|
|
4173
|
-
message:
|
|
4173
|
+
message: F.t("alert.error.couldntFetchListings"),
|
|
4174
4174
|
type: "warning"
|
|
4175
4175
|
});
|
|
4176
4176
|
}
|
|
4177
|
-
|
|
4177
|
+
re.value = !1;
|
|
4178
4178
|
}
|
|
4179
4179
|
async function H() {
|
|
4180
4180
|
await Promise.all([dt(), e.fetchMetadata()]);
|
|
4181
4181
|
}
|
|
4182
4182
|
function ht(e = !1) {
|
|
4183
4183
|
let t = [];
|
|
4184
|
-
isNaN(
|
|
4184
|
+
isNaN(ae.value) ? l.value.forEach(({ variants: e, roomGroupID: n }) => {
|
|
4185
4185
|
let r = h(n);
|
|
4186
4186
|
e?.forEach(({ rooms: e, ratePlanID: i }) => {
|
|
4187
4187
|
e?.forEach(({ adultsCount: e, childrenCount: a, roomAddons: o, roomId: s }) => {
|
|
@@ -4200,10 +4200,10 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4200
4200
|
});
|
|
4201
4201
|
});
|
|
4202
4202
|
});
|
|
4203
|
-
}) :
|
|
4204
|
-
let n =
|
|
4203
|
+
}) : ce.value.length > 0 ? it.value.forEach((e) => {
|
|
4204
|
+
let n = ce.value[e.selectionIdx].unitConfigs[e.configIdx], r = v(n.addons, e.roomGroupId);
|
|
4205
4205
|
t.push({
|
|
4206
|
-
templateID:
|
|
4206
|
+
templateID: ae.value,
|
|
4207
4207
|
roomGroupID: e.roomGroupId,
|
|
4208
4208
|
ratePlanID: null,
|
|
4209
4209
|
adultsCount: e.adults,
|
|
@@ -4219,12 +4219,12 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4219
4219
|
}
|
|
4220
4220
|
});
|
|
4221
4221
|
}) : t.push({
|
|
4222
|
-
templateID:
|
|
4223
|
-
roomGroupID:
|
|
4222
|
+
templateID: ae.value,
|
|
4223
|
+
roomGroupID: se.value,
|
|
4224
4224
|
ratePlanID: null,
|
|
4225
4225
|
adultsCount: j.value,
|
|
4226
4226
|
childrenCount: ee.value,
|
|
4227
|
-
roomAddons: g.value.concat(h(
|
|
4227
|
+
roomAddons: g.value.concat(h(se.value) || []),
|
|
4228
4228
|
guest: {
|
|
4229
4229
|
title: Vr(ge.value),
|
|
4230
4230
|
guestID: 0,
|
|
@@ -4242,7 +4242,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4242
4242
|
toDate: ti(A.value),
|
|
4243
4243
|
hotelId: n,
|
|
4244
4244
|
guest: {
|
|
4245
|
-
travellingFor:
|
|
4245
|
+
travellingFor: ue.value,
|
|
4246
4246
|
title: Vr(ge.value),
|
|
4247
4247
|
guestID: 0,
|
|
4248
4248
|
name: he.value,
|
|
@@ -4256,7 +4256,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4256
4256
|
newsmails: De.value
|
|
4257
4257
|
},
|
|
4258
4258
|
giftCardCode: r.value,
|
|
4259
|
-
discountCode: e ?
|
|
4259
|
+
discountCode: e ? pe.value : I.value,
|
|
4260
4260
|
selectedRooms: t,
|
|
4261
4261
|
remark: ct(lt(k.value, !s.hasUserArrivalSelection(M.value), s.defaultArrivalTime(M.value), !0), lt(A.value, !s.hasUserDepartureSelection(M.value), s.defaultDepartureTime(M.value), !1)),
|
|
4262
4262
|
checkoutUrl: window.location.origin,
|
|
@@ -4267,32 +4267,36 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4267
4267
|
}
|
|
4268
4268
|
let U = w(), gt = w(!1);
|
|
4269
4269
|
async function _t() {
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4270
|
+
if (I.value !== "") {
|
|
4271
|
+
gt.value = !0;
|
|
4272
|
+
let e = I.value;
|
|
4273
|
+
J().post("/hotel/validate-discount-code", ht()).then((t) => {
|
|
4274
|
+
gt.value = !1;
|
|
4275
|
+
let n = t.data;
|
|
4276
|
+
n.discountApplyed === !0 ? (U.value = n, pe.value = e, L.value = e, I.value = "", a({
|
|
4277
|
+
message: F.t("alert.success.discountCodeApplied"),
|
|
4278
|
+
type: "success"
|
|
4279
|
+
})) : (L.value === e && (L.value = null), n.error == "CodeNotApplicable" ? a({
|
|
4280
|
+
message: F.t("alert.error.discountCodeNotApplicable"),
|
|
4281
|
+
type: "error"
|
|
4282
|
+
}) : a({
|
|
4283
|
+
message: F.t("alert.error.discountCodeInvalid"),
|
|
4284
|
+
type: "error"
|
|
4285
|
+
}));
|
|
4286
|
+
}).catch(() => {
|
|
4287
|
+
gt.value = !1, L.value === e && (L.value = null), a({
|
|
4288
|
+
message: `${F.t("alert.error.discountCodeValidation")}`,
|
|
4289
|
+
type: "warning"
|
|
4290
|
+
});
|
|
4290
4291
|
});
|
|
4291
|
-
}
|
|
4292
|
+
} else a({
|
|
4293
|
+
message: F.t("alert.error.discountCodeEmpty"),
|
|
4294
|
+
type: "error"
|
|
4295
|
+
});
|
|
4292
4296
|
}
|
|
4293
4297
|
let vt = _(() => U.value?.offer.properties);
|
|
4294
4298
|
function yt() {
|
|
4295
|
-
U.value = void 0,
|
|
4299
|
+
U.value = void 0, I.value = "", pe.value = "", L.value = null;
|
|
4296
4300
|
}
|
|
4297
4301
|
async function bt() {
|
|
4298
4302
|
if (Ae.value && Me.value) {
|
|
@@ -4304,47 +4308,47 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4304
4308
|
};
|
|
4305
4309
|
J().post("/hotel/validate-card-number", e).then((t) => {
|
|
4306
4310
|
t.status === 200 && (t.data.success === !0 ? (je.value = e, a({
|
|
4307
|
-
message:
|
|
4311
|
+
message: F.t("alert.success.memberCardValid"),
|
|
4308
4312
|
type: "success"
|
|
4309
4313
|
})) : a({
|
|
4310
|
-
message:
|
|
4314
|
+
message: F.t("alert.error.memberCardInvalid"),
|
|
4311
4315
|
type: "error"
|
|
4312
4316
|
}));
|
|
4313
4317
|
});
|
|
4314
4318
|
} else a({
|
|
4315
|
-
message:
|
|
4319
|
+
message: F.t("alert.error.memberCardEmpty"),
|
|
4316
4320
|
type: "error"
|
|
4317
4321
|
});
|
|
4318
4322
|
}
|
|
4319
4323
|
async function xt(e, t) {
|
|
4320
4324
|
if (ke.value === !1 && Ue.value) {
|
|
4321
4325
|
a({
|
|
4322
|
-
message:
|
|
4326
|
+
message: F.t("alert.error.acceptTerms", { terms: F.t("general.termsAndConditions") }),
|
|
4323
4327
|
type: "error"
|
|
4324
4328
|
});
|
|
4325
4329
|
return;
|
|
4326
4330
|
}
|
|
4327
|
-
|
|
4328
|
-
Oe.value = !1,
|
|
4331
|
+
ie.value = 3, re.value = !0, await J().post("/hotel/create-reservation", ht(!0)).then((t) => {
|
|
4332
|
+
Oe.value = !1, re.value = !1;
|
|
4329
4333
|
try {
|
|
4330
4334
|
n.pay({
|
|
4331
4335
|
callback: e,
|
|
4332
4336
|
response: t.data
|
|
4333
4337
|
});
|
|
4334
4338
|
} catch {
|
|
4335
|
-
|
|
4336
|
-
message:
|
|
4339
|
+
ie.value = 2, a({
|
|
4340
|
+
message: F.t("booking.other.errorMessage"),
|
|
4337
4341
|
type: "warning"
|
|
4338
4342
|
});
|
|
4339
4343
|
}
|
|
4340
4344
|
}).catch((e) => {
|
|
4341
|
-
|
|
4345
|
+
re.value = !1;
|
|
4342
4346
|
let { status: n } = e.response;
|
|
4343
|
-
n === 503 ? (
|
|
4344
|
-
message:
|
|
4347
|
+
n === 503 ? (ie.value = 1, a({
|
|
4348
|
+
message: F.t("alert.error.noRoomAvailable"),
|
|
4345
4349
|
type: "warning"
|
|
4346
|
-
}), t(), Ot()) : (
|
|
4347
|
-
message:
|
|
4350
|
+
}), t(), Ot()) : (ie.value = 2, a({
|
|
4351
|
+
message: F.t("booking.other.errorMessage"),
|
|
4348
4352
|
type: "warning"
|
|
4349
4353
|
}));
|
|
4350
4354
|
});
|
|
@@ -4357,19 +4361,19 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4357
4361
|
});
|
|
4358
4362
|
}
|
|
4359
4363
|
function Ct(e) {
|
|
4360
|
-
|
|
4364
|
+
me.value = e;
|
|
4361
4365
|
}
|
|
4362
4366
|
function wt(e) {
|
|
4363
|
-
|
|
4367
|
+
L.value = e;
|
|
4364
4368
|
}
|
|
4365
4369
|
function Tt() {
|
|
4366
|
-
|
|
4370
|
+
me.value = null;
|
|
4367
4371
|
}
|
|
4368
4372
|
function Et() {
|
|
4369
|
-
|
|
4373
|
+
L.value = null;
|
|
4370
4374
|
}
|
|
4371
4375
|
function Dt() {
|
|
4372
|
-
|
|
4376
|
+
ae.value = NaN, se.value = NaN, oe.value = {}, ce.value = [];
|
|
4373
4377
|
}
|
|
4374
4378
|
function Ot() {
|
|
4375
4379
|
u(), yt(), Dt();
|
|
@@ -4397,13 +4401,13 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4397
4401
|
currentLocation: M,
|
|
4398
4402
|
isValidatingDiscountCode: gt,
|
|
4399
4403
|
discountVouchers: vt,
|
|
4400
|
-
discountCode:
|
|
4404
|
+
discountCode: I,
|
|
4401
4405
|
datesMismatch: N,
|
|
4402
|
-
appliedDiscountCode:
|
|
4406
|
+
appliedDiscountCode: pe,
|
|
4403
4407
|
hasGuestDiscountId: Re,
|
|
4404
4408
|
hasGuestDiscountCode: ze,
|
|
4405
|
-
guestDiscountId:
|
|
4406
|
-
guestDiscountCode:
|
|
4409
|
+
guestDiscountId: me,
|
|
4410
|
+
guestDiscountCode: L,
|
|
4407
4411
|
hasMemberCards: He,
|
|
4408
4412
|
getMandatoryRoomGroupAddons: h,
|
|
4409
4413
|
resetDiscountVoucher: yt,
|
|
@@ -4427,16 +4431,16 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4427
4431
|
termsOfService: Be,
|
|
4428
4432
|
metaData: o,
|
|
4429
4433
|
availabilityData: P,
|
|
4430
|
-
isLoading:
|
|
4431
|
-
moduleState:
|
|
4432
|
-
templateAddons:
|
|
4433
|
-
templateID:
|
|
4434
|
-
roomGroupID:
|
|
4435
|
-
templateRoomSelections:
|
|
4434
|
+
isLoading: re,
|
|
4435
|
+
moduleState: ie,
|
|
4436
|
+
templateAddons: oe,
|
|
4437
|
+
templateID: ae,
|
|
4438
|
+
roomGroupID: se,
|
|
4439
|
+
templateRoomSelections: ce,
|
|
4436
4440
|
templateRoomUnits: it,
|
|
4437
|
-
travelingFor:
|
|
4438
|
-
arrivalTime:
|
|
4439
|
-
departureTime:
|
|
4441
|
+
travelingFor: ue,
|
|
4442
|
+
arrivalTime: de,
|
|
4443
|
+
departureTime: fe,
|
|
4440
4444
|
name: he,
|
|
4441
4445
|
nameTitle: ge,
|
|
4442
4446
|
email: _e,
|
|
@@ -4601,7 +4605,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4601
4605
|
viewItemList: s
|
|
4602
4606
|
};
|
|
4603
4607
|
}), oc = ne("utilities", () => {
|
|
4604
|
-
let e = hc(), t = ac(), { display: n } = ws(), r = B("k_utils_settings", {}, void 0, { serializer: z.object }), i = w([]), a = w({}), o = _(() => (e) => i.value[e] ? !i.value[e].disableChildSelection : !0), s = _(() => (e) => i.value[e] ? !i.value[e].hideArrivalDepartureInputs : !1), c = _(() => (e) => i.value[e] ? !i.value[e].disableArrivalUserSelection : !1), l = _(() => (e) => i.value[e] ? !i.value[e].disableDepartureUserSelection : !1), u = _(() => (e) => i.value[e] ? i.value[e].enableRoomAmountSearch : !1), d = _(() => (e) => i.value[e].arrivalEarliest), f = _(() => (e) => i.value[e].arrivalDefault), p = _(() => (e) => i.value[e].arrivalLatest), m = _(() => (e) => i.value[e].departureEarliest), h = _(() => (e) => i.value[e].departureDefault), g = _(() => (e) => i.value[e].departureLatest), v = _(() => r.value.maximumNightsAvailable), y = _(() => r.value.enableTracking), b = _(() => r.value.googleApiKey), x = _(() => r.value.recaptchaSiteKey), S = _(() => r.value.defaultAdultAmount), C = _(() => r.value.defaultChildAmount), T = _(() => r.value.maxAdultAmount), E = _(() => r.value.maxChildAmount), D = _(() => r.value.firstSelectableDateOffset), O = _(() => r.value.lastSelectableDateOffset), k = _(() => r.value.hideTitle), A = _(() => r.value.headerHeight), j = _(() => r.value.enableStickyHeader), M = _(() => r.value.disableNamePrefix), N = _(() => r.value.disableGiftCardVoucher), te = _(() => r.value.disableDiscountVoucher), ne = _(() => r.value.disablePricesFrom), P = _(() => r.value.hideAvailableRoomAmount),
|
|
4608
|
+
let e = hc(), t = ac(), { display: n } = ws(), r = B("k_utils_settings", {}, void 0, { serializer: z.object }), i = w([]), a = w({}), o = _(() => (e) => i.value[e] ? !i.value[e].disableChildSelection : !0), s = _(() => (e) => i.value[e] ? !i.value[e].hideArrivalDepartureInputs : !1), c = _(() => (e) => i.value[e] ? !i.value[e].disableArrivalUserSelection : !1), l = _(() => (e) => i.value[e] ? !i.value[e].disableDepartureUserSelection : !1), u = _(() => (e) => i.value[e] ? i.value[e].enableRoomAmountSearch : !1), d = _(() => (e) => i.value[e].arrivalEarliest), f = _(() => (e) => i.value[e].arrivalDefault), p = _(() => (e) => i.value[e].arrivalLatest), m = _(() => (e) => i.value[e].departureEarliest), h = _(() => (e) => i.value[e].departureDefault), g = _(() => (e) => i.value[e].departureLatest), v = _(() => r.value.maximumNightsAvailable), y = _(() => r.value.enableTracking), b = _(() => r.value.googleApiKey), x = _(() => r.value.recaptchaSiteKey), S = _(() => r.value.defaultAdultAmount), C = _(() => r.value.defaultChildAmount), T = _(() => r.value.maxAdultAmount), E = _(() => r.value.maxChildAmount), D = _(() => r.value.firstSelectableDateOffset), O = _(() => r.value.lastSelectableDateOffset), k = _(() => r.value.hideTitle), A = _(() => r.value.headerHeight), j = _(() => r.value.enableStickyHeader), M = _(() => r.value.disableNamePrefix), N = _(() => r.value.disableGiftCardVoucher), te = _(() => r.value.disableDiscountVoucher), ne = _(() => r.value.disablePricesFrom), P = _(() => r.value.hideAvailableRoomAmount), re = _(() => r.value.disableNewsletterSignup), ie = _(() => r.value.disableTravelingFor), ae = _(() => r.value.disableTravelingForBleasure), oe = _(() => r.value.disableCompanyField), se = _(() => r.value.hideEventLength), ce = _(() => r.value.hideEventEndTime), le = _(() => r.value.hideAvailabilityNotice), ue = _(() => r.value.autoSelectRateId), de = _(() => r.value.splitBookingCalendar), fe = _(() => r.value.hideEventGuestAmount), I = _(() => r.value.hideOptionalLabel), pe = _(() => r.value.enableMultipleConfigurations), me = _(() => r.value.selectGiftCardAsDefault), L = w(null), he = w(""), ge = w(!1), _e = _(() => `Bearer ${he.value}`), ve = _(() => !!a.value && !!a.value.hotels), ye = _(() => ve.value ? a.value.hotels[0].currency.currencyCode : ""), be = _(() => ve.value ? a.value.hotels[0].currency.id : NaN), xe = _(() => ve.value ? a.value.hotels[0].name : ""), Se = _(() => ve.value && a.value.hotels[0].paymentGatewayId || Ar.None), Ce = _(() => !!x.value), we = _(() => !!L.value), Te = _(() => {
|
|
4605
4609
|
let e = !0;
|
|
4606
4610
|
return (Se.value === Ar.None || Se.value === Ar.AskForCreditCard) && (e = !1), e;
|
|
4607
4611
|
}), Ee = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + D.value)).setHours(12, 0, 0, 0)), De = () => new Date(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + D.value + 1)).setHours(12, 0, 0, 0));
|
|
@@ -4616,7 +4620,7 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4616
4620
|
}
|
|
4617
4621
|
} catch {
|
|
4618
4622
|
n({
|
|
4619
|
-
message:
|
|
4623
|
+
message: F.t("alert.error.couldntFetchMetadata"),
|
|
4620
4624
|
type: "warning"
|
|
4621
4625
|
});
|
|
4622
4626
|
}
|
|
@@ -4628,14 +4632,14 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4628
4632
|
});
|
|
4629
4633
|
}
|
|
4630
4634
|
function je(e) {
|
|
4631
|
-
|
|
4635
|
+
L.value = e;
|
|
4632
4636
|
}
|
|
4633
4637
|
function Me() {
|
|
4634
|
-
|
|
4638
|
+
L.value = null;
|
|
4635
4639
|
}
|
|
4636
4640
|
return {
|
|
4637
|
-
activeIdFilter:
|
|
4638
|
-
autoSelectRateId:
|
|
4641
|
+
activeIdFilter: L,
|
|
4642
|
+
autoSelectRateId: ue,
|
|
4639
4643
|
bearerToken: _e,
|
|
4640
4644
|
currency: ye,
|
|
4641
4645
|
currencyId: be,
|
|
@@ -4643,17 +4647,17 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4643
4647
|
defaultArrivalTime: f,
|
|
4644
4648
|
defaultChildAmount: C,
|
|
4645
4649
|
defaultDepartureTime: h,
|
|
4646
|
-
disableCompanyField:
|
|
4650
|
+
disableCompanyField: oe,
|
|
4647
4651
|
disableDiscountVoucher: te,
|
|
4648
4652
|
disableGiftCardVoucher: N,
|
|
4649
4653
|
disableNamePrefix: M,
|
|
4650
|
-
disableNewsletterSignup:
|
|
4654
|
+
disableNewsletterSignup: re,
|
|
4651
4655
|
disablePricesFrom: ne,
|
|
4652
|
-
disableTravelingFor:
|
|
4653
|
-
disableTravelingForBleasure:
|
|
4656
|
+
disableTravelingFor: ie,
|
|
4657
|
+
disableTravelingForBleasure: ae,
|
|
4654
4658
|
earliestArrivalTime: d,
|
|
4655
4659
|
earliestDepartureTime: m,
|
|
4656
|
-
enableMultipleConfigurations:
|
|
4660
|
+
enableMultipleConfigurations: pe,
|
|
4657
4661
|
enableStickyHeader: j,
|
|
4658
4662
|
enableTracking: y,
|
|
4659
4663
|
firstSelectableDateOffset: D,
|
|
@@ -4668,12 +4672,12 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4668
4672
|
hasUserArrivalSelection: c,
|
|
4669
4673
|
hasUserDepartureSelection: l,
|
|
4670
4674
|
headerHeight: A,
|
|
4671
|
-
hideAvailabilityNotice:
|
|
4675
|
+
hideAvailabilityNotice: le,
|
|
4672
4676
|
hideAvailableRoomAmount: P,
|
|
4673
|
-
hideEventEndTime:
|
|
4674
|
-
hideEventGuestAmount:
|
|
4675
|
-
hideEventLength:
|
|
4676
|
-
hideOptionalLabel:
|
|
4677
|
+
hideEventEndTime: ce,
|
|
4678
|
+
hideEventGuestAmount: fe,
|
|
4679
|
+
hideEventLength: se,
|
|
4680
|
+
hideOptionalLabel: I,
|
|
4677
4681
|
hideTitle: k,
|
|
4678
4682
|
hotelSettings: i,
|
|
4679
4683
|
isRecaptchaEnabled: Ce,
|
|
@@ -4687,9 +4691,9 @@ var tc = ne("applyGiftCard", () => {
|
|
|
4687
4691
|
name: xe,
|
|
4688
4692
|
paymentGatewayId: Se,
|
|
4689
4693
|
recaptchaSiteKey: x,
|
|
4690
|
-
selectGiftCardAsDefault:
|
|
4694
|
+
selectGiftCardAsDefault: me,
|
|
4691
4695
|
settings: r,
|
|
4692
|
-
splitBookingCalendar:
|
|
4696
|
+
splitBookingCalendar: de,
|
|
4693
4697
|
clearActiveIdFilter: Me,
|
|
4694
4698
|
defaultArrivalDate: Ee,
|
|
4695
4699
|
defaultDepartureDate: De,
|
|
@@ -4709,7 +4713,7 @@ function J() {
|
|
|
4709
4713
|
headers: {
|
|
4710
4714
|
Accept: "application/json",
|
|
4711
4715
|
Authorization: sc.value,
|
|
4712
|
-
"Konnectio-Version": "4.5.
|
|
4716
|
+
"Konnectio-Version": "4.5.4",
|
|
4713
4717
|
"Konnectio-Ref": cc.ref
|
|
4714
4718
|
}
|
|
4715
4719
|
});
|
|
@@ -4717,11 +4721,11 @@ function J() {
|
|
|
4717
4721
|
//#endregion
|
|
4718
4722
|
//#region src/store/event.ts
|
|
4719
4723
|
var uc = ne("event", () => {
|
|
4720
|
-
let e = nc(), { voucher: t } =
|
|
4724
|
+
let e = nc(), { voucher: t } = le(tc()), { display: n } = ws(), { metaData: r } = le(oc()), i = oc(), a = hc(), o = w({}), s = _(() => Object.keys(o.value).length > 0), c = w(void 0), l = w(!0), u = w(Fr.InitialState), d = w(NaN), f = w(1), p = w(NaN), m = w(NaN), h = w(""), g = B("konnectio_name", "", void 0, { serializer: z.string }), v = B("konnectio_phone", "", void 0, { serializer: z.string }), y = B("konnectio_email", "", void 0, { serializer: z.string }), b = w(""), x = w(""), S = w(!1), C = w(0), T = w({}), E = w({}), D = w(""), O = w(""), k = w("");
|
|
4721
4725
|
function A(e) {
|
|
4722
4726
|
return e ? e.templateId !== void 0 : !1;
|
|
4723
4727
|
}
|
|
4724
|
-
let j = _(() => i.metaData.hotels.findIndex((e) => e.id === a.eventLocation) || 0), ee = _(() => i.metaData.hotels[j.value]), M = _(() => ee.value ? ee.value.maxNumberPerBooking : Infinity), N = _(() => ee.value.name ? ee.value.name : ""), te = _(() => ee.value.subtitle ? ee.value.subtitle : ""), ne = _(() => ee.value.timezone ? ee.value.timezone : ""), P = w(a.eventDate ?? /* @__PURE__ */ new Date()),
|
|
4728
|
+
let j = _(() => i.metaData.hotels.findIndex((e) => e.id === a.eventLocation) || 0), ee = _(() => i.metaData.hotels[j.value]), M = _(() => ee.value ? ee.value.maxNumberPerBooking : Infinity), N = _(() => ee.value.name ? ee.value.name : ""), te = _(() => ee.value.subtitle ? ee.value.subtitle : ""), ne = _(() => ee.value.timezone ? ee.value.timezone : ""), P = w(a.eventDate ?? /* @__PURE__ */ new Date()), re = w(a.eventLocation), ie = _(() => P.value !== a.eventDate), ae = _(() => re.value !== a.eventLocation), oe = _(() => ie.value || ae.value), se = _(() => (a.eventDate ?? /* @__PURE__ */ new Date()).toISOString()), ce = _(() => A(c.value)), ue = _(() => A(c.value) ? c.value.numberOfDays : f.value), de = _(() => A(c.value) ? c.value.packageCount : 0), fe = _(() => A(c.value) ? c.value.fromDate : ""), I = _(() => o.value.events === void 0 ? void 0 : o.value.events.flatMap((e) => e.events).find((e) => e.id === p.value)), pe = _(() => I.value ? I.value.length : void 0), me = _(() => A(c.value) ? c.value.templateId : 0), L = _(() => o.value.events.map((e) => ({
|
|
4725
4729
|
...e,
|
|
4726
4730
|
events: e.events?.filter((e) => e.isAvailable === !0 || e.isAvailable === !1 && ti(e.fromDate) === ti(P.value))
|
|
4727
4731
|
})).filter((e) => e.events && e.events.length > 0)), he = _(() => o.value.events.map((e) => ({
|
|
@@ -4729,9 +4733,9 @@ var uc = ne("event", () => {
|
|
|
4729
4733
|
events: e.events?.filter((e) => e.isAvailable === !1 && ti(e.fromDate) !== ti(P.value)).sort((e, t) => e.fromDate > t.fromDate ? 1 : -1)
|
|
4730
4734
|
})).filter((e) => e.events && e.events.length > 0)), ge = _(() => o.value.templates);
|
|
4731
4735
|
function _e(e = "asc") {
|
|
4732
|
-
return [...
|
|
4736
|
+
return [...L.value].sort((t, n) => e === "asc" ? t.id - n.id : n.id - t.id);
|
|
4733
4737
|
}
|
|
4734
|
-
let ve = _(() => o.value.fallbackEvents), ye = _(() => o.value.events.length > 0), be = _(() => o.value.fallbackEvents.length > 0), xe = _(() => o.value.templates.length > 0), Se = _(() =>
|
|
4738
|
+
let ve = _(() => o.value.fallbackEvents), ye = _(() => o.value.events.length > 0), be = _(() => o.value.fallbackEvents.length > 0), xe = _(() => o.value.templates.length > 0), Se = _(() => I.value && I.value.eventRateType ? I.value.eventRateType : Pr.None), Ce = _(() => {
|
|
4735
4739
|
if (!A(c.value)) return c.value;
|
|
4736
4740
|
}), we = _(() => {
|
|
4737
4741
|
if (Ce.value !== void 0) {
|
|
@@ -4750,13 +4754,13 @@ var uc = ne("event", () => {
|
|
|
4750
4754
|
let a = i.addons, o = T.value[`${t}.${e}.${n}`] || 0;
|
|
4751
4755
|
if (o > 0) {
|
|
4752
4756
|
let t = a?.find((t) => t.id === e), n = typeof o == "boolean" ? 1 : o;
|
|
4753
|
-
r += Rr(t?.price, t?.quantityStrategy,
|
|
4757
|
+
r += Rr(t?.price, t?.quantityStrategy, ue.value, i.adultPerRoom) * n;
|
|
4754
4758
|
}
|
|
4755
4759
|
}
|
|
4756
4760
|
} else {
|
|
4757
4761
|
let t = E.value[e] || 0;
|
|
4758
4762
|
if (t > 0) {
|
|
4759
|
-
let n =
|
|
4763
|
+
let n = I.value?.products?.find((t) => t.id === e);
|
|
4760
4764
|
n && (r += n.price * t);
|
|
4761
4765
|
}
|
|
4762
4766
|
}
|
|
@@ -4779,7 +4783,7 @@ var uc = ne("event", () => {
|
|
|
4779
4783
|
let e = E.value, t = 0;
|
|
4780
4784
|
for (let n in e) t += Number.isNaN(e[n]) ? 0 : e[n];
|
|
4781
4785
|
return t;
|
|
4782
|
-
}), Ne = _(() => Me.value > 0), Pe = _(() => !A(c.value) &&
|
|
4786
|
+
}), Ne = _(() => Me.value > 0), Pe = _(() => !A(c.value) && I.value ? I.value.products.length > 0 : !1), Fe = _(() => Pe.value ? Ne.value : !0), R = _(() => Se.value !== Pr.FullDayEvent && !ce.value), Ie = _(() => !!(g.value !== "" && y.value !== "" && v.value.length >= 5 && Fe.value && (!R.value || h.value !== "")));
|
|
4783
4787
|
function Le(e) {
|
|
4784
4788
|
return u.value === Fr.ReservationState && p.value === e && l.value;
|
|
4785
4789
|
}
|
|
@@ -4789,7 +4793,7 @@ var uc = ne("event", () => {
|
|
|
4789
4793
|
r.value = (await J().get("/event/metadata", { params: { language: Kr() } })).data;
|
|
4790
4794
|
} catch {
|
|
4791
4795
|
n({
|
|
4792
|
-
message:
|
|
4796
|
+
message: F.t("alert.error.couldntFetchMetadata"),
|
|
4793
4797
|
type: "warning"
|
|
4794
4798
|
});
|
|
4795
4799
|
}
|
|
@@ -4797,7 +4801,7 @@ var uc = ne("event", () => {
|
|
|
4797
4801
|
async function Ue() {
|
|
4798
4802
|
if (u.value = Fr.AvailabilityState, l.value = !0, _i.tz(ne.value, new Date(a.eventDate)).setHours(12, 0, 0, 0) < _i.tz(ne.value).setHours(12, 0, 0, 0) && (a.eventDate = _i.tz(ne.value)), isNaN(a.eventLocation)) {
|
|
4799
4803
|
n({
|
|
4800
|
-
message:
|
|
4804
|
+
message: F.t("alert.error.selectEventId"),
|
|
4801
4805
|
type: "warning"
|
|
4802
4806
|
});
|
|
4803
4807
|
return;
|
|
@@ -4809,10 +4813,10 @@ var uc = ne("event", () => {
|
|
|
4809
4813
|
restaurantId: a.eventLocation,
|
|
4810
4814
|
eventId: i.hasActiveIdFilter ? i.activeIdFilter : null,
|
|
4811
4815
|
excludeEventId: !i.hasActiveIdFilter && k.value ? k.value : null
|
|
4812
|
-
} })).data, P.value = a.eventDate,
|
|
4816
|
+
} })).data, P.value = a.eventDate, re.value = a.eventLocation, rc.emit("scrollToTop"), l.value = !1;
|
|
4813
4817
|
} catch {
|
|
4814
4818
|
n({
|
|
4815
|
-
message:
|
|
4819
|
+
message: F.t("alert.error.couldntFetchListings"),
|
|
4816
4820
|
type: "warning"
|
|
4817
4821
|
});
|
|
4818
4822
|
}
|
|
@@ -4824,16 +4828,16 @@ var uc = ne("event", () => {
|
|
|
4824
4828
|
language: Kr(),
|
|
4825
4829
|
date: ti(P.value),
|
|
4826
4830
|
templateId: p.value,
|
|
4827
|
-
restaurantId:
|
|
4831
|
+
restaurantId: re.value,
|
|
4828
4832
|
numberOfPeople: isNaN(d.value) ? 0 : d.value
|
|
4829
4833
|
} })).data;
|
|
4830
4834
|
t.rooms.length === 0 ? n({
|
|
4831
|
-
message:
|
|
4835
|
+
message: F.t("alert.error.eventNotAvailable"),
|
|
4832
4836
|
type: "warning"
|
|
4833
4837
|
}) : (c.value = t, e()), l.value = !1;
|
|
4834
4838
|
} catch {
|
|
4835
4839
|
l.value = !1, u.value = Fr.AvailabilityState, n({
|
|
4836
|
-
message:
|
|
4840
|
+
message: F.t("alert.error.couldntFetchEvent"),
|
|
4837
4841
|
type: "warning"
|
|
4838
4842
|
});
|
|
4839
4843
|
}
|
|
@@ -4847,11 +4851,11 @@ var uc = ne("event", () => {
|
|
|
4847
4851
|
numberOfPeople: isNaN(d.value) ? 1 : d.value,
|
|
4848
4852
|
eventId: p.value,
|
|
4849
4853
|
tableGroupId: m.value,
|
|
4850
|
-
restaurantId:
|
|
4854
|
+
restaurantId: re.value
|
|
4851
4855
|
} })).data, l.value = !1, Pe.value ? e() : e(2);
|
|
4852
4856
|
} catch {
|
|
4853
4857
|
l.value = !1, u.value = Fr.AvailabilityState, n({
|
|
4854
|
-
message:
|
|
4858
|
+
message: F.t("alert.error.couldntFetchEvent"),
|
|
4855
4859
|
type: "warning"
|
|
4856
4860
|
});
|
|
4857
4861
|
}
|
|
@@ -4875,23 +4879,23 @@ var uc = ne("event", () => {
|
|
|
4875
4879
|
date: ti(P.value),
|
|
4876
4880
|
onlineDiscountCode: D.value,
|
|
4877
4881
|
products: Ke(),
|
|
4878
|
-
restaurantId:
|
|
4882
|
+
restaurantId: re.value
|
|
4879
4883
|
})).data;
|
|
4880
4884
|
e.total ? (qe.value = e.total, O.value = D.value, D.value = "", n({
|
|
4881
|
-
message:
|
|
4885
|
+
message: F.t("alert.success.discountCodeApplied"),
|
|
4882
4886
|
type: "success"
|
|
4883
4887
|
})) : n({
|
|
4884
|
-
message:
|
|
4888
|
+
message: F.t("alert.error.discountCodeValidation"),
|
|
4885
4889
|
type: "warning"
|
|
4886
4890
|
});
|
|
4887
4891
|
} catch {
|
|
4888
4892
|
n({
|
|
4889
|
-
message:
|
|
4893
|
+
message: F.t("alert.error.discountCodeValidation"),
|
|
4890
4894
|
type: "warning"
|
|
4891
4895
|
});
|
|
4892
4896
|
}
|
|
4893
4897
|
else n({
|
|
4894
|
-
message:
|
|
4898
|
+
message: F.t("alert.error.discountCodeEmpty"),
|
|
4895
4899
|
type: "error"
|
|
4896
4900
|
});
|
|
4897
4901
|
}
|
|
@@ -4899,7 +4903,7 @@ var uc = ne("event", () => {
|
|
|
4899
4903
|
u.value = Fr.PaymentState, l.value = !0;
|
|
4900
4904
|
let i = () => {
|
|
4901
4905
|
l.value = !1, u.value = Fr.ReservationState, n({
|
|
4902
|
-
message:
|
|
4906
|
+
message: F.t("booking.other.errorMessage"),
|
|
4903
4907
|
type: "warning"
|
|
4904
4908
|
});
|
|
4905
4909
|
}, a, o, s, m = [];
|
|
@@ -4921,21 +4925,21 @@ var uc = ne("event", () => {
|
|
|
4921
4925
|
});
|
|
4922
4926
|
}), a = {
|
|
4923
4927
|
totalPerson: isNaN(d.value) ? Me.value : d.value,
|
|
4924
|
-
templateID:
|
|
4928
|
+
templateID: me.value,
|
|
4925
4929
|
numberOfDays: f.value,
|
|
4926
4930
|
templateCounts: m,
|
|
4927
4931
|
fromDate: ti(P.value)
|
|
4928
4932
|
}) : (o = Ke(), s = h.value);
|
|
4929
4933
|
let _ = "/event/book-template", w = {
|
|
4930
4934
|
language: Kr(),
|
|
4931
|
-
restaurantId:
|
|
4935
|
+
restaurantId: re.value,
|
|
4932
4936
|
date: ti(P.value),
|
|
4933
4937
|
name: g.value,
|
|
4934
4938
|
email: y.value,
|
|
4935
4939
|
phone: v.value,
|
|
4936
4940
|
remark: b.value,
|
|
4937
4941
|
numberOfPeople: isNaN(d.value) ? Me.value : d.value,
|
|
4938
|
-
days:
|
|
4942
|
+
days: ue.value > 0 ? ue.value : 1,
|
|
4939
4943
|
allergyFood: x.value,
|
|
4940
4944
|
discountCode: O.value,
|
|
4941
4945
|
giftCardCode: t.value,
|
|
@@ -4958,7 +4962,7 @@ var uc = ne("event", () => {
|
|
|
4958
4962
|
c.value = void 0, T.value = {}, E.value = {}, h.value = "", Xe(), e && a.resetEventDate();
|
|
4959
4963
|
}
|
|
4960
4964
|
function Qe(e) {
|
|
4961
|
-
|
|
4965
|
+
ce.value || Pe.value ? e() : e(2), Xe();
|
|
4962
4966
|
}
|
|
4963
4967
|
async function $e() {
|
|
4964
4968
|
await Promise.all([He(), a.fetchMetadata()]);
|
|
@@ -4966,9 +4970,9 @@ var uc = ne("event", () => {
|
|
|
4966
4970
|
return {
|
|
4967
4971
|
flagOnTable: S,
|
|
4968
4972
|
allergies: x,
|
|
4969
|
-
isSearchOutdated:
|
|
4973
|
+
isSearchOutdated: oe,
|
|
4970
4974
|
currentEventDate: P,
|
|
4971
|
-
currentEventLocation:
|
|
4975
|
+
currentEventLocation: re,
|
|
4972
4976
|
metaData: r,
|
|
4973
4977
|
listingData: o,
|
|
4974
4978
|
tableBasePrice: we,
|
|
@@ -4987,18 +4991,18 @@ var uc = ne("event", () => {
|
|
|
4987
4991
|
phone: v,
|
|
4988
4992
|
email: y,
|
|
4989
4993
|
remark: b,
|
|
4990
|
-
isTemplateEvent:
|
|
4994
|
+
isTemplateEvent: ce,
|
|
4991
4995
|
maxNumberOfPeople: M,
|
|
4992
4996
|
title: N,
|
|
4993
4997
|
subtitle: te,
|
|
4994
|
-
date:
|
|
4995
|
-
numberOfTotalDays:
|
|
4996
|
-
numberOfRooms:
|
|
4997
|
-
fromDate:
|
|
4998
|
-
getEventData:
|
|
4999
|
-
length:
|
|
5000
|
-
templateId:
|
|
5001
|
-
getEvents:
|
|
4998
|
+
date: se,
|
|
4999
|
+
numberOfTotalDays: ue,
|
|
5000
|
+
numberOfRooms: de,
|
|
5001
|
+
fromDate: fe,
|
|
5002
|
+
getEventData: I,
|
|
5003
|
+
length: pe,
|
|
5004
|
+
templateId: me,
|
|
5005
|
+
getEvents: L,
|
|
5002
5006
|
getTemplates: ge,
|
|
5003
5007
|
hasEvents: ye,
|
|
5004
5008
|
hasFallbackEvents: be,
|
|
@@ -5082,7 +5086,7 @@ var uc = ne("event", () => {
|
|
|
5082
5086
|
i.value = e, o.value && te(), e.defaultHotelId && (isNaN(p.value) ? p.value = e.defaultHotelId : p.value !== e.defaultHotelId && (p.value = e.defaultHotelId, f.value = p.value), isNaN(f.value) && (f.value = e.defaultHotelId)), e.defaultEventId && (isNaN(S.value) ? S.value = e.defaultEventId : S.value !== e.defaultEventId && (S.value = e.defaultEventId, x.value = S.value), isNaN(x.value) && (x.value = e.defaultEventId));
|
|
5083
5087
|
} catch {
|
|
5084
5088
|
r({
|
|
5085
|
-
message:
|
|
5089
|
+
message: F.t("alert.error.couldntFetchMetadata"),
|
|
5086
5090
|
type: "warning"
|
|
5087
5091
|
});
|
|
5088
5092
|
}
|
|
@@ -9213,7 +9217,7 @@ var lm = {
|
|
|
9213
9217
|
error: "exclamation-triangle",
|
|
9214
9218
|
warning: "do-not-enter",
|
|
9215
9219
|
success: "check-circle"
|
|
9216
|
-
}, { message: r, type: i, status: c } =
|
|
9220
|
+
}, { message: r, type: i, status: c } = le(ws());
|
|
9217
9221
|
return (e, l) => (b(), N("div", {
|
|
9218
9222
|
class: a([
|
|
9219
9223
|
"konnectio-alert",
|
|
@@ -9280,7 +9284,7 @@ var lm = {
|
|
|
9280
9284
|
stepBarBackground: "#d0d5da",
|
|
9281
9285
|
...t.styling
|
|
9282
9286
|
}));
|
|
9283
|
-
return
|
|
9287
|
+
return oe(() => {
|
|
9284
9288
|
let e = document.documentElement.style;
|
|
9285
9289
|
e.setProperty("--accentColor", n.value.accentColor), e.setProperty("--accentColorSecondary", n.value.accentColorSecondary), e.setProperty("--buttonBackground", n.value.buttonBackground), e.setProperty("--buttonBorder", n.value.buttonBorder), e.setProperty("--buttonBorderRadius", n.value.buttonBorderRadius), e.setProperty("--buttonColor", n.value.buttonColor), e.setProperty("--buttonFontFamily", n.value.buttonFontFamily), e.setProperty("--buttonFontSize", n.value.buttonFontSize), e.setProperty("--buttonFontWeight", n.value.buttonFontWeight), e.setProperty("--buttonTextTransform", n.value.buttonTextTransform), e.setProperty("--dangerColor", n.value.dangerColor), e.setProperty("--fontColor", n.value.fontColor), e.setProperty("--fontFamily", n.value.fontFamily), e.setProperty("--fontWeight", n.value.fontWeight), e.setProperty("--fontSize", n.value.fontSize), e.setProperty("--grayColor", n.value.grayColor), e.setProperty("--headerColor", n.value.headerColor), e.setProperty("--headerFontFamily", n.value.headerFontFamily), e.setProperty("--headerLetterSpacing", n.value.headerLetterSpacing), e.setProperty("--headerTextTransform", n.value.headerTextTransform), e.setProperty("--highlightBackground", n.value.highlightBackground), e.setProperty("--inputBackground", n.value.inputBackground), e.setProperty("--inputBorder", n.value.inputBorder), e.setProperty("--inputBorderRadius", n.value.inputBorderRadius), e.setProperty("--inputBorderWidth", n.value.inputBorderWidth), e.setProperty("--inputFontColor", n.value.inputFontColor), e.setProperty("--inputFontWeight", n.value.inputFontWeight), e.setProperty("--inputFontSize", n.value.inputFontSize), e.setProperty("--labelFontColor", n.value.labelFontColor), e.setProperty("--labelFontWeight", n.value.labelFontWeight), e.setProperty("--labelFontSize", n.value.labelFontSize), e.setProperty("--labelPadding", n.value.labelPadding), e.setProperty("--labelTextTransform", n.value.labelTextTransform), e.setProperty("--linkColor", n.value.linkColor), e.setProperty("--linkHoverColor", n.value.linkHoverColor), e.setProperty("--loadingColor", n.value.loadingColor), e.setProperty("--panelBackground", n.value.panelBackground), e.setProperty("--panelBorder", n.value.panelBorder), e.setProperty("--panelBorderRadius", n.value.panelBorderRadius), e.setProperty("--panelInnerPadding", n.value.panelInnerPadding), e.setProperty("--panelMaxWidth", n.value.panelMaxWidth), e.setProperty("--panelPadding", n.value.panelPadding), e.setProperty("--panelSectionBackground", n.value.panelSectionBackground), e.setProperty("--panelSectionBorder", n.value.panelSectionBorder), e.setProperty("--panelSectionBorderRadius", n.value.panelSectionBorderRadius), e.setProperty("--panelShadow", n.value.panelShadow), e.setProperty("--successColor", n.value.successColor), e.setProperty("--stepBarBorderRadius", n.value.stepBarBorderRadius), e.setProperty("--stepBarBackground", n.value.stepBarBackground);
|
|
9286
9290
|
}), (e, t) => (b(), N("div", null, [o("div", og, [D(e.$slots, "default", {}, void 0, !0)]), f(ag, { "local-domain": "global" })]));
|
|
@@ -9366,7 +9370,7 @@ var fg = /* @__PURE__ */ ng(lg, [["render", dg], ["__scopeId", "data-v-88ad2e2d"
|
|
|
9366
9370
|
}, [e.isLoading ? c.value ? (b(), i(fg, { key: 1 })) : (b(), i(cg, {
|
|
9367
9371
|
key: 2,
|
|
9368
9372
|
"inside-button": !0
|
|
9369
|
-
})) : (b(), N(
|
|
9373
|
+
})) : (b(), N(fe, { key: 0 }, [
|
|
9370
9374
|
o("span", mg, [e.icon ? (b(), i(rg, {
|
|
9371
9375
|
key: 0,
|
|
9372
9376
|
icon: e.icon,
|
|
@@ -9418,7 +9422,7 @@ var fg = /* @__PURE__ */ ng(lg, [["render", dg], ["__scopeId", "data-v-88ad2e2d"
|
|
|
9418
9422
|
}
|
|
9419
9423
|
},
|
|
9420
9424
|
setup(e) {
|
|
9421
|
-
let t = e, { t: r } =
|
|
9425
|
+
let t = e, { t: r } = ae(), { hideOptionalLabel: c } = le(oc()), l = t.id || qr(), u = _(() => !!t.icon && t.iconPlacement === "label"), d = _(() => !!t.icon && t.iconPlacement === "field"), m = _(() => {
|
|
9422
9426
|
if (t.limit !== Infinity) {
|
|
9423
9427
|
let e = t.limit.toString().length;
|
|
9424
9428
|
return e <= 2 ? "has-2-digit-limit" : e === 3 ? "has-3-digit-limit" : "has-4-digit-limit";
|
|
@@ -10108,7 +10112,7 @@ var D_ = /* @__PURE__ */ h({
|
|
|
10108
10112
|
function o(e) {
|
|
10109
10113
|
n("update:modelValue", e);
|
|
10110
10114
|
}
|
|
10111
|
-
return
|
|
10115
|
+
return oe(() => {
|
|
10112
10116
|
r.modelValue || o(r.minValue);
|
|
10113
10117
|
}), (t, n) => (b(), i(Eg, {
|
|
10114
10118
|
label: e.label,
|
|
@@ -10235,7 +10239,7 @@ var D_ = /* @__PURE__ */ h({
|
|
|
10235
10239
|
},
|
|
10236
10240
|
emits: ["update:modelValue"],
|
|
10237
10241
|
setup(e, { emit: t }) {
|
|
10238
|
-
let r = t, { t: c } =
|
|
10242
|
+
let r = t, { t: c } = ae(), l = e, u = w(), d = l.id || qr(), f = _({
|
|
10239
10243
|
get: () => l.modelValue,
|
|
10240
10244
|
set: (e) => {
|
|
10241
10245
|
r("update:modelValue", e);
|
|
@@ -10254,10 +10258,10 @@ var D_ = /* @__PURE__ */ h({
|
|
|
10254
10258
|
let e = u.value;
|
|
10255
10259
|
e.style.height = "auto", e.style.height = e.scrollHeight + "px";
|
|
10256
10260
|
}
|
|
10257
|
-
return
|
|
10261
|
+
return oe(() => {
|
|
10258
10262
|
S();
|
|
10259
10263
|
}), (t, r) => {
|
|
10260
|
-
let l =
|
|
10264
|
+
let l = ie("tooltip");
|
|
10261
10265
|
return b(), i(Eg, {
|
|
10262
10266
|
label: e.label,
|
|
10263
10267
|
id: s(d),
|
|
@@ -10315,7 +10319,7 @@ var D_ = /* @__PURE__ */ h({
|
|
|
10315
10319
|
e.suffix ? (b(), N("div", j_, [o("div", null, [o("span", null, n(e.suffix), 1)])])) : p("", !0),
|
|
10316
10320
|
e.clipboard ? (b(), N("div", M_, [O((b(), N("div", null, [o("button", {
|
|
10317
10321
|
class: "konnectio-copy-button",
|
|
10318
|
-
onClick: r[2] ||=
|
|
10322
|
+
onClick: r[2] ||= pe((e) => s(m)(f.value), ["prevent"])
|
|
10319
10323
|
}, [o("span", null, n(s(c)("general.copy")), 1)])])), [[l, {
|
|
10320
10324
|
content: s(c)("general.copiedToClipboard"),
|
|
10321
10325
|
classes: ["tooltip", "konnectio-tooltip"],
|
|
@@ -10959,7 +10963,7 @@ https://vue-select.org/api/props.html#getoptionlabel`) : e;
|
|
|
10959
10963
|
class: "vs__no-options"
|
|
10960
10964
|
}, yv = /* @__PURE__ */ M(" Sorry, no matching options. "), bv = ["id"];
|
|
10961
10965
|
function xv(e, r, s, c, l, d) {
|
|
10962
|
-
let h =
|
|
10966
|
+
let h = ie("append-to-body");
|
|
10963
10967
|
return b(), N("div", {
|
|
10964
10968
|
dir: s.dir,
|
|
10965
10969
|
class: a(["v-select", d.stateClasses])
|
|
@@ -10974,7 +10978,7 @@ function xv(e, r, s, c, l, d) {
|
|
|
10974
10978
|
"aria-owns": `vs${s.uid}__listbox`,
|
|
10975
10979
|
"aria-label": "Search for option",
|
|
10976
10980
|
onMousedown: r[1] ||= (e) => d.toggleDropdown(e)
|
|
10977
|
-
}, [o("div", dv, [(b(!0), N(
|
|
10981
|
+
}, [o("div", dv, [(b(!0), N(fe, null, t(d.selectedValue, (t, r) => D(e.$slots, "selected-option-container", {
|
|
10978
10982
|
option: d.normalizeOptionForSlot(t),
|
|
10979
10983
|
deselect: d.deselect,
|
|
10980
10984
|
multiple: s.multiple,
|
|
@@ -10992,7 +10996,7 @@ function xv(e, r, s, c, l, d) {
|
|
|
10992
10996
|
title: `Deselect ${s.getOptionLabel(t)}`,
|
|
10993
10997
|
"aria-label": `Deselect ${s.getOptionLabel(t)}`,
|
|
10994
10998
|
onClick: (e) => d.deselect(t)
|
|
10995
|
-
}, [(b(), i(
|
|
10999
|
+
}, [(b(), i(se(d.childComponents.Deselect)))], 8, fv)) : p("", !0)]))])), 256)), D(e.$slots, "search", m(u(d.scope.search)), () => [o("input", y({ class: "vs__search" }, d.scope.search.attributes, C(d.scope.search.events)), null, 16)])], 512), o("div", pv, [
|
|
10996
11000
|
O(o("button", {
|
|
10997
11001
|
ref: "clearButton",
|
|
10998
11002
|
disabled: s.disabled,
|
|
@@ -11001,8 +11005,8 @@ function xv(e, r, s, c, l, d) {
|
|
|
11001
11005
|
title: "Clear Selected",
|
|
11002
11006
|
"aria-label": "Clear Selected",
|
|
11003
11007
|
onClick: r[0] ||= (...e) => d.clearSelection && d.clearSelection(...e)
|
|
11004
|
-
}, [(b(), i(
|
|
11005
|
-
D(e.$slots, "open-indicator", m(u(d.scope.openIndicator)), () => [s.noDrop ? p("", !0) : (b(), i(
|
|
11008
|
+
}, [(b(), i(se(d.childComponents.Deselect)))], 8, mv), [[x, d.showClearButton]]),
|
|
11009
|
+
D(e.$slots, "open-indicator", m(u(d.scope.openIndicator)), () => [s.noDrop ? p("", !0) : (b(), i(se(d.childComponents.OpenIndicator), m(y({ key: 0 }, d.scope.openIndicator.attributes)), null, 16))]),
|
|
11006
11010
|
D(e.$slots, "spinner", m(u(d.scope.spinner)), () => [O(o("div", hv, "Loading...", 512), [[x, e.mutableLoading]])])
|
|
11007
11011
|
], 512)], 40, uv),
|
|
11008
11012
|
f(T, { name: s.transition }, {
|
|
@@ -11013,11 +11017,11 @@ function xv(e, r, s, c, l, d) {
|
|
|
11013
11017
|
class: "vs__dropdown-menu",
|
|
11014
11018
|
role: "listbox",
|
|
11015
11019
|
tabindex: "-1",
|
|
11016
|
-
onMousedown: r[2] ||=
|
|
11020
|
+
onMousedown: r[2] ||= pe((...e) => d.onMousedown && d.onMousedown(...e), ["prevent"]),
|
|
11017
11021
|
onMouseup: r[3] ||= (...e) => d.onMouseUp && d.onMouseUp(...e)
|
|
11018
11022
|
}, [
|
|
11019
11023
|
D(e.$slots, "list-header", m(u(d.scope.listHeader))),
|
|
11020
|
-
(b(!0), N(
|
|
11024
|
+
(b(!0), N(fe, null, t(d.filteredOptions, (t, r) => (b(), N("li", {
|
|
11021
11025
|
id: `vs${s.uid}__option-${r}`,
|
|
11022
11026
|
key: s.getOptionKey(t),
|
|
11023
11027
|
role: "option",
|
|
@@ -11029,7 +11033,7 @@ function xv(e, r, s, c, l, d) {
|
|
|
11029
11033
|
}]),
|
|
11030
11034
|
"aria-selected": r === e.typeAheadPointer ? !0 : null,
|
|
11031
11035
|
onMouseover: (n) => s.selectable(t) ? e.typeAheadPointer = r : null,
|
|
11032
|
-
onClick:
|
|
11036
|
+
onClick: pe((e) => s.selectable(t) ? d.select(t) : null, ["prevent", "stop"])
|
|
11033
11037
|
}, [D(e.$slots, "option", m(u(d.normalizeOptionForSlot(t))), () => [M(n(s.getOptionLabel(t)), 1)])], 42, _v))), 128)),
|
|
11034
11038
|
d.filteredOptions.length === 0 ? (b(), N("li", vv, [D(e.$slots, "no-options", m(u(d.scope.noOptions)), () => [yv])])) : p("", !0),
|
|
11035
11039
|
D(e.$slots, "list-footer", m(u(d.scope.listFooter)))
|