@paywithglide/glide-react 0.0.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/glide.js ADDED
@@ -0,0 +1,1629 @@
1
+ var Lr = Object.defineProperty;
2
+ var Fr = (O, u, h) => u in O ? Lr(O, u, { enumerable: !0, configurable: !0, writable: !0, value: h }) : O[u] = h;
3
+ var fe = (O, u, h) => Fr(O, typeof u != "symbol" ? u + "" : u, h);
4
+ class Mr {
5
+ constructor(u) {
6
+ fe(this, "opts");
7
+ fe(this, "didInit", !1);
8
+ fe(this, "open", () => {
9
+ var u, h, T;
10
+ if (!document.body.classList.contains("glide-deposit-open")) {
11
+ if (document.body.classList.add("glide-deposit-open"), !this.opts.recipient)
12
+ throw new Error("recipient is required");
13
+ const $ = this.opts.recipient, L = (u = this.opts.walletProvider) == null ? void 0 : u.address, F = (h = this.opts.walletProvider) == null ? void 0 : h.availableChainIds, M = (T = this.opts.walletProvider) == null ? void 0 : T.currentChainId;
14
+ this.openUrl(
15
+ `${this.baseUrl}${this.opts.app}?recipient=${$}&embed=true${L ? `&connectedWalletAddress=${L}` : ""}${M ? `&currentChainId=${M}` : ""}${F ? `&availableChainIds=${F.join(",")}` : ""}`
16
+ );
17
+ }
18
+ });
19
+ fe(this, "iframeEventHandler", async (u) => {
20
+ var T, $, L, F, M, B, W, N;
21
+ const h = u.data;
22
+ switch (h.type) {
23
+ case "close":
24
+ this.removeIframe(), this.hideLoader();
25
+ break;
26
+ case "switchChain":
27
+ if (!this.opts.walletProvider)
28
+ throw new Error("walletProvider is not set");
29
+ try {
30
+ await this.opts.walletProvider.switchChainAsync({
31
+ chainId: h.chainId
32
+ }), ($ = (T = this.iframe) == null ? void 0 : T.contentWindow) == null || $.postMessage(
33
+ {
34
+ type: "didSwitchChain",
35
+ success: !0,
36
+ chainId: h.chainId
37
+ },
38
+ this.baseUrl
39
+ );
40
+ } catch (D) {
41
+ (F = (L = this.iframe) == null ? void 0 : L.contentWindow) == null || F.postMessage(
42
+ {
43
+ type: "didSwitchChain",
44
+ success: !1,
45
+ error: D
46
+ },
47
+ this.baseUrl
48
+ );
49
+ }
50
+ break;
51
+ case "sendTransaction":
52
+ {
53
+ if (!this.opts.walletProvider)
54
+ throw new Error("walletProvider is not set");
55
+ try {
56
+ const D = await this.opts.walletProvider.sendTransactionAsync(
57
+ h.tx
58
+ );
59
+ (B = (M = this.iframe) == null ? void 0 : M.contentWindow) == null || B.postMessage(
60
+ {
61
+ type: "didSendTransaction",
62
+ success: !0,
63
+ txHash: D
64
+ },
65
+ this.baseUrl
66
+ );
67
+ } catch (D) {
68
+ (N = (W = this.iframe) == null ? void 0 : W.contentWindow) == null || N.postMessage(
69
+ {
70
+ type: "didSendTransaction",
71
+ success: !1,
72
+ error: D
73
+ },
74
+ this.baseUrl
75
+ );
76
+ }
77
+ }
78
+ break;
79
+ }
80
+ });
81
+ this.opts = u;
82
+ }
83
+ initialize() {
84
+ this.didInit || (this.didInit = !0, window.addEventListener("message", this.iframeEventHandler));
85
+ }
86
+ destroy() {
87
+ window.removeEventListener("message", this.iframeEventHandler);
88
+ }
89
+ get baseUrl() {
90
+ return this.opts.baseUrl || "https://deposit.paywithglide.xyz/";
91
+ }
92
+ get iframe() {
93
+ return document.getElementById("glide-deposit-iframe");
94
+ }
95
+ openUrl(u) {
96
+ this.showLoader(), this.createIframe(u);
97
+ }
98
+ createIframe(u) {
99
+ this.removeIframe();
100
+ const h = document.createElement("iframe");
101
+ h.id = "glide-deposit-iframe", h.setAttribute(
102
+ "style",
103
+ "z-index: 2147483647; display: block; background-color: transparent; border: 0px none transparent; overflow-x: hidden; overflow-y: auto; visibility: visible; margin: 0px; padding: 0px; -webkit-tap-highlight-color: transparent; position: fixed; left: 0px; top: 0px; width: 100%; height: 100%;"
104
+ ), h.src = u, h.allow = "payment", document.body.appendChild(h), window.setTimeout(() => {
105
+ var T;
106
+ (T = h == null ? void 0 : h.contentWindow) == null || T.focus();
107
+ }, 100);
108
+ }
109
+ removeIframe() {
110
+ const u = document.getElementById("glide-deposit-iframe");
111
+ u && (u.remove(), document.body.classList.remove("glide-deposit-open"));
112
+ }
113
+ showLoader() {
114
+ const u = document.createElement("style");
115
+ u.innerHTML = "@keyframes pulse { 0% { opacity: 1; transform: scale(0.1); } 100% { opacity: 0; transform: scale(1); } }", document.head.appendChild(u);
116
+ const h = document.createElement("div");
117
+ h.setAttribute("class", "glide-deposit-loader");
118
+ const T = document.createElement("main");
119
+ T.setAttribute(
120
+ "style",
121
+ "display: flex; align-items: center; justify-content: center; flex-direction: column; width: 100%; height: 100%;"
122
+ ), h.appendChild(T), document.body.appendChild(h);
123
+ }
124
+ hideLoader() {
125
+ document.querySelectorAll(".glide-deposit-loader").forEach((u) => u.remove());
126
+ }
127
+ }
128
+ var Pe = { exports: {} }, d = {};
129
+ /**
130
+ * @license React
131
+ * react.production.min.js
132
+ *
133
+ * Copyright (c) Facebook, Inc. and its affiliates.
134
+ *
135
+ * This source code is licensed under the MIT license found in the
136
+ * LICENSE file in the root directory of this source tree.
137
+ */
138
+ var Tt;
139
+ function Ur() {
140
+ if (Tt) return d;
141
+ Tt = 1;
142
+ var O = Symbol.for("react.element"), u = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), L = Symbol.for("react.provider"), F = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), W = Symbol.for("react.memo"), N = Symbol.for("react.lazy"), D = Symbol.iterator;
143
+ function oe(r) {
144
+ return r === null || typeof r != "object" ? null : (r = D && r[D] || r["@@iterator"], typeof r == "function" ? r : null);
145
+ }
146
+ var V = { isMounted: function() {
147
+ return !1;
148
+ }, enqueueForceUpdate: function() {
149
+ }, enqueueReplaceState: function() {
150
+ }, enqueueSetState: function() {
151
+ } }, K = Object.assign, pe = {};
152
+ function Y(r, o, p) {
153
+ this.props = r, this.context = o, this.refs = pe, this.updater = p || V;
154
+ }
155
+ Y.prototype.isReactComponent = {}, Y.prototype.setState = function(r, o) {
156
+ if (typeof r != "object" && typeof r != "function" && r != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
157
+ this.updater.enqueueSetState(this, r, o, "setState");
158
+ }, Y.prototype.forceUpdate = function(r) {
159
+ this.updater.enqueueForceUpdate(this, r, "forceUpdate");
160
+ };
161
+ function ve() {
162
+ }
163
+ ve.prototype = Y.prototype;
164
+ function J(r, o, p) {
165
+ this.props = r, this.context = o, this.refs = pe, this.updater = p || V;
166
+ }
167
+ var Z = J.prototype = new ve();
168
+ Z.constructor = J, K(Z, Y.prototype), Z.isPureReactComponent = !0;
169
+ var z = Array.isArray, P = Object.prototype.hasOwnProperty, x = { current: null }, H = { key: !0, ref: !0, __self: !0, __source: !0 };
170
+ function Q(r, o, p) {
171
+ var y, m = {}, S = null, w = null;
172
+ if (o != null) for (y in o.ref !== void 0 && (w = o.ref), o.key !== void 0 && (S = "" + o.key), o) P.call(o, y) && !H.hasOwnProperty(y) && (m[y] = o[y]);
173
+ var R = arguments.length - 2;
174
+ if (R === 1) m.children = p;
175
+ else if (1 < R) {
176
+ for (var b = Array(R), I = 0; I < R; I++) b[I] = arguments[I + 2];
177
+ m.children = b;
178
+ }
179
+ if (r && r.defaultProps) for (y in R = r.defaultProps, R) m[y] === void 0 && (m[y] = R[y]);
180
+ return { $$typeof: O, type: r, key: S, ref: w, props: m, _owner: x.current };
181
+ }
182
+ function ye(r, o) {
183
+ return { $$typeof: O, type: r.type, key: o, ref: r.ref, props: r.props, _owner: r._owner };
184
+ }
185
+ function ie(r) {
186
+ return typeof r == "object" && r !== null && r.$$typeof === O;
187
+ }
188
+ function Ae(r) {
189
+ var o = { "=": "=0", ":": "=2" };
190
+ return "$" + r.replace(/[=:]/g, function(p) {
191
+ return o[p];
192
+ });
193
+ }
194
+ var he = /\/+/g;
195
+ function ue(r, o) {
196
+ return typeof r == "object" && r !== null && r.key != null ? Ae("" + r.key) : o.toString(36);
197
+ }
198
+ function ee(r, o, p, y, m) {
199
+ var S = typeof r;
200
+ (S === "undefined" || S === "boolean") && (r = null);
201
+ var w = !1;
202
+ if (r === null) w = !0;
203
+ else switch (S) {
204
+ case "string":
205
+ case "number":
206
+ w = !0;
207
+ break;
208
+ case "object":
209
+ switch (r.$$typeof) {
210
+ case O:
211
+ case u:
212
+ w = !0;
213
+ }
214
+ }
215
+ if (w) return w = r, m = m(w), r = y === "" ? "." + ue(w, 0) : y, z(m) ? (p = "", r != null && (p = r.replace(he, "$&/") + "/"), ee(m, o, p, "", function(I) {
216
+ return I;
217
+ })) : m != null && (ie(m) && (m = ye(m, p + (!m.key || w && w.key === m.key ? "" : ("" + m.key).replace(he, "$&/") + "/") + r)), o.push(m)), 1;
218
+ if (w = 0, y = y === "" ? "." : y + ":", z(r)) for (var R = 0; R < r.length; R++) {
219
+ S = r[R];
220
+ var b = y + ue(S, R);
221
+ w += ee(S, o, p, b, m);
222
+ }
223
+ else if (b = oe(r), typeof b == "function") for (r = b.call(r), R = 0; !(S = r.next()).done; ) S = S.value, b = y + ue(S, R++), w += ee(S, o, p, b, m);
224
+ else if (S === "object") throw o = String(r), Error("Objects are not valid as a React child (found: " + (o === "[object Object]" ? "object with keys {" + Object.keys(r).join(", ") + "}" : o) + "). If you meant to render a collection of children, use an array instead.");
225
+ return w;
226
+ }
227
+ function U(r, o, p) {
228
+ if (r == null) return r;
229
+ var y = [], m = 0;
230
+ return ee(r, y, "", "", function(S) {
231
+ return o.call(p, S, m++);
232
+ }), y;
233
+ }
234
+ function q(r) {
235
+ if (r._status === -1) {
236
+ var o = r._result;
237
+ o = o(), o.then(function(p) {
238
+ (r._status === 0 || r._status === -1) && (r._status = 1, r._result = p);
239
+ }, function(p) {
240
+ (r._status === 0 || r._status === -1) && (r._status = 2, r._result = p);
241
+ }), r._status === -1 && (r._status = 0, r._result = o);
242
+ }
243
+ if (r._status === 1) return r._result.default;
244
+ throw r._result;
245
+ }
246
+ var l = { current: null }, X = { transition: null }, me = { ReactCurrentDispatcher: l, ReactCurrentBatchConfig: X, ReactCurrentOwner: x };
247
+ function te() {
248
+ throw Error("act(...) is not supported in production builds of React.");
249
+ }
250
+ return d.Children = { map: U, forEach: function(r, o, p) {
251
+ U(r, function() {
252
+ o.apply(this, arguments);
253
+ }, p);
254
+ }, count: function(r) {
255
+ var o = 0;
256
+ return U(r, function() {
257
+ o++;
258
+ }), o;
259
+ }, toArray: function(r) {
260
+ return U(r, function(o) {
261
+ return o;
262
+ }) || [];
263
+ }, only: function(r) {
264
+ if (!ie(r)) throw Error("React.Children.only expected to receive a single React element child.");
265
+ return r;
266
+ } }, d.Component = Y, d.Fragment = h, d.Profiler = $, d.PureComponent = J, d.StrictMode = T, d.Suspense = B, d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = me, d.act = te, d.cloneElement = function(r, o, p) {
267
+ if (r == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + r + ".");
268
+ var y = K({}, r.props), m = r.key, S = r.ref, w = r._owner;
269
+ if (o != null) {
270
+ if (o.ref !== void 0 && (S = o.ref, w = x.current), o.key !== void 0 && (m = "" + o.key), r.type && r.type.defaultProps) var R = r.type.defaultProps;
271
+ for (b in o) P.call(o, b) && !H.hasOwnProperty(b) && (y[b] = o[b] === void 0 && R !== void 0 ? R[b] : o[b]);
272
+ }
273
+ var b = arguments.length - 2;
274
+ if (b === 1) y.children = p;
275
+ else if (1 < b) {
276
+ R = Array(b);
277
+ for (var I = 0; I < b; I++) R[I] = arguments[I + 2];
278
+ y.children = R;
279
+ }
280
+ return { $$typeof: O, type: r.type, key: m, ref: S, props: y, _owner: w };
281
+ }, d.createContext = function(r) {
282
+ return r = { $$typeof: F, _currentValue: r, _currentValue2: r, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, r.Provider = { $$typeof: L, _context: r }, r.Consumer = r;
283
+ }, d.createElement = Q, d.createFactory = function(r) {
284
+ var o = Q.bind(null, r);
285
+ return o.type = r, o;
286
+ }, d.createRef = function() {
287
+ return { current: null };
288
+ }, d.forwardRef = function(r) {
289
+ return { $$typeof: M, render: r };
290
+ }, d.isValidElement = ie, d.lazy = function(r) {
291
+ return { $$typeof: N, _payload: { _status: -1, _result: r }, _init: q };
292
+ }, d.memo = function(r, o) {
293
+ return { $$typeof: W, type: r, compare: o === void 0 ? null : o };
294
+ }, d.startTransition = function(r) {
295
+ var o = X.transition;
296
+ X.transition = {};
297
+ try {
298
+ r();
299
+ } finally {
300
+ X.transition = o;
301
+ }
302
+ }, d.unstable_act = te, d.useCallback = function(r, o) {
303
+ return l.current.useCallback(r, o);
304
+ }, d.useContext = function(r) {
305
+ return l.current.useContext(r);
306
+ }, d.useDebugValue = function() {
307
+ }, d.useDeferredValue = function(r) {
308
+ return l.current.useDeferredValue(r);
309
+ }, d.useEffect = function(r, o) {
310
+ return l.current.useEffect(r, o);
311
+ }, d.useId = function() {
312
+ return l.current.useId();
313
+ }, d.useImperativeHandle = function(r, o, p) {
314
+ return l.current.useImperativeHandle(r, o, p);
315
+ }, d.useInsertionEffect = function(r, o) {
316
+ return l.current.useInsertionEffect(r, o);
317
+ }, d.useLayoutEffect = function(r, o) {
318
+ return l.current.useLayoutEffect(r, o);
319
+ }, d.useMemo = function(r, o) {
320
+ return l.current.useMemo(r, o);
321
+ }, d.useReducer = function(r, o, p) {
322
+ return l.current.useReducer(r, o, p);
323
+ }, d.useRef = function(r) {
324
+ return l.current.useRef(r);
325
+ }, d.useState = function(r) {
326
+ return l.current.useState(r);
327
+ }, d.useSyncExternalStore = function(r, o, p) {
328
+ return l.current.useSyncExternalStore(r, o, p);
329
+ }, d.useTransition = function() {
330
+ return l.current.useTransition();
331
+ }, d.version = "18.3.1", d;
332
+ }
333
+ var de = { exports: {} };
334
+ /**
335
+ * @license React
336
+ * react.development.js
337
+ *
338
+ * Copyright (c) Facebook, Inc. and its affiliates.
339
+ *
340
+ * This source code is licensed under the MIT license found in the
341
+ * LICENSE file in the root directory of this source tree.
342
+ */
343
+ de.exports;
344
+ var kt;
345
+ function Nr() {
346
+ return kt || (kt = 1, function(O, u) {
347
+ process.env.NODE_ENV !== "production" && function() {
348
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
349
+ var h = "18.3.1", T = Symbol.for("react.element"), $ = Symbol.for("react.portal"), L = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), B = Symbol.for("react.provider"), W = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), oe = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), K = Symbol.for("react.lazy"), pe = Symbol.for("react.offscreen"), Y = Symbol.iterator, ve = "@@iterator";
350
+ function J(e) {
351
+ if (e === null || typeof e != "object")
352
+ return null;
353
+ var t = Y && e[Y] || e[ve];
354
+ return typeof t == "function" ? t : null;
355
+ }
356
+ var Z = {
357
+ /**
358
+ * @internal
359
+ * @type {ReactComponent}
360
+ */
361
+ current: null
362
+ }, z = {
363
+ transition: null
364
+ }, P = {
365
+ current: null,
366
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
367
+ isBatchingLegacy: !1,
368
+ didScheduleLegacyUpdate: !1
369
+ }, x = {
370
+ /**
371
+ * @internal
372
+ * @type {ReactComponent}
373
+ */
374
+ current: null
375
+ }, H = {}, Q = null;
376
+ function ye(e) {
377
+ Q = e;
378
+ }
379
+ H.setExtraStackFrame = function(e) {
380
+ Q = e;
381
+ }, H.getCurrentStack = null, H.getStackAddendum = function() {
382
+ var e = "";
383
+ Q && (e += Q);
384
+ var t = H.getCurrentStack;
385
+ return t && (e += t() || ""), e;
386
+ };
387
+ var ie = !1, Ae = !1, he = !1, ue = !1, ee = !1, U = {
388
+ ReactCurrentDispatcher: Z,
389
+ ReactCurrentBatchConfig: z,
390
+ ReactCurrentOwner: x
391
+ };
392
+ U.ReactDebugCurrentFrame = H, U.ReactCurrentActQueue = P;
393
+ function q(e) {
394
+ {
395
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
396
+ n[a - 1] = arguments[a];
397
+ X("warn", e, n);
398
+ }
399
+ }
400
+ function l(e) {
401
+ {
402
+ for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
403
+ n[a - 1] = arguments[a];
404
+ X("error", e, n);
405
+ }
406
+ }
407
+ function X(e, t, n) {
408
+ {
409
+ var a = U.ReactDebugCurrentFrame, i = a.getStackAddendum();
410
+ i !== "" && (t += "%s", n = n.concat([i]));
411
+ var c = n.map(function(s) {
412
+ return String(s);
413
+ });
414
+ c.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, c);
415
+ }
416
+ }
417
+ var me = {};
418
+ function te(e, t) {
419
+ {
420
+ var n = e.constructor, a = n && (n.displayName || n.name) || "ReactClass", i = a + "." + t;
421
+ if (me[i])
422
+ return;
423
+ l("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, a), me[i] = !0;
424
+ }
425
+ }
426
+ var r = {
427
+ /**
428
+ * Checks whether or not this composite component is mounted.
429
+ * @param {ReactClass} publicInstance The instance we want to test.
430
+ * @return {boolean} True if mounted, false otherwise.
431
+ * @protected
432
+ * @final
433
+ */
434
+ isMounted: function(e) {
435
+ return !1;
436
+ },
437
+ /**
438
+ * Forces an update. This should only be invoked when it is known with
439
+ * certainty that we are **not** in a DOM transaction.
440
+ *
441
+ * You may want to call this when you know that some deeper aspect of the
442
+ * component's state has changed but `setState` was not called.
443
+ *
444
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
445
+ * `componentWillUpdate` and `componentDidUpdate`.
446
+ *
447
+ * @param {ReactClass} publicInstance The instance that should rerender.
448
+ * @param {?function} callback Called after component is updated.
449
+ * @param {?string} callerName name of the calling function in the public API.
450
+ * @internal
451
+ */
452
+ enqueueForceUpdate: function(e, t, n) {
453
+ te(e, "forceUpdate");
454
+ },
455
+ /**
456
+ * Replaces all of the state. Always use this or `setState` to mutate state.
457
+ * You should treat `this.state` as immutable.
458
+ *
459
+ * There is no guarantee that `this.state` will be immediately updated, so
460
+ * accessing `this.state` after calling this method may return the old value.
461
+ *
462
+ * @param {ReactClass} publicInstance The instance that should rerender.
463
+ * @param {object} completeState Next state.
464
+ * @param {?function} callback Called after component is updated.
465
+ * @param {?string} callerName name of the calling function in the public API.
466
+ * @internal
467
+ */
468
+ enqueueReplaceState: function(e, t, n, a) {
469
+ te(e, "replaceState");
470
+ },
471
+ /**
472
+ * Sets a subset of the state. This only exists because _pendingState is
473
+ * internal. This provides a merging strategy that is not available to deep
474
+ * properties which is confusing. TODO: Expose pendingState or don't use it
475
+ * during the merge.
476
+ *
477
+ * @param {ReactClass} publicInstance The instance that should rerender.
478
+ * @param {object} partialState Next partial state to be merged with state.
479
+ * @param {?function} callback Called after component is updated.
480
+ * @param {?string} Name of the calling function in the public API.
481
+ * @internal
482
+ */
483
+ enqueueSetState: function(e, t, n, a) {
484
+ te(e, "setState");
485
+ }
486
+ }, o = Object.assign, p = {};
487
+ Object.freeze(p);
488
+ function y(e, t, n) {
489
+ this.props = e, this.context = t, this.refs = p, this.updater = n || r;
490
+ }
491
+ y.prototype.isReactComponent = {}, y.prototype.setState = function(e, t) {
492
+ if (typeof e != "object" && typeof e != "function" && e != null)
493
+ throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
494
+ this.updater.enqueueSetState(this, e, t, "setState");
495
+ }, y.prototype.forceUpdate = function(e) {
496
+ this.updater.enqueueForceUpdate(this, e, "forceUpdate");
497
+ };
498
+ {
499
+ var m = {
500
+ isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
501
+ replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
502
+ }, S = function(e, t) {
503
+ Object.defineProperty(y.prototype, e, {
504
+ get: function() {
505
+ q("%s(...) is deprecated in plain JavaScript React classes. %s", t[0], t[1]);
506
+ }
507
+ });
508
+ };
509
+ for (var w in m)
510
+ m.hasOwnProperty(w) && S(w, m[w]);
511
+ }
512
+ function R() {
513
+ }
514
+ R.prototype = y.prototype;
515
+ function b(e, t, n) {
516
+ this.props = e, this.context = t, this.refs = p, this.updater = n || r;
517
+ }
518
+ var I = b.prototype = new R();
519
+ I.constructor = b, o(I, y.prototype), I.isPureReactComponent = !0;
520
+ function At() {
521
+ var e = {
522
+ current: null
523
+ };
524
+ return Object.seal(e), e;
525
+ }
526
+ var It = Array.isArray;
527
+ function ge(e) {
528
+ return It(e);
529
+ }
530
+ function jt(e) {
531
+ {
532
+ var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
533
+ return n;
534
+ }
535
+ }
536
+ function $t(e) {
537
+ try {
538
+ return Ye(e), !1;
539
+ } catch {
540
+ return !0;
541
+ }
542
+ }
543
+ function Ye(e) {
544
+ return "" + e;
545
+ }
546
+ function be(e) {
547
+ if ($t(e))
548
+ return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jt(e)), Ye(e);
549
+ }
550
+ function Dt(e, t, n) {
551
+ var a = e.displayName;
552
+ if (a)
553
+ return a;
554
+ var i = t.displayName || t.name || "";
555
+ return i !== "" ? n + "(" + i + ")" : n;
556
+ }
557
+ function ze(e) {
558
+ return e.displayName || "Context";
559
+ }
560
+ function G(e) {
561
+ if (e == null)
562
+ return null;
563
+ if (typeof e.tag == "number" && l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
564
+ return e.displayName || e.name || null;
565
+ if (typeof e == "string")
566
+ return e;
567
+ switch (e) {
568
+ case L:
569
+ return "Fragment";
570
+ case $:
571
+ return "Portal";
572
+ case M:
573
+ return "Profiler";
574
+ case F:
575
+ return "StrictMode";
576
+ case D:
577
+ return "Suspense";
578
+ case oe:
579
+ return "SuspenseList";
580
+ }
581
+ if (typeof e == "object")
582
+ switch (e.$$typeof) {
583
+ case W:
584
+ var t = e;
585
+ return ze(t) + ".Consumer";
586
+ case B:
587
+ var n = e;
588
+ return ze(n._context) + ".Provider";
589
+ case N:
590
+ return Dt(e, e.render, "ForwardRef");
591
+ case V:
592
+ var a = e.displayName || null;
593
+ return a !== null ? a : G(e.type) || "Memo";
594
+ case K: {
595
+ var i = e, c = i._payload, s = i._init;
596
+ try {
597
+ return G(s(c));
598
+ } catch {
599
+ return null;
600
+ }
601
+ }
602
+ }
603
+ return null;
604
+ }
605
+ var se = Object.prototype.hasOwnProperty, Be = {
606
+ key: !0,
607
+ ref: !0,
608
+ __self: !0,
609
+ __source: !0
610
+ }, He, qe, Ie;
611
+ Ie = {};
612
+ function Ge(e) {
613
+ if (se.call(e, "ref")) {
614
+ var t = Object.getOwnPropertyDescriptor(e, "ref").get;
615
+ if (t && t.isReactWarning)
616
+ return !1;
617
+ }
618
+ return e.ref !== void 0;
619
+ }
620
+ function Ke(e) {
621
+ if (se.call(e, "key")) {
622
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
623
+ if (t && t.isReactWarning)
624
+ return !1;
625
+ }
626
+ return e.key !== void 0;
627
+ }
628
+ function xt(e, t) {
629
+ var n = function() {
630
+ He || (He = !0, l("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
631
+ };
632
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
633
+ get: n,
634
+ configurable: !0
635
+ });
636
+ }
637
+ function Lt(e, t) {
638
+ var n = function() {
639
+ qe || (qe = !0, l("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
640
+ };
641
+ n.isReactWarning = !0, Object.defineProperty(e, "ref", {
642
+ get: n,
643
+ configurable: !0
644
+ });
645
+ }
646
+ function Ft(e) {
647
+ if (typeof e.ref == "string" && x.current && e.__self && x.current.stateNode !== e.__self) {
648
+ var t = G(x.current.type);
649
+ Ie[t] || (l('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', t, e.ref), Ie[t] = !0);
650
+ }
651
+ }
652
+ var je = function(e, t, n, a, i, c, s) {
653
+ var f = {
654
+ // This tag allows us to uniquely identify this as a React Element
655
+ $$typeof: T,
656
+ // Built-in properties that belong on the element
657
+ type: e,
658
+ key: t,
659
+ ref: n,
660
+ props: s,
661
+ // Record the component responsible for creating this element.
662
+ _owner: c
663
+ };
664
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
665
+ configurable: !1,
666
+ enumerable: !1,
667
+ writable: !0,
668
+ value: !1
669
+ }), Object.defineProperty(f, "_self", {
670
+ configurable: !1,
671
+ enumerable: !1,
672
+ writable: !1,
673
+ value: a
674
+ }), Object.defineProperty(f, "_source", {
675
+ configurable: !1,
676
+ enumerable: !1,
677
+ writable: !1,
678
+ value: i
679
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
680
+ };
681
+ function Mt(e, t, n) {
682
+ var a, i = {}, c = null, s = null, f = null, v = null;
683
+ if (t != null) {
684
+ Ge(t) && (s = t.ref, Ft(t)), Ke(t) && (be(t.key), c = "" + t.key), f = t.__self === void 0 ? null : t.__self, v = t.__source === void 0 ? null : t.__source;
685
+ for (a in t)
686
+ se.call(t, a) && !Be.hasOwnProperty(a) && (i[a] = t[a]);
687
+ }
688
+ var g = arguments.length - 2;
689
+ if (g === 1)
690
+ i.children = n;
691
+ else if (g > 1) {
692
+ for (var _ = Array(g), E = 0; E < g; E++)
693
+ _[E] = arguments[E + 2];
694
+ Object.freeze && Object.freeze(_), i.children = _;
695
+ }
696
+ if (e && e.defaultProps) {
697
+ var C = e.defaultProps;
698
+ for (a in C)
699
+ i[a] === void 0 && (i[a] = C[a]);
700
+ }
701
+ if (c || s) {
702
+ var k = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
703
+ c && xt(i, k), s && Lt(i, k);
704
+ }
705
+ return je(e, c, s, f, v, x.current, i);
706
+ }
707
+ function Ut(e, t) {
708
+ var n = je(e.type, t, e.ref, e._self, e._source, e._owner, e.props);
709
+ return n;
710
+ }
711
+ function Nt(e, t, n) {
712
+ if (e == null)
713
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
714
+ var a, i = o({}, e.props), c = e.key, s = e.ref, f = e._self, v = e._source, g = e._owner;
715
+ if (t != null) {
716
+ Ge(t) && (s = t.ref, g = x.current), Ke(t) && (be(t.key), c = "" + t.key);
717
+ var _;
718
+ e.type && e.type.defaultProps && (_ = e.type.defaultProps);
719
+ for (a in t)
720
+ se.call(t, a) && !Be.hasOwnProperty(a) && (t[a] === void 0 && _ !== void 0 ? i[a] = _[a] : i[a] = t[a]);
721
+ }
722
+ var E = arguments.length - 2;
723
+ if (E === 1)
724
+ i.children = n;
725
+ else if (E > 1) {
726
+ for (var C = Array(E), k = 0; k < E; k++)
727
+ C[k] = arguments[k + 2];
728
+ i.children = C;
729
+ }
730
+ return je(e.type, c, s, f, v, g, i);
731
+ }
732
+ function re(e) {
733
+ return typeof e == "object" && e !== null && e.$$typeof === T;
734
+ }
735
+ var Qe = ".", Wt = ":";
736
+ function Vt(e) {
737
+ var t = /[=:]/g, n = {
738
+ "=": "=0",
739
+ ":": "=2"
740
+ }, a = e.replace(t, function(i) {
741
+ return n[i];
742
+ });
743
+ return "$" + a;
744
+ }
745
+ var Xe = !1, Yt = /\/+/g;
746
+ function Je(e) {
747
+ return e.replace(Yt, "$&/");
748
+ }
749
+ function $e(e, t) {
750
+ return typeof e == "object" && e !== null && e.key != null ? (be(e.key), Vt("" + e.key)) : t.toString(36);
751
+ }
752
+ function _e(e, t, n, a, i) {
753
+ var c = typeof e;
754
+ (c === "undefined" || c === "boolean") && (e = null);
755
+ var s = !1;
756
+ if (e === null)
757
+ s = !0;
758
+ else
759
+ switch (c) {
760
+ case "string":
761
+ case "number":
762
+ s = !0;
763
+ break;
764
+ case "object":
765
+ switch (e.$$typeof) {
766
+ case T:
767
+ case $:
768
+ s = !0;
769
+ }
770
+ }
771
+ if (s) {
772
+ var f = e, v = i(f), g = a === "" ? Qe + $e(f, 0) : a;
773
+ if (ge(v)) {
774
+ var _ = "";
775
+ g != null && (_ = Je(g) + "/"), _e(v, t, _, "", function(xr) {
776
+ return xr;
777
+ });
778
+ } else v != null && (re(v) && (v.key && (!f || f.key !== v.key) && be(v.key), v = Ut(
779
+ v,
780
+ // Keep both the (mapped) and old keys if they differ, just as
781
+ // traverseAllChildren used to do for objects as children
782
+ n + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
783
+ (v.key && (!f || f.key !== v.key) ? (
784
+ // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
785
+ // eslint-disable-next-line react-internal/safe-string-coercion
786
+ Je("" + v.key) + "/"
787
+ ) : "") + g
788
+ )), t.push(v));
789
+ return 1;
790
+ }
791
+ var E, C, k = 0, A = a === "" ? Qe : a + Wt;
792
+ if (ge(e))
793
+ for (var Oe = 0; Oe < e.length; Oe++)
794
+ E = e[Oe], C = A + $e(E, Oe), k += _e(E, t, n, C, i);
795
+ else {
796
+ var Ve = J(e);
797
+ if (typeof Ve == "function") {
798
+ var Rt = e;
799
+ Ve === Rt.entries && (Xe || q("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Xe = !0);
800
+ for (var $r = Ve.call(Rt), Ct, Dr = 0; !(Ct = $r.next()).done; )
801
+ E = Ct.value, C = A + $e(E, Dr++), k += _e(E, t, n, C, i);
802
+ } else if (c === "object") {
803
+ var St = String(e);
804
+ throw new Error("Objects are not valid as a React child (found: " + (St === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : St) + "). If you meant to render a collection of children, use an array instead.");
805
+ }
806
+ }
807
+ return k;
808
+ }
809
+ function Ee(e, t, n) {
810
+ if (e == null)
811
+ return e;
812
+ var a = [], i = 0;
813
+ return _e(e, a, "", "", function(c) {
814
+ return t.call(n, c, i++);
815
+ }), a;
816
+ }
817
+ function zt(e) {
818
+ var t = 0;
819
+ return Ee(e, function() {
820
+ t++;
821
+ }), t;
822
+ }
823
+ function Bt(e, t, n) {
824
+ Ee(e, function() {
825
+ t.apply(this, arguments);
826
+ }, n);
827
+ }
828
+ function Ht(e) {
829
+ return Ee(e, function(t) {
830
+ return t;
831
+ }) || [];
832
+ }
833
+ function qt(e) {
834
+ if (!re(e))
835
+ throw new Error("React.Children.only expected to receive a single React element child.");
836
+ return e;
837
+ }
838
+ function Gt(e) {
839
+ var t = {
840
+ $$typeof: W,
841
+ // As a workaround to support multiple concurrent renderers, we categorize
842
+ // some renderers as primary and others as secondary. We only expect
843
+ // there to be two concurrent renderers at most: React Native (primary) and
844
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
845
+ // Secondary renderers store their context values on separate fields.
846
+ _currentValue: e,
847
+ _currentValue2: e,
848
+ // Used to track how many concurrent renderers this context currently
849
+ // supports within in a single renderer. Such as parallel server rendering.
850
+ _threadCount: 0,
851
+ // These are circular
852
+ Provider: null,
853
+ Consumer: null,
854
+ // Add these to use same hidden class in VM as ServerContext
855
+ _defaultValue: null,
856
+ _globalName: null
857
+ };
858
+ t.Provider = {
859
+ $$typeof: B,
860
+ _context: t
861
+ };
862
+ var n = !1, a = !1, i = !1;
863
+ {
864
+ var c = {
865
+ $$typeof: W,
866
+ _context: t
867
+ };
868
+ Object.defineProperties(c, {
869
+ Provider: {
870
+ get: function() {
871
+ return a || (a = !0, l("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), t.Provider;
872
+ },
873
+ set: function(s) {
874
+ t.Provider = s;
875
+ }
876
+ },
877
+ _currentValue: {
878
+ get: function() {
879
+ return t._currentValue;
880
+ },
881
+ set: function(s) {
882
+ t._currentValue = s;
883
+ }
884
+ },
885
+ _currentValue2: {
886
+ get: function() {
887
+ return t._currentValue2;
888
+ },
889
+ set: function(s) {
890
+ t._currentValue2 = s;
891
+ }
892
+ },
893
+ _threadCount: {
894
+ get: function() {
895
+ return t._threadCount;
896
+ },
897
+ set: function(s) {
898
+ t._threadCount = s;
899
+ }
900
+ },
901
+ Consumer: {
902
+ get: function() {
903
+ return n || (n = !0, l("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), t.Consumer;
904
+ }
905
+ },
906
+ displayName: {
907
+ get: function() {
908
+ return t.displayName;
909
+ },
910
+ set: function(s) {
911
+ i || (q("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", s), i = !0);
912
+ }
913
+ }
914
+ }), t.Consumer = c;
915
+ }
916
+ return t._currentRenderer = null, t._currentRenderer2 = null, t;
917
+ }
918
+ var ce = -1, De = 0, Ze = 1, Kt = 2;
919
+ function Qt(e) {
920
+ if (e._status === ce) {
921
+ var t = e._result, n = t();
922
+ if (n.then(function(c) {
923
+ if (e._status === De || e._status === ce) {
924
+ var s = e;
925
+ s._status = Ze, s._result = c;
926
+ }
927
+ }, function(c) {
928
+ if (e._status === De || e._status === ce) {
929
+ var s = e;
930
+ s._status = Kt, s._result = c;
931
+ }
932
+ }), e._status === ce) {
933
+ var a = e;
934
+ a._status = De, a._result = n;
935
+ }
936
+ }
937
+ if (e._status === Ze) {
938
+ var i = e._result;
939
+ return i === void 0 && l(`lazy: Expected the result of a dynamic import() call. Instead received: %s
940
+
941
+ Your code should look like:
942
+ const MyComponent = lazy(() => import('./MyComponent'))
943
+
944
+ Did you accidentally put curly braces around the import?`, i), "default" in i || l(`lazy: Expected the result of a dynamic import() call. Instead received: %s
945
+
946
+ Your code should look like:
947
+ const MyComponent = lazy(() => import('./MyComponent'))`, i), i.default;
948
+ } else
949
+ throw e._result;
950
+ }
951
+ function Xt(e) {
952
+ var t = {
953
+ // We use these fields to store the result.
954
+ _status: ce,
955
+ _result: e
956
+ }, n = {
957
+ $$typeof: K,
958
+ _payload: t,
959
+ _init: Qt
960
+ };
961
+ {
962
+ var a, i;
963
+ Object.defineProperties(n, {
964
+ defaultProps: {
965
+ configurable: !0,
966
+ get: function() {
967
+ return a;
968
+ },
969
+ set: function(c) {
970
+ l("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), a = c, Object.defineProperty(n, "defaultProps", {
971
+ enumerable: !0
972
+ });
973
+ }
974
+ },
975
+ propTypes: {
976
+ configurable: !0,
977
+ get: function() {
978
+ return i;
979
+ },
980
+ set: function(c) {
981
+ l("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), i = c, Object.defineProperty(n, "propTypes", {
982
+ enumerable: !0
983
+ });
984
+ }
985
+ }
986
+ });
987
+ }
988
+ return n;
989
+ }
990
+ function Jt(e) {
991
+ e != null && e.$$typeof === V ? l("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? l("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && l("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && l("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
992
+ var t = {
993
+ $$typeof: N,
994
+ render: e
995
+ };
996
+ {
997
+ var n;
998
+ Object.defineProperty(t, "displayName", {
999
+ enumerable: !1,
1000
+ configurable: !0,
1001
+ get: function() {
1002
+ return n;
1003
+ },
1004
+ set: function(a) {
1005
+ n = a, !e.name && !e.displayName && (e.displayName = a);
1006
+ }
1007
+ });
1008
+ }
1009
+ return t;
1010
+ }
1011
+ var et;
1012
+ et = Symbol.for("react.module.reference");
1013
+ function tt(e) {
1014
+ return !!(typeof e == "string" || typeof e == "function" || e === L || e === M || ee || e === F || e === D || e === oe || ue || e === pe || ie || Ae || he || typeof e == "object" && e !== null && (e.$$typeof === K || e.$$typeof === V || e.$$typeof === B || e.$$typeof === W || e.$$typeof === N || // This needs to include all possible module reference object
1015
+ // types supported by any Flight configuration anywhere since
1016
+ // we don't know which Flight build this will end up being used
1017
+ // with.
1018
+ e.$$typeof === et || e.getModuleId !== void 0));
1019
+ }
1020
+ function Zt(e, t) {
1021
+ tt(e) || l("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
1022
+ var n = {
1023
+ $$typeof: V,
1024
+ type: e,
1025
+ compare: t === void 0 ? null : t
1026
+ };
1027
+ {
1028
+ var a;
1029
+ Object.defineProperty(n, "displayName", {
1030
+ enumerable: !1,
1031
+ configurable: !0,
1032
+ get: function() {
1033
+ return a;
1034
+ },
1035
+ set: function(i) {
1036
+ a = i, !e.name && !e.displayName && (e.displayName = i);
1037
+ }
1038
+ });
1039
+ }
1040
+ return n;
1041
+ }
1042
+ function j() {
1043
+ var e = Z.current;
1044
+ return e === null && l(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1045
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
1046
+ 2. You might be breaking the Rules of Hooks
1047
+ 3. You might have more than one copy of React in the same app
1048
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
1049
+ }
1050
+ function er(e) {
1051
+ var t = j();
1052
+ if (e._context !== void 0) {
1053
+ var n = e._context;
1054
+ n.Consumer === e ? l("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : n.Provider === e && l("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1055
+ }
1056
+ return t.useContext(e);
1057
+ }
1058
+ function tr(e) {
1059
+ var t = j();
1060
+ return t.useState(e);
1061
+ }
1062
+ function rr(e, t, n) {
1063
+ var a = j();
1064
+ return a.useReducer(e, t, n);
1065
+ }
1066
+ function nr(e) {
1067
+ var t = j();
1068
+ return t.useRef(e);
1069
+ }
1070
+ function ar(e, t) {
1071
+ var n = j();
1072
+ return n.useEffect(e, t);
1073
+ }
1074
+ function or(e, t) {
1075
+ var n = j();
1076
+ return n.useInsertionEffect(e, t);
1077
+ }
1078
+ function ir(e, t) {
1079
+ var n = j();
1080
+ return n.useLayoutEffect(e, t);
1081
+ }
1082
+ function ur(e, t) {
1083
+ var n = j();
1084
+ return n.useCallback(e, t);
1085
+ }
1086
+ function sr(e, t) {
1087
+ var n = j();
1088
+ return n.useMemo(e, t);
1089
+ }
1090
+ function cr(e, t, n) {
1091
+ var a = j();
1092
+ return a.useImperativeHandle(e, t, n);
1093
+ }
1094
+ function lr(e, t) {
1095
+ {
1096
+ var n = j();
1097
+ return n.useDebugValue(e, t);
1098
+ }
1099
+ }
1100
+ function fr() {
1101
+ var e = j();
1102
+ return e.useTransition();
1103
+ }
1104
+ function dr(e) {
1105
+ var t = j();
1106
+ return t.useDeferredValue(e);
1107
+ }
1108
+ function pr() {
1109
+ var e = j();
1110
+ return e.useId();
1111
+ }
1112
+ function vr(e, t, n) {
1113
+ var a = j();
1114
+ return a.useSyncExternalStore(e, t, n);
1115
+ }
1116
+ var le = 0, rt, nt, at, ot, it, ut, st;
1117
+ function ct() {
1118
+ }
1119
+ ct.__reactDisabledLog = !0;
1120
+ function yr() {
1121
+ {
1122
+ if (le === 0) {
1123
+ rt = console.log, nt = console.info, at = console.warn, ot = console.error, it = console.group, ut = console.groupCollapsed, st = console.groupEnd;
1124
+ var e = {
1125
+ configurable: !0,
1126
+ enumerable: !0,
1127
+ value: ct,
1128
+ writable: !0
1129
+ };
1130
+ Object.defineProperties(console, {
1131
+ info: e,
1132
+ log: e,
1133
+ warn: e,
1134
+ error: e,
1135
+ group: e,
1136
+ groupCollapsed: e,
1137
+ groupEnd: e
1138
+ });
1139
+ }
1140
+ le++;
1141
+ }
1142
+ }
1143
+ function hr() {
1144
+ {
1145
+ if (le--, le === 0) {
1146
+ var e = {
1147
+ configurable: !0,
1148
+ enumerable: !0,
1149
+ writable: !0
1150
+ };
1151
+ Object.defineProperties(console, {
1152
+ log: o({}, e, {
1153
+ value: rt
1154
+ }),
1155
+ info: o({}, e, {
1156
+ value: nt
1157
+ }),
1158
+ warn: o({}, e, {
1159
+ value: at
1160
+ }),
1161
+ error: o({}, e, {
1162
+ value: ot
1163
+ }),
1164
+ group: o({}, e, {
1165
+ value: it
1166
+ }),
1167
+ groupCollapsed: o({}, e, {
1168
+ value: ut
1169
+ }),
1170
+ groupEnd: o({}, e, {
1171
+ value: st
1172
+ })
1173
+ });
1174
+ }
1175
+ le < 0 && l("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1176
+ }
1177
+ }
1178
+ var xe = U.ReactCurrentDispatcher, Le;
1179
+ function we(e, t, n) {
1180
+ {
1181
+ if (Le === void 0)
1182
+ try {
1183
+ throw Error();
1184
+ } catch (i) {
1185
+ var a = i.stack.trim().match(/\n( *(at )?)/);
1186
+ Le = a && a[1] || "";
1187
+ }
1188
+ return `
1189
+ ` + Le + e;
1190
+ }
1191
+ }
1192
+ var Fe = !1, Re;
1193
+ {
1194
+ var mr = typeof WeakMap == "function" ? WeakMap : Map;
1195
+ Re = new mr();
1196
+ }
1197
+ function lt(e, t) {
1198
+ if (!e || Fe)
1199
+ return "";
1200
+ {
1201
+ var n = Re.get(e);
1202
+ if (n !== void 0)
1203
+ return n;
1204
+ }
1205
+ var a;
1206
+ Fe = !0;
1207
+ var i = Error.prepareStackTrace;
1208
+ Error.prepareStackTrace = void 0;
1209
+ var c;
1210
+ c = xe.current, xe.current = null, yr();
1211
+ try {
1212
+ if (t) {
1213
+ var s = function() {
1214
+ throw Error();
1215
+ };
1216
+ if (Object.defineProperty(s.prototype, "props", {
1217
+ set: function() {
1218
+ throw Error();
1219
+ }
1220
+ }), typeof Reflect == "object" && Reflect.construct) {
1221
+ try {
1222
+ Reflect.construct(s, []);
1223
+ } catch (A) {
1224
+ a = A;
1225
+ }
1226
+ Reflect.construct(e, [], s);
1227
+ } else {
1228
+ try {
1229
+ s.call();
1230
+ } catch (A) {
1231
+ a = A;
1232
+ }
1233
+ e.call(s.prototype);
1234
+ }
1235
+ } else {
1236
+ try {
1237
+ throw Error();
1238
+ } catch (A) {
1239
+ a = A;
1240
+ }
1241
+ e();
1242
+ }
1243
+ } catch (A) {
1244
+ if (A && a && typeof A.stack == "string") {
1245
+ for (var f = A.stack.split(`
1246
+ `), v = a.stack.split(`
1247
+ `), g = f.length - 1, _ = v.length - 1; g >= 1 && _ >= 0 && f[g] !== v[_]; )
1248
+ _--;
1249
+ for (; g >= 1 && _ >= 0; g--, _--)
1250
+ if (f[g] !== v[_]) {
1251
+ if (g !== 1 || _ !== 1)
1252
+ do
1253
+ if (g--, _--, _ < 0 || f[g] !== v[_]) {
1254
+ var E = `
1255
+ ` + f[g].replace(" at new ", " at ");
1256
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && Re.set(e, E), E;
1257
+ }
1258
+ while (g >= 1 && _ >= 0);
1259
+ break;
1260
+ }
1261
+ }
1262
+ } finally {
1263
+ Fe = !1, xe.current = c, hr(), Error.prepareStackTrace = i;
1264
+ }
1265
+ var C = e ? e.displayName || e.name : "", k = C ? we(C) : "";
1266
+ return typeof e == "function" && Re.set(e, k), k;
1267
+ }
1268
+ function gr(e, t, n) {
1269
+ return lt(e, !1);
1270
+ }
1271
+ function br(e) {
1272
+ var t = e.prototype;
1273
+ return !!(t && t.isReactComponent);
1274
+ }
1275
+ function Ce(e, t, n) {
1276
+ if (e == null)
1277
+ return "";
1278
+ if (typeof e == "function")
1279
+ return lt(e, br(e));
1280
+ if (typeof e == "string")
1281
+ return we(e);
1282
+ switch (e) {
1283
+ case D:
1284
+ return we("Suspense");
1285
+ case oe:
1286
+ return we("SuspenseList");
1287
+ }
1288
+ if (typeof e == "object")
1289
+ switch (e.$$typeof) {
1290
+ case N:
1291
+ return gr(e.render);
1292
+ case V:
1293
+ return Ce(e.type, t, n);
1294
+ case K: {
1295
+ var a = e, i = a._payload, c = a._init;
1296
+ try {
1297
+ return Ce(c(i), t, n);
1298
+ } catch {
1299
+ }
1300
+ }
1301
+ }
1302
+ return "";
1303
+ }
1304
+ var ft = {}, dt = U.ReactDebugCurrentFrame;
1305
+ function Se(e) {
1306
+ if (e) {
1307
+ var t = e._owner, n = Ce(e.type, e._source, t ? t.type : null);
1308
+ dt.setExtraStackFrame(n);
1309
+ } else
1310
+ dt.setExtraStackFrame(null);
1311
+ }
1312
+ function _r(e, t, n, a, i) {
1313
+ {
1314
+ var c = Function.call.bind(se);
1315
+ for (var s in e)
1316
+ if (c(e, s)) {
1317
+ var f = void 0;
1318
+ try {
1319
+ if (typeof e[s] != "function") {
1320
+ var v = Error((a || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1321
+ throw v.name = "Invariant Violation", v;
1322
+ }
1323
+ f = e[s](t, s, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1324
+ } catch (g) {
1325
+ f = g;
1326
+ }
1327
+ f && !(f instanceof Error) && (Se(i), l("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, s, typeof f), Se(null)), f instanceof Error && !(f.message in ft) && (ft[f.message] = !0, Se(i), l("Failed %s type: %s", n, f.message), Se(null));
1328
+ }
1329
+ }
1330
+ }
1331
+ function ne(e) {
1332
+ if (e) {
1333
+ var t = e._owner, n = Ce(e.type, e._source, t ? t.type : null);
1334
+ ye(n);
1335
+ } else
1336
+ ye(null);
1337
+ }
1338
+ var Me;
1339
+ Me = !1;
1340
+ function pt() {
1341
+ if (x.current) {
1342
+ var e = G(x.current.type);
1343
+ if (e)
1344
+ return `
1345
+
1346
+ Check the render method of \`` + e + "`.";
1347
+ }
1348
+ return "";
1349
+ }
1350
+ function Er(e) {
1351
+ if (e !== void 0) {
1352
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
1353
+ return `
1354
+
1355
+ Check your code at ` + t + ":" + n + ".";
1356
+ }
1357
+ return "";
1358
+ }
1359
+ function wr(e) {
1360
+ return e != null ? Er(e.__source) : "";
1361
+ }
1362
+ var vt = {};
1363
+ function Rr(e) {
1364
+ var t = pt();
1365
+ if (!t) {
1366
+ var n = typeof e == "string" ? e : e.displayName || e.name;
1367
+ n && (t = `
1368
+
1369
+ Check the top-level render call using <` + n + ">.");
1370
+ }
1371
+ return t;
1372
+ }
1373
+ function yt(e, t) {
1374
+ if (!(!e._store || e._store.validated || e.key != null)) {
1375
+ e._store.validated = !0;
1376
+ var n = Rr(t);
1377
+ if (!vt[n]) {
1378
+ vt[n] = !0;
1379
+ var a = "";
1380
+ e && e._owner && e._owner !== x.current && (a = " It was passed a child from " + G(e._owner.type) + "."), ne(e), l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), ne(null);
1381
+ }
1382
+ }
1383
+ }
1384
+ function ht(e, t) {
1385
+ if (typeof e == "object") {
1386
+ if (ge(e))
1387
+ for (var n = 0; n < e.length; n++) {
1388
+ var a = e[n];
1389
+ re(a) && yt(a, t);
1390
+ }
1391
+ else if (re(e))
1392
+ e._store && (e._store.validated = !0);
1393
+ else if (e) {
1394
+ var i = J(e);
1395
+ if (typeof i == "function" && i !== e.entries)
1396
+ for (var c = i.call(e), s; !(s = c.next()).done; )
1397
+ re(s.value) && yt(s.value, t);
1398
+ }
1399
+ }
1400
+ }
1401
+ function mt(e) {
1402
+ {
1403
+ var t = e.type;
1404
+ if (t == null || typeof t == "string")
1405
+ return;
1406
+ var n;
1407
+ if (typeof t == "function")
1408
+ n = t.propTypes;
1409
+ else if (typeof t == "object" && (t.$$typeof === N || // Note: Memo only checks outer props here.
1410
+ // Inner props are checked in the reconciler.
1411
+ t.$$typeof === V))
1412
+ n = t.propTypes;
1413
+ else
1414
+ return;
1415
+ if (n) {
1416
+ var a = G(t);
1417
+ _r(n, e.props, "prop", a, e);
1418
+ } else if (t.PropTypes !== void 0 && !Me) {
1419
+ Me = !0;
1420
+ var i = G(t);
1421
+ l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
1422
+ }
1423
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1424
+ }
1425
+ }
1426
+ function Cr(e) {
1427
+ {
1428
+ for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
1429
+ var a = t[n];
1430
+ if (a !== "children" && a !== "key") {
1431
+ ne(e), l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), ne(null);
1432
+ break;
1433
+ }
1434
+ }
1435
+ e.ref !== null && (ne(e), l("Invalid attribute `ref` supplied to `React.Fragment`."), ne(null));
1436
+ }
1437
+ }
1438
+ function gt(e, t, n) {
1439
+ var a = tt(e);
1440
+ if (!a) {
1441
+ var i = "";
1442
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1443
+ var c = wr(t);
1444
+ c ? i += c : i += pt();
1445
+ var s;
1446
+ e === null ? s = "null" : ge(e) ? s = "array" : e !== void 0 && e.$$typeof === T ? (s = "<" + (G(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, l("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, i);
1447
+ }
1448
+ var f = Mt.apply(this, arguments);
1449
+ if (f == null)
1450
+ return f;
1451
+ if (a)
1452
+ for (var v = 2; v < arguments.length; v++)
1453
+ ht(arguments[v], e);
1454
+ return e === L ? Cr(f) : mt(f), f;
1455
+ }
1456
+ var bt = !1;
1457
+ function Sr(e) {
1458
+ var t = gt.bind(null, e);
1459
+ return t.type = e, bt || (bt = !0, q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(t, "type", {
1460
+ enumerable: !1,
1461
+ get: function() {
1462
+ return q("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
1463
+ value: e
1464
+ }), e;
1465
+ }
1466
+ }), t;
1467
+ }
1468
+ function Tr(e, t, n) {
1469
+ for (var a = Nt.apply(this, arguments), i = 2; i < arguments.length; i++)
1470
+ ht(arguments[i], a.type);
1471
+ return mt(a), a;
1472
+ }
1473
+ function kr(e, t) {
1474
+ var n = z.transition;
1475
+ z.transition = {};
1476
+ var a = z.transition;
1477
+ z.transition._updatedFibers = /* @__PURE__ */ new Set();
1478
+ try {
1479
+ e();
1480
+ } finally {
1481
+ if (z.transition = n, n === null && a._updatedFibers) {
1482
+ var i = a._updatedFibers.size;
1483
+ i > 10 && q("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), a._updatedFibers.clear();
1484
+ }
1485
+ }
1486
+ }
1487
+ var _t = !1, Te = null;
1488
+ function Or(e) {
1489
+ if (Te === null)
1490
+ try {
1491
+ var t = ("require" + Math.random()).slice(0, 7), n = O && O[t];
1492
+ Te = n.call(O, "timers").setImmediate;
1493
+ } catch {
1494
+ Te = function(i) {
1495
+ _t === !1 && (_t = !0, typeof MessageChannel > "u" && l("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
1496
+ var c = new MessageChannel();
1497
+ c.port1.onmessage = i, c.port2.postMessage(void 0);
1498
+ };
1499
+ }
1500
+ return Te(e);
1501
+ }
1502
+ var ae = 0, Et = !1;
1503
+ function wt(e) {
1504
+ {
1505
+ var t = ae;
1506
+ ae++, P.current === null && (P.current = []);
1507
+ var n = P.isBatchingLegacy, a;
1508
+ try {
1509
+ if (P.isBatchingLegacy = !0, a = e(), !n && P.didScheduleLegacyUpdate) {
1510
+ var i = P.current;
1511
+ i !== null && (P.didScheduleLegacyUpdate = !1, We(i));
1512
+ }
1513
+ } catch (C) {
1514
+ throw ke(t), C;
1515
+ } finally {
1516
+ P.isBatchingLegacy = n;
1517
+ }
1518
+ if (a !== null && typeof a == "object" && typeof a.then == "function") {
1519
+ var c = a, s = !1, f = {
1520
+ then: function(C, k) {
1521
+ s = !0, c.then(function(A) {
1522
+ ke(t), ae === 0 ? Ue(A, C, k) : C(A);
1523
+ }, function(A) {
1524
+ ke(t), k(A);
1525
+ });
1526
+ }
1527
+ };
1528
+ return !Et && typeof Promise < "u" && Promise.resolve().then(function() {
1529
+ }).then(function() {
1530
+ s || (Et = !0, l("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
1531
+ }), f;
1532
+ } else {
1533
+ var v = a;
1534
+ if (ke(t), ae === 0) {
1535
+ var g = P.current;
1536
+ g !== null && (We(g), P.current = null);
1537
+ var _ = {
1538
+ then: function(C, k) {
1539
+ P.current === null ? (P.current = [], Ue(v, C, k)) : C(v);
1540
+ }
1541
+ };
1542
+ return _;
1543
+ } else {
1544
+ var E = {
1545
+ then: function(C, k) {
1546
+ C(v);
1547
+ }
1548
+ };
1549
+ return E;
1550
+ }
1551
+ }
1552
+ }
1553
+ }
1554
+ function ke(e) {
1555
+ e !== ae - 1 && l("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), ae = e;
1556
+ }
1557
+ function Ue(e, t, n) {
1558
+ {
1559
+ var a = P.current;
1560
+ if (a !== null)
1561
+ try {
1562
+ We(a), Or(function() {
1563
+ a.length === 0 ? (P.current = null, t(e)) : Ue(e, t, n);
1564
+ });
1565
+ } catch (i) {
1566
+ n(i);
1567
+ }
1568
+ else
1569
+ t(e);
1570
+ }
1571
+ }
1572
+ var Ne = !1;
1573
+ function We(e) {
1574
+ if (!Ne) {
1575
+ Ne = !0;
1576
+ var t = 0;
1577
+ try {
1578
+ for (; t < e.length; t++) {
1579
+ var n = e[t];
1580
+ do
1581
+ n = n(!0);
1582
+ while (n !== null);
1583
+ }
1584
+ e.length = 0;
1585
+ } catch (a) {
1586
+ throw e = e.slice(t + 1), a;
1587
+ } finally {
1588
+ Ne = !1;
1589
+ }
1590
+ }
1591
+ }
1592
+ var Pr = gt, Ar = Tr, Ir = Sr, jr = {
1593
+ map: Ee,
1594
+ forEach: Bt,
1595
+ count: zt,
1596
+ toArray: Ht,
1597
+ only: qt
1598
+ };
1599
+ u.Children = jr, u.Component = y, u.Fragment = L, u.Profiler = M, u.PureComponent = b, u.StrictMode = F, u.Suspense = D, u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = U, u.act = wt, u.cloneElement = Ar, u.createContext = Gt, u.createElement = Pr, u.createFactory = Ir, u.createRef = At, u.forwardRef = Jt, u.isValidElement = re, u.lazy = Xt, u.memo = Zt, u.startTransition = kr, u.unstable_act = wt, u.useCallback = ur, u.useContext = er, u.useDebugValue = lr, u.useDeferredValue = dr, u.useEffect = ar, u.useId = pr, u.useImperativeHandle = cr, u.useInsertionEffect = or, u.useLayoutEffect = ir, u.useMemo = sr, u.useReducer = rr, u.useRef = nr, u.useState = tr, u.useSyncExternalStore = vr, u.useTransition = fr, u.version = h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1600
+ }();
1601
+ }(de, de.exports)), de.exports;
1602
+ }
1603
+ var Ot;
1604
+ function Wr() {
1605
+ return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Pe.exports = Ur() : Pe.exports = Nr()), Pe.exports;
1606
+ }
1607
+ var Pt = Wr();
1608
+ const Yr = ({
1609
+ app: O,
1610
+ recipient: u,
1611
+ walletProvider: h,
1612
+ baseUrl: T
1613
+ }) => {
1614
+ const $ = Pt.useMemo(() => new Mr({
1615
+ app: O,
1616
+ recipient: u,
1617
+ walletProvider: h,
1618
+ baseUrl: T
1619
+ }), [O, u, h, T]);
1620
+ return Pt.useEffect(() => ($.initialize(), () => {
1621
+ $.destroy();
1622
+ }), [$]), {
1623
+ openGlideDeposit: $.open
1624
+ };
1625
+ };
1626
+ export {
1627
+ Mr as GlideDeposit,
1628
+ Yr as useGlideDeposit
1629
+ };