@wp-playground/components 3.0.14 → 3.0.17
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 +945 -904
- 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.
|
|
@@ -817,40 +841,31 @@ const _t = (l) => Ht("path", l), ht = bt(
|
|
|
817
841
|
*
|
|
818
842
|
* @return {JSX.Element} Stop component
|
|
819
843
|
*/
|
|
820
|
-
({
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
}, h) => {
|
|
825
|
-
const x = {
|
|
826
|
-
...C,
|
|
827
|
-
className: It(l, {
|
|
828
|
-
"is-pressed": s
|
|
829
|
-
}) || void 0,
|
|
844
|
+
({ className: s, isPressed: l, ...E }, g) => {
|
|
845
|
+
const k = {
|
|
846
|
+
...E,
|
|
847
|
+
className: Lt(s, { "is-pressed": l }) || void 0,
|
|
830
848
|
"aria-hidden": !0,
|
|
831
849
|
focusable: !1
|
|
832
850
|
};
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
...x,
|
|
835
|
-
ref: h
|
|
836
|
-
});
|
|
851
|
+
return /* @__PURE__ */ Ue.jsx("svg", { ...k, ref: g });
|
|
837
852
|
}
|
|
838
853
|
);
|
|
839
|
-
|
|
840
|
-
const
|
|
854
|
+
wt.displayName = "SVG";
|
|
855
|
+
const zt = /* @__PURE__ */ Ue.jsx(wt, {
|
|
841
856
|
viewBox: "0 0 24 24",
|
|
842
857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
843
|
-
children: /* @__PURE__ */
|
|
858
|
+
children: /* @__PURE__ */ Ue.jsx(xt, {
|
|
844
859
|
d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
|
|
845
860
|
})
|
|
846
|
-
}),
|
|
861
|
+
}), Ut = /* @__PURE__ */ Ue.jsx(wt, {
|
|
847
862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
848
863
|
viewBox: "0 0 24 24",
|
|
849
|
-
children: /* @__PURE__ */
|
|
864
|
+
children: /* @__PURE__ */ Ue.jsx(xt, {
|
|
850
865
|
d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
|
|
851
866
|
})
|
|
852
|
-
}),
|
|
853
|
-
filePickerTree:
|
|
867
|
+
}), 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 = {
|
|
868
|
+
filePickerTree: Zt,
|
|
854
869
|
fileNodeButton: qt,
|
|
855
870
|
selected: Kt,
|
|
856
871
|
focused: Gt,
|
|
@@ -860,169 +875,182 @@ const Yt = /* @__PURE__ */ We.jsx(ht, {
|
|
|
860
875
|
renameInput: er,
|
|
861
876
|
fileName: tr
|
|
862
877
|
};
|
|
863
|
-
function
|
|
864
|
-
if (!
|
|
865
|
-
const
|
|
866
|
-
let
|
|
867
|
-
|
|
868
|
-
for (const
|
|
869
|
-
!
|
|
870
|
-
return
|
|
878
|
+
function dt(s) {
|
|
879
|
+
if (!s) return [];
|
|
880
|
+
const l = s.replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/").replace(/\/$/, "") || s, E = l.startsWith("/"), g = l.split("/").filter(Boolean), k = [];
|
|
881
|
+
let C = E ? "/" : "";
|
|
882
|
+
E && k.push("/");
|
|
883
|
+
for (const M of g)
|
|
884
|
+
!C || C === "/" ? C = C === "/" ? `/${M}` : M : C = `${C}/${M}`, k.push(C);
|
|
885
|
+
return k;
|
|
871
886
|
}
|
|
872
|
-
function rr(
|
|
873
|
-
if (!
|
|
874
|
-
const
|
|
875
|
-
return
|
|
887
|
+
function rr(s, l) {
|
|
888
|
+
if (!s || !l || s === l) return !1;
|
|
889
|
+
const E = s === "/" ? "/" : s.replace(/\/{2,}/g, "/"), g = l.replace(/\/{2,}/g, "/");
|
|
890
|
+
return E === "/" ? g.startsWith("/") && g !== "/" : g.startsWith(`${E}/`);
|
|
876
891
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
892
|
+
function mt(s, l, E) {
|
|
893
|
+
return s && (s === l ? E : s.startsWith(l === "/" ? "/" : `${l}/`) ? E + s.slice(l.length) : s);
|
|
879
894
|
}
|
|
880
895
|
const nr = St(function({
|
|
881
|
-
filesystem:
|
|
882
|
-
root:
|
|
883
|
-
initialSelectedPath:
|
|
884
|
-
onSelect:
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
896
|
+
filesystem: l,
|
|
897
|
+
root: E = "/wordpress",
|
|
898
|
+
initialSelectedPath: g,
|
|
899
|
+
onSelect: k = () => {
|
|
900
|
+
},
|
|
901
|
+
onDoubleClickFile: C
|
|
902
|
+
}, M) {
|
|
903
|
+
const P = gt(() => {
|
|
904
|
+
let t = (E || "/").replace(/\\+/g, "/");
|
|
889
905
|
return t.startsWith("/") || (t = `/${t}`), t = t.replace(/\/{2,}/g, "/"), t.length > 1 && t.endsWith("/") && (t = t.slice(0, -1)), t || "/";
|
|
890
|
-
}, [
|
|
891
|
-
if (!
|
|
906
|
+
}, [E]), S = (t) => !t || t === "." || t === ".." ? !1 : !/[\\/]/.test(t), [I, _] = ae(() => {
|
|
907
|
+
if (!g)
|
|
892
908
|
return {};
|
|
893
909
|
const t = {};
|
|
894
|
-
for (const r of
|
|
910
|
+
for (const r of dt(g))
|
|
895
911
|
t[r] = !0;
|
|
896
912
|
return t;
|
|
897
|
-
}), [
|
|
898
|
-
() =>
|
|
899
|
-
), [
|
|
900
|
-
() =>
|
|
901
|
-
), [
|
|
913
|
+
}), [R, V] = ae(
|
|
914
|
+
() => g ?? null
|
|
915
|
+
), [Q, $] = ae(
|
|
916
|
+
() => g ?? null
|
|
917
|
+
), [Z, he] = ae({}), [j, T] = ae(
|
|
902
918
|
{}
|
|
903
|
-
), [
|
|
919
|
+
), [fe, we] = ae(null), [ve, q] = ae(
|
|
904
920
|
null
|
|
905
|
-
),
|
|
906
|
-
for (const t of Object.keys(
|
|
907
|
-
clearTimeout(
|
|
908
|
-
},
|
|
909
|
-
const r =
|
|
910
|
-
r && (clearTimeout(r), delete
|
|
921
|
+
), B = ie({}), Ee = ie(!1), ee = ie(null), m = ie(null), H = ie(j), oe = ie(Z), Y = () => {
|
|
922
|
+
for (const t of Object.keys(B.current))
|
|
923
|
+
clearTimeout(B.current[t]), delete B.current[t];
|
|
924
|
+
}, K = (t) => {
|
|
925
|
+
const r = B.current[t];
|
|
926
|
+
r && (clearTimeout(r), delete B.current[t]);
|
|
911
927
|
};
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}, [
|
|
915
|
-
|
|
916
|
-
}, [
|
|
917
|
-
const
|
|
928
|
+
ue(() => {
|
|
929
|
+
H.current = j;
|
|
930
|
+
}, [j]), ue(() => {
|
|
931
|
+
oe.current = Z;
|
|
932
|
+
}, [Z]);
|
|
933
|
+
const L = (t) => {
|
|
918
934
|
var n;
|
|
919
|
-
const r = (n =
|
|
935
|
+
const r = (n = ee.current) == null ? void 0 : n.querySelector(
|
|
920
936
|
`[data-path="${t}"]`
|
|
921
937
|
);
|
|
922
|
-
r && typeof r.focus == "function" && r.focus()
|
|
923
|
-
|
|
938
|
+
r && typeof r.focus == "function" && (r.focus(), r.scrollIntoView({
|
|
939
|
+
behavior: "smooth",
|
|
940
|
+
block: "nearest"
|
|
941
|
+
}));
|
|
942
|
+
}, 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
943
|
const n = await t.listFiles(r), i = [];
|
|
925
944
|
for (const a of n) {
|
|
926
|
-
const
|
|
927
|
-
i.push({ name: a, type:
|
|
928
|
-
}
|
|
929
|
-
return i.sort((a,
|
|
930
|
-
|
|
945
|
+
const p = r === "/" ? `/${a}` : `${r}/${a}`, u = await t.isDir(p);
|
|
946
|
+
i.push({ name: a, type: u ? "folder" : "file" });
|
|
947
|
+
}
|
|
948
|
+
return i.sort((a, p) => {
|
|
949
|
+
var ye;
|
|
950
|
+
if (a.type !== p.type) return a.type === "folder" ? -1 : 1;
|
|
951
|
+
const u = r === "/" ? `/${a.name}` : `${r}/${a.name}`, h = r === "/" ? `/${p.name}` : `${r}/${p.name}`, O = (ye = ne.current) == null ? void 0 : ye.tempPath;
|
|
952
|
+
if (O) {
|
|
953
|
+
if (u === O) return -1;
|
|
954
|
+
if (h === O) return 1;
|
|
955
|
+
}
|
|
956
|
+
return a.name.localeCompare(p.name);
|
|
957
|
+
}), i;
|
|
958
|
+
}, _e = async (t) => await ke(l, t), de = (t, r) => {
|
|
931
959
|
if (r.type !== "folder")
|
|
932
960
|
return r.children;
|
|
933
|
-
const n = r.children ??
|
|
934
|
-
return n ||
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
...
|
|
961
|
+
const n = r.children ?? oe.current[t];
|
|
962
|
+
return n || H.current[t] ? n : (T((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
|
|
963
|
+
_e(t).then((a) => {
|
|
964
|
+
he((p) => ({
|
|
965
|
+
...p,
|
|
938
966
|
[t]: a ?? []
|
|
939
967
|
})), i(a ?? []);
|
|
940
968
|
}).catch(() => {
|
|
941
969
|
i([]);
|
|
942
970
|
}).finally(() => {
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
return delete
|
|
971
|
+
T((a) => {
|
|
972
|
+
const p = { ...a };
|
|
973
|
+
return delete p[t], p;
|
|
946
974
|
});
|
|
947
975
|
});
|
|
948
976
|
}));
|
|
949
|
-
},
|
|
950
|
-
r.type === "folder" && (typeof window > "u" ||
|
|
951
|
-
|
|
977
|
+
}, G = (t, r) => {
|
|
978
|
+
r.type === "folder" && (typeof window > "u" || B.current[t] || (B.current[t] = window.setTimeout(() => {
|
|
979
|
+
_((n) => n[t] ? n : { ...n, [t]: !0 }), de(t, r), delete B.current[t];
|
|
952
980
|
}, 600)));
|
|
953
|
-
},
|
|
954
|
-
|
|
955
|
-
|
|
981
|
+
}, z = (t) => (T((r) => ({ ...r, [t]: !0 })), new Promise((r) => {
|
|
982
|
+
_e(t).then((n) => {
|
|
983
|
+
he((i) => ({
|
|
956
984
|
...i,
|
|
957
985
|
[t]: n ?? []
|
|
958
986
|
})), r(n ?? []);
|
|
959
987
|
}).catch(() => {
|
|
960
988
|
r([]);
|
|
961
989
|
}).finally(() => {
|
|
962
|
-
|
|
990
|
+
T((n) => {
|
|
963
991
|
const i = { ...n };
|
|
964
992
|
return delete i[t], i;
|
|
965
993
|
});
|
|
966
994
|
});
|
|
967
|
-
})),
|
|
968
|
-
|
|
995
|
+
})), se = (t, r, n) => {
|
|
996
|
+
_((i) => ({
|
|
969
997
|
...i,
|
|
970
998
|
[t]: n
|
|
971
|
-
})), n ?
|
|
999
|
+
})), n ? de(t, r) : he((i) => {
|
|
972
1000
|
if (i[t] === void 0)
|
|
973
1001
|
return i;
|
|
974
1002
|
const a = { ...i };
|
|
975
1003
|
return delete a[t], a;
|
|
976
1004
|
});
|
|
977
|
-
},
|
|
1005
|
+
}, le = async (t) => {
|
|
978
1006
|
if (!t) return;
|
|
979
|
-
const r =
|
|
1007
|
+
const r = dt(t);
|
|
980
1008
|
if (r.length === 0) return;
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
for (const
|
|
984
|
-
|
|
985
|
-
return
|
|
1009
|
+
_((a) => {
|
|
1010
|
+
const p = { ...a };
|
|
1011
|
+
for (const u of r)
|
|
1012
|
+
p[u] = !0;
|
|
1013
|
+
return p;
|
|
986
1014
|
});
|
|
987
1015
|
let n = [
|
|
988
|
-
{ name:
|
|
1016
|
+
{ name: P, type: "folder" }
|
|
989
1017
|
], i = "";
|
|
990
1018
|
for (const a of r) {
|
|
991
|
-
const
|
|
992
|
-
if (!
|
|
1019
|
+
const p = n == null ? void 0 : n.find((h) => te(h, i) === a);
|
|
1020
|
+
if (!p || p.type !== "folder") {
|
|
993
1021
|
i = a, n = [];
|
|
994
1022
|
continue;
|
|
995
1023
|
}
|
|
996
|
-
n = await
|
|
1024
|
+
n = await de(a, p) ?? oe.current[a], i = a;
|
|
997
1025
|
}
|
|
998
|
-
},
|
|
1026
|
+
}, be = (t, r) => {
|
|
999
1027
|
if (!t || !r || t === r)
|
|
1000
1028
|
return;
|
|
1001
1029
|
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
|
-
|
|
1030
|
+
_((a) => {
|
|
1031
|
+
let p = !1;
|
|
1032
|
+
const u = { ...a };
|
|
1033
|
+
for (const h of Object.keys(a)) {
|
|
1034
|
+
const O = i(h);
|
|
1035
|
+
O && O !== h && (u[O] = a[h], delete u[h], p = !0);
|
|
1008
1036
|
}
|
|
1009
|
-
return
|
|
1010
|
-
}),
|
|
1011
|
-
let
|
|
1012
|
-
const
|
|
1013
|
-
for (const
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1037
|
+
return p ? u : a;
|
|
1038
|
+
}), he((a) => {
|
|
1039
|
+
let p = !1;
|
|
1040
|
+
const u = { ...a };
|
|
1041
|
+
for (const h of Object.keys(a)) {
|
|
1042
|
+
const O = i(h);
|
|
1043
|
+
O && O !== h && (u[O] = a[h], delete u[h], p = !0);
|
|
1016
1044
|
}
|
|
1017
|
-
return
|
|
1018
|
-
}),
|
|
1019
|
-
},
|
|
1020
|
-
|
|
1021
|
-
},
|
|
1022
|
-
|
|
1023
|
-
},
|
|
1045
|
+
return p ? u : a;
|
|
1046
|
+
}), V((a) => a && (i(a) ?? a)), $((a) => a && (i(a) ?? a));
|
|
1047
|
+
}, me = () => {
|
|
1048
|
+
we(null), q(null), Y();
|
|
1049
|
+
}, ge = (t, r = !0) => {
|
|
1050
|
+
V(t), r && k(t);
|
|
1051
|
+
}, W = gt(() => [{ name: P, type: "folder" }], [P]), [D, re] = ae(null), [d, F] = ae(null), ne = ie(null), Ce = d;
|
|
1024
1052
|
Ot(
|
|
1025
|
-
|
|
1053
|
+
M,
|
|
1026
1054
|
() => ({
|
|
1027
1055
|
focusPath: (t, r = {}) => {
|
|
1028
1056
|
if (!t) return;
|
|
@@ -1031,82 +1059,83 @@ const nr = St(function({
|
|
|
1031
1059
|
domFocus: i = !0,
|
|
1032
1060
|
notify: a = !1
|
|
1033
1061
|
} = r;
|
|
1034
|
-
n &&
|
|
1062
|
+
n && ge(t, a), $(t), i && L(t);
|
|
1035
1063
|
},
|
|
1036
1064
|
selectPath: (t) => {
|
|
1037
|
-
t && (
|
|
1065
|
+
t && (ge(t), $(t), L(t));
|
|
1038
1066
|
},
|
|
1039
|
-
getSelectedPath: () =>
|
|
1040
|
-
expandToPath: async (t) => await
|
|
1041
|
-
refresh: async (t) => await
|
|
1042
|
-
remapPath:
|
|
1067
|
+
getSelectedPath: () => R,
|
|
1068
|
+
expandToPath: async (t) => await le(t),
|
|
1069
|
+
refresh: async (t) => await z(t),
|
|
1070
|
+
remapPath: be,
|
|
1043
1071
|
createFile: async (t) => {
|
|
1044
|
-
await
|
|
1072
|
+
await Oe(t, "file", "untitled.php");
|
|
1045
1073
|
},
|
|
1046
1074
|
createFolder: async (t) => {
|
|
1047
|
-
await
|
|
1075
|
+
await Oe(t, "folder", "New Folder");
|
|
1048
1076
|
}
|
|
1049
1077
|
}),
|
|
1050
|
-
[
|
|
1078
|
+
[R, z, be, le]
|
|
1051
1079
|
);
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1054
|
-
),
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}, [
|
|
1058
|
-
|
|
1059
|
-
}, [
|
|
1060
|
-
if (!
|
|
1080
|
+
const Pe = ie(!1), pe = ie(
|
|
1081
|
+
g ?? null
|
|
1082
|
+
), Ie = ie(g);
|
|
1083
|
+
ue(() => {
|
|
1084
|
+
Ee.current = !1;
|
|
1085
|
+
}, [P]), ue(() => {
|
|
1086
|
+
g && g !== Ie.current ? pe.current = g : g || (pe.current = null), Ie.current = g;
|
|
1087
|
+
}, [g]), ue(() => {
|
|
1088
|
+
if (!g || Pe.current)
|
|
1061
1089
|
return;
|
|
1062
|
-
|
|
1063
|
-
const t =
|
|
1064
|
-
|
|
1090
|
+
Pe.current = !0;
|
|
1091
|
+
const t = dt(g);
|
|
1092
|
+
_((n) => {
|
|
1065
1093
|
const i = { ...n };
|
|
1066
1094
|
for (const a of t)
|
|
1067
1095
|
i[a] = !0;
|
|
1068
1096
|
return i;
|
|
1069
1097
|
});
|
|
1070
|
-
const r = t[t.length - 1] ||
|
|
1071
|
-
|
|
1072
|
-
}, [
|
|
1098
|
+
const r = t[t.length - 1] || g;
|
|
1099
|
+
$(r), V(r), le(g);
|
|
1100
|
+
}, [g, le]), ue(() => {
|
|
1073
1101
|
const t = pe.current;
|
|
1074
|
-
!t ||
|
|
1075
|
-
}, [
|
|
1076
|
-
if (!
|
|
1077
|
-
if (
|
|
1078
|
-
const t =
|
|
1079
|
-
|
|
1102
|
+
!t || W.length === 0 || (pe.current = null, le(t));
|
|
1103
|
+
}, [W, le]), ue(() => {
|
|
1104
|
+
if (!Q) {
|
|
1105
|
+
if (W.length > 0) {
|
|
1106
|
+
const t = te(W[0]);
|
|
1107
|
+
$(t);
|
|
1080
1108
|
}
|
|
1081
1109
|
return;
|
|
1082
1110
|
}
|
|
1083
|
-
|
|
1084
|
-
}, [
|
|
1085
|
-
|
|
1086
|
-
M,
|
|
1087
|
-
L,
|
|
1088
|
-
Se,
|
|
1089
|
-
j
|
|
1090
|
-
]), le(() => {
|
|
1091
|
-
if (B.length === 0)
|
|
1111
|
+
Ce && Ce === Q || L(Q);
|
|
1112
|
+
}, [W, Q, Ce]), ue(() => {
|
|
1113
|
+
if (W.length === 0)
|
|
1092
1114
|
return;
|
|
1093
|
-
const t =
|
|
1094
|
-
if ((t == null ? void 0 : t.type) !== "folder" ||
|
|
1115
|
+
const t = W[0];
|
|
1116
|
+
if ((t == null ? void 0 : t.type) !== "folder" || Ee.current)
|
|
1095
1117
|
return;
|
|
1096
1118
|
const r = t.name;
|
|
1097
|
-
|
|
1119
|
+
Ee.current = !0, _(
|
|
1098
1120
|
(n) => n[r] ? n : { ...n, [r]: !0 }
|
|
1099
|
-
), !
|
|
1100
|
-
}, [
|
|
1101
|
-
|
|
1102
|
-
}, [])
|
|
1103
|
-
|
|
1121
|
+
), !oe.current[r] && !H.current[r] && de(r, t);
|
|
1122
|
+
}, [W, de, P]), ue(() => () => {
|
|
1123
|
+
m.current && clearTimeout(m.current), Y();
|
|
1124
|
+
}, []), ue(() => {
|
|
1125
|
+
D && setTimeout(() => {
|
|
1126
|
+
const t = document.querySelector(
|
|
1127
|
+
'[role="menu"] [role="menuitem"]'
|
|
1128
|
+
);
|
|
1129
|
+
t && typeof t.focus == "function" && t.focus();
|
|
1130
|
+
}, 0);
|
|
1131
|
+
}, [D]);
|
|
1132
|
+
const [Ze, xe] = ae(""), rt = (t, r) => {
|
|
1104
1133
|
if (t.type === "folder")
|
|
1105
1134
|
return r;
|
|
1106
|
-
const n =
|
|
1135
|
+
const n = je(r);
|
|
1107
1136
|
return n && n || "/";
|
|
1108
|
-
},
|
|
1109
|
-
const i =
|
|
1137
|
+
}, Ve = (t, r, n) => {
|
|
1138
|
+
const i = rt(t, r);
|
|
1110
1139
|
if (!i)
|
|
1111
1140
|
return { allowed: !1, state: "invalid", destination: null };
|
|
1112
1141
|
if (n) {
|
|
@@ -1116,319 +1145,323 @@ const nr = St(function({
|
|
|
1116
1145
|
return { allowed: !1, state: "invalid", destination: null };
|
|
1117
1146
|
}
|
|
1118
1147
|
return { allowed: !0, state: "valid", destination: i };
|
|
1119
|
-
},
|
|
1120
|
-
r.type !== "folder" && r.type !== "file" || (
|
|
1148
|
+
}, Le = (t, r, n) => {
|
|
1149
|
+
r.type !== "folder" && r.type !== "file" || (we(n), q(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
|
|
1121
1150
|
"application/x-wp-playground-path",
|
|
1122
1151
|
n
|
|
1123
1152
|
), t.dataTransfer.setData("text/plain", n)));
|
|
1124
|
-
},
|
|
1125
|
-
|
|
1153
|
+
}, nt = () => {
|
|
1154
|
+
me();
|
|
1126
1155
|
}, 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
|
-
|
|
1156
|
+
const i = Ve(r, n, fe);
|
|
1157
|
+
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 });
|
|
1158
|
+
}, qe = (t, r, n) => {
|
|
1159
|
+
const i = Ve(r, n, fe);
|
|
1160
|
+
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" }));
|
|
1161
|
+
}, Ke = (t, r, n) => {
|
|
1162
|
+
K(n);
|
|
1134
1163
|
const i = t.relatedTarget;
|
|
1135
|
-
i && t.currentTarget.contains(i) ||
|
|
1136
|
-
},
|
|
1137
|
-
const i =
|
|
1164
|
+
i && t.currentTarget.contains(i) || q((a) => (a == null ? void 0 : a.path) === n ? null : a);
|
|
1165
|
+
}, Ge = async (t, r, n) => {
|
|
1166
|
+
const i = fe, a = Ve(r, n, i);
|
|
1138
1167
|
if (!a.allowed || !a.destination) {
|
|
1139
|
-
|
|
1168
|
+
me();
|
|
1140
1169
|
return;
|
|
1141
1170
|
}
|
|
1142
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1171
|
+
t.preventDefault(), t.stopPropagation(), K(n), q(null);
|
|
1143
1172
|
try {
|
|
1144
|
-
i ? await lt(i, a.destination) : await
|
|
1173
|
+
i ? await lt(i, a.destination) : await Qe(t, a.destination);
|
|
1145
1174
|
} finally {
|
|
1146
|
-
|
|
1175
|
+
me();
|
|
1147
1176
|
}
|
|
1148
|
-
},
|
|
1149
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1177
|
+
}, it = (t, r, n) => {
|
|
1178
|
+
t.preventDefault(), t.stopPropagation(), F(null), re({
|
|
1150
1179
|
absPath: n,
|
|
1151
1180
|
type: r.type,
|
|
1152
1181
|
x: t.clientX,
|
|
1153
1182
|
y: t.clientY
|
|
1154
1183
|
});
|
|
1155
|
-
},
|
|
1184
|
+
}, Se = async (t, r) => {
|
|
1156
1185
|
let n = r, i = 0;
|
|
1157
|
-
const a = (
|
|
1158
|
-
const
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
1161
|
-
for (; await (
|
|
1186
|
+
const a = (u) => {
|
|
1187
|
+
const h = u.lastIndexOf(".");
|
|
1188
|
+
return h > 0 ? { stem: u.slice(0, h), ext: u.slice(h) } : { stem: u, ext: "" };
|
|
1189
|
+
}, p = t === "/" ? "" : t;
|
|
1190
|
+
for (; await (l == null ? void 0 : l.fileExists(`${p}/${n}`)) || await (l == null ? void 0 : l.isDir(`${p}/${n}`)); ) {
|
|
1162
1191
|
i += 1;
|
|
1163
|
-
const { stem:
|
|
1164
|
-
n = `${
|
|
1192
|
+
const { stem: u, ext: h } = a(r);
|
|
1193
|
+
n = `${u} (${i})${h}`;
|
|
1165
1194
|
}
|
|
1166
1195
|
return n;
|
|
1167
|
-
},
|
|
1168
|
-
if (!
|
|
1169
|
-
let i = t ||
|
|
1196
|
+
}, Oe = async (t, r, n) => {
|
|
1197
|
+
if (!l) return;
|
|
1198
|
+
let i = t || R || P;
|
|
1170
1199
|
try {
|
|
1171
|
-
await
|
|
1200
|
+
await l.isDir(i) || (i = je(i));
|
|
1172
1201
|
} catch {
|
|
1173
|
-
i =
|
|
1202
|
+
i = je(i);
|
|
1174
1203
|
}
|
|
1175
|
-
const a = i,
|
|
1176
|
-
r === "folder" ? await
|
|
1177
|
-
|
|
1204
|
+
const a = i, p = await Se(a, n), u = Ne(a, p);
|
|
1205
|
+
r === "folder" ? await l.mkdir(u) : await l.writeFile(u, ""), ne.current = { type: r, tempPath: u }, F(u), await z(a), setTimeout(() => {
|
|
1206
|
+
$(u), L(u);
|
|
1178
1207
|
}, 0);
|
|
1179
|
-
},
|
|
1180
|
-
if (!
|
|
1208
|
+
}, ot = async (t) => {
|
|
1209
|
+
if (!l) return !1;
|
|
1181
1210
|
try {
|
|
1182
|
-
if (await
|
|
1211
|
+
if (await l.fileExists(t))
|
|
1183
1212
|
return !0;
|
|
1184
1213
|
} catch {
|
|
1185
1214
|
}
|
|
1186
1215
|
try {
|
|
1187
|
-
if (await
|
|
1216
|
+
if (await l.isDir(t))
|
|
1188
1217
|
return !0;
|
|
1189
1218
|
} catch {
|
|
1190
1219
|
}
|
|
1191
1220
|
return !1;
|
|
1192
|
-
},
|
|
1193
|
-
if (
|
|
1221
|
+
}, st = async (t) => {
|
|
1222
|
+
if (l)
|
|
1194
1223
|
try {
|
|
1195
|
-
await
|
|
1224
|
+
await l.mkdir(t);
|
|
1196
1225
|
} catch (r) {
|
|
1197
|
-
if (!await
|
|
1226
|
+
if (!await l.isDir(t).catch(() => !1))
|
|
1198
1227
|
throw r;
|
|
1199
1228
|
}
|
|
1200
1229
|
}, lt = async (t, r) => {
|
|
1201
|
-
if (!
|
|
1202
|
-
const n = Mt(t), i =
|
|
1203
|
-
if (i === t || await
|
|
1230
|
+
if (!l) return;
|
|
1231
|
+
const n = Mt(t), i = Ne(r, n);
|
|
1232
|
+
if (i === t || await ot(i))
|
|
1204
1233
|
return;
|
|
1205
|
-
const a =
|
|
1234
|
+
const a = je(t);
|
|
1206
1235
|
try {
|
|
1207
|
-
await
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1236
|
+
await l.mv(t, i), be(t, i);
|
|
1237
|
+
const p = mt(
|
|
1238
|
+
R,
|
|
1210
1239
|
t,
|
|
1211
1240
|
i
|
|
1212
1241
|
);
|
|
1213
|
-
|
|
1214
|
-
(
|
|
1215
|
-
),
|
|
1216
|
-
...
|
|
1242
|
+
R && (R === t || R.startsWith(`${t}/`)) && k(p), $(
|
|
1243
|
+
(u) => mt(u, t, i)
|
|
1244
|
+
), _((u) => ({
|
|
1245
|
+
...u,
|
|
1217
1246
|
[r]: !0
|
|
1218
1247
|
})), await Promise.all([
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
]),
|
|
1222
|
-
(
|
|
1223
|
-
),
|
|
1248
|
+
z(a),
|
|
1249
|
+
z(r)
|
|
1250
|
+
]), V(
|
|
1251
|
+
(u) => mt(u, t, i)
|
|
1252
|
+
), L(i);
|
|
1224
1253
|
} catch {
|
|
1225
1254
|
}
|
|
1226
|
-
},
|
|
1255
|
+
}, ct = (t) => {
|
|
1227
1256
|
const r = t;
|
|
1228
1257
|
return r.webkitGetAsEntry ? r.webkitGetAsEntry() : null;
|
|
1229
|
-
},
|
|
1258
|
+
}, ut = (t) => new Promise((r, n) => {
|
|
1230
1259
|
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);
|
|
1260
|
+
}), Je = async (t, r) => {
|
|
1261
|
+
if (!l) return;
|
|
1262
|
+
const n = t.name || "untitled", i = await Se(r, n), a = Ne(r, i), p = new Uint8Array(await t.arrayBuffer());
|
|
1263
|
+
await l.writeFile(a, p);
|
|
1238
1264
|
}, Xe = async (t, r) => {
|
|
1239
|
-
const n = await
|
|
1265
|
+
const n = await ut(t);
|
|
1266
|
+
await Je(n, r);
|
|
1267
|
+
}, Fe = async (t, r) => {
|
|
1268
|
+
const n = await Se(
|
|
1240
1269
|
r,
|
|
1241
1270
|
t.name || "New Folder"
|
|
1242
|
-
), i =
|
|
1243
|
-
await
|
|
1244
|
-
const a = t.createReader(),
|
|
1271
|
+
), i = Ne(r, n);
|
|
1272
|
+
await st(i);
|
|
1273
|
+
const a = t.createReader(), p = () => new Promise((u, h) => {
|
|
1245
1274
|
a.readEntries(
|
|
1246
|
-
(
|
|
1247
|
-
|
|
1275
|
+
(O) => u(Array.from(O)),
|
|
1276
|
+
h
|
|
1248
1277
|
);
|
|
1249
1278
|
});
|
|
1250
1279
|
for (; ; ) {
|
|
1251
|
-
const
|
|
1252
|
-
if (!
|
|
1280
|
+
const u = await p();
|
|
1281
|
+
if (!u.length)
|
|
1253
1282
|
break;
|
|
1254
|
-
for (const
|
|
1255
|
-
|
|
1256
|
-
|
|
1283
|
+
for (const h of u)
|
|
1284
|
+
h.isFile ? await Xe(
|
|
1285
|
+
h,
|
|
1257
1286
|
i
|
|
1258
|
-
) :
|
|
1259
|
-
|
|
1287
|
+
) : h.isDirectory && await Fe(
|
|
1288
|
+
h,
|
|
1260
1289
|
i
|
|
1261
1290
|
);
|
|
1262
1291
|
}
|
|
1263
|
-
},
|
|
1264
|
-
var a,
|
|
1265
|
-
if (!
|
|
1266
|
-
const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((
|
|
1292
|
+
}, Qe = async (t, r) => {
|
|
1293
|
+
var a, p;
|
|
1294
|
+
if (!l) return;
|
|
1295
|
+
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
1296
|
if (i.length > 0)
|
|
1268
|
-
for (const
|
|
1269
|
-
|
|
1270
|
-
|
|
1297
|
+
for (const u of i)
|
|
1298
|
+
u.isFile ? await Xe(
|
|
1299
|
+
u,
|
|
1271
1300
|
r
|
|
1272
|
-
) :
|
|
1273
|
-
|
|
1301
|
+
) : u.isDirectory && await Fe(
|
|
1302
|
+
u,
|
|
1274
1303
|
r
|
|
1275
1304
|
);
|
|
1276
1305
|
else {
|
|
1277
|
-
const
|
|
1278
|
-
for (const
|
|
1279
|
-
await
|
|
1306
|
+
const u = (p = t.dataTransfer) != null && p.files ? Array.from(t.dataTransfer.files) : [];
|
|
1307
|
+
for (const h of u)
|
|
1308
|
+
await Je(h, r);
|
|
1280
1309
|
}
|
|
1281
|
-
await
|
|
1282
|
-
...
|
|
1310
|
+
await z(r), _((u) => ({
|
|
1311
|
+
...u,
|
|
1283
1312
|
[r]: !0
|
|
1284
1313
|
}));
|
|
1285
|
-
},
|
|
1286
|
-
if (!
|
|
1314
|
+
}, Re = async (t, r) => {
|
|
1315
|
+
if (!l) return;
|
|
1287
1316
|
const n = t;
|
|
1288
|
-
|
|
1317
|
+
re(null);
|
|
1289
1318
|
try {
|
|
1290
|
-
r === "folder" ? await
|
|
1319
|
+
r === "folder" ? await l.rmdir(n, { recursive: !0 }) : await l.unlink(n);
|
|
1291
1320
|
} catch {
|
|
1292
1321
|
} finally {
|
|
1293
|
-
|
|
1294
|
-
const i =
|
|
1295
|
-
await
|
|
1322
|
+
F(null);
|
|
1323
|
+
const i = je(n);
|
|
1324
|
+
await z(i), R && (R === n || R.startsWith(`${n}/`)) && k(null);
|
|
1296
1325
|
}
|
|
1297
|
-
},
|
|
1326
|
+
}, We = (t) => {
|
|
1298
1327
|
var r;
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
a
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1328
|
+
if (!d)
|
|
1329
|
+
if (t.key.length === 1 && t.key.match(/\S/)) {
|
|
1330
|
+
const n = Ze + t.key.toLowerCase();
|
|
1331
|
+
if (xe(n), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
1332
|
+
xe("");
|
|
1333
|
+
}, 1e3), !ee.current)
|
|
1334
|
+
return;
|
|
1335
|
+
const i = Array.from(
|
|
1336
|
+
ee.current.querySelectorAll(".file-node-button")
|
|
1337
|
+
), a = document.activeElement;
|
|
1338
|
+
let p = 0;
|
|
1339
|
+
a && i.includes(a) && (p = i.indexOf(
|
|
1340
|
+
a
|
|
1341
|
+
));
|
|
1342
|
+
for (let u = 0; u < i.length; u++) {
|
|
1343
|
+
const h = (p + u) % i.length, O = i[h];
|
|
1344
|
+
if ((r = O.textContent) != null && r.toLowerCase().trim().startsWith(n)) {
|
|
1345
|
+
O.focus();
|
|
1346
|
+
const ye = O.getAttribute("data-path");
|
|
1347
|
+
ye && $(ye);
|
|
1348
|
+
break;
|
|
1349
|
+
}
|
|
1319
1350
|
}
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
if (!H(m)) {
|
|
1351
|
+
} else
|
|
1352
|
+
xe(""), m.current && clearTimeout(m.current);
|
|
1353
|
+
}, Be = async (t, r) => {
|
|
1354
|
+
const n = ne.current, i = (n == null ? void 0 : n.tempPath) === t, a = je(t), p = (r || "").trim();
|
|
1355
|
+
if (!S(p)) {
|
|
1326
1356
|
if (i) {
|
|
1327
1357
|
try {
|
|
1328
|
-
n.type === "folder" ? await
|
|
1358
|
+
n.type === "folder" ? await l.rmdir(t, {
|
|
1329
1359
|
recursive: !0
|
|
1330
|
-
}) : await
|
|
1360
|
+
}) : await l.unlink(t);
|
|
1331
1361
|
} catch {
|
|
1332
1362
|
}
|
|
1333
|
-
|
|
1363
|
+
ne.current = null;
|
|
1334
1364
|
}
|
|
1335
|
-
|
|
1365
|
+
F(i ? null : t);
|
|
1336
1366
|
return;
|
|
1337
1367
|
}
|
|
1338
|
-
let
|
|
1339
|
-
if (
|
|
1340
|
-
|
|
1341
|
-
|
|
1368
|
+
let u = Ne(a, p), h = u;
|
|
1369
|
+
if (h === t) {
|
|
1370
|
+
F(null);
|
|
1371
|
+
const Ae = i && (n == null ? void 0 : n.type) === "file";
|
|
1372
|
+
i && (ne.current = null), setTimeout(() => {
|
|
1373
|
+
$(h), L(h), Ae && C && C(h);
|
|
1342
1374
|
}, 0);
|
|
1343
1375
|
return;
|
|
1344
1376
|
}
|
|
1345
|
-
const
|
|
1346
|
-
if ((
|
|
1377
|
+
const O = await l.fileExists(h), ye = await l.isDir(h);
|
|
1378
|
+
if ((O || ye) && h !== t)
|
|
1347
1379
|
if (i)
|
|
1348
1380
|
try {
|
|
1349
|
-
const
|
|
1381
|
+
const Ae = await Se(
|
|
1350
1382
|
a === "/" ? "/" : a,
|
|
1351
|
-
|
|
1383
|
+
p
|
|
1352
1384
|
);
|
|
1353
|
-
|
|
1385
|
+
u = Ne(a, Ae), h = u;
|
|
1354
1386
|
} catch {
|
|
1355
1387
|
}
|
|
1356
1388
|
else {
|
|
1357
|
-
|
|
1389
|
+
F(t);
|
|
1358
1390
|
return;
|
|
1359
1391
|
}
|
|
1360
|
-
let
|
|
1392
|
+
let He = (n == null ? void 0 : n.type) === "folder";
|
|
1361
1393
|
try {
|
|
1362
|
-
await
|
|
1394
|
+
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
1395
|
} catch {
|
|
1364
1396
|
if (i)
|
|
1365
1397
|
try {
|
|
1366
|
-
(n == null ? void 0 : n.type) === "folder" ? await
|
|
1398
|
+
(n == null ? void 0 : n.type) === "folder" ? await l.rmdir(t, {
|
|
1367
1399
|
recursive: !0
|
|
1368
|
-
}) : await
|
|
1400
|
+
}) : await l.unlink(t);
|
|
1369
1401
|
} catch {
|
|
1370
1402
|
}
|
|
1371
1403
|
} finally {
|
|
1372
|
-
|
|
1404
|
+
ne.current = null, F(null);
|
|
1373
1405
|
}
|
|
1374
|
-
},
|
|
1375
|
-
const r =
|
|
1376
|
-
if (!
|
|
1377
|
-
|
|
1406
|
+
}, et = async (t) => {
|
|
1407
|
+
const r = ne.current;
|
|
1408
|
+
if (!l || (r == null ? void 0 : r.tempPath) !== t) {
|
|
1409
|
+
F((i) => i === t ? null : i);
|
|
1378
1410
|
return;
|
|
1379
1411
|
}
|
|
1380
1412
|
try {
|
|
1381
|
-
r.type === "folder" ? await
|
|
1413
|
+
r.type === "folder" ? await l.rmdir(t, { recursive: !0 }) : await l.unlink(t);
|
|
1382
1414
|
} catch {
|
|
1383
1415
|
}
|
|
1384
|
-
|
|
1385
|
-
const n =
|
|
1386
|
-
await
|
|
1416
|
+
ne.current = null, F(null);
|
|
1417
|
+
const n = je(t);
|
|
1418
|
+
await z(n), $(n), L(n);
|
|
1387
1419
|
};
|
|
1388
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ f.createElement("div", { onKeyDown: We, ref: ee }, /* @__PURE__ */ f.createElement(Dt, { className: X.filePickerTree }, W.map((t, r) => /* @__PURE__ */ f.createElement(
|
|
1389
1421
|
Rt,
|
|
1390
1422
|
{
|
|
1391
1423
|
key: t.name,
|
|
1392
1424
|
node: t,
|
|
1393
1425
|
level: 0,
|
|
1394
1426
|
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:
|
|
1427
|
+
setSize: W.length,
|
|
1428
|
+
expandedNodePaths: I,
|
|
1429
|
+
onToggle: se,
|
|
1430
|
+
selectedNode: R,
|
|
1431
|
+
focusPath: (n) => $(n),
|
|
1432
|
+
focusedNode: Q,
|
|
1433
|
+
selectPath: ge,
|
|
1434
|
+
generatePath: te,
|
|
1435
|
+
getChildren: Te,
|
|
1436
|
+
onContextMenu: it,
|
|
1437
|
+
renamingPath: Ce,
|
|
1438
|
+
onRename: Be,
|
|
1439
|
+
onRenameCancel: et,
|
|
1440
|
+
dropIndicator: ve,
|
|
1441
|
+
onDragStart: Le,
|
|
1442
|
+
onDragEnd: nt,
|
|
1411
1443
|
onDragEnter: at,
|
|
1412
|
-
onDragOver:
|
|
1413
|
-
onDragLeave:
|
|
1414
|
-
onDrop:
|
|
1415
|
-
rootPath:
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1444
|
+
onDragOver: qe,
|
|
1445
|
+
onDragLeave: Ke,
|
|
1446
|
+
onDrop: Ge,
|
|
1447
|
+
rootPath: P,
|
|
1448
|
+
onDoubleClickFile: C
|
|
1449
|
+
}
|
|
1450
|
+
))), D && /* @__PURE__ */ f.createElement(
|
|
1451
|
+
jt,
|
|
1419
1452
|
{
|
|
1420
1453
|
placement: "bottom-start",
|
|
1421
|
-
onClose: () =>
|
|
1454
|
+
onClose: () => re(null),
|
|
1422
1455
|
anchor: {
|
|
1423
1456
|
getBoundingClientRect: () => ({
|
|
1424
|
-
x:
|
|
1425
|
-
y:
|
|
1457
|
+
x: D.x,
|
|
1458
|
+
y: D.y,
|
|
1426
1459
|
width: 0,
|
|
1427
1460
|
height: 0,
|
|
1428
|
-
top:
|
|
1429
|
-
left:
|
|
1430
|
-
right:
|
|
1431
|
-
bottom:
|
|
1461
|
+
top: D.y,
|
|
1462
|
+
left: D.x,
|
|
1463
|
+
right: D.x,
|
|
1464
|
+
bottom: D.y,
|
|
1432
1465
|
toJSON: () => ({})
|
|
1433
1466
|
}),
|
|
1434
1467
|
ownerDocument: document
|
|
@@ -1437,334 +1470,342 @@ const nr = St(function({
|
|
|
1437
1470
|
resize: !1,
|
|
1438
1471
|
focusOnMount: "firstElement"
|
|
1439
1472
|
},
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
|
|
1473
|
+
/* @__PURE__ */ f.createElement(Ft, { role: "menu" }, D.type === "folder" && /* @__PURE__ */ f.createElement(
|
|
1474
|
+
tt,
|
|
1442
1475
|
{
|
|
1443
1476
|
role: "menuitem",
|
|
1444
1477
|
onClick: async () => {
|
|
1445
|
-
|
|
1446
|
-
|
|
1478
|
+
re(null), await Oe(
|
|
1479
|
+
D.absPath,
|
|
1447
1480
|
"file",
|
|
1448
1481
|
"untitled.php"
|
|
1449
1482
|
);
|
|
1450
1483
|
}
|
|
1451
1484
|
},
|
|
1452
1485
|
"Create file"
|
|
1453
|
-
),
|
|
1454
|
-
|
|
1486
|
+
), D.type === "folder" && /* @__PURE__ */ f.createElement(
|
|
1487
|
+
tt,
|
|
1455
1488
|
{
|
|
1456
1489
|
role: "menuitem",
|
|
1457
1490
|
onClick: async () => {
|
|
1458
|
-
|
|
1459
|
-
|
|
1491
|
+
re(null), await Oe(
|
|
1492
|
+
D.absPath,
|
|
1460
1493
|
"folder",
|
|
1461
1494
|
"New Folder"
|
|
1462
1495
|
);
|
|
1463
1496
|
}
|
|
1464
1497
|
},
|
|
1465
1498
|
"Create directory"
|
|
1466
|
-
), /* @__PURE__ */
|
|
1467
|
-
|
|
1499
|
+
), /* @__PURE__ */ f.createElement(
|
|
1500
|
+
tt,
|
|
1468
1501
|
{
|
|
1469
1502
|
role: "menuitem",
|
|
1470
1503
|
onClick: () => {
|
|
1471
|
-
|
|
1504
|
+
re(null), F(D.absPath);
|
|
1472
1505
|
}
|
|
1473
1506
|
},
|
|
1474
1507
|
"Rename"
|
|
1475
|
-
), /* @__PURE__ */
|
|
1476
|
-
|
|
1508
|
+
), /* @__PURE__ */ f.createElement(
|
|
1509
|
+
tt,
|
|
1477
1510
|
{
|
|
1478
1511
|
role: "menuitem",
|
|
1479
|
-
onClick: () =>
|
|
1480
|
-
|
|
1481
|
-
|
|
1512
|
+
onClick: () => Re(
|
|
1513
|
+
D.absPath,
|
|
1514
|
+
D.type
|
|
1482
1515
|
)
|
|
1483
1516
|
},
|
|
1484
1517
|
"Delete"
|
|
1485
1518
|
))
|
|
1486
1519
|
));
|
|
1487
1520
|
}), 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:
|
|
1521
|
+
node: s,
|
|
1522
|
+
level: l,
|
|
1523
|
+
position: E,
|
|
1524
|
+
setSize: g,
|
|
1525
|
+
expandedNodePaths: k,
|
|
1526
|
+
onToggle: C,
|
|
1527
|
+
selectedNode: M,
|
|
1528
|
+
focusPath: P,
|
|
1529
|
+
focusedNode: S,
|
|
1530
|
+
selectPath: I,
|
|
1531
|
+
generatePath: _,
|
|
1532
|
+
getChildren: R,
|
|
1533
|
+
onContextMenu: V,
|
|
1534
|
+
renamingPath: Q,
|
|
1535
|
+
onRename: $,
|
|
1536
|
+
onRenameCancel: Z,
|
|
1504
1537
|
parentPath: he = "",
|
|
1505
|
-
dropIndicator:
|
|
1506
|
-
onDragStart:
|
|
1507
|
-
onDragEnd:
|
|
1538
|
+
dropIndicator: j,
|
|
1539
|
+
onDragStart: T,
|
|
1540
|
+
onDragEnd: fe,
|
|
1508
1541
|
onDragEnter: we,
|
|
1509
|
-
onDragOver:
|
|
1510
|
-
onDragLeave:
|
|
1511
|
-
onDrop:
|
|
1512
|
-
rootPath:
|
|
1542
|
+
onDragOver: ve,
|
|
1543
|
+
onDragLeave: q,
|
|
1544
|
+
onDrop: B,
|
|
1545
|
+
rootPath: Ee,
|
|
1546
|
+
onDoubleClickFile: ee
|
|
1513
1547
|
}) => {
|
|
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
|
-
|
|
1548
|
+
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 = {
|
|
1549
|
+
onDragEnter: (d) => we == null ? void 0 : we(d, s, m),
|
|
1550
|
+
onDragOver: (d) => ve == null ? void 0 : ve(d, s, m),
|
|
1551
|
+
onDragLeave: (d) => q == null ? void 0 : q(d, s, m),
|
|
1552
|
+
onDrop: (d) => B == null ? void 0 : B(d, s, m)
|
|
1553
|
+
}, se = R(s, m) ?? [];
|
|
1554
|
+
ue(() => {
|
|
1555
|
+
var d;
|
|
1556
|
+
oe ? (L(s.name), te.current = !1, typeof window < "u" && requestAnimationFrame ? requestAnimationFrame(() => {
|
|
1557
|
+
var F;
|
|
1558
|
+
(F = Y.current) == null || F.select();
|
|
1559
|
+
}) : (d = Y.current) == null || d.select()) : te.current = !1;
|
|
1560
|
+
}, [oe, s.name]);
|
|
1561
|
+
const le = () => {
|
|
1562
|
+
s.type === "folder" && C(m, s, !H);
|
|
1563
|
+
}, be = (d) => {
|
|
1564
|
+
var F, ne;
|
|
1565
|
+
if (d.key === "ArrowLeft")
|
|
1566
|
+
H ? le() : (F = document.querySelector(
|
|
1533
1567
|
`[data-path="${he}"]`
|
|
1534
|
-
)) == null ||
|
|
1535
|
-
else if (
|
|
1536
|
-
if (
|
|
1537
|
-
if (
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
|
|
1568
|
+
)) == null || F.focus(), d.preventDefault(), d.stopPropagation();
|
|
1569
|
+
else if (d.key === "ArrowRight") {
|
|
1570
|
+
if (H) {
|
|
1571
|
+
if (se != null && se.length) {
|
|
1572
|
+
const Ce = _(
|
|
1573
|
+
se[0],
|
|
1574
|
+
m
|
|
1541
1575
|
);
|
|
1542
|
-
(
|
|
1543
|
-
`[data-path="${
|
|
1544
|
-
)) == null ||
|
|
1576
|
+
(ne = document.querySelector(
|
|
1577
|
+
`[data-path="${Ce}"]`
|
|
1578
|
+
)) == null || ne.focus();
|
|
1545
1579
|
}
|
|
1546
1580
|
} else
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
} else
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1581
|
+
le();
|
|
1582
|
+
d.preventDefault(), d.stopPropagation();
|
|
1583
|
+
} 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());
|
|
1584
|
+
}, me = (d) => {
|
|
1585
|
+
V == null || V(d, s, m);
|
|
1586
|
+
}, ge = (d) => {
|
|
1587
|
+
d.preventDefault(), te.current = !0, $ == null || $(m, K.trim());
|
|
1588
|
+
}, W = (d) => {
|
|
1589
|
+
if (d.key === "Escape") {
|
|
1590
|
+
d.preventDefault(), d.stopPropagation(), te.current = !0, Z == null || Z(m);
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
(d.key === "ArrowLeft" || d.key === "ArrowRight" || d.key === "ArrowUp" || d.key === "ArrowDown") && d.stopPropagation();
|
|
1594
|
+
}, D = () => {
|
|
1595
|
+
te.current || Z == null || Z(m), te.current = !1;
|
|
1596
|
+
}, re = () => {
|
|
1597
|
+
if (s.type === "folder") {
|
|
1598
|
+
le(), I(m), P(m);
|
|
1599
|
+
return;
|
|
1557
1600
|
}
|
|
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);
|
|
1601
|
+
const d = G.current !== null;
|
|
1602
|
+
if (d && G.current && clearTimeout(G.current), G.current = null, d) {
|
|
1603
|
+
ee ? ee(m) : I(m, !0);
|
|
1565
1604
|
return;
|
|
1566
1605
|
}
|
|
1567
|
-
(
|
|
1568
|
-
|
|
1569
|
-
|
|
1606
|
+
I(m, !1), P(m), I(m, !0), G.current = window.setTimeout(() => {
|
|
1607
|
+
G.current = null;
|
|
1608
|
+
}, 300);
|
|
1570
1609
|
};
|
|
1571
|
-
return
|
|
1610
|
+
return ue(() => () => {
|
|
1611
|
+
G.current !== null && typeof window < "u" && clearTimeout(G.current);
|
|
1612
|
+
}, []), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1572
1613
|
At,
|
|
1573
1614
|
{
|
|
1574
|
-
level:
|
|
1575
|
-
positionInSet:
|
|
1576
|
-
setSize:
|
|
1615
|
+
level: l,
|
|
1616
|
+
positionInSet: E,
|
|
1617
|
+
setSize: g
|
|
1577
1618
|
},
|
|
1578
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ f.createElement($t, null, () => /* @__PURE__ */ f.createElement(f.Fragment, null, oe ? /* @__PURE__ */ f.createElement(
|
|
1579
1620
|
"form",
|
|
1580
1621
|
{
|
|
1581
|
-
onSubmit:
|
|
1582
|
-
className:
|
|
1622
|
+
onSubmit: ge,
|
|
1623
|
+
className: yt(
|
|
1583
1624
|
X.fileNodeButton,
|
|
1584
1625
|
X.renaming,
|
|
1585
1626
|
"file-node-button",
|
|
1586
1627
|
{
|
|
1587
|
-
[X.selected]:
|
|
1588
|
-
[X.focused]:
|
|
1589
|
-
[X.dropTarget]:
|
|
1590
|
-
[X.dropTargetInvalid]:
|
|
1628
|
+
[X.selected]: M === m,
|
|
1629
|
+
[X.focused]: S === m,
|
|
1630
|
+
[X.dropTarget]: ke,
|
|
1631
|
+
[X.dropTargetInvalid]: _e
|
|
1591
1632
|
}
|
|
1592
1633
|
),
|
|
1593
|
-
"data-path":
|
|
1594
|
-
onContextMenu:
|
|
1595
|
-
...
|
|
1634
|
+
"data-path": m,
|
|
1635
|
+
onContextMenu: me,
|
|
1636
|
+
...z
|
|
1596
1637
|
},
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
|
|
1638
|
+
/* @__PURE__ */ f.createElement(
|
|
1639
|
+
bt,
|
|
1599
1640
|
{
|
|
1600
|
-
node:
|
|
1601
|
-
isOpen:
|
|
1602
|
-
level:
|
|
1641
|
+
node: s,
|
|
1642
|
+
isOpen: s.type === "folder" && H,
|
|
1643
|
+
level: l,
|
|
1603
1644
|
hideName: !0
|
|
1604
1645
|
}
|
|
1605
1646
|
),
|
|
1606
|
-
/* @__PURE__ */
|
|
1647
|
+
/* @__PURE__ */ f.createElement(
|
|
1607
1648
|
"input",
|
|
1608
1649
|
{
|
|
1609
|
-
ref:
|
|
1650
|
+
ref: Y,
|
|
1610
1651
|
className: X.renameInput,
|
|
1611
|
-
value:
|
|
1612
|
-
onChange: (
|
|
1613
|
-
onBlur:
|
|
1614
|
-
onFocus: () =>
|
|
1615
|
-
onKeyDown:
|
|
1652
|
+
value: K,
|
|
1653
|
+
onChange: (d) => L(d.target.value),
|
|
1654
|
+
onBlur: D,
|
|
1655
|
+
onFocus: () => P(m),
|
|
1656
|
+
onKeyDown: W
|
|
1616
1657
|
}
|
|
1617
1658
|
)
|
|
1618
|
-
) : /* @__PURE__ */
|
|
1619
|
-
|
|
1659
|
+
) : /* @__PURE__ */ f.createElement(
|
|
1660
|
+
pt,
|
|
1620
1661
|
{
|
|
1621
|
-
...
|
|
1622
|
-
draggable:
|
|
1623
|
-
onDragStart: (
|
|
1624
|
-
onDragEnd: (
|
|
1625
|
-
onClick:
|
|
1626
|
-
|
|
1627
|
-
},
|
|
1628
|
-
onKeyDown: ae,
|
|
1662
|
+
...z,
|
|
1663
|
+
draggable: de,
|
|
1664
|
+
onDragStart: (d) => T == null ? void 0 : T(d, s, m),
|
|
1665
|
+
onDragEnd: (d) => fe == null ? void 0 : fe(d, s, m),
|
|
1666
|
+
onClick: re,
|
|
1667
|
+
onKeyDown: be,
|
|
1629
1668
|
onFocus: () => {
|
|
1630
|
-
|
|
1669
|
+
P(m);
|
|
1631
1670
|
},
|
|
1632
|
-
onContextMenu:
|
|
1633
|
-
className:
|
|
1671
|
+
onContextMenu: me,
|
|
1672
|
+
className: yt(
|
|
1634
1673
|
X.fileNodeButton,
|
|
1674
|
+
"file-node-button",
|
|
1635
1675
|
{
|
|
1636
|
-
[X.selected]:
|
|
1637
|
-
[X.focused]:
|
|
1638
|
-
[X.dropTarget]:
|
|
1639
|
-
[X.dropTargetInvalid]:
|
|
1676
|
+
[X.selected]: M === m,
|
|
1677
|
+
[X.focused]: S === m,
|
|
1678
|
+
[X.dropTarget]: ke,
|
|
1679
|
+
[X.dropTargetInvalid]: _e
|
|
1640
1680
|
}
|
|
1641
1681
|
),
|
|
1642
|
-
"data-path":
|
|
1643
|
-
"data-expanded":
|
|
1682
|
+
"data-path": m,
|
|
1683
|
+
"data-expanded": H ? "true" : "false"
|
|
1644
1684
|
},
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
|
|
1685
|
+
/* @__PURE__ */ f.createElement(
|
|
1686
|
+
bt,
|
|
1647
1687
|
{
|
|
1648
|
-
node:
|
|
1649
|
-
isOpen:
|
|
1650
|
-
level:
|
|
1688
|
+
node: s,
|
|
1689
|
+
isOpen: s.type === "folder" && H,
|
|
1690
|
+
level: l
|
|
1651
1691
|
}
|
|
1652
1692
|
)
|
|
1653
1693
|
)))
|
|
1654
|
-
),
|
|
1694
|
+
), H && se && se.map((d, F) => /* @__PURE__ */ f.createElement(
|
|
1655
1695
|
Rt,
|
|
1656
1696
|
{
|
|
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:
|
|
1697
|
+
key: d.name,
|
|
1698
|
+
node: d,
|
|
1699
|
+
level: l + 1,
|
|
1700
|
+
position: F + 1,
|
|
1701
|
+
setSize: se.length,
|
|
1702
|
+
expandedNodePaths: k,
|
|
1703
|
+
onToggle: C,
|
|
1704
|
+
selectedNode: M,
|
|
1705
|
+
focusPath: P,
|
|
1706
|
+
focusedNode: S,
|
|
1707
|
+
selectPath: I,
|
|
1708
|
+
generatePath: _,
|
|
1709
|
+
getChildren: R,
|
|
1710
|
+
onContextMenu: V,
|
|
1711
|
+
renamingPath: Q,
|
|
1712
|
+
onRename: $,
|
|
1713
|
+
onRenameCancel: Z,
|
|
1714
|
+
parentPath: m,
|
|
1715
|
+
dropIndicator: j,
|
|
1716
|
+
onDragStart: T,
|
|
1717
|
+
onDragEnd: fe,
|
|
1678
1718
|
onDragEnter: we,
|
|
1679
|
-
onDragOver:
|
|
1680
|
-
onDragLeave:
|
|
1681
|
-
onDrop:
|
|
1682
|
-
rootPath:
|
|
1719
|
+
onDragOver: ve,
|
|
1720
|
+
onDragLeave: q,
|
|
1721
|
+
onDrop: B,
|
|
1722
|
+
rootPath: Ee,
|
|
1723
|
+
onDoubleClickFile: ee
|
|
1683
1724
|
}
|
|
1684
1725
|
)));
|
|
1685
|
-
},
|
|
1686
|
-
const
|
|
1687
|
-
for (let
|
|
1688
|
-
|
|
1689
|
-
return /* @__PURE__ */
|
|
1726
|
+
}, bt = ({ node: s, level: l, isOpen: E, hideName: g = !1 }) => {
|
|
1727
|
+
const k = [];
|
|
1728
|
+
for (let C = 0; C < l; C++)
|
|
1729
|
+
k.push(" ");
|
|
1730
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1690
1731
|
"span",
|
|
1691
1732
|
{
|
|
1692
1733
|
"aria-hidden": "true",
|
|
1693
|
-
dangerouslySetInnerHTML: { __html:
|
|
1734
|
+
dangerouslySetInnerHTML: { __html: k.join("") }
|
|
1694
1735
|
}
|
|
1695
|
-
),
|
|
1696
|
-
}, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37",
|
|
1736
|
+
), 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));
|
|
1737
|
+
}, 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
1738
|
control: ar,
|
|
1698
1739
|
browseLabel: ir,
|
|
1699
1740
|
pathPreview: or,
|
|
1700
|
-
modal:
|
|
1701
|
-
modalFooter:
|
|
1741
|
+
modal: sr,
|
|
1742
|
+
modalFooter: lr
|
|
1702
1743
|
};
|
|
1703
|
-
function cr({ path:
|
|
1704
|
-
if (!
|
|
1705
|
-
return /* @__PURE__ */
|
|
1706
|
-
const
|
|
1707
|
-
let
|
|
1708
|
-
|
|
1709
|
-
const
|
|
1744
|
+
function cr({ path: s }) {
|
|
1745
|
+
if (!s)
|
|
1746
|
+
return /* @__PURE__ */ f.createElement("div", { className: Me.pathPreview }, /* @__PURE__ */ f.createElement("i", null, "Select a path"));
|
|
1747
|
+
const l = s.split("/");
|
|
1748
|
+
let E = (l.length > 2 ? "/" : "") + l.pop();
|
|
1749
|
+
E.length > 10 && (E = E.substring(E.length - 10));
|
|
1750
|
+
const g = s.substring(
|
|
1710
1751
|
0,
|
|
1711
|
-
|
|
1752
|
+
s.length - E.length
|
|
1712
1753
|
);
|
|
1713
|
-
return /* @__PURE__ */
|
|
1754
|
+
return /* @__PURE__ */ f.createElement(
|
|
1714
1755
|
"div",
|
|
1715
1756
|
{
|
|
1716
|
-
className:
|
|
1717
|
-
"data-content-start":
|
|
1718
|
-
"data-content-end":
|
|
1757
|
+
className: Me.pathPreview,
|
|
1758
|
+
"data-content-start": g,
|
|
1759
|
+
"data-content-end": E
|
|
1719
1760
|
}
|
|
1720
1761
|
);
|
|
1721
1762
|
}
|
|
1722
|
-
function
|
|
1723
|
-
value:
|
|
1724
|
-
onChange:
|
|
1725
|
-
filesystem:
|
|
1763
|
+
function Cr({
|
|
1764
|
+
value: s = "",
|
|
1765
|
+
onChange: l,
|
|
1766
|
+
filesystem: E
|
|
1726
1767
|
}) {
|
|
1727
|
-
const [
|
|
1728
|
-
|
|
1768
|
+
const [g, k] = ae(!1), C = () => k(!0), M = () => k(!1), [P, S] = ae(
|
|
1769
|
+
s || null
|
|
1729
1770
|
);
|
|
1730
|
-
function
|
|
1731
|
-
|
|
1771
|
+
function I(_) {
|
|
1772
|
+
_ == null || _.preventDefault(), l(P || ""), M();
|
|
1732
1773
|
}
|
|
1733
|
-
return /* @__PURE__ */
|
|
1734
|
-
|
|
1774
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
1775
|
+
pt,
|
|
1735
1776
|
{
|
|
1736
1777
|
variant: "tertiary",
|
|
1737
|
-
className:
|
|
1738
|
-
onClick:
|
|
1778
|
+
className: Me.control,
|
|
1779
|
+
onClick: C
|
|
1739
1780
|
},
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
),
|
|
1781
|
+
/* @__PURE__ */ f.createElement("span", { className: Me.browseLabel }, "Browse"),
|
|
1782
|
+
/* @__PURE__ */ f.createElement(cr, { path: s || "" })
|
|
1783
|
+
), g && /* @__PURE__ */ f.createElement(
|
|
1743
1784
|
Nt,
|
|
1744
1785
|
{
|
|
1745
1786
|
title: "Select a path ",
|
|
1746
|
-
onRequestClose:
|
|
1747
|
-
className:
|
|
1787
|
+
onRequestClose: M,
|
|
1788
|
+
className: Me.modal
|
|
1748
1789
|
},
|
|
1749
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ f.createElement("form", { onSubmit: I }, /* @__PURE__ */ f.createElement(
|
|
1750
1791
|
nr,
|
|
1751
1792
|
{
|
|
1752
|
-
filesystem:
|
|
1753
|
-
initialSelectedPath:
|
|
1754
|
-
onSelect:
|
|
1793
|
+
filesystem: E,
|
|
1794
|
+
initialSelectedPath: s,
|
|
1795
|
+
onSelect: S
|
|
1755
1796
|
}
|
|
1756
|
-
), /* @__PURE__ */
|
|
1797
|
+
), /* @__PURE__ */ f.createElement("div", { className: Me.modalFooter }, /* @__PURE__ */ f.createElement(pt, { type: "submit", variant: "primary" }, "Select Path")))
|
|
1757
1798
|
));
|
|
1758
1799
|
}
|
|
1759
1800
|
export {
|
|
1760
|
-
|
|
1761
|
-
|
|
1801
|
+
vr as ClockIcon,
|
|
1802
|
+
Cr as FilePickerControl,
|
|
1762
1803
|
nr as FilePickerTree,
|
|
1763
1804
|
br as SiteManagerIcon,
|
|
1764
|
-
|
|
1805
|
+
yr as WordPressIcon,
|
|
1765
1806
|
Bt as file,
|
|
1766
|
-
|
|
1767
|
-
|
|
1807
|
+
Wt as folder,
|
|
1808
|
+
_r as getLogoDataURL,
|
|
1768
1809
|
Er as layout,
|
|
1769
1810
|
wr as playgroundLogo,
|
|
1770
1811
|
gr as temporaryStorage
|