@dashx/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/README.md +70 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.es.js +2147 -0
- package/dist/index.umd.js +247 -0
- package/package.json +49 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,2147 @@
|
|
|
1
|
+
import Q from "react";
|
|
2
|
+
function jt(s) {
|
|
3
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
4
|
+
}
|
|
5
|
+
function $t(s) {
|
|
6
|
+
if (s.__esModule)
|
|
7
|
+
return s;
|
|
8
|
+
var o = s.default;
|
|
9
|
+
if (typeof o == "function") {
|
|
10
|
+
var r = function t() {
|
|
11
|
+
return this instanceof t ? Reflect.construct(o, arguments, this.constructor) : o.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
r.prototype = o.prototype;
|
|
14
|
+
} else
|
|
15
|
+
r = {};
|
|
16
|
+
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(s).forEach(function(t) {
|
|
17
|
+
var a = Object.getOwnPropertyDescriptor(s, t);
|
|
18
|
+
Object.defineProperty(r, t, a.get ? a : {
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
get: function() {
|
|
21
|
+
return s[t];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}), r;
|
|
25
|
+
}
|
|
26
|
+
var Ue = { exports: {} }, ve = {};
|
|
27
|
+
/**
|
|
28
|
+
* @license React
|
|
29
|
+
* react-jsx-runtime.production.min.js
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
var Ze;
|
|
37
|
+
function xt() {
|
|
38
|
+
if (Ze)
|
|
39
|
+
return ve;
|
|
40
|
+
Ze = 1;
|
|
41
|
+
var s = Q, o = Symbol.for("react.element"), r = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, a = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
42
|
+
function p(c, l, n) {
|
|
43
|
+
var m, b = {}, R = null, O = null;
|
|
44
|
+
n !== void 0 && (R = "" + n), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (O = l.ref);
|
|
45
|
+
for (m in l)
|
|
46
|
+
t.call(l, m) && !d.hasOwnProperty(m) && (b[m] = l[m]);
|
|
47
|
+
if (c && c.defaultProps)
|
|
48
|
+
for (m in l = c.defaultProps, l)
|
|
49
|
+
b[m] === void 0 && (b[m] = l[m]);
|
|
50
|
+
return { $$typeof: o, type: c, key: R, ref: O, props: b, _owner: a.current };
|
|
51
|
+
}
|
|
52
|
+
return ve.Fragment = r, ve.jsx = p, ve.jsxs = p, ve;
|
|
53
|
+
}
|
|
54
|
+
var me = {};
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* react-jsx-runtime.development.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/
|
|
64
|
+
var Qe;
|
|
65
|
+
function Ut() {
|
|
66
|
+
return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
67
|
+
var s = Q, o = Symbol.for("react.element"), r = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), n = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), z = Symbol.iterator, Y = "@@iterator";
|
|
68
|
+
function Z(e) {
|
|
69
|
+
if (e === null || typeof e != "object")
|
|
70
|
+
return null;
|
|
71
|
+
var u = z && e[z] || e[Y];
|
|
72
|
+
return typeof u == "function" ? u : null;
|
|
73
|
+
}
|
|
74
|
+
var F = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
75
|
+
function I(e) {
|
|
76
|
+
{
|
|
77
|
+
for (var u = arguments.length, h = new Array(u > 1 ? u - 1 : 0), w = 1; w < u; w++)
|
|
78
|
+
h[w - 1] = arguments[w];
|
|
79
|
+
ee("error", e, h);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function ee(e, u, h) {
|
|
83
|
+
{
|
|
84
|
+
var w = F.ReactDebugCurrentFrame, P = w.getStackAddendum();
|
|
85
|
+
P !== "" && (u += "%s", h = h.concat([P]));
|
|
86
|
+
var A = h.map(function(E) {
|
|
87
|
+
return String(E);
|
|
88
|
+
});
|
|
89
|
+
A.unshift("Warning: " + u), Function.prototype.apply.call(console[e], console, A);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var ce = !1, X = !1, ae = !1, re = !1, te = !1, ne;
|
|
93
|
+
ne = Symbol.for("react.module.reference");
|
|
94
|
+
function f(e) {
|
|
95
|
+
return !!(typeof e == "string" || typeof e == "function" || e === t || e === d || te || e === a || e === n || e === m || re || e === O || ce || X || ae || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === b || e.$$typeof === p || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
96
|
+
// types supported by any Flight configuration anywhere since
|
|
97
|
+
// we don't know which Flight build this will end up being used
|
|
98
|
+
// with.
|
|
99
|
+
e.$$typeof === ne || e.getModuleId !== void 0));
|
|
100
|
+
}
|
|
101
|
+
function i(e, u, h) {
|
|
102
|
+
var w = e.displayName;
|
|
103
|
+
if (w)
|
|
104
|
+
return w;
|
|
105
|
+
var P = u.displayName || u.name || "";
|
|
106
|
+
return P !== "" ? h + "(" + P + ")" : h;
|
|
107
|
+
}
|
|
108
|
+
function y(e) {
|
|
109
|
+
return e.displayName || "Context";
|
|
110
|
+
}
|
|
111
|
+
function g(e) {
|
|
112
|
+
if (e == null)
|
|
113
|
+
return null;
|
|
114
|
+
if (typeof e.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
115
|
+
return e.displayName || e.name || null;
|
|
116
|
+
if (typeof e == "string")
|
|
117
|
+
return e;
|
|
118
|
+
switch (e) {
|
|
119
|
+
case t:
|
|
120
|
+
return "Fragment";
|
|
121
|
+
case r:
|
|
122
|
+
return "Portal";
|
|
123
|
+
case d:
|
|
124
|
+
return "Profiler";
|
|
125
|
+
case a:
|
|
126
|
+
return "StrictMode";
|
|
127
|
+
case n:
|
|
128
|
+
return "Suspense";
|
|
129
|
+
case m:
|
|
130
|
+
return "SuspenseList";
|
|
131
|
+
}
|
|
132
|
+
if (typeof e == "object")
|
|
133
|
+
switch (e.$$typeof) {
|
|
134
|
+
case c:
|
|
135
|
+
var u = e;
|
|
136
|
+
return y(u) + ".Consumer";
|
|
137
|
+
case p:
|
|
138
|
+
var h = e;
|
|
139
|
+
return y(h._context) + ".Provider";
|
|
140
|
+
case l:
|
|
141
|
+
return i(e, e.render, "ForwardRef");
|
|
142
|
+
case b:
|
|
143
|
+
var w = e.displayName || null;
|
|
144
|
+
return w !== null ? w : g(e.type) || "Memo";
|
|
145
|
+
case R: {
|
|
146
|
+
var P = e, A = P._payload, E = P._init;
|
|
147
|
+
try {
|
|
148
|
+
return g(E(A));
|
|
149
|
+
} catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
var v = Object.assign, j = 0, U, H, K, T, q, V, le;
|
|
157
|
+
function fe() {
|
|
158
|
+
}
|
|
159
|
+
fe.__reactDisabledLog = !0;
|
|
160
|
+
function de() {
|
|
161
|
+
{
|
|
162
|
+
if (j === 0) {
|
|
163
|
+
U = console.log, H = console.info, K = console.warn, T = console.error, q = console.group, V = console.groupCollapsed, le = console.groupEnd;
|
|
164
|
+
var e = {
|
|
165
|
+
configurable: !0,
|
|
166
|
+
enumerable: !0,
|
|
167
|
+
value: fe,
|
|
168
|
+
writable: !0
|
|
169
|
+
};
|
|
170
|
+
Object.defineProperties(console, {
|
|
171
|
+
info: e,
|
|
172
|
+
log: e,
|
|
173
|
+
warn: e,
|
|
174
|
+
error: e,
|
|
175
|
+
group: e,
|
|
176
|
+
groupCollapsed: e,
|
|
177
|
+
groupEnd: e
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
j++;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function ie() {
|
|
184
|
+
{
|
|
185
|
+
if (j--, j === 0) {
|
|
186
|
+
var e = {
|
|
187
|
+
configurable: !0,
|
|
188
|
+
enumerable: !0,
|
|
189
|
+
writable: !0
|
|
190
|
+
};
|
|
191
|
+
Object.defineProperties(console, {
|
|
192
|
+
log: v({}, e, {
|
|
193
|
+
value: U
|
|
194
|
+
}),
|
|
195
|
+
info: v({}, e, {
|
|
196
|
+
value: H
|
|
197
|
+
}),
|
|
198
|
+
warn: v({}, e, {
|
|
199
|
+
value: K
|
|
200
|
+
}),
|
|
201
|
+
error: v({}, e, {
|
|
202
|
+
value: T
|
|
203
|
+
}),
|
|
204
|
+
group: v({}, e, {
|
|
205
|
+
value: q
|
|
206
|
+
}),
|
|
207
|
+
groupCollapsed: v({}, e, {
|
|
208
|
+
value: V
|
|
209
|
+
}),
|
|
210
|
+
groupEnd: v({}, e, {
|
|
211
|
+
value: le
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
j < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
var Re = F.ReactCurrentDispatcher, Ee;
|
|
219
|
+
function ge(e, u, h) {
|
|
220
|
+
{
|
|
221
|
+
if (Ee === void 0)
|
|
222
|
+
try {
|
|
223
|
+
throw Error();
|
|
224
|
+
} catch (P) {
|
|
225
|
+
var w = P.stack.trim().match(/\n( *(at )?)/);
|
|
226
|
+
Ee = w && w[1] || "";
|
|
227
|
+
}
|
|
228
|
+
return `
|
|
229
|
+
` + Ee + e;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
var _e = !1, we;
|
|
233
|
+
{
|
|
234
|
+
var ut = typeof WeakMap == "function" ? WeakMap : Map;
|
|
235
|
+
we = new ut();
|
|
236
|
+
}
|
|
237
|
+
function Fe(e, u) {
|
|
238
|
+
if (!e || _e)
|
|
239
|
+
return "";
|
|
240
|
+
{
|
|
241
|
+
var h = we.get(e);
|
|
242
|
+
if (h !== void 0)
|
|
243
|
+
return h;
|
|
244
|
+
}
|
|
245
|
+
var w;
|
|
246
|
+
_e = !0;
|
|
247
|
+
var P = Error.prepareStackTrace;
|
|
248
|
+
Error.prepareStackTrace = void 0;
|
|
249
|
+
var A;
|
|
250
|
+
A = Re.current, Re.current = null, de();
|
|
251
|
+
try {
|
|
252
|
+
if (u) {
|
|
253
|
+
var E = function() {
|
|
254
|
+
throw Error();
|
|
255
|
+
};
|
|
256
|
+
if (Object.defineProperty(E.prototype, "props", {
|
|
257
|
+
set: function() {
|
|
258
|
+
throw Error();
|
|
259
|
+
}
|
|
260
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
261
|
+
try {
|
|
262
|
+
Reflect.construct(E, []);
|
|
263
|
+
} catch (W) {
|
|
264
|
+
w = W;
|
|
265
|
+
}
|
|
266
|
+
Reflect.construct(e, [], E);
|
|
267
|
+
} else {
|
|
268
|
+
try {
|
|
269
|
+
E.call();
|
|
270
|
+
} catch (W) {
|
|
271
|
+
w = W;
|
|
272
|
+
}
|
|
273
|
+
e.call(E.prototype);
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
try {
|
|
277
|
+
throw Error();
|
|
278
|
+
} catch (W) {
|
|
279
|
+
w = W;
|
|
280
|
+
}
|
|
281
|
+
e();
|
|
282
|
+
}
|
|
283
|
+
} catch (W) {
|
|
284
|
+
if (W && w && typeof W.stack == "string") {
|
|
285
|
+
for (var C = W.stack.split(`
|
|
286
|
+
`), M = w.stack.split(`
|
|
287
|
+
`), $ = C.length - 1, x = M.length - 1; $ >= 1 && x >= 0 && C[$] !== M[x]; )
|
|
288
|
+
x--;
|
|
289
|
+
for (; $ >= 1 && x >= 0; $--, x--)
|
|
290
|
+
if (C[$] !== M[x]) {
|
|
291
|
+
if ($ !== 1 || x !== 1)
|
|
292
|
+
do
|
|
293
|
+
if ($--, x--, x < 0 || C[$] !== M[x]) {
|
|
294
|
+
var J = `
|
|
295
|
+
` + C[$].replace(" at new ", " at ");
|
|
296
|
+
return e.displayName && J.includes("<anonymous>") && (J = J.replace("<anonymous>", e.displayName)), typeof e == "function" && we.set(e, J), J;
|
|
297
|
+
}
|
|
298
|
+
while ($ >= 1 && x >= 0);
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} finally {
|
|
303
|
+
_e = !1, Re.current = A, ie(), Error.prepareStackTrace = P;
|
|
304
|
+
}
|
|
305
|
+
var se = e ? e.displayName || e.name : "", oe = se ? ge(se) : "";
|
|
306
|
+
return typeof e == "function" && we.set(e, oe), oe;
|
|
307
|
+
}
|
|
308
|
+
function st(e, u, h) {
|
|
309
|
+
return Fe(e, !1);
|
|
310
|
+
}
|
|
311
|
+
function ct(e) {
|
|
312
|
+
var u = e.prototype;
|
|
313
|
+
return !!(u && u.isReactComponent);
|
|
314
|
+
}
|
|
315
|
+
function be(e, u, h) {
|
|
316
|
+
if (e == null)
|
|
317
|
+
return "";
|
|
318
|
+
if (typeof e == "function")
|
|
319
|
+
return Fe(e, ct(e));
|
|
320
|
+
if (typeof e == "string")
|
|
321
|
+
return ge(e);
|
|
322
|
+
switch (e) {
|
|
323
|
+
case n:
|
|
324
|
+
return ge("Suspense");
|
|
325
|
+
case m:
|
|
326
|
+
return ge("SuspenseList");
|
|
327
|
+
}
|
|
328
|
+
if (typeof e == "object")
|
|
329
|
+
switch (e.$$typeof) {
|
|
330
|
+
case l:
|
|
331
|
+
return st(e.render);
|
|
332
|
+
case b:
|
|
333
|
+
return be(e.type, u, h);
|
|
334
|
+
case R: {
|
|
335
|
+
var w = e, P = w._payload, A = w._init;
|
|
336
|
+
try {
|
|
337
|
+
return be(A(P), u, h);
|
|
338
|
+
} catch {
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return "";
|
|
343
|
+
}
|
|
344
|
+
var pe = Object.prototype.hasOwnProperty, qe = {}, Me = F.ReactDebugCurrentFrame;
|
|
345
|
+
function Ce(e) {
|
|
346
|
+
if (e) {
|
|
347
|
+
var u = e._owner, h = be(e.type, e._source, u ? u.type : null);
|
|
348
|
+
Me.setExtraStackFrame(h);
|
|
349
|
+
} else
|
|
350
|
+
Me.setExtraStackFrame(null);
|
|
351
|
+
}
|
|
352
|
+
function lt(e, u, h, w, P) {
|
|
353
|
+
{
|
|
354
|
+
var A = Function.call.bind(pe);
|
|
355
|
+
for (var E in e)
|
|
356
|
+
if (A(e, E)) {
|
|
357
|
+
var C = void 0;
|
|
358
|
+
try {
|
|
359
|
+
if (typeof e[E] != "function") {
|
|
360
|
+
var M = Error((w || "React class") + ": " + h + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
361
|
+
throw M.name = "Invariant Violation", M;
|
|
362
|
+
}
|
|
363
|
+
C = e[E](u, E, w, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
364
|
+
} catch ($) {
|
|
365
|
+
C = $;
|
|
366
|
+
}
|
|
367
|
+
C && !(C instanceof Error) && (Ce(P), I("%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).", w || "React class", h, E, typeof C), Ce(null)), C instanceof Error && !(C.message in qe) && (qe[C.message] = !0, Ce(P), I("Failed %s type: %s", h, C.message), Ce(null));
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
var ft = Array.isArray;
|
|
372
|
+
function Te(e) {
|
|
373
|
+
return ft(e);
|
|
374
|
+
}
|
|
375
|
+
function dt(e) {
|
|
376
|
+
{
|
|
377
|
+
var u = typeof Symbol == "function" && Symbol.toStringTag, h = u && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
378
|
+
return h;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
function pt(e) {
|
|
382
|
+
try {
|
|
383
|
+
return Be(e), !1;
|
|
384
|
+
} catch {
|
|
385
|
+
return !0;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function Be(e) {
|
|
389
|
+
return "" + e;
|
|
390
|
+
}
|
|
391
|
+
function Ne(e) {
|
|
392
|
+
if (pt(e))
|
|
393
|
+
return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dt(e)), Be(e);
|
|
394
|
+
}
|
|
395
|
+
var he = F.ReactCurrentOwner, ht = {
|
|
396
|
+
key: !0,
|
|
397
|
+
ref: !0,
|
|
398
|
+
__self: !0,
|
|
399
|
+
__source: !0
|
|
400
|
+
}, He, We, Pe;
|
|
401
|
+
Pe = {};
|
|
402
|
+
function vt(e) {
|
|
403
|
+
if (pe.call(e, "ref")) {
|
|
404
|
+
var u = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
405
|
+
if (u && u.isReactWarning)
|
|
406
|
+
return !1;
|
|
407
|
+
}
|
|
408
|
+
return e.ref !== void 0;
|
|
409
|
+
}
|
|
410
|
+
function mt(e) {
|
|
411
|
+
if (pe.call(e, "key")) {
|
|
412
|
+
var u = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
413
|
+
if (u && u.isReactWarning)
|
|
414
|
+
return !1;
|
|
415
|
+
}
|
|
416
|
+
return e.key !== void 0;
|
|
417
|
+
}
|
|
418
|
+
function yt(e, u) {
|
|
419
|
+
if (typeof e.ref == "string" && he.current && u && he.current.stateNode !== u) {
|
|
420
|
+
var h = g(he.current.type);
|
|
421
|
+
Pe[h] || (I('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', g(he.current.type), e.ref), Pe[h] = !0);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
function gt(e, u) {
|
|
425
|
+
{
|
|
426
|
+
var h = function() {
|
|
427
|
+
He || (He = !0, I("%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)", u));
|
|
428
|
+
};
|
|
429
|
+
h.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
430
|
+
get: h,
|
|
431
|
+
configurable: !0
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function wt(e, u) {
|
|
436
|
+
{
|
|
437
|
+
var h = function() {
|
|
438
|
+
We || (We = !0, I("%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)", u));
|
|
439
|
+
};
|
|
440
|
+
h.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
441
|
+
get: h,
|
|
442
|
+
configurable: !0
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
var bt = function(e, u, h, w, P, A, E) {
|
|
447
|
+
var C = {
|
|
448
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
449
|
+
$$typeof: o,
|
|
450
|
+
// Built-in properties that belong on the element
|
|
451
|
+
type: e,
|
|
452
|
+
key: u,
|
|
453
|
+
ref: h,
|
|
454
|
+
props: E,
|
|
455
|
+
// Record the component responsible for creating this element.
|
|
456
|
+
_owner: A
|
|
457
|
+
};
|
|
458
|
+
return C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
459
|
+
configurable: !1,
|
|
460
|
+
enumerable: !1,
|
|
461
|
+
writable: !0,
|
|
462
|
+
value: !1
|
|
463
|
+
}), Object.defineProperty(C, "_self", {
|
|
464
|
+
configurable: !1,
|
|
465
|
+
enumerable: !1,
|
|
466
|
+
writable: !1,
|
|
467
|
+
value: w
|
|
468
|
+
}), Object.defineProperty(C, "_source", {
|
|
469
|
+
configurable: !1,
|
|
470
|
+
enumerable: !1,
|
|
471
|
+
writable: !1,
|
|
472
|
+
value: P
|
|
473
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
474
|
+
};
|
|
475
|
+
function Ct(e, u, h, w, P) {
|
|
476
|
+
{
|
|
477
|
+
var A, E = {}, C = null, M = null;
|
|
478
|
+
h !== void 0 && (Ne(h), C = "" + h), mt(u) && (Ne(u.key), C = "" + u.key), vt(u) && (M = u.ref, yt(u, P));
|
|
479
|
+
for (A in u)
|
|
480
|
+
pe.call(u, A) && !ht.hasOwnProperty(A) && (E[A] = u[A]);
|
|
481
|
+
if (e && e.defaultProps) {
|
|
482
|
+
var $ = e.defaultProps;
|
|
483
|
+
for (A in $)
|
|
484
|
+
E[A] === void 0 && (E[A] = $[A]);
|
|
485
|
+
}
|
|
486
|
+
if (C || M) {
|
|
487
|
+
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
488
|
+
C && gt(E, x), M && wt(E, x);
|
|
489
|
+
}
|
|
490
|
+
return bt(e, C, M, P, w, he.current, E);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
var Se = F.ReactCurrentOwner, Ye = F.ReactDebugCurrentFrame;
|
|
494
|
+
function ue(e) {
|
|
495
|
+
if (e) {
|
|
496
|
+
var u = e._owner, h = be(e.type, e._source, u ? u.type : null);
|
|
497
|
+
Ye.setExtraStackFrame(h);
|
|
498
|
+
} else
|
|
499
|
+
Ye.setExtraStackFrame(null);
|
|
500
|
+
}
|
|
501
|
+
var ke;
|
|
502
|
+
ke = !1;
|
|
503
|
+
function Ae(e) {
|
|
504
|
+
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
505
|
+
}
|
|
506
|
+
function Ve() {
|
|
507
|
+
{
|
|
508
|
+
if (Se.current) {
|
|
509
|
+
var e = g(Se.current.type);
|
|
510
|
+
if (e)
|
|
511
|
+
return `
|
|
512
|
+
|
|
513
|
+
Check the render method of \`` + e + "`.";
|
|
514
|
+
}
|
|
515
|
+
return "";
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function Rt(e) {
|
|
519
|
+
return "";
|
|
520
|
+
}
|
|
521
|
+
var Ge = {};
|
|
522
|
+
function Et(e) {
|
|
523
|
+
{
|
|
524
|
+
var u = Ve();
|
|
525
|
+
if (!u) {
|
|
526
|
+
var h = typeof e == "string" ? e : e.displayName || e.name;
|
|
527
|
+
h && (u = `
|
|
528
|
+
|
|
529
|
+
Check the top-level render call using <` + h + ">.");
|
|
530
|
+
}
|
|
531
|
+
return u;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
function Xe(e, u) {
|
|
535
|
+
{
|
|
536
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
537
|
+
return;
|
|
538
|
+
e._store.validated = !0;
|
|
539
|
+
var h = Et(u);
|
|
540
|
+
if (Ge[h])
|
|
541
|
+
return;
|
|
542
|
+
Ge[h] = !0;
|
|
543
|
+
var w = "";
|
|
544
|
+
e && e._owner && e._owner !== Se.current && (w = " It was passed a child from " + g(e._owner.type) + "."), ue(e), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, w), ue(null);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function Ke(e, u) {
|
|
548
|
+
{
|
|
549
|
+
if (typeof e != "object")
|
|
550
|
+
return;
|
|
551
|
+
if (Te(e))
|
|
552
|
+
for (var h = 0; h < e.length; h++) {
|
|
553
|
+
var w = e[h];
|
|
554
|
+
Ae(w) && Xe(w, u);
|
|
555
|
+
}
|
|
556
|
+
else if (Ae(e))
|
|
557
|
+
e._store && (e._store.validated = !0);
|
|
558
|
+
else if (e) {
|
|
559
|
+
var P = Z(e);
|
|
560
|
+
if (typeof P == "function" && P !== e.entries)
|
|
561
|
+
for (var A = P.call(e), E; !(E = A.next()).done; )
|
|
562
|
+
Ae(E.value) && Xe(E.value, u);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
function _t(e) {
|
|
567
|
+
{
|
|
568
|
+
var u = e.type;
|
|
569
|
+
if (u == null || typeof u == "string")
|
|
570
|
+
return;
|
|
571
|
+
var h;
|
|
572
|
+
if (typeof u == "function")
|
|
573
|
+
h = u.propTypes;
|
|
574
|
+
else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
|
|
575
|
+
// Inner props are checked in the reconciler.
|
|
576
|
+
u.$$typeof === b))
|
|
577
|
+
h = u.propTypes;
|
|
578
|
+
else
|
|
579
|
+
return;
|
|
580
|
+
if (h) {
|
|
581
|
+
var w = g(u);
|
|
582
|
+
lt(h, e.props, "prop", w, e);
|
|
583
|
+
} else if (u.PropTypes !== void 0 && !ke) {
|
|
584
|
+
ke = !0;
|
|
585
|
+
var P = g(u);
|
|
586
|
+
I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
587
|
+
}
|
|
588
|
+
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function Tt(e) {
|
|
592
|
+
{
|
|
593
|
+
for (var u = Object.keys(e.props), h = 0; h < u.length; h++) {
|
|
594
|
+
var w = u[h];
|
|
595
|
+
if (w !== "children" && w !== "key") {
|
|
596
|
+
ue(e), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), ue(null);
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
e.ref !== null && (ue(e), I("Invalid attribute `ref` supplied to `React.Fragment`."), ue(null));
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
var Je = {};
|
|
604
|
+
function ze(e, u, h, w, P, A) {
|
|
605
|
+
{
|
|
606
|
+
var E = f(e);
|
|
607
|
+
if (!E) {
|
|
608
|
+
var C = "";
|
|
609
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
610
|
+
var M = Rt();
|
|
611
|
+
M ? C += M : C += Ve();
|
|
612
|
+
var $;
|
|
613
|
+
e === null ? $ = "null" : Te(e) ? $ = "array" : e !== void 0 && e.$$typeof === o ? ($ = "<" + (g(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, C);
|
|
614
|
+
}
|
|
615
|
+
var x = Ct(e, u, h, P, A);
|
|
616
|
+
if (x == null)
|
|
617
|
+
return x;
|
|
618
|
+
if (E) {
|
|
619
|
+
var J = u.children;
|
|
620
|
+
if (J !== void 0)
|
|
621
|
+
if (w)
|
|
622
|
+
if (Te(J)) {
|
|
623
|
+
for (var se = 0; se < J.length; se++)
|
|
624
|
+
Ke(J[se], e);
|
|
625
|
+
Object.freeze && Object.freeze(J);
|
|
626
|
+
} else
|
|
627
|
+
I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
628
|
+
else
|
|
629
|
+
Ke(J, e);
|
|
630
|
+
}
|
|
631
|
+
if (pe.call(u, "key")) {
|
|
632
|
+
var oe = g(e), W = Object.keys(u).filter(function(It) {
|
|
633
|
+
return It !== "key";
|
|
634
|
+
}), Oe = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
635
|
+
if (!Je[oe + Oe]) {
|
|
636
|
+
var Ot = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
637
|
+
I(`A props object containing a "key" prop is being spread into JSX:
|
|
638
|
+
let props = %s;
|
|
639
|
+
<%s {...props} />
|
|
640
|
+
React keys must be passed directly to JSX without using spread:
|
|
641
|
+
let props = %s;
|
|
642
|
+
<%s key={someKey} {...props} />`, Oe, oe, Ot, oe), Je[oe + Oe] = !0;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return e === t ? Tt(x) : _t(x), x;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function Pt(e, u, h) {
|
|
649
|
+
return ze(e, u, h, !0);
|
|
650
|
+
}
|
|
651
|
+
function St(e, u, h) {
|
|
652
|
+
return ze(e, u, h, !1);
|
|
653
|
+
}
|
|
654
|
+
var kt = St, At = Pt;
|
|
655
|
+
me.Fragment = t, me.jsx = kt, me.jsxs = At;
|
|
656
|
+
}()), me;
|
|
657
|
+
}
|
|
658
|
+
process.env.NODE_ENV === "production" ? Ue.exports = xt() : Ue.exports = Ut();
|
|
659
|
+
var L = Ue.exports;
|
|
660
|
+
function et(s, o) {
|
|
661
|
+
return o = o || {}, new Promise(function(r, t) {
|
|
662
|
+
var a = new XMLHttpRequest(), d = [], p = [], c = {}, l = function() {
|
|
663
|
+
return { ok: (a.status / 100 | 0) == 2, statusText: a.statusText, status: a.status, url: a.responseURL, text: function() {
|
|
664
|
+
return Promise.resolve(a.responseText);
|
|
665
|
+
}, json: function() {
|
|
666
|
+
return Promise.resolve(a.responseText).then(JSON.parse);
|
|
667
|
+
}, blob: function() {
|
|
668
|
+
return Promise.resolve(new Blob([a.response]));
|
|
669
|
+
}, clone: l, headers: { keys: function() {
|
|
670
|
+
return d;
|
|
671
|
+
}, entries: function() {
|
|
672
|
+
return p;
|
|
673
|
+
}, get: function(m) {
|
|
674
|
+
return c[m.toLowerCase()];
|
|
675
|
+
}, has: function(m) {
|
|
676
|
+
return m.toLowerCase() in c;
|
|
677
|
+
} } };
|
|
678
|
+
};
|
|
679
|
+
for (var n in a.open(o.method || "get", s, !0), a.onload = function() {
|
|
680
|
+
a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(m, b, R) {
|
|
681
|
+
d.push(b = b.toLowerCase()), p.push([b, R]), c[b] = c[b] ? c[b] + "," + R : R;
|
|
682
|
+
}), r(l());
|
|
683
|
+
}, a.onerror = t, a.withCredentials = o.credentials == "include", o.headers)
|
|
684
|
+
a.setRequestHeader(n, o.headers[n]);
|
|
685
|
+
a.send(o.body || null);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
function Dt(s) {
|
|
689
|
+
throw new Error('Could not dynamically require "' + s + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
690
|
+
}
|
|
691
|
+
var at = { exports: {} };
|
|
692
|
+
const Lt = {}, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
693
|
+
__proto__: null,
|
|
694
|
+
default: Lt
|
|
695
|
+
}, Symbol.toStringTag, { value: "Module" })), qt = /* @__PURE__ */ $t(Ft);
|
|
696
|
+
(function(s) {
|
|
697
|
+
(function() {
|
|
698
|
+
var o, r = 0, t = [], a;
|
|
699
|
+
for (a = 0; a < 256; a++)
|
|
700
|
+
t[a] = (a + 256).toString(16).substr(1);
|
|
701
|
+
l.BUFFER_SIZE = 4096, l.bin = c, l.clearBuffer = function() {
|
|
702
|
+
o = null, r = 0;
|
|
703
|
+
}, l.test = function(n) {
|
|
704
|
+
return typeof n == "string" ? /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n) : !1;
|
|
705
|
+
};
|
|
706
|
+
var d;
|
|
707
|
+
typeof crypto < "u" ? d = crypto : typeof window < "u" && typeof window.msCrypto < "u" && (d = window.msCrypto), typeof Dt == "function" ? (d = d || qt, s.exports = l) : typeof window < "u" && (window.uuid = l), l.randomBytes = function() {
|
|
708
|
+
if (d) {
|
|
709
|
+
if (d.randomBytes)
|
|
710
|
+
return d.randomBytes;
|
|
711
|
+
if (d.getRandomValues)
|
|
712
|
+
return typeof Uint8Array.prototype.slice != "function" ? function(n) {
|
|
713
|
+
var m = new Uint8Array(n);
|
|
714
|
+
return d.getRandomValues(m), Array.from(m);
|
|
715
|
+
} : function(n) {
|
|
716
|
+
var m = new Uint8Array(n);
|
|
717
|
+
return d.getRandomValues(m), m;
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
return function(n) {
|
|
721
|
+
var m, b = [];
|
|
722
|
+
for (m = 0; m < n; m++)
|
|
723
|
+
b.push(Math.floor(Math.random() * 256));
|
|
724
|
+
return b;
|
|
725
|
+
};
|
|
726
|
+
}();
|
|
727
|
+
function p(n) {
|
|
728
|
+
return (!o || r + n > l.BUFFER_SIZE) && (r = 0, o = l.randomBytes(l.BUFFER_SIZE)), o.slice(r, r += n);
|
|
729
|
+
}
|
|
730
|
+
function c() {
|
|
731
|
+
var n = p(16);
|
|
732
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, n;
|
|
733
|
+
}
|
|
734
|
+
function l() {
|
|
735
|
+
var n = c();
|
|
736
|
+
return t[n[0]] + t[n[1]] + t[n[2]] + t[n[3]] + "-" + t[n[4]] + t[n[5]] + "-" + t[n[6]] + t[n[7]] + "-" + t[n[8]] + t[n[9]] + "-" + t[n[10]] + t[n[11]] + t[n[12]] + t[n[13]] + t[n[14]] + t[n[15]];
|
|
737
|
+
}
|
|
738
|
+
})();
|
|
739
|
+
})(at);
|
|
740
|
+
var Mt = at.exports;
|
|
741
|
+
const Ie = /* @__PURE__ */ jt(Mt);
|
|
742
|
+
function _() {
|
|
743
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
744
|
+
_ = function() {
|
|
745
|
+
return s;
|
|
746
|
+
};
|
|
747
|
+
var s = {}, o = Object.prototype, r = o.hasOwnProperty, t = typeof Symbol == "function" ? Symbol : {}, a = t.iterator || "@@iterator", d = t.asyncIterator || "@@asyncIterator", p = t.toStringTag || "@@toStringTag";
|
|
748
|
+
function c(f, i, y) {
|
|
749
|
+
return Object.defineProperty(f, i, {
|
|
750
|
+
value: y,
|
|
751
|
+
enumerable: !0,
|
|
752
|
+
configurable: !0,
|
|
753
|
+
writable: !0
|
|
754
|
+
}), f[i];
|
|
755
|
+
}
|
|
756
|
+
try {
|
|
757
|
+
c({}, "");
|
|
758
|
+
} catch {
|
|
759
|
+
c = function(i, y, g) {
|
|
760
|
+
return i[y] = g;
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
function l(f, i, y, g) {
|
|
764
|
+
var v = i && i.prototype instanceof b ? i : b, j = Object.create(v.prototype), U = new re(g || []);
|
|
765
|
+
return j._invoke = /* @__PURE__ */ function(H, K, T) {
|
|
766
|
+
var q = "suspendedStart";
|
|
767
|
+
return function(V, le) {
|
|
768
|
+
if (q === "executing")
|
|
769
|
+
throw new Error("Generator is already running");
|
|
770
|
+
if (q === "completed") {
|
|
771
|
+
if (V === "throw")
|
|
772
|
+
throw le;
|
|
773
|
+
return ne();
|
|
774
|
+
}
|
|
775
|
+
for (T.method = V, T.arg = le; ; ) {
|
|
776
|
+
var fe = T.delegate;
|
|
777
|
+
if (fe) {
|
|
778
|
+
var de = ce(fe, T);
|
|
779
|
+
if (de) {
|
|
780
|
+
if (de === m)
|
|
781
|
+
continue;
|
|
782
|
+
return de;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
if (T.method === "next")
|
|
786
|
+
T.sent = T._sent = T.arg;
|
|
787
|
+
else if (T.method === "throw") {
|
|
788
|
+
if (q === "suspendedStart")
|
|
789
|
+
throw q = "completed", T.arg;
|
|
790
|
+
T.dispatchException(T.arg);
|
|
791
|
+
} else
|
|
792
|
+
T.method === "return" && T.abrupt("return", T.arg);
|
|
793
|
+
q = "executing";
|
|
794
|
+
var ie = n(H, K, T);
|
|
795
|
+
if (ie.type === "normal") {
|
|
796
|
+
if (q = T.done ? "completed" : "suspendedYield", ie.arg === m)
|
|
797
|
+
continue;
|
|
798
|
+
return {
|
|
799
|
+
value: ie.arg,
|
|
800
|
+
done: T.done
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
ie.type === "throw" && (q = "completed", T.method = "throw", T.arg = ie.arg);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
}(f, y, U), j;
|
|
807
|
+
}
|
|
808
|
+
function n(f, i, y) {
|
|
809
|
+
try {
|
|
810
|
+
return {
|
|
811
|
+
type: "normal",
|
|
812
|
+
arg: f.call(i, y)
|
|
813
|
+
};
|
|
814
|
+
} catch (g) {
|
|
815
|
+
return {
|
|
816
|
+
type: "throw",
|
|
817
|
+
arg: g
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
s.wrap = l;
|
|
822
|
+
var m = {};
|
|
823
|
+
function b() {
|
|
824
|
+
}
|
|
825
|
+
function R() {
|
|
826
|
+
}
|
|
827
|
+
function O() {
|
|
828
|
+
}
|
|
829
|
+
var z = {};
|
|
830
|
+
c(z, a, function() {
|
|
831
|
+
return this;
|
|
832
|
+
});
|
|
833
|
+
var Y = Object.getPrototypeOf, Z = Y && Y(Y(te([])));
|
|
834
|
+
Z && Z !== o && r.call(Z, a) && (z = Z);
|
|
835
|
+
var F = O.prototype = b.prototype = Object.create(z);
|
|
836
|
+
function I(f) {
|
|
837
|
+
["next", "throw", "return"].forEach(function(i) {
|
|
838
|
+
c(f, i, function(y) {
|
|
839
|
+
return this._invoke(i, y);
|
|
840
|
+
});
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
function ee(f, i) {
|
|
844
|
+
function y(v, j, U, H) {
|
|
845
|
+
var K = n(f[v], f, j);
|
|
846
|
+
if (K.type !== "throw") {
|
|
847
|
+
var T = K.arg, q = T.value;
|
|
848
|
+
return q && typeof q == "object" && r.call(q, "__await") ? i.resolve(q.__await).then(function(V) {
|
|
849
|
+
y("next", V, U, H);
|
|
850
|
+
}, function(V) {
|
|
851
|
+
y("throw", V, U, H);
|
|
852
|
+
}) : i.resolve(q).then(function(V) {
|
|
853
|
+
T.value = V, U(T);
|
|
854
|
+
}, function(V) {
|
|
855
|
+
return y("throw", V, U, H);
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
H(K.arg);
|
|
859
|
+
}
|
|
860
|
+
var g;
|
|
861
|
+
this._invoke = function(v, j) {
|
|
862
|
+
function U() {
|
|
863
|
+
return new i(function(H, K) {
|
|
864
|
+
y(v, j, H, K);
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
return g = g ? g.then(U, U) : U();
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
function ce(f, i) {
|
|
871
|
+
var y = f.iterator[i.method];
|
|
872
|
+
if (y === void 0) {
|
|
873
|
+
if (i.delegate = null, i.method === "throw") {
|
|
874
|
+
if (f.iterator.return && (i.method = "return", i.arg = void 0, ce(f, i), i.method === "throw"))
|
|
875
|
+
return m;
|
|
876
|
+
i.method = "throw", i.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
877
|
+
}
|
|
878
|
+
return m;
|
|
879
|
+
}
|
|
880
|
+
var g = n(y, f.iterator, i.arg);
|
|
881
|
+
if (g.type === "throw")
|
|
882
|
+
return i.method = "throw", i.arg = g.arg, i.delegate = null, m;
|
|
883
|
+
var v = g.arg;
|
|
884
|
+
return v ? v.done ? (i[f.resultName] = v.value, i.next = f.nextLoc, i.method !== "return" && (i.method = "next", i.arg = void 0), i.delegate = null, m) : v : (i.method = "throw", i.arg = new TypeError("iterator result is not an object"), i.delegate = null, m);
|
|
885
|
+
}
|
|
886
|
+
function X(f) {
|
|
887
|
+
var i = {
|
|
888
|
+
tryLoc: f[0]
|
|
889
|
+
};
|
|
890
|
+
1 in f && (i.catchLoc = f[1]), 2 in f && (i.finallyLoc = f[2], i.afterLoc = f[3]), this.tryEntries.push(i);
|
|
891
|
+
}
|
|
892
|
+
function ae(f) {
|
|
893
|
+
var i = f.completion || {};
|
|
894
|
+
i.type = "normal", delete i.arg, f.completion = i;
|
|
895
|
+
}
|
|
896
|
+
function re(f) {
|
|
897
|
+
this.tryEntries = [{
|
|
898
|
+
tryLoc: "root"
|
|
899
|
+
}], f.forEach(X, this), this.reset(!0);
|
|
900
|
+
}
|
|
901
|
+
function te(f) {
|
|
902
|
+
if (f) {
|
|
903
|
+
var i = f[a];
|
|
904
|
+
if (i)
|
|
905
|
+
return i.call(f);
|
|
906
|
+
if (typeof f.next == "function")
|
|
907
|
+
return f;
|
|
908
|
+
if (!isNaN(f.length)) {
|
|
909
|
+
var y = -1, g = function v() {
|
|
910
|
+
for (; ++y < f.length; )
|
|
911
|
+
if (r.call(f, y))
|
|
912
|
+
return v.value = f[y], v.done = !1, v;
|
|
913
|
+
return v.value = void 0, v.done = !0, v;
|
|
914
|
+
};
|
|
915
|
+
return g.next = g;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
return {
|
|
919
|
+
next: ne
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function ne() {
|
|
923
|
+
return {
|
|
924
|
+
value: void 0,
|
|
925
|
+
done: !0
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
return R.prototype = O, c(F, "constructor", O), c(O, "constructor", R), R.displayName = c(O, p, "GeneratorFunction"), s.isGeneratorFunction = function(f) {
|
|
929
|
+
var i = typeof f == "function" && f.constructor;
|
|
930
|
+
return !!i && (i === R || (i.displayName || i.name) === "GeneratorFunction");
|
|
931
|
+
}, s.mark = function(f) {
|
|
932
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(f, O) : (f.__proto__ = O, c(f, p, "GeneratorFunction")), f.prototype = Object.create(F), f;
|
|
933
|
+
}, s.awrap = function(f) {
|
|
934
|
+
return {
|
|
935
|
+
__await: f
|
|
936
|
+
};
|
|
937
|
+
}, I(ee.prototype), c(ee.prototype, d, function() {
|
|
938
|
+
return this;
|
|
939
|
+
}), s.AsyncIterator = ee, s.async = function(f, i, y, g, v) {
|
|
940
|
+
v === void 0 && (v = Promise);
|
|
941
|
+
var j = new ee(l(f, i, y, g), v);
|
|
942
|
+
return s.isGeneratorFunction(i) ? j : j.next().then(function(U) {
|
|
943
|
+
return U.done ? U.value : j.next();
|
|
944
|
+
});
|
|
945
|
+
}, I(F), c(F, p, "Generator"), c(F, a, function() {
|
|
946
|
+
return this;
|
|
947
|
+
}), c(F, "toString", function() {
|
|
948
|
+
return "[object Generator]";
|
|
949
|
+
}), s.keys = function(f) {
|
|
950
|
+
var i = [];
|
|
951
|
+
for (var y in f)
|
|
952
|
+
i.push(y);
|
|
953
|
+
return i.reverse(), function g() {
|
|
954
|
+
for (; i.length; ) {
|
|
955
|
+
var v = i.pop();
|
|
956
|
+
if (v in f)
|
|
957
|
+
return g.value = v, g.done = !1, g;
|
|
958
|
+
}
|
|
959
|
+
return g.done = !0, g;
|
|
960
|
+
};
|
|
961
|
+
}, s.values = te, re.prototype = {
|
|
962
|
+
constructor: re,
|
|
963
|
+
reset: function(f) {
|
|
964
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(ae), !f)
|
|
965
|
+
for (var i in this)
|
|
966
|
+
i.charAt(0) === "t" && r.call(this, i) && !isNaN(+i.slice(1)) && (this[i] = void 0);
|
|
967
|
+
},
|
|
968
|
+
stop: function() {
|
|
969
|
+
this.done = !0;
|
|
970
|
+
var f = this.tryEntries[0].completion;
|
|
971
|
+
if (f.type === "throw")
|
|
972
|
+
throw f.arg;
|
|
973
|
+
return this.rval;
|
|
974
|
+
},
|
|
975
|
+
dispatchException: function(f) {
|
|
976
|
+
if (this.done)
|
|
977
|
+
throw f;
|
|
978
|
+
var i = this;
|
|
979
|
+
function y(K, T) {
|
|
980
|
+
return j.type = "throw", j.arg = f, i.next = K, T && (i.method = "next", i.arg = void 0), !!T;
|
|
981
|
+
}
|
|
982
|
+
for (var g = this.tryEntries.length - 1; g >= 0; --g) {
|
|
983
|
+
var v = this.tryEntries[g], j = v.completion;
|
|
984
|
+
if (v.tryLoc === "root")
|
|
985
|
+
return y("end");
|
|
986
|
+
if (v.tryLoc <= this.prev) {
|
|
987
|
+
var U = r.call(v, "catchLoc"), H = r.call(v, "finallyLoc");
|
|
988
|
+
if (U && H) {
|
|
989
|
+
if (this.prev < v.catchLoc)
|
|
990
|
+
return y(v.catchLoc, !0);
|
|
991
|
+
if (this.prev < v.finallyLoc)
|
|
992
|
+
return y(v.finallyLoc);
|
|
993
|
+
} else if (U) {
|
|
994
|
+
if (this.prev < v.catchLoc)
|
|
995
|
+
return y(v.catchLoc, !0);
|
|
996
|
+
} else {
|
|
997
|
+
if (!H)
|
|
998
|
+
throw new Error("try statement without catch or finally");
|
|
999
|
+
if (this.prev < v.finallyLoc)
|
|
1000
|
+
return y(v.finallyLoc);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
abrupt: function(f, i) {
|
|
1006
|
+
for (var y = this.tryEntries.length - 1; y >= 0; --y) {
|
|
1007
|
+
var g = this.tryEntries[y];
|
|
1008
|
+
if (g.tryLoc <= this.prev && r.call(g, "finallyLoc") && this.prev < g.finallyLoc) {
|
|
1009
|
+
var v = g;
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
v && (f === "break" || f === "continue") && v.tryLoc <= i && i <= v.finallyLoc && (v = null);
|
|
1014
|
+
var j = v ? v.completion : {};
|
|
1015
|
+
return j.type = f, j.arg = i, v ? (this.method = "next", this.next = v.finallyLoc, m) : this.complete(j);
|
|
1016
|
+
},
|
|
1017
|
+
complete: function(f, i) {
|
|
1018
|
+
if (f.type === "throw")
|
|
1019
|
+
throw f.arg;
|
|
1020
|
+
return f.type === "break" || f.type === "continue" ? this.next = f.arg : f.type === "return" ? (this.rval = this.arg = f.arg, this.method = "return", this.next = "end") : f.type === "normal" && i && (this.next = i), m;
|
|
1021
|
+
},
|
|
1022
|
+
finish: function(f) {
|
|
1023
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1024
|
+
var y = this.tryEntries[i];
|
|
1025
|
+
if (y.finallyLoc === f)
|
|
1026
|
+
return this.complete(y.completion, y.afterLoc), ae(y), m;
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
catch: function(f) {
|
|
1030
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
1031
|
+
var y = this.tryEntries[i];
|
|
1032
|
+
if (y.tryLoc === f) {
|
|
1033
|
+
var g = y.completion;
|
|
1034
|
+
if (g.type === "throw") {
|
|
1035
|
+
var v = g.arg;
|
|
1036
|
+
ae(y);
|
|
1037
|
+
}
|
|
1038
|
+
return v;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
throw new Error("illegal catch attempt");
|
|
1042
|
+
},
|
|
1043
|
+
delegateYield: function(f, i, y) {
|
|
1044
|
+
return this.delegate = {
|
|
1045
|
+
iterator: te(f),
|
|
1046
|
+
resultName: i,
|
|
1047
|
+
nextLoc: y
|
|
1048
|
+
}, this.method === "next" && (this.arg = void 0), m;
|
|
1049
|
+
}
|
|
1050
|
+
}, s;
|
|
1051
|
+
}
|
|
1052
|
+
function tt(s, o, r, t, a, d, p) {
|
|
1053
|
+
try {
|
|
1054
|
+
var c = s[d](p), l = c.value;
|
|
1055
|
+
} catch (n) {
|
|
1056
|
+
r(n);
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
c.done ? o(l) : Promise.resolve(l).then(t, a);
|
|
1060
|
+
}
|
|
1061
|
+
function B(s) {
|
|
1062
|
+
return function() {
|
|
1063
|
+
var o = this, r = arguments;
|
|
1064
|
+
return new Promise(function(t, a) {
|
|
1065
|
+
var d = s.apply(o, r);
|
|
1066
|
+
function p(l) {
|
|
1067
|
+
tt(d, t, a, p, c, "next", l);
|
|
1068
|
+
}
|
|
1069
|
+
function c(l) {
|
|
1070
|
+
tt(d, t, a, p, c, "throw", l);
|
|
1071
|
+
}
|
|
1072
|
+
p(void 0);
|
|
1073
|
+
});
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
function Bt(s, o) {
|
|
1077
|
+
for (var r = 0; r < o.length; r++) {
|
|
1078
|
+
var t = o[r];
|
|
1079
|
+
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(s, t.key, t);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
function Nt(s, o, r) {
|
|
1083
|
+
return o && Bt(s.prototype, o), Object.defineProperty(s, "prototype", {
|
|
1084
|
+
writable: !1
|
|
1085
|
+
}), s;
|
|
1086
|
+
}
|
|
1087
|
+
function N() {
|
|
1088
|
+
return N = Object.assign ? Object.assign.bind() : function(s) {
|
|
1089
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
1090
|
+
var r = arguments[o];
|
|
1091
|
+
for (var t in r)
|
|
1092
|
+
Object.prototype.hasOwnProperty.call(r, t) && (s[t] = r[t]);
|
|
1093
|
+
}
|
|
1094
|
+
return s;
|
|
1095
|
+
}, N.apply(this, arguments);
|
|
1096
|
+
}
|
|
1097
|
+
function Ht(s, o) {
|
|
1098
|
+
if (s == null)
|
|
1099
|
+
return {};
|
|
1100
|
+
var r = {}, t = Object.keys(s), a, d;
|
|
1101
|
+
for (d = 0; d < t.length; d++)
|
|
1102
|
+
a = t[d], !(o.indexOf(a) >= 0) && (r[a] = s[a]);
|
|
1103
|
+
return r;
|
|
1104
|
+
}
|
|
1105
|
+
var Wt = 0;
|
|
1106
|
+
function Le(s) {
|
|
1107
|
+
return "__private_" + Wt++ + "_" + s;
|
|
1108
|
+
}
|
|
1109
|
+
function S(s, o) {
|
|
1110
|
+
if (!Object.prototype.hasOwnProperty.call(s, o))
|
|
1111
|
+
throw new TypeError("attempted to use private field on non-instance");
|
|
1112
|
+
return s;
|
|
1113
|
+
}
|
|
1114
|
+
var Yt = `
|
|
1115
|
+
mutation TrackEvent($input: TrackEventInput!) {
|
|
1116
|
+
trackEvent(input: $input) {
|
|
1117
|
+
success
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
`, Vt = `
|
|
1121
|
+
mutation IdentifyAccount($input: IdentifyAccountInput!) {
|
|
1122
|
+
identifyAccount(input: $input) {
|
|
1123
|
+
id
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
`, Gt = `
|
|
1127
|
+
mutation AddContent($input: AddContentInput!) {
|
|
1128
|
+
addContent(input: $input) {
|
|
1129
|
+
id
|
|
1130
|
+
identifier
|
|
1131
|
+
position
|
|
1132
|
+
data
|
|
1133
|
+
createdAt
|
|
1134
|
+
updatedAt
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
`, Xt = `
|
|
1138
|
+
mutation EditContent($input: EditContentInput!) {
|
|
1139
|
+
editContent(input: $input) {
|
|
1140
|
+
id
|
|
1141
|
+
identifier
|
|
1142
|
+
position
|
|
1143
|
+
data
|
|
1144
|
+
createdAt
|
|
1145
|
+
updatedAt
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
`, rt = `
|
|
1149
|
+
query SearchContent($input: SearchContentInput!) {
|
|
1150
|
+
searchContent(input: $input)
|
|
1151
|
+
}
|
|
1152
|
+
`, Kt = `
|
|
1153
|
+
query FetchContent($input: FetchContentInput!) {
|
|
1154
|
+
fetchContent(input: $input)
|
|
1155
|
+
}
|
|
1156
|
+
`, Jt = `
|
|
1157
|
+
id
|
|
1158
|
+
name
|
|
1159
|
+
identifier
|
|
1160
|
+
description
|
|
1161
|
+
createdAt
|
|
1162
|
+
updatedAt
|
|
1163
|
+
pricings {
|
|
1164
|
+
id
|
|
1165
|
+
kind
|
|
1166
|
+
amount
|
|
1167
|
+
originalAmount
|
|
1168
|
+
isRecurring
|
|
1169
|
+
recurringInterval
|
|
1170
|
+
recurringIntervalUnit
|
|
1171
|
+
appleProductIdentifier
|
|
1172
|
+
googleProductIdentifier
|
|
1173
|
+
currencyCode
|
|
1174
|
+
createdAt
|
|
1175
|
+
updatedAt
|
|
1176
|
+
}
|
|
1177
|
+
`, ye = `
|
|
1178
|
+
id
|
|
1179
|
+
status
|
|
1180
|
+
subtotal
|
|
1181
|
+
discount
|
|
1182
|
+
tax
|
|
1183
|
+
total
|
|
1184
|
+
gatewayMeta
|
|
1185
|
+
currencyCode
|
|
1186
|
+
|
|
1187
|
+
orderItems {
|
|
1188
|
+
id
|
|
1189
|
+
quantity
|
|
1190
|
+
unitPrice
|
|
1191
|
+
subtotal
|
|
1192
|
+
discount
|
|
1193
|
+
tax
|
|
1194
|
+
total
|
|
1195
|
+
custom
|
|
1196
|
+
currencyCode
|
|
1197
|
+
|
|
1198
|
+
item {
|
|
1199
|
+
` + Jt + `
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
couponRedemptions {
|
|
1204
|
+
coupon {
|
|
1205
|
+
name
|
|
1206
|
+
identifier
|
|
1207
|
+
discountType
|
|
1208
|
+
discountAmount
|
|
1209
|
+
currencyCode
|
|
1210
|
+
expiresAt
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
`, zt = `
|
|
1214
|
+
mutation AddItemToCart($input: AddItemToCartInput) {
|
|
1215
|
+
addItemToCart(input:$input) {
|
|
1216
|
+
` + ye + `
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
`, Zt = `
|
|
1220
|
+
mutation ApplyCouponToCart($input: ApplyCouponToCartInput) {
|
|
1221
|
+
applyCouponToCart(input:$input) {
|
|
1222
|
+
` + ye + `
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
`, Qt = `
|
|
1226
|
+
mutation RemoveCouponFromCart($input: RemoveCouponFromCartInput) {
|
|
1227
|
+
removeCouponFromCart(input:$input) {
|
|
1228
|
+
` + ye + `
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
`, er = `
|
|
1232
|
+
query FetchCart($input: FetchCartInput!) {
|
|
1233
|
+
fetchCart(input: $input) {
|
|
1234
|
+
` + ye + `
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
`, tr = `
|
|
1238
|
+
mutation TransferCart($input: TransferCartInput!) {
|
|
1239
|
+
transferCart(input: $input) {
|
|
1240
|
+
` + ye + `
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
`, rr = `
|
|
1244
|
+
query FetchStoredPreferences($input: FetchStoredPreferencesInput!) {
|
|
1245
|
+
fetchStoredPreferences(input: $input) {
|
|
1246
|
+
preferenceData
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
`, nr = `
|
|
1250
|
+
mutation SaveStoredPreferences($input: SaveStoredPreferencesInput!) {
|
|
1251
|
+
saveStoredPreferences(input: $input) {
|
|
1252
|
+
success
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
`, ar = `
|
|
1256
|
+
query FetchContacts($input: FetchContactsInput!) {
|
|
1257
|
+
fetchContacts(input: $input) {
|
|
1258
|
+
contacts {
|
|
1259
|
+
id
|
|
1260
|
+
accountId
|
|
1261
|
+
name
|
|
1262
|
+
kind
|
|
1263
|
+
value
|
|
1264
|
+
unverifiedValue
|
|
1265
|
+
verifiedAt
|
|
1266
|
+
status
|
|
1267
|
+
tag
|
|
1268
|
+
createdAt
|
|
1269
|
+
updatedAt
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
`, ir = `
|
|
1274
|
+
mutation SaveContacts($input: SaveContactsInput!) {
|
|
1275
|
+
saveContacts(input: $input) {
|
|
1276
|
+
contacts {
|
|
1277
|
+
id
|
|
1278
|
+
accountId
|
|
1279
|
+
name
|
|
1280
|
+
kind
|
|
1281
|
+
value
|
|
1282
|
+
unverifiedValue
|
|
1283
|
+
verifiedAt
|
|
1284
|
+
status
|
|
1285
|
+
tag
|
|
1286
|
+
createdAt
|
|
1287
|
+
updatedAt
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
`, or = `
|
|
1292
|
+
mutation prepareAsset($input: PrepareAssetInput!) {
|
|
1293
|
+
prepareAsset(input: $input) {
|
|
1294
|
+
attributeId
|
|
1295
|
+
createdAt
|
|
1296
|
+
data
|
|
1297
|
+
id
|
|
1298
|
+
mimeType
|
|
1299
|
+
name
|
|
1300
|
+
processingStatus
|
|
1301
|
+
resourceId
|
|
1302
|
+
size
|
|
1303
|
+
storageProviderId
|
|
1304
|
+
updatedAt
|
|
1305
|
+
uploadStatus
|
|
1306
|
+
uploaderId
|
|
1307
|
+
url
|
|
1308
|
+
workspaceId
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
`, ur = `
|
|
1312
|
+
query Asset($id: ID!) {
|
|
1313
|
+
asset(id: $id) {
|
|
1314
|
+
attributeId
|
|
1315
|
+
createdAt
|
|
1316
|
+
data
|
|
1317
|
+
id
|
|
1318
|
+
mimeType
|
|
1319
|
+
name
|
|
1320
|
+
processingStatus
|
|
1321
|
+
resourceId
|
|
1322
|
+
size
|
|
1323
|
+
storageProviderId
|
|
1324
|
+
updatedAt
|
|
1325
|
+
uploadStatus
|
|
1326
|
+
uploaderId
|
|
1327
|
+
url
|
|
1328
|
+
workspaceId
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
`, sr = "@dashx/browser", cr = "dashx-browser", lr = "0.1.29", fr = "DashX SDK for Browser", dr = "dist/index.js", pr = "dist/browser.esm.js", hr = [
|
|
1332
|
+
"dist"
|
|
1333
|
+
], vr = {
|
|
1334
|
+
build: "tsdx build --tsconfig tsconfig.json",
|
|
1335
|
+
start: "tsdx watch --tsconfig tsconfig.json --verbose --noClean",
|
|
1336
|
+
release: "yarn build && npm publish"
|
|
1337
|
+
}, mr = {
|
|
1338
|
+
type: "git",
|
|
1339
|
+
url: "git+https://github.com/dashxhq/dashx-browser"
|
|
1340
|
+
}, yr = [
|
|
1341
|
+
"dashx"
|
|
1342
|
+
], gr = "MIT", wr = {
|
|
1343
|
+
unfetch: "^4.2.0",
|
|
1344
|
+
"uuid-random": "^1.3.2"
|
|
1345
|
+
}, br = {
|
|
1346
|
+
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
|
1347
|
+
"@typescript-eslint/parser": "^5.29.0",
|
|
1348
|
+
eslint: "^8.18.0",
|
|
1349
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
1350
|
+
"eslint-plugin-import": "^2.26.0",
|
|
1351
|
+
tsdx: "^0.14.1",
|
|
1352
|
+
typescript: "^4.7.4"
|
|
1353
|
+
}, nt = {
|
|
1354
|
+
name: sr,
|
|
1355
|
+
title: cr,
|
|
1356
|
+
version: lr,
|
|
1357
|
+
description: fr,
|
|
1358
|
+
main: dr,
|
|
1359
|
+
module: pr,
|
|
1360
|
+
files: hr,
|
|
1361
|
+
scripts: vr,
|
|
1362
|
+
repository: mr,
|
|
1363
|
+
keywords: yr,
|
|
1364
|
+
license: gr,
|
|
1365
|
+
dependencies: wr,
|
|
1366
|
+
devDependencies: br
|
|
1367
|
+
};
|
|
1368
|
+
function Cr() {
|
|
1369
|
+
return {
|
|
1370
|
+
height: window.screen.height,
|
|
1371
|
+
width: window.screen.width
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
function Rr() {
|
|
1375
|
+
return {
|
|
1376
|
+
name: nt.name,
|
|
1377
|
+
version: nt.version
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
function Er() {
|
|
1381
|
+
return navigator.language;
|
|
1382
|
+
}
|
|
1383
|
+
function _r() {
|
|
1384
|
+
return {
|
|
1385
|
+
path: window.location.pathname,
|
|
1386
|
+
search: window.location.search,
|
|
1387
|
+
title: window.document.title,
|
|
1388
|
+
url: window.location.href
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
function Tr() {
|
|
1392
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1393
|
+
}
|
|
1394
|
+
function Pr() {
|
|
1395
|
+
return {
|
|
1396
|
+
displayMetrics: Cr(),
|
|
1397
|
+
library: Rr(),
|
|
1398
|
+
locale: Er(),
|
|
1399
|
+
page: _r(),
|
|
1400
|
+
timezone: Tr()
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
function it(s) {
|
|
1404
|
+
s === void 0 && (s = {});
|
|
1405
|
+
var o = {};
|
|
1406
|
+
return Object.keys(s).forEach(function(r) {
|
|
1407
|
+
var t;
|
|
1408
|
+
if (r.startsWith("_")) {
|
|
1409
|
+
o[r.substring(1)] = s[r];
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
o.data = N((t = {}, t[r] = s[r], t), o.data);
|
|
1413
|
+
}), o;
|
|
1414
|
+
}
|
|
1415
|
+
var Sr = /* @__PURE__ */ function() {
|
|
1416
|
+
function s(r) {
|
|
1417
|
+
this.options = {}, this.callback = r;
|
|
1418
|
+
}
|
|
1419
|
+
var o = s.prototype;
|
|
1420
|
+
return o.limit = function(t) {
|
|
1421
|
+
return this.options.limit = t, this;
|
|
1422
|
+
}, o.filter = function(t) {
|
|
1423
|
+
return this.options.filter = it(t), this;
|
|
1424
|
+
}, o.order = function(t) {
|
|
1425
|
+
return this.options.order = t, this;
|
|
1426
|
+
}, o.language = function(t) {
|
|
1427
|
+
return this.options.language = t, this;
|
|
1428
|
+
}, o.fields = function(t) {
|
|
1429
|
+
return this.options.fields = t, this;
|
|
1430
|
+
}, o.include = function(t) {
|
|
1431
|
+
return this.options.include = t, this;
|
|
1432
|
+
}, o.exclude = function(t) {
|
|
1433
|
+
return this.options.exclude = t, this;
|
|
1434
|
+
}, o.preview = function(t) {
|
|
1435
|
+
return t === void 0 && (t = !0), this.options.preview = t, this;
|
|
1436
|
+
}, o.all = function(t) {
|
|
1437
|
+
return this.options = N({}, this.options, t, {
|
|
1438
|
+
returnType: "all"
|
|
1439
|
+
}), this.callback(this.options);
|
|
1440
|
+
}, o.one = /* @__PURE__ */ function() {
|
|
1441
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1442
|
+
var p;
|
|
1443
|
+
return _().wrap(function(l) {
|
|
1444
|
+
for (; ; )
|
|
1445
|
+
switch (l.prev = l.next) {
|
|
1446
|
+
case 0:
|
|
1447
|
+
return this.options = N({}, this.options, d, {
|
|
1448
|
+
returnType: "one"
|
|
1449
|
+
}), l.next = 3, this.callback(this.options);
|
|
1450
|
+
case 3:
|
|
1451
|
+
return p = l.sent, l.abrupt("return", Array.isArray(p) ? p[0] : null);
|
|
1452
|
+
case 5:
|
|
1453
|
+
case "end":
|
|
1454
|
+
return l.stop();
|
|
1455
|
+
}
|
|
1456
|
+
}, a, this);
|
|
1457
|
+
}));
|
|
1458
|
+
function t(a) {
|
|
1459
|
+
return r.apply(this, arguments);
|
|
1460
|
+
}
|
|
1461
|
+
return t;
|
|
1462
|
+
}(), s;
|
|
1463
|
+
}(), De = "dashx-sdk";
|
|
1464
|
+
function je(s) {
|
|
1465
|
+
var o = window.localStorage.getItem(De);
|
|
1466
|
+
if (!o)
|
|
1467
|
+
return null;
|
|
1468
|
+
var r = JSON.parse(o);
|
|
1469
|
+
return r[s];
|
|
1470
|
+
}
|
|
1471
|
+
function $e(s, o) {
|
|
1472
|
+
var r = window.localStorage.getItem(De), t = r ? JSON.parse(r) : {};
|
|
1473
|
+
t[s] = o, window.localStorage.setItem(De, JSON.stringify(t));
|
|
1474
|
+
}
|
|
1475
|
+
var kr = ["custom"], Ar = 5, Or = 3e3, D = /* @__PURE__ */ Le("accountAnonymousUid"), k = /* @__PURE__ */ Le("accountUid"), G = /* @__PURE__ */ Le("identityToken"), Ir = /* @__PURE__ */ function() {
|
|
1476
|
+
function s(r) {
|
|
1477
|
+
var t = r.publicKey, a = r.baseUri, d = a === void 0 ? "https://api.dashx.com/graphql" : a, p = r.targetEnvironment;
|
|
1478
|
+
Object.defineProperty(this, D, {
|
|
1479
|
+
writable: !0,
|
|
1480
|
+
value: void 0
|
|
1481
|
+
}), Object.defineProperty(this, k, {
|
|
1482
|
+
writable: !0,
|
|
1483
|
+
value: void 0
|
|
1484
|
+
}), Object.defineProperty(this, G, {
|
|
1485
|
+
writable: !0,
|
|
1486
|
+
value: void 0
|
|
1487
|
+
}), S(this, k)[k] = null, S(this, G)[G] = null, this.baseUri = d, this.publicKey = t, this.targetEnvironment = p, this.context = Pr(), this.loadIdentity();
|
|
1488
|
+
}
|
|
1489
|
+
var o = s.prototype;
|
|
1490
|
+
return o.makeHttpRequest = /* @__PURE__ */ function() {
|
|
1491
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d, p) {
|
|
1492
|
+
var c;
|
|
1493
|
+
return _().wrap(function(n) {
|
|
1494
|
+
for (; ; )
|
|
1495
|
+
switch (n.prev = n.next) {
|
|
1496
|
+
case 0:
|
|
1497
|
+
return n.next = 2, et(this.baseUri, {
|
|
1498
|
+
method: "POST",
|
|
1499
|
+
headers: N({
|
|
1500
|
+
"Content-Type": "application/json",
|
|
1501
|
+
"X-Public-Key": this.publicKey
|
|
1502
|
+
}, this.targetEnvironment ? {
|
|
1503
|
+
"X-Target-Environment": this.targetEnvironment
|
|
1504
|
+
} : {}, S(this, G)[G] ? {
|
|
1505
|
+
"X-Identity-Token": S(this, G)[G]
|
|
1506
|
+
} : {}),
|
|
1507
|
+
body: JSON.stringify({
|
|
1508
|
+
query: d,
|
|
1509
|
+
variables: p
|
|
1510
|
+
})
|
|
1511
|
+
}).then(function(m) {
|
|
1512
|
+
return m.json();
|
|
1513
|
+
});
|
|
1514
|
+
case 2:
|
|
1515
|
+
if (c = n.sent, !c.data) {
|
|
1516
|
+
n.next = 5;
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
return n.abrupt("return", Promise.resolve(c.data));
|
|
1520
|
+
case 5:
|
|
1521
|
+
return n.abrupt("return", Promise.reject(c.errors));
|
|
1522
|
+
case 6:
|
|
1523
|
+
case "end":
|
|
1524
|
+
return n.stop();
|
|
1525
|
+
}
|
|
1526
|
+
}, a, this);
|
|
1527
|
+
}));
|
|
1528
|
+
function t(a, d) {
|
|
1529
|
+
return r.apply(this, arguments);
|
|
1530
|
+
}
|
|
1531
|
+
return t;
|
|
1532
|
+
}(), o.loadIdentity = function() {
|
|
1533
|
+
this.accountAnonymousUid = je("accountAnonymousUid") || Ie(), this.accountUid = je("accountUid") || null, this.identityToken = je("identityToken") || null;
|
|
1534
|
+
}, o.identify = function(t) {
|
|
1535
|
+
if (typeof t == "string") {
|
|
1536
|
+
this.accountUid = t;
|
|
1537
|
+
return;
|
|
1538
|
+
}
|
|
1539
|
+
this.accountUid = t == null ? void 0 : t.uid;
|
|
1540
|
+
var a = N({
|
|
1541
|
+
uid: t == null ? void 0 : t.uid,
|
|
1542
|
+
anonymousUid: S(this, D)[D]
|
|
1543
|
+
}, t);
|
|
1544
|
+
return this.makeHttpRequest(Vt, {
|
|
1545
|
+
input: a
|
|
1546
|
+
}).then(function(d) {
|
|
1547
|
+
return d == null ? void 0 : d.identifyAccount;
|
|
1548
|
+
});
|
|
1549
|
+
}, o.setIdentity = function(t, a) {
|
|
1550
|
+
this.accountUid = t, this.identityToken = a;
|
|
1551
|
+
}, o.setAnonymousIdentity = function(t) {
|
|
1552
|
+
this.accountAnonymousUid = t;
|
|
1553
|
+
}, o.reset = function() {
|
|
1554
|
+
this.accountAnonymousUid = Ie(), this.accountUid = null, this.identityToken = null;
|
|
1555
|
+
}, o.track = function(t, a) {
|
|
1556
|
+
var d = {
|
|
1557
|
+
event: t,
|
|
1558
|
+
data: a,
|
|
1559
|
+
accountUid: S(this, k)[k],
|
|
1560
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1561
|
+
};
|
|
1562
|
+
return this.makeHttpRequest(Yt, {
|
|
1563
|
+
input: d
|
|
1564
|
+
});
|
|
1565
|
+
}, o.addContent = function(t, a) {
|
|
1566
|
+
var d, p;
|
|
1567
|
+
if (t.includes("/")) {
|
|
1568
|
+
var c = t.split("/");
|
|
1569
|
+
p = c[0], d = c[1];
|
|
1570
|
+
} else
|
|
1571
|
+
p = t;
|
|
1572
|
+
var l = {
|
|
1573
|
+
content: d,
|
|
1574
|
+
contentType: p,
|
|
1575
|
+
data: a
|
|
1576
|
+
};
|
|
1577
|
+
return this.makeHttpRequest(Gt, {
|
|
1578
|
+
input: l
|
|
1579
|
+
});
|
|
1580
|
+
}, o.editContent = function(t, a) {
|
|
1581
|
+
var d, p;
|
|
1582
|
+
if (t.includes("/")) {
|
|
1583
|
+
var c = t.split("/");
|
|
1584
|
+
p = c[0], d = c[1];
|
|
1585
|
+
} else
|
|
1586
|
+
p = t;
|
|
1587
|
+
var l = {
|
|
1588
|
+
content: d,
|
|
1589
|
+
contentType: p,
|
|
1590
|
+
data: a
|
|
1591
|
+
};
|
|
1592
|
+
return this.makeHttpRequest(Xt, {
|
|
1593
|
+
input: l
|
|
1594
|
+
});
|
|
1595
|
+
}, o.searchContent = function(t, a) {
|
|
1596
|
+
var d = this;
|
|
1597
|
+
if (!a)
|
|
1598
|
+
return new Sr(function(l) {
|
|
1599
|
+
return d.makeHttpRequest(rt, {
|
|
1600
|
+
input: N({}, l, {
|
|
1601
|
+
contentType: t
|
|
1602
|
+
})
|
|
1603
|
+
}).then(function(n) {
|
|
1604
|
+
return n == null ? void 0 : n.searchContent;
|
|
1605
|
+
});
|
|
1606
|
+
});
|
|
1607
|
+
var p = it(a.filter), c = this.makeHttpRequest(rt, {
|
|
1608
|
+
input: N({}, a, {
|
|
1609
|
+
contentType: t,
|
|
1610
|
+
filter: p
|
|
1611
|
+
})
|
|
1612
|
+
}).then(function(l) {
|
|
1613
|
+
return l == null ? void 0 : l.searchContent;
|
|
1614
|
+
});
|
|
1615
|
+
return a.returnType === "all" ? c : c.then(function(l) {
|
|
1616
|
+
return Array.isArray(l) ? l[0] : null;
|
|
1617
|
+
});
|
|
1618
|
+
}, o.fetchContent = /* @__PURE__ */ function() {
|
|
1619
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d, p) {
|
|
1620
|
+
var c, l, n, m, b;
|
|
1621
|
+
return _().wrap(function(O) {
|
|
1622
|
+
for (; ; )
|
|
1623
|
+
switch (O.prev = O.next) {
|
|
1624
|
+
case 0:
|
|
1625
|
+
if (d.includes("/")) {
|
|
1626
|
+
O.next = 2;
|
|
1627
|
+
break;
|
|
1628
|
+
}
|
|
1629
|
+
throw new Error("URN must be of form: {contentType}/{content}");
|
|
1630
|
+
case 2:
|
|
1631
|
+
return c = d.split("/"), l = c[0], n = c[1], m = N({
|
|
1632
|
+
content: n,
|
|
1633
|
+
contentType: l
|
|
1634
|
+
}, p), O.next = 6, this.makeHttpRequest(Kt, {
|
|
1635
|
+
input: m
|
|
1636
|
+
});
|
|
1637
|
+
case 6:
|
|
1638
|
+
return b = O.sent, O.abrupt("return", b == null ? void 0 : b.fetchContent);
|
|
1639
|
+
case 8:
|
|
1640
|
+
case "end":
|
|
1641
|
+
return O.stop();
|
|
1642
|
+
}
|
|
1643
|
+
}, a, this);
|
|
1644
|
+
}));
|
|
1645
|
+
function t(a, d) {
|
|
1646
|
+
return r.apply(this, arguments);
|
|
1647
|
+
}
|
|
1648
|
+
return t;
|
|
1649
|
+
}(), o.addItemToCart = /* @__PURE__ */ function() {
|
|
1650
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1651
|
+
var p, c, l, n, m;
|
|
1652
|
+
return _().wrap(function(R) {
|
|
1653
|
+
for (; ; )
|
|
1654
|
+
switch (R.prev = R.next) {
|
|
1655
|
+
case 0:
|
|
1656
|
+
return p = d.custom, c = p === void 0 ? {} : p, l = /* @__PURE__ */ Ht(d, kr), n = N({
|
|
1657
|
+
custom: c
|
|
1658
|
+
}, l, {
|
|
1659
|
+
accountUid: S(this, k)[k],
|
|
1660
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1661
|
+
}), R.next = 4, this.makeHttpRequest(zt, {
|
|
1662
|
+
input: n
|
|
1663
|
+
});
|
|
1664
|
+
case 4:
|
|
1665
|
+
return m = R.sent, R.abrupt("return", m == null ? void 0 : m.addItemToCart);
|
|
1666
|
+
case 6:
|
|
1667
|
+
case "end":
|
|
1668
|
+
return R.stop();
|
|
1669
|
+
}
|
|
1670
|
+
}, a, this);
|
|
1671
|
+
}));
|
|
1672
|
+
function t(a) {
|
|
1673
|
+
return r.apply(this, arguments);
|
|
1674
|
+
}
|
|
1675
|
+
return t;
|
|
1676
|
+
}(), o.applyCouponToCart = /* @__PURE__ */ function() {
|
|
1677
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1678
|
+
var p, c;
|
|
1679
|
+
return _().wrap(function(n) {
|
|
1680
|
+
for (; ; )
|
|
1681
|
+
switch (n.prev = n.next) {
|
|
1682
|
+
case 0:
|
|
1683
|
+
return p = N({}, d, {
|
|
1684
|
+
accountUid: S(this, k)[k],
|
|
1685
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1686
|
+
}), n.next = 3, this.makeHttpRequest(Zt, {
|
|
1687
|
+
input: p
|
|
1688
|
+
});
|
|
1689
|
+
case 3:
|
|
1690
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.applyCouponToCart);
|
|
1691
|
+
case 5:
|
|
1692
|
+
case "end":
|
|
1693
|
+
return n.stop();
|
|
1694
|
+
}
|
|
1695
|
+
}, a, this);
|
|
1696
|
+
}));
|
|
1697
|
+
function t(a) {
|
|
1698
|
+
return r.apply(this, arguments);
|
|
1699
|
+
}
|
|
1700
|
+
return t;
|
|
1701
|
+
}(), o.removeCouponFromCart = /* @__PURE__ */ function() {
|
|
1702
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1703
|
+
var p, c;
|
|
1704
|
+
return _().wrap(function(n) {
|
|
1705
|
+
for (; ; )
|
|
1706
|
+
switch (n.prev = n.next) {
|
|
1707
|
+
case 0:
|
|
1708
|
+
return p = N({}, d, {
|
|
1709
|
+
accountUid: S(this, k)[k],
|
|
1710
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1711
|
+
}), n.next = 3, this.makeHttpRequest(Qt, {
|
|
1712
|
+
input: p
|
|
1713
|
+
});
|
|
1714
|
+
case 3:
|
|
1715
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.removeCouponFromCart);
|
|
1716
|
+
case 5:
|
|
1717
|
+
case "end":
|
|
1718
|
+
return n.stop();
|
|
1719
|
+
}
|
|
1720
|
+
}, a, this);
|
|
1721
|
+
}));
|
|
1722
|
+
function t(a) {
|
|
1723
|
+
return r.apply(this, arguments);
|
|
1724
|
+
}
|
|
1725
|
+
return t;
|
|
1726
|
+
}(), o.fetchCart = /* @__PURE__ */ function() {
|
|
1727
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1728
|
+
var p, c;
|
|
1729
|
+
return _().wrap(function(n) {
|
|
1730
|
+
for (; ; )
|
|
1731
|
+
switch (n.prev = n.next) {
|
|
1732
|
+
case 0:
|
|
1733
|
+
return p = N({}, d, {
|
|
1734
|
+
accountUid: S(this, k)[k],
|
|
1735
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1736
|
+
}), n.next = 3, this.makeHttpRequest(er, {
|
|
1737
|
+
input: p
|
|
1738
|
+
});
|
|
1739
|
+
case 3:
|
|
1740
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.fetchCart);
|
|
1741
|
+
case 5:
|
|
1742
|
+
case "end":
|
|
1743
|
+
return n.stop();
|
|
1744
|
+
}
|
|
1745
|
+
}, a, this);
|
|
1746
|
+
}));
|
|
1747
|
+
function t(a) {
|
|
1748
|
+
return r.apply(this, arguments);
|
|
1749
|
+
}
|
|
1750
|
+
return t;
|
|
1751
|
+
}(), o.transferCart = /* @__PURE__ */ function() {
|
|
1752
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1753
|
+
var p, c;
|
|
1754
|
+
return _().wrap(function(n) {
|
|
1755
|
+
for (; ; )
|
|
1756
|
+
switch (n.prev = n.next) {
|
|
1757
|
+
case 0:
|
|
1758
|
+
return p = N({}, d, {
|
|
1759
|
+
accountUid: S(this, k)[k],
|
|
1760
|
+
accountAnonymousUid: S(this, D)[D]
|
|
1761
|
+
}), n.next = 3, this.makeHttpRequest(tr, {
|
|
1762
|
+
input: p
|
|
1763
|
+
});
|
|
1764
|
+
case 3:
|
|
1765
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.transferCart);
|
|
1766
|
+
case 5:
|
|
1767
|
+
case "end":
|
|
1768
|
+
return n.stop();
|
|
1769
|
+
}
|
|
1770
|
+
}, a, this);
|
|
1771
|
+
}));
|
|
1772
|
+
function t(a) {
|
|
1773
|
+
return r.apply(this, arguments);
|
|
1774
|
+
}
|
|
1775
|
+
return t;
|
|
1776
|
+
}(), o.fetchStoredPreferences = /* @__PURE__ */ function() {
|
|
1777
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a() {
|
|
1778
|
+
var d, p;
|
|
1779
|
+
return _().wrap(function(l) {
|
|
1780
|
+
for (; ; )
|
|
1781
|
+
switch (l.prev = l.next) {
|
|
1782
|
+
case 0:
|
|
1783
|
+
return d = {
|
|
1784
|
+
accountUid: S(this, k)[k]
|
|
1785
|
+
}, l.next = 3, this.makeHttpRequest(rr, {
|
|
1786
|
+
input: d
|
|
1787
|
+
});
|
|
1788
|
+
case 3:
|
|
1789
|
+
return p = l.sent, l.abrupt("return", p == null ? void 0 : p.fetchStoredPreferences.preferenceData);
|
|
1790
|
+
case 5:
|
|
1791
|
+
case "end":
|
|
1792
|
+
return l.stop();
|
|
1793
|
+
}
|
|
1794
|
+
}, a, this);
|
|
1795
|
+
}));
|
|
1796
|
+
function t() {
|
|
1797
|
+
return r.apply(this, arguments);
|
|
1798
|
+
}
|
|
1799
|
+
return t;
|
|
1800
|
+
}(), o.saveStoredPreferences = /* @__PURE__ */ function() {
|
|
1801
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1802
|
+
var p, c;
|
|
1803
|
+
return _().wrap(function(n) {
|
|
1804
|
+
for (; ; )
|
|
1805
|
+
switch (n.prev = n.next) {
|
|
1806
|
+
case 0:
|
|
1807
|
+
return p = {
|
|
1808
|
+
accountUid: S(this, k)[k],
|
|
1809
|
+
preferenceData: d
|
|
1810
|
+
}, n.next = 3, this.makeHttpRequest(nr, {
|
|
1811
|
+
input: p
|
|
1812
|
+
});
|
|
1813
|
+
case 3:
|
|
1814
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.saveStoredPreferences);
|
|
1815
|
+
case 5:
|
|
1816
|
+
case "end":
|
|
1817
|
+
return n.stop();
|
|
1818
|
+
}
|
|
1819
|
+
}, a, this);
|
|
1820
|
+
}));
|
|
1821
|
+
function t(a) {
|
|
1822
|
+
return r.apply(this, arguments);
|
|
1823
|
+
}
|
|
1824
|
+
return t;
|
|
1825
|
+
}(), o.fetchContacts = /* @__PURE__ */ function() {
|
|
1826
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a() {
|
|
1827
|
+
var d, p;
|
|
1828
|
+
return _().wrap(function(l) {
|
|
1829
|
+
for (; ; )
|
|
1830
|
+
switch (l.prev = l.next) {
|
|
1831
|
+
case 0:
|
|
1832
|
+
return d = {
|
|
1833
|
+
uid: S(this, k)[k]
|
|
1834
|
+
}, l.next = 3, this.makeHttpRequest(ar, {
|
|
1835
|
+
input: d
|
|
1836
|
+
});
|
|
1837
|
+
case 3:
|
|
1838
|
+
return p = l.sent, l.abrupt("return", p == null ? void 0 : p.fetchContacts.contacts);
|
|
1839
|
+
case 5:
|
|
1840
|
+
case "end":
|
|
1841
|
+
return l.stop();
|
|
1842
|
+
}
|
|
1843
|
+
}, a, this);
|
|
1844
|
+
}));
|
|
1845
|
+
function t() {
|
|
1846
|
+
return r.apply(this, arguments);
|
|
1847
|
+
}
|
|
1848
|
+
return t;
|
|
1849
|
+
}(), o.saveContacts = /* @__PURE__ */ function() {
|
|
1850
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1851
|
+
var p, c;
|
|
1852
|
+
return _().wrap(function(n) {
|
|
1853
|
+
for (; ; )
|
|
1854
|
+
switch (n.prev = n.next) {
|
|
1855
|
+
case 0:
|
|
1856
|
+
return p = {
|
|
1857
|
+
uid: S(this, k)[k],
|
|
1858
|
+
contacts: d
|
|
1859
|
+
}, n.next = 3, this.makeHttpRequest(ir, {
|
|
1860
|
+
input: p
|
|
1861
|
+
});
|
|
1862
|
+
case 3:
|
|
1863
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.saveContacts);
|
|
1864
|
+
case 5:
|
|
1865
|
+
case "end":
|
|
1866
|
+
return n.stop();
|
|
1867
|
+
}
|
|
1868
|
+
}, a, this);
|
|
1869
|
+
}));
|
|
1870
|
+
function t(a) {
|
|
1871
|
+
return r.apply(this, arguments);
|
|
1872
|
+
}
|
|
1873
|
+
return t;
|
|
1874
|
+
}(), o.upload = /* @__PURE__ */ function() {
|
|
1875
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1876
|
+
var p, c, l, n, m = this, b, R, O, z, Y, Z, F, I, ee;
|
|
1877
|
+
return _().wrap(function(X) {
|
|
1878
|
+
for (; ; )
|
|
1879
|
+
switch (X.prev = X.next) {
|
|
1880
|
+
case 0:
|
|
1881
|
+
return b = d.file, R = d.attribute, O = d.resource, z = {
|
|
1882
|
+
name: b.name,
|
|
1883
|
+
size: b.size,
|
|
1884
|
+
mimeType: b.type,
|
|
1885
|
+
attribute: R,
|
|
1886
|
+
resource: O,
|
|
1887
|
+
targetEnvironment: this.targetEnvironment
|
|
1888
|
+
}, X.next = 4, this.makeHttpRequest(or, {
|
|
1889
|
+
input: z
|
|
1890
|
+
});
|
|
1891
|
+
case 4:
|
|
1892
|
+
if (Y = X.sent, Z = Y == null || (p = Y.prepareAsset) == null ? void 0 : p.id, F = Y == null || (c = Y.prepareAsset) == null || (l = c.data) == null || (n = l.upload) == null ? void 0 : n.url, !(!F || !Z)) {
|
|
1893
|
+
X.next = 9;
|
|
1894
|
+
break;
|
|
1895
|
+
}
|
|
1896
|
+
throw new Error("Something went wrong");
|
|
1897
|
+
case 9:
|
|
1898
|
+
return X.next = 11, et(F, {
|
|
1899
|
+
method: "PUT",
|
|
1900
|
+
body: b,
|
|
1901
|
+
headers: {
|
|
1902
|
+
"Content-Type": b.type,
|
|
1903
|
+
"x-goog-meta-origin-id": Z
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
case 11:
|
|
1907
|
+
return I = Ar, ee = /* @__PURE__ */ function() {
|
|
1908
|
+
var ae = B(/* @__PURE__ */ _().mark(function re() {
|
|
1909
|
+
var te, ne;
|
|
1910
|
+
return _().wrap(function(i) {
|
|
1911
|
+
for (; ; )
|
|
1912
|
+
switch (i.prev = i.next) {
|
|
1913
|
+
case 0:
|
|
1914
|
+
return i.next = 2, m.getAsset({
|
|
1915
|
+
id: Z
|
|
1916
|
+
});
|
|
1917
|
+
case 2:
|
|
1918
|
+
if (te = i.sent, ne = te == null ? void 0 : te.uploadStatus, ne !== "UPLOADED") {
|
|
1919
|
+
i.next = 6;
|
|
1920
|
+
break;
|
|
1921
|
+
}
|
|
1922
|
+
return i.abrupt("return", Promise.resolve(te));
|
|
1923
|
+
case 6:
|
|
1924
|
+
return i.next = 8, new Promise(function(y) {
|
|
1925
|
+
return setTimeout(y, Or);
|
|
1926
|
+
});
|
|
1927
|
+
case 8:
|
|
1928
|
+
if (I--, I) {
|
|
1929
|
+
i.next = 11;
|
|
1930
|
+
break;
|
|
1931
|
+
}
|
|
1932
|
+
return i.abrupt("return", Promise.reject("Something went wrong."));
|
|
1933
|
+
case 11:
|
|
1934
|
+
return i.abrupt("return", ee());
|
|
1935
|
+
case 12:
|
|
1936
|
+
case "end":
|
|
1937
|
+
return i.stop();
|
|
1938
|
+
}
|
|
1939
|
+
}, re);
|
|
1940
|
+
}));
|
|
1941
|
+
return function() {
|
|
1942
|
+
return ae.apply(this, arguments);
|
|
1943
|
+
};
|
|
1944
|
+
}(), X.abrupt("return", ee());
|
|
1945
|
+
case 14:
|
|
1946
|
+
case "end":
|
|
1947
|
+
return X.stop();
|
|
1948
|
+
}
|
|
1949
|
+
}, a, this);
|
|
1950
|
+
}));
|
|
1951
|
+
function t(a) {
|
|
1952
|
+
return r.apply(this, arguments);
|
|
1953
|
+
}
|
|
1954
|
+
return t;
|
|
1955
|
+
}(), o.getAsset = /* @__PURE__ */ function() {
|
|
1956
|
+
var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
|
|
1957
|
+
var p, c;
|
|
1958
|
+
return _().wrap(function(n) {
|
|
1959
|
+
for (; ; )
|
|
1960
|
+
switch (n.prev = n.next) {
|
|
1961
|
+
case 0:
|
|
1962
|
+
return p = d.id, n.next = 3, this.makeHttpRequest(ur, {
|
|
1963
|
+
id: p
|
|
1964
|
+
});
|
|
1965
|
+
case 3:
|
|
1966
|
+
return c = n.sent, n.abrupt("return", c == null ? void 0 : c.asset);
|
|
1967
|
+
case 5:
|
|
1968
|
+
case "end":
|
|
1969
|
+
return n.stop();
|
|
1970
|
+
}
|
|
1971
|
+
}, a, this);
|
|
1972
|
+
}));
|
|
1973
|
+
function t(a) {
|
|
1974
|
+
return r.apply(this, arguments);
|
|
1975
|
+
}
|
|
1976
|
+
return t;
|
|
1977
|
+
}(), Nt(s, [{
|
|
1978
|
+
key: "accountAnonymousUid",
|
|
1979
|
+
set: function(t) {
|
|
1980
|
+
if (!Ie.test(t))
|
|
1981
|
+
throw new Error("Anonymous UID must be a valid UUID");
|
|
1982
|
+
S(this, D)[D] = t, $e("accountAnonymousUid", S(this, D)[D]);
|
|
1983
|
+
}
|
|
1984
|
+
}, {
|
|
1985
|
+
key: "accountUid",
|
|
1986
|
+
set: function(t) {
|
|
1987
|
+
t == null ? S(this, k)[k] = t : S(this, k)[k] = String(t), $e("accountUid", S(this, k)[k]);
|
|
1988
|
+
}
|
|
1989
|
+
}, {
|
|
1990
|
+
key: "identityToken",
|
|
1991
|
+
set: function(t) {
|
|
1992
|
+
t == null ? S(this, G)[G] = t : S(this, G)[G] = String(t), $e("identityToken", S(this, G)[G]);
|
|
1993
|
+
}
|
|
1994
|
+
}]), s;
|
|
1995
|
+
}(), jr = function(s) {
|
|
1996
|
+
return new Ir(s);
|
|
1997
|
+
}, xe = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
1998
|
+
const ot = Q.createContext(null);
|
|
1999
|
+
function Fr({
|
|
2000
|
+
children: s,
|
|
2001
|
+
publicKey: o,
|
|
2002
|
+
baseUri: r,
|
|
2003
|
+
targetEnvironment: t
|
|
2004
|
+
}) {
|
|
2005
|
+
const a = Q.useMemo(
|
|
2006
|
+
() => jr({
|
|
2007
|
+
publicKey: o || xe.REACT_APP_DASHX_PUBLIC_KEY,
|
|
2008
|
+
baseUri: r || xe.REACT_APP_DASHX_BASE_URI,
|
|
2009
|
+
targetEnvironment: t || xe.REACT_APP_TARGET_ENVIRONMENT
|
|
2010
|
+
}),
|
|
2011
|
+
[o, r, t]
|
|
2012
|
+
);
|
|
2013
|
+
return /* @__PURE__ */ L.jsx(ot.Provider, { value: a, children: s });
|
|
2014
|
+
}
|
|
2015
|
+
const $r = () => {
|
|
2016
|
+
const s = Q.useContext(ot);
|
|
2017
|
+
if (!s)
|
|
2018
|
+
throw new Error(
|
|
2019
|
+
"DashXProvider not initialized. Make sure your app is wrapped in DashXProvider."
|
|
2020
|
+
);
|
|
2021
|
+
return s;
|
|
2022
|
+
}, xr = ({
|
|
2023
|
+
preference: s,
|
|
2024
|
+
onChange: o
|
|
2025
|
+
}) => {
|
|
2026
|
+
const r = (t) => {
|
|
2027
|
+
o(t, s);
|
|
2028
|
+
};
|
|
2029
|
+
return /* @__PURE__ */ L.jsxs("div", { children: [
|
|
2030
|
+
/* @__PURE__ */ L.jsx("p", { children: s[0] }),
|
|
2031
|
+
/* @__PURE__ */ L.jsxs("label", { children: [
|
|
2032
|
+
"Email",
|
|
2033
|
+
/* @__PURE__ */ L.jsx(
|
|
2034
|
+
"input",
|
|
2035
|
+
{
|
|
2036
|
+
name: "email",
|
|
2037
|
+
type: "checkbox",
|
|
2038
|
+
defaultChecked: s[1].email,
|
|
2039
|
+
onChange: r
|
|
2040
|
+
}
|
|
2041
|
+
)
|
|
2042
|
+
] }),
|
|
2043
|
+
/* @__PURE__ */ L.jsxs("label", { children: [
|
|
2044
|
+
"Push",
|
|
2045
|
+
/* @__PURE__ */ L.jsx(
|
|
2046
|
+
"input",
|
|
2047
|
+
{
|
|
2048
|
+
name: "push",
|
|
2049
|
+
type: "checkbox",
|
|
2050
|
+
defaultChecked: s[1].push,
|
|
2051
|
+
onChange: r
|
|
2052
|
+
}
|
|
2053
|
+
)
|
|
2054
|
+
] }),
|
|
2055
|
+
/* @__PURE__ */ L.jsxs("label", { children: [
|
|
2056
|
+
"SMS",
|
|
2057
|
+
/* @__PURE__ */ L.jsx(
|
|
2058
|
+
"input",
|
|
2059
|
+
{
|
|
2060
|
+
name: "sms",
|
|
2061
|
+
type: "checkbox",
|
|
2062
|
+
defaultChecked: s[1].sms,
|
|
2063
|
+
onChange: r
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
2066
|
+
] }),
|
|
2067
|
+
/* @__PURE__ */ L.jsxs("label", { children: [
|
|
2068
|
+
"Whatsapp",
|
|
2069
|
+
/* @__PURE__ */ L.jsx(
|
|
2070
|
+
"input",
|
|
2071
|
+
{
|
|
2072
|
+
name: "whatsapp",
|
|
2073
|
+
type: "checkbox",
|
|
2074
|
+
defaultChecked: s[1].whatsapp,
|
|
2075
|
+
onChange: r
|
|
2076
|
+
}
|
|
2077
|
+
)
|
|
2078
|
+
] }),
|
|
2079
|
+
/* @__PURE__ */ L.jsx("br", {})
|
|
2080
|
+
] });
|
|
2081
|
+
};
|
|
2082
|
+
function Ur({
|
|
2083
|
+
preference: s,
|
|
2084
|
+
onChange: o,
|
|
2085
|
+
renderPreference: r = xr
|
|
2086
|
+
}) {
|
|
2087
|
+
return r({ preference: s, onChange: o });
|
|
2088
|
+
}
|
|
2089
|
+
const Dr = ({
|
|
2090
|
+
preferences: s,
|
|
2091
|
+
onChange: o,
|
|
2092
|
+
loading: r
|
|
2093
|
+
}) => s ? /* @__PURE__ */ L.jsx(L.Fragment, { children: s.map((t) => /* @__PURE__ */ L.jsx(
|
|
2094
|
+
Ur,
|
|
2095
|
+
{
|
|
2096
|
+
preference: t,
|
|
2097
|
+
onChange: o
|
|
2098
|
+
},
|
|
2099
|
+
t[0]
|
|
2100
|
+
)) }) : r ? /* @__PURE__ */ L.jsx(L.Fragment, { children: "Loading..." }) : /* @__PURE__ */ L.jsx(L.Fragment, { children: "An unexpected error ocurred" });
|
|
2101
|
+
function qr({
|
|
2102
|
+
renderPreferences: s = Dr
|
|
2103
|
+
}) {
|
|
2104
|
+
const o = $r(), [r, t] = Q.useState(null), [a, d] = Q.useState(!0), [p, c] = Q.useState(null), [l, n] = Q.useState(!1), m = (b, R) => {
|
|
2105
|
+
n(!0);
|
|
2106
|
+
const [O, z] = R;
|
|
2107
|
+
t((Y) => ({
|
|
2108
|
+
...Y || {},
|
|
2109
|
+
[O]: {
|
|
2110
|
+
...z,
|
|
2111
|
+
[b.target.name]: b.target.checked
|
|
2112
|
+
}
|
|
2113
|
+
}));
|
|
2114
|
+
};
|
|
2115
|
+
return Q.useEffect(() => {
|
|
2116
|
+
if (!l)
|
|
2117
|
+
return;
|
|
2118
|
+
const b = setTimeout(async () => {
|
|
2119
|
+
await o.saveStoredPreferences(r), n(!1);
|
|
2120
|
+
}, 100);
|
|
2121
|
+
return () => clearTimeout(b);
|
|
2122
|
+
}, [r, l, o]), Q.useEffect(() => {
|
|
2123
|
+
async function b() {
|
|
2124
|
+
d(!0);
|
|
2125
|
+
try {
|
|
2126
|
+
const R = await o.fetchStoredPreferences();
|
|
2127
|
+
t(R);
|
|
2128
|
+
} catch (R) {
|
|
2129
|
+
c(R);
|
|
2130
|
+
} finally {
|
|
2131
|
+
d(!1);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
b();
|
|
2135
|
+
}, [o]), s({
|
|
2136
|
+
preferences: r && Object.entries(r).map(([b, R]) => [b, R]),
|
|
2137
|
+
onChange: m,
|
|
2138
|
+
loading: a,
|
|
2139
|
+
error: p
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
export {
|
|
2143
|
+
Fr as DashXProvider,
|
|
2144
|
+
Ur as Preference,
|
|
2145
|
+
qr as Preferences,
|
|
2146
|
+
$r as useDashXProvider
|
|
2147
|
+
};
|