@konnectio/core
Version:
Konnectio Core Frontend Integration.
1,333 lines • 487 kB
JavaScript
import { d as Ht, h as A, b as T, e as b, i as D, F as ht, v as Ct, J as Ye, K as Xn, a as lt, L as Jn, j as Pi, n as we, M as xr, u as Xt, s as Kt, r as Ut, N as Mr, g as c, z as At, A as Sr, w as tt, t as I, E as ke, G as ze, f as B, q as Qn, C as Ar, c as Tt, x as ys, O as es, o as co, D as ln, S as Ir, P as Or, Q as zr, R as Er, k as Br, _ as Zr, l as Dr, m as Nr, p as Rr } from "./mitt-BJqPn_wb.js";
import { _ as Jt, f as Ee, b as me, u as Ci, I as Mt, s as ae, k as bi, l as to, q as _e, o as ie, r as so, a as fo, d as cn, F as Hr, H as bs, e as le, h as Li, B as Ls, J as is, x as Vr, T as be, K as Fr, p as ns, M as Gr, N as os, C as Ur, t as ss, v as $r } from "./SelectField.vue_vue_type_style_index_0_lang-BcUXwydD.js";
import { G as Wr } from "./style-CzdIazhD.js";
import { R as qr, B as dn, L as jr, S as Yr, M as Kr, T as Xr, C as Jr, b as eo, V as Qr, a as ta } from "./masonry.plugin-B03gaQmZ.js";
import { A as ea, H as ia } from "./AvailabilitySkeleton-ddWGLHVI.js";
import { S as na } from "./TermsOfService-Dfsft5yf.js";
import { a as ro, B as ks, C as oa, P as sa } from "./CheckoutWindow-BE4Pox7h.js";
import { A as ra } from "./ActionField-CZPr9tNw.js";
import { g as aa } from "./_commonjsHelpers-DaMA6jEr.js";
import { _ as ws } from "./AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_86730e88_lang-BZuSNGry.js";
function ao(a, u = {}, h) {
for (const p in a) {
const v = a[p], o = h ? `${h}:${p}` : p;
typeof v == "object" && v !== null ? ao(v, u, o) : typeof v == "function" && (u[o] = v);
}
return u;
}
const la = { run: (a) => a() }, ua = () => la, Ps = typeof console.createTask < "u" ? console.createTask : ua;
function ha(a, u) {
const h = u.shift(), p = Ps(h);
return a.reduce(
(v, o) => v.then(() => p.run(() => o(...u))),
Promise.resolve()
);
}
function ca(a, u) {
const h = u.shift(), p = Ps(h);
return Promise.all(a.map((v) => p.run(() => v(...u))));
}
function io(a, u) {
for (const h of [...a])
h(u);
}
class da {
constructor() {
this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this);
}
hook(u, h, p = {}) {
if (!u || typeof h != "function")
return () => {
};
const v = u;
let o;
for (; this._deprecatedHooks[u]; )
o = this._deprecatedHooks[u], u = o.to;
if (o && !p.allowDeprecated) {
let r = o.message;
r || (r = `${v} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = /* @__PURE__ */ new Set()), this._deprecatedMessages.has(r) || (console.warn(r), this._deprecatedMessages.add(r));
}
if (!h.name)
try {
Object.defineProperty(h, "name", {
get: () => "_" + u.replace(/\W+/g, "_") + "_hook_cb",
configurable: !0
});
} catch {
}
return this._hooks[u] = this._hooks[u] || [], this._hooks[u].push(h), () => {
h && (this.removeHook(u, h), h = void 0);
};
}
hookOnce(u, h) {
let p, v = (...o) => (typeof p == "function" && p(), p = void 0, v = void 0, h(...o));
return p = this.hook(u, v), p;
}
removeHook(u, h) {
if (this._hooks[u]) {
const p = this._hooks[u].indexOf(h);
p !== -1 && this._hooks[u].splice(p, 1), this._hooks[u].length === 0 && delete this._hooks[u];
}
}
deprecateHook(u, h) {
this._deprecatedHooks[u] = typeof h == "string" ? { to: h } : h;
const p = this._hooks[u] || [];
delete this._hooks[u];
for (const v of p)
this.hook(u, v);
}
deprecateHooks(u) {
Object.assign(this._deprecatedHooks, u);
for (const h in u)
this.deprecateHook(h, u[h]);
}
addHooks(u) {
const h = ao(u), p = Object.keys(h).map(
(v) => this.hook(v, h[v])
);
return () => {
for (const v of p.splice(0, p.length))
v();
};
}
removeHooks(u) {
const h = ao(u);
for (const p in h)
this.removeHook(p, h[p]);
}
removeAllHooks() {
for (const u in this._hooks)
delete this._hooks[u];
}
callHook(u, ...h) {
return h.unshift(u), this.callHookWith(ha, u, ...h);
}
callHookParallel(u, ...h) {
return h.unshift(u), this.callHookWith(ca, u, ...h);
}
callHookWith(u, h, ...p) {
const v = this._before || this._after ? { name: h, args: p, context: {} } : void 0;
this._before && io(this._before, v);
const o = u(
h in this._hooks ? [...this._hooks[h]] : [],
p
);
return o instanceof Promise ? o.finally(() => {
this._after && v && io(this._after, v);
}) : (this._after && v && io(this._after, v), o);
}
beforeEach(u) {
return this._before = this._before || [], this._before.push(u), () => {
if (this._before !== void 0) {
const h = this._before.indexOf(u);
h !== -1 && this._before.splice(h, 1);
}
};
}
afterEach(u) {
return this._after = this._after || [], this._after.push(u), () => {
if (this._after !== void 0) {
const h = this._after.indexOf(u);
h !== -1 && this._after.splice(h, 1);
}
};
}
}
function fa() {
return new da();
}
function rs(a, u) {
return u ? {
width: window.innerWidth,
height: window.innerHeight,
left: 0,
top: 0
} : a.getBoundingClientRect();
}
function as(a, u) {
return a && window.matchMedia && window.matchMedia(`(max-width: ${u}px)`).matches;
}
function ls() {
return {
onLoadCallback: null,
bounds: {},
offsets: {},
ratios: {},
eventPosition: {},
scaledDimensions: {}
};
}
function no(a, u, h, p) {
return {
x: a - h,
y: u - p
};
}
function pa(a, u) {
return {
x: (u.width - a.width) / a.width,
y: (u.height - a.height) / a.height
};
}
function _a(a, u) {
return {
width: a.naturalWidth * u,
height: a.naturalHeight * u
};
}
function Cs(a) {
return {
x: typeof a.pageX == "number" ? a.pageX : a.changedTouches[0].pageX,
y: typeof a.pageY == "number" ? a.pageY : a.changedTouches[0].pageY
};
}
function ma(a, u, h) {
const p = (a.pageX - (window.pageXOffset + u.bounds.left)) * -u.ratios.x, v = (a.pageY - (window.pageYOffset + u.bounds.top)) * -u.ratios.y;
return {
pageX: p + (h ? (window.innerWidth - u.bounds.width) / 2 : 0),
pageY: v + (h ? (window.innerHeight - u.bounds.height) / 2 : 0)
};
}
function ga(a, u) {
const h = Math.abs(a.pageX - u.eventPosition.x), p = Math.abs(a.pageY - u.eventPosition.y);
return h > 5 || p > 5;
}
function va(a, u) {
const h = Ts(a, u);
return {
left: Math.max(Math.min(h.x, u.bounds.width), 0) * -u.ratios.x,
top: Math.max(Math.min(h.y, u.bounds.height), 0) * -u.ratios.y
};
}
function ya(a, u) {
const h = Ts(a, u);
return {
left: Math.max(Math.min(h.x, 0), (u.scaledDimensions.width - u.bounds.width) * -1),
top: Math.max(Math.min(h.y, 0), (u.scaledDimensions.height - u.bounds.height) * -1)
};
}
function Ts(a, u) {
const h = Cs(a);
return {
x: h.x - u.offsets.x,
y: h.y - u.offsets.y
};
}
const ba = Ht({
name: "InnerImageZoom",
props: {
moveType: {
type: String,
default: "pan"
},
zoomType: {
type: String,
default: "click"
},
src: {
type: String,
required: !0
},
imgAttributes: {
type: Object,
default: {}
},
sources: Array,
width: Number,
height: Number,
hasSpacer: Boolean,
zoomSrc: String,
zoomScale: {
type: Number,
default: 1
},
zoomPreload: Boolean,
fadeDuration: {
type: Number,
default: 150
},
fullscreenOnMobile: Boolean,
mobileBreakpoint: {
type: Number,
default: 640
},
hideHint: Boolean,
hideCloseButton: Boolean,
className: String,
afterZoomIn: Function,
afterZoomOut: Function
},
data() {
return {
isActive: this.zoomPreload || !1,
isTouch: !1,
isZoomed: !1,
isFullscreen: !1,
isDragging: !1,
currentMoveType: this.moveType,
left: 0,
top: 0,
imgProps: {}
};
},
created() {
this.imgProps = ls(), as(this.fullscreenOnMobile, this.mobileBreakpoint) && (this.isActive = !1);
},
computed: {
validSources: function() {
return this.sources ? this.sources.filter((a) => a.srcSet) : [];
},
createSpacer: function() {
return this.width && this.height && this.hasSpacer;
}
},
methods: {
handleMouseEnter(a) {
this.isActive = !0, this.zoomType === "hover" && !this.isZoomed && this.handleClick(a);
},
handleTouchStart() {
this.isTouch = !0, this.isFullscreen = as(this.fullscreenOnMobile, this.mobileBreakpoint), this.currentMoveType = "drag";
},
handleClick(a) {
if (this.isZoomed) {
this.isTouch ? this.hideCloseButton && this.handleClose() : !this.isDragging && this.zoomOut();
return;
}
this.isTouch && (this.isActive = !0), this.imgProps.zoomImg ? (this.handleLoad({ target: this.imgProps.zoomImg }), this.zoomIn(a)) : this.imgProps.onLoadCallback = this.zoomIn.bind(this, a);
},
handleLoad(a) {
const u = _a(a.target, this.zoomScale);
this.imgProps.zoomImg = a.target, this.imgProps.zoomImg.setAttribute("width", u.width), this.imgProps.zoomImg.setAttribute("height", u.height), this.imgProps.scaledDimensions = u, this.imgProps.bounds = rs(this.$refs.img, !1), this.imgProps.ratios = pa(this.imgProps.bounds, u), this.imgProps.onLoadCallback && (this.imgProps.onLoadCallback(), this.imgProps.onLoadCallback = null);
},
handleMouseMove(a) {
const u = va(a, this.imgProps);
this.left = u.left, this.top = u.top;
},
handleDragStart(a) {
const u = Cs(a);
this.imgProps.offsets = no(
u.x,
u.y,
this.imgProps.zoomImg.offsetLeft,
this.imgProps.zoomImg.offsetTop
), this.imgProps.zoomImg.addEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove, {
passive: !0
}), this.isTouch || (this.imgProps.eventPosition = u);
},
handleDragMove(a) {
const u = ya(a, this.imgProps);
this.left = u.left, this.top = u.top;
},
handleDragEnd(a) {
this.imgProps.zoomImg.removeEventListener(this.isTouch ? "touchmove" : "mousemove", this.handleDragMove), this.isTouch || (this.isDragging = ga(a, this.imgProps));
},
handleMouseLeave(a) {
this.currentMoveType === "drag" && this.isZoomed ? this.handleDragEnd(a) : this.handleClose();
},
handleClose() {
this.zoomOut(() => {
setTimeout(
() => {
(this.zoomPreload && this.isTouch || !this.zoomPreload) && (this.isActive = !1, this.imgProps = ls()), this.isTouch = !1, this.isFullscreen = !1, this.currentMoveType = this.moveType;
},
this.isFullscreen ? 0 : this.fadeDuration
);
});
},
initialMove(a) {
this.imgProps.offsets = no(
window.pageXOffset,
window.pageYOffset,
-this.imgProps.bounds.left,
-this.imgProps.bounds.top
), this.handleMouseMove(a);
},
initialDragMove(a) {
const u = ma(a, this.imgProps, this.isFullscreen);
this.imgProps.bounds = rs(this.$refs.img, this.isFullscreen), this.imgProps.offsets = no(0, 0, 0, 0), this.handleDragMove({
...u,
preventDefault: () => {
},
stopPropagation: () => {
}
});
},
zoomIn(a) {
this.isZoomed = !0, this.currentMoveType === "drag" ? this.initialDragMove(a) : this.initialMove(a), this.afterZoomIn && this.afterZoomIn();
},
zoomOut(a) {
this.isZoomed = !1, this.afterZoomOut && this.afterZoomOut(), a && a();
}
}
}), La = { key: 0 }, ka = ["src", "width", "height"], wa = ["src", "width", "height"], Pa = { class: "iiz__zoom-portal" }, Ca = ["src"], Ta = ["src"], xa = {
key: 1,
class: "iiz__btn iiz__hint"
};
function Ma(a, u, h, p, v, o) {
return T(), A("figure", Ye({
class: ["iiz", {
...a.className && { [a.className]: a.className },
"iiz--drag": a.currentMoveType === "drag"
}],
ref: "img",
style: {
width: `${a.width}px`
}
}, Jn({
touchstart: a.isZoomed ? () => {
} : a.handleTouchStart,
click: a.handleClick,
mouseenter: a.isTouch ? () => {
} : a.handleMouseEnter,
mousemove: a.currentMoveType === "drag" || !a.isZoomed ? () => {
} : a.handleMouseMove,
mouseleave: a.isTouch ? () => {
} : a.handleMouseLeave
}, !0)), [
b("div", {
style: Xn({
paddingTop: a.createSpacer ? `${(a.height || 0) / (a.width || 0) * 100}%` : void 0
})
}, [
a.validSources ? (T(), A("picture", La, [
(T(!0), A(ht, null, Ct(a.validSources, (r, d) => (T(), A("source", Ye({ key: d }, { ref_for: !0 }, r), null, 16))), 128)),
b("img", Ye(a.imgAttributes, {
class: ["iiz__img", [a.imgAttributes.className || "", { "iiz__img--hidden": a.isZoomed, "iiz__img--abs": a.createSpacer }]],
style: {
transition: `linear 0ms opacity ${a.isZoomed ? a.fadeDuration : 0}ms, linear 0ms visibility ${a.isZoomed ? a.fadeDuration : 0}ms`
},
src: a.src,
width: a.width,
height: a.height
}), null, 16, ka)
])) : (T(), A("img", Ye({ key: 1 }, a.imgAttributes, {
class: ["iiz__img", [a.imgAttributes.className || "", { "iiz__img--hidden": a.isZoomed, "iiz__img--abs": a.createSpacer }]],
style: {
transition: `linear 0ms opacity ${a.isZoomed ? a.fadeDuration : 0}ms, linear 0ms visibility ${a.isZoomed ? a.fadeDuration : 0}ms`
},
src: a.src,
width: a.width,
height: a.height
}), null, 16, wa))
], 4),
a.isActive ? (T(), A(ht, { key: 0 }, [
a.isFullscreen ? (T(), lt(xr, {
key: 0,
to: "body"
}, [
b("div", Pa, [
b("img", Ye({
class: ["iiz__zoom-img", { "iiz__zoom-img--visible": a.isZoomed }],
alt: "",
draggable: !1,
style: {
top: `${a.top}px`,
left: `${a.left}px`,
transition: `linear ${a.isFullscreen ? 0 : a.fadeDuration}ms opacity, linear ${a.isFullscreen ? 0 : a.fadeDuration}ms visibility`
},
src: a.zoomSrc || a.src
}, Jn({
load: a.handleLoad,
touchstart: a.handleDragStart,
touchend: a.handleDragEnd,
mousedown: a.handleDragStart,
mouseup: a.handleDragEnd,
click: a.handleClick
}, !0)), null, 16, Ca),
!a.hideCloseButton && a.currentMoveType === "drag" ? (T(), A("button", {
key: 0,
type: "button",
class: we(["iiz__btn iiz__close", { "iiz__close--visible": a.isZoomed }]),
"aria-label": "Zoom Out",
style: Xn({
transition: `linear ${a.isFullscreen ? 0 : a.fadeDuration}ms opacity, linear ${a.isFullscreen ? 0 : a.fadeDuration}ms visibility`
}),
onClick: u[0] || (u[0] = Pi((...r) => a.handleClose && a.handleClose(...r), ["stop"]))
}, null, 6)) : D("", !0)
])
])) : (T(), A(ht, { key: 1 }, [
b("img", Ye({
class: ["iiz__zoom-img", { "iiz__zoom-img--visible": a.isZoomed }],
alt: "",
draggable: !1,
style: {
top: `${a.top}px`,
left: `${a.left}px`,
transition: `linear ${a.isFullscreen ? 0 : a.fadeDuration}ms opacity, linear ${a.isFullscreen ? 0 : a.fadeDuration}ms visibility`
},
src: a.zoomSrc || a.src
}, Jn({
load: a.handleLoad,
touchstart: a.handleDragStart,
touchend: a.handleDragEnd,
mousedown: a.handleDragStart,
mouseup: a.handleDragEnd
}, !0)), null, 16, Ta),
!a.hideCloseButton && a.currentMoveType === "drag" ? (T(), A("button", {
key: 0,
class: we(["iiz__btn iiz__close", { "iiz__close--visible": a.isZoomed }]),
type: "button",
"aria-label": "Zoom Out",
style: Xn({
transition: `linear ${a.isFullscreen ? 0 : a.fadeDuration}ms opacity, linear ${a.isFullscreen ? 0 : a.fadeDuration}ms visibility`
}),
onClick: u[1] || (u[1] = Pi((...r) => a.handleClose && a.handleClose(...r), ["stop"]))
}, null, 6)) : D("", !0)
], 64))
], 64)) : D("", !0),
!a.isZoomed && !a.hideHint ? (T(), A("span", xa)) : D("", !0)
], 16);
}
const Sa = /* @__PURE__ */ Jt(ba, [["render", Ma], ["__scopeId", "data-v-915d2827"]]), Aa = { key: 0 }, Ia = { class: "konnectio-hotel-reservation-warning" }, Oa = { class: "konnectio-hotel-reservation-warning" }, za = { class: "konnectio-hotel-reservation-warning" }, Ea = { class: "konnectio-hotel-reservation-title" }, Ba = { class: "konnectio-hotel-reservation-information" }, Za = { class: "konnectio-hotel-reservation-guests" }, Da = { key: 0 }, Na = {
key: 0,
class: "konnectio-hotel-reservation-room-name"
};
const Ra = { key: 0 }, Ha = { key: 1 }, Va = { key: 0 }, Fa = { class: "konnectio-reservation-actions" }, Ga = {
key: 0,
class: "konnectio-newsletter-signup"
}, Ua = {
key: 1,
class: "konnectio-accept-terms"
}, $a = { class: "konnectio-hotel-reservation-tooltip" }, Wa = /* @__PURE__ */ Ht({
__name: "HotelReservationForm",
props: {
forceArrivalTime: {},
forceDepartureTime: {},
showGiftCard: { type: Boolean, default: !1 },
showTermsNotice: { type: Boolean, default: !1 },
prevCallback: {}
},
setup(a) {
const { t: u } = Xt(), {
disableNewsletterSignup: h,
currency: p
} = Kt(Ee()), {
hasArrivalDepartureInputs: v
} = Ee(), {
arrivalTime: o,
departureTime: r,
roomDisplay: d,
templateID: f,
totalPrice: m,
areListingsLoading: y,
getSelectedPackageRoom: g,
selectedPackage: w,
discountVouchers: P,
currentArrivalDate: S,
currentDepartureDate: x,
datesMismatch: R,
currentLocation: Z,
locationMismatch: z,
newsMails: $,
termsOfService: ct,
discountCode: st,
hasTermOfService: xt,
acceptTerms: bt,
totalTemplateAddonPrice: It,
totalRooms: H,
totalAdults: at,
totalChildren: et,
templateRoomTotalPrice: K,
weekendFee: Lt
} = Kt(me()), { hasHotelLocations: mt } = Kt(Ci()), { removeRoom: Ot, validateDiscountCode: gt, getMandatoryRoomGroupAddons: Et } = me(), { getHotelLocationName: W } = Ci(), ue = Ut(!1);
function V(it) {
return it.reduce((kt, { totalPrice: q }) => kt + q, 0);
}
return (it, ut) => {
const kt = Mr("tooltip");
return T(), lt(qr, {
"discount-code": c(st),
"onUpdate:discountCode": ut[4] || (ut[4] = (q) => At(st) ? st.value = q : null),
"validate-discount-code": c(gt),
"total-price": c(m),
"weekend-fee": c(Lt),
"show-gift-card": it.showGiftCard,
"show-terms-notice": it.showTermsNotice,
"is-sidebar-loading": c(y),
notice: c(u)("hotel.reservationNotice"),
"prev-callback": it.prevCallback
}, Sr({
form: tt(() => [
Qn(it.$slots, "form", {}, void 0, !0)
]),
"price-summary": tt(() => [
isNaN(c(f)) && c(d).length > 0 ? (T(!0), A(ht, { key: 0 }, Ct(c(d), ({
roomGroupID: q,
title: nt,
variants: J
}) => (T(), A("div", { key: q }, [
b("h6", null, [
b("span", null, I(c(_e)(nt)), 1)
]),
(T(!0), A(ht, null, Ct(J, (Zt, Dt) => (T(), A("div", { key: Dt }, [
(T(!0), A(ht, null, Ct(Zt.rooms, (Bt, $t) => (T(), A("ul", { key: $t }, [
b("li", null, [
b("span", Ea, I(c(_e)(Zt.name)), 1),
b("span", Ba, [
b("span", Za, [
b("span", null, [
B(Mt, {
icon: "male",
type: "fas",
color: "font"
}),
b("span", null, I(Bt.adultsCount), 1)
]),
Bt.childrenCount > 0 ? (T(), A("span", Da, [
B(Mt, {
icon: "child",
type: "fas",
color: "font"
}),
b("span", null, I(Bt.childrenCount), 1)
])) : D("", !0)
]),
Bt.roomName ? (T(), A("span", Na, "(" + I(Bt.roomName) + ")", 1)) : D("", !0)
]),
b("b", null, [
b("span", null, I(c(ie)(Bt.totalPrice, c(p))), 1),
D("", !0)
])
]),
V(Bt.roomAddons) > 0 ? (T(), A("li", Ra, [
b("span", null, I(c(u)("general.addons")), 1),
b("b", null, I(c(ie)(V(Bt.roomAddons), c(p))), 1)
])) : D("", !0)
]))), 128))
]))), 128))
]))), 128)) : D("", !0),
c(g) && c(w) ? (T(), A("div", Ha, [
b("h6", null, [
b("span", null, I(c(_e)(c(w).name)), 1)
]),
b("div", null, [
b("ul", null, [
b("li", null, [
b("span", null, [
b("span", null, I(c(_e)(c(g).title)), 1)
]),
b("b", null, [
b("span", null, I(c(ie)(c(K), c(p))), 1)
]),
c(Et)(c(g).id) ? (T(!0), A(ht, { key: 0 }, Ct(c(Et)(c(g).id), (q) => (T(), A(ht, null, [
b("span", null, "- " + I(q.name), 1),
b("b", null, [
b("span", null, I(c(ie)(q.price, c(p))), 1)
])
], 64))), 256)) : D("", !0)
]),
c(It) ? (T(), A("li", Va, [
b("span", null, I(c(u)("general.addons")), 1),
b("b", null, I(c(ie)(c(It), c(p))), 1)
])) : D("", !0)
])
])
])) : D("", !0)
]),
actions: tt(() => [
b("ul", Fa, [
c(h) ? D("", !0) : (T(), A("div", Ga, [
B(ro, {
modelValue: c($),
"onUpdate:modelValue": ut[0] || (ut[0] = (q) => At($) ? $.value = q : null),
type: "checkbox",
name: "newsletter",
label: c(u)("booking.reservation.newsletterSignUp")
}, null, 8, ["modelValue", "label"])
])),
c(xt) ? (T(), A("div", Ua, [
B(ro, {
modelValue: c(bt),
"onUpdate:modelValue": ut[2] || (ut[2] = (q) => At(bt) ? bt.value = q : null),
type: "checkbox",
name: "terms"
}, {
default: tt(() => [
B(c(Ar), {
keypath: "general.termsAndConditionsCheckbox",
tag: "span",
scope: "global"
}, {
terms: tt(() => [
b("a", {
class: "konnectio-accept-terms-link",
onClick: ut[1] || (ut[1] = Pi((q) => ue.value = !0, ["prevent"]))
}, [
b("span", null, I(c(to)(c(u)("general.termsAndConditions"))), 1)
])
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"])
])) : D("", !0),
Qn(it.$slots, "actions", {}, void 0, !0),
B(na, {
modelValue: ue.value,
"onUpdate:modelValue": ut[3] || (ut[3] = (q) => ue.value = q),
description: c(ct)
}, null, 8, ["modelValue", "description"])
])
]),
navigation: tt(() => [
Qn(it.$slots, "navigation", {}, void 0, !0)
]),
"mobile-under-price": tt(() => [
b("span", null, I(c(u)("general.for")) + ": ", 1),
b("b", null, I(c(bi)(c(S), c(x))) + " " + I(c(to)(c(bi)(c(S), c(x)) === 1 ? c(u)("booking.reservation.night") : c(u)("booking.reservation.nights"))), 1),
ke((T(), A("span", $a, [
B(Mt, {
icon: "circle-info",
type: "fas"
})
])), [
[kt, {
content: `<span>(${c(ae)(c(S))} - ${c(ae)(c(x))})</span>`,
classes: ["tooltip", "konnectio-tooltip"],
html: !0
}]
])
]),
"mobile-summary": tt(() => [
b("span", null, I(`${c(at)} ${c(at) === 1 ? c(u)("general.adult") : c(u)("general.adults")}`), 1),
b("span", null, I(`${c(et)} ${c(et) === 1 ? c(u)("general.child") : c(u)("general.children")}`), 1),
b("span", null, I(`${c(H)} ${c(H) === 1 ? c(u)("booking.reservation.room") : c(u)("booking.reservation.rooms")}`), 1)
]),
_: 2
}, [
isNaN(c(Z)) ? void 0 : {
name: "reservation-summary",
fn: tt(() => [
c(mt) ? (T(), A("li", Aa, [
b("span", null, I(c(u)("general.location")), 1),
b("b", null, [
b("span", null, I(c(W)(c(Z))), 1),
ke(b("span", Ia, [
B(Mt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[ze, c(z)]
])
])
])) : D("", !0),
b("li", null, [
b("span", null, I(c(u)("booking.reservation.arrival")), 1),
b("b", null, [
b("span", null, I(c(v)(c(Z)) ? `${c(ae)(c(S))}, ${c(o)}` : c(ae)(c(S))), 1),
ke(b("span", Oa, [
B(Mt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[ze, c(R)]
])
])
]),
b("li", null, [
b("span", null, I(c(u)("booking.reservation.departure")), 1),
b("b", null, [
b("span", null, I(c(v)(c(Z)) ? `${c(ae)(c(x))}, ${c(r)}` : c(ae)(c(x))), 1),
ke(b("span", za, [
B(Mt, {
icon: "exclamation-triangle",
type: "fas"
})
], 512), [
[ze, c(R)]
])
])
]),
b("li", null, [
b("span", null, I(c(u)("booking.reservation.nights")), 1),
b("b", null, I(c(bi)(c(S), c(x))) + " " + I(c(to)(c(bi)(c(S), c(x)) === 1 ? c(u)("booking.reservation.night") : c(u)("booking.reservation.nights"))), 1)
]),
c(P) ? (T(!0), A(ht, { key: 1 }, Ct(c(P), (q) => (T(), A("li", {
key: q.id
}, [
b("span", null, I(`${c(u)("general.discountCode")} (${q.value})`), 1),
b("b", null, I(q.key), 1)
]))), 128)) : D("", !0)
]),
key: "0"
}
]), 1032, ["discount-code", "validate-discount-code", "total-price", "weekend-fee", "show-gift-card", "show-terms-notice", "is-sidebar-loading", "notice", "prev-callback"]);
};
}
}), oo = /* @__PURE__ */ Jt(Wa, [["__scopeId", "data-v-3b118a32"]]), qa = { id: "konnectio-hotel-guest-discount" }, ja = { class: "konnectio-panel" }, Ya = { id: "konnectio-hotel-guest-discount-title" }, Ka = ["innerHTML"], Xa = /* @__PURE__ */ Ht({
__name: "GuestDiscountForm",
setup(a) {
const { t: u } = Xt(), h = so("history"), p = me(), { display: v } = fo(), o = Ut();
async function r() {
if (!o.value) {
v({
message: u("alert.error.guestDiscountEmpty"),
type: "error"
});
return;
}
if (isNaN(o.value)) {
v({
message: u("alert.error.guestDiscountNan"),
type: "error"
});
return;
}
await p.checkGuestDiscount(o.value) && (h.gid = o.value.toString());
}
return (d, f) => (T(), A("form", qa, [
b("div", ja, [
b("h3", Ya, [
b("span", null, I(c(u)("guestDiscount.title")), 1)
]),
b("p", {
innerHTML: c(u)("guestDiscount.description")
}, null, 8, Ka),
B(ra, {
modelValue: o.value,
"onUpdate:modelValue": f[0] || (f[0] = (m) => o.value = m),
label: c(u)("guestDiscount.guestDiscountCode"),
placeholder: "XXXXXX",
inputType: "number",
"button-label": c(u)("guestDiscount.submitButton"),
icon: "user-tag",
"button-icon": "paper-plane-top",
secondary: "",
onAction: r
}, null, 8, ["modelValue", "label", "button-label"])
])
]));
}
}), Ja = /* @__PURE__ */ Jt(Xa, [["__scopeId", "data-v-8c6e1f7e"]]), Qa = { class: "konnectio-room-config-option" }, tl = { key: 0 }, el = { class: "konnectio-selected-room-config" }, il = { class: "konnectio-selected-room-config-people" }, nl = { key: 0 }, ol = { class: "konnectio-selected-room-config-price" }, sl = /* @__PURE__ */ Ht({
__name: "RoomConfigField",
props: {
modelValue: {},
options: {},
required: { type: Boolean, default: !1 },
readonly: { type: Boolean, default: !1 },
label: {}
},
emits: ["update:modelValue"],
setup(a, { emit: u }) {
const { t: h } = Xt(), { currency: p } = Kt(Ee()), v = u, o = a;
function r(f) {
v("update:modelValue", f);
}
const d = Tt({
get: () => o.modelValue,
set: (f) => r(f)
});
return (f, m) => (T(), lt(cn, {
modelValue: d.value,
"onUpdate:modelValue": m[0] || (m[0] = (y) => d.value = y),
label: f.label,
placeholder: "Select guest configuration",
labelKey: "label",
valueKey: "value",
"icon-placement": "label",
options: f.options,
readonly: f.readonly,
required: f.required,
searchable: !1
}, {
option: tt(({ data: y }) => [
b("span", Qa, [
b("div", null, [
B(Mt, {
icon: "male",
type: "fas",
color: "font"
}),
b("span", null, I(`${y.adults}`), 1),
y.children > 0 ? (T(), A("span", tl, [
B(Mt, {
icon: "child",
type: "fas",
color: "font"
}),
b("span", null, I(`${y.children}`), 1)
])) : D("", !0)
]),
b("span", null, I(`(${c(ie)(y.price, c(p))})`), 1)
])
]),
"selected-option": tt(({ data: y }) => [
b("div", el, [
b("div", il, [
b("div", null, [
D("", !0),
b("span", null, I(`${y.adults} ${y.adults === 1 ? c(h)("general.adult") : c(h)("general.adults")}`), 1)
]),
y.children > 0 ? (T(), A("div", nl, [
D("", !0),
b("span", null, I(`& ${y.children} ${y.children === 1 ? c(h)("general.child") : c(h)("general.children")}`), 1)
])) : D("", !0)
]),
b("div", ol, [
m[1] || (m[1] = b("span", null, null, -1)),
ys(" " + I(`(${c(ie)(y.price, c(p))})`), 1)
])
])
]),
_: 1
}, 8, ["modelValue", "label", "options", "readonly", "required"]));
}
}), rl = /* @__PURE__ */ Jt(sl, [["__scopeId", "data-v-c4045bfc"]]);
var ki = { exports: {} };
/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
var al = ki.exports, us;
function ll() {
return us || (us = 1, function(a, u) {
(function(h, p) {
p(u);
})(al, function(h) {
var p = "1.9.4";
function v(t) {
var e, i, n, s;
for (i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (e in s)
t[e] = s[e];
}
return t;
}
var o = Object.create || /* @__PURE__ */ function() {
function t() {
}
return function(e) {
return t.prototype = e, new t();
};
}();
function r(t, e) {
var i = Array.prototype.slice;
if (t.bind)
return t.bind.apply(t, i.call(arguments, 1));
var n = i.call(arguments, 2);
return function() {
return t.apply(e, n.length ? n.concat(i.call(arguments)) : arguments);
};
}
var d = 0;
function f(t) {
return "_leaflet_id" in t || (t._leaflet_id = ++d), t._leaflet_id;
}
function m(t, e, i) {
var n, s, l, _;
return _ = function() {
n = !1, s && (l.apply(i, s), s = !1);
}, l = function() {
n ? s = arguments : (t.apply(i, arguments), setTimeout(_, e), n = !0);
}, l;
}
function y(t, e, i) {
var n = e[1], s = e[0], l = n - s;
return t === n && i ? t : ((t - s) % l + l) % l + s;
}
function g() {
return !1;
}
function w(t, e) {
if (e === !1)
return t;
var i = Math.pow(10, e === void 0 ? 6 : e);
return Math.round(t * i) / i;
}
function P(t) {
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
}
function S(t) {
return P(t).split(/\s+/);
}
function x(t, e) {
Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? o(t.options) : {});
for (var i in e)
t.options[i] = e[i];
return t.options;
}
function R(t, e, i) {
var n = [];
for (var s in t)
n.push(encodeURIComponent(i ? s.toUpperCase() : s) + "=" + encodeURIComponent(t[s]));
return (!e || e.indexOf("?") === -1 ? "?" : "&") + n.join("&");
}
var Z = /\{ *([\w_ -]+) *\}/g;
function z(t, e) {
return t.replace(Z, function(i, n) {
var s = e[n];
if (s === void 0)
throw new Error("No value provided for variable " + i);
return typeof s == "function" && (s = s(e)), s;
});
}
var $ = Array.isArray || function(t) {
return Object.prototype.toString.call(t) === "[object Array]";
};
function ct(t, e) {
for (var i = 0; i < t.length; i++)
if (t[i] === e)
return i;
return -1;
}
var st = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
function xt(t) {
return window["webkit" + t] || window["moz" + t] || window["ms" + t];
}
var bt = 0;
function It(t) {
var e = +/* @__PURE__ */ new Date(), i = Math.max(0, 16 - (e - bt));
return bt = e + i, window.setTimeout(t, i);
}
var H = window.requestAnimationFrame || xt("RequestAnimationFrame") || It, at = window.cancelAnimationFrame || xt("CancelAnimationFrame") || xt("CancelRequestAnimationFrame") || function(t) {
window.clearTimeout(t);
};
function et(t, e, i) {
if (i && H === It)
t.call(e);
else
return H.call(window, r(t, e));
}
function K(t) {
t && at.call(window, t);
}
var Lt = {
__proto__: null,
extend: v,
create: o,
bind: r,
get lastId() {
return d;
},
stamp: f,
throttle: m,
wrapNum: y,
falseFn: g,
formatNum: w,
trim: P,
splitWords: S,
setOptions: x,
getParamString: R,
template: z,
isArray: $,
indexOf: ct,
emptyImageUrl: st,
requestFn: H,
cancelFn: at,
requestAnimFrame: et,
cancelAnimFrame: K
};
function mt() {
}
mt.extend = function(t) {
var e = function() {
x(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
}, i = e.__super__ = this.prototype, n = o(i);
n.constructor = e, e.prototype = n;
for (var s in this)
Object.prototype.hasOwnProperty.call(this, s) && s !== "prototype" && s !== "__super__" && (e[s] = this[s]);
return t.statics && v(e, t.statics), t.includes && (Ot(t.includes), v.apply(null, [n].concat(t.includes))), v(n, t), delete n.statics, delete n.includes, n.options && (n.options = i.options ? o(i.options) : {}, v(n.options, t.options)), n._initHooks = [], n.callInitHooks = function() {
if (!this._initHooksCalled) {
i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
for (var l = 0, _ = n._initHooks.length; l < _; l++)
n._initHooks[l].call(this);
}
}, e;
}, mt.include = function(t) {
var e = this.prototype.options;
return v(this.prototype, t), t.options && (this.prototype.options = e, this.mergeOptions(t.options)), this;
}, mt.mergeOptions = function(t) {
return v(this.prototype.options, t), this;
}, mt.addInitHook = function(t) {
var e = Array.prototype.slice.call(arguments, 1), i = typeof t == "function" ? t : function() {
this[t].apply(this, e);
};
return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this;
};
function Ot(t) {
if (!(typeof L > "u" || !L || !L.Mixin)) {
t = $(t) ? t : [t];
for (var e = 0; e < t.length; e++)
t[e] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", new Error().stack);
}
}
var gt = {
/* @method on(type: String, fn: Function, context?: Object): this
* Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).
*
* @alternative
* @method on(eventMap: Object): this
* Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
*/
on: function(t, e, i) {
if (typeof t == "object")
for (var n in t)
this._on(n, t[n], e);
else {
t = S(t);
for (var s = 0, l = t.length; s < l; s++)
this._on(t[s], e, i);
}
return this;
},
/* @method off(type: String, fn?: Function, context?: Object): this
* Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.
*
* @alternative
* @method off(eventMap: Object): this
* Removes a set of type/listener pairs.
*
* @alternative
* @method off: this
* Removes all listeners to all events on the object. This includes implicitly attached events.
*/
off: function(t, e, i) {
if (!arguments.length)
delete this._events;
else if (typeof t == "object")
for (var n in t)
this._off(n, t[n], e);
else {
t = S(t);
for (var s = arguments.length === 1, l = 0, _ = t.length; l < _; l++)
s ? this._off(t[l]) : this._off(t[l], e, i);
}
return this;
},
// attach listener (without syntactic sugar now)
_on: function(t, e, i, n) {
if (typeof e != "function") {
console.warn("wrong listener type: " + typeof e);
return;
}
if (this._listens(t, e, i) === !1) {
i === this && (i = void 0);
var s = { fn: e, ctx: i };
n && (s.once = !0), this._events = this._events || {}, this._events[t] = this._events[t] || [], this._events[t].push(s);
}
},
_off: function(t, e, i) {
var n, s, l;
if (this._events && (n = this._events[t], !!n)) {
if (arguments.length === 1) {
if (this._firingCount)
for (s = 0, l = n.length; s < l; s++)
n[s].fn = g;
delete this._events[t];
return;
}
if (typeof e != "function") {
console.warn("wrong listener type: " + typeof e);
return;
}
var _ = this._listens(t, e, i);
if (_ !== !1) {
var k = n[_];
this._firingCount && (k.fn = g, this._events[t] = n = n.slice()), n.splice(_, 1);
}
}
},
// @method fire(type: String, data?: Object, propagate?: Boolean): this
// Fires an event of the specified type. You can optionally provide a data
// object — the first argument of the listener function will contain its
// properties. The event can optionally be propagated to event parents.
fire: function(t, e, i) {
if (!this.listens(t, i))
return this;
var n = v({}, e, {
type: t,
target: this,
sourceTarget: e && e.sourceTarget || this
});
if (this._events) {
var s = this._events[t];
if (s) {
this._firingCount = this._firingCount + 1 || 1;
for (var l = 0, _ = s.length; l < _; l++) {
var k = s[l], C = k.fn;
k.once && this.off(t, C, k.ctx), C.call(k.ctx || this, n);
}
this._firingCount--;
}
}
return i && this._propagateEvent(n), this;
},
// @method listens(type: String, propagate?: Boolean): Boolean
// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean
// Returns `true` if a particular event type has any listeners attached to it.
// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.
listens: function(t, e, i, n) {
typeof t != "string" && console.warn('"string" type argument expected');
var s = e;
typeof e != "function" && (n = !!e, s = void 0, i = void 0);
var l = this._events && this._events[t];
if (l && l.length && this._listens(t, s, i) !== !1)
return !0;
if (n) {
for (var _ in this._eventParents)
if (this._eventParents[_].listens(t, e, i, n))
return !0;
}
return !1;
},
// returns the index (number) or false
_listens: function(t, e, i) {
if (!this._events)
return !1;
var n = this._events[t] || [];
if (!e)
return !!n.length;
i === this && (i = void 0);
for (var s = 0, l = n.length; s < l; s++)
if (n[s].fn === e && n[s].ctx === i)
return s;
return !1;
},
// @method once(…): this
// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.
once: function(t, e, i) {
if (typeof t == "object")
for (var n in t)
this._on(n, t[n], e, !0);
else {
t = S(t);
for (var s = 0, l = t.length; s < l; s++)
this._on(t[s], e, i, !0);
}
return this;
},
// @method addEventParent(obj: Evented): this
// Adds an event parent - an `Evented` that will receive propagated events
addEventParent: function(t) {
return this._eventParents = this._eventParents || {}, this._eventParents[f(t)] = t, this;
},
// @method removeEventParent(obj: Evented): this
// Removes an event parent, so it will stop receiving propagated events
removeEventParent: function(t) {
return this._eventParents && delete this._eventParents[f(t)], this;
},
_propagateEvent: function(t) {
for (var e in this._eventParents)
this._eventParents[e].fire(t.type, v({
layer: t.target,
propagatedFrom: t.target
}, t), !0);
}
};
gt.addEventListener = gt.on, gt.removeEventListener = gt.clearAllEventListeners = gt.off, gt.addOneTimeEventListener = gt.once, gt.fireEvent = gt.fire, gt.hasEventListeners = gt.listens;
var Et = mt.extend(gt);
function W(t, e, i) {
this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e;
}
var ue = Math.trunc || function(t) {
return t > 0 ? Math.floor(t) : Math.ceil(t);
};
W.prototype = {
// @method clone(): Point
// Returns a copy of the current point.
clone: function() {
return new W(this.x, this.y);
},
// @method add(otherPoint: Point): Point
// Returns the result of addition of the current and the given points.
add: function(t) {
return this.clone()._add(V(t));
},
_add: function(t) {
return this.x += t.x, this.y += t.y, this;
},
// @method subtract(otherPoint: Point): Point
// Returns the result of subtraction of the given point from the current.
subtract: function(t) {
return this.clone()._subtract(V(t));
},
_subtract: function(t) {
return this.x -= t.x, this.y -= t.y, this;
},
// @method divideBy(num: Number): Point
// Returns the result of division of the current point by the given number.
divideBy: function(t) {
return this.clone()._divideBy(t);
},
_divideBy: function(t) {
return this.x /= t, this.y /= t, this;
},
// @method multiplyBy(num: Number): Point
// Returns the result of multiplication of the current point by the given number.
multiplyBy: function(t) {
return this.clone()._multiplyBy(t);
},
_multiplyBy: function(t) {
return this.x *= t, this.y *= t, this;
},
// @method scaleBy(scale: Point): Point
// Multiply each coordinate of the current point by each coordinate of
// `scale`. In linear algebra terms, multiply the point by the
// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)
// defined by `scale`.
scaleBy: function(t) {
return new W(this.x * t.x, this.y * t.y);
},
// @method unscaleBy(scale: Point): Point
// Inverse of `scaleBy`. Divide each coordinate of the current point by
// each coordinate of `scale`.
unscaleBy: function(t) {
return new W(this.x / t.x, this.y / t.y);
},
// @method round(): Point
// Returns a copy of the current point with rounded coordinates.
round: function() {
return this.clone()._round();
},
_round: function() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
},
// @method floor(): Point
// Returns a copy of the current point with floored coordinates (rounded down).
floor: function() {
return this.clone()._floor();
},
_floor: function() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
},
// @method ceil(): Point
// Returns a copy of the current point with ceiled coordinates (rounded up).
ceil: function() {
return this.clone()._ceil();
},
_ceil: function() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
},
// @method trunc(): Point
// Returns a copy of the current point with truncated coordinates (rounded towards zero).
trunc: function() {
return this.clone()._trunc();
},
_trunc: function() {
return this.x = ue(this.x), this.y = ue(this.y), this;
},
// @method distanceTo(otherPoint: Point): Number
// Returns the cartesian distance between the current and the given points.
distanceTo: function(t) {
t = V(t);
var e = t.x - this.x, i = t.y - this.y;
return Math.sqrt(e * e + i * i);
},
// @method equals(otherPoint: Point): Boolean
// Returns `true` if the given point has the same coordinates.
equals: function(t) {
return t = V(t), t.x === this.x && t.y === this.y;
},
// @method contains(otherPoint: Point): Boolean
// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
contains: function(t) {
return t = V(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y);
},
// @method toString(): String
// Returns a string representation of the point for debugging purposes.
toString: function() {
return "Point(" + w