@sg-front-core/layout-v1 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-layout.js +3288 -0
- package/dist/core-layout.js.map +1 -0
- package/dist/core-layout.umd.cjs +4 -0
- package/dist/core-layout.umd.cjs.map +1 -0
- package/dist/types.d.ts +63 -0
- package/package.json +59 -0
|
@@ -0,0 +1,3288 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.sg-layout .modern-top-menu{position:relative;display:flex;align-items:center;min-width:0;flex:1;--sg-topmenu-btn-size: 32px;--sg-topmenu-btn-offset: 10px;--sg-topmenu-btn-gap: 12px;--sg-topmenu-safe-inline: calc( var(--sg-topmenu-btn-size) + var(--sg-topmenu-btn-offset) + var(--sg-topmenu-btn-gap) )}.sg-layout .modern-top-menu:before,.sg-layout .modern-top-menu:after{content:"";position:absolute;top:0;bottom:0;width:28px;pointer-events:none;opacity:0;transition:opacity .2s ease;z-index:2}.sg-layout .modern-top-menu.is-scroll-left:before{left:0;opacity:1;background:linear-gradient(to right,var(--sg-layout-header-bg, rgba(248, 250, 252, .98)),rgba(248,250,252,0))}.sg-layout .modern-top-menu.is-scroll-right:after{right:0;opacity:1;background:linear-gradient(to left,var(--sg-layout-header-bg, rgba(248, 250, 252, .98)),rgba(248,250,252,0))}.sg-layout .modern-top-menu__btn.ant-btn{position:absolute;top:50%;transform:translateY(-50%);width:var(--sg-topmenu-btn-size);height:var(--sg-topmenu-btn-size);padding:0;border-radius:999px;background:#ffffffe6;border:1px solid rgba(226,232,240,1);box-shadow:0 8px 20px #0f172a14;display:none;align-items:center;justify-content:center;z-index:3}.sg-layout .modern-top-menu__btn--left.ant-btn{left:var(--sg-topmenu-btn-offset)!important}.sg-layout .modern-top-menu__btn--right.ant-btn{right:var(--sg-topmenu-btn-offset)!important}.sg-layout .modern-top-menu.is-scroll-left .modern-top-menu__btn--left.ant-btn,.sg-layout .modern-top-menu.is-scroll-right .modern-top-menu__btn--right.ant-btn{display:inline-flex}.sg-layout .modern-ul{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;overflow-x:auto;overflow-y:hidden;white-space:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0 6px 0 0!important;margin:0;list-style:none;scroll-snap-type:x proximity;gap:2px;writing-mode:horizontal-tb!important;text-orientation:mixed}.sg-layout .modern-ul::-webkit-scrollbar{display:none}.sg-layout .modern-ul li{display:flex!important;align-items:center;justify-content:center;position:relative;flex:0 0 auto!important;flex-shrink:0!important;width:auto!important;min-width:max-content;white-space:nowrap!important;word-break:keep-all!important;scroll-snap-align:start;border-radius:10px;min-height:56px;padding:0 16px;writing-mode:horizontal-tb!important;text-orientation:mixed}.sg-layout .modern-top-menu__item{cursor:pointer;position:relative;font-weight:700;font-size:14px;color:#0f172ae6;transition:all .2s ease}.sg-layout .modern-top-menu__item-text{display:inline-block;white-space:nowrap!important;max-width:140px;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(15,23,42,.08);position:relative;z-index:1;writing-mode:horizontal-tb!important;text-orientation:mixed}.sg-layout .modern-top-menu.is-scroll-left .modern-ul{padding-left:var(--sg-topmenu-safe-inline)!important}.sg-layout .modern-top-menu.is-scroll-right .modern-ul{padding-right:var(--sg-topmenu-safe-inline)!important}.sg-layout .modern-ul li:after{position:absolute;content:"";top:0;left:0;width:100%;height:3px;background:var(--sg-theme-primary, #6366f1);transform:scale(0);transform-origin:right;transition:transform .5s;z-index:0;pointer-events:none}.sg-layout .modern-ul li:hover{background:#14141408;border-radius:0!important}.sg-layout .modern-ul .menu-checked:hover{background:var(--sg-theme-primary, #6366f1)}.sg-layout .modern-ul li:hover:after{transform:scale(1);transform-origin:left}.sg-layout .modern-ul .menu-checked{background:var(--sg-theme-primary, #6366f1);border-radius:0!important}.sg-layout .modern-ul .menu-checked span{color:#fff}.sg-layout .modern-ul .menu-checked .modern-top-menu__item-text{text-shadow:none}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { jsx as d, jsxs as V, Fragment as xt } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip as Te, Menu as zt, Button as be, Spin as qe, Dropdown as qt, Avatar as pn, Modal as hn, Space as Et, Tabs as mn } from "antd";
|
|
4
|
+
import { Iconfont as wt, PopConfirm as vn, ErrorBoundary as Bt, useEvent as Ne, TAB_EVENTS as je } from "@sg-front-core/ui-v1";
|
|
5
|
+
import { FolderOutlined as yn, TagOutlined as gn, LeftOutlined as bn, RightOutlined as xn } from "@ant-design/icons";
|
|
6
|
+
import S, { useRef as Y, useMemo as ue, useEffect as te, useState as se, useContext as En, createContext as wn, Fragment as ke } from "react";
|
|
7
|
+
import { useNavigate as ye, useLocation as Pe, Link as st, useMatches as Tn, Outlet as kn } from "react-router-dom";
|
|
8
|
+
import _e from "react-dom";
|
|
9
|
+
import { useAlert as Cn } from "sggkui";
|
|
10
|
+
function Ht(e) {
|
|
11
|
+
var n, r, t = "";
|
|
12
|
+
if (typeof e == "string" || typeof e == "number") t += e;
|
|
13
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
14
|
+
var o = e.length;
|
|
15
|
+
for (n = 0; n < o; n++) e[n] && (r = Ht(e[n])) && (t && (t += " "), t += r);
|
|
16
|
+
} else for (r in e) e[r] && (t && (t += " "), t += r);
|
|
17
|
+
return t;
|
|
18
|
+
}
|
|
19
|
+
function ve() {
|
|
20
|
+
for (var e, n, r = 0, t = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (n = Ht(e)) && (t && (t += " "), t += n);
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
function Vt(e) {
|
|
24
|
+
const {
|
|
25
|
+
status: n,
|
|
26
|
+
setStatus: r,
|
|
27
|
+
closeIcon: t = "drawer-close",
|
|
28
|
+
openIcon: o = "drawer-open",
|
|
29
|
+
color: i = "rgba(0,0,0,.25)"
|
|
30
|
+
} = e, a = ve(
|
|
31
|
+
"fixed top-1/2 -translate-y-1/2 z-40",
|
|
32
|
+
"origin-center",
|
|
33
|
+
"cursor-pointer",
|
|
34
|
+
"opacity-30",
|
|
35
|
+
"hover:opacity-100",
|
|
36
|
+
"transition-all",
|
|
37
|
+
"duration-300"
|
|
38
|
+
);
|
|
39
|
+
return /* @__PURE__ */ d("div", { children: n ? /* @__PURE__ */ d(Te, { title: "收起侧边栏", placement: "right", children: /* @__PURE__ */ d(
|
|
40
|
+
wt,
|
|
41
|
+
{
|
|
42
|
+
icon: t,
|
|
43
|
+
className: `${a} left-[248px]`,
|
|
44
|
+
size: 30,
|
|
45
|
+
color: i,
|
|
46
|
+
onClick: () => r(!n)
|
|
47
|
+
}
|
|
48
|
+
) }) : /* @__PURE__ */ d(Te, { title: "展开侧边栏", placement: "right", children: /* @__PURE__ */ d(
|
|
49
|
+
wt,
|
|
50
|
+
{
|
|
51
|
+
icon: o,
|
|
52
|
+
className: `${a} left-0`,
|
|
53
|
+
size: 30,
|
|
54
|
+
color: i,
|
|
55
|
+
onClick: () => r(!n)
|
|
56
|
+
}
|
|
57
|
+
) }) });
|
|
58
|
+
}
|
|
59
|
+
const Q = {};
|
|
60
|
+
function Ao(e) {
|
|
61
|
+
Q.useSystemStore = e.useSystemStore, Q.local = e.local, Q.request = e.request, Q.projectCName = e.projectCName, Q.isLegacyLayoutStyle = e.isLegacyLayoutStyle;
|
|
62
|
+
}
|
|
63
|
+
function ce() {
|
|
64
|
+
if (!Q.useSystemStore)
|
|
65
|
+
throw new Error(
|
|
66
|
+
"[@sg-front-core/layout-v1] missing setup: call setupSgTemplateLayout({ useSystemStore, local, request, ... }) before rendering layouts."
|
|
67
|
+
);
|
|
68
|
+
return Q.useSystemStore();
|
|
69
|
+
}
|
|
70
|
+
function ut() {
|
|
71
|
+
if (!Q.local)
|
|
72
|
+
throw new Error(
|
|
73
|
+
"[@sg-front-core/layout-v1] missing setup: call setupSgTemplateLayout({ local, ... })."
|
|
74
|
+
);
|
|
75
|
+
return Q.local;
|
|
76
|
+
}
|
|
77
|
+
function Ut() {
|
|
78
|
+
if (!Q.request)
|
|
79
|
+
throw new Error(
|
|
80
|
+
"[@sg-front-core/layout-v1] missing setup: call setupSgTemplateLayout({ request, ... })."
|
|
81
|
+
);
|
|
82
|
+
return Q.request;
|
|
83
|
+
}
|
|
84
|
+
function Yt() {
|
|
85
|
+
return Q.projectCName ?? "";
|
|
86
|
+
}
|
|
87
|
+
function Sn(e) {
|
|
88
|
+
return Q.isLegacyLayoutStyle ? Q.isLegacyLayoutStyle(e) : e === 0 || e === "legacy" || e === !1;
|
|
89
|
+
}
|
|
90
|
+
const On = (e) => e.filter((r) => r.path != null).map((r) => r.handle?.hidden ? null : r.children && r.children.length > 0 ? {
|
|
91
|
+
label: r.handle.title,
|
|
92
|
+
key: r.path,
|
|
93
|
+
icon: /* @__PURE__ */ d(yn, {}),
|
|
94
|
+
hidden: r.handle?.hidden || !1,
|
|
95
|
+
children: On(r.children)
|
|
96
|
+
} : {
|
|
97
|
+
label: r.handle?.title || r.path,
|
|
98
|
+
key: r.path,
|
|
99
|
+
hidden: r.handle?.hidden || !1,
|
|
100
|
+
link: r.handle?.link || null,
|
|
101
|
+
frame: r.handle?.isFrame,
|
|
102
|
+
processId: r.handle?.processId,
|
|
103
|
+
query: r.handle?.query,
|
|
104
|
+
icon: /* @__PURE__ */ d(gn, {})
|
|
105
|
+
});
|
|
106
|
+
function Mo(e) {
|
|
107
|
+
return [
|
|
108
|
+
{
|
|
109
|
+
key: "home",
|
|
110
|
+
label: "首页",
|
|
111
|
+
children: e,
|
|
112
|
+
closable: !1
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
var Pn = function(e) {
|
|
117
|
+
return function(n, r) {
|
|
118
|
+
var t = Y(!1);
|
|
119
|
+
e(function() {
|
|
120
|
+
return function() {
|
|
121
|
+
t.current = !1;
|
|
122
|
+
};
|
|
123
|
+
}, []), e(function() {
|
|
124
|
+
if (!t.current)
|
|
125
|
+
t.current = !0;
|
|
126
|
+
else
|
|
127
|
+
return n();
|
|
128
|
+
}, r);
|
|
129
|
+
};
|
|
130
|
+
}, re = function() {
|
|
131
|
+
return re = Object.assign || function(n) {
|
|
132
|
+
for (var r, t = 1, o = arguments.length; t < o; t++) {
|
|
133
|
+
r = arguments[t];
|
|
134
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
135
|
+
}
|
|
136
|
+
return n;
|
|
137
|
+
}, re.apply(this, arguments);
|
|
138
|
+
};
|
|
139
|
+
function Kt(e, n) {
|
|
140
|
+
var r = {};
|
|
141
|
+
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (r[t] = e[t]);
|
|
142
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
143
|
+
for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
|
|
144
|
+
n.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
|
|
145
|
+
return r;
|
|
146
|
+
}
|
|
147
|
+
function Ln(e, n, r, t) {
|
|
148
|
+
function o(i) {
|
|
149
|
+
return i instanceof r ? i : new r(function(a) {
|
|
150
|
+
a(i);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
return new (r || (r = Promise))(function(i, a) {
|
|
154
|
+
function s(f) {
|
|
155
|
+
try {
|
|
156
|
+
c(t.next(f));
|
|
157
|
+
} catch (u) {
|
|
158
|
+
a(u);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function l(f) {
|
|
162
|
+
try {
|
|
163
|
+
c(t.throw(f));
|
|
164
|
+
} catch (u) {
|
|
165
|
+
a(u);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function c(f) {
|
|
169
|
+
f.done ? i(f.value) : o(f.value).then(s, l);
|
|
170
|
+
}
|
|
171
|
+
c((t = t.apply(e, n || [])).next());
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function Rn(e, n) {
|
|
175
|
+
var r = { label: 0, sent: function() {
|
|
176
|
+
if (i[0] & 1) throw i[1];
|
|
177
|
+
return i[1];
|
|
178
|
+
}, trys: [], ops: [] }, t, o, i, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
179
|
+
return a.next = s(0), a.throw = s(1), a.return = s(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
180
|
+
return this;
|
|
181
|
+
}), a;
|
|
182
|
+
function s(c) {
|
|
183
|
+
return function(f) {
|
|
184
|
+
return l([c, f]);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function l(c) {
|
|
188
|
+
if (t) throw new TypeError("Generator is already executing.");
|
|
189
|
+
for (; a && (a = 0, c[0] && (r = 0)), r; ) try {
|
|
190
|
+
if (t = 1, o && (i = c[0] & 2 ? o.return : c[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, c[1])).done) return i;
|
|
191
|
+
switch (o = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
|
|
192
|
+
case 0:
|
|
193
|
+
case 1:
|
|
194
|
+
i = c;
|
|
195
|
+
break;
|
|
196
|
+
case 4:
|
|
197
|
+
return r.label++, { value: c[1], done: !1 };
|
|
198
|
+
case 5:
|
|
199
|
+
r.label++, o = c[1], c = [0];
|
|
200
|
+
continue;
|
|
201
|
+
case 7:
|
|
202
|
+
c = r.ops.pop(), r.trys.pop();
|
|
203
|
+
continue;
|
|
204
|
+
default:
|
|
205
|
+
if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
206
|
+
r = 0;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
|
|
210
|
+
r.label = c[1];
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
if (c[0] === 6 && r.label < i[1]) {
|
|
214
|
+
r.label = i[1], i = c;
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
if (i && r.label < i[2]) {
|
|
218
|
+
r.label = i[2], r.ops.push(c);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
i[2] && r.ops.pop(), r.trys.pop();
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
c = n.call(e, r);
|
|
225
|
+
} catch (f) {
|
|
226
|
+
c = [6, f], o = 0;
|
|
227
|
+
} finally {
|
|
228
|
+
t = i = 0;
|
|
229
|
+
}
|
|
230
|
+
if (c[0] & 5) throw c[1];
|
|
231
|
+
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
function X(e, n) {
|
|
235
|
+
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
236
|
+
if (!r) return e;
|
|
237
|
+
var t = r.call(e), o, i = [], a;
|
|
238
|
+
try {
|
|
239
|
+
for (; (n === void 0 || n-- > 0) && !(o = t.next()).done; ) i.push(o.value);
|
|
240
|
+
} catch (s) {
|
|
241
|
+
a = { error: s };
|
|
242
|
+
} finally {
|
|
243
|
+
try {
|
|
244
|
+
o && !o.done && (r = t.return) && r.call(t);
|
|
245
|
+
} finally {
|
|
246
|
+
if (a) throw a.error;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return i;
|
|
250
|
+
}
|
|
251
|
+
function Z(e, n, r) {
|
|
252
|
+
if (r || arguments.length === 2) for (var t = 0, o = n.length, i; t < o; t++)
|
|
253
|
+
(i || !(t in n)) && (i || (i = Array.prototype.slice.call(n, 0, t)), i[t] = n[t]);
|
|
254
|
+
return e.concat(i || Array.prototype.slice.call(n));
|
|
255
|
+
}
|
|
256
|
+
var Ye = function(e) {
|
|
257
|
+
return typeof e == "function";
|
|
258
|
+
}, Ke = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test", pe = function(e) {
|
|
259
|
+
Ke && (Ye(e) || console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));
|
|
260
|
+
var n = Y(e);
|
|
261
|
+
n.current = ue(function() {
|
|
262
|
+
return e;
|
|
263
|
+
}, [e]);
|
|
264
|
+
var r = Y(void 0);
|
|
265
|
+
return r.current || (r.current = function() {
|
|
266
|
+
for (var t = [], o = 0; o < arguments.length; o++)
|
|
267
|
+
t[o] = arguments[o];
|
|
268
|
+
return n.current.apply(this, t);
|
|
269
|
+
}), r.current;
|
|
270
|
+
};
|
|
271
|
+
const ct = Pn(te);
|
|
272
|
+
var Gt = function(e, n) {
|
|
273
|
+
var r = n.manual, t = n.ready, o = t === void 0 ? !0 : t, i = n.defaultParams, a = i === void 0 ? [] : i, s = n.refreshDeps, l = s === void 0 ? [] : s, c = n.refreshDepsAction, f = Y(!1);
|
|
274
|
+
return f.current = !1, ct(function() {
|
|
275
|
+
!r && o && (f.current = !0, e.run.apply(e, Z([], X(a), !1)));
|
|
276
|
+
}, [o]), ct(function() {
|
|
277
|
+
f.current || r || (f.current = !0, c ? c() : e.refresh());
|
|
278
|
+
}, Z([], X(l), !1)), {
|
|
279
|
+
onBefore: function() {
|
|
280
|
+
if (!o)
|
|
281
|
+
return {
|
|
282
|
+
stopNow: !0
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
Gt.onInit = function(e) {
|
|
288
|
+
var n = e.ready, r = n === void 0 ? !0 : n, t = e.manual;
|
|
289
|
+
return {
|
|
290
|
+
loading: !t && r
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
function Nn(e, n) {
|
|
294
|
+
if (e === n)
|
|
295
|
+
return !0;
|
|
296
|
+
for (var r = 0; r < e.length; r++)
|
|
297
|
+
if (!Object.is(e[r], n[r]))
|
|
298
|
+
return !1;
|
|
299
|
+
return !0;
|
|
300
|
+
}
|
|
301
|
+
var Xt = function(e, n) {
|
|
302
|
+
var r = Y({
|
|
303
|
+
deps: n,
|
|
304
|
+
obj: void 0,
|
|
305
|
+
initialized: !1
|
|
306
|
+
}).current;
|
|
307
|
+
return (r.initialized === !1 || !Nn(r.deps, n)) && (r.deps = n, r.obj = e(), r.initialized = !0), r.obj;
|
|
308
|
+
};
|
|
309
|
+
function Zt(e) {
|
|
310
|
+
var n = Y(e);
|
|
311
|
+
return n.current = e, n;
|
|
312
|
+
}
|
|
313
|
+
var ft = function(e) {
|
|
314
|
+
Ke && (Ye(e) || console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));
|
|
315
|
+
var n = Zt(e);
|
|
316
|
+
te(function() {
|
|
317
|
+
return function() {
|
|
318
|
+
n.current();
|
|
319
|
+
};
|
|
320
|
+
}, []);
|
|
321
|
+
}, Ie = /* @__PURE__ */ new Map(), jn = function(e, n, r) {
|
|
322
|
+
var t = Ie.get(e);
|
|
323
|
+
t?.timer && clearTimeout(t.timer);
|
|
324
|
+
var o = void 0;
|
|
325
|
+
n > -1 && (o = setTimeout(function() {
|
|
326
|
+
Ie.delete(e);
|
|
327
|
+
}, n)), Ie.set(e, re(re({}, r), { timer: o }));
|
|
328
|
+
}, _n = function(e) {
|
|
329
|
+
return Ie.get(e);
|
|
330
|
+
}, De = /* @__PURE__ */ new Map(), An = function(e) {
|
|
331
|
+
return De.get(e);
|
|
332
|
+
}, Mn = function(e, n) {
|
|
333
|
+
De.set(e, n), n.then(function(r) {
|
|
334
|
+
return De.delete(e), r;
|
|
335
|
+
}).catch(function() {
|
|
336
|
+
De.delete(e);
|
|
337
|
+
});
|
|
338
|
+
}, me = {}, Wn = function(e, n) {
|
|
339
|
+
me[e] && me[e].forEach(function(r) {
|
|
340
|
+
return r(n);
|
|
341
|
+
});
|
|
342
|
+
}, Ze = function(e, n) {
|
|
343
|
+
return me[e] || (me[e] = []), me[e].push(n), function() {
|
|
344
|
+
var t = me[e].indexOf(n);
|
|
345
|
+
me[e].splice(t, 1);
|
|
346
|
+
};
|
|
347
|
+
}, $n = function(e, n) {
|
|
348
|
+
var r = n.cacheKey, t = n.cacheTime, o = t === void 0 ? 300 * 1e3 : t, i = n.staleTime, a = i === void 0 ? 0 : i, s = n.setCache, l = n.getCache, c = Y(void 0), f = Y(void 0), u = function(h, b) {
|
|
349
|
+
s ? s(b) : jn(h, o, b), Wn(h, b.data);
|
|
350
|
+
}, v = function(h, b) {
|
|
351
|
+
return b === void 0 && (b = []), l ? l(b) : _n(h);
|
|
352
|
+
};
|
|
353
|
+
return Xt(function() {
|
|
354
|
+
if (r) {
|
|
355
|
+
var h = v(r);
|
|
356
|
+
h && Object.hasOwnProperty.call(h, "data") && (e.state.data = h.data, e.state.params = h.params, (a === -1 || Date.now() - h.time <= a) && (e.state.loading = !1)), c.current = Ze(r, function(b) {
|
|
357
|
+
e.setState({ data: b });
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}, []), ft(function() {
|
|
361
|
+
var h;
|
|
362
|
+
(h = c.current) === null || h === void 0 || h.call(c);
|
|
363
|
+
}), r ? {
|
|
364
|
+
onBefore: function(h) {
|
|
365
|
+
var b = v(r, h);
|
|
366
|
+
return !b || !Object.hasOwnProperty.call(b, "data") ? {} : a === -1 || Date.now() - b.time <= a ? {
|
|
367
|
+
loading: !1,
|
|
368
|
+
data: b?.data,
|
|
369
|
+
error: void 0,
|
|
370
|
+
returnNow: !0
|
|
371
|
+
} : {
|
|
372
|
+
data: b?.data,
|
|
373
|
+
error: void 0
|
|
374
|
+
};
|
|
375
|
+
},
|
|
376
|
+
onRequest: function(h, b) {
|
|
377
|
+
var E = An(r);
|
|
378
|
+
return E && E !== f.current ? { servicePromise: E } : (E = h.apply(void 0, Z([], X(b), !1)), f.current = E, Mn(r, E), { servicePromise: E });
|
|
379
|
+
},
|
|
380
|
+
onSuccess: function(h, b) {
|
|
381
|
+
var E;
|
|
382
|
+
r && ((E = c.current) === null || E === void 0 || E.call(c), u(r, {
|
|
383
|
+
data: h,
|
|
384
|
+
params: b,
|
|
385
|
+
time: Date.now()
|
|
386
|
+
}), c.current = Ze(r, function(P) {
|
|
387
|
+
e.setState({ data: P });
|
|
388
|
+
}));
|
|
389
|
+
},
|
|
390
|
+
onMutate: function(h) {
|
|
391
|
+
var b;
|
|
392
|
+
r && ((b = c.current) === null || b === void 0 || b.call(c), u(r, {
|
|
393
|
+
data: h,
|
|
394
|
+
params: e.state.params,
|
|
395
|
+
time: Date.now()
|
|
396
|
+
}), c.current = Ze(r, function(E) {
|
|
397
|
+
e.setState({ data: E });
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
} : {};
|
|
401
|
+
};
|
|
402
|
+
function Ce(e) {
|
|
403
|
+
var n = typeof e;
|
|
404
|
+
return e != null && (n == "object" || n == "function");
|
|
405
|
+
}
|
|
406
|
+
var In = typeof global == "object" && global && global.Object === Object && global, Dn = typeof self == "object" && self && self.Object === Object && self, Jt = In || Dn || Function("return this")(), Je = function() {
|
|
407
|
+
return Jt.Date.now();
|
|
408
|
+
}, Fn = /\s/;
|
|
409
|
+
function zn(e) {
|
|
410
|
+
for (var n = e.length; n-- && Fn.test(e.charAt(n)); )
|
|
411
|
+
;
|
|
412
|
+
return n;
|
|
413
|
+
}
|
|
414
|
+
var qn = /^\s+/;
|
|
415
|
+
function Bn(e) {
|
|
416
|
+
return e && e.slice(0, zn(e) + 1).replace(qn, "");
|
|
417
|
+
}
|
|
418
|
+
var Be = Jt.Symbol, Qt = Object.prototype, Hn = Qt.hasOwnProperty, Vn = Qt.toString, Ee = Be ? Be.toStringTag : void 0;
|
|
419
|
+
function Un(e) {
|
|
420
|
+
var n = Hn.call(e, Ee), r = e[Ee];
|
|
421
|
+
try {
|
|
422
|
+
e[Ee] = void 0;
|
|
423
|
+
var t = !0;
|
|
424
|
+
} catch {
|
|
425
|
+
}
|
|
426
|
+
var o = Vn.call(e);
|
|
427
|
+
return t && (n ? e[Ee] = r : delete e[Ee]), o;
|
|
428
|
+
}
|
|
429
|
+
var Yn = Object.prototype, Kn = Yn.toString;
|
|
430
|
+
function Gn(e) {
|
|
431
|
+
return Kn.call(e);
|
|
432
|
+
}
|
|
433
|
+
var Xn = "[object Null]", Zn = "[object Undefined]", Tt = Be ? Be.toStringTag : void 0;
|
|
434
|
+
function en(e) {
|
|
435
|
+
return e == null ? e === void 0 ? Zn : Xn : Tt && Tt in Object(e) ? Un(e) : Gn(e);
|
|
436
|
+
}
|
|
437
|
+
function Jn(e) {
|
|
438
|
+
return e != null && typeof e == "object";
|
|
439
|
+
}
|
|
440
|
+
var Qn = "[object Symbol]";
|
|
441
|
+
function er(e) {
|
|
442
|
+
return typeof e == "symbol" || Jn(e) && en(e) == Qn;
|
|
443
|
+
}
|
|
444
|
+
var kt = NaN, tr = /^[-+]0x[0-9a-f]+$/i, nr = /^0b[01]+$/i, rr = /^0o[0-7]+$/i, or = parseInt;
|
|
445
|
+
function Ct(e) {
|
|
446
|
+
if (typeof e == "number")
|
|
447
|
+
return e;
|
|
448
|
+
if (er(e))
|
|
449
|
+
return kt;
|
|
450
|
+
if (Ce(e)) {
|
|
451
|
+
var n = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
452
|
+
e = Ce(n) ? n + "" : n;
|
|
453
|
+
}
|
|
454
|
+
if (typeof e != "string")
|
|
455
|
+
return e === 0 ? e : +e;
|
|
456
|
+
e = Bn(e);
|
|
457
|
+
var r = nr.test(e);
|
|
458
|
+
return r || rr.test(e) ? or(e.slice(2), r ? 2 : 8) : tr.test(e) ? kt : +e;
|
|
459
|
+
}
|
|
460
|
+
var ir = "Expected a function", ar = Math.max, sr = Math.min;
|
|
461
|
+
function tn(e, n, r) {
|
|
462
|
+
var t, o, i, a, s, l, c = 0, f = !1, u = !1, v = !0;
|
|
463
|
+
if (typeof e != "function")
|
|
464
|
+
throw new TypeError(ir);
|
|
465
|
+
n = Ct(n) || 0, Ce(r) && (f = !!r.leading, u = "maxWait" in r, i = u ? ar(Ct(r.maxWait) || 0, n) : i, v = "trailing" in r ? !!r.trailing : v);
|
|
466
|
+
function h(j) {
|
|
467
|
+
var k = t, y = o;
|
|
468
|
+
return t = o = void 0, c = j, a = e.apply(y, k), a;
|
|
469
|
+
}
|
|
470
|
+
function b(j) {
|
|
471
|
+
return c = j, s = setTimeout(w, n), f ? h(j) : a;
|
|
472
|
+
}
|
|
473
|
+
function E(j) {
|
|
474
|
+
var k = j - l, y = j - c, T = n - k;
|
|
475
|
+
return u ? sr(T, i - y) : T;
|
|
476
|
+
}
|
|
477
|
+
function P(j) {
|
|
478
|
+
var k = j - l, y = j - c;
|
|
479
|
+
return l === void 0 || k >= n || k < 0 || u && y >= i;
|
|
480
|
+
}
|
|
481
|
+
function w() {
|
|
482
|
+
var j = Je();
|
|
483
|
+
if (P(j))
|
|
484
|
+
return B(j);
|
|
485
|
+
s = setTimeout(w, E(j));
|
|
486
|
+
}
|
|
487
|
+
function B(j) {
|
|
488
|
+
return s = void 0, v && t ? h(j) : (t = o = void 0, a);
|
|
489
|
+
}
|
|
490
|
+
function L() {
|
|
491
|
+
s !== void 0 && clearTimeout(s), c = 0, t = l = o = s = void 0;
|
|
492
|
+
}
|
|
493
|
+
function N() {
|
|
494
|
+
return s === void 0 ? a : B(Je());
|
|
495
|
+
}
|
|
496
|
+
function m() {
|
|
497
|
+
var j = Je(), k = P(j);
|
|
498
|
+
if (t = arguments, o = this, l = j, k) {
|
|
499
|
+
if (s === void 0)
|
|
500
|
+
return b(l);
|
|
501
|
+
if (u)
|
|
502
|
+
return clearTimeout(s), s = setTimeout(w, n), h(l);
|
|
503
|
+
}
|
|
504
|
+
return s === void 0 && (s = setTimeout(w, n)), a;
|
|
505
|
+
}
|
|
506
|
+
return m.cancel = L, m.flush = N, m;
|
|
507
|
+
}
|
|
508
|
+
var cr = function(e, n) {
|
|
509
|
+
var r = n.debounceWait, t = n.debounceLeading, o = n.debounceTrailing, i = n.debounceMaxWait, a = Y(void 0), s = ue(function() {
|
|
510
|
+
var l = {};
|
|
511
|
+
return t !== void 0 && (l.leading = t), o !== void 0 && (l.trailing = o), i !== void 0 && (l.maxWait = i), l;
|
|
512
|
+
}, [t, o, i]);
|
|
513
|
+
return te(function() {
|
|
514
|
+
if (r) {
|
|
515
|
+
var l = e.runAsync.bind(e);
|
|
516
|
+
return a.current = tn(function(c) {
|
|
517
|
+
c();
|
|
518
|
+
}, r, s), e.runAsync = function() {
|
|
519
|
+
for (var c = [], f = 0; f < arguments.length; f++)
|
|
520
|
+
c[f] = arguments[f];
|
|
521
|
+
return new Promise(function(u, v) {
|
|
522
|
+
var h;
|
|
523
|
+
(h = a.current) === null || h === void 0 || h.call(a, function() {
|
|
524
|
+
l.apply(void 0, Z([], X(c), !1)).then(u).catch(v);
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
}, function() {
|
|
528
|
+
var c;
|
|
529
|
+
(c = a.current) === null || c === void 0 || c.cancel(), e.runAsync = l;
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
}, [r, s]), r ? {
|
|
533
|
+
onCancel: function() {
|
|
534
|
+
var l;
|
|
535
|
+
(l = a.current) === null || l === void 0 || l.cancel();
|
|
536
|
+
}
|
|
537
|
+
} : {};
|
|
538
|
+
}, lr = function(e, n) {
|
|
539
|
+
var r = n.loadingDelay, t = n.ready, o = Y(void 0);
|
|
540
|
+
if (!r)
|
|
541
|
+
return {};
|
|
542
|
+
var i = function() {
|
|
543
|
+
o.current && clearTimeout(o.current);
|
|
544
|
+
};
|
|
545
|
+
return {
|
|
546
|
+
onBefore: function() {
|
|
547
|
+
return i(), t !== !1 && (o.current = setTimeout(function() {
|
|
548
|
+
e.setState({
|
|
549
|
+
loading: !0
|
|
550
|
+
});
|
|
551
|
+
}, r)), {
|
|
552
|
+
loading: !1
|
|
553
|
+
};
|
|
554
|
+
},
|
|
555
|
+
onFinally: function() {
|
|
556
|
+
i();
|
|
557
|
+
},
|
|
558
|
+
onCancel: function() {
|
|
559
|
+
i();
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
}, Ge = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
563
|
+
function dt() {
|
|
564
|
+
return Ge ? document.visibilityState !== "hidden" : !0;
|
|
565
|
+
}
|
|
566
|
+
var Fe = /* @__PURE__ */ new Set();
|
|
567
|
+
function ur(e) {
|
|
568
|
+
return Fe.add(e), function() {
|
|
569
|
+
Fe.has(e) && Fe.delete(e);
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
if (Ge) {
|
|
573
|
+
var fr = function() {
|
|
574
|
+
dt() && Fe.forEach(function(e) {
|
|
575
|
+
return e();
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
window.addEventListener("visibilitychange", fr, !1);
|
|
579
|
+
}
|
|
580
|
+
var dr = function(e, n) {
|
|
581
|
+
var r = n.pollingInterval, t = n.pollingWhenHidden, o = t === void 0 ? !0 : t, i = n.pollingErrorRetryCount, a = i === void 0 ? -1 : i, s = Y(void 0), l = Y(void 0), c = Y(0), f = function() {
|
|
582
|
+
var u;
|
|
583
|
+
s.current && clearTimeout(s.current), (u = l.current) === null || u === void 0 || u.call(l);
|
|
584
|
+
};
|
|
585
|
+
return ct(function() {
|
|
586
|
+
r || f();
|
|
587
|
+
}, [r]), r ? {
|
|
588
|
+
onBefore: function() {
|
|
589
|
+
f();
|
|
590
|
+
},
|
|
591
|
+
onError: function() {
|
|
592
|
+
c.current += 1;
|
|
593
|
+
},
|
|
594
|
+
onSuccess: function() {
|
|
595
|
+
c.current = 0;
|
|
596
|
+
},
|
|
597
|
+
onFinally: function() {
|
|
598
|
+
a === -1 || // When an error occurs, the request is not repeated after pollingErrorRetryCount retries
|
|
599
|
+
a !== -1 && c.current <= a ? s.current = setTimeout(function() {
|
|
600
|
+
!o && !dt() ? l.current = ur(function() {
|
|
601
|
+
e.refresh();
|
|
602
|
+
}) : e.refresh();
|
|
603
|
+
}, r) : c.current = 0;
|
|
604
|
+
},
|
|
605
|
+
onCancel: function() {
|
|
606
|
+
f();
|
|
607
|
+
}
|
|
608
|
+
} : {};
|
|
609
|
+
};
|
|
610
|
+
function pr(e, n) {
|
|
611
|
+
var r = !1;
|
|
612
|
+
return function() {
|
|
613
|
+
for (var t = [], o = 0; o < arguments.length; o++)
|
|
614
|
+
t[o] = arguments[o];
|
|
615
|
+
r || (r = !0, e.apply(void 0, Z([], X(t), !1)), setTimeout(function() {
|
|
616
|
+
r = !1;
|
|
617
|
+
}, n));
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
var hr = function() {
|
|
621
|
+
return Ge && typeof navigator.onLine < "u" ? navigator.onLine : !0;
|
|
622
|
+
}, ze = /* @__PURE__ */ new Set();
|
|
623
|
+
function mr(e) {
|
|
624
|
+
return ze.add(e), function() {
|
|
625
|
+
ze.has(e) && ze.delete(e);
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
if (Ge) {
|
|
629
|
+
var St = function() {
|
|
630
|
+
!dt() || !hr() || ze.forEach(function(e) {
|
|
631
|
+
return e();
|
|
632
|
+
});
|
|
633
|
+
};
|
|
634
|
+
window.addEventListener("visibilitychange", St, !1), window.addEventListener("focus", St, !1);
|
|
635
|
+
}
|
|
636
|
+
var vr = function(e, n) {
|
|
637
|
+
var r = n.refreshOnWindowFocus, t = n.focusTimespan, o = t === void 0 ? 5e3 : t, i = Y(void 0), a = function() {
|
|
638
|
+
var s;
|
|
639
|
+
(s = i.current) === null || s === void 0 || s.call(i);
|
|
640
|
+
};
|
|
641
|
+
return te(function() {
|
|
642
|
+
if (r) {
|
|
643
|
+
var s = pr(e.refresh.bind(e), o);
|
|
644
|
+
i.current = mr(function() {
|
|
645
|
+
s();
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
return function() {
|
|
649
|
+
a();
|
|
650
|
+
};
|
|
651
|
+
}, [r, o]), ft(function() {
|
|
652
|
+
a();
|
|
653
|
+
}), {};
|
|
654
|
+
}, yr = function(e, n) {
|
|
655
|
+
var r = n.retryInterval, t = n.retryCount, o = Y(void 0), i = Y(0), a = Y(!1);
|
|
656
|
+
return t ? {
|
|
657
|
+
onBefore: function() {
|
|
658
|
+
a.current || (i.current = 0), a.current = !1, o.current && clearTimeout(o.current);
|
|
659
|
+
},
|
|
660
|
+
onSuccess: function() {
|
|
661
|
+
i.current = 0;
|
|
662
|
+
},
|
|
663
|
+
onError: function() {
|
|
664
|
+
if (i.current += 1, t === -1 || i.current <= t) {
|
|
665
|
+
var s = r ?? Math.min(1e3 * Math.pow(2, i.current), 3e4);
|
|
666
|
+
o.current = setTimeout(function() {
|
|
667
|
+
a.current = !0, e.refresh();
|
|
668
|
+
}, s);
|
|
669
|
+
} else
|
|
670
|
+
i.current = 0;
|
|
671
|
+
},
|
|
672
|
+
onCancel: function() {
|
|
673
|
+
i.current = 0, o.current && clearTimeout(o.current);
|
|
674
|
+
}
|
|
675
|
+
} : {};
|
|
676
|
+
}, gr = "Expected a function";
|
|
677
|
+
function br(e, n, r) {
|
|
678
|
+
var t = !0, o = !0;
|
|
679
|
+
if (typeof e != "function")
|
|
680
|
+
throw new TypeError(gr);
|
|
681
|
+
return Ce(r) && (t = "leading" in r ? !!r.leading : t, o = "trailing" in r ? !!r.trailing : o), tn(e, n, {
|
|
682
|
+
leading: t,
|
|
683
|
+
maxWait: n,
|
|
684
|
+
trailing: o
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
var xr = function(e, n) {
|
|
688
|
+
var r = n.throttleWait, t = n.throttleLeading, o = n.throttleTrailing, i = Y(void 0), a = {};
|
|
689
|
+
return t !== void 0 && (a.leading = t), o !== void 0 && (a.trailing = o), te(function() {
|
|
690
|
+
if (r) {
|
|
691
|
+
var s = e.runAsync.bind(e);
|
|
692
|
+
return i.current = br(function(l) {
|
|
693
|
+
l();
|
|
694
|
+
}, r, a), e.runAsync = function() {
|
|
695
|
+
for (var l = [], c = 0; c < arguments.length; c++)
|
|
696
|
+
l[c] = arguments[c];
|
|
697
|
+
return new Promise(function(f, u) {
|
|
698
|
+
var v;
|
|
699
|
+
(v = i.current) === null || v === void 0 || v.call(i, function() {
|
|
700
|
+
s.apply(void 0, Z([], X(l), !1)).then(f).catch(u);
|
|
701
|
+
});
|
|
702
|
+
});
|
|
703
|
+
}, function() {
|
|
704
|
+
var l;
|
|
705
|
+
e.runAsync = s, (l = i.current) === null || l === void 0 || l.cancel();
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
}, [r, t, o]), r ? {
|
|
709
|
+
onCancel: function() {
|
|
710
|
+
var s;
|
|
711
|
+
(s = i.current) === null || s === void 0 || s.cancel();
|
|
712
|
+
}
|
|
713
|
+
} : {};
|
|
714
|
+
}, pt = function(e) {
|
|
715
|
+
Ke && (Ye(e) || console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof e, '".'))), te(function() {
|
|
716
|
+
var n = e?.();
|
|
717
|
+
if (!(n && typeof n == "object" && typeof n.then == "function"))
|
|
718
|
+
return n;
|
|
719
|
+
}, []);
|
|
720
|
+
}, Er = function() {
|
|
721
|
+
var e = X(se({}), 2), n = e[1];
|
|
722
|
+
return pe(function() {
|
|
723
|
+
return n({});
|
|
724
|
+
});
|
|
725
|
+
}, wr = (
|
|
726
|
+
/** @class */
|
|
727
|
+
(function() {
|
|
728
|
+
function e(n, r, t, o) {
|
|
729
|
+
o === void 0 && (o = {}), this.serviceRef = n, this.options = r, this.subscribe = t, this.initState = o, this.pluginImpls = [], this.count = 0, this.state = {
|
|
730
|
+
loading: !1,
|
|
731
|
+
params: void 0,
|
|
732
|
+
data: void 0,
|
|
733
|
+
error: void 0
|
|
734
|
+
}, this.state = re(re(re({}, this.state), { loading: !r.manual }), o);
|
|
735
|
+
}
|
|
736
|
+
return e.prototype.setState = function(n) {
|
|
737
|
+
n === void 0 && (n = {}), this.state = re(re({}, this.state), n), this.subscribe();
|
|
738
|
+
}, e.prototype.runPluginHandler = function(n) {
|
|
739
|
+
for (var r = [], t = 1; t < arguments.length; t++)
|
|
740
|
+
r[t - 1] = arguments[t];
|
|
741
|
+
var o = this.pluginImpls.map(function(i) {
|
|
742
|
+
var a;
|
|
743
|
+
return (a = i[n]) === null || a === void 0 ? void 0 : a.call.apply(a, Z([i], X(r), !1));
|
|
744
|
+
}).filter(Boolean);
|
|
745
|
+
return Object.assign.apply(Object, Z([{}], X(o), !1));
|
|
746
|
+
}, e.prototype.runAsync = function() {
|
|
747
|
+
for (var n = [], r = 0; r < arguments.length; r++)
|
|
748
|
+
n[r] = arguments[r];
|
|
749
|
+
return Ln(this, void 0, void 0, function() {
|
|
750
|
+
var t, o, i, a, s, l, c, f, u, v, h, b, E, P, w, B, L, N, m, j, k;
|
|
751
|
+
return Rn(this, function(y) {
|
|
752
|
+
switch (y.label) {
|
|
753
|
+
case 0:
|
|
754
|
+
if (this.count += 1, t = this.count, o = this.runPluginHandler("onBefore", n), i = o.stopNow, a = i === void 0 ? !1 : i, s = o.returnNow, l = s === void 0 ? !1 : s, c = Kt(o, ["stopNow", "returnNow"]), a)
|
|
755
|
+
return [2, Promise.resolve(c.data)];
|
|
756
|
+
if (this.setState(re({ loading: !0, params: n }, c)), l)
|
|
757
|
+
return [2, Promise.resolve(c.data)];
|
|
758
|
+
(E = (b = this.options).onBefore) === null || E === void 0 || E.call(b, n), y.label = 1;
|
|
759
|
+
case 1:
|
|
760
|
+
return y.trys.push([1, 3, , 4]), f = this.runPluginHandler("onRequest", this.serviceRef.current, n).servicePromise, f || (f = (h = this.serviceRef).current.apply(h, Z([], X(n), !1))), [4, f];
|
|
761
|
+
case 2:
|
|
762
|
+
return u = y.sent(), t !== this.count ? [2, new Promise(function() {
|
|
763
|
+
})] : (this.setState({
|
|
764
|
+
data: u,
|
|
765
|
+
error: void 0,
|
|
766
|
+
loading: !1
|
|
767
|
+
}), (w = (P = this.options).onSuccess) === null || w === void 0 || w.call(P, u, n), this.runPluginHandler("onSuccess", u, n), (L = (B = this.options).onFinally) === null || L === void 0 || L.call(B, n, u, void 0), t === this.count && this.runPluginHandler("onFinally", n, u, void 0), [2, u]);
|
|
768
|
+
case 3:
|
|
769
|
+
if (v = y.sent(), t !== this.count)
|
|
770
|
+
return [2, new Promise(function() {
|
|
771
|
+
})];
|
|
772
|
+
throw this.setState({
|
|
773
|
+
error: v,
|
|
774
|
+
loading: !1
|
|
775
|
+
}), (m = (N = this.options).onError) === null || m === void 0 || m.call(N, v, n), this.runPluginHandler("onError", v, n), (k = (j = this.options).onFinally) === null || k === void 0 || k.call(j, n, void 0, v), t === this.count && this.runPluginHandler("onFinally", n, void 0, v), v;
|
|
776
|
+
case 4:
|
|
777
|
+
return [
|
|
778
|
+
2
|
|
779
|
+
/*return*/
|
|
780
|
+
];
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
});
|
|
784
|
+
}, e.prototype.run = function() {
|
|
785
|
+
for (var n = this, r = [], t = 0; t < arguments.length; t++)
|
|
786
|
+
r[t] = arguments[t];
|
|
787
|
+
this.runAsync.apply(this, Z([], X(r), !1)).catch(function(o) {
|
|
788
|
+
n.options.onError || console.error(o);
|
|
789
|
+
});
|
|
790
|
+
}, e.prototype.cancel = function() {
|
|
791
|
+
this.count += 1, this.setState({
|
|
792
|
+
loading: !1
|
|
793
|
+
}), this.runPluginHandler("onCancel");
|
|
794
|
+
}, e.prototype.refresh = function() {
|
|
795
|
+
this.run.apply(this, Z([], X(this.state.params || []), !1));
|
|
796
|
+
}, e.prototype.refreshAsync = function() {
|
|
797
|
+
return this.runAsync.apply(this, Z([], X(this.state.params || []), !1));
|
|
798
|
+
}, e.prototype.mutate = function(n) {
|
|
799
|
+
var r = Ye(n) ? n(this.state.data) : n;
|
|
800
|
+
this.runPluginHandler("onMutate", r), this.setState({
|
|
801
|
+
data: r
|
|
802
|
+
});
|
|
803
|
+
}, e;
|
|
804
|
+
})()
|
|
805
|
+
);
|
|
806
|
+
function Tr(e, n, r) {
|
|
807
|
+
n === void 0 && (n = {}), r === void 0 && (r = []);
|
|
808
|
+
var t = n.manual, o = t === void 0 ? !1 : t, i = n.ready, a = i === void 0 ? !0 : i, s = Kt(n, ["manual", "ready"]);
|
|
809
|
+
Ke && n.defaultParams && !Array.isArray(n.defaultParams) && console.warn("expected defaultParams is array, got ".concat(typeof n.defaultParams));
|
|
810
|
+
var l = re({ manual: o, ready: a }, s), c = Zt(e), f = Er(), u = Xt(function() {
|
|
811
|
+
var v = r.map(function(h) {
|
|
812
|
+
var b;
|
|
813
|
+
return (b = h?.onInit) === null || b === void 0 ? void 0 : b.call(h, l);
|
|
814
|
+
}).filter(Boolean);
|
|
815
|
+
return new wr(c, l, f, Object.assign.apply(Object, Z([{}], X(v), !1)));
|
|
816
|
+
}, []);
|
|
817
|
+
return u.options = l, u.pluginImpls = r.map(function(v) {
|
|
818
|
+
return v(u, l);
|
|
819
|
+
}), pt(function() {
|
|
820
|
+
if (!o && a) {
|
|
821
|
+
var v = u.state.params || n.defaultParams || [];
|
|
822
|
+
u.run.apply(u, Z([], X(v), !1));
|
|
823
|
+
}
|
|
824
|
+
}), ft(function() {
|
|
825
|
+
u.cancel();
|
|
826
|
+
}), {
|
|
827
|
+
loading: u.state.loading,
|
|
828
|
+
data: u.state.data,
|
|
829
|
+
error: u.state.error,
|
|
830
|
+
params: u.state.params || [],
|
|
831
|
+
cancel: pe(u.cancel.bind(u)),
|
|
832
|
+
refresh: pe(u.refresh.bind(u)),
|
|
833
|
+
refreshAsync: pe(u.refreshAsync.bind(u)),
|
|
834
|
+
run: pe(u.run.bind(u)),
|
|
835
|
+
runAsync: pe(u.runAsync.bind(u)),
|
|
836
|
+
mutate: pe(u.mutate.bind(u))
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
function nn(e, n, r) {
|
|
840
|
+
return Tr(e, n, Z(Z([], X([]), !1), [
|
|
841
|
+
cr,
|
|
842
|
+
lr,
|
|
843
|
+
dr,
|
|
844
|
+
vr,
|
|
845
|
+
xr,
|
|
846
|
+
Gt,
|
|
847
|
+
$n,
|
|
848
|
+
yr
|
|
849
|
+
], !1));
|
|
850
|
+
}
|
|
851
|
+
function kr(e) {
|
|
852
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
853
|
+
}
|
|
854
|
+
function He() {
|
|
855
|
+
return He = Object.assign ? Object.assign.bind() : function(e) {
|
|
856
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
857
|
+
var r = arguments[n];
|
|
858
|
+
for (var t in r) ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
859
|
+
}
|
|
860
|
+
return e;
|
|
861
|
+
}, He.apply(null, arguments);
|
|
862
|
+
}
|
|
863
|
+
function rn(e, n) {
|
|
864
|
+
if (e == null) return {};
|
|
865
|
+
var r = {};
|
|
866
|
+
for (var t in e) if ({}.hasOwnProperty.call(e, t)) {
|
|
867
|
+
if (n.indexOf(t) !== -1) continue;
|
|
868
|
+
r[t] = e[t];
|
|
869
|
+
}
|
|
870
|
+
return r;
|
|
871
|
+
}
|
|
872
|
+
function lt(e, n) {
|
|
873
|
+
return lt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, t) {
|
|
874
|
+
return r.__proto__ = t, r;
|
|
875
|
+
}, lt(e, n);
|
|
876
|
+
}
|
|
877
|
+
function ht(e, n) {
|
|
878
|
+
e.prototype = Object.create(n.prototype), e.prototype.constructor = e, lt(e, n);
|
|
879
|
+
}
|
|
880
|
+
var Ae = { exports: {} }, Me = { exports: {} }, z = {};
|
|
881
|
+
var Ot;
|
|
882
|
+
function Cr() {
|
|
883
|
+
if (Ot) return z;
|
|
884
|
+
Ot = 1;
|
|
885
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, s = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, v = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, h = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, E = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, P = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, B = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
886
|
+
function L(m) {
|
|
887
|
+
if (typeof m == "object" && m !== null) {
|
|
888
|
+
var j = m.$$typeof;
|
|
889
|
+
switch (j) {
|
|
890
|
+
case n:
|
|
891
|
+
switch (m = m.type, m) {
|
|
892
|
+
case l:
|
|
893
|
+
case c:
|
|
894
|
+
case t:
|
|
895
|
+
case i:
|
|
896
|
+
case o:
|
|
897
|
+
case u:
|
|
898
|
+
return m;
|
|
899
|
+
default:
|
|
900
|
+
switch (m = m && m.$$typeof, m) {
|
|
901
|
+
case s:
|
|
902
|
+
case f:
|
|
903
|
+
case b:
|
|
904
|
+
case h:
|
|
905
|
+
case a:
|
|
906
|
+
return m;
|
|
907
|
+
default:
|
|
908
|
+
return j;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
case r:
|
|
912
|
+
return j;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
function N(m) {
|
|
917
|
+
return L(m) === c;
|
|
918
|
+
}
|
|
919
|
+
return z.AsyncMode = l, z.ConcurrentMode = c, z.ContextConsumer = s, z.ContextProvider = a, z.Element = n, z.ForwardRef = f, z.Fragment = t, z.Lazy = b, z.Memo = h, z.Portal = r, z.Profiler = i, z.StrictMode = o, z.Suspense = u, z.isAsyncMode = function(m) {
|
|
920
|
+
return N(m) || L(m) === l;
|
|
921
|
+
}, z.isConcurrentMode = N, z.isContextConsumer = function(m) {
|
|
922
|
+
return L(m) === s;
|
|
923
|
+
}, z.isContextProvider = function(m) {
|
|
924
|
+
return L(m) === a;
|
|
925
|
+
}, z.isElement = function(m) {
|
|
926
|
+
return typeof m == "object" && m !== null && m.$$typeof === n;
|
|
927
|
+
}, z.isForwardRef = function(m) {
|
|
928
|
+
return L(m) === f;
|
|
929
|
+
}, z.isFragment = function(m) {
|
|
930
|
+
return L(m) === t;
|
|
931
|
+
}, z.isLazy = function(m) {
|
|
932
|
+
return L(m) === b;
|
|
933
|
+
}, z.isMemo = function(m) {
|
|
934
|
+
return L(m) === h;
|
|
935
|
+
}, z.isPortal = function(m) {
|
|
936
|
+
return L(m) === r;
|
|
937
|
+
}, z.isProfiler = function(m) {
|
|
938
|
+
return L(m) === i;
|
|
939
|
+
}, z.isStrictMode = function(m) {
|
|
940
|
+
return L(m) === o;
|
|
941
|
+
}, z.isSuspense = function(m) {
|
|
942
|
+
return L(m) === u;
|
|
943
|
+
}, z.isValidElementType = function(m) {
|
|
944
|
+
return typeof m == "string" || typeof m == "function" || m === t || m === c || m === i || m === o || m === u || m === v || typeof m == "object" && m !== null && (m.$$typeof === b || m.$$typeof === h || m.$$typeof === a || m.$$typeof === s || m.$$typeof === f || m.$$typeof === P || m.$$typeof === w || m.$$typeof === B || m.$$typeof === E);
|
|
945
|
+
}, z.typeOf = L, z;
|
|
946
|
+
}
|
|
947
|
+
var q = {};
|
|
948
|
+
var Pt;
|
|
949
|
+
function Sr() {
|
|
950
|
+
return Pt || (Pt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
951
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, s = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, v = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, h = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, E = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, P = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, B = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
952
|
+
function L(g) {
|
|
953
|
+
return typeof g == "string" || typeof g == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
954
|
+
g === t || g === c || g === i || g === o || g === u || g === v || typeof g == "object" && g !== null && (g.$$typeof === b || g.$$typeof === h || g.$$typeof === a || g.$$typeof === s || g.$$typeof === f || g.$$typeof === P || g.$$typeof === w || g.$$typeof === B || g.$$typeof === E);
|
|
955
|
+
}
|
|
956
|
+
function N(g) {
|
|
957
|
+
if (typeof g == "object" && g !== null) {
|
|
958
|
+
var ie = g.$$typeof;
|
|
959
|
+
switch (ie) {
|
|
960
|
+
case n:
|
|
961
|
+
var Re = g.type;
|
|
962
|
+
switch (Re) {
|
|
963
|
+
case l:
|
|
964
|
+
case c:
|
|
965
|
+
case t:
|
|
966
|
+
case i:
|
|
967
|
+
case o:
|
|
968
|
+
case u:
|
|
969
|
+
return Re;
|
|
970
|
+
default:
|
|
971
|
+
var bt = Re && Re.$$typeof;
|
|
972
|
+
switch (bt) {
|
|
973
|
+
case s:
|
|
974
|
+
case f:
|
|
975
|
+
case b:
|
|
976
|
+
case h:
|
|
977
|
+
case a:
|
|
978
|
+
return bt;
|
|
979
|
+
default:
|
|
980
|
+
return ie;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
case r:
|
|
984
|
+
return ie;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
var m = l, j = c, k = s, y = a, T = n, O = f, _ = t, G = b, U = h, K = r, ne = i, oe = o, de = u, Le = !1;
|
|
989
|
+
function Xe(g) {
|
|
990
|
+
return Le || (Le = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), p(g) || N(g) === l;
|
|
991
|
+
}
|
|
992
|
+
function p(g) {
|
|
993
|
+
return N(g) === c;
|
|
994
|
+
}
|
|
995
|
+
function x(g) {
|
|
996
|
+
return N(g) === s;
|
|
997
|
+
}
|
|
998
|
+
function $(g) {
|
|
999
|
+
return N(g) === a;
|
|
1000
|
+
}
|
|
1001
|
+
function M(g) {
|
|
1002
|
+
return typeof g == "object" && g !== null && g.$$typeof === n;
|
|
1003
|
+
}
|
|
1004
|
+
function R(g) {
|
|
1005
|
+
return N(g) === f;
|
|
1006
|
+
}
|
|
1007
|
+
function I(g) {
|
|
1008
|
+
return N(g) === t;
|
|
1009
|
+
}
|
|
1010
|
+
function A(g) {
|
|
1011
|
+
return N(g) === b;
|
|
1012
|
+
}
|
|
1013
|
+
function W(g) {
|
|
1014
|
+
return N(g) === h;
|
|
1015
|
+
}
|
|
1016
|
+
function D(g) {
|
|
1017
|
+
return N(g) === r;
|
|
1018
|
+
}
|
|
1019
|
+
function H(g) {
|
|
1020
|
+
return N(g) === i;
|
|
1021
|
+
}
|
|
1022
|
+
function F(g) {
|
|
1023
|
+
return N(g) === o;
|
|
1024
|
+
}
|
|
1025
|
+
function J(g) {
|
|
1026
|
+
return N(g) === u;
|
|
1027
|
+
}
|
|
1028
|
+
q.AsyncMode = m, q.ConcurrentMode = j, q.ContextConsumer = k, q.ContextProvider = y, q.Element = T, q.ForwardRef = O, q.Fragment = _, q.Lazy = G, q.Memo = U, q.Portal = K, q.Profiler = ne, q.StrictMode = oe, q.Suspense = de, q.isAsyncMode = Xe, q.isConcurrentMode = p, q.isContextConsumer = x, q.isContextProvider = $, q.isElement = M, q.isForwardRef = R, q.isFragment = I, q.isLazy = A, q.isMemo = W, q.isPortal = D, q.isProfiler = H, q.isStrictMode = F, q.isSuspense = J, q.isValidElementType = L, q.typeOf = N;
|
|
1029
|
+
})()), q;
|
|
1030
|
+
}
|
|
1031
|
+
var Lt;
|
|
1032
|
+
function on() {
|
|
1033
|
+
return Lt || (Lt = 1, process.env.NODE_ENV === "production" ? Me.exports = Cr() : Me.exports = Sr()), Me.exports;
|
|
1034
|
+
}
|
|
1035
|
+
var Qe, Rt;
|
|
1036
|
+
function Or() {
|
|
1037
|
+
if (Rt) return Qe;
|
|
1038
|
+
Rt = 1;
|
|
1039
|
+
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
1040
|
+
function t(i) {
|
|
1041
|
+
if (i == null)
|
|
1042
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1043
|
+
return Object(i);
|
|
1044
|
+
}
|
|
1045
|
+
function o() {
|
|
1046
|
+
try {
|
|
1047
|
+
if (!Object.assign)
|
|
1048
|
+
return !1;
|
|
1049
|
+
var i = new String("abc");
|
|
1050
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
1051
|
+
return !1;
|
|
1052
|
+
for (var a = {}, s = 0; s < 10; s++)
|
|
1053
|
+
a["_" + String.fromCharCode(s)] = s;
|
|
1054
|
+
var l = Object.getOwnPropertyNames(a).map(function(f) {
|
|
1055
|
+
return a[f];
|
|
1056
|
+
});
|
|
1057
|
+
if (l.join("") !== "0123456789")
|
|
1058
|
+
return !1;
|
|
1059
|
+
var c = {};
|
|
1060
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
1061
|
+
c[f] = f;
|
|
1062
|
+
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
1063
|
+
} catch {
|
|
1064
|
+
return !1;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
return Qe = o() ? Object.assign : function(i, a) {
|
|
1068
|
+
for (var s, l = t(i), c, f = 1; f < arguments.length; f++) {
|
|
1069
|
+
s = Object(arguments[f]);
|
|
1070
|
+
for (var u in s)
|
|
1071
|
+
n.call(s, u) && (l[u] = s[u]);
|
|
1072
|
+
if (e) {
|
|
1073
|
+
c = e(s);
|
|
1074
|
+
for (var v = 0; v < c.length; v++)
|
|
1075
|
+
r.call(s, c[v]) && (l[c[v]] = s[c[v]]);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
return l;
|
|
1079
|
+
}, Qe;
|
|
1080
|
+
}
|
|
1081
|
+
var et, Nt;
|
|
1082
|
+
function mt() {
|
|
1083
|
+
if (Nt) return et;
|
|
1084
|
+
Nt = 1;
|
|
1085
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1086
|
+
return et = e, et;
|
|
1087
|
+
}
|
|
1088
|
+
var tt, jt;
|
|
1089
|
+
function an() {
|
|
1090
|
+
return jt || (jt = 1, tt = Function.call.bind(Object.prototype.hasOwnProperty)), tt;
|
|
1091
|
+
}
|
|
1092
|
+
var nt, _t;
|
|
1093
|
+
function Pr() {
|
|
1094
|
+
if (_t) return nt;
|
|
1095
|
+
_t = 1;
|
|
1096
|
+
var e = function() {
|
|
1097
|
+
};
|
|
1098
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1099
|
+
var n = /* @__PURE__ */ mt(), r = {}, t = /* @__PURE__ */ an();
|
|
1100
|
+
e = function(i) {
|
|
1101
|
+
var a = "Warning: " + i;
|
|
1102
|
+
typeof console < "u" && console.error(a);
|
|
1103
|
+
try {
|
|
1104
|
+
throw new Error(a);
|
|
1105
|
+
} catch {
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
function o(i, a, s, l, c) {
|
|
1110
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1111
|
+
for (var f in i)
|
|
1112
|
+
if (t(i, f)) {
|
|
1113
|
+
var u;
|
|
1114
|
+
try {
|
|
1115
|
+
if (typeof i[f] != "function") {
|
|
1116
|
+
var v = Error(
|
|
1117
|
+
(l || "React class") + ": " + s + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1118
|
+
);
|
|
1119
|
+
throw v.name = "Invariant Violation", v;
|
|
1120
|
+
}
|
|
1121
|
+
u = i[f](a, f, l, s, null, n);
|
|
1122
|
+
} catch (b) {
|
|
1123
|
+
u = b;
|
|
1124
|
+
}
|
|
1125
|
+
if (u && !(u instanceof Error) && e(
|
|
1126
|
+
(l || "React class") + ": type specification of " + s + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1127
|
+
), u instanceof Error && !(u.message in r)) {
|
|
1128
|
+
r[u.message] = !0;
|
|
1129
|
+
var h = c ? c() : "";
|
|
1130
|
+
e(
|
|
1131
|
+
"Failed " + s + " type: " + u.message + (h ?? "")
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
return o.resetWarningCache = function() {
|
|
1138
|
+
process.env.NODE_ENV !== "production" && (r = {});
|
|
1139
|
+
}, nt = o, nt;
|
|
1140
|
+
}
|
|
1141
|
+
var rt, At;
|
|
1142
|
+
function Lr() {
|
|
1143
|
+
if (At) return rt;
|
|
1144
|
+
At = 1;
|
|
1145
|
+
var e = on(), n = Or(), r = /* @__PURE__ */ mt(), t = /* @__PURE__ */ an(), o = /* @__PURE__ */ Pr(), i = function() {
|
|
1146
|
+
};
|
|
1147
|
+
process.env.NODE_ENV !== "production" && (i = function(s) {
|
|
1148
|
+
var l = "Warning: " + s;
|
|
1149
|
+
typeof console < "u" && console.error(l);
|
|
1150
|
+
try {
|
|
1151
|
+
throw new Error(l);
|
|
1152
|
+
} catch {
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
function a() {
|
|
1156
|
+
return null;
|
|
1157
|
+
}
|
|
1158
|
+
return rt = function(s, l) {
|
|
1159
|
+
var c = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
1160
|
+
function u(p) {
|
|
1161
|
+
var x = p && (c && p[c] || p[f]);
|
|
1162
|
+
if (typeof x == "function")
|
|
1163
|
+
return x;
|
|
1164
|
+
}
|
|
1165
|
+
var v = "<<anonymous>>", h = {
|
|
1166
|
+
array: w("array"),
|
|
1167
|
+
bigint: w("bigint"),
|
|
1168
|
+
bool: w("boolean"),
|
|
1169
|
+
func: w("function"),
|
|
1170
|
+
number: w("number"),
|
|
1171
|
+
object: w("object"),
|
|
1172
|
+
string: w("string"),
|
|
1173
|
+
symbol: w("symbol"),
|
|
1174
|
+
any: B(),
|
|
1175
|
+
arrayOf: L,
|
|
1176
|
+
element: N(),
|
|
1177
|
+
elementType: m(),
|
|
1178
|
+
instanceOf: j,
|
|
1179
|
+
node: O(),
|
|
1180
|
+
objectOf: y,
|
|
1181
|
+
oneOf: k,
|
|
1182
|
+
oneOfType: T,
|
|
1183
|
+
shape: G,
|
|
1184
|
+
exact: U
|
|
1185
|
+
};
|
|
1186
|
+
function b(p, x) {
|
|
1187
|
+
return p === x ? p !== 0 || 1 / p === 1 / x : p !== p && x !== x;
|
|
1188
|
+
}
|
|
1189
|
+
function E(p, x) {
|
|
1190
|
+
this.message = p, this.data = x && typeof x == "object" ? x : {}, this.stack = "";
|
|
1191
|
+
}
|
|
1192
|
+
E.prototype = Error.prototype;
|
|
1193
|
+
function P(p) {
|
|
1194
|
+
if (process.env.NODE_ENV !== "production")
|
|
1195
|
+
var x = {}, $ = 0;
|
|
1196
|
+
function M(I, A, W, D, H, F, J) {
|
|
1197
|
+
if (D = D || v, F = F || W, J !== r) {
|
|
1198
|
+
if (l) {
|
|
1199
|
+
var g = new Error(
|
|
1200
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1201
|
+
);
|
|
1202
|
+
throw g.name = "Invariant Violation", g;
|
|
1203
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1204
|
+
var ie = D + ":" + W;
|
|
1205
|
+
!x[ie] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1206
|
+
$ < 3 && (i(
|
|
1207
|
+
"You are manually calling a React.PropTypes validation function for the `" + F + "` prop on `" + D + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1208
|
+
), x[ie] = !0, $++);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
return A[W] == null ? I ? A[W] === null ? new E("The " + H + " `" + F + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new E("The " + H + " `" + F + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : p(A, W, D, H, F);
|
|
1212
|
+
}
|
|
1213
|
+
var R = M.bind(null, !1);
|
|
1214
|
+
return R.isRequired = M.bind(null, !0), R;
|
|
1215
|
+
}
|
|
1216
|
+
function w(p) {
|
|
1217
|
+
function x($, M, R, I, A, W) {
|
|
1218
|
+
var D = $[M], H = oe(D);
|
|
1219
|
+
if (H !== p) {
|
|
1220
|
+
var F = de(D);
|
|
1221
|
+
return new E(
|
|
1222
|
+
"Invalid " + I + " `" + A + "` of type " + ("`" + F + "` supplied to `" + R + "`, expected ") + ("`" + p + "`."),
|
|
1223
|
+
{ expectedType: p }
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
return null;
|
|
1227
|
+
}
|
|
1228
|
+
return P(x);
|
|
1229
|
+
}
|
|
1230
|
+
function B() {
|
|
1231
|
+
return P(a);
|
|
1232
|
+
}
|
|
1233
|
+
function L(p) {
|
|
1234
|
+
function x($, M, R, I, A) {
|
|
1235
|
+
if (typeof p != "function")
|
|
1236
|
+
return new E("Property `" + A + "` of component `" + R + "` has invalid PropType notation inside arrayOf.");
|
|
1237
|
+
var W = $[M];
|
|
1238
|
+
if (!Array.isArray(W)) {
|
|
1239
|
+
var D = oe(W);
|
|
1240
|
+
return new E("Invalid " + I + " `" + A + "` of type " + ("`" + D + "` supplied to `" + R + "`, expected an array."));
|
|
1241
|
+
}
|
|
1242
|
+
for (var H = 0; H < W.length; H++) {
|
|
1243
|
+
var F = p(W, H, R, I, A + "[" + H + "]", r);
|
|
1244
|
+
if (F instanceof Error)
|
|
1245
|
+
return F;
|
|
1246
|
+
}
|
|
1247
|
+
return null;
|
|
1248
|
+
}
|
|
1249
|
+
return P(x);
|
|
1250
|
+
}
|
|
1251
|
+
function N() {
|
|
1252
|
+
function p(x, $, M, R, I) {
|
|
1253
|
+
var A = x[$];
|
|
1254
|
+
if (!s(A)) {
|
|
1255
|
+
var W = oe(A);
|
|
1256
|
+
return new E("Invalid " + R + " `" + I + "` of type " + ("`" + W + "` supplied to `" + M + "`, expected a single ReactElement."));
|
|
1257
|
+
}
|
|
1258
|
+
return null;
|
|
1259
|
+
}
|
|
1260
|
+
return P(p);
|
|
1261
|
+
}
|
|
1262
|
+
function m() {
|
|
1263
|
+
function p(x, $, M, R, I) {
|
|
1264
|
+
var A = x[$];
|
|
1265
|
+
if (!e.isValidElementType(A)) {
|
|
1266
|
+
var W = oe(A);
|
|
1267
|
+
return new E("Invalid " + R + " `" + I + "` of type " + ("`" + W + "` supplied to `" + M + "`, expected a single ReactElement type."));
|
|
1268
|
+
}
|
|
1269
|
+
return null;
|
|
1270
|
+
}
|
|
1271
|
+
return P(p);
|
|
1272
|
+
}
|
|
1273
|
+
function j(p) {
|
|
1274
|
+
function x($, M, R, I, A) {
|
|
1275
|
+
if (!($[M] instanceof p)) {
|
|
1276
|
+
var W = p.name || v, D = Xe($[M]);
|
|
1277
|
+
return new E("Invalid " + I + " `" + A + "` of type " + ("`" + D + "` supplied to `" + R + "`, expected ") + ("instance of `" + W + "`."));
|
|
1278
|
+
}
|
|
1279
|
+
return null;
|
|
1280
|
+
}
|
|
1281
|
+
return P(x);
|
|
1282
|
+
}
|
|
1283
|
+
function k(p) {
|
|
1284
|
+
if (!Array.isArray(p))
|
|
1285
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1286
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1287
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), a;
|
|
1288
|
+
function x($, M, R, I, A) {
|
|
1289
|
+
for (var W = $[M], D = 0; D < p.length; D++)
|
|
1290
|
+
if (b(W, p[D]))
|
|
1291
|
+
return null;
|
|
1292
|
+
var H = JSON.stringify(p, function(J, g) {
|
|
1293
|
+
var ie = de(g);
|
|
1294
|
+
return ie === "symbol" ? String(g) : g;
|
|
1295
|
+
});
|
|
1296
|
+
return new E("Invalid " + I + " `" + A + "` of value `" + String(W) + "` " + ("supplied to `" + R + "`, expected one of " + H + "."));
|
|
1297
|
+
}
|
|
1298
|
+
return P(x);
|
|
1299
|
+
}
|
|
1300
|
+
function y(p) {
|
|
1301
|
+
function x($, M, R, I, A) {
|
|
1302
|
+
if (typeof p != "function")
|
|
1303
|
+
return new E("Property `" + A + "` of component `" + R + "` has invalid PropType notation inside objectOf.");
|
|
1304
|
+
var W = $[M], D = oe(W);
|
|
1305
|
+
if (D !== "object")
|
|
1306
|
+
return new E("Invalid " + I + " `" + A + "` of type " + ("`" + D + "` supplied to `" + R + "`, expected an object."));
|
|
1307
|
+
for (var H in W)
|
|
1308
|
+
if (t(W, H)) {
|
|
1309
|
+
var F = p(W, H, R, I, A + "." + H, r);
|
|
1310
|
+
if (F instanceof Error)
|
|
1311
|
+
return F;
|
|
1312
|
+
}
|
|
1313
|
+
return null;
|
|
1314
|
+
}
|
|
1315
|
+
return P(x);
|
|
1316
|
+
}
|
|
1317
|
+
function T(p) {
|
|
1318
|
+
if (!Array.isArray(p))
|
|
1319
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), a;
|
|
1320
|
+
for (var x = 0; x < p.length; x++) {
|
|
1321
|
+
var $ = p[x];
|
|
1322
|
+
if (typeof $ != "function")
|
|
1323
|
+
return i(
|
|
1324
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Le($) + " at index " + x + "."
|
|
1325
|
+
), a;
|
|
1326
|
+
}
|
|
1327
|
+
function M(R, I, A, W, D) {
|
|
1328
|
+
for (var H = [], F = 0; F < p.length; F++) {
|
|
1329
|
+
var J = p[F], g = J(R, I, A, W, D, r);
|
|
1330
|
+
if (g == null)
|
|
1331
|
+
return null;
|
|
1332
|
+
g.data && t(g.data, "expectedType") && H.push(g.data.expectedType);
|
|
1333
|
+
}
|
|
1334
|
+
var ie = H.length > 0 ? ", expected one of type [" + H.join(", ") + "]" : "";
|
|
1335
|
+
return new E("Invalid " + W + " `" + D + "` supplied to " + ("`" + A + "`" + ie + "."));
|
|
1336
|
+
}
|
|
1337
|
+
return P(M);
|
|
1338
|
+
}
|
|
1339
|
+
function O() {
|
|
1340
|
+
function p(x, $, M, R, I) {
|
|
1341
|
+
return K(x[$]) ? null : new E("Invalid " + R + " `" + I + "` supplied to " + ("`" + M + "`, expected a ReactNode."));
|
|
1342
|
+
}
|
|
1343
|
+
return P(p);
|
|
1344
|
+
}
|
|
1345
|
+
function _(p, x, $, M, R) {
|
|
1346
|
+
return new E(
|
|
1347
|
+
(p || "React class") + ": " + x + " type `" + $ + "." + M + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + R + "`."
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
function G(p) {
|
|
1351
|
+
function x($, M, R, I, A) {
|
|
1352
|
+
var W = $[M], D = oe(W);
|
|
1353
|
+
if (D !== "object")
|
|
1354
|
+
return new E("Invalid " + I + " `" + A + "` of type `" + D + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1355
|
+
for (var H in p) {
|
|
1356
|
+
var F = p[H];
|
|
1357
|
+
if (typeof F != "function")
|
|
1358
|
+
return _(R, I, A, H, de(F));
|
|
1359
|
+
var J = F(W, H, R, I, A + "." + H, r);
|
|
1360
|
+
if (J)
|
|
1361
|
+
return J;
|
|
1362
|
+
}
|
|
1363
|
+
return null;
|
|
1364
|
+
}
|
|
1365
|
+
return P(x);
|
|
1366
|
+
}
|
|
1367
|
+
function U(p) {
|
|
1368
|
+
function x($, M, R, I, A) {
|
|
1369
|
+
var W = $[M], D = oe(W);
|
|
1370
|
+
if (D !== "object")
|
|
1371
|
+
return new E("Invalid " + I + " `" + A + "` of type `" + D + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1372
|
+
var H = n({}, $[M], p);
|
|
1373
|
+
for (var F in H) {
|
|
1374
|
+
var J = p[F];
|
|
1375
|
+
if (t(p, F) && typeof J != "function")
|
|
1376
|
+
return _(R, I, A, F, de(J));
|
|
1377
|
+
if (!J)
|
|
1378
|
+
return new E(
|
|
1379
|
+
"Invalid " + I + " `" + A + "` key `" + F + "` supplied to `" + R + "`.\nBad object: " + JSON.stringify($[M], null, " ") + `
|
|
1380
|
+
Valid keys: ` + JSON.stringify(Object.keys(p), null, " ")
|
|
1381
|
+
);
|
|
1382
|
+
var g = J(W, F, R, I, A + "." + F, r);
|
|
1383
|
+
if (g)
|
|
1384
|
+
return g;
|
|
1385
|
+
}
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1388
|
+
return P(x);
|
|
1389
|
+
}
|
|
1390
|
+
function K(p) {
|
|
1391
|
+
switch (typeof p) {
|
|
1392
|
+
case "number":
|
|
1393
|
+
case "string":
|
|
1394
|
+
case "undefined":
|
|
1395
|
+
return !0;
|
|
1396
|
+
case "boolean":
|
|
1397
|
+
return !p;
|
|
1398
|
+
case "object":
|
|
1399
|
+
if (Array.isArray(p))
|
|
1400
|
+
return p.every(K);
|
|
1401
|
+
if (p === null || s(p))
|
|
1402
|
+
return !0;
|
|
1403
|
+
var x = u(p);
|
|
1404
|
+
if (x) {
|
|
1405
|
+
var $ = x.call(p), M;
|
|
1406
|
+
if (x !== p.entries) {
|
|
1407
|
+
for (; !(M = $.next()).done; )
|
|
1408
|
+
if (!K(M.value))
|
|
1409
|
+
return !1;
|
|
1410
|
+
} else
|
|
1411
|
+
for (; !(M = $.next()).done; ) {
|
|
1412
|
+
var R = M.value;
|
|
1413
|
+
if (R && !K(R[1]))
|
|
1414
|
+
return !1;
|
|
1415
|
+
}
|
|
1416
|
+
} else
|
|
1417
|
+
return !1;
|
|
1418
|
+
return !0;
|
|
1419
|
+
default:
|
|
1420
|
+
return !1;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
function ne(p, x) {
|
|
1424
|
+
return p === "symbol" ? !0 : x ? x["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && x instanceof Symbol : !1;
|
|
1425
|
+
}
|
|
1426
|
+
function oe(p) {
|
|
1427
|
+
var x = typeof p;
|
|
1428
|
+
return Array.isArray(p) ? "array" : p instanceof RegExp ? "object" : ne(x, p) ? "symbol" : x;
|
|
1429
|
+
}
|
|
1430
|
+
function de(p) {
|
|
1431
|
+
if (typeof p > "u" || p === null)
|
|
1432
|
+
return "" + p;
|
|
1433
|
+
var x = oe(p);
|
|
1434
|
+
if (x === "object") {
|
|
1435
|
+
if (p instanceof Date)
|
|
1436
|
+
return "date";
|
|
1437
|
+
if (p instanceof RegExp)
|
|
1438
|
+
return "regexp";
|
|
1439
|
+
}
|
|
1440
|
+
return x;
|
|
1441
|
+
}
|
|
1442
|
+
function Le(p) {
|
|
1443
|
+
var x = de(p);
|
|
1444
|
+
switch (x) {
|
|
1445
|
+
case "array":
|
|
1446
|
+
case "object":
|
|
1447
|
+
return "an " + x;
|
|
1448
|
+
case "boolean":
|
|
1449
|
+
case "date":
|
|
1450
|
+
case "regexp":
|
|
1451
|
+
return "a " + x;
|
|
1452
|
+
default:
|
|
1453
|
+
return x;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
function Xe(p) {
|
|
1457
|
+
return !p.constructor || !p.constructor.name ? v : p.constructor.name;
|
|
1458
|
+
}
|
|
1459
|
+
return h.checkPropTypes = o, h.resetWarningCache = o.resetWarningCache, h.PropTypes = h, h;
|
|
1460
|
+
}, rt;
|
|
1461
|
+
}
|
|
1462
|
+
var ot, Mt;
|
|
1463
|
+
function Rr() {
|
|
1464
|
+
if (Mt) return ot;
|
|
1465
|
+
Mt = 1;
|
|
1466
|
+
var e = /* @__PURE__ */ mt();
|
|
1467
|
+
function n() {
|
|
1468
|
+
}
|
|
1469
|
+
function r() {
|
|
1470
|
+
}
|
|
1471
|
+
return r.resetWarningCache = n, ot = function() {
|
|
1472
|
+
function t(a, s, l, c, f, u) {
|
|
1473
|
+
if (u !== e) {
|
|
1474
|
+
var v = new Error(
|
|
1475
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1476
|
+
);
|
|
1477
|
+
throw v.name = "Invariant Violation", v;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
t.isRequired = t;
|
|
1481
|
+
function o() {
|
|
1482
|
+
return t;
|
|
1483
|
+
}
|
|
1484
|
+
var i = {
|
|
1485
|
+
array: t,
|
|
1486
|
+
bigint: t,
|
|
1487
|
+
bool: t,
|
|
1488
|
+
func: t,
|
|
1489
|
+
number: t,
|
|
1490
|
+
object: t,
|
|
1491
|
+
string: t,
|
|
1492
|
+
symbol: t,
|
|
1493
|
+
any: t,
|
|
1494
|
+
arrayOf: o,
|
|
1495
|
+
element: t,
|
|
1496
|
+
elementType: t,
|
|
1497
|
+
instanceOf: o,
|
|
1498
|
+
node: t,
|
|
1499
|
+
objectOf: o,
|
|
1500
|
+
oneOf: o,
|
|
1501
|
+
oneOfType: o,
|
|
1502
|
+
shape: o,
|
|
1503
|
+
exact: o,
|
|
1504
|
+
checkPropTypes: r,
|
|
1505
|
+
resetWarningCache: n
|
|
1506
|
+
};
|
|
1507
|
+
return i.PropTypes = i, i;
|
|
1508
|
+
}, ot;
|
|
1509
|
+
}
|
|
1510
|
+
var Wt;
|
|
1511
|
+
function Nr() {
|
|
1512
|
+
if (Wt) return Ae.exports;
|
|
1513
|
+
if (Wt = 1, process.env.NODE_ENV !== "production") {
|
|
1514
|
+
var e = on(), n = !0;
|
|
1515
|
+
Ae.exports = /* @__PURE__ */ Lr()(e.isElement, n);
|
|
1516
|
+
} else
|
|
1517
|
+
Ae.exports = /* @__PURE__ */ Rr()();
|
|
1518
|
+
return Ae.exports;
|
|
1519
|
+
}
|
|
1520
|
+
var jr = /* @__PURE__ */ Nr();
|
|
1521
|
+
const C = /* @__PURE__ */ kr(jr);
|
|
1522
|
+
function _r(e, n) {
|
|
1523
|
+
return e.classList ? !!n && e.classList.contains(n) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + n + " ") !== -1;
|
|
1524
|
+
}
|
|
1525
|
+
function Ar(e, n) {
|
|
1526
|
+
e.classList ? e.classList.add(n) : _r(e, n) || (typeof e.className == "string" ? e.className = e.className + " " + n : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + n));
|
|
1527
|
+
}
|
|
1528
|
+
function $t(e, n) {
|
|
1529
|
+
return e.replace(new RegExp("(^|\\s)" + n + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
1530
|
+
}
|
|
1531
|
+
function Mr(e, n) {
|
|
1532
|
+
e.classList ? e.classList.remove(n) : typeof e.className == "string" ? e.className = $t(e.className, n) : e.setAttribute("class", $t(e.className && e.className.baseVal || "", n));
|
|
1533
|
+
}
|
|
1534
|
+
const It = {
|
|
1535
|
+
disabled: !1
|
|
1536
|
+
};
|
|
1537
|
+
var Wr = process.env.NODE_ENV !== "production" ? C.oneOfType([C.number, C.shape({
|
|
1538
|
+
enter: C.number,
|
|
1539
|
+
exit: C.number,
|
|
1540
|
+
appear: C.number
|
|
1541
|
+
}).isRequired]) : null, $r = process.env.NODE_ENV !== "production" ? C.oneOfType([C.string, C.shape({
|
|
1542
|
+
enter: C.string,
|
|
1543
|
+
exit: C.string,
|
|
1544
|
+
active: C.string
|
|
1545
|
+
}), C.shape({
|
|
1546
|
+
enter: C.string,
|
|
1547
|
+
enterDone: C.string,
|
|
1548
|
+
enterActive: C.string,
|
|
1549
|
+
exit: C.string,
|
|
1550
|
+
exitDone: C.string,
|
|
1551
|
+
exitActive: C.string
|
|
1552
|
+
})]) : null;
|
|
1553
|
+
const vt = S.createContext(null);
|
|
1554
|
+
var sn = function(n) {
|
|
1555
|
+
return n.scrollTop;
|
|
1556
|
+
}, we = "unmounted", he = "exited", ee = "entering", ae = "entered", Se = "exiting", le = /* @__PURE__ */ (function(e) {
|
|
1557
|
+
ht(n, e);
|
|
1558
|
+
function n(t, o) {
|
|
1559
|
+
var i;
|
|
1560
|
+
i = e.call(this, t, o) || this;
|
|
1561
|
+
var a = o, s = a && !a.isMounting ? t.enter : t.appear, l;
|
|
1562
|
+
return i.appearStatus = null, t.in ? s ? (l = he, i.appearStatus = ee) : l = ae : t.unmountOnExit || t.mountOnEnter ? l = we : l = he, i.state = {
|
|
1563
|
+
status: l
|
|
1564
|
+
}, i.nextCallback = null, i;
|
|
1565
|
+
}
|
|
1566
|
+
n.getDerivedStateFromProps = function(o, i) {
|
|
1567
|
+
var a = o.in;
|
|
1568
|
+
return a && i.status === we ? {
|
|
1569
|
+
status: he
|
|
1570
|
+
} : null;
|
|
1571
|
+
};
|
|
1572
|
+
var r = n.prototype;
|
|
1573
|
+
return r.componentDidMount = function() {
|
|
1574
|
+
this.updateStatus(!0, this.appearStatus);
|
|
1575
|
+
}, r.componentDidUpdate = function(o) {
|
|
1576
|
+
var i = null;
|
|
1577
|
+
if (o !== this.props) {
|
|
1578
|
+
var a = this.state.status;
|
|
1579
|
+
this.props.in ? a !== ee && a !== ae && (i = ee) : (a === ee || a === ae) && (i = Se);
|
|
1580
|
+
}
|
|
1581
|
+
this.updateStatus(!1, i);
|
|
1582
|
+
}, r.componentWillUnmount = function() {
|
|
1583
|
+
this.cancelNextCallback();
|
|
1584
|
+
}, r.getTimeouts = function() {
|
|
1585
|
+
var o = this.props.timeout, i, a, s;
|
|
1586
|
+
return i = a = s = o, o != null && typeof o != "number" && (i = o.exit, a = o.enter, s = o.appear !== void 0 ? o.appear : a), {
|
|
1587
|
+
exit: i,
|
|
1588
|
+
enter: a,
|
|
1589
|
+
appear: s
|
|
1590
|
+
};
|
|
1591
|
+
}, r.updateStatus = function(o, i) {
|
|
1592
|
+
if (o === void 0 && (o = !1), i !== null)
|
|
1593
|
+
if (this.cancelNextCallback(), i === ee) {
|
|
1594
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
1595
|
+
var a = this.props.nodeRef ? this.props.nodeRef.current : _e.findDOMNode(this);
|
|
1596
|
+
a && sn(a);
|
|
1597
|
+
}
|
|
1598
|
+
this.performEnter(o);
|
|
1599
|
+
} else
|
|
1600
|
+
this.performExit();
|
|
1601
|
+
else this.props.unmountOnExit && this.state.status === he && this.setState({
|
|
1602
|
+
status: we
|
|
1603
|
+
});
|
|
1604
|
+
}, r.performEnter = function(o) {
|
|
1605
|
+
var i = this, a = this.props.enter, s = this.context ? this.context.isMounting : o, l = this.props.nodeRef ? [s] : [_e.findDOMNode(this), s], c = l[0], f = l[1], u = this.getTimeouts(), v = s ? u.appear : u.enter;
|
|
1606
|
+
if (!o && !a || It.disabled) {
|
|
1607
|
+
this.safeSetState({
|
|
1608
|
+
status: ae
|
|
1609
|
+
}, function() {
|
|
1610
|
+
i.props.onEntered(c);
|
|
1611
|
+
});
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
this.props.onEnter(c, f), this.safeSetState({
|
|
1615
|
+
status: ee
|
|
1616
|
+
}, function() {
|
|
1617
|
+
i.props.onEntering(c, f), i.onTransitionEnd(v, function() {
|
|
1618
|
+
i.safeSetState({
|
|
1619
|
+
status: ae
|
|
1620
|
+
}, function() {
|
|
1621
|
+
i.props.onEntered(c, f);
|
|
1622
|
+
});
|
|
1623
|
+
});
|
|
1624
|
+
});
|
|
1625
|
+
}, r.performExit = function() {
|
|
1626
|
+
var o = this, i = this.props.exit, a = this.getTimeouts(), s = this.props.nodeRef ? void 0 : _e.findDOMNode(this);
|
|
1627
|
+
if (!i || It.disabled) {
|
|
1628
|
+
this.safeSetState({
|
|
1629
|
+
status: he
|
|
1630
|
+
}, function() {
|
|
1631
|
+
o.props.onExited(s);
|
|
1632
|
+
});
|
|
1633
|
+
return;
|
|
1634
|
+
}
|
|
1635
|
+
this.props.onExit(s), this.safeSetState({
|
|
1636
|
+
status: Se
|
|
1637
|
+
}, function() {
|
|
1638
|
+
o.props.onExiting(s), o.onTransitionEnd(a.exit, function() {
|
|
1639
|
+
o.safeSetState({
|
|
1640
|
+
status: he
|
|
1641
|
+
}, function() {
|
|
1642
|
+
o.props.onExited(s);
|
|
1643
|
+
});
|
|
1644
|
+
});
|
|
1645
|
+
});
|
|
1646
|
+
}, r.cancelNextCallback = function() {
|
|
1647
|
+
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
1648
|
+
}, r.safeSetState = function(o, i) {
|
|
1649
|
+
i = this.setNextCallback(i), this.setState(o, i);
|
|
1650
|
+
}, r.setNextCallback = function(o) {
|
|
1651
|
+
var i = this, a = !0;
|
|
1652
|
+
return this.nextCallback = function(s) {
|
|
1653
|
+
a && (a = !1, i.nextCallback = null, o(s));
|
|
1654
|
+
}, this.nextCallback.cancel = function() {
|
|
1655
|
+
a = !1;
|
|
1656
|
+
}, this.nextCallback;
|
|
1657
|
+
}, r.onTransitionEnd = function(o, i) {
|
|
1658
|
+
this.setNextCallback(i);
|
|
1659
|
+
var a = this.props.nodeRef ? this.props.nodeRef.current : _e.findDOMNode(this), s = o == null && !this.props.addEndListener;
|
|
1660
|
+
if (!a || s) {
|
|
1661
|
+
setTimeout(this.nextCallback, 0);
|
|
1662
|
+
return;
|
|
1663
|
+
}
|
|
1664
|
+
if (this.props.addEndListener) {
|
|
1665
|
+
var l = this.props.nodeRef ? [this.nextCallback] : [a, this.nextCallback], c = l[0], f = l[1];
|
|
1666
|
+
this.props.addEndListener(c, f);
|
|
1667
|
+
}
|
|
1668
|
+
o != null && setTimeout(this.nextCallback, o);
|
|
1669
|
+
}, r.render = function() {
|
|
1670
|
+
var o = this.state.status;
|
|
1671
|
+
if (o === we)
|
|
1672
|
+
return null;
|
|
1673
|
+
var i = this.props, a = i.children;
|
|
1674
|
+
i.in, i.mountOnEnter, i.unmountOnExit, i.appear, i.enter, i.exit, i.timeout, i.addEndListener, i.onEnter, i.onEntering, i.onEntered, i.onExit, i.onExiting, i.onExited, i.nodeRef;
|
|
1675
|
+
var s = rn(i, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
1676
|
+
return (
|
|
1677
|
+
// allows for nested Transitions
|
|
1678
|
+
/* @__PURE__ */ S.createElement(vt.Provider, {
|
|
1679
|
+
value: null
|
|
1680
|
+
}, typeof a == "function" ? a(o, s) : S.cloneElement(S.Children.only(a), s))
|
|
1681
|
+
);
|
|
1682
|
+
}, n;
|
|
1683
|
+
})(S.Component);
|
|
1684
|
+
le.contextType = vt;
|
|
1685
|
+
le.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1686
|
+
/**
|
|
1687
|
+
* A React reference to DOM element that need to transition:
|
|
1688
|
+
* https://stackoverflow.com/a/51127130/4671932
|
|
1689
|
+
*
|
|
1690
|
+
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
|
1691
|
+
* (e.g. `onEnter`) because user already has direct access to the node.
|
|
1692
|
+
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
|
1693
|
+
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
|
1694
|
+
* (see
|
|
1695
|
+
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
1696
|
+
*/
|
|
1697
|
+
nodeRef: C.shape({
|
|
1698
|
+
current: typeof Element > "u" ? C.any : function(e, n, r, t, o, i) {
|
|
1699
|
+
var a = e[n];
|
|
1700
|
+
return C.instanceOf(a && "ownerDocument" in a ? a.ownerDocument.defaultView.Element : Element)(e, n, r, t, o, i);
|
|
1701
|
+
}
|
|
1702
|
+
}),
|
|
1703
|
+
/**
|
|
1704
|
+
* A `function` child can be used instead of a React element. This function is
|
|
1705
|
+
* called with the current transition status (`'entering'`, `'entered'`,
|
|
1706
|
+
* `'exiting'`, `'exited'`), which can be used to apply context
|
|
1707
|
+
* specific props to a component.
|
|
1708
|
+
*
|
|
1709
|
+
* ```jsx
|
|
1710
|
+
* <Transition in={this.state.in} timeout={150}>
|
|
1711
|
+
* {state => (
|
|
1712
|
+
* <MyComponent className={`fade fade-${state}`} />
|
|
1713
|
+
* )}
|
|
1714
|
+
* </Transition>
|
|
1715
|
+
* ```
|
|
1716
|
+
*/
|
|
1717
|
+
children: C.oneOfType([C.func.isRequired, C.element.isRequired]).isRequired,
|
|
1718
|
+
/**
|
|
1719
|
+
* Show the component; triggers the enter or exit states
|
|
1720
|
+
*/
|
|
1721
|
+
in: C.bool,
|
|
1722
|
+
/**
|
|
1723
|
+
* By default the child component is mounted immediately along with
|
|
1724
|
+
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
1725
|
+
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
1726
|
+
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
1727
|
+
*/
|
|
1728
|
+
mountOnEnter: C.bool,
|
|
1729
|
+
/**
|
|
1730
|
+
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
1731
|
+
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
1732
|
+
*/
|
|
1733
|
+
unmountOnExit: C.bool,
|
|
1734
|
+
/**
|
|
1735
|
+
* By default the child component does not perform the enter transition when
|
|
1736
|
+
* it first mounts, regardless of the value of `in`. If you want this
|
|
1737
|
+
* behavior, set both `appear` and `in` to `true`.
|
|
1738
|
+
*
|
|
1739
|
+
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
|
1740
|
+
* > only adds an additional enter transition. However, in the
|
|
1741
|
+
* > `<CSSTransition>` component that first enter transition does result in
|
|
1742
|
+
* > additional `.appear-*` classes, that way you can choose to style it
|
|
1743
|
+
* > differently.
|
|
1744
|
+
*/
|
|
1745
|
+
appear: C.bool,
|
|
1746
|
+
/**
|
|
1747
|
+
* Enable or disable enter transitions.
|
|
1748
|
+
*/
|
|
1749
|
+
enter: C.bool,
|
|
1750
|
+
/**
|
|
1751
|
+
* Enable or disable exit transitions.
|
|
1752
|
+
*/
|
|
1753
|
+
exit: C.bool,
|
|
1754
|
+
/**
|
|
1755
|
+
* The duration of the transition, in milliseconds.
|
|
1756
|
+
* Required unless `addEndListener` is provided.
|
|
1757
|
+
*
|
|
1758
|
+
* You may specify a single timeout for all transitions:
|
|
1759
|
+
*
|
|
1760
|
+
* ```jsx
|
|
1761
|
+
* timeout={500}
|
|
1762
|
+
* ```
|
|
1763
|
+
*
|
|
1764
|
+
* or individually:
|
|
1765
|
+
*
|
|
1766
|
+
* ```jsx
|
|
1767
|
+
* timeout={{
|
|
1768
|
+
* appear: 500,
|
|
1769
|
+
* enter: 300,
|
|
1770
|
+
* exit: 500,
|
|
1771
|
+
* }}
|
|
1772
|
+
* ```
|
|
1773
|
+
*
|
|
1774
|
+
* - `appear` defaults to the value of `enter`
|
|
1775
|
+
* - `enter` defaults to `0`
|
|
1776
|
+
* - `exit` defaults to `0`
|
|
1777
|
+
*
|
|
1778
|
+
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
1779
|
+
*/
|
|
1780
|
+
timeout: function(n) {
|
|
1781
|
+
var r = Wr;
|
|
1782
|
+
n.addEndListener || (r = r.isRequired);
|
|
1783
|
+
for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
|
1784
|
+
o[i - 1] = arguments[i];
|
|
1785
|
+
return r.apply(void 0, [n].concat(o));
|
|
1786
|
+
},
|
|
1787
|
+
/**
|
|
1788
|
+
* Add a custom transition end trigger. Called with the transitioning
|
|
1789
|
+
* DOM node and a `done` callback. Allows for more fine grained transition end
|
|
1790
|
+
* logic. Timeouts are still used as a fallback if provided.
|
|
1791
|
+
*
|
|
1792
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1793
|
+
*
|
|
1794
|
+
* ```jsx
|
|
1795
|
+
* addEndListener={(node, done) => {
|
|
1796
|
+
* // use the css transitionend event to mark the finish of a transition
|
|
1797
|
+
* node.addEventListener('transitionend', done, false);
|
|
1798
|
+
* }}
|
|
1799
|
+
* ```
|
|
1800
|
+
*/
|
|
1801
|
+
addEndListener: C.func,
|
|
1802
|
+
/**
|
|
1803
|
+
* Callback fired before the "entering" status is applied. An extra parameter
|
|
1804
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1805
|
+
*
|
|
1806
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1807
|
+
*
|
|
1808
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
1809
|
+
*/
|
|
1810
|
+
onEnter: C.func,
|
|
1811
|
+
/**
|
|
1812
|
+
* Callback fired after the "entering" status is applied. An extra parameter
|
|
1813
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1814
|
+
*
|
|
1815
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1816
|
+
*
|
|
1817
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
1818
|
+
*/
|
|
1819
|
+
onEntering: C.func,
|
|
1820
|
+
/**
|
|
1821
|
+
* Callback fired after the "entered" status is applied. An extra parameter
|
|
1822
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
1823
|
+
*
|
|
1824
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1825
|
+
*
|
|
1826
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
1827
|
+
*/
|
|
1828
|
+
onEntered: C.func,
|
|
1829
|
+
/**
|
|
1830
|
+
* Callback fired before the "exiting" status is applied.
|
|
1831
|
+
*
|
|
1832
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1833
|
+
*
|
|
1834
|
+
* @type Function(node: HtmlElement) -> void
|
|
1835
|
+
*/
|
|
1836
|
+
onExit: C.func,
|
|
1837
|
+
/**
|
|
1838
|
+
* Callback fired after the "exiting" status is applied.
|
|
1839
|
+
*
|
|
1840
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
1841
|
+
*
|
|
1842
|
+
* @type Function(node: HtmlElement) -> void
|
|
1843
|
+
*/
|
|
1844
|
+
onExiting: C.func,
|
|
1845
|
+
/**
|
|
1846
|
+
* Callback fired after the "exited" status is applied.
|
|
1847
|
+
*
|
|
1848
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
1849
|
+
*
|
|
1850
|
+
* @type Function(node: HtmlElement) -> void
|
|
1851
|
+
*/
|
|
1852
|
+
onExited: C.func
|
|
1853
|
+
} : {};
|
|
1854
|
+
function ge() {
|
|
1855
|
+
}
|
|
1856
|
+
le.defaultProps = {
|
|
1857
|
+
in: !1,
|
|
1858
|
+
mountOnEnter: !1,
|
|
1859
|
+
unmountOnExit: !1,
|
|
1860
|
+
appear: !1,
|
|
1861
|
+
enter: !0,
|
|
1862
|
+
exit: !0,
|
|
1863
|
+
onEnter: ge,
|
|
1864
|
+
onEntering: ge,
|
|
1865
|
+
onEntered: ge,
|
|
1866
|
+
onExit: ge,
|
|
1867
|
+
onExiting: ge,
|
|
1868
|
+
onExited: ge
|
|
1869
|
+
};
|
|
1870
|
+
le.UNMOUNTED = we;
|
|
1871
|
+
le.EXITED = he;
|
|
1872
|
+
le.ENTERING = ee;
|
|
1873
|
+
le.ENTERED = ae;
|
|
1874
|
+
le.EXITING = Se;
|
|
1875
|
+
var Ir = function(n, r) {
|
|
1876
|
+
return n && r && r.split(" ").forEach(function(t) {
|
|
1877
|
+
return Ar(n, t);
|
|
1878
|
+
});
|
|
1879
|
+
}, it = function(n, r) {
|
|
1880
|
+
return n && r && r.split(" ").forEach(function(t) {
|
|
1881
|
+
return Mr(n, t);
|
|
1882
|
+
});
|
|
1883
|
+
}, yt = /* @__PURE__ */ (function(e) {
|
|
1884
|
+
ht(n, e);
|
|
1885
|
+
function n() {
|
|
1886
|
+
for (var t, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
|
|
1887
|
+
i[a] = arguments[a];
|
|
1888
|
+
return t = e.call.apply(e, [this].concat(i)) || this, t.appliedClasses = {
|
|
1889
|
+
appear: {},
|
|
1890
|
+
enter: {},
|
|
1891
|
+
exit: {}
|
|
1892
|
+
}, t.onEnter = function(s, l) {
|
|
1893
|
+
var c = t.resolveArguments(s, l), f = c[0], u = c[1];
|
|
1894
|
+
t.removeClasses(f, "exit"), t.addClass(f, u ? "appear" : "enter", "base"), t.props.onEnter && t.props.onEnter(s, l);
|
|
1895
|
+
}, t.onEntering = function(s, l) {
|
|
1896
|
+
var c = t.resolveArguments(s, l), f = c[0], u = c[1], v = u ? "appear" : "enter";
|
|
1897
|
+
t.addClass(f, v, "active"), t.props.onEntering && t.props.onEntering(s, l);
|
|
1898
|
+
}, t.onEntered = function(s, l) {
|
|
1899
|
+
var c = t.resolveArguments(s, l), f = c[0], u = c[1], v = u ? "appear" : "enter";
|
|
1900
|
+
t.removeClasses(f, v), t.addClass(f, v, "done"), t.props.onEntered && t.props.onEntered(s, l);
|
|
1901
|
+
}, t.onExit = function(s) {
|
|
1902
|
+
var l = t.resolveArguments(s), c = l[0];
|
|
1903
|
+
t.removeClasses(c, "appear"), t.removeClasses(c, "enter"), t.addClass(c, "exit", "base"), t.props.onExit && t.props.onExit(s);
|
|
1904
|
+
}, t.onExiting = function(s) {
|
|
1905
|
+
var l = t.resolveArguments(s), c = l[0];
|
|
1906
|
+
t.addClass(c, "exit", "active"), t.props.onExiting && t.props.onExiting(s);
|
|
1907
|
+
}, t.onExited = function(s) {
|
|
1908
|
+
var l = t.resolveArguments(s), c = l[0];
|
|
1909
|
+
t.removeClasses(c, "exit"), t.addClass(c, "exit", "done"), t.props.onExited && t.props.onExited(s);
|
|
1910
|
+
}, t.resolveArguments = function(s, l) {
|
|
1911
|
+
return t.props.nodeRef ? [t.props.nodeRef.current, s] : [s, l];
|
|
1912
|
+
}, t.getClassNames = function(s) {
|
|
1913
|
+
var l = t.props.classNames, c = typeof l == "string", f = c && l ? l + "-" : "", u = c ? "" + f + s : l[s], v = c ? u + "-active" : l[s + "Active"], h = c ? u + "-done" : l[s + "Done"];
|
|
1914
|
+
return {
|
|
1915
|
+
baseClassName: u,
|
|
1916
|
+
activeClassName: v,
|
|
1917
|
+
doneClassName: h
|
|
1918
|
+
};
|
|
1919
|
+
}, t;
|
|
1920
|
+
}
|
|
1921
|
+
var r = n.prototype;
|
|
1922
|
+
return r.addClass = function(o, i, a) {
|
|
1923
|
+
var s = this.getClassNames(i)[a + "ClassName"], l = this.getClassNames("enter"), c = l.doneClassName;
|
|
1924
|
+
i === "appear" && a === "done" && c && (s += " " + c), a === "active" && o && sn(o), s && (this.appliedClasses[i][a] = s, Ir(o, s));
|
|
1925
|
+
}, r.removeClasses = function(o, i) {
|
|
1926
|
+
var a = this.appliedClasses[i], s = a.base, l = a.active, c = a.done;
|
|
1927
|
+
this.appliedClasses[i] = {}, s && it(o, s), l && it(o, l), c && it(o, c);
|
|
1928
|
+
}, r.render = function() {
|
|
1929
|
+
var o = this.props;
|
|
1930
|
+
o.classNames;
|
|
1931
|
+
var i = rn(o, ["classNames"]);
|
|
1932
|
+
return /* @__PURE__ */ S.createElement(le, He({}, i, {
|
|
1933
|
+
onEnter: this.onEnter,
|
|
1934
|
+
onEntered: this.onEntered,
|
|
1935
|
+
onEntering: this.onEntering,
|
|
1936
|
+
onExit: this.onExit,
|
|
1937
|
+
onExiting: this.onExiting,
|
|
1938
|
+
onExited: this.onExited
|
|
1939
|
+
}));
|
|
1940
|
+
}, n;
|
|
1941
|
+
})(S.Component);
|
|
1942
|
+
yt.defaultProps = {
|
|
1943
|
+
classNames: ""
|
|
1944
|
+
};
|
|
1945
|
+
yt.propTypes = process.env.NODE_ENV !== "production" ? He({}, le.propTypes, {
|
|
1946
|
+
/**
|
|
1947
|
+
* The animation classNames applied to the component as it appears, enters,
|
|
1948
|
+
* exits or has finished the transition. A single name can be provided, which
|
|
1949
|
+
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
1950
|
+
*
|
|
1951
|
+
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
1952
|
+
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
1953
|
+
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
1954
|
+
*
|
|
1955
|
+
* A few details to note about how these classes are applied:
|
|
1956
|
+
*
|
|
1957
|
+
* 1. They are _joined_ with the ones that are already defined on the child
|
|
1958
|
+
* component, so if you want to add some base styles, you can use
|
|
1959
|
+
* `className` without worrying that it will be overridden.
|
|
1960
|
+
*
|
|
1961
|
+
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
1962
|
+
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
1963
|
+
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
1964
|
+
*
|
|
1965
|
+
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
1966
|
+
* allows you to define different behavior for when appearing is done and
|
|
1967
|
+
* when regular entering is done, using selectors like
|
|
1968
|
+
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
1969
|
+
* an epic entrance animation when element first appears in the DOM using
|
|
1970
|
+
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
1971
|
+
* simply use `fade-enter-done` for defining both cases.
|
|
1972
|
+
*
|
|
1973
|
+
* Each individual classNames can also be specified independently like:
|
|
1974
|
+
*
|
|
1975
|
+
* ```js
|
|
1976
|
+
* classNames={{
|
|
1977
|
+
* appear: 'my-appear',
|
|
1978
|
+
* appearActive: 'my-active-appear',
|
|
1979
|
+
* appearDone: 'my-done-appear',
|
|
1980
|
+
* enter: 'my-enter',
|
|
1981
|
+
* enterActive: 'my-active-enter',
|
|
1982
|
+
* enterDone: 'my-done-enter',
|
|
1983
|
+
* exit: 'my-exit',
|
|
1984
|
+
* exitActive: 'my-active-exit',
|
|
1985
|
+
* exitDone: 'my-done-exit',
|
|
1986
|
+
* }}
|
|
1987
|
+
* ```
|
|
1988
|
+
*
|
|
1989
|
+
* If you want to set these classes using CSS Modules:
|
|
1990
|
+
*
|
|
1991
|
+
* ```js
|
|
1992
|
+
* import styles from './styles.css';
|
|
1993
|
+
* ```
|
|
1994
|
+
*
|
|
1995
|
+
* you might want to use camelCase in your CSS file, that way could simply
|
|
1996
|
+
* spread them instead of listing them one by one:
|
|
1997
|
+
*
|
|
1998
|
+
* ```js
|
|
1999
|
+
* classNames={{ ...styles }}
|
|
2000
|
+
* ```
|
|
2001
|
+
*
|
|
2002
|
+
* @type {string | {
|
|
2003
|
+
* appear?: string,
|
|
2004
|
+
* appearActive?: string,
|
|
2005
|
+
* appearDone?: string,
|
|
2006
|
+
* enter?: string,
|
|
2007
|
+
* enterActive?: string,
|
|
2008
|
+
* enterDone?: string,
|
|
2009
|
+
* exit?: string,
|
|
2010
|
+
* exitActive?: string,
|
|
2011
|
+
* exitDone?: string,
|
|
2012
|
+
* }}
|
|
2013
|
+
*/
|
|
2014
|
+
classNames: $r,
|
|
2015
|
+
/**
|
|
2016
|
+
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
2017
|
+
* applied.
|
|
2018
|
+
*
|
|
2019
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
2020
|
+
*
|
|
2021
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2022
|
+
*/
|
|
2023
|
+
onEnter: C.func,
|
|
2024
|
+
/**
|
|
2025
|
+
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
2026
|
+
* 'appear-active' class is applied.
|
|
2027
|
+
*
|
|
2028
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
2029
|
+
*
|
|
2030
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2031
|
+
*/
|
|
2032
|
+
onEntering: C.func,
|
|
2033
|
+
/**
|
|
2034
|
+
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
2035
|
+
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
2036
|
+
*
|
|
2037
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
2038
|
+
*
|
|
2039
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2040
|
+
*/
|
|
2041
|
+
onEntered: C.func,
|
|
2042
|
+
/**
|
|
2043
|
+
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
2044
|
+
* applied.
|
|
2045
|
+
*
|
|
2046
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
2047
|
+
*
|
|
2048
|
+
* @type Function(node: HtmlElement)
|
|
2049
|
+
*/
|
|
2050
|
+
onExit: C.func,
|
|
2051
|
+
/**
|
|
2052
|
+
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
2053
|
+
*
|
|
2054
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
2055
|
+
*
|
|
2056
|
+
* @type Function(node: HtmlElement)
|
|
2057
|
+
*/
|
|
2058
|
+
onExiting: C.func,
|
|
2059
|
+
/**
|
|
2060
|
+
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
2061
|
+
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
2062
|
+
*
|
|
2063
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
2064
|
+
*
|
|
2065
|
+
* @type Function(node: HtmlElement)
|
|
2066
|
+
*/
|
|
2067
|
+
onExited: C.func
|
|
2068
|
+
}) : {};
|
|
2069
|
+
var We, $e;
|
|
2070
|
+
function Dr(e, n) {
|
|
2071
|
+
return !(e === n || S.isValidElement(e) && S.isValidElement(n) && e.key != null && e.key === n.key);
|
|
2072
|
+
}
|
|
2073
|
+
var fe = {
|
|
2074
|
+
out: "out-in",
|
|
2075
|
+
in: "in-out"
|
|
2076
|
+
}, Ve = function(n, r, t) {
|
|
2077
|
+
return function() {
|
|
2078
|
+
var o;
|
|
2079
|
+
n.props[r] && (o = n.props)[r].apply(o, arguments), t();
|
|
2080
|
+
};
|
|
2081
|
+
}, Fr = (We = {}, We[fe.out] = function(e) {
|
|
2082
|
+
var n = e.current, r = e.changeState;
|
|
2083
|
+
return S.cloneElement(n, {
|
|
2084
|
+
in: !1,
|
|
2085
|
+
onExited: Ve(n, "onExited", function() {
|
|
2086
|
+
r(ee, null);
|
|
2087
|
+
})
|
|
2088
|
+
});
|
|
2089
|
+
}, We[fe.in] = function(e) {
|
|
2090
|
+
var n = e.current, r = e.changeState, t = e.children;
|
|
2091
|
+
return [n, S.cloneElement(t, {
|
|
2092
|
+
in: !0,
|
|
2093
|
+
onEntered: Ve(t, "onEntered", function() {
|
|
2094
|
+
r(ee);
|
|
2095
|
+
})
|
|
2096
|
+
})];
|
|
2097
|
+
}, We), zr = ($e = {}, $e[fe.out] = function(e) {
|
|
2098
|
+
var n = e.children, r = e.changeState;
|
|
2099
|
+
return S.cloneElement(n, {
|
|
2100
|
+
in: !0,
|
|
2101
|
+
onEntered: Ve(n, "onEntered", function() {
|
|
2102
|
+
r(ae, S.cloneElement(n, {
|
|
2103
|
+
in: !0
|
|
2104
|
+
}));
|
|
2105
|
+
})
|
|
2106
|
+
});
|
|
2107
|
+
}, $e[fe.in] = function(e) {
|
|
2108
|
+
var n = e.current, r = e.children, t = e.changeState;
|
|
2109
|
+
return [S.cloneElement(n, {
|
|
2110
|
+
in: !1,
|
|
2111
|
+
onExited: Ve(n, "onExited", function() {
|
|
2112
|
+
t(ae, S.cloneElement(r, {
|
|
2113
|
+
in: !0
|
|
2114
|
+
}));
|
|
2115
|
+
})
|
|
2116
|
+
}), S.cloneElement(r, {
|
|
2117
|
+
in: !0
|
|
2118
|
+
})];
|
|
2119
|
+
}, $e), gt = /* @__PURE__ */ (function(e) {
|
|
2120
|
+
ht(n, e);
|
|
2121
|
+
function n() {
|
|
2122
|
+
for (var t, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
|
|
2123
|
+
i[a] = arguments[a];
|
|
2124
|
+
return t = e.call.apply(e, [this].concat(i)) || this, t.state = {
|
|
2125
|
+
status: ae,
|
|
2126
|
+
current: null
|
|
2127
|
+
}, t.appeared = !1, t.changeState = function(s, l) {
|
|
2128
|
+
l === void 0 && (l = t.state.current), t.setState({
|
|
2129
|
+
status: s,
|
|
2130
|
+
current: l
|
|
2131
|
+
});
|
|
2132
|
+
}, t;
|
|
2133
|
+
}
|
|
2134
|
+
var r = n.prototype;
|
|
2135
|
+
return r.componentDidMount = function() {
|
|
2136
|
+
this.appeared = !0;
|
|
2137
|
+
}, n.getDerivedStateFromProps = function(o, i) {
|
|
2138
|
+
return o.children == null ? {
|
|
2139
|
+
current: null
|
|
2140
|
+
} : i.status === ee && o.mode === fe.in ? {
|
|
2141
|
+
status: ee
|
|
2142
|
+
} : i.current && Dr(i.current, o.children) ? {
|
|
2143
|
+
status: Se
|
|
2144
|
+
} : {
|
|
2145
|
+
current: S.cloneElement(o.children, {
|
|
2146
|
+
in: !0
|
|
2147
|
+
})
|
|
2148
|
+
};
|
|
2149
|
+
}, r.render = function() {
|
|
2150
|
+
var o = this.props, i = o.children, a = o.mode, s = this.state, l = s.status, c = s.current, f = {
|
|
2151
|
+
children: i,
|
|
2152
|
+
current: c,
|
|
2153
|
+
changeState: this.changeState,
|
|
2154
|
+
status: l
|
|
2155
|
+
}, u;
|
|
2156
|
+
switch (l) {
|
|
2157
|
+
case ee:
|
|
2158
|
+
u = zr[a](f);
|
|
2159
|
+
break;
|
|
2160
|
+
case Se:
|
|
2161
|
+
u = Fr[a](f);
|
|
2162
|
+
break;
|
|
2163
|
+
case ae:
|
|
2164
|
+
u = c;
|
|
2165
|
+
}
|
|
2166
|
+
return /* @__PURE__ */ S.createElement(vt.Provider, {
|
|
2167
|
+
value: {
|
|
2168
|
+
isMounting: !this.appeared
|
|
2169
|
+
}
|
|
2170
|
+
}, u);
|
|
2171
|
+
}, n;
|
|
2172
|
+
})(S.Component);
|
|
2173
|
+
gt.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
2174
|
+
/**
|
|
2175
|
+
* Transition modes.
|
|
2176
|
+
* `out-in`: Current element transitions out first, then when complete, the new element transitions in.
|
|
2177
|
+
* `in-out`: New element transitions in first, then when complete, the current element transitions out.
|
|
2178
|
+
*
|
|
2179
|
+
* @type {'out-in'|'in-out'}
|
|
2180
|
+
*/
|
|
2181
|
+
mode: C.oneOf([fe.in, fe.out]),
|
|
2182
|
+
/**
|
|
2183
|
+
* Any `Transition` or `CSSTransition` component.
|
|
2184
|
+
*/
|
|
2185
|
+
children: C.oneOfType([C.element.isRequired])
|
|
2186
|
+
} : {};
|
|
2187
|
+
gt.defaultProps = {
|
|
2188
|
+
mode: fe.out
|
|
2189
|
+
};
|
|
2190
|
+
const qr = () => {
|
|
2191
|
+
const e = Yt();
|
|
2192
|
+
return /* @__PURE__ */ V("section", { className: "flex items-center justify-start border-slate-200 mx-4 text-center my-3", children: [
|
|
2193
|
+
/* @__PURE__ */ d(
|
|
2194
|
+
"svg",
|
|
2195
|
+
{
|
|
2196
|
+
className: "w-8 h-8 fill-red-500",
|
|
2197
|
+
viewBox: "0 0 400 400",
|
|
2198
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2199
|
+
children: /* @__PURE__ */ V("g", { children: [
|
|
2200
|
+
/* @__PURE__ */ d("ellipse", { cx: "200.611", cy: "200.667", rx: "177.778", ry: "177.778" }),
|
|
2201
|
+
/* @__PURE__ */ d(
|
|
2202
|
+
"path",
|
|
2203
|
+
{
|
|
2204
|
+
fill: "#fff",
|
|
2205
|
+
d: "M28.944 221.778l197.5-194.445L367 254.556 227.556 374 28.944 221.778z"
|
|
2206
|
+
}
|
|
2207
|
+
),
|
|
2208
|
+
/* @__PURE__ */ d("path", { d: "M78.431 253.29c15.953 45.715 69.05 64.287 135.717 66.43 166.908 12.62 192.836-144.553 36.578-120.73-64.853 10.321-82.784-8.213-85.598-36.225-2.813-28.012 30.315-52.258 67.58-53.362 37.264-1.103 54.208 22.032 48.86 41.818l-9.562 19.561c41.474-19.361 20.499-63.282-27.842-79.486-153.068-31.708-185.996 155.8-20.504 125.847 68.981-11.553 134.89 63.901 2.433 88.456-23.908 3.21-100.442 8.175-127.509-42.995l-20.153-9.314z" }),
|
|
2209
|
+
/* @__PURE__ */ d("ellipse", { cx: "98.944", cy: "237.889", rx: "26.111", ry: "26.111" }),
|
|
2210
|
+
/* @__PURE__ */ d("ellipse", { cx: "259.222", cy: "153.167", rx: "21.944", ry: "21.944" })
|
|
2211
|
+
] })
|
|
2212
|
+
}
|
|
2213
|
+
),
|
|
2214
|
+
/* @__PURE__ */ d(Te, { title: e, children: /* @__PURE__ */ d("span", { className: "text-lg font-bold ml-2 bg-gradient-to-r from-red-500 to-orange-500 bg-clip text-transparent custom-logo-text", children: e.substring(0, 9) }) })
|
|
2215
|
+
] });
|
|
2216
|
+
}, Br = () => {
|
|
2217
|
+
const { menus: e } = ce(), n = ye(), r = Pe(), [t, o] = se([""]), i = e.map((l) => l?.key);
|
|
2218
|
+
return te(() => {
|
|
2219
|
+
o(r.pathname.substring(1).split("/"));
|
|
2220
|
+
}, [r.pathname]), /* @__PURE__ */ d("section", { className: "flex-1 flex flex-col justify-between", children: /* @__PURE__ */ d(
|
|
2221
|
+
zt,
|
|
2222
|
+
{
|
|
2223
|
+
mode: "inline",
|
|
2224
|
+
openKeys: t,
|
|
2225
|
+
onOpenChange: (l) => {
|
|
2226
|
+
const c = l.find((f) => t.indexOf(f) === -1);
|
|
2227
|
+
i.indexOf(c) === -1 ? o(l) : o(c ? [c] : []);
|
|
2228
|
+
},
|
|
2229
|
+
onClick: ({ keyPath: l, key: c, item: f }) => {
|
|
2230
|
+
if (c.indexOf("://") !== -1) {
|
|
2231
|
+
window.open(c);
|
|
2232
|
+
return;
|
|
2233
|
+
}
|
|
2234
|
+
const u = f.props?.query || "", v = l.reverse().join("/");
|
|
2235
|
+
n(`${v}${u ? "?" + u : ""}`);
|
|
2236
|
+
},
|
|
2237
|
+
selectedKeys: r.pathname.substring(1).split("/"),
|
|
2238
|
+
items: e,
|
|
2239
|
+
style: { borderInlineWidth: 0 },
|
|
2240
|
+
className: "border-t border-b border-slate-100"
|
|
2241
|
+
}
|
|
2242
|
+
) });
|
|
2243
|
+
};
|
|
2244
|
+
var Hr = ["size", "strokeWidth", "strokeLinecap", "strokeLinejoin", "theme", "fill", "className", "spin"];
|
|
2245
|
+
function Dt(e, n) {
|
|
2246
|
+
var r = Object.keys(e);
|
|
2247
|
+
if (Object.getOwnPropertySymbols) {
|
|
2248
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
2249
|
+
n && (t = t.filter(function(o) {
|
|
2250
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
2251
|
+
})), r.push.apply(r, t);
|
|
2252
|
+
}
|
|
2253
|
+
return r;
|
|
2254
|
+
}
|
|
2255
|
+
function Ft(e) {
|
|
2256
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
2257
|
+
var r = arguments[n] != null ? arguments[n] : {};
|
|
2258
|
+
n % 2 ? Dt(Object(r), !0).forEach(function(t) {
|
|
2259
|
+
Vr(e, t, r[t]);
|
|
2260
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Dt(Object(r)).forEach(function(t) {
|
|
2261
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
return e;
|
|
2265
|
+
}
|
|
2266
|
+
function Vr(e, n, r) {
|
|
2267
|
+
return n in e ? Object.defineProperty(e, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = r, e;
|
|
2268
|
+
}
|
|
2269
|
+
function Ur(e, n) {
|
|
2270
|
+
if (e == null) return {};
|
|
2271
|
+
var r = Yr(e, n), t, o;
|
|
2272
|
+
if (Object.getOwnPropertySymbols) {
|
|
2273
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
2274
|
+
for (o = 0; o < i.length; o++)
|
|
2275
|
+
t = i[o], !(n.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
2276
|
+
}
|
|
2277
|
+
return r;
|
|
2278
|
+
}
|
|
2279
|
+
function Yr(e, n) {
|
|
2280
|
+
if (e == null) return {};
|
|
2281
|
+
var r = {}, t = Object.keys(e), o, i;
|
|
2282
|
+
for (i = 0; i < t.length; i++)
|
|
2283
|
+
o = t[i], !(n.indexOf(o) >= 0) && (r[o] = e[o]);
|
|
2284
|
+
return r;
|
|
2285
|
+
}
|
|
2286
|
+
var Kr = {
|
|
2287
|
+
size: "1em",
|
|
2288
|
+
strokeWidth: 4,
|
|
2289
|
+
strokeLinecap: "round",
|
|
2290
|
+
strokeLinejoin: "round",
|
|
2291
|
+
rtl: !1,
|
|
2292
|
+
theme: "outline",
|
|
2293
|
+
colors: {
|
|
2294
|
+
outline: {
|
|
2295
|
+
fill: "#333",
|
|
2296
|
+
background: "transparent"
|
|
2297
|
+
},
|
|
2298
|
+
filled: {
|
|
2299
|
+
fill: "#333",
|
|
2300
|
+
background: "#FFF"
|
|
2301
|
+
},
|
|
2302
|
+
twoTone: {
|
|
2303
|
+
fill: "#333",
|
|
2304
|
+
twoTone: "#2F88FF"
|
|
2305
|
+
},
|
|
2306
|
+
multiColor: {
|
|
2307
|
+
outStrokeColor: "#333",
|
|
2308
|
+
outFillColor: "#2F88FF",
|
|
2309
|
+
innerStrokeColor: "#FFF",
|
|
2310
|
+
innerFillColor: "#43CCF8"
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
prefix: "i"
|
|
2314
|
+
};
|
|
2315
|
+
function Gr() {
|
|
2316
|
+
return "icon-" + ((1 + Math.random()) * 4294967296 | 0).toString(16).substring(1);
|
|
2317
|
+
}
|
|
2318
|
+
function Xr(e, n, r) {
|
|
2319
|
+
var t = typeof n.fill == "string" ? [n.fill] : n.fill || [], o = [], i = n.theme || r.theme;
|
|
2320
|
+
switch (i) {
|
|
2321
|
+
case "outline":
|
|
2322
|
+
o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push("none"), o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push("none");
|
|
2323
|
+
break;
|
|
2324
|
+
case "filled":
|
|
2325
|
+
o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push("#FFF"), o.push("#FFF");
|
|
2326
|
+
break;
|
|
2327
|
+
case "two-tone":
|
|
2328
|
+
o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push(typeof t[1] == "string" ? t[1] : r.colors.twoTone.twoTone), o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push(typeof t[1] == "string" ? t[1] : r.colors.twoTone.twoTone);
|
|
2329
|
+
break;
|
|
2330
|
+
case "multi-color":
|
|
2331
|
+
o.push(typeof t[0] == "string" ? t[0] : "currentColor"), o.push(typeof t[1] == "string" ? t[1] : r.colors.multiColor.outFillColor), o.push(typeof t[2] == "string" ? t[2] : r.colors.multiColor.innerStrokeColor), o.push(typeof t[3] == "string" ? t[3] : r.colors.multiColor.innerFillColor);
|
|
2332
|
+
break;
|
|
2333
|
+
}
|
|
2334
|
+
return {
|
|
2335
|
+
size: n.size || r.size,
|
|
2336
|
+
strokeWidth: n.strokeWidth || r.strokeWidth,
|
|
2337
|
+
strokeLinecap: n.strokeLinecap || r.strokeLinecap,
|
|
2338
|
+
strokeLinejoin: n.strokeLinejoin || r.strokeLinejoin,
|
|
2339
|
+
colors: o,
|
|
2340
|
+
id: e
|
|
2341
|
+
};
|
|
2342
|
+
}
|
|
2343
|
+
var cn = /* @__PURE__ */ wn(Kr);
|
|
2344
|
+
cn.Provider;
|
|
2345
|
+
function xe(e, n, r) {
|
|
2346
|
+
return function(t) {
|
|
2347
|
+
var o = t.size, i = t.strokeWidth, a = t.strokeLinecap, s = t.strokeLinejoin, l = t.theme, c = t.fill, f = t.className, u = t.spin, v = Ur(t, Hr), h = En(cn), b = ue(Gr, []), E = Xr(b, {
|
|
2348
|
+
size: o,
|
|
2349
|
+
strokeWidth: i,
|
|
2350
|
+
strokeLinecap: a,
|
|
2351
|
+
strokeLinejoin: s,
|
|
2352
|
+
theme: l,
|
|
2353
|
+
fill: c
|
|
2354
|
+
}, h), P = [h.prefix + "-icon"];
|
|
2355
|
+
return P.push(h.prefix + "-icon-" + e), n && h.rtl && P.push(h.prefix + "-icon-rtl"), u && P.push(h.prefix + "-icon-spin"), f && P.push(f), /* @__PURE__ */ S.createElement("span", Ft(Ft({}, v), {}, {
|
|
2356
|
+
className: P.join(" ")
|
|
2357
|
+
}), r(E));
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
const Zr = xe("grid-three", !0, function(e) {
|
|
2361
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2362
|
+
width: e.size,
|
|
2363
|
+
height: e.size,
|
|
2364
|
+
viewBox: "0 0 48 48",
|
|
2365
|
+
fill: "none"
|
|
2366
|
+
}, /* @__PURE__ */ S.createElement("path", {
|
|
2367
|
+
d: "M39.3 6H8.7C7.20883 6 6 7.20883 6 8.7V39.3C6 40.7912 7.20883 42 8.7 42H39.3C40.7912 42 42 40.7912 42 39.3V8.7C42 7.20883 40.7912 6 39.3 6Z",
|
|
2368
|
+
stroke: e.colors[0],
|
|
2369
|
+
strokeWidth: e.strokeWidth
|
|
2370
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2371
|
+
d: "M15 6L15 42",
|
|
2372
|
+
stroke: e.colors[0],
|
|
2373
|
+
strokeWidth: e.strokeWidth,
|
|
2374
|
+
strokeLinecap: e.strokeLinecap
|
|
2375
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2376
|
+
d: "M42 17H6",
|
|
2377
|
+
stroke: e.colors[0],
|
|
2378
|
+
strokeWidth: e.strokeWidth,
|
|
2379
|
+
strokeLinecap: e.strokeLinecap
|
|
2380
|
+
}));
|
|
2381
|
+
}), Jr = xe("home", !1, function(e) {
|
|
2382
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2383
|
+
width: e.size,
|
|
2384
|
+
height: e.size,
|
|
2385
|
+
viewBox: "0 0 48 48",
|
|
2386
|
+
fill: "none"
|
|
2387
|
+
}, /* @__PURE__ */ S.createElement("path", {
|
|
2388
|
+
d: "M9 18V42H39V18L24 6L9 18Z",
|
|
2389
|
+
fill: e.colors[1],
|
|
2390
|
+
stroke: e.colors[0],
|
|
2391
|
+
strokeWidth: e.strokeWidth,
|
|
2392
|
+
strokeLinecap: e.strokeLinecap,
|
|
2393
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2394
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2395
|
+
d: "M19 29V42H29V29H19Z",
|
|
2396
|
+
fill: e.colors[3],
|
|
2397
|
+
stroke: e.colors[2],
|
|
2398
|
+
strokeWidth: e.strokeWidth,
|
|
2399
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2400
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2401
|
+
d: "M9 42H39",
|
|
2402
|
+
stroke: e.colors[0],
|
|
2403
|
+
strokeWidth: e.strokeWidth,
|
|
2404
|
+
strokeLinecap: e.strokeLinecap
|
|
2405
|
+
}));
|
|
2406
|
+
}), ln = xe("info", !0, function(e) {
|
|
2407
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2408
|
+
width: e.size,
|
|
2409
|
+
height: e.size,
|
|
2410
|
+
viewBox: "0 0 48 48",
|
|
2411
|
+
fill: "none"
|
|
2412
|
+
}, /* @__PURE__ */ S.createElement("path", {
|
|
2413
|
+
d: "M24 44C29.5228 44 34.5228 41.7614 38.1421 38.1421C41.7614 34.5228 44 29.5228 44 24C44 18.4772 41.7614 13.4772 38.1421 9.85786C34.5228 6.23858 29.5228 4 24 4C18.4772 4 13.4772 6.23858 9.85786 9.85786C6.23858 13.4772 4 18.4772 4 24C4 29.5228 6.23858 34.5228 9.85786 38.1421C13.4772 41.7614 18.4772 44 24 44Z",
|
|
2414
|
+
fill: e.colors[1],
|
|
2415
|
+
stroke: e.colors[0],
|
|
2416
|
+
strokeWidth: e.strokeWidth,
|
|
2417
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2418
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2419
|
+
fillRule: "evenodd",
|
|
2420
|
+
clipRule: "evenodd",
|
|
2421
|
+
d: "M24 11C25.3807 11 26.5 12.1193 26.5 13.5C26.5 14.8807 25.3807 16 24 16C22.6193 16 21.5 14.8807 21.5 13.5C21.5 12.1193 22.6193 11 24 11Z",
|
|
2422
|
+
fill: e.colors[2]
|
|
2423
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2424
|
+
d: "M24.5 34V20H23.5H22.5",
|
|
2425
|
+
stroke: e.colors[2],
|
|
2426
|
+
strokeWidth: e.strokeWidth,
|
|
2427
|
+
strokeLinecap: e.strokeLinecap,
|
|
2428
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2429
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2430
|
+
d: "M21 34H28",
|
|
2431
|
+
stroke: e.colors[2],
|
|
2432
|
+
strokeWidth: e.strokeWidth,
|
|
2433
|
+
strokeLinecap: e.strokeLinecap,
|
|
2434
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2435
|
+
}));
|
|
2436
|
+
}), Qr = xe("layout-one", !0, function(e) {
|
|
2437
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2438
|
+
width: e.size,
|
|
2439
|
+
height: e.size,
|
|
2440
|
+
viewBox: "0 0 48 48",
|
|
2441
|
+
fill: "none"
|
|
2442
|
+
}, /* @__PURE__ */ S.createElement("rect", {
|
|
2443
|
+
x: "6",
|
|
2444
|
+
y: "6",
|
|
2445
|
+
width: "36",
|
|
2446
|
+
height: "36",
|
|
2447
|
+
rx: "3",
|
|
2448
|
+
fill: e.colors[1],
|
|
2449
|
+
stroke: e.colors[0],
|
|
2450
|
+
strokeWidth: e.strokeWidth,
|
|
2451
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2452
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2453
|
+
d: "M6 16H42",
|
|
2454
|
+
stroke: e.colors[2],
|
|
2455
|
+
strokeWidth: e.strokeWidth,
|
|
2456
|
+
strokeLinecap: e.strokeLinecap,
|
|
2457
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2458
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2459
|
+
d: "M6 13V19",
|
|
2460
|
+
stroke: e.colors[0],
|
|
2461
|
+
strokeWidth: e.strokeWidth,
|
|
2462
|
+
strokeLinecap: e.strokeLinecap,
|
|
2463
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2464
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2465
|
+
d: "M42 14V20",
|
|
2466
|
+
stroke: e.colors[0],
|
|
2467
|
+
strokeWidth: e.strokeWidth,
|
|
2468
|
+
strokeLinecap: e.strokeLinecap,
|
|
2469
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2470
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2471
|
+
d: "M32 16V42",
|
|
2472
|
+
stroke: e.colors[2],
|
|
2473
|
+
strokeWidth: e.strokeWidth,
|
|
2474
|
+
strokeLinecap: e.strokeLinecap,
|
|
2475
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2476
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2477
|
+
d: "M29 42H35",
|
|
2478
|
+
stroke: e.colors[0],
|
|
2479
|
+
strokeWidth: e.strokeWidth,
|
|
2480
|
+
strokeLinecap: e.strokeLinecap,
|
|
2481
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2482
|
+
}));
|
|
2483
|
+
}), un = xe("logout", !0, function(e) {
|
|
2484
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2485
|
+
width: e.size,
|
|
2486
|
+
height: e.size,
|
|
2487
|
+
viewBox: "0 0 48 48",
|
|
2488
|
+
fill: "none"
|
|
2489
|
+
}, /* @__PURE__ */ S.createElement("path", {
|
|
2490
|
+
d: "M23.9917 6H6V42H24",
|
|
2491
|
+
stroke: e.colors[0],
|
|
2492
|
+
strokeWidth: e.strokeWidth,
|
|
2493
|
+
strokeLinecap: e.strokeLinecap,
|
|
2494
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2495
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2496
|
+
d: "M33 33L42 24L33 15",
|
|
2497
|
+
stroke: e.colors[0],
|
|
2498
|
+
strokeWidth: e.strokeWidth,
|
|
2499
|
+
strokeLinecap: e.strokeLinecap,
|
|
2500
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2501
|
+
}), /* @__PURE__ */ S.createElement("path", {
|
|
2502
|
+
d: "M16 23.9917H42",
|
|
2503
|
+
stroke: e.colors[0],
|
|
2504
|
+
strokeWidth: e.strokeWidth,
|
|
2505
|
+
strokeLinecap: e.strokeLinecap,
|
|
2506
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2507
|
+
}));
|
|
2508
|
+
}), eo = xe("right", !0, function(e) {
|
|
2509
|
+
return /* @__PURE__ */ S.createElement("svg", {
|
|
2510
|
+
width: e.size,
|
|
2511
|
+
height: e.size,
|
|
2512
|
+
viewBox: "0 0 48 48",
|
|
2513
|
+
fill: "none"
|
|
2514
|
+
}, /* @__PURE__ */ S.createElement("path", {
|
|
2515
|
+
d: "M19 12L31 24L19 36",
|
|
2516
|
+
stroke: e.colors[0],
|
|
2517
|
+
strokeWidth: e.strokeWidth,
|
|
2518
|
+
strokeLinecap: e.strokeLinecap,
|
|
2519
|
+
strokeLinejoin: e.strokeLinejoin
|
|
2520
|
+
}));
|
|
2521
|
+
});
|
|
2522
|
+
function to(e) {
|
|
2523
|
+
return typeof e == "number" ? e === 0 ? 1 : 0 : e === "legacy" ? "modern" : e === "modern" ? "legacy" : 0;
|
|
2524
|
+
}
|
|
2525
|
+
function no() {
|
|
2526
|
+
const { layoutStyle: e, setLayoutStyle: n } = ce(), r = ut(), t = to(e), o = e === 0 || e === "legacy";
|
|
2527
|
+
return /* @__PURE__ */ d(Te, { placement: "top", title: o ? "切换到顶部菜单" : "切换到左侧菜单", children: /* @__PURE__ */ d(
|
|
2528
|
+
be,
|
|
2529
|
+
{
|
|
2530
|
+
type: "text",
|
|
2531
|
+
className: "hover:bg-gray-100 rounded h-8 w-8 flex-center",
|
|
2532
|
+
onClick: () => {
|
|
2533
|
+
r.layout?.set?.(t === 0 ? "legacy" : "modern"), n(t);
|
|
2534
|
+
},
|
|
2535
|
+
children: o ? /* @__PURE__ */ d(Zr, { theme: "outline", size: "16", className: "text-slate-500" }) : /* @__PURE__ */ d(
|
|
2536
|
+
Qr,
|
|
2537
|
+
{
|
|
2538
|
+
theme: "outline",
|
|
2539
|
+
size: "16",
|
|
2540
|
+
className: "text-slate-500 -scale-x-100"
|
|
2541
|
+
}
|
|
2542
|
+
)
|
|
2543
|
+
}
|
|
2544
|
+
) });
|
|
2545
|
+
}
|
|
2546
|
+
const ro = () => {
|
|
2547
|
+
const { user: e, recoverConfig: n } = ce(), r = ye(), t = ut(), o = Ut(), i = nn(
|
|
2548
|
+
() => o({
|
|
2549
|
+
url: "v1/system/logout",
|
|
2550
|
+
method: "post"
|
|
2551
|
+
}),
|
|
2552
|
+
{
|
|
2553
|
+
manual: !0
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2556
|
+
return /* @__PURE__ */ V("section", { className: "bg-white mt-4 p-3 pr-2 flex items-center border border-slate-200 rounded-lg m-2", children: [
|
|
2557
|
+
/* @__PURE__ */ V("div", { className: "ml-1 flex-1", children: [
|
|
2558
|
+
/* @__PURE__ */ d("div", { className: "text-slate-600 font-bold", children: e.userName }),
|
|
2559
|
+
/* @__PURE__ */ V("div", { className: "text-slate-400 text-sm", children: [
|
|
2560
|
+
"@",
|
|
2561
|
+
e.roles
|
|
2562
|
+
] })
|
|
2563
|
+
] }),
|
|
2564
|
+
/* @__PURE__ */ d(st, { to: "userinfo", className: "hover:bg-gray-100 rounded h-8 w-8 flex-center", children: /* @__PURE__ */ d(ln, { theme: "outline", size: "16", className: "text-slate-500" }) }),
|
|
2565
|
+
/* @__PURE__ */ d(no, {}),
|
|
2566
|
+
/* @__PURE__ */ d(
|
|
2567
|
+
vn,
|
|
2568
|
+
{
|
|
2569
|
+
title: "确认注销?",
|
|
2570
|
+
onConfirm: () => {
|
|
2571
|
+
i.run(), t.token?.set?.(""), t.user?.set?.(""), n(), r("/login");
|
|
2572
|
+
},
|
|
2573
|
+
children: /* @__PURE__ */ d(be, { type: "text", className: "hover:bg-gray-100 rounded h-8 w-8 flex-center", children: /* @__PURE__ */ d(un, { theme: "outline", size: "16", className: "text-slate-500" }) })
|
|
2574
|
+
}
|
|
2575
|
+
)
|
|
2576
|
+
] });
|
|
2577
|
+
}, oo = (e) => {
|
|
2578
|
+
const { cls: n } = e, r = ve(
|
|
2579
|
+
"aside_tree flex-shrink-0 flex flex-col overflow-auto h-screen sticky top-0 border-r border-r-slate-200 w-[248px] bg-slate-50 text-gray-700 text-sm",
|
|
2580
|
+
n
|
|
2581
|
+
);
|
|
2582
|
+
return /* @__PURE__ */ V("aside", { className: r, children: [
|
|
2583
|
+
/* @__PURE__ */ d(qr, {}),
|
|
2584
|
+
e.loading ? /* @__PURE__ */ V(ke, { children: [
|
|
2585
|
+
/* @__PURE__ */ d(Br, {}),
|
|
2586
|
+
/* @__PURE__ */ d(ro, {})
|
|
2587
|
+
] }) : e.spin
|
|
2588
|
+
] });
|
|
2589
|
+
};
|
|
2590
|
+
var io = "[object AsyncFunction]", ao = "[object Function]", so = "[object GeneratorFunction]", co = "[object Proxy]";
|
|
2591
|
+
function lo(e) {
|
|
2592
|
+
if (!Ce(e))
|
|
2593
|
+
return !1;
|
|
2594
|
+
var n = en(e);
|
|
2595
|
+
return n == ao || n == so || n == io || n == co;
|
|
2596
|
+
}
|
|
2597
|
+
const uo = () => {
|
|
2598
|
+
const n = Tn().map((r) => {
|
|
2599
|
+
const { getTitle: t, title: o } = r.handle || {};
|
|
2600
|
+
return {
|
|
2601
|
+
title: lo(t) ? t(r) : o,
|
|
2602
|
+
path: r.pathname
|
|
2603
|
+
};
|
|
2604
|
+
}).filter((r) => !!r.title);
|
|
2605
|
+
return /* @__PURE__ */ V("header", { children: [
|
|
2606
|
+
/* @__PURE__ */ V("section", { className: "my-3 flex items-center text-gray-500 text-sm", children: [
|
|
2607
|
+
/* @__PURE__ */ d(st, { to: "/home", children: /* @__PURE__ */ d(Jr, { theme: "outline", size: "20" }) }),
|
|
2608
|
+
n.map(({ title: r, path: t }, o) => o > 0 ? /* @__PURE__ */ V(ke, { children: [
|
|
2609
|
+
/* @__PURE__ */ d(eo, { theme: "outline", size: "14", className: "text-gray-200 mx-2" }),
|
|
2610
|
+
/* @__PURE__ */ d(
|
|
2611
|
+
st,
|
|
2612
|
+
{
|
|
2613
|
+
to: t,
|
|
2614
|
+
className: o === n.length - 1 ? "text-gray-500 font-bold" : "",
|
|
2615
|
+
children: r
|
|
2616
|
+
}
|
|
2617
|
+
)
|
|
2618
|
+
] }, o) : /* @__PURE__ */ d(ke, {}, o))
|
|
2619
|
+
] }),
|
|
2620
|
+
/* @__PURE__ */ d("section", { className: "mt-8 mb-4 text-2xl font-bold" })
|
|
2621
|
+
] });
|
|
2622
|
+
}, Wo = () => {
|
|
2623
|
+
const { userReq: e, menuReq: n } = ce();
|
|
2624
|
+
pt(() => {
|
|
2625
|
+
!e.data && e.run(), !n.data && n.run();
|
|
2626
|
+
});
|
|
2627
|
+
const [r, t] = se(!0), o = Pe(), i = Y(null), a = ve(
|
|
2628
|
+
r ? "opacity-100 w-[248px]" : "!w-0 opacity-0",
|
|
2629
|
+
"transition-all duration-200"
|
|
2630
|
+
), s = ue(
|
|
2631
|
+
() => /* @__PURE__ */ d("div", { className: "p-4 pl-6", children: /* @__PURE__ */ d(qe, {}) }),
|
|
2632
|
+
[]
|
|
2633
|
+
);
|
|
2634
|
+
return /* @__PURE__ */ V("div", { className: "sg-layout sg-layout--main flex overflow-hidden w-screen", children: [
|
|
2635
|
+
/* @__PURE__ */ d(
|
|
2636
|
+
oo,
|
|
2637
|
+
{
|
|
2638
|
+
loading: !!n.data,
|
|
2639
|
+
spin: s,
|
|
2640
|
+
cls: a
|
|
2641
|
+
}
|
|
2642
|
+
),
|
|
2643
|
+
/* @__PURE__ */ d(Vt, { status: r, setStatus: t }),
|
|
2644
|
+
n.data ? /* @__PURE__ */ d(ke, { children: /* @__PURE__ */ V("main", { className: "flex flex-col flex-1 overflow-x-auto p-8 pt-2 h-screen", children: [
|
|
2645
|
+
/* @__PURE__ */ d(uo, {}),
|
|
2646
|
+
/* @__PURE__ */ d(gt, { children: /* @__PURE__ */ d(
|
|
2647
|
+
yt,
|
|
2648
|
+
{
|
|
2649
|
+
timeout: 100,
|
|
2650
|
+
classNames: "fade",
|
|
2651
|
+
appear: !0,
|
|
2652
|
+
unmountOnExit: !0,
|
|
2653
|
+
nodeRef: i,
|
|
2654
|
+
children: /* @__PURE__ */ d("div", { ref: i, children: /* @__PURE__ */ d(Bt, { children: /* @__PURE__ */ d(kn, {}) }) })
|
|
2655
|
+
},
|
|
2656
|
+
o.pathname
|
|
2657
|
+
) })
|
|
2658
|
+
] }) }) : s
|
|
2659
|
+
] });
|
|
2660
|
+
};
|
|
2661
|
+
function fo() {
|
|
2662
|
+
const e = Pe(), n = ye(), { setActiveTopLabel: r, layoutStyle: t } = ce();
|
|
2663
|
+
te(() => {
|
|
2664
|
+
if (Sn(t)) return;
|
|
2665
|
+
const o = e.pathname.substring(1);
|
|
2666
|
+
if (o === "") {
|
|
2667
|
+
n("/home", { replace: !0 });
|
|
2668
|
+
return;
|
|
2669
|
+
}
|
|
2670
|
+
const i = o.indexOf("/") === -1 ? o : o.substring(0, o.indexOf("/"));
|
|
2671
|
+
r(i);
|
|
2672
|
+
}, [t, e.pathname, n, r]);
|
|
2673
|
+
}
|
|
2674
|
+
const fn = (e, n) => n.every((r) => e.includes(r)), po = () => {
|
|
2675
|
+
const { menus: e, activeTopLabel: n, activeLeftMenuChildren: r, flattenRoutes: t } = ce(), o = ye(), i = Pe(), [a, s] = se([""]), l = e.map((u) => u?.key);
|
|
2676
|
+
return te(() => {
|
|
2677
|
+
s(i.pathname.substring(1).split("/"));
|
|
2678
|
+
}, [i.pathname]), /* @__PURE__ */ d("section", { className: "flex-1 flex flex-col justify-between", children: /* @__PURE__ */ d(
|
|
2679
|
+
zt,
|
|
2680
|
+
{
|
|
2681
|
+
mode: "inline",
|
|
2682
|
+
openKeys: a,
|
|
2683
|
+
onOpenChange: (u) => {
|
|
2684
|
+
const v = u.find((h) => a.indexOf(h) === -1);
|
|
2685
|
+
l.indexOf(v) === -1 ? s(u) : s(v ? [v] : []);
|
|
2686
|
+
},
|
|
2687
|
+
onClick: ({ keyPath: u, key: v }) => {
|
|
2688
|
+
if (v.indexOf("://") !== -1) {
|
|
2689
|
+
window.open(v);
|
|
2690
|
+
return;
|
|
2691
|
+
}
|
|
2692
|
+
const h = u.reverse().join("/");
|
|
2693
|
+
if (i.pathname.substring(1) !== v) {
|
|
2694
|
+
const b = `${n}/${h}`.split("/"), E = t.findIndex(
|
|
2695
|
+
(P) => fn(String(P.key).split("?")[0].split("/"), b)
|
|
2696
|
+
);
|
|
2697
|
+
E >= 0 && o(`/${t[E].key}`);
|
|
2698
|
+
}
|
|
2699
|
+
},
|
|
2700
|
+
selectedKeys: i.pathname.substring(1).split("/"),
|
|
2701
|
+
items: r,
|
|
2702
|
+
style: { borderInlineWidth: 0 },
|
|
2703
|
+
className: "border-b border-slate-100"
|
|
2704
|
+
}
|
|
2705
|
+
) });
|
|
2706
|
+
}, ho = (e) => {
|
|
2707
|
+
const { cls: n } = e, r = ve(
|
|
2708
|
+
"aside_tree flex-shrink-0 flex flex-col overflow-auto h-full sticky top-0 border-r border-r-slate-200 w-[248px] bg-slate-50 text-gray-700 text-sm",
|
|
2709
|
+
n
|
|
2710
|
+
);
|
|
2711
|
+
return /* @__PURE__ */ d("aside", { className: r, children: e.loading ? /* @__PURE__ */ d(ke, { children: /* @__PURE__ */ d(po, {}) }) : e.spin });
|
|
2712
|
+
}, mo = () => {
|
|
2713
|
+
const { userReq: e, recoverConfig: n, resetTabs: r } = ce(), t = ye(), [o, i] = se(!1), a = e.data?.data?.user || {}, s = ut(), l = Ut(), c = nn(
|
|
2714
|
+
() => l({
|
|
2715
|
+
url: "v1/system/logout",
|
|
2716
|
+
method: "post"
|
|
2717
|
+
}),
|
|
2718
|
+
{
|
|
2719
|
+
manual: !0
|
|
2720
|
+
}
|
|
2721
|
+
);
|
|
2722
|
+
return /* @__PURE__ */ V(xt, { children: [
|
|
2723
|
+
/* @__PURE__ */ d("section", { className: "pr-2 flex items-center", children: /* @__PURE__ */ d(
|
|
2724
|
+
qt,
|
|
2725
|
+
{
|
|
2726
|
+
menu: { items: [
|
|
2727
|
+
{
|
|
2728
|
+
key: "info",
|
|
2729
|
+
label: /* @__PURE__ */ V(Et, { children: [
|
|
2730
|
+
/* @__PURE__ */ d(ln, { theme: "outline", size: "14", className: "text-slate-500" }),
|
|
2731
|
+
/* @__PURE__ */ d("span", { className: "text-slate-500", children: "个人信息" })
|
|
2732
|
+
] }),
|
|
2733
|
+
onClick: () => {
|
|
2734
|
+
t("/userinfo");
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
key: "logout",
|
|
2739
|
+
label: /* @__PURE__ */ V(Et, { children: [
|
|
2740
|
+
/* @__PURE__ */ d(un, { theme: "outline", size: "14", className: "text-slate-500" }),
|
|
2741
|
+
/* @__PURE__ */ d("span", { className: "text-slate-500", children: "退出" })
|
|
2742
|
+
] }),
|
|
2743
|
+
onClick: () => i(!0)
|
|
2744
|
+
}
|
|
2745
|
+
] },
|
|
2746
|
+
placement: "topRight",
|
|
2747
|
+
arrow: { pointAtCenter: !0 },
|
|
2748
|
+
children: /* @__PURE__ */ d(pn, { className: "mr-1", children: String(a?.nickName || "").substring(0, 1) })
|
|
2749
|
+
}
|
|
2750
|
+
) }),
|
|
2751
|
+
/* @__PURE__ */ d(
|
|
2752
|
+
hn,
|
|
2753
|
+
{
|
|
2754
|
+
centered: !0,
|
|
2755
|
+
title: /* @__PURE__ */ d("span", { className: "text-[20px] leading-[20px] font-[400] text-[#333]", children: "您确定要退出吗?" }),
|
|
2756
|
+
footer: /* @__PURE__ */ V(xt, { children: [
|
|
2757
|
+
/* @__PURE__ */ d(
|
|
2758
|
+
be,
|
|
2759
|
+
{
|
|
2760
|
+
type: "default",
|
|
2761
|
+
onClick: () => {
|
|
2762
|
+
c.run(), s.token?.set?.(""), s.user?.set?.(""), r(), n(), t("/login");
|
|
2763
|
+
},
|
|
2764
|
+
children: "退出"
|
|
2765
|
+
}
|
|
2766
|
+
),
|
|
2767
|
+
/* @__PURE__ */ d(be, { type: "primary", onClick: () => i(!1), children: "保持登录" })
|
|
2768
|
+
] }),
|
|
2769
|
+
maskClosable: !1,
|
|
2770
|
+
open: o,
|
|
2771
|
+
width: 416,
|
|
2772
|
+
onCancel: () => i(!1),
|
|
2773
|
+
onOk: () => i(!1),
|
|
2774
|
+
transitionName: "",
|
|
2775
|
+
maskTransitionName: "",
|
|
2776
|
+
children: /* @__PURE__ */ d("p", { className: "text-[13px] mt-[16px] mb-[39px] text-[#626675] leading-[13px]", children: "退出后,个人信息、部分缓存数据等功能可能无法使用。" })
|
|
2777
|
+
}
|
|
2778
|
+
)
|
|
2779
|
+
] });
|
|
2780
|
+
}, vo = (e) => {
|
|
2781
|
+
const { className: n } = e, r = ye(), { topRootMenus: t, setActiveTopLabel: o, activeTopLabel: i } = ce(), a = Yt(), s = Y(null), [l, c] = se(!1), [f, u] = se(!1), v = () => {
|
|
2782
|
+
const w = s.current;
|
|
2783
|
+
if (!w) return;
|
|
2784
|
+
const B = w.scrollWidth - w.clientWidth;
|
|
2785
|
+
c(w.scrollLeft > 0), u(B > 0 && w.scrollLeft < B - 1);
|
|
2786
|
+
};
|
|
2787
|
+
te(() => {
|
|
2788
|
+
v();
|
|
2789
|
+
const w = s.current;
|
|
2790
|
+
if (!w) return;
|
|
2791
|
+
const B = () => v(), L = () => v(), N = (m) => {
|
|
2792
|
+
if (w.scrollWidth - w.clientWidth <= 0) return;
|
|
2793
|
+
const k = m.deltaX !== 0 ? m.deltaX : m.deltaY;
|
|
2794
|
+
if (k === 0) return;
|
|
2795
|
+
const y = w.scrollLeft;
|
|
2796
|
+
w.scrollLeft += k, w.scrollLeft !== y && m.preventDefault();
|
|
2797
|
+
};
|
|
2798
|
+
return w.addEventListener("scroll", B, { passive: !0 }), w.addEventListener("wheel", N, { passive: !1 }), window.addEventListener("resize", L), () => {
|
|
2799
|
+
w.removeEventListener("scroll", B), w.removeEventListener("wheel", N), window.removeEventListener("resize", L);
|
|
2800
|
+
};
|
|
2801
|
+
}, [t.length]);
|
|
2802
|
+
const h = ue(
|
|
2803
|
+
() => ve(
|
|
2804
|
+
"modern-top-menu",
|
|
2805
|
+
l && "is-scroll-left",
|
|
2806
|
+
f && "is-scroll-right"
|
|
2807
|
+
),
|
|
2808
|
+
[l, f]
|
|
2809
|
+
), b = (w) => {
|
|
2810
|
+
const B = s.current;
|
|
2811
|
+
B && B.scrollBy({ left: w, behavior: "smooth" });
|
|
2812
|
+
}, E = ve(n), P = "modern-top-menu__item";
|
|
2813
|
+
return /* @__PURE__ */ d("header", { className: E, children: /* @__PURE__ */ V("section", { className: "flex justify-between text-gray-500 text-sm border-b border-slate-200", children: [
|
|
2814
|
+
/* @__PURE__ */ d("div", { className: "w-[247px]", children: /* @__PURE__ */ V("section", { className: "flex items-center justify-start border-slate-200 mx-4 text-center my-3", children: [
|
|
2815
|
+
/* @__PURE__ */ d(
|
|
2816
|
+
"svg",
|
|
2817
|
+
{
|
|
2818
|
+
className: "w-8 h-8 fill-red-500",
|
|
2819
|
+
viewBox: "0 0 400 400",
|
|
2820
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2821
|
+
children: /* @__PURE__ */ V("g", { children: [
|
|
2822
|
+
/* @__PURE__ */ d("ellipse", { cx: "200.611", cy: "200.667", rx: "177.778", ry: "177.778" }),
|
|
2823
|
+
/* @__PURE__ */ d(
|
|
2824
|
+
"path",
|
|
2825
|
+
{
|
|
2826
|
+
fill: "#fff",
|
|
2827
|
+
d: "M28.944 221.778l197.5-194.445L367 254.556 227.556 374 28.944 221.778z"
|
|
2828
|
+
}
|
|
2829
|
+
),
|
|
2830
|
+
/* @__PURE__ */ d("path", { d: "M78.431 253.29c15.953 45.715 69.05 64.287 135.717 66.433 166.908 12.62 192.836-144.553 36.578-120.73-64.853 10.321-82.784-8.213-85.598-36.225-2.813-28.012 30.315-52.258 67.58-53.362 37.264-1.103 54.208 22.032 48.86 41.818l-9.562 19.561c41.474-19.361 20.499-63.282-27.842-79.486-153.068-31.708-185.996 155.8-20.504 125.847 68.981-11.553 134.89 63.901 2.433 88.456-23.908 3.21-100.442 8.175-127.509-42.995l-20.153-9.314z" }),
|
|
2831
|
+
/* @__PURE__ */ d("ellipse", { cx: "98.944", cy: "237.889", rx: "26.111", ry: "26.111" }),
|
|
2832
|
+
/* @__PURE__ */ d("ellipse", { cx: "259.222", cy: "153.167", rx: "21.944", ry: "21.944" })
|
|
2833
|
+
] })
|
|
2834
|
+
}
|
|
2835
|
+
),
|
|
2836
|
+
/* @__PURE__ */ d(Te, { title: a, children: /* @__PURE__ */ d("span", { className: "text-lg font-bold ml-2 bg-gradient-to-r from-red-500 to-orange-500 bg-clip text-transparent custom-logo-text", children: a.substring(0, 9) }) })
|
|
2837
|
+
] }) }),
|
|
2838
|
+
/* @__PURE__ */ d("section", { className: "flex flex-1 min-w-0 justify-start", children: /* @__PURE__ */ V("div", { className: h, children: [
|
|
2839
|
+
/* @__PURE__ */ d(
|
|
2840
|
+
be,
|
|
2841
|
+
{
|
|
2842
|
+
type: "text",
|
|
2843
|
+
className: "modern-top-menu__btn modern-top-menu__btn--left",
|
|
2844
|
+
onClick: () => b(-320),
|
|
2845
|
+
"aria-label": "scroll left",
|
|
2846
|
+
icon: /* @__PURE__ */ d(bn, {})
|
|
2847
|
+
}
|
|
2848
|
+
),
|
|
2849
|
+
/* @__PURE__ */ d("ul", { ref: s, className: "modern-ul", children: t.map((w) => /* @__PURE__ */ d(
|
|
2850
|
+
"li",
|
|
2851
|
+
{
|
|
2852
|
+
className: `${P} ${i === w.key ? "menu-checked" : ""}`,
|
|
2853
|
+
onClick: () => {
|
|
2854
|
+
o(w.key), r(`/${w.key}`);
|
|
2855
|
+
},
|
|
2856
|
+
title: String(w.label ?? ""),
|
|
2857
|
+
children: /* @__PURE__ */ d("span", { className: "modern-top-menu__item-text", children: w.label })
|
|
2858
|
+
},
|
|
2859
|
+
w.key
|
|
2860
|
+
)) }),
|
|
2861
|
+
/* @__PURE__ */ d(
|
|
2862
|
+
be,
|
|
2863
|
+
{
|
|
2864
|
+
type: "text",
|
|
2865
|
+
className: "modern-top-menu__btn modern-top-menu__btn--right",
|
|
2866
|
+
onClick: () => b(320),
|
|
2867
|
+
"aria-label": "scroll right",
|
|
2868
|
+
icon: /* @__PURE__ */ d(xn, {})
|
|
2869
|
+
}
|
|
2870
|
+
)
|
|
2871
|
+
] }) }),
|
|
2872
|
+
/* @__PURE__ */ d("section", { className: "flex-center w-[200px] justify-end mr-4", children: /* @__PURE__ */ d(mo, {}) })
|
|
2873
|
+
] }) });
|
|
2874
|
+
};
|
|
2875
|
+
var yo = (e) => {
|
|
2876
|
+
let n = e;
|
|
2877
|
+
for (; n = n.parentElement; ) {
|
|
2878
|
+
const r = getComputedStyle(n, null).getPropertyValue("overflow-y");
|
|
2879
|
+
if (n === document.body)
|
|
2880
|
+
return window;
|
|
2881
|
+
if (r === "auto" || r === "scroll" || r === "overlay")
|
|
2882
|
+
return n;
|
|
2883
|
+
}
|
|
2884
|
+
return window;
|
|
2885
|
+
}, dn = (e) => e.firstChild ? e.firstChild.offsetParent === e : !0, go = (e, n) => {
|
|
2886
|
+
let r = e, t = 0;
|
|
2887
|
+
dn(n) || (t += e.offsetTop - n.offsetTop, n = e.offsetParent, t += -e.offsetTop);
|
|
2888
|
+
do
|
|
2889
|
+
t += r.offsetTop, r = r.offsetParent;
|
|
2890
|
+
while (r && r !== n);
|
|
2891
|
+
return t;
|
|
2892
|
+
}, bo = (e) => {
|
|
2893
|
+
let n = e.parentElement;
|
|
2894
|
+
for (; n && getComputedStyle(n, null).getPropertyValue("display") === "contents"; )
|
|
2895
|
+
n = n.parentElement;
|
|
2896
|
+
return n || window;
|
|
2897
|
+
}, Oe = null;
|
|
2898
|
+
typeof CSS < "u" && CSS.supports && (CSS.supports("position", "sticky") ? Oe = "sticky" : CSS.supports("position", "-webkit-sticky") && (Oe = "-webkit-sticky"));
|
|
2899
|
+
var Ue = !1;
|
|
2900
|
+
try {
|
|
2901
|
+
const e = Object.defineProperty({}, "passive", {
|
|
2902
|
+
// eslint-disable-next-line getter-return
|
|
2903
|
+
get() {
|
|
2904
|
+
Ue = { passive: !0 };
|
|
2905
|
+
}
|
|
2906
|
+
}), n = () => {
|
|
2907
|
+
};
|
|
2908
|
+
window.addEventListener("testPassive", n, e), window.removeEventListener("testPassive", n, e);
|
|
2909
|
+
} catch {
|
|
2910
|
+
}
|
|
2911
|
+
var at = (e) => {
|
|
2912
|
+
const { el: n, onChange: r, unsubs: t, measure: o } = e;
|
|
2913
|
+
if (n === window) {
|
|
2914
|
+
const i = () => ({ top: 0, left: 0, height: window.innerHeight, width: window.innerWidth }), a = o(i()), s = () => {
|
|
2915
|
+
Object.assign(a, o(i())), r();
|
|
2916
|
+
};
|
|
2917
|
+
return window.addEventListener("resize", s, Ue), t.push(() => window.removeEventListener("resize", s)), a;
|
|
2918
|
+
} else {
|
|
2919
|
+
const i = o(n.getBoundingClientRect()), a = () => {
|
|
2920
|
+
Object.assign(i, o(n.getBoundingClientRect())), r();
|
|
2921
|
+
}, s = new ResizeObserver(a);
|
|
2922
|
+
return s.observe(n), t.push(() => s.disconnect()), i;
|
|
2923
|
+
}
|
|
2924
|
+
}, xo = (e) => {
|
|
2925
|
+
const n = getComputedStyle(e, null), r = parseInt(n.getPropertyValue("padding-top"), 10), t = parseInt(n.getPropertyValue("padding-bottom"), 10);
|
|
2926
|
+
return { top: r, bottom: t };
|
|
2927
|
+
}, Eo = (e, n, r) => {
|
|
2928
|
+
const { bottom: t, offsetBottom: o, offsetTop: i } = r, a = yo(e);
|
|
2929
|
+
let s = !1;
|
|
2930
|
+
const l = () => {
|
|
2931
|
+
s || requestAnimationFrame(() => {
|
|
2932
|
+
const k = u();
|
|
2933
|
+
if (k !== L)
|
|
2934
|
+
N(k);
|
|
2935
|
+
else if (k === 1 && !t) {
|
|
2936
|
+
const { height: y } = h, { height: T } = w;
|
|
2937
|
+
e.style.top = `${y - T - o}px`;
|
|
2938
|
+
} else if (k === 2) {
|
|
2939
|
+
const { height: y, offsetTop: T } = h, { height: O, naturalTop: _ } = P, { height: G } = w, U = Math.max(
|
|
2940
|
+
0,
|
|
2941
|
+
T + c + y - (_ + G + o)
|
|
2942
|
+
);
|
|
2943
|
+
if (t) {
|
|
2944
|
+
const K = Math.max(0, O - G - U);
|
|
2945
|
+
e.style.bottom = `${K}px`;
|
|
2946
|
+
} else
|
|
2947
|
+
e.style.top = `${U}px`;
|
|
2948
|
+
}
|
|
2949
|
+
s = !1;
|
|
2950
|
+
}), s = !0;
|
|
2951
|
+
};
|
|
2952
|
+
let c = a === window ? window.scrollY : a.scrollTop;
|
|
2953
|
+
const f = (k) => {
|
|
2954
|
+
const { offsetTop: y, height: T } = h, { naturalTop: O } = P, { height: _ } = w;
|
|
2955
|
+
return k + y + T >= O + _ + B + o;
|
|
2956
|
+
}, u = () => {
|
|
2957
|
+
const { height: k } = h, { height: y } = w;
|
|
2958
|
+
return y + i + o <= k ? 3 : f(c) ? 1 : 2;
|
|
2959
|
+
}, v = a !== window && dn(a), h = at({
|
|
2960
|
+
el: a,
|
|
2961
|
+
onChange: l,
|
|
2962
|
+
unsubs: n,
|
|
2963
|
+
measure: ({ height: k, top: y }) => ({
|
|
2964
|
+
height: k,
|
|
2965
|
+
offsetTop: v ? y : 0
|
|
2966
|
+
})
|
|
2967
|
+
}), b = bo(e), E = b === window ? { top: 0, bottom: 0 } : xo(b), P = at({
|
|
2968
|
+
el: b,
|
|
2969
|
+
onChange: l,
|
|
2970
|
+
unsubs: n,
|
|
2971
|
+
measure: ({ height: k }) => ({
|
|
2972
|
+
height: k - E.top - E.bottom,
|
|
2973
|
+
naturalTop: b === window ? 0 : go(b, a) + E.top + h.offsetTop
|
|
2974
|
+
})
|
|
2975
|
+
}), w = at({
|
|
2976
|
+
el: e,
|
|
2977
|
+
onChange: l,
|
|
2978
|
+
unsubs: n,
|
|
2979
|
+
measure: ({ height: k }) => ({ height: k })
|
|
2980
|
+
});
|
|
2981
|
+
let B = 0, L = u();
|
|
2982
|
+
const N = (k) => {
|
|
2983
|
+
const y = L;
|
|
2984
|
+
if (L = k, y === 2 && (B = -1), k === 3) {
|
|
2985
|
+
e.style.position = Oe, t ? e.style.bottom = `${o}px` : e.style.top = `${i}px`;
|
|
2986
|
+
return;
|
|
2987
|
+
}
|
|
2988
|
+
const { height: T, offsetTop: O } = h, { height: _, naturalTop: G } = P, { height: U } = w;
|
|
2989
|
+
if (k === 2)
|
|
2990
|
+
if (e.style.position = "relative", B = y === 0 ? Math.max(0, O + c - G + i) : Math.max(
|
|
2991
|
+
0,
|
|
2992
|
+
O + c + T - (G + U + o)
|
|
2993
|
+
), t) {
|
|
2994
|
+
const K = Math.max(0, _ - U - B);
|
|
2995
|
+
e.style.bottom = `${K}px`;
|
|
2996
|
+
} else
|
|
2997
|
+
e.style.top = `${B}px`;
|
|
2998
|
+
else
|
|
2999
|
+
e.style.position = Oe, k === 1 ? t ? e.style.bottom = `${o}px` : e.style.top = `${T - U - o}px` : t ? e.style.bottom = `${T - U - o}px` : e.style.top = `${i}px`;
|
|
3000
|
+
};
|
|
3001
|
+
N(L);
|
|
3002
|
+
const m = (k) => {
|
|
3003
|
+
if (k === c)
|
|
3004
|
+
return;
|
|
3005
|
+
const y = k - c;
|
|
3006
|
+
if (c = k, L === 3)
|
|
3007
|
+
return;
|
|
3008
|
+
const { offsetTop: T, height: O } = h, { naturalTop: _, height: G } = P, { height: U } = w;
|
|
3009
|
+
if (y > 0)
|
|
3010
|
+
if (L === 0) {
|
|
3011
|
+
if (k + T + i > _) {
|
|
3012
|
+
const K = Math.max(0, T + c - _ + i);
|
|
3013
|
+
k + T + O <= _ + U + K + o ? N(
|
|
3014
|
+
2
|
|
3015
|
+
/* relative */
|
|
3016
|
+
) : N(
|
|
3017
|
+
1
|
|
3018
|
+
/* stickyBottom */
|
|
3019
|
+
);
|
|
3020
|
+
}
|
|
3021
|
+
} else L === 2 && f(k) && N(
|
|
3022
|
+
1
|
|
3023
|
+
/* stickyBottom */
|
|
3024
|
+
);
|
|
3025
|
+
else if (L === 1) {
|
|
3026
|
+
if (T + k + O < _ + G + o) {
|
|
3027
|
+
const K = Math.max(
|
|
3028
|
+
0,
|
|
3029
|
+
T + c + O - (_ + U + o)
|
|
3030
|
+
);
|
|
3031
|
+
T + k + i >= _ + K ? N(
|
|
3032
|
+
2
|
|
3033
|
+
/* relative */
|
|
3034
|
+
) : N(
|
|
3035
|
+
0
|
|
3036
|
+
/* stickyTop */
|
|
3037
|
+
);
|
|
3038
|
+
}
|
|
3039
|
+
} else L === 2 && T + k + i < _ + B && N(
|
|
3040
|
+
0
|
|
3041
|
+
/* stickyTop */
|
|
3042
|
+
);
|
|
3043
|
+
}, j = a === window ? () => m(window.scrollY) : () => m(a.scrollTop);
|
|
3044
|
+
a.addEventListener("scroll", j, Ue), a.addEventListener("mousewheel", j, Ue), n.push(
|
|
3045
|
+
() => a.removeEventListener("scroll", j),
|
|
3046
|
+
() => a.removeEventListener("mousewheel", j)
|
|
3047
|
+
);
|
|
3048
|
+
}, wo = ({
|
|
3049
|
+
offsetTop: e = 0,
|
|
3050
|
+
offsetBottom: n = 0,
|
|
3051
|
+
bottom: r = !1
|
|
3052
|
+
} = {}) => {
|
|
3053
|
+
const [t, o] = se(null);
|
|
3054
|
+
return te(() => {
|
|
3055
|
+
if (!t || !Oe)
|
|
3056
|
+
return;
|
|
3057
|
+
const i = [];
|
|
3058
|
+
return Eo(t, i, { offsetBottom: n, offsetTop: e, bottom: r }), () => {
|
|
3059
|
+
i.forEach((a) => a());
|
|
3060
|
+
};
|
|
3061
|
+
}, [t, n, e, r]), o;
|
|
3062
|
+
}, To = (e) => {
|
|
3063
|
+
const { offsetTop: n, offsetBottom: r, bottom: t, children: o, className: i, style: a } = e, s = wo({ offsetTop: n, offsetBottom: r, bottom: t });
|
|
3064
|
+
return /* @__PURE__ */ d("div", { className: i, style: a, ref: s, children: o });
|
|
3065
|
+
}, ko = To;
|
|
3066
|
+
const Co = (e) => {
|
|
3067
|
+
const {
|
|
3068
|
+
flattenRoutes: n,
|
|
3069
|
+
panes: r,
|
|
3070
|
+
setPanes: t,
|
|
3071
|
+
activeLeftMenuChildren: o,
|
|
3072
|
+
activeKey: i,
|
|
3073
|
+
dynamicFlatternRouteScale: a,
|
|
3074
|
+
setActiveKey: s,
|
|
3075
|
+
resetTabs: l
|
|
3076
|
+
} = ce(), { className: c } = e, f = Pe(), u = ye(), [v, h] = se(!1), { showAlert: b } = Cn(), E = Y({});
|
|
3077
|
+
te(() => {
|
|
3078
|
+
const y = f.pathname.substring(1);
|
|
3079
|
+
if (y.split("/").length === 1 && o.length >= 1 || y.split("/").length === 1 && o[0]?.children)
|
|
3080
|
+
return;
|
|
3081
|
+
const T = n?.filter(
|
|
3082
|
+
(_) => fn(String(_.key).split("?")[0].split("/"), y.split("/"))
|
|
3083
|
+
)[0], O = T?.key ? window.location.href.indexOf("action=") > -1 ? {
|
|
3084
|
+
...T,
|
|
3085
|
+
label: f.state ?? new URLSearchParams(window.location.href).get("title") ?? "New Tab"
|
|
3086
|
+
} : { ...T } : void 0;
|
|
3087
|
+
if (T?.key && (O.key = y + f.search), !O && n.length) {
|
|
3088
|
+
r?.findIndex((_) => _.key === "404") === -1 && t([
|
|
3089
|
+
...r,
|
|
3090
|
+
n.filter((_) => _.key === "404")[0]
|
|
3091
|
+
]), s("404");
|
|
3092
|
+
return;
|
|
3093
|
+
}
|
|
3094
|
+
O && r?.findIndex((_) => _.key === O.key) === -1 && O.type !== "M" && (String(O.key).startsWith("lowcode/flow") && (a({
|
|
3095
|
+
path: y + f.search,
|
|
3096
|
+
component: "lowcode/flow/index",
|
|
3097
|
+
meta: { title: "工作流" }
|
|
3098
|
+
}), O.label = f.state), t([...r, O])), O?.key && s(O.key);
|
|
3099
|
+
}, [f, n, t, o]);
|
|
3100
|
+
const P = (y) => {
|
|
3101
|
+
s(y);
|
|
3102
|
+
}, w = (y, T) => {
|
|
3103
|
+
T === "remove" && L(y);
|
|
3104
|
+
}, B = (y) => {
|
|
3105
|
+
const T = r.filter((O) => O.key === y)[0];
|
|
3106
|
+
u(T.key);
|
|
3107
|
+
}, L = (y) => {
|
|
3108
|
+
const T = r, O = T.findIndex((U) => U.key === y);
|
|
3109
|
+
if (O < 0) return;
|
|
3110
|
+
const _ = T[Math.max(0, O - 1)]?.key ?? "home", G = [...T];
|
|
3111
|
+
G.splice(O, 1), t(G), u(_);
|
|
3112
|
+
}, N = async (y) => {
|
|
3113
|
+
const T = r, O = T.find((U) => U.key === "home") ?? T[0], _ = T.find((U) => U.key === E.current.key) ?? O;
|
|
3114
|
+
if (y) {
|
|
3115
|
+
l(), u("/home");
|
|
3116
|
+
return;
|
|
3117
|
+
}
|
|
3118
|
+
const G = _?.key !== "home" ? [O, _] : [O];
|
|
3119
|
+
t(G), s(_?.key ?? "home"), u(_?.key === "home" ? "/home" : _.key);
|
|
3120
|
+
};
|
|
3121
|
+
Ne(
|
|
3122
|
+
je.CLOSE,
|
|
3123
|
+
(y) => {
|
|
3124
|
+
const { closeAll: T = !1, jumpToHome: O = !1 } = y;
|
|
3125
|
+
if (T) {
|
|
3126
|
+
N(!0);
|
|
3127
|
+
return;
|
|
3128
|
+
}
|
|
3129
|
+
L(i), O && s("home");
|
|
3130
|
+
}
|
|
3131
|
+
), Ne(
|
|
3132
|
+
je.OPEN,
|
|
3133
|
+
(y) => {
|
|
3134
|
+
const {
|
|
3135
|
+
key: T = "",
|
|
3136
|
+
pageCode: O = "",
|
|
3137
|
+
query: _ = "",
|
|
3138
|
+
params: G = {},
|
|
3139
|
+
newWindow: U = !1
|
|
3140
|
+
} = y;
|
|
3141
|
+
let K = "";
|
|
3142
|
+
if (O && (K = n?.map((ne) => ne.key).filter((ne) => String(ne).endsWith(`pageCode=${O}`))[0]), T && !O && (K = n?.map((ne) => ne.key).filter((ne) => ne.key === T)[0]), K) {
|
|
3143
|
+
if (U) {
|
|
3144
|
+
window.open(`/#/${K + _}`);
|
|
3145
|
+
return;
|
|
3146
|
+
}
|
|
3147
|
+
u(`${K + _}`, G);
|
|
3148
|
+
} else
|
|
3149
|
+
b({
|
|
3150
|
+
type: "warning",
|
|
3151
|
+
title: `跳转页签找不到低代码页面参数 pageCode={${O}}。`,
|
|
3152
|
+
timeout: 3e3
|
|
3153
|
+
});
|
|
3154
|
+
}
|
|
3155
|
+
), Ne(je.ROUTE, (y) => {
|
|
3156
|
+
const { url: T = "/home", params: O = {} } = y;
|
|
3157
|
+
u(T, O);
|
|
3158
|
+
}), Ne(je.RELOAD, () => {
|
|
3159
|
+
h(!0), s(E.current.key), setTimeout(() => {
|
|
3160
|
+
h(!1);
|
|
3161
|
+
}, 500);
|
|
3162
|
+
});
|
|
3163
|
+
const m = (y) => {
|
|
3164
|
+
switch (y.domEvent.stopPropagation(), y.key) {
|
|
3165
|
+
case "1":
|
|
3166
|
+
h(!0), s(E.current.key), setTimeout(() => {
|
|
3167
|
+
h(!1);
|
|
3168
|
+
}, 500);
|
|
3169
|
+
return;
|
|
3170
|
+
case "2":
|
|
3171
|
+
L(E.current.key);
|
|
3172
|
+
return;
|
|
3173
|
+
case "3":
|
|
3174
|
+
N();
|
|
3175
|
+
return;
|
|
3176
|
+
case "4":
|
|
3177
|
+
N(!0);
|
|
3178
|
+
return;
|
|
3179
|
+
}
|
|
3180
|
+
}, j = ue(
|
|
3181
|
+
() => r?.map((y) => ({
|
|
3182
|
+
key: y.key,
|
|
3183
|
+
label: /* @__PURE__ */ d(
|
|
3184
|
+
qt,
|
|
3185
|
+
{
|
|
3186
|
+
menu: {
|
|
3187
|
+
items: [
|
|
3188
|
+
{ key: "1", label: "刷新" },
|
|
3189
|
+
{ key: "2", label: "关闭", disabled: y.key === "home" },
|
|
3190
|
+
{
|
|
3191
|
+
key: "3",
|
|
3192
|
+
label: "关闭其他",
|
|
3193
|
+
disabled: r.length < 3 && y.key !== "home"
|
|
3194
|
+
},
|
|
3195
|
+
{ key: "4", label: "关闭全部", disabled: y.key === "home" }
|
|
3196
|
+
],
|
|
3197
|
+
onClick: (T) => {
|
|
3198
|
+
E.current = y, m(T);
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
trigger: ["contextMenu"],
|
|
3202
|
+
children: /* @__PURE__ */ V("span", { children: [
|
|
3203
|
+
E.current.key === y.key && v && /* @__PURE__ */ d(
|
|
3204
|
+
qe,
|
|
3205
|
+
{
|
|
3206
|
+
size: "small",
|
|
3207
|
+
style: {
|
|
3208
|
+
transform: "scale(0.8)",
|
|
3209
|
+
marginRight: 5,
|
|
3210
|
+
marginTop: -2
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
),
|
|
3214
|
+
y.label
|
|
3215
|
+
] })
|
|
3216
|
+
}
|
|
3217
|
+
),
|
|
3218
|
+
children: /* @__PURE__ */ d(Bt, { children: v && E.current.key === y.key ? /* @__PURE__ */ d(qe, {}) : y.children }),
|
|
3219
|
+
closable: y.closable
|
|
3220
|
+
})),
|
|
3221
|
+
[r, v]
|
|
3222
|
+
);
|
|
3223
|
+
return /* @__PURE__ */ d(
|
|
3224
|
+
mn,
|
|
3225
|
+
{
|
|
3226
|
+
activeKey: i,
|
|
3227
|
+
className: c,
|
|
3228
|
+
hideAdd: !0,
|
|
3229
|
+
onChange: P,
|
|
3230
|
+
onEdit: w,
|
|
3231
|
+
onTabClick: B,
|
|
3232
|
+
type: "editable-card",
|
|
3233
|
+
size: "small",
|
|
3234
|
+
items: j,
|
|
3235
|
+
renderTabBar: (y, T) => /* @__PURE__ */ d(
|
|
3236
|
+
ko,
|
|
3237
|
+
{
|
|
3238
|
+
offsetTop: 0,
|
|
3239
|
+
offsetBottom: 0,
|
|
3240
|
+
style: { marginBottom: -5, zIndex: 10 },
|
|
3241
|
+
children: /* @__PURE__ */ d(T, { ...y, className: "bg-white" })
|
|
3242
|
+
}
|
|
3243
|
+
),
|
|
3244
|
+
tabBarExtraContent: /* @__PURE__ */ d("div", { className: "tab-transition" })
|
|
3245
|
+
}
|
|
3246
|
+
);
|
|
3247
|
+
}, $o = () => {
|
|
3248
|
+
const { userReq: e, menuReq: n } = ce();
|
|
3249
|
+
pt(() => {
|
|
3250
|
+
!e.data && e.run(), !n.data && n.run();
|
|
3251
|
+
});
|
|
3252
|
+
const [r, t] = se(!0);
|
|
3253
|
+
fo();
|
|
3254
|
+
const o = ve(
|
|
3255
|
+
r ? "opacity-100 w-[248px]" : "!w-0 opacity-0",
|
|
3256
|
+
"transition-all duration-200 border-t-0"
|
|
3257
|
+
), i = ue(
|
|
3258
|
+
() => /* @__PURE__ */ d("div", { className: "p-4 pl-6", children: /* @__PURE__ */ d(qe, {}) }),
|
|
3259
|
+
[]
|
|
3260
|
+
), a = ue(
|
|
3261
|
+
() => /* @__PURE__ */ d("section", { className: "pl-4 pr-4 w-full overflow-auto h-full", children: /* @__PURE__ */ d(Co, { defaultActiveKey: "home", className: "h-full sg_multi_tabs" }) }),
|
|
3262
|
+
[]
|
|
3263
|
+
);
|
|
3264
|
+
return /* @__PURE__ */ V("div", { className: "sg-layout sg-layout--modern flex w-full h-screen flex-col", children: [
|
|
3265
|
+
/* @__PURE__ */ d(vo, { className: "w-full bg-slate-50" }),
|
|
3266
|
+
/* @__PURE__ */ V("section", { className: "flex flex-row flex-1 overflow-auto", children: [
|
|
3267
|
+
/* @__PURE__ */ d(
|
|
3268
|
+
ho,
|
|
3269
|
+
{
|
|
3270
|
+
loading: !!n.data,
|
|
3271
|
+
spin: i,
|
|
3272
|
+
cls: o
|
|
3273
|
+
}
|
|
3274
|
+
),
|
|
3275
|
+
/* @__PURE__ */ d(Vt, { status: r, setStatus: t }),
|
|
3276
|
+
n.data ? a : i
|
|
3277
|
+
] })
|
|
3278
|
+
] });
|
|
3279
|
+
};
|
|
3280
|
+
export {
|
|
3281
|
+
Wo as MainLayout,
|
|
3282
|
+
Vt as MenuStatusCrumb,
|
|
3283
|
+
$o as ModernLayout,
|
|
3284
|
+
Mo as createInitPanes,
|
|
3285
|
+
Ao as setupSgTemplateLayout,
|
|
3286
|
+
On as transMenu
|
|
3287
|
+
};
|
|
3288
|
+
//# sourceMappingURL=core-layout.js.map
|