@wp-playground/components 3.0.14 → 3.0.15
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/FilePickerTree/index.d.ts +1 -0
- package/e2e-harnesses/file-picker-tree-harness.d.ts +2 -0
- package/icons.d.ts +4 -1
- package/index.cjs +10 -10
- package/index.cjs.map +1 -1
- package/index.js +951 -901
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { __experimentalTreeGrid as Dt, Popover as
|
|
3
|
-
import
|
|
4
|
-
import { dirname as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import
|
|
7
|
-
const wr = (
|
|
1
|
+
import f, { forwardRef as St, useMemo as gt, useState as ae, useRef as ie, useEffect as ue, useImperativeHandle as Ot } from "react";
|
|
2
|
+
import { __experimentalTreeGrid as Dt, Popover as jt, NavigableMenu as Ft, MenuItem as tt, __experimentalTreeGridRow as At, __experimentalTreeGridCell as $t, Button as pt, Modal as Nt } from "@wordpress/components";
|
|
3
|
+
import yt from "classnames";
|
|
4
|
+
import { dirname as je, joinPaths as Ne, basename as Mt } from "@php-wasm/util";
|
|
5
|
+
import { forwardRef as Ct, cloneElement as It, createElement as Vt } from "@wordpress/element";
|
|
6
|
+
import Lt from "clsx";
|
|
7
|
+
const wr = (s) => /* @__PURE__ */ f.createElement(
|
|
8
8
|
"svg",
|
|
9
9
|
{
|
|
10
10
|
width: "32",
|
|
@@ -12,9 +12,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
12
12
|
viewBox: "0 0 32 32",
|
|
13
13
|
fill: "none",
|
|
14
14
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
-
...
|
|
15
|
+
...s
|
|
16
16
|
},
|
|
17
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ f.createElement(
|
|
18
18
|
"rect",
|
|
19
19
|
{
|
|
20
20
|
width: "10.4176",
|
|
@@ -25,7 +25,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
25
25
|
strokeWidth: "0.965644"
|
|
26
26
|
}
|
|
27
27
|
),
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ f.createElement(
|
|
29
29
|
"rect",
|
|
30
30
|
{
|
|
31
31
|
width: "13.2346",
|
|
@@ -36,7 +36,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
36
36
|
strokeWidth: "1.44847"
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ f.createElement(
|
|
40
40
|
"rect",
|
|
41
41
|
{
|
|
42
42
|
width: "17.451",
|
|
@@ -47,7 +47,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
47
47
|
strokeWidth: "1.93129"
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
|
-
), gr = (
|
|
50
|
+
), gr = (s) => /* @__PURE__ */ f.createElement(
|
|
51
51
|
"svg",
|
|
52
52
|
{
|
|
53
53
|
width: "16",
|
|
@@ -55,9 +55,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
55
55
|
viewBox: "0 0 16 17",
|
|
56
56
|
fill: "none",
|
|
57
57
|
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
-
...
|
|
58
|
+
...s
|
|
59
59
|
},
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ f.createElement(
|
|
61
61
|
"path",
|
|
62
62
|
{
|
|
63
63
|
fillRule: "evenodd",
|
|
@@ -66,7 +66,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
66
66
|
fill: "#949494"
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
|
-
),
|
|
69
|
+
), yr = (s) => /* @__PURE__ */ f.createElement(
|
|
70
70
|
"svg",
|
|
71
71
|
{
|
|
72
72
|
width: "20",
|
|
@@ -74,16 +74,16 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
74
74
|
viewBox: "0 0 20 21",
|
|
75
75
|
fill: "none",
|
|
76
76
|
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
-
...
|
|
77
|
+
...s
|
|
78
78
|
},
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ f.createElement(
|
|
80
80
|
"path",
|
|
81
81
|
{
|
|
82
82
|
d: "M20 10.5C20 4.99 15.51 0.5 10 0.5C4.48 0.5 0 4.99 0 10.5C0 16.02 4.48 20.5 10 20.5C15.51 20.5 20 16.02 20 10.5ZM7.78 15.87L4.37 6.72C4.92 6.7 5.54 6.64 5.54 6.64C6.04 6.58 5.98 5.51 5.48 5.53C5.48 5.53 4.03 5.64 3.11 5.64C2.93 5.64 2.74 5.64 2.53 5.63C4.12 3.19 6.87 1.61 10 1.61C12.33 1.61 14.45 2.48 16.05 3.95C15.37 3.84 14.4 4.34 14.4 5.53C14.4 6.27 14.85 6.89 15.3 7.63C15.65 8.24 15.85 8.99 15.85 10.09C15.85 11.58 14.45 15.09 14.45 15.09L11.42 6.72C11.96 6.7 12.24 6.55 12.24 6.55C12.74 6.5 12.68 5.3 12.18 5.33C12.18 5.33 10.74 5.45 9.8 5.45C8.93 5.45 7.47 5.33 7.47 5.33C6.97 5.3 6.91 6.53 7.41 6.55L8.33 6.63L9.59 10.04L7.78 15.87ZM17.41 10.5C17.65 9.86 18.15 8.63 17.84 6.25C18.54 7.54 18.89 8.96 18.89 10.5C18.89 13.79 17.16 16.74 14.49 18.28C15.46 15.69 16.43 13.08 17.41 10.5ZM6.1 18.59C3.12 17.15 1.11 14.03 1.11 10.5C1.11 9.2 1.34 8.02 1.83 6.91C3.25 10.8 4.67 14.7 6.1 18.59ZM10.13 11.96L12.71 18.94C11.85 19.23 10.95 19.39 10 19.39C9.21 19.39 8.43 19.28 7.71 19.06C8.52 16.68 9.33 14.32 10.13 11.96Z",
|
|
83
83
|
fill: "#ffffff"
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
|
-
),
|
|
86
|
+
), Wt = /* @__PURE__ */ f.createElement(
|
|
87
87
|
"svg",
|
|
88
88
|
{
|
|
89
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -92,7 +92,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
92
92
|
viewBox: "0 0 15 14",
|
|
93
93
|
fill: "none"
|
|
94
94
|
},
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ f.createElement(
|
|
96
96
|
"path",
|
|
97
97
|
{
|
|
98
98
|
fillRule: "evenodd",
|
|
@@ -100,7 +100,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
100
100
|
d: "M7.59196 3.59524L6.77745 1.96623C6.70755 1.82641 6.56464 1.7381 6.40832 1.7381H1.65079C1.42287 1.7381 1.2381 1.92287 1.2381 2.15079V11.8492C1.2381 12.0771 1.42287 12.2619 1.65079 12.2619H13.2063C13.4343 12.2619 13.619 12.0771 13.619 11.8492V4.00794C13.619 3.78001 13.4343 3.59524 13.2063 3.59524H7.59196ZM8.35714 2.35714L7.88484 1.41254C7.60521 0.853274 7.0336 0.5 6.40832 0.5H1.65079C0.739085 0.5 0 1.23909 0 2.15079V11.8492C0 12.7609 0.739085 13.5 1.65079 13.5H13.2063C14.1181 13.5 14.8571 12.7609 14.8571 11.8492V4.00794C14.8571 3.09623 14.1181 2.35714 13.2063 2.35714H8.35714Z"
|
|
101
101
|
}
|
|
102
102
|
)
|
|
103
|
-
), Bt = /* @__PURE__ */
|
|
103
|
+
), Bt = /* @__PURE__ */ f.createElement(
|
|
104
104
|
"svg",
|
|
105
105
|
{
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -110,8 +110,8 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
110
110
|
className: "bi bi-file-earmark",
|
|
111
111
|
viewBox: "0 0 16 16"
|
|
112
112
|
},
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
),
|
|
113
|
+
/* @__PURE__ */ f.createElement("path", { d: "M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z" })
|
|
114
|
+
), vr = (s) => /* @__PURE__ */ f.createElement(
|
|
115
115
|
"svg",
|
|
116
116
|
{
|
|
117
117
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -119,9 +119,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
119
119
|
height: "18",
|
|
120
120
|
viewBox: "0 0 14 14",
|
|
121
121
|
fill: "none",
|
|
122
|
-
...
|
|
122
|
+
...s
|
|
123
123
|
},
|
|
124
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ f.createElement(
|
|
125
125
|
"path",
|
|
126
126
|
{
|
|
127
127
|
fillRule: "evenodd",
|
|
@@ -130,7 +130,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
130
130
|
fill: "#949494"
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
|
-
), Er = /* @__PURE__ */
|
|
133
|
+
), Er = /* @__PURE__ */ f.createElement(
|
|
134
134
|
"svg",
|
|
135
135
|
{
|
|
136
136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -139,7 +139,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
139
139
|
viewBox: "0 0 14 14",
|
|
140
140
|
fill: "none"
|
|
141
141
|
},
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ f.createElement(
|
|
143
143
|
"path",
|
|
144
144
|
{
|
|
145
145
|
fillRule: "evenodd",
|
|
@@ -149,41 +149,65 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
|
|
|
149
149
|
}
|
|
150
150
|
)
|
|
151
151
|
);
|
|
152
|
-
function
|
|
153
|
-
return `data:${
|
|
152
|
+
function _r(s) {
|
|
153
|
+
return `data:${s.mime};base64,${s.data}`;
|
|
154
154
|
}
|
|
155
|
-
function br(
|
|
156
|
-
|
|
155
|
+
function br({
|
|
156
|
+
size: s = 24,
|
|
157
|
+
sidebarActive: l = !1
|
|
158
|
+
}) {
|
|
159
|
+
return /* @__PURE__ */ f.createElement(
|
|
157
160
|
"svg",
|
|
158
161
|
{
|
|
159
|
-
width:
|
|
160
|
-
height:
|
|
161
|
-
viewBox: "0 0
|
|
162
|
+
width: s,
|
|
163
|
+
height: s,
|
|
164
|
+
viewBox: "0 0 24 24",
|
|
165
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
162
166
|
fill: "none",
|
|
163
|
-
|
|
167
|
+
stroke: "currentColor",
|
|
168
|
+
strokeWidth: "2",
|
|
169
|
+
strokeLinecap: "round",
|
|
170
|
+
strokeLinejoin: "round"
|
|
164
171
|
},
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
|
|
172
|
+
/* @__PURE__ */ f.createElement("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
173
|
+
l ? /* @__PURE__ */ f.createElement(
|
|
174
|
+
"rect",
|
|
175
|
+
{
|
|
176
|
+
x: "3",
|
|
177
|
+
y: "3",
|
|
178
|
+
width: "7",
|
|
179
|
+
height: "18",
|
|
180
|
+
rx: "2",
|
|
181
|
+
ry: "2",
|
|
182
|
+
fill: "currentColor"
|
|
183
|
+
}
|
|
184
|
+
) : /* @__PURE__ */ f.createElement(
|
|
185
|
+
"rect",
|
|
167
186
|
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
187
|
+
x: "3",
|
|
188
|
+
y: "3",
|
|
189
|
+
width: "8",
|
|
190
|
+
height: "18",
|
|
191
|
+
rx: "2",
|
|
192
|
+
ry: "2",
|
|
193
|
+
fill: "none",
|
|
194
|
+
stroke: "currentColor",
|
|
195
|
+
strokeWidth: "2"
|
|
172
196
|
}
|
|
173
197
|
)
|
|
174
198
|
);
|
|
175
199
|
}
|
|
176
|
-
const vt =
|
|
177
|
-
icon:
|
|
178
|
-
size:
|
|
179
|
-
...
|
|
180
|
-
},
|
|
181
|
-
width:
|
|
182
|
-
height:
|
|
183
|
-
...
|
|
184
|
-
ref:
|
|
200
|
+
const vt = Ct(({
|
|
201
|
+
icon: s,
|
|
202
|
+
size: l = 24,
|
|
203
|
+
...E
|
|
204
|
+
}, g) => It(s, {
|
|
205
|
+
width: l,
|
|
206
|
+
height: l,
|
|
207
|
+
...E,
|
|
208
|
+
ref: g
|
|
185
209
|
}));
|
|
186
|
-
var
|
|
210
|
+
var ht = { exports: {} }, Ye = {};
|
|
187
211
|
/**
|
|
188
212
|
* @license React
|
|
189
213
|
* react-jsx-runtime.production.min.js
|
|
@@ -193,21 +217,21 @@ var pt = { exports: {} }, Le = {};
|
|
|
193
217
|
* This source code is licensed under the MIT license found in the
|
|
194
218
|
* LICENSE file in the root directory of this source tree.
|
|
195
219
|
*/
|
|
196
|
-
var
|
|
197
|
-
function
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
var
|
|
201
|
-
function
|
|
202
|
-
var
|
|
203
|
-
|
|
204
|
-
for (
|
|
205
|
-
if (
|
|
206
|
-
return { $$typeof:
|
|
220
|
+
var Et;
|
|
221
|
+
function Ht() {
|
|
222
|
+
if (Et) return Ye;
|
|
223
|
+
Et = 1;
|
|
224
|
+
var s = f, l = Symbol.for("react.element"), E = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, k = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
225
|
+
function M(P, S, I) {
|
|
226
|
+
var _, R = {}, V = null, Q = null;
|
|
227
|
+
I !== void 0 && (V = "" + I), S.key !== void 0 && (V = "" + S.key), S.ref !== void 0 && (Q = S.ref);
|
|
228
|
+
for (_ in S) g.call(S, _) && !C.hasOwnProperty(_) && (R[_] = S[_]);
|
|
229
|
+
if (P && P.defaultProps) for (_ in S = P.defaultProps, S) R[_] === void 0 && (R[_] = S[_]);
|
|
230
|
+
return { $$typeof: l, type: P, key: V, ref: Q, props: R, _owner: k.current };
|
|
207
231
|
}
|
|
208
|
-
return
|
|
232
|
+
return Ye.Fragment = E, Ye.jsx = M, Ye.jsxs = M, Ye;
|
|
209
233
|
}
|
|
210
|
-
var
|
|
234
|
+
var ze = {};
|
|
211
235
|
/**
|
|
212
236
|
* @license React
|
|
213
237
|
* react-jsx-runtime.development.js
|
|
@@ -217,91 +241,91 @@ var Be = {};
|
|
|
217
241
|
* This source code is licensed under the MIT license found in the
|
|
218
242
|
* LICENSE file in the root directory of this source tree.
|
|
219
243
|
*/
|
|
220
|
-
var
|
|
221
|
-
function
|
|
222
|
-
return
|
|
223
|
-
var
|
|
244
|
+
var _t;
|
|
245
|
+
function Yt() {
|
|
246
|
+
return _t || (_t = 1, process.env.NODE_ENV !== "production" && function() {
|
|
247
|
+
var s = f, l = Symbol.for("react.element"), E = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), M = Symbol.for("react.provider"), P = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Q = Symbol.for("react.offscreen"), $ = Symbol.iterator, Z = "@@iterator";
|
|
224
248
|
function he(e) {
|
|
225
249
|
if (e === null || typeof e != "object")
|
|
226
250
|
return null;
|
|
227
|
-
var o =
|
|
251
|
+
var o = $ && e[$] || e[Z];
|
|
228
252
|
return typeof o == "function" ? o : null;
|
|
229
253
|
}
|
|
230
|
-
var
|
|
231
|
-
function
|
|
254
|
+
var j = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
255
|
+
function T(e) {
|
|
232
256
|
{
|
|
233
|
-
for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0),
|
|
234
|
-
c[
|
|
235
|
-
|
|
257
|
+
for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0), w = 1; w < o; w++)
|
|
258
|
+
c[w - 1] = arguments[w];
|
|
259
|
+
fe("error", e, c);
|
|
236
260
|
}
|
|
237
261
|
}
|
|
238
|
-
function
|
|
262
|
+
function fe(e, o, c) {
|
|
239
263
|
{
|
|
240
|
-
var
|
|
264
|
+
var w = j.ReactDebugCurrentFrame, b = w.getStackAddendum();
|
|
241
265
|
b !== "" && (o += "%s", c = c.concat([b]));
|
|
242
|
-
var
|
|
243
|
-
return String(
|
|
266
|
+
var x = c.map(function(v) {
|
|
267
|
+
return String(v);
|
|
244
268
|
});
|
|
245
|
-
|
|
269
|
+
x.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, x);
|
|
246
270
|
}
|
|
247
271
|
}
|
|
248
|
-
var we = !1,
|
|
249
|
-
|
|
250
|
-
function
|
|
251
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
272
|
+
var we = !1, ve = !1, q = !1, B = !1, Ee = !1, ee;
|
|
273
|
+
ee = Symbol.for("react.module.reference");
|
|
274
|
+
function m(e) {
|
|
275
|
+
return !!(typeof e == "string" || typeof e == "function" || e === g || e === C || Ee || e === k || e === I || e === _ || B || e === Q || we || ve || q || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === R || e.$$typeof === M || e.$$typeof === P || e.$$typeof === S || // This needs to include all possible module reference object
|
|
252
276
|
// types supported by any Flight configuration anywhere since
|
|
253
277
|
// we don't know which Flight build this will end up being used
|
|
254
278
|
// with.
|
|
255
|
-
e.$$typeof ===
|
|
279
|
+
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
256
280
|
}
|
|
257
|
-
function
|
|
258
|
-
var
|
|
259
|
-
if (
|
|
260
|
-
return
|
|
281
|
+
function H(e, o, c) {
|
|
282
|
+
var w = e.displayName;
|
|
283
|
+
if (w)
|
|
284
|
+
return w;
|
|
261
285
|
var b = o.displayName || o.name || "";
|
|
262
286
|
return b !== "" ? c + "(" + b + ")" : c;
|
|
263
287
|
}
|
|
264
|
-
function
|
|
288
|
+
function oe(e) {
|
|
265
289
|
return e.displayName || "Context";
|
|
266
290
|
}
|
|
267
|
-
function
|
|
291
|
+
function Y(e) {
|
|
268
292
|
if (e == null)
|
|
269
293
|
return null;
|
|
270
|
-
if (typeof e.tag == "number" &&
|
|
294
|
+
if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
271
295
|
return e.displayName || e.name || null;
|
|
272
296
|
if (typeof e == "string")
|
|
273
297
|
return e;
|
|
274
298
|
switch (e) {
|
|
275
|
-
case
|
|
299
|
+
case g:
|
|
276
300
|
return "Fragment";
|
|
277
|
-
case
|
|
301
|
+
case E:
|
|
278
302
|
return "Portal";
|
|
279
|
-
case
|
|
303
|
+
case C:
|
|
280
304
|
return "Profiler";
|
|
281
|
-
case
|
|
305
|
+
case k:
|
|
282
306
|
return "StrictMode";
|
|
283
|
-
case
|
|
307
|
+
case I:
|
|
284
308
|
return "Suspense";
|
|
285
|
-
case
|
|
309
|
+
case _:
|
|
286
310
|
return "SuspenseList";
|
|
287
311
|
}
|
|
288
312
|
if (typeof e == "object")
|
|
289
313
|
switch (e.$$typeof) {
|
|
290
|
-
case
|
|
314
|
+
case P:
|
|
291
315
|
var o = e;
|
|
292
|
-
return
|
|
293
|
-
case
|
|
316
|
+
return oe(o) + ".Consumer";
|
|
317
|
+
case M:
|
|
294
318
|
var c = e;
|
|
295
|
-
return
|
|
296
|
-
case
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
var
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
var b = e,
|
|
319
|
+
return oe(c._context) + ".Provider";
|
|
320
|
+
case S:
|
|
321
|
+
return H(e, e.render, "ForwardRef");
|
|
322
|
+
case R:
|
|
323
|
+
var w = e.displayName || null;
|
|
324
|
+
return w !== null ? w : Y(e.type) || "Memo";
|
|
325
|
+
case V: {
|
|
326
|
+
var b = e, x = b._payload, v = b._init;
|
|
303
327
|
try {
|
|
304
|
-
return
|
|
328
|
+
return Y(v(x));
|
|
305
329
|
} catch {
|
|
306
330
|
return null;
|
|
307
331
|
}
|
|
@@ -309,18 +333,18 @@ function Zt() {
|
|
|
309
333
|
}
|
|
310
334
|
return null;
|
|
311
335
|
}
|
|
312
|
-
var
|
|
313
|
-
function
|
|
336
|
+
var K = Object.assign, L = 0, te, Te, ke, _e, de, G, z;
|
|
337
|
+
function se() {
|
|
314
338
|
}
|
|
315
|
-
|
|
316
|
-
function
|
|
339
|
+
se.__reactDisabledLog = !0;
|
|
340
|
+
function le() {
|
|
317
341
|
{
|
|
318
342
|
if (L === 0) {
|
|
319
|
-
|
|
343
|
+
te = console.log, Te = console.info, ke = console.warn, _e = console.error, de = console.group, G = console.groupCollapsed, z = console.groupEnd;
|
|
320
344
|
var e = {
|
|
321
345
|
configurable: !0,
|
|
322
346
|
enumerable: !0,
|
|
323
|
-
value:
|
|
347
|
+
value: se,
|
|
324
348
|
writable: !0
|
|
325
349
|
};
|
|
326
350
|
Object.defineProperties(console, {
|
|
@@ -336,7 +360,7 @@ function Zt() {
|
|
|
336
360
|
L++;
|
|
337
361
|
}
|
|
338
362
|
}
|
|
339
|
-
function
|
|
363
|
+
function be() {
|
|
340
364
|
{
|
|
341
365
|
if (L--, L === 0) {
|
|
342
366
|
var e = {
|
|
@@ -345,238 +369,238 @@ function Zt() {
|
|
|
345
369
|
writable: !0
|
|
346
370
|
};
|
|
347
371
|
Object.defineProperties(console, {
|
|
348
|
-
log:
|
|
349
|
-
value:
|
|
372
|
+
log: K({}, e, {
|
|
373
|
+
value: te
|
|
350
374
|
}),
|
|
351
|
-
info:
|
|
352
|
-
value:
|
|
375
|
+
info: K({}, e, {
|
|
376
|
+
value: Te
|
|
353
377
|
}),
|
|
354
|
-
warn:
|
|
355
|
-
value:
|
|
378
|
+
warn: K({}, e, {
|
|
379
|
+
value: ke
|
|
356
380
|
}),
|
|
357
|
-
error:
|
|
358
|
-
value:
|
|
381
|
+
error: K({}, e, {
|
|
382
|
+
value: _e
|
|
359
383
|
}),
|
|
360
|
-
group:
|
|
361
|
-
value:
|
|
384
|
+
group: K({}, e, {
|
|
385
|
+
value: de
|
|
362
386
|
}),
|
|
363
|
-
groupCollapsed:
|
|
364
|
-
value:
|
|
387
|
+
groupCollapsed: K({}, e, {
|
|
388
|
+
value: G
|
|
365
389
|
}),
|
|
366
|
-
groupEnd:
|
|
367
|
-
value:
|
|
390
|
+
groupEnd: K({}, e, {
|
|
391
|
+
value: z
|
|
368
392
|
})
|
|
369
393
|
});
|
|
370
394
|
}
|
|
371
|
-
L < 0 &&
|
|
395
|
+
L < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
372
396
|
}
|
|
373
397
|
}
|
|
374
|
-
var
|
|
375
|
-
function
|
|
398
|
+
var me = j.ReactCurrentDispatcher, ge;
|
|
399
|
+
function W(e, o, c) {
|
|
376
400
|
{
|
|
377
|
-
if (
|
|
401
|
+
if (ge === void 0)
|
|
378
402
|
try {
|
|
379
403
|
throw Error();
|
|
380
404
|
} catch (b) {
|
|
381
|
-
var
|
|
382
|
-
|
|
405
|
+
var w = b.stack.trim().match(/\n( *(at )?)/);
|
|
406
|
+
ge = w && w[1] || "";
|
|
383
407
|
}
|
|
384
408
|
return `
|
|
385
|
-
` +
|
|
409
|
+
` + ge + e;
|
|
386
410
|
}
|
|
387
411
|
}
|
|
388
|
-
var
|
|
412
|
+
var D = !1, re;
|
|
389
413
|
{
|
|
390
|
-
var
|
|
391
|
-
|
|
414
|
+
var d = typeof WeakMap == "function" ? WeakMap : Map;
|
|
415
|
+
re = new d();
|
|
392
416
|
}
|
|
393
|
-
function
|
|
394
|
-
if (!e ||
|
|
417
|
+
function F(e, o) {
|
|
418
|
+
if (!e || D)
|
|
395
419
|
return "";
|
|
396
420
|
{
|
|
397
|
-
var c =
|
|
421
|
+
var c = re.get(e);
|
|
398
422
|
if (c !== void 0)
|
|
399
423
|
return c;
|
|
400
424
|
}
|
|
401
|
-
var
|
|
402
|
-
|
|
425
|
+
var w;
|
|
426
|
+
D = !0;
|
|
403
427
|
var b = Error.prepareStackTrace;
|
|
404
428
|
Error.prepareStackTrace = void 0;
|
|
405
|
-
var
|
|
406
|
-
|
|
429
|
+
var x;
|
|
430
|
+
x = me.current, me.current = null, le();
|
|
407
431
|
try {
|
|
408
432
|
if (o) {
|
|
409
|
-
var
|
|
433
|
+
var v = function() {
|
|
410
434
|
throw Error();
|
|
411
435
|
};
|
|
412
|
-
if (Object.defineProperty(
|
|
436
|
+
if (Object.defineProperty(v.prototype, "props", {
|
|
413
437
|
set: function() {
|
|
414
438
|
throw Error();
|
|
415
439
|
}
|
|
416
440
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
417
441
|
try {
|
|
418
|
-
Reflect.construct(
|
|
442
|
+
Reflect.construct(v, []);
|
|
419
443
|
} catch (J) {
|
|
420
|
-
|
|
444
|
+
w = J;
|
|
421
445
|
}
|
|
422
|
-
Reflect.construct(e, [],
|
|
446
|
+
Reflect.construct(e, [], v);
|
|
423
447
|
} else {
|
|
424
448
|
try {
|
|
425
|
-
|
|
449
|
+
v.call();
|
|
426
450
|
} catch (J) {
|
|
427
|
-
|
|
451
|
+
w = J;
|
|
428
452
|
}
|
|
429
|
-
e.call(
|
|
453
|
+
e.call(v.prototype);
|
|
430
454
|
}
|
|
431
455
|
} else {
|
|
432
456
|
try {
|
|
433
457
|
throw Error();
|
|
434
458
|
} catch (J) {
|
|
435
|
-
|
|
459
|
+
w = J;
|
|
436
460
|
}
|
|
437
461
|
e();
|
|
438
462
|
}
|
|
439
463
|
} catch (J) {
|
|
440
|
-
if (J &&
|
|
441
|
-
for (var
|
|
442
|
-
`), U =
|
|
443
|
-
`),
|
|
444
|
-
|
|
445
|
-
for (;
|
|
446
|
-
if (
|
|
447
|
-
if (
|
|
464
|
+
if (J && w && typeof J.stack == "string") {
|
|
465
|
+
for (var y = J.stack.split(`
|
|
466
|
+
`), U = w.stack.split(`
|
|
467
|
+
`), A = y.length - 1, N = U.length - 1; A >= 1 && N >= 0 && y[A] !== U[N]; )
|
|
468
|
+
N--;
|
|
469
|
+
for (; A >= 1 && N >= 0; A--, N--)
|
|
470
|
+
if (y[A] !== U[N]) {
|
|
471
|
+
if (A !== 1 || N !== 1)
|
|
448
472
|
do
|
|
449
|
-
if (
|
|
450
|
-
var
|
|
451
|
-
` +
|
|
452
|
-
return e.displayName &&
|
|
473
|
+
if (A--, N--, N < 0 || y[A] !== U[N]) {
|
|
474
|
+
var ce = `
|
|
475
|
+
` + y[A].replace(" at new ", " at ");
|
|
476
|
+
return e.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, ce), ce;
|
|
453
477
|
}
|
|
454
|
-
while (
|
|
478
|
+
while (A >= 1 && N >= 0);
|
|
455
479
|
break;
|
|
456
480
|
}
|
|
457
481
|
}
|
|
458
482
|
} finally {
|
|
459
|
-
|
|
483
|
+
D = !1, me.current = x, be(), Error.prepareStackTrace = b;
|
|
460
484
|
}
|
|
461
|
-
var
|
|
462
|
-
return typeof e == "function" &&
|
|
485
|
+
var $e = e ? e.displayName || e.name : "", De = $e ? W($e) : "";
|
|
486
|
+
return typeof e == "function" && re.set(e, De), De;
|
|
463
487
|
}
|
|
464
|
-
function
|
|
465
|
-
return
|
|
488
|
+
function ne(e, o, c) {
|
|
489
|
+
return F(e, !1);
|
|
466
490
|
}
|
|
467
|
-
function
|
|
491
|
+
function Ce(e) {
|
|
468
492
|
var o = e.prototype;
|
|
469
493
|
return !!(o && o.isReactComponent);
|
|
470
494
|
}
|
|
471
|
-
function
|
|
495
|
+
function Pe(e, o, c) {
|
|
472
496
|
if (e == null)
|
|
473
497
|
return "";
|
|
474
498
|
if (typeof e == "function")
|
|
475
|
-
return
|
|
499
|
+
return F(e, Ce(e));
|
|
476
500
|
if (typeof e == "string")
|
|
477
|
-
return
|
|
501
|
+
return W(e);
|
|
478
502
|
switch (e) {
|
|
479
|
-
case
|
|
480
|
-
return
|
|
481
|
-
case
|
|
482
|
-
return
|
|
503
|
+
case I:
|
|
504
|
+
return W("Suspense");
|
|
505
|
+
case _:
|
|
506
|
+
return W("SuspenseList");
|
|
483
507
|
}
|
|
484
508
|
if (typeof e == "object")
|
|
485
509
|
switch (e.$$typeof) {
|
|
486
|
-
case
|
|
487
|
-
return
|
|
488
|
-
case
|
|
489
|
-
return
|
|
490
|
-
case
|
|
491
|
-
var
|
|
510
|
+
case S:
|
|
511
|
+
return ne(e.render);
|
|
512
|
+
case R:
|
|
513
|
+
return Pe(e.type, o, c);
|
|
514
|
+
case V: {
|
|
515
|
+
var w = e, b = w._payload, x = w._init;
|
|
492
516
|
try {
|
|
493
|
-
return
|
|
517
|
+
return Pe(x(b), o, c);
|
|
494
518
|
} catch {
|
|
495
519
|
}
|
|
496
520
|
}
|
|
497
521
|
}
|
|
498
522
|
return "";
|
|
499
523
|
}
|
|
500
|
-
var
|
|
501
|
-
function
|
|
524
|
+
var pe = Object.prototype.hasOwnProperty, Ie = {}, Ze = j.ReactDebugCurrentFrame;
|
|
525
|
+
function xe(e) {
|
|
502
526
|
if (e) {
|
|
503
|
-
var o = e._owner, c =
|
|
504
|
-
|
|
527
|
+
var o = e._owner, c = Pe(e.type, e._source, o ? o.type : null);
|
|
528
|
+
Ze.setExtraStackFrame(c);
|
|
505
529
|
} else
|
|
506
|
-
|
|
530
|
+
Ze.setExtraStackFrame(null);
|
|
507
531
|
}
|
|
508
|
-
function
|
|
532
|
+
function rt(e, o, c, w, b) {
|
|
509
533
|
{
|
|
510
|
-
var
|
|
511
|
-
for (var
|
|
512
|
-
if (
|
|
513
|
-
var
|
|
534
|
+
var x = Function.call.bind(pe);
|
|
535
|
+
for (var v in e)
|
|
536
|
+
if (x(e, v)) {
|
|
537
|
+
var y = void 0;
|
|
514
538
|
try {
|
|
515
|
-
if (typeof e[
|
|
516
|
-
var U = Error((
|
|
539
|
+
if (typeof e[v] != "function") {
|
|
540
|
+
var U = Error((w || "React class") + ": " + c + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
517
541
|
throw U.name = "Invariant Violation", U;
|
|
518
542
|
}
|
|
519
|
-
|
|
520
|
-
} catch (
|
|
521
|
-
|
|
543
|
+
y = e[v](o, v, w, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
544
|
+
} catch (A) {
|
|
545
|
+
y = A;
|
|
522
546
|
}
|
|
523
|
-
|
|
547
|
+
y && !(y instanceof Error) && (xe(b), T("%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).", w || "React class", c, v, typeof y), xe(null)), y instanceof Error && !(y.message in Ie) && (Ie[y.message] = !0, xe(b), T("Failed %s type: %s", c, y.message), xe(null));
|
|
524
548
|
}
|
|
525
549
|
}
|
|
526
550
|
}
|
|
527
|
-
var
|
|
528
|
-
function
|
|
529
|
-
return
|
|
551
|
+
var Ve = Array.isArray;
|
|
552
|
+
function Le(e) {
|
|
553
|
+
return Ve(e);
|
|
530
554
|
}
|
|
531
|
-
function
|
|
555
|
+
function nt(e) {
|
|
532
556
|
{
|
|
533
557
|
var o = typeof Symbol == "function" && Symbol.toStringTag, c = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
534
558
|
return c;
|
|
535
559
|
}
|
|
536
560
|
}
|
|
537
|
-
function
|
|
561
|
+
function at(e) {
|
|
538
562
|
try {
|
|
539
|
-
return
|
|
563
|
+
return qe(e), !1;
|
|
540
564
|
} catch {
|
|
541
565
|
return !0;
|
|
542
566
|
}
|
|
543
567
|
}
|
|
544
|
-
function
|
|
568
|
+
function qe(e) {
|
|
545
569
|
return "" + e;
|
|
546
570
|
}
|
|
547
|
-
function
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
571
|
+
function Ke(e) {
|
|
572
|
+
if (at(e))
|
|
573
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(e)), qe(e);
|
|
550
574
|
}
|
|
551
|
-
var
|
|
575
|
+
var Ge = j.ReactCurrentOwner, it = {
|
|
552
576
|
key: !0,
|
|
553
577
|
ref: !0,
|
|
554
578
|
__self: !0,
|
|
555
579
|
__source: !0
|
|
556
|
-
},
|
|
580
|
+
}, Se, Oe;
|
|
557
581
|
function ot(e) {
|
|
558
|
-
if (
|
|
582
|
+
if (pe.call(e, "ref")) {
|
|
559
583
|
var o = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
560
584
|
if (o && o.isReactWarning)
|
|
561
585
|
return !1;
|
|
562
586
|
}
|
|
563
587
|
return e.ref !== void 0;
|
|
564
588
|
}
|
|
565
|
-
function
|
|
566
|
-
if (
|
|
589
|
+
function st(e) {
|
|
590
|
+
if (pe.call(e, "key")) {
|
|
567
591
|
var o = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
568
592
|
if (o && o.isReactWarning)
|
|
569
593
|
return !1;
|
|
570
594
|
}
|
|
571
595
|
return e.key !== void 0;
|
|
572
596
|
}
|
|
573
|
-
function
|
|
574
|
-
typeof e.ref == "string" &&
|
|
597
|
+
function lt(e, o) {
|
|
598
|
+
typeof e.ref == "string" && Ge.current;
|
|
575
599
|
}
|
|
576
600
|
function ct(e, o) {
|
|
577
601
|
{
|
|
578
602
|
var c = function() {
|
|
579
|
-
|
|
603
|
+
Se || (Se = !0, T("%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)", o));
|
|
580
604
|
};
|
|
581
605
|
c.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
582
606
|
get: c,
|
|
@@ -584,10 +608,10 @@ function Zt() {
|
|
|
584
608
|
});
|
|
585
609
|
}
|
|
586
610
|
}
|
|
587
|
-
function
|
|
611
|
+
function ut(e, o) {
|
|
588
612
|
{
|
|
589
613
|
var c = function() {
|
|
590
|
-
|
|
614
|
+
Oe || (Oe = !0, T("%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)", o));
|
|
591
615
|
};
|
|
592
616
|
c.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
593
617
|
get: c,
|
|
@@ -595,70 +619,70 @@ function Zt() {
|
|
|
595
619
|
});
|
|
596
620
|
}
|
|
597
621
|
}
|
|
598
|
-
var Je = function(e, o, c,
|
|
599
|
-
var
|
|
622
|
+
var Je = function(e, o, c, w, b, x, v) {
|
|
623
|
+
var y = {
|
|
600
624
|
// This tag allows us to uniquely identify this as a React Element
|
|
601
|
-
$$typeof:
|
|
625
|
+
$$typeof: l,
|
|
602
626
|
// Built-in properties that belong on the element
|
|
603
627
|
type: e,
|
|
604
628
|
key: o,
|
|
605
629
|
ref: c,
|
|
606
|
-
props:
|
|
630
|
+
props: v,
|
|
607
631
|
// Record the component responsible for creating this element.
|
|
608
|
-
_owner:
|
|
632
|
+
_owner: x
|
|
609
633
|
};
|
|
610
|
-
return
|
|
634
|
+
return y._store = {}, Object.defineProperty(y._store, "validated", {
|
|
611
635
|
configurable: !1,
|
|
612
636
|
enumerable: !1,
|
|
613
637
|
writable: !0,
|
|
614
638
|
value: !1
|
|
615
|
-
}), Object.defineProperty(
|
|
639
|
+
}), Object.defineProperty(y, "_self", {
|
|
616
640
|
configurable: !1,
|
|
617
641
|
enumerable: !1,
|
|
618
642
|
writable: !1,
|
|
619
|
-
value:
|
|
620
|
-
}), Object.defineProperty(
|
|
643
|
+
value: w
|
|
644
|
+
}), Object.defineProperty(y, "_source", {
|
|
621
645
|
configurable: !1,
|
|
622
646
|
enumerable: !1,
|
|
623
647
|
writable: !1,
|
|
624
648
|
value: b
|
|
625
|
-
}), Object.freeze && (Object.freeze(
|
|
649
|
+
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
626
650
|
};
|
|
627
|
-
function Xe(e, o, c,
|
|
651
|
+
function Xe(e, o, c, w, b) {
|
|
628
652
|
{
|
|
629
|
-
var
|
|
630
|
-
c !== void 0 && (
|
|
631
|
-
for (
|
|
632
|
-
|
|
653
|
+
var x, v = {}, y = null, U = null;
|
|
654
|
+
c !== void 0 && (Ke(c), y = "" + c), st(o) && (Ke(o.key), y = "" + o.key), ot(o) && (U = o.ref, lt(o, b));
|
|
655
|
+
for (x in o)
|
|
656
|
+
pe.call(o, x) && !it.hasOwnProperty(x) && (v[x] = o[x]);
|
|
633
657
|
if (e && e.defaultProps) {
|
|
634
|
-
var
|
|
635
|
-
for (
|
|
636
|
-
|
|
658
|
+
var A = e.defaultProps;
|
|
659
|
+
for (x in A)
|
|
660
|
+
v[x] === void 0 && (v[x] = A[x]);
|
|
637
661
|
}
|
|
638
|
-
if (
|
|
639
|
-
var
|
|
640
|
-
|
|
662
|
+
if (y || U) {
|
|
663
|
+
var N = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
664
|
+
y && ct(v, N), U && ut(v, N);
|
|
641
665
|
}
|
|
642
|
-
return Je(e,
|
|
666
|
+
return Je(e, y, U, b, w, Ge.current, v);
|
|
643
667
|
}
|
|
644
668
|
}
|
|
645
|
-
var
|
|
646
|
-
function
|
|
669
|
+
var Fe = j.ReactCurrentOwner, Qe = j.ReactDebugCurrentFrame;
|
|
670
|
+
function Re(e) {
|
|
647
671
|
if (e) {
|
|
648
|
-
var o = e._owner, c =
|
|
672
|
+
var o = e._owner, c = Pe(e.type, e._source, o ? o.type : null);
|
|
649
673
|
Qe.setExtraStackFrame(c);
|
|
650
674
|
} else
|
|
651
675
|
Qe.setExtraStackFrame(null);
|
|
652
676
|
}
|
|
653
|
-
var
|
|
654
|
-
|
|
655
|
-
function
|
|
656
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
677
|
+
var We;
|
|
678
|
+
We = !1;
|
|
679
|
+
function Be(e) {
|
|
680
|
+
return typeof e == "object" && e !== null && e.$$typeof === l;
|
|
657
681
|
}
|
|
658
|
-
function
|
|
682
|
+
function et() {
|
|
659
683
|
{
|
|
660
|
-
if (
|
|
661
|
-
var e =
|
|
684
|
+
if (Fe.current) {
|
|
685
|
+
var e = Y(Fe.current.type);
|
|
662
686
|
if (e)
|
|
663
687
|
return `
|
|
664
688
|
|
|
@@ -667,13 +691,13 @@ Check the render method of \`` + e + "`.";
|
|
|
667
691
|
return "";
|
|
668
692
|
}
|
|
669
693
|
}
|
|
670
|
-
function
|
|
694
|
+
function t(e) {
|
|
671
695
|
return "";
|
|
672
696
|
}
|
|
673
|
-
var
|
|
674
|
-
function
|
|
697
|
+
var r = {};
|
|
698
|
+
function n(e) {
|
|
675
699
|
{
|
|
676
|
-
var o =
|
|
700
|
+
var o = et();
|
|
677
701
|
if (!o) {
|
|
678
702
|
var c = typeof e == "string" ? e : e.displayName || e.name;
|
|
679
703
|
c && (o = `
|
|
@@ -683,39 +707,39 @@ Check the top-level render call using <` + c + ">.");
|
|
|
683
707
|
return o;
|
|
684
708
|
}
|
|
685
709
|
}
|
|
686
|
-
function
|
|
710
|
+
function i(e, o) {
|
|
687
711
|
{
|
|
688
712
|
if (!e._store || e._store.validated || e.key != null)
|
|
689
713
|
return;
|
|
690
714
|
e._store.validated = !0;
|
|
691
|
-
var c =
|
|
692
|
-
if (
|
|
715
|
+
var c = n(o);
|
|
716
|
+
if (r[c])
|
|
693
717
|
return;
|
|
694
|
-
|
|
695
|
-
var
|
|
696
|
-
e && e._owner && e._owner !==
|
|
718
|
+
r[c] = !0;
|
|
719
|
+
var w = "";
|
|
720
|
+
e && e._owner && e._owner !== Fe.current && (w = " It was passed a child from " + Y(e._owner.type) + "."), Re(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, w), Re(null);
|
|
697
721
|
}
|
|
698
722
|
}
|
|
699
|
-
function
|
|
723
|
+
function a(e, o) {
|
|
700
724
|
{
|
|
701
725
|
if (typeof e != "object")
|
|
702
726
|
return;
|
|
703
|
-
if (
|
|
727
|
+
if (Le(e))
|
|
704
728
|
for (var c = 0; c < e.length; c++) {
|
|
705
|
-
var
|
|
706
|
-
|
|
729
|
+
var w = e[c];
|
|
730
|
+
Be(w) && i(w, o);
|
|
707
731
|
}
|
|
708
|
-
else if (
|
|
732
|
+
else if (Be(e))
|
|
709
733
|
e._store && (e._store.validated = !0);
|
|
710
734
|
else if (e) {
|
|
711
735
|
var b = he(e);
|
|
712
736
|
if (typeof b == "function" && b !== e.entries)
|
|
713
|
-
for (var
|
|
714
|
-
|
|
737
|
+
for (var x = b.call(e), v; !(v = x.next()).done; )
|
|
738
|
+
Be(v.value) && i(v.value, o);
|
|
715
739
|
}
|
|
716
740
|
}
|
|
717
741
|
}
|
|
718
|
-
function
|
|
742
|
+
function p(e) {
|
|
719
743
|
{
|
|
720
744
|
var o = e.type;
|
|
721
745
|
if (o == null || typeof o == "string")
|
|
@@ -723,93 +747,93 @@ Check the top-level render call using <` + c + ">.");
|
|
|
723
747
|
var c;
|
|
724
748
|
if (typeof o == "function")
|
|
725
749
|
c = o.propTypes;
|
|
726
|
-
else if (typeof o == "object" && (o.$$typeof ===
|
|
750
|
+
else if (typeof o == "object" && (o.$$typeof === S || // Note: Memo only checks outer props here.
|
|
727
751
|
// Inner props are checked in the reconciler.
|
|
728
|
-
o.$$typeof ===
|
|
752
|
+
o.$$typeof === R))
|
|
729
753
|
c = o.propTypes;
|
|
730
754
|
else
|
|
731
755
|
return;
|
|
732
756
|
if (c) {
|
|
733
|
-
var
|
|
734
|
-
|
|
735
|
-
} else if (o.PropTypes !== void 0 && !
|
|
736
|
-
|
|
737
|
-
var b =
|
|
738
|
-
|
|
757
|
+
var w = Y(o);
|
|
758
|
+
rt(c, e.props, "prop", w, e);
|
|
759
|
+
} else if (o.PropTypes !== void 0 && !We) {
|
|
760
|
+
We = !0;
|
|
761
|
+
var b = Y(o);
|
|
762
|
+
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
|
|
739
763
|
}
|
|
740
|
-
typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved &&
|
|
764
|
+
typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
741
765
|
}
|
|
742
766
|
}
|
|
743
|
-
function
|
|
767
|
+
function u(e) {
|
|
744
768
|
{
|
|
745
769
|
for (var o = Object.keys(e.props), c = 0; c < o.length; c++) {
|
|
746
|
-
var
|
|
747
|
-
if (
|
|
748
|
-
|
|
770
|
+
var w = o[c];
|
|
771
|
+
if (w !== "children" && w !== "key") {
|
|
772
|
+
Re(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), Re(null);
|
|
749
773
|
break;
|
|
750
774
|
}
|
|
751
775
|
}
|
|
752
|
-
e.ref !== null && (
|
|
776
|
+
e.ref !== null && (Re(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
|
|
753
777
|
}
|
|
754
778
|
}
|
|
755
|
-
var
|
|
756
|
-
function
|
|
779
|
+
var h = {};
|
|
780
|
+
function O(e, o, c, w, b, x) {
|
|
757
781
|
{
|
|
758
|
-
var
|
|
759
|
-
if (!
|
|
760
|
-
var
|
|
761
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
762
|
-
var U =
|
|
763
|
-
U ?
|
|
764
|
-
var
|
|
765
|
-
e === null ?
|
|
782
|
+
var v = m(e);
|
|
783
|
+
if (!v) {
|
|
784
|
+
var y = "";
|
|
785
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
786
|
+
var U = t();
|
|
787
|
+
U ? y += U : y += et();
|
|
788
|
+
var A;
|
|
789
|
+
e === null ? A = "null" : Le(e) ? A = "array" : e !== void 0 && e.$$typeof === l ? (A = "<" + (Y(e.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : A = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, y);
|
|
766
790
|
}
|
|
767
|
-
var
|
|
768
|
-
if (
|
|
769
|
-
return
|
|
770
|
-
if (
|
|
771
|
-
var
|
|
772
|
-
if (
|
|
773
|
-
if (
|
|
774
|
-
if (
|
|
775
|
-
for (var
|
|
776
|
-
|
|
777
|
-
Object.freeze && Object.freeze(
|
|
791
|
+
var N = Xe(e, o, c, b, x);
|
|
792
|
+
if (N == null)
|
|
793
|
+
return N;
|
|
794
|
+
if (v) {
|
|
795
|
+
var ce = o.children;
|
|
796
|
+
if (ce !== void 0)
|
|
797
|
+
if (w)
|
|
798
|
+
if (Le(ce)) {
|
|
799
|
+
for (var $e = 0; $e < ce.length; $e++)
|
|
800
|
+
a(ce[$e], e);
|
|
801
|
+
Object.freeze && Object.freeze(ce);
|
|
778
802
|
} else
|
|
779
|
-
|
|
803
|
+
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
780
804
|
else
|
|
781
|
-
|
|
805
|
+
a(ce, e);
|
|
782
806
|
}
|
|
783
|
-
if (
|
|
784
|
-
var
|
|
785
|
-
return
|
|
786
|
-
}),
|
|
787
|
-
if (!
|
|
788
|
-
var
|
|
789
|
-
|
|
807
|
+
if (pe.call(o, "key")) {
|
|
808
|
+
var De = Y(e), J = Object.keys(o).filter(function(Pt) {
|
|
809
|
+
return Pt !== "key";
|
|
810
|
+
}), ft = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
811
|
+
if (!h[De + ft]) {
|
|
812
|
+
var kt = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
|
|
813
|
+
T(`A props object containing a "key" prop is being spread into JSX:
|
|
790
814
|
let props = %s;
|
|
791
815
|
<%s {...props} />
|
|
792
816
|
React keys must be passed directly to JSX without using spread:
|
|
793
817
|
let props = %s;
|
|
794
|
-
<%s key={someKey} {...props} />`,
|
|
818
|
+
<%s key={someKey} {...props} />`, ft, De, kt, De), h[De + ft] = !0;
|
|
795
819
|
}
|
|
796
820
|
}
|
|
797
|
-
return e ===
|
|
821
|
+
return e === g ? u(N) : p(N), N;
|
|
798
822
|
}
|
|
799
823
|
}
|
|
800
|
-
function
|
|
801
|
-
return
|
|
824
|
+
function ye(e, o, c) {
|
|
825
|
+
return O(e, o, c, !0);
|
|
802
826
|
}
|
|
803
|
-
function
|
|
804
|
-
return
|
|
827
|
+
function He(e, o, c) {
|
|
828
|
+
return O(e, o, c, !1);
|
|
805
829
|
}
|
|
806
|
-
var
|
|
807
|
-
|
|
808
|
-
}()),
|
|
830
|
+
var Ae = He, Tt = ye;
|
|
831
|
+
ze.Fragment = g, ze.jsx = Ae, ze.jsxs = Tt;
|
|
832
|
+
}()), ze;
|
|
809
833
|
}
|
|
810
|
-
process.env.NODE_ENV === "production" ?
|
|
811
|
-
var
|
|
812
|
-
const
|
|
834
|
+
process.env.NODE_ENV === "production" ? ht.exports = Ht() : ht.exports = Yt();
|
|
835
|
+
var Ue = ht.exports;
|
|
836
|
+
const xt = (s) => Vt("path", s), wt = Ct(
|
|
813
837
|
/**
|
|
814
838
|
* @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
|
|
815
839
|
* Other props will be passed through to svg component.
|
|
@@ -818,39 +842,39 @@ const _t = (l) => Ht("path", l), ht = bt(
|
|
|
818
842
|
* @return {JSX.Element} Stop component
|
|
819
843
|
*/
|
|
820
844
|
({
|
|
821
|
-
className:
|
|
822
|
-
isPressed:
|
|
823
|
-
...
|
|
824
|
-
},
|
|
825
|
-
const
|
|
826
|
-
...
|
|
827
|
-
className:
|
|
828
|
-
"is-pressed":
|
|
845
|
+
className: s,
|
|
846
|
+
isPressed: l,
|
|
847
|
+
...E
|
|
848
|
+
}, g) => {
|
|
849
|
+
const k = {
|
|
850
|
+
...E,
|
|
851
|
+
className: Lt(s, {
|
|
852
|
+
"is-pressed": l
|
|
829
853
|
}) || void 0,
|
|
830
854
|
"aria-hidden": !0,
|
|
831
855
|
focusable: !1
|
|
832
856
|
};
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
...
|
|
835
|
-
ref:
|
|
857
|
+
return /* @__PURE__ */ Ue.jsx("svg", {
|
|
858
|
+
...k,
|
|
859
|
+
ref: g
|
|
836
860
|
});
|
|
837
861
|
}
|
|
838
862
|
);
|
|
839
|
-
|
|
840
|
-
const
|
|
863
|
+
wt.displayName = "SVG";
|
|
864
|
+
const zt = /* @__PURE__ */ Ue.jsx(wt, {
|
|
841
865
|
viewBox: "0 0 24 24",
|
|
842
866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
843
|
-
children: /* @__PURE__ */
|
|
867
|
+
children: /* @__PURE__ */ Ue.jsx(xt, {
|
|
844
868
|
d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
|
|
845
869
|
})
|
|
846
|
-
}),
|
|
870
|
+
}), Ut = /* @__PURE__ */ Ue.jsx(wt, {
|
|
847
871
|
xmlns: "http://www.w3.org/2000/svg",
|
|
848
872
|
viewBox: "0 0 24 24",
|
|
849
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ Ue.jsx(xt, {
|
|
850
874
|
d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
851
875
|
})
|
|
852
|
-
}),
|
|
853
|
-
filePickerTree:
|
|
876
|
+
}), Zt = "_file-picker-tree_3rwm2_1", qt = "_file-node-button_3rwm2_17", Kt = "_selected_3rwm2_53", Gt = "_focused_3rwm2_65", Jt = "_dropTarget_3rwm2_70", Xt = "_dropTargetInvalid_3rwm2_79", Qt = "_renaming_3rwm2_88", er = "_renameInput_3rwm2_93", tr = "_file-name_3rwm2_108", X = {
|
|
877
|
+
filePickerTree: Zt,
|
|
854
878
|
fileNodeButton: qt,
|
|
855
879
|
selected: Kt,
|
|
856
880
|
focused: Gt,
|
|
@@ -860,169 +884,182 @@ const Yt = /* @__PURE__ */ We.jsx(ht, {
|
|
|
860
884
|
renameInput: er,
|
|
861
885
|
fileName: tr
|
|
862
886
|
};
|
|
863
|
-
function
|
|
864
|
-
if (!
|
|
865
|
-
const
|
|
866
|
-
let
|
|
867
|
-
|
|
868
|
-
for (const
|
|
869
|
-
!
|
|
870
|
-
return
|
|
887
|
+
function dt(s) {
|
|
888
|
+
if (!s) return [];
|
|
889
|
+
const l = s.replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/").replace(/\/$/, "") || s, E = l.startsWith("/"), g = l.split("/").filter(Boolean), k = [];
|
|
890
|
+
let C = E ? "/" : "";
|
|
891
|
+
E && k.push("/");
|
|
892
|
+
for (const M of g)
|
|
893
|
+
!C || C === "/" ? C = C === "/" ? `/${M}` : M : C = `${C}/${M}`, k.push(C);
|
|
894
|
+
return k;
|
|
871
895
|
}
|
|
872
|
-
function rr(
|
|
873
|
-
if (!
|
|
874
|
-
const
|
|
875
|
-
return
|
|
896
|
+
function rr(s, l) {
|
|
897
|
+
if (!s || !l || s === l) return !1;
|
|
898
|
+
const E = s === "/" ? "/" : s.replace(/\/{2,}/g, "/"), g = l.replace(/\/{2,}/g, "/");
|
|
899
|
+
return E === "/" ? g.startsWith("/") && g !== "/" : g.startsWith(`${E}/`);
|
|
876
900
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
901
|
+
function mt(s, l, E) {
|
|
902
|
+
return s && (s === l ? E : s.startsWith(l === "/" ? "/" : `${l}/`) ? E + s.slice(l.length) : s);
|
|
879
903
|
}
|
|
880
904
|
const nr = St(function({
|
|
881
|
-
filesystem:
|
|
882
|
-
root:
|
|
883
|
-
initialSelectedPath:
|
|
884
|
-
onSelect:
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
905
|
+
filesystem: l,
|
|
906
|
+
root: E = "/wordpress",
|
|
907
|
+
initialSelectedPath: g,
|
|
908
|
+
onSelect: k = () => {
|
|
909
|
+
},
|
|
910
|
+
onDoubleClickFile: C
|
|
911
|
+
}, M) {
|
|
912
|
+
const P = gt(() => {
|
|
913
|
+
let t = (E || "/").replace(/\\+/g, "/");
|
|
889
914
|
return t.startsWith("/") || (t = `/${t}`), t = t.replace(/\/{2,}/g, "/"), t.length > 1 && t.endsWith("/") && (t = t.slice(0, -1)), t || "/";
|
|
890
|
-
}, [
|
|
891
|
-
if (!
|
|
915
|
+
}, [E]), S = (t) => !t || t === "." || t === ".." ? !1 : !/[\\/]/.test(t), [I, _] = ae(() => {
|
|
916
|
+
if (!g)
|
|
892
917
|
return {};
|
|
893
918
|
const t = {};
|
|
894
|
-
for (const r of
|
|
919
|
+
for (const r of dt(g))
|
|
895
920
|
t[r] = !0;
|
|
896
921
|
return t;
|
|
897
|
-
}), [
|
|
898
|
-
() =>
|
|
899
|
-
), [
|
|
900
|
-
() =>
|
|
901
|
-
), [
|
|
922
|
+
}), [R, V] = ae(
|
|
923
|
+
() => g ?? null
|
|
924
|
+
), [Q, $] = ae(
|
|
925
|
+
() => g ?? null
|
|
926
|
+
), [Z, he] = ae({}), [j, T] = ae(
|
|
902
927
|
{}
|
|
903
|
-
), [
|
|
928
|
+
), [fe, we] = ae(null), [ve, q] = ae(
|
|
904
929
|
null
|
|
905
|
-
),
|
|
906
|
-
for (const t of Object.keys(
|
|
907
|
-
clearTimeout(
|
|
908
|
-
},
|
|
909
|
-
const r =
|
|
910
|
-
r && (clearTimeout(r), delete
|
|
930
|
+
), B = ie({}), Ee = ie(!1), ee = ie(null), m = ie(null), H = ie(j), oe = ie(Z), Y = () => {
|
|
931
|
+
for (const t of Object.keys(B.current))
|
|
932
|
+
clearTimeout(B.current[t]), delete B.current[t];
|
|
933
|
+
}, K = (t) => {
|
|
934
|
+
const r = B.current[t];
|
|
935
|
+
r && (clearTimeout(r), delete B.current[t]);
|
|
911
936
|
};
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}, [
|
|
915
|
-
|
|
916
|
-
}, [
|
|
917
|
-
const
|
|
937
|
+
ue(() => {
|
|
938
|
+
H.current = j;
|
|
939
|
+
}, [j]), ue(() => {
|
|
940
|
+
oe.current = Z;
|
|
941
|
+
}, [Z]);
|
|
942
|
+
const L = (t) => {
|
|
918
943
|
var n;
|
|
919
|
-
const r = (n =
|
|
944
|
+
const r = (n = ee.current) == null ? void 0 : n.querySelector(
|
|
920
945
|
`[data-path="${t}"]`
|
|
921
946
|
);
|
|
922
|
-
r && typeof r.focus == "function" && r.focus()
|
|
923
|
-
|
|
947
|
+
r && typeof r.focus == "function" && (r.focus(), r.scrollIntoView({
|
|
948
|
+
behavior: "smooth",
|
|
949
|
+
block: "nearest"
|
|
950
|
+
}));
|
|
951
|
+
}, te = (t, r = "") => (r ? `${r}/${t.name}` : t.name).replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/"), Te = (t, r) => t.children ? t.children : Z[r], ke = async (t, r) => {
|
|
924
952
|
const n = await t.listFiles(r), i = [];
|
|
925
953
|
for (const a of n) {
|
|
926
|
-
const
|
|
927
|
-
i.push({ name: a, type:
|
|
928
|
-
}
|
|
929
|
-
return i.sort((a,
|
|
930
|
-
|
|
954
|
+
const p = r === "/" ? `/${a}` : `${r}/${a}`, u = await t.isDir(p);
|
|
955
|
+
i.push({ name: a, type: u ? "folder" : "file" });
|
|
956
|
+
}
|
|
957
|
+
return i.sort((a, p) => {
|
|
958
|
+
var ye;
|
|
959
|
+
if (a.type !== p.type) return a.type === "folder" ? -1 : 1;
|
|
960
|
+
const u = r === "/" ? `/${a.name}` : `${r}/${a.name}`, h = r === "/" ? `/${p.name}` : `${r}/${p.name}`, O = (ye = ne.current) == null ? void 0 : ye.tempPath;
|
|
961
|
+
if (O) {
|
|
962
|
+
if (u === O) return -1;
|
|
963
|
+
if (h === O) return 1;
|
|
964
|
+
}
|
|
965
|
+
return a.name.localeCompare(p.name);
|
|
966
|
+
}), i;
|
|
967
|
+
}, _e = async (t) => await ke(l, t), de = (t, r) => {
|
|
931
968
|
if (r.type !== "folder")
|
|
932
969
|
return r.children;
|
|
933
|
-
const n = r.children ??
|
|
934
|
-
return n ||
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
...
|
|
970
|
+
const n = r.children ?? oe.current[t];
|
|
971
|
+
return n || H.current[t] ? n : (T((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
|
|
972
|
+
_e(t).then((a) => {
|
|
973
|
+
he((p) => ({
|
|
974
|
+
...p,
|
|
938
975
|
[t]: a ?? []
|
|
939
976
|
})), i(a ?? []);
|
|
940
977
|
}).catch(() => {
|
|
941
978
|
i([]);
|
|
942
979
|
}).finally(() => {
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
return delete
|
|
980
|
+
T((a) => {
|
|
981
|
+
const p = { ...a };
|
|
982
|
+
return delete p[t], p;
|
|
946
983
|
});
|
|
947
984
|
});
|
|
948
985
|
}));
|
|
949
|
-
},
|
|
950
|
-
r.type === "folder" && (typeof window > "u" ||
|
|
951
|
-
|
|
986
|
+
}, G = (t, r) => {
|
|
987
|
+
r.type === "folder" && (typeof window > "u" || B.current[t] || (B.current[t] = window.setTimeout(() => {
|
|
988
|
+
_((n) => n[t] ? n : { ...n, [t]: !0 }), de(t, r), delete B.current[t];
|
|
952
989
|
}, 600)));
|
|
953
|
-
},
|
|
954
|
-
|
|
955
|
-
|
|
990
|
+
}, z = (t) => (T((r) => ({ ...r, [t]: !0 })), new Promise((r) => {
|
|
991
|
+
_e(t).then((n) => {
|
|
992
|
+
he((i) => ({
|
|
956
993
|
...i,
|
|
957
994
|
[t]: n ?? []
|
|
958
995
|
})), r(n ?? []);
|
|
959
996
|
}).catch(() => {
|
|
960
997
|
r([]);
|
|
961
998
|
}).finally(() => {
|
|
962
|
-
|
|
999
|
+
T((n) => {
|
|
963
1000
|
const i = { ...n };
|
|
964
1001
|
return delete i[t], i;
|
|
965
1002
|
});
|
|
966
1003
|
});
|
|
967
|
-
})),
|
|
968
|
-
|
|
1004
|
+
})), se = (t, r, n) => {
|
|
1005
|
+
_((i) => ({
|
|
969
1006
|
...i,
|
|
970
1007
|
[t]: n
|
|
971
|
-
})), n ?
|
|
1008
|
+
})), n ? de(t, r) : he((i) => {
|
|
972
1009
|
if (i[t] === void 0)
|
|
973
1010
|
return i;
|
|
974
1011
|
const a = { ...i };
|
|
975
1012
|
return delete a[t], a;
|
|
976
1013
|
});
|
|
977
|
-
},
|
|
1014
|
+
}, le = async (t) => {
|
|
978
1015
|
if (!t) return;
|
|
979
|
-
const r =
|
|
1016
|
+
const r = dt(t);
|
|
980
1017
|
if (r.length === 0) return;
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
for (const
|
|
984
|
-
|
|
985
|
-
return
|
|
1018
|
+
_((a) => {
|
|
1019
|
+
const p = { ...a };
|
|
1020
|
+
for (const u of r)
|
|
1021
|
+
p[u] = !0;
|
|
1022
|
+
return p;
|
|
986
1023
|
});
|
|
987
1024
|
let n = [
|
|
988
|
-
{ name:
|
|
1025
|
+
{ name: P, type: "folder" }
|
|
989
1026
|
], i = "";
|
|
990
1027
|
for (const a of r) {
|
|
991
|
-
const
|
|
992
|
-
if (!
|
|
1028
|
+
const p = n == null ? void 0 : n.find((h) => te(h, i) === a);
|
|
1029
|
+
if (!p || p.type !== "folder") {
|
|
993
1030
|
i = a, n = [];
|
|
994
1031
|
continue;
|
|
995
1032
|
}
|
|
996
|
-
n = await
|
|
1033
|
+
n = await de(a, p) ?? oe.current[a], i = a;
|
|
997
1034
|
}
|
|
998
|
-
},
|
|
1035
|
+
}, be = (t, r) => {
|
|
999
1036
|
if (!t || !r || t === r)
|
|
1000
1037
|
return;
|
|
1001
1038
|
const n = t === "/" ? "/" : `${t}/`, i = (a) => a === t ? r : a.startsWith(n) ? r + a.slice(t.length) : null;
|
|
1002
|
-
|
|
1003
|
-
let
|
|
1004
|
-
const
|
|
1005
|
-
for (const
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1039
|
+
_((a) => {
|
|
1040
|
+
let p = !1;
|
|
1041
|
+
const u = { ...a };
|
|
1042
|
+
for (const h of Object.keys(a)) {
|
|
1043
|
+
const O = i(h);
|
|
1044
|
+
O && O !== h && (u[O] = a[h], delete u[h], p = !0);
|
|
1008
1045
|
}
|
|
1009
|
-
return
|
|
1010
|
-
}),
|
|
1011
|
-
let
|
|
1012
|
-
const
|
|
1013
|
-
for (const
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1046
|
+
return p ? u : a;
|
|
1047
|
+
}), he((a) => {
|
|
1048
|
+
let p = !1;
|
|
1049
|
+
const u = { ...a };
|
|
1050
|
+
for (const h of Object.keys(a)) {
|
|
1051
|
+
const O = i(h);
|
|
1052
|
+
O && O !== h && (u[O] = a[h], delete u[h], p = !0);
|
|
1016
1053
|
}
|
|
1017
|
-
return
|
|
1018
|
-
}),
|
|
1019
|
-
},
|
|
1020
|
-
|
|
1021
|
-
},
|
|
1022
|
-
|
|
1023
|
-
},
|
|
1054
|
+
return p ? u : a;
|
|
1055
|
+
}), V((a) => a && (i(a) ?? a)), $((a) => a && (i(a) ?? a));
|
|
1056
|
+
}, me = () => {
|
|
1057
|
+
we(null), q(null), Y();
|
|
1058
|
+
}, ge = (t, r = !0) => {
|
|
1059
|
+
V(t), r && k(t);
|
|
1060
|
+
}, W = gt(() => [{ name: P, type: "folder" }], [P]), [D, re] = ae(null), [d, F] = ae(null), ne = ie(null), Ce = d;
|
|
1024
1061
|
Ot(
|
|
1025
|
-
|
|
1062
|
+
M,
|
|
1026
1063
|
() => ({
|
|
1027
1064
|
focusPath: (t, r = {}) => {
|
|
1028
1065
|
if (!t) return;
|
|
@@ -1031,82 +1068,83 @@ const nr = St(function({
|
|
|
1031
1068
|
domFocus: i = !0,
|
|
1032
1069
|
notify: a = !1
|
|
1033
1070
|
} = r;
|
|
1034
|
-
n &&
|
|
1071
|
+
n && ge(t, a), $(t), i && L(t);
|
|
1035
1072
|
},
|
|
1036
1073
|
selectPath: (t) => {
|
|
1037
|
-
t && (
|
|
1074
|
+
t && (ge(t), $(t), L(t));
|
|
1038
1075
|
},
|
|
1039
|
-
getSelectedPath: () =>
|
|
1040
|
-
expandToPath: async (t) => await
|
|
1041
|
-
refresh: async (t) => await
|
|
1042
|
-
remapPath:
|
|
1076
|
+
getSelectedPath: () => R,
|
|
1077
|
+
expandToPath: async (t) => await le(t),
|
|
1078
|
+
refresh: async (t) => await z(t),
|
|
1079
|
+
remapPath: be,
|
|
1043
1080
|
createFile: async (t) => {
|
|
1044
|
-
await
|
|
1081
|
+
await Oe(t, "file", "untitled.php");
|
|
1045
1082
|
},
|
|
1046
1083
|
createFolder: async (t) => {
|
|
1047
|
-
await
|
|
1084
|
+
await Oe(t, "folder", "New Folder");
|
|
1048
1085
|
}
|
|
1049
1086
|
}),
|
|
1050
|
-
[
|
|
1087
|
+
[R, z, be, le]
|
|
1051
1088
|
);
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1054
|
-
),
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}, [
|
|
1058
|
-
|
|
1059
|
-
}, [
|
|
1060
|
-
if (!
|
|
1089
|
+
const Pe = ie(!1), pe = ie(
|
|
1090
|
+
g ?? null
|
|
1091
|
+
), Ie = ie(g);
|
|
1092
|
+
ue(() => {
|
|
1093
|
+
Ee.current = !1;
|
|
1094
|
+
}, [P]), ue(() => {
|
|
1095
|
+
g && g !== Ie.current ? pe.current = g : g || (pe.current = null), Ie.current = g;
|
|
1096
|
+
}, [g]), ue(() => {
|
|
1097
|
+
if (!g || Pe.current)
|
|
1061
1098
|
return;
|
|
1062
|
-
|
|
1063
|
-
const t =
|
|
1064
|
-
|
|
1099
|
+
Pe.current = !0;
|
|
1100
|
+
const t = dt(g);
|
|
1101
|
+
_((n) => {
|
|
1065
1102
|
const i = { ...n };
|
|
1066
1103
|
for (const a of t)
|
|
1067
1104
|
i[a] = !0;
|
|
1068
1105
|
return i;
|
|
1069
1106
|
});
|
|
1070
|
-
const r = t[t.length - 1] ||
|
|
1071
|
-
|
|
1072
|
-
}, [
|
|
1107
|
+
const r = t[t.length - 1] || g;
|
|
1108
|
+
$(r), V(r), le(g);
|
|
1109
|
+
}, [g, le]), ue(() => {
|
|
1073
1110
|
const t = pe.current;
|
|
1074
|
-
!t ||
|
|
1075
|
-
}, [
|
|
1076
|
-
if (!
|
|
1077
|
-
if (
|
|
1078
|
-
const t =
|
|
1079
|
-
|
|
1111
|
+
!t || W.length === 0 || (pe.current = null, le(t));
|
|
1112
|
+
}, [W, le]), ue(() => {
|
|
1113
|
+
if (!Q) {
|
|
1114
|
+
if (W.length > 0) {
|
|
1115
|
+
const t = te(W[0]);
|
|
1116
|
+
$(t);
|
|
1080
1117
|
}
|
|
1081
1118
|
return;
|
|
1082
1119
|
}
|
|
1083
|
-
|
|
1084
|
-
}, [
|
|
1085
|
-
|
|
1086
|
-
M,
|
|
1087
|
-
L,
|
|
1088
|
-
Se,
|
|
1089
|
-
j
|
|
1090
|
-
]), le(() => {
|
|
1091
|
-
if (B.length === 0)
|
|
1120
|
+
Ce && Ce === Q || L(Q);
|
|
1121
|
+
}, [W, Q, Ce]), ue(() => {
|
|
1122
|
+
if (W.length === 0)
|
|
1092
1123
|
return;
|
|
1093
|
-
const t =
|
|
1094
|
-
if ((t == null ? void 0 : t.type) !== "folder" ||
|
|
1124
|
+
const t = W[0];
|
|
1125
|
+
if ((t == null ? void 0 : t.type) !== "folder" || Ee.current)
|
|
1095
1126
|
return;
|
|
1096
1127
|
const r = t.name;
|
|
1097
|
-
|
|
1128
|
+
Ee.current = !0, _(
|
|
1098
1129
|
(n) => n[r] ? n : { ...n, [r]: !0 }
|
|
1099
|
-
), !
|
|
1100
|
-
}, [
|
|
1101
|
-
|
|
1102
|
-
}, [])
|
|
1103
|
-
|
|
1130
|
+
), !oe.current[r] && !H.current[r] && de(r, t);
|
|
1131
|
+
}, [W, de, P]), ue(() => () => {
|
|
1132
|
+
m.current && clearTimeout(m.current), Y();
|
|
1133
|
+
}, []), ue(() => {
|
|
1134
|
+
D && setTimeout(() => {
|
|
1135
|
+
const t = document.querySelector(
|
|
1136
|
+
'[role="menu"] [role="menuitem"]'
|
|
1137
|
+
);
|
|
1138
|
+
t && typeof t.focus == "function" && t.focus();
|
|
1139
|
+
}, 0);
|
|
1140
|
+
}, [D]);
|
|
1141
|
+
const [Ze, xe] = ae(""), rt = (t, r) => {
|
|
1104
1142
|
if (t.type === "folder")
|
|
1105
1143
|
return r;
|
|
1106
|
-
const n =
|
|
1144
|
+
const n = je(r);
|
|
1107
1145
|
return n && n || "/";
|
|
1108
|
-
},
|
|
1109
|
-
const i =
|
|
1146
|
+
}, Ve = (t, r, n) => {
|
|
1147
|
+
const i = rt(t, r);
|
|
1110
1148
|
if (!i)
|
|
1111
1149
|
return { allowed: !1, state: "invalid", destination: null };
|
|
1112
1150
|
if (n) {
|
|
@@ -1116,319 +1154,323 @@ const nr = St(function({
|
|
|
1116
1154
|
return { allowed: !1, state: "invalid", destination: null };
|
|
1117
1155
|
}
|
|
1118
1156
|
return { allowed: !0, state: "valid", destination: i };
|
|
1119
|
-
},
|
|
1120
|
-
r.type !== "folder" && r.type !== "file" || (
|
|
1157
|
+
}, Le = (t, r, n) => {
|
|
1158
|
+
r.type !== "folder" && r.type !== "file" || (we(n), q(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
|
|
1121
1159
|
"application/x-wp-playground-path",
|
|
1122
1160
|
n
|
|
1123
1161
|
), t.dataTransfer.setData("text/plain", n)));
|
|
1124
|
-
},
|
|
1125
|
-
|
|
1162
|
+
}, nt = () => {
|
|
1163
|
+
me();
|
|
1126
1164
|
}, at = (t, r, n) => {
|
|
1127
|
-
const i =
|
|
1128
|
-
i.allowed && r.type === "folder" &&
|
|
1129
|
-
},
|
|
1130
|
-
const i =
|
|
1131
|
-
i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect =
|
|
1132
|
-
},
|
|
1133
|
-
|
|
1165
|
+
const i = Ve(r, n, fe);
|
|
1166
|
+
i.allowed && r.type === "folder" && G(n, r), q((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state });
|
|
1167
|
+
}, qe = (t, r, n) => {
|
|
1168
|
+
const i = Ve(r, n, fe);
|
|
1169
|
+
i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = fe ? "move" : "copy"), r.type === "folder" && G(n, r), q((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), K(n), q((a) => (a == null ? void 0 : a.path) === n && a.state === "invalid" ? a : { path: n, state: "invalid" }));
|
|
1170
|
+
}, Ke = (t, r, n) => {
|
|
1171
|
+
K(n);
|
|
1134
1172
|
const i = t.relatedTarget;
|
|
1135
|
-
i && t.currentTarget.contains(i) ||
|
|
1136
|
-
},
|
|
1137
|
-
const i =
|
|
1173
|
+
i && t.currentTarget.contains(i) || q((a) => (a == null ? void 0 : a.path) === n ? null : a);
|
|
1174
|
+
}, Ge = async (t, r, n) => {
|
|
1175
|
+
const i = fe, a = Ve(r, n, i);
|
|
1138
1176
|
if (!a.allowed || !a.destination) {
|
|
1139
|
-
|
|
1177
|
+
me();
|
|
1140
1178
|
return;
|
|
1141
1179
|
}
|
|
1142
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1180
|
+
t.preventDefault(), t.stopPropagation(), K(n), q(null);
|
|
1143
1181
|
try {
|
|
1144
|
-
i ? await lt(i, a.destination) : await
|
|
1182
|
+
i ? await lt(i, a.destination) : await Qe(t, a.destination);
|
|
1145
1183
|
} finally {
|
|
1146
|
-
|
|
1184
|
+
me();
|
|
1147
1185
|
}
|
|
1148
|
-
},
|
|
1149
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1186
|
+
}, it = (t, r, n) => {
|
|
1187
|
+
t.preventDefault(), t.stopPropagation(), F(null), re({
|
|
1150
1188
|
absPath: n,
|
|
1151
1189
|
type: r.type,
|
|
1152
1190
|
x: t.clientX,
|
|
1153
1191
|
y: t.clientY
|
|
1154
1192
|
});
|
|
1155
|
-
},
|
|
1193
|
+
}, Se = async (t, r) => {
|
|
1156
1194
|
let n = r, i = 0;
|
|
1157
|
-
const a = (
|
|
1158
|
-
const
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
1161
|
-
for (; await (
|
|
1195
|
+
const a = (u) => {
|
|
1196
|
+
const h = u.lastIndexOf(".");
|
|
1197
|
+
return h > 0 ? { stem: u.slice(0, h), ext: u.slice(h) } : { stem: u, ext: "" };
|
|
1198
|
+
}, p = t === "/" ? "" : t;
|
|
1199
|
+
for (; await (l == null ? void 0 : l.fileExists(`${p}/${n}`)) || await (l == null ? void 0 : l.isDir(`${p}/${n}`)); ) {
|
|
1162
1200
|
i += 1;
|
|
1163
|
-
const { stem:
|
|
1164
|
-
n = `${
|
|
1201
|
+
const { stem: u, ext: h } = a(r);
|
|
1202
|
+
n = `${u} (${i})${h}`;
|
|
1165
1203
|
}
|
|
1166
1204
|
return n;
|
|
1167
|
-
},
|
|
1168
|
-
if (!
|
|
1169
|
-
let i = t ||
|
|
1205
|
+
}, Oe = async (t, r, n) => {
|
|
1206
|
+
if (!l) return;
|
|
1207
|
+
let i = t || R || P;
|
|
1170
1208
|
try {
|
|
1171
|
-
await
|
|
1209
|
+
await l.isDir(i) || (i = je(i));
|
|
1172
1210
|
} catch {
|
|
1173
|
-
i =
|
|
1211
|
+
i = je(i);
|
|
1174
1212
|
}
|
|
1175
|
-
const a = i,
|
|
1176
|
-
r === "folder" ? await
|
|
1177
|
-
|
|
1213
|
+
const a = i, p = await Se(a, n), u = Ne(a, p);
|
|
1214
|
+
r === "folder" ? await l.mkdir(u) : await l.writeFile(u, ""), ne.current = { type: r, tempPath: u }, F(u), await z(a), setTimeout(() => {
|
|
1215
|
+
$(u), L(u);
|
|
1178
1216
|
}, 0);
|
|
1179
|
-
},
|
|
1180
|
-
if (!
|
|
1217
|
+
}, ot = async (t) => {
|
|
1218
|
+
if (!l) return !1;
|
|
1181
1219
|
try {
|
|
1182
|
-
if (await
|
|
1220
|
+
if (await l.fileExists(t))
|
|
1183
1221
|
return !0;
|
|
1184
1222
|
} catch {
|
|
1185
1223
|
}
|
|
1186
1224
|
try {
|
|
1187
|
-
if (await
|
|
1225
|
+
if (await l.isDir(t))
|
|
1188
1226
|
return !0;
|
|
1189
1227
|
} catch {
|
|
1190
1228
|
}
|
|
1191
1229
|
return !1;
|
|
1192
|
-
},
|
|
1193
|
-
if (
|
|
1230
|
+
}, st = async (t) => {
|
|
1231
|
+
if (l)
|
|
1194
1232
|
try {
|
|
1195
|
-
await
|
|
1233
|
+
await l.mkdir(t);
|
|
1196
1234
|
} catch (r) {
|
|
1197
|
-
if (!await
|
|
1235
|
+
if (!await l.isDir(t).catch(() => !1))
|
|
1198
1236
|
throw r;
|
|
1199
1237
|
}
|
|
1200
1238
|
}, lt = async (t, r) => {
|
|
1201
|
-
if (!
|
|
1202
|
-
const n = Mt(t), i =
|
|
1203
|
-
if (i === t || await
|
|
1239
|
+
if (!l) return;
|
|
1240
|
+
const n = Mt(t), i = Ne(r, n);
|
|
1241
|
+
if (i === t || await ot(i))
|
|
1204
1242
|
return;
|
|
1205
|
-
const a =
|
|
1243
|
+
const a = je(t);
|
|
1206
1244
|
try {
|
|
1207
|
-
await
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1245
|
+
await l.mv(t, i), be(t, i);
|
|
1246
|
+
const p = mt(
|
|
1247
|
+
R,
|
|
1210
1248
|
t,
|
|
1211
1249
|
i
|
|
1212
1250
|
);
|
|
1213
|
-
|
|
1214
|
-
(
|
|
1215
|
-
),
|
|
1216
|
-
...
|
|
1251
|
+
R && (R === t || R.startsWith(`${t}/`)) && k(p), $(
|
|
1252
|
+
(u) => mt(u, t, i)
|
|
1253
|
+
), _((u) => ({
|
|
1254
|
+
...u,
|
|
1217
1255
|
[r]: !0
|
|
1218
1256
|
})), await Promise.all([
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
]),
|
|
1222
|
-
(
|
|
1223
|
-
),
|
|
1257
|
+
z(a),
|
|
1258
|
+
z(r)
|
|
1259
|
+
]), V(
|
|
1260
|
+
(u) => mt(u, t, i)
|
|
1261
|
+
), L(i);
|
|
1224
1262
|
} catch {
|
|
1225
1263
|
}
|
|
1226
|
-
},
|
|
1264
|
+
}, ct = (t) => {
|
|
1227
1265
|
const r = t;
|
|
1228
1266
|
return r.webkitGetAsEntry ? r.webkitGetAsEntry() : null;
|
|
1229
|
-
},
|
|
1267
|
+
}, ut = (t) => new Promise((r, n) => {
|
|
1230
1268
|
t.file(r, n);
|
|
1231
|
-
}),
|
|
1232
|
-
if (!
|
|
1233
|
-
const n = t.name || "untitled", i = await
|
|
1234
|
-
await
|
|
1235
|
-
}, Je = async (t, r) => {
|
|
1236
|
-
const n = await ct(t);
|
|
1237
|
-
await Ge(n, r);
|
|
1269
|
+
}), Je = async (t, r) => {
|
|
1270
|
+
if (!l) return;
|
|
1271
|
+
const n = t.name || "untitled", i = await Se(r, n), a = Ne(r, i), p = new Uint8Array(await t.arrayBuffer());
|
|
1272
|
+
await l.writeFile(a, p);
|
|
1238
1273
|
}, Xe = async (t, r) => {
|
|
1239
|
-
const n = await
|
|
1274
|
+
const n = await ut(t);
|
|
1275
|
+
await Je(n, r);
|
|
1276
|
+
}, Fe = async (t, r) => {
|
|
1277
|
+
const n = await Se(
|
|
1240
1278
|
r,
|
|
1241
1279
|
t.name || "New Folder"
|
|
1242
|
-
), i =
|
|
1243
|
-
await
|
|
1244
|
-
const a = t.createReader(),
|
|
1280
|
+
), i = Ne(r, n);
|
|
1281
|
+
await st(i);
|
|
1282
|
+
const a = t.createReader(), p = () => new Promise((u, h) => {
|
|
1245
1283
|
a.readEntries(
|
|
1246
|
-
(
|
|
1247
|
-
|
|
1284
|
+
(O) => u(Array.from(O)),
|
|
1285
|
+
h
|
|
1248
1286
|
);
|
|
1249
1287
|
});
|
|
1250
1288
|
for (; ; ) {
|
|
1251
|
-
const
|
|
1252
|
-
if (!
|
|
1289
|
+
const u = await p();
|
|
1290
|
+
if (!u.length)
|
|
1253
1291
|
break;
|
|
1254
|
-
for (const
|
|
1255
|
-
|
|
1256
|
-
|
|
1292
|
+
for (const h of u)
|
|
1293
|
+
h.isFile ? await Xe(
|
|
1294
|
+
h,
|
|
1257
1295
|
i
|
|
1258
|
-
) :
|
|
1259
|
-
|
|
1296
|
+
) : h.isDirectory && await Fe(
|
|
1297
|
+
h,
|
|
1260
1298
|
i
|
|
1261
1299
|
);
|
|
1262
1300
|
}
|
|
1263
|
-
},
|
|
1264
|
-
var a,
|
|
1265
|
-
if (!
|
|
1266
|
-
const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((
|
|
1301
|
+
}, Qe = async (t, r) => {
|
|
1302
|
+
var a, p;
|
|
1303
|
+
if (!l) return;
|
|
1304
|
+
const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((u) => u.kind === "file").map((u) => ct(u)).filter((u) => !!u);
|
|
1267
1305
|
if (i.length > 0)
|
|
1268
|
-
for (const
|
|
1269
|
-
|
|
1270
|
-
|
|
1306
|
+
for (const u of i)
|
|
1307
|
+
u.isFile ? await Xe(
|
|
1308
|
+
u,
|
|
1271
1309
|
r
|
|
1272
|
-
) :
|
|
1273
|
-
|
|
1310
|
+
) : u.isDirectory && await Fe(
|
|
1311
|
+
u,
|
|
1274
1312
|
r
|
|
1275
1313
|
);
|
|
1276
1314
|
else {
|
|
1277
|
-
const
|
|
1278
|
-
for (const
|
|
1279
|
-
await
|
|
1315
|
+
const u = (p = t.dataTransfer) != null && p.files ? Array.from(t.dataTransfer.files) : [];
|
|
1316
|
+
for (const h of u)
|
|
1317
|
+
await Je(h, r);
|
|
1280
1318
|
}
|
|
1281
|
-
await
|
|
1282
|
-
...
|
|
1319
|
+
await z(r), _((u) => ({
|
|
1320
|
+
...u,
|
|
1283
1321
|
[r]: !0
|
|
1284
1322
|
}));
|
|
1285
|
-
},
|
|
1286
|
-
if (!
|
|
1323
|
+
}, Re = async (t, r) => {
|
|
1324
|
+
if (!l) return;
|
|
1287
1325
|
const n = t;
|
|
1288
|
-
|
|
1326
|
+
re(null);
|
|
1289
1327
|
try {
|
|
1290
|
-
r === "folder" ? await
|
|
1328
|
+
r === "folder" ? await l.rmdir(n, { recursive: !0 }) : await l.unlink(n);
|
|
1291
1329
|
} catch {
|
|
1292
1330
|
} finally {
|
|
1293
|
-
|
|
1294
|
-
const i =
|
|
1295
|
-
await
|
|
1331
|
+
F(null);
|
|
1332
|
+
const i = je(n);
|
|
1333
|
+
await z(i), R && (R === n || R.startsWith(`${n}/`)) && k(null);
|
|
1296
1334
|
}
|
|
1297
|
-
},
|
|
1335
|
+
}, We = (t) => {
|
|
1298
1336
|
var r;
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
a
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1337
|
+
if (!d)
|
|
1338
|
+
if (t.key.length === 1 && t.key.match(/\S/)) {
|
|
1339
|
+
const n = Ze + t.key.toLowerCase();
|
|
1340
|
+
if (xe(n), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
1341
|
+
xe("");
|
|
1342
|
+
}, 1e3), !ee.current)
|
|
1343
|
+
return;
|
|
1344
|
+
const i = Array.from(
|
|
1345
|
+
ee.current.querySelectorAll(".file-node-button")
|
|
1346
|
+
), a = document.activeElement;
|
|
1347
|
+
let p = 0;
|
|
1348
|
+
a && i.includes(a) && (p = i.indexOf(
|
|
1349
|
+
a
|
|
1350
|
+
));
|
|
1351
|
+
for (let u = 0; u < i.length; u++) {
|
|
1352
|
+
const h = (p + u) % i.length, O = i[h];
|
|
1353
|
+
if ((r = O.textContent) != null && r.toLowerCase().trim().startsWith(n)) {
|
|
1354
|
+
O.focus();
|
|
1355
|
+
const ye = O.getAttribute("data-path");
|
|
1356
|
+
ye && $(ye);
|
|
1357
|
+
break;
|
|
1358
|
+
}
|
|
1319
1359
|
}
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
if (!H(m)) {
|
|
1360
|
+
} else
|
|
1361
|
+
xe(""), m.current && clearTimeout(m.current);
|
|
1362
|
+
}, Be = async (t, r) => {
|
|
1363
|
+
const n = ne.current, i = (n == null ? void 0 : n.tempPath) === t, a = je(t), p = (r || "").trim();
|
|
1364
|
+
if (!S(p)) {
|
|
1326
1365
|
if (i) {
|
|
1327
1366
|
try {
|
|
1328
|
-
n.type === "folder" ? await
|
|
1367
|
+
n.type === "folder" ? await l.rmdir(t, {
|
|
1329
1368
|
recursive: !0
|
|
1330
|
-
}) : await
|
|
1369
|
+
}) : await l.unlink(t);
|
|
1331
1370
|
} catch {
|
|
1332
1371
|
}
|
|
1333
|
-
|
|
1372
|
+
ne.current = null;
|
|
1334
1373
|
}
|
|
1335
|
-
|
|
1374
|
+
F(i ? null : t);
|
|
1336
1375
|
return;
|
|
1337
1376
|
}
|
|
1338
|
-
let
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1341
|
-
|
|
1377
|
+
let u = Ne(a, p), h = u;
|
|
1378
|
+
if (h === t) {
|
|
1379
|
+
F(null);
|
|
1380
|
+
const Ae = i && (n == null ? void 0 : n.type) === "file";
|
|
1381
|
+
i && (ne.current = null), setTimeout(() => {
|
|
1382
|
+
$(h), L(h), Ae && C && C(h);
|
|
1342
1383
|
}, 0);
|
|
1343
1384
|
return;
|
|
1344
1385
|
}
|
|
1345
|
-
const
|
|
1346
|
-
if ((
|
|
1386
|
+
const O = await l.fileExists(h), ye = await l.isDir(h);
|
|
1387
|
+
if ((O || ye) && h !== t)
|
|
1347
1388
|
if (i)
|
|
1348
1389
|
try {
|
|
1349
|
-
const
|
|
1390
|
+
const Ae = await Se(
|
|
1350
1391
|
a === "/" ? "/" : a,
|
|
1351
|
-
|
|
1392
|
+
p
|
|
1352
1393
|
);
|
|
1353
|
-
|
|
1394
|
+
u = Ne(a, Ae), h = u;
|
|
1354
1395
|
} catch {
|
|
1355
1396
|
}
|
|
1356
1397
|
else {
|
|
1357
|
-
|
|
1398
|
+
F(t);
|
|
1358
1399
|
return;
|
|
1359
1400
|
}
|
|
1360
|
-
let
|
|
1401
|
+
let He = (n == null ? void 0 : n.type) === "folder";
|
|
1361
1402
|
try {
|
|
1362
|
-
await
|
|
1403
|
+
await l.mv(t, u), n || (He = await l.isDir(u)), He && be(t, h), R === t && k(h), await z(a), $(h), L(h), i && !He && C && C(h);
|
|
1363
1404
|
} catch {
|
|
1364
1405
|
if (i)
|
|
1365
1406
|
try {
|
|
1366
|
-
(n == null ? void 0 : n.type) === "folder" ? await
|
|
1407
|
+
(n == null ? void 0 : n.type) === "folder" ? await l.rmdir(t, {
|
|
1367
1408
|
recursive: !0
|
|
1368
|
-
}) : await
|
|
1409
|
+
}) : await l.unlink(t);
|
|
1369
1410
|
} catch {
|
|
1370
1411
|
}
|
|
1371
1412
|
} finally {
|
|
1372
|
-
|
|
1413
|
+
ne.current = null, F(null);
|
|
1373
1414
|
}
|
|
1374
|
-
},
|
|
1375
|
-
const r =
|
|
1376
|
-
if (!
|
|
1377
|
-
|
|
1415
|
+
}, et = async (t) => {
|
|
1416
|
+
const r = ne.current;
|
|
1417
|
+
if (!l || (r == null ? void 0 : r.tempPath) !== t) {
|
|
1418
|
+
F((i) => i === t ? null : i);
|
|
1378
1419
|
return;
|
|
1379
1420
|
}
|
|
1380
1421
|
try {
|
|
1381
|
-
r.type === "folder" ? await
|
|
1422
|
+
r.type === "folder" ? await l.rmdir(t, { recursive: !0 }) : await l.unlink(t);
|
|
1382
1423
|
} catch {
|
|
1383
1424
|
}
|
|
1384
|
-
|
|
1385
|
-
const n =
|
|
1386
|
-
await
|
|
1425
|
+
ne.current = null, F(null);
|
|
1426
|
+
const n = je(t);
|
|
1427
|
+
await z(n), $(n), L(n);
|
|
1387
1428
|
};
|
|
1388
|
-
return /* @__PURE__ */
|
|
1429
|
+
return /* @__PURE__ */ f.createElement("div", { onKeyDown: We, ref: ee }, /* @__PURE__ */ f.createElement(Dt, { className: X.filePickerTree }, W.map((t, r) => /* @__PURE__ */ f.createElement(
|
|
1389
1430
|
Rt,
|
|
1390
1431
|
{
|
|
1391
1432
|
key: t.name,
|
|
1392
1433
|
node: t,
|
|
1393
1434
|
level: 0,
|
|
1394
1435
|
position: r + 1,
|
|
1395
|
-
setSize:
|
|
1396
|
-
expandedNodePaths:
|
|
1397
|
-
onToggle:
|
|
1398
|
-
selectedNode:
|
|
1399
|
-
focusPath: (n) =>
|
|
1400
|
-
focusedNode:
|
|
1401
|
-
selectPath:
|
|
1402
|
-
generatePath:
|
|
1403
|
-
getChildren:
|
|
1404
|
-
onContextMenu:
|
|
1405
|
-
renamingPath:
|
|
1406
|
-
onRename:
|
|
1407
|
-
onRenameCancel:
|
|
1408
|
-
dropIndicator:
|
|
1409
|
-
onDragStart:
|
|
1410
|
-
onDragEnd:
|
|
1436
|
+
setSize: W.length,
|
|
1437
|
+
expandedNodePaths: I,
|
|
1438
|
+
onToggle: se,
|
|
1439
|
+
selectedNode: R,
|
|
1440
|
+
focusPath: (n) => $(n),
|
|
1441
|
+
focusedNode: Q,
|
|
1442
|
+
selectPath: ge,
|
|
1443
|
+
generatePath: te,
|
|
1444
|
+
getChildren: Te,
|
|
1445
|
+
onContextMenu: it,
|
|
1446
|
+
renamingPath: Ce,
|
|
1447
|
+
onRename: Be,
|
|
1448
|
+
onRenameCancel: et,
|
|
1449
|
+
dropIndicator: ve,
|
|
1450
|
+
onDragStart: Le,
|
|
1451
|
+
onDragEnd: nt,
|
|
1411
1452
|
onDragEnter: at,
|
|
1412
|
-
onDragOver:
|
|
1413
|
-
onDragLeave:
|
|
1414
|
-
onDrop:
|
|
1415
|
-
rootPath:
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1453
|
+
onDragOver: qe,
|
|
1454
|
+
onDragLeave: Ke,
|
|
1455
|
+
onDrop: Ge,
|
|
1456
|
+
rootPath: P,
|
|
1457
|
+
onDoubleClickFile: C
|
|
1458
|
+
}
|
|
1459
|
+
))), D && /* @__PURE__ */ f.createElement(
|
|
1460
|
+
jt,
|
|
1419
1461
|
{
|
|
1420
1462
|
placement: "bottom-start",
|
|
1421
|
-
onClose: () =>
|
|
1463
|
+
onClose: () => re(null),
|
|
1422
1464
|
anchor: {
|
|
1423
1465
|
getBoundingClientRect: () => ({
|
|
1424
|
-
x:
|
|
1425
|
-
y:
|
|
1466
|
+
x: D.x,
|
|
1467
|
+
y: D.y,
|
|
1426
1468
|
width: 0,
|
|
1427
1469
|
height: 0,
|
|
1428
|
-
top:
|
|
1429
|
-
left:
|
|
1430
|
-
right:
|
|
1431
|
-
bottom:
|
|
1470
|
+
top: D.y,
|
|
1471
|
+
left: D.x,
|
|
1472
|
+
right: D.x,
|
|
1473
|
+
bottom: D.y,
|
|
1432
1474
|
toJSON: () => ({})
|
|
1433
1475
|
}),
|
|
1434
1476
|
ownerDocument: document
|
|
@@ -1437,334 +1479,342 @@ const nr = St(function({
|
|
|
1437
1479
|
resize: !1,
|
|
1438
1480
|
focusOnMount: "firstElement"
|
|
1439
1481
|
},
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
|
|
1482
|
+
/* @__PURE__ */ f.createElement(Ft, { role: "menu" }, D.type === "folder" && /* @__PURE__ */ f.createElement(
|
|
1483
|
+
tt,
|
|
1442
1484
|
{
|
|
1443
1485
|
role: "menuitem",
|
|
1444
1486
|
onClick: async () => {
|
|
1445
|
-
|
|
1446
|
-
|
|
1487
|
+
re(null), await Oe(
|
|
1488
|
+
D.absPath,
|
|
1447
1489
|
"file",
|
|
1448
1490
|
"untitled.php"
|
|
1449
1491
|
);
|
|
1450
1492
|
}
|
|
1451
1493
|
},
|
|
1452
1494
|
"Create file"
|
|
1453
|
-
),
|
|
1454
|
-
|
|
1495
|
+
), D.type === "folder" && /* @__PURE__ */ f.createElement(
|
|
1496
|
+
tt,
|
|
1455
1497
|
{
|
|
1456
1498
|
role: "menuitem",
|
|
1457
1499
|
onClick: async () => {
|
|
1458
|
-
|
|
1459
|
-
|
|
1500
|
+
re(null), await Oe(
|
|
1501
|
+
D.absPath,
|
|
1460
1502
|
"folder",
|
|
1461
1503
|
"New Folder"
|
|
1462
1504
|
);
|
|
1463
1505
|
}
|
|
1464
1506
|
},
|
|
1465
1507
|
"Create directory"
|
|
1466
|
-
), /* @__PURE__ */
|
|
1467
|
-
|
|
1508
|
+
), /* @__PURE__ */ f.createElement(
|
|
1509
|
+
tt,
|
|
1468
1510
|
{
|
|
1469
1511
|
role: "menuitem",
|
|
1470
1512
|
onClick: () => {
|
|
1471
|
-
|
|
1513
|
+
re(null), F(D.absPath);
|
|
1472
1514
|
}
|
|
1473
1515
|
},
|
|
1474
1516
|
"Rename"
|
|
1475
|
-
), /* @__PURE__ */
|
|
1476
|
-
|
|
1517
|
+
), /* @__PURE__ */ f.createElement(
|
|
1518
|
+
tt,
|
|
1477
1519
|
{
|
|
1478
1520
|
role: "menuitem",
|
|
1479
|
-
onClick: () =>
|
|
1480
|
-
|
|
1481
|
-
|
|
1521
|
+
onClick: () => Re(
|
|
1522
|
+
D.absPath,
|
|
1523
|
+
D.type
|
|
1482
1524
|
)
|
|
1483
1525
|
},
|
|
1484
1526
|
"Delete"
|
|
1485
1527
|
))
|
|
1486
1528
|
));
|
|
1487
1529
|
}), Rt = ({
|
|
1488
|
-
node:
|
|
1489
|
-
level:
|
|
1490
|
-
position:
|
|
1491
|
-
setSize:
|
|
1492
|
-
expandedNodePaths:
|
|
1493
|
-
onToggle:
|
|
1494
|
-
selectedNode:
|
|
1495
|
-
focusPath:
|
|
1496
|
-
focusedNode:
|
|
1497
|
-
selectPath:
|
|
1498
|
-
generatePath:
|
|
1499
|
-
getChildren:
|
|
1500
|
-
onContextMenu:
|
|
1501
|
-
renamingPath:
|
|
1502
|
-
onRename:
|
|
1503
|
-
onRenameCancel:
|
|
1530
|
+
node: s,
|
|
1531
|
+
level: l,
|
|
1532
|
+
position: E,
|
|
1533
|
+
setSize: g,
|
|
1534
|
+
expandedNodePaths: k,
|
|
1535
|
+
onToggle: C,
|
|
1536
|
+
selectedNode: M,
|
|
1537
|
+
focusPath: P,
|
|
1538
|
+
focusedNode: S,
|
|
1539
|
+
selectPath: I,
|
|
1540
|
+
generatePath: _,
|
|
1541
|
+
getChildren: R,
|
|
1542
|
+
onContextMenu: V,
|
|
1543
|
+
renamingPath: Q,
|
|
1544
|
+
onRename: $,
|
|
1545
|
+
onRenameCancel: Z,
|
|
1504
1546
|
parentPath: he = "",
|
|
1505
|
-
dropIndicator:
|
|
1506
|
-
onDragStart:
|
|
1507
|
-
onDragEnd:
|
|
1547
|
+
dropIndicator: j,
|
|
1548
|
+
onDragStart: T,
|
|
1549
|
+
onDragEnd: fe,
|
|
1508
1550
|
onDragEnter: we,
|
|
1509
|
-
onDragOver:
|
|
1510
|
-
onDragLeave:
|
|
1511
|
-
onDrop:
|
|
1512
|
-
rootPath:
|
|
1551
|
+
onDragOver: ve,
|
|
1552
|
+
onDragLeave: q,
|
|
1553
|
+
onDrop: B,
|
|
1554
|
+
rootPath: Ee,
|
|
1555
|
+
onDoubleClickFile: ee
|
|
1513
1556
|
}) => {
|
|
1514
|
-
const
|
|
1515
|
-
onDragEnter: (
|
|
1516
|
-
onDragOver: (
|
|
1517
|
-
onDragLeave: (
|
|
1518
|
-
onDrop: (
|
|
1519
|
-
},
|
|
1520
|
-
|
|
1521
|
-
var
|
|
1522
|
-
|
|
1523
|
-
var
|
|
1524
|
-
(
|
|
1525
|
-
}) : (
|
|
1526
|
-
}, [
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1529
|
-
},
|
|
1530
|
-
var
|
|
1531
|
-
if (
|
|
1532
|
-
|
|
1557
|
+
const m = _(s, he), H = k[m], oe = Q === m, Y = ie(null), [K, L] = ae(s.name), te = ie(!1), Te = (j == null ? void 0 : j.path) === m, ke = Te && (j == null ? void 0 : j.state) === "valid", _e = Te && (j == null ? void 0 : j.state) === "invalid", de = !oe && m !== Ee, G = ie(null), z = {
|
|
1558
|
+
onDragEnter: (d) => we == null ? void 0 : we(d, s, m),
|
|
1559
|
+
onDragOver: (d) => ve == null ? void 0 : ve(d, s, m),
|
|
1560
|
+
onDragLeave: (d) => q == null ? void 0 : q(d, s, m),
|
|
1561
|
+
onDrop: (d) => B == null ? void 0 : B(d, s, m)
|
|
1562
|
+
}, se = R(s, m) ?? [];
|
|
1563
|
+
ue(() => {
|
|
1564
|
+
var d;
|
|
1565
|
+
oe ? (L(s.name), te.current = !1, typeof window < "u" && requestAnimationFrame ? requestAnimationFrame(() => {
|
|
1566
|
+
var F;
|
|
1567
|
+
(F = Y.current) == null || F.select();
|
|
1568
|
+
}) : (d = Y.current) == null || d.select()) : te.current = !1;
|
|
1569
|
+
}, [oe, s.name]);
|
|
1570
|
+
const le = () => {
|
|
1571
|
+
s.type === "folder" && C(m, s, !H);
|
|
1572
|
+
}, be = (d) => {
|
|
1573
|
+
var F, ne;
|
|
1574
|
+
if (d.key === "ArrowLeft")
|
|
1575
|
+
H ? le() : (F = document.querySelector(
|
|
1533
1576
|
`[data-path="${he}"]`
|
|
1534
|
-
)) == null ||
|
|
1535
|
-
else if (
|
|
1536
|
-
if (
|
|
1537
|
-
if (
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
|
|
1577
|
+
)) == null || F.focus(), d.preventDefault(), d.stopPropagation();
|
|
1578
|
+
else if (d.key === "ArrowRight") {
|
|
1579
|
+
if (H) {
|
|
1580
|
+
if (se != null && se.length) {
|
|
1581
|
+
const Ce = _(
|
|
1582
|
+
se[0],
|
|
1583
|
+
m
|
|
1541
1584
|
);
|
|
1542
|
-
(
|
|
1543
|
-
`[data-path="${
|
|
1544
|
-
)) == null ||
|
|
1585
|
+
(ne = document.querySelector(
|
|
1586
|
+
`[data-path="${Ce}"]`
|
|
1587
|
+
)) == null || ne.focus();
|
|
1545
1588
|
}
|
|
1546
1589
|
} else
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
} else
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1590
|
+
le();
|
|
1591
|
+
d.preventDefault(), d.stopPropagation();
|
|
1592
|
+
} else d.key === " " || d.key === "Space" || d.key === "Spacebar" ? (s.type === "folder" && C(m, s, !H), d.preventDefault()) : d.key === "Enter" && (s.type === "folder" ? C(m, s, !H) : (I(m, !1), P(m), ee ? ee(m) : I(m, !0)), d.preventDefault());
|
|
1593
|
+
}, me = (d) => {
|
|
1594
|
+
V == null || V(d, s, m);
|
|
1595
|
+
}, ge = (d) => {
|
|
1596
|
+
d.preventDefault(), te.current = !0, $ == null || $(m, K.trim());
|
|
1597
|
+
}, W = (d) => {
|
|
1598
|
+
if (d.key === "Escape") {
|
|
1599
|
+
d.preventDefault(), d.stopPropagation(), te.current = !0, Z == null || Z(m);
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
(d.key === "ArrowLeft" || d.key === "ArrowRight" || d.key === "ArrowUp" || d.key === "ArrowDown") && d.stopPropagation();
|
|
1603
|
+
}, D = () => {
|
|
1604
|
+
te.current || Z == null || Z(m), te.current = !1;
|
|
1605
|
+
}, re = () => {
|
|
1606
|
+
if (s.type === "folder") {
|
|
1607
|
+
le(), I(m), P(m);
|
|
1608
|
+
return;
|
|
1557
1609
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
u.preventDefault(), L.current = !0, ee == null || ee(w, Z.trim());
|
|
1562
|
-
}, de = (u) => {
|
|
1563
|
-
if (u.key === "Escape") {
|
|
1564
|
-
u.preventDefault(), u.stopPropagation(), L.current = !0, q == null || q(w);
|
|
1610
|
+
const d = G.current !== null;
|
|
1611
|
+
if (d && G.current && clearTimeout(G.current), G.current = null, d) {
|
|
1612
|
+
ee ? ee(m) : I(m, !0);
|
|
1565
1613
|
return;
|
|
1566
1614
|
}
|
|
1567
|
-
(
|
|
1568
|
-
|
|
1569
|
-
|
|
1615
|
+
I(m, !1), P(m), I(m, !0), G.current = window.setTimeout(() => {
|
|
1616
|
+
G.current = null;
|
|
1617
|
+
}, 300);
|
|
1570
1618
|
};
|
|
1571
|
-
return
|
|
1619
|
+
return ue(() => () => {
|
|
1620
|
+
G.current !== null && typeof window < "u" && clearTimeout(G.current);
|
|
1621
|
+
}, []), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1572
1622
|
At,
|
|
1573
1623
|
{
|
|
1574
|
-
level:
|
|
1575
|
-
positionInSet:
|
|
1576
|
-
setSize:
|
|
1624
|
+
level: l,
|
|
1625
|
+
positionInSet: E,
|
|
1626
|
+
setSize: g
|
|
1577
1627
|
},
|
|
1578
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ f.createElement($t, null, () => /* @__PURE__ */ f.createElement(f.Fragment, null, oe ? /* @__PURE__ */ f.createElement(
|
|
1579
1629
|
"form",
|
|
1580
1630
|
{
|
|
1581
|
-
onSubmit:
|
|
1582
|
-
className:
|
|
1631
|
+
onSubmit: ge,
|
|
1632
|
+
className: yt(
|
|
1583
1633
|
X.fileNodeButton,
|
|
1584
1634
|
X.renaming,
|
|
1585
1635
|
"file-node-button",
|
|
1586
1636
|
{
|
|
1587
|
-
[X.selected]:
|
|
1588
|
-
[X.focused]:
|
|
1589
|
-
[X.dropTarget]:
|
|
1590
|
-
[X.dropTargetInvalid]:
|
|
1637
|
+
[X.selected]: M === m,
|
|
1638
|
+
[X.focused]: S === m,
|
|
1639
|
+
[X.dropTarget]: ke,
|
|
1640
|
+
[X.dropTargetInvalid]: _e
|
|
1591
1641
|
}
|
|
1592
1642
|
),
|
|
1593
|
-
"data-path":
|
|
1594
|
-
onContextMenu:
|
|
1595
|
-
...
|
|
1643
|
+
"data-path": m,
|
|
1644
|
+
onContextMenu: me,
|
|
1645
|
+
...z
|
|
1596
1646
|
},
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
|
|
1647
|
+
/* @__PURE__ */ f.createElement(
|
|
1648
|
+
bt,
|
|
1599
1649
|
{
|
|
1600
|
-
node:
|
|
1601
|
-
isOpen:
|
|
1602
|
-
level:
|
|
1650
|
+
node: s,
|
|
1651
|
+
isOpen: s.type === "folder" && H,
|
|
1652
|
+
level: l,
|
|
1603
1653
|
hideName: !0
|
|
1604
1654
|
}
|
|
1605
1655
|
),
|
|
1606
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ f.createElement(
|
|
1607
1657
|
"input",
|
|
1608
1658
|
{
|
|
1609
|
-
ref:
|
|
1659
|
+
ref: Y,
|
|
1610
1660
|
className: X.renameInput,
|
|
1611
|
-
value:
|
|
1612
|
-
onChange: (
|
|
1613
|
-
onBlur:
|
|
1614
|
-
onFocus: () =>
|
|
1615
|
-
onKeyDown:
|
|
1661
|
+
value: K,
|
|
1662
|
+
onChange: (d) => L(d.target.value),
|
|
1663
|
+
onBlur: D,
|
|
1664
|
+
onFocus: () => P(m),
|
|
1665
|
+
onKeyDown: W
|
|
1616
1666
|
}
|
|
1617
1667
|
)
|
|
1618
|
-
) : /* @__PURE__ */
|
|
1619
|
-
|
|
1668
|
+
) : /* @__PURE__ */ f.createElement(
|
|
1669
|
+
pt,
|
|
1620
1670
|
{
|
|
1621
|
-
...
|
|
1622
|
-
draggable:
|
|
1623
|
-
onDragStart: (
|
|
1624
|
-
onDragEnd: (
|
|
1625
|
-
onClick:
|
|
1626
|
-
|
|
1627
|
-
},
|
|
1628
|
-
onKeyDown: ae,
|
|
1671
|
+
...z,
|
|
1672
|
+
draggable: de,
|
|
1673
|
+
onDragStart: (d) => T == null ? void 0 : T(d, s, m),
|
|
1674
|
+
onDragEnd: (d) => fe == null ? void 0 : fe(d, s, m),
|
|
1675
|
+
onClick: re,
|
|
1676
|
+
onKeyDown: be,
|
|
1629
1677
|
onFocus: () => {
|
|
1630
|
-
|
|
1678
|
+
P(m);
|
|
1631
1679
|
},
|
|
1632
|
-
onContextMenu:
|
|
1633
|
-
className:
|
|
1680
|
+
onContextMenu: me,
|
|
1681
|
+
className: yt(
|
|
1634
1682
|
X.fileNodeButton,
|
|
1683
|
+
"file-node-button",
|
|
1635
1684
|
{
|
|
1636
|
-
[X.selected]:
|
|
1637
|
-
[X.focused]:
|
|
1638
|
-
[X.dropTarget]:
|
|
1639
|
-
[X.dropTargetInvalid]:
|
|
1685
|
+
[X.selected]: M === m,
|
|
1686
|
+
[X.focused]: S === m,
|
|
1687
|
+
[X.dropTarget]: ke,
|
|
1688
|
+
[X.dropTargetInvalid]: _e
|
|
1640
1689
|
}
|
|
1641
1690
|
),
|
|
1642
|
-
"data-path":
|
|
1643
|
-
"data-expanded":
|
|
1691
|
+
"data-path": m,
|
|
1692
|
+
"data-expanded": H ? "true" : "false"
|
|
1644
1693
|
},
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
|
|
1694
|
+
/* @__PURE__ */ f.createElement(
|
|
1695
|
+
bt,
|
|
1647
1696
|
{
|
|
1648
|
-
node:
|
|
1649
|
-
isOpen:
|
|
1650
|
-
level:
|
|
1697
|
+
node: s,
|
|
1698
|
+
isOpen: s.type === "folder" && H,
|
|
1699
|
+
level: l
|
|
1651
1700
|
}
|
|
1652
1701
|
)
|
|
1653
1702
|
)))
|
|
1654
|
-
),
|
|
1703
|
+
), H && se && se.map((d, F) => /* @__PURE__ */ f.createElement(
|
|
1655
1704
|
Rt,
|
|
1656
1705
|
{
|
|
1657
|
-
key:
|
|
1658
|
-
node:
|
|
1659
|
-
level:
|
|
1660
|
-
position:
|
|
1661
|
-
setSize:
|
|
1662
|
-
expandedNodePaths:
|
|
1663
|
-
onToggle:
|
|
1664
|
-
selectedNode:
|
|
1665
|
-
focusPath:
|
|
1666
|
-
focusedNode:
|
|
1667
|
-
selectPath:
|
|
1668
|
-
generatePath:
|
|
1669
|
-
getChildren:
|
|
1670
|
-
onContextMenu:
|
|
1671
|
-
renamingPath:
|
|
1672
|
-
onRename:
|
|
1673
|
-
onRenameCancel:
|
|
1674
|
-
parentPath:
|
|
1675
|
-
dropIndicator:
|
|
1676
|
-
onDragStart:
|
|
1677
|
-
onDragEnd:
|
|
1706
|
+
key: d.name,
|
|
1707
|
+
node: d,
|
|
1708
|
+
level: l + 1,
|
|
1709
|
+
position: F + 1,
|
|
1710
|
+
setSize: se.length,
|
|
1711
|
+
expandedNodePaths: k,
|
|
1712
|
+
onToggle: C,
|
|
1713
|
+
selectedNode: M,
|
|
1714
|
+
focusPath: P,
|
|
1715
|
+
focusedNode: S,
|
|
1716
|
+
selectPath: I,
|
|
1717
|
+
generatePath: _,
|
|
1718
|
+
getChildren: R,
|
|
1719
|
+
onContextMenu: V,
|
|
1720
|
+
renamingPath: Q,
|
|
1721
|
+
onRename: $,
|
|
1722
|
+
onRenameCancel: Z,
|
|
1723
|
+
parentPath: m,
|
|
1724
|
+
dropIndicator: j,
|
|
1725
|
+
onDragStart: T,
|
|
1726
|
+
onDragEnd: fe,
|
|
1678
1727
|
onDragEnter: we,
|
|
1679
|
-
onDragOver:
|
|
1680
|
-
onDragLeave:
|
|
1681
|
-
onDrop:
|
|
1682
|
-
rootPath:
|
|
1728
|
+
onDragOver: ve,
|
|
1729
|
+
onDragLeave: q,
|
|
1730
|
+
onDrop: B,
|
|
1731
|
+
rootPath: Ee,
|
|
1732
|
+
onDoubleClickFile: ee
|
|
1683
1733
|
}
|
|
1684
1734
|
)));
|
|
1685
|
-
},
|
|
1686
|
-
const
|
|
1687
|
-
for (let
|
|
1688
|
-
|
|
1689
|
-
return /* @__PURE__ */
|
|
1735
|
+
}, bt = ({ node: s, level: l, isOpen: E, hideName: g = !1 }) => {
|
|
1736
|
+
const k = [];
|
|
1737
|
+
for (let C = 0; C < l; C++)
|
|
1738
|
+
k.push(" ");
|
|
1739
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1690
1740
|
"span",
|
|
1691
1741
|
{
|
|
1692
1742
|
"aria-hidden": "true",
|
|
1693
|
-
dangerouslySetInnerHTML: { __html:
|
|
1743
|
+
dangerouslySetInnerHTML: { __html: k.join("") }
|
|
1694
1744
|
}
|
|
1695
|
-
),
|
|
1696
|
-
}, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37",
|
|
1745
|
+
), s.type === "folder" ? /* @__PURE__ */ f.createElement(vt, { width: 16, icon: E ? zt : Ut }) : /* @__PURE__ */ f.createElement("div", { style: { width: 16 } }, " "), /* @__PURE__ */ f.createElement(vt, { width: 16, icon: s.type === "folder" ? Wt : Bt }), !g && /* @__PURE__ */ f.createElement("span", { className: X.fileName }, s.name));
|
|
1746
|
+
}, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37", sr = "_modal_kp9d9_43", lr = "_modal-footer_kp9d9_48", Me = {
|
|
1697
1747
|
control: ar,
|
|
1698
1748
|
browseLabel: ir,
|
|
1699
1749
|
pathPreview: or,
|
|
1700
|
-
modal:
|
|
1701
|
-
modalFooter:
|
|
1750
|
+
modal: sr,
|
|
1751
|
+
modalFooter: lr
|
|
1702
1752
|
};
|
|
1703
|
-
function cr({ path:
|
|
1704
|
-
if (!
|
|
1705
|
-
return /* @__PURE__ */
|
|
1706
|
-
const
|
|
1707
|
-
let
|
|
1708
|
-
|
|
1709
|
-
const
|
|
1753
|
+
function cr({ path: s }) {
|
|
1754
|
+
if (!s)
|
|
1755
|
+
return /* @__PURE__ */ f.createElement("div", { className: Me.pathPreview }, /* @__PURE__ */ f.createElement("i", null, "Select a path"));
|
|
1756
|
+
const l = s.split("/");
|
|
1757
|
+
let E = (l.length > 2 ? "/" : "") + l.pop();
|
|
1758
|
+
E.length > 10 && (E = E.substring(E.length - 10));
|
|
1759
|
+
const g = s.substring(
|
|
1710
1760
|
0,
|
|
1711
|
-
|
|
1761
|
+
s.length - E.length
|
|
1712
1762
|
);
|
|
1713
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ f.createElement(
|
|
1714
1764
|
"div",
|
|
1715
1765
|
{
|
|
1716
|
-
className:
|
|
1717
|
-
"data-content-start":
|
|
1718
|
-
"data-content-end":
|
|
1766
|
+
className: Me.pathPreview,
|
|
1767
|
+
"data-content-start": g,
|
|
1768
|
+
"data-content-end": E
|
|
1719
1769
|
}
|
|
1720
1770
|
);
|
|
1721
1771
|
}
|
|
1722
|
-
function
|
|
1723
|
-
value:
|
|
1724
|
-
onChange:
|
|
1725
|
-
filesystem:
|
|
1772
|
+
function Cr({
|
|
1773
|
+
value: s = "",
|
|
1774
|
+
onChange: l,
|
|
1775
|
+
filesystem: E
|
|
1726
1776
|
}) {
|
|
1727
|
-
const [
|
|
1728
|
-
|
|
1777
|
+
const [g, k] = ae(!1), C = () => k(!0), M = () => k(!1), [P, S] = ae(
|
|
1778
|
+
s || null
|
|
1729
1779
|
);
|
|
1730
|
-
function
|
|
1731
|
-
|
|
1780
|
+
function I(_) {
|
|
1781
|
+
_ == null || _.preventDefault(), l(P || ""), M();
|
|
1732
1782
|
}
|
|
1733
|
-
return /* @__PURE__ */
|
|
1734
|
-
|
|
1783
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1784
|
+
pt,
|
|
1735
1785
|
{
|
|
1736
1786
|
variant: "tertiary",
|
|
1737
|
-
className:
|
|
1738
|
-
onClick:
|
|
1787
|
+
className: Me.control,
|
|
1788
|
+
onClick: C
|
|
1739
1789
|
},
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
),
|
|
1790
|
+
/* @__PURE__ */ f.createElement("span", { className: Me.browseLabel }, "Browse"),
|
|
1791
|
+
/* @__PURE__ */ f.createElement(cr, { path: s || "" })
|
|
1792
|
+
), g && /* @__PURE__ */ f.createElement(
|
|
1743
1793
|
Nt,
|
|
1744
1794
|
{
|
|
1745
1795
|
title: "Select a path ",
|
|
1746
|
-
onRequestClose:
|
|
1747
|
-
className:
|
|
1796
|
+
onRequestClose: M,
|
|
1797
|
+
className: Me.modal
|
|
1748
1798
|
},
|
|
1749
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ f.createElement("form", { onSubmit: I }, /* @__PURE__ */ f.createElement(
|
|
1750
1800
|
nr,
|
|
1751
1801
|
{
|
|
1752
|
-
filesystem:
|
|
1753
|
-
initialSelectedPath:
|
|
1754
|
-
onSelect:
|
|
1802
|
+
filesystem: E,
|
|
1803
|
+
initialSelectedPath: s,
|
|
1804
|
+
onSelect: S
|
|
1755
1805
|
}
|
|
1756
|
-
), /* @__PURE__ */
|
|
1806
|
+
), /* @__PURE__ */ f.createElement("div", { className: Me.modalFooter }, /* @__PURE__ */ f.createElement(pt, { type: "submit", variant: "primary" }, "Select Path")))
|
|
1757
1807
|
));
|
|
1758
1808
|
}
|
|
1759
1809
|
export {
|
|
1760
|
-
|
|
1761
|
-
|
|
1810
|
+
vr as ClockIcon,
|
|
1811
|
+
Cr as FilePickerControl,
|
|
1762
1812
|
nr as FilePickerTree,
|
|
1763
1813
|
br as SiteManagerIcon,
|
|
1764
|
-
|
|
1814
|
+
yr as WordPressIcon,
|
|
1765
1815
|
Bt as file,
|
|
1766
|
-
|
|
1767
|
-
|
|
1816
|
+
Wt as folder,
|
|
1817
|
+
_r as getLogoDataURL,
|
|
1768
1818
|
Er as layout,
|
|
1769
1819
|
wr as playgroundLogo,
|
|
1770
1820
|
gr as temporaryStorage
|