@revolugo/elements 6.14.4 → 6.14.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/{revolugo.cancellationpoliciesbadge.CVnwoRRv.css → revolugo.cancellationpoliciesbadge.DDwUPwrW.css} +1 -1
- package/dist/css/{revolugo.creditcardstripeform.CQo4EdV9.css → revolugo.creditcardstripeform.CuNCVfSx.css} +1 -1
- package/dist/css/revolugo.preferencesmenu.CKbQGJ3O.css +1 -0
- package/dist/css/{revolugo.webcomponentwrapper.Sz4vrcSR.css → revolugo.webcomponentwrapper.DTRm9uoD.css} +1 -1
- package/dist/index.es.min.js +9 -9
- package/dist/index.es.min.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/revolugo.banktransferdetails.BP_tJ7LE.min.js +47 -0
- package/dist/revolugo.bookingdetailssidebar.uBmlbbwL.min.js +43 -0
- package/dist/revolugo.bookingmanager.DbD300O2.min.js +26 -0
- package/dist/revolugo.cancellationpoliciesbadge.4c-sKZJT.min.js +26 -0
- package/dist/revolugo.cancellationpoliciesbadge.props.DQAyNos3.min.js +29129 -0
- package/dist/revolugo.cancellationpolicieslist.Dbx8dII4.min.js +26 -0
- package/dist/revolugo.creditcardstripeform.3lMRw0xn.min.js +50 -0
- package/dist/revolugo.creditcardstripeform.BniE9G3A.min.js +2998 -0
- package/dist/revolugo.currencypickerbtn.DoN18HCn.min.js +26 -0
- package/dist/{revolugo.dialog-attach.BOO2g6vS.min.js → revolugo.dialog-attach.6VpBfdcy.min.js} +2 -2
- package/dist/revolugo.fastbookingflow.CN7EVTUx.min.js +36 -0
- package/dist/revolugo.fullbookingflow.DTnGJm5Y.min.js +26 -0
- package/dist/revolugo.hoteldescriptionview.B8br8GvA.min.js +26 -0
- package/dist/revolugo.hotelofferlist.Cr3Fzniz.min.js +26 -0
- package/dist/revolugo.hoteloffersearchmenu.CZ7-d2Th.min.js +122 -0
- package/dist/revolugo.hoteloffersmap.DQKvoXiQ.min.js +26 -0
- package/dist/revolugo.hoteloffersview.CLFxZ3mf.min.js +29 -0
- package/dist/revolugo.hotelroomofferlist.ChljEG26.min.js +26 -0
- package/dist/revolugo.hotelroomoffersbookingflow.D_LiRFXI.min.js +26 -0
- package/dist/revolugo.hotelroomoffersearchmenu.4sk7JI6A.min.js +26 -0
- package/dist/revolugo.hotelroomoffersview.D8Y7CJji.min.js +26 -0
- package/dist/revolugo.index.BzkaHkln.min.js +101 -0
- package/dist/revolugo.index.wc.BKw6iLbQ.min.js +30119 -0
- package/dist/revolugo.langpickerbtn.BShR-GQQ.min.js +31 -0
- package/dist/revolugo.min.js +1 -1
- package/dist/revolugo.prebookform.BrvEx_MQ.min.js +26 -0
- package/dist/revolugo.preferencesmenu.Ry46592I.min.js +943 -0
- package/dist/revolugo.preferencesmenu.SU8grFAz.min.js +24 -0
- package/dist/revolugo.roominglisteditor.BWyMkRdQ.min.js +26 -0
- package/dist/revolugo.storybooktoolbar.ntjn_Lif.min.js +828 -0
- package/dist/revolugo.termsandconditions.C82FXzrW.min.js +31 -0
- package/dist/{revolugo.vtoolbar.BrJsPjyn.min.js → revolugo.vtoolbar.Dxq2BdoM.min.js} +40 -40
- package/dist/revolugo.webcomponentwrapper.MNN0gXoE.min.js +30885 -0
- package/package.json +13 -148
- package/dist/css/revolugo.preferencesmenu.xwW9g-pj.css +0 -1
- package/dist/revolugo.banktransferdetails.Cub44miS.min.js +0 -47
- package/dist/revolugo.bookingdetailssidebar.FLVMXWfb.min.js +0 -43
- package/dist/revolugo.bookingmanager.Kt-XEVcb.min.js +0 -26
- package/dist/revolugo.cancellationpoliciesbadge.props.B3Oir2JL.min.js +0 -28795
- package/dist/revolugo.cancellationpoliciesbadge.wXqASj4o.min.js +0 -26
- package/dist/revolugo.cancellationpolicieslist.CB2jqcOC.min.js +0 -26
- package/dist/revolugo.creditcardstripeform.BKHC0EXa.min.js +0 -50
- package/dist/revolugo.creditcardstripeform.CFj-X3B1.min.js +0 -2137
- package/dist/revolugo.currencypickerbtn.Bil8a4MK.min.js +0 -26
- package/dist/revolugo.fastbookingflow.Ey7heNp3.min.js +0 -36
- package/dist/revolugo.fullbookingflow.BmEQb3hX.min.js +0 -26
- package/dist/revolugo.hoteldescriptionview.CQjMsC50.min.js +0 -26
- package/dist/revolugo.hotelofferlist.BCSGpg35.min.js +0 -26
- package/dist/revolugo.hoteloffersearchmenu.CX8d-C9i.min.js +0 -115
- package/dist/revolugo.hoteloffersmap.DZCoqYy9.min.js +0 -26
- package/dist/revolugo.hoteloffersview.Dl6PHNuf.min.js +0 -21
- package/dist/revolugo.hotelroomofferlist.D_K55U8L.min.js +0 -26
- package/dist/revolugo.hotelroomoffersbookingflow.Cxftg_K5.min.js +0 -26
- package/dist/revolugo.hotelroomoffersearchmenu.BAW7QSdh.min.js +0 -26
- package/dist/revolugo.hotelroomoffersview.Cck3d1D7.min.js +0 -26
- package/dist/revolugo.index.CE4W8vd5.min.js +0 -101
- package/dist/revolugo.index.wc.C1k5jVOs.min.js +0 -24036
- package/dist/revolugo.langpickerbtn.hPOI4yKr.min.js +0 -31
- package/dist/revolugo.prebookform.ta_y5ufY.min.js +0 -26
- package/dist/revolugo.preferencesmenu.CNzF7xpj.min.js +0 -24
- package/dist/revolugo.preferencesmenu.shY-3UnD.min.js +0 -932
- package/dist/revolugo.roominglisteditor.CzQTR_4C.min.js +0 -26
- package/dist/revolugo.storybooktoolbar.D828oQt9.min.js +0 -824
- package/dist/revolugo.termsandconditions.sDirhmY4.min.js +0 -31
- package/dist/revolugo.webcomponentwrapper.BE6Todxg.min.js +0 -30737
|
@@ -1,2137 +0,0 @@
|
|
|
1
|
-
import { a_ as qe, i as B, I as Be, J as ze, K as De, a$ as je, b as ct, ap as He, a as b, m as Bt, O as Fe, d as We, h as Ge, aE as Ke, x as Je, c as x, w as g, a8 as Ye, u as w, b0 as W, z as R, p as it, y as T, f as wt, j as _t, k as Ze, F as zt, b1 as Xe, aI as Qe, E as Dt, o as E } from "./revolugo.index.wc.C1k5jVOs.min.js";
|
|
2
|
-
import { d as tr, V as er } from "./revolugo.vtoolbar.BrJsPjyn.min.js";
|
|
3
|
-
import { aA as rr, s as sr, aB as jt, bd as Ht, aE as nr, be as ir, V as Ft, k as $t, I as or, J as Wt, d as G, e as L, R as ar, N as K, ae as lr, j as cr, b as ur, _ as dr } from "./revolugo.webcomponentwrapper.BE6Todxg.min.js";
|
|
4
|
-
function Ue(e) {
|
|
5
|
-
try {
|
|
6
|
-
if (typeof document < "u") {
|
|
7
|
-
window.REVOLUGO_ELEMENTS_STYLES = window.REVOLUGO_ELEMENTS_STYLES || {
|
|
8
|
-
sheets: [],
|
|
9
|
-
components: []
|
|
10
|
-
};
|
|
11
|
-
const t = import.meta.url, r = t.slice(0, t.lastIndexOf("/") + 1) + e;
|
|
12
|
-
window.REVOLUGO_ELEMENTS_STYLES.sheets.push(r);
|
|
13
|
-
for (const s of REVOLUGO_ELEMENTS_STYLES.components)
|
|
14
|
-
s(r);
|
|
15
|
-
if (e.indexOf("fonts") >= 0) {
|
|
16
|
-
const s = document.createElement("link");
|
|
17
|
-
s.rel = "stylesheet", linK.href = r, document.head.appendChild(s);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
} catch (t) {
|
|
21
|
-
console.error("[revolugo-elements] ", t);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function pr(e, t, r) {
|
|
25
|
-
if (e == null)
|
|
26
|
-
return t;
|
|
27
|
-
const s = r || ((n) => n);
|
|
28
|
-
if (typeof e == "string")
|
|
29
|
-
try {
|
|
30
|
-
return s(JSON.parse(e));
|
|
31
|
-
} catch {
|
|
32
|
-
return t;
|
|
33
|
-
}
|
|
34
|
-
return s(e);
|
|
35
|
-
}
|
|
36
|
-
function Gt({
|
|
37
|
-
cb: e,
|
|
38
|
-
fallbackValue: t,
|
|
39
|
-
prop: r
|
|
40
|
-
}) {
|
|
41
|
-
const s = pr(qe(r.value), t, e), n = tr(structuredClone(s), t || {});
|
|
42
|
-
return B(s && n);
|
|
43
|
-
}
|
|
44
|
-
const hr = ze({
|
|
45
|
-
...nr(),
|
|
46
|
-
...Fe(ir(), ["inline"])
|
|
47
|
-
}, "VCheckbox"), mr = Be()({
|
|
48
|
-
name: "VCheckbox",
|
|
49
|
-
inheritAttrs: !1,
|
|
50
|
-
props: hr(),
|
|
51
|
-
emits: {
|
|
52
|
-
"update:modelValue": (e) => !0,
|
|
53
|
-
"update:focused": (e) => !0
|
|
54
|
-
},
|
|
55
|
-
setup(e, t) {
|
|
56
|
-
let {
|
|
57
|
-
attrs: r,
|
|
58
|
-
slots: s
|
|
59
|
-
} = t;
|
|
60
|
-
const n = De(e, "modelValue"), {
|
|
61
|
-
isFocused: i,
|
|
62
|
-
focus: o,
|
|
63
|
-
blur: u
|
|
64
|
-
} = rr(e), l = je(), d = ct(() => e.id || `checkbox-${l}`);
|
|
65
|
-
return sr(() => {
|
|
66
|
-
const [m, y] = He(r), v = jt.filterProps(e), $ = Ht.filterProps(e);
|
|
67
|
-
return b(jt, Bt({
|
|
68
|
-
class: ["v-checkbox", e.class]
|
|
69
|
-
}, m, v, {
|
|
70
|
-
modelValue: n.value,
|
|
71
|
-
"onUpdate:modelValue": (O) => n.value = O,
|
|
72
|
-
id: d.value,
|
|
73
|
-
focused: i.value,
|
|
74
|
-
style: e.style
|
|
75
|
-
}), {
|
|
76
|
-
...s,
|
|
77
|
-
default: (O) => {
|
|
78
|
-
let {
|
|
79
|
-
id: M,
|
|
80
|
-
messagesId: gt,
|
|
81
|
-
isDisabled: F,
|
|
82
|
-
isReadonly: bt,
|
|
83
|
-
isValid: q
|
|
84
|
-
} = O;
|
|
85
|
-
return b(Ht, Bt($, {
|
|
86
|
-
id: M.value,
|
|
87
|
-
"aria-describedby": gt.value,
|
|
88
|
-
disabled: F.value,
|
|
89
|
-
readonly: bt.value
|
|
90
|
-
}, y, {
|
|
91
|
-
error: q.value === !1,
|
|
92
|
-
modelValue: n.value,
|
|
93
|
-
"onUpdate:modelValue": (St) => n.value = St,
|
|
94
|
-
onFocus: o,
|
|
95
|
-
onBlur: u
|
|
96
|
-
}), s);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}), {};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
const fe = (e) => (t) => typeof t == "function" ? ((r, s) => (customElements.define(r, s), s))(e, t) : ((r, s) => {
|
|
103
|
-
const { kind: n, elements: i } = s;
|
|
104
|
-
return { kind: n, elements: i, finisher(o) {
|
|
105
|
-
customElements.define(r, o);
|
|
106
|
-
} };
|
|
107
|
-
})(e, t);
|
|
108
|
-
const yr = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(r) {
|
|
109
|
-
r.createProperty(t.key, e);
|
|
110
|
-
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
111
|
-
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
112
|
-
}, finisher(r) {
|
|
113
|
-
r.createProperty(t.key, e);
|
|
114
|
-
} }, fr = (e, t, r) => {
|
|
115
|
-
t.constructor.createProperty(r, e);
|
|
116
|
-
};
|
|
117
|
-
function c(e) {
|
|
118
|
-
return (t, r) => r !== void 0 ? fr(e, t, r) : yr(e, t);
|
|
119
|
-
}
|
|
120
|
-
var Ct;
|
|
121
|
-
((Ct = window.HTMLSlotElement) === null || Ct === void 0 ? void 0 : Ct.prototype.assignedElements) != null;
|
|
122
|
-
var Kt = !0;
|
|
123
|
-
function k(e, t, r) {
|
|
124
|
-
if (typeof r?.value != "function")
|
|
125
|
-
throw new TypeError(`Only methods can be decorated with @bound. <${t ?? e.name}> is not a method!`);
|
|
126
|
-
return {
|
|
127
|
-
configurable: Kt,
|
|
128
|
-
get() {
|
|
129
|
-
const s = r.value.bind(this);
|
|
130
|
-
return Object.defineProperty(this, t, { value: s, configurable: Kt, writable: !0 }), s;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
const ut = window, Ot = ut.ShadowRoot && (ut.ShadyCSS === void 0 || ut.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Lt = Symbol(), Jt = /* @__PURE__ */ new WeakMap();
|
|
135
|
-
let ve = class {
|
|
136
|
-
constructor(t, r, s) {
|
|
137
|
-
if (this._$cssResult$ = !0, s !== Lt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
138
|
-
this.cssText = t, this.t = r;
|
|
139
|
-
}
|
|
140
|
-
get styleSheet() {
|
|
141
|
-
let t = this.o;
|
|
142
|
-
const r = this.t;
|
|
143
|
-
if (Ot && t === void 0) {
|
|
144
|
-
const s = r !== void 0 && r.length === 1;
|
|
145
|
-
s && (t = Jt.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Jt.set(r, t));
|
|
146
|
-
}
|
|
147
|
-
return t;
|
|
148
|
-
}
|
|
149
|
-
toString() {
|
|
150
|
-
return this.cssText;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
const vr = (e) => new ve(typeof e == "string" ? e : e + "", void 0, Lt), It = (e, ...t) => {
|
|
154
|
-
const r = e.length === 1 ? e[0] : t.reduce(((s, n, i) => s + ((o) => {
|
|
155
|
-
if (o._$cssResult$ === !0) return o.cssText;
|
|
156
|
-
if (typeof o == "number") return o;
|
|
157
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
158
|
-
})(n) + e[i + 1]), e[0]);
|
|
159
|
-
return new ve(r, e, Lt);
|
|
160
|
-
}, gr = (e, t) => {
|
|
161
|
-
Ot ? e.adoptedStyleSheets = t.map(((r) => r instanceof CSSStyleSheet ? r : r.styleSheet)) : t.forEach(((r) => {
|
|
162
|
-
const s = document.createElement("style"), n = ut.litNonce;
|
|
163
|
-
n !== void 0 && s.setAttribute("nonce", n), s.textContent = r.cssText, e.appendChild(s);
|
|
164
|
-
}));
|
|
165
|
-
}, Yt = Ot ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
166
|
-
let r = "";
|
|
167
|
-
for (const s of t.cssRules) r += s.cssText;
|
|
168
|
-
return vr(r);
|
|
169
|
-
})(e) : e;
|
|
170
|
-
var Et;
|
|
171
|
-
const yt = window, Zt = yt.trustedTypes, br = Zt ? Zt.emptyScript : "", Xt = yt.reactiveElementPolyfillSupport, Mt = { toAttribute(e, t) {
|
|
172
|
-
switch (t) {
|
|
173
|
-
case Boolean:
|
|
174
|
-
e = e ? br : null;
|
|
175
|
-
break;
|
|
176
|
-
case Object:
|
|
177
|
-
case Array:
|
|
178
|
-
e = e == null ? e : JSON.stringify(e);
|
|
179
|
-
}
|
|
180
|
-
return e;
|
|
181
|
-
}, fromAttribute(e, t) {
|
|
182
|
-
let r = e;
|
|
183
|
-
switch (t) {
|
|
184
|
-
case Boolean:
|
|
185
|
-
r = e !== null;
|
|
186
|
-
break;
|
|
187
|
-
case Number:
|
|
188
|
-
r = e === null ? null : Number(e);
|
|
189
|
-
break;
|
|
190
|
-
case Object:
|
|
191
|
-
case Array:
|
|
192
|
-
try {
|
|
193
|
-
r = JSON.parse(e);
|
|
194
|
-
} catch {
|
|
195
|
-
r = null;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return r;
|
|
199
|
-
} }, ge = (e, t) => t !== e && (t == t || e == e), Pt = { attribute: !0, type: String, converter: Mt, reflect: !1, hasChanged: ge }, Tt = "finalized";
|
|
200
|
-
let z = class extends HTMLElement {
|
|
201
|
-
constructor() {
|
|
202
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
203
|
-
}
|
|
204
|
-
static addInitializer(t) {
|
|
205
|
-
var r;
|
|
206
|
-
this.finalize(), ((r = this.h) !== null && r !== void 0 ? r : this.h = []).push(t);
|
|
207
|
-
}
|
|
208
|
-
static get observedAttributes() {
|
|
209
|
-
this.finalize();
|
|
210
|
-
const t = [];
|
|
211
|
-
return this.elementProperties.forEach(((r, s) => {
|
|
212
|
-
const n = this._$Ep(s, r);
|
|
213
|
-
n !== void 0 && (this._$Ev.set(n, s), t.push(n));
|
|
214
|
-
})), t;
|
|
215
|
-
}
|
|
216
|
-
static createProperty(t, r = Pt) {
|
|
217
|
-
if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(t, r), !r.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
218
|
-
const s = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, s, r);
|
|
219
|
-
n !== void 0 && Object.defineProperty(this.prototype, t, n);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
static getPropertyDescriptor(t, r, s) {
|
|
223
|
-
return { get() {
|
|
224
|
-
return this[r];
|
|
225
|
-
}, set(n) {
|
|
226
|
-
const i = this[t];
|
|
227
|
-
this[r] = n, this.requestUpdate(t, i, s);
|
|
228
|
-
}, configurable: !0, enumerable: !0 };
|
|
229
|
-
}
|
|
230
|
-
static getPropertyOptions(t) {
|
|
231
|
-
return this.elementProperties.get(t) || Pt;
|
|
232
|
-
}
|
|
233
|
-
static finalize() {
|
|
234
|
-
if (this.hasOwnProperty(Tt)) return !1;
|
|
235
|
-
this[Tt] = !0;
|
|
236
|
-
const t = Object.getPrototypeOf(this);
|
|
237
|
-
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
238
|
-
const r = this.properties, s = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
|
|
239
|
-
for (const n of s) this.createProperty(n, r[n]);
|
|
240
|
-
}
|
|
241
|
-
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
242
|
-
}
|
|
243
|
-
static finalizeStyles(t) {
|
|
244
|
-
const r = [];
|
|
245
|
-
if (Array.isArray(t)) {
|
|
246
|
-
const s = new Set(t.flat(1 / 0).reverse());
|
|
247
|
-
for (const n of s) r.unshift(Yt(n));
|
|
248
|
-
} else t !== void 0 && r.push(Yt(t));
|
|
249
|
-
return r;
|
|
250
|
-
}
|
|
251
|
-
static _$Ep(t, r) {
|
|
252
|
-
const s = r.attribute;
|
|
253
|
-
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
254
|
-
}
|
|
255
|
-
_$Eu() {
|
|
256
|
-
var t;
|
|
257
|
-
this._$E_ = new Promise(((r) => this.enableUpdating = r)), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach(((r) => r(this)));
|
|
258
|
-
}
|
|
259
|
-
addController(t) {
|
|
260
|
-
var r, s;
|
|
261
|
-
((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
|
|
262
|
-
}
|
|
263
|
-
removeController(t) {
|
|
264
|
-
var r;
|
|
265
|
-
(r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
266
|
-
}
|
|
267
|
-
_$Eg() {
|
|
268
|
-
this.constructor.elementProperties.forEach(((t, r) => {
|
|
269
|
-
this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
|
|
270
|
-
}));
|
|
271
|
-
}
|
|
272
|
-
createRenderRoot() {
|
|
273
|
-
var t;
|
|
274
|
-
const r = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
275
|
-
return gr(r, this.constructor.elementStyles), r;
|
|
276
|
-
}
|
|
277
|
-
connectedCallback() {
|
|
278
|
-
var t;
|
|
279
|
-
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach(((r) => {
|
|
280
|
-
var s;
|
|
281
|
-
return (s = r.hostConnected) === null || s === void 0 ? void 0 : s.call(r);
|
|
282
|
-
}));
|
|
283
|
-
}
|
|
284
|
-
enableUpdating(t) {
|
|
285
|
-
}
|
|
286
|
-
disconnectedCallback() {
|
|
287
|
-
var t;
|
|
288
|
-
(t = this._$ES) === null || t === void 0 || t.forEach(((r) => {
|
|
289
|
-
var s;
|
|
290
|
-
return (s = r.hostDisconnected) === null || s === void 0 ? void 0 : s.call(r);
|
|
291
|
-
}));
|
|
292
|
-
}
|
|
293
|
-
attributeChangedCallback(t, r, s) {
|
|
294
|
-
this._$AK(t, s);
|
|
295
|
-
}
|
|
296
|
-
_$EO(t, r, s = Pt) {
|
|
297
|
-
var n;
|
|
298
|
-
const i = this.constructor._$Ep(t, s);
|
|
299
|
-
if (i !== void 0 && s.reflect === !0) {
|
|
300
|
-
const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter : Mt).toAttribute(r, s.type);
|
|
301
|
-
this._$El = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$El = null;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
_$AK(t, r) {
|
|
305
|
-
var s;
|
|
306
|
-
const n = this.constructor, i = n._$Ev.get(t);
|
|
307
|
-
if (i !== void 0 && this._$El !== i) {
|
|
308
|
-
const o = n.getPropertyOptions(i), u = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : Mt;
|
|
309
|
-
this._$El = i, this[i] = u.fromAttribute(r, o.type), this._$El = null;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
requestUpdate(t, r, s) {
|
|
313
|
-
let n = !0;
|
|
314
|
-
t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || ge)(this[t], r) ? (this._$AL.has(t) || this._$AL.set(t, r), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
315
|
-
}
|
|
316
|
-
async _$Ej() {
|
|
317
|
-
this.isUpdatePending = !0;
|
|
318
|
-
try {
|
|
319
|
-
await this._$E_;
|
|
320
|
-
} catch (r) {
|
|
321
|
-
Promise.reject(r);
|
|
322
|
-
}
|
|
323
|
-
const t = this.scheduleUpdate();
|
|
324
|
-
return t != null && await t, !this.isUpdatePending;
|
|
325
|
-
}
|
|
326
|
-
scheduleUpdate() {
|
|
327
|
-
return this.performUpdate();
|
|
328
|
-
}
|
|
329
|
-
performUpdate() {
|
|
330
|
-
var t;
|
|
331
|
-
if (!this.isUpdatePending) return;
|
|
332
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach(((n, i) => this[i] = n)), this._$Ei = void 0);
|
|
333
|
-
let r = !1;
|
|
334
|
-
const s = this._$AL;
|
|
335
|
-
try {
|
|
336
|
-
r = this.shouldUpdate(s), r ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach(((n) => {
|
|
337
|
-
var i;
|
|
338
|
-
return (i = n.hostUpdate) === null || i === void 0 ? void 0 : i.call(n);
|
|
339
|
-
})), this.update(s)) : this._$Ek();
|
|
340
|
-
} catch (n) {
|
|
341
|
-
throw r = !1, this._$Ek(), n;
|
|
342
|
-
}
|
|
343
|
-
r && this._$AE(s);
|
|
344
|
-
}
|
|
345
|
-
willUpdate(t) {
|
|
346
|
-
}
|
|
347
|
-
_$AE(t) {
|
|
348
|
-
var r;
|
|
349
|
-
(r = this._$ES) === null || r === void 0 || r.forEach(((s) => {
|
|
350
|
-
var n;
|
|
351
|
-
return (n = s.hostUpdated) === null || n === void 0 ? void 0 : n.call(s);
|
|
352
|
-
})), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
353
|
-
}
|
|
354
|
-
_$Ek() {
|
|
355
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
356
|
-
}
|
|
357
|
-
get updateComplete() {
|
|
358
|
-
return this.getUpdateComplete();
|
|
359
|
-
}
|
|
360
|
-
getUpdateComplete() {
|
|
361
|
-
return this._$E_;
|
|
362
|
-
}
|
|
363
|
-
shouldUpdate(t) {
|
|
364
|
-
return !0;
|
|
365
|
-
}
|
|
366
|
-
update(t) {
|
|
367
|
-
this._$EC !== void 0 && (this._$EC.forEach(((r, s) => this._$EO(s, this[s], r))), this._$EC = void 0), this._$Ek();
|
|
368
|
-
}
|
|
369
|
-
updated(t) {
|
|
370
|
-
}
|
|
371
|
-
firstUpdated(t) {
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
z[Tt] = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, Xt?.({ ReactiveElement: z }), ((Et = yt.reactiveElementVersions) !== null && Et !== void 0 ? Et : yt.reactiveElementVersions = []).push("1.6.3");
|
|
375
|
-
var At;
|
|
376
|
-
const ft = window, D = ft.trustedTypes, Qt = D ? D.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Nt = "$lit$", N = `lit$${(Math.random() + "").slice(9)}$`, be = "?" + N, Sr = `<${be}>`, U = document, tt = () => U.createComment(""), et = (e) => e === null || typeof e != "object" && typeof e != "function", Se = Array.isArray, wr = (e) => Se(e) || typeof e?.[Symbol.iterator] == "function", xt = `[
|
|
377
|
-
\f\r]`, J = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, te = /-->/g, ee = />/g, I = RegExp(`>|${xt}(?:([^\\s"'>=/]+)(${xt}*=${xt}*(?:[^
|
|
378
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), re = /'/g, se = /"/g, we = /^(?:script|style|textarea|title)$/i, _r = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), $r = _r(1), j = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), V = U.createTreeWalker(U, 129, null, !1);
|
|
379
|
-
function _e(e, t) {
|
|
380
|
-
if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
381
|
-
return Qt !== void 0 ? Qt.createHTML(t) : t;
|
|
382
|
-
}
|
|
383
|
-
const Cr = (e, t) => {
|
|
384
|
-
const r = e.length - 1, s = [];
|
|
385
|
-
let n, i = t === 2 ? "<svg>" : "", o = J;
|
|
386
|
-
for (let u = 0; u < r; u++) {
|
|
387
|
-
const l = e[u];
|
|
388
|
-
let d, m, y = -1, v = 0;
|
|
389
|
-
for (; v < l.length && (o.lastIndex = v, m = o.exec(l), m !== null); ) v = o.lastIndex, o === J ? m[1] === "!--" ? o = te : m[1] !== void 0 ? o = ee : m[2] !== void 0 ? (we.test(m[2]) && (n = RegExp("</" + m[2], "g")), o = I) : m[3] !== void 0 && (o = I) : o === I ? m[0] === ">" ? (o = n ?? J, y = -1) : m[1] === void 0 ? y = -2 : (y = o.lastIndex - m[2].length, d = m[1], o = m[3] === void 0 ? I : m[3] === '"' ? se : re) : o === se || o === re ? o = I : o === te || o === ee ? o = J : (o = I, n = void 0);
|
|
390
|
-
const $ = o === I && e[u + 1].startsWith("/>") ? " " : "";
|
|
391
|
-
i += o === J ? l + Sr : y >= 0 ? (s.push(d), l.slice(0, y) + Nt + l.slice(y) + N + $) : l + N + (y === -2 ? (s.push(void 0), u) : $);
|
|
392
|
-
}
|
|
393
|
-
return [_e(e, i + (e[r] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
|
394
|
-
};
|
|
395
|
-
class rt {
|
|
396
|
-
constructor({ strings: t, _$litType$: r }, s) {
|
|
397
|
-
let n;
|
|
398
|
-
this.parts = [];
|
|
399
|
-
let i = 0, o = 0;
|
|
400
|
-
const u = t.length - 1, l = this.parts, [d, m] = Cr(t, r);
|
|
401
|
-
if (this.el = rt.createElement(d, s), V.currentNode = this.el.content, r === 2) {
|
|
402
|
-
const y = this.el.content, v = y.firstChild;
|
|
403
|
-
v.remove(), y.append(...v.childNodes);
|
|
404
|
-
}
|
|
405
|
-
for (; (n = V.nextNode()) !== null && l.length < u; ) {
|
|
406
|
-
if (n.nodeType === 1) {
|
|
407
|
-
if (n.hasAttributes()) {
|
|
408
|
-
const y = [];
|
|
409
|
-
for (const v of n.getAttributeNames()) if (v.endsWith(Nt) || v.startsWith(N)) {
|
|
410
|
-
const $ = m[o++];
|
|
411
|
-
if (y.push(v), $ !== void 0) {
|
|
412
|
-
const O = n.getAttribute($.toLowerCase() + Nt).split(N), M = /([.?@])?(.*)/.exec($);
|
|
413
|
-
l.push({ type: 1, index: i, name: M[2], strings: O, ctor: M[1] === "." ? Pr : M[1] === "?" ? xr : M[1] === "@" ? kr : vt });
|
|
414
|
-
} else l.push({ type: 6, index: i });
|
|
415
|
-
}
|
|
416
|
-
for (const v of y) n.removeAttribute(v);
|
|
417
|
-
}
|
|
418
|
-
if (we.test(n.tagName)) {
|
|
419
|
-
const y = n.textContent.split(N), v = y.length - 1;
|
|
420
|
-
if (v > 0) {
|
|
421
|
-
n.textContent = D ? D.emptyScript : "";
|
|
422
|
-
for (let $ = 0; $ < v; $++) n.append(y[$], tt()), V.nextNode(), l.push({ type: 2, index: ++i });
|
|
423
|
-
n.append(y[v], tt());
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
} else if (n.nodeType === 8) if (n.data === be) l.push({ type: 2, index: i });
|
|
427
|
-
else {
|
|
428
|
-
let y = -1;
|
|
429
|
-
for (; (y = n.data.indexOf(N, y + 1)) !== -1; ) l.push({ type: 7, index: i }), y += N.length - 1;
|
|
430
|
-
}
|
|
431
|
-
i++;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
static createElement(t, r) {
|
|
435
|
-
const s = U.createElement("template");
|
|
436
|
-
return s.innerHTML = t, s;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
function H(e, t, r = e, s) {
|
|
440
|
-
var n, i, o, u;
|
|
441
|
-
if (t === j) return t;
|
|
442
|
-
let l = s !== void 0 ? (n = r._$Co) === null || n === void 0 ? void 0 : n[s] : r._$Cl;
|
|
443
|
-
const d = et(t) ? void 0 : t._$litDirective$;
|
|
444
|
-
return l?.constructor !== d && ((i = l?._$AO) === null || i === void 0 || i.call(l, !1), d === void 0 ? l = void 0 : (l = new d(e), l._$AT(e, r, s)), s !== void 0 ? ((o = (u = r)._$Co) !== null && o !== void 0 ? o : u._$Co = [])[s] = l : r._$Cl = l), l !== void 0 && (t = H(e, l._$AS(e, t.values), l, s)), t;
|
|
445
|
-
}
|
|
446
|
-
class Er {
|
|
447
|
-
constructor(t, r) {
|
|
448
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
|
|
449
|
-
}
|
|
450
|
-
get parentNode() {
|
|
451
|
-
return this._$AM.parentNode;
|
|
452
|
-
}
|
|
453
|
-
get _$AU() {
|
|
454
|
-
return this._$AM._$AU;
|
|
455
|
-
}
|
|
456
|
-
u(t) {
|
|
457
|
-
var r;
|
|
458
|
-
const { el: { content: s }, parts: n } = this._$AD, i = ((r = t?.creationScope) !== null && r !== void 0 ? r : U).importNode(s, !0);
|
|
459
|
-
V.currentNode = i;
|
|
460
|
-
let o = V.nextNode(), u = 0, l = 0, d = n[0];
|
|
461
|
-
for (; d !== void 0; ) {
|
|
462
|
-
if (u === d.index) {
|
|
463
|
-
let m;
|
|
464
|
-
d.type === 2 ? m = new st(o, o.nextSibling, this, t) : d.type === 1 ? m = new d.ctor(o, d.name, d.strings, this, t) : d.type === 6 && (m = new Rr(o, this, t)), this._$AV.push(m), d = n[++l];
|
|
465
|
-
}
|
|
466
|
-
u !== d?.index && (o = V.nextNode(), u++);
|
|
467
|
-
}
|
|
468
|
-
return V.currentNode = U, i;
|
|
469
|
-
}
|
|
470
|
-
v(t) {
|
|
471
|
-
let r = 0;
|
|
472
|
-
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, r), r += s.strings.length - 2) : s._$AI(t[r])), r++;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
class st {
|
|
476
|
-
constructor(t, r, s, n) {
|
|
477
|
-
var i;
|
|
478
|
-
this.type = 2, this._$AH = S, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = s, this.options = n, this._$Cp = (i = n?.isConnected) === null || i === void 0 || i;
|
|
479
|
-
}
|
|
480
|
-
get _$AU() {
|
|
481
|
-
var t, r;
|
|
482
|
-
return (r = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && r !== void 0 ? r : this._$Cp;
|
|
483
|
-
}
|
|
484
|
-
get parentNode() {
|
|
485
|
-
let t = this._$AA.parentNode;
|
|
486
|
-
const r = this._$AM;
|
|
487
|
-
return r !== void 0 && t?.nodeType === 11 && (t = r.parentNode), t;
|
|
488
|
-
}
|
|
489
|
-
get startNode() {
|
|
490
|
-
return this._$AA;
|
|
491
|
-
}
|
|
492
|
-
get endNode() {
|
|
493
|
-
return this._$AB;
|
|
494
|
-
}
|
|
495
|
-
_$AI(t, r = this) {
|
|
496
|
-
t = H(this, t, r), et(t) ? t === S || t == null || t === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : wr(t) ? this.T(t) : this._(t);
|
|
497
|
-
}
|
|
498
|
-
k(t) {
|
|
499
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
500
|
-
}
|
|
501
|
-
$(t) {
|
|
502
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
503
|
-
}
|
|
504
|
-
_(t) {
|
|
505
|
-
this._$AH !== S && et(this._$AH) ? this._$AA.nextSibling.data = t : this.$(U.createTextNode(t)), this._$AH = t;
|
|
506
|
-
}
|
|
507
|
-
g(t) {
|
|
508
|
-
var r;
|
|
509
|
-
const { values: s, _$litType$: n } = t, i = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = rt.createElement(_e(n.h, n.h[0]), this.options)), n);
|
|
510
|
-
if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === i) this._$AH.v(s);
|
|
511
|
-
else {
|
|
512
|
-
const o = new Er(i, this), u = o.u(this.options);
|
|
513
|
-
o.v(s), this.$(u), this._$AH = o;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
_$AC(t) {
|
|
517
|
-
let r = ne.get(t.strings);
|
|
518
|
-
return r === void 0 && ne.set(t.strings, r = new rt(t)), r;
|
|
519
|
-
}
|
|
520
|
-
T(t) {
|
|
521
|
-
Se(this._$AH) || (this._$AH = [], this._$AR());
|
|
522
|
-
const r = this._$AH;
|
|
523
|
-
let s, n = 0;
|
|
524
|
-
for (const i of t) n === r.length ? r.push(s = new st(this.k(tt()), this.k(tt()), this, this.options)) : s = r[n], s._$AI(i), n++;
|
|
525
|
-
n < r.length && (this._$AR(s && s._$AB.nextSibling, n), r.length = n);
|
|
526
|
-
}
|
|
527
|
-
_$AR(t = this._$AA.nextSibling, r) {
|
|
528
|
-
var s;
|
|
529
|
-
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, r); t && t !== this._$AB; ) {
|
|
530
|
-
const n = t.nextSibling;
|
|
531
|
-
t.remove(), t = n;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
setConnected(t) {
|
|
535
|
-
var r;
|
|
536
|
-
this._$AM === void 0 && (this._$Cp = t, (r = this._$AP) === null || r === void 0 || r.call(this, t));
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
class vt {
|
|
540
|
-
constructor(t, r, s, n, i) {
|
|
541
|
-
this.type = 1, this._$AH = S, this._$AN = void 0, this.element = t, this.name = r, this._$AM = n, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = S;
|
|
542
|
-
}
|
|
543
|
-
get tagName() {
|
|
544
|
-
return this.element.tagName;
|
|
545
|
-
}
|
|
546
|
-
get _$AU() {
|
|
547
|
-
return this._$AM._$AU;
|
|
548
|
-
}
|
|
549
|
-
_$AI(t, r = this, s, n) {
|
|
550
|
-
const i = this.strings;
|
|
551
|
-
let o = !1;
|
|
552
|
-
if (i === void 0) t = H(this, t, r, 0), o = !et(t) || t !== this._$AH && t !== j, o && (this._$AH = t);
|
|
553
|
-
else {
|
|
554
|
-
const u = t;
|
|
555
|
-
let l, d;
|
|
556
|
-
for (t = i[0], l = 0; l < i.length - 1; l++) d = H(this, u[s + l], r, l), d === j && (d = this._$AH[l]), o || (o = !et(d) || d !== this._$AH[l]), d === S ? t = S : t !== S && (t += (d ?? "") + i[l + 1]), this._$AH[l] = d;
|
|
557
|
-
}
|
|
558
|
-
o && !n && this.j(t);
|
|
559
|
-
}
|
|
560
|
-
j(t) {
|
|
561
|
-
t === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
class Pr extends vt {
|
|
565
|
-
constructor() {
|
|
566
|
-
super(...arguments), this.type = 3;
|
|
567
|
-
}
|
|
568
|
-
j(t) {
|
|
569
|
-
this.element[this.name] = t === S ? void 0 : t;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
const Ar = D ? D.emptyScript : "";
|
|
573
|
-
class xr extends vt {
|
|
574
|
-
constructor() {
|
|
575
|
-
super(...arguments), this.type = 4;
|
|
576
|
-
}
|
|
577
|
-
j(t) {
|
|
578
|
-
t && t !== S ? this.element.setAttribute(this.name, Ar) : this.element.removeAttribute(this.name);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
class kr extends vt {
|
|
582
|
-
constructor(t, r, s, n, i) {
|
|
583
|
-
super(t, r, s, n, i), this.type = 5;
|
|
584
|
-
}
|
|
585
|
-
_$AI(t, r = this) {
|
|
586
|
-
var s;
|
|
587
|
-
if ((t = (s = H(this, t, r, 0)) !== null && s !== void 0 ? s : S) === j) return;
|
|
588
|
-
const n = this._$AH, i = t === S && n !== S || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== S && (n === S || i);
|
|
589
|
-
i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
590
|
-
}
|
|
591
|
-
handleEvent(t) {
|
|
592
|
-
var r, s;
|
|
593
|
-
typeof this._$AH == "function" ? this._$AH.call((s = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && s !== void 0 ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
class Rr {
|
|
597
|
-
constructor(t, r, s) {
|
|
598
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = s;
|
|
599
|
-
}
|
|
600
|
-
get _$AU() {
|
|
601
|
-
return this._$AM._$AU;
|
|
602
|
-
}
|
|
603
|
-
_$AI(t) {
|
|
604
|
-
H(this, t);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
const ie = ft.litHtmlPolyfillSupport;
|
|
608
|
-
ie?.(rt, st), ((At = ft.litHtmlVersions) !== null && At !== void 0 ? At : ft.litHtmlVersions = []).push("2.8.0");
|
|
609
|
-
const Mr = (e, t, r) => {
|
|
610
|
-
var s, n;
|
|
611
|
-
const i = (s = r?.renderBefore) !== null && s !== void 0 ? s : t;
|
|
612
|
-
let o = i._$litPart$;
|
|
613
|
-
if (o === void 0) {
|
|
614
|
-
const u = (n = r?.renderBefore) !== null && n !== void 0 ? n : null;
|
|
615
|
-
i._$litPart$ = o = new st(t.insertBefore(tt(), u), u, void 0, r ?? {});
|
|
616
|
-
}
|
|
617
|
-
return o._$AI(e), o;
|
|
618
|
-
};
|
|
619
|
-
var kt, Rt;
|
|
620
|
-
class Q extends z {
|
|
621
|
-
constructor() {
|
|
622
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
623
|
-
}
|
|
624
|
-
createRenderRoot() {
|
|
625
|
-
var t, r;
|
|
626
|
-
const s = super.createRenderRoot();
|
|
627
|
-
return (t = (r = this.renderOptions).renderBefore) !== null && t !== void 0 || (r.renderBefore = s.firstChild), s;
|
|
628
|
-
}
|
|
629
|
-
update(t) {
|
|
630
|
-
const r = this.render();
|
|
631
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Mr(r, this.renderRoot, this.renderOptions);
|
|
632
|
-
}
|
|
633
|
-
connectedCallback() {
|
|
634
|
-
var t;
|
|
635
|
-
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
636
|
-
}
|
|
637
|
-
disconnectedCallback() {
|
|
638
|
-
var t;
|
|
639
|
-
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
640
|
-
}
|
|
641
|
-
render() {
|
|
642
|
-
return j;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
Q.finalized = !0, Q._$litElement$ = !0, (kt = globalThis.litElementHydrateSupport) === null || kt === void 0 || kt.call(globalThis, { LitElement: Q });
|
|
646
|
-
const oe = globalThis.litElementPolyfillSupport;
|
|
647
|
-
oe?.({ LitElement: Q });
|
|
648
|
-
((Rt = globalThis.litElementVersions) !== null && Rt !== void 0 ? Rt : globalThis.litElementVersions = []).push("3.3.3");
|
|
649
|
-
const Tr = (e) => e ?? S, Nr = /[A-ZÀ-ÖÙ-Ý]+/g, Or = /[a-zà-öù-ý]+/g;
|
|
650
|
-
function Lr(e) {
|
|
651
|
-
const t = e.replace(Nr, r).match(Or);
|
|
652
|
-
return t ? t.join("-") : "";
|
|
653
|
-
function r(s) {
|
|
654
|
-
return " " + (s.length > 2 ? s.slice(0, -1) + " " + s.slice(-1) : s).toLowerCase();
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
function Ir() {
|
|
658
|
-
const e = {};
|
|
659
|
-
return {
|
|
660
|
-
has: (t) => Object.hasOwnProperty.call(e, t),
|
|
661
|
-
get: (t) => e[t],
|
|
662
|
-
set: (t, r) => {
|
|
663
|
-
e[t] = r;
|
|
664
|
-
}
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
function Vr(e, t) {
|
|
668
|
-
const r = Ir();
|
|
669
|
-
return (...s) => {
|
|
670
|
-
const n = e(...s);
|
|
671
|
-
return r.has(n) || r.set(n, t(...s)), r.get(n);
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
var Ur = (e) => e, $e = Vr(Ur, Lr), qr = (e) => (t) => e.includes(t), Br = qr(["paymentMethod", "source", "token"]);
|
|
675
|
-
async function zr(e) {
|
|
676
|
-
const { ok: t, statusText: r } = e;
|
|
677
|
-
if (!t)
|
|
678
|
-
throw new Error(r);
|
|
679
|
-
return e;
|
|
680
|
-
}
|
|
681
|
-
function Dr(e) {
|
|
682
|
-
return "addInitializer" in e.constructor;
|
|
683
|
-
}
|
|
684
|
-
var X = class {
|
|
685
|
-
constructor(e) {
|
|
686
|
-
if (this.host = e, this.values = /* @__PURE__ */ new Map(), X.instances.has(e))
|
|
687
|
-
return X.instances.get(e);
|
|
688
|
-
e.addController(this), X.instances.set(e, this);
|
|
689
|
-
}
|
|
690
|
-
static for(e) {
|
|
691
|
-
return new X(e);
|
|
692
|
-
}
|
|
693
|
-
hostConnected() {
|
|
694
|
-
}
|
|
695
|
-
set(e, t) {
|
|
696
|
-
const r = this.values.get(e);
|
|
697
|
-
this.values.set(e, t), Dr(this.host) ? this.host.requestUpdate(e, r) : this.host.requestUpdate();
|
|
698
|
-
}
|
|
699
|
-
}, Vt = X;
|
|
700
|
-
Vt.instances = /* @__PURE__ */ new Map();
|
|
701
|
-
function p(e, t) {
|
|
702
|
-
const r = e.constructor;
|
|
703
|
-
r.addInitializer((s) => {
|
|
704
|
-
const n = Vt.for(s);
|
|
705
|
-
Object.defineProperty(s.constructor.prototype, t, {
|
|
706
|
-
enumerable: !0,
|
|
707
|
-
configurable: !0,
|
|
708
|
-
get() {
|
|
709
|
-
return n.values.get(t);
|
|
710
|
-
},
|
|
711
|
-
set(i) {
|
|
712
|
-
n.values.has(t) || n.values.set(t, i);
|
|
713
|
-
}
|
|
714
|
-
}), r.createProperty(t, {
|
|
715
|
-
...r.getPropertyOptions(t),
|
|
716
|
-
noAccessor: !0
|
|
717
|
-
});
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
p.set = function(e, t) {
|
|
721
|
-
const r = Vt.for(e);
|
|
722
|
-
for (const [s, n] of Object.entries(t))
|
|
723
|
-
r.set(s, n);
|
|
724
|
-
};
|
|
725
|
-
var jr = class extends Event {
|
|
726
|
-
constructor(e, t, r, s) {
|
|
727
|
-
super(`${s ?? e.toLowerCase()}-changed`), this.key = e, this.oldValue = t, this.value = r, this.detail = { value: r };
|
|
728
|
-
}
|
|
729
|
-
}, dt = class {
|
|
730
|
-
constructor(e) {
|
|
731
|
-
if (this.host = e, this.cache = /* @__PURE__ */ new Map(), dt.instances.has(e))
|
|
732
|
-
return dt.instances.get(e);
|
|
733
|
-
e.addController(this), dt.instances.set(e, this);
|
|
734
|
-
}
|
|
735
|
-
hostUpdated() {
|
|
736
|
-
for (const [e, t] of this.cache) {
|
|
737
|
-
const r = this.host[e], { attribute: s } = this.host.constructor.getPropertyOptions(e) ?? {}, n = typeof s == "string" ? s : null;
|
|
738
|
-
this.cache.set(e, r), this.host.dispatchEvent(new jr(e, t, r, n));
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
}, Ce = dt;
|
|
742
|
-
Ce.instances = /* @__PURE__ */ new Map();
|
|
743
|
-
function P(e, t) {
|
|
744
|
-
e.constructor.addInitializer((r) => {
|
|
745
|
-
new Ce(r).cache.set(t, r[t]);
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
function Hr(e) {
|
|
749
|
-
return (t, r, s) => {
|
|
750
|
-
const n = s.value;
|
|
751
|
-
return s.value = e(n), s;
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
var Ut = Hr(function(e) {
|
|
755
|
-
const { name: t } = e;
|
|
756
|
-
return async function(...r) {
|
|
757
|
-
if (!this.stripe)
|
|
758
|
-
throw new Error(`<${this.constructor.is}>: Stripe must be initialized before calling ${t}.`);
|
|
759
|
-
return e.call(this, ...r).then(this.handleResponse);
|
|
760
|
-
};
|
|
761
|
-
});
|
|
762
|
-
function ae(e) {
|
|
763
|
-
if (e.error)
|
|
764
|
-
throw e.error;
|
|
765
|
-
return e;
|
|
766
|
-
}
|
|
767
|
-
var Fr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, a = (e, t, r, s) => {
|
|
768
|
-
for (var n = s > 1 ? void 0 : s ? Wr(t, r) : t, i = e.length - 1, o; i >= 0; i--)
|
|
769
|
-
(o = e[i]) && (n = (s ? o(t, r, n) : o(n)) || n);
|
|
770
|
-
return s && n && Fr(t, r, n), n;
|
|
771
|
-
}, Ee = (e, t, r) => {
|
|
772
|
-
if (!t.has(e))
|
|
773
|
-
throw TypeError("Cannot " + r);
|
|
774
|
-
}, le = (e, t, r) => (Ee(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ce = (e, t, r) => {
|
|
775
|
-
if (t.has(e))
|
|
776
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
777
|
-
t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
778
|
-
}, ue = (e, t, r, s) => (Ee(e, t, "write to private field"), t.set(e, r), r);
|
|
779
|
-
function de() {
|
|
780
|
-
return (Date.now() + Math.random() * 1e3).toString(36).substr(0, 8);
|
|
781
|
-
}
|
|
782
|
-
var Gr = class {
|
|
783
|
-
constructor(e, t) {
|
|
784
|
-
this.host = e, this.options = t, this.initialized = !1, this.shadowHosts = [], this.host.addController(this), this.mountId = this.resetMountId(), this.slotName = this.options?.slotName ?? `breadcrumb-${de()}`;
|
|
785
|
-
}
|
|
786
|
-
get mount() {
|
|
787
|
-
return document.getElementById(this.mountId);
|
|
788
|
-
}
|
|
789
|
-
hostUpdated() {
|
|
790
|
-
!this.initialized && this.options?.autoInitialize !== !1 && this.init();
|
|
791
|
-
}
|
|
792
|
-
hostDisconnected() {
|
|
793
|
-
this.destroyMountPoints();
|
|
794
|
-
}
|
|
795
|
-
resetMountId() {
|
|
796
|
-
return `${this.options?.mountPrefix ?? this.host.localName}-mount-point-${de()}`;
|
|
797
|
-
}
|
|
798
|
-
createMountPoint() {
|
|
799
|
-
const e = document.createElement("div");
|
|
800
|
-
return e.id = this.mountId, e.classList.add(`${this.host.tagName.toLowerCase()}-mount`), e;
|
|
801
|
-
}
|
|
802
|
-
createSlot(e) {
|
|
803
|
-
const t = document.createElement("slot");
|
|
804
|
-
return t.slot = e, t.name = e, t;
|
|
805
|
-
}
|
|
806
|
-
appendTemplate(e, t = this.createMountPoint()) {
|
|
807
|
-
return e.appendChild(t), t;
|
|
808
|
-
}
|
|
809
|
-
initMountPoints() {
|
|
810
|
-
this.initShadowMountPoints();
|
|
811
|
-
}
|
|
812
|
-
destroyMountPoints() {
|
|
813
|
-
for (const e of this.shadowHosts)
|
|
814
|
-
for (const t of e.querySelectorAll(`[slot="${this.slotName}"][name="${this.slotName}"]`))
|
|
815
|
-
t.remove();
|
|
816
|
-
this.mount && this.mount.remove(), this.mountId = this.resetMountId();
|
|
817
|
-
}
|
|
818
|
-
initShadowMountPoints() {
|
|
819
|
-
let e = this.host;
|
|
820
|
-
for (this.shadowHosts = [this.host]; e = e.getRootNode().host; )
|
|
821
|
-
this.shadowHosts.push(e);
|
|
822
|
-
const { shadowHosts: t, slotName: r } = this, s = [...t], n = s.pop();
|
|
823
|
-
if (!n.querySelector(`[slot="${r}"]`)) {
|
|
824
|
-
const o = document.createElement("div");
|
|
825
|
-
o.slot = r, n.appendChild(o);
|
|
826
|
-
}
|
|
827
|
-
const i = n.querySelector(`[slot="${r}"]`);
|
|
828
|
-
this.appendTemplate(i), s.forEach((o) => this.appendTemplate(o, this.createSlot(r)));
|
|
829
|
-
}
|
|
830
|
-
init() {
|
|
831
|
-
this.destroyMountPoints(), this.initMountPoints(), this.initialized = !0;
|
|
832
|
-
}
|
|
833
|
-
};
|
|
834
|
-
function pt(e) {
|
|
835
|
-
"@babel/helpers - typeof";
|
|
836
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? pt = function(t) {
|
|
837
|
-
return typeof t;
|
|
838
|
-
} : pt = function(t) {
|
|
839
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
840
|
-
}, pt(e);
|
|
841
|
-
}
|
|
842
|
-
var Pe = "https://js.stripe.com/v3", Kr = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, pe = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Jr = function() {
|
|
843
|
-
for (var t = document.querySelectorAll('script[src^="'.concat(Pe, '"]')), r = 0; r < t.length; r++) {
|
|
844
|
-
var s = t[r];
|
|
845
|
-
if (Kr.test(s.src))
|
|
846
|
-
return s;
|
|
847
|
-
}
|
|
848
|
-
return null;
|
|
849
|
-
}, Yr = function(t) {
|
|
850
|
-
var r = t && !t.advancedFraudSignals ? "?advancedFraudSignals=false" : "", s = document.createElement("script");
|
|
851
|
-
s.src = "".concat(Pe).concat(r);
|
|
852
|
-
var n = document.head || document.body;
|
|
853
|
-
if (!n)
|
|
854
|
-
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
855
|
-
return n.appendChild(s), s;
|
|
856
|
-
}, Zr = function(t, r) {
|
|
857
|
-
!t || !t._registerWrapper || t._registerWrapper({
|
|
858
|
-
name: "stripe-js",
|
|
859
|
-
version: "1.32.0",
|
|
860
|
-
startTime: r
|
|
861
|
-
});
|
|
862
|
-
}, ot = null, Xr = function(t) {
|
|
863
|
-
return ot !== null || (ot = new Promise(function(r, s) {
|
|
864
|
-
if (typeof window > "u") {
|
|
865
|
-
r(null);
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
if (window.Stripe && t && console.warn(pe), window.Stripe) {
|
|
869
|
-
r(window.Stripe);
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
try {
|
|
873
|
-
var n = Jr();
|
|
874
|
-
n && t ? console.warn(pe) : n || (n = Yr(t)), n.addEventListener("load", function() {
|
|
875
|
-
window.Stripe ? r(window.Stripe) : s(new Error("Stripe.js not available"));
|
|
876
|
-
}), n.addEventListener("error", function() {
|
|
877
|
-
s(new Error("Failed to load Stripe.js"));
|
|
878
|
-
});
|
|
879
|
-
} catch (i) {
|
|
880
|
-
s(i);
|
|
881
|
-
return;
|
|
882
|
-
}
|
|
883
|
-
})), ot;
|
|
884
|
-
}, Qr = function(t, r, s) {
|
|
885
|
-
if (t === null)
|
|
886
|
-
return null;
|
|
887
|
-
var n = t.apply(void 0, r);
|
|
888
|
-
return Zr(n, s), n;
|
|
889
|
-
}, ts = function(t) {
|
|
890
|
-
var r = `invalid load parameters; expected object of shape
|
|
891
|
-
|
|
892
|
-
{advancedFraudSignals: boolean}
|
|
893
|
-
|
|
894
|
-
but received
|
|
895
|
-
|
|
896
|
-
`.concat(JSON.stringify(t), `
|
|
897
|
-
`);
|
|
898
|
-
if (t === null || pt(t) !== "object")
|
|
899
|
-
throw new Error(r);
|
|
900
|
-
if (Object.keys(t).length === 1 && typeof t.advancedFraudSignals == "boolean")
|
|
901
|
-
return t;
|
|
902
|
-
throw new Error(r);
|
|
903
|
-
}, Ae, xe = !1, ke = function() {
|
|
904
|
-
for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
|
|
905
|
-
r[s] = arguments[s];
|
|
906
|
-
xe = !0;
|
|
907
|
-
var n = Date.now();
|
|
908
|
-
return Xr(Ae).then(function(i) {
|
|
909
|
-
return Qr(i, r, n);
|
|
910
|
-
});
|
|
911
|
-
};
|
|
912
|
-
ke.setLoadParameters = function(e) {
|
|
913
|
-
if (xe)
|
|
914
|
-
throw new Error("You cannot change load parameters after calling loadStripe");
|
|
915
|
-
Ae = ts(e);
|
|
916
|
-
};
|
|
917
|
-
var Re = class extends Error {
|
|
918
|
-
constructor(e, t) {
|
|
919
|
-
super(`<${e}>: ${t}`), this.originalMessage = t;
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
|
-
function Me(e) {
|
|
923
|
-
return !!e && e instanceof Re;
|
|
924
|
-
}
|
|
925
|
-
var es = {
|
|
926
|
-
toAttribute: (e) => e ? Me(e) ? e.originalMessage : e.message || "" : null
|
|
927
|
-
}, h = class extends Q {
|
|
928
|
-
constructor() {
|
|
929
|
-
super(...arguments), this.generate = "source", this.showError = !1, this.locale = "auto", this.paymentMethod = null, this.source = null, this.token = null, this.element = null, this.elements = null, this.error = null, this.focused = !1, this.ready = !1, this.stripe = null, this.theme = "none", this.precomputedStyle = getComputedStyle(this), this.breadcrumb = new Gr(this, {
|
|
930
|
-
slotName: `${this.constructor.is}-slot`
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
get stripeMountId() {
|
|
934
|
-
return this.breadcrumb.mountId;
|
|
935
|
-
}
|
|
936
|
-
get stripeMount() {
|
|
937
|
-
return this.breadcrumb.mount;
|
|
938
|
-
}
|
|
939
|
-
render() {
|
|
940
|
-
const { error: e, showError: t } = this, { slotName: r } = this.breadcrumb, s = Me(e) ? e.originalMessage : e?.message;
|
|
941
|
-
return $r`
|
|
942
|
-
<div id="stripe" part="stripe">
|
|
943
|
-
<slot id="stripe-slot" name="${r}"></slot>
|
|
944
|
-
</div>
|
|
945
|
-
|
|
946
|
-
<output id="error"
|
|
947
|
-
for="stripe"
|
|
948
|
-
part="error"
|
|
949
|
-
?hidden="${!t}">
|
|
950
|
-
${Tr(s)}
|
|
951
|
-
</output>
|
|
952
|
-
`;
|
|
953
|
-
}
|
|
954
|
-
updated(e) {
|
|
955
|
-
super.updated?.(e), e.has("error") && this.errorChanged(), e.has("publishableKey") && this.init(), [...e.keys()].forEach((t) => this.representationChanged(t));
|
|
956
|
-
}
|
|
957
|
-
async disconnectedCallback() {
|
|
958
|
-
super.disconnectedCallback(), await this.unmount?.();
|
|
959
|
-
}
|
|
960
|
-
reset() {
|
|
961
|
-
this.element?.clear?.(), this.resetRepresentations(), p.set(this, { error: null });
|
|
962
|
-
}
|
|
963
|
-
blur() {
|
|
964
|
-
this.element?.blur();
|
|
965
|
-
}
|
|
966
|
-
focus() {
|
|
967
|
-
this.element?.focus();
|
|
968
|
-
}
|
|
969
|
-
createError(e) {
|
|
970
|
-
return new Re(this.constructor.is, e);
|
|
971
|
-
}
|
|
972
|
-
errorChanged() {
|
|
973
|
-
this.resetRepresentations(), this.fireError(this.error);
|
|
974
|
-
}
|
|
975
|
-
fire(e, t, r) {
|
|
976
|
-
this.dispatchEvent(new CustomEvent(e, { detail: t, ...r }));
|
|
977
|
-
}
|
|
978
|
-
fireError(e) {
|
|
979
|
-
this.dispatchEvent(new ErrorEvent("error", { error: e }));
|
|
980
|
-
}
|
|
981
|
-
getCSSCustomPropertyValue(e) {
|
|
982
|
-
return this.precomputedStyle.getPropertyValue(e);
|
|
983
|
-
}
|
|
984
|
-
async handleResponse(e) {
|
|
985
|
-
const { error: t = null, paymentMethod: r = null, source: s = null, token: n = null } = { ...e };
|
|
986
|
-
if (p.set(this, { error: t, paymentMethod: r, source: s, token: n }), await this.updateComplete, t)
|
|
987
|
-
throw t;
|
|
988
|
-
return e;
|
|
989
|
-
}
|
|
990
|
-
initElement() {
|
|
991
|
-
"abstract";
|
|
992
|
-
}
|
|
993
|
-
async init() {
|
|
994
|
-
await this.unmount(), await this.initStripe(), await this.initElement(), this.initElementListeners(), this.breadcrumb.init(), this.mount();
|
|
995
|
-
}
|
|
996
|
-
initElementListeners() {
|
|
997
|
-
this.element && (this.element.on("ready", this.onReady), this.element.on("focus", this.onFocus), this.element.on("blur", this.onBlur));
|
|
998
|
-
}
|
|
999
|
-
async initStripe() {
|
|
1000
|
-
const { publishableKey: e, stripeAccount: t, locale: r } = this;
|
|
1001
|
-
if (!e)
|
|
1002
|
-
p.set(this, { elements: null, element: null, stripe: null });
|
|
1003
|
-
else
|
|
1004
|
-
try {
|
|
1005
|
-
const s = { stripeAccount: t, locale: r }, n = window.Stripe ? window.Stripe(e, s) : await ke(e, s), i = n?.elements();
|
|
1006
|
-
p.set(this, { elements: i, error: null, stripe: n });
|
|
1007
|
-
} catch (s) {
|
|
1008
|
-
console.warn(s);
|
|
1009
|
-
const n = this.createError("Stripe.js must be loaded first.");
|
|
1010
|
-
p.set(this, { elements: null, error: n, stripe: null });
|
|
1011
|
-
} finally {
|
|
1012
|
-
await this.updateComplete;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
mount() {
|
|
1016
|
-
if (!this.breadcrumb.mount)
|
|
1017
|
-
throw this.createError("Stripe Mount missing");
|
|
1018
|
-
this.element?.mount(this.breadcrumb.mount);
|
|
1019
|
-
}
|
|
1020
|
-
async unmount() {
|
|
1021
|
-
this.element?.unmount?.(), p.set(this, { element: null }), await this.updateComplete;
|
|
1022
|
-
}
|
|
1023
|
-
async onBlur() {
|
|
1024
|
-
p.set(this, { focused: !1 }), await this.updateComplete;
|
|
1025
|
-
}
|
|
1026
|
-
async onFocus() {
|
|
1027
|
-
p.set(this, { focused: !0 }), await this.updateComplete;
|
|
1028
|
-
}
|
|
1029
|
-
async onReady(e) {
|
|
1030
|
-
p.set(this, { ready: !0 }), await this.updateComplete, this.fire("ready", e);
|
|
1031
|
-
}
|
|
1032
|
-
async postRepresentation() {
|
|
1033
|
-
const e = (l) => p.set(this, { error: l }), t = (l) => this.fire("success", l), r = this.token || void 0, s = this.source || void 0, n = this.paymentMethod || void 0, i = JSON.stringify({ token: r, source: s, paymentMethod: n }), o = { "Content-Type": "application/json" };
|
|
1034
|
-
return fetch(this.action, { body: i, headers: o, method: "POST" }).then(zr).then(t).catch(e);
|
|
1035
|
-
}
|
|
1036
|
-
representationChanged(e) {
|
|
1037
|
-
if (!Br(e))
|
|
1038
|
-
return;
|
|
1039
|
-
const t = this[e];
|
|
1040
|
-
t && (this.fire(`${$e(e)}`, t), this.action && this.postRepresentation());
|
|
1041
|
-
}
|
|
1042
|
-
resetRepresentations() {
|
|
1043
|
-
p.set(this, {
|
|
1044
|
-
paymentMethod: null,
|
|
1045
|
-
token: null,
|
|
1046
|
-
source: null
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
a([
|
|
1051
|
-
c({ type: String })
|
|
1052
|
-
], h.prototype, "action", 2);
|
|
1053
|
-
a([
|
|
1054
|
-
c({ type: String, attribute: "client-secret" })
|
|
1055
|
-
], h.prototype, "clientSecret", 2);
|
|
1056
|
-
a([
|
|
1057
|
-
c({ type: String })
|
|
1058
|
-
], h.prototype, "generate", 2);
|
|
1059
|
-
a([
|
|
1060
|
-
P,
|
|
1061
|
-
c({ type: String, attribute: "publishable-key", reflect: !0 })
|
|
1062
|
-
], h.prototype, "publishableKey", 2);
|
|
1063
|
-
a([
|
|
1064
|
-
c({ type: Boolean, attribute: "show-error", reflect: !0 })
|
|
1065
|
-
], h.prototype, "showError", 2);
|
|
1066
|
-
a([
|
|
1067
|
-
c({ type: String, attribute: "stripe-account" })
|
|
1068
|
-
], h.prototype, "stripeAccount", 2);
|
|
1069
|
-
a([
|
|
1070
|
-
c({ type: String, attribute: "locale" })
|
|
1071
|
-
], h.prototype, "locale", 2);
|
|
1072
|
-
a([
|
|
1073
|
-
p,
|
|
1074
|
-
P,
|
|
1075
|
-
c({ type: Object, attribute: "payment-method" })
|
|
1076
|
-
], h.prototype, "paymentMethod", 2);
|
|
1077
|
-
a([
|
|
1078
|
-
p,
|
|
1079
|
-
P,
|
|
1080
|
-
c({ type: Object })
|
|
1081
|
-
], h.prototype, "source", 2);
|
|
1082
|
-
a([
|
|
1083
|
-
p,
|
|
1084
|
-
P,
|
|
1085
|
-
c({ type: Object })
|
|
1086
|
-
], h.prototype, "token", 2);
|
|
1087
|
-
a([
|
|
1088
|
-
p,
|
|
1089
|
-
c({ type: Object })
|
|
1090
|
-
], h.prototype, "element", 2);
|
|
1091
|
-
a([
|
|
1092
|
-
p,
|
|
1093
|
-
c({ type: Object })
|
|
1094
|
-
], h.prototype, "elements", 2);
|
|
1095
|
-
a([
|
|
1096
|
-
p,
|
|
1097
|
-
P,
|
|
1098
|
-
c({ type: Object, reflect: !0, converter: es })
|
|
1099
|
-
], h.prototype, "error", 2);
|
|
1100
|
-
a([
|
|
1101
|
-
p,
|
|
1102
|
-
P,
|
|
1103
|
-
c({ type: Boolean, reflect: !0 })
|
|
1104
|
-
], h.prototype, "focused", 2);
|
|
1105
|
-
a([
|
|
1106
|
-
p,
|
|
1107
|
-
P,
|
|
1108
|
-
c({ type: Boolean, reflect: !0 })
|
|
1109
|
-
], h.prototype, "ready", 2);
|
|
1110
|
-
a([
|
|
1111
|
-
p,
|
|
1112
|
-
c({ type: Object })
|
|
1113
|
-
], h.prototype, "stripe", 2);
|
|
1114
|
-
a([
|
|
1115
|
-
c()
|
|
1116
|
-
], h.prototype, "theme", 2);
|
|
1117
|
-
a([
|
|
1118
|
-
c({ attribute: "border-radius" })
|
|
1119
|
-
], h.prototype, "borderRadius", 2);
|
|
1120
|
-
a([
|
|
1121
|
-
c({ attribute: "color-background" })
|
|
1122
|
-
], h.prototype, "colorBackground", 2);
|
|
1123
|
-
a([
|
|
1124
|
-
c({ attribute: "color-danger" })
|
|
1125
|
-
], h.prototype, "colorDanger", 2);
|
|
1126
|
-
a([
|
|
1127
|
-
c({ attribute: "color-primary" })
|
|
1128
|
-
], h.prototype, "colorPrimary", 2);
|
|
1129
|
-
a([
|
|
1130
|
-
c({ attribute: "color-text" })
|
|
1131
|
-
], h.prototype, "colorText", 2);
|
|
1132
|
-
a([
|
|
1133
|
-
c({ attribute: "font-family" })
|
|
1134
|
-
], h.prototype, "fontFamily", 2);
|
|
1135
|
-
a([
|
|
1136
|
-
c({ attribute: "spacing-unit" })
|
|
1137
|
-
], h.prototype, "spacingUnit", 2);
|
|
1138
|
-
a([
|
|
1139
|
-
k
|
|
1140
|
-
], h.prototype, "handleResponse", 1);
|
|
1141
|
-
a([
|
|
1142
|
-
k
|
|
1143
|
-
], h.prototype, "onBlur", 1);
|
|
1144
|
-
a([
|
|
1145
|
-
k
|
|
1146
|
-
], h.prototype, "onFocus", 1);
|
|
1147
|
-
a([
|
|
1148
|
-
k
|
|
1149
|
-
], h.prototype, "onReady", 1);
|
|
1150
|
-
var rs = It`[hidden] {
|
|
1151
|
-
display: none !important;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
:host:not([hidden]) {
|
|
1155
|
-
display: block;
|
|
1156
|
-
box-sizing: border-box;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
#error {
|
|
1160
|
-
font-family: sans-serif;
|
|
1161
|
-
font-size: 14px;
|
|
1162
|
-
padding-left: 42px;
|
|
1163
|
-
padding-bottom: 10px;
|
|
1164
|
-
}
|
|
1165
|
-
`, Te = rs, ss = It`:host {
|
|
1166
|
-
min-width: var(--stripe-elements-width, 300px);
|
|
1167
|
-
min-height: var(--stripe-elements-height, 50px);
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
#stripe {
|
|
1171
|
-
box-sizing: border-box;
|
|
1172
|
-
border-radius: var(--stripe-elements-border-radius, 4px);
|
|
1173
|
-
border: var(--stripe-elements-border, 1px solid transparent);
|
|
1174
|
-
box-shadow: var(--stripe-elements-box-shadow, 0 1px 3px 0 #e6ebf1);
|
|
1175
|
-
transition: var(--stripe-elements-transition, box-shadow 150ms ease);
|
|
1176
|
-
min-width: var(--stripe-elements-width, 300px);
|
|
1177
|
-
padding: var(--stripe-elements-element-padding, 8px 12px);
|
|
1178
|
-
background: var(--stripe-elements-element-background, white);
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
:host([focused]) #stripe {
|
|
1182
|
-
box-shadow: 0 1px 3px 0 #cfd7df;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
:host([error]) #stripe {
|
|
1186
|
-
border-color: #fa755a;
|
|
1187
|
-
}
|
|
1188
|
-
`, ns = ss, he = [
|
|
1189
|
-
"color",
|
|
1190
|
-
"fontFamily",
|
|
1191
|
-
"fontSize",
|
|
1192
|
-
"fontStyle",
|
|
1193
|
-
"fontSmoothing",
|
|
1194
|
-
"fontVariant",
|
|
1195
|
-
"iconColor",
|
|
1196
|
-
"lineHeight",
|
|
1197
|
-
"letterSpacing",
|
|
1198
|
-
"textDecoration",
|
|
1199
|
-
"textShadow",
|
|
1200
|
-
"textTransform"
|
|
1201
|
-
], is = [
|
|
1202
|
-
":hover",
|
|
1203
|
-
":focus",
|
|
1204
|
-
"::placeholder",
|
|
1205
|
-
"::selection",
|
|
1206
|
-
":-webkit-autofill",
|
|
1207
|
-
":disabled"
|
|
1208
|
-
], _ = class extends h {
|
|
1209
|
-
constructor() {
|
|
1210
|
-
super(...arguments), this.hideIcon = !1, this.hidePostalCode = !1, this.iconStyle = "default", this.value = {}, this.brand = null, this.complete = !1, this.empty = !0, this.invalid = !1;
|
|
1211
|
-
}
|
|
1212
|
-
async createPaymentMethod(e = this.getPaymentMethodData()) {
|
|
1213
|
-
return this.stripe.createPaymentMethod(e);
|
|
1214
|
-
}
|
|
1215
|
-
async createSource(e = this.sourceData) {
|
|
1216
|
-
return this.stripe.createSource(this.element, e);
|
|
1217
|
-
}
|
|
1218
|
-
async createToken(e = this.tokenData) {
|
|
1219
|
-
return this.stripe.createToken(this.element, e);
|
|
1220
|
-
}
|
|
1221
|
-
isPotentiallyValid() {
|
|
1222
|
-
return !this.complete && !this.empty && !this.error || this.validate();
|
|
1223
|
-
}
|
|
1224
|
-
reset() {
|
|
1225
|
-
super.reset(), this.element?.clear();
|
|
1226
|
-
}
|
|
1227
|
-
async submit() {
|
|
1228
|
-
switch (this.generate) {
|
|
1229
|
-
case "payment-method":
|
|
1230
|
-
return this.createPaymentMethod();
|
|
1231
|
-
case "source":
|
|
1232
|
-
return this.createSource();
|
|
1233
|
-
case "token":
|
|
1234
|
-
return this.createToken();
|
|
1235
|
-
default: {
|
|
1236
|
-
const e = this.createError(`cannot generate ${this.generate}`);
|
|
1237
|
-
throw p.set(this, { error: e }), await this.updateComplete, e;
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
validate() {
|
|
1242
|
-
const { complete: e, empty: t, error: r } = this, s = !r && e && !t;
|
|
1243
|
-
return t && !r && p.set(this, { error: this.createError("Your card number is empty.") }), s;
|
|
1244
|
-
}
|
|
1245
|
-
updateStyle() {
|
|
1246
|
-
this.element?.update({
|
|
1247
|
-
style: this.getStripeElementsStyles()
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
getPaymentMethodData() {
|
|
1251
|
-
const e = "card", { billingDetails: t, paymentMethodData: r } = this;
|
|
1252
|
-
return {
|
|
1253
|
-
billing_details: t,
|
|
1254
|
-
...r,
|
|
1255
|
-
type: e,
|
|
1256
|
-
card: this.element
|
|
1257
|
-
};
|
|
1258
|
-
}
|
|
1259
|
-
getStripeElementsStyles() {
|
|
1260
|
-
const e = (n) => this.getCSSCustomPropertyValue(n) || void 0, t = ["base", "complete", "empty", "invalid"], r = (n) => (i, o) => {
|
|
1261
|
-
if (n.includes("-"))
|
|
1262
|
-
return i;
|
|
1263
|
-
const u = o.split(":").pop();
|
|
1264
|
-
return {
|
|
1265
|
-
...i,
|
|
1266
|
-
[o]: he.reduce(s(`${n}-${u}`), {})
|
|
1267
|
-
};
|
|
1268
|
-
}, s = (n) => (i, o) => {
|
|
1269
|
-
const u = `--stripe-elements-${n}-${$e(o)}`;
|
|
1270
|
-
return {
|
|
1271
|
-
...i,
|
|
1272
|
-
[o]: e(u),
|
|
1273
|
-
...is.reduce(r(n), {})
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
return t.reduce((n, i) => ({
|
|
1277
|
-
...n,
|
|
1278
|
-
[i]: he.reduce(s(i), {})
|
|
1279
|
-
}), {});
|
|
1280
|
-
}
|
|
1281
|
-
async initElement() {
|
|
1282
|
-
if (!this.stripe)
|
|
1283
|
-
return;
|
|
1284
|
-
const { hidePostalCode: e, hideIcon: t, iconStyle: r, value: s } = this, n = this.getStripeElementsStyles();
|
|
1285
|
-
await this.updateComplete;
|
|
1286
|
-
const i = this.createElement({
|
|
1287
|
-
hideIcon: t,
|
|
1288
|
-
hidePostalCode: e,
|
|
1289
|
-
iconStyle: r,
|
|
1290
|
-
style: n,
|
|
1291
|
-
value: s
|
|
1292
|
-
});
|
|
1293
|
-
i.on("change", this.onChange), p.set(this, { element: i }), await this.updateComplete;
|
|
1294
|
-
}
|
|
1295
|
-
createElement(e) {
|
|
1296
|
-
return this.elements.create("card", e);
|
|
1297
|
-
}
|
|
1298
|
-
async onChange(e) {
|
|
1299
|
-
const { brand: t, complete: r, empty: s, error: n = null } = e, i = !(n || !s && !r);
|
|
1300
|
-
p.set(this, { brand: t, complete: r, empty: s, error: n, invalid: i }), await this.updateComplete, this.fire("change", e);
|
|
1301
|
-
}
|
|
1302
|
-
};
|
|
1303
|
-
_.is = "stripe-elements";
|
|
1304
|
-
_.elementType = "card";
|
|
1305
|
-
_.styles = [
|
|
1306
|
-
Te,
|
|
1307
|
-
ns
|
|
1308
|
-
];
|
|
1309
|
-
a([
|
|
1310
|
-
c({ type: Boolean, attribute: "hide-icon" })
|
|
1311
|
-
], _.prototype, "hideIcon", 2);
|
|
1312
|
-
a([
|
|
1313
|
-
c({ type: Boolean, attribute: "hide-postal-code" })
|
|
1314
|
-
], _.prototype, "hidePostalCode", 2);
|
|
1315
|
-
a([
|
|
1316
|
-
c({ type: String, attribute: "icon-style" })
|
|
1317
|
-
], _.prototype, "iconStyle", 2);
|
|
1318
|
-
a([
|
|
1319
|
-
c({ type: Object })
|
|
1320
|
-
], _.prototype, "value", 2);
|
|
1321
|
-
a([
|
|
1322
|
-
P,
|
|
1323
|
-
p,
|
|
1324
|
-
c({ type: String })
|
|
1325
|
-
], _.prototype, "brand", 2);
|
|
1326
|
-
a([
|
|
1327
|
-
P,
|
|
1328
|
-
p,
|
|
1329
|
-
c({ type: Boolean, reflect: !0 })
|
|
1330
|
-
], _.prototype, "complete", 2);
|
|
1331
|
-
a([
|
|
1332
|
-
P,
|
|
1333
|
-
p,
|
|
1334
|
-
c({ type: Boolean, reflect: !0 })
|
|
1335
|
-
], _.prototype, "empty", 2);
|
|
1336
|
-
a([
|
|
1337
|
-
P,
|
|
1338
|
-
p,
|
|
1339
|
-
c({ type: Boolean, reflect: !0 })
|
|
1340
|
-
], _.prototype, "invalid", 2);
|
|
1341
|
-
a([
|
|
1342
|
-
Ut
|
|
1343
|
-
], _.prototype, "createPaymentMethod", 1);
|
|
1344
|
-
a([
|
|
1345
|
-
Ut
|
|
1346
|
-
], _.prototype, "createSource", 1);
|
|
1347
|
-
a([
|
|
1348
|
-
Ut
|
|
1349
|
-
], _.prototype, "createToken", 1);
|
|
1350
|
-
a([
|
|
1351
|
-
k
|
|
1352
|
-
], _.prototype, "onChange", 1);
|
|
1353
|
-
_ = a([
|
|
1354
|
-
fe("stripe-elements")
|
|
1355
|
-
], _);
|
|
1356
|
-
var os = It`#stripe {
|
|
1357
|
-
box-sizing: border-box;
|
|
1358
|
-
min-width: var(--stripe-payment-request-element-min-width, 300px);
|
|
1359
|
-
padding: var(--stripe-payment-request-element-padding, 8px 12px);
|
|
1360
|
-
background: var(--stripe-payment-request-element-background, white);
|
|
1361
|
-
}
|
|
1362
|
-
`, as = os;
|
|
1363
|
-
function ls(e) {
|
|
1364
|
-
return e.tagName.toLowerCase() === "stripe-display-item";
|
|
1365
|
-
}
|
|
1366
|
-
function cs({ dataset: { amount: e, label: t, pending: r } }) {
|
|
1367
|
-
return {
|
|
1368
|
-
label: t,
|
|
1369
|
-
amount: parseInt(e),
|
|
1370
|
-
...r !== void 0 && { pending: r === "true" }
|
|
1371
|
-
};
|
|
1372
|
-
}
|
|
1373
|
-
function us({ dataset: { amount: e, detail: t, ...r } }) {
|
|
1374
|
-
return {
|
|
1375
|
-
amount: parseInt(e),
|
|
1376
|
-
detail: t,
|
|
1377
|
-
...r
|
|
1378
|
-
};
|
|
1379
|
-
}
|
|
1380
|
-
function ds(e) {
|
|
1381
|
-
return ls(e) ? cs(e) : us(e);
|
|
1382
|
-
}
|
|
1383
|
-
var ht, mt, f = class extends h {
|
|
1384
|
-
constructor() {
|
|
1385
|
-
super(...arguments), this.canMakePayment = null, ce(this, ht, void 0), this.paymentIntent = null, this.paymentRequest = null, this.pending = !1, ce(this, mt, void 0), this.buttonType = "default", this.buttonTheme = "dark", this.complete = async (e, t) => {
|
|
1386
|
-
const { error: r = null } = { ...e }, s = r || t ? "fail" : "success";
|
|
1387
|
-
return e.complete(s), this.fire(s, e), t ? { error: t } : e;
|
|
1388
|
-
};
|
|
1389
|
-
}
|
|
1390
|
-
get displayItems() {
|
|
1391
|
-
const e = le(this, ht);
|
|
1392
|
-
return Array.isArray(e) ? e : this.parseDatasets("stripe-display-item");
|
|
1393
|
-
}
|
|
1394
|
-
set displayItems(e) {
|
|
1395
|
-
const t = this.displayItems;
|
|
1396
|
-
ue(this, ht, e), this.requestUpdate("displayItems", t);
|
|
1397
|
-
}
|
|
1398
|
-
get shippingOptions() {
|
|
1399
|
-
const e = le(this, mt);
|
|
1400
|
-
return Array.isArray(e) ? e : this.parseDatasets("stripe-shipping-option");
|
|
1401
|
-
}
|
|
1402
|
-
set shippingOptions(e) {
|
|
1403
|
-
const t = this.shippingOptions;
|
|
1404
|
-
ue(this, mt, e), this.requestUpdate("shippingOptions", t);
|
|
1405
|
-
}
|
|
1406
|
-
reset() {
|
|
1407
|
-
super.reset(), p.set(this, { paymentIntent: null });
|
|
1408
|
-
}
|
|
1409
|
-
updated(e) {
|
|
1410
|
-
super.updated(e), e.has("generate") && this.initPaymentRequestListeners(), e.has("amount") && this.updatePaymentRequest();
|
|
1411
|
-
}
|
|
1412
|
-
getStripePaymentRequestOptions() {
|
|
1413
|
-
const {
|
|
1414
|
-
country: e,
|
|
1415
|
-
currency: t,
|
|
1416
|
-
displayItems: r,
|
|
1417
|
-
shippingOptions: s,
|
|
1418
|
-
requestShipping: n,
|
|
1419
|
-
requestPayerEmail: i,
|
|
1420
|
-
requestPayerName: o,
|
|
1421
|
-
requestPayerPhone: u,
|
|
1422
|
-
label: l = "",
|
|
1423
|
-
amount: d = 0
|
|
1424
|
-
} = this;
|
|
1425
|
-
return {
|
|
1426
|
-
country: e,
|
|
1427
|
-
currency: t,
|
|
1428
|
-
displayItems: r,
|
|
1429
|
-
requestPayerEmail: i,
|
|
1430
|
-
requestPayerName: o,
|
|
1431
|
-
requestPayerPhone: u,
|
|
1432
|
-
requestShipping: n,
|
|
1433
|
-
shippingOptions: s,
|
|
1434
|
-
total: { label: l, amount: d }
|
|
1435
|
-
};
|
|
1436
|
-
}
|
|
1437
|
-
async initElement() {
|
|
1438
|
-
await this.initPaymentRequest(), await this.initPaymentRequestListeners(), await this.initPaymentRequestButton();
|
|
1439
|
-
}
|
|
1440
|
-
async initPaymentRequest() {
|
|
1441
|
-
if (!this.stripe)
|
|
1442
|
-
return;
|
|
1443
|
-
const e = this.getStripePaymentRequestOptions(), t = this.stripe.paymentRequest(e), r = await t.canMakePayment();
|
|
1444
|
-
p.set(this, { paymentRequest: t, canMakePayment: r }), await this.updateComplete, this.canMakePayment || this.fire("unsupported");
|
|
1445
|
-
}
|
|
1446
|
-
async initPaymentRequestButton() {
|
|
1447
|
-
const { buttonTheme: e, buttonType: t, canMakePayment: r } = this;
|
|
1448
|
-
if (!r || !this.elements)
|
|
1449
|
-
return;
|
|
1450
|
-
const i = { paymentRequestButton: { height: this.getCSSCustomPropertyValue("--stripe-payment-request-button-height") || "40px", theme: e, type: t } }, o = this.elements.create("paymentRequestButton", {
|
|
1451
|
-
paymentRequest: this.paymentRequest,
|
|
1452
|
-
style: i
|
|
1453
|
-
});
|
|
1454
|
-
p.set(this, { element: o }), await this.updateComplete;
|
|
1455
|
-
}
|
|
1456
|
-
async initPaymentRequestListeners() {
|
|
1457
|
-
if (this.canMakePayment)
|
|
1458
|
-
switch (this.paymentRequest.on("click", this.updatePaymentRequest), this.paymentRequest.on("cancel", this.onCancel), this.paymentRequest.on("shippingaddresschange", this.onShippingaddresschange), this.paymentRequest.on("shippingoptionchange", this.onShippingoptionchange), this.generate) {
|
|
1459
|
-
case "payment-method":
|
|
1460
|
-
this.paymentRequest.on("paymentmethod", this.onPaymentResponse);
|
|
1461
|
-
break;
|
|
1462
|
-
case "source":
|
|
1463
|
-
this.paymentRequest.on("source", this.onPaymentResponse);
|
|
1464
|
-
break;
|
|
1465
|
-
case "token":
|
|
1466
|
-
this.paymentRequest.on("token", this.onPaymentResponse);
|
|
1467
|
-
break;
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
async updatePaymentRequest() {
|
|
1471
|
-
if (!this.paymentRequest)
|
|
1472
|
-
return;
|
|
1473
|
-
const { currency: e, total: t, displayItems: r, shippingOptions: s } = this.getStripePaymentRequestOptions();
|
|
1474
|
-
this.paymentRequest.update({ currency: e, total: t, displayItems: r, shippingOptions: s });
|
|
1475
|
-
}
|
|
1476
|
-
onCancel() {
|
|
1477
|
-
this.fire(
|
|
1478
|
-
"cancel"
|
|
1479
|
-
/* cancel */
|
|
1480
|
-
);
|
|
1481
|
-
}
|
|
1482
|
-
async onPaymentResponse(e) {
|
|
1483
|
-
const {
|
|
1484
|
-
error: t = null,
|
|
1485
|
-
paymentMethod: r = null,
|
|
1486
|
-
source: s = null,
|
|
1487
|
-
token: n = null
|
|
1488
|
-
} = { ...e };
|
|
1489
|
-
p.set(this, { error: t, paymentMethod: r, source: s, token: n }), this.clientSecret && !t ? this.confirmPaymentIntent(e) : this.complete(e);
|
|
1490
|
-
}
|
|
1491
|
-
async confirmPaymentIntent(e) {
|
|
1492
|
-
const t = { payment_method: this.paymentMethod.id }, r = await this.confirmCardPayment(t, { handleActions: !1 }).then(({ error: i }) => this.complete(e, i)).then(ae).then(() => this.confirmCardPayment()).then(ae).catch((i) => ({ error: i })), { error: s = null } = r, n = r.paymentIntent ?? null;
|
|
1493
|
-
p.set(this, { error: s, paymentIntent: n }), await this.updateComplete;
|
|
1494
|
-
}
|
|
1495
|
-
async confirmCardPayment(e, t) {
|
|
1496
|
-
return this.stripe.confirmCardPayment(this.clientSecret, e, t);
|
|
1497
|
-
}
|
|
1498
|
-
onShippingaddresschange(e) {
|
|
1499
|
-
this.fire("shippingaddresschange", e);
|
|
1500
|
-
}
|
|
1501
|
-
onShippingoptionchange(e) {
|
|
1502
|
-
this.fire("shippingoptionchange", e);
|
|
1503
|
-
}
|
|
1504
|
-
parseDatasets(e) {
|
|
1505
|
-
const t = [...this.querySelectorAll(e)];
|
|
1506
|
-
return t.length ? t.map(ds) : [];
|
|
1507
|
-
}
|
|
1508
|
-
};
|
|
1509
|
-
ht = /* @__PURE__ */ new WeakMap();
|
|
1510
|
-
mt = /* @__PURE__ */ new WeakMap();
|
|
1511
|
-
f.is = "stripe-payment-request";
|
|
1512
|
-
f.styles = [
|
|
1513
|
-
Te,
|
|
1514
|
-
as
|
|
1515
|
-
];
|
|
1516
|
-
a([
|
|
1517
|
-
c({ type: Number, reflect: !0 })
|
|
1518
|
-
], f.prototype, "amount", 2);
|
|
1519
|
-
a([
|
|
1520
|
-
P,
|
|
1521
|
-
p,
|
|
1522
|
-
c({ type: Boolean, attribute: "can-make-payment", reflect: !0 })
|
|
1523
|
-
], f.prototype, "canMakePayment", 2);
|
|
1524
|
-
a([
|
|
1525
|
-
c({ type: String })
|
|
1526
|
-
], f.prototype, "country", 2);
|
|
1527
|
-
a([
|
|
1528
|
-
c({ type: String })
|
|
1529
|
-
], f.prototype, "currency", 2);
|
|
1530
|
-
a([
|
|
1531
|
-
c({ type: Array })
|
|
1532
|
-
], f.prototype, "displayItems", 1);
|
|
1533
|
-
a([
|
|
1534
|
-
c({ type: String, reflect: !0 })
|
|
1535
|
-
], f.prototype, "label", 2);
|
|
1536
|
-
a([
|
|
1537
|
-
P,
|
|
1538
|
-
p,
|
|
1539
|
-
c({ type: Object, attribute: "payment-intent" })
|
|
1540
|
-
], f.prototype, "paymentIntent", 2);
|
|
1541
|
-
a([
|
|
1542
|
-
p,
|
|
1543
|
-
c({ type: Object, attribute: "payment-request" })
|
|
1544
|
-
], f.prototype, "paymentRequest", 2);
|
|
1545
|
-
a([
|
|
1546
|
-
c({ type: Boolean, reflect: !0 })
|
|
1547
|
-
], f.prototype, "pending", 2);
|
|
1548
|
-
a([
|
|
1549
|
-
c({ type: Boolean, attribute: "request-payer-email" })
|
|
1550
|
-
], f.prototype, "requestPayerEmail", 2);
|
|
1551
|
-
a([
|
|
1552
|
-
c({ type: Boolean, attribute: "request-payer-name" })
|
|
1553
|
-
], f.prototype, "requestPayerName", 2);
|
|
1554
|
-
a([
|
|
1555
|
-
c({ type: Boolean, attribute: "request-payer-phone" })
|
|
1556
|
-
], f.prototype, "requestPayerPhone", 2);
|
|
1557
|
-
a([
|
|
1558
|
-
c({ type: Boolean, attribute: "request-shipping" })
|
|
1559
|
-
], f.prototype, "requestShipping", 2);
|
|
1560
|
-
a([
|
|
1561
|
-
c({ type: Array })
|
|
1562
|
-
], f.prototype, "shippingOptions", 1);
|
|
1563
|
-
a([
|
|
1564
|
-
c({ type: String, attribute: "button-type" })
|
|
1565
|
-
], f.prototype, "buttonType", 2);
|
|
1566
|
-
a([
|
|
1567
|
-
c({ type: String, attribute: "button-theme" })
|
|
1568
|
-
], f.prototype, "buttonTheme", 2);
|
|
1569
|
-
a([
|
|
1570
|
-
k
|
|
1571
|
-
], f.prototype, "onCancel", 1);
|
|
1572
|
-
a([
|
|
1573
|
-
k
|
|
1574
|
-
], f.prototype, "onPaymentResponse", 1);
|
|
1575
|
-
a([
|
|
1576
|
-
k
|
|
1577
|
-
], f.prototype, "confirmPaymentIntent", 1);
|
|
1578
|
-
a([
|
|
1579
|
-
k
|
|
1580
|
-
], f.prototype, "confirmCardPayment", 1);
|
|
1581
|
-
a([
|
|
1582
|
-
k
|
|
1583
|
-
], f.prototype, "onShippingaddresschange", 1);
|
|
1584
|
-
a([
|
|
1585
|
-
k
|
|
1586
|
-
], f.prototype, "onShippingoptionchange", 1);
|
|
1587
|
-
f = a([
|
|
1588
|
-
fe("stripe-payment-request")
|
|
1589
|
-
], f);
|
|
1590
|
-
var Ne = "clover", ps = function(t) {
|
|
1591
|
-
return t === 3 ? "v3" : t;
|
|
1592
|
-
}, Oe = "https://js.stripe.com", hs = "".concat(Oe, "/").concat(Ne, "/stripe.js"), ms = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, ys = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
|
|
1593
|
-
var fs = function(t) {
|
|
1594
|
-
return ms.test(t) || ys.test(t);
|
|
1595
|
-
}, vs = function() {
|
|
1596
|
-
for (var t = document.querySelectorAll('script[src^="'.concat(Oe, '"]')), r = 0; r < t.length; r++) {
|
|
1597
|
-
var s = t[r];
|
|
1598
|
-
if (fs(s.src))
|
|
1599
|
-
return s;
|
|
1600
|
-
}
|
|
1601
|
-
return null;
|
|
1602
|
-
}, me = function(t) {
|
|
1603
|
-
var r = "", s = document.createElement("script");
|
|
1604
|
-
s.src = "".concat(hs).concat(r);
|
|
1605
|
-
var n = document.head || document.body;
|
|
1606
|
-
if (!n)
|
|
1607
|
-
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
1608
|
-
return n.appendChild(s), s;
|
|
1609
|
-
}, gs = function(t, r) {
|
|
1610
|
-
!t || !t._registerWrapper || t._registerWrapper({
|
|
1611
|
-
name: "stripe-js",
|
|
1612
|
-
version: "8.5.3",
|
|
1613
|
-
startTime: r
|
|
1614
|
-
});
|
|
1615
|
-
}, Y = null, at = null, lt = null, bs = function(t) {
|
|
1616
|
-
return function(r) {
|
|
1617
|
-
t(new Error("Failed to load Stripe.js", {
|
|
1618
|
-
cause: r
|
|
1619
|
-
}));
|
|
1620
|
-
};
|
|
1621
|
-
}, Ss = function(t, r) {
|
|
1622
|
-
return function() {
|
|
1623
|
-
window.Stripe ? t(window.Stripe) : r(new Error("Stripe.js not available"));
|
|
1624
|
-
};
|
|
1625
|
-
}, ws = function(t) {
|
|
1626
|
-
return Y !== null ? Y : (Y = new Promise(function(r, s) {
|
|
1627
|
-
if (typeof window > "u" || typeof document > "u") {
|
|
1628
|
-
r(null);
|
|
1629
|
-
return;
|
|
1630
|
-
}
|
|
1631
|
-
if (window.Stripe) {
|
|
1632
|
-
r(window.Stripe);
|
|
1633
|
-
return;
|
|
1634
|
-
}
|
|
1635
|
-
try {
|
|
1636
|
-
var n = vs();
|
|
1637
|
-
if (!(n && t)) {
|
|
1638
|
-
if (!n)
|
|
1639
|
-
n = me(t);
|
|
1640
|
-
else if (n && lt !== null && at !== null) {
|
|
1641
|
-
var i;
|
|
1642
|
-
n.removeEventListener("load", lt), n.removeEventListener("error", at), (i = n.parentNode) === null || i === void 0 || i.removeChild(n), n = me(t);
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
lt = Ss(r, s), at = bs(s), n.addEventListener("load", lt), n.addEventListener("error", at);
|
|
1646
|
-
} catch (o) {
|
|
1647
|
-
s(o);
|
|
1648
|
-
return;
|
|
1649
|
-
}
|
|
1650
|
-
}), Y.catch(function(r) {
|
|
1651
|
-
return Y = null, Promise.reject(r);
|
|
1652
|
-
}));
|
|
1653
|
-
}, _s = function(t, r, s) {
|
|
1654
|
-
if (t === null)
|
|
1655
|
-
return null;
|
|
1656
|
-
var n = r[0], i = n.match(/^pk_test/), o = ps(t.version), u = Ne;
|
|
1657
|
-
i && o !== u && console.warn("Stripe.js@".concat(o, " was loaded on the page, but @stripe/stripe-js@").concat("8.5.3", " expected Stripe.js@").concat(u, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
1658
|
-
var l = t.apply(void 0, r);
|
|
1659
|
-
return gs(l, s), l;
|
|
1660
|
-
}, Z, Le = !1, Ie = function() {
|
|
1661
|
-
return Z || (Z = ws(null).catch(function(t) {
|
|
1662
|
-
return Z = null, Promise.reject(t);
|
|
1663
|
-
}), Z);
|
|
1664
|
-
};
|
|
1665
|
-
Promise.resolve().then(function() {
|
|
1666
|
-
return Ie();
|
|
1667
|
-
}).catch(function(e) {
|
|
1668
|
-
Le || console.warn(e);
|
|
1669
|
-
});
|
|
1670
|
-
var $s = function() {
|
|
1671
|
-
for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
|
|
1672
|
-
r[s] = arguments[s];
|
|
1673
|
-
Le = !0;
|
|
1674
|
-
var n = Date.now();
|
|
1675
|
-
return Ie().then(function(i) {
|
|
1676
|
-
return _s(i, r, n);
|
|
1677
|
-
});
|
|
1678
|
-
};
|
|
1679
|
-
const Cs = { class: "w-100 d-flex justify-space-between items-center" }, Es = { class: "text-caption font-weight-bold text-center my-0 text-red rounded" }, Ps = { class: "pr-3" }, As = ["disable", "locale", "publishable-key"], xs = ["innerHTML"], ks = { class: "ml-1 text-caption" }, Rs = { class: "mr-1" }, Ve = /* @__PURE__ */ We({
|
|
1680
|
-
__name: "CreditCardStripeForm",
|
|
1681
|
-
props: {
|
|
1682
|
-
amount: {},
|
|
1683
|
-
currency: {},
|
|
1684
|
-
disabled: { type: Boolean },
|
|
1685
|
-
loading: { type: Boolean },
|
|
1686
|
-
stripeToken: {},
|
|
1687
|
-
withAction: { type: Boolean },
|
|
1688
|
-
withTerms: { type: Boolean }
|
|
1689
|
-
},
|
|
1690
|
-
emits: ["change", "error", "payment:success"],
|
|
1691
|
-
setup(e, { expose: t, emit: r }) {
|
|
1692
|
-
const s = e, n = Gt({
|
|
1693
|
-
prop: ct(() => s.loading)
|
|
1694
|
-
}), i = Gt({
|
|
1695
|
-
prop: ct(() => s.disabled)
|
|
1696
|
-
}), { locale: o, t: u } = Ge(), l = B(null), d = B(!1), m = B(!1), y = B(null), v = B(null), $ = r, { config: O } = Ke(), { eventBus: M } = Qe();
|
|
1697
|
-
function gt(A) {
|
|
1698
|
-
switch (A) {
|
|
1699
|
-
case W.Production:
|
|
1700
|
-
return "pk_live_x99EPirYIsCyUsRvPAfyhnRp";
|
|
1701
|
-
case W.Sandbox:
|
|
1702
|
-
case W.Staging:
|
|
1703
|
-
case W.CiCd:
|
|
1704
|
-
case W.Local:
|
|
1705
|
-
default:
|
|
1706
|
-
return "pk_test_wXnn2RrefTiOHB0zzxqJr0s8";
|
|
1707
|
-
}
|
|
1708
|
-
}
|
|
1709
|
-
const F = ct(
|
|
1710
|
-
() => gt(O.value.apiEnvironment)
|
|
1711
|
-
);
|
|
1712
|
-
function bt(A) {
|
|
1713
|
-
l.value = "", $("change", !!A.detail.complete);
|
|
1714
|
-
}
|
|
1715
|
-
function q(A) {
|
|
1716
|
-
l.value = `${A?.error?.message} - ${u("CreditCardStripeForm.error")}`, $("error", l.value);
|
|
1717
|
-
}
|
|
1718
|
-
async function St(A) {
|
|
1719
|
-
try {
|
|
1720
|
-
if (!window.Stripe || i.value)
|
|
1721
|
-
return;
|
|
1722
|
-
const C = window.Stripe(F.value, {
|
|
1723
|
-
locale: Xe(o.value)
|
|
1724
|
-
});
|
|
1725
|
-
d.value = !0;
|
|
1726
|
-
const nt = await C.confirmCardPayment(s.stripeToken, {
|
|
1727
|
-
// eslint-disable-next-line camelcase
|
|
1728
|
-
payment_method: A.detail.id
|
|
1729
|
-
});
|
|
1730
|
-
nt.error ? q(nt.error) : s.withAction ? M.$emit(Dt.PaymentSuccess) : $(Dt.PaymentSuccess);
|
|
1731
|
-
} catch (C) {
|
|
1732
|
-
q(C);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
function qt() {
|
|
1736
|
-
try {
|
|
1737
|
-
return !v.value || s.withTerms && !m.value ? null : v.value.submit();
|
|
1738
|
-
} catch (A) {
|
|
1739
|
-
return q(A), null;
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
return Je(async () => {
|
|
1743
|
-
y.value = await $s(F.value);
|
|
1744
|
-
}), t({
|
|
1745
|
-
pay: qt
|
|
1746
|
-
}), (A, C) => (E(), x(Ft, {
|
|
1747
|
-
disabled: w(i),
|
|
1748
|
-
elevation: "0",
|
|
1749
|
-
border: "",
|
|
1750
|
-
style: Ye({
|
|
1751
|
-
borderColor: w(i) ? "" : "rgb(var(--v-theme-primary))"
|
|
1752
|
-
})
|
|
1753
|
-
}, {
|
|
1754
|
-
default: g(() => [
|
|
1755
|
-
b(er, {
|
|
1756
|
-
class: "text-white",
|
|
1757
|
-
color: "primary",
|
|
1758
|
-
density: "compact",
|
|
1759
|
-
elevation: "0"
|
|
1760
|
-
}, {
|
|
1761
|
-
default: g(() => [
|
|
1762
|
-
R("div", Cs, [
|
|
1763
|
-
R("h4", null, [
|
|
1764
|
-
b($t, {
|
|
1765
|
-
color: "white",
|
|
1766
|
-
start: "",
|
|
1767
|
-
size: "small"
|
|
1768
|
-
}, {
|
|
1769
|
-
default: g(() => [...C[2] || (C[2] = [
|
|
1770
|
-
it(" fas fa-credit-card ", -1)
|
|
1771
|
-
])]),
|
|
1772
|
-
_: 1
|
|
1773
|
-
}),
|
|
1774
|
-
it(" " + T(w(u)("CreditCardStripeForm.title")) + ": ", 1),
|
|
1775
|
-
w(n) ? (E(), x(or, {
|
|
1776
|
-
key: 0,
|
|
1777
|
-
class: "ml-2",
|
|
1778
|
-
color: "primary",
|
|
1779
|
-
indeterminate: "",
|
|
1780
|
-
size: "20",
|
|
1781
|
-
width: "1"
|
|
1782
|
-
})) : (E(), x(Wt, {
|
|
1783
|
-
key: 1,
|
|
1784
|
-
amount: e.amount,
|
|
1785
|
-
class: "font-weight-bold",
|
|
1786
|
-
currency: e.currency
|
|
1787
|
-
}, null, 8, ["amount", "currency"]))
|
|
1788
|
-
]),
|
|
1789
|
-
b($t, {
|
|
1790
|
-
color: "white",
|
|
1791
|
-
end: "",
|
|
1792
|
-
size: "small"
|
|
1793
|
-
}, {
|
|
1794
|
-
default: g(() => [...C[3] || (C[3] = [
|
|
1795
|
-
it(" fas fa-lock ", -1)
|
|
1796
|
-
])]),
|
|
1797
|
-
_: 1
|
|
1798
|
-
})
|
|
1799
|
-
])
|
|
1800
|
-
]),
|
|
1801
|
-
_: 1
|
|
1802
|
-
}),
|
|
1803
|
-
b(ur, null, {
|
|
1804
|
-
default: g(() => [
|
|
1805
|
-
b(G, null, {
|
|
1806
|
-
default: g(() => [
|
|
1807
|
-
b(L, null, {
|
|
1808
|
-
default: g(() => [
|
|
1809
|
-
l.value ? (E(), x(ar, {
|
|
1810
|
-
key: 0,
|
|
1811
|
-
color: "red",
|
|
1812
|
-
density: "compact",
|
|
1813
|
-
variant: "outlined"
|
|
1814
|
-
}, {
|
|
1815
|
-
default: g(() => [
|
|
1816
|
-
R("p", Es, T(w(u)("CreditCardStripeForm.paymentDeclined")) + ": " + T(l.value), 1)
|
|
1817
|
-
]),
|
|
1818
|
-
_: 1
|
|
1819
|
-
})) : wt("", !0)
|
|
1820
|
-
]),
|
|
1821
|
-
_: 1
|
|
1822
|
-
})
|
|
1823
|
-
]),
|
|
1824
|
-
_: 1
|
|
1825
|
-
}),
|
|
1826
|
-
b(G, {
|
|
1827
|
-
class: "d-none d-sm-flex",
|
|
1828
|
-
"no-gutters": ""
|
|
1829
|
-
}, {
|
|
1830
|
-
default: g(() => [
|
|
1831
|
-
b(L, { cols: "8" }, {
|
|
1832
|
-
default: g(() => [
|
|
1833
|
-
R("small", null, T(w(u)("CreditCardStripeForm.cardNumber")), 1)
|
|
1834
|
-
]),
|
|
1835
|
-
_: 1
|
|
1836
|
-
}),
|
|
1837
|
-
b(L, {
|
|
1838
|
-
class: "text-right pr-6",
|
|
1839
|
-
cols: "4"
|
|
1840
|
-
}, {
|
|
1841
|
-
default: g(() => [
|
|
1842
|
-
R("small", Ps, T(w(u)("CreditCardStripeForm.expDate")), 1),
|
|
1843
|
-
R("small", null, T(w(u)("CreditCardStripeForm.cvc")), 1)
|
|
1844
|
-
]),
|
|
1845
|
-
_: 1
|
|
1846
|
-
})
|
|
1847
|
-
]),
|
|
1848
|
-
_: 1
|
|
1849
|
-
}),
|
|
1850
|
-
b(G, { "no-gutters": "" }, {
|
|
1851
|
-
default: g(() => [
|
|
1852
|
-
b(L, null, {
|
|
1853
|
-
default: g(() => [
|
|
1854
|
-
b(Ft, {
|
|
1855
|
-
elevation: "0",
|
|
1856
|
-
border: ""
|
|
1857
|
-
}, {
|
|
1858
|
-
default: g(() => [
|
|
1859
|
-
y.value ? (E(), _t("stripe-elements", {
|
|
1860
|
-
key: 0,
|
|
1861
|
-
disable: w(n),
|
|
1862
|
-
ref_key: "payment",
|
|
1863
|
-
ref: v,
|
|
1864
|
-
generate: "payment-method",
|
|
1865
|
-
"hide-postal-code": "",
|
|
1866
|
-
locale: w(o),
|
|
1867
|
-
"publishable-key": F.value,
|
|
1868
|
-
onChange: bt,
|
|
1869
|
-
onError: q,
|
|
1870
|
-
onPaymentMethod: St
|
|
1871
|
-
}, null, 40, As)) : (E(), x(K, {
|
|
1872
|
-
key: 1,
|
|
1873
|
-
class: "mx-auto",
|
|
1874
|
-
height: "36.8px",
|
|
1875
|
-
type: "image",
|
|
1876
|
-
width: "100%"
|
|
1877
|
-
}))
|
|
1878
|
-
]),
|
|
1879
|
-
_: 1
|
|
1880
|
-
})
|
|
1881
|
-
]),
|
|
1882
|
-
_: 1
|
|
1883
|
-
})
|
|
1884
|
-
]),
|
|
1885
|
-
_: 1
|
|
1886
|
-
}),
|
|
1887
|
-
e.withTerms ? (E(), x(G, {
|
|
1888
|
-
key: 0,
|
|
1889
|
-
class: "mt-2"
|
|
1890
|
-
}, {
|
|
1891
|
-
default: g(() => [
|
|
1892
|
-
b(L, null, {
|
|
1893
|
-
default: g(() => [
|
|
1894
|
-
w(n) ? (E(), x(K, {
|
|
1895
|
-
key: 0,
|
|
1896
|
-
class: "mt-3",
|
|
1897
|
-
height: "25px",
|
|
1898
|
-
type: "image",
|
|
1899
|
-
width: "50%"
|
|
1900
|
-
})) : (E(), x(mr, {
|
|
1901
|
-
key: 1,
|
|
1902
|
-
ref: "testing",
|
|
1903
|
-
modelValue: m.value,
|
|
1904
|
-
"onUpdate:modelValue": C[1] || (C[1] = (nt) => m.value = nt)
|
|
1905
|
-
}, {
|
|
1906
|
-
label: g(() => [
|
|
1907
|
-
R("span", {
|
|
1908
|
-
onClick: C[0] || (C[0] = Ze(() => {
|
|
1909
|
-
}, ["stop"])),
|
|
1910
|
-
innerHTML: w(u)("CreditCardStripeForm.termsAndConditions", {
|
|
1911
|
-
url: w(u)("CreditCardStripeForm.termsURL")
|
|
1912
|
-
})
|
|
1913
|
-
}, null, 8, xs)
|
|
1914
|
-
]),
|
|
1915
|
-
_: 1
|
|
1916
|
-
}, 8, ["modelValue"]))
|
|
1917
|
-
]),
|
|
1918
|
-
_: 1
|
|
1919
|
-
})
|
|
1920
|
-
]),
|
|
1921
|
-
_: 1
|
|
1922
|
-
})) : wt("", !0),
|
|
1923
|
-
b(G, null, {
|
|
1924
|
-
default: g(() => [
|
|
1925
|
-
b(L, { class: "v-col-12 v-col-sm-8 v-col-md-9" }, {
|
|
1926
|
-
default: g(() => [
|
|
1927
|
-
w(n) ? (E(), _t(zt, { key: 0 }, [
|
|
1928
|
-
b(K, {
|
|
1929
|
-
height: "10px",
|
|
1930
|
-
type: "image",
|
|
1931
|
-
width: "160px"
|
|
1932
|
-
}),
|
|
1933
|
-
b(K, {
|
|
1934
|
-
height: "38px",
|
|
1935
|
-
type: "image",
|
|
1936
|
-
width: "240px"
|
|
1937
|
-
})
|
|
1938
|
-
], 64)) : (E(), _t(zt, { key: 1 }, [
|
|
1939
|
-
R("small", ks, T(w(u)("CreditCardStripeForm.acceptedPaymentMethods")), 1),
|
|
1940
|
-
b(lr, {
|
|
1941
|
-
class: "mb-n1",
|
|
1942
|
-
height: "45",
|
|
1943
|
-
src: "https://revolugo.s3.eu-west-3.amazonaws.com/payment-methods.png",
|
|
1944
|
-
width: "240"
|
|
1945
|
-
})
|
|
1946
|
-
], 64))
|
|
1947
|
-
]),
|
|
1948
|
-
_: 1
|
|
1949
|
-
}),
|
|
1950
|
-
e.withAction ? (E(), x(L, {
|
|
1951
|
-
key: 0,
|
|
1952
|
-
class: "v-col-12 v-col-sm-4 v-col-md-3 text-right align-self-end"
|
|
1953
|
-
}, {
|
|
1954
|
-
default: g(() => [
|
|
1955
|
-
w(n) ? (E(), x(K, {
|
|
1956
|
-
key: 0,
|
|
1957
|
-
class: "w-100 align-self-end",
|
|
1958
|
-
height: "36px",
|
|
1959
|
-
type: "image",
|
|
1960
|
-
width: "170px"
|
|
1961
|
-
})) : (E(), x(cr, {
|
|
1962
|
-
key: 1,
|
|
1963
|
-
"data-gtm-id": "payment-book",
|
|
1964
|
-
class: "w-100 w-sm-auto align-self-end",
|
|
1965
|
-
color: "primary",
|
|
1966
|
-
loading: d.value,
|
|
1967
|
-
variant: "flat",
|
|
1968
|
-
disabled: w(i) || e.withTerms && !m.value,
|
|
1969
|
-
onClick: qt
|
|
1970
|
-
}, {
|
|
1971
|
-
default: g(() => [
|
|
1972
|
-
b($t, { start: "" }, {
|
|
1973
|
-
default: g(() => [...C[4] || (C[4] = [
|
|
1974
|
-
it(" fas fa-lock ", -1)
|
|
1975
|
-
])]),
|
|
1976
|
-
_: 1
|
|
1977
|
-
}),
|
|
1978
|
-
R("span", Rs, T(w(u)("CreditCardStripeForm.payNow")), 1),
|
|
1979
|
-
b(Wt, {
|
|
1980
|
-
amount: e.amount,
|
|
1981
|
-
class: "font-weight-bold",
|
|
1982
|
-
currency: e.currency
|
|
1983
|
-
}, null, 8, ["amount", "currency"])
|
|
1984
|
-
]),
|
|
1985
|
-
_: 1
|
|
1986
|
-
}, 8, ["loading", "disabled"]))
|
|
1987
|
-
]),
|
|
1988
|
-
_: 1
|
|
1989
|
-
})) : wt("", !0)
|
|
1990
|
-
]),
|
|
1991
|
-
_: 1
|
|
1992
|
-
})
|
|
1993
|
-
]),
|
|
1994
|
-
_: 1
|
|
1995
|
-
})
|
|
1996
|
-
]),
|
|
1997
|
-
_: 1
|
|
1998
|
-
}, 8, ["disabled", "style"]));
|
|
1999
|
-
}
|
|
2000
|
-
});
|
|
2001
|
-
function ye(e) {
|
|
2002
|
-
const t = e;
|
|
2003
|
-
t.__i18n = t.__i18n || [], t.__i18n.push({
|
|
2004
|
-
locale: "",
|
|
2005
|
-
resource: {
|
|
2006
|
-
"en-US": {
|
|
2007
|
-
CreditCardStripeForm: {
|
|
2008
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Payment Methods Accepted:" } },
|
|
2009
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Card number" } },
|
|
2010
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Please, use another payment method" } },
|
|
2011
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "or" } },
|
|
2012
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2013
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Exp. Date" } },
|
|
2014
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total price to pay" } },
|
|
2015
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Amount to pay by card" } },
|
|
2016
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Payment declined" } },
|
|
2017
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total to pay with your credit card" } },
|
|
2018
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pay now" } },
|
|
2019
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2020
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'By continuing with your reservation you agree to the terms and conditions: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Click here to read it</a></b>' }] } }
|
|
2021
|
-
}
|
|
2022
|
-
},
|
|
2023
|
-
"fr-FR": {
|
|
2024
|
-
CreditCardStripeForm: {
|
|
2025
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Moyens de Paiement Acceptés:" } },
|
|
2026
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Numéro de carte bancaire" } },
|
|
2027
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Veuillez utiliser un autre moyen de paiement." } },
|
|
2028
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "ou" } },
|
|
2029
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2030
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Date d'exp." } },
|
|
2031
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant total à régler" } },
|
|
2032
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant à régler par carte bancaire" } },
|
|
2033
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Paiement refusé" } },
|
|
2034
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montant total à payer par carte bancaire" } },
|
|
2035
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Payer maintenant" } },
|
|
2036
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo_fr.pdf" } },
|
|
2037
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'En poursuivant votre réservation, vous acceptez les conditions générales: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Cliquez ici pour les consulter</a></b>' }] } }
|
|
2038
|
-
}
|
|
2039
|
-
},
|
|
2040
|
-
"de-DE": {
|
|
2041
|
-
CreditCardStripeForm: {
|
|
2042
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zahlungsmethoden:" } },
|
|
2043
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Kartennummer" } },
|
|
2044
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bitte verwenden Sie eine andere Zahlungsmethode" } },
|
|
2045
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "oder" } },
|
|
2046
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2047
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ablaufdatum" } },
|
|
2048
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zu zahlender Gesamtpreis" } },
|
|
2049
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betrag, der mit Karte zu zahlen ist" } },
|
|
2050
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zahlung abgelehnt" } },
|
|
2051
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Gesamtbetrag zur Zahlung mit Ihrer Kreditkarte" } },
|
|
2052
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Jetzt bezahlen" } },
|
|
2053
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2054
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Indem Sie mit Ihrer Reservierung fortfahren, stimmen Sie den Allgemeinen Geschäftsbedingungen zu: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Klicken Sie hier, um sie zu lesen</a></b>' }] } }
|
|
2055
|
-
}
|
|
2056
|
-
},
|
|
2057
|
-
"es-ES": {
|
|
2058
|
-
CreditCardStripeForm: {
|
|
2059
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Métodos de Pago:" } },
|
|
2060
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Número de tarjeta" } },
|
|
2061
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, utilice otro método de pago" } },
|
|
2062
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "o" } },
|
|
2063
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2064
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Fecha de vencimiento" } },
|
|
2065
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Precio total a pagar" } },
|
|
2066
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Importe a pagar con tarjeta" } },
|
|
2067
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pago rechazado" } },
|
|
2068
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total a pagar con su tarjeta de crédito" } },
|
|
2069
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagar ahora" } },
|
|
2070
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2071
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Al continuar con su reserva, acepta los términos y condiciones: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Haga clic aquí para leerlos</a></b>' }] } }
|
|
2072
|
-
}
|
|
2073
|
-
},
|
|
2074
|
-
"it-IT": {
|
|
2075
|
-
CreditCardStripeForm: {
|
|
2076
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Metodi di Pagamento:" } },
|
|
2077
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Numero di carta" } },
|
|
2078
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Si prega di utilizzare un altro metodo di pagamento" } },
|
|
2079
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "o" } },
|
|
2080
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2081
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Data di scadenza" } },
|
|
2082
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Prezzo totale da pagare" } },
|
|
2083
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Importo da pagare con carta" } },
|
|
2084
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagamento rifiutato" } },
|
|
2085
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totale da pagare con la tua carta di credito" } },
|
|
2086
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Paga adesso" } },
|
|
2087
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2088
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Continuando con la prenotazione, accetti i termini e le condizioni: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Clicca qui per leggerli</a></b>' }] } }
|
|
2089
|
-
}
|
|
2090
|
-
},
|
|
2091
|
-
"nl-NL": {
|
|
2092
|
-
CreditCardStripeForm: {
|
|
2093
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betaalmethoden:" } },
|
|
2094
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Kaartnummer" } },
|
|
2095
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Gebruik alstublieft een andere betaalmethode" } },
|
|
2096
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "of" } },
|
|
2097
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2098
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Vervaldatum" } },
|
|
2099
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totaal te betalen prijs" } },
|
|
2100
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bedrag te betalen met kaart" } },
|
|
2101
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betaling geweigerd" } },
|
|
2102
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Totaal te betalen met uw creditcard" } },
|
|
2103
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Betaal nu" } },
|
|
2104
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2105
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Door verder te gaan met uw reservering, gaat u akkoord met de algemene voorwaarden: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Klik hier om ze te lezen</a></b>' }] } }
|
|
2106
|
-
}
|
|
2107
|
-
},
|
|
2108
|
-
"pt-PT": {
|
|
2109
|
-
CreditCardStripeForm: {
|
|
2110
|
-
acceptedPaymentMethods: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Métodos de Pagamento:" } },
|
|
2111
|
-
cardNumber: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Número do cartão" } },
|
|
2112
|
-
error: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Por favor, utilize outro método de pagamento" } },
|
|
2113
|
-
or: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "ou" } },
|
|
2114
|
-
cvc: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "CVC" } },
|
|
2115
|
-
expDate: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Data de validade" } },
|
|
2116
|
-
pay: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Preço total a pagar" } },
|
|
2117
|
-
payByCard: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Montante a pagar com cartão" } },
|
|
2118
|
-
paymentDeclined: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagamento recusado" } },
|
|
2119
|
-
title: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Total a pagar com o seu cartão de crédito" } },
|
|
2120
|
-
payNow: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Pagar agora" } },
|
|
2121
|
-
termsURL: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "https://revolugo.s3.amazonaws.com/legal/cgv_revolugo.pdf" } },
|
|
2122
|
-
termsAndConditions: { t: 0, b: { t: 2, i: [{ t: 3, v: 'Ao continuar com a sua reserva, concorda com os termos e condições: <b><a href="' }, { t: 4, k: "url" }, { t: 3, v: '" target="_blank">Clique aqui para os ler</a></b>' }] } }
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
});
|
|
2127
|
-
}
|
|
2128
|
-
typeof ye == "function" && ye(Ve);
|
|
2129
|
-
const Is = /* @__PURE__ */ dr(Ve, [["__scopeId", "data-v-e8b23ba3"]]);
|
|
2130
|
-
Ue("css/revolugo.creditcardstripeform.CQo4EdV9.css");
|
|
2131
|
-
export {
|
|
2132
|
-
Is as C,
|
|
2133
|
-
mr as V,
|
|
2134
|
-
pr as p,
|
|
2135
|
-
Gt as u
|
|
2136
|
-
};
|
|
2137
|
-
//# sourceMappingURL=revolugo.creditcardstripeform.CFj-X3B1.min.js.map
|