@vezham/hooks 0.0.0--canary → 0.0.1-poc-test
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/index.mjs +1928 -1384
- package/package.json +43 -36
- package/usehooks-ts.d.ts +1 -0
- package/CHANGELOG.md +0 -31
- package/usehooks-ts/index.d.ts +0 -3
package/index.mjs
CHANGED
|
@@ -1,337 +1,1175 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import w, { forwardRef as sr, isValidElement as dt, useLayoutEffect as ar, useEffect as z, useState as I, useCallback as O, useRef as H, useMemo as ir } from "react";
|
|
2
|
+
import lr from "react-dom";
|
|
3
|
+
let de = {
|
|
4
|
+
__DEV__: !1,
|
|
5
|
+
__DEBUG__: !0,
|
|
6
|
+
APP_NAME: ""
|
|
7
|
+
};
|
|
8
|
+
const ra = ({
|
|
9
|
+
__DEV__: e = !0,
|
|
10
|
+
__DEBUG__: t = !0,
|
|
11
|
+
APP_NAME: n = "",
|
|
12
|
+
...r
|
|
13
|
+
}) => de = { __DEV__: e, __DEBUG__: t, APP_NAME: n, ...r }, cr = () => (/* @__PURE__ */ new Date()).toISOString(), Ce = (e, t, n) => `[vezham] [${cr()}] [${e}] [${t}] ${n}`, ft = () => !de.__DEV__, U = {
|
|
14
|
+
log: (e = de.APP_NAME, t, n) => {
|
|
15
|
+
console.log(
|
|
16
|
+
Ce("LOG", e, t),
|
|
17
|
+
n || ""
|
|
18
|
+
);
|
|
19
|
+
},
|
|
20
|
+
debug: (e = de.APP_NAME, t, n) => {
|
|
21
|
+
de.__DEBUG__ && console.info(
|
|
22
|
+
Ce("DEBUG", e, t),
|
|
23
|
+
n || ""
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
info: (e = de.APP_NAME, t, n) => {
|
|
27
|
+
ft() || console.info(
|
|
28
|
+
Ce("INFO", e, t),
|
|
29
|
+
n || ""
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
warn: (e = de.APP_NAME, t, n) => {
|
|
33
|
+
ft() || console.warn(
|
|
34
|
+
Ce("WARN", e, t),
|
|
35
|
+
n || ""
|
|
36
|
+
);
|
|
37
|
+
},
|
|
38
|
+
error: (e = de.APP_NAME, t, n) => {
|
|
39
|
+
ft() || console.error(
|
|
40
|
+
Ce("ERROR", e, t),
|
|
41
|
+
n || ""
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
// trace: (namespace = config.APP_NAME, message: string, object?: any) => {
|
|
45
|
+
// if (strictLog()) return
|
|
46
|
+
// let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
|
|
47
|
+
// if (!(object instanceof Error)) console.trace(log_msg, object);
|
|
48
|
+
// else console.trace(log_msg, object)
|
|
49
|
+
// }
|
|
50
|
+
};
|
|
51
|
+
var ur = (e) => {
|
|
52
|
+
switch (e) {
|
|
53
|
+
case "success":
|
|
54
|
+
return hr;
|
|
55
|
+
case "info":
|
|
56
|
+
return mr;
|
|
57
|
+
case "warning":
|
|
58
|
+
return pr;
|
|
59
|
+
case "error":
|
|
60
|
+
return gr;
|
|
61
|
+
default:
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}, dr = Array(12).fill(0), fr = ({ visible: e, className: t }) => w.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, w.createElement("div", { className: "sonner-spinner" }, dr.map((n, r) => w.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), hr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), pr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), mr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), gr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), wr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, w.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), w.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), yr = () => {
|
|
65
|
+
let [e, t] = w.useState(document.hidden);
|
|
66
|
+
return w.useEffect(() => {
|
|
67
|
+
let n = () => {
|
|
68
|
+
t(document.hidden);
|
|
69
|
+
};
|
|
70
|
+
return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
|
|
71
|
+
}, []), e;
|
|
72
|
+
}, St = 1, br = class {
|
|
73
|
+
constructor() {
|
|
74
|
+
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
75
|
+
let t = this.subscribers.indexOf(e);
|
|
76
|
+
this.subscribers.splice(t, 1);
|
|
77
|
+
}), this.publish = (e) => {
|
|
78
|
+
this.subscribers.forEach((t) => t(e));
|
|
79
|
+
}, this.addToast = (e) => {
|
|
80
|
+
this.publish(e), this.toasts = [...this.toasts, e];
|
|
81
|
+
}, this.create = (e) => {
|
|
82
|
+
var t;
|
|
83
|
+
let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : St++, a = this.toasts.find((i) => i.id === o), s = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
84
|
+
return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), a ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: s, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: s, id: o }), o;
|
|
85
|
+
}, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
|
|
86
|
+
this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
|
|
87
|
+
}), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
|
|
88
|
+
if (!t) return;
|
|
89
|
+
let n;
|
|
90
|
+
t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
|
91
|
+
let r = e instanceof Promise ? e : e(), o = n !== void 0, a, s = r.then(async (u) => {
|
|
92
|
+
if (a = ["resolve", u], w.isValidElement(u)) o = !1, this.create({ id: n, type: "default", message: u });
|
|
93
|
+
else if (Sr(u) && !u.ok) {
|
|
94
|
+
o = !1;
|
|
95
|
+
let c = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description;
|
|
96
|
+
this.create({ id: n, type: "error", message: c, description: f });
|
|
97
|
+
} else if (t.success !== void 0) {
|
|
98
|
+
o = !1;
|
|
99
|
+
let c = typeof t.success == "function" ? await t.success(u) : t.success, f = typeof t.description == "function" ? await t.description(u) : t.description;
|
|
100
|
+
this.create({ id: n, type: "success", message: c, description: f });
|
|
101
|
+
}
|
|
102
|
+
}).catch(async (u) => {
|
|
103
|
+
if (a = ["reject", u], t.error !== void 0) {
|
|
104
|
+
o = !1;
|
|
105
|
+
let c = typeof t.error == "function" ? await t.error(u) : t.error, f = typeof t.description == "function" ? await t.description(u) : t.description;
|
|
106
|
+
this.create({ id: n, type: "error", message: c, description: f });
|
|
107
|
+
}
|
|
108
|
+
}).finally(() => {
|
|
109
|
+
var u;
|
|
110
|
+
o && (this.dismiss(n), n = void 0), (u = t.finally) == null || u.call(t);
|
|
111
|
+
}), i = () => new Promise((u, c) => s.then(() => a[0] === "reject" ? c(a[1]) : u(a[1])).catch(c));
|
|
112
|
+
return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
|
|
113
|
+
}, this.custom = (e, t) => {
|
|
114
|
+
let n = (t == null ? void 0 : t.id) || St++;
|
|
115
|
+
return this.create({ jsx: e(n), id: n, ...t }), n;
|
|
116
|
+
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
117
|
+
}
|
|
118
|
+
}, W = new br(), vr = (e, t) => {
|
|
119
|
+
let n = (t == null ? void 0 : t.id) || St++;
|
|
120
|
+
return W.addToast({ title: e, ...t, id: n }), n;
|
|
121
|
+
}, Sr = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Er = vr, xr = () => W.toasts, Tr = () => W.getActiveToasts(), Rr = Object.assign(Er, { success: W.success, info: W.info, warning: W.warning, error: W.error, custom: W.custom, message: W.message, promise: W.promise, dismiss: W.dismiss, loading: W.loading }, { getHistory: xr, getToasts: Tr });
|
|
122
|
+
function Or(e, { insertAt: t } = {}) {
|
|
123
|
+
if (typeof document > "u") return;
|
|
124
|
+
let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
|
|
125
|
+
r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
|
|
126
|
+
}
|
|
127
|
+
Or(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
128
|
+
`);
|
|
129
|
+
function ze(e) {
|
|
130
|
+
return e.label !== void 0;
|
|
131
|
+
}
|
|
132
|
+
var Ar = 3, kr = "32px", Cr = "16px", Ht = 4e3, _r = 356, Lr = 14, Nr = 20, Mr = 200;
|
|
133
|
+
function te(...e) {
|
|
134
|
+
return e.filter(Boolean).join(" ");
|
|
135
|
+
}
|
|
136
|
+
function Pr(e) {
|
|
137
|
+
let [t, n] = e.split("-"), r = [];
|
|
138
|
+
return t && r.push(t), n && r.push(n), r;
|
|
139
|
+
}
|
|
140
|
+
var Br = (e) => {
|
|
141
|
+
var t, n, r, o, a, s, i, u, c, f, p;
|
|
142
|
+
let { invert: h, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: T, heights: E, index: R, toasts: F, expanded: L, removeToast: S, defaultRichColors: P, closeButton: q, style: oe, cancelButtonStyle: ot, actionButtonStyle: Be, className: ae = "", descriptionClassName: Ie = "", duration: ye, position: De, gap: fe, loadingIcon: ie, expandByDefault: Fe, classNames: x, icons: V, closeButtonAriaLabel: st = "Close toast", pauseWhenPageIsHidden: C } = e, [_, M] = w.useState(null), [$, be] = w.useState(null), [B, at] = w.useState(!1), [Oe, Ue] = w.useState(!1), [Ae, it] = w.useState(!1), [Pt, Jn] = w.useState(!1), [Vn, Bt] = w.useState(!1), [Kn, lt] = w.useState(0), [Yn, It] = w.useState(0), ke = w.useRef(l.duration || ye || Ht), Dt = w.useRef(null), he = w.useRef(null), Gn = R === 0, Xn = R + 1 <= T, G = l.type, ve = l.dismissible !== !1, Qn = l.className || "", Zn = l.descriptionClassName || "", je = w.useMemo(() => E.findIndex((b) => b.toastId === l.id) || 0, [E, l.id]), er = w.useMemo(() => {
|
|
143
|
+
var b;
|
|
144
|
+
return (b = l.closeButton) != null ? b : q;
|
|
145
|
+
}, [l.closeButton, q]), Ft = w.useMemo(() => l.duration || ye || Ht, [l.duration, ye]), ct = w.useRef(0), Se = w.useRef(0), Ut = w.useRef(0), Ee = w.useRef(null), [tr, nr] = De.split("-"), jt = w.useMemo(() => E.reduce((b, A, N) => N >= je ? b : b + A.height, 0), [E, je]), zt = yr(), rr = l.invert || h, ut = G === "loading";
|
|
146
|
+
Se.current = w.useMemo(() => je * fe + jt, [je, jt]), w.useEffect(() => {
|
|
147
|
+
ke.current = Ft;
|
|
148
|
+
}, [Ft]), w.useEffect(() => {
|
|
149
|
+
at(!0);
|
|
150
|
+
}, []), w.useEffect(() => {
|
|
151
|
+
let b = he.current;
|
|
152
|
+
if (b) {
|
|
153
|
+
let A = b.getBoundingClientRect().height;
|
|
154
|
+
return It(A), y((N) => [{ toastId: l.id, height: A, position: l.position }, ...N]), () => y((N) => N.filter((Q) => Q.toastId !== l.id));
|
|
155
|
+
}
|
|
156
|
+
}, [y, l.id]), w.useLayoutEffect(() => {
|
|
157
|
+
if (!B) return;
|
|
158
|
+
let b = he.current, A = b.style.height;
|
|
159
|
+
b.style.height = "auto";
|
|
160
|
+
let N = b.getBoundingClientRect().height;
|
|
161
|
+
b.style.height = A, It(N), y((Q) => Q.find((Z) => Z.toastId === l.id) ? Q.map((Z) => Z.toastId === l.id ? { ...Z, height: N } : Z) : [{ toastId: l.id, height: N, position: l.position }, ...Q]);
|
|
162
|
+
}, [B, l.title, l.description, y, l.id]);
|
|
163
|
+
let le = w.useCallback(() => {
|
|
164
|
+
Ue(!0), lt(Se.current), y((b) => b.filter((A) => A.toastId !== l.id)), setTimeout(() => {
|
|
165
|
+
S(l);
|
|
166
|
+
}, Mr);
|
|
167
|
+
}, [l, S, y, Se]);
|
|
168
|
+
w.useEffect(() => {
|
|
169
|
+
if (l.promise && G === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
170
|
+
let b;
|
|
171
|
+
return L || m || C && zt ? (() => {
|
|
172
|
+
if (Ut.current < ct.current) {
|
|
173
|
+
let A = (/* @__PURE__ */ new Date()).getTime() - ct.current;
|
|
174
|
+
ke.current = ke.current - A;
|
|
175
|
+
}
|
|
176
|
+
Ut.current = (/* @__PURE__ */ new Date()).getTime();
|
|
177
|
+
})() : ke.current !== 1 / 0 && (ct.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
|
|
178
|
+
var A;
|
|
179
|
+
(A = l.onAutoClose) == null || A.call(l, l), le();
|
|
180
|
+
}, ke.current)), () => clearTimeout(b);
|
|
181
|
+
}, [L, m, l, G, C, zt, le]), w.useEffect(() => {
|
|
182
|
+
l.delete && le();
|
|
183
|
+
}, [le, l.delete]);
|
|
184
|
+
function or() {
|
|
185
|
+
var b, A, N;
|
|
186
|
+
return V != null && V.loading ? w.createElement("div", { className: te(x == null ? void 0 : x.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": G === "loading" }, V.loading) : ie ? w.createElement("div", { className: te(x == null ? void 0 : x.loader, (A = l == null ? void 0 : l.classNames) == null ? void 0 : A.loader, "sonner-loader"), "data-visible": G === "loading" }, ie) : w.createElement(fr, { className: te(x == null ? void 0 : x.loader, (N = l == null ? void 0 : l.classNames) == null ? void 0 : N.loader), visible: G === "loading" });
|
|
187
|
+
}
|
|
188
|
+
return w.createElement("li", { tabIndex: 0, ref: he, className: te(ae, Qn, x == null ? void 0 : x.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[G], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[G]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : P, "data-styled": !(l.jsx || l.unstyled || g), "data-mounted": B, "data-promise": !!l.promise, "data-swiped": Vn, "data-removed": Oe, "data-visible": Xn, "data-y-position": tr, "data-x-position": nr, "data-index": R, "data-front": Gn, "data-swiping": Ae, "data-dismissible": ve, "data-type": G, "data-invert": rr, "data-swipe-out": Pt, "data-swipe-direction": $, "data-expanded": !!(L || Fe && B), style: { "--index": R, "--toasts-before": R, "--z-index": F.length - R, "--offset": `${Oe ? Kn : Se.current}px`, "--initial-height": Fe ? "auto" : `${Yn}px`, ...oe, ...l.style }, onDragEnd: () => {
|
|
189
|
+
it(!1), M(null), Ee.current = null;
|
|
190
|
+
}, onPointerDown: (b) => {
|
|
191
|
+
ut || !ve || (Dt.current = /* @__PURE__ */ new Date(), lt(Se.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (it(!0), Ee.current = { x: b.clientX, y: b.clientY }));
|
|
192
|
+
}, onPointerUp: () => {
|
|
193
|
+
var b, A, N, Q;
|
|
194
|
+
if (Pt || !ve) return;
|
|
195
|
+
Ee.current = null;
|
|
196
|
+
let Z = Number(((b = he.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ce = Number(((A = he.current) == null ? void 0 : A.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), pe = (/* @__PURE__ */ new Date()).getTime() - ((N = Dt.current) == null ? void 0 : N.getTime()), ee = _ === "x" ? Z : ce, ue = Math.abs(ee) / pe;
|
|
197
|
+
if (Math.abs(ee) >= Nr || ue > 0.11) {
|
|
198
|
+
lt(Se.current), (Q = l.onDismiss) == null || Q.call(l, l), be(_ === "x" ? Z > 0 ? "right" : "left" : ce > 0 ? "down" : "up"), le(), Jn(!0), Bt(!1);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
it(!1), M(null);
|
|
202
|
+
}, onPointerMove: (b) => {
|
|
203
|
+
var A, N, Q, Z;
|
|
204
|
+
if (!Ee.current || !ve || ((A = window.getSelection()) == null ? void 0 : A.toString().length) > 0) return;
|
|
205
|
+
let ce = b.clientY - Ee.current.y, pe = b.clientX - Ee.current.x, ee = (N = e.swipeDirections) != null ? N : Pr(De);
|
|
206
|
+
!_ && (Math.abs(pe) > 1 || Math.abs(ce) > 1) && M(Math.abs(pe) > Math.abs(ce) ? "x" : "y");
|
|
207
|
+
let ue = { x: 0, y: 0 };
|
|
208
|
+
_ === "y" ? (ee.includes("top") || ee.includes("bottom")) && (ee.includes("top") && ce < 0 || ee.includes("bottom") && ce > 0) && (ue.y = ce) : _ === "x" && (ee.includes("left") || ee.includes("right")) && (ee.includes("left") && pe < 0 || ee.includes("right") && pe > 0) && (ue.x = pe), (Math.abs(ue.x) > 0 || Math.abs(ue.y) > 0) && Bt(!0), (Q = he.current) == null || Q.style.setProperty("--swipe-amount-x", `${ue.x}px`), (Z = he.current) == null || Z.style.setProperty("--swipe-amount-y", `${ue.y}px`);
|
|
209
|
+
} }, er && !l.jsx ? w.createElement("button", { "aria-label": st, "data-disabled": ut, "data-close-button": !0, onClick: ut || !ve ? () => {
|
|
210
|
+
} : () => {
|
|
211
|
+
var b;
|
|
212
|
+
le(), (b = l.onDismiss) == null || b.call(l, l);
|
|
213
|
+
}, className: te(x == null ? void 0 : x.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (a = V == null ? void 0 : V.close) != null ? a : wr) : null, l.jsx || dt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : w.createElement(w.Fragment, null, G || l.icon || l.promise ? w.createElement("div", { "data-icon": "", className: te(x == null ? void 0 : x.icon, (s = l == null ? void 0 : l.classNames) == null ? void 0 : s.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || or() : null, l.type !== "loading" ? l.icon || (V == null ? void 0 : V[G]) || ur(G) : null) : null, w.createElement("div", { "data-content": "", className: te(x == null ? void 0 : x.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, w.createElement("div", { "data-title": "", className: te(x == null ? void 0 : x.title, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? w.createElement("div", { "data-description": "", className: te(Ie, Zn, x == null ? void 0 : x.description, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.description) }, typeof l.description == "function" ? l.description() : l.description) : null), dt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? w.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || ot, onClick: (b) => {
|
|
214
|
+
var A, N;
|
|
215
|
+
ze(l.cancel) && ve && ((N = (A = l.cancel).onClick) == null || N.call(A, b), le());
|
|
216
|
+
}, className: te(x == null ? void 0 : x.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, dt(l.action) ? l.action : l.action && ze(l.action) ? w.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Be, onClick: (b) => {
|
|
217
|
+
var A, N;
|
|
218
|
+
ze(l.action) && ((N = (A = l.action).onClick) == null || N.call(A, b), !b.defaultPrevented && le());
|
|
219
|
+
}, className: te(x == null ? void 0 : x.actionButton, (p = l == null ? void 0 : l.classNames) == null ? void 0 : p.actionButton) }, l.action.label) : null));
|
|
220
|
+
};
|
|
221
|
+
function qt() {
|
|
222
|
+
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
223
|
+
let e = document.documentElement.getAttribute("dir");
|
|
224
|
+
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
225
|
+
}
|
|
226
|
+
function Ir(e, t) {
|
|
227
|
+
let n = {};
|
|
228
|
+
return [e, t].forEach((r, o) => {
|
|
229
|
+
let a = o === 1, s = a ? "--mobile-offset" : "--offset", i = a ? Cr : kr;
|
|
230
|
+
function u(c) {
|
|
231
|
+
["top", "right", "bottom", "left"].forEach((f) => {
|
|
232
|
+
n[`${s}-${f}`] = typeof c == "number" ? `${c}px` : c;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
typeof r == "number" || typeof r == "string" ? u(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((c) => {
|
|
236
|
+
r[c] === void 0 ? n[`${s}-${c}`] = i : n[`${s}-${c}`] = typeof r[c] == "number" ? `${r[c]}px` : r[c];
|
|
237
|
+
}) : u(i);
|
|
238
|
+
}), n;
|
|
239
|
+
}
|
|
240
|
+
sr(function(e, t) {
|
|
241
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: a, closeButton: s, className: i, offset: u, mobileOffset: c, theme: f = "light", richColors: p, duration: h, style: l, visibleToasts: g = Ar, toastOptions: m, dir: y = qt(), gap: T = Lr, loadingIcon: E, icons: R, containerAriaLabel: F = "Notifications", pauseWhenPageIsHidden: L } = e, [S, P] = w.useState([]), q = w.useMemo(() => Array.from(new Set([r].concat(S.filter((C) => C.position).map((C) => C.position)))), [S, r]), [oe, ot] = w.useState([]), [Be, ae] = w.useState(!1), [Ie, ye] = w.useState(!1), [De, fe] = w.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ie = w.useRef(null), Fe = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = w.useRef(null), V = w.useRef(!1), st = w.useCallback((C) => {
|
|
242
|
+
P((_) => {
|
|
243
|
+
var M;
|
|
244
|
+
return (M = _.find(($) => $.id === C.id)) != null && M.delete || W.dismiss(C.id), _.filter(({ id: $ }) => $ !== C.id);
|
|
245
|
+
});
|
|
246
|
+
}, []);
|
|
247
|
+
return w.useEffect(() => W.subscribe((C) => {
|
|
248
|
+
if (C.dismiss) {
|
|
249
|
+
P((_) => _.map((M) => M.id === C.id ? { ...M, delete: !0 } : M));
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
setTimeout(() => {
|
|
253
|
+
lr.flushSync(() => {
|
|
254
|
+
P((_) => {
|
|
255
|
+
let M = _.findIndex(($) => $.id === C.id);
|
|
256
|
+
return M !== -1 ? [..._.slice(0, M), { ..._[M], ...C }, ..._.slice(M + 1)] : [C, ..._];
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
}), []), w.useEffect(() => {
|
|
261
|
+
if (f !== "system") {
|
|
262
|
+
fe(f);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? fe("dark") : fe("light")), typeof window > "u") return;
|
|
266
|
+
let C = window.matchMedia("(prefers-color-scheme: dark)");
|
|
267
|
+
try {
|
|
268
|
+
C.addEventListener("change", ({ matches: _ }) => {
|
|
269
|
+
fe(_ ? "dark" : "light");
|
|
270
|
+
});
|
|
271
|
+
} catch {
|
|
272
|
+
C.addListener(({ matches: M }) => {
|
|
273
|
+
try {
|
|
274
|
+
fe(M ? "dark" : "light");
|
|
275
|
+
} catch ($) {
|
|
276
|
+
console.error($);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}, [f]), w.useEffect(() => {
|
|
281
|
+
S.length <= 1 && ae(!1);
|
|
282
|
+
}, [S]), w.useEffect(() => {
|
|
283
|
+
let C = (_) => {
|
|
284
|
+
var M, $;
|
|
285
|
+
o.every((be) => _[be] || _.code === be) && (ae(!0), (M = ie.current) == null || M.focus()), _.code === "Escape" && (document.activeElement === ie.current || ($ = ie.current) != null && $.contains(document.activeElement)) && ae(!1);
|
|
286
|
+
};
|
|
287
|
+
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
288
|
+
}, [o]), w.useEffect(() => {
|
|
289
|
+
if (ie.current) return () => {
|
|
290
|
+
x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, V.current = !1);
|
|
291
|
+
};
|
|
292
|
+
}, [ie.current]), w.createElement("section", { ref: t, "aria-label": `${F} ${Fe}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, q.map((C, _) => {
|
|
293
|
+
var M;
|
|
294
|
+
let [$, be] = C.split("-");
|
|
295
|
+
return S.length ? w.createElement("ol", { key: C, dir: y === "auto" ? qt() : y, tabIndex: -1, ref: ie, className: i, "data-sonner-toaster": !0, "data-theme": De, "data-y-position": $, "data-lifted": Be && S.length > 1 && !a, "data-x-position": be, style: { "--front-toast-height": `${((M = oe[0]) == null ? void 0 : M.height) || 0}px`, "--width": `${_r}px`, "--gap": `${T}px`, ...l, ...Ir(u, c) }, onBlur: (B) => {
|
|
296
|
+
V.current && !B.currentTarget.contains(B.relatedTarget) && (V.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
|
|
297
|
+
}, onFocus: (B) => {
|
|
298
|
+
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || V.current || (V.current = !0, x.current = B.relatedTarget);
|
|
299
|
+
}, onMouseEnter: () => ae(!0), onMouseMove: () => ae(!0), onMouseLeave: () => {
|
|
300
|
+
Ie || ae(!1);
|
|
301
|
+
}, onDragEnd: () => ae(!1), onPointerDown: (B) => {
|
|
302
|
+
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || ye(!0);
|
|
303
|
+
}, onPointerUp: () => ye(!1) }, S.filter((B) => !B.position && _ === 0 || B.position === C).map((B, at) => {
|
|
304
|
+
var Oe, Ue;
|
|
305
|
+
return w.createElement(Br, { key: B.id, icons: R, index: at, toast: B, defaultRichColors: p, duration: (Oe = m == null ? void 0 : m.duration) != null ? Oe : h, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (Ue = m == null ? void 0 : m.closeButton) != null ? Ue : s, interacting: Ie, position: C, style: m == null ? void 0 : m.style, unstyled: m == null ? void 0 : m.unstyled, classNames: m == null ? void 0 : m.classNames, cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle, actionButtonStyle: m == null ? void 0 : m.actionButtonStyle, removeToast: st, toasts: S.filter((Ae) => Ae.position == B.position), heights: oe.filter((Ae) => Ae.position == B.position), setHeights: ot, expandByDefault: a, gap: T, loadingIcon: E, expanded: Be, pauseWhenPageIsHidden: L, swipeDirections: e.swipeDirections });
|
|
306
|
+
})) : null;
|
|
307
|
+
}));
|
|
308
|
+
});
|
|
309
|
+
function Dr() {
|
|
310
|
+
return { toast: async ({
|
|
311
|
+
id: t,
|
|
312
|
+
title: n,
|
|
313
|
+
description: r,
|
|
314
|
+
action: o = {
|
|
315
|
+
label: "",
|
|
316
|
+
onClick: () => {
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
...a
|
|
320
|
+
}) => {
|
|
321
|
+
const s = { description: r };
|
|
322
|
+
o.label && (s.action = { label: o.label, onClick: o.onClick }), Rr(n, s);
|
|
323
|
+
} };
|
|
324
|
+
}
|
|
325
|
+
var He = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
326
|
+
function Fr(e) {
|
|
5
327
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
328
|
}
|
|
7
|
-
var
|
|
8
|
-
return
|
|
329
|
+
var Ur = "Expected a function", $t = NaN, jr = "[object Symbol]", zr = /^\s+|\s+$/g, Hr = /^[-+]0x[0-9a-f]+$/i, qr = /^0b[01]+$/i, $r = /^0o[0-7]+$/i, Wr = parseInt, Jr = typeof He == "object" && He && He.Object === Object && He, Vr = typeof self == "object" && self && self.Object === Object && self, Kr = Jr || Vr || Function("return this")(), Yr = Object.prototype, Gr = Yr.toString, Xr = Math.max, Qr = Math.min, ht = function() {
|
|
330
|
+
return Kr.Date.now();
|
|
9
331
|
};
|
|
10
|
-
function
|
|
11
|
-
var r, o,
|
|
332
|
+
function Zr(e, t, n) {
|
|
333
|
+
var r, o, a, s, i, u, c = 0, f = !1, p = !1, h = !0;
|
|
12
334
|
if (typeof e != "function")
|
|
13
|
-
throw new TypeError(
|
|
14
|
-
t =
|
|
15
|
-
function l(
|
|
16
|
-
var
|
|
17
|
-
return r = o = void 0,
|
|
335
|
+
throw new TypeError(Ur);
|
|
336
|
+
t = Wt(t) || 0, Et(n) && (f = !!n.leading, p = "maxWait" in n, a = p ? Xr(Wt(n.maxWait) || 0, t) : a, h = "trailing" in n ? !!n.trailing : h);
|
|
337
|
+
function l(S) {
|
|
338
|
+
var P = r, q = o;
|
|
339
|
+
return r = o = void 0, c = S, s = e.apply(q, P), s;
|
|
18
340
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
341
|
+
function g(S) {
|
|
342
|
+
return c = S, i = setTimeout(T, t), f ? l(S) : s;
|
|
21
343
|
}
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
return
|
|
344
|
+
function m(S) {
|
|
345
|
+
var P = S - u, q = S - c, oe = t - P;
|
|
346
|
+
return p ? Qr(oe, a - q) : oe;
|
|
25
347
|
}
|
|
26
|
-
function
|
|
27
|
-
var
|
|
28
|
-
return
|
|
348
|
+
function y(S) {
|
|
349
|
+
var P = S - u, q = S - c;
|
|
350
|
+
return u === void 0 || P >= t || P < 0 || p && q >= a;
|
|
29
351
|
}
|
|
30
|
-
function
|
|
31
|
-
var
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
i = setTimeout(
|
|
352
|
+
function T() {
|
|
353
|
+
var S = ht();
|
|
354
|
+
if (y(S))
|
|
355
|
+
return E(S);
|
|
356
|
+
i = setTimeout(T, m(S));
|
|
35
357
|
}
|
|
36
|
-
function
|
|
37
|
-
return i = void 0,
|
|
358
|
+
function E(S) {
|
|
359
|
+
return i = void 0, h && r ? l(S) : (r = o = void 0, s);
|
|
38
360
|
}
|
|
39
361
|
function R() {
|
|
40
|
-
i !== void 0 && clearTimeout(i),
|
|
362
|
+
i !== void 0 && clearTimeout(i), c = 0, r = u = o = i = void 0;
|
|
41
363
|
}
|
|
42
|
-
function
|
|
43
|
-
return i === void 0 ?
|
|
364
|
+
function F() {
|
|
365
|
+
return i === void 0 ? s : E(ht());
|
|
44
366
|
}
|
|
45
|
-
function
|
|
46
|
-
var
|
|
47
|
-
if (r = arguments, o = this,
|
|
367
|
+
function L() {
|
|
368
|
+
var S = ht(), P = y(S);
|
|
369
|
+
if (r = arguments, o = this, u = S, P) {
|
|
48
370
|
if (i === void 0)
|
|
49
|
-
return
|
|
50
|
-
if (
|
|
51
|
-
return i = setTimeout(
|
|
371
|
+
return g(u);
|
|
372
|
+
if (p)
|
|
373
|
+
return i = setTimeout(T, t), l(u);
|
|
52
374
|
}
|
|
53
|
-
return i === void 0 && (i = setTimeout(
|
|
375
|
+
return i === void 0 && (i = setTimeout(T, t)), s;
|
|
54
376
|
}
|
|
55
|
-
return
|
|
377
|
+
return L.cancel = R, L.flush = F, L;
|
|
56
378
|
}
|
|
57
|
-
function
|
|
379
|
+
function Et(e) {
|
|
58
380
|
var t = typeof e;
|
|
59
381
|
return !!e && (t == "object" || t == "function");
|
|
60
382
|
}
|
|
61
|
-
function
|
|
383
|
+
function eo(e) {
|
|
62
384
|
return !!e && typeof e == "object";
|
|
63
385
|
}
|
|
64
|
-
function
|
|
65
|
-
return typeof e == "symbol" ||
|
|
386
|
+
function to(e) {
|
|
387
|
+
return typeof e == "symbol" || eo(e) && Gr.call(e) == jr;
|
|
66
388
|
}
|
|
67
|
-
function
|
|
389
|
+
function Wt(e) {
|
|
68
390
|
if (typeof e == "number")
|
|
69
391
|
return e;
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
if (
|
|
392
|
+
if (to(e))
|
|
393
|
+
return $t;
|
|
394
|
+
if (Et(e)) {
|
|
73
395
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
74
|
-
e =
|
|
396
|
+
e = Et(t) ? t + "" : t;
|
|
75
397
|
}
|
|
76
398
|
if (typeof e != "string")
|
|
77
399
|
return e === 0 ? e : +e;
|
|
78
|
-
e = e.replace(
|
|
79
|
-
var n =
|
|
80
|
-
return n ||
|
|
400
|
+
e = e.replace(zr, "");
|
|
401
|
+
var n = qr.test(e);
|
|
402
|
+
return n || $r.test(e) ? Wr(e.slice(2), n ? 2 : 8) : Hr.test(e) ? $t : +e;
|
|
81
403
|
}
|
|
82
|
-
var
|
|
83
|
-
const
|
|
84
|
-
function
|
|
404
|
+
var no = Zr;
|
|
405
|
+
const Jt = /* @__PURE__ */ Fr(no);
|
|
406
|
+
function ro(e = !1) {
|
|
85
407
|
if (typeof e != "boolean")
|
|
86
408
|
throw new Error("defaultValue must be `true` or `false`");
|
|
87
|
-
const [t, n] =
|
|
409
|
+
const [t, n] = I(e), r = O(() => {
|
|
88
410
|
n(!0);
|
|
89
|
-
}, []), o =
|
|
411
|
+
}, []), o = O(() => {
|
|
90
412
|
n(!1);
|
|
91
|
-
}, []),
|
|
92
|
-
n((
|
|
413
|
+
}, []), a = O(() => {
|
|
414
|
+
n((s) => !s);
|
|
93
415
|
}, []);
|
|
94
|
-
return { value: t, setValue: n, setTrue: r, setFalse: o, toggle:
|
|
416
|
+
return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: a };
|
|
95
417
|
}
|
|
96
|
-
var
|
|
97
|
-
function
|
|
98
|
-
const o =
|
|
99
|
-
|
|
418
|
+
var ne = typeof window < "u" ? ar : z;
|
|
419
|
+
function Y(e, t, n, r) {
|
|
420
|
+
const o = H(t);
|
|
421
|
+
ne(() => {
|
|
100
422
|
o.current = t;
|
|
101
|
-
}, [t]),
|
|
102
|
-
const
|
|
103
|
-
if (!(
|
|
104
|
-
|
|
105
|
-
const a = (i) => {
|
|
423
|
+
}, [t]), z(() => {
|
|
424
|
+
const a = (n == null ? void 0 : n.current) ?? window;
|
|
425
|
+
if (!(a && a.addEventListener)) return;
|
|
426
|
+
const s = (i) => {
|
|
106
427
|
o.current(i);
|
|
107
428
|
};
|
|
108
|
-
return
|
|
109
|
-
|
|
429
|
+
return a.addEventListener(e, s, r), () => {
|
|
430
|
+
a.removeEventListener(e, s, r);
|
|
110
431
|
};
|
|
111
432
|
}, [e, n, r]);
|
|
112
433
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
434
|
+
function oa(e) {
|
|
435
|
+
Y("click", (t) => {
|
|
436
|
+
e(t);
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
var pt = "useCopyToClipboard";
|
|
440
|
+
function sa() {
|
|
441
|
+
const [e, t] = I(null), { toast: n } = Dr(), r = O(async (a) => {
|
|
442
|
+
if (!(navigator != null && navigator.clipboard))
|
|
443
|
+
return U.log(pt, "not supported"), !1;
|
|
444
|
+
try {
|
|
445
|
+
return await navigator.clipboard.writeText(a), t(a), !0;
|
|
446
|
+
} catch (s) {
|
|
447
|
+
return U.error(pt, "Copy failed", s), t(null), !1;
|
|
448
|
+
}
|
|
449
|
+
}, []);
|
|
450
|
+
return { value: e, copy: r, copyWithToast: async (a = "", s = "copied to clipboard") => {
|
|
451
|
+
const i = await r(a);
|
|
452
|
+
return i && (U.debug(pt, s), n({ title: s })), i;
|
|
453
|
+
} };
|
|
454
|
+
}
|
|
455
|
+
function oo(e) {
|
|
456
|
+
const [t, n] = I(e ?? 0), r = O(() => {
|
|
457
|
+
n((s) => s + 1);
|
|
458
|
+
}, []), o = O(() => {
|
|
459
|
+
n((s) => s - 1);
|
|
460
|
+
}, []), a = O(() => {
|
|
461
|
+
n(e ?? 0);
|
|
462
|
+
}, [e]);
|
|
463
|
+
return {
|
|
464
|
+
count: t,
|
|
465
|
+
increment: r,
|
|
466
|
+
decrement: o,
|
|
467
|
+
reset: a,
|
|
468
|
+
setCount: n
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
function so(e, t) {
|
|
472
|
+
const n = H(e);
|
|
473
|
+
ne(() => {
|
|
474
|
+
n.current = e;
|
|
475
|
+
}, [e]), z(() => {
|
|
476
|
+
if (t === null)
|
|
477
|
+
return;
|
|
478
|
+
const r = setInterval(() => {
|
|
479
|
+
n.current();
|
|
480
|
+
}, t);
|
|
481
|
+
return () => {
|
|
482
|
+
clearInterval(r);
|
|
483
|
+
};
|
|
484
|
+
}, [t]);
|
|
485
|
+
}
|
|
486
|
+
function aa({
|
|
487
|
+
countStart: e,
|
|
488
|
+
countStop: t = 0,
|
|
489
|
+
intervalMs: n = 1e3,
|
|
490
|
+
isIncrement: r = !1
|
|
491
|
+
}) {
|
|
492
|
+
const {
|
|
493
|
+
count: o,
|
|
494
|
+
increment: a,
|
|
495
|
+
decrement: s,
|
|
496
|
+
reset: i
|
|
497
|
+
} = oo(e), {
|
|
498
|
+
value: u,
|
|
499
|
+
setTrue: c,
|
|
500
|
+
setFalse: f
|
|
501
|
+
} = ro(!1), p = O(() => {
|
|
502
|
+
f(), i();
|
|
503
|
+
}, [f, i]), h = O(() => {
|
|
504
|
+
if (o === t) {
|
|
505
|
+
f();
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
r ? a() : s();
|
|
509
|
+
}, [o, t, s, a, r, f]);
|
|
510
|
+
return so(h, u ? n : null), [o, { startCountdown: c, stopCountdown: f, resetCountdown: p }];
|
|
511
|
+
}
|
|
512
|
+
function Ye(e) {
|
|
513
|
+
const t = H(() => {
|
|
115
514
|
throw new Error("Cannot call an event handler while rendering.");
|
|
116
515
|
});
|
|
117
|
-
return
|
|
516
|
+
return ne(() => {
|
|
118
517
|
t.current = e;
|
|
119
|
-
}, [e]),
|
|
518
|
+
}, [e]), O((...n) => {
|
|
120
519
|
var r;
|
|
121
520
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
122
521
|
}, [t]);
|
|
123
522
|
}
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
const { initializeWithValue: r = !0 } = n, o =
|
|
127
|
-
(
|
|
523
|
+
var _e = "useLocalStorage", mt = typeof window > "u";
|
|
524
|
+
function gn(e, t, n = {}) {
|
|
525
|
+
const { initializeWithValue: r = !0 } = n, o = O(
|
|
526
|
+
(h) => n.serializer ? n.serializer(h) : JSON.stringify(h),
|
|
128
527
|
[n]
|
|
129
|
-
),
|
|
130
|
-
(
|
|
528
|
+
), a = O(
|
|
529
|
+
(h) => {
|
|
131
530
|
if (n.deserializer)
|
|
132
|
-
return n.deserializer(
|
|
133
|
-
if (
|
|
531
|
+
return n.deserializer(h);
|
|
532
|
+
if (h === "undefined")
|
|
134
533
|
return;
|
|
135
534
|
const l = t instanceof Function ? t() : t;
|
|
136
|
-
let
|
|
535
|
+
let g;
|
|
137
536
|
try {
|
|
138
|
-
|
|
139
|
-
} catch (
|
|
140
|
-
return
|
|
537
|
+
g = JSON.parse(h);
|
|
538
|
+
} catch (m) {
|
|
539
|
+
return U.error(_e, "Error parsing JSON:", m), l;
|
|
141
540
|
}
|
|
142
|
-
return
|
|
541
|
+
return g;
|
|
143
542
|
},
|
|
144
543
|
[n, t]
|
|
145
|
-
),
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
return
|
|
544
|
+
), s = O(() => {
|
|
545
|
+
const h = t instanceof Function ? t() : t;
|
|
546
|
+
if (mt)
|
|
547
|
+
return h;
|
|
149
548
|
try {
|
|
150
549
|
const l = window.localStorage.getItem(e);
|
|
151
|
-
return l ?
|
|
550
|
+
return l ? a(l) : h;
|
|
152
551
|
} catch (l) {
|
|
153
|
-
return
|
|
552
|
+
return U.error(
|
|
553
|
+
_e,
|
|
554
|
+
`Error reading localStorage key “${e}”:`,
|
|
555
|
+
l
|
|
556
|
+
), h;
|
|
154
557
|
}
|
|
155
|
-
}, [t, e,
|
|
156
|
-
|
|
558
|
+
}, [t, e, a]), [i, u] = I(() => r ? s() : t instanceof Function ? t() : t), c = Ye((h) => {
|
|
559
|
+
mt && U.warn(
|
|
560
|
+
_e,
|
|
157
561
|
`Tried setting localStorage key “${e}” even though environment is not a client`
|
|
158
562
|
);
|
|
159
563
|
try {
|
|
160
|
-
const l =
|
|
161
|
-
window.localStorage.setItem(e, o(l)),
|
|
564
|
+
const l = h instanceof Function ? h(s()) : h;
|
|
565
|
+
window.localStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
|
|
162
566
|
} catch (l) {
|
|
163
|
-
|
|
567
|
+
U.warn(
|
|
568
|
+
_e,
|
|
569
|
+
`Error setting localStorage key “${e}”:`,
|
|
570
|
+
l
|
|
571
|
+
);
|
|
164
572
|
}
|
|
165
|
-
}), f =
|
|
166
|
-
|
|
573
|
+
}), f = Ye(() => {
|
|
574
|
+
mt && U.warn(
|
|
575
|
+
_e,
|
|
167
576
|
`Tried removing localStorage key “${e}” even though environment is not a client`
|
|
168
577
|
);
|
|
169
|
-
const
|
|
170
|
-
window.localStorage.removeItem(e),
|
|
578
|
+
const h = t instanceof Function ? t() : t;
|
|
579
|
+
window.localStorage.removeItem(e), u(h), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
|
|
171
580
|
});
|
|
172
|
-
|
|
173
|
-
|
|
581
|
+
z(() => {
|
|
582
|
+
u(s());
|
|
174
583
|
}, [e]);
|
|
175
|
-
const
|
|
176
|
-
(
|
|
177
|
-
|
|
584
|
+
const p = O(
|
|
585
|
+
(h) => {
|
|
586
|
+
h.key && h.key !== e || u(s());
|
|
178
587
|
},
|
|
179
|
-
[e,
|
|
588
|
+
[e, s]
|
|
180
589
|
);
|
|
181
|
-
return
|
|
590
|
+
return Y("storage", p), Y("local-storage", p), [i, c, f];
|
|
182
591
|
}
|
|
183
|
-
var
|
|
184
|
-
function
|
|
592
|
+
var ao = typeof window > "u";
|
|
593
|
+
function wn(e, {
|
|
185
594
|
defaultValue: t = !1,
|
|
186
595
|
initializeWithValue: n = !0
|
|
187
596
|
} = {}) {
|
|
188
|
-
const r = (i) =>
|
|
189
|
-
function
|
|
190
|
-
|
|
597
|
+
const r = (i) => ao ? t : window.matchMedia(i).matches, [o, a] = I(() => n ? r(e) : t);
|
|
598
|
+
function s() {
|
|
599
|
+
a(r(e));
|
|
191
600
|
}
|
|
192
|
-
return
|
|
601
|
+
return ne(() => {
|
|
193
602
|
const i = window.matchMedia(e);
|
|
194
|
-
return
|
|
195
|
-
i.removeListener ? i.removeListener(
|
|
603
|
+
return s(), i.addListener ? i.addListener(s) : i.addEventListener("change", s), () => {
|
|
604
|
+
i.removeListener ? i.removeListener(s) : i.removeEventListener("change", s);
|
|
196
605
|
};
|
|
197
606
|
}, [e]), o;
|
|
198
607
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
608
|
+
var io = "(prefers-color-scheme: dark)", lo = "usehooks-ts-dark-mode";
|
|
609
|
+
function ia(e = {}) {
|
|
610
|
+
const {
|
|
611
|
+
defaultValue: t,
|
|
612
|
+
localStorageKey: n = lo,
|
|
613
|
+
initializeWithValue: r = !0
|
|
614
|
+
} = e, o = wn(io, {
|
|
615
|
+
initializeWithValue: r,
|
|
616
|
+
defaultValue: t
|
|
617
|
+
}), [a, s] = gn(
|
|
618
|
+
n,
|
|
619
|
+
t ?? o ?? !1,
|
|
620
|
+
{ initializeWithValue: r }
|
|
621
|
+
);
|
|
622
|
+
return ne(() => {
|
|
623
|
+
o !== a && s(o);
|
|
624
|
+
}, [o]), {
|
|
625
|
+
isDarkMode: a,
|
|
626
|
+
toggle: () => {
|
|
627
|
+
s((i) => !i);
|
|
628
|
+
},
|
|
629
|
+
enable: () => {
|
|
630
|
+
s(!0);
|
|
631
|
+
},
|
|
632
|
+
disable: () => {
|
|
633
|
+
s(!1);
|
|
634
|
+
},
|
|
635
|
+
set: (i) => {
|
|
636
|
+
s(i);
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
function yn(e) {
|
|
641
|
+
const t = H(e);
|
|
642
|
+
t.current = e, z(
|
|
202
643
|
() => () => {
|
|
203
644
|
t.current();
|
|
204
645
|
},
|
|
205
646
|
[]
|
|
206
647
|
);
|
|
207
648
|
}
|
|
208
|
-
function
|
|
209
|
-
const r =
|
|
210
|
-
|
|
649
|
+
function _t(e, t = 500, n) {
|
|
650
|
+
const r = H();
|
|
651
|
+
yn(() => {
|
|
211
652
|
r.current && r.current.cancel();
|
|
212
653
|
});
|
|
213
|
-
const o =
|
|
214
|
-
const
|
|
215
|
-
return
|
|
216
|
-
|
|
217
|
-
},
|
|
654
|
+
const o = ir(() => {
|
|
655
|
+
const a = Jt(e, t, n), s = (...i) => a(...i);
|
|
656
|
+
return s.cancel = () => {
|
|
657
|
+
a.cancel();
|
|
658
|
+
}, s.isPending = () => !!r.current, s.flush = () => a.flush(), s;
|
|
218
659
|
}, [e, t, n]);
|
|
219
|
-
return
|
|
220
|
-
r.current =
|
|
660
|
+
return z(() => {
|
|
661
|
+
r.current = Jt(e, t, n);
|
|
221
662
|
}, [e, t, n]), o;
|
|
222
663
|
}
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
|
|
664
|
+
function la(e, t, n) {
|
|
665
|
+
const r = (n == null ? void 0 : n.equalityFn) ?? ((c, f) => c === f), o = e instanceof Function ? e() : e, [a, s] = I(o), i = H(o), u = _t(
|
|
666
|
+
s,
|
|
667
|
+
t,
|
|
668
|
+
n
|
|
669
|
+
);
|
|
670
|
+
return r(i.current, o) || (u(o), i.current = o), [a, u];
|
|
671
|
+
}
|
|
672
|
+
function ca(e, t = {}) {
|
|
673
|
+
const { preserveTitleOnUnmount: n = !0 } = t, r = H(null);
|
|
674
|
+
ne(() => {
|
|
226
675
|
r.current = window.document.title;
|
|
227
|
-
}, []),
|
|
676
|
+
}, []), ne(() => {
|
|
228
677
|
window.document.title = e;
|
|
229
|
-
}, [e]),
|
|
678
|
+
}, [e]), yn(() => {
|
|
230
679
|
!n && r.current && (window.document.title = r.current);
|
|
231
680
|
});
|
|
232
681
|
}
|
|
233
|
-
function
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
682
|
+
function co() {
|
|
683
|
+
const e = H(!0);
|
|
684
|
+
return e.current ? (e.current = !1, !0) : e.current;
|
|
685
|
+
}
|
|
686
|
+
function ua(e, t) {
|
|
687
|
+
const n = co();
|
|
688
|
+
z(() => {
|
|
689
|
+
if (!n)
|
|
690
|
+
return e();
|
|
691
|
+
}, t);
|
|
692
|
+
}
|
|
693
|
+
function da(e) {
|
|
694
|
+
const [t, n] = I(!1), r = () => {
|
|
695
|
+
n(!0);
|
|
696
|
+
}, o = () => {
|
|
697
|
+
n(!1);
|
|
698
|
+
};
|
|
699
|
+
return Y("mouseenter", r, e), Y("mouseleave", o, e), t;
|
|
700
|
+
}
|
|
701
|
+
function fa({
|
|
702
|
+
threshold: e = 0,
|
|
703
|
+
root: t = null,
|
|
704
|
+
rootMargin: n = "0%",
|
|
705
|
+
freezeOnceVisible: r = !1,
|
|
706
|
+
initialIsIntersecting: o = !1,
|
|
707
|
+
onChange: a
|
|
708
|
+
} = {}) {
|
|
709
|
+
var s;
|
|
710
|
+
const [i, u] = I(null), [c, f] = I(() => ({
|
|
711
|
+
isIntersecting: o,
|
|
712
|
+
entry: void 0
|
|
713
|
+
})), p = H();
|
|
714
|
+
p.current = a;
|
|
715
|
+
const h = ((s = c.entry) == null ? void 0 : s.isIntersecting) && r;
|
|
716
|
+
z(() => {
|
|
717
|
+
if (!i || !("IntersectionObserver" in window) || h) return;
|
|
718
|
+
const m = new IntersectionObserver(
|
|
719
|
+
(y) => {
|
|
720
|
+
const T = Array.isArray(m.thresholds) ? m.thresholds : [m.thresholds];
|
|
721
|
+
y.forEach((E) => {
|
|
722
|
+
const R = E.isIntersecting && T.some((F) => E.intersectionRatio >= F);
|
|
723
|
+
f({ isIntersecting: R, entry: E }), p.current && p.current(R, E);
|
|
724
|
+
});
|
|
725
|
+
},
|
|
726
|
+
{ threshold: e, root: t, rootMargin: n }
|
|
727
|
+
);
|
|
728
|
+
return m.observe(i), () => {
|
|
729
|
+
m.disconnect();
|
|
730
|
+
};
|
|
731
|
+
}, [
|
|
732
|
+
i,
|
|
733
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
734
|
+
JSON.stringify(e),
|
|
735
|
+
t,
|
|
736
|
+
n,
|
|
737
|
+
h,
|
|
738
|
+
r
|
|
739
|
+
]);
|
|
740
|
+
const l = H(null);
|
|
741
|
+
z(() => {
|
|
742
|
+
var m;
|
|
743
|
+
!i && ((m = c.entry) != null && m.target) && !r && !h && l.current !== c.entry.target && (l.current = c.entry.target, f({ isIntersecting: o, entry: void 0 }));
|
|
744
|
+
}, [i, c.entry, r, h, o]);
|
|
745
|
+
const g = [
|
|
746
|
+
u,
|
|
747
|
+
!!c.isIntersecting,
|
|
748
|
+
c.entry
|
|
749
|
+
];
|
|
750
|
+
return g.ref = g[0], g.isIntersecting = g[1], g.entry = g[2], g;
|
|
751
|
+
}
|
|
752
|
+
function ha() {
|
|
753
|
+
const [e, t] = I(!1);
|
|
754
|
+
return z(() => {
|
|
755
|
+
t(!0);
|
|
756
|
+
}, []), e;
|
|
757
|
+
}
|
|
758
|
+
function uo() {
|
|
759
|
+
const e = H(!1);
|
|
760
|
+
return z(() => (e.current = !0, () => {
|
|
761
|
+
e.current = !1;
|
|
762
|
+
}), []), O(() => e.current, []);
|
|
763
|
+
}
|
|
764
|
+
function pa(e = /* @__PURE__ */ new Map()) {
|
|
765
|
+
const [t, n] = I(new Map(e)), r = {
|
|
766
|
+
set: O((o, a) => {
|
|
767
|
+
n((s) => {
|
|
768
|
+
const i = new Map(s);
|
|
769
|
+
return i.set(o, a), i;
|
|
239
770
|
});
|
|
240
771
|
}, []),
|
|
241
|
-
setAll:
|
|
772
|
+
setAll: O((o) => {
|
|
242
773
|
n(() => new Map(o));
|
|
243
774
|
}, []),
|
|
244
|
-
remove:
|
|
245
|
-
n((
|
|
246
|
-
const
|
|
247
|
-
return
|
|
775
|
+
remove: O((o) => {
|
|
776
|
+
n((a) => {
|
|
777
|
+
const s = new Map(a);
|
|
778
|
+
return s.delete(o), s;
|
|
248
779
|
});
|
|
249
780
|
}, []),
|
|
250
|
-
reset:
|
|
781
|
+
reset: O(() => {
|
|
251
782
|
n(() => /* @__PURE__ */ new Map());
|
|
252
783
|
}, [])
|
|
253
784
|
};
|
|
254
785
|
return [t, r];
|
|
255
786
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
787
|
+
function ma(e, t, n = "mousedown", r = {}) {
|
|
788
|
+
Y(
|
|
258
789
|
n,
|
|
259
790
|
(o) => {
|
|
260
|
-
const
|
|
261
|
-
if (!
|
|
791
|
+
const a = o.target;
|
|
792
|
+
if (!(a != null && a.isConnected))
|
|
262
793
|
return;
|
|
263
|
-
(Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(
|
|
794
|
+
(Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(a)) : e.current && !e.current.contains(a)) && t(o);
|
|
264
795
|
},
|
|
265
796
|
void 0,
|
|
266
797
|
r
|
|
267
798
|
);
|
|
268
799
|
}
|
|
269
|
-
var
|
|
270
|
-
function
|
|
800
|
+
var Vt = typeof window > "u";
|
|
801
|
+
function ga(e, t = {}) {
|
|
802
|
+
let { initializeWithValue: n = !0 } = t;
|
|
803
|
+
Vt && (n = !1);
|
|
804
|
+
const r = O(
|
|
805
|
+
(u) => {
|
|
806
|
+
if (t.deserializer)
|
|
807
|
+
return t.deserializer(u);
|
|
808
|
+
if (u === "undefined")
|
|
809
|
+
return;
|
|
810
|
+
let c;
|
|
811
|
+
try {
|
|
812
|
+
c = JSON.parse(u);
|
|
813
|
+
} catch (f) {
|
|
814
|
+
return console.error("Error parsing JSON:", f), null;
|
|
815
|
+
}
|
|
816
|
+
return c;
|
|
817
|
+
},
|
|
818
|
+
[t]
|
|
819
|
+
), o = O(() => {
|
|
820
|
+
if (Vt)
|
|
821
|
+
return null;
|
|
822
|
+
try {
|
|
823
|
+
const u = window.localStorage.getItem(e);
|
|
824
|
+
return u ? r(u) : null;
|
|
825
|
+
} catch (u) {
|
|
826
|
+
return console.warn(`Error reading localStorage key “${e}”:`, u), null;
|
|
827
|
+
}
|
|
828
|
+
}, [e, r]), [a, s] = I(() => {
|
|
829
|
+
if (n)
|
|
830
|
+
return o();
|
|
831
|
+
});
|
|
832
|
+
z(() => {
|
|
833
|
+
s(o());
|
|
834
|
+
}, [e]);
|
|
835
|
+
const i = O(
|
|
836
|
+
(u) => {
|
|
837
|
+
u.key && u.key !== e || s(o());
|
|
838
|
+
},
|
|
839
|
+
[e, o]
|
|
840
|
+
);
|
|
841
|
+
return Y("storage", i), Y("local-storage", i), a;
|
|
842
|
+
}
|
|
843
|
+
var Kt = {
|
|
844
|
+
width: void 0,
|
|
845
|
+
height: void 0
|
|
846
|
+
};
|
|
847
|
+
function wa(e) {
|
|
848
|
+
const { ref: t, box: n = "content-box" } = e, [{ width: r, height: o }, a] = I(Kt), s = uo(), i = H({ ...Kt }), u = H(void 0);
|
|
849
|
+
return u.current = e.onResize, z(() => {
|
|
850
|
+
if (!t.current || typeof window > "u" || !("ResizeObserver" in window)) return;
|
|
851
|
+
const c = new ResizeObserver(([f]) => {
|
|
852
|
+
const p = n === "border-box" ? "borderBoxSize" : n === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", h = Yt(f, p, "inlineSize"), l = Yt(f, p, "blockSize");
|
|
853
|
+
if (i.current.width !== h || i.current.height !== l) {
|
|
854
|
+
const m = { width: h, height: l };
|
|
855
|
+
i.current.width = h, i.current.height = l, u.current ? u.current(m) : s() && a(m);
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
return c.observe(t.current, { box: n }), () => {
|
|
859
|
+
c.disconnect();
|
|
860
|
+
};
|
|
861
|
+
}, [n, t, s]), { width: r, height: o };
|
|
862
|
+
}
|
|
863
|
+
function Yt(e, t, n) {
|
|
864
|
+
return e[t] ? Array.isArray(e[t]) ? (
|
|
865
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
866
|
+
e[t][0][n]
|
|
867
|
+
) : (
|
|
868
|
+
// @ts-ignore Support Firefox's non-standard behavior
|
|
869
|
+
e[t][n]
|
|
870
|
+
) : t === "contentBoxSize" ? e.contentRect[n === "inlineSize" ? "width" : "height"] : void 0;
|
|
871
|
+
}
|
|
872
|
+
var Gt = typeof window > "u";
|
|
873
|
+
function ya(e = {}) {
|
|
874
|
+
let { initializeWithValue: t = !0 } = e;
|
|
875
|
+
Gt && (t = !1);
|
|
876
|
+
const n = () => {
|
|
877
|
+
if (!Gt)
|
|
878
|
+
return window.screen;
|
|
879
|
+
}, [r, o] = I(() => {
|
|
880
|
+
if (t)
|
|
881
|
+
return n();
|
|
882
|
+
}), a = _t(
|
|
883
|
+
o,
|
|
884
|
+
e.debounceDelay
|
|
885
|
+
);
|
|
886
|
+
function s() {
|
|
887
|
+
const i = n(), u = e.debounceDelay ? a : o;
|
|
888
|
+
if (i) {
|
|
889
|
+
const {
|
|
890
|
+
width: c,
|
|
891
|
+
height: f,
|
|
892
|
+
availHeight: p,
|
|
893
|
+
availWidth: h,
|
|
894
|
+
colorDepth: l,
|
|
895
|
+
orientation: g,
|
|
896
|
+
pixelDepth: m
|
|
897
|
+
} = i;
|
|
898
|
+
u({
|
|
899
|
+
width: c,
|
|
900
|
+
height: f,
|
|
901
|
+
availHeight: p,
|
|
902
|
+
availWidth: h,
|
|
903
|
+
colorDepth: l,
|
|
904
|
+
orientation: g,
|
|
905
|
+
pixelDepth: m
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return Y("resize", s), ne(() => {
|
|
910
|
+
s();
|
|
911
|
+
}, []), r;
|
|
912
|
+
}
|
|
913
|
+
var qe = /* @__PURE__ */ new Map();
|
|
914
|
+
function fo(e) {
|
|
915
|
+
const t = document.querySelector(
|
|
916
|
+
`script[src="${e}"]`
|
|
917
|
+
), n = t == null ? void 0 : t.getAttribute("data-status");
|
|
918
|
+
return {
|
|
919
|
+
node: t,
|
|
920
|
+
status: n
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
function ba(e, t) {
|
|
924
|
+
const [n, r] = I(() => !e || t != null && t.shouldPreventLoad ? "idle" : typeof window > "u" ? "loading" : qe.get(e) ?? "loading");
|
|
925
|
+
return z(() => {
|
|
926
|
+
if (!e || t != null && t.shouldPreventLoad)
|
|
927
|
+
return;
|
|
928
|
+
const o = qe.get(e);
|
|
929
|
+
if (o === "ready" || o === "error") {
|
|
930
|
+
r(o);
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
const a = fo(e);
|
|
934
|
+
let s = a.node;
|
|
935
|
+
if (s)
|
|
936
|
+
r(a.status ?? o ?? "loading");
|
|
937
|
+
else {
|
|
938
|
+
s = document.createElement("script"), s.src = e, s.async = !0, t != null && t.id && (s.id = t.id), s.setAttribute("data-status", "loading"), document.body.appendChild(s);
|
|
939
|
+
const u = (c) => {
|
|
940
|
+
const f = c.type === "load" ? "ready" : "error";
|
|
941
|
+
s == null || s.setAttribute("data-status", f);
|
|
942
|
+
};
|
|
943
|
+
s.addEventListener("load", u), s.addEventListener("error", u);
|
|
944
|
+
}
|
|
945
|
+
const i = (u) => {
|
|
946
|
+
const c = u.type === "load" ? "ready" : "error";
|
|
947
|
+
r(c), qe.set(e, c);
|
|
948
|
+
};
|
|
949
|
+
return s.addEventListener("load", i), s.addEventListener("error", i), () => {
|
|
950
|
+
s && (s.removeEventListener("load", i), s.removeEventListener("error", i)), s && (t != null && t.removeOnUnmount) && (s.remove(), qe.delete(e));
|
|
951
|
+
};
|
|
952
|
+
}, [e, t == null ? void 0 : t.shouldPreventLoad, t == null ? void 0 : t.removeOnUnmount, t == null ? void 0 : t.id]), n;
|
|
953
|
+
}
|
|
954
|
+
var ho = typeof window > "u";
|
|
955
|
+
function va(e = {}) {
|
|
956
|
+
const { autoLock: t = !0, lockTarget: n, widthReflow: r = !0 } = e, [o, a] = I(!1), s = H(null), i = H(null), u = () => {
|
|
957
|
+
if (s.current) {
|
|
958
|
+
const { overflow: f, paddingRight: p } = s.current.style;
|
|
959
|
+
if (i.current = { overflow: f, paddingRight: p }, r) {
|
|
960
|
+
const h = s.current === document.body ? window.innerWidth : s.current.offsetWidth, l = parseInt(window.getComputedStyle(s.current).paddingRight, 10) || 0, g = h - s.current.scrollWidth;
|
|
961
|
+
s.current.style.paddingRight = `${g + l}px`;
|
|
962
|
+
}
|
|
963
|
+
s.current.style.overflow = "hidden", a(!0);
|
|
964
|
+
}
|
|
965
|
+
}, c = () => {
|
|
966
|
+
s.current && i.current && (s.current.style.overflow = i.current.overflow, r && (s.current.style.paddingRight = i.current.paddingRight)), a(!1);
|
|
967
|
+
};
|
|
968
|
+
return ne(() => {
|
|
969
|
+
if (!ho)
|
|
970
|
+
return n && (s.current = typeof n == "string" ? document.querySelector(n) : n), s.current || (s.current = document.body), t && u(), () => {
|
|
971
|
+
c();
|
|
972
|
+
};
|
|
973
|
+
}, [t, n, r]), { isLocked: o, lock: u, unlock: c };
|
|
974
|
+
}
|
|
975
|
+
var gt = typeof window > "u";
|
|
976
|
+
function Sa(e, t, n = {}) {
|
|
977
|
+
const { initializeWithValue: r = !0 } = n, o = O(
|
|
978
|
+
(h) => n.serializer ? n.serializer(h) : JSON.stringify(h),
|
|
979
|
+
[n]
|
|
980
|
+
), a = O(
|
|
981
|
+
(h) => {
|
|
982
|
+
if (n.deserializer)
|
|
983
|
+
return n.deserializer(h);
|
|
984
|
+
if (h === "undefined")
|
|
985
|
+
return;
|
|
986
|
+
const l = t instanceof Function ? t() : t;
|
|
987
|
+
let g;
|
|
988
|
+
try {
|
|
989
|
+
g = JSON.parse(h);
|
|
990
|
+
} catch (m) {
|
|
991
|
+
return console.error("Error parsing JSON:", m), l;
|
|
992
|
+
}
|
|
993
|
+
return g;
|
|
994
|
+
},
|
|
995
|
+
[n, t]
|
|
996
|
+
), s = O(() => {
|
|
997
|
+
const h = t instanceof Function ? t() : t;
|
|
998
|
+
if (gt)
|
|
999
|
+
return h;
|
|
1000
|
+
try {
|
|
1001
|
+
const l = window.sessionStorage.getItem(e);
|
|
1002
|
+
return l ? a(l) : h;
|
|
1003
|
+
} catch (l) {
|
|
1004
|
+
return console.warn(`Error reading sessionStorage key “${e}”:`, l), h;
|
|
1005
|
+
}
|
|
1006
|
+
}, [t, e, a]), [i, u] = I(() => r ? s() : t instanceof Function ? t() : t), c = Ye((h) => {
|
|
1007
|
+
gt && console.warn(
|
|
1008
|
+
`Tried setting sessionStorage key “${e}” even though environment is not a client`
|
|
1009
|
+
);
|
|
1010
|
+
try {
|
|
1011
|
+
const l = h instanceof Function ? h(s()) : h;
|
|
1012
|
+
window.sessionStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
|
|
1013
|
+
} catch (l) {
|
|
1014
|
+
console.warn(`Error setting sessionStorage key “${e}”:`, l);
|
|
1015
|
+
}
|
|
1016
|
+
}), f = Ye(() => {
|
|
1017
|
+
gt && console.warn(
|
|
1018
|
+
`Tried removing sessionStorage key “${e}” even though environment is not a client`
|
|
1019
|
+
);
|
|
1020
|
+
const h = t instanceof Function ? t() : t;
|
|
1021
|
+
window.sessionStorage.removeItem(e), u(h), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
|
|
1022
|
+
});
|
|
1023
|
+
z(() => {
|
|
1024
|
+
u(s());
|
|
1025
|
+
}, [e]);
|
|
1026
|
+
const p = O(
|
|
1027
|
+
(h) => {
|
|
1028
|
+
h.key && h.key !== e || u(s());
|
|
1029
|
+
},
|
|
1030
|
+
[e, s]
|
|
1031
|
+
);
|
|
1032
|
+
return Y("storage", p), Y("session-storage", p), [i, c, f];
|
|
1033
|
+
}
|
|
1034
|
+
function Ea(e) {
|
|
1035
|
+
const [t, n] = I(1), r = t + 1 <= e, o = t - 1 > 0, a = O(
|
|
1036
|
+
(c) => {
|
|
1037
|
+
const f = c instanceof Function ? c(t) : c;
|
|
1038
|
+
if (f >= 1 && f <= e) {
|
|
1039
|
+
n(f);
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
throw new Error("Step not valid");
|
|
1043
|
+
},
|
|
1044
|
+
[e, t]
|
|
1045
|
+
), s = O(() => {
|
|
1046
|
+
r && n((c) => c + 1);
|
|
1047
|
+
}, [r]), i = O(() => {
|
|
1048
|
+
o && n((c) => c - 1);
|
|
1049
|
+
}, [o]), u = O(() => {
|
|
1050
|
+
n(1);
|
|
1051
|
+
}, []);
|
|
1052
|
+
return [
|
|
1053
|
+
t,
|
|
1054
|
+
{
|
|
1055
|
+
goToNextStep: s,
|
|
1056
|
+
goToPrevStep: i,
|
|
1057
|
+
canGoToNextStep: r,
|
|
1058
|
+
canGoToPrevStep: o,
|
|
1059
|
+
setStep: a,
|
|
1060
|
+
reset: u
|
|
1061
|
+
}
|
|
1062
|
+
];
|
|
1063
|
+
}
|
|
1064
|
+
var po = "(prefers-color-scheme: dark)", mo = "usehooks-ts-ternary-dark-mode";
|
|
1065
|
+
function xa({
|
|
1066
|
+
defaultValue: e = "system",
|
|
1067
|
+
localStorageKey: t = mo,
|
|
1068
|
+
initializeWithValue: n = !0
|
|
1069
|
+
} = {}) {
|
|
1070
|
+
const r = wn(po, { initializeWithValue: n }), [o, a] = gn(t, e, {
|
|
1071
|
+
initializeWithValue: n
|
|
1072
|
+
});
|
|
1073
|
+
return {
|
|
1074
|
+
isDarkMode: o === "dark" || o === "system" && r,
|
|
1075
|
+
ternaryDarkMode: o,
|
|
1076
|
+
setTernaryDarkMode: a,
|
|
1077
|
+
toggleTernaryDarkMode: () => {
|
|
1078
|
+
const u = ["light", "system", "dark"];
|
|
1079
|
+
a((c) => {
|
|
1080
|
+
const f = (u.indexOf(c) + 1) % u.length;
|
|
1081
|
+
return u[f];
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
function Ta(e, t) {
|
|
1087
|
+
const n = H(e);
|
|
1088
|
+
ne(() => {
|
|
1089
|
+
n.current = e;
|
|
1090
|
+
}, [e]), z(() => {
|
|
1091
|
+
if (!t && t !== 0)
|
|
1092
|
+
return;
|
|
1093
|
+
const r = setTimeout(() => {
|
|
1094
|
+
n.current();
|
|
1095
|
+
}, t);
|
|
1096
|
+
return () => {
|
|
1097
|
+
clearTimeout(r);
|
|
1098
|
+
};
|
|
1099
|
+
}, [t]);
|
|
1100
|
+
}
|
|
1101
|
+
function Ra(e) {
|
|
1102
|
+
const [t, n] = I(!!e), r = O(() => {
|
|
1103
|
+
n((o) => !o);
|
|
1104
|
+
}, []);
|
|
1105
|
+
return [t, r, n];
|
|
1106
|
+
}
|
|
1107
|
+
var go = typeof window > "u";
|
|
1108
|
+
function Oa(e = {}) {
|
|
271
1109
|
let { initializeWithValue: t = !0 } = e;
|
|
272
|
-
|
|
273
|
-
const [n, r] =
|
|
1110
|
+
go && (t = !1);
|
|
1111
|
+
const [n, r] = I(() => t ? {
|
|
274
1112
|
width: window.innerWidth,
|
|
275
1113
|
height: window.innerHeight
|
|
276
1114
|
} : {
|
|
277
1115
|
width: void 0,
|
|
278
1116
|
height: void 0
|
|
279
|
-
}), o =
|
|
1117
|
+
}), o = _t(
|
|
280
1118
|
r,
|
|
281
1119
|
e.debounceDelay
|
|
282
1120
|
);
|
|
283
|
-
function
|
|
1121
|
+
function a() {
|
|
284
1122
|
(e.debounceDelay ? o : r)({
|
|
285
1123
|
width: window.innerWidth,
|
|
286
1124
|
height: window.innerHeight
|
|
287
1125
|
});
|
|
288
1126
|
}
|
|
289
|
-
return
|
|
290
|
-
|
|
1127
|
+
return Y("resize", a), ne(() => {
|
|
1128
|
+
a();
|
|
291
1129
|
}, []), n;
|
|
292
1130
|
}
|
|
293
|
-
function
|
|
1131
|
+
function bn(e, t) {
|
|
294
1132
|
return function() {
|
|
295
1133
|
return e.apply(t, arguments);
|
|
296
1134
|
};
|
|
297
1135
|
}
|
|
298
|
-
const { toString:
|
|
299
|
-
const n =
|
|
1136
|
+
const { toString: wo } = Object.prototype, { getPrototypeOf: Lt } = Object, Qe = /* @__PURE__ */ ((e) => (t) => {
|
|
1137
|
+
const n = wo.call(t);
|
|
300
1138
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
301
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
302
|
-
function
|
|
303
|
-
return e !== null && !
|
|
1139
|
+
})(/* @__PURE__ */ Object.create(null)), re = (e) => (e = e.toLowerCase(), (t) => Qe(t) === e), Ze = (e) => (t) => typeof t === e, { isArray: Te } = Array, Ne = Ze("undefined");
|
|
1140
|
+
function yo(e) {
|
|
1141
|
+
return e !== null && !Ne(e) && e.constructor !== null && !Ne(e.constructor) && K(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
304
1142
|
}
|
|
305
|
-
const
|
|
306
|
-
function
|
|
1143
|
+
const vn = re("ArrayBuffer");
|
|
1144
|
+
function bo(e) {
|
|
307
1145
|
let t;
|
|
308
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
1146
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && vn(e.buffer), t;
|
|
309
1147
|
}
|
|
310
|
-
const
|
|
311
|
-
if (
|
|
1148
|
+
const vo = Ze("string"), K = Ze("function"), Sn = Ze("number"), et = (e) => e !== null && typeof e == "object", So = (e) => e === !0 || e === !1, Je = (e) => {
|
|
1149
|
+
if (Qe(e) !== "object")
|
|
312
1150
|
return !1;
|
|
313
|
-
const t =
|
|
1151
|
+
const t = Lt(e);
|
|
314
1152
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
315
|
-
},
|
|
1153
|
+
}, Eo = re("Date"), xo = re("File"), To = re("Blob"), Ro = re("FileList"), Oo = (e) => et(e) && K(e.pipe), Ao = (e) => {
|
|
316
1154
|
let t;
|
|
317
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
318
|
-
t === "object" &&
|
|
319
|
-
},
|
|
320
|
-
function
|
|
1155
|
+
return e && (typeof FormData == "function" && e instanceof FormData || K(e.append) && ((t = Qe(e)) === "formdata" || // detect form-data instance
|
|
1156
|
+
t === "object" && K(e.toString) && e.toString() === "[object FormData]"));
|
|
1157
|
+
}, ko = re("URLSearchParams"), [Co, _o, Lo, No] = ["ReadableStream", "Request", "Response", "Headers"].map(re), Mo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1158
|
+
function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
321
1159
|
if (e === null || typeof e > "u")
|
|
322
1160
|
return;
|
|
323
1161
|
let r, o;
|
|
324
|
-
if (typeof e != "object" && (e = [e]),
|
|
1162
|
+
if (typeof e != "object" && (e = [e]), Te(e))
|
|
325
1163
|
for (r = 0, o = e.length; r < o; r++)
|
|
326
1164
|
t.call(null, e[r], r, e);
|
|
327
1165
|
else {
|
|
328
|
-
const
|
|
1166
|
+
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = a.length;
|
|
329
1167
|
let i;
|
|
330
|
-
for (r = 0; r <
|
|
331
|
-
i =
|
|
1168
|
+
for (r = 0; r < s; r++)
|
|
1169
|
+
i = a[r], t.call(null, e[i], i, e);
|
|
332
1170
|
}
|
|
333
1171
|
}
|
|
334
|
-
function
|
|
1172
|
+
function En(e, t) {
|
|
335
1173
|
t = t.toLowerCase();
|
|
336
1174
|
const n = Object.keys(e);
|
|
337
1175
|
let r = n.length, o;
|
|
@@ -340,75 +1178,75 @@ function hn(e, t) {
|
|
|
340
1178
|
return o;
|
|
341
1179
|
return null;
|
|
342
1180
|
}
|
|
343
|
-
const
|
|
344
|
-
function
|
|
345
|
-
const { caseless: e } =
|
|
346
|
-
const
|
|
347
|
-
|
|
1181
|
+
const me = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xn = (e) => !Ne(e) && e !== me;
|
|
1182
|
+
function xt() {
|
|
1183
|
+
const { caseless: e } = xn(this) && this || {}, t = {}, n = (r, o) => {
|
|
1184
|
+
const a = e && En(t, o) || o;
|
|
1185
|
+
Je(t[a]) && Je(r) ? t[a] = xt(t[a], r) : Je(r) ? t[a] = xt({}, r) : Te(r) ? t[a] = r.slice() : t[a] = r;
|
|
348
1186
|
};
|
|
349
1187
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
350
|
-
arguments[r] &&
|
|
1188
|
+
arguments[r] && Me(arguments[r], n);
|
|
351
1189
|
return t;
|
|
352
1190
|
}
|
|
353
|
-
const
|
|
354
|
-
n &&
|
|
355
|
-
}, { allOwnKeys: r }), e),
|
|
1191
|
+
const Po = (e, t, n, { allOwnKeys: r } = {}) => (Me(t, (o, a) => {
|
|
1192
|
+
n && K(o) ? e[a] = bn(o, n) : e[a] = o;
|
|
1193
|
+
}, { allOwnKeys: r }), e), Bo = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Io = (e, t, n, r) => {
|
|
356
1194
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
357
1195
|
value: t.prototype
|
|
358
1196
|
}), n && Object.assign(e.prototype, n);
|
|
359
|
-
},
|
|
360
|
-
let o,
|
|
1197
|
+
}, Do = (e, t, n, r) => {
|
|
1198
|
+
let o, a, s;
|
|
361
1199
|
const i = {};
|
|
362
1200
|
if (t = t || {}, e == null) return t;
|
|
363
1201
|
do {
|
|
364
|
-
for (o = Object.getOwnPropertyNames(e),
|
|
365
|
-
|
|
366
|
-
e = n !== !1 &&
|
|
1202
|
+
for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; )
|
|
1203
|
+
s = o[a], (!r || r(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
|
|
1204
|
+
e = n !== !1 && Lt(e);
|
|
367
1205
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
368
1206
|
return t;
|
|
369
|
-
},
|
|
1207
|
+
}, Fo = (e, t, n) => {
|
|
370
1208
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
371
1209
|
const r = e.indexOf(t, n);
|
|
372
1210
|
return r !== -1 && r === n;
|
|
373
|
-
},
|
|
1211
|
+
}, Uo = (e) => {
|
|
374
1212
|
if (!e) return null;
|
|
375
|
-
if (
|
|
1213
|
+
if (Te(e)) return e;
|
|
376
1214
|
let t = e.length;
|
|
377
|
-
if (!
|
|
1215
|
+
if (!Sn(t)) return null;
|
|
378
1216
|
const n = new Array(t);
|
|
379
1217
|
for (; t-- > 0; )
|
|
380
1218
|
n[t] = e[t];
|
|
381
1219
|
return n;
|
|
382
|
-
},
|
|
1220
|
+
}, jo = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Lt(Uint8Array)), zo = (e, t) => {
|
|
383
1221
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
384
1222
|
let o;
|
|
385
1223
|
for (; (o = r.next()) && !o.done; ) {
|
|
386
|
-
const
|
|
387
|
-
t.call(e,
|
|
1224
|
+
const a = o.value;
|
|
1225
|
+
t.call(e, a[0], a[1]);
|
|
388
1226
|
}
|
|
389
|
-
},
|
|
1227
|
+
}, Ho = (e, t) => {
|
|
390
1228
|
let n;
|
|
391
1229
|
const r = [];
|
|
392
1230
|
for (; (n = e.exec(t)) !== null; )
|
|
393
1231
|
r.push(n);
|
|
394
1232
|
return r;
|
|
395
|
-
},
|
|
1233
|
+
}, qo = re("HTMLFormElement"), $o = (e) => e.toLowerCase().replace(
|
|
396
1234
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
397
1235
|
function(n, r, o) {
|
|
398
1236
|
return r.toUpperCase() + o;
|
|
399
1237
|
}
|
|
400
|
-
),
|
|
1238
|
+
), Xt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wo = re("RegExp"), Tn = (e, t) => {
|
|
401
1239
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
402
|
-
|
|
403
|
-
let
|
|
404
|
-
(
|
|
1240
|
+
Me(n, (o, a) => {
|
|
1241
|
+
let s;
|
|
1242
|
+
(s = t(o, a, e)) !== !1 && (r[a] = s || o);
|
|
405
1243
|
}), Object.defineProperties(e, r);
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
if (
|
|
1244
|
+
}, Jo = (e) => {
|
|
1245
|
+
Tn(e, (t, n) => {
|
|
1246
|
+
if (K(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
409
1247
|
return !1;
|
|
410
1248
|
const r = e[n];
|
|
411
|
-
if (
|
|
1249
|
+
if (K(r)) {
|
|
412
1250
|
if (t.enumerable = !1, "writable" in t) {
|
|
413
1251
|
t.writable = !1;
|
|
414
1252
|
return;
|
|
@@ -418,116 +1256,104 @@ const Ur = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (o, s) => {
|
|
|
418
1256
|
});
|
|
419
1257
|
}
|
|
420
1258
|
});
|
|
421
|
-
},
|
|
1259
|
+
}, Vo = (e, t) => {
|
|
422
1260
|
const n = {}, r = (o) => {
|
|
423
|
-
o.forEach((
|
|
424
|
-
n[
|
|
1261
|
+
o.forEach((a) => {
|
|
1262
|
+
n[a] = !0;
|
|
425
1263
|
});
|
|
426
1264
|
};
|
|
427
|
-
return
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
ALPHA_DIGIT: dt + dt.toUpperCase() + zt
|
|
433
|
-
}, ro = (e = 16, t = wn.ALPHA_DIGIT) => {
|
|
434
|
-
let n = "";
|
|
435
|
-
const { length: r } = t;
|
|
436
|
-
for (; e--; )
|
|
437
|
-
n += t[Math.random() * r | 0];
|
|
438
|
-
return n;
|
|
439
|
-
};
|
|
440
|
-
function oo(e) {
|
|
441
|
-
return !!(e && z(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
1265
|
+
return Te(e) ? r(e) : r(String(e).split(t)), n;
|
|
1266
|
+
}, Ko = () => {
|
|
1267
|
+
}, Yo = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1268
|
+
function Go(e) {
|
|
1269
|
+
return !!(e && K(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
442
1270
|
}
|
|
443
|
-
const
|
|
1271
|
+
const Xo = (e) => {
|
|
444
1272
|
const t = new Array(10), n = (r, o) => {
|
|
445
|
-
if (
|
|
1273
|
+
if (et(r)) {
|
|
446
1274
|
if (t.indexOf(r) >= 0)
|
|
447
1275
|
return;
|
|
448
1276
|
if (!("toJSON" in r)) {
|
|
449
1277
|
t[o] = r;
|
|
450
|
-
const
|
|
451
|
-
return
|
|
452
|
-
const
|
|
453
|
-
!
|
|
454
|
-
}), t[o] = void 0,
|
|
1278
|
+
const a = Te(r) ? [] : {};
|
|
1279
|
+
return Me(r, (s, i) => {
|
|
1280
|
+
const u = n(s, o + 1);
|
|
1281
|
+
!Ne(u) && (a[i] = u);
|
|
1282
|
+
}), t[o] = void 0, a;
|
|
455
1283
|
}
|
|
456
1284
|
}
|
|
457
1285
|
return r;
|
|
458
1286
|
};
|
|
459
1287
|
return n(e, 0);
|
|
460
|
-
},
|
|
461
|
-
o ===
|
|
1288
|
+
}, Qo = re("AsyncFunction"), Zo = (e) => e && (et(e) || K(e)) && K(e.then) && K(e.catch), Rn = ((e, t) => e ? setImmediate : t ? ((n, r) => (me.addEventListener("message", ({ source: o, data: a }) => {
|
|
1289
|
+
o === me && a === n && r.length && r.shift()();
|
|
462
1290
|
}, !1), (o) => {
|
|
463
|
-
r.push(o),
|
|
1291
|
+
r.push(o), me.postMessage(n, "*");
|
|
464
1292
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
465
1293
|
typeof setImmediate == "function",
|
|
466
|
-
|
|
467
|
-
),
|
|
468
|
-
isArray:
|
|
469
|
-
isArrayBuffer:
|
|
470
|
-
isBuffer:
|
|
471
|
-
isFormData:
|
|
472
|
-
isArrayBufferView:
|
|
473
|
-
isString:
|
|
474
|
-
isNumber:
|
|
475
|
-
isBoolean:
|
|
476
|
-
isObject:
|
|
477
|
-
isPlainObject:
|
|
478
|
-
isReadableStream:
|
|
479
|
-
isRequest:
|
|
480
|
-
isResponse:
|
|
481
|
-
isHeaders:
|
|
482
|
-
isUndefined:
|
|
483
|
-
isDate:
|
|
484
|
-
isFile:
|
|
485
|
-
isBlob:
|
|
486
|
-
isRegExp:
|
|
487
|
-
isFunction:
|
|
488
|
-
isStream:
|
|
489
|
-
isURLSearchParams:
|
|
490
|
-
isTypedArray:
|
|
491
|
-
isFileList:
|
|
492
|
-
forEach:
|
|
493
|
-
merge:
|
|
494
|
-
extend:
|
|
495
|
-
trim:
|
|
496
|
-
stripBOM:
|
|
497
|
-
inherits:
|
|
498
|
-
toFlatObject:
|
|
499
|
-
kindOf:
|
|
500
|
-
kindOfTest:
|
|
501
|
-
endsWith:
|
|
502
|
-
toArray:
|
|
503
|
-
forEachEntry:
|
|
504
|
-
matchAll:
|
|
505
|
-
isHTMLForm:
|
|
506
|
-
hasOwnProperty:
|
|
507
|
-
hasOwnProp:
|
|
1294
|
+
K(me.postMessage)
|
|
1295
|
+
), es = typeof queueMicrotask < "u" ? queueMicrotask.bind(me) : typeof process < "u" && process.nextTick || Rn, d = {
|
|
1296
|
+
isArray: Te,
|
|
1297
|
+
isArrayBuffer: vn,
|
|
1298
|
+
isBuffer: yo,
|
|
1299
|
+
isFormData: Ao,
|
|
1300
|
+
isArrayBufferView: bo,
|
|
1301
|
+
isString: vo,
|
|
1302
|
+
isNumber: Sn,
|
|
1303
|
+
isBoolean: So,
|
|
1304
|
+
isObject: et,
|
|
1305
|
+
isPlainObject: Je,
|
|
1306
|
+
isReadableStream: Co,
|
|
1307
|
+
isRequest: _o,
|
|
1308
|
+
isResponse: Lo,
|
|
1309
|
+
isHeaders: No,
|
|
1310
|
+
isUndefined: Ne,
|
|
1311
|
+
isDate: Eo,
|
|
1312
|
+
isFile: xo,
|
|
1313
|
+
isBlob: To,
|
|
1314
|
+
isRegExp: Wo,
|
|
1315
|
+
isFunction: K,
|
|
1316
|
+
isStream: Oo,
|
|
1317
|
+
isURLSearchParams: ko,
|
|
1318
|
+
isTypedArray: jo,
|
|
1319
|
+
isFileList: Ro,
|
|
1320
|
+
forEach: Me,
|
|
1321
|
+
merge: xt,
|
|
1322
|
+
extend: Po,
|
|
1323
|
+
trim: Mo,
|
|
1324
|
+
stripBOM: Bo,
|
|
1325
|
+
inherits: Io,
|
|
1326
|
+
toFlatObject: Do,
|
|
1327
|
+
kindOf: Qe,
|
|
1328
|
+
kindOfTest: re,
|
|
1329
|
+
endsWith: Fo,
|
|
1330
|
+
toArray: Uo,
|
|
1331
|
+
forEachEntry: zo,
|
|
1332
|
+
matchAll: Ho,
|
|
1333
|
+
isHTMLForm: qo,
|
|
1334
|
+
hasOwnProperty: Xt,
|
|
1335
|
+
hasOwnProp: Xt,
|
|
508
1336
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
509
|
-
reduceDescriptors:
|
|
510
|
-
freezeMethods:
|
|
511
|
-
toObjectSet:
|
|
512
|
-
toCamelCase:
|
|
513
|
-
noop:
|
|
514
|
-
toFiniteNumber:
|
|
515
|
-
findKey:
|
|
516
|
-
global:
|
|
517
|
-
isContextDefined:
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
setImmediate: yn,
|
|
525
|
-
asap: lo
|
|
1337
|
+
reduceDescriptors: Tn,
|
|
1338
|
+
freezeMethods: Jo,
|
|
1339
|
+
toObjectSet: Vo,
|
|
1340
|
+
toCamelCase: $o,
|
|
1341
|
+
noop: Ko,
|
|
1342
|
+
toFiniteNumber: Yo,
|
|
1343
|
+
findKey: En,
|
|
1344
|
+
global: me,
|
|
1345
|
+
isContextDefined: xn,
|
|
1346
|
+
isSpecCompliantForm: Go,
|
|
1347
|
+
toJSONObject: Xo,
|
|
1348
|
+
isAsyncFn: Qo,
|
|
1349
|
+
isThenable: Zo,
|
|
1350
|
+
setImmediate: Rn,
|
|
1351
|
+
asap: es
|
|
526
1352
|
};
|
|
527
1353
|
function v(e, t, n, r, o) {
|
|
528
1354
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
529
1355
|
}
|
|
530
|
-
|
|
1356
|
+
d.inherits(v, Error, {
|
|
531
1357
|
toJSON: function() {
|
|
532
1358
|
return {
|
|
533
1359
|
// Standard
|
|
@@ -542,13 +1368,13 @@ c.inherits(v, Error, {
|
|
|
542
1368
|
columnNumber: this.columnNumber,
|
|
543
1369
|
stack: this.stack,
|
|
544
1370
|
// Axios
|
|
545
|
-
config:
|
|
1371
|
+
config: d.toJSONObject(this.config),
|
|
546
1372
|
code: this.code,
|
|
547
1373
|
status: this.status
|
|
548
1374
|
};
|
|
549
1375
|
}
|
|
550
1376
|
});
|
|
551
|
-
const
|
|
1377
|
+
const On = v.prototype, An = {};
|
|
552
1378
|
[
|
|
553
1379
|
"ERR_BAD_OPTION_VALUE",
|
|
554
1380
|
"ERR_BAD_OPTION",
|
|
@@ -564,96 +1390,96 @@ const bn = v.prototype, vn = {};
|
|
|
564
1390
|
"ERR_INVALID_URL"
|
|
565
1391
|
// eslint-disable-next-line func-names
|
|
566
1392
|
].forEach((e) => {
|
|
567
|
-
|
|
1393
|
+
An[e] = { value: e };
|
|
568
1394
|
});
|
|
569
|
-
Object.defineProperties(v,
|
|
570
|
-
Object.defineProperty(
|
|
571
|
-
v.from = (e, t, n, r, o,
|
|
572
|
-
const
|
|
573
|
-
return
|
|
574
|
-
return
|
|
575
|
-
}, (i) => i !== "isAxiosError"), v.call(
|
|
1395
|
+
Object.defineProperties(v, An);
|
|
1396
|
+
Object.defineProperty(On, "isAxiosError", { value: !0 });
|
|
1397
|
+
v.from = (e, t, n, r, o, a) => {
|
|
1398
|
+
const s = Object.create(On);
|
|
1399
|
+
return d.toFlatObject(e, s, function(u) {
|
|
1400
|
+
return u !== Error.prototype;
|
|
1401
|
+
}, (i) => i !== "isAxiosError"), v.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, a && Object.assign(s, a), s;
|
|
576
1402
|
};
|
|
577
|
-
const
|
|
578
|
-
function
|
|
579
|
-
return
|
|
1403
|
+
const ts = null;
|
|
1404
|
+
function Tt(e) {
|
|
1405
|
+
return d.isPlainObject(e) || d.isArray(e);
|
|
580
1406
|
}
|
|
581
|
-
function
|
|
582
|
-
return
|
|
1407
|
+
function kn(e) {
|
|
1408
|
+
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
583
1409
|
}
|
|
584
|
-
function
|
|
585
|
-
return e ? e.concat(t).map(function(o,
|
|
586
|
-
return o =
|
|
1410
|
+
function Qt(e, t, n) {
|
|
1411
|
+
return e ? e.concat(t).map(function(o, a) {
|
|
1412
|
+
return o = kn(o), !n && a ? "[" + o + "]" : o;
|
|
587
1413
|
}).join(n ? "." : "") : t;
|
|
588
1414
|
}
|
|
589
|
-
function
|
|
590
|
-
return
|
|
1415
|
+
function ns(e) {
|
|
1416
|
+
return d.isArray(e) && !e.some(Tt);
|
|
591
1417
|
}
|
|
592
|
-
const
|
|
1418
|
+
const rs = d.toFlatObject(d, {}, null, function(t) {
|
|
593
1419
|
return /^is[A-Z]/.test(t);
|
|
594
1420
|
});
|
|
595
|
-
function
|
|
596
|
-
if (!
|
|
1421
|
+
function tt(e, t, n) {
|
|
1422
|
+
if (!d.isObject(e))
|
|
597
1423
|
throw new TypeError("target must be an object");
|
|
598
|
-
t = t || new FormData(), n =
|
|
1424
|
+
t = t || new FormData(), n = d.toFlatObject(n, {
|
|
599
1425
|
metaTokens: !0,
|
|
600
1426
|
dots: !1,
|
|
601
1427
|
indexes: !1
|
|
602
|
-
}, !1, function(
|
|
603
|
-
return !
|
|
1428
|
+
}, !1, function(m, y) {
|
|
1429
|
+
return !d.isUndefined(y[m]);
|
|
604
1430
|
});
|
|
605
|
-
const r = n.metaTokens, o = n.visitor || f,
|
|
606
|
-
if (!
|
|
1431
|
+
const r = n.metaTokens, o = n.visitor || f, a = n.dots, s = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
|
|
1432
|
+
if (!d.isFunction(o))
|
|
607
1433
|
throw new TypeError("visitor must be a function");
|
|
608
|
-
function
|
|
609
|
-
if (
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
612
|
-
if (!
|
|
1434
|
+
function c(g) {
|
|
1435
|
+
if (g === null) return "";
|
|
1436
|
+
if (d.isDate(g))
|
|
1437
|
+
return g.toISOString();
|
|
1438
|
+
if (!u && d.isBlob(g))
|
|
613
1439
|
throw new v("Blob is not supported. Use a Buffer instead.");
|
|
614
|
-
return
|
|
615
|
-
}
|
|
616
|
-
function f(
|
|
617
|
-
let
|
|
618
|
-
if (
|
|
619
|
-
if (
|
|
620
|
-
|
|
621
|
-
else if (
|
|
622
|
-
return
|
|
623
|
-
!(
|
|
1440
|
+
return d.isArrayBuffer(g) || d.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
1441
|
+
}
|
|
1442
|
+
function f(g, m, y) {
|
|
1443
|
+
let T = g;
|
|
1444
|
+
if (g && !y && typeof g == "object") {
|
|
1445
|
+
if (d.endsWith(m, "{}"))
|
|
1446
|
+
m = r ? m : m.slice(0, -2), g = JSON.stringify(g);
|
|
1447
|
+
else if (d.isArray(g) && ns(g) || (d.isFileList(g) || d.endsWith(m, "[]")) && (T = d.toArray(g)))
|
|
1448
|
+
return m = kn(m), T.forEach(function(R, F) {
|
|
1449
|
+
!(d.isUndefined(R) || R === null) && t.append(
|
|
624
1450
|
// eslint-disable-next-line no-nested-ternary
|
|
625
|
-
|
|
626
|
-
|
|
1451
|
+
s === !0 ? Qt([m], F, a) : s === null ? m : m + "[]",
|
|
1452
|
+
c(R)
|
|
627
1453
|
);
|
|
628
1454
|
}), !1;
|
|
629
1455
|
}
|
|
630
|
-
return
|
|
1456
|
+
return Tt(g) ? !0 : (t.append(Qt(y, m, a), c(g)), !1);
|
|
631
1457
|
}
|
|
632
|
-
const
|
|
1458
|
+
const p = [], h = Object.assign(rs, {
|
|
633
1459
|
defaultVisitor: f,
|
|
634
|
-
convertValue:
|
|
635
|
-
isVisitable:
|
|
1460
|
+
convertValue: c,
|
|
1461
|
+
isVisitable: Tt
|
|
636
1462
|
});
|
|
637
|
-
function l(
|
|
638
|
-
if (!
|
|
639
|
-
if (
|
|
640
|
-
throw Error("Circular reference detected in " +
|
|
641
|
-
|
|
642
|
-
(!(
|
|
1463
|
+
function l(g, m) {
|
|
1464
|
+
if (!d.isUndefined(g)) {
|
|
1465
|
+
if (p.indexOf(g) !== -1)
|
|
1466
|
+
throw Error("Circular reference detected in " + m.join("."));
|
|
1467
|
+
p.push(g), d.forEach(g, function(T, E) {
|
|
1468
|
+
(!(d.isUndefined(T) || T === null) && o.call(
|
|
643
1469
|
t,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
)) === !0 && l(
|
|
649
|
-
}),
|
|
1470
|
+
T,
|
|
1471
|
+
d.isString(E) ? E.trim() : E,
|
|
1472
|
+
m,
|
|
1473
|
+
h
|
|
1474
|
+
)) === !0 && l(T, m ? m.concat(E) : [E]);
|
|
1475
|
+
}), p.pop();
|
|
650
1476
|
}
|
|
651
1477
|
}
|
|
652
|
-
if (!
|
|
1478
|
+
if (!d.isObject(e))
|
|
653
1479
|
throw new TypeError("data must be an object");
|
|
654
1480
|
return l(e), t;
|
|
655
1481
|
}
|
|
656
|
-
function
|
|
1482
|
+
function Zt(e) {
|
|
657
1483
|
const t = {
|
|
658
1484
|
"!": "%21",
|
|
659
1485
|
"'": "%27",
|
|
@@ -667,40 +1493,40 @@ function Wt(e) {
|
|
|
667
1493
|
return t[r];
|
|
668
1494
|
});
|
|
669
1495
|
}
|
|
670
|
-
function
|
|
671
|
-
this._pairs = [], e &&
|
|
1496
|
+
function Nt(e, t) {
|
|
1497
|
+
this._pairs = [], e && tt(e, this, t);
|
|
672
1498
|
}
|
|
673
|
-
const
|
|
674
|
-
|
|
1499
|
+
const Cn = Nt.prototype;
|
|
1500
|
+
Cn.append = function(t, n) {
|
|
675
1501
|
this._pairs.push([t, n]);
|
|
676
1502
|
};
|
|
677
|
-
|
|
1503
|
+
Cn.toString = function(t) {
|
|
678
1504
|
const n = t ? function(r) {
|
|
679
|
-
return t.call(this, r,
|
|
680
|
-
} :
|
|
1505
|
+
return t.call(this, r, Zt);
|
|
1506
|
+
} : Zt;
|
|
681
1507
|
return this._pairs.map(function(o) {
|
|
682
1508
|
return n(o[0]) + "=" + n(o[1]);
|
|
683
1509
|
}, "").join("&");
|
|
684
1510
|
};
|
|
685
|
-
function
|
|
1511
|
+
function os(e) {
|
|
686
1512
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
687
1513
|
}
|
|
688
|
-
function
|
|
1514
|
+
function _n(e, t, n) {
|
|
689
1515
|
if (!t)
|
|
690
1516
|
return e;
|
|
691
|
-
const r = n && n.encode ||
|
|
692
|
-
|
|
1517
|
+
const r = n && n.encode || os;
|
|
1518
|
+
d.isFunction(n) && (n = {
|
|
693
1519
|
serialize: n
|
|
694
1520
|
});
|
|
695
1521
|
const o = n && n.serialize;
|
|
696
|
-
let
|
|
697
|
-
if (o ?
|
|
698
|
-
const
|
|
699
|
-
|
|
1522
|
+
let a;
|
|
1523
|
+
if (o ? a = o(t, n) : a = d.isURLSearchParams(t) ? t.toString() : new Nt(t, n).toString(r), a) {
|
|
1524
|
+
const s = e.indexOf("#");
|
|
1525
|
+
s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
|
|
700
1526
|
}
|
|
701
1527
|
return e;
|
|
702
1528
|
}
|
|
703
|
-
class
|
|
1529
|
+
class en {
|
|
704
1530
|
constructor() {
|
|
705
1531
|
this.handlers = [];
|
|
706
1532
|
}
|
|
@@ -749,117 +1575,117 @@ class Jt {
|
|
|
749
1575
|
* @returns {void}
|
|
750
1576
|
*/
|
|
751
1577
|
forEach(t) {
|
|
752
|
-
|
|
1578
|
+
d.forEach(this.handlers, function(r) {
|
|
753
1579
|
r !== null && t(r);
|
|
754
1580
|
});
|
|
755
1581
|
}
|
|
756
1582
|
}
|
|
757
|
-
const
|
|
1583
|
+
const Ln = {
|
|
758
1584
|
silentJSONParsing: !0,
|
|
759
1585
|
forcedJSONParsing: !0,
|
|
760
1586
|
clarifyTimeoutError: !1
|
|
761
|
-
},
|
|
1587
|
+
}, ss = typeof URLSearchParams < "u" ? URLSearchParams : Nt, as = typeof FormData < "u" ? FormData : null, is = typeof Blob < "u" ? Blob : null, ls = {
|
|
762
1588
|
isBrowser: !0,
|
|
763
1589
|
classes: {
|
|
764
|
-
URLSearchParams:
|
|
765
|
-
FormData:
|
|
766
|
-
Blob:
|
|
1590
|
+
URLSearchParams: ss,
|
|
1591
|
+
FormData: as,
|
|
1592
|
+
Blob: is
|
|
767
1593
|
},
|
|
768
1594
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
769
|
-
},
|
|
770
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1595
|
+
}, Mt = typeof window < "u" && typeof document < "u", Rt = typeof navigator == "object" && navigator || void 0, cs = Mt && (!Rt || ["ReactNative", "NativeScript", "NS"].indexOf(Rt.product) < 0), us = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1596
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ds = Mt && window.location.href || "http://localhost", fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
771
1597
|
__proto__: null,
|
|
772
|
-
hasBrowserEnv:
|
|
773
|
-
hasStandardBrowserEnv:
|
|
774
|
-
hasStandardBrowserWebWorkerEnv:
|
|
775
|
-
navigator:
|
|
776
|
-
origin:
|
|
777
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
778
|
-
...
|
|
779
|
-
...
|
|
1598
|
+
hasBrowserEnv: Mt,
|
|
1599
|
+
hasStandardBrowserEnv: cs,
|
|
1600
|
+
hasStandardBrowserWebWorkerEnv: us,
|
|
1601
|
+
navigator: Rt,
|
|
1602
|
+
origin: ds
|
|
1603
|
+
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
1604
|
+
...fs,
|
|
1605
|
+
...ls
|
|
780
1606
|
};
|
|
781
|
-
function
|
|
782
|
-
return
|
|
783
|
-
visitor: function(n, r, o,
|
|
784
|
-
return
|
|
1607
|
+
function hs(e, t) {
|
|
1608
|
+
return tt(e, new j.classes.URLSearchParams(), Object.assign({
|
|
1609
|
+
visitor: function(n, r, o, a) {
|
|
1610
|
+
return j.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
|
|
785
1611
|
}
|
|
786
1612
|
}, t));
|
|
787
1613
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
1614
|
+
function ps(e) {
|
|
1615
|
+
return d.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
790
1616
|
}
|
|
791
|
-
function
|
|
1617
|
+
function ms(e) {
|
|
792
1618
|
const t = {}, n = Object.keys(e);
|
|
793
1619
|
let r;
|
|
794
1620
|
const o = n.length;
|
|
795
|
-
let
|
|
1621
|
+
let a;
|
|
796
1622
|
for (r = 0; r < o; r++)
|
|
797
|
-
|
|
1623
|
+
a = n[r], t[a] = e[a];
|
|
798
1624
|
return t;
|
|
799
1625
|
}
|
|
800
|
-
function
|
|
801
|
-
function t(n, r, o,
|
|
802
|
-
let
|
|
803
|
-
if (
|
|
804
|
-
const i = Number.isFinite(+
|
|
805
|
-
return
|
|
1626
|
+
function Nn(e) {
|
|
1627
|
+
function t(n, r, o, a) {
|
|
1628
|
+
let s = n[a++];
|
|
1629
|
+
if (s === "__proto__") return !0;
|
|
1630
|
+
const i = Number.isFinite(+s), u = a >= n.length;
|
|
1631
|
+
return s = !s && d.isArray(o) ? o.length : s, u ? (d.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !i) : ((!o[s] || !d.isObject(o[s])) && (o[s] = []), t(n, r, o[s], a) && d.isArray(o[s]) && (o[s] = ms(o[s])), !i);
|
|
806
1632
|
}
|
|
807
|
-
if (
|
|
1633
|
+
if (d.isFormData(e) && d.isFunction(e.entries)) {
|
|
808
1634
|
const n = {};
|
|
809
|
-
return
|
|
810
|
-
t(
|
|
1635
|
+
return d.forEachEntry(e, (r, o) => {
|
|
1636
|
+
t(ps(r), o, n, 0);
|
|
811
1637
|
}), n;
|
|
812
1638
|
}
|
|
813
1639
|
return null;
|
|
814
1640
|
}
|
|
815
|
-
function
|
|
816
|
-
if (
|
|
1641
|
+
function gs(e, t, n) {
|
|
1642
|
+
if (d.isString(e))
|
|
817
1643
|
try {
|
|
818
|
-
return (t || JSON.parse)(e),
|
|
1644
|
+
return (t || JSON.parse)(e), d.trim(e);
|
|
819
1645
|
} catch (r) {
|
|
820
1646
|
if (r.name !== "SyntaxError")
|
|
821
1647
|
throw r;
|
|
822
1648
|
}
|
|
823
1649
|
return (n || JSON.stringify)(e);
|
|
824
1650
|
}
|
|
825
|
-
const
|
|
826
|
-
transitional:
|
|
1651
|
+
const Pe = {
|
|
1652
|
+
transitional: Ln,
|
|
827
1653
|
adapter: ["xhr", "http", "fetch"],
|
|
828
1654
|
transformRequest: [function(t, n) {
|
|
829
|
-
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1,
|
|
830
|
-
if (
|
|
831
|
-
return o ? JSON.stringify(
|
|
832
|
-
if (
|
|
1655
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, a = d.isObject(t);
|
|
1656
|
+
if (a && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
|
|
1657
|
+
return o ? JSON.stringify(Nn(t)) : t;
|
|
1658
|
+
if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
|
|
833
1659
|
return t;
|
|
834
|
-
if (
|
|
1660
|
+
if (d.isArrayBufferView(t))
|
|
835
1661
|
return t.buffer;
|
|
836
|
-
if (
|
|
1662
|
+
if (d.isURLSearchParams(t))
|
|
837
1663
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
838
1664
|
let i;
|
|
839
|
-
if (
|
|
1665
|
+
if (a) {
|
|
840
1666
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
841
|
-
return
|
|
842
|
-
if ((i =
|
|
843
|
-
const
|
|
844
|
-
return
|
|
1667
|
+
return hs(t, this.formSerializer).toString();
|
|
1668
|
+
if ((i = d.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1669
|
+
const u = this.env && this.env.FormData;
|
|
1670
|
+
return tt(
|
|
845
1671
|
i ? { "files[]": t } : t,
|
|
846
|
-
|
|
1672
|
+
u && new u(),
|
|
847
1673
|
this.formSerializer
|
|
848
1674
|
);
|
|
849
1675
|
}
|
|
850
1676
|
}
|
|
851
|
-
return
|
|
1677
|
+
return a || o ? (n.setContentType("application/json", !1), gs(t)) : t;
|
|
852
1678
|
}],
|
|
853
1679
|
transformResponse: [function(t) {
|
|
854
|
-
const n = this.transitional ||
|
|
855
|
-
if (
|
|
1680
|
+
const n = this.transitional || Pe.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1681
|
+
if (d.isResponse(t) || d.isReadableStream(t))
|
|
856
1682
|
return t;
|
|
857
|
-
if (t &&
|
|
858
|
-
const
|
|
1683
|
+
if (t && d.isString(t) && (r && !this.responseType || o)) {
|
|
1684
|
+
const s = !(n && n.silentJSONParsing) && o;
|
|
859
1685
|
try {
|
|
860
1686
|
return JSON.parse(t);
|
|
861
1687
|
} catch (i) {
|
|
862
|
-
if (
|
|
1688
|
+
if (s)
|
|
863
1689
|
throw i.name === "SyntaxError" ? v.from(i, v.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
864
1690
|
}
|
|
865
1691
|
}
|
|
@@ -875,8 +1701,8 @@ const Ce = {
|
|
|
875
1701
|
maxContentLength: -1,
|
|
876
1702
|
maxBodyLength: -1,
|
|
877
1703
|
env: {
|
|
878
|
-
FormData:
|
|
879
|
-
Blob:
|
|
1704
|
+
FormData: j.classes.FormData,
|
|
1705
|
+
Blob: j.classes.Blob
|
|
880
1706
|
},
|
|
881
1707
|
validateStatus: function(t) {
|
|
882
1708
|
return t >= 200 && t < 300;
|
|
@@ -888,10 +1714,10 @@ const Ce = {
|
|
|
888
1714
|
}
|
|
889
1715
|
}
|
|
890
1716
|
};
|
|
891
|
-
|
|
892
|
-
|
|
1717
|
+
d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1718
|
+
Pe.headers[e] = {};
|
|
893
1719
|
});
|
|
894
|
-
const
|
|
1720
|
+
const ws = d.toObjectSet([
|
|
895
1721
|
"age",
|
|
896
1722
|
"authorization",
|
|
897
1723
|
"content-length",
|
|
@@ -909,131 +1735,131 @@ const Oo = c.toObjectSet([
|
|
|
909
1735
|
"referer",
|
|
910
1736
|
"retry-after",
|
|
911
1737
|
"user-agent"
|
|
912
|
-
]),
|
|
1738
|
+
]), ys = (e) => {
|
|
913
1739
|
const t = {};
|
|
914
1740
|
let n, r, o;
|
|
915
1741
|
return e && e.split(`
|
|
916
|
-
`).forEach(function(
|
|
917
|
-
o =
|
|
1742
|
+
`).forEach(function(s) {
|
|
1743
|
+
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && ws[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
918
1744
|
}), t;
|
|
919
|
-
},
|
|
920
|
-
function
|
|
1745
|
+
}, tn = Symbol("internals");
|
|
1746
|
+
function Le(e) {
|
|
921
1747
|
return e && String(e).trim().toLowerCase();
|
|
922
1748
|
}
|
|
923
|
-
function
|
|
924
|
-
return e === !1 || e == null ? e :
|
|
1749
|
+
function Ve(e) {
|
|
1750
|
+
return e === !1 || e == null ? e : d.isArray(e) ? e.map(Ve) : String(e);
|
|
925
1751
|
}
|
|
926
|
-
function
|
|
1752
|
+
function bs(e) {
|
|
927
1753
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
928
1754
|
let r;
|
|
929
1755
|
for (; r = n.exec(e); )
|
|
930
1756
|
t[r[1]] = r[2];
|
|
931
1757
|
return t;
|
|
932
1758
|
}
|
|
933
|
-
const
|
|
934
|
-
function
|
|
935
|
-
if (
|
|
1759
|
+
const vs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1760
|
+
function wt(e, t, n, r, o) {
|
|
1761
|
+
if (d.isFunction(r))
|
|
936
1762
|
return r.call(this, t, n);
|
|
937
|
-
if (o && (t = n), !!
|
|
938
|
-
if (
|
|
1763
|
+
if (o && (t = n), !!d.isString(t)) {
|
|
1764
|
+
if (d.isString(r))
|
|
939
1765
|
return t.indexOf(r) !== -1;
|
|
940
|
-
if (
|
|
1766
|
+
if (d.isRegExp(r))
|
|
941
1767
|
return r.test(t);
|
|
942
1768
|
}
|
|
943
1769
|
}
|
|
944
|
-
function
|
|
1770
|
+
function Ss(e) {
|
|
945
1771
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
946
1772
|
}
|
|
947
|
-
function
|
|
948
|
-
const n =
|
|
1773
|
+
function Es(e, t) {
|
|
1774
|
+
const n = d.toCamelCase(" " + t);
|
|
949
1775
|
["get", "set", "has"].forEach((r) => {
|
|
950
1776
|
Object.defineProperty(e, r + n, {
|
|
951
|
-
value: function(o,
|
|
952
|
-
return this[r].call(this, t, o,
|
|
1777
|
+
value: function(o, a, s) {
|
|
1778
|
+
return this[r].call(this, t, o, a, s);
|
|
953
1779
|
},
|
|
954
1780
|
configurable: !0
|
|
955
1781
|
});
|
|
956
1782
|
});
|
|
957
1783
|
}
|
|
958
|
-
let
|
|
1784
|
+
let J = class {
|
|
959
1785
|
constructor(t) {
|
|
960
1786
|
t && this.set(t);
|
|
961
1787
|
}
|
|
962
1788
|
set(t, n, r) {
|
|
963
1789
|
const o = this;
|
|
964
|
-
function
|
|
965
|
-
const f =
|
|
1790
|
+
function a(i, u, c) {
|
|
1791
|
+
const f = Le(u);
|
|
966
1792
|
if (!f)
|
|
967
1793
|
throw new Error("header name must be a non-empty string");
|
|
968
|
-
const
|
|
969
|
-
(!
|
|
1794
|
+
const p = d.findKey(o, f);
|
|
1795
|
+
(!p || o[p] === void 0 || c === !0 || c === void 0 && o[p] !== !1) && (o[p || u] = Ve(i));
|
|
970
1796
|
}
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
|
|
974
|
-
else if (
|
|
975
|
-
|
|
976
|
-
else if (
|
|
977
|
-
for (const [i,
|
|
978
|
-
|
|
1797
|
+
const s = (i, u) => d.forEach(i, (c, f) => a(c, f, u));
|
|
1798
|
+
if (d.isPlainObject(t) || t instanceof this.constructor)
|
|
1799
|
+
s(t, n);
|
|
1800
|
+
else if (d.isString(t) && (t = t.trim()) && !vs(t))
|
|
1801
|
+
s(ys(t), n);
|
|
1802
|
+
else if (d.isHeaders(t))
|
|
1803
|
+
for (const [i, u] of t.entries())
|
|
1804
|
+
a(u, i, r);
|
|
979
1805
|
else
|
|
980
|
-
t != null &&
|
|
1806
|
+
t != null && a(n, t, r);
|
|
981
1807
|
return this;
|
|
982
1808
|
}
|
|
983
1809
|
get(t, n) {
|
|
984
|
-
if (t =
|
|
985
|
-
const r =
|
|
1810
|
+
if (t = Le(t), t) {
|
|
1811
|
+
const r = d.findKey(this, t);
|
|
986
1812
|
if (r) {
|
|
987
1813
|
const o = this[r];
|
|
988
1814
|
if (!n)
|
|
989
1815
|
return o;
|
|
990
1816
|
if (n === !0)
|
|
991
|
-
return
|
|
992
|
-
if (
|
|
1817
|
+
return bs(o);
|
|
1818
|
+
if (d.isFunction(n))
|
|
993
1819
|
return n.call(this, o, r);
|
|
994
|
-
if (
|
|
1820
|
+
if (d.isRegExp(n))
|
|
995
1821
|
return n.exec(o);
|
|
996
1822
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
997
1823
|
}
|
|
998
1824
|
}
|
|
999
1825
|
}
|
|
1000
1826
|
has(t, n) {
|
|
1001
|
-
if (t =
|
|
1002
|
-
const r =
|
|
1003
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
1827
|
+
if (t = Le(t), t) {
|
|
1828
|
+
const r = d.findKey(this, t);
|
|
1829
|
+
return !!(r && this[r] !== void 0 && (!n || wt(this, this[r], r, n)));
|
|
1004
1830
|
}
|
|
1005
1831
|
return !1;
|
|
1006
1832
|
}
|
|
1007
1833
|
delete(t, n) {
|
|
1008
1834
|
const r = this;
|
|
1009
1835
|
let o = !1;
|
|
1010
|
-
function s
|
|
1011
|
-
if (
|
|
1012
|
-
const i =
|
|
1013
|
-
i && (!n ||
|
|
1836
|
+
function a(s) {
|
|
1837
|
+
if (s = Le(s), s) {
|
|
1838
|
+
const i = d.findKey(r, s);
|
|
1839
|
+
i && (!n || wt(r, r[i], i, n)) && (delete r[i], o = !0);
|
|
1014
1840
|
}
|
|
1015
1841
|
}
|
|
1016
|
-
return
|
|
1842
|
+
return d.isArray(t) ? t.forEach(a) : a(t), o;
|
|
1017
1843
|
}
|
|
1018
1844
|
clear(t) {
|
|
1019
1845
|
const n = Object.keys(this);
|
|
1020
1846
|
let r = n.length, o = !1;
|
|
1021
1847
|
for (; r--; ) {
|
|
1022
|
-
const
|
|
1023
|
-
(!t ||
|
|
1848
|
+
const a = n[r];
|
|
1849
|
+
(!t || wt(this, this[a], a, t, !0)) && (delete this[a], o = !0);
|
|
1024
1850
|
}
|
|
1025
1851
|
return o;
|
|
1026
1852
|
}
|
|
1027
1853
|
normalize(t) {
|
|
1028
1854
|
const n = this, r = {};
|
|
1029
|
-
return
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1032
|
-
n[
|
|
1855
|
+
return d.forEach(this, (o, a) => {
|
|
1856
|
+
const s = d.findKey(r, a);
|
|
1857
|
+
if (s) {
|
|
1858
|
+
n[s] = Ve(o), delete n[a];
|
|
1033
1859
|
return;
|
|
1034
1860
|
}
|
|
1035
|
-
const i = t ?
|
|
1036
|
-
i !==
|
|
1861
|
+
const i = t ? Ss(a) : String(a).trim();
|
|
1862
|
+
i !== a && delete n[a], n[i] = Ve(o), r[i] = !0;
|
|
1037
1863
|
}), this;
|
|
1038
1864
|
}
|
|
1039
1865
|
concat(...t) {
|
|
@@ -1041,8 +1867,8 @@ let U = class {
|
|
|
1041
1867
|
}
|
|
1042
1868
|
toJSON(t) {
|
|
1043
1869
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1044
|
-
return
|
|
1045
|
-
r != null && r !== !1 && (n[o] = t &&
|
|
1870
|
+
return d.forEach(this, (r, o) => {
|
|
1871
|
+
r != null && r !== !1 && (n[o] = t && d.isArray(r) ? r.join(", ") : r);
|
|
1046
1872
|
}), n;
|
|
1047
1873
|
}
|
|
1048
1874
|
[Symbol.iterator]() {
|
|
@@ -1063,18 +1889,18 @@ let U = class {
|
|
|
1063
1889
|
return n.forEach((o) => r.set(o)), r;
|
|
1064
1890
|
}
|
|
1065
1891
|
static accessor(t) {
|
|
1066
|
-
const r = (this[
|
|
1892
|
+
const r = (this[tn] = this[tn] = {
|
|
1067
1893
|
accessors: {}
|
|
1068
1894
|
}).accessors, o = this.prototype;
|
|
1069
|
-
function s
|
|
1070
|
-
const i =
|
|
1071
|
-
r[i] || (
|
|
1895
|
+
function a(s) {
|
|
1896
|
+
const i = Le(s);
|
|
1897
|
+
r[i] || (Es(o, s), r[i] = !0);
|
|
1072
1898
|
}
|
|
1073
|
-
return
|
|
1899
|
+
return d.isArray(t) ? t.forEach(a) : a(t), this;
|
|
1074
1900
|
}
|
|
1075
1901
|
};
|
|
1076
|
-
|
|
1077
|
-
|
|
1902
|
+
J.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1903
|
+
d.reduceDescriptors(J.prototype, ({ value: e }, t) => {
|
|
1078
1904
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1079
1905
|
return {
|
|
1080
1906
|
get: () => e,
|
|
@@ -1083,24 +1909,24 @@ c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
1083
1909
|
}
|
|
1084
1910
|
};
|
|
1085
1911
|
});
|
|
1086
|
-
|
|
1087
|
-
function
|
|
1088
|
-
const n = this ||
|
|
1089
|
-
let
|
|
1090
|
-
return
|
|
1091
|
-
|
|
1092
|
-
}), o.normalize(),
|
|
1093
|
-
}
|
|
1094
|
-
function
|
|
1912
|
+
d.freezeMethods(J);
|
|
1913
|
+
function yt(e, t) {
|
|
1914
|
+
const n = this || Pe, r = t || n, o = J.from(r.headers);
|
|
1915
|
+
let a = r.data;
|
|
1916
|
+
return d.forEach(e, function(i) {
|
|
1917
|
+
a = i.call(n, a, o.normalize(), t ? t.status : void 0);
|
|
1918
|
+
}), o.normalize(), a;
|
|
1919
|
+
}
|
|
1920
|
+
function Mn(e) {
|
|
1095
1921
|
return !!(e && e.__CANCEL__);
|
|
1096
1922
|
}
|
|
1097
|
-
function
|
|
1923
|
+
function Re(e, t, n) {
|
|
1098
1924
|
v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1099
1925
|
}
|
|
1100
|
-
|
|
1926
|
+
d.inherits(Re, v, {
|
|
1101
1927
|
__CANCEL__: !0
|
|
1102
1928
|
});
|
|
1103
|
-
function
|
|
1929
|
+
function Pn(e, t, n) {
|
|
1104
1930
|
const r = n.config.validateStatus;
|
|
1105
1931
|
!n.status || !r || r(n.status) ? e(n) : t(new v(
|
|
1106
1932
|
"Request failed with status code " + n.status,
|
|
@@ -1110,73 +1936,73 @@ function An(e, t, n) {
|
|
|
1110
1936
|
n
|
|
1111
1937
|
));
|
|
1112
1938
|
}
|
|
1113
|
-
function
|
|
1939
|
+
function xs(e) {
|
|
1114
1940
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1115
1941
|
return t && t[1] || "";
|
|
1116
1942
|
}
|
|
1117
|
-
function
|
|
1943
|
+
function Ts(e, t) {
|
|
1118
1944
|
e = e || 10;
|
|
1119
1945
|
const n = new Array(e), r = new Array(e);
|
|
1120
|
-
let o = 0,
|
|
1121
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
let
|
|
1125
|
-
for (;
|
|
1126
|
-
|
|
1127
|
-
if (o = (o + 1) % e, o ===
|
|
1946
|
+
let o = 0, a = 0, s;
|
|
1947
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
1948
|
+
const c = Date.now(), f = r[a];
|
|
1949
|
+
s || (s = c), n[o] = u, r[o] = c;
|
|
1950
|
+
let p = a, h = 0;
|
|
1951
|
+
for (; p !== o; )
|
|
1952
|
+
h += n[p++], p = p % e;
|
|
1953
|
+
if (o = (o + 1) % e, o === a && (a = (a + 1) % e), c - s < t)
|
|
1128
1954
|
return;
|
|
1129
|
-
const l = f &&
|
|
1130
|
-
return l ? Math.round(
|
|
1955
|
+
const l = f && c - f;
|
|
1956
|
+
return l ? Math.round(h * 1e3 / l) : void 0;
|
|
1131
1957
|
};
|
|
1132
1958
|
}
|
|
1133
|
-
function
|
|
1134
|
-
let n = 0, r = 1e3 / t, o,
|
|
1135
|
-
const
|
|
1136
|
-
n = f, o = null,
|
|
1959
|
+
function Rs(e, t) {
|
|
1960
|
+
let n = 0, r = 1e3 / t, o, a;
|
|
1961
|
+
const s = (c, f = Date.now()) => {
|
|
1962
|
+
n = f, o = null, a && (clearTimeout(a), a = null), e.apply(null, c);
|
|
1137
1963
|
};
|
|
1138
|
-
return [(...
|
|
1139
|
-
const f = Date.now(),
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
}, r -
|
|
1143
|
-
}, () => o &&
|
|
1144
|
-
}
|
|
1145
|
-
const
|
|
1964
|
+
return [(...c) => {
|
|
1965
|
+
const f = Date.now(), p = f - n;
|
|
1966
|
+
p >= r ? s(c, f) : (o = c, a || (a = setTimeout(() => {
|
|
1967
|
+
a = null, s(o);
|
|
1968
|
+
}, r - p)));
|
|
1969
|
+
}, () => o && s(o)];
|
|
1970
|
+
}
|
|
1971
|
+
const Ge = (e, t, n = 3) => {
|
|
1146
1972
|
let r = 0;
|
|
1147
|
-
const o =
|
|
1148
|
-
return
|
|
1149
|
-
const
|
|
1150
|
-
r =
|
|
1151
|
-
const
|
|
1152
|
-
loaded:
|
|
1973
|
+
const o = Ts(50, 250);
|
|
1974
|
+
return Rs((a) => {
|
|
1975
|
+
const s = a.loaded, i = a.lengthComputable ? a.total : void 0, u = s - r, c = o(u), f = s <= i;
|
|
1976
|
+
r = s;
|
|
1977
|
+
const p = {
|
|
1978
|
+
loaded: s,
|
|
1153
1979
|
total: i,
|
|
1154
|
-
progress: i ?
|
|
1155
|
-
bytes:
|
|
1156
|
-
rate:
|
|
1157
|
-
estimated:
|
|
1158
|
-
event:
|
|
1980
|
+
progress: i ? s / i : void 0,
|
|
1981
|
+
bytes: u,
|
|
1982
|
+
rate: c || void 0,
|
|
1983
|
+
estimated: c && i && f ? (i - s) / c : void 0,
|
|
1984
|
+
event: a,
|
|
1159
1985
|
lengthComputable: i != null,
|
|
1160
1986
|
[t ? "download" : "upload"]: !0
|
|
1161
1987
|
};
|
|
1162
|
-
e(
|
|
1988
|
+
e(p);
|
|
1163
1989
|
}, n);
|
|
1164
|
-
},
|
|
1990
|
+
}, nn = (e, t) => {
|
|
1165
1991
|
const n = e != null;
|
|
1166
1992
|
return [(r) => t[0]({
|
|
1167
1993
|
lengthComputable: n,
|
|
1168
1994
|
total: e,
|
|
1169
1995
|
loaded: r
|
|
1170
1996
|
}), t[1]];
|
|
1171
|
-
},
|
|
1172
|
-
new URL(
|
|
1173
|
-
|
|
1174
|
-
) : () => !0,
|
|
1997
|
+
}, rn = (e) => (...t) => d.asap(() => e(...t)), Os = j.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, j.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1998
|
+
new URL(j.origin),
|
|
1999
|
+
j.navigator && /(msie|trident)/i.test(j.navigator.userAgent)
|
|
2000
|
+
) : () => !0, As = j.hasStandardBrowserEnv ? (
|
|
1175
2001
|
// Standard browser envs support document.cookie
|
|
1176
2002
|
{
|
|
1177
|
-
write(e, t, n, r, o,
|
|
1178
|
-
const
|
|
1179
|
-
|
|
2003
|
+
write(e, t, n, r, o, a) {
|
|
2004
|
+
const s = [e + "=" + encodeURIComponent(t)];
|
|
2005
|
+
d.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), d.isString(r) && s.push("path=" + r), d.isString(o) && s.push("domain=" + o), a === !0 && s.push("secure"), document.cookie = s.join("; ");
|
|
1180
2006
|
},
|
|
1181
2007
|
read(e) {
|
|
1182
2008
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1198,182 +2024,183 @@ const Ve = (e, t, n = 3) => {
|
|
|
1198
2024
|
}
|
|
1199
2025
|
}
|
|
1200
2026
|
);
|
|
1201
|
-
function
|
|
2027
|
+
function ks(e) {
|
|
1202
2028
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1203
2029
|
}
|
|
1204
|
-
function
|
|
2030
|
+
function Cs(e, t) {
|
|
1205
2031
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1206
2032
|
}
|
|
1207
|
-
function
|
|
1208
|
-
|
|
2033
|
+
function Bn(e, t, n) {
|
|
2034
|
+
let r = !ks(t);
|
|
2035
|
+
return e && r || n == !1 ? Cs(e, t) : t;
|
|
1209
2036
|
}
|
|
1210
|
-
const
|
|
1211
|
-
function
|
|
2037
|
+
const on = (e) => e instanceof J ? { ...e } : e;
|
|
2038
|
+
function we(e, t) {
|
|
1212
2039
|
t = t || {};
|
|
1213
2040
|
const n = {};
|
|
1214
|
-
function r(
|
|
1215
|
-
return
|
|
2041
|
+
function r(c, f, p, h) {
|
|
2042
|
+
return d.isPlainObject(c) && d.isPlainObject(f) ? d.merge.call({ caseless: h }, c, f) : d.isPlainObject(f) ? d.merge({}, f) : d.isArray(f) ? f.slice() : f;
|
|
1216
2043
|
}
|
|
1217
|
-
function o(
|
|
1218
|
-
if (
|
|
1219
|
-
if (!
|
|
1220
|
-
return r(void 0,
|
|
1221
|
-
} else return r(
|
|
2044
|
+
function o(c, f, p, h) {
|
|
2045
|
+
if (d.isUndefined(f)) {
|
|
2046
|
+
if (!d.isUndefined(c))
|
|
2047
|
+
return r(void 0, c, p, h);
|
|
2048
|
+
} else return r(c, f, p, h);
|
|
1222
2049
|
}
|
|
1223
|
-
function
|
|
1224
|
-
if (!
|
|
2050
|
+
function a(c, f) {
|
|
2051
|
+
if (!d.isUndefined(f))
|
|
1225
2052
|
return r(void 0, f);
|
|
1226
2053
|
}
|
|
1227
|
-
function
|
|
1228
|
-
if (
|
|
1229
|
-
if (!
|
|
1230
|
-
return r(void 0,
|
|
2054
|
+
function s(c, f) {
|
|
2055
|
+
if (d.isUndefined(f)) {
|
|
2056
|
+
if (!d.isUndefined(c))
|
|
2057
|
+
return r(void 0, c);
|
|
1231
2058
|
} else return r(void 0, f);
|
|
1232
2059
|
}
|
|
1233
|
-
function i(
|
|
1234
|
-
if (
|
|
1235
|
-
return r(
|
|
1236
|
-
if (
|
|
1237
|
-
return r(void 0,
|
|
1238
|
-
}
|
|
1239
|
-
const
|
|
1240
|
-
url:
|
|
1241
|
-
method:
|
|
1242
|
-
data:
|
|
1243
|
-
baseURL:
|
|
1244
|
-
transformRequest:
|
|
1245
|
-
transformResponse:
|
|
1246
|
-
paramsSerializer:
|
|
1247
|
-
timeout:
|
|
1248
|
-
timeoutMessage:
|
|
1249
|
-
withCredentials:
|
|
1250
|
-
withXSRFToken:
|
|
1251
|
-
adapter:
|
|
1252
|
-
responseType:
|
|
1253
|
-
xsrfCookieName:
|
|
1254
|
-
xsrfHeaderName:
|
|
1255
|
-
onUploadProgress:
|
|
1256
|
-
onDownloadProgress:
|
|
1257
|
-
decompress:
|
|
1258
|
-
maxContentLength:
|
|
1259
|
-
maxBodyLength:
|
|
1260
|
-
beforeRedirect:
|
|
1261
|
-
transport:
|
|
1262
|
-
httpAgent:
|
|
1263
|
-
httpsAgent:
|
|
1264
|
-
cancelToken:
|
|
1265
|
-
socketPath:
|
|
1266
|
-
responseEncoding:
|
|
2060
|
+
function i(c, f, p) {
|
|
2061
|
+
if (p in t)
|
|
2062
|
+
return r(c, f);
|
|
2063
|
+
if (p in e)
|
|
2064
|
+
return r(void 0, c);
|
|
2065
|
+
}
|
|
2066
|
+
const u = {
|
|
2067
|
+
url: a,
|
|
2068
|
+
method: a,
|
|
2069
|
+
data: a,
|
|
2070
|
+
baseURL: s,
|
|
2071
|
+
transformRequest: s,
|
|
2072
|
+
transformResponse: s,
|
|
2073
|
+
paramsSerializer: s,
|
|
2074
|
+
timeout: s,
|
|
2075
|
+
timeoutMessage: s,
|
|
2076
|
+
withCredentials: s,
|
|
2077
|
+
withXSRFToken: s,
|
|
2078
|
+
adapter: s,
|
|
2079
|
+
responseType: s,
|
|
2080
|
+
xsrfCookieName: s,
|
|
2081
|
+
xsrfHeaderName: s,
|
|
2082
|
+
onUploadProgress: s,
|
|
2083
|
+
onDownloadProgress: s,
|
|
2084
|
+
decompress: s,
|
|
2085
|
+
maxContentLength: s,
|
|
2086
|
+
maxBodyLength: s,
|
|
2087
|
+
beforeRedirect: s,
|
|
2088
|
+
transport: s,
|
|
2089
|
+
httpAgent: s,
|
|
2090
|
+
httpsAgent: s,
|
|
2091
|
+
cancelToken: s,
|
|
2092
|
+
socketPath: s,
|
|
2093
|
+
responseEncoding: s,
|
|
1267
2094
|
validateStatus: i,
|
|
1268
|
-
headers: (
|
|
2095
|
+
headers: (c, f, p) => o(on(c), on(f), p, !0)
|
|
1269
2096
|
};
|
|
1270
|
-
return
|
|
1271
|
-
const
|
|
1272
|
-
|
|
2097
|
+
return d.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
2098
|
+
const p = u[f] || o, h = p(e[f], t[f], f);
|
|
2099
|
+
d.isUndefined(h) && p !== i || (n[f] = h);
|
|
1273
2100
|
}), n;
|
|
1274
2101
|
}
|
|
1275
|
-
const
|
|
1276
|
-
const t =
|
|
1277
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName:
|
|
1278
|
-
t.headers =
|
|
2102
|
+
const In = (e) => {
|
|
2103
|
+
const t = we({}, e);
|
|
2104
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: s, auth: i } = t;
|
|
2105
|
+
t.headers = s = J.from(s), t.url = _n(Bn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && s.set(
|
|
1279
2106
|
"Authorization",
|
|
1280
2107
|
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
1281
2108
|
);
|
|
1282
|
-
let
|
|
1283
|
-
if (
|
|
1284
|
-
if (
|
|
1285
|
-
|
|
1286
|
-
else if ((
|
|
1287
|
-
const [
|
|
1288
|
-
|
|
2109
|
+
let u;
|
|
2110
|
+
if (d.isFormData(n)) {
|
|
2111
|
+
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
|
|
2112
|
+
s.setContentType(void 0);
|
|
2113
|
+
else if ((u = s.getContentType()) !== !1) {
|
|
2114
|
+
const [c, ...f] = u ? u.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
2115
|
+
s.setContentType([c || "multipart/form-data", ...f].join("; "));
|
|
1289
2116
|
}
|
|
1290
2117
|
}
|
|
1291
|
-
if (
|
|
1292
|
-
const
|
|
1293
|
-
|
|
2118
|
+
if (j.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && Os(t.url))) {
|
|
2119
|
+
const c = o && a && As.read(a);
|
|
2120
|
+
c && s.set(o, c);
|
|
1294
2121
|
}
|
|
1295
2122
|
return t;
|
|
1296
|
-
},
|
|
2123
|
+
}, _s = typeof XMLHttpRequest < "u", Ls = _s && function(e) {
|
|
1297
2124
|
return new Promise(function(n, r) {
|
|
1298
|
-
const o =
|
|
1299
|
-
let
|
|
1300
|
-
const
|
|
1301
|
-
let { responseType: i, onUploadProgress:
|
|
1302
|
-
function
|
|
1303
|
-
l && l(),
|
|
2125
|
+
const o = In(e);
|
|
2126
|
+
let a = o.data;
|
|
2127
|
+
const s = J.from(o.headers).normalize();
|
|
2128
|
+
let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = o, f, p, h, l, g;
|
|
2129
|
+
function m() {
|
|
2130
|
+
l && l(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
|
|
1304
2131
|
}
|
|
1305
|
-
let
|
|
1306
|
-
|
|
1307
|
-
function
|
|
1308
|
-
if (!
|
|
2132
|
+
let y = new XMLHttpRequest();
|
|
2133
|
+
y.open(o.method.toUpperCase(), o.url, !0), y.timeout = o.timeout;
|
|
2134
|
+
function T() {
|
|
2135
|
+
if (!y)
|
|
1309
2136
|
return;
|
|
1310
|
-
const R =
|
|
1311
|
-
"getAllResponseHeaders" in
|
|
1312
|
-
),
|
|
1313
|
-
data: !i || i === "text" || i === "json" ?
|
|
1314
|
-
status:
|
|
1315
|
-
statusText:
|
|
2137
|
+
const R = J.from(
|
|
2138
|
+
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
2139
|
+
), L = {
|
|
2140
|
+
data: !i || i === "text" || i === "json" ? y.responseText : y.response,
|
|
2141
|
+
status: y.status,
|
|
2142
|
+
statusText: y.statusText,
|
|
1316
2143
|
headers: R,
|
|
1317
2144
|
config: e,
|
|
1318
|
-
request:
|
|
2145
|
+
request: y
|
|
1319
2146
|
};
|
|
1320
|
-
|
|
1321
|
-
n(
|
|
1322
|
-
}, function(
|
|
1323
|
-
r(
|
|
1324
|
-
},
|
|
2147
|
+
Pn(function(P) {
|
|
2148
|
+
n(P), m();
|
|
2149
|
+
}, function(P) {
|
|
2150
|
+
r(P), m();
|
|
2151
|
+
}, L), y = null;
|
|
1325
2152
|
}
|
|
1326
|
-
"onloadend" in
|
|
1327
|
-
!
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
},
|
|
1331
|
-
r(new v("Network Error", v.ERR_NETWORK, e,
|
|
1332
|
-
},
|
|
1333
|
-
let
|
|
1334
|
-
const
|
|
1335
|
-
o.timeoutErrorMessage && (
|
|
1336
|
-
|
|
1337
|
-
|
|
2153
|
+
"onloadend" in y ? y.onloadend = T : y.onreadystatechange = function() {
|
|
2154
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(T);
|
|
2155
|
+
}, y.onabort = function() {
|
|
2156
|
+
y && (r(new v("Request aborted", v.ECONNABORTED, e, y)), y = null);
|
|
2157
|
+
}, y.onerror = function() {
|
|
2158
|
+
r(new v("Network Error", v.ERR_NETWORK, e, y)), y = null;
|
|
2159
|
+
}, y.ontimeout = function() {
|
|
2160
|
+
let F = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
2161
|
+
const L = o.transitional || Ln;
|
|
2162
|
+
o.timeoutErrorMessage && (F = o.timeoutErrorMessage), r(new v(
|
|
2163
|
+
F,
|
|
2164
|
+
L.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
|
|
1338
2165
|
e,
|
|
1339
|
-
|
|
1340
|
-
)),
|
|
1341
|
-
},
|
|
1342
|
-
|
|
1343
|
-
}),
|
|
1344
|
-
|
|
2166
|
+
y
|
|
2167
|
+
)), y = null;
|
|
2168
|
+
}, a === void 0 && s.setContentType(null), "setRequestHeader" in y && d.forEach(s.toJSON(), function(F, L) {
|
|
2169
|
+
y.setRequestHeader(L, F);
|
|
2170
|
+
}), d.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), i && i !== "json" && (y.responseType = o.responseType), c && ([h, g] = Ge(c, !0), y.addEventListener("progress", h)), u && y.upload && ([p, l] = Ge(u), y.upload.addEventListener("progress", p), y.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (R) => {
|
|
2171
|
+
y && (r(!R || R.type ? new Re(null, e, y) : R), y.abort(), y = null);
|
|
1345
2172
|
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
1346
|
-
const
|
|
1347
|
-
if (
|
|
1348
|
-
r(new v("Unsupported protocol " +
|
|
2173
|
+
const E = xs(o.url);
|
|
2174
|
+
if (E && j.protocols.indexOf(E) === -1) {
|
|
2175
|
+
r(new v("Unsupported protocol " + E + ":", v.ERR_BAD_REQUEST, e));
|
|
1349
2176
|
return;
|
|
1350
2177
|
}
|
|
1351
|
-
|
|
2178
|
+
y.send(a || null);
|
|
1352
2179
|
});
|
|
1353
|
-
},
|
|
2180
|
+
}, Ns = (e, t) => {
|
|
1354
2181
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1355
2182
|
if (t || n) {
|
|
1356
2183
|
let r = new AbortController(), o;
|
|
1357
|
-
const
|
|
2184
|
+
const a = function(c) {
|
|
1358
2185
|
if (!o) {
|
|
1359
2186
|
o = !0, i();
|
|
1360
|
-
const f =
|
|
1361
|
-
r.abort(f instanceof v ? f : new
|
|
2187
|
+
const f = c instanceof Error ? c : this.reason;
|
|
2188
|
+
r.abort(f instanceof v ? f : new Re(f instanceof Error ? f.message : f));
|
|
1362
2189
|
}
|
|
1363
2190
|
};
|
|
1364
|
-
let
|
|
1365
|
-
|
|
2191
|
+
let s = t && setTimeout(() => {
|
|
2192
|
+
s = null, a(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
|
|
1366
2193
|
}, t);
|
|
1367
2194
|
const i = () => {
|
|
1368
|
-
e && (
|
|
1369
|
-
|
|
2195
|
+
e && (s && clearTimeout(s), s = null, e.forEach((c) => {
|
|
2196
|
+
c.unsubscribe ? c.unsubscribe(a) : c.removeEventListener("abort", a);
|
|
1370
2197
|
}), e = null);
|
|
1371
2198
|
};
|
|
1372
|
-
e.forEach((
|
|
1373
|
-
const { signal:
|
|
1374
|
-
return
|
|
2199
|
+
e.forEach((c) => c.addEventListener("abort", a));
|
|
2200
|
+
const { signal: u } = r;
|
|
2201
|
+
return u.unsubscribe = () => d.asap(i), u;
|
|
1375
2202
|
}
|
|
1376
|
-
},
|
|
2203
|
+
}, Ms = function* (e, t) {
|
|
1377
2204
|
let n = e.byteLength;
|
|
1378
2205
|
if (n < t) {
|
|
1379
2206
|
yield e;
|
|
@@ -1382,10 +2209,10 @@ const Nn = (e) => {
|
|
|
1382
2209
|
let r = 0, o;
|
|
1383
2210
|
for (; r < n; )
|
|
1384
2211
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1385
|
-
},
|
|
1386
|
-
for await (const n of
|
|
1387
|
-
yield*
|
|
1388
|
-
},
|
|
2212
|
+
}, Ps = async function* (e, t) {
|
|
2213
|
+
for await (const n of Bs(e))
|
|
2214
|
+
yield* Ms(n, t);
|
|
2215
|
+
}, Bs = async function* (e) {
|
|
1389
2216
|
if (e[Symbol.asyncIterator]) {
|
|
1390
2217
|
yield* e;
|
|
1391
2218
|
return;
|
|
@@ -1401,44 +2228,44 @@ const Nn = (e) => {
|
|
|
1401
2228
|
} finally {
|
|
1402
2229
|
await t.cancel();
|
|
1403
2230
|
}
|
|
1404
|
-
},
|
|
1405
|
-
const o =
|
|
1406
|
-
let
|
|
1407
|
-
|
|
2231
|
+
}, sn = (e, t, n, r) => {
|
|
2232
|
+
const o = Ps(e, t);
|
|
2233
|
+
let a = 0, s, i = (u) => {
|
|
2234
|
+
s || (s = !0, r && r(u));
|
|
1408
2235
|
};
|
|
1409
2236
|
return new ReadableStream({
|
|
1410
|
-
async pull(
|
|
2237
|
+
async pull(u) {
|
|
1411
2238
|
try {
|
|
1412
|
-
const { done:
|
|
1413
|
-
if (
|
|
1414
|
-
i(),
|
|
2239
|
+
const { done: c, value: f } = await o.next();
|
|
2240
|
+
if (c) {
|
|
2241
|
+
i(), u.close();
|
|
1415
2242
|
return;
|
|
1416
2243
|
}
|
|
1417
|
-
let
|
|
2244
|
+
let p = f.byteLength;
|
|
1418
2245
|
if (n) {
|
|
1419
|
-
let
|
|
1420
|
-
n(
|
|
2246
|
+
let h = a += p;
|
|
2247
|
+
n(h);
|
|
1421
2248
|
}
|
|
1422
|
-
|
|
1423
|
-
} catch (
|
|
1424
|
-
throw i(
|
|
2249
|
+
u.enqueue(new Uint8Array(f));
|
|
2250
|
+
} catch (c) {
|
|
2251
|
+
throw i(c), c;
|
|
1425
2252
|
}
|
|
1426
2253
|
},
|
|
1427
|
-
cancel(
|
|
1428
|
-
return i(
|
|
2254
|
+
cancel(u) {
|
|
2255
|
+
return i(u), o.return();
|
|
1429
2256
|
}
|
|
1430
2257
|
}, {
|
|
1431
2258
|
highWaterMark: 2
|
|
1432
2259
|
});
|
|
1433
|
-
},
|
|
2260
|
+
}, nt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Dn = nt && typeof ReadableStream == "function", Is = nt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Fn = (e, ...t) => {
|
|
1434
2261
|
try {
|
|
1435
2262
|
return !!e(...t);
|
|
1436
2263
|
} catch {
|
|
1437
2264
|
return !1;
|
|
1438
2265
|
}
|
|
1439
|
-
},
|
|
2266
|
+
}, Ds = Dn && Fn(() => {
|
|
1440
2267
|
let e = !1;
|
|
1441
|
-
const t = new Request(
|
|
2268
|
+
const t = new Request(j.origin, {
|
|
1442
2269
|
body: new ReadableStream(),
|
|
1443
2270
|
method: "POST",
|
|
1444
2271
|
get duplex() {
|
|
@@ -1446,124 +2273,124 @@ const Nn = (e) => {
|
|
|
1446
2273
|
}
|
|
1447
2274
|
}).headers.has("Content-Type");
|
|
1448
2275
|
return e && !t;
|
|
1449
|
-
}),
|
|
1450
|
-
stream:
|
|
2276
|
+
}), an = 64 * 1024, Ot = Dn && Fn(() => d.isReadableStream(new Response("").body)), Xe = {
|
|
2277
|
+
stream: Ot && ((e) => e.body)
|
|
1451
2278
|
};
|
|
1452
|
-
|
|
2279
|
+
nt && ((e) => {
|
|
1453
2280
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1454
|
-
!
|
|
2281
|
+
!Xe[t] && (Xe[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1455
2282
|
throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
|
|
1456
2283
|
});
|
|
1457
2284
|
});
|
|
1458
2285
|
})(new Response());
|
|
1459
|
-
const
|
|
2286
|
+
const Fs = async (e) => {
|
|
1460
2287
|
if (e == null)
|
|
1461
2288
|
return 0;
|
|
1462
|
-
if (
|
|
2289
|
+
if (d.isBlob(e))
|
|
1463
2290
|
return e.size;
|
|
1464
|
-
if (
|
|
1465
|
-
return (await new Request(
|
|
2291
|
+
if (d.isSpecCompliantForm(e))
|
|
2292
|
+
return (await new Request(j.origin, {
|
|
1466
2293
|
method: "POST",
|
|
1467
2294
|
body: e
|
|
1468
2295
|
}).arrayBuffer()).byteLength;
|
|
1469
|
-
if (
|
|
2296
|
+
if (d.isArrayBufferView(e) || d.isArrayBuffer(e))
|
|
1470
2297
|
return e.byteLength;
|
|
1471
|
-
if (
|
|
1472
|
-
return (await
|
|
1473
|
-
},
|
|
1474
|
-
const n =
|
|
1475
|
-
return n ??
|
|
1476
|
-
},
|
|
2298
|
+
if (d.isURLSearchParams(e) && (e = e + ""), d.isString(e))
|
|
2299
|
+
return (await Is(e)).byteLength;
|
|
2300
|
+
}, Us = async (e, t) => {
|
|
2301
|
+
const n = d.toFiniteNumber(e.getContentLength());
|
|
2302
|
+
return n ?? Fs(t);
|
|
2303
|
+
}, js = nt && (async (e) => {
|
|
1477
2304
|
let {
|
|
1478
2305
|
url: t,
|
|
1479
2306
|
method: n,
|
|
1480
2307
|
data: r,
|
|
1481
2308
|
signal: o,
|
|
1482
|
-
cancelToken:
|
|
1483
|
-
timeout:
|
|
2309
|
+
cancelToken: a,
|
|
2310
|
+
timeout: s,
|
|
1484
2311
|
onDownloadProgress: i,
|
|
1485
|
-
onUploadProgress:
|
|
1486
|
-
responseType:
|
|
2312
|
+
onUploadProgress: u,
|
|
2313
|
+
responseType: c,
|
|
1487
2314
|
headers: f,
|
|
1488
|
-
withCredentials:
|
|
1489
|
-
fetchOptions:
|
|
1490
|
-
} =
|
|
1491
|
-
|
|
1492
|
-
let l =
|
|
1493
|
-
const
|
|
2315
|
+
withCredentials: p = "same-origin",
|
|
2316
|
+
fetchOptions: h
|
|
2317
|
+
} = In(e);
|
|
2318
|
+
c = c ? (c + "").toLowerCase() : "text";
|
|
2319
|
+
let l = Ns([o, a && a.toAbortSignal()], s), g;
|
|
2320
|
+
const m = l && l.unsubscribe && (() => {
|
|
1494
2321
|
l.unsubscribe();
|
|
1495
2322
|
});
|
|
1496
|
-
let
|
|
2323
|
+
let y;
|
|
1497
2324
|
try {
|
|
1498
|
-
if (
|
|
1499
|
-
let
|
|
2325
|
+
if (u && Ds && n !== "get" && n !== "head" && (y = await Us(f, r)) !== 0) {
|
|
2326
|
+
let L = new Request(t, {
|
|
1500
2327
|
method: "POST",
|
|
1501
2328
|
body: r,
|
|
1502
2329
|
duplex: "half"
|
|
1503
|
-
}),
|
|
1504
|
-
if (
|
|
1505
|
-
const [
|
|
1506
|
-
|
|
1507
|
-
|
|
2330
|
+
}), S;
|
|
2331
|
+
if (d.isFormData(r) && (S = L.headers.get("content-type")) && f.setContentType(S), L.body) {
|
|
2332
|
+
const [P, q] = nn(
|
|
2333
|
+
y,
|
|
2334
|
+
Ge(rn(u))
|
|
1508
2335
|
);
|
|
1509
|
-
r =
|
|
2336
|
+
r = sn(L.body, an, P, q);
|
|
1510
2337
|
}
|
|
1511
2338
|
}
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1515
|
-
...
|
|
2339
|
+
d.isString(p) || (p = p ? "include" : "omit");
|
|
2340
|
+
const T = "credentials" in Request.prototype;
|
|
2341
|
+
g = new Request(t, {
|
|
2342
|
+
...h,
|
|
1516
2343
|
signal: l,
|
|
1517
2344
|
method: n.toUpperCase(),
|
|
1518
2345
|
headers: f.normalize().toJSON(),
|
|
1519
2346
|
body: r,
|
|
1520
2347
|
duplex: "half",
|
|
1521
|
-
credentials:
|
|
2348
|
+
credentials: T ? p : void 0
|
|
1522
2349
|
});
|
|
1523
|
-
let
|
|
1524
|
-
const R =
|
|
1525
|
-
if (
|
|
1526
|
-
const
|
|
1527
|
-
["status", "statusText", "headers"].forEach((
|
|
1528
|
-
|
|
2350
|
+
let E = await fetch(g);
|
|
2351
|
+
const R = Ot && (c === "stream" || c === "response");
|
|
2352
|
+
if (Ot && (i || R && m)) {
|
|
2353
|
+
const L = {};
|
|
2354
|
+
["status", "statusText", "headers"].forEach((oe) => {
|
|
2355
|
+
L[oe] = E[oe];
|
|
1529
2356
|
});
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1532
|
-
|
|
2357
|
+
const S = d.toFiniteNumber(E.headers.get("content-length")), [P, q] = i && nn(
|
|
2358
|
+
S,
|
|
2359
|
+
Ge(rn(i), !0)
|
|
1533
2360
|
) || [];
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
2361
|
+
E = new Response(
|
|
2362
|
+
sn(E.body, an, P, () => {
|
|
2363
|
+
q && q(), m && m();
|
|
1537
2364
|
}),
|
|
1538
|
-
|
|
2365
|
+
L
|
|
1539
2366
|
);
|
|
1540
2367
|
}
|
|
1541
|
-
|
|
1542
|
-
let
|
|
1543
|
-
return !R &&
|
|
1544
|
-
|
|
1545
|
-
data:
|
|
1546
|
-
headers:
|
|
1547
|
-
status:
|
|
1548
|
-
statusText:
|
|
2368
|
+
c = c || "text";
|
|
2369
|
+
let F = await Xe[d.findKey(Xe, c) || "text"](E, e);
|
|
2370
|
+
return !R && m && m(), await new Promise((L, S) => {
|
|
2371
|
+
Pn(L, S, {
|
|
2372
|
+
data: F,
|
|
2373
|
+
headers: J.from(E.headers),
|
|
2374
|
+
status: E.status,
|
|
2375
|
+
statusText: E.statusText,
|
|
1549
2376
|
config: e,
|
|
1550
|
-
request:
|
|
2377
|
+
request: g
|
|
1551
2378
|
});
|
|
1552
2379
|
});
|
|
1553
|
-
} catch (
|
|
1554
|
-
throw
|
|
1555
|
-
new v("Network Error", v.ERR_NETWORK, e,
|
|
2380
|
+
} catch (T) {
|
|
2381
|
+
throw m && m(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
|
|
2382
|
+
new v("Network Error", v.ERR_NETWORK, e, g),
|
|
1556
2383
|
{
|
|
1557
|
-
cause:
|
|
2384
|
+
cause: T.cause || T
|
|
1558
2385
|
}
|
|
1559
|
-
) : v.from(
|
|
2386
|
+
) : v.from(T, T && T.code, e, g);
|
|
1560
2387
|
}
|
|
1561
|
-
}),
|
|
1562
|
-
http:
|
|
1563
|
-
xhr:
|
|
1564
|
-
fetch:
|
|
2388
|
+
}), At = {
|
|
2389
|
+
http: ts,
|
|
2390
|
+
xhr: Ls,
|
|
2391
|
+
fetch: js
|
|
1565
2392
|
};
|
|
1566
|
-
|
|
2393
|
+
d.forEach(At, (e, t) => {
|
|
1567
2394
|
if (e) {
|
|
1568
2395
|
try {
|
|
1569
2396
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1572,113 +2399,113 @@ c.forEach(Et, (e, t) => {
|
|
|
1572
2399
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1573
2400
|
}
|
|
1574
2401
|
});
|
|
1575
|
-
const
|
|
2402
|
+
const ln = (e) => `- ${e}`, zs = (e) => d.isFunction(e) || e === null || e === !1, Un = {
|
|
1576
2403
|
getAdapter: (e) => {
|
|
1577
|
-
e =
|
|
2404
|
+
e = d.isArray(e) ? e : [e];
|
|
1578
2405
|
const { length: t } = e;
|
|
1579
2406
|
let n, r;
|
|
1580
2407
|
const o = {};
|
|
1581
|
-
for (let
|
|
1582
|
-
n = e[
|
|
1583
|
-
let
|
|
1584
|
-
if (r = n, !
|
|
1585
|
-
throw new v(`Unknown adapter '${
|
|
2408
|
+
for (let a = 0; a < t; a++) {
|
|
2409
|
+
n = e[a];
|
|
2410
|
+
let s;
|
|
2411
|
+
if (r = n, !zs(n) && (r = At[(s = String(n)).toLowerCase()], r === void 0))
|
|
2412
|
+
throw new v(`Unknown adapter '${s}'`);
|
|
1586
2413
|
if (r)
|
|
1587
2414
|
break;
|
|
1588
|
-
o[
|
|
2415
|
+
o[s || "#" + a] = r;
|
|
1589
2416
|
}
|
|
1590
2417
|
if (!r) {
|
|
1591
|
-
const
|
|
1592
|
-
([i,
|
|
2418
|
+
const a = Object.entries(o).map(
|
|
2419
|
+
([i, u]) => `adapter ${i} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1593
2420
|
);
|
|
1594
|
-
let
|
|
1595
|
-
` +
|
|
1596
|
-
`) : " " +
|
|
2421
|
+
let s = t ? a.length > 1 ? `since :
|
|
2422
|
+
` + a.map(ln).join(`
|
|
2423
|
+
`) : " " + ln(a[0]) : "as no adapter specified";
|
|
1597
2424
|
throw new v(
|
|
1598
|
-
"There is no suitable adapter to dispatch the request " +
|
|
2425
|
+
"There is no suitable adapter to dispatch the request " + s,
|
|
1599
2426
|
"ERR_NOT_SUPPORT"
|
|
1600
2427
|
);
|
|
1601
2428
|
}
|
|
1602
2429
|
return r;
|
|
1603
2430
|
},
|
|
1604
|
-
adapters:
|
|
2431
|
+
adapters: At
|
|
1605
2432
|
};
|
|
1606
|
-
function
|
|
2433
|
+
function bt(e) {
|
|
1607
2434
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1608
|
-
throw new
|
|
2435
|
+
throw new Re(null, e);
|
|
1609
2436
|
}
|
|
1610
|
-
function
|
|
1611
|
-
return
|
|
2437
|
+
function cn(e) {
|
|
2438
|
+
return bt(e), e.headers = J.from(e.headers), e.data = yt.call(
|
|
1612
2439
|
e,
|
|
1613
2440
|
e.transformRequest
|
|
1614
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1615
|
-
return
|
|
2441
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Un.getAdapter(e.adapter || Pe.adapter)(e).then(function(r) {
|
|
2442
|
+
return bt(e), r.data = yt.call(
|
|
1616
2443
|
e,
|
|
1617
2444
|
e.transformResponse,
|
|
1618
2445
|
r
|
|
1619
|
-
), r.headers =
|
|
2446
|
+
), r.headers = J.from(r.headers), r;
|
|
1620
2447
|
}, function(r) {
|
|
1621
|
-
return
|
|
2448
|
+
return Mn(r) || (bt(e), r && r.response && (r.response.data = yt.call(
|
|
1622
2449
|
e,
|
|
1623
2450
|
e.transformResponse,
|
|
1624
2451
|
r.response
|
|
1625
|
-
), r.response.headers =
|
|
2452
|
+
), r.response.headers = J.from(r.response.headers))), Promise.reject(r);
|
|
1626
2453
|
});
|
|
1627
2454
|
}
|
|
1628
|
-
const
|
|
2455
|
+
const jn = "1.8.3", rt = {};
|
|
1629
2456
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1630
|
-
|
|
2457
|
+
rt[e] = function(r) {
|
|
1631
2458
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1632
2459
|
};
|
|
1633
2460
|
});
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
function o(
|
|
1637
|
-
return "[Axios v" +
|
|
2461
|
+
const un = {};
|
|
2462
|
+
rt.transitional = function(t, n, r) {
|
|
2463
|
+
function o(a, s) {
|
|
2464
|
+
return "[Axios v" + jn + "] Transitional option '" + a + "'" + s + (r ? ". " + r : "");
|
|
1638
2465
|
}
|
|
1639
|
-
return (
|
|
2466
|
+
return (a, s, i) => {
|
|
1640
2467
|
if (t === !1)
|
|
1641
2468
|
throw new v(
|
|
1642
|
-
o(
|
|
2469
|
+
o(s, " has been removed" + (n ? " in " + n : "")),
|
|
1643
2470
|
v.ERR_DEPRECATED
|
|
1644
2471
|
);
|
|
1645
|
-
return n && !
|
|
2472
|
+
return n && !un[s] && (un[s] = !0, console.warn(
|
|
1646
2473
|
o(
|
|
1647
|
-
|
|
2474
|
+
s,
|
|
1648
2475
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1649
2476
|
)
|
|
1650
|
-
)), t ? t(
|
|
2477
|
+
)), t ? t(a, s, i) : !0;
|
|
1651
2478
|
};
|
|
1652
2479
|
};
|
|
1653
|
-
|
|
2480
|
+
rt.spelling = function(t) {
|
|
1654
2481
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1655
2482
|
};
|
|
1656
|
-
function
|
|
2483
|
+
function Hs(e, t, n) {
|
|
1657
2484
|
if (typeof e != "object")
|
|
1658
2485
|
throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
|
|
1659
2486
|
const r = Object.keys(e);
|
|
1660
2487
|
let o = r.length;
|
|
1661
2488
|
for (; o-- > 0; ) {
|
|
1662
|
-
const
|
|
1663
|
-
if (
|
|
1664
|
-
const i = e[
|
|
1665
|
-
if (
|
|
1666
|
-
throw new v("option " +
|
|
2489
|
+
const a = r[o], s = t[a];
|
|
2490
|
+
if (s) {
|
|
2491
|
+
const i = e[a], u = i === void 0 || s(i, a, e);
|
|
2492
|
+
if (u !== !0)
|
|
2493
|
+
throw new v("option " + a + " must be " + u, v.ERR_BAD_OPTION_VALUE);
|
|
1667
2494
|
continue;
|
|
1668
2495
|
}
|
|
1669
2496
|
if (n !== !0)
|
|
1670
|
-
throw new v("Unknown option " +
|
|
2497
|
+
throw new v("Unknown option " + a, v.ERR_BAD_OPTION);
|
|
1671
2498
|
}
|
|
1672
2499
|
}
|
|
1673
|
-
const
|
|
1674
|
-
assertOptions:
|
|
1675
|
-
validators:
|
|
1676
|
-
},
|
|
1677
|
-
let
|
|
2500
|
+
const Ke = {
|
|
2501
|
+
assertOptions: Hs,
|
|
2502
|
+
validators: rt
|
|
2503
|
+
}, se = Ke.validators;
|
|
2504
|
+
let ge = class {
|
|
1678
2505
|
constructor(t) {
|
|
1679
2506
|
this.defaults = t, this.interceptors = {
|
|
1680
|
-
request: new
|
|
1681
|
-
response: new
|
|
2507
|
+
request: new en(),
|
|
2508
|
+
response: new en()
|
|
1682
2509
|
};
|
|
1683
2510
|
}
|
|
1684
2511
|
/**
|
|
@@ -1696,10 +2523,10 @@ let ue = class {
|
|
|
1696
2523
|
if (r instanceof Error) {
|
|
1697
2524
|
let o = {};
|
|
1698
2525
|
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1699
|
-
const
|
|
2526
|
+
const a = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1700
2527
|
try {
|
|
1701
|
-
r.stack ?
|
|
1702
|
-
` +
|
|
2528
|
+
r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2529
|
+
` + a) : r.stack = a;
|
|
1703
2530
|
} catch {
|
|
1704
2531
|
}
|
|
1705
2532
|
}
|
|
@@ -1707,122 +2534,122 @@ let ue = class {
|
|
|
1707
2534
|
}
|
|
1708
2535
|
}
|
|
1709
2536
|
_request(t, n) {
|
|
1710
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1711
|
-
const { transitional: r, paramsSerializer: o, headers:
|
|
1712
|
-
r !== void 0 &&
|
|
1713
|
-
silentJSONParsing:
|
|
1714
|
-
forcedJSONParsing:
|
|
1715
|
-
clarifyTimeoutError:
|
|
1716
|
-
}, !1), o != null && (
|
|
2537
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = we(this.defaults, n);
|
|
2538
|
+
const { transitional: r, paramsSerializer: o, headers: a } = n;
|
|
2539
|
+
r !== void 0 && Ke.assertOptions(r, {
|
|
2540
|
+
silentJSONParsing: se.transitional(se.boolean),
|
|
2541
|
+
forcedJSONParsing: se.transitional(se.boolean),
|
|
2542
|
+
clarifyTimeoutError: se.transitional(se.boolean)
|
|
2543
|
+
}, !1), o != null && (d.isFunction(o) ? n.paramsSerializer = {
|
|
1717
2544
|
serialize: o
|
|
1718
|
-
} :
|
|
1719
|
-
encode:
|
|
1720
|
-
serialize:
|
|
1721
|
-
}, !0)),
|
|
1722
|
-
baseUrl:
|
|
1723
|
-
withXsrfToken:
|
|
2545
|
+
} : Ke.assertOptions(o, {
|
|
2546
|
+
encode: se.function,
|
|
2547
|
+
serialize: se.function
|
|
2548
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ke.assertOptions(n, {
|
|
2549
|
+
baseUrl: se.spelling("baseURL"),
|
|
2550
|
+
withXsrfToken: se.spelling("withXSRFToken")
|
|
1724
2551
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1725
|
-
let
|
|
1726
|
-
|
|
1727
|
-
|
|
2552
|
+
let s = a && d.merge(
|
|
2553
|
+
a.common,
|
|
2554
|
+
a[n.method]
|
|
1728
2555
|
);
|
|
1729
|
-
|
|
2556
|
+
a && d.forEach(
|
|
1730
2557
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1731
|
-
(
|
|
1732
|
-
delete
|
|
2558
|
+
(g) => {
|
|
2559
|
+
delete a[g];
|
|
1733
2560
|
}
|
|
1734
|
-
), n.headers =
|
|
2561
|
+
), n.headers = J.concat(s, a);
|
|
1735
2562
|
const i = [];
|
|
1736
|
-
let
|
|
1737
|
-
this.interceptors.request.forEach(function(
|
|
1738
|
-
typeof
|
|
2563
|
+
let u = !0;
|
|
2564
|
+
this.interceptors.request.forEach(function(m) {
|
|
2565
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (u = u && m.synchronous, i.unshift(m.fulfilled, m.rejected));
|
|
1739
2566
|
});
|
|
1740
|
-
const
|
|
1741
|
-
this.interceptors.response.forEach(function(
|
|
1742
|
-
|
|
2567
|
+
const c = [];
|
|
2568
|
+
this.interceptors.response.forEach(function(m) {
|
|
2569
|
+
c.push(m.fulfilled, m.rejected);
|
|
1743
2570
|
});
|
|
1744
|
-
let f,
|
|
1745
|
-
if (!
|
|
1746
|
-
const
|
|
1747
|
-
for (
|
|
1748
|
-
f = f.then(
|
|
2571
|
+
let f, p = 0, h;
|
|
2572
|
+
if (!u) {
|
|
2573
|
+
const g = [cn.bind(this), void 0];
|
|
2574
|
+
for (g.unshift.apply(g, i), g.push.apply(g, c), h = g.length, f = Promise.resolve(n); p < h; )
|
|
2575
|
+
f = f.then(g[p++], g[p++]);
|
|
1749
2576
|
return f;
|
|
1750
2577
|
}
|
|
1751
|
-
|
|
2578
|
+
h = i.length;
|
|
1752
2579
|
let l = n;
|
|
1753
|
-
for (
|
|
1754
|
-
const
|
|
2580
|
+
for (p = 0; p < h; ) {
|
|
2581
|
+
const g = i[p++], m = i[p++];
|
|
1755
2582
|
try {
|
|
1756
|
-
l =
|
|
1757
|
-
} catch (
|
|
1758
|
-
|
|
2583
|
+
l = g(l);
|
|
2584
|
+
} catch (y) {
|
|
2585
|
+
m.call(this, y);
|
|
1759
2586
|
break;
|
|
1760
2587
|
}
|
|
1761
2588
|
}
|
|
1762
2589
|
try {
|
|
1763
|
-
f =
|
|
1764
|
-
} catch (
|
|
1765
|
-
return Promise.reject(
|
|
2590
|
+
f = cn.call(this, l);
|
|
2591
|
+
} catch (g) {
|
|
2592
|
+
return Promise.reject(g);
|
|
1766
2593
|
}
|
|
1767
|
-
for (
|
|
1768
|
-
f = f.then(
|
|
2594
|
+
for (p = 0, h = c.length; p < h; )
|
|
2595
|
+
f = f.then(c[p++], c[p++]);
|
|
1769
2596
|
return f;
|
|
1770
2597
|
}
|
|
1771
2598
|
getUri(t) {
|
|
1772
|
-
t =
|
|
1773
|
-
const n =
|
|
1774
|
-
return
|
|
2599
|
+
t = we(this.defaults, t);
|
|
2600
|
+
const n = Bn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2601
|
+
return _n(n, t.params, t.paramsSerializer);
|
|
1775
2602
|
}
|
|
1776
2603
|
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
return this.request(
|
|
2604
|
+
d.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2605
|
+
ge.prototype[t] = function(n, r) {
|
|
2606
|
+
return this.request(we(r || {}, {
|
|
1780
2607
|
method: t,
|
|
1781
2608
|
url: n,
|
|
1782
2609
|
data: (r || {}).data
|
|
1783
2610
|
}));
|
|
1784
2611
|
};
|
|
1785
2612
|
});
|
|
1786
|
-
|
|
2613
|
+
d.forEach(["post", "put", "patch"], function(t) {
|
|
1787
2614
|
function n(r) {
|
|
1788
|
-
return function(
|
|
1789
|
-
return this.request(
|
|
2615
|
+
return function(a, s, i) {
|
|
2616
|
+
return this.request(we(i || {}, {
|
|
1790
2617
|
method: t,
|
|
1791
2618
|
headers: r ? {
|
|
1792
2619
|
"Content-Type": "multipart/form-data"
|
|
1793
2620
|
} : {},
|
|
1794
|
-
url:
|
|
1795
|
-
data:
|
|
2621
|
+
url: a,
|
|
2622
|
+
data: s
|
|
1796
2623
|
}));
|
|
1797
2624
|
};
|
|
1798
2625
|
}
|
|
1799
|
-
|
|
2626
|
+
ge.prototype[t] = n(), ge.prototype[t + "Form"] = n(!0);
|
|
1800
2627
|
});
|
|
1801
|
-
let
|
|
2628
|
+
let qs = class zn {
|
|
1802
2629
|
constructor(t) {
|
|
1803
2630
|
if (typeof t != "function")
|
|
1804
2631
|
throw new TypeError("executor must be a function.");
|
|
1805
2632
|
let n;
|
|
1806
|
-
this.promise = new Promise(function(
|
|
1807
|
-
n =
|
|
2633
|
+
this.promise = new Promise(function(a) {
|
|
2634
|
+
n = a;
|
|
1808
2635
|
});
|
|
1809
2636
|
const r = this;
|
|
1810
2637
|
this.promise.then((o) => {
|
|
1811
2638
|
if (!r._listeners) return;
|
|
1812
|
-
let
|
|
1813
|
-
for (;
|
|
1814
|
-
r._listeners[
|
|
2639
|
+
let a = r._listeners.length;
|
|
2640
|
+
for (; a-- > 0; )
|
|
2641
|
+
r._listeners[a](o);
|
|
1815
2642
|
r._listeners = null;
|
|
1816
2643
|
}), this.promise.then = (o) => {
|
|
1817
|
-
let
|
|
1818
|
-
const
|
|
1819
|
-
r.subscribe(i),
|
|
2644
|
+
let a;
|
|
2645
|
+
const s = new Promise((i) => {
|
|
2646
|
+
r.subscribe(i), a = i;
|
|
1820
2647
|
}).then(o);
|
|
1821
|
-
return
|
|
1822
|
-
r.unsubscribe(
|
|
1823
|
-
},
|
|
1824
|
-
}, t(function(
|
|
1825
|
-
r.reason || (r.reason = new
|
|
2648
|
+
return s.cancel = function() {
|
|
2649
|
+
r.unsubscribe(a);
|
|
2650
|
+
}, s;
|
|
2651
|
+
}, t(function(a, s, i) {
|
|
2652
|
+
r.reason || (r.reason = new Re(a, s, i), n(r.reason));
|
|
1826
2653
|
});
|
|
1827
2654
|
}
|
|
1828
2655
|
/**
|
|
@@ -1864,22 +2691,22 @@ let Qo = class Pn {
|
|
|
1864
2691
|
static source() {
|
|
1865
2692
|
let t;
|
|
1866
2693
|
return {
|
|
1867
|
-
token: new
|
|
2694
|
+
token: new zn(function(o) {
|
|
1868
2695
|
t = o;
|
|
1869
2696
|
}),
|
|
1870
2697
|
cancel: t
|
|
1871
2698
|
};
|
|
1872
2699
|
}
|
|
1873
2700
|
};
|
|
1874
|
-
function
|
|
2701
|
+
function $s(e) {
|
|
1875
2702
|
return function(n) {
|
|
1876
2703
|
return e.apply(null, n);
|
|
1877
2704
|
};
|
|
1878
2705
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
2706
|
+
function Ws(e) {
|
|
2707
|
+
return d.isObject(e) && e.isAxiosError === !0;
|
|
1881
2708
|
}
|
|
1882
|
-
const
|
|
2709
|
+
const kt = {
|
|
1883
2710
|
Continue: 100,
|
|
1884
2711
|
SwitchingProtocols: 101,
|
|
1885
2712
|
Processing: 102,
|
|
@@ -1944,121 +2771,85 @@ const St = {
|
|
|
1944
2771
|
NotExtended: 510,
|
|
1945
2772
|
NetworkAuthenticationRequired: 511
|
|
1946
2773
|
};
|
|
1947
|
-
Object.entries(
|
|
1948
|
-
|
|
2774
|
+
Object.entries(kt).forEach(([e, t]) => {
|
|
2775
|
+
kt[t] = e;
|
|
1949
2776
|
});
|
|
1950
|
-
function
|
|
1951
|
-
const t = new
|
|
1952
|
-
return
|
|
1953
|
-
return
|
|
2777
|
+
function Hn(e) {
|
|
2778
|
+
const t = new ge(e), n = bn(ge.prototype.request, t);
|
|
2779
|
+
return d.extend(n, ge.prototype, t, { allOwnKeys: !0 }), d.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2780
|
+
return Hn(we(e, o));
|
|
1954
2781
|
}, n;
|
|
1955
2782
|
}
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
2783
|
+
const k = Hn(Pe);
|
|
2784
|
+
k.Axios = ge;
|
|
2785
|
+
k.CanceledError = Re;
|
|
2786
|
+
k.CancelToken = qs;
|
|
2787
|
+
k.isCancel = Mn;
|
|
2788
|
+
k.VERSION = jn;
|
|
2789
|
+
k.toFormData = tt;
|
|
2790
|
+
k.AxiosError = v;
|
|
2791
|
+
k.Cancel = k.CanceledError;
|
|
2792
|
+
k.all = function(t) {
|
|
1966
2793
|
return Promise.all(t);
|
|
1967
2794
|
};
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2795
|
+
k.spread = $s;
|
|
2796
|
+
k.isAxiosError = Ws;
|
|
2797
|
+
k.mergeConfig = we;
|
|
2798
|
+
k.AxiosHeaders = J;
|
|
2799
|
+
k.formToJSON = (e) => Nn(d.isHTMLForm(e) ? new FormData(e) : e);
|
|
2800
|
+
k.getAdapter = Un.getAdapter;
|
|
2801
|
+
k.HttpStatusCode = kt;
|
|
2802
|
+
k.default = k;
|
|
1976
2803
|
const {
|
|
1977
|
-
Axios:
|
|
1978
|
-
AxiosError:
|
|
1979
|
-
CanceledError:
|
|
1980
|
-
isCancel:
|
|
1981
|
-
CancelToken:
|
|
1982
|
-
VERSION:
|
|
1983
|
-
all:
|
|
1984
|
-
Cancel:
|
|
1985
|
-
isAxiosError:
|
|
1986
|
-
spread:
|
|
1987
|
-
toFormData:
|
|
1988
|
-
AxiosHeaders:
|
|
1989
|
-
HttpStatusCode:
|
|
1990
|
-
formToJSON:
|
|
1991
|
-
getAdapter:
|
|
1992
|
-
mergeConfig:
|
|
1993
|
-
} =
|
|
1994
|
-
|
|
1995
|
-
process.env.NODE_ENV;
|
|
1996
|
-
const Re = "vapp", ns = () => (/* @__PURE__ */ new Date()).toISOString(), He = (e, t, n) => `[vezham] [${ns()}] [${e}] [${t}] ${n}`, mt = () => !ts, se = {
|
|
1997
|
-
log: (e = Re, t, n) => {
|
|
1998
|
-
console.log(
|
|
1999
|
-
He("LOG", e, t),
|
|
2000
|
-
n || ""
|
|
2001
|
-
);
|
|
2002
|
-
},
|
|
2003
|
-
debug: (e = Re, t, n) => {
|
|
2004
|
-
},
|
|
2005
|
-
info: (e = Re, t, n) => {
|
|
2006
|
-
mt() || console.info(
|
|
2007
|
-
He("INFO", e, t),
|
|
2008
|
-
n || ""
|
|
2009
|
-
);
|
|
2010
|
-
},
|
|
2011
|
-
warn: (e = Re, t, n) => {
|
|
2012
|
-
mt() || console.warn(
|
|
2013
|
-
He("WARN", e, t),
|
|
2014
|
-
n || ""
|
|
2015
|
-
);
|
|
2016
|
-
},
|
|
2017
|
-
error: (e = Re, t, n) => {
|
|
2018
|
-
mt() || console.error(
|
|
2019
|
-
He("ERROR", e, t),
|
|
2020
|
-
n || ""
|
|
2021
|
-
);
|
|
2022
|
-
}
|
|
2023
|
-
// trace: (namespace = APP_NAME, message: string, object?: any) => {
|
|
2024
|
-
// if (strictLog()) return
|
|
2025
|
-
// let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
|
|
2026
|
-
// if (!(object instanceof Error)) console.trace(log_msg, object);
|
|
2027
|
-
// else console.trace(log_msg, object)
|
|
2028
|
-
// }
|
|
2029
|
-
};
|
|
2030
|
-
var Tt = /* @__PURE__ */ ((e) => (e[e.DEFAULT = 0] = "DEFAULT", e[e.SANDBOX = 1] = "SANDBOX", e[e.DC = 2] = "DC", e))(Tt || {});
|
|
2031
|
-
const Rt = "useAxios", rs = async (e = (n) => {
|
|
2032
|
-
}, t) => (t.domain_type === Tt.SANDBOX || (t.domain_type, Tt.DC), t.baseURL = void 0, se.debug(Rt, `baseURL::${t.baseURL}`), e(t), t), os = async (e = (n) => {
|
|
2804
|
+
Axios: Ca,
|
|
2805
|
+
AxiosError: _a,
|
|
2806
|
+
CanceledError: La,
|
|
2807
|
+
isCancel: Na,
|
|
2808
|
+
CancelToken: Ma,
|
|
2809
|
+
VERSION: Pa,
|
|
2810
|
+
all: Ba,
|
|
2811
|
+
Cancel: Ia,
|
|
2812
|
+
isAxiosError: Da,
|
|
2813
|
+
spread: Fa,
|
|
2814
|
+
toFormData: Ua,
|
|
2815
|
+
AxiosHeaders: ja,
|
|
2816
|
+
HttpStatusCode: za,
|
|
2817
|
+
formToJSON: Ha,
|
|
2818
|
+
getAdapter: qa,
|
|
2819
|
+
mergeConfig: $a
|
|
2820
|
+
} = k, Ct = "useAxios", Js = async (e, t = (r) => "", n = (r) => {
|
|
2821
|
+
}) => (e.baseURL = t(e), U.debug(Ct, `baseURL::${e.baseURL}`), n(e), e), Vs = async (e = (n) => {
|
|
2033
2822
|
}, t) => {
|
|
2034
2823
|
var r;
|
|
2035
2824
|
if (e(t), t.response.status !== 500) {
|
|
2036
2825
|
if (t.response.status <= 401)
|
|
2037
|
-
return
|
|
2826
|
+
return U.info(Ct, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2038
2827
|
if (t.response.status === 404)
|
|
2039
|
-
return
|
|
2828
|
+
return U.info(Ct, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2040
2829
|
}
|
|
2041
2830
|
let n;
|
|
2042
2831
|
try {
|
|
2043
2832
|
let o = "";
|
|
2044
|
-
t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n =
|
|
2833
|
+
t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = k(t.response.config);
|
|
2045
2834
|
} catch (o) {
|
|
2046
2835
|
(r = o == null ? void 0 : o.data) != null && r.meta ? n = Promise.reject(o.data.meta) : o.data ? n = Promise.reject(o.data) : n = Promise.reject(o);
|
|
2047
2836
|
}
|
|
2048
2837
|
return n;
|
|
2049
|
-
},
|
|
2050
|
-
|
|
2051
|
-
(
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2838
|
+
}, $e = "useAxios", Wa = ({ onRequest: e, onError: t, defineServerEnv: n }) => {
|
|
2839
|
+
k.interceptors.request.use(
|
|
2840
|
+
(r) => Js(r, n, e)
|
|
2841
|
+
), k.interceptors.response.use(
|
|
2842
|
+
(r) => r.data.data,
|
|
2843
|
+
(r) => Vs(t, r)
|
|
2844
|
+
), k.defaults.headers.common["content-type"] = "application/json";
|
|
2845
|
+
}, Ja = {
|
|
2846
|
+
get: async (e, t) => (U.debug($e, `[get] url | ${e}`), k.get(e, t)),
|
|
2847
|
+
post: async (e, t, n) => (U.debug($e, `[post] url | ${e} | payload | ${t}`), k.post(e, t, n)),
|
|
2848
|
+
put: async (e, t, n) => (U.debug($e, `[put] url | ${e} | payload | ${t}`), k.put(e, t, n)),
|
|
2849
|
+
delete: async (e, t) => (U.debug($e, `[delete] url | ${e}`), k.delete(e, t))
|
|
2059
2850
|
};
|
|
2060
|
-
var
|
|
2061
|
-
const
|
|
2851
|
+
var X = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(X || {});
|
|
2852
|
+
const dn = {
|
|
2062
2853
|
/* suresh/NOTE: iPhone 15 device size */
|
|
2063
2854
|
iphone_15: { width: { min: 850, max: 854 }, height: { min: 390, max: 395 } },
|
|
2064
2855
|
/* suresh/NOTE: Iphone 14 pro max device size */
|
|
@@ -2124,18 +2915,18 @@ const nn = {
|
|
|
2124
2915
|
},
|
|
2125
2916
|
/* suresh/NOTE: Nokia N9 device size */
|
|
2126
2917
|
nokia_n9: { width: { min: 853, max: 855 }, height: { min: 478, max: 482 } }
|
|
2127
|
-
},
|
|
2128
|
-
const { width: n, height: r } =
|
|
2918
|
+
}, qn = () => ({ width: window.innerWidth, height: window.innerHeight }), Ks = ({ width: e, height: t }) => {
|
|
2919
|
+
const { width: n, height: r } = qn();
|
|
2129
2920
|
return e.min <= n && e.max >= n && t.min <= r && t.max >= r;
|
|
2130
|
-
},
|
|
2131
|
-
for (const r of Object.keys(
|
|
2132
|
-
const o =
|
|
2133
|
-
if (
|
|
2134
|
-
return o.vdevice ||
|
|
2135
|
-
}
|
|
2136
|
-
const { width: e, height: t } =
|
|
2137
|
-
return e <= 320 ?
|
|
2138
|
-
},
|
|
2921
|
+
}, Ys = () => {
|
|
2922
|
+
for (const r of Object.keys(dn)) {
|
|
2923
|
+
const o = dn[r];
|
|
2924
|
+
if (Ks(o))
|
|
2925
|
+
return o.vdevice || X.MOBILE_LANDSCAPE_XL;
|
|
2926
|
+
}
|
|
2927
|
+
const { width: e, height: t } = qn(), n = t >= e;
|
|
2928
|
+
return e <= 320 ? X.MINI_MOBILE : e <= 480 && e >= 320 ? X.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? X.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? X.TAB_PORTRAIT : X.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? X.LAPTOP : (e >= 1281, X.DESKTOP);
|
|
2929
|
+
}, Gs = ["h1", "h3", "blockquote", "br"], Xs = {
|
|
2139
2930
|
strong: "*",
|
|
2140
2931
|
b: "*",
|
|
2141
2932
|
i: "_",
|
|
@@ -2148,7 +2939,7 @@ const nn = {
|
|
|
2148
2939
|
h3: "### ",
|
|
2149
2940
|
br: `
|
|
2150
2941
|
`
|
|
2151
|
-
},
|
|
2942
|
+
}, D = {
|
|
2152
2943
|
bold: /(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
2153
2944
|
// *md*
|
|
2154
2945
|
italic: /(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
@@ -2190,13 +2981,13 @@ const nn = {
|
|
|
2190
2981
|
// vtypes
|
|
2191
2982
|
gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
|
|
2192
2983
|
vtype: /(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/
|
|
2193
|
-
},
|
|
2984
|
+
}, vt = (e) => e.replace(/\*/g, "*").replace(/\_/g, "_").replace(/\~/g, "~"), Qs = (e) => e.replace(/*/g, "*").replace(/_/g, "_").replace(/~/g, "~"), fn = (e) => (e && typeof e == "string" && (e = e.replace(/'|'/g, "'").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&").replace(///g, "/").replace(/ /g, " ").replace(/%2C/g, ",")), e), xe = (e, t) => {
|
|
2194
2985
|
let n = "", r = "";
|
|
2195
2986
|
return (e[0] === `
|
|
2196
2987
|
` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
|
|
2197
2988
|
` || e[e.length - 1] === " ") && (r = e[e.length - 1]), n + t + r;
|
|
2198
|
-
},
|
|
2199
|
-
let t = e.match(
|
|
2989
|
+
}, hn = (e) => new RegExp(`<${e}.*?/?>`, "gm"), pn = (e) => {
|
|
2990
|
+
let t = e.match(D.gdrive_url);
|
|
2200
2991
|
if (t && t.length > 1 && t[1])
|
|
2201
2992
|
return `http://docs.google.com/uc?export=open&id=${t[1]}`;
|
|
2202
2993
|
if (e.startsWith("@")) {
|
|
@@ -2205,58 +2996,58 @@ const nn = {
|
|
|
2205
2996
|
return `http://docs.google.com/uc?export=open&id=${n[1]}`;
|
|
2206
2997
|
}
|
|
2207
2998
|
return e;
|
|
2208
|
-
},
|
|
2999
|
+
}, mn = (e = "", t = "", n = "", r = "") => {
|
|
2209
3000
|
let o = "image";
|
|
2210
3001
|
if (r.length) {
|
|
2211
|
-
let
|
|
2212
|
-
|
|
3002
|
+
let a = r.match(D.vtype);
|
|
3003
|
+
a && a.length > 1 && a[1] && (o = a[1]);
|
|
2213
3004
|
}
|
|
2214
3005
|
return o == "audio" ? `<audio vmd="audio" controls ${r}>
|
|
2215
3006
|
<source src="${n}" type="audio/mp3"/>
|
|
2216
3007
|
</audio>` : o == "video" ? `<video vmd="video" controls ${r}>
|
|
2217
3008
|
<source src="${n}" type="video/mp4"/>
|
|
2218
3009
|
</video>` : `<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`;
|
|
2219
|
-
},
|
|
2220
|
-
applyReverseMarkdown: (e) => (e = e.replace(
|
|
2221
|
-
`), e =
|
|
3010
|
+
}, Va = {
|
|
3011
|
+
applyReverseMarkdown: (e) => (e = e.replace(hn("br"), `
|
|
3012
|
+
`), e = fn(e), e = Markdown.reverseAnchor(e), e = e.replace(hn("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
|
|
2222
3013
|
reverseRecursive: (e) => {
|
|
2223
3014
|
let n = new DOMParser().parseFromString(e, "text/html").body.childNodes, r = e === `
|
|
2224
3015
|
` ? `
|
|
2225
3016
|
` : "";
|
|
2226
3017
|
return Array.from(n).forEach((o) => {
|
|
2227
|
-
let
|
|
3018
|
+
let a = o.nodeType === Node.TEXT_NODE, s = !a && o.tagName.toLowerCase();
|
|
2228
3019
|
const i = o.innerText;
|
|
2229
3020
|
if (i && (i.trim() || i.includes(`
|
|
2230
|
-
`)) ||
|
|
2231
|
-
if (
|
|
3021
|
+
`)) || a || s === "br") {
|
|
3022
|
+
if (a)
|
|
2232
3023
|
return r += o.data;
|
|
2233
|
-
let
|
|
2234
|
-
r += !
|
|
3024
|
+
let u = Xs[s] || "", c = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
|
|
3025
|
+
r += !c.trim() && c.includes(`
|
|
2235
3026
|
`) ? `
|
|
2236
3027
|
` : "";
|
|
2237
|
-
let f =
|
|
2238
|
-
`,
|
|
2239
|
-
r +=
|
|
2240
|
-
` :
|
|
3028
|
+
let f = c[c.length - 1] === `
|
|
3029
|
+
`, p = Gs.includes(s) ? "" : u;
|
|
3030
|
+
r += u + (f ? c.slice(0, c.length - 1) + p + `
|
|
3031
|
+
` : c + p);
|
|
2241
3032
|
}
|
|
2242
3033
|
}), r;
|
|
2243
3034
|
},
|
|
2244
3035
|
reverseAnchor: (e) => {
|
|
2245
|
-
let { anchor_tag: t, href: n } =
|
|
2246
|
-
return e.replace(t, (r, o,
|
|
2247
|
-
const
|
|
3036
|
+
let { anchor_tag: t, href: n } = D;
|
|
3037
|
+
return e.replace(t, (r, o, a) => {
|
|
3038
|
+
const s = a;
|
|
2248
3039
|
let i;
|
|
2249
|
-
return o.replace(n, (
|
|
2250
|
-
i =
|
|
2251
|
-
}), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${
|
|
3040
|
+
return o.replace(n, (u, c) => {
|
|
3041
|
+
i = c;
|
|
3042
|
+
}), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${s}](${encodeURI(i)})`;
|
|
2252
3043
|
});
|
|
2253
3044
|
},
|
|
2254
3045
|
// md-apply
|
|
2255
|
-
applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e =
|
|
2256
|
-
`).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e =
|
|
2257
|
-
applyRecursive: (e, t = !1) => (e = e.replace(
|
|
2258
|
-
applyOnce: (e) => (e = e.replace(
|
|
2259
|
-
applyNextLine: (e) => e.replace(
|
|
3046
|
+
applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = fn(e), e = e.replace(/</g, "<").replace(/>/g, ">").replace(/<br>/g, `
|
|
3047
|
+
`).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = Qs(e), '<div class="vmd">' + e + "</div>"),
|
|
3048
|
+
applyRecursive: (e, t = !1) => (e = e.replace(D.bold, Markdown.getBoldHTML), e = e.replace(D.italic, Markdown.getItalicHTML), e = e.replace(D.underline, Markdown.getUnderLineHTML), e = e.replace(D.strike, Markdown.getStrikeHTML), e = e.replace(D.line, Markdown.getLineHTML), e = e.replace(D.bullet, Markdown.getBulletHTML), e = e.replace(D.numlist, Markdown.getNumlistHTML), t || (e = e.replace(D.video, Markdown.getVideoHTML), e = e.replace(D.image, Markdown.getImageHTML)), e = e.replace(D.link, Markdown.getLinkHTML), e),
|
|
3049
|
+
applyOnce: (e) => (e = e.replace(D.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(D.heading, Markdown.getHeadingHTML), e = e.replace(D.codeblock, Markdown.getCodeblockHTML), e = e.replace(D.monospace, Markdown.getMonoSpaceHTML), e),
|
|
3050
|
+
applyNextLine: (e) => e.replace(D.nextline, Markdown.getNextLineHTML),
|
|
2260
3051
|
// md-helper
|
|
2261
3052
|
getBoldHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "*" || n[n.length - 1] === "*" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strong vmd="bold">' + Markdown.applyRecursive(n) + "</strong> ",
|
|
2262
3053
|
getItalicHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "_" || n[n.length - 1] === "_" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <i vmd="italic">' + Markdown.applyRecursive(n) + "</i> ",
|
|
@@ -2264,34 +3055,34 @@ const nn = {
|
|
|
2264
3055
|
getStrikeHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "~" || n[n.length - 1] === "~" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strike vmd="strike">' + Markdown.applyRecursive(n) + "</strike> ",
|
|
2265
3056
|
getHeadingHTML: (e, t, n) => {
|
|
2266
3057
|
let r = t.length;
|
|
2267
|
-
return
|
|
3058
|
+
return xe(
|
|
2268
3059
|
e,
|
|
2269
|
-
" <h" + r + ` vmd="h${r}">` +
|
|
3060
|
+
" <h" + r + ` vmd="h${r}">` + vt(n) + "</h" + r + "> "
|
|
2270
3061
|
);
|
|
2271
3062
|
},
|
|
2272
|
-
getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ?
|
|
3063
|
+
getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? xe(
|
|
2273
3064
|
e,
|
|
2274
3065
|
' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
|
|
2275
3066
|
) : e),
|
|
2276
|
-
getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">“' +
|
|
3067
|
+
getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">“' + vt(n) + "”</code> ",
|
|
2277
3068
|
getCodeblockHTML: (e, t, n) => n.trim().length === 0 ? e : t + ' <pre vmd="codeblock"> ' + Markdown.applyRecursive(n) + "</pre>",
|
|
2278
3069
|
getNextLineHTML: (e, t, n, r) => t + ' <br vmd="br" > ' + r,
|
|
2279
3070
|
getLineHTML: (e, t, n, r) => t + '<hr vmd="line" class="hr w100">' + Markdown.applyRecursive(r.trim()),
|
|
2280
3071
|
getLinkHTML: (e, t, n, r, o) => {
|
|
2281
|
-
var
|
|
3072
|
+
var a = r.startsWith("www.") ? "http://" + r : r;
|
|
2282
3073
|
return t + ` <a vmd="link" href="${encodeURI(
|
|
2283
|
-
|
|
2284
|
-
)}" rel="noopener noreferrer" ${o}>${
|
|
3074
|
+
a
|
|
3075
|
+
)}" rel="noopener noreferrer" ${o}>${vt(n)}</a>`;
|
|
2285
3076
|
},
|
|
2286
3077
|
getImageHTML: (e, t, n, r, o) => {
|
|
2287
|
-
let
|
|
2288
|
-
return
|
|
3078
|
+
let a = mn(t, r, pn(n), o);
|
|
3079
|
+
return xe(e, a);
|
|
2289
3080
|
},
|
|
2290
|
-
getVideoHTML: (e, t, n, r, o,
|
|
2291
|
-
let
|
|
2292
|
-
return
|
|
3081
|
+
getVideoHTML: (e, t, n, r, o, a, s, i) => {
|
|
3082
|
+
let u = mn(t, r, pn(n), o);
|
|
3083
|
+
return xe(
|
|
2293
3084
|
e,
|
|
2294
|
-
`<a vmd="hyperlink" href="${
|
|
3085
|
+
`<a vmd="hyperlink" href="${a}" title="${s}" rel="noreferrer" ${i}>${u}</a>`
|
|
2295
3086
|
);
|
|
2296
3087
|
},
|
|
2297
3088
|
getBulletHTML: (e) => {
|
|
@@ -2299,29 +3090,29 @@ const nn = {
|
|
|
2299
3090
|
if (e.replace(/\s/g, "").replace(/\*/g, "").length == 0)
|
|
2300
3091
|
return e;
|
|
2301
3092
|
} else return e;
|
|
2302
|
-
return
|
|
3093
|
+
return xe(
|
|
2303
3094
|
e,
|
|
2304
3095
|
' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">' + ((n) => {
|
|
2305
3096
|
let r = "";
|
|
2306
3097
|
for (var o = n.split(`
|
|
2307
|
-
`),
|
|
2308
|
-
o[
|
|
3098
|
+
`), a = 0; a < o.length; a++)
|
|
3099
|
+
o[a] = o[a].replace(/[\-|●|○]/, "-"), o[a].includes("-") && (r += o[a].replace(/\-/, ' <li style="list-style: inherit"> ') + "</li> ");
|
|
2309
3100
|
return r;
|
|
2310
3101
|
})(e) + "</ul> "
|
|
2311
3102
|
);
|
|
2312
3103
|
},
|
|
2313
|
-
getNumlistHTML: (e) => isNaN(e) ?
|
|
3104
|
+
getNumlistHTML: (e) => isNaN(e) ? xe(
|
|
2314
3105
|
e,
|
|
2315
3106
|
' <ol vmd="list-number">' + ((n) => {
|
|
2316
3107
|
let r = "";
|
|
2317
3108
|
for (var o = n.split(`
|
|
2318
|
-
`),
|
|
2319
|
-
o[
|
|
3109
|
+
`), a = 0; a < o.length; a++)
|
|
3110
|
+
o[a] = o[a].replace(/(\d)*(\.)/, "-"), o[a].includes("-") && (r += o[a].replace(/\-/, '<li style="list-style: decimal"> ') + "</li>");
|
|
2320
3111
|
return r;
|
|
2321
3112
|
})(e) + "</ol> "
|
|
2322
3113
|
) : e
|
|
2323
3114
|
};
|
|
2324
|
-
function
|
|
3115
|
+
function Ka() {
|
|
2325
3116
|
return { toTop: () => {
|
|
2326
3117
|
window.scrollTo({
|
|
2327
3118
|
top: 0,
|
|
@@ -2332,354 +3123,107 @@ function ma() {
|
|
|
2332
3123
|
top: window.innerHeight,
|
|
2333
3124
|
behavior: "smooth"
|
|
2334
3125
|
});
|
|
2335
|
-
}, byId: (o = "",
|
|
2336
|
-
const
|
|
3126
|
+
}, byId: (o = "", a = !0) => {
|
|
3127
|
+
const s = document.getElementById(o);
|
|
2337
3128
|
let i = "start";
|
|
2338
|
-
if (
|
|
2339
|
-
const
|
|
2340
|
-
i =
|
|
3129
|
+
if (a) {
|
|
3130
|
+
const u = Ys();
|
|
3131
|
+
i = u === X.MINI_MOBILE || u === X.MOBILE_PORTRAIT ? "start" : "center";
|
|
2341
3132
|
}
|
|
2342
|
-
|
|
3133
|
+
s == null || s.scrollIntoView({
|
|
2343
3134
|
behavior: "smooth",
|
|
2344
3135
|
block: i
|
|
2345
3136
|
});
|
|
2346
3137
|
}, byIdOffSet: (o = "") => {
|
|
2347
|
-
const
|
|
3138
|
+
const a = document.getElementById(o), s = 75, i = document.body.getBoundingClientRect().top, f = a.getBoundingClientRect().top - i - s;
|
|
2348
3139
|
window.scroll({
|
|
2349
3140
|
top: f,
|
|
2350
3141
|
behavior: "smooth"
|
|
2351
3142
|
});
|
|
2352
3143
|
} };
|
|
2353
3144
|
}
|
|
2354
|
-
function
|
|
3145
|
+
function Ya({
|
|
2355
3146
|
meta: e = !1,
|
|
2356
3147
|
ctrl: t = !1,
|
|
2357
3148
|
shift: n = !1,
|
|
2358
3149
|
key: r,
|
|
2359
3150
|
handler: o
|
|
2360
3151
|
}) {
|
|
2361
|
-
|
|
2362
|
-
if (
|
|
2363
|
-
if (
|
|
2364
|
-
if (
|
|
2365
|
-
|
|
3152
|
+
Y("keydown", (a) => {
|
|
3153
|
+
if (a.metaKey === e) {
|
|
3154
|
+
if (a.ctrlKey !== t) return;
|
|
3155
|
+
if (a.shiftKey !== n) return;
|
|
3156
|
+
a.key === r && (a.stopImmediatePropagation(), a.preventDefault(), a.stopPropagation(), o());
|
|
2366
3157
|
}
|
|
2367
3158
|
});
|
|
2368
3159
|
}
|
|
2369
|
-
const
|
|
2370
|
-
let
|
|
2371
|
-
function
|
|
2372
|
-
return `vezham-ls-${
|
|
3160
|
+
const Zs = "useStore";
|
|
3161
|
+
let $n = "v0xapp", Wn = "1.0.5-alpha";
|
|
3162
|
+
function We(e) {
|
|
3163
|
+
return `vezham-ls-${$n}-${Wn}-${e}`;
|
|
2373
3164
|
}
|
|
2374
|
-
const
|
|
2375
|
-
e.pretext && (
|
|
2376
|
-
},
|
|
3165
|
+
const Ga = (e) => {
|
|
3166
|
+
e.pretext && ($n = e.pretext), e.version && (Wn = e.version);
|
|
3167
|
+
}, ea = {
|
|
2377
3168
|
get: (e, t) => {
|
|
2378
3169
|
try {
|
|
2379
|
-
const n = window.localStorage.getItem(
|
|
3170
|
+
const n = window.localStorage.getItem(We(e));
|
|
2380
3171
|
return n && n !== "undefined" ? n : t || "";
|
|
2381
3172
|
} catch (n) {
|
|
2382
|
-
return
|
|
3173
|
+
return U.error(Zs, `key | ${We(e)} | err: `, n), t || "";
|
|
2383
3174
|
}
|
|
2384
3175
|
},
|
|
2385
|
-
has: (e) => !!
|
|
2386
|
-
set: (e, t) => window.localStorage.setItem(
|
|
2387
|
-
delete: (e) => window.localStorage.removeItem(
|
|
3176
|
+
has: (e) => !!ea.get(e),
|
|
3177
|
+
set: (e, t) => window.localStorage.setItem(We(e), t),
|
|
3178
|
+
delete: (e) => window.localStorage.removeItem(We(e)),
|
|
2388
3179
|
purge: () => window.localStorage.clear()
|
|
2389
3180
|
};
|
|
2390
|
-
var fs = (e) => {
|
|
2391
|
-
switch (e) {
|
|
2392
|
-
case "success":
|
|
2393
|
-
return ms;
|
|
2394
|
-
case "info":
|
|
2395
|
-
return ws;
|
|
2396
|
-
case "warning":
|
|
2397
|
-
return gs;
|
|
2398
|
-
case "error":
|
|
2399
|
-
return ys;
|
|
2400
|
-
default:
|
|
2401
|
-
return null;
|
|
2402
|
-
}
|
|
2403
|
-
}, ps = Array(12).fill(0), hs = ({ visible: e, className: t }) => p.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, ps.map((n, r) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), ms = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), gs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), ws = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ys = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), bs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), vs = () => {
|
|
2404
|
-
let [e, t] = p.useState(document.hidden);
|
|
2405
|
-
return p.useEffect(() => {
|
|
2406
|
-
let n = () => {
|
|
2407
|
-
t(document.hidden);
|
|
2408
|
-
};
|
|
2409
|
-
return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
|
|
2410
|
-
}, []), e;
|
|
2411
|
-
}, Ot = 1, xs = class {
|
|
2412
|
-
constructor() {
|
|
2413
|
-
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
2414
|
-
let t = this.subscribers.indexOf(e);
|
|
2415
|
-
this.subscribers.splice(t, 1);
|
|
2416
|
-
}), this.publish = (e) => {
|
|
2417
|
-
this.subscribers.forEach((t) => t(e));
|
|
2418
|
-
}, this.addToast = (e) => {
|
|
2419
|
-
this.publish(e), this.toasts = [...this.toasts, e];
|
|
2420
|
-
}, this.create = (e) => {
|
|
2421
|
-
var t;
|
|
2422
|
-
let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Ot++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
2423
|
-
return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), s ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: a, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: a, id: o }), o;
|
|
2424
|
-
}, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
|
|
2425
|
-
this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
|
|
2426
|
-
}), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
|
|
2427
|
-
if (!t) return;
|
|
2428
|
-
let n;
|
|
2429
|
-
t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
|
2430
|
-
let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (d) => {
|
|
2431
|
-
if (s = ["resolve", d], p.isValidElement(d)) o = !1, this.create({ id: n, type: "default", message: d });
|
|
2432
|
-
else if (Ss(d) && !d.ok) {
|
|
2433
|
-
o = !1;
|
|
2434
|
-
let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${d.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${d.status}`) : t.description;
|
|
2435
|
-
this.create({ id: n, type: "error", message: u, description: f });
|
|
2436
|
-
} else if (t.success !== void 0) {
|
|
2437
|
-
o = !1;
|
|
2438
|
-
let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
|
|
2439
|
-
this.create({ id: n, type: "success", message: u, description: f });
|
|
2440
|
-
}
|
|
2441
|
-
}).catch(async (d) => {
|
|
2442
|
-
if (s = ["reject", d], t.error !== void 0) {
|
|
2443
|
-
o = !1;
|
|
2444
|
-
let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
|
|
2445
|
-
this.create({ id: n, type: "error", message: u, description: f });
|
|
2446
|
-
}
|
|
2447
|
-
}).finally(() => {
|
|
2448
|
-
var d;
|
|
2449
|
-
o && (this.dismiss(n), n = void 0), (d = t.finally) == null || d.call(t);
|
|
2450
|
-
}), i = () => new Promise((d, u) => a.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
|
|
2451
|
-
return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
|
|
2452
|
-
}, this.custom = (e, t) => {
|
|
2453
|
-
let n = (t == null ? void 0 : t.id) || Ot++;
|
|
2454
|
-
return this.create({ jsx: e(n), id: n, ...t }), n;
|
|
2455
|
-
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
2456
|
-
}
|
|
2457
|
-
}, H = new xs(), Es = (e, t) => {
|
|
2458
|
-
let n = (t == null ? void 0 : t.id) || Ot++;
|
|
2459
|
-
return H.addToast({ title: e, ...t, id: n }), n;
|
|
2460
|
-
}, Ss = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Ts = Es, Rs = () => H.toasts, Os = () => H.getActiveToasts(), As = Object.assign(Ts, { success: H.success, info: H.info, warning: H.warning, error: H.error, custom: H.custom, message: H.message, promise: H.promise, dismiss: H.dismiss, loading: H.loading }, { getHistory: Rs, getToasts: Os });
|
|
2461
|
-
function ks(e, { insertAt: t } = {}) {
|
|
2462
|
-
if (typeof document > "u") return;
|
|
2463
|
-
let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
|
|
2464
|
-
r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
|
|
2465
|
-
}
|
|
2466
|
-
ks(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
2467
|
-
`);
|
|
2468
|
-
function ze(e) {
|
|
2469
|
-
return e.label !== void 0;
|
|
2470
|
-
}
|
|
2471
|
-
var Ns = 3, _s = "32px", Ls = "16px", ln = 4e3, Cs = 356, Ms = 14, Ps = 20, Bs = 200;
|
|
2472
|
-
function X(...e) {
|
|
2473
|
-
return e.filter(Boolean).join(" ");
|
|
2474
|
-
}
|
|
2475
|
-
function Is(e) {
|
|
2476
|
-
let [t, n] = e.split("-"), r = [];
|
|
2477
|
-
return t && r.push(t), n && r.push(n), r;
|
|
2478
|
-
}
|
|
2479
|
-
var Ds = (e) => {
|
|
2480
|
-
var t, n, r, o, s, a, i, d, u, f, h;
|
|
2481
|
-
let { invert: y, toast: l, unstyled: w, interacting: g, setHeights: m, visibleToasts: S, heights: T, index: R, toasts: D, expanded: _, removeToast: x, defaultRichColors: M, closeButton: F, style: Q, cancelButtonStyle: tt, actionButtonStyle: Me, className: ee = "", descriptionClassName: Pe = "", duration: fe, position: Be, gap: ae, loadingIcon: te, expandByDefault: Ie, classNames: E, icons: q, closeButtonAriaLabel: nt = "Close toast", pauseWhenPageIsHidden: k } = e, [N, C] = p.useState(null), [j, pe] = p.useState(null), [P, rt] = p.useState(!1), [xe, De] = p.useState(!1), [Ee, ot] = p.useState(!1), [_t, jn] = p.useState(!1), [Hn, Lt] = p.useState(!1), [Un, st] = p.useState(0), [qn, Ct] = p.useState(0), Se = p.useRef(l.duration || fe || ln), Mt = p.useRef(null), ie = p.useRef(null), zn = R === 0, $n = R + 1 <= S, $ = l.type, he = l.dismissible !== !1, Wn = l.className || "", Jn = l.descriptionClassName || "", Fe = p.useMemo(() => T.findIndex((b) => b.toastId === l.id) || 0, [T, l.id]), Vn = p.useMemo(() => {
|
|
2482
|
-
var b;
|
|
2483
|
-
return (b = l.closeButton) != null ? b : F;
|
|
2484
|
-
}, [l.closeButton, F]), Pt = p.useMemo(() => l.duration || fe || ln, [l.duration, fe]), at = p.useRef(0), me = p.useRef(0), Bt = p.useRef(0), ge = p.useRef(null), [Kn, Yn] = Be.split("-"), It = p.useMemo(() => T.reduce((b, O, L) => L >= Fe ? b : b + O.height, 0), [T, Fe]), Dt = vs(), Xn = l.invert || y, it = $ === "loading";
|
|
2485
|
-
me.current = p.useMemo(() => Fe * ae + It, [Fe, It]), p.useEffect(() => {
|
|
2486
|
-
Se.current = Pt;
|
|
2487
|
-
}, [Pt]), p.useEffect(() => {
|
|
2488
|
-
rt(!0);
|
|
2489
|
-
}, []), p.useEffect(() => {
|
|
2490
|
-
let b = ie.current;
|
|
2491
|
-
if (b) {
|
|
2492
|
-
let O = b.getBoundingClientRect().height;
|
|
2493
|
-
return Ct(O), m((L) => [{ toastId: l.id, height: O, position: l.position }, ...L]), () => m((L) => L.filter((V) => V.toastId !== l.id));
|
|
2494
|
-
}
|
|
2495
|
-
}, [m, l.id]), p.useLayoutEffect(() => {
|
|
2496
|
-
if (!P) return;
|
|
2497
|
-
let b = ie.current, O = b.style.height;
|
|
2498
|
-
b.style.height = "auto";
|
|
2499
|
-
let L = b.getBoundingClientRect().height;
|
|
2500
|
-
b.style.height = O, Ct(L), m((V) => V.find((K) => K.toastId === l.id) ? V.map((K) => K.toastId === l.id ? { ...K, height: L } : K) : [{ toastId: l.id, height: L, position: l.position }, ...V]);
|
|
2501
|
-
}, [P, l.title, l.description, m, l.id]);
|
|
2502
|
-
let ne = p.useCallback(() => {
|
|
2503
|
-
De(!0), st(me.current), m((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
|
|
2504
|
-
x(l);
|
|
2505
|
-
}, Bs);
|
|
2506
|
-
}, [l, x, m, me]);
|
|
2507
|
-
p.useEffect(() => {
|
|
2508
|
-
if (l.promise && $ === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
2509
|
-
let b;
|
|
2510
|
-
return _ || g || k && Dt ? (() => {
|
|
2511
|
-
if (Bt.current < at.current) {
|
|
2512
|
-
let O = (/* @__PURE__ */ new Date()).getTime() - at.current;
|
|
2513
|
-
Se.current = Se.current - O;
|
|
2514
|
-
}
|
|
2515
|
-
Bt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
2516
|
-
})() : Se.current !== 1 / 0 && (at.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
|
|
2517
|
-
var O;
|
|
2518
|
-
(O = l.onAutoClose) == null || O.call(l, l), ne();
|
|
2519
|
-
}, Se.current)), () => clearTimeout(b);
|
|
2520
|
-
}, [_, g, l, $, k, Dt, ne]), p.useEffect(() => {
|
|
2521
|
-
l.delete && ne();
|
|
2522
|
-
}, [ne, l.delete]);
|
|
2523
|
-
function Gn() {
|
|
2524
|
-
var b, O, L;
|
|
2525
|
-
return q != null && q.loading ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": $ === "loading" }, q.loading) : te ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": $ === "loading" }, te) : p.createElement(hs, { className: X(E == null ? void 0 : E.loader, (L = l == null ? void 0 : l.classNames) == null ? void 0 : L.loader), visible: $ === "loading" });
|
|
2526
|
-
}
|
|
2527
|
-
return p.createElement("li", { tabIndex: 0, ref: ie, className: X(ee, Wn, E == null ? void 0 : E.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[$], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[$]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : M, "data-styled": !(l.jsx || l.unstyled || w), "data-mounted": P, "data-promise": !!l.promise, "data-swiped": Hn, "data-removed": xe, "data-visible": $n, "data-y-position": Kn, "data-x-position": Yn, "data-index": R, "data-front": zn, "data-swiping": Ee, "data-dismissible": he, "data-type": $, "data-invert": Xn, "data-swipe-out": _t, "data-swipe-direction": j, "data-expanded": !!(_ || Ie && P), style: { "--index": R, "--toasts-before": R, "--z-index": D.length - R, "--offset": `${xe ? Un : me.current}px`, "--initial-height": Ie ? "auto" : `${qn}px`, ...Q, ...l.style }, onDragEnd: () => {
|
|
2528
|
-
ot(!1), C(null), ge.current = null;
|
|
2529
|
-
}, onPointerDown: (b) => {
|
|
2530
|
-
it || !he || (Mt.current = /* @__PURE__ */ new Date(), st(me.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (ot(!0), ge.current = { x: b.clientX, y: b.clientY }));
|
|
2531
|
-
}, onPointerUp: () => {
|
|
2532
|
-
var b, O, L, V;
|
|
2533
|
-
if (_t || !he) return;
|
|
2534
|
-
ge.current = null;
|
|
2535
|
-
let K = Number(((b = ie.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), re = Number(((O = ie.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), le = (/* @__PURE__ */ new Date()).getTime() - ((L = Mt.current) == null ? void 0 : L.getTime()), Y = N === "x" ? K : re, oe = Math.abs(Y) / le;
|
|
2536
|
-
if (Math.abs(Y) >= Ps || oe > 0.11) {
|
|
2537
|
-
st(me.current), (V = l.onDismiss) == null || V.call(l, l), pe(N === "x" ? K > 0 ? "right" : "left" : re > 0 ? "down" : "up"), ne(), jn(!0), Lt(!1);
|
|
2538
|
-
return;
|
|
2539
|
-
}
|
|
2540
|
-
ot(!1), C(null);
|
|
2541
|
-
}, onPointerMove: (b) => {
|
|
2542
|
-
var O, L, V, K;
|
|
2543
|
-
if (!ge.current || !he || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
|
|
2544
|
-
let re = b.clientY - ge.current.y, le = b.clientX - ge.current.x, Y = (L = e.swipeDirections) != null ? L : Is(Be);
|
|
2545
|
-
!N && (Math.abs(le) > 1 || Math.abs(re) > 1) && C(Math.abs(le) > Math.abs(re) ? "x" : "y");
|
|
2546
|
-
let oe = { x: 0, y: 0 };
|
|
2547
|
-
N === "y" ? (Y.includes("top") || Y.includes("bottom")) && (Y.includes("top") && re < 0 || Y.includes("bottom") && re > 0) && (oe.y = re) : N === "x" && (Y.includes("left") || Y.includes("right")) && (Y.includes("left") && le < 0 || Y.includes("right") && le > 0) && (oe.x = le), (Math.abs(oe.x) > 0 || Math.abs(oe.y) > 0) && Lt(!0), (V = ie.current) == null || V.style.setProperty("--swipe-amount-x", `${oe.x}px`), (K = ie.current) == null || K.style.setProperty("--swipe-amount-y", `${oe.y}px`);
|
|
2548
|
-
} }, Vn && !l.jsx ? p.createElement("button", { "aria-label": nt, "data-disabled": it, "data-close-button": !0, onClick: it || !he ? () => {
|
|
2549
|
-
} : () => {
|
|
2550
|
-
var b;
|
|
2551
|
-
ne(), (b = l.onDismiss) == null || b.call(l, l);
|
|
2552
|
-
}, className: X(E == null ? void 0 : E.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (s = q == null ? void 0 : q.close) != null ? s : bs) : null, l.jsx || lt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : p.createElement(p.Fragment, null, $ || l.icon || l.promise ? p.createElement("div", { "data-icon": "", className: X(E == null ? void 0 : E.icon, (a = l == null ? void 0 : l.classNames) == null ? void 0 : a.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || Gn() : null, l.type !== "loading" ? l.icon || (q == null ? void 0 : q[$]) || fs($) : null) : null, p.createElement("div", { "data-content": "", className: X(E == null ? void 0 : E.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, p.createElement("div", { "data-title": "", className: X(E == null ? void 0 : E.title, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? p.createElement("div", { "data-description": "", className: X(Pe, Jn, E == null ? void 0 : E.description, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.description) }, typeof l.description == "function" ? l.description() : l.description) : null), lt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || tt, onClick: (b) => {
|
|
2553
|
-
var O, L;
|
|
2554
|
-
ze(l.cancel) && he && ((L = (O = l.cancel).onClick) == null || L.call(O, b), ne());
|
|
2555
|
-
}, className: X(E == null ? void 0 : E.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, lt(l.action) ? l.action : l.action && ze(l.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Me, onClick: (b) => {
|
|
2556
|
-
var O, L;
|
|
2557
|
-
ze(l.action) && ((L = (O = l.action).onClick) == null || L.call(O, b), !b.defaultPrevented && ne());
|
|
2558
|
-
}, className: X(E == null ? void 0 : E.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
|
|
2559
|
-
};
|
|
2560
|
-
function cn() {
|
|
2561
|
-
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
2562
|
-
let e = document.documentElement.getAttribute("dir");
|
|
2563
|
-
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
2564
|
-
}
|
|
2565
|
-
function Fs(e, t) {
|
|
2566
|
-
let n = {};
|
|
2567
|
-
return [e, t].forEach((r, o) => {
|
|
2568
|
-
let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? Ls : _s;
|
|
2569
|
-
function d(u) {
|
|
2570
|
-
["top", "right", "bottom", "left"].forEach((f) => {
|
|
2571
|
-
n[`${a}-${f}`] = typeof u == "number" ? `${u}px` : u;
|
|
2572
|
-
});
|
|
2573
|
-
}
|
|
2574
|
-
typeof r == "number" || typeof r == "string" ? d(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
|
|
2575
|
-
r[u] === void 0 ? n[`${a}-${u}`] = i : n[`${a}-${u}`] = typeof r[u] == "number" ? `${r[u]}px` : r[u];
|
|
2576
|
-
}) : d(i);
|
|
2577
|
-
}), n;
|
|
2578
|
-
}
|
|
2579
|
-
er(function(e, t) {
|
|
2580
|
-
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: d, mobileOffset: u, theme: f = "light", richColors: h, duration: y, style: l, visibleToasts: w = Ns, toastOptions: g, dir: m = cn(), gap: S = Ms, loadingIcon: T, icons: R, containerAriaLabel: D = "Notifications", pauseWhenPageIsHidden: _ } = e, [x, M] = p.useState([]), F = p.useMemo(() => Array.from(new Set([r].concat(x.filter((k) => k.position).map((k) => k.position)))), [x, r]), [Q, tt] = p.useState([]), [Me, ee] = p.useState(!1), [Pe, fe] = p.useState(!1), [Be, ae] = p.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), te = p.useRef(null), Ie = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = p.useRef(null), q = p.useRef(!1), nt = p.useCallback((k) => {
|
|
2581
|
-
M((N) => {
|
|
2582
|
-
var C;
|
|
2583
|
-
return (C = N.find((j) => j.id === k.id)) != null && C.delete || H.dismiss(k.id), N.filter(({ id: j }) => j !== k.id);
|
|
2584
|
-
});
|
|
2585
|
-
}, []);
|
|
2586
|
-
return p.useEffect(() => H.subscribe((k) => {
|
|
2587
|
-
if (k.dismiss) {
|
|
2588
|
-
M((N) => N.map((C) => C.id === k.id ? { ...C, delete: !0 } : C));
|
|
2589
|
-
return;
|
|
2590
|
-
}
|
|
2591
|
-
setTimeout(() => {
|
|
2592
|
-
tr.flushSync(() => {
|
|
2593
|
-
M((N) => {
|
|
2594
|
-
let C = N.findIndex((j) => j.id === k.id);
|
|
2595
|
-
return C !== -1 ? [...N.slice(0, C), { ...N[C], ...k }, ...N.slice(C + 1)] : [k, ...N];
|
|
2596
|
-
});
|
|
2597
|
-
});
|
|
2598
|
-
});
|
|
2599
|
-
}), []), p.useEffect(() => {
|
|
2600
|
-
if (f !== "system") {
|
|
2601
|
-
ae(f);
|
|
2602
|
-
return;
|
|
2603
|
-
}
|
|
2604
|
-
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? ae("dark") : ae("light")), typeof window > "u") return;
|
|
2605
|
-
let k = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2606
|
-
try {
|
|
2607
|
-
k.addEventListener("change", ({ matches: N }) => {
|
|
2608
|
-
ae(N ? "dark" : "light");
|
|
2609
|
-
});
|
|
2610
|
-
} catch {
|
|
2611
|
-
k.addListener(({ matches: C }) => {
|
|
2612
|
-
try {
|
|
2613
|
-
ae(C ? "dark" : "light");
|
|
2614
|
-
} catch (j) {
|
|
2615
|
-
console.error(j);
|
|
2616
|
-
}
|
|
2617
|
-
});
|
|
2618
|
-
}
|
|
2619
|
-
}, [f]), p.useEffect(() => {
|
|
2620
|
-
x.length <= 1 && ee(!1);
|
|
2621
|
-
}, [x]), p.useEffect(() => {
|
|
2622
|
-
let k = (N) => {
|
|
2623
|
-
var C, j;
|
|
2624
|
-
o.every((pe) => N[pe] || N.code === pe) && (ee(!0), (C = te.current) == null || C.focus()), N.code === "Escape" && (document.activeElement === te.current || (j = te.current) != null && j.contains(document.activeElement)) && ee(!1);
|
|
2625
|
-
};
|
|
2626
|
-
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
2627
|
-
}, [o]), p.useEffect(() => {
|
|
2628
|
-
if (te.current) return () => {
|
|
2629
|
-
E.current && (E.current.focus({ preventScroll: !0 }), E.current = null, q.current = !1);
|
|
2630
|
-
};
|
|
2631
|
-
}, [te.current]), p.createElement("section", { ref: t, "aria-label": `${D} ${Ie}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, F.map((k, N) => {
|
|
2632
|
-
var C;
|
|
2633
|
-
let [j, pe] = k.split("-");
|
|
2634
|
-
return x.length ? p.createElement("ol", { key: k, dir: m === "auto" ? cn() : m, tabIndex: -1, ref: te, className: i, "data-sonner-toaster": !0, "data-theme": Be, "data-y-position": j, "data-lifted": Me && x.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((C = Q[0]) == null ? void 0 : C.height) || 0}px`, "--width": `${Cs}px`, "--gap": `${S}px`, ...l, ...Fs(d, u) }, onBlur: (P) => {
|
|
2635
|
-
q.current && !P.currentTarget.contains(P.relatedTarget) && (q.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
|
|
2636
|
-
}, onFocus: (P) => {
|
|
2637
|
-
P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || q.current || (q.current = !0, E.current = P.relatedTarget);
|
|
2638
|
-
}, onMouseEnter: () => ee(!0), onMouseMove: () => ee(!0), onMouseLeave: () => {
|
|
2639
|
-
Pe || ee(!1);
|
|
2640
|
-
}, onDragEnd: () => ee(!1), onPointerDown: (P) => {
|
|
2641
|
-
P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || fe(!0);
|
|
2642
|
-
}, onPointerUp: () => fe(!1) }, x.filter((P) => !P.position && N === 0 || P.position === k).map((P, rt) => {
|
|
2643
|
-
var xe, De;
|
|
2644
|
-
return p.createElement(Ds, { key: P.id, icons: R, index: rt, toast: P, defaultRichColors: h, duration: (xe = g == null ? void 0 : g.duration) != null ? xe : y, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: w, closeButton: (De = g == null ? void 0 : g.closeButton) != null ? De : a, interacting: Pe, position: k, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: nt, toasts: x.filter((Ee) => Ee.position == P.position), heights: Q.filter((Ee) => Ee.position == P.position), setHeights: tt, expandByDefault: s, gap: S, loadingIcon: T, expanded: Me, pauseWhenPageIsHidden: _, swipeDirections: e.swipeDirections });
|
|
2645
|
-
})) : null;
|
|
2646
|
-
}));
|
|
2647
|
-
});
|
|
2648
|
-
function ya() {
|
|
2649
|
-
return { toast: async ({
|
|
2650
|
-
id: t,
|
|
2651
|
-
title: n,
|
|
2652
|
-
description: r,
|
|
2653
|
-
action: o = {
|
|
2654
|
-
label: "",
|
|
2655
|
-
onClick: () => {
|
|
2656
|
-
}
|
|
2657
|
-
},
|
|
2658
|
-
...s
|
|
2659
|
-
}) => {
|
|
2660
|
-
const a = { description: r };
|
|
2661
|
-
o.label && (a.action = { label: o.label, onClick: o.onClick }), As(n, a);
|
|
2662
|
-
} };
|
|
2663
|
-
}
|
|
2664
3181
|
export {
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
3182
|
+
Ys as GetDevice,
|
|
3183
|
+
X as Vdevice,
|
|
3184
|
+
Wa as defineAxios,
|
|
3185
|
+
ra as defineLogger,
|
|
3186
|
+
Ga as defineStore,
|
|
3187
|
+
Ja as useAxios,
|
|
3188
|
+
ro as useBoolean,
|
|
3189
|
+
oa as useClickAnyWhere,
|
|
3190
|
+
sa as useCopyToClipboard,
|
|
3191
|
+
aa as useCountdown,
|
|
3192
|
+
oo as useCounter,
|
|
3193
|
+
ia as useDarkMode,
|
|
3194
|
+
_t as useDebounceCallback,
|
|
3195
|
+
la as useDebounceValue,
|
|
3196
|
+
ca as useDocumentTitle,
|
|
3197
|
+
ua as useEffect,
|
|
3198
|
+
Ye as useEventCallback,
|
|
3199
|
+
Y as useEventListener,
|
|
3200
|
+
da as useHover,
|
|
3201
|
+
fa as useIntersectionObserver,
|
|
3202
|
+
so as useInterval,
|
|
3203
|
+
ha as useIsClient,
|
|
3204
|
+
co as useIsFirstRender,
|
|
3205
|
+
uo as useIsMounted,
|
|
3206
|
+
ne as useIsomorphicLayoutEffect,
|
|
3207
|
+
gn as useLocalStorage,
|
|
3208
|
+
U as useLogger,
|
|
3209
|
+
pa as useMap,
|
|
3210
|
+
Va as useMarkdown,
|
|
3211
|
+
wn as useMediaQuery,
|
|
3212
|
+
ma as useOnClickOutside,
|
|
3213
|
+
ga as useReadLocalStorage,
|
|
3214
|
+
wa as useResizeObserver,
|
|
3215
|
+
ya as useScreen,
|
|
3216
|
+
ba as useScript,
|
|
3217
|
+
va as useScrollLock,
|
|
3218
|
+
Ka as useScrollTo,
|
|
3219
|
+
Sa as useSessionStorage,
|
|
3220
|
+
Ya as useShortcut,
|
|
3221
|
+
Ea as useStep,
|
|
3222
|
+
ea as useStore,
|
|
3223
|
+
xa as useTernaryDarkMode,
|
|
3224
|
+
Ta as useTimeout,
|
|
3225
|
+
Dr as useToast,
|
|
3226
|
+
Ra as useToggle,
|
|
3227
|
+
yn as useUnmount,
|
|
3228
|
+
Oa as useWindowSize
|
|
2685
3229
|
};
|