@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/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import d, { forwardRef as St, useMemo as wt, useState as Q, useRef as re, useEffect as le, useImperativeHandle as Ot } from "react";
2
- import { __experimentalTreeGrid as Dt, Popover as Ft, NavigableMenu as jt, MenuItem as rt, __experimentalTreeGridRow as At, __experimentalTreeGridCell as Vt, Button as mt, Modal as Nt } from "@wordpress/components";
3
- import gt from "classnames";
4
- import { dirname as ke, joinPaths as Ae, basename as Mt } from "@php-wasm/util";
5
- import { forwardRef as bt, cloneElement as $t, createElement as Ht } from "@wordpress/element";
6
- import It from "clsx";
7
- const wr = (l) => /* @__PURE__ */ d.createElement(
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
- ...l
15
+ ...s
16
16
  },
17
- /* @__PURE__ */ d.createElement(
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__ */ d.createElement(
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__ */ d.createElement(
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 = (l) => /* @__PURE__ */ d.createElement(
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
- ...l
58
+ ...s
59
59
  },
60
- /* @__PURE__ */ d.createElement(
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
- ), vr = (l) => /* @__PURE__ */ d.createElement(
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
- ...l
77
+ ...s
78
78
  },
79
- /* @__PURE__ */ d.createElement(
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
- ), Lt = /* @__PURE__ */ d.createElement(
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__ */ d.createElement(
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__ */ d.createElement(
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__ */ d.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
- ), yr = (l) => /* @__PURE__ */ d.createElement(
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
- ...l
122
+ ...s
123
123
  },
124
- /* @__PURE__ */ d.createElement(
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__ */ d.createElement(
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__ */ d.createElement(
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 Cr(l) {
153
- return `data:${l.mime};base64,${l.data}`;
152
+ function _r(s) {
153
+ return `data:${s.mime};base64,${s.data}`;
154
154
  }
155
- function br() {
156
- return /* @__PURE__ */ d.createElement(
155
+ function br({
156
+ size: s = 24,
157
+ sidebarActive: l = !1
158
+ }) {
159
+ return /* @__PURE__ */ f.createElement(
157
160
  "svg",
158
161
  {
159
- width: "14",
160
- height: "14",
161
- viewBox: "0 0 14 14",
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
- xmlns: "http://www.w3.org/2000/svg"
167
+ stroke: "currentColor",
168
+ strokeWidth: "2",
169
+ strokeLinecap: "round",
170
+ strokeLinejoin: "round"
164
171
  },
165
- /* @__PURE__ */ d.createElement(
166
- "path",
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
- fillRule: "evenodd",
169
- clipRule: "evenodd",
170
- d: "M1.99967 1.58301H4.49967C4.72979 1.58301 4.91634 1.76956 4.91634 1.99967V4.49967C4.91634 4.72979 4.72979 4.91634 4.49967 4.91634H1.99967C1.76956 4.91634 1.58301 4.72979 1.58301 4.49967V1.99967C1.58301 1.76956 1.76956 1.58301 1.99967 1.58301ZM0.333008 1.99967C0.333008 1.0792 1.0792 0.333008 1.99967 0.333008H4.49967C5.42015 0.333008 6.16634 1.0792 6.16634 1.99967V4.49967C6.16634 5.42015 5.42015 6.16634 4.49967 6.16634H1.99967C1.0792 6.16634 0.333008 5.42015 0.333008 4.49967V1.99967ZM9.49967 1.58301H11.9997C12.2298 1.58301 12.4163 1.76956 12.4163 1.99967V4.49967C12.4163 4.72979 12.2298 4.91634 11.9997 4.91634H9.49967C9.26956 4.91634 9.08301 4.72979 9.08301 4.49967V1.99967C9.08301 1.76956 9.26956 1.58301 9.49967 1.58301ZM7.83301 1.99967C7.83301 1.0792 8.5792 0.333008 9.49967 0.333008H11.9997C12.9201 0.333008 13.6663 1.0792 13.6663 1.99967V4.49967C13.6663 5.42015 12.9201 6.16634 11.9997 6.16634H9.49967C8.5792 6.16634 7.83301 5.42015 7.83301 4.49967V1.99967ZM11.9997 9.08301H9.49967C9.26956 9.08301 9.08301 9.26956 9.08301 9.49967V11.9997C9.08301 12.2298 9.26956 12.4163 9.49967 12.4163H11.9997C12.2298 12.4163 12.4163 12.2298 12.4163 11.9997V9.49967C12.4163 9.26956 12.2298 9.08301 11.9997 9.08301ZM9.49967 7.83301C8.5792 7.83301 7.83301 8.5792 7.83301 9.49967V11.9997C7.83301 12.9201 8.5792 13.6663 9.49967 13.6663H11.9997C12.9201 13.6663 13.6663 12.9201 13.6663 11.9997V9.49967C13.6663 8.5792 12.9201 7.83301 11.9997 7.83301H9.49967ZM1.99967 9.08301H4.49967C4.72979 9.08301 4.91634 9.26956 4.91634 9.49967V11.9997C4.91634 12.2298 4.72979 12.4163 4.49967 12.4163H1.99967C1.76956 12.4163 1.58301 12.2298 1.58301 11.9997V9.49967C1.58301 9.26956 1.76956 9.08301 1.99967 9.08301ZM0.333008 9.49967C0.333008 8.5792 1.0792 7.83301 1.99967 7.83301H4.49967C5.42015 7.83301 6.16634 8.5792 6.16634 9.49967V11.9997C6.16634 12.9201 5.42015 13.6663 4.49967 13.6663H1.99967C1.0792 13.6663 0.333008 12.9201 0.333008 11.9997V9.49967Z",
171
- fill: "white"
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 = bt(({
177
- icon: l,
178
- size: s = 24,
179
- ...C
180
- }, h) => $t(l, {
181
- width: s,
182
- height: s,
183
- ...C,
184
- ref: h
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 pt = { exports: {} }, Le = {};
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 yt;
197
- function Wt() {
198
- if (yt) return Le;
199
- yt = 1;
200
- var l = d, s = Symbol.for("react.element"), C = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, x = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 };
201
- function T(H, k, O) {
202
- var y, I = {}, M = null, F = null;
203
- O !== void 0 && (M = "" + O), k.key !== void 0 && (M = "" + k.key), k.ref !== void 0 && (F = k.ref);
204
- for (y in k) h.call(k, y) && !P.hasOwnProperty(y) && (I[y] = k[y]);
205
- if (H && H.defaultProps) for (y in k = H.defaultProps, k) I[y] === void 0 && (I[y] = k[y]);
206
- return { $$typeof: s, type: H, key: M, ref: F, props: I, _owner: x.current };
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 Le.Fragment = C, Le.jsx = T, Le.jsxs = T, Le;
232
+ return Ye.Fragment = E, Ye.jsx = M, Ye.jsxs = M, Ye;
209
233
  }
210
- var Be = {};
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 Et;
221
- function Zt() {
222
- return Et || (Et = 1, process.env.NODE_ENV !== "production" && function() {
223
- var l = d, s = Symbol.for("react.element"), C = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), H = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), ee = Symbol.iterator, q = "@@iterator";
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 = ee && e[ee] || e[q];
251
+ var o = $ && e[$] || e[Z];
228
252
  return typeof o == "function" ? o : null;
229
253
  }
230
- var S = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
231
- function R(e) {
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), p = 1; p < o; p++)
234
- c[p - 1] = arguments[p];
235
- se("error", e, c);
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 se(e, o, c) {
262
+ function fe(e, o, c) {
239
263
  {
240
- var p = S.ReactDebugCurrentFrame, b = p.getStackAddendum();
264
+ var w = j.ReactDebugCurrentFrame, b = w.getStackAddendum();
241
265
  b !== "" && (o += "%s", c = c.concat([b]));
242
- var _ = c.map(function(E) {
243
- return String(E);
266
+ var x = c.map(function(v) {
267
+ return String(v);
244
268
  });
245
- _.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, _);
269
+ x.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, x);
246
270
  }
247
271
  }
248
- var we = !1, K = !1, W = !1, ie = !1, ce = !1, w;
249
- w = Symbol.for("react.module.reference");
250
- function G(e) {
251
- return !!(typeof e == "string" || typeof e == "function" || e === h || e === P || ce || e === x || e === O || e === y || ie || e === F || we || K || W || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === I || e.$$typeof === T || e.$$typeof === H || e.$$typeof === k || // This needs to include all possible module reference object
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 === w || e.getModuleId !== void 0));
279
+ e.$$typeof === ee || e.getModuleId !== void 0));
256
280
  }
257
- function ne(e, o, c) {
258
- var p = e.displayName;
259
- if (p)
260
- return p;
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 ue(e) {
288
+ function oe(e) {
265
289
  return e.displayName || "Context";
266
290
  }
267
- function Z(e) {
291
+ function Y(e) {
268
292
  if (e == null)
269
293
  return null;
270
- if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
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 h:
299
+ case g:
276
300
  return "Fragment";
277
- case C:
301
+ case E:
278
302
  return "Portal";
279
- case P:
303
+ case C:
280
304
  return "Profiler";
281
- case x:
305
+ case k:
282
306
  return "StrictMode";
283
- case O:
307
+ case I:
284
308
  return "Suspense";
285
- case y:
309
+ case _:
286
310
  return "SuspenseList";
287
311
  }
288
312
  if (typeof e == "object")
289
313
  switch (e.$$typeof) {
290
- case H:
314
+ case P:
291
315
  var o = e;
292
- return ue(o) + ".Consumer";
293
- case T:
316
+ return oe(o) + ".Consumer";
317
+ case M:
294
318
  var c = e;
295
- return ue(c._context) + ".Provider";
296
- case k:
297
- return ne(e, e.render, "ForwardRef");
298
- case I:
299
- var p = e.displayName || null;
300
- return p !== null ? p : Z(e.type) || "Memo";
301
- case M: {
302
- var b = e, _ = b._payload, E = b._init;
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 Z(E(_));
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 j = Object.assign, L = 0, be, _e, ge, oe, ve, A, ye;
313
- function ae() {
336
+ var K = Object.assign, L = 0, te, Te, ke, _e, de, G, z;
337
+ function se() {
314
338
  }
315
- ae.__reactDisabledLog = !0;
316
- function fe() {
339
+ se.__reactDisabledLog = !0;
340
+ function le() {
317
341
  {
318
342
  if (L === 0) {
319
- be = console.log, _e = console.info, ge = console.warn, oe = console.error, ve = console.group, A = console.groupCollapsed, ye = console.groupEnd;
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: ae,
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 Re() {
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: j({}, e, {
349
- value: be
372
+ log: K({}, e, {
373
+ value: te
350
374
  }),
351
- info: j({}, e, {
352
- value: _e
375
+ info: K({}, e, {
376
+ value: Te
353
377
  }),
354
- warn: j({}, e, {
355
- value: ge
378
+ warn: K({}, e, {
379
+ value: ke
356
380
  }),
357
- error: j({}, e, {
358
- value: oe
381
+ error: K({}, e, {
382
+ value: _e
359
383
  }),
360
- group: j({}, e, {
361
- value: ve
384
+ group: K({}, e, {
385
+ value: de
362
386
  }),
363
- groupCollapsed: j({}, e, {
364
- value: A
387
+ groupCollapsed: K({}, e, {
388
+ value: G
365
389
  }),
366
- groupEnd: j({}, e, {
367
- value: ye
390
+ groupEnd: K({}, e, {
391
+ value: z
368
392
  })
369
393
  });
370
394
  }
371
- L < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
395
+ L < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
372
396
  }
373
397
  }
374
- var de = S.ReactCurrentDispatcher, B;
375
- function u(e, o, c) {
398
+ var me = j.ReactCurrentDispatcher, ge;
399
+ function W(e, o, c) {
376
400
  {
377
- if (B === void 0)
401
+ if (ge === void 0)
378
402
  try {
379
403
  throw Error();
380
404
  } catch (b) {
381
- var p = b.stack.trim().match(/\n( *(at )?)/);
382
- B = p && p[1] || "";
405
+ var w = b.stack.trim().match(/\n( *(at )?)/);
406
+ ge = w && w[1] || "";
383
407
  }
384
408
  return `
385
- ` + B + e;
409
+ ` + ge + e;
386
410
  }
387
411
  }
388
- var $ = !1, me;
412
+ var D = !1, re;
389
413
  {
390
- var Y = typeof WeakMap == "function" ? WeakMap : Map;
391
- me = new Y();
414
+ var d = typeof WeakMap == "function" ? WeakMap : Map;
415
+ re = new d();
392
416
  }
393
- function z(e, o) {
394
- if (!e || $)
417
+ function F(e, o) {
418
+ if (!e || D)
395
419
  return "";
396
420
  {
397
- var c = me.get(e);
421
+ var c = re.get(e);
398
422
  if (c !== void 0)
399
423
  return c;
400
424
  }
401
- var p;
402
- $ = !0;
425
+ var w;
426
+ D = !0;
403
427
  var b = Error.prepareStackTrace;
404
428
  Error.prepareStackTrace = void 0;
405
- var _;
406
- _ = de.current, de.current = null, fe();
429
+ var x;
430
+ x = me.current, me.current = null, le();
407
431
  try {
408
432
  if (o) {
409
- var E = function() {
433
+ var v = function() {
410
434
  throw Error();
411
435
  };
412
- if (Object.defineProperty(E.prototype, "props", {
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(E, []);
442
+ Reflect.construct(v, []);
419
443
  } catch (J) {
420
- p = J;
444
+ w = J;
421
445
  }
422
- Reflect.construct(e, [], E);
446
+ Reflect.construct(e, [], v);
423
447
  } else {
424
448
  try {
425
- E.call();
449
+ v.call();
426
450
  } catch (J) {
427
- p = J;
451
+ w = J;
428
452
  }
429
- e.call(E.prototype);
453
+ e.call(v.prototype);
430
454
  }
431
455
  } else {
432
456
  try {
433
457
  throw Error();
434
458
  } catch (J) {
435
- p = J;
459
+ w = J;
436
460
  }
437
461
  e();
438
462
  }
439
463
  } catch (J) {
440
- if (J && p && typeof J.stack == "string") {
441
- for (var v = J.stack.split(`
442
- `), U = p.stack.split(`
443
- `), D = v.length - 1, V = U.length - 1; D >= 1 && V >= 0 && v[D] !== U[V]; )
444
- V--;
445
- for (; D >= 1 && V >= 0; D--, V--)
446
- if (v[D] !== U[V]) {
447
- if (D !== 1 || V !== 1)
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 (D--, V--, V < 0 || v[D] !== U[V]) {
450
- var te = `
451
- ` + v[D].replace(" at new ", " at ");
452
- return e.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", e.displayName)), typeof e == "function" && me.set(e, te), te;
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 (D >= 1 && V >= 0);
478
+ while (A >= 1 && N >= 0);
455
479
  break;
456
480
  }
457
481
  }
458
482
  } finally {
459
- $ = !1, de.current = _, Re(), Error.prepareStackTrace = b;
483
+ D = !1, me.current = x, be(), Error.prepareStackTrace = b;
460
484
  }
461
- var je = e ? e.displayName || e.name : "", Pe = je ? u(je) : "";
462
- return typeof e == "function" && me.set(e, Pe), Pe;
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 Se(e, o, c) {
465
- return z(e, !1);
488
+ function ne(e, o, c) {
489
+ return F(e, !1);
466
490
  }
467
- function Ze(e) {
491
+ function Ce(e) {
468
492
  var o = e.prototype;
469
493
  return !!(o && o.isReactComponent);
470
494
  }
471
- function pe(e, o, c) {
495
+ function Pe(e, o, c) {
472
496
  if (e == null)
473
497
  return "";
474
498
  if (typeof e == "function")
475
- return z(e, Ze(e));
499
+ return F(e, Ce(e));
476
500
  if (typeof e == "string")
477
- return u(e);
501
+ return W(e);
478
502
  switch (e) {
479
- case O:
480
- return u("Suspense");
481
- case y:
482
- return u("SuspenseList");
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 k:
487
- return Se(e.render);
488
- case I:
489
- return pe(e.type, o, c);
490
- case M: {
491
- var p = e, b = p._payload, _ = p._init;
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 pe(_(b), o, c);
517
+ return Pe(x(b), o, c);
494
518
  } catch {
495
519
  }
496
520
  }
497
521
  }
498
522
  return "";
499
523
  }
500
- var Ee = Object.prototype.hasOwnProperty, Ye = {}, Oe = S.ReactDebugCurrentFrame;
501
- function De(e) {
524
+ var pe = Object.prototype.hasOwnProperty, Ie = {}, Ze = j.ReactDebugCurrentFrame;
525
+ function xe(e) {
502
526
  if (e) {
503
- var o = e._owner, c = pe(e.type, e._source, o ? o.type : null);
504
- Oe.setExtraStackFrame(c);
527
+ var o = e._owner, c = Pe(e.type, e._source, o ? o.type : null);
528
+ Ze.setExtraStackFrame(c);
505
529
  } else
506
- Oe.setExtraStackFrame(null);
530
+ Ze.setExtraStackFrame(null);
507
531
  }
508
- function Ne(e, o, c, p, b) {
532
+ function rt(e, o, c, w, b) {
509
533
  {
510
- var _ = Function.call.bind(Ee);
511
- for (var E in e)
512
- if (_(e, E)) {
513
- var v = void 0;
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[E] != "function") {
516
- var U = Error((p || "React class") + ": " + c + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
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
- v = e[E](o, E, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
520
- } catch (D) {
521
- v = D;
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
- v && !(v instanceof Error) && (De(b), R("%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).", p || "React class", c, E, typeof v), De(null)), v instanceof Error && !(v.message in Ye) && (Ye[v.message] = !0, De(b), R("Failed %s type: %s", c, v.message), De(null));
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 nt = Array.isArray;
528
- function Me(e) {
529
- return nt(e);
551
+ var Ve = Array.isArray;
552
+ function Le(e) {
553
+ return Ve(e);
530
554
  }
531
- function at(e) {
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 it(e) {
561
+ function at(e) {
538
562
  try {
539
- return ze(e), !1;
563
+ return qe(e), !1;
540
564
  } catch {
541
565
  return !0;
542
566
  }
543
567
  }
544
- function ze(e) {
568
+ function qe(e) {
545
569
  return "" + e;
546
570
  }
547
- function Ue(e) {
548
- if (it(e))
549
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(e)), ze(e);
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 qe = S.ReactCurrentOwner, Fe = {
575
+ var Ge = j.ReactCurrentOwner, it = {
552
576
  key: !0,
553
577
  ref: !0,
554
578
  __self: !0,
555
579
  __source: !0
556
- }, xe, Ke;
580
+ }, Se, Oe;
557
581
  function ot(e) {
558
- if (Ee.call(e, "ref")) {
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 lt(e) {
566
- if (Ee.call(e, "key")) {
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 st(e, o) {
574
- typeof e.ref == "string" && qe.current;
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
- xe || (xe = !0, R("%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));
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 Ge(e, o) {
611
+ function ut(e, o) {
588
612
  {
589
613
  var c = function() {
590
- Ke || (Ke = !0, R("%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));
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, p, b, _, E) {
599
- var v = {
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: s,
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: E,
630
+ props: v,
607
631
  // Record the component responsible for creating this element.
608
- _owner: _
632
+ _owner: x
609
633
  };
610
- return v._store = {}, Object.defineProperty(v._store, "validated", {
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(v, "_self", {
639
+ }), Object.defineProperty(y, "_self", {
616
640
  configurable: !1,
617
641
  enumerable: !1,
618
642
  writable: !1,
619
- value: p
620
- }), Object.defineProperty(v, "_source", {
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(v.props), Object.freeze(v)), v;
649
+ }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
626
650
  };
627
- function Xe(e, o, c, p, b) {
651
+ function Xe(e, o, c, w, b) {
628
652
  {
629
- var _, E = {}, v = null, U = null;
630
- c !== void 0 && (Ue(c), v = "" + c), lt(o) && (Ue(o.key), v = "" + o.key), ot(o) && (U = o.ref, st(o, b));
631
- for (_ in o)
632
- Ee.call(o, _) && !Fe.hasOwnProperty(_) && (E[_] = o[_]);
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 D = e.defaultProps;
635
- for (_ in D)
636
- E[_] === void 0 && (E[_] = D[_]);
658
+ var A = e.defaultProps;
659
+ for (x in A)
660
+ v[x] === void 0 && (v[x] = A[x]);
637
661
  }
638
- if (v || U) {
639
- var V = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
640
- v && ct(E, V), U && Ge(E, V);
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, v, U, b, p, qe.current, E);
666
+ return Je(e, y, U, b, w, Ge.current, v);
643
667
  }
644
668
  }
645
- var $e = S.ReactCurrentOwner, Qe = S.ReactDebugCurrentFrame;
646
- function Ce(e) {
669
+ var Fe = j.ReactCurrentOwner, Qe = j.ReactDebugCurrentFrame;
670
+ function Re(e) {
647
671
  if (e) {
648
- var o = e._owner, c = pe(e.type, e._source, o ? o.type : null);
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 He;
654
- He = !1;
655
- function Ie(e) {
656
- return typeof e == "object" && e !== null && e.$$typeof === s;
677
+ var We;
678
+ We = !1;
679
+ function Be(e) {
680
+ return typeof e == "object" && e !== null && e.$$typeof === l;
657
681
  }
658
- function t() {
682
+ function et() {
659
683
  {
660
- if ($e.current) {
661
- var e = Z($e.current.type);
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 r(e) {
694
+ function t(e) {
671
695
  return "";
672
696
  }
673
- var n = {};
674
- function i(e) {
697
+ var r = {};
698
+ function n(e) {
675
699
  {
676
- var o = t();
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 a(e, o) {
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 = i(o);
692
- if (n[c])
715
+ var c = n(o);
716
+ if (r[c])
693
717
  return;
694
- n[c] = !0;
695
- var p = "";
696
- e && e._owner && e._owner !== $e.current && (p = " It was passed a child from " + Z(e._owner.type) + "."), Ce(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), Ce(null);
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 m(e, o) {
723
+ function a(e, o) {
700
724
  {
701
725
  if (typeof e != "object")
702
726
  return;
703
- if (Me(e))
727
+ if (Le(e))
704
728
  for (var c = 0; c < e.length; c++) {
705
- var p = e[c];
706
- Ie(p) && a(p, o);
729
+ var w = e[c];
730
+ Be(w) && i(w, o);
707
731
  }
708
- else if (Ie(e))
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 _ = b.call(e), E; !(E = _.next()).done; )
714
- Ie(E.value) && a(E.value, o);
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 f(e) {
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 === k || // Note: Memo only checks outer props here.
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 === I))
752
+ o.$$typeof === R))
729
753
  c = o.propTypes;
730
754
  else
731
755
  return;
732
756
  if (c) {
733
- var p = Z(o);
734
- Ne(c, e.props, "prop", p, e);
735
- } else if (o.PropTypes !== void 0 && !He) {
736
- He = !0;
737
- var b = Z(o);
738
- R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
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 && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
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 g(e) {
767
+ function u(e) {
744
768
  {
745
769
  for (var o = Object.keys(e.props), c = 0; c < o.length; c++) {
746
- var p = o[c];
747
- if (p !== "children" && p !== "key") {
748
- Ce(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), Ce(null);
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 && (Ce(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
776
+ e.ref !== null && (Re(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
753
777
  }
754
778
  }
755
- var N = {};
756
- function Te(e, o, c, p, b, _) {
779
+ var h = {};
780
+ function O(e, o, c, w, b, x) {
757
781
  {
758
- var E = G(e);
759
- if (!E) {
760
- var v = "";
761
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
762
- var U = r();
763
- U ? v += U : v += t();
764
- var D;
765
- e === null ? D = "null" : Me(e) ? D = "array" : e !== void 0 && e.$$typeof === s ? (D = "<" + (Z(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v);
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 V = Xe(e, o, c, b, _);
768
- if (V == null)
769
- return V;
770
- if (E) {
771
- var te = o.children;
772
- if (te !== void 0)
773
- if (p)
774
- if (Me(te)) {
775
- for (var je = 0; je < te.length; je++)
776
- m(te[je], e);
777
- Object.freeze && Object.freeze(te);
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
- R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
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
- m(te, e);
805
+ a(ce, e);
782
806
  }
783
- if (Ee.call(o, "key")) {
784
- var Pe = Z(e), J = Object.keys(o).filter(function(kt) {
785
- return kt !== "key";
786
- }), ut = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
787
- if (!N[Pe + ut]) {
788
- var Pt = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
789
- R(`A props object containing a "key" prop is being spread into JSX:
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} />`, ut, Pe, Pt, Pe), N[Pe + ut] = !0;
818
+ <%s key={someKey} {...props} />`, ft, De, kt, De), h[De + ft] = !0;
795
819
  }
796
820
  }
797
- return e === h ? g(V) : f(V), V;
821
+ return e === g ? u(N) : p(N), N;
798
822
  }
799
823
  }
800
- function et(e, o, c) {
801
- return Te(e, o, c, !0);
824
+ function ye(e, o, c) {
825
+ return O(e, o, c, !0);
802
826
  }
803
- function tt(e, o, c) {
804
- return Te(e, o, c, !1);
827
+ function He(e, o, c) {
828
+ return O(e, o, c, !1);
805
829
  }
806
- var xt = tt, Tt = et;
807
- Be.Fragment = h, Be.jsx = xt, Be.jsxs = Tt;
808
- }()), Be;
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" ? pt.exports = Wt() : pt.exports = Zt();
811
- var We = pt.exports;
812
- const _t = (l) => Ht("path", l), ht = bt(
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
- className: l,
822
- isPressed: s,
823
- ...C
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__ */ We.jsx("svg", {
834
- ...x,
835
- ref: h
836
- });
851
+ return /* @__PURE__ */ Ue.jsx("svg", { ...k, ref: g });
837
852
  }
838
853
  );
839
- ht.displayName = "SVG";
840
- const Yt = /* @__PURE__ */ We.jsx(ht, {
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__ */ We.jsx(_t, {
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
- }), zt = /* @__PURE__ */ We.jsx(ht, {
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__ */ We.jsx(_t, {
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
- }), Ut = "_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 = {
853
- filePickerTree: Ut,
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 ft(l) {
864
- if (!l) return [];
865
- const s = l.replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/").replace(/\/$/, "") || l, C = s.startsWith("/"), h = s.split("/").filter(Boolean), x = [];
866
- let P = C ? "/" : "";
867
- C && x.push("/");
868
- for (const T of h)
869
- !P || P === "/" ? P = P === "/" ? `/${T}` : T : P = `${P}/${T}`, x.push(P);
870
- return x;
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(l, s) {
873
- if (!l || !s || l === s) return !1;
874
- const C = l === "/" ? "/" : l.replace(/\/{2,}/g, "/"), h = s.replace(/\/{2,}/g, "/");
875
- return C === "/" ? h.startsWith("/") && h !== "/" : h.startsWith(`${C}/`);
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 dt(l, s, C) {
878
- return l && (l === s ? C : l.startsWith(s === "/" ? "/" : `${s}/`) ? C + l.slice(s.length) : l);
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: s,
882
- root: C = "/wordpress",
883
- initialSelectedPath: h,
884
- onSelect: x = () => {
885
- }
886
- }, P) {
887
- const T = wt(() => {
888
- let t = (C || "/").replace(/\\+/g, "/");
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
- }, [C]), H = (t) => !t || t === "." || t === ".." ? !1 : !/[\\/]/.test(t), [k, O] = Q(() => {
891
- if (!h)
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 ft(h))
910
+ for (const r of dt(g))
895
911
  t[r] = !0;
896
912
  return t;
897
- }), [y, I] = Q(
898
- () => h ?? null
899
- ), [M, F] = Q(
900
- () => h ?? null
901
- ), [ee, q] = Q({}), [he, S] = Q(
913
+ }), [R, V] = ae(
914
+ () => g ?? null
915
+ ), [Q, $] = ae(
916
+ () => g ?? null
917
+ ), [Z, he] = ae({}), [j, T] = ae(
902
918
  {}
903
- ), [R, se] = Q(null), [we, K] = Q(
919
+ ), [fe, we] = ae(null), [ve, q] = ae(
904
920
  null
905
- ), W = re({}), ie = re(!1), ce = re(null), w = re(null), G = re(he), ne = re(ee), ue = () => {
906
- for (const t of Object.keys(W.current))
907
- clearTimeout(W.current[t]), delete W.current[t];
908
- }, Z = (t) => {
909
- const r = W.current[t];
910
- r && (clearTimeout(r), delete W.current[t]);
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
- le(() => {
913
- G.current = he;
914
- }, [he]), le(() => {
915
- ne.current = ee;
916
- }, [ee]);
917
- const j = (t) => {
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 = ce.current) == null ? void 0 : n.querySelector(
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
- }, L = (t, r = "") => (r ? `${r}/${t.name}` : t.name).replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/"), be = (t, r) => t.children ? t.children : ee[r], _e = async (t, r) => {
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 m = r === "/" ? `/${a}` : `${r}/${a}`, f = await t.isDir(m);
927
- i.push({ name: a, type: f ? "folder" : "file" });
928
- }
929
- return i.sort((a, m) => a.type !== m.type ? a.type === "folder" ? -1 : 1 : a.name.localeCompare(m.name)), i;
930
- }, ge = async (t) => await _e(s, t), oe = (t, r) => {
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 ?? ne.current[t];
934
- return n || G.current[t] ? n : (S((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
935
- ge(t).then((a) => {
936
- q((m) => ({
937
- ...m,
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
- S((a) => {
944
- const m = { ...a };
945
- return delete m[t], m;
971
+ T((a) => {
972
+ const p = { ...a };
973
+ return delete p[t], p;
946
974
  });
947
975
  });
948
976
  }));
949
- }, ve = (t, r) => {
950
- r.type === "folder" && (typeof window > "u" || W.current[t] || (W.current[t] = window.setTimeout(() => {
951
- O((n) => n[t] ? n : { ...n, [t]: !0 }), oe(t, r), delete W.current[t];
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
- }, A = (t) => (S((r) => ({ ...r, [t]: !0 })), new Promise((r) => {
954
- ge(t).then((n) => {
955
- q((i) => ({
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
- S((n) => {
990
+ T((n) => {
963
991
  const i = { ...n };
964
992
  return delete i[t], i;
965
993
  });
966
994
  });
967
- })), ye = (t, r, n) => {
968
- O((i) => ({
995
+ })), se = (t, r, n) => {
996
+ _((i) => ({
969
997
  ...i,
970
998
  [t]: n
971
- })), n ? oe(t, r) : q((i) => {
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
- }, ae = async (t) => {
1005
+ }, le = async (t) => {
978
1006
  if (!t) return;
979
- const r = ft(t);
1007
+ const r = dt(t);
980
1008
  if (r.length === 0) return;
981
- O((a) => {
982
- const m = { ...a };
983
- for (const f of r)
984
- m[f] = !0;
985
- return m;
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: T, type: "folder" }
1016
+ { name: P, type: "folder" }
989
1017
  ], i = "";
990
1018
  for (const a of r) {
991
- const m = n == null ? void 0 : n.find((g) => L(g, i) === a);
992
- if (!m || m.type !== "folder") {
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 oe(a, m) ?? ne.current[a], i = a;
1024
+ n = await de(a, p) ?? oe.current[a], i = a;
997
1025
  }
998
- }, fe = (t, r) => {
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
- O((a) => {
1003
- let m = !1;
1004
- const f = { ...a };
1005
- for (const g of Object.keys(a)) {
1006
- const N = i(g);
1007
- N && N !== g && (f[N] = a[g], delete f[g], m = !0);
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 m ? f : a;
1010
- }), q((a) => {
1011
- let m = !1;
1012
- const f = { ...a };
1013
- for (const g of Object.keys(a)) {
1014
- const N = i(g);
1015
- N && N !== g && (f[N] = a[g], delete f[g], m = !0);
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 m ? f : a;
1018
- }), I((a) => a && (i(a) ?? a)), F((a) => a && (i(a) ?? a));
1019
- }, Re = () => {
1020
- se(null), K(null), ue();
1021
- }, de = (t, r = !0) => {
1022
- I(t), r && x(t);
1023
- }, B = wt(() => [{ name: T, type: "folder" }], [T]), [u, $] = Q(null), [me, Y] = Q(null), z = re(null), Se = me;
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
- P,
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 && de(t, a), F(t), i && j(t);
1062
+ n && ge(t, a), $(t), i && L(t);
1035
1063
  },
1036
1064
  selectPath: (t) => {
1037
- t && (de(t), F(t), j(t));
1065
+ t && (ge(t), $(t), L(t));
1038
1066
  },
1039
- getSelectedPath: () => y,
1040
- expandToPath: async (t) => await ae(t),
1041
- refresh: async (t) => await A(t),
1042
- remapPath: fe,
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 xe(t, "file", "untitled.php");
1072
+ await Oe(t, "file", "untitled.php");
1045
1073
  },
1046
1074
  createFolder: async (t) => {
1047
- await xe(t, "folder", "New Folder");
1075
+ await Oe(t, "folder", "New Folder");
1048
1076
  }
1049
1077
  }),
1050
- [y, A, fe, ae]
1078
+ [R, z, be, le]
1051
1079
  );
1052
- const Ze = re(!1), pe = re(
1053
- h ?? null
1054
- ), Ee = re(h);
1055
- le(() => {
1056
- ie.current = !1;
1057
- }, [T]), le(() => {
1058
- h && h !== Ee.current ? pe.current = h : h || (pe.current = null), Ee.current = h;
1059
- }, [h]), le(() => {
1060
- if (!h || Ze.current)
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
- Ze.current = !0;
1063
- const t = ft(h);
1064
- O((n) => {
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] || h;
1071
- F(r), I(r), ae(h);
1072
- }, [h, ae]), le(() => {
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 || B.length === 0 || (pe.current = null, ae(t));
1075
- }, [B, ae]), le(() => {
1076
- if (!M) {
1077
- if (B.length > 0) {
1078
- const t = L(B[0]);
1079
- F(t);
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
- Se && Se === M || j(M);
1084
- }, [
1085
- B,
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 = B[0];
1094
- if ((t == null ? void 0 : t.type) !== "folder" || ie.current)
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
- ie.current = !0, O(
1119
+ Ee.current = !0, _(
1098
1120
  (n) => n[r] ? n : { ...n, [r]: !0 }
1099
- ), !ne.current[r] && !G.current[r] && oe(r, t);
1100
- }, [B, oe, T]), le(() => () => {
1101
- w.current && clearTimeout(w.current), ue();
1102
- }, []);
1103
- const [Ye, Oe] = Q(""), De = (t, r) => {
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 = ke(r);
1135
+ const n = je(r);
1107
1136
  return n && n || "/";
1108
- }, Ne = (t, r, n) => {
1109
- const i = De(t, r);
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
- }, nt = (t, r, n) => {
1120
- r.type !== "folder" && r.type !== "file" || (se(n), K(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
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
- }, Me = () => {
1125
- Re();
1153
+ }, nt = () => {
1154
+ me();
1126
1155
  }, at = (t, r, n) => {
1127
- const i = Ne(r, n, R);
1128
- i.allowed && r.type === "folder" && ve(n, r), K((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state });
1129
- }, it = (t, r, n) => {
1130
- const i = Ne(r, n, R);
1131
- i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = R ? "move" : "copy"), r.type === "folder" && ve(n, r), K((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), Z(n), K((a) => (a == null ? void 0 : a.path) === n && a.state === "invalid" ? a : { path: n, state: "invalid" }));
1132
- }, ze = (t, r, n) => {
1133
- Z(n);
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) || K((a) => (a == null ? void 0 : a.path) === n ? null : a);
1136
- }, Ue = async (t, r, n) => {
1137
- const i = R, a = Ne(r, n, 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
- Re();
1168
+ me();
1140
1169
  return;
1141
1170
  }
1142
- t.preventDefault(), t.stopPropagation(), Z(n), K(null);
1171
+ t.preventDefault(), t.stopPropagation(), K(n), q(null);
1143
1172
  try {
1144
- i ? await lt(i, a.destination) : await $e(t, a.destination);
1173
+ i ? await lt(i, a.destination) : await Qe(t, a.destination);
1145
1174
  } finally {
1146
- Re();
1175
+ me();
1147
1176
  }
1148
- }, qe = (t, r, n) => {
1149
- t.preventDefault(), t.stopPropagation(), Y(null), $({
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
- }, Fe = async (t, r) => {
1184
+ }, Se = async (t, r) => {
1156
1185
  let n = r, i = 0;
1157
- const a = (f) => {
1158
- const g = f.lastIndexOf(".");
1159
- return g > 0 ? { stem: f.slice(0, g), ext: f.slice(g) } : { stem: f, ext: "" };
1160
- }, m = t === "/" ? "" : t;
1161
- for (; await (s == null ? void 0 : s.fileExists(`${m}/${n}`)) || await (s == null ? void 0 : s.isDir(`${m}/${n}`)); ) {
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: f, ext: g } = a(r);
1164
- n = `${f} (${i})${g}`;
1192
+ const { stem: u, ext: h } = a(r);
1193
+ n = `${u} (${i})${h}`;
1165
1194
  }
1166
1195
  return n;
1167
- }, xe = async (t, r, n) => {
1168
- if (!s) return;
1169
- let i = t || y || T;
1196
+ }, Oe = async (t, r, n) => {
1197
+ if (!l) return;
1198
+ let i = t || R || P;
1170
1199
  try {
1171
- await s.isDir(i) || (i = ke(i));
1200
+ await l.isDir(i) || (i = je(i));
1172
1201
  } catch {
1173
- i = ke(i);
1202
+ i = je(i);
1174
1203
  }
1175
- const a = i, m = await Fe(a, n), f = Ae(a, m);
1176
- r === "folder" ? await s.mkdir(f) : await s.writeFile(f, ""), z.current = { type: r, tempPath: f }, Y(f), await A(a), setTimeout(() => {
1177
- F(f), j(f);
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
- }, Ke = async (t) => {
1180
- if (!s) return !1;
1208
+ }, ot = async (t) => {
1209
+ if (!l) return !1;
1181
1210
  try {
1182
- if (await s.fileExists(t))
1211
+ if (await l.fileExists(t))
1183
1212
  return !0;
1184
1213
  } catch {
1185
1214
  }
1186
1215
  try {
1187
- if (await s.isDir(t))
1216
+ if (await l.isDir(t))
1188
1217
  return !0;
1189
1218
  } catch {
1190
1219
  }
1191
1220
  return !1;
1192
- }, ot = async (t) => {
1193
- if (s)
1221
+ }, st = async (t) => {
1222
+ if (l)
1194
1223
  try {
1195
- await s.mkdir(t);
1224
+ await l.mkdir(t);
1196
1225
  } catch (r) {
1197
- if (!await s.isDir(t).catch(() => !1))
1226
+ if (!await l.isDir(t).catch(() => !1))
1198
1227
  throw r;
1199
1228
  }
1200
1229
  }, lt = async (t, r) => {
1201
- if (!s) return;
1202
- const n = Mt(t), i = Ae(r, n);
1203
- if (i === t || await Ke(i))
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 = ke(t);
1234
+ const a = je(t);
1206
1235
  try {
1207
- await s.mv(t, i), fe(t, i);
1208
- const m = dt(
1209
- y,
1236
+ await l.mv(t, i), be(t, i);
1237
+ const p = mt(
1238
+ R,
1210
1239
  t,
1211
1240
  i
1212
1241
  );
1213
- y && (y === t || y.startsWith(`${t}/`)) && x(m), F(
1214
- (f) => dt(f, t, i)
1215
- ), O((f) => ({
1216
- ...f,
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
- A(a),
1220
- A(r)
1221
- ]), I(
1222
- (f) => dt(f, t, i)
1223
- ), j(i);
1248
+ z(a),
1249
+ z(r)
1250
+ ]), V(
1251
+ (u) => mt(u, t, i)
1252
+ ), L(i);
1224
1253
  } catch {
1225
1254
  }
1226
- }, st = (t) => {
1255
+ }, ct = (t) => {
1227
1256
  const r = t;
1228
1257
  return r.webkitGetAsEntry ? r.webkitGetAsEntry() : null;
1229
- }, ct = (t) => new Promise((r, n) => {
1258
+ }, ut = (t) => new Promise((r, n) => {
1230
1259
  t.file(r, n);
1231
- }), Ge = async (t, r) => {
1232
- if (!s) return;
1233
- const n = t.name || "untitled", i = await Fe(r, n), a = Ae(r, i), m = new Uint8Array(await t.arrayBuffer());
1234
- await s.writeFile(a, m);
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 Fe(
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 = Ae(r, n);
1243
- await ot(i);
1244
- const a = t.createReader(), m = () => new Promise((f, g) => {
1271
+ ), i = Ne(r, n);
1272
+ await st(i);
1273
+ const a = t.createReader(), p = () => new Promise((u, h) => {
1245
1274
  a.readEntries(
1246
- (N) => f(Array.from(N)),
1247
- g
1275
+ (O) => u(Array.from(O)),
1276
+ h
1248
1277
  );
1249
1278
  });
1250
1279
  for (; ; ) {
1251
- const f = await m();
1252
- if (!f.length)
1280
+ const u = await p();
1281
+ if (!u.length)
1253
1282
  break;
1254
- for (const g of f)
1255
- g.isFile ? await Je(
1256
- g,
1283
+ for (const h of u)
1284
+ h.isFile ? await Xe(
1285
+ h,
1257
1286
  i
1258
- ) : g.isDirectory && await Xe(
1259
- g,
1287
+ ) : h.isDirectory && await Fe(
1288
+ h,
1260
1289
  i
1261
1290
  );
1262
1291
  }
1263
- }, $e = async (t, r) => {
1264
- var a, m;
1265
- if (!s) return;
1266
- const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((f) => f.kind === "file").map((f) => st(f)).filter((f) => !!f);
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 f of i)
1269
- f.isFile ? await Je(
1270
- f,
1297
+ for (const u of i)
1298
+ u.isFile ? await Xe(
1299
+ u,
1271
1300
  r
1272
- ) : f.isDirectory && await Xe(
1273
- f,
1301
+ ) : u.isDirectory && await Fe(
1302
+ u,
1274
1303
  r
1275
1304
  );
1276
1305
  else {
1277
- const f = (m = t.dataTransfer) != null && m.files ? Array.from(t.dataTransfer.files) : [];
1278
- for (const g of f)
1279
- await Ge(g, r);
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 A(r), O((f) => ({
1282
- ...f,
1310
+ await z(r), _((u) => ({
1311
+ ...u,
1283
1312
  [r]: !0
1284
1313
  }));
1285
- }, Qe = async (t, r) => {
1286
- if (!s) return;
1314
+ }, Re = async (t, r) => {
1315
+ if (!l) return;
1287
1316
  const n = t;
1288
- $(null);
1317
+ re(null);
1289
1318
  try {
1290
- r === "folder" ? await s.rmdir(n, { recursive: !0 }) : await s.unlink(n);
1319
+ r === "folder" ? await l.rmdir(n, { recursive: !0 }) : await l.unlink(n);
1291
1320
  } catch {
1292
1321
  } finally {
1293
- Y(null);
1294
- const i = ke(n);
1295
- await A(i), y && (y === n || y.startsWith(`${n}/`)) && x(null);
1322
+ F(null);
1323
+ const i = je(n);
1324
+ await z(i), R && (R === n || R.startsWith(`${n}/`)) && k(null);
1296
1325
  }
1297
- }, Ce = (t) => {
1326
+ }, We = (t) => {
1298
1327
  var r;
1299
- if (t.key.length === 1 && t.key.match(/\S/)) {
1300
- const n = Ye + t.key.toLowerCase();
1301
- if (Oe(n), w.current && clearTimeout(w.current), w.current = setTimeout(() => {
1302
- Oe("");
1303
- }, 1e3), !ce.current)
1304
- return;
1305
- const i = Array.from(
1306
- ce.current.querySelectorAll(".file-node-button")
1307
- ), a = document.activeElement;
1308
- let m = 0;
1309
- a && i.includes(a) && (m = i.indexOf(
1310
- a
1311
- ));
1312
- for (let f = 0; f < i.length; f++) {
1313
- const g = (m + f) % i.length, N = i[g];
1314
- if ((r = N.textContent) != null && r.toLowerCase().trim().startsWith(n)) {
1315
- N.focus();
1316
- const Te = N.getAttribute("data-path");
1317
- Te && F(Te);
1318
- break;
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
- } else
1322
- Oe(""), w.current && clearTimeout(w.current);
1323
- }, He = async (t, r) => {
1324
- const n = z.current, i = (n == null ? void 0 : n.tempPath) === t, a = ke(t), m = (r || "").trim();
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 s.rmdir(t, {
1358
+ n.type === "folder" ? await l.rmdir(t, {
1329
1359
  recursive: !0
1330
- }) : await s.unlink(t);
1360
+ }) : await l.unlink(t);
1331
1361
  } catch {
1332
1362
  }
1333
- z.current = null;
1363
+ ne.current = null;
1334
1364
  }
1335
- Y(i ? null : t);
1365
+ F(i ? null : t);
1336
1366
  return;
1337
1367
  }
1338
- let f = Ae(a, m), g = f;
1339
- if (g === t) {
1340
- Y(null), i && (z.current = null), setTimeout(() => {
1341
- F(g), j(g);
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 N = await s.fileExists(g), Te = await s.isDir(g);
1346
- if ((N || Te) && g !== t)
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 tt = await Fe(
1381
+ const Ae = await Se(
1350
1382
  a === "/" ? "/" : a,
1351
- m
1383
+ p
1352
1384
  );
1353
- f = Ae(a, tt), g = f;
1385
+ u = Ne(a, Ae), h = u;
1354
1386
  } catch {
1355
1387
  }
1356
1388
  else {
1357
- Y(t);
1389
+ F(t);
1358
1390
  return;
1359
1391
  }
1360
- let et = (n == null ? void 0 : n.type) === "folder";
1392
+ let He = (n == null ? void 0 : n.type) === "folder";
1361
1393
  try {
1362
- await s.mv(t, f), n || (et = await s.isDir(f)), et && fe(t, g), y === t && x(g), await A(a), F(g), j(g);
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 s.rmdir(t, {
1398
+ (n == null ? void 0 : n.type) === "folder" ? await l.rmdir(t, {
1367
1399
  recursive: !0
1368
- }) : await s.unlink(t);
1400
+ }) : await l.unlink(t);
1369
1401
  } catch {
1370
1402
  }
1371
1403
  } finally {
1372
- z.current = null, Y(null);
1404
+ ne.current = null, F(null);
1373
1405
  }
1374
- }, Ie = async (t) => {
1375
- const r = z.current;
1376
- if (!s || (r == null ? void 0 : r.tempPath) !== t) {
1377
- Y((i) => i === t ? null : i);
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 s.rmdir(t, { recursive: !0 }) : await s.unlink(t);
1413
+ r.type === "folder" ? await l.rmdir(t, { recursive: !0 }) : await l.unlink(t);
1382
1414
  } catch {
1383
1415
  }
1384
- z.current = null, Y(null);
1385
- const n = ke(t);
1386
- await A(n), F(n), j(n);
1416
+ ne.current = null, F(null);
1417
+ const n = je(t);
1418
+ await z(n), $(n), L(n);
1387
1419
  };
1388
- return /* @__PURE__ */ d.createElement("div", { onKeyDown: Ce, ref: ce }, /* @__PURE__ */ d.createElement(Dt, { className: X.filePickerTree }, B.map((t, r) => /* @__PURE__ */ d.createElement(
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: B.length,
1396
- expandedNodePaths: k,
1397
- onToggle: ye,
1398
- selectedNode: y,
1399
- focusPath: (n) => F(n),
1400
- focusedNode: M,
1401
- selectPath: de,
1402
- generatePath: L,
1403
- getChildren: be,
1404
- onContextMenu: qe,
1405
- renamingPath: Se,
1406
- onRename: He,
1407
- onRenameCancel: Ie,
1408
- dropIndicator: we,
1409
- onDragStart: nt,
1410
- onDragEnd: Me,
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: it,
1413
- onDragLeave: ze,
1414
- onDrop: Ue,
1415
- rootPath: T
1416
- }
1417
- ))), u && /* @__PURE__ */ d.createElement(
1418
- Ft,
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: () => $(null),
1454
+ onClose: () => re(null),
1422
1455
  anchor: {
1423
1456
  getBoundingClientRect: () => ({
1424
- x: u.x,
1425
- y: u.y,
1457
+ x: D.x,
1458
+ y: D.y,
1426
1459
  width: 0,
1427
1460
  height: 0,
1428
- top: u.y,
1429
- left: u.x,
1430
- right: u.x,
1431
- bottom: u.y,
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__ */ d.createElement(jt, { role: "menu" }, u.type === "folder" && /* @__PURE__ */ d.createElement(
1441
- rt,
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
- $(null), await xe(
1446
- u.absPath,
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
- ), u.type === "folder" && /* @__PURE__ */ d.createElement(
1454
- rt,
1486
+ ), D.type === "folder" && /* @__PURE__ */ f.createElement(
1487
+ tt,
1455
1488
  {
1456
1489
  role: "menuitem",
1457
1490
  onClick: async () => {
1458
- $(null), await xe(
1459
- u.absPath,
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__ */ d.createElement(
1467
- rt,
1499
+ ), /* @__PURE__ */ f.createElement(
1500
+ tt,
1468
1501
  {
1469
1502
  role: "menuitem",
1470
1503
  onClick: () => {
1471
- $(null), Y(u.absPath);
1504
+ re(null), F(D.absPath);
1472
1505
  }
1473
1506
  },
1474
1507
  "Rename"
1475
- ), /* @__PURE__ */ d.createElement(
1476
- rt,
1508
+ ), /* @__PURE__ */ f.createElement(
1509
+ tt,
1477
1510
  {
1478
1511
  role: "menuitem",
1479
- onClick: () => Qe(
1480
- u.absPath,
1481
- u.type
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: l,
1489
- level: s,
1490
- position: C,
1491
- setSize: h,
1492
- expandedNodePaths: x,
1493
- onToggle: P,
1494
- selectedNode: T,
1495
- focusPath: H,
1496
- focusedNode: k,
1497
- selectPath: O,
1498
- generatePath: y,
1499
- getChildren: I,
1500
- onContextMenu: M,
1501
- renamingPath: F,
1502
- onRename: ee,
1503
- onRenameCancel: q,
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: S,
1506
- onDragStart: R,
1507
- onDragEnd: se,
1538
+ dropIndicator: j,
1539
+ onDragStart: T,
1540
+ onDragEnd: fe,
1508
1541
  onDragEnter: we,
1509
- onDragOver: K,
1510
- onDragLeave: W,
1511
- onDrop: ie,
1512
- rootPath: ce
1542
+ onDragOver: ve,
1543
+ onDragLeave: q,
1544
+ onDrop: B,
1545
+ rootPath: Ee,
1546
+ onDoubleClickFile: ee
1513
1547
  }) => {
1514
- const w = y(l, he), G = x[w], ne = F === w, ue = re(null), [Z, j] = Q(l.name), L = re(!1), be = (S == null ? void 0 : S.path) === w, _e = be && (S == null ? void 0 : S.state) === "valid", ge = be && (S == null ? void 0 : S.state) === "invalid", oe = !ne && w !== ce, ve = {
1515
- onDragEnter: (u) => we == null ? void 0 : we(u, l, w),
1516
- onDragOver: (u) => K == null ? void 0 : K(u, l, w),
1517
- onDragLeave: (u) => W == null ? void 0 : W(u, l, w),
1518
- onDrop: (u) => ie == null ? void 0 : ie(u, l, w)
1519
- }, A = I(l, w) ?? [];
1520
- le(() => {
1521
- var u;
1522
- ne ? (j(l.name), L.current = !1, typeof window < "u" && window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1523
- var $;
1524
- ($ = ue.current) == null || $.select();
1525
- }) : (u = ue.current) == null || u.select()) : L.current = !1;
1526
- }, [ne, l.name]);
1527
- const ye = () => {
1528
- l.type === "folder" && P(w, l, !G);
1529
- }, ae = (u) => {
1530
- var $, me, Y;
1531
- if (u.key === "ArrowLeft")
1532
- G ? ye() : ($ = document.querySelector(
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 || $.focus(), u.preventDefault(), u.stopPropagation();
1535
- else if (u.key === "ArrowRight") {
1536
- if (G) {
1537
- if (A != null && A.length) {
1538
- const z = y(
1539
- A[0],
1540
- w
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
- (me = document.querySelector(
1543
- `[data-path="${z}"]`
1544
- )) == null || me.focus();
1576
+ (ne = document.querySelector(
1577
+ `[data-path="${Ce}"]`
1578
+ )) == null || ne.focus();
1545
1579
  }
1546
1580
  } else
1547
- ye();
1548
- u.preventDefault(), u.stopPropagation();
1549
- } else if (u.key === " " || u.key === "Space" || u.key === "Spacebar")
1550
- l.type === "folder" && P(w, l, !G), u.preventDefault();
1551
- else if (u.key === "Enter") {
1552
- O(w), H(w);
1553
- const z = (Y = u.currentTarget) == null ? void 0 : Y.closest("form");
1554
- z && setTimeout(() => {
1555
- z.dispatchEvent(new Event("submit", { bubbles: !0 }));
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
- }, fe = (u) => {
1559
- M == null || M(u, l, w);
1560
- }, Re = (u) => {
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
- (u.key === "ArrowLeft" || u.key === "ArrowRight" || u.key === "ArrowUp" || u.key === "ArrowDown") && u.stopPropagation();
1568
- }, B = () => {
1569
- L.current || q == null || q(w), L.current = !1;
1606
+ I(m, !1), P(m), I(m, !0), G.current = window.setTimeout(() => {
1607
+ G.current = null;
1608
+ }, 300);
1570
1609
  };
1571
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
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: s,
1575
- positionInSet: C,
1576
- setSize: h
1615
+ level: l,
1616
+ positionInSet: E,
1617
+ setSize: g
1577
1618
  },
1578
- /* @__PURE__ */ d.createElement(Vt, null, () => /* @__PURE__ */ d.createElement(d.Fragment, null, ne ? /* @__PURE__ */ d.createElement(
1619
+ /* @__PURE__ */ f.createElement($t, null, () => /* @__PURE__ */ f.createElement(f.Fragment, null, oe ? /* @__PURE__ */ f.createElement(
1579
1620
  "form",
1580
1621
  {
1581
- onSubmit: Re,
1582
- className: gt(
1622
+ onSubmit: ge,
1623
+ className: yt(
1583
1624
  X.fileNodeButton,
1584
1625
  X.renaming,
1585
1626
  "file-node-button",
1586
1627
  {
1587
- [X.selected]: T === w,
1588
- [X.focused]: k === w,
1589
- [X.dropTarget]: _e,
1590
- [X.dropTargetInvalid]: ge
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": w,
1594
- onContextMenu: fe,
1595
- ...ve
1634
+ "data-path": m,
1635
+ onContextMenu: me,
1636
+ ...z
1596
1637
  },
1597
- /* @__PURE__ */ d.createElement(
1598
- Ct,
1638
+ /* @__PURE__ */ f.createElement(
1639
+ bt,
1599
1640
  {
1600
- node: l,
1601
- isOpen: l.type === "folder" && G,
1602
- level: s,
1641
+ node: s,
1642
+ isOpen: s.type === "folder" && H,
1643
+ level: l,
1603
1644
  hideName: !0
1604
1645
  }
1605
1646
  ),
1606
- /* @__PURE__ */ d.createElement(
1647
+ /* @__PURE__ */ f.createElement(
1607
1648
  "input",
1608
1649
  {
1609
- ref: ue,
1650
+ ref: Y,
1610
1651
  className: X.renameInput,
1611
- value: Z,
1612
- onChange: (u) => j(u.target.value),
1613
- onBlur: B,
1614
- onFocus: () => H(w),
1615
- onKeyDown: de
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__ */ d.createElement(
1619
- mt,
1659
+ ) : /* @__PURE__ */ f.createElement(
1660
+ pt,
1620
1661
  {
1621
- ...ve,
1622
- draggable: oe,
1623
- onDragStart: (u) => R == null ? void 0 : R(u, l, w),
1624
- onDragEnd: (u) => se == null ? void 0 : se(u, l, w),
1625
- onClick: () => {
1626
- l.type === "folder" && ye(), O(w), H(w);
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
- H(w);
1669
+ P(m);
1631
1670
  },
1632
- onContextMenu: fe,
1633
- className: gt(
1671
+ onContextMenu: me,
1672
+ className: yt(
1634
1673
  X.fileNodeButton,
1674
+ "file-node-button",
1635
1675
  {
1636
- [X.selected]: T === w,
1637
- [X.focused]: k === w,
1638
- [X.dropTarget]: _e,
1639
- [X.dropTargetInvalid]: ge
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": w,
1643
- "data-expanded": G ? "true" : "false"
1682
+ "data-path": m,
1683
+ "data-expanded": H ? "true" : "false"
1644
1684
  },
1645
- /* @__PURE__ */ d.createElement(
1646
- Ct,
1685
+ /* @__PURE__ */ f.createElement(
1686
+ bt,
1647
1687
  {
1648
- node: l,
1649
- isOpen: l.type === "folder" && G,
1650
- level: s
1688
+ node: s,
1689
+ isOpen: s.type === "folder" && H,
1690
+ level: l
1651
1691
  }
1652
1692
  )
1653
1693
  )))
1654
- ), G && A && A.map((u, $) => /* @__PURE__ */ d.createElement(
1694
+ ), H && se && se.map((d, F) => /* @__PURE__ */ f.createElement(
1655
1695
  Rt,
1656
1696
  {
1657
- key: u.name,
1658
- node: u,
1659
- level: s + 1,
1660
- position: $ + 1,
1661
- setSize: A.length,
1662
- expandedNodePaths: x,
1663
- onToggle: P,
1664
- selectedNode: T,
1665
- focusPath: H,
1666
- focusedNode: k,
1667
- selectPath: O,
1668
- generatePath: y,
1669
- getChildren: I,
1670
- onContextMenu: M,
1671
- renamingPath: F,
1672
- onRename: ee,
1673
- onRenameCancel: q,
1674
- parentPath: w,
1675
- dropIndicator: S,
1676
- onDragStart: R,
1677
- onDragEnd: se,
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: K,
1680
- onDragLeave: W,
1681
- onDrop: ie,
1682
- rootPath: ce
1719
+ onDragOver: ve,
1720
+ onDragLeave: q,
1721
+ onDrop: B,
1722
+ rootPath: Ee,
1723
+ onDoubleClickFile: ee
1683
1724
  }
1684
1725
  )));
1685
- }, Ct = ({ node: l, level: s, isOpen: C, hideName: h = !1 }) => {
1686
- const x = [];
1687
- for (let P = 0; P < s; P++)
1688
- x.push("&nbsp;&nbsp;&nbsp;&nbsp;");
1689
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
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("&nbsp;&nbsp;&nbsp;&nbsp;");
1730
+ return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
1690
1731
  "span",
1691
1732
  {
1692
1733
  "aria-hidden": "true",
1693
- dangerouslySetInnerHTML: { __html: x.join("") }
1734
+ dangerouslySetInnerHTML: { __html: k.join("") }
1694
1735
  }
1695
- ), l.type === "folder" ? /* @__PURE__ */ d.createElement(vt, { width: 16, icon: C ? Yt : zt }) : /* @__PURE__ */ d.createElement("div", { style: { width: 16 } }, " "), /* @__PURE__ */ d.createElement(vt, { width: 16, icon: l.type === "folder" ? Lt : Bt }), !h && /* @__PURE__ */ d.createElement("span", { className: X.fileName }, l.name));
1696
- }, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37", lr = "_modal_kp9d9_43", sr = "_modal-footer_kp9d9_48", Ve = {
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: lr,
1701
- modalFooter: sr
1741
+ modal: sr,
1742
+ modalFooter: lr
1702
1743
  };
1703
- function cr({ path: l }) {
1704
- if (!l)
1705
- return /* @__PURE__ */ d.createElement("div", { className: Ve.pathPreview }, /* @__PURE__ */ d.createElement("i", null, "Select a path"));
1706
- const s = l.split("/");
1707
- let C = (s.length > 2 ? "/" : "") + s.pop();
1708
- C.length > 10 && (C = C.substring(C.length - 10));
1709
- const h = l.substring(
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
- l.length - C.length
1752
+ s.length - E.length
1712
1753
  );
1713
- return /* @__PURE__ */ d.createElement(
1754
+ return /* @__PURE__ */ f.createElement(
1714
1755
  "div",
1715
1756
  {
1716
- className: Ve.pathPreview,
1717
- "data-content-start": h,
1718
- "data-content-end": C
1757
+ className: Me.pathPreview,
1758
+ "data-content-start": g,
1759
+ "data-content-end": E
1719
1760
  }
1720
1761
  );
1721
1762
  }
1722
- function _r({
1723
- value: l = "",
1724
- onChange: s,
1725
- filesystem: C
1763
+ function Cr({
1764
+ value: s = "",
1765
+ onChange: l,
1766
+ filesystem: E
1726
1767
  }) {
1727
- const [h, x] = Q(!1), P = () => x(!0), T = () => x(!1), [H, k] = Q(
1728
- l || null
1768
+ const [g, k] = ae(!1), C = () => k(!0), M = () => k(!1), [P, S] = ae(
1769
+ s || null
1729
1770
  );
1730
- function O(y) {
1731
- y == null || y.preventDefault(), s(H || ""), T();
1771
+ function I(_) {
1772
+ _ == null || _.preventDefault(), l(P || ""), M();
1732
1773
  }
1733
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
1734
- mt,
1774
+ return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
1775
+ pt,
1735
1776
  {
1736
1777
  variant: "tertiary",
1737
- className: Ve.control,
1738
- onClick: P
1778
+ className: Me.control,
1779
+ onClick: C
1739
1780
  },
1740
- /* @__PURE__ */ d.createElement("span", { className: Ve.browseLabel }, "Browse"),
1741
- /* @__PURE__ */ d.createElement(cr, { path: l || "" })
1742
- ), h && /* @__PURE__ */ d.createElement(
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: T,
1747
- className: Ve.modal
1787
+ onRequestClose: M,
1788
+ className: Me.modal
1748
1789
  },
1749
- /* @__PURE__ */ d.createElement("form", { onSubmit: O }, /* @__PURE__ */ d.createElement(
1790
+ /* @__PURE__ */ f.createElement("form", { onSubmit: I }, /* @__PURE__ */ f.createElement(
1750
1791
  nr,
1751
1792
  {
1752
- filesystem: C,
1753
- initialSelectedPath: l,
1754
- onSelect: k
1793
+ filesystem: E,
1794
+ initialSelectedPath: s,
1795
+ onSelect: S
1755
1796
  }
1756
- ), /* @__PURE__ */ d.createElement("div", { className: Ve.modalFooter }, /* @__PURE__ */ d.createElement(mt, { type: "submit", variant: "primary" }, "Select Path")))
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
- yr as ClockIcon,
1761
- _r as FilePickerControl,
1801
+ vr as ClockIcon,
1802
+ Cr as FilePickerControl,
1762
1803
  nr as FilePickerTree,
1763
1804
  br as SiteManagerIcon,
1764
- vr as WordPressIcon,
1805
+ yr as WordPressIcon,
1765
1806
  Bt as file,
1766
- Lt as folder,
1767
- Cr as getLogoDataURL,
1807
+ Wt as folder,
1808
+ _r as getLogoDataURL,
1768
1809
  Er as layout,
1769
1810
  wr as playgroundLogo,
1770
1811
  gr as temporaryStorage