@ozdao/prometheus-framework 0.0.85 → 0.0.86

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs +138 -0
  2. package/dist/ButtonFollow-728aab73.mjs +130 -0
  3. package/dist/CardHeader-ce5a1a75.mjs +96 -0
  4. package/dist/CardOrganization-58b54995.js +1 -0
  5. package/dist/CardOrganization-91e79698.mjs +320 -0
  6. package/dist/Comments-c092550f.mjs +76 -0
  7. package/dist/EditProductImages-61ff4321.mjs +236 -0
  8. package/dist/Feed-926cf4f3.mjs +355 -0
  9. package/dist/Feed-a31c43c2.mjs +423 -0
  10. package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
  11. package/dist/Popup-0c791801.mjs +76 -0
  12. package/dist/Product-6c37ef35.js +7 -0
  13. package/dist/Product-7087b358.mjs +837 -0
  14. package/dist/ProductEdit-c5067942.mjs +113 -0
  15. package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
  16. package/dist/ProfileComments-48f3d4bc.mjs +43 -0
  17. package/dist/ProfileEvents-20695376.mjs +55 -0
  18. package/dist/ProfileLikes-503712ec.mjs +43 -0
  19. package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
  20. package/dist/ProfileOrganizations-50fce34e.js +1 -0
  21. package/dist/Publics-49dbeafc.js +1 -0
  22. package/dist/Publics-b0fad2b0.mjs +1926 -0
  23. package/dist/UploadImage-d1dbc280.mjs +99 -0
  24. package/dist/auth-35ef1791.mjs +1502 -0
  25. package/dist/auth.client.js +3 -3
  26. package/dist/auth.validation-29113f37.mjs +20 -0
  27. package/dist/categories-d669f3af.mjs +225 -0
  28. package/dist/community.client.cjs +1 -1
  29. package/dist/community.client.js +11 -11
  30. package/dist/events.client.js +9 -9
  31. package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
  32. package/dist/organizations.client.cjs +2 -2
  33. package/dist/organizations.client.js +17 -17
  34. package/dist/organizations.server.js +1 -1
  35. package/dist/organizations.server.mjs +1 -1
  36. package/dist/style.css +1 -1
  37. package/dist/users.client.cjs +1 -1
  38. package/dist/users.client.js +244 -207
  39. package/package.json +1 -1
  40. package/src/modules/icons/entities/IconCommunity.vue +8 -0
  41. package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
  42. package/src/modules/organizations/components/sections/Publics.vue +1 -0
  43. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  44. package/src/modules/users/components/pages/Profile.vue +15 -4
@@ -0,0 +1,1502 @@
1
+ import { ref as H, openBlock as C, createElementBlock as _, Fragment as At, createElementVNode as h, normalizeClass as Nt, toDisplayString as ge, createCommentVNode as j, createVNode as J, Transition as V, withCtx as W, withModifiers as Tt, renderSlot as Pt, createTextVNode as M, reactive as at, watch as st } from "vue";
2
+ import { s as P } from "./globals-96ba60e4.mjs";
3
+ const Dt = (e, t) => {
4
+ const r = e.__vccOpts || e;
5
+ for (const [s, n] of t)
6
+ r[s] = n;
7
+ return r;
8
+ }, Ut = {
9
+ key: 0,
10
+ class: "t-transp mn-r-small"
11
+ }, Bt = { class: "w-100" }, kt = ["type", "value", "placeholder"], Lt = ["value", "placeholder"], jt = {
12
+ key: 0,
13
+ class: "mn-t-thin mn-thin mn-b-thin invalid-feedback"
14
+ }, qt = {
15
+ __name: "Field",
16
+ props: {
17
+ label: null,
18
+ type: "text",
19
+ placeholder: "Enter something here",
20
+ field: null,
21
+ validation: !1
22
+ },
23
+ emits: ["update:field", "focus", "blur"],
24
+ setup(e, { emit: t }) {
25
+ const s = H(e.field);
26
+ return (n, a) => (C(), _(At, null, [
27
+ h("div", {
28
+ class: Nt([[n.$attrs.class, { "bg-fourth-nano": e.validation }], "flex-center flex-nowrap flex"])
29
+ }, [
30
+ e.label ? (C(), _("div", Ut, [
31
+ h("span", null, ge(e.label), 1)
32
+ ])) : j("", !0),
33
+ h("div", Bt, [
34
+ e.type !== "textarea" ? (C(), _("input", {
35
+ key: 0,
36
+ onInput: a[0] || (a[0] = (i) => s.value = t("update:field", i.target.value)),
37
+ onFocus: a[1] || (a[1] = (i) => t("focus", i)),
38
+ onBlur: a[2] || (a[2] = (i) => t("blur", i)),
39
+ type: e.type,
40
+ class: "w-100",
41
+ value: e.field,
42
+ placeholder: e.placeholder
43
+ }, null, 40, kt)) : (C(), _("textarea", {
44
+ key: 1,
45
+ onInput: a[3] || (a[3] = (i) => s.value = t("update:field", i.target.value)),
46
+ onFocus: a[4] || (a[4] = (i) => t("focus", i)),
47
+ onBlur: a[5] || (a[5] = (i) => t("blur", i)),
48
+ class: "w-100",
49
+ value: e.field,
50
+ placeholder: e.placeholder
51
+ }, null, 40, Lt))
52
+ ])
53
+ ], 2),
54
+ J(V, { name: "fade" }, {
55
+ default: W(() => [
56
+ e.validation ? (C(), _("div", jt, " * " + ge(e.validation.message), 1)) : j("", !0)
57
+ ]),
58
+ _: 1
59
+ })
60
+ ], 64));
61
+ }
62
+ }, fn = /* @__PURE__ */ Dt(qt, [["__scopeId", "data-v-484b1828"]]);
63
+ const Ft = ["onClick", "disabled"], It = { key: 0 }, $t = {
64
+ key: 0,
65
+ class: "loading"
66
+ }, Mt = /* @__PURE__ */ h("span", null, [
67
+ /* @__PURE__ */ h("svg", {
68
+ class: "i-small",
69
+ width: "135",
70
+ height: "140",
71
+ viewBox: "0 0 135 140",
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ fill: "#fff"
74
+ }, [
75
+ /* @__PURE__ */ h("rect", {
76
+ y: "10",
77
+ width: "15",
78
+ height: "120",
79
+ rx: "6"
80
+ }, [
81
+ /* @__PURE__ */ h("animate", {
82
+ attributeName: "height",
83
+ begin: "0.5s",
84
+ dur: "1s",
85
+ values: "120;110;100;90;80;70;60;50;40;140;120",
86
+ calcMode: "linear",
87
+ repeatCount: "indefinite"
88
+ }),
89
+ /* @__PURE__ */ M(),
90
+ /* @__PURE__ */ h("animate", {
91
+ attributeName: "y",
92
+ begin: "0.5s",
93
+ dur: "1s",
94
+ values: "10;15;20;25;30;35;40;45;50;0;10",
95
+ calcMode: "linear",
96
+ repeatCount: "indefinite"
97
+ })
98
+ ]),
99
+ /* @__PURE__ */ h("rect", {
100
+ x: "30",
101
+ y: "10",
102
+ width: "15",
103
+ height: "120",
104
+ rx: "6"
105
+ }, [
106
+ /* @__PURE__ */ h("animate", {
107
+ attributeName: "height",
108
+ begin: "0.25s",
109
+ dur: "1s",
110
+ values: "120;110;100;90;80;70;60;50;40;140;120",
111
+ calcMode: "linear",
112
+ repeatCount: "indefinite"
113
+ }),
114
+ /* @__PURE__ */ M(),
115
+ /* @__PURE__ */ h("animate", {
116
+ attributeName: "y",
117
+ begin: "0.25s",
118
+ dur: "1s",
119
+ values: "10;15;20;25;30;35;40;45;50;0;10",
120
+ calcMode: "linear",
121
+ repeatCount: "indefinite"
122
+ })
123
+ ]),
124
+ /* @__PURE__ */ h("rect", {
125
+ x: "60",
126
+ width: "15",
127
+ height: "140",
128
+ rx: "6"
129
+ }, [
130
+ /* @__PURE__ */ h("animate", {
131
+ attributeName: "height",
132
+ begin: "0s",
133
+ dur: "1s",
134
+ values: "120;110;100;90;80;70;60;50;40;140;120",
135
+ calcMode: "linear",
136
+ repeatCount: "indefinite"
137
+ }),
138
+ /* @__PURE__ */ M(),
139
+ /* @__PURE__ */ h("animate", {
140
+ attributeName: "y",
141
+ begin: "0s",
142
+ dur: "1s",
143
+ values: "10;15;20;25;30;35;40;45;50;0;10",
144
+ calcMode: "linear",
145
+ repeatCount: "indefinite"
146
+ })
147
+ ]),
148
+ /* @__PURE__ */ h("rect", {
149
+ x: "90",
150
+ y: "10",
151
+ width: "15",
152
+ height: "120",
153
+ rx: "6"
154
+ }, [
155
+ /* @__PURE__ */ h("animate", {
156
+ attributeName: "height",
157
+ begin: "0.25s",
158
+ dur: "1s",
159
+ values: "120;110;100;90;80;70;60;50;40;140;120",
160
+ calcMode: "linear",
161
+ repeatCount: "indefinite"
162
+ }),
163
+ /* @__PURE__ */ M(),
164
+ /* @__PURE__ */ h("animate", {
165
+ attributeName: "y",
166
+ begin: "0.25s",
167
+ dur: "1s",
168
+ values: "10;15;20;25;30;35;40;45;50;0;10",
169
+ calcMode: "linear",
170
+ repeatCount: "indefinite"
171
+ })
172
+ ]),
173
+ /* @__PURE__ */ h("rect", {
174
+ x: "120",
175
+ y: "10",
176
+ width: "15",
177
+ height: "120",
178
+ rx: "6"
179
+ }, [
180
+ /* @__PURE__ */ h("animate", {
181
+ attributeName: "height",
182
+ begin: "0.5s",
183
+ dur: "1s",
184
+ values: "120;110;100;90;80;70;60;50;40;140;120",
185
+ calcMode: "linear",
186
+ repeatCount: "indefinite"
187
+ }),
188
+ /* @__PURE__ */ M(),
189
+ /* @__PURE__ */ h("animate", {
190
+ attributeName: "y",
191
+ begin: "0.5s",
192
+ dur: "1s",
193
+ values: "10;15;20;25;30;35;40;45;50;0;10",
194
+ calcMode: "linear",
195
+ repeatCount: "indefinite"
196
+ })
197
+ ])
198
+ ])
199
+ ], -1), Ht = [
200
+ Mt
201
+ ], Jt = {
202
+ key: 0,
203
+ class: "h4 loading"
204
+ }, Vt = /* @__PURE__ */ h("span", { class: "p-small t-white" }, "✔", -1), Wt = [
205
+ Vt
206
+ ], zt = {
207
+ key: 0,
208
+ class: "error"
209
+ }, dn = {
210
+ __name: "Button",
211
+ props: {
212
+ submit: {
213
+ type: Function,
214
+ default: async () => {
215
+ console.log("Button click.");
216
+ }
217
+ },
218
+ callback: {
219
+ type: Function,
220
+ default: async () => {
221
+ console.log("Button callback.");
222
+ }
223
+ },
224
+ callbackDelay: {
225
+ type: Number,
226
+ default: 750
227
+ },
228
+ validation: {
229
+ type: Boolean,
230
+ default: !1
231
+ }
232
+ },
233
+ setup(e) {
234
+ const t = e, r = H(null), s = H(null), n = H(!1), a = H(!1);
235
+ async function i() {
236
+ r.value.style["pointer-events"] = "none", s.value = null, n.value = !0;
237
+ try {
238
+ await t.submit(), r.value.classList.replace("bg-main", "bg-light-main"), n.value = !1, a.value = !0, setTimeout(() => {
239
+ r.value && (r.value.classList.replace("bg-light-main", "bg-main"), r.value.style.pointerEvents = "auto", n.value = !1, a.value = !1, s.value = null);
240
+ }, 500), t.callback && setTimeout(() => t.callback(), t.callbackDelay);
241
+ } catch {
242
+ r.value.classList.replace("bg-main", "bg-fourth-nano"), s.value = "❌", setTimeout(() => {
243
+ r.value.classList.replace("bg-fourth-nano", "bg-main"), r.value.style.pointerEvents = "auto", n.value = !1, a.value = !1, s.value = null;
244
+ }, 1330);
245
+ }
246
+ }
247
+ return (o, l) => (C(), _("button", {
248
+ onClick: Tt(i, ["stop"]),
249
+ disabled: e.validation,
250
+ ref_key: "button",
251
+ ref: r,
252
+ class: "w-100 bg-main button"
253
+ }, [
254
+ J(V, {
255
+ mode: "out-in",
256
+ name: "fadeIn"
257
+ }, {
258
+ default: W(() => [
259
+ !n.value && !s.value && !a.value ? (C(), _("span", It, [
260
+ Pt(o.$slots, "default")
261
+ ])) : j("", !0)
262
+ ]),
263
+ _: 3
264
+ }),
265
+ J(V, {
266
+ mode: "out-in",
267
+ name: "fadeIn"
268
+ }, {
269
+ default: W(() => [
270
+ n.value && !s.value ? (C(), _("div", $t, Ht)) : j("", !0)
271
+ ]),
272
+ _: 1
273
+ }),
274
+ J(V, {
275
+ mode: "out-in",
276
+ name: "fadeIn"
277
+ }, {
278
+ default: W(() => [
279
+ a.value ? (C(), _("div", Jt, Wt)) : j("", !0)
280
+ ]),
281
+ _: 1
282
+ }),
283
+ J(V, {
284
+ mode: "out-in",
285
+ name: "fadeIn"
286
+ }, {
287
+ default: W(() => [
288
+ s.value ? (C(), _("div", zt, [
289
+ h("span", null, ge(s.value), 1)
290
+ ])) : j("", !0)
291
+ ]),
292
+ _: 1
293
+ })
294
+ ], 8, Ft));
295
+ }
296
+ };
297
+ function it(e) {
298
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
299
+ }
300
+ var Ce = { exports: {} }, ot = function(t, r) {
301
+ return function() {
302
+ for (var n = new Array(arguments.length), a = 0; a < n.length; a++)
303
+ n[a] = arguments[a];
304
+ return t.apply(r, n);
305
+ };
306
+ }, Xt = ot, _e = Object.prototype.toString, xe = function(e) {
307
+ return function(t) {
308
+ var r = _e.call(t);
309
+ return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
310
+ };
311
+ }(/* @__PURE__ */ Object.create(null));
312
+ function D(e) {
313
+ return e = e.toLowerCase(), function(r) {
314
+ return xe(r) === e;
315
+ };
316
+ }
317
+ function Se(e) {
318
+ return Array.isArray(e);
319
+ }
320
+ function Y(e) {
321
+ return typeof e > "u";
322
+ }
323
+ function Kt(e) {
324
+ return e !== null && !Y(e) && e.constructor !== null && !Y(e.constructor) && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
325
+ }
326
+ var ut = D("ArrayBuffer");
327
+ function Qt(e) {
328
+ var t;
329
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ut(e.buffer), t;
330
+ }
331
+ function Yt(e) {
332
+ return typeof e == "string";
333
+ }
334
+ function Gt(e) {
335
+ return typeof e == "number";
336
+ }
337
+ function lt(e) {
338
+ return e !== null && typeof e == "object";
339
+ }
340
+ function K(e) {
341
+ if (xe(e) !== "object")
342
+ return !1;
343
+ var t = Object.getPrototypeOf(e);
344
+ return t === null || t === Object.prototype;
345
+ }
346
+ var Zt = D("Date"), er = D("File"), tr = D("Blob"), rr = D("FileList");
347
+ function Ae(e) {
348
+ return _e.call(e) === "[object Function]";
349
+ }
350
+ function nr(e) {
351
+ return lt(e) && Ae(e.pipe);
352
+ }
353
+ function ar(e) {
354
+ var t = "[object FormData]";
355
+ return e && (typeof FormData == "function" && e instanceof FormData || _e.call(e) === t || Ae(e.toString) && e.toString() === t);
356
+ }
357
+ var sr = D("URLSearchParams");
358
+ function ir(e) {
359
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
360
+ }
361
+ function or() {
362
+ return typeof navigator < "u" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS") ? !1 : typeof window < "u" && typeof document < "u";
363
+ }
364
+ function Ne(e, t) {
365
+ if (!(e === null || typeof e > "u"))
366
+ if (typeof e != "object" && (e = [e]), Se(e))
367
+ for (var r = 0, s = e.length; r < s; r++)
368
+ t.call(null, e[r], r, e);
369
+ else
370
+ for (var n in e)
371
+ Object.prototype.hasOwnProperty.call(e, n) && t.call(null, e[n], n, e);
372
+ }
373
+ function Oe() {
374
+ var e = {};
375
+ function t(n, a) {
376
+ K(e[a]) && K(n) ? e[a] = Oe(e[a], n) : K(n) ? e[a] = Oe({}, n) : Se(n) ? e[a] = n.slice() : e[a] = n;
377
+ }
378
+ for (var r = 0, s = arguments.length; r < s; r++)
379
+ Ne(arguments[r], t);
380
+ return e;
381
+ }
382
+ function ur(e, t, r) {
383
+ return Ne(t, function(n, a) {
384
+ r && typeof n == "function" ? e[a] = Xt(n, r) : e[a] = n;
385
+ }), e;
386
+ }
387
+ function lr(e) {
388
+ return e.charCodeAt(0) === 65279 && (e = e.slice(1)), e;
389
+ }
390
+ function cr(e, t, r, s) {
391
+ e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, r && Object.assign(e.prototype, r);
392
+ }
393
+ function fr(e, t, r) {
394
+ var s, n, a, i = {};
395
+ t = t || {};
396
+ do {
397
+ for (s = Object.getOwnPropertyNames(e), n = s.length; n-- > 0; )
398
+ a = s[n], i[a] || (t[a] = e[a], i[a] = !0);
399
+ e = Object.getPrototypeOf(e);
400
+ } while (e && (!r || r(e, t)) && e !== Object.prototype);
401
+ return t;
402
+ }
403
+ function dr(e, t, r) {
404
+ e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
405
+ var s = e.indexOf(t, r);
406
+ return s !== -1 && s === r;
407
+ }
408
+ function pr(e) {
409
+ if (!e)
410
+ return null;
411
+ var t = e.length;
412
+ if (Y(t))
413
+ return null;
414
+ for (var r = new Array(t); t-- > 0; )
415
+ r[t] = e[t];
416
+ return r;
417
+ }
418
+ var hr = function(e) {
419
+ return function(t) {
420
+ return e && t instanceof e;
421
+ };
422
+ }(typeof Uint8Array < "u" && Object.getPrototypeOf(Uint8Array)), b = {
423
+ isArray: Se,
424
+ isArrayBuffer: ut,
425
+ isBuffer: Kt,
426
+ isFormData: ar,
427
+ isArrayBufferView: Qt,
428
+ isString: Yt,
429
+ isNumber: Gt,
430
+ isObject: lt,
431
+ isPlainObject: K,
432
+ isUndefined: Y,
433
+ isDate: Zt,
434
+ isFile: er,
435
+ isBlob: tr,
436
+ isFunction: Ae,
437
+ isStream: nr,
438
+ isURLSearchParams: sr,
439
+ isStandardBrowserEnv: or,
440
+ forEach: Ne,
441
+ merge: Oe,
442
+ extend: ur,
443
+ trim: ir,
444
+ stripBOM: lr,
445
+ inherits: cr,
446
+ toFlatObject: fr,
447
+ kindOf: xe,
448
+ kindOfTest: D,
449
+ endsWith: dr,
450
+ toArray: pr,
451
+ isTypedArray: hr,
452
+ isFileList: rr
453
+ }, k = b;
454
+ function ke(e) {
455
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
456
+ }
457
+ var ct = function(t, r, s) {
458
+ if (!r)
459
+ return t;
460
+ var n;
461
+ if (s)
462
+ n = s(r);
463
+ else if (k.isURLSearchParams(r))
464
+ n = r.toString();
465
+ else {
466
+ var a = [];
467
+ k.forEach(r, function(l, f) {
468
+ l === null || typeof l > "u" || (k.isArray(l) ? f = f + "[]" : l = [l], k.forEach(l, function(d) {
469
+ k.isDate(d) ? d = d.toISOString() : k.isObject(d) && (d = JSON.stringify(d)), a.push(ke(f) + "=" + ke(d));
470
+ }));
471
+ }), n = a.join("&");
472
+ }
473
+ if (n) {
474
+ var i = t.indexOf("#");
475
+ i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + n;
476
+ }
477
+ return t;
478
+ }, vr = b;
479
+ function Z() {
480
+ this.handlers = [];
481
+ }
482
+ Z.prototype.use = function(t, r, s) {
483
+ return this.handlers.push({
484
+ fulfilled: t,
485
+ rejected: r,
486
+ synchronous: s ? s.synchronous : !1,
487
+ runWhen: s ? s.runWhen : null
488
+ }), this.handlers.length - 1;
489
+ };
490
+ Z.prototype.eject = function(t) {
491
+ this.handlers[t] && (this.handlers[t] = null);
492
+ };
493
+ Z.prototype.forEach = function(t) {
494
+ vr.forEach(this.handlers, function(s) {
495
+ s !== null && t(s);
496
+ });
497
+ };
498
+ var mr = Z, yr = b, br = function(t, r) {
499
+ yr.forEach(t, function(n, a) {
500
+ a !== r && a.toUpperCase() === r.toUpperCase() && (t[r] = n, delete t[a]);
501
+ });
502
+ }, ft = b;
503
+ function q(e, t, r, s, n) {
504
+ Error.call(this), this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), s && (this.request = s), n && (this.response = n);
505
+ }
506
+ ft.inherits(q, Error, {
507
+ toJSON: function() {
508
+ return {
509
+ // Standard
510
+ message: this.message,
511
+ name: this.name,
512
+ // Microsoft
513
+ description: this.description,
514
+ number: this.number,
515
+ // Mozilla
516
+ fileName: this.fileName,
517
+ lineNumber: this.lineNumber,
518
+ columnNumber: this.columnNumber,
519
+ stack: this.stack,
520
+ // Axios
521
+ config: this.config,
522
+ code: this.code,
523
+ status: this.response && this.response.status ? this.response.status : null
524
+ };
525
+ }
526
+ });
527
+ var dt = q.prototype, pt = {};
528
+ [
529
+ "ERR_BAD_OPTION_VALUE",
530
+ "ERR_BAD_OPTION",
531
+ "ECONNABORTED",
532
+ "ETIMEDOUT",
533
+ "ERR_NETWORK",
534
+ "ERR_FR_TOO_MANY_REDIRECTS",
535
+ "ERR_DEPRECATED",
536
+ "ERR_BAD_RESPONSE",
537
+ "ERR_BAD_REQUEST",
538
+ "ERR_CANCELED"
539
+ // eslint-disable-next-line func-names
540
+ ].forEach(function(e) {
541
+ pt[e] = { value: e };
542
+ });
543
+ Object.defineProperties(q, pt);
544
+ Object.defineProperty(dt, "isAxiosError", { value: !0 });
545
+ q.from = function(e, t, r, s, n, a) {
546
+ var i = Object.create(dt);
547
+ return ft.toFlatObject(e, i, function(l) {
548
+ return l !== Error.prototype;
549
+ }), q.call(i, e.message, t, r, s, n), i.name = e.name, a && Object.assign(i, a), i;
550
+ };
551
+ var I = q, ht = {
552
+ silentJSONParsing: !0,
553
+ forcedJSONParsing: !0,
554
+ clarifyTimeoutError: !1
555
+ }, O = b;
556
+ function wr(e, t) {
557
+ t = t || new FormData();
558
+ var r = [];
559
+ function s(a) {
560
+ return a === null ? "" : O.isDate(a) ? a.toISOString() : O.isArrayBuffer(a) || O.isTypedArray(a) ? typeof Blob == "function" ? new Blob([a]) : Buffer.from(a) : a;
561
+ }
562
+ function n(a, i) {
563
+ if (O.isPlainObject(a) || O.isArray(a)) {
564
+ if (r.indexOf(a) !== -1)
565
+ throw Error("Circular reference detected in " + i);
566
+ r.push(a), O.forEach(a, function(l, f) {
567
+ if (!O.isUndefined(l)) {
568
+ var c = i ? i + "." + f : f, d;
569
+ if (l && !i && typeof l == "object") {
570
+ if (O.endsWith(f, "{}"))
571
+ l = JSON.stringify(l);
572
+ else if (O.endsWith(f, "[]") && (d = O.toArray(l))) {
573
+ d.forEach(function(u) {
574
+ !O.isUndefined(u) && t.append(c, s(u));
575
+ });
576
+ return;
577
+ }
578
+ }
579
+ n(l, c);
580
+ }
581
+ }), r.pop();
582
+ } else
583
+ t.append(i, s(a));
584
+ }
585
+ return n(e), t;
586
+ }
587
+ var vt = wr, ie, Le;
588
+ function Er() {
589
+ if (Le)
590
+ return ie;
591
+ Le = 1;
592
+ var e = I;
593
+ return ie = function(r, s, n) {
594
+ var a = n.config.validateStatus;
595
+ !n.status || !a || a(n.status) ? r(n) : s(new e(
596
+ "Request failed with status code " + n.status,
597
+ [e.ERR_BAD_REQUEST, e.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
598
+ n.config,
599
+ n.request,
600
+ n
601
+ ));
602
+ }, ie;
603
+ }
604
+ var oe, je;
605
+ function Rr() {
606
+ if (je)
607
+ return oe;
608
+ je = 1;
609
+ var e = b;
610
+ return oe = e.isStandardBrowserEnv() ? (
611
+ // Standard browser envs support document.cookie
612
+ function() {
613
+ return {
614
+ write: function(s, n, a, i, o, l) {
615
+ var f = [];
616
+ f.push(s + "=" + encodeURIComponent(n)), e.isNumber(a) && f.push("expires=" + new Date(a).toGMTString()), e.isString(i) && f.push("path=" + i), e.isString(o) && f.push("domain=" + o), l === !0 && f.push("secure"), document.cookie = f.join("; ");
617
+ },
618
+ read: function(s) {
619
+ var n = document.cookie.match(new RegExp("(^|;\\s*)(" + s + ")=([^;]*)"));
620
+ return n ? decodeURIComponent(n[3]) : null;
621
+ },
622
+ remove: function(s) {
623
+ this.write(s, "", Date.now() - 864e5);
624
+ }
625
+ };
626
+ }()
627
+ ) : (
628
+ // Non standard browser env (web workers, react-native) lack needed support.
629
+ function() {
630
+ return {
631
+ write: function() {
632
+ },
633
+ read: function() {
634
+ return null;
635
+ },
636
+ remove: function() {
637
+ }
638
+ };
639
+ }()
640
+ ), oe;
641
+ }
642
+ var gr = function(t) {
643
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
644
+ }, Or = function(t, r) {
645
+ return r ? t.replace(/\/+$/, "") + "/" + r.replace(/^\/+/, "") : t;
646
+ }, Cr = gr, _r = Or, mt = function(t, r) {
647
+ return t && !Cr(r) ? _r(t, r) : r;
648
+ }, ue, qe;
649
+ function xr() {
650
+ if (qe)
651
+ return ue;
652
+ qe = 1;
653
+ var e = b, t = [
654
+ "age",
655
+ "authorization",
656
+ "content-length",
657
+ "content-type",
658
+ "etag",
659
+ "expires",
660
+ "from",
661
+ "host",
662
+ "if-modified-since",
663
+ "if-unmodified-since",
664
+ "last-modified",
665
+ "location",
666
+ "max-forwards",
667
+ "proxy-authorization",
668
+ "referer",
669
+ "retry-after",
670
+ "user-agent"
671
+ ];
672
+ return ue = function(s) {
673
+ var n = {}, a, i, o;
674
+ return s && e.forEach(s.split(`
675
+ `), function(f) {
676
+ if (o = f.indexOf(":"), a = e.trim(f.substr(0, o)).toLowerCase(), i = e.trim(f.substr(o + 1)), a) {
677
+ if (n[a] && t.indexOf(a) >= 0)
678
+ return;
679
+ a === "set-cookie" ? n[a] = (n[a] ? n[a] : []).concat([i]) : n[a] = n[a] ? n[a] + ", " + i : i;
680
+ }
681
+ }), n;
682
+ }, ue;
683
+ }
684
+ var le, Fe;
685
+ function Sr() {
686
+ if (Fe)
687
+ return le;
688
+ Fe = 1;
689
+ var e = b;
690
+ return le = e.isStandardBrowserEnv() ? (
691
+ // Standard browser envs have full support of the APIs needed to test
692
+ // whether the request URL is of the same origin as current location.
693
+ function() {
694
+ var r = /(msie|trident)/i.test(navigator.userAgent), s = document.createElement("a"), n;
695
+ function a(i) {
696
+ var o = i;
697
+ return r && (s.setAttribute("href", o), o = s.href), s.setAttribute("href", o), {
698
+ href: s.href,
699
+ protocol: s.protocol ? s.protocol.replace(/:$/, "") : "",
700
+ host: s.host,
701
+ search: s.search ? s.search.replace(/^\?/, "") : "",
702
+ hash: s.hash ? s.hash.replace(/^#/, "") : "",
703
+ hostname: s.hostname,
704
+ port: s.port,
705
+ pathname: s.pathname.charAt(0) === "/" ? s.pathname : "/" + s.pathname
706
+ };
707
+ }
708
+ return n = a(window.location.href), function(o) {
709
+ var l = e.isString(o) ? a(o) : o;
710
+ return l.protocol === n.protocol && l.host === n.host;
711
+ };
712
+ }()
713
+ ) : (
714
+ // Non standard browser envs (web workers, react-native) lack needed support.
715
+ function() {
716
+ return function() {
717
+ return !0;
718
+ };
719
+ }()
720
+ ), le;
721
+ }
722
+ var ce, Ie;
723
+ function ee() {
724
+ if (Ie)
725
+ return ce;
726
+ Ie = 1;
727
+ var e = I, t = b;
728
+ function r(s) {
729
+ e.call(this, s ?? "canceled", e.ERR_CANCELED), this.name = "CanceledError";
730
+ }
731
+ return t.inherits(r, e, {
732
+ __CANCEL__: !0
733
+ }), ce = r, ce;
734
+ }
735
+ var fe, $e;
736
+ function Ar() {
737
+ return $e || ($e = 1, fe = function(t) {
738
+ var r = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
739
+ return r && r[1] || "";
740
+ }), fe;
741
+ }
742
+ var de, Me;
743
+ function He() {
744
+ if (Me)
745
+ return de;
746
+ Me = 1;
747
+ var e = b, t = Er(), r = Rr(), s = ct, n = mt, a = xr(), i = Sr(), o = ht, l = I, f = ee(), c = Ar();
748
+ return de = function(u) {
749
+ return new Promise(function(x, y) {
750
+ var S = u.data, N = u.headers, $ = u.responseType, U;
751
+ function De() {
752
+ u.cancelToken && u.cancelToken.unsubscribe(U), u.signal && u.signal.removeEventListener("abort", U);
753
+ }
754
+ e.isFormData(S) && e.isStandardBrowserEnv() && delete N["Content-Type"];
755
+ var p = new XMLHttpRequest();
756
+ if (u.auth) {
757
+ var _t = u.auth.username || "", xt = u.auth.password ? unescape(encodeURIComponent(u.auth.password)) : "";
758
+ N.Authorization = "Basic " + btoa(_t + ":" + xt);
759
+ }
760
+ var ne = n(u.baseURL, u.url);
761
+ p.open(u.method.toUpperCase(), s(ne, u.params, u.paramsSerializer), !0), p.timeout = u.timeout;
762
+ function Ue() {
763
+ if (p) {
764
+ var g = "getAllResponseHeaders" in p ? a(p.getAllResponseHeaders()) : null, B = !$ || $ === "text" || $ === "json" ? p.responseText : p.response, T = {
765
+ data: B,
766
+ status: p.status,
767
+ statusText: p.statusText,
768
+ headers: g,
769
+ config: u,
770
+ request: p
771
+ };
772
+ t(function(se) {
773
+ x(se), De();
774
+ }, function(se) {
775
+ y(se), De();
776
+ }, T), p = null;
777
+ }
778
+ }
779
+ if ("onloadend" in p ? p.onloadend = Ue : p.onreadystatechange = function() {
780
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(Ue);
781
+ }, p.onabort = function() {
782
+ p && (y(new l("Request aborted", l.ECONNABORTED, u, p)), p = null);
783
+ }, p.onerror = function() {
784
+ y(new l("Network Error", l.ERR_NETWORK, u, p, p)), p = null;
785
+ }, p.ontimeout = function() {
786
+ var B = u.timeout ? "timeout of " + u.timeout + "ms exceeded" : "timeout exceeded", T = u.transitional || o;
787
+ u.timeoutErrorMessage && (B = u.timeoutErrorMessage), y(new l(
788
+ B,
789
+ T.clarifyTimeoutError ? l.ETIMEDOUT : l.ECONNABORTED,
790
+ u,
791
+ p
792
+ )), p = null;
793
+ }, e.isStandardBrowserEnv()) {
794
+ var Be = (u.withCredentials || i(ne)) && u.xsrfCookieName ? r.read(u.xsrfCookieName) : void 0;
795
+ Be && (N[u.xsrfHeaderName] = Be);
796
+ }
797
+ "setRequestHeader" in p && e.forEach(N, function(B, T) {
798
+ typeof S > "u" && T.toLowerCase() === "content-type" ? delete N[T] : p.setRequestHeader(T, B);
799
+ }), e.isUndefined(u.withCredentials) || (p.withCredentials = !!u.withCredentials), $ && $ !== "json" && (p.responseType = u.responseType), typeof u.onDownloadProgress == "function" && p.addEventListener("progress", u.onDownloadProgress), typeof u.onUploadProgress == "function" && p.upload && p.upload.addEventListener("progress", u.onUploadProgress), (u.cancelToken || u.signal) && (U = function(g) {
800
+ p && (y(!g || g && g.type ? new f() : g), p.abort(), p = null);
801
+ }, u.cancelToken && u.cancelToken.subscribe(U), u.signal && (u.signal.aborted ? U() : u.signal.addEventListener("abort", U))), S || (S = null);
802
+ var ae = c(ne);
803
+ if (ae && ["http", "https", "file"].indexOf(ae) === -1) {
804
+ y(new l("Unsupported protocol " + ae + ":", l.ERR_BAD_REQUEST, u));
805
+ return;
806
+ }
807
+ p.send(S);
808
+ });
809
+ }, de;
810
+ }
811
+ var pe, Je;
812
+ function Nr() {
813
+ return Je || (Je = 1, pe = null), pe;
814
+ }
815
+ var m = b, Ve = br, We = I, Tr = ht, Pr = vt, Dr = {
816
+ "Content-Type": "application/x-www-form-urlencoded"
817
+ };
818
+ function ze(e, t) {
819
+ !m.isUndefined(e) && m.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t);
820
+ }
821
+ function Ur() {
822
+ var e;
823
+ return (typeof XMLHttpRequest < "u" || typeof process < "u" && Object.prototype.toString.call(process) === "[object process]") && (e = He()), e;
824
+ }
825
+ function Br(e, t, r) {
826
+ if (m.isString(e))
827
+ try {
828
+ return (t || JSON.parse)(e), m.trim(e);
829
+ } catch (s) {
830
+ if (s.name !== "SyntaxError")
831
+ throw s;
832
+ }
833
+ return (r || JSON.stringify)(e);
834
+ }
835
+ var te = {
836
+ transitional: Tr,
837
+ adapter: Ur(),
838
+ transformRequest: [function(t, r) {
839
+ if (Ve(r, "Accept"), Ve(r, "Content-Type"), m.isFormData(t) || m.isArrayBuffer(t) || m.isBuffer(t) || m.isStream(t) || m.isFile(t) || m.isBlob(t))
840
+ return t;
841
+ if (m.isArrayBufferView(t))
842
+ return t.buffer;
843
+ if (m.isURLSearchParams(t))
844
+ return ze(r, "application/x-www-form-urlencoded;charset=utf-8"), t.toString();
845
+ var s = m.isObject(t), n = r && r["Content-Type"], a;
846
+ if ((a = m.isFileList(t)) || s && n === "multipart/form-data") {
847
+ var i = this.env && this.env.FormData;
848
+ return Pr(a ? { "files[]": t } : t, i && new i());
849
+ } else if (s || n === "application/json")
850
+ return ze(r, "application/json"), Br(t);
851
+ return t;
852
+ }],
853
+ transformResponse: [function(t) {
854
+ var r = this.transitional || te.transitional, s = r && r.silentJSONParsing, n = r && r.forcedJSONParsing, a = !s && this.responseType === "json";
855
+ if (a || n && m.isString(t) && t.length)
856
+ try {
857
+ return JSON.parse(t);
858
+ } catch (i) {
859
+ if (a)
860
+ throw i.name === "SyntaxError" ? We.from(i, We.ERR_BAD_RESPONSE, this, null, this.response) : i;
861
+ }
862
+ return t;
863
+ }],
864
+ /**
865
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
866
+ * timeout is not created.
867
+ */
868
+ timeout: 0,
869
+ xsrfCookieName: "XSRF-TOKEN",
870
+ xsrfHeaderName: "X-XSRF-TOKEN",
871
+ maxContentLength: -1,
872
+ maxBodyLength: -1,
873
+ env: {
874
+ FormData: Nr()
875
+ },
876
+ validateStatus: function(t) {
877
+ return t >= 200 && t < 300;
878
+ },
879
+ headers: {
880
+ common: {
881
+ Accept: "application/json, text/plain, */*"
882
+ }
883
+ }
884
+ };
885
+ m.forEach(["delete", "get", "head"], function(t) {
886
+ te.headers[t] = {};
887
+ });
888
+ m.forEach(["post", "put", "patch"], function(t) {
889
+ te.headers[t] = m.merge(Dr);
890
+ });
891
+ var Te = te, kr = b, Lr = Te, jr = function(t, r, s) {
892
+ var n = this || Lr;
893
+ return kr.forEach(s, function(i) {
894
+ t = i.call(n, t, r);
895
+ }), t;
896
+ }, he, Xe;
897
+ function yt() {
898
+ return Xe || (Xe = 1, he = function(t) {
899
+ return !!(t && t.__CANCEL__);
900
+ }), he;
901
+ }
902
+ var Ke = b, ve = jr, qr = yt(), Fr = Te, Ir = ee();
903
+ function me(e) {
904
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
905
+ throw new Ir();
906
+ }
907
+ var $r = function(t) {
908
+ me(t), t.headers = t.headers || {}, t.data = ve.call(
909
+ t,
910
+ t.data,
911
+ t.headers,
912
+ t.transformRequest
913
+ ), t.headers = Ke.merge(
914
+ t.headers.common || {},
915
+ t.headers[t.method] || {},
916
+ t.headers
917
+ ), Ke.forEach(
918
+ ["delete", "get", "head", "post", "put", "patch", "common"],
919
+ function(n) {
920
+ delete t.headers[n];
921
+ }
922
+ );
923
+ var r = t.adapter || Fr.adapter;
924
+ return r(t).then(function(n) {
925
+ return me(t), n.data = ve.call(
926
+ t,
927
+ n.data,
928
+ n.headers,
929
+ t.transformResponse
930
+ ), n;
931
+ }, function(n) {
932
+ return qr(n) || (me(t), n && n.response && (n.response.data = ve.call(
933
+ t,
934
+ n.response.data,
935
+ n.response.headers,
936
+ t.transformResponse
937
+ ))), Promise.reject(n);
938
+ });
939
+ }, R = b, bt = function(t, r) {
940
+ r = r || {};
941
+ var s = {};
942
+ function n(c, d) {
943
+ return R.isPlainObject(c) && R.isPlainObject(d) ? R.merge(c, d) : R.isPlainObject(d) ? R.merge({}, d) : R.isArray(d) ? d.slice() : d;
944
+ }
945
+ function a(c) {
946
+ if (R.isUndefined(r[c])) {
947
+ if (!R.isUndefined(t[c]))
948
+ return n(void 0, t[c]);
949
+ } else
950
+ return n(t[c], r[c]);
951
+ }
952
+ function i(c) {
953
+ if (!R.isUndefined(r[c]))
954
+ return n(void 0, r[c]);
955
+ }
956
+ function o(c) {
957
+ if (R.isUndefined(r[c])) {
958
+ if (!R.isUndefined(t[c]))
959
+ return n(void 0, t[c]);
960
+ } else
961
+ return n(void 0, r[c]);
962
+ }
963
+ function l(c) {
964
+ if (c in r)
965
+ return n(t[c], r[c]);
966
+ if (c in t)
967
+ return n(void 0, t[c]);
968
+ }
969
+ var f = {
970
+ url: i,
971
+ method: i,
972
+ data: i,
973
+ baseURL: o,
974
+ transformRequest: o,
975
+ transformResponse: o,
976
+ paramsSerializer: o,
977
+ timeout: o,
978
+ timeoutMessage: o,
979
+ withCredentials: o,
980
+ adapter: o,
981
+ responseType: o,
982
+ xsrfCookieName: o,
983
+ xsrfHeaderName: o,
984
+ onUploadProgress: o,
985
+ onDownloadProgress: o,
986
+ decompress: o,
987
+ maxContentLength: o,
988
+ maxBodyLength: o,
989
+ beforeRedirect: o,
990
+ transport: o,
991
+ httpAgent: o,
992
+ httpsAgent: o,
993
+ cancelToken: o,
994
+ socketPath: o,
995
+ responseEncoding: o,
996
+ validateStatus: l
997
+ };
998
+ return R.forEach(Object.keys(t).concat(Object.keys(r)), function(d) {
999
+ var u = f[d] || a, v = u(d);
1000
+ R.isUndefined(v) && u !== l || (s[d] = v);
1001
+ }), s;
1002
+ }, ye, Qe;
1003
+ function wt() {
1004
+ return Qe || (Qe = 1, ye = {
1005
+ version: "0.27.2"
1006
+ }), ye;
1007
+ }
1008
+ var Mr = wt().version, A = I, Pe = {};
1009
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(e, t) {
1010
+ Pe[e] = function(s) {
1011
+ return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
1012
+ };
1013
+ });
1014
+ var Ye = {};
1015
+ Pe.transitional = function(t, r, s) {
1016
+ function n(a, i) {
1017
+ return "[Axios v" + Mr + "] Transitional option '" + a + "'" + i + (s ? ". " + s : "");
1018
+ }
1019
+ return function(a, i, o) {
1020
+ if (t === !1)
1021
+ throw new A(
1022
+ n(i, " has been removed" + (r ? " in " + r : "")),
1023
+ A.ERR_DEPRECATED
1024
+ );
1025
+ return r && !Ye[i] && (Ye[i] = !0, console.warn(
1026
+ n(
1027
+ i,
1028
+ " has been deprecated since v" + r + " and will be removed in the near future"
1029
+ )
1030
+ )), t ? t(a, i, o) : !0;
1031
+ };
1032
+ };
1033
+ function Hr(e, t, r) {
1034
+ if (typeof e != "object")
1035
+ throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE);
1036
+ for (var s = Object.keys(e), n = s.length; n-- > 0; ) {
1037
+ var a = s[n], i = t[a];
1038
+ if (i) {
1039
+ var o = e[a], l = o === void 0 || i(o, a, e);
1040
+ if (l !== !0)
1041
+ throw new A("option " + a + " must be " + l, A.ERR_BAD_OPTION_VALUE);
1042
+ continue;
1043
+ }
1044
+ if (r !== !0)
1045
+ throw new A("Unknown option " + a, A.ERR_BAD_OPTION);
1046
+ }
1047
+ }
1048
+ var Jr = {
1049
+ assertOptions: Hr,
1050
+ validators: Pe
1051
+ }, Et = b, Vr = ct, Ge = mr, Ze = $r, re = bt, Wr = mt, Rt = Jr, L = Rt.validators;
1052
+ function F(e) {
1053
+ this.defaults = e, this.interceptors = {
1054
+ request: new Ge(),
1055
+ response: new Ge()
1056
+ };
1057
+ }
1058
+ F.prototype.request = function(t, r) {
1059
+ typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = re(this.defaults, r), r.method ? r.method = r.method.toLowerCase() : this.defaults.method ? r.method = this.defaults.method.toLowerCase() : r.method = "get";
1060
+ var s = r.transitional;
1061
+ s !== void 0 && Rt.assertOptions(s, {
1062
+ silentJSONParsing: L.transitional(L.boolean),
1063
+ forcedJSONParsing: L.transitional(L.boolean),
1064
+ clarifyTimeoutError: L.transitional(L.boolean)
1065
+ }, !1);
1066
+ var n = [], a = !0;
1067
+ this.interceptors.request.forEach(function(v) {
1068
+ typeof v.runWhen == "function" && v.runWhen(r) === !1 || (a = a && v.synchronous, n.unshift(v.fulfilled, v.rejected));
1069
+ });
1070
+ var i = [];
1071
+ this.interceptors.response.forEach(function(v) {
1072
+ i.push(v.fulfilled, v.rejected);
1073
+ });
1074
+ var o;
1075
+ if (!a) {
1076
+ var l = [Ze, void 0];
1077
+ for (Array.prototype.unshift.apply(l, n), l = l.concat(i), o = Promise.resolve(r); l.length; )
1078
+ o = o.then(l.shift(), l.shift());
1079
+ return o;
1080
+ }
1081
+ for (var f = r; n.length; ) {
1082
+ var c = n.shift(), d = n.shift();
1083
+ try {
1084
+ f = c(f);
1085
+ } catch (u) {
1086
+ d(u);
1087
+ break;
1088
+ }
1089
+ }
1090
+ try {
1091
+ o = Ze(f);
1092
+ } catch (u) {
1093
+ return Promise.reject(u);
1094
+ }
1095
+ for (; i.length; )
1096
+ o = o.then(i.shift(), i.shift());
1097
+ return o;
1098
+ };
1099
+ F.prototype.getUri = function(t) {
1100
+ t = re(this.defaults, t);
1101
+ var r = Wr(t.baseURL, t.url);
1102
+ return Vr(r, t.params, t.paramsSerializer);
1103
+ };
1104
+ Et.forEach(["delete", "get", "head", "options"], function(t) {
1105
+ F.prototype[t] = function(r, s) {
1106
+ return this.request(re(s || {}, {
1107
+ method: t,
1108
+ url: r,
1109
+ data: (s || {}).data
1110
+ }));
1111
+ };
1112
+ });
1113
+ Et.forEach(["post", "put", "patch"], function(t) {
1114
+ function r(s) {
1115
+ return function(a, i, o) {
1116
+ return this.request(re(o || {}, {
1117
+ method: t,
1118
+ headers: s ? {
1119
+ "Content-Type": "multipart/form-data"
1120
+ } : {},
1121
+ url: a,
1122
+ data: i
1123
+ }));
1124
+ };
1125
+ }
1126
+ F.prototype[t] = r(), F.prototype[t + "Form"] = r(!0);
1127
+ });
1128
+ var zr = F, be, et;
1129
+ function Xr() {
1130
+ if (et)
1131
+ return be;
1132
+ et = 1;
1133
+ var e = ee();
1134
+ function t(r) {
1135
+ if (typeof r != "function")
1136
+ throw new TypeError("executor must be a function.");
1137
+ var s;
1138
+ this.promise = new Promise(function(i) {
1139
+ s = i;
1140
+ });
1141
+ var n = this;
1142
+ this.promise.then(function(a) {
1143
+ if (n._listeners) {
1144
+ var i, o = n._listeners.length;
1145
+ for (i = 0; i < o; i++)
1146
+ n._listeners[i](a);
1147
+ n._listeners = null;
1148
+ }
1149
+ }), this.promise.then = function(a) {
1150
+ var i, o = new Promise(function(l) {
1151
+ n.subscribe(l), i = l;
1152
+ }).then(a);
1153
+ return o.cancel = function() {
1154
+ n.unsubscribe(i);
1155
+ }, o;
1156
+ }, r(function(i) {
1157
+ n.reason || (n.reason = new e(i), s(n.reason));
1158
+ });
1159
+ }
1160
+ return t.prototype.throwIfRequested = function() {
1161
+ if (this.reason)
1162
+ throw this.reason;
1163
+ }, t.prototype.subscribe = function(s) {
1164
+ if (this.reason) {
1165
+ s(this.reason);
1166
+ return;
1167
+ }
1168
+ this._listeners ? this._listeners.push(s) : this._listeners = [s];
1169
+ }, t.prototype.unsubscribe = function(s) {
1170
+ if (this._listeners) {
1171
+ var n = this._listeners.indexOf(s);
1172
+ n !== -1 && this._listeners.splice(n, 1);
1173
+ }
1174
+ }, t.source = function() {
1175
+ var s, n = new t(function(i) {
1176
+ s = i;
1177
+ });
1178
+ return {
1179
+ token: n,
1180
+ cancel: s
1181
+ };
1182
+ }, be = t, be;
1183
+ }
1184
+ var we, tt;
1185
+ function Kr() {
1186
+ return tt || (tt = 1, we = function(t) {
1187
+ return function(s) {
1188
+ return t.apply(null, s);
1189
+ };
1190
+ }), we;
1191
+ }
1192
+ var Ee, rt;
1193
+ function Qr() {
1194
+ if (rt)
1195
+ return Ee;
1196
+ rt = 1;
1197
+ var e = b;
1198
+ return Ee = function(r) {
1199
+ return e.isObject(r) && r.isAxiosError === !0;
1200
+ }, Ee;
1201
+ }
1202
+ var nt = b, Yr = ot, Q = zr, Gr = bt, Zr = Te;
1203
+ function gt(e) {
1204
+ var t = new Q(e), r = Yr(Q.prototype.request, t);
1205
+ return nt.extend(r, Q.prototype, t), nt.extend(r, t), r.create = function(n) {
1206
+ return gt(Gr(e, n));
1207
+ }, r;
1208
+ }
1209
+ var E = gt(Zr);
1210
+ E.Axios = Q;
1211
+ E.CanceledError = ee();
1212
+ E.CancelToken = Xr();
1213
+ E.isCancel = yt();
1214
+ E.VERSION = wt().version;
1215
+ E.toFormData = vt;
1216
+ E.AxiosError = I;
1217
+ E.Cancel = E.CanceledError;
1218
+ E.all = function(t) {
1219
+ return Promise.all(t);
1220
+ };
1221
+ E.spread = Kr();
1222
+ E.isAxiosError = Qr();
1223
+ Ce.exports = E;
1224
+ Ce.exports.default = E;
1225
+ var en = Ce.exports, tn = en;
1226
+ const Ot = /* @__PURE__ */ it(tn);
1227
+ var Ct = { exports: {} };
1228
+ /*!
1229
+ * JavaScript Cookie v2.2.1
1230
+ * https://github.com/js-cookie/js-cookie
1231
+ *
1232
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
1233
+ * Released under the MIT license
1234
+ */
1235
+ (function(e, t) {
1236
+ (function(r) {
1237
+ var s;
1238
+ if (e.exports = r(), s = !0, !s) {
1239
+ var n = window.Cookies, a = window.Cookies = r();
1240
+ a.noConflict = function() {
1241
+ return window.Cookies = n, a;
1242
+ };
1243
+ }
1244
+ })(function() {
1245
+ function r() {
1246
+ for (var a = 0, i = {}; a < arguments.length; a++) {
1247
+ var o = arguments[a];
1248
+ for (var l in o)
1249
+ i[l] = o[l];
1250
+ }
1251
+ return i;
1252
+ }
1253
+ function s(a) {
1254
+ return a.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
1255
+ }
1256
+ function n(a) {
1257
+ function i() {
1258
+ }
1259
+ function o(f, c, d) {
1260
+ if (!(typeof document > "u")) {
1261
+ d = r({
1262
+ path: "/"
1263
+ }, i.defaults, d), typeof d.expires == "number" && (d.expires = new Date(/* @__PURE__ */ new Date() * 1 + d.expires * 864e5)), d.expires = d.expires ? d.expires.toUTCString() : "";
1264
+ try {
1265
+ var u = JSON.stringify(c);
1266
+ /^[\{\[]/.test(u) && (c = u);
1267
+ } catch {
1268
+ }
1269
+ c = a.write ? a.write(c, f) : encodeURIComponent(String(c)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), f = encodeURIComponent(String(f)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
1270
+ var v = "";
1271
+ for (var x in d)
1272
+ d[x] && (v += "; " + x, d[x] !== !0 && (v += "=" + d[x].split(";")[0]));
1273
+ return document.cookie = f + "=" + c + v;
1274
+ }
1275
+ }
1276
+ function l(f, c) {
1277
+ if (!(typeof document > "u")) {
1278
+ for (var d = {}, u = document.cookie ? document.cookie.split("; ") : [], v = 0; v < u.length; v++) {
1279
+ var x = u[v].split("="), y = x.slice(1).join("=");
1280
+ !c && y.charAt(0) === '"' && (y = y.slice(1, -1));
1281
+ try {
1282
+ var S = s(x[0]);
1283
+ if (y = (a.read || a)(y, S) || s(y), c)
1284
+ try {
1285
+ y = JSON.parse(y);
1286
+ } catch {
1287
+ }
1288
+ if (d[S] = y, f === S)
1289
+ break;
1290
+ } catch {
1291
+ }
1292
+ }
1293
+ return f ? d[f] : d;
1294
+ }
1295
+ }
1296
+ return i.set = o, i.get = function(f) {
1297
+ return l(
1298
+ f,
1299
+ !1
1300
+ /* read as raw */
1301
+ );
1302
+ }, i.getJSON = function(f) {
1303
+ return l(
1304
+ f,
1305
+ !0
1306
+ /* read as json */
1307
+ );
1308
+ }, i.remove = function(f, c) {
1309
+ o(f, "", r(c, {
1310
+ expires: -1
1311
+ }));
1312
+ }, i.defaults = {}, i.withConverter = n, i;
1313
+ }
1314
+ return n(function() {
1315
+ });
1316
+ });
1317
+ })(Ct);
1318
+ var rn = Ct.exports;
1319
+ const G = /* @__PURE__ */ it(rn), nn = Ot.create({ baseURL: process.env.API_URL, withCredentials: !0 }), X = at({
1320
+ code: {
1321
+ value: "",
1322
+ type: "",
1323
+ method: "",
1324
+ isSended: !1,
1325
+ isValid: !1
1326
+ }
1327
+ });
1328
+ async function an(e, t, r) {
1329
+ return await nn.post("/api/twofa/sendcode", {
1330
+ phone: e.phone.number,
1331
+ email: e.email,
1332
+ method: t,
1333
+ type: r
1334
+ }).then(
1335
+ (s) => (X.code = s.data, X.code.isSended = !0, Promise.resolve(s.data)),
1336
+ (s) => (console.log(s), P(s), Promise.reject(s))
1337
+ );
1338
+ }
1339
+ st(X, (e, t) => {
1340
+ });
1341
+ const pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1342
+ __proto__: null,
1343
+ sendCode: an,
1344
+ state: X
1345
+ }, Symbol.toStringTag, { value: "Module" })), z = Ot.create({ baseURL: process.env.API_URL, withCredentials: !0 }), w = at({
1346
+ user: {
1347
+ _id: "",
1348
+ username: "",
1349
+ email: "",
1350
+ phone: "",
1351
+ password: "",
1352
+ passwordRepeat: ""
1353
+ },
1354
+ access: {
1355
+ roles: null,
1356
+ token: null,
1357
+ status: !1
1358
+ }
1359
+ });
1360
+ if (G.get("user")) {
1361
+ const { _id: e, email: t, phone: r, roles: s, accessToken: n } = JSON.parse(G.get("user"));
1362
+ Object.assign(w.user, { _id: e, email: t, phone: r }), Object.assign(w.access, { token: n, roles: s, status: !!n }), z.interceptors.request.use((a) => (n && (a.headers["x-access-token"] = n), a), (a) => Promise.reject(a));
1363
+ }
1364
+ const sn = {
1365
+ async login(e, t) {
1366
+ try {
1367
+ console.log(e.phone.number);
1368
+ const r = await z.post("/api/auth/signin", {
1369
+ email: e.email,
1370
+ phone: e.phone.number,
1371
+ password: e.password,
1372
+ passwordRepeat: "",
1373
+ type: t
1374
+ });
1375
+ return Re("user", r.data), console.log(r.data), Object.assign(w.user, {
1376
+ ...r.data
1377
+ }), Object.assign(w.access, {
1378
+ token: r.data.accessToken,
1379
+ status: !0,
1380
+ roles: r.data.roles
1381
+ }), r.data;
1382
+ } catch (r) {
1383
+ return Object.assign(w.access, {
1384
+ token: null,
1385
+ status: !1
1386
+ }), P(r), Promise.reject(r);
1387
+ }
1388
+ },
1389
+ async signup(e, t, r) {
1390
+ const { password: s, passwordRepeat: n } = w.user;
1391
+ if (s !== n) {
1392
+ const a = {
1393
+ response: {
1394
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
1395
+ }
1396
+ };
1397
+ throw P(a), new Error(a.response.status);
1398
+ }
1399
+ try {
1400
+ e.phone = e.phone.number;
1401
+ const a = await z.post("/api/auth/signup", {
1402
+ ...e,
1403
+ type: t,
1404
+ inviteCode: r
1405
+ });
1406
+ return a.data.accessToken && Re("user", a.data), Object.assign(w.user, {
1407
+ ...a.data
1408
+ }), Object.assign(w.access, {
1409
+ token: a.data.accessToken,
1410
+ status: !0,
1411
+ roles: a.data.roles
1412
+ }), a.data;
1413
+ } catch (a) {
1414
+ throw P(a), console.log("Sign up falied"), a;
1415
+ }
1416
+ },
1417
+ logout() {
1418
+ un("user"), Object.assign(w.user, {
1419
+ email: "",
1420
+ phone: "",
1421
+ password: "",
1422
+ passwordRepeat: ""
1423
+ }), Object.assign(w.access, {
1424
+ token: null,
1425
+ status: !1
1426
+ });
1427
+ },
1428
+ async resetPassword(e, t) {
1429
+ try {
1430
+ const r = await z.post("/api/auth/reset-password", {
1431
+ email: e.email,
1432
+ phone: e.phone.number,
1433
+ type: t
1434
+ });
1435
+ return Object.assign(X.code, {
1436
+ ...r.data,
1437
+ isSended: !0
1438
+ }), r.data;
1439
+ } catch (r) {
1440
+ return P(r), Promise.reject(r);
1441
+ }
1442
+ },
1443
+ async updatePassword(e, t) {
1444
+ const { password: r, passwordRepeat: s } = w.user;
1445
+ if (r !== s) {
1446
+ const n = {
1447
+ response: {
1448
+ data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
1449
+ }
1450
+ };
1451
+ throw P(n), new Error(n.response.status);
1452
+ }
1453
+ try {
1454
+ const n = await z.post("/api/auth/update-password", {
1455
+ email: e.email,
1456
+ phone: e.phone.number,
1457
+ password: e.password,
1458
+ passwordRepeat: e.passwordRepeat,
1459
+ type: t
1460
+ });
1461
+ return n.data.accessToken && Re("user", n.data), Object.assign(w.user, {
1462
+ ...n.data
1463
+ }), Object.assign(w.access, {
1464
+ token: n.data.accessToken,
1465
+ status: !0
1466
+ }), n.data;
1467
+ } catch (n) {
1468
+ return P(n), Promise.reject(n);
1469
+ }
1470
+ }
1471
+ }, on = {
1472
+ development: { secure: !1, expires: 1 },
1473
+ production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
1474
+ };
1475
+ function Re(e, t, r = process.env.NODE_ENV) {
1476
+ G.set(e, JSON.stringify(t), on[r]);
1477
+ }
1478
+ function un(e, t = process.env.NODE_ENV) {
1479
+ const r = t === "production" ? { domain: process.env.API_URL } : {};
1480
+ G.remove(e, r);
1481
+ }
1482
+ st(w, (e, t) => {
1483
+ });
1484
+ const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1485
+ __proto__: null,
1486
+ actions: sn,
1487
+ state: w
1488
+ }, Symbol.toStringTag, { value: "Module" }));
1489
+ export {
1490
+ G as C,
1491
+ fn as F,
1492
+ Dt as _,
1493
+ Ot as a,
1494
+ dn as b,
1495
+ sn as c,
1496
+ an as d,
1497
+ X as e,
1498
+ hn as f,
1499
+ it as g,
1500
+ w as s,
1501
+ pn as t
1502
+ };