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