@konnectio/core 4.0.56-rc5 → 4.0.56-rc50

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.
Files changed (189) hide show
  1. package/dist/{ActionField--byx0Lp1.js → ActionField-BQQitCzR.js} +43 -34
  2. package/dist/ActionField-BQQitCzR.js.br +0 -0
  3. package/dist/AvailabilitySkeleton-TZiNrJ8t.js +294 -0
  4. package/dist/AvailabilitySkeleton-TZiNrJ8t.js.br +0 -0
  5. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-DrUxvwDd.js +7814 -0
  6. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_17762b9b_lang-DrUxvwDd.js.br +0 -0
  7. package/dist/CheckoutWindow-DBBmXrsX.js +668 -0
  8. package/dist/CheckoutWindow-DBBmXrsX.js.br +0 -0
  9. package/dist/ErrorMessage-Dw-TLplp.js +45 -0
  10. package/dist/ErrorMessage-Dw-TLplp.js.br +0 -0
  11. package/dist/EventAvailabilityForm-DimufYUP.js +437 -0
  12. package/dist/EventAvailabilityForm-DimufYUP.js.br +0 -0
  13. package/dist/Field-B4x3qSfU.js +50 -0
  14. package/dist/Field-B4x3qSfU.js.br +0 -0
  15. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CyGcXPO9.js +21414 -0
  16. package/dist/Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CyGcXPO9.js.br +0 -0
  17. package/dist/TermsOfService-DLchxC08.js +35 -0
  18. package/dist/TermsOfService-DLchxC08.js.br +0 -0
  19. package/dist/_-C7wxqlYk.js +12 -0
  20. package/dist/_.vue_vue_type_style_index_0_lang-BGyUJK1I.js +68 -0
  21. package/dist/_.vue_vue_type_style_index_0_lang-BGyUJK1I.js.br +0 -0
  22. package/dist/availability.js +96 -147
  23. package/dist/availability.js.br +0 -0
  24. package/dist/deep-link.js +10 -0
  25. package/dist/event.js +732 -495
  26. package/dist/event.js.br +0 -0
  27. package/dist/gift-card-validation.js +132 -75
  28. package/dist/gift-card-validation.js.br +0 -0
  29. package/dist/gift-card.js +363 -408
  30. package/dist/gift-card.js.br +0 -0
  31. package/dist/giftCard-9uCMmY6r.js +127 -0
  32. package/dist/giftCard-9uCMmY6r.js.br +0 -0
  33. package/dist/hotel.js +1480 -2454
  34. package/dist/hotel.js.br +0 -0
  35. package/dist/masonry.plugin-C4-Uj22v.js +12789 -0
  36. package/dist/masonry.plugin-C4-Uj22v.js.br +0 -0
  37. package/dist/polyfill.js +15065 -4765
  38. package/dist/polyfill.js.br +0 -0
  39. package/dist/style.css +1 -1
  40. package/dist/style.css.br +0 -0
  41. package/dist/tracing-Dm-FNj-F.js +11807 -0
  42. package/dist/tracing-Dm-FNj-F.js.br +0 -0
  43. package/package.json +47 -40
  44. package/dist/ActionField--byx0Lp1.js.br +0 -0
  45. package/dist/AvailabilitySkeleton-cL6E9wAp.js +0 -239
  46. package/dist/AvailabilitySkeleton-cL6E9wAp.js.br +0 -0
  47. package/dist/CheckoutWindow-_ZUCAYgm.js +0 -205
  48. package/dist/CheckoutWindow-_ZUCAYgm.js.br +0 -0
  49. package/dist/Container-6UeOakwz.js +0 -68
  50. package/dist/Container-6UeOakwz.js.br +0 -0
  51. package/dist/DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js +0 -8566
  52. package/dist/DateField.vue_vue_type_style_index_0_lang-v-NT3HRG.js.br +0 -0
  53. package/dist/Field-GdMucFcQ.js +0 -42
  54. package/dist/Field-GdMucFcQ.js.br +0 -5
  55. package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js +0 -27240
  56. package/dist/SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js.br +0 -0
  57. package/dist/ThankYou-9pzt2SfJ.js +0 -13475
  58. package/dist/ThankYou-9pzt2SfJ.js.br +0 -0
  59. package/dist/_-5uiOrU07.js +0 -19
  60. package/dist/_commonjsHelpers-4t9S7M5p.js +0 -30
  61. package/dist/assets/typescript/mixins.d.ts +0 -34
  62. package/dist/availability.d.ts +0 -3
  63. package/dist/components/Alert.vue.d.ts +0 -28
  64. package/dist/components/Alert.vue.d.ts.map +0 -1
  65. package/dist/components/Clickable.vue.d.ts +0 -60
  66. package/dist/components/Clickable.vue.d.ts.map +0 -1
  67. package/dist/components/Container.vue.d.ts +0 -23
  68. package/dist/components/Container.vue.d.ts.map +0 -1
  69. package/dist/components/ErrorMessage.vue.d.ts +0 -15
  70. package/dist/components/ErrorMessage.vue.d.ts.map +0 -1
  71. package/dist/components/Gallery.vue.d.ts +0 -31
  72. package/dist/components/Gallery.vue.d.ts.map +0 -1
  73. package/dist/components/GoogleNotice.vue.d.ts +0 -2
  74. package/dist/components/GoogleNotice.vue.d.ts.map +0 -1
  75. package/dist/components/Icon.vue.d.ts +0 -38
  76. package/dist/components/Icon.vue.d.ts.map +0 -1
  77. package/dist/components/Loading.vue.d.ts +0 -29
  78. package/dist/components/Loading.vue.d.ts.map +0 -1
  79. package/dist/components/Spinner.vue.d.ts +0 -2
  80. package/dist/components/Spinner.vue.d.ts.map +0 -1
  81. package/dist/components/forms/EventAvailabilityForm.vue.d.ts +0 -18
  82. package/dist/components/forms/EventAvailabilityForm.vue.d.ts.map +0 -1
  83. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts +0 -34
  84. package/dist/components/forms/HotelAvailabilityForm.vue.d.ts.map +0 -1
  85. package/dist/components/forms/HotelReservationForm.vue.d.ts +0 -41
  86. package/dist/components/forms/HotelReservationForm.vue.d.ts.map +0 -1
  87. package/dist/components/forms/MultiStepForm.vue.d.ts +0 -43
  88. package/dist/components/forms/MultiStepForm.vue.d.ts.map +0 -1
  89. package/dist/components/forms/ReservationForm.vue.d.ts +0 -63
  90. package/dist/components/forms/ReservationForm.vue.d.ts.map +0 -1
  91. package/dist/components/forms/_.vue.d.ts +0 -42
  92. package/dist/components/forms/_.vue.d.ts.map +0 -1
  93. package/dist/components/inputs/Checkbox.vue.d.ts +0 -55
  94. package/dist/components/inputs/Checkbox.vue.d.ts.map +0 -1
  95. package/dist/components/inputs/CheckboxField.vue.d.ts +0 -29
  96. package/dist/components/inputs/CheckboxField.vue.d.ts.map +0 -1
  97. package/dist/components/inputs/DateField.vue.d.ts +0 -104
  98. package/dist/components/inputs/DateField.vue.d.ts.map +0 -1
  99. package/dist/components/inputs/InputField.vue.d.ts +0 -62
  100. package/dist/components/inputs/InputField.vue.d.ts.map +0 -1
  101. package/dist/components/inputs/MediaSelector.vue.d.ts +0 -43
  102. package/dist/components/inputs/MediaSelector.vue.d.ts.map +0 -1
  103. package/dist/components/inputs/NumberField.vue.d.ts +0 -87
  104. package/dist/components/inputs/NumberField.vue.d.ts.map +0 -1
  105. package/dist/components/inputs/SelectField.vue.d.ts +0 -90
  106. package/dist/components/inputs/SelectField.vue.d.ts.map +0 -1
  107. package/dist/components/inputs/TextField.vue.d.ts +0 -68
  108. package/dist/components/inputs/TextField.vue.d.ts.map +0 -1
  109. package/dist/components/inputs/TimeField.vue.d.ts +0 -44
  110. package/dist/components/inputs/TimeField.vue.d.ts.map +0 -1
  111. package/dist/components/inputs/grouped/ActionField.vue.d.ts +0 -72
  112. package/dist/components/inputs/grouped/ActionField.vue.d.ts.map +0 -1
  113. package/dist/components/inputs/grouped/CountryField.vue.d.ts +0 -41
  114. package/dist/components/inputs/grouped/CountryField.vue.d.ts.map +0 -1
  115. package/dist/components/inputs/grouped/NameField.vue.d.ts +0 -71
  116. package/dist/components/inputs/grouped/NameField.vue.d.ts.map +0 -1
  117. package/dist/components/inputs/grouped/PhoneField.vue.d.ts +0 -51
  118. package/dist/components/inputs/grouped/PhoneField.vue.d.ts.map +0 -1
  119. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts +0 -47
  120. package/dist/components/inputs/grouped/RoomConfigField.vue.d.ts.map +0 -1
  121. package/dist/components/listings/Base.vue.d.ts +0 -56
  122. package/dist/components/listings/Base.vue.d.ts.map +0 -1
  123. package/dist/components/listings/Event.vue.d.ts +0 -47
  124. package/dist/components/listings/Event.vue.d.ts.map +0 -1
  125. package/dist/components/listings/Hotel.vue.d.ts +0 -16
  126. package/dist/components/listings/Hotel.vue.d.ts.map +0 -1
  127. package/dist/components/listings/Template.vue.d.ts +0 -21
  128. package/dist/components/listings/Template.vue.d.ts.map +0 -1
  129. package/dist/components/side-panels/Base.vue.d.ts +0 -61
  130. package/dist/components/side-panels/Base.vue.d.ts.map +0 -1
  131. package/dist/components/side-panels/ListingInfo.vue.d.ts +0 -18
  132. package/dist/components/side-panels/ListingInfo.vue.d.ts.map +0 -1
  133. package/dist/components/side-panels/Template.vue.d.ts +0 -18
  134. package/dist/components/side-panels/Template.vue.d.ts.map +0 -1
  135. package/dist/components/side-panels/TermsOfService.vue.d.ts +0 -14
  136. package/dist/components/side-panels/TermsOfService.vue.d.ts.map +0 -1
  137. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts +0 -33
  138. package/dist/components/skeletons/AvailabilitySkeleton.vue.d.ts.map +0 -1
  139. package/dist/components/skeletons/Field.vue.d.ts +0 -36
  140. package/dist/components/skeletons/Field.vue.d.ts.map +0 -1
  141. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts +0 -2
  142. package/dist/components/skeletons/GiftCardSkeleton.vue.d.ts.map +0 -1
  143. package/dist/components/skeletons/HotelSkeleton.vue.d.ts +0 -2
  144. package/dist/components/skeletons/HotelSkeleton.vue.d.ts.map +0 -1
  145. package/dist/components/skeletons/Listing.vue.d.ts +0 -2
  146. package/dist/components/skeletons/Listing.vue.d.ts.map +0 -1
  147. package/dist/components/skeletons/Sidebar.vue.d.ts +0 -2
  148. package/dist/components/skeletons/Sidebar.vue.d.ts.map +0 -1
  149. package/dist/components/skeletons/_.vue.d.ts +0 -36
  150. package/dist/components/skeletons/_.vue.d.ts.map +0 -1
  151. package/dist/components/views/CheckoutWindow.vue.d.ts +0 -2
  152. package/dist/components/views/CheckoutWindow.vue.d.ts.map +0 -1
  153. package/dist/components/views/TermsOfService.vue.d.ts +0 -2
  154. package/dist/components/views/TermsOfService.vue.d.ts.map +0 -1
  155. package/dist/components/views/ThankYou.vue.d.ts +0 -15
  156. package/dist/components/views/ThankYou.vue.d.ts.map +0 -1
  157. package/dist/entries/availability.d.ts +0 -5
  158. package/dist/entries/event.d.ts +0 -2
  159. package/dist/entries/gift-card-validation.d.ts +0 -5
  160. package/dist/entries/gift-card.d.ts +0 -5
  161. package/dist/entries/hotel.d.ts +0 -5
  162. package/dist/entries/navigation.d.ts +0 -1
  163. package/dist/entries/polyfill.d.ts +0 -0
  164. package/dist/event-jnP6wH4w.js +0 -358
  165. package/dist/event-jnP6wH4w.js.br +0 -0
  166. package/dist/event.d.ts +0 -3
  167. package/dist/gift-card-validation.d.ts +0 -3
  168. package/dist/gift-card.d.ts +0 -3
  169. package/dist/hotel.d.ts +0 -3
  170. package/dist/layouts/Availability.vue.d.ts +0 -25
  171. package/dist/layouts/Event.vue.d.ts +0 -18
  172. package/dist/layouts/GiftCard.vue.d.ts +0 -32
  173. package/dist/layouts/GiftCardValidation.vue.d.ts +0 -18
  174. package/dist/layouts/Hotel.vue.d.ts +0 -36
  175. package/dist/layouts/_.vue.d.ts +0 -39
  176. package/dist/navigation.d.ts +0 -1
  177. package/dist/navigation.js +0 -1
  178. package/dist/plugins/i18n.d.ts +0 -5
  179. package/dist/polyfill.d.ts +0 -1
  180. package/dist/store/alert.d.ts +0 -28
  181. package/dist/store/applyGiftCard.d.ts +0 -28
  182. package/dist/store/availability.d.ts +0 -40
  183. package/dist/store/event.d.ts +0 -683
  184. package/dist/store/giftCard.d.ts +0 -83
  185. package/dist/store/payment.d.ts +0 -139
  186. package/dist/store/recaptcha.d.ts +0 -28
  187. package/dist/store/tracking.d.ts +0 -57
  188. package/dist/store/utilities.d.ts +0 -350
  189. package/dist/types/index.d.ts +0 -976
package/dist/gift-card.js CHANGED
@@ -1,130 +1,20 @@
1
- var ve = Object.defineProperty;
2
- var ae = Object.getOwnPropertySymbols;
3
- var ge = Object.prototype.hasOwnProperty, be = Object.prototype.propertyIsEnumerable;
4
- var le = (u, t, s) => t in u ? ve(u, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[t] = s, te = (u, t) => {
5
- for (var s in t || (t = {}))
6
- ge.call(t, s) && le(u, s, t[s]);
7
- if (ae)
8
- for (var s of ae(t))
9
- be.call(t, s) && le(u, s, t[s]);
10
- return u;
11
- };
12
- var J = (u, t, s) => new Promise((o, r) => {
13
- var h = (m) => {
14
- try {
15
- v(s.next(m));
16
- } catch (g) {
17
- r(g);
18
- }
19
- }, f = (m) => {
20
- try {
21
- v(s.throw(m));
22
- } catch (g) {
23
- r(g);
24
- }
25
- }, v = (m) => m.done ? o(m.value) : Promise.resolve(m.value).then(h, f);
26
- v((s = s.apply(u, t)).next());
27
- });
28
- import { d as ye, u as he, s as X, c as ue, r as _, ad as $, e as Y, f as V, j as oe, S as Q, i as ke, h as Ce, ae as _e, k as Z, F as ce, b as Ve, o as p, m as G, w as B, x as d, l as b, p as n, z as e, C as z, n as T, q as pe, I as Fe, _ as me, a2 as Pe, B as we, G as Te, H as ie, af as W, ag as j, a3 as Se, a4 as Ue, J as C, y as $e, a5 as ne, T as H, A as Ee, P as Re, V as qe, U as Ie, W as Ge, a9 as Le } from "./SelectField.vue_vue_type_style_index_0_lang-XwPp5AXD.js";
29
- import { C as Me } from "./Container-6UeOakwz.js";
30
- import { a as xe, C as se, P as Be, _ as ze } from "./CheckoutWindow-_ZUCAYgm.js";
31
- import { E as Ae } from "./_-5uiOrU07.js";
32
- import { F as x } from "./Field-GdMucFcQ.js";
33
- import "./_commonjsHelpers-4t9S7M5p.js";
34
- const re = ye("giftCard", () => {
35
- const { pay: u } = he(), { bearerToken: t, metaData: s, currencyId: o } = X(ue()), r = _($.InitialState), h = Y("konnectio_name", "", void 0, { serializer: Q.string }), f = Y("konnectio_email", "", void 0, { serializer: Q.string }), v = Y("konnectio_phone", "", void 0, { serializer: Q.string }), m = _(""), g = _(1), S = _(!0), L = _(""), k = _({
36
- base64: "",
37
- type: "",
38
- name: ""
39
- }), l = _(void 0), c = _(0), y = _(!1), R = _(0), F = V(() => r.value === $.InitialState || r.value === $.WaitingForResponse), q = V(() => r.value === $.ReadyToPay), M = V(() => r.value === $.PaymentSuccess), P = V(() => {
40
- const a = {
41
- 1: {
42
- label: oe.t("giftCard.hotelType"),
43
- data: []
44
- },
45
- 2: {
46
- label: oe.t("giftCard.restaurantType"),
47
- data: []
48
- }
49
- }, U = s.value.hotels[0].places;
50
- return U && U.forEach((w) => {
51
- a[w.placeType].data.push(w);
52
- }), Object.fromEntries(
53
- Object.entries(a).filter(([, w]) => w.data.length > 0)
54
- );
55
- }), A = V(() => R.value !== 0), E = V(() => {
56
- let a;
57
- if (A.value)
58
- a = P.value[R.value].data[0];
59
- else if (c.value !== 0) {
60
- const U = l.value, w = P.value[c.value].data;
61
- w.length === 1 ? a = w[0] : U !== void 0 && w.forEach((ee) => {
62
- String(ee.id) === String(U) && (a = ee);
63
- });
64
- }
65
- return a;
66
- }), D = V(() => !(!h.value || !f.value || !(v.value.length >= 5) || !m.value || E.value === void 0)), O = V(() => !(r.value === $.InitialState && y.value)), K = V(() => !!(r.value === $.WaitingForResponse && y.value));
67
- function I() {
68
- return J(this, null, function* () {
69
- r.value = $.WaitingForResponse, y.value = !0, yield ke.post("https://production.hotel-service.konnectio.dk/api/gift-card/create", {
70
- termsOfserviceURL: window.location.origin,
71
- checkoutUrl: window.location.origin,
72
- currencyID: o.value,
73
- language: Ce(),
74
- amount: m.value,
75
- quantity: g.value,
76
- freeText: L.value,
77
- showPrice: S.value,
78
- contactName: h.value,
79
- contactEmail: f.value,
80
- contactPhone: v.value,
81
- imageBase64: _e(k.value.base64),
82
- imageName: k.value.name,
83
- imageFormat: k.value.type,
84
- placeType: E.value ? E.value.placeType : void 0,
85
- placeID: E.value ? E.value.id : void 0
86
- }, {
87
- headers: {
88
- Authorization: t.value,
89
- Accept: "application/json",
90
- "Fresh-Booking-Ver": "4.0.56-rc5"
91
- }
92
- }).then((a) => {
93
- r.value = $.ReadyToPay, y.value = !1, u({
94
- callback: () => console.log("Callback!"),
95
- response: a.data
96
- });
97
- });
98
- });
99
- }
100
- function i(a) {
101
- a && (R.value = a);
1
+ import { d as I, r as K, c as Z, o as s, b as w, w as F, g as t, a as v, f as o, u as e, e as g, n as Y, t as G, i as ae, q as oe, h as ne, S as ie, y as T, z as L, F as se, A as re, x as k, p as de, j as ue, k as ce } from "./tracing-Dm-FNj-F.js";
2
+ import { h as B, a as pe, C as S, I as me, E as fe, _ as z, F as be, s as O, b as ve, k as he, L as _e, T as q, l as ge, n as ye, o as ke, p as Ce, q as Ve, H as we, t as Fe } from "./Field.vue_vue_type_style_index_0_scoped_992f78a1_lang-CyGcXPO9.js";
3
+ import { u as D } from "./giftCard-9uCMmY6r.js";
4
+ import { _ as $e } from "./_.vue_vue_type_style_index_0_lang-BGyUJK1I.js";
5
+ import { C as Ee, a as Pe, P as Ue, _ as Ae } from "./CheckoutWindow-DBBmXrsX.js";
6
+ import { F as A } from "./Field-B4x3qSfU.js";
7
+ import { E as Se } from "./ErrorMessage-Dw-TLplp.js";
8
+ import { S as Ie } from "./TermsOfService-DLchxC08.js";
9
+ import "./deep-link.js";
10
+ (function() {
11
+ try {
12
+ var d = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, n = new Error().stack;
13
+ n && (d._sentryDebugIds = d._sentryDebugIds || {}, d._sentryDebugIds[n] = "9de6d9d0-1d6f-41c3-9193-a181eeeab389", d._sentryDebugIdIdentifier = "sentry-dbid-9de6d9d0-1d6f-41c3-9193-a181eeeab389");
14
+ } catch {
102
15
  }
103
- return {
104
- selectedPlace: E,
105
- moduleState: r,
106
- name: h,
107
- email: f,
108
- phone: v,
109
- value: m,
110
- remark: L,
111
- showValue: S,
112
- quantity: g,
113
- media: k,
114
- placeId: l,
115
- placeType: c,
116
- showFormPage: F,
117
- showPaymentPage: q,
118
- showConfirmationPage: M,
119
- places: P,
120
- hasFilledForm: D,
121
- hasForcedPlaceType: A,
122
- isWaitingForResponse: K,
123
- isMetaDataAvailable: O,
124
- orderGiftCard: I,
125
- initialize: i
126
- };
127
- }), De = { class: "media-selector" }, We = ["accept"], je = { class: "media-selector-wrapper" }, He = { class: "media-selector-tools" }, Ne = { key: 0 }, Oe = { key: 1 }, Ke = { key: 2 }, Je = ["src"], Ye = /* @__PURE__ */ Z({
16
+ })();
17
+ const Te = { class: "media-selector" }, Le = ["accept"], qe = { class: "media-selector-wrapper" }, Me = { class: "media-selector-tools" }, Ge = { key: 0 }, Be = { key: 1 }, Re = { key: 2 }, xe = ["src"], De = /* @__PURE__ */ I({
128
18
  __name: "MediaSelector",
129
19
  props: {
130
20
  modelValue: {},
@@ -134,96 +24,94 @@ const re = ye("giftCard", () => {
134
24
  required: { type: Boolean, default: !1 }
135
25
  },
136
26
  emits: ["update:modelValue"],
137
- setup(u, { emit: t }) {
138
- const s = t, o = u, { t: r } = ce(), { display: h } = Ve(), f = _(), v = V(() => o.modelValue.base64 !== "");
139
- function m(l) {
140
- s("update:modelValue", l);
27
+ setup(d, { emit: n }) {
28
+ const m = n, l = d, { t: c } = B(), { display: h } = pe(), p = K(), _ = Z(() => l.modelValue.base64 !== "");
29
+ function u(a) {
30
+ m("update:modelValue", a);
141
31
  }
142
- function g() {
143
- m({
32
+ function y() {
33
+ u({
144
34
  base64: "",
145
35
  name: "",
146
36
  type: ""
147
- }), f.value && (f.value.value = "");
37
+ }), p.value && (p.value.value = "");
148
38
  }
149
- function S() {
150
- f.value && f.value.click();
39
+ function b() {
40
+ p.value && p.value.click();
151
41
  }
152
- function L(l, c) {
153
- const [y, R] = [l.name, l.type], F = new FileReader();
154
- F.onload = function(q) {
155
- if (q.target) {
156
- const M = q.target.result;
157
- c({ base64: M, name: y, type: R });
42
+ function H(a, f) {
43
+ const [V, R] = [a.name, a.type], C = new FileReader();
44
+ C.onload = function(U) {
45
+ if (U.target) {
46
+ const x = U.target.result;
47
+ f({ base64: x, name: V, type: R });
158
48
  } else
159
49
  h({
160
- message: r("imageUploadError"),
50
+ message: c("imageUploadError"),
161
51
  type: "error"
162
52
  });
163
- }, F.readAsDataURL(l);
53
+ }, C.readAsDataURL(a);
164
54
  }
165
- function k() {
166
- return J(this, null, function* () {
167
- let l;
168
- (l = f.value.files) instanceof FileList && L(l[0], m);
169
- });
55
+ async function $() {
56
+ let a;
57
+ (a = p.value.files) instanceof FileList && H(a[0], u);
170
58
  }
171
- return (l, c) => (p(), G(Fe, {
172
- label: l.label,
173
- required: l.required,
59
+ return (a, f) => (s(), w(me, {
60
+ label: a.label,
61
+ required: a.required,
174
62
  type: "media"
175
63
  }, {
176
- default: B(() => [
177
- d("div", De, [
178
- d("input", {
64
+ default: F(() => [
65
+ t("div", Te, [
66
+ t("input", {
179
67
  ref_key: "fileInput",
180
- ref: f,
68
+ ref: p,
181
69
  type: "file",
182
70
  class: "hidden",
183
- accept: l.validation,
71
+ accept: a.validation,
184
72
  single: "",
185
- onChange: c[0] || (c[0] = (y) => k())
186
- }, null, 40, We),
187
- d("div", je, [
188
- d("ul", He, [
189
- v.value ? T("", !0) : (p(), b("li", Ne, [
190
- n(z, {
191
- label: e(r)("uploadFile"),
73
+ onChange: f[0] || (f[0] = (V) => $())
74
+ }, null, 40, Le),
75
+ t("div", qe, [
76
+ t("ul", Me, [
77
+ _.value ? g("", !0) : (s(), v("li", Ge, [
78
+ o(S, {
79
+ label: e(c)("uploadFile"),
192
80
  type: "button",
193
81
  icon: "upload",
194
- "icon-color": l.iconColor,
195
- onClickEvent: c[1] || (c[1] = (y) => S())
82
+ "icon-color": a.iconColor,
83
+ onClickEvent: f[1] || (f[1] = (V) => b())
196
84
  }, null, 8, ["label", "icon-color"])
197
85
  ])),
198
- v.value ? (p(), b("li", Oe, [
199
- n(z, {
200
- label: e(r)("replaceFile"),
86
+ _.value ? (s(), v("li", Be, [
87
+ o(S, {
88
+ label: e(c)("replaceFile"),
201
89
  type: "button",
202
90
  icon: "repeat-alt",
203
- "icon-color": l.iconColor,
204
- onClickEvent: c[2] || (c[2] = (y) => S())
91
+ "icon-color": a.iconColor,
92
+ onClickEvent: f[2] || (f[2] = (V) => b())
205
93
  }, null, 8, ["label", "icon-color"])
206
- ])) : T("", !0),
207
- v.value ? (p(), b("li", Ke, [
208
- n(z, {
209
- label: e(r)("removeFile"),
94
+ ])) : g("", !0),
95
+ _.value ? (s(), v("li", Re, [
96
+ o(S, {
97
+ label: e(c)("removeFile"),
210
98
  type: "button",
211
99
  icon: "trash-alt",
212
- "icon-color": l.iconColor,
213
- onClickEvent: c[3] || (c[3] = (y) => g())
100
+ "icon-color": a.iconColor,
101
+ onClickEvent: f[3] || (f[3] = (V) => y())
214
102
  }, null, 8, ["label", "icon-color"])
215
- ])) : T("", !0)
103
+ ])) : g("", !0)
216
104
  ]),
217
- d("div", {
218
- class: pe([
105
+ t("div", {
106
+ class: Y([
219
107
  "media-selector-previewer",
220
- { opened: v.value }
108
+ { opened: _.value }
221
109
  ])
222
110
  }, [
223
- l.modelValue ? (p(), b("img", {
111
+ a.modelValue ? (s(), v("img", {
224
112
  key: 0,
225
- src: l.modelValue.base64
226
- }, null, 8, Je)) : T("", !0)
113
+ src: a.modelValue.base64
114
+ }, null, 8, xe)) : g("", !0)
227
115
  ], 2)
228
116
  ])
229
117
  ])
@@ -232,9 +120,9 @@ const re = ye("giftCard", () => {
232
120
  }, 8, ["label", "required"]));
233
121
  }
234
122
  });
235
- function de(u) {
236
- const t = u;
237
- t.__i18n = t.__i18n || [], t.__i18n.push({
123
+ function W(d) {
124
+ const n = d;
125
+ n.__i18n = n.__i18n || [], n.__i18n.push({
238
126
  locale: "",
239
127
  resource: {
240
128
  da: {
@@ -252,39 +140,80 @@ function de(u) {
252
140
  }
253
141
  });
254
142
  }
255
- typeof de == "function" && de(Ye);
256
- const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-form" }, Ze = /* @__PURE__ */ Z({
143
+ typeof W == "function" && W(De);
144
+ const ze = { class: "gift-card-skeleton" }, He = { class: "gift-card-skeleton-form" }, je = /* @__PURE__ */ I({
257
145
  __name: "GiftCardSkeleton",
258
- setup(u) {
259
- return (t, s) => (p(), b("div", Qe, [
260
- d("div", Xe, [
261
- n(x),
262
- n(x),
263
- n(x),
264
- n(x),
265
- n(x, { "is-text-area": "" }),
266
- n(Ae, { height: "44px" })
146
+ setup(d) {
147
+ return (n, m) => (s(), v("div", ze, [
148
+ t("div", He, [
149
+ o(A),
150
+ o(A),
151
+ o(A),
152
+ o(A),
153
+ o(A, { "is-text-area": "" }),
154
+ o(fe, { height: "44px" })
267
155
  ])
268
156
  ]));
269
157
  }
270
- }), ea = /* @__PURE__ */ me(Ze, [["__scopeId", "data-v-e35c75b3"]]), aa = {
271
- key: 0,
272
- id: "konnectio-gift-card-wrapper"
273
- }, la = { id: "konnectio-gift-card-title" }, ta = { id: "konnectio-gift-card-content" }, oa = { id: "konnectio-gift-card-payment" }, ia = ["innerHTML"], na = { key: 0 }, sa = {
158
+ }), Ne = /* @__PURE__ */ z(je, [["__scopeId", "data-v-ba3efaa1"]]), Oe = { class: "konnectio-accept-terms" }, We = /* @__PURE__ */ I({
159
+ __name: "_",
160
+ props: {
161
+ content: {},
162
+ buttonLabel: {}
163
+ },
164
+ setup(d) {
165
+ const { t: n } = B(), m = K(!1);
166
+ return (l, c) => (s(), v("div", Oe, [
167
+ o(e(be), {
168
+ keypath: "general.termsAndConditionsNotice",
169
+ tag: "span",
170
+ scope: "global"
171
+ }, {
172
+ button: F(() => [
173
+ t("i", null, '"' + G(l.buttonLabel) + '"', 1)
174
+ ]),
175
+ terms: F(() => [
176
+ t("a", {
177
+ class: "konnectio-accept-terms-link",
178
+ target: "_blank",
179
+ onClick: c[0] || (c[0] = ae((h) => m.value = !0, ["prevent"]))
180
+ }, [
181
+ t("span", null, G(e(n)("general.termsAndConditions")), 1)
182
+ ])
183
+ ]),
184
+ _: 1
185
+ }),
186
+ o(Ie, {
187
+ modelValue: m.value,
188
+ "onUpdate:modelValue": c[1] || (c[1] = (h) => m.value = h),
189
+ description: l.content
190
+ }, null, 8, ["modelValue", "description"])
191
+ ]));
192
+ }
193
+ }), Ke = /* @__PURE__ */ z(We, [["__scopeId", "data-v-f587c956"]]), Ze = /* @__PURE__ */ I({
194
+ __name: "GiftCard",
195
+ setup(d) {
196
+ const { t: n } = B(), m = D();
197
+ return (l, c) => (s(), w(Ke, {
198
+ content: e(m).termsOfService,
199
+ "button-label": e(n)("giftCard.orderGiftCard")
200
+ }, null, 8, ["content", "button-label"]));
201
+ }
202
+ }), Ye = (d) => (de("data-v-06df89c3"), d = d(), ue(), d), Je = ["data-layout"], Qe = { id: "konnectio-gift-card-wrapper" }, Xe = { id: "konnectio-gift-card-title" }, et = { id: "konnectio-gift-card-content" }, tt = { id: "konnectio-gift-card-payment" }, lt = ["innerHTML"], at = { key: 0 }, ot = {
274
203
  key: 0,
275
- id: "fresh-booking-select-place-type"
276
- }, ra = {
277
- class: /* @__PURE__ */ pe(["fresh-booking-label", "required"])
278
- }, da = { id: "fresh-booking-select-place-type-input" }, ua = ["innerHTML"], ca = {
204
+ id: "konnectio-select-place-type"
205
+ }, nt = {
206
+ class: /* @__PURE__ */ Y(["konnectio-label", "required"])
207
+ }, it = { id: "konnectio-select-place-type-input" }, st = ["innerHTML"], rt = {
279
208
  key: 0,
280
209
  id: "konnectio-gift-card-order"
281
- }, pa = { class: "fresh-booking-panel" }, ma = {
210
+ }, dt = { class: "konnectio-panel" }, ut = {
282
211
  key: 1,
283
212
  id: "konnectio-gift-card-remarks"
284
- }, fa = {
213
+ }, ct = {
285
214
  key: 2,
286
215
  id: "konnectio-gift-card-order-minimal"
287
- }, va = { id: "konnectio-gift-card-recaptcha" }, ga = /* @__PURE__ */ Z({
216
+ }, pt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ t("div", { class: "konnectio-divider" }, null, -1)), mt = { id: "konnectio-gift-card-recaptcha" }, ft = /* @__PURE__ */ I({
288
217
  name: "GiftCardLayout",
289
218
  __name: "GiftCard",
290
219
  props: {
@@ -293,207 +222,213 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
293
222
  placeType: {},
294
223
  styling: {}
295
224
  },
296
- setup(u) {
297
- const t = u, s = V(() => te({
298
- panelMaxWidth: "800px"
299
- }, t.styling)), { t: o } = ce(), {
300
- name: r,
225
+ setup(d) {
226
+ const n = d, m = Z(() => ({
227
+ panelMaxWidth: "800px",
228
+ ...n.styling
229
+ })), { t: l } = B(), {
230
+ name: c,
301
231
  email: h,
302
- phone: f,
303
- value: v,
304
- remark: m,
305
- showValue: g,
306
- quantity: S,
307
- media: L,
308
- placeId: k,
309
- placeType: l,
310
- showFormPage: c,
311
- showPaymentPage: y,
232
+ phone: p,
233
+ value: _,
234
+ remark: u,
235
+ showValue: y,
236
+ quantity: b,
237
+ media: H,
238
+ placeId: $,
239
+ placeType: a,
240
+ showFormPage: f,
241
+ showPaymentPage: V,
312
242
  showConfirmationPage: R,
313
- places: F,
314
- hasFilledForm: q,
315
- hasForcedPlaceType: M,
316
- isWaitingForResponse: P,
317
- isMetaDataAvailable: A
318
- } = X(re()), { initialize: E, orderGiftCard: D } = re(), { isRecaptchaEnabled: O, currency: K } = X(ue());
319
- return Pe(l, () => {
320
- k.value = void 0;
321
- }), we(() => {
322
- const I = t.placeType ? parseInt(t.placeType) : void 0;
323
- E(I);
324
- }), (I, i) => (p(), G(Me, { styling: s.value }, {
325
- default: B(() => [
326
- (p(), G(Te, null, {
327
- default: B(() => [
328
- n(Re, {
329
- id: "konnectio-gift-card-module",
330
- type: "gift-card",
331
- "access-token": I.accessToken,
332
- "data-layout": I.layout
243
+ places: C,
244
+ hasFilledForm: U,
245
+ hasForcedPlaceType: x,
246
+ isWaitingForResponse: E
247
+ } = O(D()), { initialize: J, orderGiftCard: j, fetchMetadata: Q } = D(), { isRecaptchaEnabled: X, currency: ee, hasError: te } = O(ve());
248
+ return oe(a, () => {
249
+ $.value = void 0;
250
+ }), ne(() => {
251
+ const P = n.placeType ? parseInt(n.placeType) : void 0;
252
+ J(P);
253
+ }), (P, r) => (s(), w(ye, { styling: m.value }, {
254
+ default: F(() => [
255
+ (s(), w(ie, null, {
256
+ default: F(() => [
257
+ o($e, {
258
+ "access-token": P.accessToken,
259
+ "data-layout": P.layout,
260
+ callback: e(Q)
333
261
  }, {
334
- default: B(() => [
335
- e(A) ? (p(), b("div", aa, [
336
- d("h2", la, [
337
- d("span", null, ie(e(o)("giftCard.title")), 1)
338
- ]),
339
- d("div", ta, [
340
- W(d("div", oa, [
341
- n(xe)
342
- ], 512), [
343
- [j, e(y)]
262
+ default: F(() => [
263
+ e(te) ? (s(), w(Se, {
264
+ key: 1,
265
+ title: "Unable to render Gift card module",
266
+ description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
267
+ })) : (s(), v("div", {
268
+ key: 0,
269
+ id: "konnectio-gift-card-module",
270
+ "data-layout": P.layout
271
+ }, [
272
+ t("div", Qe, [
273
+ t("h2", Xe, [
274
+ t("span", null, G(e(l)("giftCard.title")), 1)
344
275
  ]),
345
- W(d("div", null, [
346
- d("p", {
347
- id: "konnectio-gift-card-description",
348
- innerHTML: e(o)("giftCard.description")
349
- }, null, 8, ia),
350
- d("form", null, [
351
- e(M) ? T("", !0) : (p(), b("div", na, [
352
- e(F) ? (p(), b("div", sa, [
353
- d("label", ra, [
354
- d("span", null, ie(e(o)("giftCard.selectType")), 1)
355
- ]),
356
- d("div", da, [
357
- d("ul", null, [
358
- (p(!0), b(Se, null, Ue(e(F), (a, U) => (p(), b("li", { key: U }, [
359
- n(se, {
360
- modelValue: e(l),
361
- "onUpdate:modelValue": i[0] || (i[0] = (w) => C(l) ? l.value = w : null),
362
- type: "radio",
363
- name: "placeType",
364
- val: U,
365
- label: a.label
366
- }, null, 8, ["modelValue", "val", "label"])
367
- ]))), 128))
276
+ t("div", et, [
277
+ T(t("div", tt, [
278
+ o(Ee)
279
+ ], 512), [
280
+ [L, e(V)]
281
+ ]),
282
+ T(t("div", null, [
283
+ t("p", {
284
+ id: "konnectio-gift-card-description",
285
+ innerHTML: e(l)("giftCard.description")
286
+ }, null, 8, lt),
287
+ t("form", null, [
288
+ e(x) ? g("", !0) : (s(), v("div", at, [
289
+ e(C) ? (s(), v("div", ot, [
290
+ t("label", nt, [
291
+ t("span", null, G(e(l)("giftCard.selectType")), 1)
368
292
  ]),
369
- e(F)[e(l)] && e(F)[e(l)].data.length > 1 ? (p(), G($e, {
370
- key: 0,
371
- modelValue: e(k),
372
- "onUpdate:modelValue": i[1] || (i[1] = (a) => C(k) ? k.value = a : null),
373
- placeholder: e(o)("giftCard.selectPlacePlaceholder"),
374
- options: e(F)[e(l)].data,
375
- labelKey: "name",
376
- valueKey: "id",
377
- required: ""
378
- }, null, 8, ["modelValue", "placeholder", "options"])) : T("", !0)
379
- ])
380
- ])) : (p(), G(ne, { key: 1 }))
381
- ])),
382
- n(H, {
383
- modelValue: e(r),
384
- "onUpdate:modelValue": i[2] || (i[2] = (a) => C(r) ? r.value = a : null),
385
- type: "text",
386
- name: "name",
387
- autocomplete: "name",
388
- label: e(o)("giftCard.name"),
389
- icon: "user-alt",
390
- placeholder: e(o)("giftCard.namePlaceholder"),
391
- required: ""
392
- }, null, 8, ["modelValue", "label", "placeholder"]),
393
- n(H, {
394
- modelValue: e(h),
395
- "onUpdate:modelValue": i[3] || (i[3] = (a) => C(h) ? h.value = a : null),
396
- type: "email",
397
- name: "email",
398
- autocomplete: "email",
399
- label: e(o)("giftCard.email"),
400
- icon: "at",
401
- placeholder: e(o)("giftCard.emailPlaceholder"),
402
- required: ""
403
- }, null, 8, ["modelValue", "label", "placeholder"]),
404
- n(Be, {
405
- modelValue: e(f),
406
- "onUpdate:modelValue": i[4] || (i[4] = (a) => C(f) ? f.value = a : null),
407
- icon: "phone-office",
408
- label: e(o)("giftCard.phone"),
409
- placeholder: e(o)("giftCard.phonePlaceholder"),
410
- required: ""
411
- }, null, 8, ["modelValue", "label", "placeholder"]),
412
- n(H, {
413
- modelValue: e(v),
414
- "onUpdate:modelValue": i[5] || (i[5] = (a) => C(v) ? v.value = a : null),
415
- type: "number",
416
- name: "value",
417
- label: e(o)("giftCard.value"),
418
- icon: "money-bill",
419
- placeholder: e(o)("giftCard.valuePlaceholder"),
420
- suffix: e(K),
421
- required: ""
422
- }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
423
- n(se, {
424
- modelValue: e(g),
425
- "onUpdate:modelValue": i[6] || (i[6] = (a) => C(g) ? g.value = a : null),
426
- type: "checkbox",
427
- name: "showValue",
428
- label: e(o)("giftCard.showValue"),
429
- checked: e(g)
430
- }, null, 8, ["modelValue", "label", "checked"]),
431
- T("", !0),
432
- n(Ee, {
433
- modelValue: e(S),
434
- "onUpdate:modelValue": i[8] || (i[8] = (a) => C(S) ? S.value = a : null),
435
- label: e(o)("giftCard.quantity"),
436
- icon: "gift-card",
437
- required: ""
438
- }, null, 8, ["modelValue", "label"])
293
+ t("div", it, [
294
+ t("ul", null, [
295
+ (s(!0), v(se, null, re(e(C), (i, N) => (s(), v("li", { key: N }, [
296
+ o(Pe, {
297
+ modelValue: e(a),
298
+ "onUpdate:modelValue": r[0] || (r[0] = (le) => k(a) ? a.value = le : null),
299
+ type: "radio",
300
+ name: "placeType",
301
+ val: N,
302
+ label: i.label
303
+ }, null, 8, ["modelValue", "val", "label"])
304
+ ]))), 128))
305
+ ]),
306
+ e(C)[e(a)] && e(C)[e(a)].data.length > 1 ? (s(), w(he, {
307
+ key: 0,
308
+ modelValue: e($),
309
+ "onUpdate:modelValue": r[1] || (r[1] = (i) => k($) ? $.value = i : null),
310
+ placeholder: e(l)("giftCard.selectPlacePlaceholder"),
311
+ options: e(C)[e(a)].data,
312
+ labelKey: "name",
313
+ valueKey: "id",
314
+ required: ""
315
+ }, null, 8, ["modelValue", "placeholder", "options"])) : g("", !0)
316
+ ])
317
+ ])) : (s(), w(_e, { key: 1 }))
318
+ ])),
319
+ o(q, {
320
+ modelValue: e(c),
321
+ "onUpdate:modelValue": r[2] || (r[2] = (i) => k(c) ? c.value = i : null),
322
+ type: "text",
323
+ name: "name",
324
+ autocomplete: "name",
325
+ label: e(l)("giftCard.name"),
326
+ icon: "user-alt",
327
+ placeholder: e(l)("giftCard.namePlaceholder"),
328
+ required: ""
329
+ }, null, 8, ["modelValue", "label", "placeholder"]),
330
+ o(q, {
331
+ modelValue: e(h),
332
+ "onUpdate:modelValue": r[3] || (r[3] = (i) => k(h) ? h.value = i : null),
333
+ type: "email",
334
+ name: "email",
335
+ autocomplete: "email",
336
+ label: e(l)("giftCard.email"),
337
+ icon: "at",
338
+ placeholder: e(l)("giftCard.emailPlaceholder"),
339
+ required: ""
340
+ }, null, 8, ["modelValue", "label", "placeholder"]),
341
+ o(Ue, {
342
+ modelValue: e(p),
343
+ "onUpdate:modelValue": r[4] || (r[4] = (i) => k(p) ? p.value = i : null),
344
+ icon: "phone-office",
345
+ label: e(l)("giftCard.phone"),
346
+ placeholder: e(l)("giftCard.phonePlaceholder"),
347
+ required: ""
348
+ }, null, 8, ["modelValue", "label", "placeholder"]),
349
+ o(q, {
350
+ modelValue: e(_),
351
+ "onUpdate:modelValue": r[5] || (r[5] = (i) => k(_) ? _.value = i : null),
352
+ type: "number",
353
+ name: "value",
354
+ label: e(l)("giftCard.value"),
355
+ icon: "money-bill",
356
+ placeholder: e(l)("giftCard.valuePlaceholder"),
357
+ suffix: e(ee),
358
+ required: ""
359
+ }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
360
+ g("", !0),
361
+ g("", !0),
362
+ o(ge, {
363
+ modelValue: e(b),
364
+ "onUpdate:modelValue": r[8] || (r[8] = (i) => k(b) ? b.value = i : null),
365
+ label: e(l)("giftCard.quantity"),
366
+ icon: "gift-card",
367
+ required: ""
368
+ }, null, 8, ["modelValue", "label"])
369
+ ])
370
+ ], 512), [
371
+ [L, e(f)]
372
+ ]),
373
+ T(t("div", null, [
374
+ t("div", {
375
+ innerHTML: e(l)("giftCard.thankYou")
376
+ }, null, 8, st)
377
+ ], 512), [
378
+ [L, e(R)]
439
379
  ])
440
- ], 512), [
441
- [j, e(c)]
442
380
  ]),
443
- W(d("div", null, [
444
- d("div", {
445
- innerHTML: e(o)("giftCard.thankYou")
446
- }, null, 8, ua)
447
- ], 512), [
448
- [j, e(R)]
449
- ])
450
- ]),
451
- I.layout !== "minimal" && e(c) ? (p(), b("div", ca, [
452
- d("div", pa, [
453
- n(z, {
454
- label: e(o)("giftCard.orderGiftCard"),
381
+ P.layout !== "minimal" && e(f) ? (s(), v("div", rt, [
382
+ t("div", dt, [
383
+ o(S, {
384
+ label: e(l)("giftCard.orderGiftCard"),
385
+ "full-width": !0,
386
+ disabled: !e(U),
387
+ "is-loading": e(E),
388
+ "onUpdate:isLoading": r[9] || (r[9] = (i) => k(E) ? E.value = i : null),
389
+ onClickEvent: e(j)
390
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
391
+ ])
392
+ ])) : g("", !0),
393
+ e(f) ? (s(), v("div", ut, [
394
+ o(q, {
395
+ modelValue: e(u),
396
+ "onUpdate:modelValue": r[10] || (r[10] = (i) => k(u) ? u.value = i : null),
397
+ type: "textarea",
398
+ name: "remark",
399
+ label: e(l)("giftCard.remark"),
400
+ icon: "info-circle",
401
+ placeholder: e(l)("giftCard.remarkPlaceholder")
402
+ }, null, 8, ["modelValue", "label", "placeholder"])
403
+ ])) : g("", !0),
404
+ e(f) ? (s(), v("div", ct, [
405
+ o(S, {
406
+ label: e(l)("giftCard.orderGiftCard"),
455
407
  "full-width": !0,
456
- disabled: !e(q),
457
- "is-loading": e(P),
458
- "onUpdate:isLoading": i[9] || (i[9] = (a) => C(P) ? P.value = a : null),
459
- onClickEvent: e(D)
460
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
461
- ])
462
- ])) : T("", !0),
463
- e(c) ? (p(), b("div", ma, [
464
- n(H, {
465
- modelValue: e(m),
466
- "onUpdate:modelValue": i[10] || (i[10] = (a) => C(m) ? m.value = a : null),
467
- type: "textarea",
468
- name: "remark",
469
- label: e(o)("giftCard.remark"),
470
- icon: "info-circle",
471
- placeholder: e(o)("giftCard.remarkPlaceholder")
472
- }, null, 8, ["modelValue", "label", "placeholder"])
473
- ])) : T("", !0),
474
- e(c) ? (p(), b("div", fa, [
475
- n(z, {
476
- label: e(o)("giftCard.orderGiftCard"),
477
- "full-width": !0,
478
- disabled: !e(q),
479
- "data-test": "orderGiftCard",
480
- "is-loading": e(P),
481
- "onUpdate:isLoading": i[11] || (i[11] = (a) => C(P) ? P.value = a : null),
482
- onClickEvent: e(D)
483
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
484
- W(d("div", va, [
485
- n(ze)
486
- ], 512), [
487
- [j, e(O)]
488
- ])
489
- ])) : T("", !0)
490
- ])) : (p(), G(ne, { key: 1 }))
408
+ disabled: !e(U),
409
+ "data-test": "orderGiftCard",
410
+ "is-loading": e(E),
411
+ "onUpdate:isLoading": r[11] || (r[11] = (i) => k(E) ? E.value = i : null),
412
+ onClickEvent: e(j)
413
+ }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
414
+ t("div", null, [
415
+ pt,
416
+ o(Ze)
417
+ ]),
418
+ T(t("div", mt, [
419
+ o(Ae)
420
+ ], 512), [
421
+ [L, e(X)]
422
+ ])
423
+ ])) : g("", !0)
424
+ ])
425
+ ], 8, Je))
491
426
  ]),
492
427
  _: 1
493
- }, 8, ["access-token", "data-layout"])
428
+ }, 8, ["access-token", "data-layout", "callback"])
494
429
  ]),
495
- fallback: B(() => [
496
- n(ea)
430
+ fallback: F(() => [
431
+ o(Ne)
497
432
  ]),
498
433
  _: 1
499
434
  }))
@@ -501,16 +436,36 @@ const Qe = { class: "gift-card-skeleton" }, Xe = { class: "gift-card-skeleton-fo
501
436
  _: 1
502
437
  }, 8, ["styling"]));
503
438
  }
504
- }), fe = /* @__PURE__ */ me(ga, [["__scopeId", "data-v-ec9ea15b"]]), ba = qe(), N = Ie({ components: { GiftCard: fe } });
505
- N.use(ba);
506
- N.use(Ge);
507
- N.use(Le, { bootstrap: !0 });
508
- N.mount("#konnectio-gift-card-app");
509
- const Pa = {
510
- install: (u) => {
511
- u.component("GiftCard", fe);
439
+ }), M = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-06df89c3"]]), bt = ke(), vt = Fe();
440
+ class ht extends HTMLElement {
441
+ vueApp;
442
+ constructor() {
443
+ super();
512
444
  }
513
- };
445
+ disconnectedCallback() {
446
+ this.vueApp.unmount();
447
+ }
448
+ connectedCallback() {
449
+ const n = typeof M == "function" ? M.options : M;
450
+ let m = Array.isArray(n.props) ? n.props : Object.keys(n.props || {});
451
+ const l = (u) => u.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (y, b) => (b ? "-" : "") + y.toLowerCase()), c = (u) => u.replace(/-./g, (y) => y[1].toUpperCase()), h = {};
452
+ m = m.map(l);
453
+ const p = {};
454
+ for (const u of this.attributes) {
455
+ const b = u.name.split(".");
456
+ b.length > 1 && (p[b[0]] || (p[b[0]] = {}), p[b[0]][c(b[1])] = u.value);
457
+ }
458
+ for (const u of m) {
459
+ let y = this.attributes.getNamedItem(u)?.value;
460
+ p.hasOwnProperty(u) && (y = p[u]), h[u] = y;
461
+ }
462
+ this.vueApp = ce(M, h), Ce(this.vueApp), this.vueApp.provide("emitter", vt), this.vueApp.use(bt), this.vueApp.use(Ve), this.vueApp.use(we, { bootstrap: !0 });
463
+ const _ = document.createElement("div");
464
+ this.vueApp.mount(_), this.appendChild(_.children[0]);
465
+ }
466
+ }
467
+ window.customElements.define("konnectio-gift-card", ht);
514
468
  export {
515
- Pa as default
469
+ ht as default
516
470
  };
471
+ //# sourceMappingURL=gift-card.js.map