@revolugo/elements 7.11.1-alpha.47 → 7.11.1-alpha.48

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 (58) hide show
  1. package/dist/index.es.min.js +1 -1
  2. package/dist/index.es.min.js.map +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/revolugo.min.js +52 -52
  6. package/package.json +3 -3
  7. package/dist/css/fonts.css +0 -1
  8. package/dist/css/revolugo.bookingpaymentform.CekI3oIR.css +0 -1
  9. package/dist/css/revolugo.creditcardstripeform.uQtKM06z.css +0 -1
  10. package/dist/css/revolugo.index.5WWmkTtd.css +0 -1
  11. package/dist/css/revolugo.preferencesmenu.DwotHb97.css +0 -1
  12. package/dist/css/revolugo.revolugoelements.CRtgr3yo.css +0 -1
  13. package/dist/css/revolugo.storybooktoolbar.d_cxquq9.css +0 -1
  14. package/dist/css/revolugo.ui.sAxjrsi6.css +0 -1
  15. package/dist/css/revolugo.vtoolbar.BS4p23lZ.css +0 -1
  16. package/dist/css/revolugo.webcomponentwrapper.LxbCIx-k.css +0 -1
  17. package/dist/revolugo.banktransferdetails.DbyoiQZu.min.js +0 -24
  18. package/dist/revolugo.bookingdetailssidebar.CoN-m_k4.min.js +0 -25
  19. package/dist/revolugo.bookingmanager.Cp1JytyA.min.js +0 -24
  20. package/dist/revolugo.bookingpaymentform.DbRagbbS.min.js +0 -4961
  21. package/dist/revolugo.cancellationpoliciesbadge.CPuuxSE1.min.js +0 -24
  22. package/dist/revolugo.cancellationpolicieslist.CZ3gsmwm.min.js +0 -24
  23. package/dist/revolugo.creditcardstripeform.BbyJUMB6.min.js +0 -25
  24. package/dist/revolugo.creditcardstripeform.DQeNXbYc.min.js +0 -2724
  25. package/dist/revolugo.creditcardstripeform.props.C4lAZ1a1.min.js +0 -35
  26. package/dist/revolugo.currencypickerbtn.BnwolKFO.min.js +0 -25
  27. package/dist/revolugo.dist.CG9L6IPJ.min.js +0 -58
  28. package/dist/revolugo.fastbookingflow.BVln64K4.min.js +0 -34
  29. package/dist/revolugo.framework.DCPRw6A_.min.js +0 -775
  30. package/dist/revolugo.fullbookingflow.B__qPYRy.min.js +0 -24
  31. package/dist/revolugo.hoteldescriptionview.pN4gVR8m.min.js +0 -24
  32. package/dist/revolugo.hotelofferlist.hjUFIAbJ.min.js +0 -24
  33. package/dist/revolugo.hoteloffersearchmenu.DxFVoaas.min.js +0 -24
  34. package/dist/revolugo.hoteloffersmap.vjLh9Stc.min.js +0 -24
  35. package/dist/revolugo.hoteloffersview.Bk_ETnLD.min.js +0 -18
  36. package/dist/revolugo.hotelroomofferlist.czXVZy0r.min.js +0 -24
  37. package/dist/revolugo.hotelroomoffersbookingflow.CJ6Mwr3d.min.js +0 -24
  38. package/dist/revolugo.hotelroomoffersearchmenu.BJiz7qW9.min.js +0 -24
  39. package/dist/revolugo.hotelroomoffersview.Czf9XVX2.min.js +0 -24
  40. package/dist/revolugo.langpickerbtn.DaavBN72.min.js +0 -25
  41. package/dist/revolugo.leaflet-src.5-yo9CNW.min.js +0 -4665
  42. package/dist/revolugo.leaflet-src.esm.PiBUHl3B.min.js +0 -4782
  43. package/dist/revolugo.marker-icon-2x.BBE8dvJp.min.js +0 -8
  44. package/dist/revolugo.marker-icon.VORuIHX9.min.js +0 -8
  45. package/dist/revolugo.marker-shadow.BcaYGGj2.min.js +0 -8
  46. package/dist/revolugo.prebookform.CnIa7yHE.min.js +0 -24
  47. package/dist/revolugo.preferencesmenu.B3z64j6a.min.js +0 -935
  48. package/dist/revolugo.revolugo-config.Bl13psXS.min.js +0 -6582
  49. package/dist/revolugo.revolugoelements.DhHQ969a.min.js +0 -34138
  50. package/dist/revolugo.rolldown-runtime.C2H8viMH.min.js +0 -25
  51. package/dist/revolugo.roominglisteditor.hUzq1ve2.min.js +0 -24
  52. package/dist/revolugo.storybooktoolbar.guIjvH6Q.min.js +0 -982
  53. package/dist/revolugo.termsandconditions.BLXWvMHm.min.js +0 -24
  54. package/dist/revolugo.theme.C-6RdRfZ.min.js +0 -17307
  55. package/dist/revolugo.ui.CaAjcrdQ.min.js +0 -57473
  56. package/dist/revolugo.vtoolbar.DSse09S4.min.js +0 -145
  57. package/dist/revolugo.webcomponentwrapper.5KLwiCNU.min.js +0 -248
  58. package/dist/revolugo2.preferencesmenu.pqya46FU.min.js +0 -24
@@ -1,982 +0,0 @@
1
- import { $t as ye, Cr as P, Dn as Ee, Er as r, It as be, Jr as D, Mn as ie, Mt as ke, Or as N, Pr as ae, Ti as Se, Tr as C, Vr as Ce, Wr as I, br as we, er as Ae, fn as G, hr as J, ii as u, mi as _e, mr as ne, pi as w, pn as Q, pr as q, qn as Le, xr as oe, yi as K, yr as F, zt as Oe } from "./revolugo.theme.C-6RdRfZ.min.js";
2
- import { n as xe } from "./revolugo.revolugo-config.Bl13psXS.min.js";
3
- import { $t as re, D as H, F as se, N as Ve, Rt as X, T as le, Wt as B, en as $, et as de, mt as Ke, nn as Y, ot as ue, q as O, rt as ce, tn as pe } from "./revolugo.ui.CaAjcrdQ.min.js";
4
- import { t as Ie } from "./revolugo.webcomponentwrapper.5KLwiCNU.min.js";
5
- import { t as Me } from "./revolugo.dist.CG9L6IPJ.min.js";
6
- function he(e) {
7
- try {
8
- if (typeof document < "u") {
9
- window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
10
- sheets: [],
11
- components: []
12
- };
13
- const t = import.meta.url, s = t.slice(0, t.lastIndexOf("/") + 1) + e;
14
- window.REVOLUGO_ELEMENTS_STYLES.sheets.push(s);
15
- for (const n of REVOLUGO_ELEMENTS_STYLES.components)
16
- n(s);
17
- if (e.indexOf("fonts") >= 0) {
18
- const n = document.createElement("link");
19
- n.rel = "stylesheet", linK.href = s, document.head.appendChild(n);
20
- }
21
- }
22
- } catch (t) {
23
- console.error("[revolugo-elements] ", t);
24
- }
25
- }
26
- var k = {}, Z;
27
- function Te() {
28
- if (Z) return k;
29
- Z = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.parseCookie = E, k.parse = E, k.stringifyCookie = c, k.stringifySetCookie = x, k.serialize = x, k.parseSetCookie = v, k.stringifySetCookie = x, k.serialize = x;
30
- const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, s = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, n = /^[\u0020-\u003A\u003D-\u007E]*$/, g = /^-?\d+$/, y = Object.prototype.toString, f = /* @__PURE__ */ (() => {
31
- const a = function() {
32
- };
33
- return a.prototype = /* @__PURE__ */ Object.create(null), a;
34
- })();
35
- function E(a, p) {
36
- const m = new f(), i = a.length;
37
- if (i < 2) return m;
38
- const o = p?.decode || _;
39
- let l = 0;
40
- do {
41
- const d = V(a, l, i);
42
- if (d === -1) break;
43
- const S = A(a, l, i);
44
- if (d > S) {
45
- l = a.lastIndexOf(";", d - 1) + 1;
46
- continue;
47
- }
48
- const L = h(a, l, d);
49
- m[L] === void 0 && (m[L] = o(h(a, d + 1, S))), l = S + 1;
50
- } while (l < i);
51
- return m;
52
- }
53
- function c(a, p) {
54
- const m = p?.encode || encodeURIComponent, i = [];
55
- for (const o of Object.keys(a)) {
56
- const l = a[o];
57
- if (l === void 0) continue;
58
- if (!e.test(o)) throw new TypeError(`cookie name is invalid: ${o}`);
59
- const d = m(l);
60
- if (!t.test(d)) throw new TypeError(`cookie val is invalid: ${l}`);
61
- i.push(`${o}=${d}`);
62
- }
63
- return i.join("; ");
64
- }
65
- function x(a, p, m) {
66
- const i = typeof a == "object" ? a : {
67
- ...m,
68
- name: a,
69
- value: String(p)
70
- }, o = (typeof p == "object" ? p : m)?.encode || encodeURIComponent;
71
- if (!e.test(i.name)) throw new TypeError(`argument name is invalid: ${i.name}`);
72
- const l = i.value ? o(i.value) : "";
73
- if (!t.test(l)) throw new TypeError(`argument val is invalid: ${i.value}`);
74
- let d = i.name + "=" + l;
75
- if (i.maxAge !== void 0) {
76
- if (!Number.isInteger(i.maxAge)) throw new TypeError(`option maxAge is invalid: ${i.maxAge}`);
77
- d += "; Max-Age=" + i.maxAge;
78
- }
79
- if (i.domain) {
80
- if (!s.test(i.domain)) throw new TypeError(`option domain is invalid: ${i.domain}`);
81
- d += "; Domain=" + i.domain;
82
- }
83
- if (i.path) {
84
- if (!n.test(i.path)) throw new TypeError(`option path is invalid: ${i.path}`);
85
- d += "; Path=" + i.path;
86
- }
87
- if (i.expires) {
88
- if (!j(i.expires) || !Number.isFinite(i.expires.valueOf())) throw new TypeError(`option expires is invalid: ${i.expires}`);
89
- d += "; Expires=" + i.expires.toUTCString();
90
- }
91
- if (i.httpOnly && (d += "; HttpOnly"), i.secure && (d += "; Secure"), i.partitioned && (d += "; Partitioned"), i.priority) switch (typeof i.priority == "string" ? i.priority.toLowerCase() : void 0) {
92
- case "low":
93
- d += "; Priority=Low";
94
- break;
95
- case "medium":
96
- d += "; Priority=Medium";
97
- break;
98
- case "high":
99
- d += "; Priority=High";
100
- break;
101
- default:
102
- throw new TypeError(`option priority is invalid: ${i.priority}`);
103
- }
104
- if (i.sameSite) switch (typeof i.sameSite == "string" ? i.sameSite.toLowerCase() : i.sameSite) {
105
- case !0:
106
- case "strict":
107
- d += "; SameSite=Strict";
108
- break;
109
- case "lax":
110
- d += "; SameSite=Lax";
111
- break;
112
- case "none":
113
- d += "; SameSite=None";
114
- break;
115
- default:
116
- throw new TypeError(`option sameSite is invalid: ${i.sameSite}`);
117
- }
118
- return d;
119
- }
120
- function v(a, p) {
121
- const m = p?.decode || _, i = a.length, o = A(a, 0, i), l = V(a, 0, o), d = l === -1 ? {
122
- name: "",
123
- value: m(h(a, 0, o))
124
- } : {
125
- name: h(a, 0, l),
126
- value: m(h(a, l + 1, o))
127
- };
128
- let S = o + 1;
129
- for (; S < i; ) {
130
- const L = A(a, S, i), M = V(a, S, L), ge = M === -1 ? h(a, S, L) : h(a, S, M), b = M === -1 ? void 0 : h(a, M + 1, L);
131
- switch (ge.toLowerCase()) {
132
- case "httponly":
133
- d.httpOnly = !0;
134
- break;
135
- case "secure":
136
- d.secure = !0;
137
- break;
138
- case "partitioned":
139
- d.partitioned = !0;
140
- break;
141
- case "domain":
142
- d.domain = b;
143
- break;
144
- case "path":
145
- d.path = b;
146
- break;
147
- case "max-age":
148
- b && g.test(b) && (d.maxAge = Number(b));
149
- break;
150
- case "expires":
151
- if (!b) break;
152
- const W = new Date(b);
153
- Number.isFinite(W.valueOf()) && (d.expires = W);
154
- break;
155
- case "priority":
156
- if (!b) break;
157
- const T = b.toLowerCase();
158
- (T === "low" || T === "medium" || T === "high") && (d.priority = T);
159
- break;
160
- case "samesite":
161
- if (!b) break;
162
- const R = b.toLowerCase();
163
- (R === "lax" || R === "strict" || R === "none") && (d.sameSite = R);
164
- break;
165
- }
166
- S = L + 1;
167
- }
168
- return d;
169
- }
170
- function A(a, p, m) {
171
- const i = a.indexOf(";", p);
172
- return i === -1 ? m : i;
173
- }
174
- function V(a, p, m) {
175
- const i = a.indexOf("=", p);
176
- return i < m ? i : -1;
177
- }
178
- function h(a, p, m) {
179
- let i = p, o = m;
180
- do {
181
- const l = a.charCodeAt(i);
182
- if (l !== 32 && l !== 9) break;
183
- } while (++i < o);
184
- for (; o > i; ) {
185
- const l = a.charCodeAt(o - 1);
186
- if (l !== 32 && l !== 9) break;
187
- o--;
188
- }
189
- return a.slice(i, o);
190
- }
191
- function _(a) {
192
- if (a.indexOf("%") === -1) return a;
193
- try {
194
- return decodeURIComponent(a);
195
- } catch {
196
- return a;
197
- }
198
- }
199
- function j(a) {
200
- return y.call(a) === "[object Date]";
201
- }
202
- return k;
203
- }
204
- var U = /* @__PURE__ */ Te();
205
- function Re() {
206
- const e = typeof globalThis > "u" ? void 0 : globalThis.TEST_HAS_DOCUMENT_COOKIE;
207
- return typeof e == "boolean" ? e : typeof document == "object" && typeof document.cookie == "string";
208
- }
209
- function Pe(e) {
210
- return typeof e == "string" ? U.parse(e) : typeof e == "object" && e !== null ? e : {};
211
- }
212
- function z(e, t = {}) {
213
- const s = Ue(e);
214
- if (!t.doNotParse) try {
215
- return JSON.parse(s);
216
- } catch {
217
- }
218
- return e;
219
- }
220
- function Ue(e) {
221
- return e && e[0] === "j" && e[1] === ":" ? e.substr(2) : e;
222
- }
223
- var De = class {
224
- constructor(e, t = {}) {
225
- this.changeListeners = [], this.HAS_DOCUMENT_COOKIE = !1, this.update = () => {
226
- if (!this.HAS_DOCUMENT_COOKIE) return;
227
- const n = this.cookies;
228
- this.cookies = U.parse(document.cookie), this._checkChanges(n);
229
- };
230
- const s = typeof document > "u" ? "" : document.cookie;
231
- this.cookies = Pe(e || s), this.defaultSetOptions = t, this.HAS_DOCUMENT_COOKIE = Re();
232
- }
233
- _emitChange(e) {
234
- for (let t = 0; t < this.changeListeners.length; ++t) this.changeListeners[t](e);
235
- }
236
- _checkChanges(e) {
237
- new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach((t) => {
238
- e[t] !== this.cookies[t] && this._emitChange({
239
- name: t,
240
- value: z(this.cookies[t])
241
- });
242
- });
243
- }
244
- _startPolling() {
245
- this.pollingInterval = setInterval(this.update, 300);
246
- }
247
- _stopPolling() {
248
- this.pollingInterval && clearInterval(this.pollingInterval);
249
- }
250
- get(e, t = {}) {
251
- return t.doNotUpdate || this.update(), z(this.cookies[e], t);
252
- }
253
- getAll(e = {}) {
254
- e.doNotUpdate || this.update();
255
- const t = {};
256
- for (let s in this.cookies) t[s] = z(this.cookies[s], e);
257
- return t;
258
- }
259
- set(e, t, s) {
260
- s ? s = Object.assign(Object.assign({}, this.defaultSetOptions), s) : s = this.defaultSetOptions;
261
- const n = typeof t == "string" ? t : JSON.stringify(t);
262
- this.cookies = Object.assign(Object.assign({}, this.cookies), { [e]: n }), this.HAS_DOCUMENT_COOKIE && (document.cookie = U.serialize(e, n, s)), this._emitChange({
263
- name: e,
264
- value: t,
265
- options: s
266
- });
267
- }
268
- remove(e, t) {
269
- const s = t = Object.assign(Object.assign(Object.assign({}, this.defaultSetOptions), t), {
270
- expires: new Date(1970, 1, 1, 0, 0, 1),
271
- maxAge: 0
272
- });
273
- this.cookies = Object.assign({}, this.cookies), delete this.cookies[e], this.HAS_DOCUMENT_COOKIE && (document.cookie = U.serialize(e, "", s)), this._emitChange({
274
- name: e,
275
- value: void 0,
276
- options: t
277
- });
278
- }
279
- addChangeListener(e) {
280
- this.changeListeners.push(e), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 1 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.addEventListener("change", this.update) : this._startPolling());
281
- }
282
- removeChangeListener(e) {
283
- const t = this.changeListeners.indexOf(e);
284
- t >= 0 && this.changeListeners.splice(t, 1), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 0 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.removeEventListener("change", this.update) : this._stopPolling());
285
- }
286
- removeAllChangeListeners() {
287
- for (; this.changeListeners.length > 0; ) this.removeChangeListener(this.changeListeners[0]);
288
- }
289
- };
290
- function fe(e, { doNotParse: t = !1, autoUpdateDependencies: s = !1 } = {}, n = new De()) {
291
- const g = s ? [...e || []] : e;
292
- let y = n.getAll({ doNotParse: !0 });
293
- const f = _e(0), E = () => {
294
- const c = n.getAll({ doNotParse: !0 });
295
- $e(g || null, c, y) && f.value++, y = c;
296
- };
297
- return n.addChangeListener(E), Me(() => {
298
- n.removeChangeListener(E);
299
- }), {
300
- get: (...c) => (s && g && !g.includes(c[0]) && g.push(c[0]), f.value, n.get(c[0], {
301
- doNotParse: t,
302
- ...c[1]
303
- })),
304
- getAll: (...c) => (f.value, n.getAll({
305
- doNotParse: t,
306
- ...c[0]
307
- })),
308
- set: (...c) => n.set(...c),
309
- remove: (...c) => n.remove(...c),
310
- addChangeListener: (...c) => n.addChangeListener(...c),
311
- removeChangeListener: (...c) => n.removeChangeListener(...c)
312
- };
313
- }
314
- function $e(e, t, s) {
315
- if (!e) return !0;
316
- for (const n of e) if (t[n] !== s[n]) return !0;
317
- return !1;
318
- }
319
- var me = N({
320
- components: { BTag: Ke },
321
- methods: {
322
- closeDialog() {
323
- this.dialog = !1, this.apiKey = this.cookies.get("apiKey");
324
- },
325
- async isValidApiKey() {
326
- if (!this.apiKey) return !1;
327
- const e = new Ae({
328
- apiEnvironment: window.RevolugoElements.config.apiEnvironment,
329
- apiKey: this.apiKey,
330
- apiVersion: Le.V1,
331
- optionalHeaders: window.RevolugoElements.config.optionalHeaders
332
- });
333
- try {
334
- return !!await e.hotels.retrieve({ id: "2yvb" });
335
- } catch (t) {
336
- return console.error(t), !1;
337
- }
338
- },
339
- async onSubmit() {
340
- this.validate(), await this.updateApiKey(), this.apiKey && this.closeDialog();
341
- },
342
- async updateApiKey() {
343
- try {
344
- if (this.isLoading = !0, await this.isValidApiKey())
345
- this.config.apiKey !== this.apiKey && this.updateConfig({
346
- ...this.config,
347
- apiKey: this.apiKey
348
- }), this.cookies.set("apiKey", this.apiKey, { expires: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 365) });
349
- else throw new Error("Invalid API Key");
350
- } catch {
351
- console.error("Invalid API Key");
352
- } finally {
353
- this.isLoading = !1;
354
- }
355
- },
356
- validate() {
357
- this.$refs.apiKeyEditorForm.validate();
358
- }
359
- },
360
- mixins: [be(["config.apiEnvironment"], "updateApiKey", {
361
- deep: !0,
362
- immediate: !0
363
- }), Oe],
364
- name: "ApiKeyEditor",
365
- setup() {
366
- const e = fe(["apiKey"]), { t } = ie(), s = w(e.get("apiKey")), n = F(() => window.RevolugoElements.config.apiEnvironment);
367
- return {
368
- apiKey: s,
369
- apiKeyRules: F(() => [(g) => !!g || `A valid API Key is required. ${t("ApiKeyEditor.hint", { environment: n.value })}`]),
370
- cookies: e,
371
- dialog: w(!1),
372
- isFormValid: w(!1),
373
- isLoading: w(!1),
374
- t
375
- };
376
- }
377
- }), ee = {
378
- "en-US": { ApiKeyEditor: {
379
- hint: {
380
- t: 0,
381
- b: {
382
- t: 2,
383
- i: [
384
- {
385
- t: 3,
386
- v: "Please, put your Publishable API Key for "
387
- },
388
- {
389
- t: 4,
390
- k: "environment"
391
- },
392
- {
393
- t: 3,
394
- v: " environment"
395
- }
396
- ]
397
- }
398
- },
399
- invalid: {
400
- t: 0,
401
- b: {
402
- t: 2,
403
- i: [{ t: 3 }],
404
- s: "Provided API Key credential is not valid"
405
- }
406
- }
407
- } },
408
- "fr-FR": { ApiKeyEditor: {
409
- hint: {
410
- t: 0,
411
- b: {
412
- t: 2,
413
- i: [{
414
- t: 3,
415
- v: "Indiquez votre clé API Publishable pour l'environnement "
416
- }, {
417
- t: 4,
418
- k: "environment"
419
- }]
420
- }
421
- },
422
- invalid: {
423
- t: 0,
424
- b: {
425
- t: 2,
426
- i: [{ t: 3 }],
427
- s: "La clé API renseignée est invalide."
428
- }
429
- }
430
- } },
431
- "de-DE": { ApiKeyEditor: {
432
- hint: {
433
- t: 0,
434
- b: {
435
- t: 2,
436
- i: [
437
- {
438
- t: 3,
439
- v: "Bitte gib deinen Veröffentlichen API-Schlüssel für die "
440
- },
441
- {
442
- t: 4,
443
- k: "environment"
444
- },
445
- {
446
- t: 3,
447
- v: " Umgebung an"
448
- }
449
- ]
450
- }
451
- },
452
- invalid: {
453
- t: 0,
454
- b: {
455
- t: 2,
456
- i: [{ t: 3 }],
457
- s: "Der angegebene API-Schlüssel ist ungültig"
458
- }
459
- }
460
- } },
461
- "es-ES": { ApiKeyEditor: {
462
- hint: {
463
- t: 0,
464
- b: {
465
- t: 2,
466
- i: [{
467
- t: 3,
468
- v: "Por favor, introduzca su clave API pública para el entorno "
469
- }, {
470
- t: 4,
471
- k: "environment"
472
- }]
473
- }
474
- },
475
- invalid: {
476
- t: 0,
477
- b: {
478
- t: 2,
479
- i: [{ t: 3 }],
480
- s: "La clave API proporcionada no es válida"
481
- }
482
- }
483
- } },
484
- "it-IT": { ApiKeyEditor: {
485
- hint: {
486
- t: 0,
487
- b: {
488
- t: 2,
489
- i: [{
490
- t: 3,
491
- v: "Inserisci la tua chiave API pubblica per l'ambiente "
492
- }, {
493
- t: 4,
494
- k: "environment"
495
- }]
496
- }
497
- },
498
- invalid: {
499
- t: 0,
500
- b: {
501
- t: 2,
502
- i: [{ t: 3 }],
503
- s: "La chiave API fornita non è valida"
504
- }
505
- }
506
- } },
507
- "nl-NL": { ApiKeyEditor: {
508
- hint: {
509
- t: 0,
510
- b: {
511
- t: 2,
512
- i: [
513
- {
514
- t: 3,
515
- v: "Vul hier uw Publishable API Key in voor de "
516
- },
517
- {
518
- t: 4,
519
- k: "environment"
520
- },
521
- {
522
- t: 3,
523
- v: " omgeving"
524
- }
525
- ]
526
- }
527
- },
528
- invalid: {
529
- t: 0,
530
- b: {
531
- t: 2,
532
- i: [{ t: 3 }],
533
- s: "De opgegeven API Key is ongeldig"
534
- }
535
- }
536
- } },
537
- "pt-PT": { ApiKeyEditor: {
538
- hint: {
539
- t: 0,
540
- b: {
541
- t: 2,
542
- i: [{
543
- t: 3,
544
- v: "Por favor, coloque a sua chave API Publicável para o ambiente "
545
- }, {
546
- t: 4,
547
- k: "environment"
548
- }]
549
- }
550
- },
551
- invalid: {
552
- t: 0,
553
- b: {
554
- t: 2,
555
- i: [{ t: 3 }],
556
- s: "A credencial da chave API fornecida não é válida"
557
- }
558
- }
559
- } }
560
- };
561
- function Ne(e, t, s, n, g, y) {
562
- return I(), P("div", null, [r(se, {
563
- modelValue: e.dialog,
564
- "onUpdate:modelValue": t[2] || (t[2] = (f) => e.dialog = f),
565
- attach: e.$dialogAttach || void 0,
566
- "max-width": "600px"
567
- }, {
568
- activator: u(({ props: f }) => [r(O, ae(f, {
569
- color: e.cookies.get("apiKey") ? "success" : "warning",
570
- elevation: "0",
571
- size: "x-small"
572
- }), {
573
- default: u(() => [e.cookies.get("apiKey") ? (I(), P(J, { key: 1 }, [r(X, { class: "mr-2" }, {
574
- default: u(() => [...t[5] || (t[5] = [C("fas fa-check", -1)])]),
575
- _: 1
576
- }), t[6] || (t[6] = C(" Valid API key ", -1))], 64)) : (I(), P(J, { key: 0 }, [r(X, { class: "mr-2" }, {
577
- default: u(() => [...t[3] || (t[3] = [C("fas fa-exclamation", -1)])]),
578
- _: 1
579
- }), t[4] || (t[4] = C(" No API key provided ", -1))], 64))]),
580
- _: 1
581
- }, 16, ["color"])]),
582
- default: u(() => [r(de, null, {
583
- default: u(() => [r(ce, { class: "pa-4" }, {
584
- default: u(() => [r(Y, { class: "pa-0" }, {
585
- default: u(() => [r($, { "no-gutters": "" }, {
586
- default: u(() => [r(pe, null, {
587
- default: u(() => [r(le, {
588
- ref: "apiKeyEditorForm",
589
- modelValue: e.isFormValid,
590
- "onUpdate:modelValue": t[1] || (t[1] = (f) => e.isFormValid = f),
591
- class: "m-0",
592
- onSubmit: ne(e.onSubmit, ["prevent"])
593
- }, {
594
- default: u(() => [r(H, {
595
- modelValue: e.apiKey,
596
- "onUpdate:modelValue": t[0] || (t[0] = (f) => e.apiKey = f),
597
- density: "compact",
598
- hint: e.t("ApiKeyEditor.hint", { environment: e.config.apiEnvironment }),
599
- label: "API Key",
600
- "persistent-hint": "",
601
- required: "",
602
- rules: e.apiKeyRules,
603
- variant: "outlined",
604
- onKeyup: q(e.onSubmit, ["enter"])
605
- }, null, 8, [
606
- "modelValue",
607
- "hint",
608
- "rules",
609
- "onKeyup"
610
- ])]),
611
- _: 1
612
- }, 8, ["modelValue", "onSubmit"])]),
613
- _: 1
614
- })]),
615
- _: 1
616
- })]),
617
- _: 1
618
- })]),
619
- _: 1
620
- }), r(ue, null, {
621
- default: u(() => [
622
- r(re),
623
- r(O, {
624
- color: "blue-darken-1",
625
- size: "small",
626
- variant: "text",
627
- onClick: e.closeDialog
628
- }, {
629
- default: u(() => [...t[7] || (t[7] = [C(" Close ", -1)])]),
630
- _: 1
631
- }, 8, ["onClick"]),
632
- r(O, {
633
- class: "text-right",
634
- color: "primary",
635
- disabled: e.isLoading,
636
- elevation: "0",
637
- loading: e.isLoading,
638
- size: "small",
639
- onClick: e.onSubmit
640
- }, {
641
- default: u(() => [...t[8] || (t[8] = [C(" Save ", -1)])]),
642
- _: 1
643
- }, 8, [
644
- "disabled",
645
- "loading",
646
- "onClick"
647
- ])
648
- ]),
649
- _: 1
650
- })]),
651
- _: 1
652
- })]),
653
- _: 1
654
- }, 8, ["modelValue", "attach"])]);
655
- }
656
- typeof ee == "function" && ee(me);
657
- var je = /* @__PURE__ */ B(me, [["render", Ne]]), ve = /* @__PURE__ */ N({
658
- __name: "EventMetadataEditor",
659
- setup(e) {
660
- const { config: t, updateConfig: s } = xe(), n = fe(["eventMetadata"]), { isFetching: g } = Ee(ye()), { t: y } = ie(), f = w(null), { $dialogAttach: E } = ke(f), c = [(i) => {
661
- if (!i) return !0;
662
- try {
663
- return !!new URL(i) || y("EventMetadataEditor.validation.imageURL");
664
- } catch {
665
- return y("EventMetadataEditor.validation.imageURL");
666
- }
667
- }], x = [(i) => !!i || y("EventMetadataEditor.validation.name")], v = w(n.get("eventMetadata") || {
668
- dateEnd: (0, Q.default)().add(1, "day").format("YYYY-MM-DD").toString(),
669
- dateStart: (0, Q.default)().format("YYYY-MM-DD").toString(),
670
- name: ""
671
- }), A = w(!1), V = w(!1), h = F({
672
- get() {
673
- return !v.value.dateStart || !v.value.dateEnd ? [] : G(v.value.dateStart, v.value.dateEnd);
674
- },
675
- set(i) {
676
- [v.value.dateStart, v.value.dateEnd] = G(...i);
677
- }
678
- });
679
- function _() {
680
- A.value = !1;
681
- }
682
- function j() {
683
- return !(!v.value.name?.length || !h.value[0] || !h.value[1]);
684
- }
685
- function a() {
686
- j() && (s({
687
- ...t.value,
688
- eventMetadata: v.value
689
- }), n.set("eventMetadata", JSON.stringify(v)), _());
690
- }
691
- function p() {
692
- a(), _();
693
- }
694
- function m() {
695
- n.remove("eventMetadata"), v.value = {}, s({
696
- ...t.value,
697
- eventMetadata: {}
698
- }), _();
699
- }
700
- return Ce(() => {
701
- n.get("eventMetadata") && s({
702
- ...t.value,
703
- eventMetadata: n.get("eventMetadata")
704
- });
705
- }), (i, o) => (I(), P("div", {
706
- ref_key: "root",
707
- ref: f
708
- }, [r(se, {
709
- modelValue: A.value,
710
- "onUpdate:modelValue": o[4] || (o[4] = (l) => A.value = l),
711
- attach: K(E),
712
- height: "600px",
713
- "max-width": "600px"
714
- }, {
715
- activator: u(({ props: l }) => [r(O, ae(l, {
716
- color: K(n).get("eventMetadata") ? "success" : "warning",
717
- elevation: "0",
718
- size: "x-small"
719
- }), {
720
- default: u(() => [C(Se(v.value?.name ? `EVENT : ${v.value?.name}` : "ADD EVENT METADATA"), 1)]),
721
- _: 1
722
- }, 16, ["color"])]),
723
- default: u(() => [r(de, null, {
724
- default: u(() => [r(ce, { class: "pa-4" }, {
725
- default: u(() => [r(Y, { class: "pa-0" }, {
726
- default: u(() => [r($, { "no-gutters": "" }, {
727
- default: u(() => [r(pe, null, {
728
- default: u(() => [r(le, {
729
- ref: "eventMetadataEditorForm",
730
- modelValue: V.value,
731
- "onUpdate:modelValue": o[3] || (o[3] = (l) => V.value = l),
732
- class: "m-0",
733
- onSubmit: ne(p, ["prevent"])
734
- }, {
735
- default: u(() => [
736
- r(H, {
737
- modelValue: v.value.name,
738
- "onUpdate:modelValue": o[0] || (o[0] = (l) => v.value.name = l),
739
- density: "compact",
740
- label: "Name of the event",
741
- "persistent-hint": "",
742
- required: "",
743
- rules: x,
744
- variant: "outlined",
745
- onKeyup: q(p, ["enter"])
746
- }, null, 8, ["modelValue"]),
747
- r(H, {
748
- modelValue: v.value.imageUrl,
749
- "onUpdate:modelValue": o[1] || (o[1] = (l) => v.value.imageUrl = l),
750
- density: "compact",
751
- label: "Image URL",
752
- "persistent-hint": "",
753
- rules: c,
754
- variant: "outlined",
755
- onKeyup: q(p, ["enter"])
756
- }, null, 8, ["modelValue"]),
757
- r($, null, {
758
- default: u(() => [r(Ve, {
759
- modelValue: h.value,
760
- "onUpdate:modelValue": o[2] || (o[2] = (l) => h.value = l)
761
- }, null, 8, ["modelValue"])]),
762
- _: 1
763
- })
764
- ]),
765
- _: 1
766
- }, 8, ["modelValue"])]),
767
- _: 1
768
- })]),
769
- _: 1
770
- })]),
771
- _: 1
772
- })]),
773
- _: 1
774
- }), r(ue, null, {
775
- default: u(() => [
776
- r(re),
777
- r(O, {
778
- color: "grey",
779
- size: "small",
780
- variant: "text",
781
- onClick: _
782
- }, {
783
- default: u(() => [...o[5] || (o[5] = [C(" Close ", -1)])]),
784
- _: 1
785
- }),
786
- r(O, {
787
- color: "error",
788
- disabled: K(g),
789
- loading: K(g),
790
- size: "small",
791
- variant: "text",
792
- onClick: m
793
- }, {
794
- default: u(() => [...o[6] || (o[6] = [C(" Reset ", -1)])]),
795
- _: 1
796
- }, 8, ["disabled", "loading"]),
797
- r(O, {
798
- color: "success",
799
- disabled: K(g),
800
- loading: K(g),
801
- size: "small",
802
- variant: "flat",
803
- onClick: p
804
- }, {
805
- default: u(() => [...o[7] || (o[7] = [C(" Save ", -1)])]),
806
- _: 1
807
- }, 8, ["disabled", "loading"])
808
- ]),
809
- _: 1
810
- })]),
811
- _: 1
812
- })]),
813
- _: 1
814
- }, 8, ["modelValue", "attach"])], 512));
815
- }
816
- }), te = {
817
- "en-US": { EventMetadataEditor: { validation: {
818
- imageURL: {
819
- t: 0,
820
- b: {
821
- t: 2,
822
- i: [{ t: 3 }],
823
- s: "Please provide a valid URL"
824
- }
825
- },
826
- name: {
827
- t: 0,
828
- b: {
829
- t: 2,
830
- i: [{ t: 3 }],
831
- s: "Please provide a name"
832
- }
833
- }
834
- } } },
835
- "fr-FR": { EventMetadataEditor: { validation: {
836
- imageURL: {
837
- t: 0,
838
- b: {
839
- t: 2,
840
- i: [{ t: 3 }],
841
- s: "Veuillez fournir une URL valide d'image"
842
- }
843
- },
844
- name: {
845
- t: 0,
846
- b: {
847
- t: 2,
848
- i: [{ t: 3 }],
849
- s: "Veuillez entrer le nom de l'événement"
850
- }
851
- }
852
- } } },
853
- "de-DE": { EventMetadataEditor: { validation: {
854
- imageURL: {
855
- t: 0,
856
- b: {
857
- t: 2,
858
- i: [{ t: 3 }],
859
- s: "Bitte geben Sie eine gültige URL an"
860
- }
861
- },
862
- name: {
863
- t: 0,
864
- b: {
865
- t: 2,
866
- i: [{ t: 3 }],
867
- s: "Bitte geben Sie einen Namen an"
868
- }
869
- }
870
- } } },
871
- "es-ES": { EventMetadataEditor: { validation: {
872
- imageURL: {
873
- t: 0,
874
- b: {
875
- t: 2,
876
- i: [{ t: 3 }],
877
- s: "Por favor, introduce una URL válida"
878
- }
879
- },
880
- name: {
881
- t: 0,
882
- b: {
883
- t: 2,
884
- i: [{ t: 3 }],
885
- s: "Por favor, introduce un nombre"
886
- }
887
- }
888
- } } },
889
- "it-IT": { EventMetadataEditor: { validation: {
890
- imageURL: {
891
- t: 0,
892
- b: {
893
- t: 2,
894
- i: [{ t: 3 }],
895
- s: "Inserisci un URL valido"
896
- }
897
- },
898
- name: {
899
- t: 0,
900
- b: {
901
- t: 2,
902
- i: [{ t: 3 }],
903
- s: "Inserisci un nome"
904
- }
905
- }
906
- } } },
907
- "nl-NL": { EventMetadataEditor: { validation: {
908
- imageURL: {
909
- t: 0,
910
- b: {
911
- t: 2,
912
- i: [{ t: 3 }],
913
- s: "Geef een geldige URL op"
914
- }
915
- },
916
- name: {
917
- t: 0,
918
- b: {
919
- t: 2,
920
- i: [{ t: 3 }],
921
- s: "Geef een naam op"
922
- }
923
- }
924
- } } },
925
- "pt-PT": { EventMetadataEditor: { validation: {
926
- imageURL: {
927
- t: 0,
928
- b: {
929
- t: 2,
930
- i: [{ t: 3 }],
931
- s: "Por favor, introduza um URL válido"
932
- }
933
- },
934
- name: {
935
- t: 0,
936
- b: {
937
- t: 2,
938
- i: [{ t: 3 }],
939
- s: "Por favor, introduza um nome"
940
- }
941
- }
942
- } } }
943
- };
944
- typeof te == "function" && te(ve);
945
- var ze = ve, qe = N({
946
- components: {
947
- ApiKeyEditor: je,
948
- EventMetadataEditor: ze
949
- },
950
- name: "StorybookExtraToolbar"
951
- }), Fe = { class: "flex gap-1 px-3" };
952
- function He(e, t, s, n, g, y) {
953
- const f = D("ApiKeyEditor"), E = D("EventMetadataEditor");
954
- return I(), oe(Y, {
955
- class: "pa-0 mb-3",
956
- fluid: ""
957
- }, {
958
- default: u(() => [r($, { "no-gutters": "" }, {
959
- default: u(() => [we("div", Fe, [r(f), r(E)])]),
960
- _: 1
961
- })]),
962
- _: 1
963
- });
964
- }
965
- var Be = /* @__PURE__ */ B(qe, [["render", He]]), Ye = N({ components: {
966
- StorybookExtraToolbar: Be,
967
- WebComponentWrapper: Ie
968
- } });
969
- function We(e, t, s, n, g, y) {
970
- const f = D("StorybookExtraToolbar"), E = D("WebComponentWrapper");
971
- return I(), oe(E, { "error-overlay-disabled": "" }, {
972
- default: u(() => [r(f)]),
973
- _: 1
974
- });
975
- }
976
- var et = /* @__PURE__ */ B(Ye, [["render", We]]);
977
- he("css/revolugo.storybooktoolbar.d_cxquq9.css");
978
- export {
979
- et as default
980
- };
981
-
982
- //# sourceMappingURL=revolugo.storybooktoolbar.guIjvH6Q.min.js.map