@calcom/atoms 2.3.7-fixup → 2.3.7-fixup-1
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/{AddressInput-Bh-C8Iqa.js → AddressInput-ChrEOlMO.js} +1 -1
- package/dist/{AlbyPriceComponent-BP1N6jYu.js → AlbyPriceComponent-D3ifyxvQ.js} +1 -1
- package/dist/{AppCard-CNwqEjUt.js → AppCard-Bnx8PyD-.js} +1 -1
- package/dist/{AppListCardPlatformWrapper-DB9SlTnM.js → AppListCardPlatformWrapper-D54gFhln.js} +1 -1
- package/dist/{AppListCardWebWrapper-CDf9y1Dc.js → AppListCardWebWrapper-SJ5aYvnw.js} +1 -1
- package/dist/{AppSettingsInterface-Cp-dp1jc.js → AppSettingsInterface-7Yodrpy1.js} +1 -1
- package/dist/{AppSettingsInterface-pbq0qnPI.js → AppSettingsInterface-BgKHkFIh.js} +1 -1
- package/dist/{AppSettingsInterface-E0eqaH0n.js → AppSettingsInterface-C2wk8sg9.js} +1 -1
- package/dist/{DateRangePicker-DEYP9zG0.js → DateRangePicker-D6d-fTwN.js} +1 -1
- package/dist/{EventTypeAppCardInterface-CPcFpQ3c.js → EventTypeAppCardInterface--q-rDVfk.js} +3 -3
- package/dist/{EventTypeAppCardInterface-D332WS0S.js → EventTypeAppCardInterface-5VUq1O85.js} +3 -3
- package/dist/{EventTypeAppCardInterface-15RU6zBB.js → EventTypeAppCardInterface-B002JZB5.js} +4 -4
- package/dist/{EventTypeAppCardInterface-BJQpJXaS.js → EventTypeAppCardInterface-BJl9Wp7G.js} +4 -4
- package/dist/{EventTypeAppCardInterface-BTyc6XQV.js → EventTypeAppCardInterface-BOH6GKDM.js} +4 -4
- package/dist/{EventTypeAppCardInterface-QWdHCADl.js → EventTypeAppCardInterface-BczCNooX.js} +2 -2
- package/dist/{EventTypeAppCardInterface-MvDGrm97.js → EventTypeAppCardInterface-C1_WqOFN.js} +4 -4
- package/dist/{EventTypeAppCardInterface-CH3R5Yza.js → EventTypeAppCardInterface-C6Zb_BOz.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DkAhmTh5.js → EventTypeAppCardInterface-C7-53_r-.js} +4 -4
- package/dist/{EventTypeAppCardInterface-B7z9bAe3.js → EventTypeAppCardInterface-CEaLeHwI.js} +4 -4
- package/dist/{EventTypeAppCardInterface-CS02mgy7.js → EventTypeAppCardInterface-CWsdiu1M.js} +3 -3
- package/dist/{EventTypeAppCardInterface-m8wkcC4S.js → EventTypeAppCardInterface-CkbJwtz4.js} +4 -4
- package/dist/{EventTypeAppCardInterface-B3qJJcKZ.js → EventTypeAppCardInterface-CypdnpwS.js} +3 -3
- package/dist/{EventTypeAppCardInterface-BtTfCLq9.js → EventTypeAppCardInterface-Cyw1HwrX.js} +2 -2
- package/dist/{EventTypeAppCardInterface-B6C4HQgj.js → EventTypeAppCardInterface-D1sq2FyS.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DVhM61zx.js → EventTypeAppCardInterface-D2ab7G17.js} +4 -4
- package/dist/{EventTypeAppCardInterface-ClMGc4IK.js → EventTypeAppCardInterface-DA_6xDwJ.js} +3 -3
- package/dist/{EventTypeAppCardInterface-Bgmau-vd.js → EventTypeAppCardInterface-DJNEs3De.js} +4 -4
- package/dist/{EventTypeAppCardInterface-CKXTxo_h.js → EventTypeAppCardInterface-DQ0WwBqP.js} +3 -3
- package/dist/{EventTypeAppCardInterface-BAKqPVCo.js → EventTypeAppCardInterface-DZSBS-zk.js} +3 -3
- package/dist/{EventTypeAppCardInterface-C5qaKJqX.js → EventTypeAppCardInterface-DaLnUNBX.js} +3 -3
- package/dist/{EventTypeAppCardInterface-CMX5PU9O.js → EventTypeAppCardInterface-H8rKSMMe.js} +3 -3
- package/dist/{EventTypeAppCardInterface-CxysYyHB.js → EventTypeAppCardInterface-hRMntRPM.js} +3 -3
- package/dist/{EventTypeAppCardInterface-k8r3gQJS.js → EventTypeAppCardInterface-juXolJiA.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DZvT8f3X.js → EventTypeAppCardInterface-rnYNaHvZ.js} +3 -3
- package/dist/{EventTypeAppCardInterface-DJ8HpQQx.js → EventTypeAppCardInterface-ryEna_o8.js} +3 -3
- package/dist/{EventTypeAppCardInterface-C_JaD9s-.js → EventTypeAppCardInterface-x0m8Gx9B.js} +4 -4
- package/dist/{EventTypeAppCardInterface-DloEhSq9.js → EventTypeAppCardInterface-yMfSgCM7.js} +3 -3
- package/dist/{EventTypeAppSettingsInterface-Cl-6S1B4.js → EventTypeAppSettingsInterface-B5vdtAWe.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DKpU4mQI.js → EventTypeAppSettingsInterface-BIWiNPKv.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-03K9jUqd.js → EventTypeAppSettingsInterface-BdgHXAst.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-86cKMClC.js → EventTypeAppSettingsInterface-BiMxrrL4.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DNG6aGCF.js → EventTypeAppSettingsInterface-BylQ_OGm.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DtXqiTZs.js → EventTypeAppSettingsInterface-CEMPEVB8.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-A2AtCig3.js → EventTypeAppSettingsInterface-CRhaZp0b.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-C8NpK3Jm.js → EventTypeAppSettingsInterface-CiI6Mf1b.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-DYNKxCtx.js → EventTypeAppSettingsInterface-D-2AGPtv.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-Bljmd_Ei.js → EventTypeAppSettingsInterface-DHg3shLU.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-Bzljb-1g.js → EventTypeAppSettingsInterface-DLASXsiG.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-C3akFXfn.js → EventTypeAppSettingsInterface-DkKJjPl2.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-eOOmRa7o.js → EventTypeAppSettingsInterface-LlAeeT5d.js} +1 -1
- package/dist/{EventTypeAppSettingsInterface-BR8AGgBt.js → EventTypeAppSettingsInterface-vv4P2LrX.js} +1 -1
- package/dist/{EventTypeDescription-B6BdhcZ2.js → EventTypeDescription-a25sdTgA.js} +1 -1
- package/dist/{InstallAppButton-9erqRwiu.js → InstallAppButton-BObuzZKd.js} +1 -1
- package/dist/{InstallAppButton-BZodW4_D.js → InstallAppButton-DrF8md8g.js} +1 -1
- package/dist/{InstallAppButton-DgCWNEgB.js → InstallAppButton-ZLDX9vLj.js} +1 -1
- package/dist/{PhoneInput-nj5zJc5j.js → PhoneInput-BabPRASG.js} +1 -1
- package/dist/StripePaymentForm-Bha9OX4J.js +492 -0
- package/dist/cal-atoms.js +6 -6
- package/dist/{index-BawyuP19.js → index-CwlVE06V.js} +2 -2
- package/dist/{index-1hM9I9K9.js → index-eLgG4zd2.js} +110924 -88134
- package/dist/packages/platform/atoms/vite.config.d.ts.map +1 -1
- package/dist/{server.browser-ya82YPFu.js → server.browser-Dc9HKQ91.js} +1 -1
- package/dist/{useIsAppEnabled-BCbnkFD7.js → useIsAppEnabled-B-OOKpqX.js} +1 -1
- package/package.json +1 -1
- package/dist/StripePaymentForm-CdnHxdij.js +0 -551
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../../../vite.config.ts"],"names":[],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../../../vite.config.ts"],"names":[],"mappings":";AAKA,wBAgGG"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Customizable UI components to integrate scheduling into your product.",
|
|
6
6
|
"authors": "Cal.com, Inc.",
|
|
7
|
-
"version": "2.3.7-fixup",
|
|
7
|
+
"version": "2.3.7-fixup-1",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/calcom/cal.com"
|
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
import { jsxs as V, jsx as P } from "react/jsx-runtime";
|
|
2
|
-
import m, { useState as A, useEffect as ie } from "react";
|
|
3
|
-
import { aC as Ce, o as se, a as we, B as X, W as Re } from "./index-1hM9I9K9.js";
|
|
4
|
-
var N = { exports: {} }, W, z;
|
|
5
|
-
function xe() {
|
|
6
|
-
if (z) return W;
|
|
7
|
-
z = 1;
|
|
8
|
-
var t = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
9
|
-
return W = t, W;
|
|
10
|
-
}
|
|
11
|
-
var q, J;
|
|
12
|
-
function Te() {
|
|
13
|
-
if (J) return q;
|
|
14
|
-
J = 1;
|
|
15
|
-
var t = /* @__PURE__ */ xe();
|
|
16
|
-
function e() {
|
|
17
|
-
}
|
|
18
|
-
function r() {
|
|
19
|
-
}
|
|
20
|
-
return r.resetWarningCache = e, q = function() {
|
|
21
|
-
function n(p, u, a, f, y, h) {
|
|
22
|
-
if (h !== t) {
|
|
23
|
-
var c = new Error(
|
|
24
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
25
|
-
);
|
|
26
|
-
throw c.name = "Invariant Violation", c;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
n.isRequired = n;
|
|
30
|
-
function s() {
|
|
31
|
-
return n;
|
|
32
|
-
}
|
|
33
|
-
var i = {
|
|
34
|
-
array: n,
|
|
35
|
-
bigint: n,
|
|
36
|
-
bool: n,
|
|
37
|
-
func: n,
|
|
38
|
-
number: n,
|
|
39
|
-
object: n,
|
|
40
|
-
string: n,
|
|
41
|
-
symbol: n,
|
|
42
|
-
any: n,
|
|
43
|
-
arrayOf: s,
|
|
44
|
-
element: n,
|
|
45
|
-
elementType: n,
|
|
46
|
-
instanceOf: s,
|
|
47
|
-
node: n,
|
|
48
|
-
objectOf: s,
|
|
49
|
-
oneOf: s,
|
|
50
|
-
oneOfType: s,
|
|
51
|
-
shape: s,
|
|
52
|
-
exact: s,
|
|
53
|
-
checkPropTypes: r,
|
|
54
|
-
resetWarningCache: e
|
|
55
|
-
};
|
|
56
|
-
return i.PropTypes = i, i;
|
|
57
|
-
}, q;
|
|
58
|
-
}
|
|
59
|
-
var Q;
|
|
60
|
-
function je() {
|
|
61
|
-
return Q || (Q = 1, N.exports = /* @__PURE__ */ Te()()), N.exports;
|
|
62
|
-
}
|
|
63
|
-
var Le = /* @__PURE__ */ je();
|
|
64
|
-
const O = /* @__PURE__ */ Ce(Le);
|
|
65
|
-
function Z(t, e) {
|
|
66
|
-
var r = Object.keys(t);
|
|
67
|
-
if (Object.getOwnPropertySymbols) {
|
|
68
|
-
var n = Object.getOwnPropertySymbols(t);
|
|
69
|
-
e && (n = n.filter(function(s) {
|
|
70
|
-
return Object.getOwnPropertyDescriptor(t, s).enumerable;
|
|
71
|
-
})), r.push.apply(r, n);
|
|
72
|
-
}
|
|
73
|
-
return r;
|
|
74
|
-
}
|
|
75
|
-
function ee(t) {
|
|
76
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
77
|
-
var r = arguments[e] != null ? arguments[e] : {};
|
|
78
|
-
e % 2 ? Z(Object(r), !0).forEach(function(n) {
|
|
79
|
-
ce(t, n, r[n]);
|
|
80
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Z(Object(r)).forEach(function(n) {
|
|
81
|
-
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
return t;
|
|
85
|
-
}
|
|
86
|
-
function L(t) {
|
|
87
|
-
"@babel/helpers - typeof";
|
|
88
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? L = function(e) {
|
|
89
|
-
return typeof e;
|
|
90
|
-
} : L = function(e) {
|
|
91
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
92
|
-
}, L(t);
|
|
93
|
-
}
|
|
94
|
-
function ce(t, e, r) {
|
|
95
|
-
return e in t ? Object.defineProperty(t, e, {
|
|
96
|
-
value: r,
|
|
97
|
-
enumerable: !0,
|
|
98
|
-
configurable: !0,
|
|
99
|
-
writable: !0
|
|
100
|
-
}) : t[e] = r, t;
|
|
101
|
-
}
|
|
102
|
-
function Ae(t, e) {
|
|
103
|
-
return Ie(t) || ke(t, e) || Ne(t, e) || We();
|
|
104
|
-
}
|
|
105
|
-
function Ie(t) {
|
|
106
|
-
if (Array.isArray(t)) return t;
|
|
107
|
-
}
|
|
108
|
-
function ke(t, e) {
|
|
109
|
-
var r = t && (typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]);
|
|
110
|
-
if (r != null) {
|
|
111
|
-
var n = [], s = !0, i = !1, p, u;
|
|
112
|
-
try {
|
|
113
|
-
for (r = r.call(t); !(s = (p = r.next()).done) && (n.push(p.value), !(e && n.length === e)); s = !0)
|
|
114
|
-
;
|
|
115
|
-
} catch (a) {
|
|
116
|
-
i = !0, u = a;
|
|
117
|
-
} finally {
|
|
118
|
-
try {
|
|
119
|
-
!s && r.return != null && r.return();
|
|
120
|
-
} finally {
|
|
121
|
-
if (i) throw u;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return n;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function Ne(t, e) {
|
|
128
|
-
if (t) {
|
|
129
|
-
if (typeof t == "string") return te(t, e);
|
|
130
|
-
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
131
|
-
if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
|
|
132
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return te(t, e);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
function te(t, e) {
|
|
136
|
-
(e == null || e > t.length) && (e = t.length);
|
|
137
|
-
for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
|
|
138
|
-
return n;
|
|
139
|
-
}
|
|
140
|
-
function We() {
|
|
141
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
142
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
143
|
-
}
|
|
144
|
-
var $ = function(e) {
|
|
145
|
-
var r = m.useRef(e);
|
|
146
|
-
return m.useEffect(function() {
|
|
147
|
-
r.current = e;
|
|
148
|
-
}, [e]), r.current;
|
|
149
|
-
}, T = function(e) {
|
|
150
|
-
return e !== null && L(e) === "object";
|
|
151
|
-
}, qe = function(e) {
|
|
152
|
-
return T(e) && typeof e.then == "function";
|
|
153
|
-
}, Be = function(e) {
|
|
154
|
-
return T(e) && typeof e.elements == "function" && typeof e.createToken == "function" && typeof e.createPaymentMethod == "function" && typeof e.confirmCardPayment == "function";
|
|
155
|
-
}, re = "[object Object]", Fe = function t(e, r) {
|
|
156
|
-
if (!T(e) || !T(r))
|
|
157
|
-
return e === r;
|
|
158
|
-
var n = Array.isArray(e), s = Array.isArray(r);
|
|
159
|
-
if (n !== s) return !1;
|
|
160
|
-
var i = Object.prototype.toString.call(e) === re, p = Object.prototype.toString.call(r) === re;
|
|
161
|
-
if (i !== p) return !1;
|
|
162
|
-
if (!i && !n) return e === r;
|
|
163
|
-
var u = Object.keys(e), a = Object.keys(r);
|
|
164
|
-
if (u.length !== a.length) return !1;
|
|
165
|
-
for (var f = {}, y = 0; y < u.length; y += 1)
|
|
166
|
-
f[u[y]] = !0;
|
|
167
|
-
for (var h = 0; h < a.length; h += 1)
|
|
168
|
-
f[a[h]] = !0;
|
|
169
|
-
var c = Object.keys(f);
|
|
170
|
-
if (c.length !== u.length)
|
|
171
|
-
return !1;
|
|
172
|
-
var _ = e, v = r, o = function(d) {
|
|
173
|
-
return t(_[d], v[d]);
|
|
174
|
-
};
|
|
175
|
-
return c.every(o);
|
|
176
|
-
}, ue = function(e, r, n) {
|
|
177
|
-
return T(e) ? Object.keys(e).reduce(function(s, i) {
|
|
178
|
-
var p = !T(r) || !Fe(e[i], r[i]);
|
|
179
|
-
return n.includes(i) ? (p && console.warn("Unsupported prop change: options.".concat(i, " is not a mutable property.")), s) : p ? ee(ee({}, s || {}), {}, ce({}, i, e[i])) : s;
|
|
180
|
-
}, null) : null;
|
|
181
|
-
}, $e = "Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.", ne = function(e) {
|
|
182
|
-
if (e === null || Be(e))
|
|
183
|
-
return e;
|
|
184
|
-
throw new Error($e);
|
|
185
|
-
}, Ue = function(e) {
|
|
186
|
-
if (qe(e))
|
|
187
|
-
return {
|
|
188
|
-
tag: "async",
|
|
189
|
-
stripePromise: Promise.resolve(e).then(ne)
|
|
190
|
-
};
|
|
191
|
-
var r = ne(e);
|
|
192
|
-
return r === null ? {
|
|
193
|
-
tag: "empty"
|
|
194
|
-
} : {
|
|
195
|
-
tag: "sync",
|
|
196
|
-
stripe: r
|
|
197
|
-
};
|
|
198
|
-
}, U = /* @__PURE__ */ m.createContext(null);
|
|
199
|
-
U.displayName = "ElementsContext";
|
|
200
|
-
var De = function(e, r) {
|
|
201
|
-
if (!e)
|
|
202
|
-
throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(r, " in an <Elements> provider."));
|
|
203
|
-
return e;
|
|
204
|
-
}, le = function(e) {
|
|
205
|
-
var r = e.stripe, n = e.options, s = e.children, i = m.useMemo(function() {
|
|
206
|
-
return Ue(r);
|
|
207
|
-
}, [r]), p = m.useState(function() {
|
|
208
|
-
return {
|
|
209
|
-
stripe: i.tag === "sync" ? i.stripe : null,
|
|
210
|
-
elements: i.tag === "sync" ? i.stripe.elements(n) : null
|
|
211
|
-
};
|
|
212
|
-
}), u = Ae(p, 2), a = u[0], f = u[1];
|
|
213
|
-
m.useEffect(function() {
|
|
214
|
-
var c = !0, _ = function(o) {
|
|
215
|
-
f(function(l) {
|
|
216
|
-
return l.stripe ? l : {
|
|
217
|
-
stripe: o,
|
|
218
|
-
elements: o.elements(n)
|
|
219
|
-
};
|
|
220
|
-
});
|
|
221
|
-
};
|
|
222
|
-
return i.tag === "async" && !a.stripe ? i.stripePromise.then(function(v) {
|
|
223
|
-
v && c && _(v);
|
|
224
|
-
}) : i.tag === "sync" && !a.stripe && _(i.stripe), function() {
|
|
225
|
-
c = !1;
|
|
226
|
-
};
|
|
227
|
-
}, [i, a, n]);
|
|
228
|
-
var y = $(r);
|
|
229
|
-
m.useEffect(function() {
|
|
230
|
-
y !== null && y !== r && console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.");
|
|
231
|
-
}, [y, r]);
|
|
232
|
-
var h = $(n);
|
|
233
|
-
return m.useEffect(function() {
|
|
234
|
-
if (a.elements) {
|
|
235
|
-
var c = ue(n, h, ["clientSecret", "fonts"]);
|
|
236
|
-
c && a.elements.update(c);
|
|
237
|
-
}
|
|
238
|
-
}, [n, h, a.elements]), m.useEffect(function() {
|
|
239
|
-
var c = a.stripe;
|
|
240
|
-
!c || !c._registerWrapper || !c.registerAppInfo || (c._registerWrapper({
|
|
241
|
-
name: "react-stripe-js",
|
|
242
|
-
version: "1.10.0"
|
|
243
|
-
}), c.registerAppInfo({
|
|
244
|
-
name: "react-stripe-js",
|
|
245
|
-
version: "1.10.0",
|
|
246
|
-
url: "https://stripe.com/docs/stripe-js/react"
|
|
247
|
-
}));
|
|
248
|
-
}, [a.stripe]), /* @__PURE__ */ m.createElement(U.Provider, {
|
|
249
|
-
value: a
|
|
250
|
-
}, s);
|
|
251
|
-
};
|
|
252
|
-
le.propTypes = {
|
|
253
|
-
stripe: O.any,
|
|
254
|
-
options: O.object
|
|
255
|
-
};
|
|
256
|
-
var I = function(e) {
|
|
257
|
-
var r = m.useContext(U);
|
|
258
|
-
return De(r, e);
|
|
259
|
-
}, Me = function() {
|
|
260
|
-
var e = I("calls useElements()"), r = e.elements;
|
|
261
|
-
return r;
|
|
262
|
-
}, He = function() {
|
|
263
|
-
var e = I("calls useStripe()"), r = e.stripe;
|
|
264
|
-
return r;
|
|
265
|
-
};
|
|
266
|
-
O.func.isRequired;
|
|
267
|
-
var C = function(e) {
|
|
268
|
-
var r = m.useRef(e);
|
|
269
|
-
return m.useEffect(function() {
|
|
270
|
-
r.current = e;
|
|
271
|
-
}, [e]), function() {
|
|
272
|
-
r.current && r.current.apply(r, arguments);
|
|
273
|
-
};
|
|
274
|
-
}, w = function() {
|
|
275
|
-
}, Ke = function(e) {
|
|
276
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
277
|
-
}, g = function(e, r) {
|
|
278
|
-
var n = "".concat(Ke(e), "Element"), s = function(a) {
|
|
279
|
-
var f = a.id, y = a.className, h = a.options, c = h === void 0 ? {} : h, _ = a.onBlur, v = _ === void 0 ? w : _, o = a.onFocus, l = o === void 0 ? w : o, d = a.onReady, b = d === void 0 ? w : d, x = a.onChange, pe = x === void 0 ? w : x, D = a.onEscape, fe = D === void 0 ? w : D, M = a.onClick, de = M === void 0 ? w : M, H = a.onLoadError, me = H === void 0 ? w : H, K = a.onLoaderStart, ye = K === void 0 ? w : K, ve = I("mounts <".concat(n, ">")), Y = ve.elements, R = m.useRef(null), k = m.useRef(null), he = C(b), ge = C(v), Se = C(l), be = C(de), Ee = C(pe), _e = C(fe), Pe = C(me), Oe = C(ye);
|
|
280
|
-
m.useLayoutEffect(function() {
|
|
281
|
-
if (R.current == null && Y && k.current != null) {
|
|
282
|
-
var E = Y.create(e, c);
|
|
283
|
-
R.current = E, E.mount(k.current), E.on("ready", function() {
|
|
284
|
-
return he(E);
|
|
285
|
-
}), E.on("change", Ee), E.on("blur", ge), E.on("focus", Se), E.on("escape", _e), E.on("loaderror", Pe), E.on("loaderstart", Oe), E.on("click", be);
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
var G = $(c);
|
|
289
|
-
return m.useEffect(function() {
|
|
290
|
-
if (R.current) {
|
|
291
|
-
var E = ue(c, G, ["paymentRequest"]);
|
|
292
|
-
E && R.current.update(E);
|
|
293
|
-
}
|
|
294
|
-
}, [c, G]), m.useLayoutEffect(function() {
|
|
295
|
-
return function() {
|
|
296
|
-
R.current && (R.current.destroy(), R.current = null);
|
|
297
|
-
};
|
|
298
|
-
}, []), /* @__PURE__ */ m.createElement("div", {
|
|
299
|
-
id: f,
|
|
300
|
-
className: y,
|
|
301
|
-
ref: k
|
|
302
|
-
});
|
|
303
|
-
}, i = function(a) {
|
|
304
|
-
I("mounts <".concat(n, ">"));
|
|
305
|
-
var f = a.id, y = a.className;
|
|
306
|
-
return /* @__PURE__ */ m.createElement("div", {
|
|
307
|
-
id: f,
|
|
308
|
-
className: y
|
|
309
|
-
});
|
|
310
|
-
}, p = r ? i : s;
|
|
311
|
-
return p.propTypes = {
|
|
312
|
-
id: O.string,
|
|
313
|
-
className: O.string,
|
|
314
|
-
onChange: O.func,
|
|
315
|
-
onBlur: O.func,
|
|
316
|
-
onFocus: O.func,
|
|
317
|
-
onReady: O.func,
|
|
318
|
-
onClick: O.func,
|
|
319
|
-
onLoadError: O.func,
|
|
320
|
-
onLoaderStart: O.func,
|
|
321
|
-
options: O.object
|
|
322
|
-
}, p.displayName = n, p.__elementType = e, p;
|
|
323
|
-
}, S = typeof window > "u";
|
|
324
|
-
g("auBankAccount", S);
|
|
325
|
-
g("card", S);
|
|
326
|
-
g("cardNumber", S);
|
|
327
|
-
g("cardExpiry", S);
|
|
328
|
-
g("cardCvc", S);
|
|
329
|
-
g("fpxBank", S);
|
|
330
|
-
g("iban", S);
|
|
331
|
-
g("idealBank", S);
|
|
332
|
-
g("p24Bank", S);
|
|
333
|
-
g("epsBank", S);
|
|
334
|
-
var Ye = g("payment", S);
|
|
335
|
-
g("paymentRequestButton", S);
|
|
336
|
-
g("linkAuthentication", S);
|
|
337
|
-
g("shippingAddress", S);
|
|
338
|
-
g("affirmMessage", S);
|
|
339
|
-
g("afterpayClearpayMessage", S);
|
|
340
|
-
var j = {}, ae;
|
|
341
|
-
function Ge() {
|
|
342
|
-
if (ae) return j;
|
|
343
|
-
ae = 1, Object.defineProperty(j, "__esModule", { value: !0 });
|
|
344
|
-
function t(v) {
|
|
345
|
-
"@babel/helpers - typeof";
|
|
346
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? t = function(o) {
|
|
347
|
-
return typeof o;
|
|
348
|
-
} : t = function(o) {
|
|
349
|
-
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
350
|
-
}, t(v);
|
|
351
|
-
}
|
|
352
|
-
var e = "https://js.stripe.com/v3", r = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, n = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", s = function() {
|
|
353
|
-
for (var o = document.querySelectorAll('script[src^="'.concat(e, '"]')), l = 0; l < o.length; l++) {
|
|
354
|
-
var d = o[l];
|
|
355
|
-
if (r.test(d.src))
|
|
356
|
-
return d;
|
|
357
|
-
}
|
|
358
|
-
return null;
|
|
359
|
-
}, i = function(o) {
|
|
360
|
-
var l = o && !o.advancedFraudSignals ? "?advancedFraudSignals=false" : "", d = document.createElement("script");
|
|
361
|
-
d.src = "".concat(e).concat(l);
|
|
362
|
-
var b = document.head || document.body;
|
|
363
|
-
if (!b)
|
|
364
|
-
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
365
|
-
return b.appendChild(d), d;
|
|
366
|
-
}, p = function(o, l) {
|
|
367
|
-
!o || !o._registerWrapper || o._registerWrapper({
|
|
368
|
-
name: "stripe-js",
|
|
369
|
-
version: "1.35.0",
|
|
370
|
-
startTime: l
|
|
371
|
-
});
|
|
372
|
-
}, u = null, a = function(o) {
|
|
373
|
-
return u !== null || (u = new Promise(function(l, d) {
|
|
374
|
-
if (typeof window > "u") {
|
|
375
|
-
l(null);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
if (window.Stripe && o && console.warn(n), window.Stripe) {
|
|
379
|
-
l(window.Stripe);
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
try {
|
|
383
|
-
var b = s();
|
|
384
|
-
b && o ? console.warn(n) : b || (b = i(o)), b.addEventListener("load", function() {
|
|
385
|
-
window.Stripe ? l(window.Stripe) : d(new Error("Stripe.js not available"));
|
|
386
|
-
}), b.addEventListener("error", function() {
|
|
387
|
-
d(new Error("Failed to load Stripe.js"));
|
|
388
|
-
});
|
|
389
|
-
} catch (x) {
|
|
390
|
-
d(x);
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
})), u;
|
|
394
|
-
}, f = function(o, l, d) {
|
|
395
|
-
if (o === null)
|
|
396
|
-
return null;
|
|
397
|
-
var b = o.apply(void 0, l);
|
|
398
|
-
return p(b, d), b;
|
|
399
|
-
}, y = function(o) {
|
|
400
|
-
var l = `invalid load parameters; expected object of shape
|
|
401
|
-
|
|
402
|
-
{advancedFraudSignals: boolean}
|
|
403
|
-
|
|
404
|
-
but received
|
|
405
|
-
|
|
406
|
-
`.concat(JSON.stringify(o), `
|
|
407
|
-
`);
|
|
408
|
-
if (o === null || t(o) !== "object")
|
|
409
|
-
throw new Error(l);
|
|
410
|
-
if (Object.keys(o).length === 1 && typeof o.advancedFraudSignals == "boolean")
|
|
411
|
-
return o;
|
|
412
|
-
throw new Error(l);
|
|
413
|
-
}, h, c = !1, _ = function() {
|
|
414
|
-
for (var o = arguments.length, l = new Array(o), d = 0; d < o; d++)
|
|
415
|
-
l[d] = arguments[d];
|
|
416
|
-
c = !0;
|
|
417
|
-
var b = Date.now();
|
|
418
|
-
return a(h).then(function(x) {
|
|
419
|
-
return f(x, l, b);
|
|
420
|
-
});
|
|
421
|
-
};
|
|
422
|
-
return _.setLoadParameters = function(v) {
|
|
423
|
-
if (c)
|
|
424
|
-
throw new Error("You cannot change load parameters after calling loadStripe");
|
|
425
|
-
h = y(v);
|
|
426
|
-
}, j.loadStripe = _, j;
|
|
427
|
-
}
|
|
428
|
-
var B, oe;
|
|
429
|
-
function Ve() {
|
|
430
|
-
return oe || (oe = 1, B = Ge()), B;
|
|
431
|
-
}
|
|
432
|
-
var Xe = Ve(), ze = {};
|
|
433
|
-
const Je = ze.NEXT_PUBLIC_STRIPE_PUBLIC_KEY || "";
|
|
434
|
-
let F;
|
|
435
|
-
const Qe = (t) => (F || (F = Xe.loadStripe(
|
|
436
|
-
t || Je
|
|
437
|
-
/* , {
|
|
438
|
-
locale: "es-419" TODO: Handle multiple locales,
|
|
439
|
-
} */
|
|
440
|
-
)), F), Ze = (t) => {
|
|
441
|
-
const { t: e, i18n: r } = se(), { paymentOption: n, elements: s, state: i, onPaymentElementChange: p } = t, [u, a] = A(!1), [f, y] = A(n !== "HOLD"), h = u || !f || ["processing", "error"].includes(i.status), c = {
|
|
442
|
-
layout: "accordion"
|
|
443
|
-
};
|
|
444
|
-
return ie(() => {
|
|
445
|
-
s == null || s.update({ locale: r.language });
|
|
446
|
-
}, [s, r.language]), /* @__PURE__ */ V("form", { id: "payment-form", className: "bg-subtle mt-4 rounded-md p-6", onSubmit: t.onSubmit, children: [
|
|
447
|
-
/* @__PURE__ */ P("div", { children: /* @__PURE__ */ P(Ye, { options: c, onChange: (_) => p() }) }),
|
|
448
|
-
n === "HOLD" && /* @__PURE__ */ P("div", { className: "bg-cal-info mb-5 mt-2 rounded-md p-3", children: /* @__PURE__ */ P(
|
|
449
|
-
we,
|
|
450
|
-
{
|
|
451
|
-
description: e("acknowledge_booking_no_show_fee", {
|
|
452
|
-
amount: t.payment.amount / 100,
|
|
453
|
-
formatParams: { amount: { currency: t.payment.currency } }
|
|
454
|
-
}),
|
|
455
|
-
onChange: (_) => y(_.target.checked),
|
|
456
|
-
descriptionClassName: "text-info font-semibold"
|
|
457
|
-
}
|
|
458
|
-
) }),
|
|
459
|
-
/* @__PURE__ */ V("div", { className: "mt-2 flex justify-end space-x-2", children: [
|
|
460
|
-
/* @__PURE__ */ P(
|
|
461
|
-
X,
|
|
462
|
-
{
|
|
463
|
-
color: "minimal",
|
|
464
|
-
disabled: h,
|
|
465
|
-
id: "cancel",
|
|
466
|
-
type: "button",
|
|
467
|
-
loading: u,
|
|
468
|
-
onClick: () => {
|
|
469
|
-
a(!0), t.onCancel();
|
|
470
|
-
},
|
|
471
|
-
children: /* @__PURE__ */ P("span", { id: "button-text", children: e("cancel") })
|
|
472
|
-
}
|
|
473
|
-
),
|
|
474
|
-
/* @__PURE__ */ P(
|
|
475
|
-
X,
|
|
476
|
-
{
|
|
477
|
-
type: "submit",
|
|
478
|
-
disabled: h,
|
|
479
|
-
loading: i.status === "processing",
|
|
480
|
-
id: "submit",
|
|
481
|
-
color: "secondary",
|
|
482
|
-
children: /* @__PURE__ */ P("span", { id: "button-text", children: i.status === "processing" ? /* @__PURE__ */ P("div", { className: "spinner", id: "spinner" }) : e(n === "HOLD" ? "submit_card" : "pay_now") })
|
|
483
|
-
}
|
|
484
|
-
)
|
|
485
|
-
] }),
|
|
486
|
-
i.status === "error" && /* @__PURE__ */ P("div", { className: "mt-4 text-center text-red-900 dark:text-gray-300", role: "alert", children: i.error.message })
|
|
487
|
-
] });
|
|
488
|
-
}, et = (t) => {
|
|
489
|
-
const { t: e } = se(), r = Me(), n = t.payment.paymentOption;
|
|
490
|
-
t.booking.attendees[0].email;
|
|
491
|
-
const s = He(), [i, p] = A({ status: "idle" });
|
|
492
|
-
return /* @__PURE__ */ P(
|
|
493
|
-
Ze,
|
|
494
|
-
{
|
|
495
|
-
...t,
|
|
496
|
-
elements: r,
|
|
497
|
-
paymentOption: n,
|
|
498
|
-
state: i,
|
|
499
|
-
onSubmit: async (u) => {
|
|
500
|
-
var y;
|
|
501
|
-
if (u.preventDefault(), !s || !r)
|
|
502
|
-
return;
|
|
503
|
-
p({ status: "processing" });
|
|
504
|
-
let a;
|
|
505
|
-
const f = {
|
|
506
|
-
uid: t.booking.uid
|
|
507
|
-
};
|
|
508
|
-
n === "HOLD" && "setupIntent" in t.payment.data ? (a = await s.confirmSetup({
|
|
509
|
-
elements: r,
|
|
510
|
-
redirect: "if_required"
|
|
511
|
-
}), a.setupIntent && (f.payment_intent = a.setupIntent.id, f.payment_intent_client_secret = a.setupIntent.client_secret || void 0, f.redirect_status = a.setupIntent.status)) : n === "ON_BOOKING" && (a = await s.confirmPayment({
|
|
512
|
-
elements: r,
|
|
513
|
-
redirect: "if_required",
|
|
514
|
-
confirmParams: {
|
|
515
|
-
return_url: `${Re}/booking/${f.uid}`
|
|
516
|
-
}
|
|
517
|
-
}), a.paymentIntent && (f.payment_intent = a.paymentIntent.id, f.payment_intent_client_secret = a.paymentIntent.client_secret || void 0, f.redirect_status = a.paymentIntent.status)), a != null && a.error ? p({
|
|
518
|
-
status: "error",
|
|
519
|
-
error: new Error(`Payment failed: ${a.error.message}`)
|
|
520
|
-
}) : (p({ status: "idle" }), (y = t.onPaymentSuccess) == null || y.call(t, t), t.location && (t.location.includes("integration") ? f.location = e("web_conferencing_details_to_follow") : f.location = t.location));
|
|
521
|
-
},
|
|
522
|
-
onCancel: () => {
|
|
523
|
-
var u;
|
|
524
|
-
(u = t.onPaymentCancellation) == null || u.call(t, t);
|
|
525
|
-
},
|
|
526
|
-
onPaymentElementChange: () => {
|
|
527
|
-
p({ status: "idle" });
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
);
|
|
531
|
-
}, at = (t) => {
|
|
532
|
-
const e = Qe(t.payment.data.stripe_publishable_key), [r, n] = A("stripe");
|
|
533
|
-
return ie(() => {
|
|
534
|
-
document.documentElement.classList.contains("dark") && n("night");
|
|
535
|
-
}, []), /* @__PURE__ */ P(
|
|
536
|
-
le,
|
|
537
|
-
{
|
|
538
|
-
stripe: e,
|
|
539
|
-
options: {
|
|
540
|
-
clientSecret: t.clientSecret,
|
|
541
|
-
appearance: {
|
|
542
|
-
theme: r
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
children: /* @__PURE__ */ P(et, { ...t })
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
};
|
|
549
|
-
export {
|
|
550
|
-
at as default
|
|
551
|
-
};
|