@cubone/react-file-manager 1.18.0 → 1.20.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/README.md +30 -29
- package/dist/react-file-manager.es.js +754 -745
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as De from "react";
|
|
2
|
-
import Pe, { useState as L, useRef as
|
|
2
|
+
import Pe, { useState as L, useRef as fe, useEffect as te, createContext as Ie, useContext as $e, useCallback as fr, useLayoutEffect as un, useMemo as yt } from "react";
|
|
3
3
|
function dn(e) {
|
|
4
4
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
5
|
}
|
|
@@ -41,28 +41,28 @@ var Nt;
|
|
|
41
41
|
function hn() {
|
|
42
42
|
return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
43
|
var e = Pe, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, z = "@@iterator";
|
|
44
|
-
function
|
|
44
|
+
function A(o) {
|
|
45
45
|
if (o === null || typeof o != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var
|
|
48
|
-
return typeof
|
|
47
|
+
var m = M && o[M] || o[z];
|
|
48
|
+
return typeof m == "function" ? m : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function C(o) {
|
|
52
52
|
{
|
|
53
|
-
for (var
|
|
53
|
+
for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0), B = 1; B < m; B++)
|
|
54
54
|
T[B - 1] = arguments[B];
|
|
55
55
|
y("error", o, T);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function y(o,
|
|
58
|
+
function y(o, m, T) {
|
|
59
59
|
{
|
|
60
|
-
var B =
|
|
61
|
-
|
|
62
|
-
var ie = T.map(function(
|
|
63
|
-
return String(
|
|
60
|
+
var B = j.ReactDebugCurrentFrame, re = B.getStackAddendum();
|
|
61
|
+
re !== "" && (m += "%s", T = T.concat([re]));
|
|
62
|
+
var ie = T.map(function(Q) {
|
|
63
|
+
return String(Q);
|
|
64
64
|
});
|
|
65
|
-
ie.unshift("Warning: " +
|
|
65
|
+
ie.unshift("Warning: " + m), Function.prototype.apply.call(console[o], console, ie);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
var b = !1, u = !1, g = !1, _ = !1, x = !1, R;
|
|
@@ -74,20 +74,20 @@ function hn() {
|
|
|
74
74
|
// with.
|
|
75
75
|
o.$$typeof === R || o.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function D(o, m, T) {
|
|
78
78
|
var B = o.displayName;
|
|
79
79
|
if (B)
|
|
80
80
|
return B;
|
|
81
|
-
var
|
|
82
|
-
return
|
|
81
|
+
var re = m.displayName || m.name || "";
|
|
82
|
+
return re !== "" ? T + "(" + re + ")" : T;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function k(o) {
|
|
85
85
|
return o.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function N(o) {
|
|
88
88
|
if (o == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof o.tag == "number" &&
|
|
90
|
+
if (typeof o.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
91
91
|
return o.displayName || o.name || null;
|
|
92
92
|
if (typeof o == "string")
|
|
93
93
|
return o;
|
|
@@ -108,20 +108,20 @@ function hn() {
|
|
|
108
108
|
if (typeof o == "object")
|
|
109
109
|
switch (o.$$typeof) {
|
|
110
110
|
case l:
|
|
111
|
-
var
|
|
112
|
-
return
|
|
111
|
+
var m = o;
|
|
112
|
+
return k(m) + ".Consumer";
|
|
113
113
|
case c:
|
|
114
114
|
var T = o;
|
|
115
|
-
return
|
|
115
|
+
return k(T._context) + ".Provider";
|
|
116
116
|
case d:
|
|
117
|
-
return
|
|
117
|
+
return D(o, o.render, "ForwardRef");
|
|
118
118
|
case h:
|
|
119
119
|
var B = o.displayName || null;
|
|
120
|
-
return B !== null ? B :
|
|
120
|
+
return B !== null ? B : N(o.type) || "Memo";
|
|
121
121
|
case w: {
|
|
122
|
-
var
|
|
122
|
+
var re = o, ie = re._payload, Q = re._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return N(Q(ie));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function hn() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var G = Object.assign, ae = 0, oe, ce, ee, ve, v, P, V;
|
|
133
133
|
function W() {
|
|
134
134
|
}
|
|
135
135
|
W.__reactDisabledLog = !0;
|
|
136
136
|
function I() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (ae === 0) {
|
|
139
|
+
oe = console.log, ce = console.info, ee = console.warn, ve = console.error, v = console.group, P = console.groupCollapsed, V = console.groupEnd;
|
|
140
140
|
var o = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,194 +153,194 @@ function hn() {
|
|
|
153
153
|
groupEnd: o
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
ae++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function X() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (ae--, ae === 0) {
|
|
162
162
|
var o = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
168
|
+
log: G({}, o, {
|
|
169
|
+
value: oe
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: G({}, o, {
|
|
172
|
+
value: ce
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
174
|
+
warn: G({}, o, {
|
|
175
|
+
value: ee
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
177
|
+
error: G({}, o, {
|
|
178
|
+
value: ve
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
180
|
+
group: G({}, o, {
|
|
181
|
+
value: v
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
183
|
+
groupCollapsed: G({}, o, {
|
|
184
184
|
value: P
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
186
|
+
groupEnd: G({}, o, {
|
|
187
187
|
value: V
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
ae < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var O =
|
|
195
|
-
function
|
|
194
|
+
var O = j.ReactCurrentDispatcher, $;
|
|
195
|
+
function q(o, m, T) {
|
|
196
196
|
{
|
|
197
197
|
if ($ === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var B =
|
|
200
|
+
} catch (re) {
|
|
201
|
+
var B = re.stack.trim().match(/\n( *(at )?)/);
|
|
202
202
|
$ = B && B[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
205
|
` + $ + o;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var Z = !1,
|
|
208
|
+
var Z = !1, U;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var he = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
U = new he();
|
|
212
212
|
}
|
|
213
|
-
function E(o,
|
|
213
|
+
function E(o, m) {
|
|
214
214
|
if (!o || Z)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var T =
|
|
217
|
+
var T = U.get(o);
|
|
218
218
|
if (T !== void 0)
|
|
219
219
|
return T;
|
|
220
220
|
}
|
|
221
221
|
var B;
|
|
222
222
|
Z = !0;
|
|
223
|
-
var
|
|
223
|
+
var re = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var ie;
|
|
226
226
|
ie = O.current, O.current = null, I();
|
|
227
227
|
try {
|
|
228
|
-
if (
|
|
229
|
-
var
|
|
228
|
+
if (m) {
|
|
229
|
+
var Q = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(Q.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
239
|
-
} catch (
|
|
240
|
-
B =
|
|
238
|
+
Reflect.construct(Q, []);
|
|
239
|
+
} catch (je) {
|
|
240
|
+
B = je;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(o, [],
|
|
242
|
+
Reflect.construct(o, [], Q);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
B =
|
|
245
|
+
Q.call();
|
|
246
|
+
} catch (je) {
|
|
247
|
+
B = je;
|
|
248
248
|
}
|
|
249
|
-
o.call(
|
|
249
|
+
o.call(Q.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
B =
|
|
254
|
+
} catch (je) {
|
|
255
|
+
B = je;
|
|
256
256
|
}
|
|
257
257
|
o();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var J =
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (J[
|
|
267
|
-
if (
|
|
259
|
+
} catch (je) {
|
|
260
|
+
if (je && B && typeof je.stack == "string") {
|
|
261
|
+
for (var J = je.stack.split(`
|
|
262
|
+
`), ge = B.stack.split(`
|
|
263
|
+
`), le = J.length - 1, de = ge.length - 1; le >= 1 && de >= 0 && J[le] !== ge[de]; )
|
|
264
|
+
de--;
|
|
265
|
+
for (; le >= 1 && de >= 0; le--, de--)
|
|
266
|
+
if (J[le] !== ge[de]) {
|
|
267
|
+
if (le !== 1 || de !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if (le--, de--, de < 0 || J[le] !== ge[de]) {
|
|
270
270
|
var be = `
|
|
271
|
-
` + J[
|
|
272
|
-
return o.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", o.displayName)), typeof o == "function" &&
|
|
271
|
+
` + J[le].replace(" at new ", " at ");
|
|
272
|
+
return o.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", o.displayName)), typeof o == "function" && U.set(o, be), be;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (le >= 1 && de >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
Z = !1, O.current = ie,
|
|
279
|
+
Z = !1, O.current = ie, X(), Error.prepareStackTrace = re;
|
|
280
280
|
}
|
|
281
|
-
var ke = o ? o.displayName || o.name : "", Me = ke ?
|
|
282
|
-
return typeof o == "function" &&
|
|
281
|
+
var ke = o ? o.displayName || o.name : "", Me = ke ? q(ke) : "";
|
|
282
|
+
return typeof o == "function" && U.set(o, Me), Me;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function me(o, m, T) {
|
|
285
285
|
return E(o, !1);
|
|
286
286
|
}
|
|
287
287
|
function Te(o) {
|
|
288
|
-
var
|
|
289
|
-
return !!(
|
|
288
|
+
var m = o.prototype;
|
|
289
|
+
return !!(m && m.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function Y(o,
|
|
291
|
+
function Y(o, m, T) {
|
|
292
292
|
if (o == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof o == "function")
|
|
295
295
|
return E(o, Te(o));
|
|
296
296
|
if (typeof o == "string")
|
|
297
|
-
return
|
|
297
|
+
return q(o);
|
|
298
298
|
switch (o) {
|
|
299
299
|
case p:
|
|
300
|
-
return
|
|
300
|
+
return q("Suspense");
|
|
301
301
|
case f:
|
|
302
|
-
return
|
|
302
|
+
return q("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof o == "object")
|
|
305
305
|
switch (o.$$typeof) {
|
|
306
306
|
case d:
|
|
307
|
-
return
|
|
307
|
+
return me(o.render);
|
|
308
308
|
case h:
|
|
309
|
-
return Y(o.type,
|
|
309
|
+
return Y(o.type, m, T);
|
|
310
310
|
case w: {
|
|
311
|
-
var B = o,
|
|
311
|
+
var B = o, re = B._payload, ie = B._init;
|
|
312
312
|
try {
|
|
313
|
-
return Y(ie(
|
|
313
|
+
return Y(ie(re), m, T);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var ue = Object.prototype.hasOwnProperty, Ce = {}, Re = j.ReactDebugCurrentFrame;
|
|
321
321
|
function we(o) {
|
|
322
322
|
if (o) {
|
|
323
|
-
var
|
|
323
|
+
var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
|
|
324
324
|
Re.setExtraStackFrame(T);
|
|
325
325
|
} else
|
|
326
326
|
Re.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function He(o,
|
|
328
|
+
function He(o, m, T, B, re) {
|
|
329
329
|
{
|
|
330
|
-
var ie = Function.call.bind(
|
|
331
|
-
for (var
|
|
332
|
-
if (ie(o,
|
|
330
|
+
var ie = Function.call.bind(ue);
|
|
331
|
+
for (var Q in o)
|
|
332
|
+
if (ie(o, Q)) {
|
|
333
333
|
var J = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof o[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof o[Q] != "function") {
|
|
336
|
+
var ge = Error((B || "React class") + ": " + T + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw ge.name = "Invariant Violation", ge;
|
|
338
338
|
}
|
|
339
|
-
J = o[
|
|
340
|
-
} catch (
|
|
341
|
-
J =
|
|
339
|
+
J = o[Q](m, Q, B, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (le) {
|
|
341
|
+
J = le;
|
|
342
342
|
}
|
|
343
|
-
J && !(J instanceof Error) && (we(
|
|
343
|
+
J && !(J instanceof Error) && (we(re), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", T, Q, typeof J), we(null)), J instanceof Error && !(J.message in Ce) && (Ce[J.message] = !0, we(re), C("Failed %s type: %s", T, J.message), we(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -350,7 +350,7 @@ function hn() {
|
|
|
350
350
|
}
|
|
351
351
|
function Wr(o) {
|
|
352
352
|
{
|
|
353
|
-
var
|
|
353
|
+
var m = typeof Symbol == "function" && Symbol.toStringTag, T = m && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
354
354
|
return T;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -366,37 +366,37 @@ function hn() {
|
|
|
366
366
|
}
|
|
367
367
|
function wt(o) {
|
|
368
368
|
if (Vr(o))
|
|
369
|
-
return
|
|
369
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Wr(o)), bt(o);
|
|
370
370
|
}
|
|
371
|
-
var Et =
|
|
371
|
+
var Et = j.ReactCurrentOwner, Yr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
376
|
}, Rt, Pt;
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
379
|
-
var
|
|
380
|
-
if (
|
|
377
|
+
function qr(o) {
|
|
378
|
+
if (ue.call(o, "ref")) {
|
|
379
|
+
var m = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
380
|
+
if (m && m.isReactWarning)
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
return o.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
388
|
-
if (
|
|
385
|
+
function Ur(o) {
|
|
386
|
+
if (ue.call(o, "key")) {
|
|
387
|
+
var m = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
388
|
+
if (m && m.isReactWarning)
|
|
389
389
|
return !1;
|
|
390
390
|
}
|
|
391
391
|
return o.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function Kr(o,
|
|
393
|
+
function Kr(o, m) {
|
|
394
394
|
typeof o.ref == "string" && Et.current;
|
|
395
395
|
}
|
|
396
|
-
function Xr(o,
|
|
396
|
+
function Xr(o, m) {
|
|
397
397
|
{
|
|
398
398
|
var T = function() {
|
|
399
|
-
Rt || (Rt = !0,
|
|
399
|
+
Rt || (Rt = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
400
400
|
};
|
|
401
401
|
T.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
402
402
|
get: T,
|
|
@@ -404,10 +404,10 @@ function hn() {
|
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function Gr(o,
|
|
407
|
+
function Gr(o, m) {
|
|
408
408
|
{
|
|
409
409
|
var T = function() {
|
|
410
|
-
Pt || (Pt = !0,
|
|
410
|
+
Pt || (Pt = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
411
411
|
};
|
|
412
412
|
T.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
413
413
|
get: T,
|
|
@@ -415,15 +415,15 @@ function hn() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var Jr = function(o,
|
|
418
|
+
var Jr = function(o, m, T, B, re, ie, Q) {
|
|
419
419
|
var J = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
421
|
$$typeof: r,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: o,
|
|
424
|
-
key:
|
|
424
|
+
key: m,
|
|
425
425
|
ref: T,
|
|
426
|
-
props:
|
|
426
|
+
props: Q,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
428
|
_owner: ie
|
|
429
429
|
};
|
|
@@ -441,31 +441,31 @@ function hn() {
|
|
|
441
441
|
configurable: !1,
|
|
442
442
|
enumerable: !1,
|
|
443
443
|
writable: !1,
|
|
444
|
-
value:
|
|
444
|
+
value: re
|
|
445
445
|
}), Object.freeze && (Object.freeze(J.props), Object.freeze(J)), J;
|
|
446
446
|
};
|
|
447
|
-
function Zr(o,
|
|
447
|
+
function Zr(o, m, T, B, re) {
|
|
448
448
|
{
|
|
449
|
-
var ie,
|
|
450
|
-
T !== void 0 && (wt(T), J = "" + T),
|
|
451
|
-
for (ie in
|
|
452
|
-
|
|
449
|
+
var ie, Q = {}, J = null, ge = null;
|
|
450
|
+
T !== void 0 && (wt(T), J = "" + T), Ur(m) && (wt(m.key), J = "" + m.key), qr(m) && (ge = m.ref, Kr(m, re));
|
|
451
|
+
for (ie in m)
|
|
452
|
+
ue.call(m, ie) && !Yr.hasOwnProperty(ie) && (Q[ie] = m[ie]);
|
|
453
453
|
if (o && o.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (ie in
|
|
456
|
-
|
|
454
|
+
var le = o.defaultProps;
|
|
455
|
+
for (ie in le)
|
|
456
|
+
Q[ie] === void 0 && (Q[ie] = le[ie]);
|
|
457
457
|
}
|
|
458
|
-
if (J ||
|
|
459
|
-
var
|
|
460
|
-
J && Xr(
|
|
458
|
+
if (J || ge) {
|
|
459
|
+
var de = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
460
|
+
J && Xr(Q, de), ge && Gr(Q, de);
|
|
461
461
|
}
|
|
462
|
-
return Jr(o, J,
|
|
462
|
+
return Jr(o, J, ge, re, B, Et.current, Q);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var tt =
|
|
465
|
+
var tt = j.ReactCurrentOwner, Tt = j.ReactDebugCurrentFrame;
|
|
466
466
|
function Oe(o) {
|
|
467
467
|
if (o) {
|
|
468
|
-
var
|
|
468
|
+
var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
|
|
469
469
|
Tt.setExtraStackFrame(T);
|
|
470
470
|
} else
|
|
471
471
|
Tt.setExtraStackFrame(null);
|
|
@@ -478,7 +478,7 @@ function hn() {
|
|
|
478
478
|
function Ft() {
|
|
479
479
|
{
|
|
480
480
|
if (tt.current) {
|
|
481
|
-
var o =
|
|
481
|
+
var o = N(tt.current.type);
|
|
482
482
|
if (o)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -493,102 +493,102 @@ Check the render method of \`` + o + "`.";
|
|
|
493
493
|
var St = {};
|
|
494
494
|
function en(o) {
|
|
495
495
|
{
|
|
496
|
-
var
|
|
497
|
-
if (!
|
|
496
|
+
var m = Ft();
|
|
497
|
+
if (!m) {
|
|
498
498
|
var T = typeof o == "string" ? o : o.displayName || o.name;
|
|
499
|
-
T && (
|
|
499
|
+
T && (m = `
|
|
500
500
|
|
|
501
501
|
Check the top-level render call using <` + T + ">.");
|
|
502
502
|
}
|
|
503
|
-
return
|
|
503
|
+
return m;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function Mt(o,
|
|
506
|
+
function Mt(o, m) {
|
|
507
507
|
{
|
|
508
508
|
if (!o._store || o._store.validated || o.key != null)
|
|
509
509
|
return;
|
|
510
510
|
o._store.validated = !0;
|
|
511
|
-
var T = en(
|
|
511
|
+
var T = en(m);
|
|
512
512
|
if (St[T])
|
|
513
513
|
return;
|
|
514
514
|
St[T] = !0;
|
|
515
515
|
var B = "";
|
|
516
|
-
o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " +
|
|
516
|
+
o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " + N(o._owner.type) + "."), Oe(o), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, B), Oe(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function Lt(o,
|
|
519
|
+
function Lt(o, m) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof o != "object")
|
|
522
522
|
return;
|
|
523
523
|
if (et(o))
|
|
524
524
|
for (var T = 0; T < o.length; T++) {
|
|
525
525
|
var B = o[T];
|
|
526
|
-
nt(B) && Mt(B,
|
|
526
|
+
nt(B) && Mt(B, m);
|
|
527
527
|
}
|
|
528
528
|
else if (nt(o))
|
|
529
529
|
o._store && (o._store.validated = !0);
|
|
530
530
|
else if (o) {
|
|
531
|
-
var
|
|
532
|
-
if (typeof
|
|
533
|
-
for (var ie =
|
|
534
|
-
nt(
|
|
531
|
+
var re = A(o);
|
|
532
|
+
if (typeof re == "function" && re !== o.entries)
|
|
533
|
+
for (var ie = re.call(o), Q; !(Q = ie.next()).done; )
|
|
534
|
+
nt(Q.value) && Mt(Q.value, m);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
function tn(o) {
|
|
539
539
|
{
|
|
540
|
-
var
|
|
541
|
-
if (
|
|
540
|
+
var m = o.type;
|
|
541
|
+
if (m == null || typeof m == "string")
|
|
542
542
|
return;
|
|
543
543
|
var T;
|
|
544
|
-
if (typeof
|
|
545
|
-
T =
|
|
546
|
-
else if (typeof
|
|
544
|
+
if (typeof m == "function")
|
|
545
|
+
T = m.propTypes;
|
|
546
|
+
else if (typeof m == "object" && (m.$$typeof === d || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
|
-
|
|
549
|
-
T =
|
|
548
|
+
m.$$typeof === h))
|
|
549
|
+
T = m.propTypes;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
552
|
if (T) {
|
|
553
|
-
var B =
|
|
553
|
+
var B = N(m);
|
|
554
554
|
He(T, o.props, "prop", B, o);
|
|
555
|
-
} else if (
|
|
555
|
+
} else if (m.PropTypes !== void 0 && !rt) {
|
|
556
556
|
rt = !0;
|
|
557
|
-
var
|
|
558
|
-
|
|
557
|
+
var re = N(m);
|
|
558
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", re || "Unknown");
|
|
559
559
|
}
|
|
560
|
-
typeof
|
|
560
|
+
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
function rn(o) {
|
|
564
564
|
{
|
|
565
|
-
for (var
|
|
566
|
-
var B =
|
|
565
|
+
for (var m = Object.keys(o.props), T = 0; T < m.length; T++) {
|
|
566
|
+
var B = m[T];
|
|
567
567
|
if (B !== "children" && B !== "key") {
|
|
568
|
-
Oe(o),
|
|
568
|
+
Oe(o), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), Oe(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
o.ref !== null && (Oe(o),
|
|
572
|
+
o.ref !== null && (Oe(o), C("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ot = {};
|
|
576
|
-
function kt(o,
|
|
576
|
+
function kt(o, m, T, B, re, ie) {
|
|
577
577
|
{
|
|
578
|
-
var
|
|
579
|
-
if (!
|
|
578
|
+
var Q = F(o);
|
|
579
|
+
if (!Q) {
|
|
580
580
|
var J = "";
|
|
581
581
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
o === null ?
|
|
582
|
+
var ge = Qr();
|
|
583
|
+
ge ? J += ge : J += Ft();
|
|
584
|
+
var le;
|
|
585
|
+
o === null ? le = "null" : et(o) ? le = "array" : o !== void 0 && o.$$typeof === r ? (le = "<" + (N(o.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : le = typeof o, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", le, J);
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
590
|
-
if (
|
|
591
|
-
var be =
|
|
587
|
+
var de = Zr(o, m, T, re, ie);
|
|
588
|
+
if (de == null)
|
|
589
|
+
return de;
|
|
590
|
+
if (Q) {
|
|
591
|
+
var be = m.children;
|
|
592
592
|
if (be !== void 0)
|
|
593
593
|
if (B)
|
|
594
594
|
if (et(be)) {
|
|
@@ -596,17 +596,17 @@ Check the top-level render call using <` + T + ">.");
|
|
|
596
596
|
Lt(be[ke], o);
|
|
597
597
|
Object.freeze && Object.freeze(be);
|
|
598
598
|
} else
|
|
599
|
-
|
|
599
|
+
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
600
|
else
|
|
601
601
|
Lt(be, o);
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
var Me =
|
|
603
|
+
if (ue.call(m, "key")) {
|
|
604
|
+
var Me = N(o), je = Object.keys(m).filter(function(ln) {
|
|
605
605
|
return ln !== "key";
|
|
606
|
-
}), st =
|
|
606
|
+
}), st = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
607
|
if (!Ot[Me + st]) {
|
|
608
|
-
var cn =
|
|
609
|
-
|
|
608
|
+
var cn = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
C(`A props object containing a "key" prop is being spread into JSX:
|
|
610
610
|
let props = %s;
|
|
611
611
|
<%s {...props} />
|
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -614,14 +614,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
614
614
|
<%s key={someKey} {...props} />`, st, Me, cn, Me), Ot[Me + st] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return o === s ? rn(
|
|
617
|
+
return o === s ? rn(de) : tn(de), de;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function nn(o,
|
|
621
|
-
return kt(o,
|
|
620
|
+
function nn(o, m, T) {
|
|
621
|
+
return kt(o, m, T, !0);
|
|
622
622
|
}
|
|
623
|
-
function sn(o,
|
|
624
|
-
return kt(o,
|
|
623
|
+
function sn(o, m, T) {
|
|
624
|
+
return kt(o, m, T, !1);
|
|
625
625
|
}
|
|
626
626
|
var on = sn, an = nn;
|
|
627
627
|
Ae.Fragment = s, Ae.jsx = on, Ae.jsxs = an;
|
|
@@ -709,11 +709,11 @@ function pr(e) {
|
|
|
709
709
|
}, r.attr), pr(r.child)));
|
|
710
710
|
}
|
|
711
711
|
function H(e) {
|
|
712
|
-
return (r) => /* @__PURE__ */ Pe.createElement(
|
|
712
|
+
return (r) => /* @__PURE__ */ Pe.createElement(jn, Ve({
|
|
713
713
|
attr: Ye({}, e.attr)
|
|
714
714
|
}, r), pr(e.child));
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function jn(e) {
|
|
717
717
|
var r = (n) => {
|
|
718
718
|
var {
|
|
719
719
|
attr: s,
|
|
@@ -736,10 +736,10 @@ function Cn(e) {
|
|
|
736
736
|
};
|
|
737
737
|
return zt !== void 0 ? /* @__PURE__ */ Pe.createElement(zt.Consumer, null, (n) => r(n)) : r(hr);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Cn(e) {
|
|
740
740
|
return H({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8c-0.020-1.045-0.247-2.086-0.665-3.038-0.417-0.953-1.023-1.817-1.766-2.53s-1.624-1.278-2.578-1.651c-0.953-0.374-1.978-0.552-2.991-0.531-1.013 0.020-2.021 0.24-2.943 0.646-0.923 0.405-1.758 0.992-2.449 1.712s-1.237 1.574-1.597 2.497c-0.361 0.923-0.533 1.914-0.512 2.895 0.020 0.981 0.234 1.955 0.627 2.847 0.392 0.892 0.961 1.7 1.658 2.368s1.523 1.195 2.416 1.543c0.892 0.348 1.851 0.514 2.799 0.493 0.949-0.020 1.89-0.227 2.751-0.608 0.862-0.379 1.642-0.929 2.287-1.604s1.154-1.472 1.488-2.335c0.204-0.523 0.342-1.069 0.415-1.622 0.019 0.001 0.039 0.002 0.059 0.002 0.552 0 1-0.448 1-1 0-0.028-0.001-0.056-0.004-0.083h0.004zM14.411 10.655c-0.367 0.831-0.898 1.584-1.55 2.206s-1.422 1.112-2.254 1.434c-0.832 0.323-1.723 0.476-2.608 0.454-0.884-0.020-1.759-0.215-2.56-0.57-0.801-0.354-1.526-0.867-2.125-1.495s-1.071-1.371-1.38-2.173c-0.31-0.801-0.457-1.66-0.435-2.512s0.208-1.694 0.551-2.464c0.342-0.77 0.836-1.468 1.441-2.044s1.321-1.029 2.092-1.326c0.771-0.298 1.596-0.438 2.416-0.416s1.629 0.202 2.368 0.532c0.74 0.329 1.41 0.805 1.963 1.387s0.988 1.27 1.272 2.011c0.285 0.74 0.418 1.532 0.397 2.32h0.004c-0.002 0.027-0.004 0.055-0.004 0.083 0 0.516 0.39 0.94 0.892 0.994-0.097 0.544-0.258 1.075-0.481 1.578z" }, child: [] }] })(e);
|
|
741
741
|
}
|
|
742
|
-
const xt = ({ loading: e = !1, className: r }) => e ? /* @__PURE__ */ t.jsx("div", { className: `loader-container ${r}`, children: /* @__PURE__ */ t.jsx(
|
|
742
|
+
const xt = ({ loading: e = !1, className: r }) => e ? /* @__PURE__ */ t.jsx("div", { className: `loader-container ${r}`, children: /* @__PURE__ */ t.jsx(Cn, { className: "spinner" }) }) : null;
|
|
743
743
|
function vr(e) {
|
|
744
744
|
return H({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" }, child: [] }] })(e);
|
|
745
745
|
}
|
|
@@ -773,13 +773,13 @@ function Rn(e) {
|
|
|
773
773
|
function Pn(e) {
|
|
774
774
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }, child: [] }] })(e);
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function jr(e) {
|
|
777
777
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z" }, child: [] }] })(e);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function jt(e) {
|
|
780
780
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z" }, child: [] }] })(e);
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function Cr(e) {
|
|
783
783
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z" }, child: [] }] })(e);
|
|
784
784
|
}
|
|
785
785
|
function Tn(e) {
|
|
@@ -800,7 +800,7 @@ function Sn(e) {
|
|
|
800
800
|
function Mn(e) {
|
|
801
801
|
return H({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M128 0C92.7 0 64 28.7 64 64l0 224-44.8 0C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384L320 384l0-96-192 0 0-224 320 0 0 32 64 0 0-32c0-35.3-28.7-64-64-64L128 0zM512 128l-112 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-208-96 0c-17.7 0-32-14.3-32-32l0-96zm32 0l0 96 96 0-96-96z" }, child: [] }] })(e);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function qe(e) {
|
|
804
804
|
return H({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z" }, child: [] }] })(e);
|
|
805
805
|
}
|
|
806
806
|
function It(e) {
|
|
@@ -833,7 +833,7 @@ function Wt(e) {
|
|
|
833
833
|
function kn(e) {
|
|
834
834
|
return H({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z" }, child: [] }] })(e);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function Ue(e) {
|
|
837
837
|
return H({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z" }, child: [] }] })(e);
|
|
838
838
|
}
|
|
839
839
|
function Vt(e) {
|
|
@@ -844,11 +844,11 @@ function mt(e) {
|
|
|
844
844
|
}
|
|
845
845
|
const Be = (e = () => {
|
|
846
846
|
}) => {
|
|
847
|
-
const [r, n] = L(!1), s =
|
|
847
|
+
const [r, n] = L(!1), s = fe(null), a = (i) => {
|
|
848
848
|
var c;
|
|
849
849
|
(c = s.current) != null && c.contains(i.target) ? n(!1) : (n(!0), e(i, s));
|
|
850
850
|
};
|
|
851
|
-
return
|
|
851
|
+
return te(() => (document.addEventListener("click", a, !0), document.addEventListener("mousedown", a, !0), () => {
|
|
852
852
|
document.removeEventListener("click", a, !0), document.removeEventListener("mousedown", a, !0);
|
|
853
853
|
}), []), { ref: s, isClicked: r, setIsClicked: n };
|
|
854
854
|
}, Er = Ie(), _n = ({ children: e, layout: r }) => {
|
|
@@ -869,7 +869,7 @@ const Be = (e = () => {
|
|
|
869
869
|
{
|
|
870
870
|
key: "list",
|
|
871
871
|
name: "List",
|
|
872
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
872
|
+
icon: /* @__PURE__ */ t.jsx(qe, { size: 18 })
|
|
873
873
|
}
|
|
874
874
|
], c = (l) => {
|
|
875
875
|
a(l), r(l), e(!1);
|
|
@@ -890,7 +890,7 @@ const Be = (e = () => {
|
|
|
890
890
|
)) }) });
|
|
891
891
|
}, Rr = Ie(), zn = ({ children: e, filesData: r, onError: n }) => {
|
|
892
892
|
const [s, a] = L([]);
|
|
893
|
-
|
|
893
|
+
te(() => {
|
|
894
894
|
a(r);
|
|
895
895
|
}, [r]);
|
|
896
896
|
const i = (c) => c.isDirectory ? s.filter((l) => l.path === `${c.path}/${l.name}`) : [];
|
|
@@ -899,13 +899,13 @@ const Be = (e = () => {
|
|
|
899
899
|
const r = e.filter((i) => i.isDirectory), n = e.filter((i) => !i.isDirectory), s = Yt(r), a = Yt(n);
|
|
900
900
|
return [...s, ...a];
|
|
901
901
|
}, Pr = Ie(), Dn = ({ children: e, initialPath: r }) => {
|
|
902
|
-
const { files: n } = Ge(), s =
|
|
903
|
-
return
|
|
902
|
+
const { files: n } = Ge(), s = fe(!1), [a, i] = L(""), [c, l] = L(null), [d, p] = L([]);
|
|
903
|
+
return te(() => {
|
|
904
904
|
Array.isArray(n) && n.length > 0 && (p(() => {
|
|
905
905
|
const f = n.filter((h) => h.path === `${a}/${h.name}`);
|
|
906
906
|
return An(f);
|
|
907
907
|
}), l(() => n.find((f) => f.path === a) ?? null));
|
|
908
|
-
}, [n, a]),
|
|
908
|
+
}, [n, a]), te(() => {
|
|
909
909
|
!s.current && Array.isArray(n) && n.length > 0 && (i(n.some((f) => f.path === r) ? r : ""), s.current = !0);
|
|
910
910
|
}, [r, n]), /* @__PURE__ */ t.jsx(
|
|
911
911
|
Pr.Provider,
|
|
@@ -932,11 +932,15 @@ const Be = (e = () => {
|
|
|
932
932
|
} catch (s) {
|
|
933
933
|
console.error(s.message);
|
|
934
934
|
}
|
|
935
|
-
}, Tr = Ie(), In = ({ children: e, onDownload: r }) => {
|
|
936
|
-
const [
|
|
937
|
-
|
|
935
|
+
}, Tr = Ie(), In = ({ children: e, onDownload: r, onSelect: n }) => {
|
|
936
|
+
const [s, a] = L([]);
|
|
937
|
+
te(() => {
|
|
938
|
+
s.length && n && n(s);
|
|
939
|
+
}, [s]);
|
|
940
|
+
const i = () => {
|
|
941
|
+
Le(r, "onDownload", s);
|
|
938
942
|
};
|
|
939
|
-
return /* @__PURE__ */ t.jsx(Tr.Provider, { value: { selectedFiles:
|
|
943
|
+
return /* @__PURE__ */ t.jsx(Tr.Provider, { value: { selectedFiles: s, setSelectedFiles: a, handleDownload: i }, children: e });
|
|
940
944
|
}, Fe = () => $e(Tr), Fr = Ie(), $n = ({ children: e, onPaste: r, onCut: n, onCopy: s }) => {
|
|
941
945
|
const [a, i] = L(null), { selectedFiles: c, setSelectedFiles: l } = Fe(), d = (f) => {
|
|
942
946
|
i({
|
|
@@ -957,7 +961,7 @@ const Be = (e = () => {
|
|
|
957
961
|
triggerAction: a
|
|
958
962
|
}) => {
|
|
959
963
|
var b;
|
|
960
|
-
const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: S, handlePasting: M } = Je(), { activeLayout: z } = Se(),
|
|
964
|
+
const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: S, handlePasting: M } = Je(), { activeLayout: z } = Se(), A = [
|
|
961
965
|
{
|
|
962
966
|
icon: /* @__PURE__ */ t.jsx(mr, { size: 17, strokeWidth: 0.3 }),
|
|
963
967
|
text: "New folder",
|
|
@@ -965,7 +969,7 @@ const Be = (e = () => {
|
|
|
965
969
|
onClick: () => a.show("createFolder")
|
|
966
970
|
},
|
|
967
971
|
{
|
|
968
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
972
|
+
icon: /* @__PURE__ */ t.jsx(Cr, { size: 18 }),
|
|
969
973
|
text: "Upload",
|
|
970
974
|
permission: r,
|
|
971
975
|
onClick: () => a.show("uploadFile")
|
|
@@ -974,11 +978,11 @@ const Be = (e = () => {
|
|
|
974
978
|
icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
|
|
975
979
|
text: "Paste",
|
|
976
980
|
permission: !!h,
|
|
977
|
-
onClick:
|
|
981
|
+
onClick: C
|
|
978
982
|
}
|
|
979
|
-
],
|
|
983
|
+
], j = [
|
|
980
984
|
{
|
|
981
|
-
icon: z === "grid" ? /* @__PURE__ */ t.jsx(gr, { size: 16 }) : /* @__PURE__ */ t.jsx(
|
|
985
|
+
icon: z === "grid" ? /* @__PURE__ */ t.jsx(gr, { size: 16 }) : /* @__PURE__ */ t.jsx(qe, { size: 16 }),
|
|
982
986
|
title: "Change View",
|
|
983
987
|
onClick: () => c((u) => !u)
|
|
984
988
|
},
|
|
@@ -990,7 +994,7 @@ const Be = (e = () => {
|
|
|
990
994
|
}
|
|
991
995
|
}
|
|
992
996
|
];
|
|
993
|
-
function
|
|
997
|
+
function C() {
|
|
994
998
|
M(l);
|
|
995
999
|
}
|
|
996
1000
|
const y = () => {
|
|
@@ -1010,7 +1014,7 @@ const Be = (e = () => {
|
|
|
1010
1014
|
"button",
|
|
1011
1015
|
{
|
|
1012
1016
|
className: "item-action file-action",
|
|
1013
|
-
onClick:
|
|
1017
|
+
onClick: C,
|
|
1014
1018
|
children: [
|
|
1015
1019
|
/* @__PURE__ */ t.jsx(mt, { size: 18 }),
|
|
1016
1020
|
/* @__PURE__ */ t.jsx("span", { children: "Paste" })
|
|
@@ -1029,7 +1033,7 @@ const Be = (e = () => {
|
|
|
1029
1033
|
}
|
|
1030
1034
|
),
|
|
1031
1035
|
!d.isDirectory && /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: y, children: [
|
|
1032
|
-
/* @__PURE__ */ t.jsx(
|
|
1036
|
+
/* @__PURE__ */ t.jsx(jt, { size: 19 }),
|
|
1033
1037
|
/* @__PURE__ */ t.jsx("span", { children: "Download" })
|
|
1034
1038
|
] }),
|
|
1035
1039
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -1038,7 +1042,7 @@ const Be = (e = () => {
|
|
|
1038
1042
|
className: "item-action file-action",
|
|
1039
1043
|
onClick: () => a.show("delete"),
|
|
1040
1044
|
children: [
|
|
1041
|
-
/* @__PURE__ */ t.jsx(
|
|
1045
|
+
/* @__PURE__ */ t.jsx(jr, { size: 19 }),
|
|
1042
1046
|
/* @__PURE__ */ t.jsx("span", { children: "Delete" })
|
|
1043
1047
|
]
|
|
1044
1048
|
}
|
|
@@ -1062,14 +1066,14 @@ const Be = (e = () => {
|
|
|
1062
1066
|
}
|
|
1063
1067
|
)
|
|
1064
1068
|
] }) }) : /* @__PURE__ */ t.jsx("div", { className: "toolbar", children: /* @__PURE__ */ t.jsxs("div", { className: "fm-toolbar", children: [
|
|
1065
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1069
|
+
/* @__PURE__ */ t.jsx("div", { children: A.filter((u) => u.permission).map((u, g) => /* @__PURE__ */ t.jsxs("button", { className: "item-action", onClick: u.onClick, children: [
|
|
1066
1070
|
u.icon,
|
|
1067
1071
|
/* @__PURE__ */ t.jsx("span", { children: u.text })
|
|
1068
1072
|
] }, g)) }),
|
|
1069
1073
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1070
|
-
|
|
1074
|
+
j.map((u, g) => /* @__PURE__ */ t.jsxs("div", { className: "toolbar-left-items", children: [
|
|
1071
1075
|
/* @__PURE__ */ t.jsx("button", { className: "item-action icon-only", title: u.title, onClick: u.onClick, children: u.icon }),
|
|
1072
|
-
g !==
|
|
1076
|
+
g !== j.length - 1 && /* @__PURE__ */ t.jsx("div", { className: "item-separator" })
|
|
1073
1077
|
] }, g)),
|
|
1074
1078
|
i && /* @__PURE__ */ t.jsx(
|
|
1075
1079
|
Nn,
|
|
@@ -1111,8 +1115,8 @@ var Wn = class extends Error {
|
|
|
1111
1115
|
}
|
|
1112
1116
|
}, Ke = (...e) => Hn(e[0], `[react-collapsed] -- ${e[1]}`);
|
|
1113
1117
|
function Mr(e) {
|
|
1114
|
-
const r =
|
|
1115
|
-
return
|
|
1118
|
+
const r = fe(e);
|
|
1119
|
+
return te(() => {
|
|
1116
1120
|
r.current = e;
|
|
1117
1121
|
}), fr((...n) => {
|
|
1118
1122
|
var s;
|
|
@@ -1120,14 +1124,14 @@ function Mr(e) {
|
|
|
1120
1124
|
}, []);
|
|
1121
1125
|
}
|
|
1122
1126
|
function Vn(e, r, n) {
|
|
1123
|
-
const [s, a] = L(r), i =
|
|
1127
|
+
const [s, a] = L(r), i = fe(typeof e < "u"), c = i.current ? e : s, l = Mr(n), d = fr(
|
|
1124
1128
|
(p) => {
|
|
1125
1129
|
const h = typeof p == "function" ? p(c) : p;
|
|
1126
1130
|
i.current || a(h), l == null || l(h);
|
|
1127
1131
|
},
|
|
1128
1132
|
[l, c]
|
|
1129
1133
|
);
|
|
1130
|
-
return
|
|
1134
|
+
return te(() => {
|
|
1131
1135
|
Ke(
|
|
1132
1136
|
!(i.current && e == null),
|
|
1133
1137
|
"`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."
|
|
@@ -1138,9 +1142,9 @@ function Vn(e, r, n) {
|
|
|
1138
1142
|
}, [e]), [c, d];
|
|
1139
1143
|
}
|
|
1140
1144
|
var Yn = "(prefers-reduced-motion: reduce)";
|
|
1141
|
-
function
|
|
1145
|
+
function qn() {
|
|
1142
1146
|
const [e, r] = L(!1);
|
|
1143
|
-
return
|
|
1147
|
+
return te(() => {
|
|
1144
1148
|
if (typeof window > "u" || typeof window.matchMedia != "function")
|
|
1145
1149
|
return;
|
|
1146
1150
|
const n = window.matchMedia(Yn);
|
|
@@ -1158,16 +1162,16 @@ function Un() {
|
|
|
1158
1162
|
};
|
|
1159
1163
|
}, []), e;
|
|
1160
1164
|
}
|
|
1161
|
-
var
|
|
1165
|
+
var Un = De.useId || (() => {
|
|
1162
1166
|
});
|
|
1163
1167
|
function Kn() {
|
|
1164
|
-
return
|
|
1168
|
+
return Un() ?? "";
|
|
1165
1169
|
}
|
|
1166
|
-
var Xn = typeof window < "u" ? De.useLayoutEffect : De.useEffect, at = !1, Gn = 0,
|
|
1170
|
+
var Xn = typeof window < "u" ? De.useLayoutEffect : De.useEffect, at = !1, Gn = 0, qt = () => ++Gn;
|
|
1167
1171
|
function Jn(e) {
|
|
1168
|
-
const r = e || (at ?
|
|
1172
|
+
const r = e || (at ? qt() : null), [n, s] = De.useState(r);
|
|
1169
1173
|
return Xn(() => {
|
|
1170
|
-
n === null && s(
|
|
1174
|
+
n === null && s(qt());
|
|
1171
1175
|
}, []), De.useEffect(() => {
|
|
1172
1176
|
at === !1 && (at = !0);
|
|
1173
1177
|
}, []), n != null ? String(n) : void 0;
|
|
@@ -1185,7 +1189,7 @@ function Qn(e, r) {
|
|
|
1185
1189
|
}
|
|
1186
1190
|
return a(), s;
|
|
1187
1191
|
}
|
|
1188
|
-
function
|
|
1192
|
+
function Ut(e) {
|
|
1189
1193
|
e.id && cancelAnimationFrame(e.id);
|
|
1190
1194
|
}
|
|
1191
1195
|
function Kt(e) {
|
|
@@ -1237,11 +1241,11 @@ After: <div {...getCollapseProps()}>
|
|
|
1237
1241
|
</div>
|
|
1238
1242
|
</div>`
|
|
1239
1243
|
);
|
|
1240
|
-
},
|
|
1244
|
+
}, te(() => {
|
|
1241
1245
|
r(e);
|
|
1242
1246
|
}, [e]);
|
|
1243
1247
|
}
|
|
1244
|
-
var ns = typeof window > "u" ?
|
|
1248
|
+
var ns = typeof window > "u" ? te : un;
|
|
1245
1249
|
function ss({
|
|
1246
1250
|
duration: e,
|
|
1247
1251
|
easing: r = "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
@@ -1256,7 +1260,7 @@ function ss({
|
|
|
1256
1260
|
const d = Mr(n), p = Zn(c ? `${c}` : void 0), [f, h] = Vn(
|
|
1257
1261
|
s,
|
|
1258
1262
|
a
|
|
1259
|
-
), w =
|
|
1263
|
+
), w = fe(f), [S, M] = L(!1), z = qn(), A = i ?? z, j = fe(), C = fe(), y = fe(null), [b, u] = L(null);
|
|
1260
1264
|
rs(y);
|
|
1261
1265
|
const g = `${l.collapsedHeight || 0}px`;
|
|
1262
1266
|
function _(x) {
|
|
@@ -1264,19 +1268,19 @@ function ss({
|
|
|
1264
1268
|
return;
|
|
1265
1269
|
const R = y.current;
|
|
1266
1270
|
for (const F in x) {
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1271
|
+
const D = x[F];
|
|
1272
|
+
D ? R.style[F] = D : R.style.removeProperty(F);
|
|
1269
1273
|
}
|
|
1270
1274
|
}
|
|
1271
1275
|
return ns(() => {
|
|
1272
1276
|
if (!y.current || f === w.current)
|
|
1273
1277
|
return;
|
|
1274
1278
|
w.current = f;
|
|
1275
|
-
function R(
|
|
1276
|
-
return
|
|
1279
|
+
function R(k) {
|
|
1280
|
+
return A ? 0 : e ?? es(k);
|
|
1277
1281
|
}
|
|
1278
|
-
const F = (
|
|
1279
|
-
function
|
|
1282
|
+
const F = (k) => `height ${R(k)}ms ${r}`, D = (k) => {
|
|
1283
|
+
function N() {
|
|
1280
1284
|
f ? (_({
|
|
1281
1285
|
height: "",
|
|
1282
1286
|
overflow: "",
|
|
@@ -1284,37 +1288,37 @@ function ss({
|
|
|
1284
1288
|
display: ""
|
|
1285
1289
|
}), d("expandEnd")) : (_({ transition: "" }), d("collapseEnd")), M(!1);
|
|
1286
1290
|
}
|
|
1287
|
-
|
|
1291
|
+
C.current && Ut(C.current), C.current = Qn(N, k);
|
|
1288
1292
|
};
|
|
1289
|
-
return M(!0), f ?
|
|
1293
|
+
return M(!0), f ? j.current = requestAnimationFrame(() => {
|
|
1290
1294
|
d("expandStart"), _({
|
|
1291
1295
|
display: "block",
|
|
1292
1296
|
overflow: "hidden",
|
|
1293
1297
|
height: g
|
|
1294
|
-
}),
|
|
1298
|
+
}), j.current = requestAnimationFrame(() => {
|
|
1295
1299
|
d("expanding");
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1300
|
+
const k = Kt(y);
|
|
1301
|
+
D(R(k)), y.current && (y.current.style.transition = F(k), y.current.style.height = `${k}px`);
|
|
1298
1302
|
});
|
|
1299
|
-
}) :
|
|
1303
|
+
}) : j.current = requestAnimationFrame(() => {
|
|
1300
1304
|
d("collapseStart");
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1303
|
-
transition: F(
|
|
1304
|
-
height: `${
|
|
1305
|
-
}),
|
|
1305
|
+
const k = Kt(y);
|
|
1306
|
+
D(R(k)), _({
|
|
1307
|
+
transition: F(k),
|
|
1308
|
+
height: `${k}px`
|
|
1309
|
+
}), j.current = requestAnimationFrame(() => {
|
|
1306
1310
|
d("collapsing"), _({
|
|
1307
1311
|
height: g,
|
|
1308
1312
|
overflow: "hidden"
|
|
1309
1313
|
});
|
|
1310
1314
|
});
|
|
1311
1315
|
}), () => {
|
|
1312
|
-
|
|
1316
|
+
j.current && cancelAnimationFrame(j.current), C.current && Ut(C.current);
|
|
1313
1317
|
};
|
|
1314
1318
|
}, [
|
|
1315
1319
|
f,
|
|
1316
1320
|
g,
|
|
1317
|
-
|
|
1321
|
+
A,
|
|
1318
1322
|
e,
|
|
1319
1323
|
r,
|
|
1320
1324
|
d
|
|
@@ -1322,44 +1326,44 @@ function ss({
|
|
|
1322
1326
|
isExpanded: f,
|
|
1323
1327
|
setExpanded: h,
|
|
1324
1328
|
getToggleProps(x) {
|
|
1325
|
-
const { disabled: R, onClick: F, refKey:
|
|
1329
|
+
const { disabled: R, onClick: F, refKey: D, ...k } = {
|
|
1326
1330
|
refKey: "ref",
|
|
1327
1331
|
onClick() {
|
|
1328
1332
|
},
|
|
1329
1333
|
disabled: !1,
|
|
1330
1334
|
...x
|
|
1331
|
-
},
|
|
1335
|
+
}, N = b ? b.tagName === "BUTTON" : void 0, G = x == null ? void 0 : x[D || "ref"], ae = {
|
|
1332
1336
|
id: `react-collapsed-toggle-${p}`,
|
|
1333
1337
|
"aria-controls": `react-collapsed-panel-${p}`,
|
|
1334
1338
|
"aria-expanded": f,
|
|
1335
|
-
onClick(
|
|
1336
|
-
R || (F == null || F(
|
|
1339
|
+
onClick(ee) {
|
|
1340
|
+
R || (F == null || F(ee), h((ve) => !ve));
|
|
1337
1341
|
},
|
|
1338
|
-
[
|
|
1339
|
-
},
|
|
1342
|
+
[D || "ref"]: Xt(G, u)
|
|
1343
|
+
}, oe = {
|
|
1340
1344
|
type: "button",
|
|
1341
1345
|
disabled: R ? !0 : void 0
|
|
1342
|
-
},
|
|
1346
|
+
}, ce = {
|
|
1343
1347
|
"aria-disabled": R ? !0 : void 0,
|
|
1344
1348
|
role: "button",
|
|
1345
1349
|
tabIndex: R ? -1 : 0
|
|
1346
1350
|
};
|
|
1347
|
-
return
|
|
1348
|
-
...oe,
|
|
1351
|
+
return N === !1 ? { ...ae, ...ce, ...k } : N === !0 ? { ...ae, ...oe, ...k } : {
|
|
1349
1352
|
...ae,
|
|
1350
|
-
...
|
|
1351
|
-
...
|
|
1353
|
+
...oe,
|
|
1354
|
+
...ce,
|
|
1355
|
+
...k
|
|
1352
1356
|
};
|
|
1353
1357
|
},
|
|
1354
1358
|
getCollapseProps(x) {
|
|
1355
|
-
const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x },
|
|
1359
|
+
const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x }, D = x == null ? void 0 : x[F || "ref"];
|
|
1356
1360
|
return {
|
|
1357
1361
|
id: `react-collapsed-panel-${p}`,
|
|
1358
1362
|
"aria-hidden": !f,
|
|
1359
1363
|
"aria-labelledby": `react-collapsed-toggle-${p}`,
|
|
1360
1364
|
role: "region",
|
|
1361
1365
|
...x,
|
|
1362
|
-
[F || "ref"]: Xt(y,
|
|
1366
|
+
[F || "ref"]: Xt(y, D),
|
|
1363
1367
|
style: {
|
|
1364
1368
|
boxSizing: "border-box",
|
|
1365
1369
|
...!S && !f ? {
|
|
@@ -1380,7 +1384,7 @@ const os = ({ open: e, children: r }) => {
|
|
|
1380
1384
|
isExpanded: n,
|
|
1381
1385
|
duration: 500
|
|
1382
1386
|
});
|
|
1383
|
-
return
|
|
1387
|
+
return te(() => {
|
|
1384
1388
|
s(e);
|
|
1385
1389
|
}, [e, s]), /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx("div", { ...a(), children: r }) });
|
|
1386
1390
|
};
|
|
@@ -1402,7 +1406,7 @@ const Lr = ({ folder: e }) => {
|
|
|
1402
1406
|
}, d = (p) => {
|
|
1403
1407
|
p.stopPropagation(), n((f) => !f);
|
|
1404
1408
|
};
|
|
1405
|
-
return
|
|
1409
|
+
return te(() => {
|
|
1406
1410
|
a(i === e.path);
|
|
1407
1411
|
const p = i.split("/");
|
|
1408
1412
|
p.pop(), p.join("/") === e.path && n(!0);
|
|
@@ -1450,7 +1454,7 @@ const Lr = ({ folder: e }) => {
|
|
|
1450
1454
|
subDirectories: s(l.path, i)
|
|
1451
1455
|
})) : [];
|
|
1452
1456
|
};
|
|
1453
|
-
return
|
|
1457
|
+
return te(() => {
|
|
1454
1458
|
if (Array.isArray(n)) {
|
|
1455
1459
|
const a = n.filter((c) => c.isDirectory), i = Object.groupBy(a, ({ path: c }) => cs(c));
|
|
1456
1460
|
r(() => s("", i));
|
|
@@ -1459,48 +1463,48 @@ const Lr = ({ folder: e }) => {
|
|
|
1459
1463
|
};
|
|
1460
1464
|
Or.displayName = "NavigationPane";
|
|
1461
1465
|
const kr = () => {
|
|
1462
|
-
const [e, r] = L([]), [n, s] = L([]), [a, i] = L([]), [c, l] = L(!1), { currentPath: d, setCurrentPath: p } = Ee(), f =
|
|
1466
|
+
const [e, r] = L([]), [n, s] = L([]), [a, i] = L([]), [c, l] = L(!1), { currentPath: d, setCurrentPath: p } = Ee(), f = fe(null), h = fe([]), w = fe(null), S = Be(() => {
|
|
1463
1467
|
l(!1);
|
|
1464
1468
|
});
|
|
1465
|
-
|
|
1469
|
+
te(() => {
|
|
1466
1470
|
r(() => {
|
|
1467
|
-
let
|
|
1471
|
+
let C = "";
|
|
1468
1472
|
return d == null ? void 0 : d.split("/").map((y) => ({
|
|
1469
1473
|
name: y || "Home",
|
|
1470
|
-
path: y === "" ? y :
|
|
1474
|
+
path: y === "" ? y : C += `/${y}`
|
|
1471
1475
|
}));
|
|
1472
1476
|
}), s([]), i([]);
|
|
1473
1477
|
}, [d]);
|
|
1474
|
-
const M = (
|
|
1475
|
-
p(
|
|
1478
|
+
const M = (C) => {
|
|
1479
|
+
p(C);
|
|
1476
1480
|
}, z = () => {
|
|
1477
|
-
const
|
|
1478
|
-
return
|
|
1479
|
-
},
|
|
1481
|
+
const C = f.current.clientWidth, y = getComputedStyle(f.current), b = parseFloat(y.paddingLeft), u = n.length > 0 ? 1 : 0, g = parseFloat(y.gap) * (e.length + u);
|
|
1482
|
+
return C - (b + g);
|
|
1483
|
+
}, A = () => {
|
|
1480
1484
|
var u;
|
|
1481
|
-
const
|
|
1482
|
-
return
|
|
1483
|
-
},
|
|
1484
|
-
return
|
|
1485
|
-
var
|
|
1486
|
-
if (
|
|
1487
|
-
const y = e[1], b = (
|
|
1485
|
+
const C = z(), y = h.current.reduce((g, _) => _ ? g + _.clientWidth : g, 0), b = ((u = w.current) == null ? void 0 : u.clientWidth) || 0;
|
|
1486
|
+
return C - (y + b);
|
|
1487
|
+
}, j = () => f.current.scrollWidth > f.current.clientWidth;
|
|
1488
|
+
return te(() => {
|
|
1489
|
+
var C;
|
|
1490
|
+
if (j()) {
|
|
1491
|
+
const y = e[1], b = (C = h.current[1]) == null ? void 0 : C.clientWidth;
|
|
1488
1492
|
i((u) => [...u, b]), s((u) => [...u, y]), r((u) => u.filter((g, _) => _ !== 1));
|
|
1489
|
-
} else if (n.length > 0 &&
|
|
1493
|
+
} else if (n.length > 0 && A() > a.at(-1)) {
|
|
1490
1494
|
const y = [e[0], n.at(-1), ...e.slice(1)];
|
|
1491
1495
|
r(y), s((b) => b.slice(0, -1)), i((b) => b.slice(0, -1));
|
|
1492
1496
|
}
|
|
1493
|
-
}, [
|
|
1494
|
-
/* @__PURE__ */ t.jsx("div", { className: "breadcrumb", ref: f, children: e.map((
|
|
1497
|
+
}, [j]), /* @__PURE__ */ t.jsxs("div", { className: "bread-crumb-container", children: [
|
|
1498
|
+
/* @__PURE__ */ t.jsx("div", { className: "breadcrumb", ref: f, children: e.map((C, y) => /* @__PURE__ */ t.jsxs("div", { style: { display: "contents" }, children: [
|
|
1495
1499
|
/* @__PURE__ */ t.jsxs(
|
|
1496
1500
|
"span",
|
|
1497
1501
|
{
|
|
1498
1502
|
className: "folder-name",
|
|
1499
|
-
onClick: () => M(
|
|
1503
|
+
onClick: () => M(C.path),
|
|
1500
1504
|
ref: (b) => h.current[y] = b,
|
|
1501
1505
|
children: [
|
|
1502
1506
|
y === 0 ? /* @__PURE__ */ t.jsx(bn, {}) : /* @__PURE__ */ t.jsx(Tn, {}),
|
|
1503
|
-
|
|
1507
|
+
C.name
|
|
1504
1508
|
]
|
|
1505
1509
|
}
|
|
1506
1510
|
),
|
|
@@ -1515,13 +1519,13 @@ const kr = () => {
|
|
|
1515
1519
|
}
|
|
1516
1520
|
)
|
|
1517
1521
|
] }, y)) }),
|
|
1518
|
-
c && /* @__PURE__ */ t.jsx("ul", { ref: S.ref, className: "hidden-folders-container", children: n.map((
|
|
1522
|
+
c && /* @__PURE__ */ t.jsx("ul", { ref: S.ref, className: "hidden-folders-container", children: n.map((C, y) => /* @__PURE__ */ t.jsx(
|
|
1519
1523
|
"li",
|
|
1520
1524
|
{
|
|
1521
1525
|
onClick: () => {
|
|
1522
|
-
M(
|
|
1526
|
+
M(C.path), l(!1);
|
|
1523
1527
|
},
|
|
1524
|
-
children:
|
|
1528
|
+
children: C.name
|
|
1525
1529
|
},
|
|
1526
1530
|
y
|
|
1527
1531
|
)) })
|
|
@@ -1594,18 +1598,18 @@ const Xe = (e) => ({
|
|
|
1594
1598
|
), zr = ({ message: e, xPlacement: r, yPlacement: n }) => /* @__PURE__ */ t.jsx("p", { className: `error-tooltip ${r} ${n}`, children: e }), ls = 220, us = ({ filesViewRef: e, file: r, onCreateFolder: n, triggerAction: s }) => {
|
|
1595
1599
|
const [a, i] = L(r.name), [c, l] = L(!1), [d, p] = L(""), [f, h] = L("right"), [w, S] = L("bottom"), M = Be((g) => {
|
|
1596
1600
|
g.preventDefault(), g.stopPropagation();
|
|
1597
|
-
}), { currentFolder: z, currentPathFiles:
|
|
1601
|
+
}), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = (g) => {
|
|
1598
1602
|
i(g.target.value), l(!1);
|
|
1599
1603
|
}, b = (g) => {
|
|
1600
1604
|
if (g.stopPropagation(), g.key === "Enter") {
|
|
1601
1605
|
g.preventDefault(), u();
|
|
1602
1606
|
return;
|
|
1603
1607
|
}
|
|
1604
|
-
g.key === "Escape" && (g.preventDefault(), s.close(),
|
|
1608
|
+
g.key === "Escape" && (g.preventDefault(), s.close(), j((x) => x.filter((R) => R.key !== r.key))), /[\\/:*?"<>|]/.test(g.key) ? (g.preventDefault(), p(
|
|
1605
1609
|
`A file name can't contain any of the following characters: \\ / : * ? " < > |`
|
|
1606
1610
|
), l(!0)) : (l(!1), p(""));
|
|
1607
1611
|
};
|
|
1608
|
-
|
|
1612
|
+
te(() => {
|
|
1609
1613
|
if (c) {
|
|
1610
1614
|
const g = setTimeout(() => {
|
|
1611
1615
|
l(!1), p("");
|
|
@@ -1616,20 +1620,20 @@ const Xe = (e) => ({
|
|
|
1616
1620
|
function u() {
|
|
1617
1621
|
var R, F;
|
|
1618
1622
|
let g = a.trim();
|
|
1619
|
-
const _ =
|
|
1620
|
-
if (_.find((
|
|
1623
|
+
const _ = A.filter((D) => !(D.key && D.key === r.key));
|
|
1624
|
+
if (_.find((D) => D.name.toLowerCase() === g.toLowerCase())) {
|
|
1621
1625
|
p(`This destination already contains a folder named '${g}'.`), l(!0), (R = M.ref.current) == null || R.focus(), (F = M.ref.current) == null || F.select(), M.setIsClicked(!1);
|
|
1622
1626
|
return;
|
|
1623
1627
|
}
|
|
1624
|
-
g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z),
|
|
1628
|
+
g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), j((D) => D.filter((k) => k.key !== r.key)), s.close();
|
|
1625
1629
|
}
|
|
1626
|
-
return
|
|
1630
|
+
return te(() => {
|
|
1627
1631
|
var g, _, x;
|
|
1628
1632
|
if ((g = M.ref.current) == null || g.focus(), (_ = M.ref.current) == null || _.select(), (x = M.ref) != null && x.current) {
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1633
|
+
const k = e.current.getBoundingClientRect(), N = M.ref.current, G = N.getBoundingClientRect();
|
|
1634
|
+
k.right - G.left > 313 ? h("right") : h("left"), k.bottom - (G.top + N.clientHeight) > 88 ? S("bottom") : S("top");
|
|
1631
1635
|
}
|
|
1632
|
-
}, []),
|
|
1636
|
+
}, []), te(() => {
|
|
1633
1637
|
M.isClicked && u();
|
|
1634
1638
|
}, [M.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1635
1639
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1641,7 +1645,7 @@ const Xe = (e) => ({
|
|
|
1641
1645
|
onChange: y,
|
|
1642
1646
|
onKeyDown: b,
|
|
1643
1647
|
onClick: (g) => g.stopPropagation(),
|
|
1644
|
-
...
|
|
1648
|
+
...C === "list" && { rows: 1 }
|
|
1645
1649
|
}
|
|
1646
1650
|
),
|
|
1647
1651
|
c && /* @__PURE__ */ t.jsx(
|
|
@@ -1675,10 +1679,10 @@ const Ar = ({
|
|
|
1675
1679
|
contentClassName: i = "",
|
|
1676
1680
|
closeButton: c = !0
|
|
1677
1681
|
}) => {
|
|
1678
|
-
const l =
|
|
1682
|
+
const l = fe(null), d = (p) => {
|
|
1679
1683
|
p.key === "Escape" && n(!1);
|
|
1680
1684
|
};
|
|
1681
|
-
return
|
|
1685
|
+
return te(() => {
|
|
1682
1686
|
r ? l.current.showModal() : l.current.close();
|
|
1683
1687
|
}, [r]), /* @__PURE__ */ t.jsxs(
|
|
1684
1688
|
"dialog",
|
|
@@ -1697,7 +1701,7 @@ const Ar = ({
|
|
|
1697
1701
|
}
|
|
1698
1702
|
);
|
|
1699
1703
|
}, _e = (e) => e.split(".").pop(), fs = 220, hs = ({ filesViewRef: e, file: r, onRename: n, triggerAction: s }) => {
|
|
1700
|
-
const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles:
|
|
1704
|
+
const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
|
|
1701
1705
|
var R;
|
|
1702
1706
|
(R = y.current) != null && R.contains(x.target) || (x.preventDefault(), x.stopPropagation());
|
|
1703
1707
|
}), u = (x) => {
|
|
@@ -1709,7 +1713,7 @@ const Ar = ({
|
|
|
1709
1713
|
`A file name can't contain any of the following characters: \\ / : * ? " < > |`
|
|
1710
1714
|
), p(!0)) : p(!1);
|
|
1711
1715
|
};
|
|
1712
|
-
|
|
1716
|
+
te(() => {
|
|
1713
1717
|
if (d) {
|
|
1714
1718
|
const x = setTimeout(() => {
|
|
1715
1719
|
p(!1), h("");
|
|
@@ -1719,11 +1723,11 @@ const Ar = ({
|
|
|
1719
1723
|
}, [d]);
|
|
1720
1724
|
function g(x) {
|
|
1721
1725
|
if (a === "" || a === r.name) {
|
|
1722
|
-
|
|
1726
|
+
j(
|
|
1723
1727
|
(R) => R.map((F) => (F.key === r.key && (F.isEditing = !1), F))
|
|
1724
1728
|
), s.close();
|
|
1725
1729
|
return;
|
|
1726
|
-
} else if (
|
|
1730
|
+
} else if (A.some((R) => R.name === a)) {
|
|
1727
1731
|
p(!0), h(`This destination already contains a folder named '${a}'.`), b.setIsClicked(!1);
|
|
1728
1732
|
return;
|
|
1729
1733
|
} else if (!r.isDirectory && !x) {
|
|
@@ -1733,24 +1737,24 @@ const Ar = ({
|
|
|
1733
1737
|
return;
|
|
1734
1738
|
}
|
|
1735
1739
|
}
|
|
1736
|
-
p(!1), Le(n, "onRename", r, a),
|
|
1740
|
+
p(!1), Le(n, "onRename", r, a), j((R) => R.filter((F) => F.key !== r.key)), s.close();
|
|
1737
1741
|
}
|
|
1738
1742
|
const _ = () => {
|
|
1739
|
-
var x, R, F,
|
|
1743
|
+
var x, R, F, D, k, N;
|
|
1740
1744
|
if ((R = (x = b.ref) == null ? void 0 : x.current) == null || R.focus(), r.isDirectory)
|
|
1741
|
-
(
|
|
1745
|
+
(D = (F = b.ref) == null ? void 0 : F.current) == null || D.select();
|
|
1742
1746
|
else {
|
|
1743
|
-
const
|
|
1744
|
-
(
|
|
1747
|
+
const G = _e(r.name), ae = r.name.length - G.length - 1;
|
|
1748
|
+
(N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0, ae);
|
|
1745
1749
|
}
|
|
1746
1750
|
};
|
|
1747
|
-
return
|
|
1751
|
+
return te(() => {
|
|
1748
1752
|
var x;
|
|
1749
1753
|
if (_(), (x = b.ref) != null && x.current) {
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1754
|
+
const k = e.current.getBoundingClientRect(), N = b.ref.current, G = N.getBoundingClientRect();
|
|
1755
|
+
k.right - G.left > 313 ? S("right") : S("left"), k.bottom - (G.top + N.clientHeight) > 88 ? z("bottom") : z("top");
|
|
1752
1756
|
}
|
|
1753
|
-
}, []),
|
|
1757
|
+
}, []), te(() => {
|
|
1754
1758
|
b.isClicked && g(!1), _();
|
|
1755
1759
|
}, [b.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1756
1760
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1764,7 +1768,7 @@ const Ar = ({
|
|
|
1764
1768
|
},
|
|
1765
1769
|
onKeyDown: u,
|
|
1766
1770
|
onClick: (x) => x.stopPropagation(),
|
|
1767
|
-
...
|
|
1771
|
+
...C === "list" && { rows: 1 }
|
|
1768
1772
|
}
|
|
1769
1773
|
),
|
|
1770
1774
|
d && /* @__PURE__ */ t.jsx(
|
|
@@ -1794,7 +1798,7 @@ const Ar = ({
|
|
|
1794
1798
|
{
|
|
1795
1799
|
type: "secondary",
|
|
1796
1800
|
onClick: () => {
|
|
1797
|
-
|
|
1801
|
+
j(
|
|
1798
1802
|
(x) => x.map((R) => (R.key === r.key && (R.isEditing = !1), R))
|
|
1799
1803
|
), l(!1), s.close();
|
|
1800
1804
|
},
|
|
@@ -1859,59 +1863,59 @@ const Ar = ({
|
|
|
1859
1863
|
handleContextMenu: p,
|
|
1860
1864
|
setLastSelectedFile: f
|
|
1861
1865
|
}) => {
|
|
1862
|
-
var
|
|
1863
|
-
const [h, w] = L(!1), [S, M] = L(0), [z,
|
|
1866
|
+
var he, E, me, Te;
|
|
1867
|
+
const [h, w] = L(!1), [S, M] = L(0), [z, A] = L("hidden"), [j, C] = L(""), [y, b] = L(null), { activeLayout: u } = Se(), g = u === "grid" ? 48 : 20, _ = Xe(g), { setCurrentPath: x, currentPathFiles: R } = Ee(), { setSelectedFiles: F } = Fe(), { clipBoard: D, handleCutCopy: k, setClipBoard: N, handlePasting: G } = Je(), ae = fe(null), oe = Xe(it), ce = (D == null ? void 0 : D.isMoving) && D.files.find((Y) => Y.name === r.name && Y.path === r.path), ee = () => {
|
|
1864
1868
|
i(r), r.isDirectory ? (x(r.path), F([])) : a && d.show("previewFile");
|
|
1865
|
-
},
|
|
1869
|
+
}, ve = (Y, ue) => {
|
|
1866
1870
|
if (l.length > 0 && Y) {
|
|
1867
|
-
let
|
|
1871
|
+
let Ce = !1, Re = l[0], we = e;
|
|
1868
1872
|
if (Re >= we) {
|
|
1869
1873
|
const Qe = Re;
|
|
1870
|
-
Re = we, we = Qe,
|
|
1874
|
+
Re = we, we = Qe, Ce = !0;
|
|
1871
1875
|
}
|
|
1872
1876
|
const He = R.slice(Re, we + 1);
|
|
1873
|
-
F(
|
|
1874
|
-
} else l.length > 0 &&
|
|
1875
|
-
const Re =
|
|
1876
|
-
return
|
|
1877
|
+
F(Ce ? He.reverse() : He);
|
|
1878
|
+
} else l.length > 0 && ue ? F((Ce) => {
|
|
1879
|
+
const Re = Ce.filter((we) => we.path !== r.path);
|
|
1880
|
+
return Ce.length === Re.length ? [...Ce, r] : Re;
|
|
1877
1881
|
}) : F([r]);
|
|
1878
|
-
},
|
|
1882
|
+
}, v = (Y) => {
|
|
1879
1883
|
if (Y.stopPropagation(), r.isEditing) return;
|
|
1880
|
-
|
|
1881
|
-
const
|
|
1882
|
-
if (
|
|
1883
|
-
|
|
1884
|
+
ve(Y.shiftKey, Y.ctrlKey);
|
|
1885
|
+
const ue = (/* @__PURE__ */ new Date()).getTime();
|
|
1886
|
+
if (ue - S < 300) {
|
|
1887
|
+
ee();
|
|
1884
1888
|
return;
|
|
1885
1889
|
}
|
|
1886
|
-
M(
|
|
1890
|
+
M(ue);
|
|
1887
1891
|
}, P = (Y) => {
|
|
1888
|
-
Y.key === "Enter" && (Y.stopPropagation(), F([r]),
|
|
1892
|
+
Y.key === "Enter" && (Y.stopPropagation(), F([r]), ee());
|
|
1889
1893
|
}, V = (Y) => {
|
|
1890
1894
|
Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || F([r]), f(r), p(Y, !0));
|
|
1891
1895
|
}, W = () => {
|
|
1892
|
-
|
|
1896
|
+
A("visible");
|
|
1893
1897
|
}, I = () => {
|
|
1894
|
-
!h &&
|
|
1895
|
-
},
|
|
1896
|
-
Y.target.checked ? F((
|
|
1898
|
+
!h && A("hidden");
|
|
1899
|
+
}, X = (Y) => {
|
|
1900
|
+
Y.target.checked ? F((ue) => [...ue, r]) : F((ue) => ue.filter((Ce) => Ce.name !== r.name && Ce.path !== r.path)), w(Y.target.checked);
|
|
1897
1901
|
}, O = (Y) => {
|
|
1898
|
-
Y.dataTransfer.setDragImage(
|
|
1899
|
-
}, $ = () =>
|
|
1900
|
-
Y.preventDefault(), h || !r.isDirectory ? Y.dataTransfer.dropEffect = "none" : (b({ x: Y.clientX, y: Y.clientY + 12 }), Y.dataTransfer.dropEffect = "copy",
|
|
1902
|
+
Y.dataTransfer.setDragImage(ae.current, 30, 50), Y.dataTransfer.effectAllowed = "copy", k(!0);
|
|
1903
|
+
}, $ = () => N(null), q = (Y) => {
|
|
1904
|
+
Y.preventDefault(), h || !r.isDirectory ? Y.dataTransfer.dropEffect = "none" : (b({ x: Y.clientX, y: Y.clientY + 12 }), Y.dataTransfer.dropEffect = "copy", C("file-drop-zone"));
|
|
1901
1905
|
}, Z = (Y) => {
|
|
1902
|
-
Y.currentTarget.contains(Y.relatedTarget) || (
|
|
1903
|
-
},
|
|
1904
|
-
Y.preventDefault(), !(h || !r.isDirectory) && (
|
|
1906
|
+
Y.currentTarget.contains(Y.relatedTarget) || (C((ue) => ue && ""), b(null));
|
|
1907
|
+
}, U = (Y) => {
|
|
1908
|
+
Y.preventDefault(), !(h || !r.isDirectory) && (G(r), C((ue) => ue && ""), b(null));
|
|
1905
1909
|
};
|
|
1906
|
-
return
|
|
1907
|
-
w(l.includes(e)),
|
|
1910
|
+
return te(() => {
|
|
1911
|
+
w(l.includes(e)), A(l.includes(e) ? "visible" : "hidden");
|
|
1908
1912
|
}, [l]), /* @__PURE__ */ t.jsxs(
|
|
1909
1913
|
"div",
|
|
1910
1914
|
{
|
|
1911
|
-
className: `file-item-container ${
|
|
1915
|
+
className: `file-item-container ${j} ${h || r.isEditing ? "file-selected" : ""} ${ce ? "file-moving" : ""}`,
|
|
1912
1916
|
tabIndex: 0,
|
|
1913
1917
|
title: r.name,
|
|
1914
|
-
onClick:
|
|
1918
|
+
onClick: v,
|
|
1915
1919
|
onKeyDown: P,
|
|
1916
1920
|
onContextMenu: V,
|
|
1917
1921
|
onMouseOver: W,
|
|
@@ -1919,10 +1923,10 @@ const Ar = ({
|
|
|
1919
1923
|
draggable: h,
|
|
1920
1924
|
onDragStart: O,
|
|
1921
1925
|
onDragEnd: $,
|
|
1922
|
-
onDragEnter:
|
|
1923
|
-
onDragOver:
|
|
1926
|
+
onDragEnter: q,
|
|
1927
|
+
onDragOver: q,
|
|
1924
1928
|
onDragLeave: Z,
|
|
1925
|
-
onDrop:
|
|
1929
|
+
onDrop: U,
|
|
1926
1930
|
children: [
|
|
1927
1931
|
/* @__PURE__ */ t.jsxs("div", { className: "file-item", children: [
|
|
1928
1932
|
!r.isEditing && /* @__PURE__ */ t.jsx(
|
|
@@ -1932,11 +1936,11 @@ const Ar = ({
|
|
|
1932
1936
|
id: r.name,
|
|
1933
1937
|
checked: h,
|
|
1934
1938
|
className: `selection-checkbox ${z}`,
|
|
1935
|
-
onChange:
|
|
1939
|
+
onChange: X,
|
|
1936
1940
|
onClick: (Y) => Y.stopPropagation()
|
|
1937
1941
|
}
|
|
1938
1942
|
),
|
|
1939
|
-
r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: g }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: _[(E = (
|
|
1943
|
+
r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: g }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: _[(E = (he = r.name) == null ? void 0 : he.split(".").pop()) == null ? void 0 : E.toLowerCase()] ?? /* @__PURE__ */ t.jsx(Ue, { size: g }) }),
|
|
1940
1944
|
r.isEditing ? /* @__PURE__ */ t.jsx("div", { className: `rename-file-container ${u}`, children: d.actionType === "createFolder" ? /* @__PURE__ */ t.jsx(
|
|
1941
1945
|
us,
|
|
1942
1946
|
{
|
|
@@ -1973,7 +1977,7 @@ const Ar = ({
|
|
|
1973
1977
|
]
|
|
1974
1978
|
}
|
|
1975
1979
|
),
|
|
1976
|
-
/* @__PURE__ */ t.jsx("div", { ref:
|
|
1980
|
+
/* @__PURE__ */ t.jsx("div", { ref: ae, className: "drag-icon", children: r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: it }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: oe[(Te = (me = r.name) == null ? void 0 : me.split(".").pop()) == null ? void 0 : Te.toLowerCase()] ?? /* @__PURE__ */ t.jsx(Ue, { size: it }) }) })
|
|
1977
1981
|
]
|
|
1978
1982
|
}
|
|
1979
1983
|
);
|
|
@@ -1982,15 +1986,15 @@ const Ar = ({
|
|
|
1982
1986
|
s.icon,
|
|
1983
1987
|
/* @__PURE__ */ t.jsx("span", { children: s.title })
|
|
1984
1988
|
] }, s.title)) }), gs = ({ filesViewRef: e, contextMenuRef: r, menuItems: n, visible: s, clickPosition: a }) => {
|
|
1985
|
-
const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S =
|
|
1986
|
-
const { clickX:
|
|
1987
|
-
F ? (c(`${R}px`), w("right")) :
|
|
1988
|
-
}, z = (
|
|
1989
|
-
|
|
1990
|
-
},
|
|
1991
|
-
f(
|
|
1989
|
+
const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S = fe(null), M = () => {
|
|
1990
|
+
const { clickX: j, clickY: C } = a, y = e.current, b = y.getBoundingClientRect(), u = y.offsetWidth - y.clientWidth, g = r.current.getBoundingClientRect(), _ = g.width, x = g.height, R = j - b.left, F = b.width - (R + u) > _, D = !F, k = C - b.top, N = b.height - k > x, G = !N;
|
|
1991
|
+
F ? (c(`${R}px`), w("right")) : D && (c(`${R - _}px`), w("left")), N ? d(`${k + y.scrollTop}px`) : G && d(`${k + y.scrollTop - x}px`);
|
|
1992
|
+
}, z = (j) => {
|
|
1993
|
+
j.preventDefault(), j.stopPropagation();
|
|
1994
|
+
}, A = (j) => {
|
|
1995
|
+
f(j);
|
|
1992
1996
|
};
|
|
1993
|
-
if (
|
|
1997
|
+
if (te(() => {
|
|
1994
1998
|
s && r.current ? M() : (d(0), c(0), f(null));
|
|
1995
1999
|
}, [s]), s)
|
|
1996
2000
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1998,31 +2002,31 @@ const Ar = ({
|
|
|
1998
2002
|
{
|
|
1999
2003
|
ref: r,
|
|
2000
2004
|
onContextMenu: z,
|
|
2001
|
-
onClick: (
|
|
2005
|
+
onClick: (j) => j.stopPropagation(),
|
|
2002
2006
|
className: `fm-context-menu ${l ? "visible" : "hidden"}`,
|
|
2003
2007
|
style: {
|
|
2004
2008
|
top: l,
|
|
2005
2009
|
left: i
|
|
2006
2010
|
},
|
|
2007
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "file-context-menu-list", children: /* @__PURE__ */ t.jsx("ul", { children: n.filter((
|
|
2008
|
-
const y =
|
|
2011
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "file-context-menu-list", children: /* @__PURE__ */ t.jsx("ul", { children: n.filter((j) => !j.hidden).map((j, C) => {
|
|
2012
|
+
const y = j.hasOwnProperty("children"), b = p === C && y;
|
|
2009
2013
|
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
2010
2014
|
/* @__PURE__ */ t.jsxs(
|
|
2011
2015
|
"li",
|
|
2012
2016
|
{
|
|
2013
|
-
onClick:
|
|
2014
|
-
className: `${
|
|
2015
|
-
onMouseOver: () =>
|
|
2017
|
+
onClick: j.onClick,
|
|
2018
|
+
className: `${j.className ?? ""} ${b ? "active" : ""}`,
|
|
2019
|
+
onMouseOver: () => A(C),
|
|
2016
2020
|
children: [
|
|
2017
|
-
|
|
2018
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
2021
|
+
j.icon,
|
|
2022
|
+
/* @__PURE__ */ t.jsx("span", { children: j.title }),
|
|
2019
2023
|
y && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2020
2024
|
/* @__PURE__ */ t.jsx(Sn, { size: 14, className: "list-expand-icon" }),
|
|
2021
2025
|
b && /* @__PURE__ */ t.jsx(
|
|
2022
2026
|
ms,
|
|
2023
2027
|
{
|
|
2024
2028
|
subMenuRef: S,
|
|
2025
|
-
list:
|
|
2029
|
+
list: j.children,
|
|
2026
2030
|
position: h
|
|
2027
2031
|
}
|
|
2028
2032
|
)
|
|
@@ -2030,8 +2034,8 @@ const Ar = ({
|
|
|
2030
2034
|
]
|
|
2031
2035
|
}
|
|
2032
2036
|
),
|
|
2033
|
-
|
|
2034
|
-
] },
|
|
2037
|
+
j.divider && /* @__PURE__ */ t.jsx("div", { className: "divider" })
|
|
2038
|
+
] }, j.title);
|
|
2035
2039
|
}) }) })
|
|
2036
2040
|
}
|
|
2037
2041
|
);
|
|
@@ -2040,30 +2044,30 @@ function ys(e) {
|
|
|
2040
2044
|
return H({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z" }, child: [] }] })(e);
|
|
2041
2045
|
}
|
|
2042
2046
|
const xs = (e, r, n) => {
|
|
2043
|
-
const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting:
|
|
2044
|
-
h.isDirectory ? (u(h.path), a([]),
|
|
2045
|
-
},
|
|
2047
|
+
const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: A } = Je(), { selectedFiles: j, setSelectedFiles: C, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
|
|
2048
|
+
h.isDirectory ? (u(h.path), a([]), C([])) : r && n.show("previewFile"), c(!1);
|
|
2049
|
+
}, D = (O) => {
|
|
2046
2050
|
z(O), c(!1);
|
|
2047
|
-
}, N = () => {
|
|
2048
|
-
D(h), c(!1);
|
|
2049
2051
|
}, k = () => {
|
|
2052
|
+
A(h), c(!1);
|
|
2053
|
+
}, N = () => {
|
|
2050
2054
|
c(!1), n.show("rename");
|
|
2051
|
-
},
|
|
2055
|
+
}, G = () => {
|
|
2052
2056
|
y(), c(!1);
|
|
2053
|
-
}, oe = () => {
|
|
2054
|
-
c(!1), n.show("delete");
|
|
2055
2057
|
}, ae = () => {
|
|
2058
|
+
c(!1), n.show("delete");
|
|
2059
|
+
}, oe = () => {
|
|
2056
2060
|
c(!1), Le(e, "onRefresh"), M(null);
|
|
2057
|
-
},
|
|
2061
|
+
}, ce = () => {
|
|
2058
2062
|
n.show("createFolder"), c(!1);
|
|
2059
|
-
},
|
|
2063
|
+
}, ee = () => {
|
|
2060
2064
|
c(!1), n.show("uploadFile");
|
|
2061
|
-
},
|
|
2062
|
-
|
|
2063
|
-
},
|
|
2065
|
+
}, ve = () => {
|
|
2066
|
+
C(g), c(!1);
|
|
2067
|
+
}, v = [
|
|
2064
2068
|
{
|
|
2065
2069
|
title: "View",
|
|
2066
|
-
icon: x === "grid" ? /* @__PURE__ */ t.jsx(Dt, { size: 18 }) : /* @__PURE__ */ t.jsx(
|
|
2070
|
+
icon: x === "grid" ? /* @__PURE__ */ t.jsx(Dt, { size: 18 }) : /* @__PURE__ */ t.jsx(qe, { size: 18 }),
|
|
2067
2071
|
onClick: () => {
|
|
2068
2072
|
},
|
|
2069
2073
|
children: [
|
|
@@ -2077,7 +2081,7 @@ const xs = (e, r, n) => {
|
|
|
2077
2081
|
},
|
|
2078
2082
|
{
|
|
2079
2083
|
title: "List",
|
|
2080
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2084
|
+
icon: /* @__PURE__ */ t.jsx(qe, { size: 18 }),
|
|
2081
2085
|
selected: x === "list",
|
|
2082
2086
|
onClick: () => {
|
|
2083
2087
|
R("list"), c(!1);
|
|
@@ -2088,47 +2092,47 @@ const xs = (e, r, n) => {
|
|
|
2088
2092
|
{
|
|
2089
2093
|
title: "Refresh",
|
|
2090
2094
|
icon: /* @__PURE__ */ t.jsx(xr, { size: 18 }),
|
|
2091
|
-
onClick:
|
|
2095
|
+
onClick: oe,
|
|
2092
2096
|
divider: !0
|
|
2093
2097
|
},
|
|
2094
2098
|
{
|
|
2095
2099
|
title: "New folder",
|
|
2096
2100
|
icon: /* @__PURE__ */ t.jsx(mr, { size: 18 }),
|
|
2097
|
-
onClick:
|
|
2101
|
+
onClick: ce
|
|
2098
2102
|
},
|
|
2099
2103
|
{
|
|
2100
2104
|
title: "Upload",
|
|
2101
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2102
|
-
onClick:
|
|
2105
|
+
icon: /* @__PURE__ */ t.jsx(Cr, { size: 18 }),
|
|
2106
|
+
onClick: ee,
|
|
2103
2107
|
divider: !0
|
|
2104
2108
|
},
|
|
2105
2109
|
{
|
|
2106
2110
|
title: "Select all",
|
|
2107
2111
|
icon: /* @__PURE__ */ t.jsx(Fn, { size: 18 }),
|
|
2108
|
-
onClick:
|
|
2112
|
+
onClick: ve
|
|
2109
2113
|
}
|
|
2110
2114
|
], P = [
|
|
2111
2115
|
{
|
|
2112
2116
|
title: "Open",
|
|
2113
|
-
icon: h != null && h.isDirectory ? /* @__PURE__ */ t.jsx(ys, { size: 20 }) : /* @__PURE__ */ t.jsx(
|
|
2117
|
+
icon: h != null && h.isDirectory ? /* @__PURE__ */ t.jsx(ys, { size: 20 }) : /* @__PURE__ */ t.jsx(Ue, { size: 16 }),
|
|
2114
2118
|
onClick: F,
|
|
2115
2119
|
divider: !0
|
|
2116
2120
|
},
|
|
2117
2121
|
{
|
|
2118
2122
|
title: "Cut",
|
|
2119
2123
|
icon: /* @__PURE__ */ t.jsx(yr, { size: 19 }),
|
|
2120
|
-
onClick: () =>
|
|
2124
|
+
onClick: () => D(!0)
|
|
2121
2125
|
},
|
|
2122
2126
|
{
|
|
2123
2127
|
title: "Copy",
|
|
2124
2128
|
icon: /* @__PURE__ */ t.jsx(vr, { strokeWidth: 0.1, size: 17 }),
|
|
2125
|
-
onClick: () =>
|
|
2129
|
+
onClick: () => D(!1),
|
|
2126
2130
|
divider: !(h != null && h.isDirectory)
|
|
2127
2131
|
},
|
|
2128
2132
|
{
|
|
2129
2133
|
title: "Paste",
|
|
2130
2134
|
icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
|
|
2131
|
-
onClick:
|
|
2135
|
+
onClick: k,
|
|
2132
2136
|
className: `${S ? "" : "disable-paste"}`,
|
|
2133
2137
|
hidden: !(h != null && h.isDirectory),
|
|
2134
2138
|
divider: !0
|
|
@@ -2136,19 +2140,19 @@ const xs = (e, r, n) => {
|
|
|
2136
2140
|
{
|
|
2137
2141
|
title: "Rename",
|
|
2138
2142
|
icon: /* @__PURE__ */ t.jsx(br, { size: 19 }),
|
|
2139
|
-
onClick:
|
|
2140
|
-
hidden:
|
|
2143
|
+
onClick: N,
|
|
2144
|
+
hidden: j.length > 1
|
|
2141
2145
|
},
|
|
2142
2146
|
{
|
|
2143
2147
|
title: "Download",
|
|
2144
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2145
|
-
onClick:
|
|
2148
|
+
icon: /* @__PURE__ */ t.jsx(jt, { size: 18 }),
|
|
2149
|
+
onClick: G,
|
|
2146
2150
|
hidden: h == null ? void 0 : h.isDirectory
|
|
2147
2151
|
},
|
|
2148
2152
|
{
|
|
2149
2153
|
title: "Delete",
|
|
2150
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2151
|
-
onClick:
|
|
2154
|
+
icon: /* @__PURE__ */ t.jsx(jr, { size: 19 }),
|
|
2155
|
+
onClick: ae
|
|
2152
2156
|
}
|
|
2153
2157
|
], V = () => {
|
|
2154
2158
|
_((O) => [
|
|
@@ -2162,13 +2166,13 @@ const xs = (e, r, n) => {
|
|
|
2162
2166
|
}
|
|
2163
2167
|
]);
|
|
2164
2168
|
}, W = () => {
|
|
2165
|
-
_((O) => (O[s.at(-1)] && (O[s.at(-1)].isEditing = !0), O)), a([]),
|
|
2169
|
+
_((O) => (O[s.at(-1)] && (O[s.at(-1)].isEditing = !0), O)), a([]), C([]);
|
|
2166
2170
|
}, I = () => {
|
|
2167
|
-
a([]),
|
|
2168
|
-
},
|
|
2171
|
+
a([]), C((O) => O.length > 0 ? [] : O);
|
|
2172
|
+
}, X = (O, $ = !1) => {
|
|
2169
2173
|
O.preventDefault(), f({ clickX: O.clientX, clickY: O.clientY }), d($), !$ && I(), c(!0);
|
|
2170
2174
|
};
|
|
2171
|
-
return
|
|
2175
|
+
return te(() => {
|
|
2172
2176
|
if (n.isActive)
|
|
2173
2177
|
switch (n.actionType) {
|
|
2174
2178
|
case "createFolder":
|
|
@@ -2178,14 +2182,14 @@ const xs = (e, r, n) => {
|
|
|
2178
2182
|
W();
|
|
2179
2183
|
break;
|
|
2180
2184
|
}
|
|
2181
|
-
}, [n.isActive]),
|
|
2182
|
-
a([]),
|
|
2183
|
-
}, [b]),
|
|
2184
|
-
|
|
2185
|
-
}, [
|
|
2186
|
-
emptySelecCtxItems:
|
|
2185
|
+
}, [n.isActive]), te(() => {
|
|
2186
|
+
a([]), C([]);
|
|
2187
|
+
}, [b]), te(() => {
|
|
2188
|
+
j.length > 0 ? a(() => j.map((O) => g.findIndex(($) => $.path === O.path))) : a([]);
|
|
2189
|
+
}, [j, g]), {
|
|
2190
|
+
emptySelecCtxItems: v,
|
|
2187
2191
|
selecCtxItems: P,
|
|
2188
|
-
handleContextMenu:
|
|
2192
|
+
handleContextMenu: X,
|
|
2189
2193
|
unselectFiles: I,
|
|
2190
2194
|
visible: i,
|
|
2191
2195
|
setVisible: c,
|
|
@@ -2194,7 +2198,7 @@ const xs = (e, r, n) => {
|
|
|
2194
2198
|
clickPosition: p,
|
|
2195
2199
|
isSelectionCtx: l
|
|
2196
2200
|
};
|
|
2197
|
-
},
|
|
2201
|
+
}, js = ({ unselectFiles: e }) => {
|
|
2198
2202
|
const [r, n] = L(!1), { selectedFiles: s, setSelectedFiles: a } = Fe(), { currentPathFiles: i } = Ee(), c = yt(() => i.length > 0 && s.length === i.length, [s, i]), l = (d) => {
|
|
2199
2203
|
d.target.checked ? (a(i), n(!0)) : e();
|
|
2200
2204
|
};
|
|
@@ -2220,7 +2224,7 @@ const xs = (e, r, n) => {
|
|
|
2220
2224
|
enableFilePreview: a,
|
|
2221
2225
|
triggerAction: i
|
|
2222
2226
|
}) => {
|
|
2223
|
-
const { currentPathFiles: c } = Ee(), l =
|
|
2227
|
+
const { currentPathFiles: c } = Ee(), l = fe(null), { activeLayout: d } = Se(), {
|
|
2224
2228
|
emptySelecCtxItems: p,
|
|
2225
2229
|
selecCtxItems: f,
|
|
2226
2230
|
handleContextMenu: h,
|
|
@@ -2228,9 +2232,9 @@ const xs = (e, r, n) => {
|
|
|
2228
2232
|
visible: S,
|
|
2229
2233
|
setVisible: M,
|
|
2230
2234
|
setLastSelectedFile: z,
|
|
2231
|
-
selectedFileIndexes:
|
|
2232
|
-
clickPosition:
|
|
2233
|
-
isSelectionCtx:
|
|
2235
|
+
selectedFileIndexes: A,
|
|
2236
|
+
clickPosition: j,
|
|
2237
|
+
isSelectionCtx: C
|
|
2234
2238
|
} = xs(s, a, i), y = Be(() => M(!1));
|
|
2235
2239
|
return /* @__PURE__ */ t.jsxs(
|
|
2236
2240
|
"div",
|
|
@@ -2240,7 +2244,7 @@ const xs = (e, r, n) => {
|
|
|
2240
2244
|
onContextMenu: h,
|
|
2241
2245
|
onClick: w,
|
|
2242
2246
|
children: [
|
|
2243
|
-
d === "list" && /* @__PURE__ */ t.jsx(
|
|
2247
|
+
d === "list" && /* @__PURE__ */ t.jsx(js, { unselectFiles: w }),
|
|
2244
2248
|
(c == null ? void 0 : c.length) > 0 ? /* @__PURE__ */ t.jsx(t.Fragment, { children: c.map((b, u) => /* @__PURE__ */ t.jsx(
|
|
2245
2249
|
vs,
|
|
2246
2250
|
{
|
|
@@ -2252,7 +2256,7 @@ const xs = (e, r, n) => {
|
|
|
2252
2256
|
enableFilePreview: a,
|
|
2253
2257
|
triggerAction: i,
|
|
2254
2258
|
filesViewRef: l,
|
|
2255
|
-
selectedFileIndexes:
|
|
2259
|
+
selectedFileIndexes: A,
|
|
2256
2260
|
handleContextMenu: h,
|
|
2257
2261
|
setVisible: M,
|
|
2258
2262
|
setLastSelectedFile: z
|
|
@@ -2264,10 +2268,10 @@ const xs = (e, r, n) => {
|
|
|
2264
2268
|
{
|
|
2265
2269
|
filesViewRef: l,
|
|
2266
2270
|
contextMenuRef: y.ref,
|
|
2267
|
-
menuItems:
|
|
2271
|
+
menuItems: C ? f : p,
|
|
2268
2272
|
visible: S,
|
|
2269
2273
|
setVisible: M,
|
|
2270
|
-
clickPosition:
|
|
2274
|
+
clickPosition: j
|
|
2271
2275
|
}
|
|
2272
2276
|
)
|
|
2273
2277
|
]
|
|
@@ -2275,9 +2279,9 @@ const xs = (e, r, n) => {
|
|
|
2275
2279
|
);
|
|
2276
2280
|
};
|
|
2277
2281
|
Ir.displayName = "FileList";
|
|
2278
|
-
const
|
|
2282
|
+
const Cs = ({ triggerAction: e, onDelete: r }) => {
|
|
2279
2283
|
const [n, s] = L(""), { selectedFiles: a, setSelectedFiles: i } = Fe();
|
|
2280
|
-
|
|
2284
|
+
te(() => {
|
|
2281
2285
|
s(() => {
|
|
2282
2286
|
if (a.length === 1)
|
|
2283
2287
|
return `Are you sure you want to delete "${a[0].name}"?`;
|
|
@@ -2319,12 +2323,12 @@ const Ps = ({
|
|
|
2319
2323
|
handleFileRemove: c
|
|
2320
2324
|
}) => {
|
|
2321
2325
|
var g, _, x, R;
|
|
2322
|
-
const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33),
|
|
2323
|
-
d(0), s((
|
|
2324
|
-
...
|
|
2326
|
+
const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), A = fe(), { onError: j } = Ge(), C = (F) => {
|
|
2327
|
+
d(0), s((k) => ({
|
|
2328
|
+
...k,
|
|
2325
2329
|
[e]: !1
|
|
2326
2330
|
}));
|
|
2327
|
-
const
|
|
2331
|
+
const D = {
|
|
2328
2332
|
type: "upload",
|
|
2329
2333
|
message: "Upload failed.",
|
|
2330
2334
|
response: {
|
|
@@ -2334,58 +2338,60 @@ const Ps = ({
|
|
|
2334
2338
|
}
|
|
2335
2339
|
};
|
|
2336
2340
|
n(
|
|
2337
|
-
(
|
|
2338
|
-
...
|
|
2339
|
-
error:
|
|
2340
|
-
} :
|
|
2341
|
-
), M(!0),
|
|
2341
|
+
(k) => k.map((N, G) => e === G ? {
|
|
2342
|
+
...N,
|
|
2343
|
+
error: D.message
|
|
2344
|
+
} : N)
|
|
2345
|
+
), M(!0), j(D, r.file);
|
|
2342
2346
|
}, y = (F) => {
|
|
2343
2347
|
if (!F.error)
|
|
2344
|
-
return new Promise((
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2347
|
-
...
|
|
2348
|
+
return new Promise((D, k) => {
|
|
2349
|
+
const N = new XMLHttpRequest();
|
|
2350
|
+
A.current = N, s((ee) => ({
|
|
2351
|
+
...ee,
|
|
2348
2352
|
[e]: !0
|
|
2349
|
-
})),
|
|
2350
|
-
if (
|
|
2351
|
-
const
|
|
2352
|
-
d(
|
|
2353
|
+
})), N.upload.onprogress = (ee) => {
|
|
2354
|
+
if (ee.lengthComputable) {
|
|
2355
|
+
const ve = Math.round(ee.loaded / ee.total * 100);
|
|
2356
|
+
d(ve);
|
|
2353
2357
|
}
|
|
2354
|
-
},
|
|
2355
|
-
s((
|
|
2356
|
-
...
|
|
2358
|
+
}, N.onload = () => {
|
|
2359
|
+
s((ee) => ({
|
|
2360
|
+
...ee,
|
|
2357
2361
|
[e]: !1
|
|
2358
|
-
})),
|
|
2359
|
-
},
|
|
2360
|
-
N
|
|
2361
|
-
}
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2362
|
+
})), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), D(N.response)) : (k(N.statusText), C(N));
|
|
2363
|
+
}, N.onerror = () => {
|
|
2364
|
+
k(N.statusText), C(N);
|
|
2365
|
+
};
|
|
2366
|
+
const G = (a == null ? void 0 : a.method) || "POST";
|
|
2367
|
+
N.open(G, a == null ? void 0 : a.url, !0);
|
|
2368
|
+
const ae = a == null ? void 0 : a.headers;
|
|
2369
|
+
for (let ee in ae)
|
|
2370
|
+
N.setRequestHeader(ee, ae[ee]);
|
|
2371
|
+
const oe = new FormData(), ce = F == null ? void 0 : F.appendData;
|
|
2372
|
+
for (let ee in ce)
|
|
2373
|
+
ce[ee] && oe.append(ee, ce[ee]);
|
|
2374
|
+
oe.append("file", F.file), N.send(oe);
|
|
2369
2375
|
});
|
|
2370
2376
|
};
|
|
2371
|
-
|
|
2372
|
-
|
|
2377
|
+
te(() => {
|
|
2378
|
+
A.current || y(r);
|
|
2373
2379
|
}, []);
|
|
2374
2380
|
const b = () => {
|
|
2375
|
-
|
|
2381
|
+
A.current && (A.current.abort(), s((F) => ({
|
|
2376
2382
|
...F,
|
|
2377
2383
|
[e]: !1
|
|
2378
2384
|
})), w(!0), d(0));
|
|
2379
2385
|
}, u = () => {
|
|
2380
2386
|
r != null && r.file && (n(
|
|
2381
|
-
(F) => F.map((
|
|
2382
|
-
...
|
|
2387
|
+
(F) => F.map((D, k) => e === k ? {
|
|
2388
|
+
...D,
|
|
2383
2389
|
error: !1
|
|
2384
|
-
} :
|
|
2390
|
+
} : D)
|
|
2385
2391
|
), y({ ...r, error: !1 }), w(!1), M(!1));
|
|
2386
2392
|
};
|
|
2387
2393
|
return r.removed ? null : /* @__PURE__ */ t.jsxs("li", { children: [
|
|
2388
|
-
/* @__PURE__ */ t.jsx("div", { className: "file-icon", children: z[_e((g = r.file) == null ? void 0 : g.name)] ?? /* @__PURE__ */ t.jsx(
|
|
2394
|
+
/* @__PURE__ */ t.jsx("div", { className: "file-icon", children: z[_e((g = r.file) == null ? void 0 : g.name)] ?? /* @__PURE__ */ t.jsx(Ue, { size: 33 }) }),
|
|
2389
2395
|
/* @__PURE__ */ t.jsxs("div", { className: "file", children: [
|
|
2390
2396
|
/* @__PURE__ */ t.jsxs("div", { className: "file-details", children: [
|
|
2391
2397
|
/* @__PURE__ */ t.jsxs("div", { className: "file-info", children: [
|
|
@@ -2420,21 +2426,21 @@ const Ps = ({
|
|
|
2420
2426
|
onFileUploading: s,
|
|
2421
2427
|
onFileUploaded: a
|
|
2422
2428
|
}) => {
|
|
2423
|
-
const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: S } = Ge(), M =
|
|
2429
|
+
const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: S } = Ge(), M = fe(null), z = (u) => {
|
|
2424
2430
|
u.key === "Enter" && M.current.click();
|
|
2425
|
-
},
|
|
2431
|
+
}, A = (u) => {
|
|
2426
2432
|
if (n && !n.includes(_e(u.name)))
|
|
2427
2433
|
return "File type is not allowed.";
|
|
2428
2434
|
if (w.some(
|
|
2429
2435
|
(x) => x.name.toLowerCase() === u.name.toLowerCase() && !x.isDirectory
|
|
2430
2436
|
)) return "File already exists.";
|
|
2431
2437
|
if (r && u.size > r) return `Maximum upload size is ${Ze(r, 0)}.`;
|
|
2432
|
-
},
|
|
2438
|
+
}, j = (u) => {
|
|
2433
2439
|
if (u = u.filter(
|
|
2434
2440
|
(g) => !i.some((_) => _.file.name.toLowerCase() === g.name.toLowerCase())
|
|
2435
2441
|
), u.length > 0) {
|
|
2436
2442
|
const g = u.map((_) => {
|
|
2437
|
-
const x = s(_, h), R =
|
|
2443
|
+
const x = s(_, h), R = A(_);
|
|
2438
2444
|
return R && S({ type: "upload", message: R }, _), {
|
|
2439
2445
|
file: _,
|
|
2440
2446
|
appendData: x,
|
|
@@ -2443,13 +2449,13 @@ const Ps = ({
|
|
|
2443
2449
|
});
|
|
2444
2450
|
c((_) => [..._, ...g]);
|
|
2445
2451
|
}
|
|
2446
|
-
},
|
|
2452
|
+
}, C = (u) => {
|
|
2447
2453
|
u.preventDefault(), d(!1);
|
|
2448
2454
|
const g = Array.from(u.dataTransfer.files);
|
|
2449
|
-
|
|
2455
|
+
j(g);
|
|
2450
2456
|
}, y = (u) => {
|
|
2451
2457
|
const g = Array.from(u.target.files);
|
|
2452
|
-
|
|
2458
|
+
j(g);
|
|
2453
2459
|
}, b = (u) => {
|
|
2454
2460
|
c((g) => {
|
|
2455
2461
|
const _ = g.map((x, R) => u === R ? {
|
|
@@ -2465,7 +2471,7 @@ const Ps = ({
|
|
|
2465
2471
|
"div",
|
|
2466
2472
|
{
|
|
2467
2473
|
className: `draggable-file-input ${l ? "dragging" : ""}`,
|
|
2468
|
-
onDrop:
|
|
2474
|
+
onDrop: C,
|
|
2469
2475
|
onDragOver: (u) => u.preventDefault(),
|
|
2470
2476
|
onDragEnter: () => d(!0),
|
|
2471
2477
|
onDragLeave: () => d(!1),
|
|
@@ -2538,7 +2544,7 @@ const Ps = ({
|
|
|
2538
2544
|
/* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze(c[0].size) })
|
|
2539
2545
|
] }),
|
|
2540
2546
|
/* @__PURE__ */ t.jsx(Ne, { onClick: S, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
|
|
2541
|
-
/* @__PURE__ */ t.jsx(
|
|
2547
|
+
/* @__PURE__ */ t.jsx(jt, { size: 18 }),
|
|
2542
2548
|
/* @__PURE__ */ t.jsx("span", { children: "Download" })
|
|
2543
2549
|
] }) })
|
|
2544
2550
|
] }),
|
|
@@ -2569,8 +2575,8 @@ const Ps = ({
|
|
|
2569
2575
|
}
|
|
2570
2576
|
) })
|
|
2571
2577
|
] });
|
|
2572
|
-
}, ct = (e) => e.toLowerCase(),
|
|
2573
|
-
const s =
|
|
2578
|
+
}, ct = (e) => e.toLowerCase(), ye = (e, r, n = !1) => {
|
|
2579
|
+
const s = fe(/* @__PURE__ */ new Set([])), a = yt(() => new Set(e.map((d) => ct(d))), [e]), i = (d) => {
|
|
2574
2580
|
if (!d.repeat && (s.current.add(ct(d.key)), a.isSubsetOf(s.current) && !n)) {
|
|
2575
2581
|
d.preventDefault(), r(d);
|
|
2576
2582
|
return;
|
|
@@ -2580,10 +2586,10 @@ const Ps = ({
|
|
|
2580
2586
|
}, l = () => {
|
|
2581
2587
|
s.current.clear();
|
|
2582
2588
|
};
|
|
2583
|
-
|
|
2589
|
+
te(() => (window.addEventListener("keydown", i), window.addEventListener("keyup", c), window.addEventListener("blur", l), () => {
|
|
2584
2590
|
window.removeEventListener("keydown", i), window.removeEventListener("keyup", c), window.removeEventListener("blur", l);
|
|
2585
2591
|
}), [a, r, n]);
|
|
2586
|
-
},
|
|
2592
|
+
}, xe = {
|
|
2587
2593
|
createFolder: ["Alt", "Shift", "N"],
|
|
2588
2594
|
uploadFiles: ["Control", "U"],
|
|
2589
2595
|
cut: ["Control", "X"],
|
|
@@ -2618,11 +2624,11 @@ const Ps = ({
|
|
|
2618
2624
|
a(i);
|
|
2619
2625
|
}, z = () => {
|
|
2620
2626
|
e.show("rename");
|
|
2621
|
-
},
|
|
2627
|
+
}, A = () => {
|
|
2622
2628
|
d();
|
|
2623
|
-
}, C = () => {
|
|
2624
|
-
e.show("delete");
|
|
2625
2629
|
}, j = () => {
|
|
2630
|
+
e.show("delete");
|
|
2631
|
+
}, C = () => {
|
|
2626
2632
|
c.length > 0 && l([c[0]]);
|
|
2627
2633
|
}, y = () => {
|
|
2628
2634
|
c.length > 0 && l([c.at(-1)]);
|
|
@@ -2637,7 +2643,7 @@ const Ps = ({
|
|
|
2637
2643
|
}, x = () => {
|
|
2638
2644
|
p("list");
|
|
2639
2645
|
};
|
|
2640
|
-
|
|
2646
|
+
ye(xe.createFolder, f, e.isActive), ye(xe.uploadFiles, h, e.isActive), ye(xe.cut, w, e.isActive), ye(xe.copy, S, e.isActive), ye(xe.paste, M, e.isActive), ye(xe.rename, z, e.isActive), ye(xe.download, A, e.isActive), ye(xe.delete, j, e.isActive), ye(xe.jumpToFirst, C, e.isActive), ye(xe.jumpToLast, y, e.isActive), ye(xe.selectAll, b, e.isActive), ye(xe.clearSelection, u, e.isActive), ye(xe.refresh, g, e.isActive), ye(xe.gridLayout, _, e.isActive), ye(xe.listLayout, x, e.isActive);
|
|
2641
2647
|
}, Ms = ({
|
|
2642
2648
|
fileUploadConfig: e,
|
|
2643
2649
|
onFileUploading: r,
|
|
@@ -2669,7 +2675,7 @@ const Ps = ({
|
|
|
2669
2675
|
},
|
|
2670
2676
|
delete: {
|
|
2671
2677
|
title: "Delete",
|
|
2672
|
-
component: /* @__PURE__ */ t.jsx(
|
|
2678
|
+
component: /* @__PURE__ */ t.jsx(Cs, { triggerAction: p, onDelete: s }),
|
|
2673
2679
|
width: "25%"
|
|
2674
2680
|
},
|
|
2675
2681
|
previewFile: {
|
|
@@ -2684,7 +2690,7 @@ const Ps = ({
|
|
|
2684
2690
|
width: "50%"
|
|
2685
2691
|
}
|
|
2686
2692
|
};
|
|
2687
|
-
if (
|
|
2693
|
+
if (te(() => {
|
|
2688
2694
|
if (p.isActive) {
|
|
2689
2695
|
const M = p.actionType;
|
|
2690
2696
|
M === "previewFile" && (S[M].title = (w == null ? void 0 : w.name) ?? "Preview"), h(S[M]);
|
|
@@ -2714,7 +2720,7 @@ const Ps = ({
|
|
|
2714
2720
|
}
|
|
2715
2721
|
};
|
|
2716
2722
|
}, Os = (e, r) => {
|
|
2717
|
-
const [n, s] = L({ col1: e, col2: r }), [a, i] = L(!1), c =
|
|
2723
|
+
const [n, s] = L({ col1: e, col2: r }), [a, i] = L(!1), c = fe(null);
|
|
2718
2724
|
return {
|
|
2719
2725
|
containerRef: c,
|
|
2720
2726
|
colSizes: n,
|
|
@@ -2734,7 +2740,7 @@ const Ps = ({
|
|
|
2734
2740
|
}
|
|
2735
2741
|
};
|
|
2736
2742
|
};
|
|
2737
|
-
var gt = { exports: {} }, We = { exports: {} },
|
|
2743
|
+
var gt = { exports: {} }, We = { exports: {} }, ne = {};
|
|
2738
2744
|
/** @license React v16.13.1
|
|
2739
2745
|
* react-is.production.min.js
|
|
2740
2746
|
*
|
|
@@ -2745,9 +2751,9 @@ var gt = { exports: {} }, We = { exports: {} }, re = {};
|
|
|
2745
2751
|
*/
|
|
2746
2752
|
var rr;
|
|
2747
2753
|
function ks() {
|
|
2748
|
-
if (rr) return
|
|
2754
|
+
if (rr) return ne;
|
|
2749
2755
|
rr = 1;
|
|
2750
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121,
|
|
2756
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
2751
2757
|
function y(u) {
|
|
2752
2758
|
if (typeof u == "object" && u !== null) {
|
|
2753
2759
|
var g = u.$$typeof;
|
|
@@ -2781,35 +2787,35 @@ function ks() {
|
|
|
2781
2787
|
function b(u) {
|
|
2782
2788
|
return y(u) === p;
|
|
2783
2789
|
}
|
|
2784
|
-
return
|
|
2790
|
+
return ne.AsyncMode = d, ne.ConcurrentMode = p, ne.ContextConsumer = l, ne.ContextProvider = c, ne.Element = r, ne.ForwardRef = f, ne.Fragment = s, ne.Lazy = M, ne.Memo = S, ne.Portal = n, ne.Profiler = i, ne.StrictMode = a, ne.Suspense = h, ne.isAsyncMode = function(u) {
|
|
2785
2791
|
return b(u) || y(u) === d;
|
|
2786
|
-
},
|
|
2792
|
+
}, ne.isConcurrentMode = b, ne.isContextConsumer = function(u) {
|
|
2787
2793
|
return y(u) === l;
|
|
2788
|
-
},
|
|
2794
|
+
}, ne.isContextProvider = function(u) {
|
|
2789
2795
|
return y(u) === c;
|
|
2790
|
-
},
|
|
2796
|
+
}, ne.isElement = function(u) {
|
|
2791
2797
|
return typeof u == "object" && u !== null && u.$$typeof === r;
|
|
2792
|
-
},
|
|
2798
|
+
}, ne.isForwardRef = function(u) {
|
|
2793
2799
|
return y(u) === f;
|
|
2794
|
-
},
|
|
2800
|
+
}, ne.isFragment = function(u) {
|
|
2795
2801
|
return y(u) === s;
|
|
2796
|
-
},
|
|
2802
|
+
}, ne.isLazy = function(u) {
|
|
2797
2803
|
return y(u) === M;
|
|
2798
|
-
},
|
|
2804
|
+
}, ne.isMemo = function(u) {
|
|
2799
2805
|
return y(u) === S;
|
|
2800
|
-
},
|
|
2806
|
+
}, ne.isPortal = function(u) {
|
|
2801
2807
|
return y(u) === n;
|
|
2802
|
-
},
|
|
2808
|
+
}, ne.isProfiler = function(u) {
|
|
2803
2809
|
return y(u) === i;
|
|
2804
|
-
},
|
|
2810
|
+
}, ne.isStrictMode = function(u) {
|
|
2805
2811
|
return y(u) === a;
|
|
2806
|
-
},
|
|
2812
|
+
}, ne.isSuspense = function(u) {
|
|
2807
2813
|
return y(u) === h;
|
|
2808
|
-
},
|
|
2809
|
-
return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof ===
|
|
2810
|
-
},
|
|
2814
|
+
}, ne.isValidElementType = function(u) {
|
|
2815
|
+
return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === A || u.$$typeof === j || u.$$typeof === C || u.$$typeof === z);
|
|
2816
|
+
}, ne.typeOf = y, ne;
|
|
2811
2817
|
}
|
|
2812
|
-
var
|
|
2818
|
+
var se = {};
|
|
2813
2819
|
/** @license React v16.13.1
|
|
2814
2820
|
* react-is.development.js
|
|
2815
2821
|
*
|
|
@@ -2821,15 +2827,15 @@ var ne = {};
|
|
|
2821
2827
|
var nr;
|
|
2822
2828
|
function _s() {
|
|
2823
2829
|
return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2824
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121,
|
|
2830
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
2825
2831
|
function y(E) {
|
|
2826
2832
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2827
|
-
E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof ===
|
|
2833
|
+
E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === A || E.$$typeof === j || E.$$typeof === C || E.$$typeof === z);
|
|
2828
2834
|
}
|
|
2829
2835
|
function b(E) {
|
|
2830
2836
|
if (typeof E == "object" && E !== null) {
|
|
2831
|
-
var
|
|
2832
|
-
switch (
|
|
2837
|
+
var me = E.$$typeof;
|
|
2838
|
+
switch (me) {
|
|
2833
2839
|
case r:
|
|
2834
2840
|
var Te = E.type;
|
|
2835
2841
|
switch (Te) {
|
|
@@ -2850,19 +2856,19 @@ function _s() {
|
|
|
2850
2856
|
case c:
|
|
2851
2857
|
return Y;
|
|
2852
2858
|
default:
|
|
2853
|
-
return
|
|
2859
|
+
return me;
|
|
2854
2860
|
}
|
|
2855
2861
|
}
|
|
2856
2862
|
case n:
|
|
2857
|
-
return
|
|
2863
|
+
return me;
|
|
2858
2864
|
}
|
|
2859
2865
|
}
|
|
2860
2866
|
}
|
|
2861
|
-
var u = d, g = p, _ = l, x = c, R = r, F = f,
|
|
2862
|
-
function
|
|
2863
|
-
return
|
|
2867
|
+
var u = d, g = p, _ = l, x = c, R = r, F = f, D = s, k = M, N = S, G = n, ae = i, oe = a, ce = h, ee = !1;
|
|
2868
|
+
function ve(E) {
|
|
2869
|
+
return ee || (ee = !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.")), v(E) || b(E) === d;
|
|
2864
2870
|
}
|
|
2865
|
-
function
|
|
2871
|
+
function v(E) {
|
|
2866
2872
|
return b(E) === p;
|
|
2867
2873
|
}
|
|
2868
2874
|
function P(E) {
|
|
@@ -2877,7 +2883,7 @@ function _s() {
|
|
|
2877
2883
|
function I(E) {
|
|
2878
2884
|
return b(E) === f;
|
|
2879
2885
|
}
|
|
2880
|
-
function
|
|
2886
|
+
function X(E) {
|
|
2881
2887
|
return b(E) === s;
|
|
2882
2888
|
}
|
|
2883
2889
|
function O(E) {
|
|
@@ -2886,20 +2892,20 @@ function _s() {
|
|
|
2886
2892
|
function $(E) {
|
|
2887
2893
|
return b(E) === S;
|
|
2888
2894
|
}
|
|
2889
|
-
function
|
|
2895
|
+
function q(E) {
|
|
2890
2896
|
return b(E) === n;
|
|
2891
2897
|
}
|
|
2892
2898
|
function Z(E) {
|
|
2893
2899
|
return b(E) === i;
|
|
2894
2900
|
}
|
|
2895
|
-
function
|
|
2901
|
+
function U(E) {
|
|
2896
2902
|
return b(E) === a;
|
|
2897
2903
|
}
|
|
2898
|
-
function
|
|
2904
|
+
function he(E) {
|
|
2899
2905
|
return b(E) === h;
|
|
2900
2906
|
}
|
|
2901
|
-
|
|
2902
|
-
}()),
|
|
2907
|
+
se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = F, se.Fragment = D, se.Lazy = k, se.Memo = N, se.Portal = G, se.Profiler = ae, se.StrictMode = oe, se.Suspense = ce, se.isAsyncMode = ve, se.isConcurrentMode = v, se.isContextConsumer = P, se.isContextProvider = V, se.isElement = W, se.isForwardRef = I, se.isFragment = X, se.isLazy = O, se.isMemo = $, se.isPortal = q, se.isProfiler = Z, se.isStrictMode = U, se.isSuspense = he, se.isValidElementType = y, se.typeOf = b;
|
|
2908
|
+
}()), se;
|
|
2903
2909
|
}
|
|
2904
2910
|
var sr;
|
|
2905
2911
|
function $r() {
|
|
@@ -2957,7 +2963,7 @@ function Ns() {
|
|
|
2957
2963
|
}, lt;
|
|
2958
2964
|
}
|
|
2959
2965
|
var ut, ar;
|
|
2960
|
-
function
|
|
2966
|
+
function Ct() {
|
|
2961
2967
|
if (ar) return ut;
|
|
2962
2968
|
ar = 1;
|
|
2963
2969
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -2974,7 +2980,7 @@ function zs() {
|
|
|
2974
2980
|
var e = function() {
|
|
2975
2981
|
};
|
|
2976
2982
|
if (process.env.NODE_ENV !== "production") {
|
|
2977
|
-
var r =
|
|
2983
|
+
var r = Ct(), n = {}, s = Br();
|
|
2978
2984
|
e = function(i) {
|
|
2979
2985
|
var c = "Warning: " + i;
|
|
2980
2986
|
typeof console < "u" && console.error(c);
|
|
@@ -3020,7 +3026,7 @@ var ht, lr;
|
|
|
3020
3026
|
function As() {
|
|
3021
3027
|
if (lr) return ht;
|
|
3022
3028
|
lr = 1;
|
|
3023
|
-
var e = $r(), r = Ns(), n =
|
|
3029
|
+
var e = $r(), r = Ns(), n = Ct(), s = Br(), a = zs(), i = function() {
|
|
3024
3030
|
};
|
|
3025
3031
|
process.env.NODE_ENV !== "production" && (i = function(l) {
|
|
3026
3032
|
var d = "Warning: " + l;
|
|
@@ -3035,21 +3041,21 @@ function As() {
|
|
|
3035
3041
|
}
|
|
3036
3042
|
return ht = function(l, d) {
|
|
3037
3043
|
var p = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
3038
|
-
function h(
|
|
3039
|
-
var P =
|
|
3044
|
+
function h(v) {
|
|
3045
|
+
var P = v && (p && v[p] || v[f]);
|
|
3040
3046
|
if (typeof P == "function")
|
|
3041
3047
|
return P;
|
|
3042
3048
|
}
|
|
3043
3049
|
var w = "<<anonymous>>", S = {
|
|
3044
|
-
array:
|
|
3045
|
-
bigint:
|
|
3046
|
-
bool:
|
|
3047
|
-
func:
|
|
3048
|
-
number:
|
|
3049
|
-
object:
|
|
3050
|
-
string:
|
|
3051
|
-
symbol:
|
|
3052
|
-
any:
|
|
3050
|
+
array: j("array"),
|
|
3051
|
+
bigint: j("bigint"),
|
|
3052
|
+
bool: j("boolean"),
|
|
3053
|
+
func: j("function"),
|
|
3054
|
+
number: j("number"),
|
|
3055
|
+
object: j("object"),
|
|
3056
|
+
string: j("string"),
|
|
3057
|
+
symbol: j("symbol"),
|
|
3058
|
+
any: C(),
|
|
3053
3059
|
arrayOf: y,
|
|
3054
3060
|
element: b(),
|
|
3055
3061
|
elementType: u(),
|
|
@@ -3058,237 +3064,237 @@ function As() {
|
|
|
3058
3064
|
objectOf: x,
|
|
3059
3065
|
oneOf: _,
|
|
3060
3066
|
oneOfType: R,
|
|
3061
|
-
shape:
|
|
3062
|
-
exact:
|
|
3067
|
+
shape: k,
|
|
3068
|
+
exact: N
|
|
3063
3069
|
};
|
|
3064
|
-
function M(
|
|
3065
|
-
return
|
|
3070
|
+
function M(v, P) {
|
|
3071
|
+
return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
|
|
3066
3072
|
}
|
|
3067
|
-
function z(
|
|
3068
|
-
this.message =
|
|
3073
|
+
function z(v, P) {
|
|
3074
|
+
this.message = v, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
3069
3075
|
}
|
|
3070
3076
|
z.prototype = Error.prototype;
|
|
3071
|
-
function
|
|
3077
|
+
function A(v) {
|
|
3072
3078
|
if (process.env.NODE_ENV !== "production")
|
|
3073
3079
|
var P = {}, V = 0;
|
|
3074
|
-
function W(
|
|
3075
|
-
if (
|
|
3080
|
+
function W(X, O, $, q, Z, U, he) {
|
|
3081
|
+
if (q = q || w, U = U || $, he !== n) {
|
|
3076
3082
|
if (d) {
|
|
3077
3083
|
var E = new Error(
|
|
3078
3084
|
"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"
|
|
3079
3085
|
);
|
|
3080
3086
|
throw E.name = "Invariant Violation", E;
|
|
3081
3087
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
3082
|
-
var
|
|
3083
|
-
!P[
|
|
3088
|
+
var me = q + ":" + $;
|
|
3089
|
+
!P[me] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
3084
3090
|
V < 3 && (i(
|
|
3085
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
3086
|
-
), P[
|
|
3091
|
+
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + q + "`. 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."
|
|
3092
|
+
), P[me] = !0, V++);
|
|
3087
3093
|
}
|
|
3088
3094
|
}
|
|
3089
|
-
return O[$] == null ?
|
|
3095
|
+
return O[$] == null ? X ? O[$] === null ? new z("The " + Z + " `" + U + "` is marked as required " + ("in `" + q + "`, but its value is `null`.")) : new z("The " + Z + " `" + U + "` is marked as required in " + ("`" + q + "`, but its value is `undefined`.")) : null : v(O, $, q, Z, U);
|
|
3090
3096
|
}
|
|
3091
3097
|
var I = W.bind(null, !1);
|
|
3092
3098
|
return I.isRequired = W.bind(null, !0), I;
|
|
3093
3099
|
}
|
|
3094
|
-
function
|
|
3095
|
-
function P(V, W, I,
|
|
3096
|
-
var
|
|
3097
|
-
if (Z !==
|
|
3098
|
-
var
|
|
3100
|
+
function j(v) {
|
|
3101
|
+
function P(V, W, I, X, O, $) {
|
|
3102
|
+
var q = V[W], Z = oe(q);
|
|
3103
|
+
if (Z !== v) {
|
|
3104
|
+
var U = ce(q);
|
|
3099
3105
|
return new z(
|
|
3100
|
-
"Invalid " +
|
|
3101
|
-
{ expectedType:
|
|
3106
|
+
"Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + v + "`."),
|
|
3107
|
+
{ expectedType: v }
|
|
3102
3108
|
);
|
|
3103
3109
|
}
|
|
3104
3110
|
return null;
|
|
3105
3111
|
}
|
|
3106
|
-
return
|
|
3112
|
+
return A(P);
|
|
3107
3113
|
}
|
|
3108
|
-
function
|
|
3109
|
-
return
|
|
3114
|
+
function C() {
|
|
3115
|
+
return A(c);
|
|
3110
3116
|
}
|
|
3111
|
-
function y(
|
|
3112
|
-
function P(V, W, I,
|
|
3113
|
-
if (typeof
|
|
3117
|
+
function y(v) {
|
|
3118
|
+
function P(V, W, I, X, O) {
|
|
3119
|
+
if (typeof v != "function")
|
|
3114
3120
|
return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
3115
3121
|
var $ = V[W];
|
|
3116
3122
|
if (!Array.isArray($)) {
|
|
3117
|
-
var
|
|
3118
|
-
return new z("Invalid " +
|
|
3123
|
+
var q = oe($);
|
|
3124
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an array."));
|
|
3119
3125
|
}
|
|
3120
3126
|
for (var Z = 0; Z < $.length; Z++) {
|
|
3121
|
-
var
|
|
3122
|
-
if (
|
|
3123
|
-
return
|
|
3127
|
+
var U = v($, Z, I, X, O + "[" + Z + "]", n);
|
|
3128
|
+
if (U instanceof Error)
|
|
3129
|
+
return U;
|
|
3124
3130
|
}
|
|
3125
3131
|
return null;
|
|
3126
3132
|
}
|
|
3127
|
-
return
|
|
3133
|
+
return A(P);
|
|
3128
3134
|
}
|
|
3129
3135
|
function b() {
|
|
3130
|
-
function
|
|
3136
|
+
function v(P, V, W, I, X) {
|
|
3131
3137
|
var O = P[V];
|
|
3132
3138
|
if (!l(O)) {
|
|
3133
|
-
var $ =
|
|
3134
|
-
return new z("Invalid " + I + " `" +
|
|
3139
|
+
var $ = oe(O);
|
|
3140
|
+
return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
|
|
3135
3141
|
}
|
|
3136
3142
|
return null;
|
|
3137
3143
|
}
|
|
3138
|
-
return
|
|
3144
|
+
return A(v);
|
|
3139
3145
|
}
|
|
3140
3146
|
function u() {
|
|
3141
|
-
function
|
|
3147
|
+
function v(P, V, W, I, X) {
|
|
3142
3148
|
var O = P[V];
|
|
3143
3149
|
if (!e.isValidElementType(O)) {
|
|
3144
|
-
var $ =
|
|
3145
|
-
return new z("Invalid " + I + " `" +
|
|
3150
|
+
var $ = oe(O);
|
|
3151
|
+
return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
|
|
3146
3152
|
}
|
|
3147
3153
|
return null;
|
|
3148
3154
|
}
|
|
3149
|
-
return
|
|
3155
|
+
return A(v);
|
|
3150
3156
|
}
|
|
3151
|
-
function g(
|
|
3152
|
-
function P(V, W, I,
|
|
3153
|
-
if (!(V[W] instanceof
|
|
3154
|
-
var $ =
|
|
3155
|
-
return new z("Invalid " +
|
|
3157
|
+
function g(v) {
|
|
3158
|
+
function P(V, W, I, X, O) {
|
|
3159
|
+
if (!(V[W] instanceof v)) {
|
|
3160
|
+
var $ = v.name || w, q = ve(V[W]);
|
|
3161
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
|
|
3156
3162
|
}
|
|
3157
3163
|
return null;
|
|
3158
3164
|
}
|
|
3159
|
-
return
|
|
3165
|
+
return A(P);
|
|
3160
3166
|
}
|
|
3161
|
-
function _(
|
|
3162
|
-
if (!Array.isArray(
|
|
3167
|
+
function _(v) {
|
|
3168
|
+
if (!Array.isArray(v))
|
|
3163
3169
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
3164
3170
|
"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])."
|
|
3165
3171
|
) : i("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
3166
|
-
function P(V, W, I,
|
|
3167
|
-
for (var $ = V[W],
|
|
3168
|
-
if (M($,
|
|
3172
|
+
function P(V, W, I, X, O) {
|
|
3173
|
+
for (var $ = V[W], q = 0; q < v.length; q++)
|
|
3174
|
+
if (M($, v[q]))
|
|
3169
3175
|
return null;
|
|
3170
|
-
var Z = JSON.stringify(
|
|
3171
|
-
var
|
|
3172
|
-
return
|
|
3176
|
+
var Z = JSON.stringify(v, function(he, E) {
|
|
3177
|
+
var me = ce(E);
|
|
3178
|
+
return me === "symbol" ? String(E) : E;
|
|
3173
3179
|
});
|
|
3174
|
-
return new z("Invalid " +
|
|
3180
|
+
return new z("Invalid " + X + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
|
|
3175
3181
|
}
|
|
3176
|
-
return
|
|
3182
|
+
return A(P);
|
|
3177
3183
|
}
|
|
3178
|
-
function x(
|
|
3179
|
-
function P(V, W, I,
|
|
3180
|
-
if (typeof
|
|
3184
|
+
function x(v) {
|
|
3185
|
+
function P(V, W, I, X, O) {
|
|
3186
|
+
if (typeof v != "function")
|
|
3181
3187
|
return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
3182
|
-
var $ = V[W],
|
|
3183
|
-
if (
|
|
3184
|
-
return new z("Invalid " +
|
|
3188
|
+
var $ = V[W], q = oe($);
|
|
3189
|
+
if (q !== "object")
|
|
3190
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an object."));
|
|
3185
3191
|
for (var Z in $)
|
|
3186
3192
|
if (s($, Z)) {
|
|
3187
|
-
var
|
|
3188
|
-
if (
|
|
3189
|
-
return
|
|
3193
|
+
var U = v($, Z, I, X, O + "." + Z, n);
|
|
3194
|
+
if (U instanceof Error)
|
|
3195
|
+
return U;
|
|
3190
3196
|
}
|
|
3191
3197
|
return null;
|
|
3192
3198
|
}
|
|
3193
|
-
return
|
|
3199
|
+
return A(P);
|
|
3194
3200
|
}
|
|
3195
|
-
function R(
|
|
3196
|
-
if (!Array.isArray(
|
|
3201
|
+
function R(v) {
|
|
3202
|
+
if (!Array.isArray(v))
|
|
3197
3203
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
3198
|
-
for (var P = 0; P <
|
|
3199
|
-
var V =
|
|
3204
|
+
for (var P = 0; P < v.length; P++) {
|
|
3205
|
+
var V = v[P];
|
|
3200
3206
|
if (typeof V != "function")
|
|
3201
3207
|
return i(
|
|
3202
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
3208
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ee(V) + " at index " + P + "."
|
|
3203
3209
|
), c;
|
|
3204
3210
|
}
|
|
3205
|
-
function W(I,
|
|
3206
|
-
for (var Z = [],
|
|
3207
|
-
var
|
|
3211
|
+
function W(I, X, O, $, q) {
|
|
3212
|
+
for (var Z = [], U = 0; U < v.length; U++) {
|
|
3213
|
+
var he = v[U], E = he(I, X, O, $, q, n);
|
|
3208
3214
|
if (E == null)
|
|
3209
3215
|
return null;
|
|
3210
3216
|
E.data && s(E.data, "expectedType") && Z.push(E.data.expectedType);
|
|
3211
3217
|
}
|
|
3212
|
-
var
|
|
3213
|
-
return new z("Invalid " + $ + " `" +
|
|
3218
|
+
var me = Z.length > 0 ? ", expected one of type [" + Z.join(", ") + "]" : "";
|
|
3219
|
+
return new z("Invalid " + $ + " `" + q + "` supplied to " + ("`" + O + "`" + me + "."));
|
|
3214
3220
|
}
|
|
3215
|
-
return
|
|
3221
|
+
return A(W);
|
|
3216
3222
|
}
|
|
3217
3223
|
function F() {
|
|
3218
|
-
function
|
|
3219
|
-
return
|
|
3224
|
+
function v(P, V, W, I, X) {
|
|
3225
|
+
return G(P[V]) ? null : new z("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
|
|
3220
3226
|
}
|
|
3221
|
-
return
|
|
3227
|
+
return A(v);
|
|
3222
3228
|
}
|
|
3223
|
-
function
|
|
3229
|
+
function D(v, P, V, W, I) {
|
|
3224
3230
|
return new z(
|
|
3225
|
-
(
|
|
3231
|
+
(v || "React class") + ": " + P + " type `" + V + "." + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
|
|
3226
3232
|
);
|
|
3227
3233
|
}
|
|
3228
|
-
function
|
|
3229
|
-
function P(V, W, I,
|
|
3230
|
-
var $ = V[W],
|
|
3231
|
-
if (
|
|
3232
|
-
return new z("Invalid " +
|
|
3233
|
-
for (var Z in
|
|
3234
|
-
var
|
|
3235
|
-
if (typeof
|
|
3236
|
-
return
|
|
3237
|
-
var
|
|
3238
|
-
if (
|
|
3239
|
-
return
|
|
3234
|
+
function k(v) {
|
|
3235
|
+
function P(V, W, I, X, O) {
|
|
3236
|
+
var $ = V[W], q = oe($);
|
|
3237
|
+
if (q !== "object")
|
|
3238
|
+
return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
3239
|
+
for (var Z in v) {
|
|
3240
|
+
var U = v[Z];
|
|
3241
|
+
if (typeof U != "function")
|
|
3242
|
+
return D(I, X, O, Z, ce(U));
|
|
3243
|
+
var he = U($, Z, I, X, O + "." + Z, n);
|
|
3244
|
+
if (he)
|
|
3245
|
+
return he;
|
|
3240
3246
|
}
|
|
3241
3247
|
return null;
|
|
3242
3248
|
}
|
|
3243
|
-
return
|
|
3244
|
-
}
|
|
3245
|
-
function
|
|
3246
|
-
function P(V, W, I,
|
|
3247
|
-
var $ = V[W],
|
|
3248
|
-
if (
|
|
3249
|
-
return new z("Invalid " +
|
|
3250
|
-
var Z = r({}, V[W],
|
|
3251
|
-
for (var
|
|
3252
|
-
var
|
|
3253
|
-
if (s(
|
|
3254
|
-
return
|
|
3255
|
-
if (!
|
|
3249
|
+
return A(P);
|
|
3250
|
+
}
|
|
3251
|
+
function N(v) {
|
|
3252
|
+
function P(V, W, I, X, O) {
|
|
3253
|
+
var $ = V[W], q = oe($);
|
|
3254
|
+
if (q !== "object")
|
|
3255
|
+
return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
3256
|
+
var Z = r({}, V[W], v);
|
|
3257
|
+
for (var U in Z) {
|
|
3258
|
+
var he = v[U];
|
|
3259
|
+
if (s(v, U) && typeof he != "function")
|
|
3260
|
+
return D(I, X, O, U, ce(he));
|
|
3261
|
+
if (!he)
|
|
3256
3262
|
return new z(
|
|
3257
|
-
"Invalid " +
|
|
3258
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
3263
|
+
"Invalid " + X + " `" + O + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(V[W], null, " ") + `
|
|
3264
|
+
Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
3259
3265
|
);
|
|
3260
|
-
var E =
|
|
3266
|
+
var E = he($, U, I, X, O + "." + U, n);
|
|
3261
3267
|
if (E)
|
|
3262
3268
|
return E;
|
|
3263
3269
|
}
|
|
3264
3270
|
return null;
|
|
3265
3271
|
}
|
|
3266
|
-
return
|
|
3272
|
+
return A(P);
|
|
3267
3273
|
}
|
|
3268
|
-
function
|
|
3269
|
-
switch (typeof
|
|
3274
|
+
function G(v) {
|
|
3275
|
+
switch (typeof v) {
|
|
3270
3276
|
case "number":
|
|
3271
3277
|
case "string":
|
|
3272
3278
|
case "undefined":
|
|
3273
3279
|
return !0;
|
|
3274
3280
|
case "boolean":
|
|
3275
|
-
return !
|
|
3281
|
+
return !v;
|
|
3276
3282
|
case "object":
|
|
3277
|
-
if (Array.isArray(
|
|
3278
|
-
return
|
|
3279
|
-
if (
|
|
3283
|
+
if (Array.isArray(v))
|
|
3284
|
+
return v.every(G);
|
|
3285
|
+
if (v === null || l(v))
|
|
3280
3286
|
return !0;
|
|
3281
|
-
var P = h(
|
|
3287
|
+
var P = h(v);
|
|
3282
3288
|
if (P) {
|
|
3283
|
-
var V = P.call(
|
|
3284
|
-
if (P !==
|
|
3289
|
+
var V = P.call(v), W;
|
|
3290
|
+
if (P !== v.entries) {
|
|
3285
3291
|
for (; !(W = V.next()).done; )
|
|
3286
|
-
if (!
|
|
3292
|
+
if (!G(W.value))
|
|
3287
3293
|
return !1;
|
|
3288
3294
|
} else
|
|
3289
3295
|
for (; !(W = V.next()).done; ) {
|
|
3290
3296
|
var I = W.value;
|
|
3291
|
-
if (I && !
|
|
3297
|
+
if (I && !G(I[1]))
|
|
3292
3298
|
return !1;
|
|
3293
3299
|
}
|
|
3294
3300
|
} else
|
|
@@ -3298,27 +3304,27 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
3298
3304
|
return !1;
|
|
3299
3305
|
}
|
|
3300
3306
|
}
|
|
3301
|
-
function
|
|
3302
|
-
return
|
|
3307
|
+
function ae(v, P) {
|
|
3308
|
+
return v === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
3303
3309
|
}
|
|
3304
|
-
function
|
|
3305
|
-
var P = typeof
|
|
3306
|
-
return Array.isArray(
|
|
3310
|
+
function oe(v) {
|
|
3311
|
+
var P = typeof v;
|
|
3312
|
+
return Array.isArray(v) ? "array" : v instanceof RegExp ? "object" : ae(P, v) ? "symbol" : P;
|
|
3307
3313
|
}
|
|
3308
|
-
function
|
|
3309
|
-
if (typeof
|
|
3310
|
-
return "" +
|
|
3311
|
-
var P =
|
|
3314
|
+
function ce(v) {
|
|
3315
|
+
if (typeof v > "u" || v === null)
|
|
3316
|
+
return "" + v;
|
|
3317
|
+
var P = oe(v);
|
|
3312
3318
|
if (P === "object") {
|
|
3313
|
-
if (
|
|
3319
|
+
if (v instanceof Date)
|
|
3314
3320
|
return "date";
|
|
3315
|
-
if (
|
|
3321
|
+
if (v instanceof RegExp)
|
|
3316
3322
|
return "regexp";
|
|
3317
3323
|
}
|
|
3318
3324
|
return P;
|
|
3319
3325
|
}
|
|
3320
|
-
function
|
|
3321
|
-
var P =
|
|
3326
|
+
function ee(v) {
|
|
3327
|
+
var P = ce(v);
|
|
3322
3328
|
switch (P) {
|
|
3323
3329
|
case "array":
|
|
3324
3330
|
case "object":
|
|
@@ -3331,8 +3337,8 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
3331
3337
|
return P;
|
|
3332
3338
|
}
|
|
3333
3339
|
}
|
|
3334
|
-
function
|
|
3335
|
-
return !
|
|
3340
|
+
function ve(v) {
|
|
3341
|
+
return !v.constructor || !v.constructor.name ? w : v.constructor.name;
|
|
3336
3342
|
}
|
|
3337
3343
|
return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
|
|
3338
3344
|
}, ht;
|
|
@@ -3341,7 +3347,7 @@ var pt, ur;
|
|
|
3341
3347
|
function Ds() {
|
|
3342
3348
|
if (ur) return pt;
|
|
3343
3349
|
ur = 1;
|
|
3344
|
-
var e =
|
|
3350
|
+
var e = Ct();
|
|
3345
3351
|
function r() {
|
|
3346
3352
|
}
|
|
3347
3353
|
function n() {
|
|
@@ -3391,7 +3397,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
3391
3397
|
} else
|
|
3392
3398
|
gt.exports = Ds()();
|
|
3393
3399
|
var Bs = gt.exports;
|
|
3394
|
-
const
|
|
3400
|
+
const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
3395
3401
|
const s = e[r];
|
|
3396
3402
|
if (s && isNaN(Date.parse(s)))
|
|
3397
3403
|
return new Error(
|
|
@@ -3427,29 +3433,30 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3427
3433
|
onRefresh: S,
|
|
3428
3434
|
onFileOpen: M = () => {
|
|
3429
3435
|
},
|
|
3430
|
-
|
|
3436
|
+
onSelect: z,
|
|
3437
|
+
onError: A = () => {
|
|
3431
3438
|
},
|
|
3432
|
-
layout:
|
|
3439
|
+
layout: j = "grid",
|
|
3433
3440
|
enableFilePreview: C = !0,
|
|
3434
|
-
maxFileSize:
|
|
3435
|
-
filePreviewPath:
|
|
3436
|
-
acceptedFileTypes:
|
|
3437
|
-
height:
|
|
3438
|
-
width:
|
|
3439
|
-
initialPath:
|
|
3440
|
-
filePreviewComponent:
|
|
3441
|
-
primaryColor:
|
|
3442
|
-
fontFamily:
|
|
3441
|
+
maxFileSize: y,
|
|
3442
|
+
filePreviewPath: b,
|
|
3443
|
+
acceptedFileTypes: u,
|
|
3444
|
+
height: g = "600px",
|
|
3445
|
+
width: _ = "100%",
|
|
3446
|
+
initialPath: x = "",
|
|
3447
|
+
filePreviewComponent: R,
|
|
3448
|
+
primaryColor: F = "#6155b4",
|
|
3449
|
+
fontFamily: D = "Nunito Sans, sans-serif"
|
|
3443
3450
|
}) => {
|
|
3444
|
-
const
|
|
3445
|
-
"--file-manager-font-family":
|
|
3446
|
-
"--file-manager-primary-color":
|
|
3447
|
-
height:
|
|
3448
|
-
width:
|
|
3451
|
+
const k = Ls(), { containerRef: N, colSizes: G, isDragging: ae, handleMouseMove: oe, handleMouseUp: ce, handleMouseDown: ee } = Os(20, 80), ve = {
|
|
3452
|
+
"--file-manager-font-family": D,
|
|
3453
|
+
"--file-manager-primary-color": F,
|
|
3454
|
+
height: g,
|
|
3455
|
+
width: _
|
|
3449
3456
|
};
|
|
3450
|
-
return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (
|
|
3457
|
+
return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (v) => v.preventDefault(), style: ve, children: [
|
|
3451
3458
|
/* @__PURE__ */ t.jsx(xt, { loading: n }),
|
|
3452
|
-
/* @__PURE__ */ t.jsx(zn, { filesData: e, onError:
|
|
3459
|
+
/* @__PURE__ */ t.jsx(zn, { filesData: e, onError: A, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: x, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, onSelect: z, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout: j, children: [
|
|
3453
3460
|
/* @__PURE__ */ t.jsx(
|
|
3454
3461
|
Sr,
|
|
3455
3462
|
{
|
|
@@ -3457,7 +3464,7 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3457
3464
|
allowUploadFile: !0,
|
|
3458
3465
|
onLayoutChange: w,
|
|
3459
3466
|
onRefresh: S,
|
|
3460
|
-
triggerAction:
|
|
3467
|
+
triggerAction: k
|
|
3461
3468
|
}
|
|
3462
3469
|
),
|
|
3463
3470
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -3465,20 +3472,20 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3465
3472
|
{
|
|
3466
3473
|
ref: N,
|
|
3467
3474
|
onMouseMove: oe,
|
|
3468
|
-
onMouseUp:
|
|
3475
|
+
onMouseUp: ce,
|
|
3469
3476
|
className: "files-container",
|
|
3470
3477
|
children: [
|
|
3471
|
-
/* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width:
|
|
3478
|
+
/* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: G.col1 + "%" }, children: [
|
|
3472
3479
|
/* @__PURE__ */ t.jsx(Or, {}),
|
|
3473
3480
|
/* @__PURE__ */ t.jsx(
|
|
3474
3481
|
"div",
|
|
3475
3482
|
{
|
|
3476
|
-
className: `sidebar-resize ${
|
|
3477
|
-
onMouseDown:
|
|
3483
|
+
className: `sidebar-resize ${ae ? "sidebar-dragging" : ""}`,
|
|
3484
|
+
onMouseDown: ee
|
|
3478
3485
|
}
|
|
3479
3486
|
)
|
|
3480
3487
|
] }),
|
|
3481
|
-
/* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width:
|
|
3488
|
+
/* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width: G.col2 + "%" }, children: [
|
|
3482
3489
|
/* @__PURE__ */ t.jsx(kr, {}),
|
|
3483
3490
|
/* @__PURE__ */ t.jsx(
|
|
3484
3491
|
Ir,
|
|
@@ -3488,7 +3495,7 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3488
3495
|
onFileOpen: M,
|
|
3489
3496
|
onRefresh: S,
|
|
3490
3497
|
enableFilePreview: C,
|
|
3491
|
-
triggerAction:
|
|
3498
|
+
triggerAction: k
|
|
3492
3499
|
}
|
|
3493
3500
|
)
|
|
3494
3501
|
] })
|
|
@@ -3503,11 +3510,11 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3503
3510
|
onFileUploaded: i,
|
|
3504
3511
|
onDelete: h,
|
|
3505
3512
|
onRefresh: S,
|
|
3506
|
-
maxFileSize:
|
|
3507
|
-
filePreviewPath:
|
|
3508
|
-
filePreviewComponent:
|
|
3509
|
-
acceptedFileTypes:
|
|
3510
|
-
triggerAction:
|
|
3513
|
+
maxFileSize: y,
|
|
3514
|
+
filePreviewPath: b,
|
|
3515
|
+
filePreviewComponent: R,
|
|
3516
|
+
acceptedFileTypes: u,
|
|
3517
|
+
triggerAction: k
|
|
3511
3518
|
}
|
|
3512
3519
|
)
|
|
3513
3520
|
] }) }) }) }) })
|
|
@@ -3515,44 +3522,46 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3515
3522
|
};
|
|
3516
3523
|
Hr.displayName = "FileManager";
|
|
3517
3524
|
Hr.propTypes = {
|
|
3518
|
-
files:
|
|
3519
|
-
|
|
3520
|
-
name:
|
|
3521
|
-
isDirectory:
|
|
3522
|
-
path:
|
|
3525
|
+
files: K.arrayOf(
|
|
3526
|
+
K.shape({
|
|
3527
|
+
name: K.string.isRequired,
|
|
3528
|
+
isDirectory: K.bool.isRequired,
|
|
3529
|
+
path: K.string.isRequired,
|
|
3523
3530
|
updatedAt: Hs,
|
|
3524
|
-
size:
|
|
3531
|
+
size: K.number
|
|
3525
3532
|
})
|
|
3526
3533
|
).isRequired,
|
|
3527
|
-
fileUploadConfig:
|
|
3534
|
+
fileUploadConfig: K.shape({
|
|
3528
3535
|
url: dr,
|
|
3529
|
-
headers:
|
|
3536
|
+
headers: K.objectOf(K.string),
|
|
3537
|
+
method: K.oneOf(["POST", "PUT"])
|
|
3530
3538
|
}),
|
|
3531
|
-
isLoading:
|
|
3532
|
-
onCreateFolder:
|
|
3533
|
-
onFileUploading:
|
|
3534
|
-
onFileUploaded:
|
|
3535
|
-
onRename:
|
|
3536
|
-
onDelete:
|
|
3537
|
-
onCut:
|
|
3538
|
-
onCopy:
|
|
3539
|
-
onPaste:
|
|
3540
|
-
onDownload:
|
|
3541
|
-
onLayoutChange:
|
|
3542
|
-
onRefresh:
|
|
3543
|
-
onFileOpen:
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3539
|
+
isLoading: K.bool,
|
|
3540
|
+
onCreateFolder: K.func,
|
|
3541
|
+
onFileUploading: K.func,
|
|
3542
|
+
onFileUploaded: K.func,
|
|
3543
|
+
onRename: K.func,
|
|
3544
|
+
onDelete: K.func,
|
|
3545
|
+
onCut: K.func,
|
|
3546
|
+
onCopy: K.func,
|
|
3547
|
+
onPaste: K.func,
|
|
3548
|
+
onDownload: K.func,
|
|
3549
|
+
onLayoutChange: K.func,
|
|
3550
|
+
onRefresh: K.func,
|
|
3551
|
+
onFileOpen: K.func,
|
|
3552
|
+
onSelect: K.func,
|
|
3553
|
+
onError: K.func,
|
|
3554
|
+
layout: K.oneOf(["grid", "list"]),
|
|
3555
|
+
maxFileSize: K.number,
|
|
3556
|
+
enableFilePreview: K.bool,
|
|
3548
3557
|
filePreviewPath: dr,
|
|
3549
|
-
acceptedFileTypes:
|
|
3550
|
-
height:
|
|
3551
|
-
width:
|
|
3552
|
-
initialPath:
|
|
3553
|
-
filePreviewComponent:
|
|
3554
|
-
primaryColor:
|
|
3555
|
-
fontFamily:
|
|
3558
|
+
acceptedFileTypes: K.string,
|
|
3559
|
+
height: K.oneOfType([K.string, K.number]),
|
|
3560
|
+
width: K.oneOfType([K.string, K.number]),
|
|
3561
|
+
initialPath: K.string,
|
|
3562
|
+
filePreviewComponent: K.func,
|
|
3563
|
+
primaryColor: K.string,
|
|
3564
|
+
fontFamily: K.string
|
|
3556
3565
|
};
|
|
3557
3566
|
export {
|
|
3558
3567
|
Hr as FileManager
|