UNPKG

@valikwp/react-file-manager

Version:

React File Manager is an open-source, user-friendly component designed to easily manage files and folders within applications. With smooth drag-and-drop functionality, responsive design, and efficient navigation, it simplifies file handling in any React p

1,012 lines (1,010 loc) 144 kB
import * as Be from "react"; import Pe, { useState as k, useRef as de, useEffect as ee, createContext as He, useContext as We, useCallback as pr, useLayoutEffect as un, useMemo as jt } from "react"; function dn(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var gt = { exports: {} }, Ie = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var zt; function fn() { if (zt) return Ie; zt = 1; var e = Pe, r = Symbol.for("react.element"), s = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 }; function i(u, d, h) { var f, p = {}, w = null, C = null; h !== void 0 && (w = "" + h), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (C = d.ref); for (f in d) n.call(d, f) && !c.hasOwnProperty(f) && (p[f] = d[f]); if (u && u.defaultProps) for (f in d = u.defaultProps, d) p[f] === void 0 && (p[f] = d[f]); return { $$typeof: r, type: u, key: w, ref: C, props: p, _owner: o.current }; } return Ie.Fragment = s, Ie.jsx = i, Ie.jsxs = i, Ie; } var $e = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var At; function hn() { return At || (At = 1, process.env.NODE_ENV !== "production" && function() { var e = Pe, r = Symbol.for("react.element"), s = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, z = "@@iterator"; function A(a) { if (a === null || typeof a != "object") return null; var g = P && a[P] || a[z]; return typeof g == "function" ? g : null; } var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function M(a) { { for (var g = arguments.length, R = new Array(g > 1 ? g - 1 : 0), B = 1; B < g; B++) R[B - 1] = arguments[B]; L("error", a, R); } } function L(a, g, R) { { var B = x.ReactDebugCurrentFrame, re = B.getStackAddendum(); re !== "" && (g += "%s", R = R.concat([re])); var oe = R.map(function(Q) { return String(Q); }); oe.unshift("Warning: " + g), Function.prototype.apply.call(console[a], console, oe); } } var T = !1, l = !1, v = !1, F = !1, y = !1, j; j = Symbol.for("react.module.reference"); function S(a) { return !!(typeof a == "string" || typeof a == "function" || a === n || a === c || y || a === o || a === h || a === f || F || a === C || T || l || v || typeof a == "object" && a !== null && (a.$$typeof === w || a.$$typeof === p || a.$$typeof === i || a.$$typeof === u || a.$$typeof === d || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. a.$$typeof === j || a.getModuleId !== void 0)); } function D(a, g, R) { var B = a.displayName; if (B) return B; var re = g.displayName || g.name || ""; return re !== "" ? R + "(" + re + ")" : R; } function O(a) { return a.displayName || "Context"; } function N(a) { if (a == null) return null; if (typeof a.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function") return a.displayName || a.name || null; if (typeof a == "string") return a; switch (a) { case n: return "Fragment"; case s: return "Portal"; case c: return "Profiler"; case o: return "StrictMode"; case h: return "Suspense"; case f: return "SuspenseList"; } if (typeof a == "object") switch (a.$$typeof) { case u: var g = a; return O(g) + ".Consumer"; case i: var R = a; return O(R._context) + ".Provider"; case d: return D(a, a.render, "ForwardRef"); case p: var B = a.displayName || null; return B !== null ? B : N(a.type) || "Memo"; case w: { var re = a, oe = re._payload, Q = re._init; try { return N(Q(oe)); } catch { return null; } } } return null; } var K = Object.assign, ie = 0, ae, ce, te, ve, m, E, H; function V() { } V.__reactDisabledLog = !0; function I() { { if (ie === 0) { ae = console.log, ce = console.info, te = console.warn, ve = console.error, m = console.group, E = console.groupCollapsed, H = console.groupEnd; var a = { configurable: !0, enumerable: !0, value: V, writable: !0 }; Object.defineProperties(console, { info: a, log: a, warn: a, error: a, group: a, groupCollapsed: a, groupEnd: a }); } ie++; } } function X() { { if (ie--, ie === 0) { var a = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: K({}, a, { value: ae }), info: K({}, a, { value: ce }), warn: K({}, a, { value: te }), error: K({}, a, { value: ve }), group: K({}, a, { value: m }), groupCollapsed: K({}, a, { value: E }), groupEnd: K({}, a, { value: H }) }); } ie < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var _ = x.ReactCurrentDispatcher, $; function U(a, g, R) { { if ($ === void 0) try { throw Error(); } catch (re) { var B = re.stack.trim().match(/\n( *(at )?)/); $ = B && B[1] || ""; } return ` ` + $ + a; } } var Z = !1, Y; { var he = typeof WeakMap == "function" ? WeakMap : Map; Y = new he(); } function b(a, g) { if (!a || Z) return ""; { var R = Y.get(a); if (R !== void 0) return R; } var B; Z = !0; var re = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var oe; oe = _.current, _.current = null, I(); try { if (g) { var Q = function() { throw Error(); }; if (Object.defineProperty(Q.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(Q, []); } catch (je) { B = je; } Reflect.construct(a, [], Q); } else { try { Q.call(); } catch (je) { B = je; } a.call(Q.prototype); } } else { try { throw Error(); } catch (je) { B = je; } a(); } } catch (je) { if (je && B && typeof je.stack == "string") { for (var J = je.stack.split(` `), ge = B.stack.split(` `), le = J.length - 1, ue = ge.length - 1; le >= 1 && ue >= 0 && J[le] !== ge[ue]; ) ue--; for (; le >= 1 && ue >= 0; le--, ue--) if (J[le] !== ge[ue]) { if (le !== 1 || ue !== 1) do if (le--, ue--, ue < 0 || J[le] !== ge[ue]) { var Ce = ` ` + J[le].replace(" at new ", " at "); return a.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", a.displayName)), typeof a == "function" && Y.set(a, Ce), Ce; } while (le >= 1 && ue >= 0); break; } } } finally { Z = !1, _.current = oe, X(), Error.prepareStackTrace = re; } var Ne = a ? a.displayName || a.name : "", ke = Ne ? U(Ne) : ""; return typeof a == "function" && Y.set(a, ke), ke; } function me(a, g, R) { return b(a, !1); } function Te(a) { var g = a.prototype; return !!(g && g.isReactComponent); } function Ee(a, g, R) { if (a == null) return ""; if (typeof a == "function") return b(a, Te(a)); if (typeof a == "string") return U(a); switch (a) { case h: return U("Suspense"); case f: return U("SuspenseList"); } if (typeof a == "object") switch (a.$$typeof) { case d: return me(a.render); case p: return Ee(a.type, g, R); case w: { var B = a, re = B._payload, oe = B._init; try { return Ee(oe(re), g, R); } catch { } } } return ""; } var Le = Object.prototype.hasOwnProperty, De = {}, G = x.ReactDebugCurrentFrame; function fe(a) { if (a) { var g = a._owner, R = Ee(a.type, a._source, g ? g.type : null); G.setExtraStackFrame(R); } else G.setExtraStackFrame(null); } function we(a, g, R, B, re) { { var oe = Function.call.bind(Le); for (var Q in a) if (oe(a, Q)) { var J = void 0; try { if (typeof a[Q] != "function") { var ge = Error((B || "React class") + ": " + R + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw ge.name = "Invariant Violation", ge; } J = a[Q](g, Q, B, R, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (le) { J = le; } J && !(J instanceof Error) && (fe(re), M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", R, Q, typeof J), fe(null)), J instanceof Error && !(J.message in De) && (De[J.message] = !0, fe(re), M("Failed %s type: %s", R, J.message), fe(null)); } } } var Fe = Array.isArray; function Re(a) { return Fe(a); } function Ye(a) { { var g = typeof Symbol == "function" && Symbol.toStringTag, R = g && a[Symbol.toStringTag] || a.constructor.name || "Object"; return R; } } function rt(a) { try { return Et(a), !1; } catch { return !0; } } function Et(a) { return "" + a; } function Rt(a) { if (rt(a)) return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ye(a)), Et(a); } var Pt = x.ReactCurrentOwner, Yr = { key: !0, ref: !0, __self: !0, __source: !0 }, Tt, Ft; function Ur(a) { if (Le.call(a, "ref")) { var g = Object.getOwnPropertyDescriptor(a, "ref").get; if (g && g.isReactWarning) return !1; } return a.ref !== void 0; } function qr(a) { if (Le.call(a, "key")) { var g = Object.getOwnPropertyDescriptor(a, "key").get; if (g && g.isReactWarning) return !1; } return a.key !== void 0; } function Kr(a, g) { typeof a.ref == "string" && Pt.current; } function Xr(a, g) { { var R = function() { Tt || (Tt = !0, M("%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)", g)); }; R.isReactWarning = !0, Object.defineProperty(a, "key", { get: R, configurable: !0 }); } } function Gr(a, g) { { var R = function() { Ft || (Ft = !0, M("%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)", g)); }; R.isReactWarning = !0, Object.defineProperty(a, "ref", { get: R, configurable: !0 }); } } var Jr = function(a, g, R, B, re, oe, Q) { var J = { // This tag allows us to uniquely identify this as a React Element $$typeof: r, // Built-in properties that belong on the element type: a, key: g, ref: R, props: Q, // Record the component responsible for creating this element. _owner: oe }; return J._store = {}, Object.defineProperty(J._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(J, "_self", { configurable: !1, enumerable: !1, writable: !1, value: B }), Object.defineProperty(J, "_source", { configurable: !1, enumerable: !1, writable: !1, value: re }), Object.freeze && (Object.freeze(J.props), Object.freeze(J)), J; }; function Zr(a, g, R, B, re) { { var oe, Q = {}, J = null, ge = null; R !== void 0 && (Rt(R), J = "" + R), qr(g) && (Rt(g.key), J = "" + g.key), Ur(g) && (ge = g.ref, Kr(g, re)); for (oe in g) Le.call(g, oe) && !Yr.hasOwnProperty(oe) && (Q[oe] = g[oe]); if (a && a.defaultProps) { var le = a.defaultProps; for (oe in le) Q[oe] === void 0 && (Q[oe] = le[oe]); } if (J || ge) { var ue = typeof a == "function" ? a.displayName || a.name || "Unknown" : a; J && Xr(Q, ue), ge && Gr(Q, ue); } return Jr(a, J, ge, re, B, Pt.current, Q); } } var nt = x.ReactCurrentOwner, St = x.ReactDebugCurrentFrame; function _e(a) { if (a) { var g = a._owner, R = Ee(a.type, a._source, g ? g.type : null); St.setExtraStackFrame(R); } else St.setExtraStackFrame(null); } var st; st = !1; function at(a) { return typeof a == "object" && a !== null && a.$$typeof === r; } function Lt() { { if (nt.current) { var a = N(nt.current.type); if (a) return ` Check the render method of \`` + a + "`."; } return ""; } } function Qr(a) { return ""; } var Mt = {}; function en(a) { { var g = Lt(); if (!g) { var R = typeof a == "string" ? a : a.displayName || a.name; R && (g = ` Check the top-level render call using <` + R + ">."); } return g; } } function kt(a, g) { { if (!a._store || a._store.validated || a.key != null) return; a._store.validated = !0; var R = en(g); if (Mt[R]) return; Mt[R] = !0; var B = ""; a && a._owner && a._owner !== nt.current && (B = " It was passed a child from " + N(a._owner.type) + "."), _e(a), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', R, B), _e(null); } } function Ot(a, g) { { if (typeof a != "object") return; if (Re(a)) for (var R = 0; R < a.length; R++) { var B = a[R]; at(B) && kt(B, g); } else if (at(a)) a._store && (a._store.validated = !0); else if (a) { var re = A(a); if (typeof re == "function" && re !== a.entries) for (var oe = re.call(a), Q; !(Q = oe.next()).done; ) at(Q.value) && kt(Q.value, g); } } } function tn(a) { { var g = a.type; if (g == null || typeof g == "string") return; var R; if (typeof g == "function") R = g.propTypes; else if (typeof g == "object" && (g.$$typeof === d || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. g.$$typeof === p)) R = g.propTypes; else return; if (R) { var B = N(g); we(R, a.props, "prop", B, a); } else if (g.PropTypes !== void 0 && !st) { st = !0; var re = N(g); M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", re || "Unknown"); } typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function rn(a) { { for (var g = Object.keys(a.props), R = 0; R < g.length; R++) { var B = g[R]; if (B !== "children" && B !== "key") { _e(a), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), _e(null); break; } } a.ref !== null && (_e(a), M("Invalid attribute `ref` supplied to `React.Fragment`."), _e(null)); } } var _t = {}; function Nt(a, g, R, B, re, oe) { { var Q = S(a); if (!Q) { var J = ""; (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var ge = Qr(); ge ? J += ge : J += Lt(); var le; a === null ? le = "null" : Re(a) ? le = "array" : a !== void 0 && a.$$typeof === r ? (le = "<" + (N(a.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : le = typeof a, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", le, J); } var ue = Zr(a, g, R, re, oe); if (ue == null) return ue; if (Q) { var Ce = g.children; if (Ce !== void 0) if (B) if (Re(Ce)) { for (var Ne = 0; Ne < Ce.length; Ne++) Ot(Ce[Ne], a); Object.freeze && Object.freeze(Ce); } else M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else Ot(Ce, a); } if (Le.call(g, "key")) { var ke = N(a), je = Object.keys(g).filter(function(ln) { return ln !== "key"; }), ot = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!_t[ke + ot]) { var cn = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}"; M(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, ot, ke, cn, ke), _t[ke + ot] = !0; } } return a === n ? rn(ue) : tn(ue), ue; } } function nn(a, g, R) { return Nt(a, g, R, !0); } function sn(a, g, R) { return Nt(a, g, R, !1); } var an = sn, on = nn; $e.Fragment = n, $e.jsx = an, $e.jsxs = on; }()), $e; } process.env.NODE_ENV === "production" ? gt.exports = fn() : gt.exports = hn(); var t = gt.exports, vr = { color: void 0, size: void 0, className: void 0, style: void 0, attr: void 0 }, Dt = Pe.createContext && /* @__PURE__ */ Pe.createContext(vr), pn = ["attr", "size", "title"]; function vn(e, r) { if (e == null) return {}; var s = mn(e, r), n, o; if (Object.getOwnPropertySymbols) { var c = Object.getOwnPropertySymbols(e); for (o = 0; o < c.length; o++) n = c[o], !(r.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (s[n] = e[n]); } return s; } function mn(e, r) { if (e == null) return {}; var s = {}; for (var n in e) if (Object.prototype.hasOwnProperty.call(e, n)) { if (r.indexOf(n) >= 0) continue; s[n] = e[n]; } return s; } function qe() { return qe = Object.assign ? Object.assign.bind() : function(e) { for (var r = 1; r < arguments.length; r++) { var s = arguments[r]; for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]); } return e; }, qe.apply(this, arguments); } function It(e, r) { var s = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); r && (n = n.filter(function(o) { return Object.getOwnPropertyDescriptor(e, o).enumerable; })), s.push.apply(s, n); } return s; } function Ke(e) { for (var r = 1; r < arguments.length; r++) { var s = arguments[r] != null ? arguments[r] : {}; r % 2 ? It(Object(s), !0).forEach(function(n) { gn(e, n, s[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(s)) : It(Object(s)).forEach(function(n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(s, n)); }); } return e; } function gn(e, r, s) { return r = yn(r), r in e ? Object.defineProperty(e, r, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = s, e; } function yn(e) { var r = xn(e, "string"); return typeof r == "symbol" ? r : r + ""; } function xn(e, r) { if (typeof e != "object" || !e) return e; var s = e[Symbol.toPrimitive]; if (s !== void 0) { var n = s.call(e, r || "default"); if (typeof n != "object") return n; throw new TypeError("@@toPrimitive must return a primitive value."); } return (r === "string" ? String : Number)(e); } function mr(e) { return e && e.map((r, s) => /* @__PURE__ */ Pe.createElement(r.tag, Ke({ key: s }, r.attr), mr(r.child))); } function W(e) { return (r) => /* @__PURE__ */ Pe.createElement(jn, qe({ attr: Ke({}, e.attr) }, r), mr(e.child)); } function jn(e) { var r = (s) => { var { attr: n, size: o, title: c } = e, i = vn(e, pn), u = o || s.size || "1em", d; return s.className && (d = s.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ Pe.createElement("svg", qe({ stroke: "currentColor", fill: "currentColor", strokeWidth: "0" }, s.attr, n, i, { className: d, style: Ke(Ke({ color: e.color || s.color }, s.style), e.style), height: u, width: u, xmlns: "http://www.w3.org/2000/svg" }), c && /* @__PURE__ */ Pe.createElement("title", null, c), e.children); }; return Dt !== void 0 ? /* @__PURE__ */ Pe.createElement(Dt.Consumer, null, (s) => r(s)) : r(vr); } function Cn(e) { return W({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8c-0.020-1.045-0.247-2.086-0.665-3.038-0.417-0.953-1.023-1.817-1.766-2.53s-1.624-1.278-2.578-1.651c-0.953-0.374-1.978-0.552-2.991-0.531-1.013 0.020-2.021 0.24-2.943 0.646-0.923 0.405-1.758 0.992-2.449 1.712s-1.237 1.574-1.597 2.497c-0.361 0.923-0.533 1.914-0.512 2.895 0.020 0.981 0.234 1.955 0.627 2.847 0.392 0.892 0.961 1.7 1.658 2.368s1.523 1.195 2.416 1.543c0.892 0.348 1.851 0.514 2.799 0.493 0.949-0.020 1.89-0.227 2.751-0.608 0.862-0.379 1.642-0.929 2.287-1.604s1.154-1.472 1.488-2.335c0.204-0.523 0.342-1.069 0.415-1.622 0.019 0.001 0.039 0.002 0.059 0.002 0.552 0 1-0.448 1-1 0-0.028-0.001-0.056-0.004-0.083h0.004zM14.411 10.655c-0.367 0.831-0.898 1.584-1.55 2.206s-1.422 1.112-2.254 1.434c-0.832 0.323-1.723 0.476-2.608 0.454-0.884-0.020-1.759-0.215-2.56-0.57-0.801-0.354-1.526-0.867-2.125-1.495s-1.071-1.371-1.38-2.173c-0.31-0.801-0.457-1.66-0.435-2.512s0.208-1.694 0.551-2.464c0.342-0.77 0.836-1.468 1.441-2.044s1.321-1.029 2.092-1.326c0.771-0.298 1.596-0.438 2.416-0.416s1.629 0.202 2.368 0.532c0.74 0.329 1.41 0.805 1.963 1.387s0.988 1.27 1.272 2.011c0.285 0.74 0.418 1.532 0.397 2.32h0.004c-0.002 0.027-0.004 0.055-0.004 0.083 0 0.516 0.39 0.94 0.892 0.994-0.097 0.544-0.258 1.075-0.481 1.578z" }, child: [] }] })(e); } const Ct = ({ loading: e = !1, className: r }) => e ? /* @__PURE__ */ t.jsx("div", { className: `loader-container ${r}`, children: /* @__PURE__ */ t.jsx(Cn, { className: "spinner" }) }) : null; function gr(e) { return W({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" }, child: [] }] })(e); } function yr(e) { return W({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m.5 3 .04.87a2 2 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2m5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19q-.362.002-.683.12L1.5 2.98a1 1 0 0 1 1-.98z" }, child: [] }, { tag: "path", attr: { d: "M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5" }, child: [] }] })(e); } function xr(e) { return W({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5z" }, child: [] }] })(e); } function $t(e) { return W({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z" }, child: [] }] })(e); } function jr(e) { return W({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0" }, child: [] }] })(e); } function Cr(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "23 4 23 10 17 10" }, child: [] }, { tag: "polyline", attr: { points: "1 20 1 14 7 14" }, child: [] }, { tag: "path", attr: { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" }, child: [] }] })(e); } function bn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" }, child: [] }] })(e); } function wn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }, child: [] }] })(e); } function En(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" }, child: [] }] })(e); } function Rn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }, child: [] }] })(e); } function Pn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }, child: [] }] })(e); } function br(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z" }, child: [] }] })(e); } function bt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z" }, child: [] }] })(e); } function wr(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z" }, child: [] }] })(e); } function Tn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" }, child: [] }] })(e); } function Er(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z" }, child: [] }, { tag: "path", attr: { d: "M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z" }, child: [] }] })(e); } function Fn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 2H8c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM8 16V4h12l.002 12H8z" }, child: [] }, { tag: "path", attr: { d: "M4 8H2v12c0 1.103.897 2 2 2h12v-2H4V8zm8.933 3.519-1.726-1.726-1.414 1.414 3.274 3.274 5.702-6.84-1.538-1.282z" }, child: [] }] })(e); } function Rr(e) { return W({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, child: [] }] })(e); } function Sn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" }, child: [] }] })(e); } function Ln(e) { return W({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M128 0C92.7 0 64 28.7 64 64l0 224-44.8 0C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384L320 384l0-96-192 0 0-224 320 0 0 32 64 0 0-32c0-35.3-28.7-64-64-64L128 0zM512 128l-112 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-208-96 0c-17.7 0-32-14.3-32-32l0-96zm32 0l0 96 96 0-96-96z" }, child: [] }] })(e); } function Xe(e) { return W({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z" }, child: [] }] })(e); } function Bt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464l256 0c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM192 272l0 128c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L129.4 376 112 376c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16l17.4 0 35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8zm85.8-4c11.6 20 18.2 43.3 18.2 68s-6.6 48-18.2 68c-6.6 11.5-21.3 15.4-32.8 8.8s-15.4-21.3-8.8-32.8c7.5-12.9 11.8-27.9 11.8-44s-4.3-31.1-11.8-44c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8z" }, child: [] }] })(e); } function pe(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm97 289c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L79 303c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31 31-31zM257 255c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9l-48-48z" }, child: [] }] })(e); } function Ht(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z" }, child: [] }] })(e); } function it(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm96 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm69.2 46.9c-3-4.3-7.9-6.9-13.2-6.9s-10.2 2.6-13.2 6.9l-41.3 59.7-11.9-19.1c-2.9-4.7-8.1-7.5-13.6-7.5s-10.6 2.8-13.6 7.5l-40 64c-3.1 4.9-3.2 11.1-.4 16.2s8.2 8.2 14 8.2l48 0 32 0 40 0 72 0c6 0 11.4-3.3 14.2-8.6s2.4-11.6-1-16.5l-72-104z" }, child: [] }] })(e); } function Mn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z" }, child: [] }] })(e); } function kn(e) { return W({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z" }, child: [] }] })(e); } function Wt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z" }, child: [] }] })(e); } function Vt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM80 288c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32l0 16 44.9-29.9c2-1.3 4.4-2.1 6.8-2.1c6.8 0 12.3 5.5 12.3 12.3l0 103.4c0 6.8-5.5 12.3-12.3 12.3c-2.4 0-4.8-.7-6.8-2.1L240 368l0 16c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96z" }, child: [] }] })(e); } function Yt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z" }, child: [] }] })(e); } function On(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z" }, child: [] }] })(e); } function Ge(e) { return W({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z" }, child: [] }] })(e); } function Ut(e) { return W({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z" }, child: [] }] })(e); } function yt(e) { return W({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z" }, child: [] }] })(e); } const Ve = (e = () => { }) => { const [r, s] = k(!1), n = de(null), o = (c) => { var i; (i = n.current) != null && i.contains(c.target) ? s(!1) : (s(!0), e(c, n)); }; return ee(() => (document.addEventListener("click", o, !0), document.addEventListener("mousedown", o, !0), () => { document.removeEventListener("click", o, !0), document.removeEventListener("mousedown", o, !0); }), []), { ref: n, isClicked: r, setIsClicked: s }; }, Pr = He(), _n = ({ children: e, layout: r }) => { const [s, n] = k(() => o(r)); function o(c) { return ["list", "grid"].includes(c) ? c : "grid"; } return /* @__PURE__ */ t.jsx(Pr.Provider, { value: { activeLayout: s, setActiveLayout: n }, children: e }); }, Me = () => We(Pr), Nn = ({ setShowToggleViewMenu: e, onLayoutChange: r }) => { const s = Ve(() => { e(!1); }), { activeLayout: n, setActiveLayout: o } = Me(), c = [ { key: "grid", name: "Grid", icon: /* @__PURE__ */ t.jsx(xr, { size: 18 }) }, { key: "list", name: "List", icon: /* @__PURE__ */ t.jsx(Xe, { size: 18 }) } ], i = (u) => { o(u), r(u), e(!1); }; return /* @__PURE__ */ t.jsx("div", { ref: s.ref, className: "toggle-view", role: "dropdown", children: /* @__PURE__ */ t.jsx("ul", { role: "menu", "aria-orientation": "vertical", children: c.map((u) => /* @__PURE__ */ t.jsxs( "li", { role: "menuitem", onClick: () => i(u.key), onKeyDown: () => i(u.key), children: [ /* @__PURE__ */ t.jsx("span", { children: u.key === n && /* @__PURE__ */ t.jsx(Rr, { size: 13 }) }), /* @__PURE__ */ t.jsx("span", { children: u.icon }), /* @__PURE__ */ t.jsx("span", { children: u.name }) ] }, u.key )) }) }); }, Tr = He(), zn = ({ children: e, filesData: r, onError: s }) => { const [n, o] = k([]); ee(() => { o(r); }, [r]); const c = (i) => i.isDirectory ? n.filter((u) => u.path === `${i.path}/${u.name}`) : []; return /* @__PURE__ */ t.jsx(Tr.Provider, { value: { files: n, setFiles: o, getChildren: c, onError: s }, children: e }); }, Qe = () => We(Tr), qt = (e) => e.sort((r, s) => r.name.localeCompare(s.name)), An = (e) => { const r = e.filter((c) => c.isDirectory), s = e.filter((c) => !c.isDirectory), n = qt(r), o = qt(s); return [...n, ...o]; }, Fr = He(), Dn = ({ children: e, initialPath: r }) => { const { files: s } = Qe(), n = de(!1), [o, c] = k(""), [i, u] = k(null), [d, h] = k([]); return ee(() => { Array.isArray(s) && s.length > 0 && (h(() => { const f = s.filter((p) => p.path === `${o}/${p.name}`); return An(f); }), u(() => s.find((f) => f.path === o) ?? null)); }, [s, o]), ee(() => { !n.current && Array.isArray(s) && s.length > 0 && (c(s.some((f) => f.path === r) ? r : ""), n.current = !0); }, [r, s]), /* @__PURE__ */ t.jsx( Fr.Provider, { value: { currentPath: o, setCurrentPath: c, currentFolder: i, setCurrentFolder: u, currentPathFiles: d, setCurrentPathFiles: h }, children: e } ); }, be = () => We(Fr), Oe = (e, r, ...s) => { try { if (typeof e == "function") e(...s); else throw new Error( `<FileManager /> Missing prop: Callback function "${r}" is required.` ); } catch (n) { console.error(n.message); } }, Sr = He(), In = ({ children: e, onDownload: r, onSelect: s }) => { const [n, o] = k([]); ee(() => { n.length && s && s(n); }, [n]); const c = () => { Oe(r, "onDownload", n); }; return /* @__PURE__ */ t.jsx(Sr.Provider, { value: { selectedFiles: n, setSelectedFiles: o, handleDownload: c }, children: e }); }, Se = () => We(Sr), Lr = He(), $n = ({ children: e, onPaste: r, onCut: s, onCopy: n }) => { const [o, c] = k(null), { selectedFiles: i, setSelectedFiles: u } = Se(), d = (f) => { c({ files: i, isMoving: f }), f ? s && s(i) : n && n(i); }, h = (f) => { if (f && !f.isDirectory) return; const p = o.files, w = o.isMoving ? "move" : "copy"; Oe(r, "onPaste", p, f, w), o.isMoving && c(null), u([]); }; return /* @__PURE__ */ t.jsx(Lr.Provider, { value: { clipBoard: o, setClipBoard: c, handleCutCopy: d, handlePasting: h }, children: e }); }, et = () => We(Lr), Mr = ({ allowCreateFolder: e = !0, allowUploadFile: r = !0, onLayoutChange: s, onRefresh: n, triggerAction: o }) => { var T; const [c, i] = k(!1), { currentFolder: u } = be(), { selectedFiles: d, setSelectedFiles: h, handleDownload: f } = Se(), { clipBoard: p, setClipBoard: w, handleCutCopy: C, handlePasting: P } = et(), { activeLayout: z } = Me(), A = [ { icon: /* @__PURE__ */ t.jsx(yr, { size: 17, strokeWidth: 0.3 }), text: "New folder", permission: e, onClick: () => o.show("createFolder") }, { icon: /* @__PURE__ */ t.jsx(wr, { size: 18 }), text: "Upload", permission: r, onClick: () => o.show("uploadFile") }, { icon: /* @__PURE__ */ t.jsx(yt, { size: 18 }), text: "Paste", permission: !!p, onClick: M } ], x = [ { icon: z === "grid" ? /* @__PURE__ */ t.jsx(xr, { size: 16 }) : /* @__PURE__ */ t.jsx(Xe, { size: 16 }), title: "Change View", onClick: () => i((l) => !l) }, { icon: /* @__PURE__ */ t.jsx(Cr, { size: 16 }), title: "Refresh", onClick: () => { Oe(n, "onRefresh"), w(null); } } ]; function M() { P(u); } const L = () => { f(), h([]); }; return d.length > 0 ? /* @__PURE__ */ t.jsx("div", { className: "toolbar file-selected", children: /* @__PURE__ */ t.jsxs("div", { className: "file-action-container", children: [ /* @__PURE__ */ t.jsxs("div", { children: [ /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => C(!0), children: [ /* @__PURE__ */ t.jsx(jr, { size: 18 }), /* @__PURE__ */ t.jsx("span", { children: "Cut" }) ] }), /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => C(!1), children: [ /* @__PURE__ */ t.jsx(gr, { strokeWidth: 0.1, size: 17 }), /* @__PURE__ */ t.jsx("span", { children: "Copy" }) ] })