diff --git a/README.md b/README.md new file mode 100644 index 0000000..65c37a2 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +### ff, 集成以下项目的开发环境 +``` +@ff/button +@ff/container +@ff/core +@ff/data-list +@ff/grid-layout +@ff/grid-layout-form +@ff/iconfont +@ff/pages +``` +### 最终打包到 [ff](https://git.fsdpf.net/npm/ff-dist.git). diff --git a/dist/button.js b/dist/button.js index b25dd0a..6d81415 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,7 +1,7 @@ -import { E, B, C } from "./common/main-DHW9LhcM.js"; -import "./common/vender-CMS8SASe.js"; +import { P as s, O as u, Q as e } from "./common/main-2s1hdQO8.js"; +import "prop-types"; export { - E as auth, - B as default, - C as useButton + s as auth, + u as default, + e as useButton }; diff --git a/dist/common/main-2s1hdQO8.js b/dist/common/main-2s1hdQO8.js new file mode 100644 index 0000000..0b279d5 --- /dev/null +++ b/dist/common/main-2s1hdQO8.js @@ -0,0 +1,912 @@ +var ga = Object.defineProperty; +var Nt = (e) => { + throw TypeError(e); +}; +var pa = (e, t, a) => t in e ? ga(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a; +var v = (e, t, a) => pa(e, typeof t != "symbol" ? t + "" : t, a), xt = (e, t, a) => t.has(e) || Nt("Cannot " + a); +var p = (e, t, a) => (xt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), F = (e, t, a) => t.has(e) ? Nt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), z = (e, t, a, n) => (xt(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a); +var Et = (e, t, a, n) => ({ + set _(i) { + z(e, t, i, a); + }, + get _() { + return p(e, t, n); + } +}); +import { jsx as c, jsxs as $ } from "react/jsx-runtime"; +import b, { useEffect as N, useState as P, useCallback as ge, useMemo as pe, useContext as Ge, useRef as Y, useId as Dt, useLayoutEffect as ma } from "react"; +import g from "lodash"; +import R from "classnames"; +import { Form as Ze, Input as ha, Button as lt, Breadcrumb as fa, Tree as ya, Pagination as wa, Table as ba, Empty as Ca, Popconfirm as va, Tooltip as ka, Popover as Sa } from "antd"; +import { useMergedState as Pa } from "rc-util"; +import re, { FieldContext as $a, Field as Wt } from "rc-field-form"; +import { useParams as Na, generatePath as xa, createBrowserRouter as Ea, useInRouterContext as Ta, Navigate as Fa } from "react-router-dom"; +import O from "prop-types"; +import "react-is"; +import { useNotification as Ra } from "rc-notification"; +import { N as Be, a as Ue, w as ct, S as Oa } from "./vender-DDOSHWIo.js"; +import Tt from "immutability-helper"; +import La from "rc-drawer"; +import Va from "rc-dialog"; +const Ft = { null2json: (e) => Object.create(), null2array: (e) => [], null2number: (e) => 0, null2bool: (e) => !1, null2string: (e) => "", null2integer: (e) => 0, null2float: (e) => 0, string2json: (e) => e ? JSON.parse(e) : "{}", string2array: (e) => e.substr(0, 1) === "[" && e.substr(-1) === "]" ? JSON.parse(e) : e.split(","), string2number: (e) => e == "" ? 0 : +e, string2integer: (e) => e == "" ? 0 : +e, string2float: (e) => e == "" ? 0 : +e, string2bool: (e) => { + switch (`${e}`.toLowerCase()) { + case "0": + case "false": + case "[]": + case "{}": + return !1; + } + return !!e; +}, string2string: (e) => e, json2json: (e) => e, json2array: (e) => e ? Object.values(e) : [], json2number: (e) => Object.keys(e).length, json2integer: (e) => Object.keys(e).length, json2float: (e) => Object.keys(e).length, json2bool: (e) => Object.keys(e).length > 0, json2string: (e) => e ? JSON.stringify(e) : "", array2json: (e) => ({ ...e }), array2array: (e) => e, array2number: (e) => e.length, array2integer: (e) => e.length, array2float: (e) => e.length, array2bool: (e) => e.length > 0, array2string: (e) => JSON.stringify(e), number2json: (e) => ({}), number2array: (e) => [e], number2number: (e) => e, number2integer: (e) => e, number2float: (e) => e, number2bool: (e) => !!e, number2string: (e) => e.toString(), boolean2json: (e) => ({}), boolean2array: (e) => [], boolean2number: (e) => +e, boolean2integer: (e) => +e, boolean2float: (e) => +e, boolean2bool: (e) => e, boolean2string: (e) => e ? "true" : "false" }, qt = (e, t) => g.flatMap(g.toPairs(e), ([a, n]) => g.isObjectLike(n) ? qt(n, a) : [[`${g.isUndefined(t) ? "" : t + "."}${a}`, n]]), Ht = (e, t = () => !1) => g.some(e, (a) => !!g.some(a, t) || (g.isEmpty(a) || !g.isPlainObject(a) && !g.isArray(a) ? void 0 : Ht(a, t))), et = (e, t) => e && typeof e == "object" ? Array.isArray(e) ? e.map((a) => et(a, t)) : Object.keys(e).reduce((a, n) => (t[n] ? a[t[n]] = et(e[n], t) : a[n] = et(e[n], t), a), {}) : e; +g.mixin({ toPrimitive: (e, t) => { + let a = "string"; + a = Array.isArray(e) ? "array" : typeof e, g.isObject(e) && (a = "json"); + const n = `${a}2${t}`; + return Reflect.has(Ft, n) ? Ft[n](e) : e; +}, toPairsDeep: qt, deepSome: Ht, replaceKeys: et }); +var Ie, qe, Ae, de, Fe, Re; +class Jt { + constructor(t, a) { + F(this, Ie, /* @__PURE__ */ new Map()); + F(this, qe, !0); + F(this, Ae, []); + F(this, de); + F(this, Fe, () => p(this, de)); + F(this, Re, () => Promise.resolve()); + v(this, "get", (...t) => new Promise((a, n) => { + const i = JSON.stringify(t); + if (p(this, Ie).has(i)) return a(p(this, Re).call(this, p(this, de), ...t)); + if (p(this, de) === void 0) p(this, Ae).push([t, a, n]), p(this, qe) && (z(this, qe, !1), Promise.resolve(typeof p(this, Fe) == "function" ? p(this, Fe).call(this) : p(this, Fe)).then((r) => z(this, de, r || null)).finally(() => { + p(this, Ae).forEach(([r, s, o]) => { + try { + const l = p(this, Re).call(this, p(this, de), ...r); + p(this, Ie).set(JSON.stringify(r), l), s(l); + } catch (l) { + o(l); + } + }), p(this, Ae).length = 0; + })); + else { + const r = p(this, Re).call(this, p(this, de), ...t); + p(this, Ie).set(i, r), a(r); + } + })); + z(this, Re, a), z(this, Fe, t); + } +} +Ie = new WeakMap(), qe = new WeakMap(), Ae = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap(); +const Dn = () => c("div", { children: "Empty" }), _e = b.createContext({ ele: {}, mount: () => { +}, unmount: () => { +} }), q = ({ rootClassName: e, className: t, children: a, actions: n, title: i, subTitle: r, extras: s, style: o = {} }) => { + const { mount: l, unmount: u } = b.useContext(_e); + return n && q.Action({ children: n }), i && q.Title({ children: i }), r && q.SubTitle({ children: r }), s && q.Extra({ children: s }), N(() => (l("rootClassName", e), () => u(e)), [e]), c("div", { className: R("ff-container", t), style: o, children: a }); +}, Xe = (e) => ({ children: t, className: a }) => { + const { mount: n, unmount: i } = b.useContext(_e); + return N(() => (n(e, b.createElement("div", { key: `ff-${e}`, className: R(`ff-popup-${e}`, a) }, t)), () => i(e)), [a, t]), null; +}; +q.Action = Xe("actions"), q.Title = Xe("title"), q.SubTitle = Xe("sub-title"), q.Extra = Xe("extras"), q.propTypes = { className: O.string, style: O.object, title: O.any, subTitle: O.any, actions: O.any, extras: O.any }; +const Wn = () => c(q, { className: "ff-loading", children: $("div", { className: "loader", children: [$("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] }), $("div", { className: "square", children: [c("span", {}), c("span", {}), c("span", {})] })] }) }), qn = () => c("div", { children: "NotFound" }), Kt = ({ children: e }) => { + const [t, a] = P({}), n = ge((r, s) => a((o) => ({ ...o, [r]: s })), []), i = ge((r) => a((s) => ({ ...s, [r]: void 0 })), []); + return typeof (e == null ? void 0 : e.type) == "string" ? e : c(_e.Provider, { value: { ele: t, mount: n, unmount: i }, children: b.cloneElement(e, { className: t.rootClassName, title: t.title, subTitle: t["sub-title"], actions: t.actions, extras: t.extras }) }); +}; +Kt.propTypes = { children: O.element.isRequired }; +const Rt = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Ct = ({ type: e, props: t }) => c("i", { ...t, children: c("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (Rt[e] || Rt.info).map((a, n) => c("path", { d: a }, n)) }) }), Gt = ({ className: e, content: t, icon: a, $close: n }) => $(b.Fragment, { children: [a && c("div", { className: R("ff-notification-icon", e), children: c(Ct, { type: a }) }), t] }), ja = ({}) => c(q, { children: "Confirm" }); +var fe, Me; +const ee = class ee { + constructor() { + F(this, Me, null); + v(this, "init", (t) => z(this, Me, new Map(t))); + v(this, "check", (t) => !p(this, Me).has(t) || p(this, Me).get(t)); + if (p(ee, fe)) return p(ee, fe); + } +}; +fe = new WeakMap(), Me = new WeakMap(), F(ee, fe, null), v(ee, "getInstance", () => (p(ee, fe) || z(ee, fe, new ee()), p(ee, fe))); +let dt = ee; +const Ia = dt.getInstance(), _t = (e = {}, t = {}, a = {}, n = "") => g.deepSome(e, (i, r) => r === "type" && i === "code") ? Yt(e, t, a, n) : Qt(e, t, n), Yt = async (e = {}, t = {}, a = {}, n = "") => { + let i = /* @__PURE__ */ Object.create(null); + for (let r in e) { + let s; + if (Reflect.has(e[r], "type") && ["code", "field", "router", "query", "string"].includes(e[r].type)) { + const { type: o, value: l = "", default: u = n } = e[r]; + switch (o) { + case "code": + s = await $e.exec(l, t, a); + break; + case "field": + s = g.get(t, l) ?? g.get(t, l.substring(l.indexOf(".") + 1)); + break; + case "router": + case "query": + s = Pe.getPageParams(l); + break; + case "string": + s = l; + } + s ?? (s = u); + } else s = await Yt(e[r], t, a, n); + g.set(i, r, s); + } + return i; +}, Qt = (e = {}, t = {}, a = "") => Object.keys(e || {}).reduce((n, i) => { + if (g.isPlainObject(e[i])) { + let r; + if (Reflect.has(e[i], "type") && ["field", "router", "query", "string"].includes(e[i].type)) { + const { type: s, value: o = "", default: l = a } = e[i]; + switch (s) { + case "field": + r = g.get(t, o) ?? g.get(t, o.substring(o.indexOf(".") + 1)); + break; + case "router": + case "query": + r = Pe.getPageParams(o); + break; + case "string": + r = o; + } + r ?? (r = l); + } else r = Qt(e[i], t, a); + g.set(n, i, r); + } + return n; +}, {}); +var ye, He; +const te = class te { + constructor() { + F(this, He, null); + v(this, "init", (t) => z(this, He, t)); + v(this, "get", (t, a) => g.get(p(this, He), t, a)); + if (p(te, ye)) return p(te, ye); + } +}; +ye = new WeakMap(), He = new WeakMap(), F(te, ye, null), v(te, "getInstance", () => (p(te, ye) || z(te, ye, new te()), p(te, ye))); +let ut = te; +const De = ut.getInstance(), Aa = (e, t, a, n, i) => { + const r = b.lazy(() => Q.getWidgetComponent(e).catch((s) => ({ default: () => `${s}` }))); + return c(b.Suspense, { children: c(r, { value: t, record: a, $setting: n, base62params: i }) }, e); +}, Ma = (e, t = {}) => (jt(e), jt(t), pe(() => e == null ? void 0 : e.map(({ widgetByJs: a, widgetByJsSetting: n, ...i }, r) => a && !a.endsWith("/BasicShowFieldData") ? { ...i, render: (s, o) => { + const l = Aa(a, s, o, n, t); + return g.isFunction(i == null ? void 0 : i.render) ? i.render(l, s, o) : l; +} } : i), [e, t])), Hn = (e) => { + const [t, a] = P({}); + return N(() => { + let n = !1; + return e && E.get(`/api/_/${e}`).then((i) => g.pick(i, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig"])).then((i) => !n && a(i)), () => n = !0; + }, [e]), t; +}, Jn = (e, t = {}) => { + const [a, n] = P({ dataSource: [] }); + return Ye(() => { + let i = !1; + return e && E.get(`/api/${e}/${E.encode({ page: 1, ...t })}`).then((r) => !i && n(r)), () => i = !0; + }, [e, t]), a; +}, gt = (e, t = null, a = null, n = "id") => pe(() => { + if (g.isEmpty(e) || !e.every(({ uuid: r }) => Ia.check(r))) return !1; + if (g.isEmpty(a) || g.isEmpty(t)) return !0; + const i = t.map((r) => r == null ? void 0 : r[n]); + return e.some(({ uuid: r }) => !r || !a.has(r) || a.get(r).some((s) => i.includes(s))); +}, [e, t, a, n]), za = ({ className: e, itemClassName: t, classNames: a = {}, dataSource: n, isPaginate: i, isItemOperations: r, isBatchOperations: s, batchOperations: o, itemOperations: l, itemOperationsAccess: u, resource: d, primaryKey: m, title: y, itemGridLayout: h, $setting: f, tabs: C, isConditionFormLayout: w, isTreeSider: x, treeSiderConfig: I }) => { + const { getBase62params: B, onClickCallback: X, onTabChange: G } = Ge(Le), { total: A, page: D, pageSize: H, tab: M } = B() || {}, J = ge((V, k, se) => c(Ba, { className: R("ff-data-list-framework-item", t), operations: r && k ? l == null ? void 0 : l.filter((L) => !(m && L.uuid && u.has(L.uuid)) || u.get(L.uuid).includes(k == null ? void 0 : k[m])) : [], data: d ? { [d]: k } : k, children: V, onClickCallback: X }), [d, m, r, X, l, u]); + return $("div", { className: R("ff-data-list-framework", e), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: x, ...I }), $("div", { className: R("ff-data-list-container", a == null ? void 0 : a.container), children: [c(kt, { className: a == null ? void 0 : a.filter, isConditionFormLayout: w }), c(ea, { title: y, className: a == null ? void 0 : a.toolbar, tabs: C, tab: M, onTabChange: G }), c(Ya, { ...h, className: a == null ? void 0 : a.content, style: { "--col-num": (f == null ? void 0 : f.colNum) || 1 }, primaryKey: m, itemRender: J, dataSource: n }), c(aa, { className: a == null ? void 0 : a.footer, isPaginate: i, isOperations: s, operations: o, total: A, page: D, pageSize: H })] })] }); +}, Ba = ({ className: e, operations: t, children: a, data: n, onClickCallback: i }) => $("div", { className: R("data-list-grid-layout-item-container", e), children: [a, !!(t != null && t.length) && c("div", { className: "data-list-grid-layout-item-actions", children: t.map((r) => c("span", { className: "data-list-grid-layout-item-action", children: c(S.Link, { uuid: r.uuid, type: r.type, name: r.name, widget: r.widget, widgetType: r.widgetType, widgetProps: r.widgetProps, widgetSetting: r.widgetSetting, widgetContainerProps: r.widgetContainerSetting, data: n, onAfterClick: (s) => s !== !1 && (i == null ? void 0 : i(r.isRefresh, n)) }, r.uuid || useId()) }, (r == null ? void 0 : r.uuid) || useId())) })] }), Ua = ({ listCode: e, className: t, classNames: a = {}, itemClassName: n, dataSource: i, columns: r, isItemOperations: s, isBatchOperations: o, batchOperations: l, itemOperations: u, itemOperationsAccess: d, resource: m, primaryKey: y, title: h, tabs: f, isPaginate: C, isTreeSider: w, treeSiderConfig: x, isConditionFormLayout: I, ...B }) => { + const { getBase62params: X, onClickCallback: G, onTabChange: A } = Ge(Le), { total: D, page: H, tab: M, pageSize: J } = X() || {}, V = gt(u, i, d, y); + return $("div", { className: R("ff-data-table-framework", t), children: [c(ta, { className: a == null ? void 0 : a.sider, isTreeSider: w, ...x }), $("div", { className: R("ff-data-table-container", a == null ? void 0 : a.container), children: [c(kt, { listCode: e, isConditionFormLayout: I }), c(ea, { title: h, className: a == null ? void 0 : a.toolbar, tabs: f, tab: M, onTabChange: A }), c(Ha, { ...B, className: "ff-data-table-content", columns: r, dataSource: i, operationRender: V ? (k) => c("div", { className: "ff-data-table-actions", children: u == null ? void 0 : u.reduce((se, L, me) => [...se, c(S.Link, { size: "small", uuid: L.uuid, type: L.type, name: L.name, widget: L.widget, widgetType: L.widgetType, widgetProps: L.widgetProps, widgetData: L.widgetData, widgetSetting: L.widgetSetting, widgetContainerProps: L.widgetContainerSetting, data: k, onAfterClick: (Ne) => Ne !== !1 && (G == null ? void 0 : G(L.isRefresh, data)) }, L.uuid || me)], []) }) : null }), c(aa, { isPaginate: C, isOperations: o, operations: l, total: D, page: H, pageSize: J })] })] }); +}, Le = b.createContext({ listCode: "", getBase62params: (e, t) => { +}, onReload: () => { +}, onClickCallback: () => { +}, onConditonChange: () => { +}, onTabChange: () => { +}, onSiderChange: () => { +}, onKeywordChange: () => { +}, onPageChange: () => { +}, onPageSizeChange: () => { +} }), Da = ({ isItemGridLayout: e, theme: t, themeProps: a, onClickCallback: n, onReload: i, getBase62params: r, listCode: s, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: d, onKeywordChange: m, onConditonChange: y, ...h }) => { + const [f, C] = P(); + return N(() => { + t ? Q.getWidgetComponent(t).then((w) => { + if (!w) throw `${t} not found`; + return w; + }).catch((w) => ({ default: () => `${w}` })).then((w) => C(b.createElement(w.default, { ...h, $setting: a }))) : f || C(null); + }, [t, a]), c(Le.Provider, { value: { listCode: s, onClickCallback: n, onReload: i, getBase62params: r, onPageChange: o, onPageSizeChange: l, onTabChange: u, onSiderChange: d, onKeywordChange: m, onConditonChange: y }, children: f ? b.cloneElement(f, { ...h, $setting: a }) : c(e ? za : Ua, { ...h, $setting: a }) }); +}; +var we, ue, Oe, at; +const ae = class ae { + constructor() { + F(this, ue, null); + F(this, Oe, /* @__PURE__ */ new Map()); + F(this, at, () => { + if (p(this, ue)) return p(this, ue).port.postMessage({ command: "status", data: [] }); + z(this, ue, new SharedWorker(new URL("/ff-worker/res-ws.js", self.location))), p(this, ue).port.onmessage = (t) => { + var a, n; + (a = t.data) != null && a.uuid ? p(this, Oe).forEach((i, r) => { + var s; + (i == "*" || (s = i == null ? void 0 : i.includes) != null && s.call(i, t.data.uuid)) && r(t.data); + }) : ((n = t.data) == null ? void 0 : n.readyState) == WebSocket.CLOSED && E.get("/api/user-api-token").then(({ token: i, expire_at: r }) => { + p(this, ue).port.postMessage({ command: "initWs", data: [`ws${g.trimStart(E.appUrl, "http")}api/user-resource-status-ws?token=${i}`] }); + }); + }, p(this, ue).port.postMessage({ command: "status", data: [] }); + }); + v(this, "subscribe", (t, a = []) => (a ? Array.isArray(a) && a.length == 0 ? a = "*" : Array.isArray(a) || (a = [a].flat()) : a = "*", p(this, Oe).set(t, a), p(this, Oe).size == 1 && p(this, at).call(this), () => this.unsubscribe(t))); + v(this, "unsubscribe", (t) => p(this, Oe).delete(t)); + if (p(ae, we)) return p(ae, we); + } +}; +we = new WeakMap(), ue = new WeakMap(), Oe = new WeakMap(), at = new WeakMap(), F(ae, we, null), v(ae, "getInstance", () => (p(ae, we) || z(ae, we, new ae()), p(ae, we))); +let pt = ae; +const Xt = pt.getInstance(), vt = b.forwardRef(({ listCode: e, base62params: t, className: a, itemClassName: n, theme: i, themeProps: r, classNames: s }, o) => { + const l = oa(), u = Y(t), d = Y(/* @__PURE__ */ new Map()), m = Y([]), [{ resource: y, primaryKey: h, batchOperations: f = [], itemOperations: C = [], columns: w = [], themeConfig: x, theme: I, isConditionFormLayout: B = !1, isTreeSider: X, treeSiderConfig: G, isItemGridLayout: A, itemGridLayout: D, title: H, isPaginate: M, tabs: J }, V] = P({ isItemGridLayout: !1, itemGridLayout: {} }), k = g.throttle((T) => { + m.current = [], E.list(e, g.pick({ ...u.current, ...T }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: U, condition: Ve, total: xe, tab: he, sider: Ee, page: oe, pageSize: le, operationsAccess: ce, dataSource: Te }) => { + u.current = { tab: he, condition: Ve, sider: Ee, keyword: U, total: xe, pageSize: le, page: Te != null && Te.length ? oe : 1 }, m.current = Te, d.current = new Map(ce), l(); + }); + }, 380, { leading: !1, trailing: !0 }), se = gt(C, m.current, d.current, h), L = gt(f); + N(() => { + let T = null; + return e && E.get(`/api/_/${e}`).resp(({ data: U, res: Ve }) => { + U != null && U.isDynamicRefresh && (T = Xt.subscribe(() => k(), Ve)), u.current.pageSize = U.pageSize, V(U); + }).catch(() => V({})), () => T == null ? void 0 : T(); + }, [e]), tn(() => { + e && k(t); + }, [e, t]); + const me = () => { + k(); + }, Ne = (T = 0, U = null) => { + if (T === 2) { + const Ve = g.get(U, "__PARENT_ID__", ""), xe = g.get(U, h, g.get(U, [y, h], "")), he = g.findIndex(m.current, ["__PARENT_ID__", Ve]), Ee = g.findIndex(he > -1 ? g.get(m.current, [he, "children"]) : m.current, [h, xe]); + Ee > -1 ? (E.get(`/api/${e}/detail/${xe}`).then((oe) => { + const le = g.get(m.current, he > -1 ? [he, "children", Ee, "children"] : [Ee, "children"]); + m.current = Tt(m.current, he > -1 ? { [he]: { children: { $splice: [[Ee, 1, { ...oe, children: le }]] } } } : { $splice: [[Ee, 1, { ...oe, children: le }]] }), l(); + }), E.post(`/api/${e}/list-operations-access`, { ids: xe }).then((oe) => new Map(oe)).then((oe) => { + d.current.forEach((le, ce) => { + var Te; + (Te = oe.get(ce)) != null && Te.some((rt) => rt == xe) || d.current.set(ce, le.filter((rt) => rt !== xe)); + }), oe.forEach((le, ce) => { + d.current.has(ce) ? d.current.set(ce, g.uniq([...d.current.get(ce) || [], ...le])) : d.current.set(ce, le); + }), l(); + })) : me(); + } else T === 1 && me(); + }; + b.useImperativeHandle(o, () => ({ onReload: me, onClickCallback: Ne })); + const it = { listCode: e, title: H, itemClassName: n, classNames: s, resource: y, primaryKey: h, theme: i || I, themeProps: r || x, isTreeSider: X, treeSiderConfig: G, isPaginate: M, tabs: J, isItemOperations: se, isBatchOperations: L, batchOperations: f, itemOperations: C, isItemGridLayout: A, columns: w, itemGridLayout: D, isConditionFormLayout: B, itemOperationsAccess: d.current, dataSource: m.current }; + return c(Da, { ...it, className: R("ff-data-list-helper", a), getBase62params: (T, U, Ve = !1) => T == "init" ? t : T ? g.get(u.current, T, U) : u.current, onReload: me, onClickCallback: Ne, onConditonChange: (T, U) => k({ keyword: U, condition: Tt(u.current.condition || {}, { $merge: T || {} }), page: 1 }), onTabChange: (T) => k({ tab: T, page: 1 }), onSiderChange: (T) => k({ sider: T, page: 1 }), onKeywordChange: (T) => k({ keyword: T, page: 1 }), onPageChange: (T, U) => k({ page: T, pageSize: U }), onPageSizeChange: (T) => k({ pageSize: T, page: 1 }) }); +}), Zt = (e, t, a, n, i = {}, r = 0) => { + const s = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${a}`, "--grid-layout-x": `${e}`, "--grid-layout-y": `${t}`, "--grid-layout-row-height-offset": "0px" }; + return i != null && i.autoHeight ? s.height = "fit-content" : s["--grid-layout-row"] = `${n}`, s["--grid-layout-box-margin"] = Ot(i == null ? void 0 : i.marginTop, i == null ? void 0 : i.marginRight, i == null ? void 0 : i.marginBottom, i == null ? void 0 : i.marginLeft), s["--grid-layout-box-padding"] = Ot(i == null ? void 0 : i.paddingTop, i == null ? void 0 : i.paddingRight, i == null ? void 0 : i.paddingBottom, i == null ? void 0 : i.paddingLeft), r && (s.height = `${r}px`), s; +}, Ot = (e, t, a, n) => `${e || 0}px ${t || 0}px ${a || 0}px ${n || 0}px`, kt = ({ className: e, isConditionFormLayout: t }) => { + var m, y; + const [a, n] = P({}), { listCode: i, onKeywordChange: r, onConditonChange: s, getBase62params: o } = b.useContext(Le), { keyword: l, condition: u } = o() || {}, [d] = Ze.useForm(); + return N(() => { + i && t && E.get(`/api/_/${i}/list-condition-form-layout`).then(({ resource: h, marginX: f, marginY: C, rowHeight: w, cols: x, fields: I }) => { + n({ resource: h, itemMargin: [f, C], rowHeight: w, cols: x, fields: I }); + }).catch(() => n({})); + }, [i, t]), N(() => { + d.setFieldsValue({ keyword: l, ...u }); + }, [JSON.stringify([l, u])]), c("div", { className: R("ff-data-list-filter", e), children: c(Ze, { form: d, layout: "vertical", autoComplete: "off", onFinish: ((m = a.fields) == null ? void 0 : m.length) > 1 ? (h) => s({ [a.resource]: h[a.resource] }, h.keyword) : () => { + }, onValuesChange: (h) => { + g.isEmpty(g.omit(h, ["keyword"])) || d.submit(); + }, children: ((y = a.fields) == null ? void 0 : y.length) > 1 ? c(St, { ...a, children: c(Wa, { onReset: () => { + const { keyword: h, condition: f } = o("init") || {}; + d.setFieldsValue({ keyword: h, ...f }); + } }) }) : c("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: c("div", { className: "grid-layout-item", style: Zt(20, 0, 5, 2), children: c(Ze.Item, { name: ["keyword"], children: c(ha.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (h) => r(h) }) }) }) }) }) }); +}, Wa = ({ cols: e, fields: t, onReset: a }) => { + const [n, i] = P(!1), r = pe(() => t == null ? void 0 : t.toReversed().some((s) => s.y > 1 || s.x + s.w >= e - 5), [e, t]); + return $(Ze.Item, { label: " ", style: { "--item-span": 5 }, className: R("ff-data-list-filter-actions", { expanded: n }), children: [c(lt, { onClick: a, children: "重置" }), c(lt, { type: "primary", htmlType: "submit", children: "查询" }), r && c(S.Link, { className: "ff-data-list-filter-expanded-button", widget: () => i((s) => !s), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); +}; +kt.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; +const ea = ({ className: e, title: t, tabs: a, tab: n, onTabChange: i }) => { + const [r, s] = Pa(a == null ? void 0 : a[0].value, { value: n, onChange: i }); + return $("div", { className: R("ff-data-list-toolbar", e), children: [c("div", { className: "ff-data-list-title", children: t }), c(fa, { className: "ff-data-list-tabs", itemRender: ({ label: o, code: l }) => c("span", { onClick: () => s(l), className: R("ff-data-list-tab", { active: l == r }), children: o }), items: a }), $("div", { className: "ff-data-list-actions", children: [c(S.Link, { icon: "icon-reload" }), c(S.Link, { icon: "icon-setting" })] })] }); +}, qa = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: c("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], ta = ({ className: e, width: t = 280, isTreeSider: a }) => a ? c(ya.DirectoryTree, { className: R("ff-data-list-sider", e), style: { "--sider-width": t }, showLine: !0, showIcon: !1, treeData: qa }) : null, aa = ({ className: e, operations: t, isOperations: a, isPaginate: n, total: i, page: r, pageSize: s }) => { + const { onPageChange: o, onPageSizeChange: l, onClickCallback: u } = b.useContext(Le); + return a && !g.isEmpty(t) || n ? $("div", { className: R("ff-data-list-footer", e), children: [c("div", { className: "ff-data-list-actions", children: t == null ? void 0 : t.map((d, m) => c(S, { uuid: d.uuid, type: d.type, name: d.name, widget: d.widget, widgetType: d.widgetType, widgetProps: d.widgetProps, widgetData: d.widgetData, widgetSetting: d.widgetSetting, widgetContainerProps: d.widgetContainerSetting, onAfterClick: (y) => y !== !1 && (u == null ? void 0 : u(d.isRefresh, null)) }, d.uuid || m)) }), n && c(wa, { size: "small", total: i, pageSize: s, showSizeChanger: !1, showTotal: (d) => `第 ${r} 页 / 总共 ${d} 条`, onChange: o, onShowSizeChange: l })] }) : null; +}, na = (e, t, a = !0) => a !== !0 && a-- <= 0 ? [] : g.isArray(e) && !g.isEmpty(e) ? e.reduce((n, i) => (Reflect.has(i, t) && Reflect.has(i, "children") && n.push(i[t]), Reflect.has(i, "children") && !g.isEmpty(i.children) ? n.concat(na(i.children, t, a)) : n), []) : [], Ha = ({ className: e, primaryKey: t, columns: a = [], dataSource: n = [], operationRender: i, operationWidth: r = 180, ...s }) => { + Dt(); + const o = Y(null), l = Y(null), [u, d] = P([]), [m, y] = P({ width: 0, height: 0 }); + N(() => { + d(na(n, t)); + }, [n, t]), ma(() => { + const f = new ResizeObserver(() => { + var C; + y({ width: ((C = o.current) == null ? void 0 : C.nativeElement.querySelector(".ant-table-body").scrollWidth) || l.current.offsetWidth, height: l.current.offsetHeight }); + }); + return l.current && f.observe(l.current), () => { + l.current && f.unobserve(l.current); + }; + }, []); + const h = Ma(a); + return c("div", { ref: l, className: R("ff-data-list-table", e), children: m.height ? c(ba, { ...s, ref: o, rowKey: (f) => (f == null ? void 0 : f[t]) ?? Math.random(), columns: h == null ? void 0 : h.concat(i ? [{ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(r / m.width * 100).toFixed(2)}%`, render: (f, C, w) => i(C, w) }] : []), dataSource: n, size: "middle", scroll: { x: "max-content", y: m.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: d, expandedRowKeys: u } }) : null }); +}, Ja = "RC_FORM_INTERNAL_HOOKS", ia = (e, { initialValue: t, initialValueLanguage: a, convertJs: n, convertJsSetting: i, type: r = "string" }, s = null) => { + const o = Y(!1), l = Ge($a), [u, d] = P(), [m, y] = P(a != "javascript" && e ? l.getFieldValue(e) : void 0), { registerWatch: h } = l.getInternalHooks(Ja) || {}; + return N(() => h == null ? void 0 : h((f, C, w) => { + if (!o.current) return; + const x = g.get(C, e); + g.isEqual(x, m) || y(g.toPrimitive(x, r)); + }), [m]), N(() => { + a == "javascript" && t ? $e.exec(t, {}, { getFieldValueForBasicForm: (f) => s ? s.getFieldValue(f) : l.getFieldValue(f), getFieldValue: (f) => l.getFieldValue(f) }).then((f) => y(g.toPrimitive(f, r))).catch((f) => notification.error({ message: `布局数据错误: ${JSON.stringify(f)}` })).finally(() => o.current = !0) : (t && y(g.toPrimitive(t ?? l.getFieldValue(e), r)), o.current = !0); + }, [t, a]), Ye(() => { + o.current && n && Q.getWidgetComponent(n).then(({ default: f }) => f({ value: m, record: l.getFieldsValue(!0), $setting: i })).then(d).catch((f) => console.error("布局数据转换错误: ", f, n)); + }, [m, n, i]), [u || m, m]; +}, ra = (e, t, a = "@pkg/grid-layouts", n = null) => pe(() => { + var i; + return (i = g.sortBy(e, ["y", "x"])) == null ? void 0 : i.map(({ i: r, x: s, y: o, w: l, h: u, field: { boxStyle: d, widgetPrefix: m = a, widget: y, ...h } }, f) => c("div", { className: "grid-layout-item", style: Zt(s, o, l, u, d, y === "Height" && (h == null ? void 0 : h.initialValue)), children: c(Ka, { ...h, basicForm: n, itemWidget: y != null && y.startsWith("@") ? y : `${m}/${y}`, itemWidgetRender: t }) }, r || f)); +}, [e]), Ka = ({ itemWidget: e, itemWidgetRender: t, basicForm: a, ...n }) => { + const [i, r] = P(); + return N(() => { + Q.getWidgetComponent(e).then(({ defaultProps: s = {}, default: o }) => { + r(b.createElement(t(o, s, a), n)); + }).catch((s) => { + console.error(s), r(e); + }); + }, [e]), i; +}, sa = ({ cols: e = 12, rowHeight: t = 21, fields: a = [], data: n, containerPadding: i = [0, 0], itemMargin: r = [4, 0], formProps: s = {}, className: o, ...l }) => { + const [u] = re.useForm(), d = ra(a, Ga, "@pkg/grid-layouts"), m = pe(() => [{ name: "__PROPS__", value: s }], [s]); + return Ye(() => { + u.setFieldsValue(n); + }, [n]), c(re, { fields: m, form: u, component: !1, children: c("div", { ...l, className: R("ff-grid-layout", o), style: { "--grid-layout-item-margin-y": `${(r == null ? void 0 : r[0]) || 0}px`, "--grid-layout-item-margin-x": `${(r == null ? void 0 : r[1]) || 0}px`, "--grid-layout-container-padding-y": `${(i == null ? void 0 : i[0]) || 0}px`, "--grid-layout-container-padding-x": `${(i == null ? void 0 : i[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: d }) }); +}, Ga = (e, t = {}, a = null) => (n) => { + const { code: i, label: r, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, ...y } = g.merge({}, t, n), [h, f] = ia(o ? null : i, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, type: (y == null ? void 0 : y.type) || "string" }, a); + return c(e, { ...y, value: h, rawValue: f, $setting: s || {} }); +}, Kn = (Lt = sa, function({ code: e, data: t, ...a }) { + const [n, i] = P({ resource: null, cols: 12, rowHeight: 21, fields: [] }); + return N(() => { + e && E.get(`/api/_/${e}`).then((r) => i(g.pick(r, ["resource", "cols", "rowHeight", "fields"]))); + }, [e]), (n == null ? void 0 : n.resource) && c(Lt, { ...a, rowHeight: n.rowHeight, cols: n.cols, fields: n.fields, data: n != null && n.resource ? { [n == null ? void 0 : n.resource]: t } : {} }); +}); +var Lt; +const Gn = ({ widget: e, widgetPrefix: t = "@pkg/grid-layouts", basicForm: a, ...n }) => { + const i = e != null && e.startsWith("@") ? e : `${t}/${e}`, [r, s] = P(); + return N(() => { + i && Q.getWidgetComponent(i).then(({ defaultProps: o = {}, default: l }) => ({ default: _a(l, o, a) })).catch((o) => ({ default: () => `${o}` })).then((o) => s(b.createElement(o.default, n))); + }, [i]), r; +}, _a = (e, t = {}, a = null) => (n) => { + const { code: i, label: r, extras: s, isVirtual: o, initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, value: y, ...h } = g.merge({}, t, n), [f, C] = ia(o ? null : i, { initialValue: l, initialValueLanguage: u, convertJs: d, convertJsSetting: m, type: (h == null ? void 0 : h.type) || "string" }, a); + return c(e, { ...h, value: f, rawValue: C, $setting: s || {} }); +}, Ya = ({ cols: e, rowHeight: t, itemMargin: a, fields: n, primaryKey: i, dataSource: r, itemClassName: s, itemRender: o = (m, y, h) => m, empty: l = c(Ca, { description: null }), className: u, style: d = {} }) => { + const m = Dt(), y = pe(() => c(sa, { cols: e, rowHeight: t, itemMargin: a, fields: n, className: s }), [n, e, t, a]); + return c("div", { className: R("ff-data-list-content", u), style: d, children: g.isEmpty(r) ? l : r == null ? void 0 : r.map((h, f) => c(b.Fragment, { children: o(b.cloneElement(y, { data: h }), h, f) }, `${m}-${(h == null ? void 0 : h[i]) || f}`)) }); +}, Qa = ({ component: e }) => { + const { base62params: t } = Na(); + return c(q, { children: c(vt, { listCode: e, base62params: E.decode(t) }) }); +}, Xa = () => "Empty", Za = ({ component: e, $setting: t }) => { + const [a, n] = P(); + return N(() => { + if (!e) return n(c(Xa, { description: null })); + Q.getWidgetComponent(e).catch((i) => ({ default: () => `${i}` })).then((i) => b.createElement(i.default, { $setting: t })).then(n); + }, [e]), a ? b.cloneElement(a, {}) : null; +}; +var be, Z, Ce, ve, Je, Ke; +const ne = class ne { + constructor() { + F(this, Z, /* @__PURE__ */ new Map()); + F(this, Ce, {}); + F(this, ve, null); + v(this, "init", (t, a) => { + z(this, Z, t), z(this, Ce, a); + }); + v(this, "get", (t) => (p(this, Z).has(t) || (t = Array.from(p(this, Z).keys()).find((a) => p(this, Z).get(a).uri === t)), p(this, Z).get(t) || {})); + v(this, "redirect", (t, a, n = {}) => { + const { uri: i, type: r, widgetProps: s } = this.get(t) || {}; + let o = xa(i || t, r != "list" ? a : g.mapValues(a, (u) => E.encode(u))); + const l = new URLSearchParams(); + for (const u in s || {}) (s == null ? void 0 : s.type) == "query" && l.append(u, a[u]); + return l.size > 0 && (o = `${o}?${l.toString()}`), p(this, ve).navigate(o, n); + }); + v(this, "getMenus", (t) => { + var a; + return ((a = p(this, Ce)) == null ? void 0 : a[t]) || []; + }); + v(this, "findMenuPathByUuid", (t) => { + let a = []; + for (const n in p(this, Ce)) if (a = p(this, Je).call(this, p(this, Ce)[n], t, [n]), a.length > 1) return a; + return a; + }); + v(this, "getMenusByRouteUuid", (t) => p(this, Ke).call(this, t, Object.values(p(this, Ce)).flat())); + F(this, Je, (t, a, n = []) => { + if (g.isEmpty(t)) return n; + for (const { uuid: i, children: r } of t) { + if (i == a) return n.concat(i); + if (!g.isEmpty(r)) return n.concat(i, p(this, Je).call(this, r, a)); + } + return n; + }); + F(this, Ke, (t, a) => { + var i; + let n = []; + for (const r of a) r.widgetType == "redirect" && (r.uuid == t || r.widget == t ? n.push(r) : (i = r.children) != null && i.length && (n = n.concat(p(this, Ke).call(this, t, r.children)))); + return n; + }); + v(this, "getCurrentMenu", () => { + const { uuid: t } = this.getCurrentRoute() || {}; + if (!t) return; + const a = this.getMenusByRouteUuid(t); + return g.isEmpty(a) ? void 0 : a[0]; + }); + v(this, "getCurrentRoute", (t = 0) => { + var n; + const a = (n = p(this, ve).state.matches[p(this, ve).state.matches.length - 1 - t]) == null ? void 0 : n.route; + if (!a) return null; + for (let [i, r] of p(this, Z)) if (r.uri === a.path) return r; + return null; + }); + v(this, "getPageParams", (t) => { + var r; + const { location: a, matches: n } = p(this, ve).state, i = ((r = n[n.length - 1]) == null ? void 0 : r.params) || {}; + return a.search && new URLSearchParams(a.search).forEach((s, o) => { + i[o] = s; + }), t ? g.get(i, t) : i; + }); + v(this, "createBrowserRouter", (t = {}) => { + if (p(this, Z).size == 0) return null; + const a = De.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), n = De.get(Q.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), i = { [a]: 0 }, r = (o, l) => () => Q.getWidgetComponent(o).then((u) => u.default || function() { + return `${o}`; + }).then((u) => ({ Component: () => b.createElement(Kt, {}, b.createElement(u, l)) })), s = Array.from(p(this, Z).values()).reduce((o, { uuid: l, uri: u, name: d, type: m, component: y, widgetSetting: h, isLogin: f, isLayout: C, extra: w }) => { + let x = {}, I = 0; + switch (m) { + case "list": + x.element = b.createElement(Qa, { component: y }); + break; + case "fsdpf-component": + x.element = b.createElement(Za, { key: y, component: y, $setting: h }); + } + if (w != null && w.layout) { + if (!i[w == null ? void 0 : w.layout]) return i[w == null ? void 0 : w.layout] = o.length, [...o, { path: "/", lazy: r(w == null ? void 0 : w.layout, {}), children: [{ path: u, ...x }] }]; + I = i[w == null ? void 0 : w.layout]; + } + return C && I > -1 ? (o[I].children.push({ path: u, ...x }), o) : [...o, { path: u, ...x }]; + }, [{ path: "/", lazy: r(a, {}), children: [] }]); + return s.push({ index: !0, element: b.createElement(en, { to: n, replace: !0 }) }), z(this, ve, Ea(s, t)); + }); + if (p(ne, be)) return p(ne, be); + } +}; +be = new WeakMap(), Z = new WeakMap(), Ce = new WeakMap(), ve = new WeakMap(), Je = new WeakMap(), Ke = new WeakMap(), F(ne, be, null), v(ne, "getInstance", () => (p(ne, be) || z(ne, be, new ne()), p(ne, be))); +let mt = ne; +const en = ({ to: e, replace: t }) => Ta() ? b.createElement(Fa, { to: e, replace: t }) : (window.document.location = e, "redirect"), Pe = mt.getInstance(), je = new Worker(new URL("/ff-worker/index.js", self.location)), Vt = { getConfigure: (e) => De.get(e), route: { redirect: (...e) => Pe.redirect(...e), getPageParams: (...e) => Pe.getPageParams(...e), getCurrentRoute: () => Pe.getCurrentRoute() }, popup: { notification: (...e) => K.notification(...e), success: (...e) => K.success(...e), error: (...e) => K.error(...e), form: (...e) => K.form(...e), modal: (...e) => K.modal(...e), confirm: (...e) => K.confirm(...e) } }; +var nt, ze, ke; +const j = class j { + constructor() { + v(this, "exec", (t, a = {}, n = {}, i = "") => new Promise((r, s) => { + const o = Et(j, nt)._++; + p(j, ze).set(o, n), j.mQueue.set(o, [r, s]), je.postMessage({ id: o, session: i, category: "eval", method: t, args: a }); + })); + v(this, "clear", (t) => je.postMessage({ session: t, category: "clear" })); + if (p(j, ke)) return p(j, ke); + Promise.resolve().then(() => Pn).then((t) => { + Vt.http = t.http; + }), je.addEventListener("message", ({ data: { id: t, task_id: a, method: n, args: i, category: r, data: s, error: o, session: l } }) => { + if (r === "eval" && j.mQueue.has(t)) o !== null ? j.mQueue.get(t)[1](o) : j.mQueue.get(t)[0](s), p(j, ze).delete(t), j.mQueue.delete(t); + else if (r === "util") try { + const u = g.get(Vt, n.split("/")) || g.get(p(j, ze).get(a), n.split("/")); + if (!g.isFunction(u)) throw `${n} not found`; + Promise.resolve(Reflect.apply(u, void 0, i)).then((d) => { + je.postMessage({ id: t, task_id: a, category: r, method: n, args: i, session: l, data: d, error: null }); + }).catch((d) => { + je.postMessage({ id: t, task_id: a, category: r, method: n, args: i, session: l, data: null, error: d }); + }); + } catch (u) { + je.postMessage({ id: t, task_id: a, category: r, method: n, args: i, session: l, data: null, error: u }); + } + }, !1); + } +}; +nt = new WeakMap(), ze = new WeakMap(), ke = new WeakMap(), v(j, "mQueue", /* @__PURE__ */ new Map()), F(j, nt, 0), F(j, ze, /* @__PURE__ */ new Map()), F(j, ke, null), v(j, "getInstance", () => (p(j, ke) || z(j, ke, new j()), p(j, ke))); +let ht = j; +const $e = ht.getInstance(), oa = () => { + const e = Y(!0), [, t] = b.useReducer((a) => a + 1, 0); + return N(() => () => e.current = !1, []), () => e.current && t(); +}, jt = (e) => { + const t = Y(); + return N(() => { + t.current = e; + }, [e]), t.current; +}, _n = (e) => { + const [t, a] = P(e), n = Y(null), i = ge((r, s) => { + n.current = s, a(r); + }, []); + return N(() => { + n.current && (n.current(t), n.current = null); + }, [t]), [t, i]; +}, Ye = (e = (n) => { +}, t, a = g.isEqual) => { + const n = b.useRef(t); + a(t, n.current) || (n.current = t), b.useEffect(e, [n.current]); +}, tn = Ye, la = (e, t = "string") => { + var a; + if (!Array.isArray(e)) return e; + for (let n = 0; n < e.length; n++) e[n].value = g.toPrimitive((a = e[n]) == null ? void 0 : a.value, t), e[n] && Reflect.has(e[n], "children") && (e[n].children = la(e[n].children, t)); + return e; +}, Yn = (e, t = "json", a = "string", n, i = null) => { + const [r] = re.useForm(n), [s, o] = P([{ label: "无", value: "", disabled: !0 }]), l = Y([]), u = re.useWatch((d) => l.current.length === 0 ? null : g.pick(d, l.current), r) || null; + return N(() => { + Array.isArray(e) ? o(e) : t === "javascript" && e ? $e.exec(e, {}, { getFieldValue: (d) => (l.current.includes(d) || l.current.push(d), r.getFieldValue(d)), getFieldValueForBasicForm: (d) => (l.current.includes(d) || l.current.push(d), i ? i.getFieldValue(d) : r.getFieldValue(d)) }).then((d) => { + o(g.toPrimitive(d, "array")); + }) : e && o(g.toPrimitive(e, "array")); + }, [e, t, u]), la(s, a); +}, Qn = (e) => { + const [t, a] = P(), n = { type: "GET" }; + if (typeof e == "string" ? n.url = e : g.isPlainObject(e) && Object.assign(n, e), !(n != null && n.url)) throw "url is required"; + const i = (r) => E.request(n, !1).resp((s) => (console.log("useSubscribeRequest", r), a(s), s)); + return Ye(() => { + let r = null; + return i().then((s) => { + r = Xt.subscribe(g.throttle(i, 180, { leading: !1, trailing: !0 }), s.res); + }), () => r == null ? void 0 : r(); + }, n), t; +}, an = (e) => { + const [t, a] = b.useState({ gridItems: [], hideItems: [] }); + return b.useEffect(() => { + e && E.get(`/api/_/${e}`).then(({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: y, listenChangeFieldsFunc: h, fields: f }) => ({ pk: n, uuid: i, code: r, resource: s, align: o, cols: l, rowHeight: u, marginX: d, marginY: m, listenChangeFields: y, listenChangeFieldsFunc: h, ...f.reduce((C, w) => { + var x; + return (x = w == null ? void 0 : w.field) != null && x.hidden ? C.hides.push(w == null ? void 0 : w.field) : C.items.push(w), C; + }, { items: [], hides: [] }) })).then(a); + }, [e]), t; +}, nn = ({ max: e = 0, min: t = 0, type: a = "", message: n, pattern: i, required: r = !1, validator: s } = {}, o, l) => { + const [u, d] = P([]); + return N(() => { + const m = []; + if (r) { + let y = l; + switch (l) { + case "number": + case "string": + case "array": + break; + case "bool": + y = "boolean"; + break; + case "json": + y = "object"; + } + m.push({ type: y, required: !0, whitespace: !0, message: "该项必填" }); + } + switch (a) { + case "string": + m.push({ type: a, max: e, min: t, message: n || (t && e ? `字符必须在 ${t} ~ ${e} 之间` : `${e ? "最多能有" : "最少要有"} ${t || e} 个字符`) }); + break; + case "pattern": + m.push({ type: "string", pattern: i, message: n }); + break; + case "validator": + s && m.push(({ getFieldValue: y }) => ({ validator: async (h, f) => { + const C = await $e.exec(s, { value: f, fieldName: o }, { getFieldValue: y }); + return g.isString(C) && C ? Promise.reject(C) : g.isBoolean(C) && !C ? Promise.reject(n) : Promise.resolve(); + } })); + } + d(m); + }, [e, t, a, n, i, r, s]), u; +}, rn = (e, t, a) => { + const [n, i] = P(null); + return N(() => { + const { initDataUri: r = `/api/${e}`, initDataMethod: s = "GET" } = a || {}; + t && E.request({ method: s, url: g.trimEnd(`${r}/${t}`, "/") }).then((o) => { + i(o); + }); + }, [e, t, a]), n; +}, sn = (e, t, a, n = {}) => { + const i = oa(), r = Y(!0), s = Y([]), [o, l] = P(a), u = re.useWatch((d) => JSON.stringify(g.pick(d, s.current)), t) || "{}"; + return N(() => { + e && $e.exec(e, n, { getFieldValue: g.wrap(t.getFieldValue, (d, m) => (s.current.some((y) => g.isEqual(y, m)) || (s.current.push(m), i()), d(m))), isFieldTouched: t.isFieldTouched, isFieldsTouched: t.isFieldsTouched }).then((d) => r.current && l(d)); + }, [e, u, t, n]), N(() => () => r.current = !1, []), o; +}, on = ({ type: e, initialValue: t, initialValueLanguage: a, onChange: n, form: i }) => { + const r = sn(a == "javascript" && t, i, a == "javascript" ? void 0 : t, {}); + return N(() => { + n(a == "javascript" ? g.toPrimitive(r, e) : g.toPrimitive(t, e)); + }, [e, t, r]), null; +}, ln = ({ widget: e = "Input", widgetPrefix: t = "@pkg/grid-layout-forms", widgetDecorator: a, subWidgets: n, basicForm: i, ...r }) => { + const s = e != null && e.startsWith("@") ? e : `${t}/${e}`, [o, l] = P(); + return N(() => { + s && Q.getWidgetComponent(s).then(({ defaultProps: u = {}, default: d }) => ({ default: ca(d, u, i) })).catch((u) => ({ default: () => `${u}` })).then((u) => l(b.createElement(u.default, r))); + }, [s]), o && b.cloneElement(o, r); +}, ca = (e, t = {}, a = null) => (n) => { + const { type: i, code: r, label: s, noStyle: o, placeholder: l, extras: u, validators: d, help: m, isVirtual: y, $isReserved: h, initialValue: f, initialValueLanguage: C, convertJs: w, convertJsSetting: x, widgetPerfix: I, boxStyle: B, widgetDecorator: X, subWidgets: G, ...A } = { ...t, ...n }, D = nn(d || {}, r, i), H = { label: s, noStyle: o, colon: !1, layout: "vertical" }, M = { placeholder: l, ...A }, J = ge((V) => V == null ? void 0 : g.toPrimitive(V, i), [i]); + return c(Wt, { name: r, rules: D, initialValue: J(f), normalize: J, children: (V, k, se) => { + var L; + return c(e, { type: i, rcform: se, itemProps: { validateStatus: k.errors.length > 0 ? "error" : "success", tooltip: m, help: k.errors.length > 0 ? k.errors.join("、") : null, required: ((L = D == null ? void 0 : D[0]) == null ? void 0 : L.required) || !1, ...H }, fieldProps: { ...M, ...V }, $setting: u || {} }); + } }); +}, St = ({ cols: e = 24, rowHeight: t = 16, itemMargin: a = [8, 16], containerPadding: n = [0, 0], fields: i = [], children: r }) => { + const s = ra(i, ca, "@pkg/grid-layout-forms"); + return $("div", { className: "ff-grid-layout-form", style: { "--grid-layout-item-margin-x": `${(a == null ? void 0 : a[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(a == null ? void 0 : a[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": e, "--grid-layout-row-height": `${t}px` }, children: [s, r && b.cloneElement(r, { cols: e, rowHeight: t, itemMargin: a, containerPadding: n, fields: i })] }); +}; +St.propTypes = { fields: O.array }; +const cn = (It = St, ({ code: e, layout: t, name: a, primaryKey: n = 0, style: i = {}, formProps: r = {}, form: s, isPreview: o = !1, className: l, onFinish: u, onValuesChange: d = () => { +}, ...m }) => { + const { align: y, autoComplete: h, resource: f, items: C, hides: w, rowHeight: x, marginX: I, marginY: B, cols: X, listenChangeFields: G, listenChangeFieldsFunc: A, pk: D, uuid: H } = an(e), [M] = re.useForm(s), J = pe(() => [{ name: "__PK__", value: D }, { name: "__PROPS__", value: r }, { name: "__RESOURCE__", value: f }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: H }, { name: "__PRIMARY_KEY__", value: n }], [D, e, H, f, n, r]); + return $(re, { className: l, name: a || e, layout: t || y, fields: J, form: M, autoComplete: h, style: { ...i, position: "relative" }, onFinish: u, onValuesChange: (V, k) => (({ changedValues: se, allValues: L, listenChangeFields: me, listenChangeFieldsFunc: Ne, onValuesChange: it, code: T }) => { + it(se, L), Ne && Array.isArray(me) && $e.exec(Ne, { changedValues: se, allValues: L }, { getFieldValue: M.getFieldValue, setFieldsValue: M.setFieldsValue, isFieldTouched: M.isFieldTouched, isFieldsTouched: M.isFieldsTouched }); + })({ changedValues: V, allValues: k, listenChangeFields: G, listenChangeFieldsFunc: A, onValuesChange: d, code: e }), children: [c(It, { ...m, form: M, code: e, fields: C, cols: X, rowHeight: x, itemMargin: [I, B] }), w == null ? void 0 : w.map((V) => { + var k; + return c(Wt, { name: V.code, children: c(on, { form: M, name: V.code, type: V.type, initialValue: V.initialValue, initialValueLanguage: (k = V.extras) == null ? void 0 : k.initialValueLanguage }) }, JSON.stringify(V.code)); + })] }); +}); +var It; +const da = ({ $setting: e, $close: t, extras: a, code: n, primaryKey: i, ...r }) => { + const [s] = re.useForm(), o = rn(n, i, e); + return N(() => { + o && s.setFieldsValue(o); + }, [o]), c(q, { actions: $(b.Fragment, { children: [c(S, { name: "保存", type: "primary", widget: () => { + const l = s.getFieldValue("__RESOURCE__"), { initDataUri: u = `/api/${n}` } = e || {}; + s.validateFields(!0).then((d) => l ? g.pick(d, [l]) : d).then((d) => E.post(i ? `${u}/${i}` : `${u}`, d).msg(t)).catch(() => K.error("请先完善表单信息", { duration: 2e3 })); + } }), c(S, { name: "取消", widget: () => t(!1) })] }), extras: a, children: c(cn, { form: s, code: n, primaryKey: i, ...r }) }); +}, dn = (e, t, { isReplaceRouteHistory: a = !1 } = {}) => Pe.redirect(t, e, { replace: a }), At = (e, t, { status: { loading: a, disabled: n }, setStatus: i }) => { + const r = { loading: (s) => s === void 0 ? a : i((o) => ({ ...o, loading: s })), disabled: (s) => s === void 0 ? n : i((o) => ({ ...o, disabled: s })) }; + return g.isFunction(t) ? t.call(null, { ...e, ...r }) : g.isString(t) && t ? $e.exec(t, e, r) : null; +}, Mt = (e, t, a, n) => g.isString(t) && t ? Q.getWidgetComponent(t).then(({ default: i }) => K.modal(i, { ...e, $setting: a }, n)).catch((i) => { + K.error(t, { content: i.toString() }); +}) : K.modal(t, { ...e, $setting: a }, n), un = (e, t, a, n) => K.modal(da, { ...e, $setting: a, code: t }, n), gn = (e, t, a, n) => K.modal(vt, { base62params: e, $setting: a, listCode: t }, n), pn = ({ widget: e, widgetType: t, widgetData: a, widgetProps: n, widgetSetting: i, widgetContainerProps: r }, { onAfterClick: s, onBeforeClick: o }) => { + const l = Ge(Le), [u, d] = P({ leading: !0, trailing: !1 }), m = pe(() => { + switch (t) { + case "redirect": + return g.partialRight(dn, e, i); + case "func": + return g.partialRight(At, (i == null ? void 0 : i.code) ?? e, { status: u, setStatus: d }); + case "fsdpf-component": + return g.partialRight(Mt, e, i, r); + case "grid-layout-form": + return g.partialRight(un, e, i, r); + case "data-list": + return g.partialRight(gn, e, i, r); + default: + if ($t(e) || b.isValidElement(e)) return g.partialRight(Mt, e, i, r); + if (g.isFunction(e)) return g.partialRight(At, (i == null ? void 0 : i.code) || e, { status: u, setStatus: d }); + } + return (...y) => console.error("useButton unknown widgetType", t, ...y); + }, [e, t]); + return [g.debounce((y) => (o == null || o(y), Promise.resolve(_t(n, y, { list: l })).then((h) => m({ ...a, ...h })).then((h) => s == null ? void 0 : s(h)).catch(console.error)), 300, { leading: !0, trailing: !1 }), u]; +}, zt = /* @__PURE__ */ new Set(), ft = (e = [], t = 0) => { + const a = e[t]; + if (a.length && !zt.has(a)) { + const n = document.createElement("script"); + n.setAttribute("src", a), n.setAttribute("data-namespace", a), e.length > t + 1 && (n.onload = () => { + ft(e, t + 1); + }, n.onerror = () => { + ft(e, t + 1); + }), zt.add(a), document.body.appendChild(n); + } +}, yt = ({ className: e, type: t, style: a = {}, ...n }) => c("span", { role: "img", className: R("ff-iconfont", e), style: a, ...n, children: c("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: c("use", { xlinkHref: `#${t}` }) }) }); +yt.propTypes = { className: O.string, type: O.string.isRequired, style: O.object }, yt.init = ft; +const Qe = (e) => function({ className: t, children: a, name: n, icon: i, type: r = "default", iconPosition: s = "start", noAuthType: o, onAfterClick: l, onBeforeClick: u, data: d, loading: m, disabled: y, tooltip: h, popConfirm: f, widget: C, widgetType: w, widgetData: x, widgetProps: I, widgetSetting: B, widgetContainerProps: X, ...G }) { + const A = { type: "primary", className: R("ff-button", t), iconPosition: s }; + r === "danger" ? A.danger = !0 : r === "default" && (A.type = r), e === "link" || e === "dashed" ? (A.type = e, r === "default" && (A.className = R(A.className, "ff-default"))) : e !== "circle" && e !== "round" || (A.shape = e), i && (A.icon = c(yt, { type: i })); + const [D, H] = P(!1), [M, { disabled: J, loading: V }] = pn({ widget: C, widgetType: w, widgetData: x, widgetProps: I, widgetSetting: B, widgetContainerProps: X }, { onAfterClick: l, onBeforeClick: u }); + return c(va, { okText: "确定", cancelText: "取消", ...f || {}, disabled: J || y, open: D, onOpenChange: (k) => { + if (!k) return H(k); + f ? H(k) : M(d); + }, onConfirm: () => { + M(d); + }, onClick: (k) => { + k.stopPropagation(); + }, children: c(ka, { ...h, title: D ? null : h == null ? void 0 : h.title, trigger: ["hover", "click"], children: c(lt, { loading: V || m, disabled: J || y, ...A, ...G, children: a || n }) }) }); +}, S = Qe("default"), mn = Qe("link"), hn = Qe("circle"), fn = Qe("round"), yn = Qe("dashed"), Bt = ({ data: e, widget: t, widgetType: a = "fsdpf-component", children: n, widgetData: i, widgetProps: r, widgetSetting: s, widgetContainerProps: o }) => { + const l = Ge(Le), [u, d] = P(!1), [m, y] = P("hover"), [h, f] = P({}), [C, w] = P(); + N(() => { + a == "grid-layout-form" ? w(b.createElement(da, { ...i, $setting: s, code: t })) : a == "data-list" ? w(b.createElement(vt, { base62params: e, $setting: s, listCode: t })) : g.isString(t) ? Q.getWidgetComponent(t).then(({ default: B }) => { + w(b.createElement(B, { ...i, $setting: s })); + }).catch((B) => w(B.toString())) : $t(t) ? w(b.createElement(t, { ...i, $setting: s })) : b.isValidElement(t) && w(b.cloneElement(t, { ...i, $setting: s })); + }, [t, a, i]), N(() => { + Promise.resolve(_t(r, e, { list: l })).then(f); + }, [r, e]); + const x = (B) => { + d(B), !B && y("hover"); + }, I = () => { + d(!0), y("click"); + }; + return c(Sa, { zIndex: 1e3, ...o, onPopupClick: I, onClick: I, open: u, trigger: m, content: c(wn, { children: C && b.cloneElement(C, { ...h, $close: () => x(!1) }) }), children: n, onOpenChange: x, overlayClassName: "ff-popup ff-popover" }); +}, wn = ({ children: e }) => { + const [t, a] = P({}), n = ge((r, s) => a((o) => ({ ...o, [r]: s })), []), i = ge((r) => a((s) => ({ ...s, [r]: void 0 })), []); + return $(_e.Provider, { value: { ele: t, mount: n, unmount: i }, children: [t != null && t.title || t != null && t["sub-title"] ? $("div", { className: "ff-popup-header", children: [(t == null ? void 0 : t.title) || c("div", { className: "ff-popup-title" }), (t == null ? void 0 : t["sub-title"]) || c("div", { className: "ff-popup-sub-title" })] }) : null, e, t != null && t.extras || t != null && t.actions ? $("div", { className: "ff-popup-footer", children: [(t == null ? void 0 : t.extras) || c("div", { className: "ff-popup-extras" }), (t == null ? void 0 : t.actions) || c("div", { className: "ff-popup-actions" })] }) : null] }); +}; +Bt.propTypes = { widgetType: O.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }, S.propTypes = { type: O.oneOf(["primary", "default", "danger", ""]), name: O.string, icon: O.string, iconPosition: O.oneOf(["start", "end"]), data: O.any, widget: O.any, widgetType: O.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: O.object, widgetProps: O.object, widgetSetting: O.object, widgetContainerProps: O.object }, S.Link = mn, S.Link.defaultProps = S.defaultProps, S.Link.propTypes = S.propTypes, S.Circle = hn, S.Circle.defaultProps = S.defaultProps, S.Circle.propTypes = S.propTypes, S.Round = fn, S.Round.defaultProps = S.defaultProps, S.Round.propTypes = S.propTypes, S.Dashed = yn, S.Dashed.defaultProps = S.defaultProps, S.Dashed.propTypes = S.propTypes, S.Popover = Bt; +const bn = ({ fields: e, formProps: t, $close: a }) => { + const [n] = re.useForm(), i = pe(() => [{ name: "__PROPS__", value: t }], [t]); + return c(q, { actions: $(b.Fragment, { children: [c(S, { name: "取消", widget: () => a(!1) }), c(S, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(a) })] }), children: c(re, { fields: i, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: r, ...s }) => c(ln, { code: r, ...s }, r)) }) }); +}, Cn = ({ className: e, $close: t, children: a, title: n, subTitle: i, actions: r, extras: s, zIndex: o, ...l }) => $(La, { ...l, prefixCls: "ff-drawer", className: R("ff-popup", e), height: 378, maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (u) => ({ motionAppear: !0, motionName: `panel-motion-${u}` }), children: [$("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: l.onClose, children: c(Ct, { type: "close" }) }), n, i] }), c("div", { className: "ff-popup-body", children: a }), $("div", { className: "ff-popup-footer", children: [s, " ", r] })] }), vn = ({ className: e, $close: t, $event: a, children: n, title: i, subTitle: r, actions: s, extras: o, zIndex: l, placement: u, ...d }) => { + const m = (a == null ? void 0 : a.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: a == null ? void 0 : a.pageX, y: a == null ? void 0 : a.pageY } }; + return c(Va, { ...d, ...m, prefixCls: "ff-modal", modalRender: () => $("div", { className: R("ff-modal-content ff-popup", e), children: [$("div", { className: "ff-popup-header", children: [c("button", { "aria-label": "Close", className: "ff-popup-close", onClick: d.onClose, children: c(Ct, { type: "close" }) }), i, " ", r] }), c("div", { className: "ff-popup-body", children: n }), $("div", { className: "ff-popup-footer", children: [o, " ", s] })] }) }); +}, ua = ({ placement: e, $close: t, $event: a, children: n, title: i, ...r }) => { + const [s, o] = P({}), [l, u] = P(!0), d = ge((f, C) => o((w) => ({ ...w, [f]: C })), []), m = ge((f) => o((C) => ({ ...C, [f]: void 0 })), []); + let y = { ...r, className: s.rootClassName, title: s.title || i && b.createElement("div", { className: R("ff-popup-title") }, i), subTitle: s["sub-title"], actions: s.actions, extras: s.extras, children: n, $close: t, $event: a, onClose: () => u(!1) }; + const h = () => { + t(!1); + }; + return c(_e.Provider, { value: { ele: s, mount: d, unmount: m }, children: e && e !== "center" ? c(Cn, { ...y, placement: e, open: l, afterOpenChange: (f) => !f && h() }) : c(vn, { ...y, visible: l, afterClose: h }) }); +}; +ua.propTypes = { placement: O.oneOf(["center", "left", "top", "right", "bottom"]) }; +const W = () => { + const [e, t] = Ra({ maxCount: 6, motion: { motionName: "ff-notification-fade", motionAppear: !0, motionEnter: !0, motionLeave: !0, onLeaveStart: (r) => { + const { offsetHeight: s } = r; + return { height: s }; + }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, a] = b.useReducer((r) => r + 1, 0); + N(() => { + W.$onClick = n, W.$queue.forEach(([r, s, o], l, u) => { + i([s, o], ...r), delete u[l]; + }); + }, []); + const n = (r, s = {}, o = {}) => new Promise((l, u) => i([l, u], r, s, o)), i = ([r, s], o, l = {}, u = {}) => { + const d = W.$index++, m = (y) => ((h, f) => (W.$popups.delete(h), a(), f == null ? void 0 : f()))(d, () => r(y)); + if (o === Gt) return e.open({ ...u, key: d, content: b.createElement(o, { ...l, $close: () => e.close(d) }) }); + W.$popups.set(d, b.createElement(ua, { zIndex: d, maskClosable: !1, $event: l == null ? void 0 : l.$event, ...u, key: d, $close: m }, b.isValidElement(o) ? b.cloneElement(o, { ...l, $close: m }) : o != null && o.name ? b.createElement(o, { ...l, $close: m }) : o)), a(); + }; + return $(b.Fragment, { children: [Array.from(W.$popups).map(([r, s]) => s), t] }); +}; +W.$popups = /* @__PURE__ */ new Map(), W.$index = 0, W.$queue = [], W.$onClick = (...e) => new Promise((t, a) => { + W.$queue.push([e, t, a]); +}); +const Ut = (e, t, a = {}) => W.$onClick(e, t, a), st = (e, { showProgress: t, duration: a, ...n } = { duration: 1.5 }) => W.$onClick(Gt, { content: e, ...n }, { showProgress: t, duration: a }), K = { modal: Ut, confirm: (e, t = {}) => W.$onClick(ja, { content: e, ...t }, { placement: "center" }), form: (e, t = {}, a = {}) => Ut(bn, { formProps: a, fields: e }, { placement: "center", ...t }).then((n) => { + if (n === !1) throw !1; + return n; +}), notification: st, success: (e, t = { duration: 1.5 }) => st(e, { ...t, className: "ff-notification-success", icon: "check" }), error: (e, t = { duration: 1.5 }) => st(e, { ...t, className: "ff-notification-error", icon: "close" }) }; +Be.configure({ showSpinner: !1 }), Ue.interceptors.request.use((e) => { + e.headers.Platform = "web", e.headers.SaaS = window.localStorage.getItem("SaaS"); + const t = window.localStorage.getItem(tt); + return e.headers.Authorization = t ? `Bearer ${t} ` : void 0, Be.inc(), e; +}, (e) => (Be.done(), Promise.reject({ code: -1, msg: e }))), Ue.interceptors.response.use(({ data: e, headers: t }) => (Be.done(), { ...e, res: t == null ? void 0 : t.res }), function(e) { + return Be.done(), Promise.reject(e.message); +}), window.addEventListener("unhandledrejection", ct.onUnhandledRejection), ct.onMsg = (e, t) => K[[0, 1].includes(e) ? "success" : "error"](t).then(() => e === 20300 && Pe.redirect(De.get("Common.WEBSITE_LOGIN_PAGE"))); +const wt = { appUrl: "", init: (e, t, a) => { + wt.appUrl = a, Ue.defaults.baseURL = a, Ue.defaults.timeout = 15e3, Object.assign(wt, new ct(e, t, Ue)); +} }, E = wt; +class Pt extends Error { + constructor(t, a) { + super(a), Error.captureStackTrace && Error.captureStackTrace(this, Pt), !a instanceof We && (this.name = `${t} Error Runtime`); + } +} +class We extends Error { + constructor(t, ...a) { + super(...a), Error.captureStackTrace && Error.captureStackTrace(this, We), this.name = `${t} Not Found`; + } +} +const ot = "mine", tt = "token"; +var Se, _; +const ie = class ie { + constructor() { + F(this, _, /* @__PURE__ */ new Map()); + v(this, "setVendor", (t, a) => p(this, _).set(t, new Jt(a, async (n, i) => { + var s, o; + if (!(n != null && n.default)) throw "@pkg not found"; + let r = () => i; + switch ("function") { + case typeof (r = (s = n.default) == null ? void 0 : s[`./${i}/index.jsx`]): + case typeof (r = (o = n.default) == null ? void 0 : o[`./${i}/index.js`]): + return r(); + } + throw new We(i); + }))); + v(this, "getWidgetComponent", async (t) => { + if (!t) throw "getWidgetComponent widget is required"; + const [, a] = t == null ? void 0 : t.split("@ff/"), [, n] = t == null ? void 0 : t.split("@app/"), [, i] = t == null ? void 0 : t.split("@pkg/"), [, r] = t == null ? void 0 : t.split("@fsdpf/"); + try { + switch (!0) { + case (!!a && p(this, _).has("pkg")): + return await p(this, _).get("pkg").get(a); + case (!!n && p(this, _).has("pkg")): + return await p(this, _).get("pkg").get(n); + case (!!i && p(this, _).has("pkg")): + return await p(this, _).get("pkg").get(i); + case (!!r && p(this, _).has("pkg")): + return await p(this, _).get("pkg").get(r); + default: + throw new We(t); + } + } catch (s) { + throw new Pt(t, s); + } + }); + v(this, "getRoutes", () => E.get("/api/my-router").then((t) => [...t, { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/DataListSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutFormSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ResourceApiSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ChartsSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/FsmSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ComponentSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/NotFound" }].map(({ uuid: a, ...n }) => [a, { uuid: a, ...n }])).then((t) => new Map(t))); + v(this, "getMenus", () => E.get("/api/my-menu")); + v(this, "getConfigure", () => E.get("api/init-configure")); + v(this, "getWidgetOperationAuth", () => E.get("/api/init-widget-operation-auth").then((t) => t.reduce((a, { uuid: n, auth: i }) => [...a, [n, i]], []))); + v(this, "getPhoneNumber", (t) => E.get(`/api/user-wx-phone-number/${t}`)); + v(this, "getUserToken", () => { + const t = window.localStorage.getItem(tt); + if (!t) return ""; + const a = t.split("."); + if (!Array.isArray(a) || a.length !== 3) throw "登录令牌无效!"; + const { iat: n } = JSON.parse(window.atob(a[1])); + if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - n > 2592e3) throw "登录令牌已过期, 请重新登录!"; + return t; + }); + v(this, "checkUserToken", () => { + try { + return !!this.getUserToken(); + } catch { + return !1; + } + }); + v(this, "getUserInfo", (t = !0) => { + var a; + try { + const n = this.getUserToken(); + if (!n) return Promise.resolve(null); + const { iat: i } = JSON.parse(window.atob((a = n == null ? void 0 : n.split(".")) == null ? void 0 : a[1])), { iat: r, ...s } = E.decode(window.localStorage.getItem(ot) || "", {}); + return r === i ? Promise.resolve(s) : E.get("/api/mine-info").then(({ User: o = null }) => (window.localStorage.setItem(ot, E.encode({ ...o, iat: i })), o)); + } catch (n) { + console.error(n), t && Popup.error("请登录").then(logout); + } + return Promise.resolve(null); + }); + v(this, "login", (t, a, n = {}) => E.post("/api/user-token", { username: t, passwd: Oa.hash(a), platform: "web", ...n }).then(({ token: i }) => (window.localStorage.setItem(tt, i), i))); + v(this, "logout", () => { + window.localStorage.removeItem(ot), window.localStorage.removeItem(tt); + }); + if (p(ie, Se)) return p(ie, Se); + } +}; +Se = new WeakMap(), _ = new WeakMap(), F(ie, Se, null), v(ie, "getInstance", () => (p(ie, Se) || z(ie, Se, new ie()), p(ie, Se))); +let bt = ie; +const Q = bt.getInstance(), kn = b.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), Sn = b.createContext({ set: () => { +}, get: () => { +}, assign: () => { +}, currentRoute: () => { +} }), $t = (e) => !!(e != null && e.name) && (e.prototype instanceof b.Component || /^[A-Z]/.test(e.name)), Pn = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: kn, AppGlobalParamsContext: Sn, cache: Jt, configure: De, default: Q, func: $e, http: E, isReactComponent: $t, route: Pe }, Symbol.toStringTag, { value: "Module" })), $n = (e, t, a = "children") => { + if (g.isEmpty(e)) return {}; + const n = g.find(e, ["value", t]); + if (!g.isEmpty(n)) return n; + const i = e.length; + for (let r = 0; r < i; r++) { + const { [a]: s } = e[r], o = $n(s, t, a); + if (!g.isEmpty(o)) return o; + } + return {}; +}; +export { + $t as $, + Yn as A, + Qn as B, + cn as C, + Da as D, + St as E, + ln as F, + Kn as G, + Ja as H, + da as I, + an as J, + nn as K, + rn as L, + sn as M, + yt as N, + S as O, + Ia as P, + pn as Q, + Xt as R, + q as S, + _e as T, + Kt as U, + W as V, + K as W, + Dn as X, + Wn as Y, + qn as Z, + Q as _, + na as a, + E as a0, + Jt as a1, + De as a2, + $e as a3, + Pe as a4, + kn as a5, + Sn as a6, + $n as a7, + sa as b, + Gn as c, + ra as d, + kt as e, + ea as f, + Zt as g, + ta as h, + aa as i, + vt as j, + Le as k, + Ha as l, + Ya as m, + za as n, + Ua as o, + Aa as p, + Ma as q, + Hn as r, + Jn as s, + gt as t, + ia as u, + oa as v, + jt as w, + _n as x, + Ye as y, + tn as z +}; diff --git a/dist/common/main-DHW9LhcM.js b/dist/common/main-DHW9LhcM.js deleted file mode 100644 index 8fb9423..0000000 --- a/dist/common/main-DHW9LhcM.js +++ /dev/null @@ -1,2244 +0,0 @@ -var __defProp = Object.defineProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value; -var __publicField = (obj, key, value) => (__defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value), value), __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}, __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); -var __privateWrapper = (obj, member, setter, getter) => ({ - set _(value) { - __privateSet(obj, member, value, setter); - }, - get _() { - return __privateGet(obj, member, getter); - } -}); -import _ from "lodash"; -import axios from "axios"; -import React, { useMemo, useEffect, useRef, useState, useCallback, useContext, useLayoutEffect, useId as useId$1 } from "react"; -import Request from "ff-request"; -import SparkMD5 from "spark-md5"; -import { jsx, jsxs, Fragment } from "react/jsx-runtime"; -import { QuestionOutlined, LoadingOutlined, createFromIconfontCN } from "@ant-design/icons"; -import cx from "classnames"; -import { P as PropTypes, N as NProgress } from "./vender-CMS8SASe.js"; -import Form, { Field, FieldContext } from "rc-field-form"; -import { notification as notification$1, Drawer as Drawer$1, Modal as Modal$1, Form as Form$1, ConfigProvider, Input, Button as Button$1, Breadcrumb, Tree, Pagination, Table, Empty as Empty$1, Popconfirm, Tooltip, Popover as Popover$1 } from "antd"; -import update from "immutability-helper"; -import { useMergedState } from "rc-util"; -import { useParams, generatePath, Navigate, createBrowserRouter } from "react-router-dom"; -const Iconfont = ({ type, className, ...props }) => { - if (!(type != null && type.startsWith("icon-"))) - return /* @__PURE__ */ jsx(QuestionOutlined, {}); - if (type === "icon-loading") - return /* @__PURE__ */ jsx(LoadingOutlined, { className, ...props }); - const Icon = useMemo(() => createFromIconfontCN({ scriptUrl: configure.get("Common.ICONFONT", []) }), [configure.get("Common.ICONFONT")]); - return /* @__PURE__ */ jsx(Icon, { type, className: cx("iconfont", className), ...props }); -}, Notification = ({ className, title, content, icon, $close, category, duration = 4.5 }) => { - const [api, contextHolder] = notification$1.useNotification(); - return useEffect(() => { - api[category || "open"]({ - className, - message: title, - description: content, - icon, - duration, - onClose: () => $close(!1) - }); - }, [title, content, icon]), contextHolder; -}, Confirm = ({ className, title, content, okText, $close, duration = 5e3 }) => { - var _a; - const timeRef = useRef(), [time, setTime] = useState(); - return useEffect(() => (time > 0 && (timeRef.current = setTimeout(() => { - time <= 1 ? $close() : setTime((time2) => time2 - 1); - }, 1e3)), () => clearTimeout(timeRef.current)), [time]), useEffect(() => { - setTime(Math.max(Math.ceil(duration / 1e3), 0)); - }, [duration]), /* @__PURE__ */ jsx("div", { className: cx("ff-confirm", className), onClick: (e) => e.mpEvent.currentTarget.id === e.mpEvent.target.id && $close(), children: /* @__PURE__ */ jsxs("div", { className: "ff-confirm-container", children: [ - /* @__PURE__ */ jsx("div", { className: "ff-confirm-title", children: title }), - /* @__PURE__ */ jsx("div", { className: "ff-confirm-content", children: content }), - /* @__PURE__ */ jsxs("div", { className: "ff-confirm-operations", children: [ - /* @__PURE__ */ jsxs("div", { className: "ff-confirm-cancel", onClick: () => $close(!1), children: [ - "取消 (", - time, - ")" - ] }), - React.isValidElement(okText) ? React.cloneElement(okText, { - onClick: () => $close(!0), - className: cx("ff-confirm-ok", (_a = okText.props) == null ? void 0 : _a.className) - }) : /* @__PURE__ */ jsx("div", { className: "ff-confirm-ok", onClick: () => $close(!0), children: okText || "确定" }) - ] }) - ] }) }); -}, SlotContext = React.createContext({ - ele: {}, - mount: () => { - }, - unmount: () => { - } -}), FFContainer = ({ className, children, actions, title, subTitle, extras, style }) => (actions && FFContainer.Action({ children: actions }), title && FFContainer.Title({ children: title }), subTitle && FFContainer.SubTitle({ children: subTitle }), extras && FFContainer.Extra({ children: extras }), /* @__PURE__ */ jsx("div", { className: cx("ff-container", className), style, children })), slot = (name) => ({ children, className }) => { - const { mount, unmount } = React.useContext(SlotContext); - return useEffect(() => (mount(name, React.createElement("div", { - key: `ff-${name}`, - className: cx(`ff-popup-${name}`, className) - }, children)), () => unmount(name)), [className, children]), null; -}; -FFContainer.Action = slot("actions"); -FFContainer.Title = slot("title"); -FFContainer.SubTitle = slot("sub-title"); -FFContainer.Extra = slot("extras"); -const SlotRender = ({ name }) => { - const { ele } = React.useContext(SlotContext); - return ele == null ? void 0 : ele[name]; -}; -FFContainer.propTypes = { - // 容器 className - className: PropTypes.string, - // 容器样式 - style: PropTypes.object, - // 标题占位符 - title: PropTypes.any, - // 副标题占位符 - subTitle: PropTypes.any, - // 操作按钮占位符 - actions: PropTypes.any, - // 扩展安装占位符 - extras: PropTypes.any -}; -FFContainer.defaultProps = { - style: {} -}; -const Drawer = React.forwardRef(({ $close, children, className, title, ...props }, ref) => { - const closeCarryRef = useRef(), [open, setOpen] = useState(!0), [ele, setEle] = useState({}), onMount = useCallback((solt, ele2) => setEle((state) => ({ ...state, [solt]: ele2 })), []), onUnmount = useCallback((solt) => setEle((state) => ({ ...state, [solt]: void 0 })), []); - return React.useImperativeHandle(ref, () => ({ - handleClose: (result) => { - closeCarryRef.current = result, setOpen(!1); - } - })), /* @__PURE__ */ jsx(SlotContext.Provider, { value: { ele, mount: onMount, unmount: onUnmount }, children: /* @__PURE__ */ jsx( - Drawer$1, - { - ...props, - title: title || (ele == null ? void 0 : ele.title), - open, - onClose: () => { - closeCarryRef.current = !1, setOpen(!1); - }, - afterOpenChange: (open2) => !open2 && $close(closeCarryRef.current), - className: cx("ff-popup ff-drawer", className, ele == null ? void 0 : ele.className), - extra: ele == null ? void 0 : ele["sub-title"], - classNames: { header: "ff-popup-header", footer: "ff-popup-footer" }, - footer: ele != null && ele.extras || ele != null && ele.actions ? /* @__PURE__ */ jsxs(React.Fragment, { children: [ - (ele == null ? void 0 : ele.extras) || /* @__PURE__ */ jsx("div", { className: "ff-popup-extras" }), - (ele == null ? void 0 : ele.actions) || /* @__PURE__ */ jsx("div", { className: "ff-popup-actions" }) - ] }) : void 0, - children - } - ) }); -}), Modal = React.forwardRef(({ $close, children, className, title, ...props }, ref) => { - const closeCarryRef = useRef(), [open, setOpen] = useState(!0), [ele, setEle] = useState({}), onMount = useCallback((solt, ele2) => setEle((state) => ({ ...state, [solt]: ele2 })), []), onUnmount = useCallback((solt) => setEle((state) => ({ ...state, [solt]: void 0 })), []); - return React.useImperativeHandle(ref, () => ({ - handleClose: (result) => { - closeCarryRef.current = result, setOpen(!1); - } - })), /* @__PURE__ */ jsx(SlotContext.Provider, { value: { ele, mount: onMount, unmount: onUnmount }, children: /* @__PURE__ */ jsx( - Modal$1, - { - ...props, - title: /* @__PURE__ */ jsxs(Fragment, { children: [ - title || (ele == null ? void 0 : ele.title), - ele == null ? void 0 : ele["sub-title"] - ] }), - open, - onCancel: () => { - closeCarryRef.current = !1, setOpen(!1); - }, - afterOpenChange: (open2) => !open2 && $close(closeCarryRef.current), - className: cx("ff-popup ff-modal", className, ele == null ? void 0 : ele.className), - keyboard: !0, - classNames: { header: "ff-popup-header", footer: "ff-popup-footer" }, - footer: ele != null && ele.extras || ele != null && ele.actions ? /* @__PURE__ */ jsxs(React.Fragment, { children: [ - (ele == null ? void 0 : ele.extras) || /* @__PURE__ */ jsx("div", { className: "ff-popup-extras" }), - (ele == null ? void 0 : ele.actions) || /* @__PURE__ */ jsx("div", { className: "ff-popup-actions" }) - ] }) : null, - children - } - ) }); -}); -var _instance, _oWorker, _topic, _initWorker; -const _ResWs = class _ResWs { - constructor() { - __privateAdd(this, _oWorker, null); - __privateAdd(this, _topic, /* @__PURE__ */ new Map()); - __privateAdd(this, _initWorker, () => { - if (__privateGet(this, _oWorker)) - return __privateGet(this, _oWorker).port.postMessage({ command: "status", data: [] }); - __privateSet(this, _oWorker, new SharedWorker(new URL("data:text/plain;base64,Y29uc3QgcG9ydHMgPSBbXQpsZXQgd3MgPSBudWxsCgpmdW5jdGlvbiBpbml0V3ModXJsKSB7CiAgd3MgPSBuZXcgV2ViU29ja2V0KHVybCkKICB3cy5vbmNsb3NlID0gKGUpID0+IGNvbnNvbGUubG9nKCd3cyBjbG9zZWQnLCBlKQogIHdzLm9uZXJyb3IgPSAoZSkgPT4gY29uc29sZS5sb2coJ3dzIGVycm9yJywgZSkKICB3cy5vbm1lc3NhZ2UgPSAoeyBkYXRhIH0pID0+IHsKICAgIGNvbnN0IHZhbHVlID0gSlNPTi5wYXJzZShkYXRhKQogICAgcG9ydHMuZm9yRWFjaChwb3J0ID0+IHBvcnQucG9zdE1lc3NhZ2UodmFsdWUpKQogIH0KfQoKZnVuY3Rpb24gY2xvc2VXcygpIHsKICBpZiAoIXdzIHx8IHdzLnJlYWR5U3RhdGUgPT0gV2ViU29ja2V0Lk9QRU4pIHsKICAgIHdzLmNsb3NlKCkKICB9Cn0KCmZ1bmN0aW9uIHN0YXR1cygpIHsKICB0aGlzLnBvc3RNZXNzYWdlKHsgcmVhZHlTdGF0ZTogd3MgPyB3cy5yZWFkeVN0YXRlIDogV2ViU29ja2V0LkNMT1NFRCB9KQp9CgpzZWxmLm9uY29ubmVjdCA9IChlKSA9PiB7CiAgY29uc3QgcG9ydCA9IGUucG9ydHNbMF07CgogIHBvcnQub25tZXNzYWdlID0gKHsgZGF0YTogeyBjb21tYW5kLCBkYXRhIH0gfSkgPT4gewogICAgaWYgKGNvbW1hbmQgJiYgWydpbml0V3MnLCAnY2xvc2VXcycsICdzdGF0dXMnXS5pbmNsdWRlcyhjb21tYW5kKSkgUmVmbGVjdC5hcHBseShzZWxmPy5bY29tbWFuZF0sIHBvcnQsIGRhdGEgfHwgW10pCiAgfQoKICBwb3J0cy5wdXNoKHBvcnQpCn0K", self.location))), __privateGet(this, _oWorker).port.onmessage = (e) => { - var _a, _b; - (_a = e.data) != null && _a.uuid ? __privateGet(this, _topic).forEach((flag, fn2) => { - var _a2; - (flag == "*" || (_a2 = flag == null ? void 0 : flag.includes) != null && _a2.call(flag, e.data.uuid)) && fn2(e.data); - }) : ((_b = e.data) == null ? void 0 : _b.readyState) == WebSocket.CLOSED && http.get("/api/user-api-token").then(({ token, expire_at }) => { - __privateGet(this, _oWorker).port.postMessage({ command: "initWs", data: [`ws${_.trimStart(AppUrl, "http")}api/user-resource-status-ws?token=${token}`] }); - }); - }, __privateGet(this, _oWorker).port.postMessage({ command: "status", data: [] }); - }); - __publicField(this, "subscribe", (cb, res = []) => (res ? Array.isArray(res) && res.length == 0 ? res = "*" : Array.isArray(res) || (res = [res].flat()) : res = "*", __privateGet(this, _topic).set(cb, res), __privateGet(this, _topic).size == 1 && __privateGet(this, _initWorker).call(this), () => this.unsubscribe(cb))); - __publicField(this, "unsubscribe", (cb) => __privateGet(this, _topic).delete(cb)); - if (__privateGet(_ResWs, _instance)) - return __privateGet(_ResWs, _instance); - } -}; -_instance = new WeakMap(), _oWorker = new WeakMap(), _topic = new WeakMap(), _initWorker = new WeakMap(), __privateAdd(_ResWs, _instance, null), __publicField(_ResWs, "getInstance", () => (__privateGet(_ResWs, _instance) || __privateSet(_ResWs, _instance, new _ResWs()), __privateGet(_ResWs, _instance))); -let ResWs = _ResWs; -const ResWs$1 = ResWs.getInstance(), useUpdate = () => { - const isMouned = useRef(!0), [, forceUpdate] = React.useReducer((x) => x + 1, 0); - return useEffect(() => () => isMouned.current = !1, []), () => isMouned.current && forceUpdate(); -}, usePrevious = (state) => { - const ref = useRef(); - return useEffect(() => { - ref.current = state; - }, [state]), ref.current; -}, useStateWithCallback = (initialState) => { - const [state, setState] = useState(initialState), callbackRef = useRef(null), setStateWithCallback = useCallback((newState, callback) => { - callbackRef.current = callback, setState(newState); - }, []); - return useEffect(() => { - callbackRef.current && (callbackRef.current(state), callbackRef.current = null); - }, [state]), [state, setStateWithCallback]; -}, useDeepEqualEffect = (callback = (prevDeps) => { -}, deps, compare = _.isEqual) => { - const oldDeps = React.useRef(deps); - compare(deps, oldDeps.current) || (oldDeps.current = deps), React.useEffect(callback, [oldDeps.current]); -}, transformOptions = (arr, type = "string") => { - var _a; - if (!Array.isArray(arr)) - return arr; - for (let i = 0; i < arr.length; i++) - arr[i].value = _.toPrimitive((_a = arr[i]) == null ? void 0 : _a.value, type), arr[i] && Reflect.has(arr[i], "children") && (arr[i].children = transformOptions(arr[i].children, type)); - return arr; -}, useOptions = (options, language = "json", type = "string", form, basicForm = null) => { - const [rcform] = Form.useForm(form), [data2, setData] = useState([{ label: "无", value: "", disabled: !0 }]), dependenciesFieldsRef = useRef([]), dependenciesValue = Form.useWatch((data3) => dependenciesFieldsRef.current.length === 0 ? null : _.pick(data3, dependenciesFieldsRef.current), rcform) || null; - return useEffect(() => { - Array.isArray(options) ? setData(options) : language === "javascript" && options ? fn.exec(options, {}, { - getFieldValue: (namePath) => (dependenciesFieldsRef.current.includes(namePath) || dependenciesFieldsRef.current.push(namePath), rcform.getFieldValue(namePath)), - getFieldValueForBasicForm: (namePath) => (dependenciesFieldsRef.current.includes(namePath) || dependenciesFieldsRef.current.push(namePath), basicForm ? basicForm.getFieldValue(namePath) : rcform.getFieldValue(namePath)) - }).then((data3) => { - setData(_.toPrimitive(data3, "array")); - }) : options && setData(_.toPrimitive(options, "array")); - }, [options, language, dependenciesValue]), transformOptions(data2, type); -}, useSubscribeRequest = (param) => { - const [data2, setData] = useState(), opts = { type: "GET" }; - if (typeof param == "string" ? opts.url = param : _.isPlainObject(param) && Object.assign(opts, param), !(opts != null && opts.url)) - throw "url is required"; - const initData = (e) => http.request(opts, !1).resp((resp) => (console.log("useSubscribeRequest", e), setData(resp), resp)); - return useDeepEqualEffect(() => { - let unsubscribe = null; - return initData().then((resp) => { - unsubscribe = ResWs$1.subscribe(_.throttle(initData, 180, { leading: !1, trailing: !0 }), resp.res); - }), () => unsubscribe == null ? void 0 : unsubscribe(); - }, opts), data2; -}, useConfigure = (code) => { - const [data2, setData] = React.useState({ gridItems: [], hideItems: [] }); - return React.useEffect(() => { - code && http.get(`/api/_/${code}`).then(({ - pk, - uuid, - code: code2, - resource, - align, - cols, - rowHeight, - marginX, - marginY, - listenChangeFields, - listenChangeFieldsFunc, - fields - }) => ({ - pk, - uuid, - code: code2, - resource, - align, - cols, - rowHeight, - marginX, - marginY, - listenChangeFields, - listenChangeFieldsFunc, - ...fields.reduce((carry, item) => { - var _a; - return (_a = item == null ? void 0 : item.field) != null && _a.hidden ? carry.hides.push(item == null ? void 0 : item.field) : carry.items.push(item), carry; - }, { items: [], hides: [] }) - })).then(setData); - }, [code]), data2; -}, useRules = ({ - max = 0, - min = 0, - type = "", - message, - pattern, - required = !1, - validator -} = {}, fieldName, fieldType) => { - const [rules, setRules] = useState([]); - return useEffect(() => { - const initRules = []; - if (required) { - let requiredFieldType = fieldType; - switch (fieldType) { - case "number": - case "string": - case "array": - break; - case "bool": - requiredFieldType = "boolean"; - break; - case "json": - requiredFieldType = "object"; - break; - } - initRules.push({ type: requiredFieldType, required: !0, whitespace: !0, message: "该项必填" }); - } - switch (type) { - case "string": - initRules.push({ - type, - max, - min, - message: message || (min && max ? `字符必须在 ${min} ~ ${max} 之间` : `${max ? "最多能有" : "最少要有"} ${min || max} 个字符`) - }); - break; - case "pattern": - initRules.push({ type: "string", pattern, message }); - break; - case "validator": - validator && initRules.push(({ getFieldValue }) => ({ - validator: async (__, value) => { - const msg = await fn.exec(validator, { value, fieldName }, { getFieldValue }); - return _.isString(msg) && msg ? Promise.reject(msg) : _.isBoolean(msg) && !msg ? Promise.reject(message) : Promise.resolve(); - } - })); - break; - } - setRules(initRules); - }, [max, min, type, message, pattern, required, validator]), rules; -}, useFormData = (code, primaryKey, formSetting) => { - const [formData, setFormData] = useState(null); - return useEffect(() => { - const { - initDataUri = `/api/${code}`, - initDataMethod = "GET" - } = formSetting || {}; - primaryKey && http.request({ - method: initDataMethod, - url: _.trimEnd(`${initDataUri}/${primaryKey}`, "/") - }).then((data2) => { - setFormData(data2); - }); - }, [code, primaryKey, formSetting]), formData; -}, useFnRun = (fn$1, form, initialValue, props = {}) => { - const forceUpdate = useUpdate(), isMountedRef = useRef(!0), dependenciesRef = useRef([]), [result, setResult] = useState(initialValue), flag = Form.useWatch((values) => JSON.stringify(_.pick(values, dependenciesRef.current)), form) || "{}"; - return useEffect(() => { - fn$1 && fn.exec(fn$1, props, { - getFieldValue: _.wrap(form.getFieldValue, (cb, namePath) => (dependenciesRef.current.some((item) => _.isEqual(item, namePath)) || (dependenciesRef.current.push(namePath), forceUpdate()), cb(namePath))), - isFieldTouched: form.isFieldTouched, - isFieldsTouched: form.isFieldsTouched - }).then((v) => isMountedRef.current && setResult(v)); - }, [fn$1, flag, form, props]), useEffect(() => () => isMountedRef.current = !1, []), result; -}, GridLayoutFormHoc = (WrapComponent) => ({ - code, - layout, - name, - primaryKey = 0, - style = {}, - formProps = {}, - form: initForm, - isPreview = !1, - className, - onFinish, - onValuesChange = () => { - }, - ...props -}) => { - const { - align, - autoComplete, - resource, - items, - hides, - rowHeight, - marginX, - marginY, - cols, - listenChangeFields, - listenChangeFieldsFunc, - pk, - uuid - } = useConfigure(code), [form] = Form$1.useForm(initForm), onFormValuesChange = ({ - changedValues, - allValues, - listenChangeFields: listenChangeFields2, - listenChangeFieldsFunc: listenChangeFieldsFunc2, - onValuesChange: onValuesChange2, - code: code2 - }) => { - onValuesChange2(changedValues, allValues), listenChangeFieldsFunc2 && Array.isArray(listenChangeFields2) && fn.exec( - listenChangeFieldsFunc2, - { changedValues, allValues }, - { - getFieldValue: form.getFieldValue, - setFieldsValue: form.setFieldsValue, - isFieldTouched: form.isFieldTouched, - isFieldsTouched: form.isFieldsTouched - } - ); - }, formPropsFields = useMemo(() => [ - { name: "__PK__", value: pk }, - { name: "__PROPS__", value: formProps }, - { name: "__RESOURCE__", value: resource }, - { name: "__LAYOUT_KEY__", value: code }, - { name: "__LAYOUT_UUID__", value: uuid }, - { name: "__PRIMARY_KEY__", value: primaryKey } - ], [pk, code, uuid, resource, primaryKey, formProps]); - return /* @__PURE__ */ jsxs( - Form$1, - { - className, - requiredMark: !0, - name: name || code, - layout: layout || align, - fields: formPropsFields, - form, - autoComplete, - style: { ...style, position: "relative" }, - onFinish, - onValuesChange: (changedValues, allValues) => onFormValuesChange( - { - changedValues, - allValues, - listenChangeFields, - listenChangeFieldsFunc, - onValuesChange, - code - } - ), - children: [ - /* @__PURE__ */ jsx( - WrapComponent, - { - ...props, - form, - code, - fields: items, - cols, - rowHeight, - itemMargin: [marginX, marginY] - } - ), - hides == null ? void 0 : hides.map((item) => { - var _a; - return /* @__PURE__ */ jsx(Field, { name: item.code, children: /* @__PURE__ */ jsx( - HideField, - { - form, - name: item.code, - type: item.type, - initialValue: item.initialValue, - initialValueLanguage: (_a = item.extras) == null ? void 0 : _a.initialValueLanguage - } - ) }, JSON.stringify(item.code)); - }) - ] - } - ); -}, HideField = ({ type, initialValue, initialValueLanguage, onChange, form }) => { - const value = useFnRun( - initialValueLanguage == "javascript" && initialValue, - form, - initialValueLanguage == "javascript" ? void 0 : initialValue, - {} - ); - return useEffect(() => { - initialValueLanguage == "javascript" ? onChange(_.toPrimitive(value, type)) : onChange(_.toPrimitive(initialValue, type)); - }, [type, initialValue, value]), null; -}, GridLayoutHoc = (Component2) => function({ code, data: data2, ...props }) { - const [layout, setLayout] = useState({ - resource: null, - cols: 12, - rowHeight: 21, - fields: [] - }); - return useEffect(() => { - code && http.get(`/api/_/${code}`).then((resp) => setLayout(_.pick(resp, ["resource", "cols", "rowHeight", "fields"]))); - }, [code]), (layout == null ? void 0 : layout.resource) && /* @__PURE__ */ jsx( - Component2, - { - ...props, - rowHeight: layout.rowHeight, - cols: layout.cols, - fields: layout.fields, - data: layout != null && layout.resource ? { [layout == null ? void 0 : layout.resource]: data2 } : {} - } - ); -}, HOOK_MARK = "RC_FORM_INTERNAL_HOOKS", useField = (name, { - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - type = "string" -}, pContext = null) => { - const isMountedRef = useRef(!1), form = useContext(FieldContext), [newValue, setNewValue] = useState(), [value, setValue] = useState(initialValueLanguage == "javascript" || !name ? void 0 : form.getFieldValue(name)), { registerWatch } = form.getInternalHooks(HOOK_MARK) || {}; - return useEffect(() => registerWatch == null ? void 0 : registerWatch((_values, allValues, _namePath) => { - if (!isMountedRef.current) - return; - const watchValue = _.get(allValues, name); - _.isEqual(watchValue, value) || setValue(_.toPrimitive(watchValue, type)); - }), [value]), useEffect(() => { - initialValueLanguage == "javascript" && initialValue ? fn.exec(initialValue, {}, { - getFieldValueForBasicForm: (name2) => pContext ? pContext.getFieldValue(name2) : form.getFieldValue(name2), - getFieldValue: (name2) => form.getFieldValue(name2) - }).then((data2) => setValue(_.toPrimitive(data2, type))).catch((e) => notification.error({ message: `布局数据错误: ${JSON.stringify(e)}` })).finally(() => isMountedRef.current = !0) : (initialValue && setValue(_.toPrimitive(initialValue ?? form.getFieldValue(name), type)), isMountedRef.current = !0); - }, [initialValue, initialValueLanguage]), useDeepEqualEffect(() => { - isMountedRef.current && convertJs && core.getWidgetComponent(convertJs).then(({ default: fn2 }) => fn2({ value, record: form.getFieldsValue(!0), $setting: convertJsSetting })).then(setNewValue).catch((e) => console.error("布局数据转换错误: ", e, convertJs)); - }, [value, convertJs, convertJsSetting]), [newValue || value, value]; -}, getBoxStyle = (x, y, w, h, boxStyle = {}, height = 0) => { - const style = { - "--grid-layout-h": `${h}`, - "--grid-layout-w": `${w}`, - "--grid-layout-x": `${x}`, - "--grid-layout-y": `${y}`, - "--grid-layout-row-height-offset": "0px" - }; - return boxStyle != null && boxStyle.autoHeight ? style.height = "fit-content" : style["--grid-layout-row"] = `${h}`, style["--grid-layout-box-margin"] = getBoxMargin(boxStyle == null ? void 0 : boxStyle.marginTop, boxStyle == null ? void 0 : boxStyle.marginRight, boxStyle == null ? void 0 : boxStyle.marginBottom, boxStyle == null ? void 0 : boxStyle.marginLeft), style["--grid-layout-box-padding"] = getBoxMargin(boxStyle == null ? void 0 : boxStyle.paddingTop, boxStyle == null ? void 0 : boxStyle.paddingRight, boxStyle == null ? void 0 : boxStyle.paddingBottom, boxStyle == null ? void 0 : boxStyle.paddingLeft), height && (style.height = `${height}px`), style; -}, getBoxMargin = (top, right, bottom, left) => `${top || 0}px ${right || 0}px ${bottom || 0}px ${left || 0}px`, GridLayout = ({ cols, rowHeight, fields, data: data2, containerPadding = [0, 0], itemMargin = [4, 0], formProps = {}, className, ...props }) => { - const [form] = Form.useForm(), items = useGridLayoutFields(fields, itemWidgetRender$2, "@pkg/grid-layouts"), formPropsFields = useMemo(() => [ - { name: "__PROPS__", value: formProps } - ], [formProps]); - return useDeepEqualEffect(() => { - form.setFieldsValue(data2); - }, [data2]), /* @__PURE__ */ jsx(Form, { fields: formPropsFields, form, component: !1, children: /* @__PURE__ */ jsx( - "div", - { - ...props, - className: cx("ff-grid-layout", className), - style: { - "--grid-layout-item-margin-y": `${(itemMargin == null ? void 0 : itemMargin[0]) || 0}px`, - "--grid-layout-item-margin-x": `${(itemMargin == null ? void 0 : itemMargin[1]) || 0}px`, - "--grid-layout-container-padding-y": `${(containerPadding == null ? void 0 : containerPadding[0]) || 0}px`, - "--grid-layout-container-padding-x": `${(containerPadding == null ? void 0 : containerPadding[1]) || 0}px`, - "--grid-layout-cols": cols || 12, - "--grid-layout-row-height": `${rowHeight || 21}px` - }, - children: items - } - ) }); -}, useGridLayoutFields = (fields, itemWidgetRender2, prefix = "@pkg/grid-layouts", basicForm = null) => useMemo(() => { - var _a; - return (_a = _.sortBy(fields, ["y", "x"])) == null ? void 0 : _a.map( - ({ i, x, y, w, h, field: { boxStyle, widgetPrefix = prefix, widget, ...field } }, index2) => /* @__PURE__ */ jsx( - "div", - { - className: "grid-layout-item", - style: getBoxStyle(x, y, w, h, boxStyle, widget === "Height" && (field == null ? void 0 : field.initialValue)), - children: /* @__PURE__ */ jsx( - ItemWidget, - { - ...field, - basicForm, - itemWidget: widget != null && widget.startsWith("@") ? widget : `${widgetPrefix}/${widget}`, - itemWidgetRender: itemWidgetRender2 - } - ) - }, - i || index2 - ) - ); -}, [fields]), ItemWidget = ({ itemWidget, itemWidgetRender: itemWidgetRender2, basicForm, ...props }) => { - const [children, setChildren] = useState(); - return useEffect(() => { - core.getWidgetComponent(itemWidget).then(({ defaultProps, default: ItemWidget2 }) => { - setChildren(React.createElement(itemWidgetRender2(ItemWidget2, defaultProps, basicForm), props)); - }).catch((e) => setChildren(itemWidget)); - }, [itemWidget]), children; -}, itemWidgetRender$2 = (ItemWidget2, defaultProps, basicForm = null) => (props) => { - const { - code, - label, - extras, - isVirtual, - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - ...itemWidgetProps - } = _.merge({}, defaultProps, props), [value, rawValue] = useField(isVirtual ? null : code, { - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - type: (itemWidgetProps == null ? void 0 : itemWidgetProps.type) || "string" - }, basicForm); - return /* @__PURE__ */ jsx(ItemWidget2, { ...itemWidgetProps, value, rawValue, $setting: extras || {} }); -}, GridLayout$1 = GridLayoutHoc(GridLayout), GridLayoutFormWidget = ({ widget, widgetPrefix, widgetDecorator, subWidgets, basicForm, ...props }) => { - const itemWidget = widget != null && widget.startsWith("@") ? widget : `${widgetPrefix}/${widget}`, [ItemWidget2, setItemWidget] = useState(); - return useEffect(() => { - itemWidget && core.getWidgetComponent(itemWidget).then(({ defaultProps, default: ItemWidget22 }) => ({ - default: itemWidgetRender$1(ItemWidget22, defaultProps, basicForm) - })).catch((e) => ({ default: () => `${e}` })).then((res) => setItemWidget(React.createElement(res.default, props))); - }, [itemWidget]), ItemWidget2 && React.cloneElement(ItemWidget2, props); -}; -GridLayoutFormWidget.defaultProps = { - widgetPrefix: "@pkg/grid-layout-forms", - widget: "Input" -}; -const itemWidgetRender$1 = (ItemWidget2, defaultProps, basicForm = null) => (props) => { - const { - type, - code, - label, - noStyle, - placeholder, - extras, - validators, - help, - isVirtual, - $isReserved, - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - widgetPerfix: _widgetPerfix, - boxStyle: _boxStyle, - widgetDecorator, - subWidgets, - ...itemWidgetProps - } = { ...defaultProps, ...props }, rules = useRules(validators || {}, code, type), itemProps = { - label, - noStyle, - colon: !1 - }, fieldProps = { - placeholder, - ...itemWidgetProps - }, normalize = useCallback((value) => value == null ? void 0 : _.toPrimitive(value, type), [type]); - return /* @__PURE__ */ jsx( - Field, - { - name: code, - rules, - initialValue: normalize(initialValue), - normalize, - children: (control, meta, rcform) => { - var _a; - return /* @__PURE__ */ jsx( - ItemWidget2, - { - type, - rcform, - itemProps: { - validateStatus: meta.errors.length > 0 ? "error" : "success", - tooltip: help, - help: meta.errors.length > 0 ? meta.errors.join("、") : null, - required: ((_a = rules == null ? void 0 : rules[0]) == null ? void 0 : _a.required) || !1, - ...itemProps - }, - fieldProps: { ...fieldProps, ...control }, - $setting: extras || {} - } - ); - } - } - ); -}, GridLayoutForm = ({ cols, rowHeight, itemMargin, containerPadding, fields, children }) => { - const items = useGridLayoutFields(fields, itemWidgetRender$1, "@pkg/grid-layout-forms"); - return /* @__PURE__ */ jsx(ConfigProvider, { theme: { components: { Form: { itemMarginBottom: 0 } } }, children: /* @__PURE__ */ jsxs("div", { className: "ff-grid-layout-form", style: { - "--grid-layout-item-margin-x": `${(itemMargin == null ? void 0 : itemMargin[0]) ?? 8}px`, - "--grid-layout-item-margin-y": `${(itemMargin == null ? void 0 : itemMargin[1]) ?? 16}px`, - "--grid-layout-container-padding-y": `${(containerPadding == null ? void 0 : containerPadding[0]) || 0}px`, - "--grid-layout-container-padding-x": `${(containerPadding == null ? void 0 : containerPadding[1]) || 0}px`, - "--grid-layout-cols": cols || 24, - "--grid-layout-row-height": `${rowHeight || 16}px` - }, children: [ - items, - children && React.cloneElement(children, { cols, rowHeight, itemMargin, containerPadding, fields }) - ] }) }); -}; -GridLayoutForm.propTypes = { - fields: PropTypes.array.isRequired -}; -GridLayoutForm.defaultProps = { - fields: [], - itemMargin: [8, 16], - containerPadding: [0, 0] -}; -const GridLayoutForm$1 = GridLayoutFormHoc(GridLayoutForm), FFPageRender = ({ children }) => { - const [ele, setEle] = useState({}), onMount = useCallback((solt, ele2) => setEle((state) => ({ ...state, [solt]: ele2 })), []), onUnmount = useCallback((solt) => setEle((state) => ({ ...state, [solt]: void 0 })), []); - return /* @__PURE__ */ jsx(SlotContext.Provider, { value: { ele, mount: onMount, unmount: onUnmount }, children }); -}; -FFPageRender.defaultProps = { - isDrawerRender: !1 -}; -FFPageRender.propTypes = { - isDrawerRender: PropTypes.bool -}; -const getWidgetPropsData = (registerProps = {}, data2 = {}, fns2 = {}, defaultValue = "") => _.deepSome(registerProps, (value, key) => key === "type" && value === "code") ? getWidgetPropsDataAsync(registerProps, data2, fns2, defaultValue) : getWidgetPropsDataSync(registerProps, data2, defaultValue), getWidgetPropsDataAsync = async (registerProps = {}, data2 = {}, fns2 = {}, defaultValue = "") => { - let res = /* @__PURE__ */ Object.create(null); - for (let key in registerProps) { - let newValue; - if (Reflect.has(registerProps[key], "type") && ["code", "field", "router", "query", "string"].includes(registerProps[key].type)) { - const { type: fieldType, value: fieldData = "", default: fieldDefault = defaultValue } = registerProps[key]; - switch (fieldType) { - case "code": - newValue = await fn.exec(fieldData, data2, fns2); - break; - case "field": - newValue = _.get(data2, fieldData) ?? _.get(data2, fieldData.substring(fieldData.indexOf(".") + 1)); - break; - case "router": - case "query": - newValue = route.getPageParams(fieldData); - break; - case "string": - newValue = fieldData; - } - newValue ?? (newValue = fieldDefault); - } else - newValue = await getWidgetPropsDataAsync(registerProps[key], data2, fns2, defaultValue); - _.set(res, key, newValue); - } - return res; -}, getWidgetPropsDataSync = (registerProps = {}, data2 = {}, defaultValue = "") => Object.keys(registerProps || {}).reduce((res, key) => { - if (_.isPlainObject(registerProps[key])) { - let newValue; - if (Reflect.has(registerProps[key], "type") && ["field", "router", "query", "string"].includes(registerProps[key].type)) { - const { type: fieldType, value: fieldData = "", default: fieldDefault = defaultValue } = registerProps[key]; - switch (fieldType) { - case "field": - newValue = _.get(data2, fieldData) ?? _.get(data2, fieldData.substring(fieldData.indexOf(".") + 1)); - break; - case "router": - case "query": - newValue = route.getPageParams(fieldData); - break; - case "string": - newValue = fieldData; - break; - } - newValue ?? (newValue = fieldDefault); - } else - newValue = getWidgetPropsDataSync(registerProps[key], data2, defaultValue); - _.set(res, key, newValue); - } - return res; -}, {}), DataListFramework = ({ - className, - itemClassName, - classNames, - dataSource, - isPaginate, - pageSize, - isItemOperations, - isBatchOperations, - batchOperations, - itemOperations, - itemOperationsAccess, - resource, - primaryKey, - title, - itemGridLayout, - $setting, - tabs, - isConditionFormLayout, - isTreeSider, - treeSiderConfig -}) => { - const { getBase62params, onClickCallback, onTabChange } = useContext(DataListContext), { total, page, tab } = getBase62params() || {}, itemRender = useCallback((children, data2, index2) => /* @__PURE__ */ jsx( - ItemOperations, - { - className: cx("ff-data-list-framework-item", itemClassName), - operations: isItemOperations && data2 ? itemOperations == null ? void 0 : itemOperations.filter((oper) => !primaryKey || !oper.uuid || !itemOperationsAccess.has(oper.uuid) ? !0 : itemOperationsAccess.get(oper.uuid).includes(data2 == null ? void 0 : data2[primaryKey])) : [], - data: resource ? { [resource]: data2 } : data2, - children, - onClickCallback - } - ), [resource, primaryKey, isItemOperations, onClickCallback, itemOperations, itemOperationsAccess]); - return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-framework", className), children: [ - /* @__PURE__ */ jsx(DataListSider, { className: classNames == null ? void 0 : classNames.sider, isTreeSider, ...treeSiderConfig }), - /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-container", classNames == null ? void 0 : classNames.container), children: [ - /* @__PURE__ */ jsx(DataListFilter, { className: classNames == null ? void 0 : classNames.filter, isConditionFormLayout }), - /* @__PURE__ */ jsx( - DataListToolbar, - { - title, - className: classNames == null ? void 0 : classNames.toolbar, - tabs, - tab, - onTabChange - } - ), - /* @__PURE__ */ jsx( - DataListContent, - { - ...itemGridLayout, - className: classNames == null ? void 0 : classNames.content, - style: { "--col-num": ($setting == null ? void 0 : $setting.colNum) || 1 }, - primaryKey, - itemRender, - dataSource - } - ), - /* @__PURE__ */ jsx( - DataListFooter, - { - className: classNames == null ? void 0 : classNames.footer, - isPaginate, - isOperations: isBatchOperations, - operations: batchOperations, - total, - page, - pageSize - } - ) - ] }) - ] }); -}, ItemOperations = ({ className, operations, children, data: data2, onClickCallback }) => /* @__PURE__ */ jsxs("div", { className: cx("data-list-grid-layout-item-container", className), children: [ - children, - !!(operations != null && operations.length) && /* @__PURE__ */ jsx("div", { className: "data-list-grid-layout-item-actions", children: operations.map((item) => /* @__PURE__ */ jsx("span", { className: "data-list-grid-layout-item-action", children: /* @__PURE__ */ jsx( - Button.Link, - { - uuid: item.uuid, - type: item.type, - name: item.name, - widget: item.widget, - widgetType: item.widgetType, - widgetProps: item.widgetProps, - widgetSetting: item.widgetSetting, - widgetContainerProps: item.widgetContainerSetting, - data: data2, - onAfterClick: (e) => e !== !1 && (onClickCallback == null ? void 0 : onClickCallback(item.isRefresh, data2)) - }, - item.uuid || useId() - ) }, (item == null ? void 0 : item.uuid) || useId())) }) -] }), DataTableFramework = ({ - listCode, - className, - itemClassName, - dataSource, - columns, - isItemOperations, - isBatchOperations, - batchOperations, - itemOperations, - itemOperationsAccess, - resource, - primaryKey, - title, - isPaginate, - pageSize, - isTreeSider, - treeSiderConfig, - isConditionFormLayout, - ...props -}) => { - const { getBase62params, onClickCallback } = useContext(DataListContext), { total, page } = getBase62params() || {}; - return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-table-framework", className), children: [ - /* @__PURE__ */ jsx(DataListSider, { isTreeSider, ...treeSiderConfig }), - /* @__PURE__ */ jsxs("div", { className: "ff-data-table-container", children: [ - /* @__PURE__ */ jsx(DataListFilter, { listCode, isConditionFormLayout }), - /* @__PURE__ */ jsx(DataListToolbar, { title }), - /* @__PURE__ */ jsx( - DataListTable, - { - ...props, - className: "ff-data-table-content", - columns, - dataSource, - operationRender: (record) => /* @__PURE__ */ jsx("div", { className: "ff-data-table-actions", children: itemOperations == null ? void 0 : itemOperations.reduce((carry, item, i) => [ - ...carry, - /* @__PURE__ */ jsx( - Button.Link, - { - size: "small", - uuid: item.uuid, - type: item.type, - name: item.name, - widget: item.widget, - widgetType: item.widgetType, - widgetProps: item.widgetProps, - widgetSetting: item.widgetSetting, - widgetContainerProps: item.widgetContainerSetting, - data: record, - onAfterClick: (e) => e !== !1 && (onClickCallback == null ? void 0 : onClickCallback(item.isRefresh, data)) - }, - item.uuid || i - ) - ], []) }) - } - ), - /* @__PURE__ */ jsx( - DataListFooter, - { - isPaginate, - isOperations: isBatchOperations, - operations: batchOperations, - total, - page, - pageSize - } - ) - ] }) - ] }); -}, DataListContext = React.createContext({ - listCode: "", - getBase62params: (k, defaultValue) => { - }, - onReload: () => { - }, - onClickCallback: () => { - }, - onConditonChange: () => { - }, - onTabChange: () => { - }, - onSiderChange: () => { - }, - onKeywordChange: () => { - }, - onPageChange: () => { - }, - onPageSizeChange: () => { - } -}), DataList$1 = ({ - isItemGridLayout, - theme, - themeProps, - onClickCallback, - onReload, - getBase62params, - listCode, - onPageChange, - onPageSizeChange, - onTabChange, - onSiderChange, - onKeywordChange, - onConditonChange, - ...props -}) => { - const [framework, setFramework] = useState(); - return useEffect(() => { - theme ? core.getWidgetComponent(theme).then((resp) => { - if (!resp) - throw `${theme} not found`; - return resp; - }).catch((e) => ({ default: () => `${e}` })).then((resp) => setFramework(React.createElement(resp.default, { ...props, $setting: themeProps }))) : framework || setFramework(null); - }, [theme, themeProps]), /* @__PURE__ */ jsx(DataListContext.Provider, { value: { - listCode, - onClickCallback, - onReload, - getBase62params, - onPageChange, - onPageSizeChange, - onTabChange, - onSiderChange, - onKeywordChange, - onConditonChange - }, children: framework ? React.cloneElement(framework, { ...props, $setting: themeProps }) : isItemGridLayout ? /* @__PURE__ */ jsx(DataListFramework, { ...props, $setting: themeProps }) : /* @__PURE__ */ jsx(DataTableFramework, { ...props, $setting: themeProps }) }); -}; -DataList$1.defaultProps = { - onReload: () => { - }, - getBase62params: () => { - } -}; -const loadDataListFieldWidget = (widget, value, record, widgetSetting, base62params) => { - const Widget = React.lazy(() => core.getWidgetComponent(widget).catch((e) => ({ default: () => `${e}` }))); - return /* @__PURE__ */ jsx(React.Suspense, { children: /* @__PURE__ */ jsx( - Widget, - { - value, - record, - $setting: widgetSetting, - base62params - } - ) }, widget); -}, useColumnsRender = (columns, base62params = {}) => (usePrevious(columns), usePrevious(base62params), useMemo(() => columns == null ? void 0 : columns.map(({ widgetByJs, widgetByJsSetting, ...item }, i) => widgetByJs && !widgetByJs.endsWith("/BasicShowFieldData") ? { - ...item, - render: (value, record) => { - const widgetByJsRender = loadDataListFieldWidget(widgetByJs, value, record, widgetByJsSetting, base62params); - return _.isFunction(item == null ? void 0 : item.render) ? item.render(widgetByJsRender, value, record) : widgetByJsRender; - } -} : item), [columns, base62params])), useStructure = (listCode) => { - const [option, setOption] = useState({}); - return useEffect(() => { - let flag = !1; - return listCode && http.get(`/api/_/${listCode}`).then((data2) => _.pick(data2, [ - "uuid", - "name", - "code", - "resource", - "marginX", - "marginY", - "cols", - "rowHeight", - "primaryKey", - "columns", - "itemOperations", - "batchOperations", - "isConditionFormLayout", - "layout", - "tabs", - "pageSize", - "layoutConfig" - ])).then((data2) => !flag && setOption(data2)), () => flag = !0; - }, [listCode]), option; -}, useDataSource = (listCode, base62params = {}) => { - const [option, setOption] = useState({ dataSource: [] }); - return useDeepEqualEffect(() => { - let flag = !1; - return listCode && http.get(`/api/${listCode}/${http.encode({ page: 1, ...base62params })}`).then((data2) => !flag && setOption(data2)), () => flag = !0; - }, [listCode, base62params]), option; -}, useHasOperationColumn = (operations, dataSource = null, itemOperationsAccess = null, pk = "id") => useMemo(() => { - if (_.isEmpty(operations) || !operations.every(({ uuid }) => auth.check(uuid))) - return !1; - if (_.isEmpty(itemOperationsAccess) || _.isEmpty(dataSource)) - return !0; - const ids = dataSource.map((item) => item == null ? void 0 : item[pk]); - return operations.some(({ uuid }) => !uuid || !itemOperationsAccess.has(uuid) ? !0 : itemOperationsAccess.get(uuid).some((oper) => ids.includes(oper))); -}, [operations, dataSource, itemOperationsAccess, pk]), DataListHelper = React.forwardRef(({ listCode, base62params, className, itemClassName, theme: _theme, themeProps, classNames }, ref) => { - const [{ tab, page, total, condition, sider, keyword, dataSource, itemOperationsAccess, pageSize }, setData] = useState(base62params), [{ - resource, - primaryKey, - batchOperations = [], - itemOperations = [], - columns = [], - themeConfig, - theme, - isConditionFormLayout = !1, - isTreeSider, - treeSiderConfig, - isItemGridLayout, - itemGridLayout, - title, - isPaginate, - tabs - }, setStructure] = useState({ isItemGridLayout: !1, itemGridLayout: {} }), initData = (params) => http.list(listCode, { tab, page, total, condition, sider, keyword, ...params }).then(({ - keyword: keyword2, - condition: condition2, - total: total2, - tab: tab2, - page: page2, - pageSize: pageSize2, - operationsAccess, - dataSource: dataSource2 - }) => { - setData({ - dataSource: dataSource2, - pageSize: pageSize2, - total: total2, - page: page2, - tab: tab2, - condition: condition2, - sider, - keyword: keyword2, - itemOperationsAccess: new Map(operationsAccess) - }); - }), isItemOperations = useHasOperationColumn(itemOperations, dataSource, itemOperationsAccess, primaryKey), isBatchOperations = useHasOperationColumn(batchOperations); - useEffect(() => { - let unsubscribe = null; - return listCode && http.get(`/api/_/${listCode}`).resp(({ data: data2, res }) => { - data2 != null && data2.isDynamicRefresh && (unsubscribe = ResWs$1.subscribe(() => initData(), res)), setStructure(data2); - }).catch(() => setStructure({})), setData((data2) => ({ ...data2, dataSource: [] })), () => unsubscribe == null ? void 0 : unsubscribe(); - }, [listCode]), useEffect(() => { - listCode && initData(base62params); - }, [JSON.stringify(base62params)]); - const onConditonChange = (value, keyword2) => initData({ keyword: keyword2, condition: update(condition || {}, { $merge: value || {} }), page: 1 }), onTabChange = (tab2) => initData({ tab: tab2, page: 1 }), onSiderChange = (sider2) => initData({ sider: sider2, page: 1 }), onKeywordChange = (keyword2) => initData({ keyword: keyword2, page: 1 }), onPageChange = (page2, pageSize2) => initData({ page: page2, pageSize: pageSize2 }), onPageSizeChange = (pageSize2) => initData({ pageSize: pageSize2, page: 1 }), getBase62params = (k, defaultValue, isInit = !1) => { - if (k == "init") - return base62params; - const params = { tab, sider, keyword, page, pageSize, condition, total }; - return k ? _.get(params, k, defaultValue) : params; - }, onReload = () => { - initData(); - }, onClickCallback = (isRefresh = 0, item = null) => { - if (isRefresh === 2) { - const parentPk = _.get(item, "__PARENT_ID__", ""), pk = _.get(item, primaryKey, _.get(item, [resource, primaryKey], "")), pIndex = _.findIndex(dataSource, ["__PARENT_ID__", parentPk]), index2 = _.findIndex(pIndex > -1 ? _.get(dataSource, [pIndex, "children"]) : dataSource, [primaryKey, pk]); - index2 > -1 ? (http.get(`/api/${listCode}/detail/${pk}`).then((resp) => { - setData((data2) => { - const children = _.get(data2.dataSource, pIndex > -1 ? [pIndex, "children", index2, "children"] : [index2, "children"]); - return { - ...data2, - dataSource: pIndex > -1 ? update(data2.dataSource, { [pIndex]: { children: { $splice: [[index2, 1, { ...resp, children }]] } } }) : update(data2.dataSource, { $splice: [[index2, 1, { ...resp, children }]] }) - }; - }); - }), http.post(`/api/${listCode}/list-operations-access`, { ids: pk }).then((data2) => new Map(data2)).then((detailAccess) => { - setData((data2) => (data2.itemOperationsAccess.forEach((ids, uuid) => { - var _a; - (_a = detailAccess.get(uuid)) != null && _a.some((item2) => item2 == pk) || data2.itemOperationsAccess.set(uuid, ids.filter((id) => id !== pk)); - }), detailAccess.forEach((ids, uuid) => { - data2.itemOperationsAccess.has(uuid) ? data2.itemOperationsAccess.set(uuid, _.uniq([...data2.itemOperationsAccess.get(uuid) || [], ...ids])) : data2.itemOperationsAccess.set(uuid, ids); - }), { ...data2 })); - })) : onReload(); - } else - isRefresh === 1 && onReload(); - }; - return React.useImperativeHandle(ref, () => ({ - onReload, - onClickCallback - })), /* @__PURE__ */ jsx( - DataList$1, - { - ...{ - listCode, - title, - itemClassName, - classNames, - resource, - primaryKey, - theme: _theme || theme, - themeProps: themeProps || themeConfig, - isPaginate, - pageSize, - page, - isTreeSider, - treeSiderConfig, - tabs, - isItemOperations, - isBatchOperations, - batchOperations, - itemOperations, - itemOperationsAccess, - dataSource, - isItemGridLayout, - columns, - itemGridLayout, - isConditionFormLayout - }, - className: cx("ff-data-list-helper", className), - getBase62params, - onReload, - onClickCallback, - onConditonChange, - onTabChange, - onSiderChange, - onKeywordChange, - onPageChange, - onPageSizeChange - } - ); -}), DataListFilter = ({ className, isConditionFormLayout }) => { - var _a, _b; - const [structure, setStructure] = useState({}), { listCode, onKeywordChange, onConditonChange, getBase62params } = React.useContext(DataListContext), { keyword, condition } = getBase62params() || {}, [form] = Form$1.useForm(); - useEffect(() => { - listCode && isConditionFormLayout && http.get(`/api/_/${listCode}/list-condition-form-layout`).then(({ resource, marginX, marginY, rowHeight, cols, fields }) => { - setStructure({ resource, itemMargin: [marginX, marginY], rowHeight, cols, fields }); - }).catch(() => setStructure({})); - }, [listCode, isConditionFormLayout]), useEffect(() => { - form.setFieldsValue({ keyword, ...condition }); - }, [JSON.stringify([keyword, condition])]); - const onReset = () => { - const { keyword: keyword2, condition: condition2 } = getBase62params("init") || {}; - form.setFieldsValue({ keyword: keyword2, ...condition2 }); - }, onSubmit = (value) => onConditonChange({ - [structure.resource]: value[structure.resource] - }, value.keyword), onKeywordSearch = (value) => onKeywordChange(value); - return /* @__PURE__ */ jsx("div", { className: cx("ff-data-list-filter", className), children: /* @__PURE__ */ jsx( - Form$1, - { - form, - layout: "vertical", - autoComplete: "off", - onFinish: ((_a = structure.fields) == null ? void 0 : _a.length) > 1 ? onSubmit : () => { - }, - children: ((_b = structure.fields) == null ? void 0 : _b.length) > 1 ? /* @__PURE__ */ jsx(GridLayoutForm, { ...structure, children: /* @__PURE__ */ jsx(DataListFilterAction, { onReset }) }) : /* @__PURE__ */ jsx("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: /* @__PURE__ */ jsx("div", { className: "grid-layout-item", style: getBoxStyle(20, 0, 5, 2), children: /* @__PURE__ */ jsx(Form$1.Item, { name: ["keyword"], children: /* @__PURE__ */ jsx(Input.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: onKeywordSearch }) }) }) }) - } - ) }); -}, DataListFilterAction = ({ cols, fields, onReset }) => { - const [expanded, setExpanded] = useState(!1), isMore = useMemo(() => fields == null ? void 0 : fields.toReversed().some((item) => item.y > 1 || item.x + item.w >= cols - 5), [cols, fields]); - return /* @__PURE__ */ jsxs(Form$1.Item, { label: " ", style: { "--item-span": 5 }, className: cx("ff-data-list-filter-actions", { expanded }), children: [ - /* @__PURE__ */ jsx(Button$1, { onClick: onReset, children: "重置" }), - /* @__PURE__ */ jsx(Button$1, { type: "primary", htmlType: "submit", children: "查询" }), - isMore && /* @__PURE__ */ jsx( - Button.Link, - { - className: "ff-data-list-filter-expanded-button", - widget: () => setExpanded((flag) => !flag), - type: "primary", - name: expanded ? "关闭" : "展开", - icon: expanded ? "icon-up" : "icon-down", - iconPosition: "end" - } - ) - ] }); -}; -DataListFilter.reservedFields = [ - { - x: 0, - y: 0, - h: 3, - w: 5, - field: { - isVirtual: !0, - widgetPrefix: "@pkg/grid-layout-forms", - widget: "Input", - code: "keyword", - label: "关键字", - placeholder: "多关键字 | 分割", - extras: { prefix: "icon-search" } - } - } -]; -const DataListToolbar = ({ className, title, tabs, tab, onTabChange }) => { - const [tabValue, setTabValue] = useMergedState(tabs == null ? void 0 : tabs[0].value, { value: tab, onChange: onTabChange }); - return /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-toolbar", className), children: [ - /* @__PURE__ */ jsx("div", { className: "ff-data-list-title", children: title }), - /* @__PURE__ */ jsx( - Breadcrumb, - { - className: "ff-data-list-tabs", - itemRender: ({ label, code: value }) => /* @__PURE__ */ jsx("span", { onClick: () => setTabValue(value), className: cx("ff-data-list-tab", { active: value == tabValue }), children: label }), - items: tabs - } - ), - /* @__PURE__ */ jsxs("div", { className: "ff-data-list-actions", children: [ - /* @__PURE__ */ jsx(Button.Link, { icon: "icon-reload" }), - /* @__PURE__ */ jsx(Button.Link, { icon: "icon-setting" }) - ] }) - ] }); -}, treeData = [ - { - title: "parent 1", - key: "0-0", - children: [ - { - title: "parent 1-0", - key: "0-0-0", - disabled: !0, - children: [ - { - title: "leaf", - key: "0-0-0-0", - disableCheckbox: !0 - }, - { - title: "leaf", - key: "0-0-0-1" - } - ] - }, - { - title: "parent 1-1", - key: "0-0-1", - children: [ - { - title: /* @__PURE__ */ jsx( - "span", - { - style: { - color: "#1677ff" - }, - children: "sss" - } - ), - key: "0-0-1-0" - } - ] - } - ] - } -], DataListSider = ({ className, width, isTreeSider }) => isTreeSider ? /* @__PURE__ */ jsx( - Tree.DirectoryTree, - { - className: cx("ff-data-list-sider", className), - style: { "--sider-width": width }, - showLine: !0, - showIcon: !1, - treeData - } -) : null; -DataListSider.defaultProps = { - width: 280 -}; -const DataListFooter = ({ className, operations, isOperations, isPaginate, total, page, pageSize }) => { - const { onPageChange, onPageSizeChange, onClickCallback } = React.useContext(DataListContext); - return isOperations && !_.isEmpty(operations) || isPaginate ? /* @__PURE__ */ jsxs("div", { className: cx("ff-data-list-footer", className), children: [ - /* @__PURE__ */ jsx("div", { className: "ff-data-list-actions", children: operations == null ? void 0 : operations.map((item, i) => /* @__PURE__ */ jsx( - Button, - { - uuid: item.uuid, - type: item.type, - name: item.name, - widget: item.widget, - widgetType: item.widgetType, - widgetProps: item.widgetProps, - widgetSetting: item.widgetSetting, - widgetContainerProps: item.widgetContainerSetting, - onAfterClick: (e) => e !== !1 && (onClickCallback == null ? void 0 : onClickCallback(item.isRefresh, null)) - }, - item.uuid || i - )) }), - isPaginate && /* @__PURE__ */ jsx( - Pagination, - { - size: "small", - total, - pageSize, - showSizeChanger: !1, - showTotal: (total2) => `第 ${page} 页 / 总共 ${total2} 条`, - onChange: onPageChange, - onShowSizeChange: onPageSizeChange - } - ) - ] }) : null; -}, getDefaultExpandRowKeys = (data2, key, depth = !0) => depth !== !0 && depth-- <= 0 ? [] : _.isArray(data2) && !_.isEmpty(data2) ? data2.reduce((res, item) => (Reflect.has(item, key) && Reflect.has(item, "children") && res.push(item[key]), Reflect.has(item, "children") && !_.isEmpty(item.children) ? res.concat(getDefaultExpandRowKeys(item.children, key, depth)) : res), []) : [], DataListTable = ({ - className, - primaryKey, - columns, - dataSource, - operationRender, - operationWidth, - ...props -}) => { - const tableRef = useRef(null), divRef = useRef(null), [expandedRowKeys, setExpandedRowKeys] = useState([]), [divSize, setDivSize] = useState({ width: 0, height: 0 }); - useEffect(() => { - setExpandedRowKeys(getDefaultExpandRowKeys(dataSource, primaryKey)); - }, [dataSource, primaryKey]), useLayoutEffect(() => { - const resizeObserver = new ResizeObserver(() => { - var _a; - setDivSize({ - width: ((_a = tableRef.current) == null ? void 0 : _a.nativeElement.querySelector(".ant-table-body").scrollWidth) || divRef.current.offsetWidth, - height: divRef.current.offsetHeight - }); - }); - return divRef.current && resizeObserver.observe(divRef.current), () => { - divRef.current && resizeObserver.unobserve(divRef.current); - }; - }, []); - const newColumns = useColumnsRender(columns); - return /* @__PURE__ */ jsx("div", { ref: divRef, className: cx("ff-data-list-table", className), children: divSize.height ? /* @__PURE__ */ jsx( - Table, - { - ...props, - ref: tableRef, - rowKey: (v, index2) => (v == null ? void 0 : v[primaryKey]) ?? index2, - columns: newColumns == null ? void 0 : newColumns.concat(operationRender ? [{ - title: "操作", - align: "center", - fixed: "right", - width: `${Math.ceil(operationWidth / divSize.width * 100).toFixed(2)}%`, - render: (_text, record, index2) => operationRender(record, index2) - }] : []), - dataSource, - size: "middle", - scroll: { x: "max-content", y: divSize.height - 50 }, - pagination: !1, - expandable: { - defaultExpandAllRows: !0, - expandRowByClick: !0, - onExpandedRowsChange: setExpandedRowKeys, - expandedRowKeys - } - } - ) : null }); -}; -DataListTable.defaultProps = { - operationWidth: 180, - columns: [], - dataSource: [] -}; -const GridLayoutWidget = ({ widget, widgetPrefix, basicForm, ...props }) => { - const itemWidget = widget != null && widget.startsWith("@") ? widget : `${widgetPrefix}/${widget}`, [ItemWidget2, setItemWidget] = useState(); - return useEffect(() => { - itemWidget && core.getWidgetComponent(itemWidget).then(({ defaultProps, default: ItemWidget22 }) => ({ - default: itemWidgetRender(ItemWidget22, defaultProps, basicForm) - })).catch((e) => ({ default: () => `${e}` })).then((res) => setItemWidget(React.createElement(res.default, props))); - }, [itemWidget]), ItemWidget2; -}, itemWidgetRender = (ItemWidget2, defaultProps, basicForm = null) => (props) => { - const { - code, - label, - extras, - isVirtual, - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - value: _value, - ...itemWidgetProps - } = _.merge({}, defaultProps, props), [value, rawValue] = useField(isVirtual ? null : code, { - initialValue, - initialValueLanguage, - convertJs, - convertJsSetting, - type: (itemWidgetProps == null ? void 0 : itemWidgetProps.type) || "string" - }, basicForm); - return /* @__PURE__ */ jsx(ItemWidget2, { ...itemWidgetProps, value, rawValue, $setting: extras || {} }); -}; -GridLayoutWidget.defaultProps = { - widgetPrefix: "@pkg/grid-layouts" -}; -const DataListContent = ({ - cols, - rowHeight, - itemMargin, - fields, - primaryKey, - itemRender, - dataSource, - itemClassName, - empty, - className, - style -}) => { - const id = useId$1(), GridLayoutElement = useMemo(() => /* @__PURE__ */ jsx( - GridLayout, - { - cols, - rowHeight, - itemMargin, - fields, - className: itemClassName - } - ), [fields, cols, rowHeight, itemMargin]); - return /* @__PURE__ */ jsx("div", { className: cx("ff-data-list-content", className), style, children: _.isEmpty(dataSource) ? empty : dataSource == null ? void 0 : dataSource.map((item, i) => /* @__PURE__ */ jsx(React.Fragment, { children: itemRender(React.cloneElement(GridLayoutElement, { data: item }), item, i) }, `${id}-${(item == null ? void 0 : item[primaryKey]) || i}`)) }); -}; -DataListContent.defaultProps = { - itemRender: (children, data2, index2) => children, - empty: /* @__PURE__ */ jsx(Empty$1, { description: null }), - style: {} -}; -const redirect = (params, widget, { isReplaceRouteHistory = !1 } = {}) => route.redirect(widget, params, { replace: isReplaceRouteHistory }), func = (params, widget, { status: { loading, disabled }, setStatus }) => { - const extras = { - loading: (flag) => flag === void 0 ? loading : setStatus((data2) => ({ ...data2, loading: flag })), - disabled: (flag) => flag === void 0 ? disabled : setStatus((data2) => ({ ...data2, disabled: flag })) - }; - return _.isFunction(widget) ? widget.call(null, { ...params, ...extras }) : _.isString(widget) && widget ? fn.exec(widget, params, extras) : null; -}, component = (data2, widget, widgetSetting, widgetContainerProps) => _.isString(widget) && widget ? core.getWidgetComponent(widget).then(({ default: WidgetComponent }) => FFPopupRender.modal( - WidgetComponent, - { ...data2, $setting: widgetSetting }, - widgetContainerProps -)).catch((e) => { - FFPopupRender.error(widget, { content: e.toString() }); -}) : FFPopupRender.modal( - widget, - { ...data2, $setting: widgetSetting }, - widgetContainerProps -), gridLayoutForm = (data2, widget, widgetSetting, widgetContainerProps) => FFPopupRender.modal( - GridLayoutFormHelper, - { ...data2, $setting: widgetSetting, code: widget }, - widgetContainerProps -), list = (data2, widget, widgetSetting, widgetContainerProps) => FFPopupRender.modal( - DataListHelper, - { base62params: data2, $setting: widgetSetting, listCode: widget }, - widgetContainerProps -), useButton = ({ - widget, - widgetType, - widgetData, - widgetProps, - widgetSetting, - widgetContainerProps -}, { onAfterClick, onBeforeClick }) => { - const listFn = useContext(DataListContext); - useContext(AppGlobalParamsContext); - const [status, setStatus] = useState({ leading: !0, trailing: !1 }), fn2 = useMemo(() => { - switch (widgetType) { - case "redirect": - return _.partialRight(redirect, widget, widgetSetting); - case "func": - return _.partialRight(func, (widgetSetting == null ? void 0 : widgetSetting.code) ?? widget, { status, setStatus }); - case "fsdpf-component": - return _.partialRight(component, widget, widgetSetting, widgetContainerProps); - case "grid-layout-form": - return _.partialRight(gridLayoutForm, widget, widgetSetting, widgetContainerProps); - case "data-list": - return _.partialRight(list, widget, widgetSetting, widgetContainerProps); - default: - if (isReactComponent(widget) || React.isValidElement(widget)) - return _.partialRight(component, widget, widgetSetting, widgetContainerProps); - if (_.isFunction(widget)) - return _.partialRight(func, (widgetSetting == null ? void 0 : widgetSetting.code) || widget, { status, setStatus }); - } - return (...args) => console.error("useButton unknown widgetType", widgetType, ...args); - }, [widget, widgetType]); - return [_.debounce((data2) => (onBeforeClick == null || onBeforeClick(data2), Promise.resolve(getWidgetPropsData(widgetProps, data2, { list: listFn })).then((data22) => fn2({ ...widgetData, ...data22 })).then((result) => onAfterClick == null ? void 0 : onAfterClick(result)).catch(console.error)), 300, { leading: !0, trailing: !1 }), status]; -}; -var _instance2, _data; -const _OperationAuth = class _OperationAuth { - constructor() { - __privateAdd(this, _data, null); - __publicField(this, "init", (data2) => __privateSet(this, _data, new Map(data2))); - __publicField(this, "check", (uuid) => !__privateGet(this, _data).has(uuid) || __privateGet(this, _data).get(uuid)); - if (__privateGet(_OperationAuth, _instance2)) - return __privateGet(_OperationAuth, _instance2); - } -}; -_instance2 = new WeakMap(), _data = new WeakMap(), __privateAdd(_OperationAuth, _instance2, null), __publicField(_OperationAuth, "getInstance", () => (__privateGet(_OperationAuth, _instance2) || __privateSet(_OperationAuth, _instance2, new _OperationAuth()), __privateGet(_OperationAuth, _instance2))); -let OperationAuth = _OperationAuth; -const auth = OperationAuth.getInstance(), entry = (cate) => function({ - className, - children, - name, - icon, - type, - data: data2, - noAuthType, - onAfterClick, - onBeforeClick, - loading: customLoading, - disabled: customDisabled, - tooltip, - popConfirm, - widget, - widgetType, - widgetData, - widgetProps, - widgetSetting, - widgetContainerProps, - ...props -}) { - const btnProps = { - type: "primary", - className: cx("ff-button", className) - }; - type === "danger" ? btnProps.danger = !0 : type === "default" && (btnProps.type = type), cate === "link" || cate === "dashed" ? (btnProps.type = cate, type === "default" && (btnProps.className = cx(btnProps.className, "ff-default"))) : (cate === "circle" || cate === "round") && (btnProps.shape = cate), icon && (btnProps.icon = /* @__PURE__ */ jsx(Iconfont, { type: icon })); - const [confirmOpen, setConfirmOpen] = useState(!1), [onClick, { disabled, loading }] = useButton({ widget, widgetType, widgetData, widgetProps, widgetSetting, widgetContainerProps }, { onAfterClick, onBeforeClick }); - return /* @__PURE__ */ jsx( - Popconfirm, - { - okText: "确定", - cancelText: "取消", - ...popConfirm || {}, - disabled: disabled || customDisabled, - open: confirmOpen, - onOpenChange: (flag) => { - if (!flag) - return setConfirmOpen(flag); - popConfirm ? setConfirmOpen(flag) : onClick(data2); - }, - onConfirm: () => { - onClick(data2); - }, - onClick: (e) => { - e.stopPropagation(); - }, - children: /* @__PURE__ */ jsx(Tooltip, { ...tooltip, title: confirmOpen ? null : tooltip == null ? void 0 : tooltip.title, trigger: ["hover", "click"], children: /* @__PURE__ */ jsx( - Button$1, - { - loading: loading || customLoading, - disabled: disabled || customDisabled, - ...btnProps, - ...props, - children: children || name - } - ) }) - } - ); -}, Button = entry("default"), Link = entry("link"), Circle = entry("circle"), Round = entry("round"), Dashed = entry("dashed"), Popover = ({ data: data2, widget, widgetType, children, widgetData, widgetProps, widgetSetting, widgetContainerProps }) => { - const listFn = useContext(DataListContext), [open, setOpen] = useState(!1), [trigger, setTrigger] = useState("hover"), [componentData, setComponentData] = useState({}), [component2, setComponent] = useState(); - useEffect(() => { - widgetType == "grid-layout-form" ? setComponent(React.createElement(GridLayoutFormHelper, { ...widgetData, $setting: widgetSetting, code: widget })) : widgetType == "data-list" ? setComponent(React.createElement(DataListHelper, { base62params: data2, $setting: widgetSetting, listCode: widget })) : _.isString(widget) ? core.getWidgetComponent(widget).then(({ default: WidgetComponent }) => { - setComponent(React.createElement(WidgetComponent, { ...widgetData, $setting: widgetSetting })); - }).catch((e) => setComponent(e.toString())) : isReactComponent(widget) ? setComponent(React.createElement(widget, { ...widgetData, $setting: widgetSetting })) : React.isValidElement(widget) && setComponent(React.cloneElement(widget, { ...widgetData, $setting: widgetSetting })); - }, [widget, widgetType, widgetData]), useEffect(() => { - Promise.resolve(getWidgetPropsData(widgetProps, data2, { list: listFn })).then(setComponentData); - }, [widgetProps, data2]); - const onOpenChange = (flag) => { - setOpen(flag), !flag && setTrigger("hover"); - }, onClick = () => { - setOpen(!0), setTrigger("click"); - }; - return /* @__PURE__ */ jsx( - Popover$1, - { - zIndex: 1e3, - ...widgetContainerProps, - onPopupClick: onClick, - onClick, - open, - trigger, - content: /* @__PURE__ */ jsx(PopoverContent, { children: component2 && React.cloneElement(component2, { ...componentData, $close: () => onOpenChange(!1) }) }), - children, - onOpenChange, - overlayClassName: "ff-popup ff-popover" - } - ); -}, PopoverContent = ({ children }) => { - const [ele, setEle] = useState({}), onMount = useCallback((solt, ele2) => setEle((state) => ({ ...state, [solt]: ele2 })), []), onUnmount = useCallback((solt) => setEle((state) => ({ ...state, [solt]: void 0 })), []); - return /* @__PURE__ */ jsxs(SlotContext.Provider, { value: { ele, mount: onMount, unmount: onUnmount }, children: [ - ele != null && ele.title || ele != null && ele["sub-title"] ? /* @__PURE__ */ jsxs("div", { className: "ff-popup-header", children: [ - (ele == null ? void 0 : ele.title) || /* @__PURE__ */ jsx("div", { className: "ff-popup-title" }), - (ele == null ? void 0 : ele["sub-title"]) || /* @__PURE__ */ jsx("div", { className: "ff-popup-sub-title" }) - ] }) : null, - children, - ele != null && ele.extras || ele != null && ele.actions ? /* @__PURE__ */ jsxs("div", { className: "ff-popup-footer", children: [ - (ele == null ? void 0 : ele.extras) || /* @__PURE__ */ jsx("div", { className: "ff-popup-extras" }), - (ele == null ? void 0 : ele.actions) || /* @__PURE__ */ jsx("div", { className: "ff-popup-actions" }) - ] }) : null - ] }); -}; -Popover.defaultProps = { - widgetType: "fsdpf-component" -}; -Popover.propTypes = { - widgetType: PropTypes.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) -}; -Button.defaultProps = { - type: "default", - iconPosition: "start" -}; -Button.propTypes = { - type: PropTypes.oneOf(["primary", "default", "danger", ""]), - name: PropTypes.string, - // 按钮名称 - icon: PropTypes.string, - // 图标 - iconPosition: PropTypes.oneOf(["start", "end"]), - // 图标位置 - data: PropTypes.any, - // onClick 数据源, 会受到 widgetProps 数据结构影响 - widget: PropTypes.any, - // 组件 - widgetType: PropTypes.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), - // 组件类型 - widgetData: PropTypes.object, - // onClick缺省数据 - widgetProps: PropTypes.object, - // data 数据结构 - widgetSetting: PropTypes.object, - // $setting - widgetContainerProps: PropTypes.object - // 容器配置 -}; -Button.Link = Link; -Button.Link.defaultProps = Button.defaultProps; -Button.Link.propTypes = Button.propTypes; -Button.Circle = Circle; -Button.Circle.defaultProps = Button.defaultProps; -Button.Circle.propTypes = Button.propTypes; -Button.Round = Round; -Button.Round.defaultProps = Button.defaultProps; -Button.Round.propTypes = Button.propTypes; -Button.Dashed = Dashed; -Button.Dashed.defaultProps = Button.defaultProps; -Button.Dashed.propTypes = Button.propTypes; -Button.Popover = Popover; -const GridLayoutFormHelper = ({ $setting, $close, extras, code, primaryKey, ...props }) => { - const [form] = Form$1.useForm(), data2 = useFormData(code, primaryKey, $setting); - useEffect(() => { - data2 && form.setFieldsValue(data2); - }, [data2]); - const onSubmit = () => { - const key = form.getFieldValue("__RESOURCE__"), { - initDataUri = `/api/${code}` - } = $setting || {}; - form.validateFields(!0).then((data22) => key ? _.pick(data22, [key]) : data22).then((data22) => http.post(primaryKey ? `${initDataUri}/${primaryKey}` : `${initDataUri}`, data22).msg($close)).catch(() => FFPopupRender.error("请先完善表单信息", { duration: 2e3 })); - }; - return /* @__PURE__ */ jsx( - FFContainer, - { - actions: /* @__PURE__ */ jsxs(React.Fragment, { children: [ - /* @__PURE__ */ jsx(Button, { name: "保存", type: "primary", widget: onSubmit }), - /* @__PURE__ */ jsx(Button, { name: "取消", widget: () => $close(!1) }) - ] }), - extras, - children: /* @__PURE__ */ jsx(GridLayoutForm$1, { form, code, primaryKey, ...props }) - } - ); -}, getOptionItemByValue = (items, value, depthKey = "children") => { - if (_.isEmpty(items)) - return {}; - const item = _.find(items, ["value", value]); - if (!_.isEmpty(item)) - return item; - const len = items.length; - for (let i = 0; i < len; i++) { - const { [depthKey]: children } = items[i], result = getOptionItemByValue(children, value, depthKey); - if (!_.isEmpty(result)) - return result; - } - return {}; -}, FormModalContainer = ({ fields, formProps, $close }) => { - const [form] = Form$1.useForm(), onSubmit = () => form.validateFields(!0).then($close), formPropsFields = useMemo(() => [ - { name: "__PROPS__", value: formProps } - ], [formProps]); - return /* @__PURE__ */ jsx(FFContainer, { actions: /* @__PURE__ */ jsxs(React.Fragment, { children: [ - /* @__PURE__ */ jsx(Button, { name: "取消", widget: () => $close(!1) }), - /* @__PURE__ */ jsx(Button, { name: "确定", type: "primary", widget: () => onSubmit() }) - ] }), children: /* @__PURE__ */ jsx(ConfigProvider, { theme: { components: { Form: { itemMarginBottom: 6 } } }, children: /* @__PURE__ */ jsx(Form$1, { fields: formPropsFields, layout: "vertical", form, children: fields == null ? void 0 : fields.map(({ code, ...props }) => /* @__PURE__ */ jsx(GridLayoutFormWidget, { code, ...props }, code)) }) }) }); -}; -var _pending, _index, _renders, _onNotificationClick, _onConfirmClick, _onModalClick, _onFormClick, _onModalClose; -const _FFPopupRender = class _FFPopupRender extends React.Component { - constructor(props) { - super(props); - __privateAdd(this, _pending, null); - __privateAdd(this, _index, 0); - __privateAdd(this, _renders, /* @__PURE__ */ new Map()); - __privateAdd(this, _onNotificationClick, (opts) => new Promise((resolve) => { - const index2 = __privateWrapper(this, _index)._++; - __privateGet(this, _renders).set(index2, React.createElement(Notification, { - ...opts, - key: index2, - $close: (flag) => __privateGet(this, _onModalClose).call(this, index2, () => resolve(flag)) - })), this.forceUpdate(); - })); - __privateAdd(this, _onConfirmClick, (content, opts) => new Promise((resolve) => { - const index2 = __privateWrapper(this, _index)._++; - __privateGet(this, _renders).set(index2, React.createElement(Confirm, { - ...opts, - content, - key: index2, - $close: (flag) => __privateGet(this, _onModalClose).call(this, index2, () => resolve(flag)) - })), this.forceUpdate(); - })); - __privateAdd(this, _onModalClick, (widget, widgetProps, { mode, ...widgetContainerProps } = {}) => new Promise((resolve) => { - const index2 = __privateWrapper(this, _index)._++, ref = { current: null }; - __privateGet(this, _renders).set(index2, React.createElement( - mode == "drawer" ? Drawer : Modal, - { - ref, - key: index2, - maskClosable: !1, - ...widgetContainerProps, - $close: (flag) => __privateGet(this, _onModalClose).call(this, index2, () => resolve(flag)) - }, - React.createElement(widget, { - ...widgetProps, - $close: (flag) => ref.current.handleClose(flag) - }) - )), this.forceUpdate(); - })); - __privateAdd(this, _onFormClick, (fields, widgetContainerProps = {}, formProps = {}) => __privateGet(this, _onModalClick).call(this, FormModalContainer, { formProps, fields }, widgetContainerProps).then((resp) => { - if (resp === !1) - throw !1; - return resp; - })); - __privateAdd(this, _onModalClose, (index2, cb) => { - __privateGet(this, _renders).delete(index2), this.forceUpdate(cb); - }); - _FFPopupRender.modal = __privateGet(this, _onModalClick), _FFPopupRender.notification = __privateGet(this, _onNotificationClick), _FFPopupRender.confirm = __privateGet(this, _onConfirmClick), _FFPopupRender.form = __privateGet(this, _onFormClick); - } - componentWillUnmount() { - var _a, _b; - (_b = (_a = __privateGet(this, _pending)) == null ? void 0 : _a[1]) == null || _b.call(_a); - } - render() { - const renders = Array.from(__privateGet(this, _renders)); - return /* @__PURE__ */ jsx(React.Fragment, { children: renders.map(([i, item]) => item) }); - } -}; -_pending = new WeakMap(), _index = new WeakMap(), _renders = new WeakMap(), _onNotificationClick = new WeakMap(), _onConfirmClick = new WeakMap(), _onModalClick = new WeakMap(), _onFormClick = new WeakMap(), _onModalClose = new WeakMap(); -let FFPopupRender = _FFPopupRender; -FFPopupRender.notification = ({ title, content, icon, category, ...opts }) => Promise.resolve(notification$1[category || "open"]({ - ...opts, - icon: icon ? /* @__PURE__ */ jsx(Iconfont, { type: icon || "" }) : void 0, - message: title, - description: content -})); -FFPopupRender.success = (title, opts = {}) => FFPopupRender.notification({ title, category: "success", ...opts }); -FFPopupRender.error = (title, opts = {}) => FFPopupRender.notification({ title, category: "error", ...opts }); -FFPopupRender.confirm = (content, opts = {}) => FFPopupRender.notification({ content, ...opts }); -FFPopupRender.form = (title, opts = {}) => FFPopupRender.notification({ title, ...opts }); -FFPopupRender.modal = (opts = {}) => FFPopupRender.notification(opts); -const USER_MINE = "mine", USER_TOKEN = "token", USER_PLATFORM = "web", USER_TOKEN_EXPIRE = 60 * 60 * 24 * 30, getUserToken = () => { - const token = window.localStorage.getItem(USER_TOKEN); - if (!token) - return ""; - const jwt = token.split("."); - if (!Array.isArray(jwt) || jwt.length !== 3) - throw "登录令牌无效!"; - const { iat } = JSON.parse(window.atob(jwt[1])); - if (Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) - iat > USER_TOKEN_EXPIRE) - throw "登录令牌已过期, 请重新登录!"; - return token; -}, checkUserToken = () => { - try { - return !!getUserToken(); - } catch { - return !1; - } -}, getUserInfo = (isAutoLogout = !0) => { - var _a; - try { - const token = getUserToken(); - if (!token) - return Promise.resolve(null); - const { iat: t_iat } = JSON.parse(window.atob((_a = token == null ? void 0 : token.split(".")) == null ? void 0 : _a[1])), { iat: u_iat, ...User } = http.decode(window.localStorage.getItem(USER_MINE) || "", {}); - return u_iat === t_iat ? Promise.resolve(User) : http.get("/api/mine-info").then(({ User: User2 = null }) => (window.localStorage.setItem(USER_MINE, http.encode({ ...User2, iat: t_iat })), User2)); - } catch (e) { - console.error(e), isAutoLogout && FFPopupRender.error("请登录").then(logout); - } - return Promise.resolve(null); -}, login = (username, passwd, opts = {}) => http.post("/api/user-token", { - username, - passwd: SparkMD5.hash(passwd), - platform: USER_PLATFORM, - ...opts -}).then(({ token }) => (window.localStorage.setItem(USER_TOKEN, token), token)), logout = () => { - window.localStorage.removeItem(USER_MINE), window.localStorage.removeItem(USER_TOKEN); -}; -NProgress.configure({ showSpinner: !1 }); -axios.interceptors.request.use((config) => { - config.headers.Platform = "web", config.headers.SaaS = window.localStorage.getItem("SaaS"); - try { - const token = getUserToken(); - config.headers.Authorization = token ? `Bearer ${token} ` : void 0; - } catch { - } - return NProgress.inc(), config; -}, (errMsg) => (NProgress.done(), Promise.reject({ code: -1, msg: errMsg }))); -axios.interceptors.response.use(({ data: data2, headers }) => (NProgress.done(), { ...data2, res: headers == null ? void 0 : headers.res }), function(e) { - return NProgress.done(), Promise.reject(e.message); -}); -window.addEventListener("unhandledrejection", Request.onUnhandledRejection); -Request.onMsg = (code, msg) => FFPopupRender[[0, 1].includes(code) ? "success" : "error"](msg).then(() => code === 20300 && route.redirect(configure.get("Common.WEBSITE_LOGIN_PAGE"))); -const AppContext = React.createContext({ - user: {}, - initUser: () => { - }, - initUserComplete: !1 -}), AppGlobalParamsContext = React.createContext({ - set: () => { - }, - get: () => { - }, - assign: () => { - }, - currentRoute: () => { - } -}); -var _cache, _loading, _pending2, _pResult, _target, _get; -class Cache { - constructor(target, fn2) { - __privateAdd(this, _cache, /* @__PURE__ */ new Map()); - __privateAdd(this, _loading, !0); - __privateAdd(this, _pending2, []); - __privateAdd(this, _pResult, void 0); - __privateAdd(this, _target, () => __privateGet(this, _pResult)); - __privateAdd(this, _get, () => Promise.resolve()); - __publicField(this, "get", (...args) => new Promise((resolve, reject) => { - const key = JSON.stringify(args); - if (__privateGet(this, _cache).has(key)) - return resolve(__privateGet(this, _get).call(this, __privateGet(this, _pResult), ...args)); - if (__privateGet(this, _pResult) === void 0) - __privateGet(this, _pending2).push([args, resolve, reject]), __privateGet(this, _loading) && (__privateSet(this, _loading, !1), Promise.resolve(typeof __privateGet(this, _target) == "function" ? __privateGet(this, _target).call(this) : __privateGet(this, _target)).then((data2) => __privateSet(this, _pResult, data2 || null)).finally(() => { - __privateGet(this, _pending2).forEach(([args2, resolve2, reject2]) => { - try { - const result = __privateGet(this, _get).call(this, __privateGet(this, _pResult), ...args2); - __privateGet(this, _cache).set(JSON.stringify(args2), result), resolve2(result); - } catch (e) { - reject2(e); - } - }), __privateGet(this, _pending2).length = 0; - })); - else { - const result = __privateGet(this, _get).call(this, __privateGet(this, _pResult), ...args); - __privateGet(this, _cache).set(key, result), resolve(result); - } - })); - __privateSet(this, _get, fn2), __privateSet(this, _target, target); - } -} -_cache = new WeakMap(), _loading = new WeakMap(), _pending2 = new WeakMap(), _pResult = new WeakMap(), _target = new WeakMap(), _get = new WeakMap(); -var _instance3, _data2; -const _Configure = class _Configure { - constructor() { - __privateAdd(this, _data2, null); - __publicField(this, "init", (data2) => __privateSet(this, _data2, data2)); - __publicField(this, "get", (key, _default) => _.get(__privateGet(this, _data2), key, _default)); - if (__privateGet(_Configure, _instance3)) - return __privateGet(_Configure, _instance3); - } -}; -_instance3 = new WeakMap(), _data2 = new WeakMap(), __privateAdd(_Configure, _instance3, null), __publicField(_Configure, "getInstance", () => (__privateGet(_Configure, _instance3) || __privateSet(_Configure, _instance3, new _Configure()), __privateGet(_Configure, _instance3))); -let Configure = _Configure; -const configure = Configure.getInstance(), DataList = ({ component: component2 }) => { - const { base62params } = useParams(); - return /* @__PURE__ */ jsx(FFContainer, { children: /* @__PURE__ */ jsx( - DataListHelper, - { - listCode: component2, - base62params: http.decode(base62params) - } - ) }); -}, Component = ({ component: component2, $setting }) => { - const [children, setChildren] = useState(); - useEffect(() => { - if (!component2) - return setChildren(/* @__PURE__ */ jsx(Empty, { description: null })); - core.getWidgetComponent(component2).catch((e) => ({ default: () => `${e}` })).then((pkg) => React.createElement(pkg.default, { $setting })).then(setChildren); - }, [component2]); - const props = {}; - return children ? React.cloneElement(children, props) : null; -}; -var _instance4, _data3, _menus, _router, _findPathById, _getMenuItems; -const _Route = class _Route { - constructor() { - __privateAdd(this, _data3, /* @__PURE__ */ new Map()); - __privateAdd(this, _menus, {}); - __privateAdd(this, _router, null); - __publicField(this, "init", (data2, menus) => { - __privateSet(this, _data3, data2), __privateSet(this, _menus, menus); - }); - __publicField(this, "get", (uuid) => (__privateGet(this, _data3).has(uuid) || (uuid = Array.from(__privateGet(this, _data3).keys()).find((k) => __privateGet(this, _data3).get(k).uri === uuid)), __privateGet(this, _data3).get(uuid) || {})); - __publicField(this, "redirect", (uuid, params, opt = {}) => { - const { uri, type, widgetProps } = this.get(uuid) || {}; - let url = generatePath(uri || uuid, type != "list" ? params : _.mapValues(params, (item) => http.encode(item))); - const oUrlParam = new URLSearchParams(); - for (const key in widgetProps || {}) - (widgetProps == null ? void 0 : widgetProps.type) == "query" && oUrlParam.append(key, params[key]); - return oUrlParam.size > 0 && (url = `${url}?${oUrlParam.toString()}`), __privateGet(this, _router).navigate(url, opt); - }); - /** - * - * @param {*} category // user, system, navigator - * @returns - */ - __publicField(this, "getMenus", (category) => { - var _a; - return ((_a = __privateGet(this, _menus)) == null ? void 0 : _a[category]) || []; - }); - __publicField(this, "findMenuPathByUuid", (uuid) => { - let result = []; - for (const key in __privateGet(this, _menus)) - if (result = __privateGet(this, _findPathById).call(this, __privateGet(this, _menus)[key], uuid, [key]), result.length > 1) - return result; - return result; - }); - __publicField(this, "getMenusByRouteUuid", (key) => __privateGet(this, _getMenuItems).call(this, key, Object.values(__privateGet(this, _menus)).flat())); - __privateAdd(this, _findPathById, (items, target, path = []) => { - if (_.isEmpty(items)) - return path; - for (const { uuid, children } of items) { - if (uuid == target) - return path.concat(uuid); - if (!_.isEmpty(children)) - return path.concat(uuid, __privateGet(this, _findPathById).call(this, children, target)); - } - return path; - }); - __privateAdd(this, _getMenuItems, (key, items) => { - var _a; - let result = []; - for (const item of items) - item.widgetType == "redirect" && (item.uuid == key || item.widget == key ? result.push(item) : (_a = item.children) != null && _a.length && (result = result.concat(__privateGet(this, _getMenuItems).call(this, key, item.children)))); - return result; - }); - __publicField(this, "getCurrentMenu", () => { - const { uuid } = this.getCurrentRoute() || {}; - if (!uuid) - return; - const items = this.getMenusByRouteUuid(uuid); - if (!_.isEmpty(items)) - return items[0]; - }); - __publicField(this, "getCurrentRoute", (delta = 0) => { - var _a; - const route2 = (_a = __privateGet(this, _router).state.matches[__privateGet(this, _router).state.matches.length - 1 - delta]) == null ? void 0 : _a.route; - if (!route2) - return null; - for (let [_key, item] of __privateGet(this, _data3)) - if (item.uri === route2.path) - return item; - return null; - }); - __publicField(this, "getPageParams", (key) => { - var _a; - const { location, matches } = __privateGet(this, _router).state, params = ((_a = matches[matches.length - 1]) == null ? void 0 : _a.params) || {}; - return location.search && new URLSearchParams(location.search).forEach((value, key2) => { - params[key2] = value; - }), key ? _.get(params, key) : params; - }); - __publicField(this, "createBrowserRouter", (opt = {}) => { - if (__privateGet(this, _data3).size == 0) - return null; - const theme = configure.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/frameworks/BasicLayout"), index2 = configure.get(checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), themeMap = { [theme]: 0 }, routes = Array.from(__privateGet(this, _data3).values()).reduce((carry, { uuid, uri, name, type, component: component2, widgetSetting, isLogin, isLayout, extra }) => { - let item = {}, themeIndex = 0; - switch (type) { - case "list": - item.element = React.createElement(DataList, { component: component2 }); - break; - case "fsdpf-component": - item.element = React.createElement(Component, { key: component2, component: component2, $setting: widgetSetting }); - break; - } - if (extra != null && extra.layout) - if (themeMap[extra == null ? void 0 : extra.layout]) - themeIndex = themeMap[extra == null ? void 0 : extra.layout]; - else - return themeMap[extra == null ? void 0 : extra.layout] = carry.length, [...carry, { - path: "/", - lazy: () => core.getWidgetComponent(extra == null ? void 0 : extra.layout).then((resp) => ({ Component: resp.default })), - children: [{ path: uri, ...item }] - }]; - return isLayout && themeIndex > -1 ? (carry[themeIndex].children.push({ path: uri, ...item }), carry) : [...carry, { path: uri, ...item }]; - }, [ - { - path: "/", - lazy: () => core.getWidgetComponent(theme).then((resp) => ({ Component: resp.default })), - children: [] - } - ]); - return routes.push({ index: !0, element: React.createElement(Navigate, { to: index2, replace: !0 }) }), __privateSet(this, _router, createBrowserRouter(routes, opt)); - }); - if (__privateGet(_Route, _instance4)) - return __privateGet(_Route, _instance4); - } -}; -_instance4 = new WeakMap(), _data3 = new WeakMap(), _menus = new WeakMap(), _router = new WeakMap(), _findPathById = new WeakMap(), _getMenuItems = new WeakMap(), __privateAdd(_Route, _instance4, null), __publicField(_Route, "getInstance", () => (__privateGet(_Route, _instance4) || __privateSet(_Route, _instance4, new _Route()), __privateGet(_Route, _instance4))); -let Route = _Route; -const route = Route.getInstance(), oWorker = new Worker(new URL("data:text/plain;base64,KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2ltcG9ydFNjcmlwdHMoImh0dHBzOi8vYXNzZXRzLmZzZHBmLm5ldC9qcy91bWQvbG9kYXNoQDRfMTdfMjEubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9sb2Rhc2gubWl4aW4uanMiKSxpbXBvcnRTY3JpcHRzKCJodHRwczovL2Fzc2V0cy5mc2RwZi5uZXQvanMvdW1kL21vbWVudEAyXzI5XzQubWluLmpzIiwiaHR0cHM6Ly9hc3NldHMuZnNkcGYubmV0L2pzL3VtZC9tb21lbnQubG9jYWxlLnpoLWNuLmpzIiksbW9tZW50LmxvY2FsZSgiemgtY24iKTtjb25zdCBVdGlsPShlLHMpPT57Y29uc3QgdD1VdGlsLm1zZ19pZCsrO3JldHVybiBuZXcgUHJveHkoKCk9Pnt9LHtnZXQoe3Jvb3Q6YX0sbil7Y29uc3Qgbz1hP2Ake2F9LyR7bn1gOm47cmV0dXJuIGZ1bmN0aW9uKC4uLmkpe3JldHVybiBuZXcgUHJvbWlzZSgocixsKT0+e1V0aWwubVF1ZXVlLnNldCh0LFtyLGxdKSxzZWxmLnBvc3RNZXNzYWdlKHtpZDp0LHRhc2tfaWQ6ZSxzZXNzaW9uOnMsY2F0ZWdvcnk6InV0aWwiLG1ldGhvZDpvLGFyZ3M6aX0pfSl9fSxhcHBseShhLG4sbyl7cmV0dXJuIG5ldyBQcm94eShPYmplY3QuY3JlYXRlKHtyb290Om9bMF18fG51bGx9KSx7Z2V0OnRoaXMuZ2V0fSl9fSl9O1V0aWwubXNnX2lkPTAsVXRpbC5tUXVldWU9bmV3IE1hcCxVdGlsLm1NZXRob2RXb3Jrc3BhY2U9bmV3IE1hcCxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGZ1bmN0aW9uKHtkYXRhOntpZDplLGRhdGE6cyxlcnJvcjp0LGNhdGVnb3J5OmF9fSl7YT09PSJ1dGlsIiYmKHQhPT1udWxsP1V0aWwubVF1ZXVlLmdldChlKVsxXSh0KTpVdGlsLm1RdWV1ZS5nZXQoZSlbMF0ocyksVXRpbC5tUXVldWUuZ2V0KGUpLFV0aWwubVF1ZXVlLmRlbGV0ZShlKSl9LCExKSxzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLCh7ZGF0YTp7aWQsbWV0aG9kLGFyZ3MsY2F0ZWdvcnksc2Vzc2lvbixzb3VyY2VVUkx9fSk9PntpZihjYXRlZ29yeSE9PSJldmFsIilyZXR1cm47c2Vzc2lvbiYmIVV0aWwubU1ldGhvZFdvcmtzcGFjZS5oYXMoc2Vzc2lvbikmJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5zZXQoc2Vzc2lvbix7fSk7Y29uc3QgZXZhbERhdGFTb3VyY2VVUkw9c291cmNlVVJMP2AKLy8jIHNvdXJjZVVSTD1mZjovLy8uLyR7c291cmNlVVJMfWA6IiIsZXZhbERhdGE9ZXZhbChgKGFzeW5jIGZ1bmN0aW9uKHske09iamVjdC5rZXlzKGFyZ3MpLmpvaW4oIiwgIil9fSwgVXRpbCl7JHttZXRob2R9Cn0pJHtldmFsRGF0YVNvdXJjZVVSTH1gKS5jYWxsKHNlc3Npb24/VXRpbC5tTWV0aG9kV29ya3NwYWNlLmdldChzZXNzaW9uKTp7fSxhcmdzLFV0aWwoaWQsc2Vzc2lvbikpO3JldHVybiBQcm9taXNlLnJlc29sdmUoZXZhbERhdGEpLnRoZW4oZT0+e3NlbGYucG9zdE1lc3NhZ2Uoe2lkLHNlc3Npb24sY2F0ZWdvcnksZGF0YTplLGVycm9yOm51bGx9KX0pLmNhdGNoKGU9PntzZWxmLnBvc3RNZXNzYWdlKHtpZCxzZXNzaW9uLGNhdGVnb3J5LGRhdGE6bnVsbCxlcnJvcjplIGluc3RhbmNlb2YgRE9NRXhjZXB0aW9uJiZlLm5hbWU9PT0iRGF0YUNsb25lRXJyb3IiPyJEYXRhQ2xvbmVFcnJvciDov5Tlm57nu5Pmnpzlj6rog73kuLrnroDljZXmlbDmja7moLzlvI8iOmV9KX0pfSksc2VsZi5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIiwoe2RhdGE6e2NhdGVnb3J5OmUsc2Vzc2lvbjpzfX0pPT57ZT09PSJjbGVhciImJlV0aWwubU1ldGhvZFdvcmtzcGFjZS5kZWxldGUocyl9LCExKX0pKCk7Cg==", self.location)), fns = { - getConfigure: (key) => configure.get(key), - route: { - redirect: (...args) => route.redirect(...args), - getPageParams: (...args) => route.getPageParams(...args), - getCurrentRoute: () => route.getCurrentRoute() - }, - modal: { - notification: (...args) => FFPopupRender.notification(...args), - success: (...args) => FFPopupRender.success(...args), - error: (...args) => FFPopupRender.error(...args), - form: (...args) => FFPopupRender.form(...args) - }, - popup: { - notification: (...args) => FFPopupRender.notification(...args), - success: (...args) => FFPopupRender.success(...args), - error: (...args) => FFPopupRender.error(...args), - form: (...args) => FFPopupRender.form(...args) - } -}; -var _msg_id, _fns, _instance5; -const _Func = class _Func { - constructor() { - __publicField(this, "exec", (source, args = {}, fns2 = {}, session = "") => new Promise((resolve, reject) => { - const id = __privateWrapper(_Func, _msg_id)._++; - __privateGet(_Func, _fns).set(id, fns2), _Func.mQueue.set(id, [resolve, reject]), oWorker.postMessage({ id, session, category: "eval", method: source, args }); - })); - __publicField(this, "clear", (session) => oWorker.postMessage({ session, category: "clear" })); - if (__privateGet(_Func, _instance5)) - return __privateGet(_Func, _instance5); - Promise.resolve().then(() => index).then((m) => { - fns.http = m.http; - }), oWorker.addEventListener("message", ({ data: { id, task_id, method, args, category, data: data2, error, session } }) => { - if (category === "eval" && _Func.mQueue.has(id)) - error !== null ? _Func.mQueue.get(id)[1](error) : _Func.mQueue.get(id)[0](data2), __privateGet(_Func, _fns).delete(id), _Func.mQueue.delete(id); - else if (category === "util") - try { - const func2 = _.get(fns, method.split("/")) || _.get(__privateGet(_Func, _fns).get(task_id), method.split("/")); - if (!_.isFunction(func2)) - throw `${method} not found`; - Promise.resolve(Reflect.apply(func2, void 0, args)).then((data3) => { - oWorker.postMessage({ id, task_id, category, method, args, session, data: data3, error: null }); - }).catch((e) => { - oWorker.postMessage({ id, task_id, category, method, args, session, data: null, error: e }); - }); - } catch (e) { - oWorker.postMessage({ id, task_id, category, method, args, session, data: null, error: e }); - } - }, !1); - } -}; -_msg_id = new WeakMap(), _fns = new WeakMap(), _instance5 = new WeakMap(), __publicField(_Func, "mQueue", /* @__PURE__ */ new Map()), __privateAdd(_Func, _msg_id, 0), __privateAdd(_Func, _fns, /* @__PURE__ */ new Map()), __privateAdd(_Func, _instance5, null), __publicField(_Func, "getInstance", () => (__privateGet(_Func, _instance5) || __privateSet(_Func, _instance5, new _Func()), __privateGet(_Func, _instance5))); -let Func = _Func; -const fn = Func.getInstance(); -var _instance6, _cache2; -const _Core = class _Core { - constructor() { - __privateAdd(this, _cache2, /* @__PURE__ */ new Map()); - __publicField(this, "setVendor", (key, vendor) => __privateGet(this, _cache2).set(key, new Cache(vendor, (self2, pkg) => self2.dynamicRequireFsdpfComponent(pkg)))); - __publicField(this, "getWidgetComponent", async (w) => { - if (!w) - throw "getWidgetComponent widget is required"; - const [, ff] = w == null ? void 0 : w.split("@ff/"), [, app] = w == null ? void 0 : w.split("@app/"), [, pkg] = w == null ? void 0 : w.split("@pkg/"), [, fsdpf] = w == null ? void 0 : w.split("@fsdpf/"); - try { - switch (!0) { - case (!!ff && __privateGet(this, _cache2).has("pkg")): - return await __privateGet(this, _cache2).get("pkg").get(ff); - case (!!app && __privateGet(this, _cache2).has("pkg")): - return await __privateGet(this, _cache2).get("pkg").get(app); - case (!!pkg && __privateGet(this, _cache2).has("pkg")): - return await __privateGet(this, _cache2).get("pkg").get(pkg); - case (!!fsdpf && __privateGet(this, _cache2).has("pkg")): - return await __privateGet(this, _cache2).get("pkg").get(fsdpf); - } - } catch (e) { - throw e; - } - }); - if (__privateGet(_Core, _instance6)) - return __privateGet(_Core, _instance6); - } -}; -_instance6 = new WeakMap(), _cache2 = new WeakMap(), __privateAdd(_Core, _instance6, null), __publicField(_Core, "getInstance", () => (__privateGet(_Core, _instance6) || __privateSet(_Core, _instance6, new _Core()), __privateGet(_Core, _instance6))); -let Core = _Core; -const core = Core.getInstance(), convertFns = { - null2json: (data2) => null, - null2array: (data2) => null, - null2number: (data2) => null, - null2bool: (data2) => null, - null2string: (data2) => null, - null2integer: (data2) => null, - null2float: (data2) => null, - // null2json: (data) => ({}), - // null2array: (data) => ([]), - // null2number: (data) => 0, - // null2bool: (data) => false, - // null2string: (data) => '', - string2json: (data2) => data2 ? JSON.parse(data2) : "{}", - string2array: (data2) => data2.substr(0, 1) === "[" && data2.substr(-1) === "]" ? JSON.parse(data2) : data2.split(","), - string2number: (data2) => data2 == "" ? null : +data2, - string2integer: (data2) => data2 == "" ? null : +data2, - string2float: (data2) => data2 == "" ? null : +data2, - string2bool: (data2) => { - switch (`${data2}`.toLowerCase()) { - case "0": - case "false": - case "[]": - case "{}": - return !1; - } - return !!data2; - }, - string2string: (data2) => data2, - json2json: (data2) => data2, - json2array: (data2) => data2 ? Object.values(data2) : [], - json2number: (data2) => Object.keys(data2).length, - json2integer: (data2) => Object.keys(data2).length, - json2float: (data2) => Object.keys(data2).length, - json2bool: (data2) => Object.keys(data2).length > 0, - json2string: (data2) => data2 ? JSON.stringify(data2) : "", - array2json: (data2) => ({ ...data2 }), - array2array: (data2) => data2, - array2number: (data2) => data2.length, - array2integer: (data2) => data2.length, - array2float: (data2) => data2.length, - array2bool: (data2) => data2.length > 0, - array2string: (data2) => JSON.stringify(data2), - number2json: (data2) => ({}), - number2array: (data2) => [data2], - number2number: (data2) => data2, - number2integer: (data2) => data2, - number2float: (data2) => data2, - number2bool: (data2) => !!data2, - number2string: (data2) => data2.toString(), - boolean2json: (data2) => ({}), - boolean2array: (data2) => [], - boolean2number: (data2) => +data2, - boolean2integer: (data2) => +data2, - boolean2float: (data2) => +data2, - boolean2bool: (data2) => data2, - boolean2string: (data2) => data2 ? "true" : "false" -}; -_.mixin({ - toPairsDeep: (obj, i) => _.flatMap( - _.toPairs(obj), - ([k, v]) => _.isObjectLike(v) ? _.toPairsDeep(v, k) : [[`${_.isUndefined(i) ? "" : i + "."}${k}`, v]] - ), - deepSome: (items, func2 = () => !1) => _.some(items, (item) => { - if (_.some(item, func2)) - return !0; - if (!_.isEmpty(item) && (_.isPlainObject(item) || _.isArray(item))) - return _.deepSome(item, func2); - }), - toPrimitive: (data2, type) => { - let sourceType = "string"; - Array.isArray(data2) ? sourceType = "array" : sourceType = typeof data2, _.isObject(data2) && (sourceType = "json"); - const fn2 = `${sourceType}2${type}`; - return Reflect.has(convertFns, fn2) ? convertFns[fn2](data2) : data2; - }, - replaceKeys: (obj, keyMap) => !obj || typeof obj != "object" ? obj : Array.isArray(obj) ? obj.map((item) => _.replaceKeys(item, keyMap)) : Object.keys(obj).reduce((acc, key) => (keyMap[key] ? acc[keyMap[key]] = _.replaceKeys(obj[key], keyMap) : acc[key] = _.replaceKeys(obj[key], keyMap), acc), {}) -}); -let AppUrl = ""; -const http = { - init: (appKey, appSecret, appUrl) => { - axios.defaults.baseURL = AppUrl = appUrl, axios.defaults.timeout = 15e3, Object.assign(http, new Request(appKey, appSecret, axios)); - } -}, isReactComponent = (component2) => component2 != null && component2.name ? component2.prototype instanceof React.Component ? !0 : /^[A-Z]/.test(component2.name) : !1, index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - AppGlobalParamsContext, - get AppUrl() { - return AppUrl; - }, - cache: Cache, - configure, - core, - default: AppContext, - func: fn, - http, - isReactComponent, - route -}, Symbol.toStringTag, { value: "Module" })), getRoutes = () => http.get("/api/my-router").then((resp) => [ - ...resp, - { uuid: "data-list-setting", isLayout: !0, uri: "/data-list-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/DataListSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/GridLayoutFormSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ResourceApiSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ChartsSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/FsmSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/components/ff-design/ComponentSetting", extra: { layout: "@pkg/frameworks/DesignTheme" } }, - { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/Login" }, - { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/components/ff/NotFound" } -].map(({ uuid, ...item }) => [uuid, { uuid, ...item }])).then((data2) => new Map(data2)), getMenus = () => http.get("/api/my-menu"), getConfigure = () => http.get("api/init-configure"), getWidgetOperationAuth = () => http.get("/api/init-widget-operation-auth").then((resp) => resp.reduce((carry, { uuid, auth: auth2 }) => [...carry, [uuid, auth2]], [])), getPhoneNumber = (code) => http.get(`/api/user-wx-phone-number/${code}`); -export { - configure as $, - useHasOperationColumn as A, - Button as B, - useButton as C, - DataList$1 as D, - auth as E, - FFContainer as F, - GridLayout$1 as G, - GridLayoutForm$1 as H, - GridLayoutForm as I, - GridLayoutFormWidget as J, - GridLayoutFormHelper as K, - useFnRun as L, - getOptionItemByValue as M, - Iconfont as N, - getUserToken as O, - checkUserToken as P, - getUserInfo as Q, - ResWs$1 as R, - SlotContext as S, - login as T, - logout as U, - AppUrl as V, - http as W, - isReactComponent as X, - AppContext as Y, - AppGlobalParamsContext as Z, - Cache as _, - usePrevious as a, - fn as a0, - core as a1, - route as a2, - getRoutes as a3, - getMenus as a4, - getConfigure as a5, - getWidgetOperationAuth as a6, - getPhoneNumber as a7, - useStateWithCallback as b, - useDeepEqualEffect as c, - useOptions as d, - useSubscribeRequest as e, - SlotRender as f, - FFPageRender as g, - FFPopupRender as h, - getDefaultExpandRowKeys as i, - GridLayout as j, - GridLayoutWidget as k, - DataListFilter as l, - DataListToolbar as m, - DataListSider as n, - DataListFooter as o, - DataListHelper as p, - DataListContext as q, - DataListTable as r, - DataListContent as s, - DataListFramework as t, - useUpdate as u, - DataTableFramework as v, - loadDataListFieldWidget as w, - useColumnsRender as x, - useStructure as y, - useDataSource as z -}; diff --git a/dist/common/vender-CMS8SASe.js b/dist/common/vender-CMS8SASe.js deleted file mode 100644 index b142876..0000000 --- a/dist/common/vender-CMS8SASe.js +++ /dev/null @@ -1,835 +0,0 @@ -var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function getDefaultExportFromCjs(x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x; -} -var propTypes = { exports: {} }, reactIs = { exports: {} }, reactIs_production_min = {}; -/** @license React v16.13.1 - * react-is.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 hasRequiredReactIs_production_min; -function requireReactIs_production_min() { - if (hasRequiredReactIs_production_min) - return reactIs_production_min; - hasRequiredReactIs_production_min = 1; - var b = typeof Symbol == "function" && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119; - function z(a) { - if (typeof a == "object" && a !== null) { - var u = a.$$typeof; - switch (u) { - case c: - switch (a = a.type, a) { - case l: - case m: - case e: - case g: - case f: - case p: - return a; - default: - switch (a = a && a.$$typeof, a) { - case k: - case n: - case t: - case r: - case h: - return a; - default: - return u; - } - } - case d: - return u; - } - } - } - function A(a) { - return z(a) === m; - } - return reactIs_production_min.AsyncMode = l, reactIs_production_min.ConcurrentMode = m, reactIs_production_min.ContextConsumer = k, reactIs_production_min.ContextProvider = h, reactIs_production_min.Element = c, reactIs_production_min.ForwardRef = n, reactIs_production_min.Fragment = e, reactIs_production_min.Lazy = t, reactIs_production_min.Memo = r, reactIs_production_min.Portal = d, reactIs_production_min.Profiler = g, reactIs_production_min.StrictMode = f, reactIs_production_min.Suspense = p, reactIs_production_min.isAsyncMode = function(a) { - return A(a) || z(a) === l; - }, reactIs_production_min.isConcurrentMode = A, reactIs_production_min.isContextConsumer = function(a) { - return z(a) === k; - }, reactIs_production_min.isContextProvider = function(a) { - return z(a) === h; - }, reactIs_production_min.isElement = function(a) { - return typeof a == "object" && a !== null && a.$$typeof === c; - }, reactIs_production_min.isForwardRef = function(a) { - return z(a) === n; - }, reactIs_production_min.isFragment = function(a) { - return z(a) === e; - }, reactIs_production_min.isLazy = function(a) { - return z(a) === t; - }, reactIs_production_min.isMemo = function(a) { - return z(a) === r; - }, reactIs_production_min.isPortal = function(a) { - return z(a) === d; - }, reactIs_production_min.isProfiler = function(a) { - return z(a) === g; - }, reactIs_production_min.isStrictMode = function(a) { - return z(a) === f; - }, reactIs_production_min.isSuspense = function(a) { - return z(a) === p; - }, reactIs_production_min.isValidElementType = function(a) { - return typeof a == "string" || typeof a == "function" || a === e || a === m || a === g || a === f || a === p || a === q || typeof a == "object" && a !== null && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v); - }, reactIs_production_min.typeOf = z, reactIs_production_min; -} -var reactIs_development = {}; -/** @license React v16.13.1 - * react-is.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 hasRequiredReactIs_development; -function requireReactIs_development() { - return hasRequiredReactIs_development || (hasRequiredReactIs_development = 1, process.env.NODE_ENV !== "production" && function() { - var hasSymbol = typeof Symbol == "function" && Symbol.for, REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103, REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106, REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107, REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108, REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114, REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109, REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110, REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111, REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111, REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112, REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113, REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120, REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115, REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116, REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121, REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117, REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118, REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; - function isValidElementType(type) { - return typeof type == "string" || typeof type == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); - } - function typeOf(object) { - if (typeof object == "object" && object !== null) { - var $$typeof = object.$$typeof; - switch ($$typeof) { - case REACT_ELEMENT_TYPE: - var type = object.type; - switch (type) { - case REACT_ASYNC_MODE_TYPE: - case REACT_CONCURRENT_MODE_TYPE: - case REACT_FRAGMENT_TYPE: - case REACT_PROFILER_TYPE: - case REACT_STRICT_MODE_TYPE: - case REACT_SUSPENSE_TYPE: - return type; - default: - var $$typeofType = type && type.$$typeof; - switch ($$typeofType) { - case REACT_CONTEXT_TYPE: - case REACT_FORWARD_REF_TYPE: - case REACT_LAZY_TYPE: - case REACT_MEMO_TYPE: - case REACT_PROVIDER_TYPE: - return $$typeofType; - default: - return $$typeof; - } - } - case REACT_PORTAL_TYPE: - return $$typeof; - } - } - } - var AsyncMode = REACT_ASYNC_MODE_TYPE, ConcurrentMode = REACT_CONCURRENT_MODE_TYPE, ContextConsumer = REACT_CONTEXT_TYPE, ContextProvider = REACT_PROVIDER_TYPE, Element = REACT_ELEMENT_TYPE, ForwardRef = REACT_FORWARD_REF_TYPE, Fragment = REACT_FRAGMENT_TYPE, Lazy = REACT_LAZY_TYPE, Memo = REACT_MEMO_TYPE, Portal = REACT_PORTAL_TYPE, Profiler = REACT_PROFILER_TYPE, StrictMode = REACT_STRICT_MODE_TYPE, Suspense = REACT_SUSPENSE_TYPE, hasWarnedAboutDeprecatedIsAsyncMode = !1; - function isAsyncMode(object) { - return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; - } - function isConcurrentMode(object) { - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; - } - function isContextConsumer(object) { - return typeOf(object) === REACT_CONTEXT_TYPE; - } - function isContextProvider(object) { - return typeOf(object) === REACT_PROVIDER_TYPE; - } - function isElement(object) { - return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - function isForwardRef(object) { - return typeOf(object) === REACT_FORWARD_REF_TYPE; - } - function isFragment(object) { - return typeOf(object) === REACT_FRAGMENT_TYPE; - } - function isLazy(object) { - return typeOf(object) === REACT_LAZY_TYPE; - } - function isMemo(object) { - return typeOf(object) === REACT_MEMO_TYPE; - } - function isPortal(object) { - return typeOf(object) === REACT_PORTAL_TYPE; - } - function isProfiler(object) { - return typeOf(object) === REACT_PROFILER_TYPE; - } - function isStrictMode(object) { - return typeOf(object) === REACT_STRICT_MODE_TYPE; - } - function isSuspense(object) { - return typeOf(object) === REACT_SUSPENSE_TYPE; - } - reactIs_development.AsyncMode = AsyncMode, reactIs_development.ConcurrentMode = ConcurrentMode, reactIs_development.ContextConsumer = ContextConsumer, reactIs_development.ContextProvider = ContextProvider, reactIs_development.Element = Element, reactIs_development.ForwardRef = ForwardRef, reactIs_development.Fragment = Fragment, reactIs_development.Lazy = Lazy, reactIs_development.Memo = Memo, reactIs_development.Portal = Portal, reactIs_development.Profiler = Profiler, reactIs_development.StrictMode = StrictMode, reactIs_development.Suspense = Suspense, reactIs_development.isAsyncMode = isAsyncMode, reactIs_development.isConcurrentMode = isConcurrentMode, reactIs_development.isContextConsumer = isContextConsumer, reactIs_development.isContextProvider = isContextProvider, reactIs_development.isElement = isElement, reactIs_development.isForwardRef = isForwardRef, reactIs_development.isFragment = isFragment, reactIs_development.isLazy = isLazy, reactIs_development.isMemo = isMemo, reactIs_development.isPortal = isPortal, reactIs_development.isProfiler = isProfiler, reactIs_development.isStrictMode = isStrictMode, reactIs_development.isSuspense = isSuspense, reactIs_development.isValidElementType = isValidElementType, reactIs_development.typeOf = typeOf; - }()), reactIs_development; -} -var hasRequiredReactIs; -function requireReactIs() { - return hasRequiredReactIs || (hasRequiredReactIs = 1, process.env.NODE_ENV === "production" ? reactIs.exports = requireReactIs_production_min() : reactIs.exports = requireReactIs_development()), reactIs.exports; -} -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -var objectAssign, hasRequiredObjectAssign; -function requireObjectAssign() { - if (hasRequiredObjectAssign) - return objectAssign; - hasRequiredObjectAssign = 1; - var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable; - function toObject(val) { - if (val == null) - throw new TypeError("Object.assign cannot be called with null or undefined"); - return Object(val); - } - function shouldUseNative() { - try { - if (!Object.assign) - return !1; - var test1 = new String("abc"); - if (test1[5] = "de", Object.getOwnPropertyNames(test1)[0] === "5") - return !1; - for (var test2 = {}, i = 0; i < 10; i++) - test2["_" + String.fromCharCode(i)] = i; - var order2 = Object.getOwnPropertyNames(test2).map(function(n) { - return test2[n]; - }); - if (order2.join("") !== "0123456789") - return !1; - var test3 = {}; - return "abcdefghijklmnopqrst".split("").forEach(function(letter) { - test3[letter] = letter; - }), Object.keys(Object.assign({}, test3)).join("") === "abcdefghijklmnopqrst"; - } catch { - return !1; - } - } - return objectAssign = shouldUseNative() ? Object.assign : function(target, source) { - for (var from, to = toObject(target), symbols, s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - for (var key in from) - hasOwnProperty.call(from, key) && (to[key] = from[key]); - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) - propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]); - } - } - return to; - }, objectAssign; -} -var ReactPropTypesSecret_1, hasRequiredReactPropTypesSecret; -function requireReactPropTypesSecret() { - if (hasRequiredReactPropTypesSecret) - return ReactPropTypesSecret_1; - hasRequiredReactPropTypesSecret = 1; - var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; - return ReactPropTypesSecret_1 = ReactPropTypesSecret, ReactPropTypesSecret_1; -} -var has, hasRequiredHas; -function requireHas() { - return hasRequiredHas || (hasRequiredHas = 1, has = Function.call.bind(Object.prototype.hasOwnProperty)), has; -} -var checkPropTypes_1, hasRequiredCheckPropTypes; -function requireCheckPropTypes() { - if (hasRequiredCheckPropTypes) - return checkPropTypes_1; - hasRequiredCheckPropTypes = 1; - var printWarning = function() { - }; - if (process.env.NODE_ENV !== "production") { - var ReactPropTypesSecret = requireReactPropTypesSecret(), loggedTypeFailures = {}, has2 = requireHas(); - printWarning = function(text) { - var message = "Warning: " + text; - typeof console < "u" && console.error(message); - try { - throw new Error(message); - } catch { - } - }; - } - function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (process.env.NODE_ENV !== "production") { - for (var typeSpecName in typeSpecs) - if (has2(typeSpecs, typeSpecName)) { - var error; - try { - if (typeof typeSpecs[typeSpecName] != "function") { - var err = Error( - (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." - ); - throw err.name = "Invariant Violation", err; - } - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - if (error && !(error instanceof Error) && printWarning( - (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." - ), error instanceof Error && !(error.message in loggedTypeFailures)) { - loggedTypeFailures[error.message] = !0; - var stack = getStack ? getStack() : ""; - printWarning( - "Failed " + location + " type: " + error.message + (stack ?? "") - ); - } - } - } - } - return checkPropTypes.resetWarningCache = function() { - process.env.NODE_ENV !== "production" && (loggedTypeFailures = {}); - }, checkPropTypes_1 = checkPropTypes, checkPropTypes_1; -} -var factoryWithTypeCheckers, hasRequiredFactoryWithTypeCheckers; -function requireFactoryWithTypeCheckers() { - if (hasRequiredFactoryWithTypeCheckers) - return factoryWithTypeCheckers; - hasRequiredFactoryWithTypeCheckers = 1; - var ReactIs = requireReactIs(), assign = requireObjectAssign(), ReactPropTypesSecret = requireReactPropTypesSecret(), has2 = requireHas(), checkPropTypes = requireCheckPropTypes(), printWarning = function() { - }; - process.env.NODE_ENV !== "production" && (printWarning = function(text) { - var message = "Warning: " + text; - typeof console < "u" && console.error(message); - try { - throw new Error(message); - } catch { - } - }); - function emptyFunctionThatReturnsNull() { - return null; - } - return factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) { - var ITERATOR_SYMBOL = typeof Symbol == "function" && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator"; - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn == "function") - return iteratorFn; - } - var ANONYMOUS = "<>", ReactPropTypes = { - array: createPrimitiveTypeChecker("array"), - bigint: createPrimitiveTypeChecker("bigint"), - bool: createPrimitiveTypeChecker("boolean"), - func: createPrimitiveTypeChecker("function"), - number: createPrimitiveTypeChecker("number"), - object: createPrimitiveTypeChecker("object"), - string: createPrimitiveTypeChecker("string"), - symbol: createPrimitiveTypeChecker("symbol"), - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - elementType: createElementTypeTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker, - exact: createStrictShapeTypeChecker - }; - function is(x, y) { - return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y; - } - function PropTypeError(message, data) { - this.message = message, this.data = data && typeof data == "object" ? data : {}, this.stack = ""; - } - PropTypeError.prototype = Error.prototype; - function createChainableTypeChecker(validate) { - if (process.env.NODE_ENV !== "production") - var manualPropTypeCallCache = {}, manualPropTypeWarningCount = 0; - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - if (componentName = componentName || ANONYMOUS, propFullName = propFullName || propName, secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - var err = new Error( - "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" - ); - throw err.name = "Invariant Violation", err; - } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { - var cacheKey = componentName + ":" + propName; - !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3 && (printWarning( - "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." - ), manualPropTypeCallCache[cacheKey] = !0, manualPropTypeWarningCount++); - } - } - return props[propName] == null ? isRequired ? props[propName] === null ? new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")) : new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")) : null : validate(props, propName, componentName, location, propFullName); - } - var chainedCheckType = checkType.bind(null, !1); - return chainedCheckType.isRequired = checkType.bind(null, !0), chainedCheckType; - } - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName], propType = getPropType(propValue); - if (propType !== expectedType) { - var preciseType = getPreciseType(propValue); - return new PropTypeError( - "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), - { expectedType } - ); - } - return null; - } - return createChainableTypeChecker(validate); - } - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunctionThatReturnsNull); - } - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker != "function") - return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); - if (error instanceof Error) - return error; - } - return null; - } - return createChainableTypeChecker(validate); - } - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); - } - return null; - } - return createChainableTypeChecker(validate); - } - function createElementTypeTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!ReactIs.isValidElementType(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); - } - return null; - } - return createChainableTypeChecker(validate); - } - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS, actualClassName = getClassName(props[propName]); - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); - } - return null; - } - return createChainableTypeChecker(validate); - } - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) - return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? printWarning( - "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." - ) : printWarning("Invalid argument supplied to oneOf, expected an array.")), emptyFunctionThatReturnsNull; - function validate(props, propName, componentName, location, propFullName) { - for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) - if (is(propValue, expectedValues[i])) - return null; - var valuesString = JSON.stringify(expectedValues, function(key, value) { - var type = getPreciseType(value); - return type === "symbol" ? String(value) : value; - }); - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); - } - return createChainableTypeChecker(validate); - } - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker != "function") - return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); - var propValue = props[propName], propType = getPropType(propValue); - if (propType !== "object") - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); - for (var key in propValue) - if (has2(propValue, key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); - if (error instanceof Error) - return error; - } - return null; - } - return createChainableTypeChecker(validate); - } - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) - return process.env.NODE_ENV !== "production" && printWarning("Invalid argument supplied to oneOfType, expected an instance of array."), emptyFunctionThatReturnsNull; - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (typeof checker != "function") - return printWarning( - "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "." - ), emptyFunctionThatReturnsNull; - } - function validate(props, propName, componentName, location, propFullName) { - for (var expectedTypes = [], i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) { - var checker2 = arrayOfTypeCheckers[i2], checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret); - if (checkerResult == null) - return null; - checkerResult.data && has2(checkerResult.data, "expectedType") && expectedTypes.push(checkerResult.data.expectedType); - } - var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; - return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); - } - return createChainableTypeChecker(validate); - } - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - return isNode(props[propName]) ? null : new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); - } - return createChainableTypeChecker(validate); - } - function invalidValidatorError(componentName, location, propFullName, key, type) { - return new PropTypeError( - (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`." - ); - } - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName], propType = getPropType(propValue); - if (propType !== "object") - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (typeof checker != "function") - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); - if (error) - return error; - } - return null; - } - return createChainableTypeChecker(validate); - } - function createStrictShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName], propType = getPropType(propValue); - if (propType !== "object") - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); - var allKeys = assign({}, props[propName], shapeTypes); - for (var key in allKeys) { - var checker = shapeTypes[key]; - if (has2(shapeTypes, key) && typeof checker != "function") - return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); - if (!checker) - return new PropTypeError( - "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + ` -Valid keys: ` + JSON.stringify(Object.keys(shapeTypes), null, " ") - ); - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); - if (error) - return error; - } - return null; - } - return createChainableTypeChecker(validate); - } - function isNode(propValue) { - switch (typeof propValue) { - case "number": - case "string": - case "undefined": - return !0; - case "boolean": - return !propValue; - case "object": - if (Array.isArray(propValue)) - return propValue.every(isNode); - if (propValue === null || isValidElement(propValue)) - return !0; - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue), step; - if (iteratorFn !== propValue.entries) { - for (; !(step = iterator.next()).done; ) - if (!isNode(step.value)) - return !1; - } else - for (; !(step = iterator.next()).done; ) { - var entry = step.value; - if (entry && !isNode(entry[1])) - return !1; - } - } else - return !1; - return !0; - default: - return !1; - } - } - function isSymbol(propType, propValue) { - return propType === "symbol" ? !0 : propValue ? propValue["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && propValue instanceof Symbol : !1; - } - function getPropType(propValue) { - var propType = typeof propValue; - return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType; - } - function getPreciseType(propValue) { - if (typeof propValue > "u" || propValue === null) - return "" + propValue; - var propType = getPropType(propValue); - if (propType === "object") { - if (propValue instanceof Date) - return "date"; - if (propValue instanceof RegExp) - return "regexp"; - } - return propType; - } - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - switch (type) { - case "array": - case "object": - return "an " + type; - case "boolean": - case "date": - case "regexp": - return "a " + type; - default: - return type; - } - } - function getClassName(propValue) { - return !propValue.constructor || !propValue.constructor.name ? ANONYMOUS : propValue.constructor.name; - } - return ReactPropTypes.checkPropTypes = checkPropTypes, ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache, ReactPropTypes.PropTypes = ReactPropTypes, ReactPropTypes; - }, factoryWithTypeCheckers; -} -var factoryWithThrowingShims, hasRequiredFactoryWithThrowingShims; -function requireFactoryWithThrowingShims() { - if (hasRequiredFactoryWithThrowingShims) - return factoryWithThrowingShims; - hasRequiredFactoryWithThrowingShims = 1; - var ReactPropTypesSecret = requireReactPropTypesSecret(); - function emptyFunction() { - } - function emptyFunctionWithReset() { - } - return emptyFunctionWithReset.resetWarningCache = emptyFunction, factoryWithThrowingShims = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret !== ReactPropTypesSecret) { - var err = new Error( - "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" - ); - throw err.name = "Invariant Violation", err; - } - } - shim.isRequired = shim; - function getShim() { - return shim; - } - var ReactPropTypes = { - array: shim, - bigint: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - any: shim, - arrayOf: getShim, - element: shim, - elementType: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim, - exact: getShim, - checkPropTypes: emptyFunctionWithReset, - resetWarningCache: emptyFunction - }; - return ReactPropTypes.PropTypes = ReactPropTypes, ReactPropTypes; - }, factoryWithThrowingShims; -} -if (process.env.NODE_ENV !== "production") { - var ReactIs = requireReactIs(), throwOnDirectAccess = !0; - propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); -} else - propTypes.exports = requireFactoryWithThrowingShims()(); -var propTypesExports = propTypes.exports; -const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); -var nprogress = { exports: {} }; -/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT */ -(function(module, exports) { - (function(root, factory) { - module.exports = factory(); - })(commonjsGlobal, function() { - var NProgress2 = {}; - NProgress2.version = "0.2.0"; - var Settings = NProgress2.settings = { - minimum: 0.08, - easing: "ease", - positionUsing: "", - speed: 200, - trickle: !0, - trickleRate: 0.02, - trickleSpeed: 800, - showSpinner: !0, - barSelector: '[role="bar"]', - spinnerSelector: '[role="spinner"]', - parent: "body", - template: '
' - }; - NProgress2.configure = function(options) { - var key, value; - for (key in options) - value = options[key], value !== void 0 && options.hasOwnProperty(key) && (Settings[key] = value); - return this; - }, NProgress2.status = null, NProgress2.set = function(n) { - var started = NProgress2.isStarted(); - n = clamp(n, Settings.minimum, 1), NProgress2.status = n === 1 ? null : n; - var progress = NProgress2.render(!started), bar = progress.querySelector(Settings.barSelector), speed = Settings.speed, ease = Settings.easing; - return progress.offsetWidth, queue(function(next) { - Settings.positionUsing === "" && (Settings.positionUsing = NProgress2.getPositioningCSS()), css(bar, barPositionCSS(n, speed, ease)), n === 1 ? (css(progress, { - transition: "none", - opacity: 1 - }), progress.offsetWidth, setTimeout(function() { - css(progress, { - transition: "all " + speed + "ms linear", - opacity: 0 - }), setTimeout(function() { - NProgress2.remove(), next(); - }, speed); - }, speed)) : setTimeout(next, speed); - }), this; - }, NProgress2.isStarted = function() { - return typeof NProgress2.status == "number"; - }, NProgress2.start = function() { - NProgress2.status || NProgress2.set(0); - var work = function() { - setTimeout(function() { - NProgress2.status && (NProgress2.trickle(), work()); - }, Settings.trickleSpeed); - }; - return Settings.trickle && work(), this; - }, NProgress2.done = function(force) { - return !force && !NProgress2.status ? this : NProgress2.inc(0.3 + 0.5 * Math.random()).set(1); - }, NProgress2.inc = function(amount) { - var n = NProgress2.status; - return n ? (typeof amount != "number" && (amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95)), n = clamp(n + amount, 0, 0.994), NProgress2.set(n)) : NProgress2.start(); - }, NProgress2.trickle = function() { - return NProgress2.inc(Math.random() * Settings.trickleRate); - }, function() { - var initial = 0, current = 0; - NProgress2.promise = function($promise) { - return !$promise || $promise.state() === "resolved" ? this : (current === 0 && NProgress2.start(), initial++, current++, $promise.always(function() { - current--, current === 0 ? (initial = 0, NProgress2.done()) : NProgress2.set((initial - current) / initial); - }), this); - }; - }(), NProgress2.render = function(fromStart) { - if (NProgress2.isRendered()) - return document.getElementById("nprogress"); - addClass(document.documentElement, "nprogress-busy"); - var progress = document.createElement("div"); - progress.id = "nprogress", progress.innerHTML = Settings.template; - var bar = progress.querySelector(Settings.barSelector), perc = fromStart ? "-100" : toBarPerc(NProgress2.status || 0), parent = document.querySelector(Settings.parent), spinner; - return css(bar, { - transition: "all 0 linear", - transform: "translate3d(" + perc + "%,0,0)" - }), Settings.showSpinner || (spinner = progress.querySelector(Settings.spinnerSelector), spinner && removeElement(spinner)), parent != document.body && addClass(parent, "nprogress-custom-parent"), parent.appendChild(progress), progress; - }, NProgress2.remove = function() { - removeClass(document.documentElement, "nprogress-busy"), removeClass(document.querySelector(Settings.parent), "nprogress-custom-parent"); - var progress = document.getElementById("nprogress"); - progress && removeElement(progress); - }, NProgress2.isRendered = function() { - return !!document.getElementById("nprogress"); - }, NProgress2.getPositioningCSS = function() { - var bodyStyle = document.body.style, vendorPrefix = "WebkitTransform" in bodyStyle ? "Webkit" : "MozTransform" in bodyStyle ? "Moz" : "msTransform" in bodyStyle ? "ms" : "OTransform" in bodyStyle ? "O" : ""; - return vendorPrefix + "Perspective" in bodyStyle ? "translate3d" : vendorPrefix + "Transform" in bodyStyle ? "translate" : "margin"; - }; - function clamp(n, min, max) { - return n < min ? min : n > max ? max : n; - } - function toBarPerc(n) { - return (-1 + n) * 100; - } - function barPositionCSS(n, speed, ease) { - var barCSS; - return Settings.positionUsing === "translate3d" ? barCSS = { transform: "translate3d(" + toBarPerc(n) + "%,0,0)" } : Settings.positionUsing === "translate" ? barCSS = { transform: "translate(" + toBarPerc(n) + "%,0)" } : barCSS = { "margin-left": toBarPerc(n) + "%" }, barCSS.transition = "all " + speed + "ms " + ease, barCSS; - } - var queue = /* @__PURE__ */ function() { - var pending = []; - function next() { - var fn = pending.shift(); - fn && fn(next); - } - return function(fn) { - pending.push(fn), pending.length == 1 && next(); - }; - }(), css = /* @__PURE__ */ function() { - var cssPrefixes = ["Webkit", "O", "Moz", "ms"], cssProps = {}; - function camelCase(string) { - return string.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(match, letter) { - return letter.toUpperCase(); - }); - } - function getVendorProp(name) { - var style = document.body.style; - if (name in style) - return name; - for (var i = cssPrefixes.length, capName = name.charAt(0).toUpperCase() + name.slice(1), vendorName; i--; ) - if (vendorName = cssPrefixes[i] + capName, vendorName in style) - return vendorName; - return name; - } - function getStyleProp(name) { - return name = camelCase(name), cssProps[name] || (cssProps[name] = getVendorProp(name)); - } - function applyCss(element, prop, value) { - prop = getStyleProp(prop), element.style[prop] = value; - } - return function(element, properties) { - var args = arguments, prop, value; - if (args.length == 2) - for (prop in properties) - value = properties[prop], value !== void 0 && properties.hasOwnProperty(prop) && applyCss(element, prop, value); - else - applyCss(element, args[1], args[2]); - }; - }(); - function hasClass(element, name) { - var list = typeof element == "string" ? element : classList(element); - return list.indexOf(" " + name + " ") >= 0; - } - function addClass(element, name) { - var oldList = classList(element), newList = oldList + name; - hasClass(oldList, name) || (element.className = newList.substring(1)); - } - function removeClass(element, name) { - var oldList = classList(element), newList; - hasClass(element, name) && (newList = oldList.replace(" " + name + " ", " "), element.className = newList.substring(1, newList.length - 1)); - } - function classList(element) { - return (" " + (element.className || "") + " ").replace(/\s+/gi, " "); - } - function removeElement(element) { - element && element.parentNode && element.parentNode.removeChild(element); - } - return NProgress2; - }); -})(nprogress); -var nprogressExports = nprogress.exports; -const NProgress = /* @__PURE__ */ getDefaultExportFromCjs(nprogressExports); -export { - NProgress as N, - PropTypes as P -}; diff --git a/dist/common/vender-DDOSHWIo.js b/dist/common/vender-DDOSHWIo.js new file mode 100644 index 0000000..1fe0356 --- /dev/null +++ b/dist/common/vender-DDOSHWIo.js @@ -0,0 +1,1470 @@ +function ie(t, e) { + return function() { + return t.apply(e, arguments); + }; +} +const { toString: Te } = Object.prototype, { getPrototypeOf: Pt } = Object, nt = (ut = /* @__PURE__ */ Object.create(null), (t) => { + const e = Te.call(t); + return ut[e] || (ut[e] = e.slice(8, -1).toLowerCase()); +}); +var ut; +const k = (t) => (t = t.toLowerCase(), (e) => nt(e) === t), at = (t) => (e) => typeof e === t, { isArray: W } = Array, $ = at("undefined"), jt = k("ArrayBuffer"), Ce = at("string"), N = at("function"), kt = at("number"), Y = (t) => t !== null && typeof t == "object", Z = (t) => { + if (nt(t) !== "object") return !1; + const e = Pt(t); + return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t); +}, Pe = k("Date"), _e = k("File"), xe = k("Blob"), Ue = k("FileList"), Ne = k("URLSearchParams"), [je, ke, Be, Le] = ["ReadableStream", "Request", "Response", "Headers"].map(k); +function V(t, e, { allOwnKeys: r = !1 } = {}) { + if (t == null) return; + let n, s; + if (typeof t != "object" && (t = [t]), W(t)) for (n = 0, s = t.length; n < s; n++) e.call(null, t[n], n, t); + else { + const c = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = c.length; + let g; + for (n = 0; n < i; n++) g = c[n], e.call(null, t[g], g, t); + } +} +function Bt(t, e) { + e = e.toLowerCase(); + const r = Object.keys(t); + let n, s = r.length; + for (; s-- > 0; ) if (n = r[s], e === n.toLowerCase()) return n; + return null; +} +const ae = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !$(t) && t !== ae, Fe = (lt = typeof Uint8Array < "u" && Pt(Uint8Array), (t) => lt && t instanceof lt); +var lt; +const De = k("HTMLFormElement"), Ft = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Me = k("RegExp"), Dt = (t, e) => { + const r = Object.getOwnPropertyDescriptors(t), n = {}; + V(r, (s, c) => { + let i; + (i = e(s, c, t)) !== !1 && (n[c] = i || s); + }), Object.defineProperties(t, n); +}, ft = "abcdefghijklmnopqrstuvwxyz", Mt = "0123456789", qt = { DIGIT: Mt, ALPHA: ft, ALPHA_DIGIT: ft + ft.toUpperCase() + Mt }, qe = k("AsyncFunction"), m = { isArray: W, isArrayBuffer: jt, isBuffer: function(t) { + return t !== null && !$(t) && t.constructor !== null && !$(t.constructor) && N(t.constructor.isBuffer) && t.constructor.isBuffer(t); +}, isFormData: (t) => { + let e; + return t && (typeof FormData == "function" && t instanceof FormData || N(t.append) && ((e = nt(t)) === "formdata" || e === "object" && N(t.toString) && t.toString() === "[object FormData]")); +}, isArrayBufferView: function(t) { + let e; + return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && jt(t.buffer), e; +}, isString: Ce, isNumber: kt, isBoolean: (t) => t === !0 || t === !1, isObject: Y, isPlainObject: Z, isReadableStream: je, isRequest: ke, isResponse: Be, isHeaders: Le, isUndefined: $, isDate: Pe, isFile: _e, isBlob: xe, isRegExp: Me, isFunction: N, isStream: (t) => Y(t) && N(t.pipe), isURLSearchParams: Ne, isTypedArray: Fe, isFileList: Ue, forEach: V, merge: function t() { + const { caseless: e } = Lt(this) && this || {}, r = {}, n = (s, c) => { + const i = e && Bt(r, c) || c; + Z(r[i]) && Z(s) ? r[i] = t(r[i], s) : Z(s) ? r[i] = t({}, s) : W(s) ? r[i] = s.slice() : r[i] = s; + }; + for (let s = 0, c = arguments.length; s < c; s++) arguments[s] && V(arguments[s], n); + return r; +}, extend: (t, e, r, { allOwnKeys: n } = {}) => (V(e, (s, c) => { + r && N(s) ? t[c] = ie(s, r) : t[c] = s; +}, { allOwnKeys: n }), t), trim: (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), stripBOM: (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits: (t, e, r, n) => { + t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), r && Object.assign(t.prototype, r); +}, toFlatObject: (t, e, r, n) => { + let s, c, i; + const g = {}; + if (e = e || {}, t == null) return e; + do { + for (s = Object.getOwnPropertyNames(t), c = s.length; c-- > 0; ) i = s[c], n && !n(i, t, e) || g[i] || (e[i] = t[i], g[i] = !0); + t = r !== !1 && Pt(t); + } while (t && (!r || r(t, e)) && t !== Object.prototype); + return e; +}, kindOf: nt, kindOfTest: k, endsWith: (t, e, r) => { + t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length; + const n = t.indexOf(e, r); + return n !== -1 && n === r; +}, toArray: (t) => { + if (!t) return null; + if (W(t)) return t; + let e = t.length; + if (!kt(e)) return null; + const r = new Array(e); + for (; e-- > 0; ) r[e] = t[e]; + return r; +}, forEachEntry: (t, e) => { + const r = (t && t[Symbol.iterator]).call(t); + let n; + for (; (n = r.next()) && !n.done; ) { + const s = n.value; + e.call(t, s[0], s[1]); + } +}, matchAll: (t, e) => { + let r; + const n = []; + for (; (r = t.exec(e)) !== null; ) n.push(r); + return n; +}, isHTMLForm: De, hasOwnProperty: Ft, hasOwnProp: Ft, reduceDescriptors: Dt, freezeMethods: (t) => { + Dt(t, (e, r) => { + if (N(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1) return !1; + const n = t[r]; + N(n) && (e.enumerable = !1, "writable" in e ? e.writable = !1 : e.set || (e.set = () => { + throw Error("Can not rewrite read-only method '" + r + "'"); + })); + }); +}, toObjectSet: (t, e) => { + const r = {}, n = (s) => { + s.forEach((c) => { + r[c] = !0; + }); + }; + return W(t) ? n(t) : n(String(t).split(e)), r; +}, toCamelCase: (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, r, n) { + return r.toUpperCase() + n; +}), noop: () => { +}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: Bt, global: ae, isContextDefined: Lt, ALPHABET: qt, generateString: (t = 16, e = qt.ALPHA_DIGIT) => { + let r = ""; + const { length: n } = e; + for (; t--; ) r += e[Math.random() * n | 0]; + return r; +}, isSpecCompliantForm: function(t) { + return !!(t && N(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]); +}, toJSONObject: (t) => { + const e = new Array(10), r = (n, s) => { + if (Y(n)) { + if (e.indexOf(n) >= 0) return; + if (!("toJSON" in n)) { + e[s] = n; + const c = W(n) ? [] : {}; + return V(n, (i, g) => { + const y = r(i, s + 1); + !$(y) && (c[g] = y); + }), e[s] = void 0, c; + } + } + return n; + }; + return r(t, 0); +}, isAsyncFn: qe, isThenable: (t) => t && (Y(t) || N(t)) && N(t.then) && N(t.catch) }; +function A(t, e, r, n, s) { + Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), s && (this.response = s); +} +m.inherits(A, Error, { toJSON: function() { + return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: m.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; +} }); +const It = A.prototype, Wt = {}; +["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach((t) => { + Wt[t] = { value: t }; +}), Object.defineProperties(A, Wt), Object.defineProperty(It, "isAxiosError", { value: !0 }), A.from = (t, e, r, n, s, c) => { + const i = Object.create(It); + return m.toFlatObject(t, i, function(g) { + return g !== Error.prototype; + }, (g) => g !== "isAxiosError"), A.call(i, t.message, e, r, n, s), i.cause = t, i.name = t.name, c && Object.assign(i, c), i; +}; +function ht(t) { + return m.isPlainObject(t) || m.isArray(t); +} +function ce(t) { + return m.endsWith(t, "[]") ? t.slice(0, -2) : t; +} +function zt(t, e, r) { + return t ? t.concat(e).map(function(n, s) { + return n = ce(n), !r && s ? "[" + n + "]" : n; + }).join(r ? "." : "") : e; +} +const Ie = m.toFlatObject(m, {}, null, function(t) { + return /^is[A-Z]/.test(t); +}); +function ot(t, e, r) { + if (!m.isObject(t)) throw new TypeError("target must be an object"); + e = e || new FormData(); + const n = (r = m.toFlatObject(r, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(v, E) { + return !m.isUndefined(E[v]); + })).metaTokens, s = r.visitor || p, c = r.dots, i = r.indexes, g = (r.Blob || typeof Blob < "u" && Blob) && m.isSpecCompliantForm(e); + if (!m.isFunction(s)) throw new TypeError("visitor must be a function"); + function y(v) { + if (v === null) return ""; + if (m.isDate(v)) return v.toISOString(); + if (!g && m.isBlob(v)) throw new A("Blob is not supported. Use a Buffer instead."); + return m.isArrayBuffer(v) || m.isTypedArray(v) ? g && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v; + } + function p(v, E, h) { + let l = v; + if (v && !h && typeof v == "object") { + if (m.endsWith(E, "{}")) E = n ? E : E.slice(0, -2), v = JSON.stringify(v); + else if (m.isArray(v) && function(o) { + return m.isArray(o) && !o.some(ht); + }(v) || (m.isFileList(v) || m.endsWith(E, "[]")) && (l = m.toArray(v))) return E = ce(E), l.forEach(function(o, a) { + !m.isUndefined(o) && o !== null && e.append(i === !0 ? zt([E], a, c) : i === null ? E : E + "[]", y(o)); + }), !1; + } + return !!ht(v) || (e.append(zt(h, E, c), y(v)), !1); + } + const b = [], w = Object.assign(Ie, { defaultVisitor: p, convertValue: y, isVisitable: ht }); + if (!m.isObject(t)) throw new TypeError("data must be an object"); + return function v(E, h) { + if (!m.isUndefined(E)) { + if (b.indexOf(E) !== -1) throw Error("Circular reference detected in " + h.join(".")); + b.push(E), m.forEach(E, function(l, o) { + (!(m.isUndefined(l) || l === null) && s.call(e, l, m.isString(o) ? o.trim() : o, h, w)) === !0 && v(l, h ? h.concat(o) : [o]); + }), b.pop(); + } + }(t), e; +} +function Ht(t) { + const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; + return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) { + return e[r]; + }); +} +function _t(t, e) { + this._pairs = [], t && ot(t, this, e); +} +const Jt = _t.prototype; +function We(t) { + return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); +} +function ue(t, e, r) { + if (!e) return t; + const n = r && r.encode || We, s = r && r.serialize; + let c; + if (c = s ? s(e, r) : m.isURLSearchParams(e) ? e.toString() : new _t(e, r).toString(n), c) { + const i = t.indexOf("#"); + i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + c; + } + return t; +} +Jt.append = function(t, e) { + this._pairs.push([t, e]); +}, Jt.toString = function(t) { + const e = t ? function(r) { + return t.call(this, r, Ht); + } : Ht; + return this._pairs.map(function(r) { + return e(r[0]) + "=" + e(r[1]); + }, "").join("&"); +}; +class $t { + constructor() { + this.handlers = []; + } + use(e, r, n) { + return this.handlers.push({ fulfilled: e, rejected: r, synchronous: !!n && n.synchronous, runWhen: n ? n.runWhen : null }), this.handlers.length - 1; + } + eject(e) { + this.handlers[e] && (this.handlers[e] = null); + } + clear() { + this.handlers && (this.handlers = []); + } + forEach(e) { + m.forEach(this.handlers, function(r) { + r !== null && e(r); + }); + } +} +const le = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, ze = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : _t, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, xt = typeof window < "u" && typeof document < "u", He = (Vt = typeof navigator < "u" && navigator.product, xt && ["ReactNative", "NativeScript", "NS"].indexOf(Vt) < 0); +var Vt; +const Je = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $e = xt && window.location.href || "http://localhost", j = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: xt, hasStandardBrowserEnv: He, hasStandardBrowserWebWorkerEnv: Je, origin: $e }, Symbol.toStringTag, { value: "Module" })), ...ze }; +function fe(t) { + function e(r, n, s, c) { + let i = r[c++]; + if (i === "__proto__") return !0; + const g = Number.isFinite(+i), y = c >= r.length; + return i = !i && m.isArray(s) ? s.length : i, y ? (m.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !g) : (s[i] && m.isObject(s[i]) || (s[i] = []), e(r, n, s[i], c) && m.isArray(s[i]) && (s[i] = function(p) { + const b = {}, w = Object.keys(p); + let v; + const E = w.length; + let h; + for (v = 0; v < E; v++) h = w[v], b[h] = p[h]; + return b; + }(s[i])), !g); + } + if (m.isFormData(t) && m.isFunction(t.entries)) { + const r = {}; + return m.forEachEntry(t, (n, s) => { + e(function(c) { + return m.matchAll(/\w+|\[(\w*)]/g, c).map((i) => i[0] === "[]" ? "" : i[1] || i[0]); + }(n), s, r, 0); + }), r; + } + return null; +} +const Q = { transitional: le, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) { + const r = e.getContentType() || "", n = r.indexOf("application/json") > -1, s = m.isObject(t); + if (s && m.isHTMLForm(t) && (t = new FormData(t)), m.isFormData(t)) return n ? JSON.stringify(fe(t)) : t; + if (m.isArrayBuffer(t) || m.isBuffer(t) || m.isStream(t) || m.isFile(t) || m.isBlob(t) || m.isReadableStream(t)) return t; + if (m.isArrayBufferView(t)) return t.buffer; + if (m.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); + let c; + if (s) { + if (r.indexOf("application/x-www-form-urlencoded") > -1) return function(i, g) { + return ot(i, new j.classes.URLSearchParams(), Object.assign({ visitor: function(y, p, b, w) { + return j.isNode && m.isBuffer(y) ? (this.append(p, y.toString("base64")), !1) : w.defaultVisitor.apply(this, arguments); + } }, g)); + }(t, this.formSerializer).toString(); + if ((c = m.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { + const i = this.env && this.env.FormData; + return ot(c ? { "files[]": t } : t, i && new i(), this.formSerializer); + } + } + return s || n ? (e.setContentType("application/json", !1), function(i, g, y) { + if (m.isString(i)) try { + return (g || JSON.parse)(i), m.trim(i); + } catch (p) { + if (p.name !== "SyntaxError") throw p; + } + return (y || JSON.stringify)(i); + }(t)) : t; +}], transformResponse: [function(t) { + const e = this.transitional || Q.transitional, r = e && e.forcedJSONParsing, n = this.responseType === "json"; + if (m.isResponse(t) || m.isReadableStream(t)) return t; + if (t && m.isString(t) && (r && !this.responseType || n)) { + const s = !(e && e.silentJSONParsing) && n; + try { + return JSON.parse(t); + } catch (c) { + if (s) + throw c.name === "SyntaxError" ? A.from(c, A.ERR_BAD_RESPONSE, this, null, this.response) : c; + } + } + return t; +}], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: j.classes.FormData, Blob: j.classes.Blob }, validateStatus: function(t) { + return t >= 200 && t < 300; +}, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; +m.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => { + Q.headers[t] = {}; +}); +const Ve = m.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), Kt = Symbol("internals"); +function J(t) { + return t && String(t).trim().toLowerCase(); +} +function tt(t) { + return t === !1 || t == null ? t : m.isArray(t) ? t.map(tt) : String(t); +} +function dt(t, e, r, n, s) { + return m.isFunction(n) ? n.call(this, e, r) : (s && (e = r), m.isString(e) ? m.isString(n) ? e.indexOf(n) !== -1 : m.isRegExp(n) ? n.test(e) : void 0 : void 0); +} +class x { + constructor(e) { + e && this.set(e); + } + set(e, r, n) { + const s = this; + function c(g, y, p) { + const b = J(y); + if (!b) throw new Error("header name must be a non-empty string"); + const w = m.findKey(s, b); + (!w || s[w] === void 0 || p === !0 || p === void 0 && s[w] !== !1) && (s[w || y] = tt(g)); + } + const i = (g, y) => m.forEach(g, (p, b) => c(p, b, y)); + if (m.isPlainObject(e) || e instanceof this.constructor) i(e, r); + else if (m.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) i(((g) => { + const y = {}; + let p, b, w; + return g && g.split(` +`).forEach(function(v) { + w = v.indexOf(":"), p = v.substring(0, w).trim().toLowerCase(), b = v.substring(w + 1).trim(), !p || y[p] && Ve[p] || (p === "set-cookie" ? y[p] ? y[p].push(b) : y[p] = [b] : y[p] = y[p] ? y[p] + ", " + b : b); + }), y; + })(e), r); + else if (m.isHeaders(e)) for (const [g, y] of e.entries()) c(y, g, n); + else e != null && c(r, e, n); + return this; + } + get(e, r) { + if (e = J(e)) { + const n = m.findKey(this, e); + if (n) { + const s = this[n]; + if (!r) return s; + if (r === !0) return function(c) { + const i = /* @__PURE__ */ Object.create(null), g = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let y; + for (; y = g.exec(c); ) i[y[1]] = y[2]; + return i; + }(s); + if (m.isFunction(r)) return r.call(this, s, n); + if (m.isRegExp(r)) return r.exec(s); + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(e, r) { + if (e = J(e)) { + const n = m.findKey(this, e); + return !(!n || this[n] === void 0 || r && !dt(0, this[n], n, r)); + } + return !1; + } + delete(e, r) { + const n = this; + let s = !1; + function c(i) { + if (i = J(i)) { + const g = m.findKey(n, i); + !g || r && !dt(0, n[g], g, r) || (delete n[g], s = !0); + } + } + return m.isArray(e) ? e.forEach(c) : c(e), s; + } + clear(e) { + const r = Object.keys(this); + let n = r.length, s = !1; + for (; n--; ) { + const c = r[n]; + e && !dt(0, this[c], c, e, !0) || (delete this[c], s = !0); + } + return s; + } + normalize(e) { + const r = this, n = {}; + return m.forEach(this, (s, c) => { + const i = m.findKey(n, c); + if (i) return r[i] = tt(s), void delete r[c]; + const g = e ? function(y) { + return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (p, b, w) => b.toUpperCase() + w); + }(c) : String(c).trim(); + g !== c && delete r[c], r[g] = tt(s), n[g] = !0; + }), this; + } + concat(...e) { + return this.constructor.concat(this, ...e); + } + toJSON(e) { + const r = /* @__PURE__ */ Object.create(null); + return m.forEach(this, (n, s) => { + n != null && n !== !1 && (r[s] = e && m.isArray(n) ? n.join(", ") : n); + }), r; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(` +`); + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(e) { + return e instanceof this ? e : new this(e); + } + static concat(e, ...r) { + const n = new this(e); + return r.forEach((s) => n.set(s)), n; + } + static accessor(e) { + const r = (this[Kt] = this[Kt] = { accessors: {} }).accessors, n = this.prototype; + function s(c) { + const i = J(c); + r[i] || (function(g, y) { + const p = m.toCamelCase(" " + y); + ["get", "set", "has"].forEach((b) => { + Object.defineProperty(g, b + p, { value: function(w, v, E) { + return this[b].call(this, y, w, v, E); + }, configurable: !0 }); + }); + }(n, c), r[i] = !0); + } + return m.isArray(e) ? e.forEach(s) : s(e), this; + } +} +function pt(t, e) { + const r = this || Q, n = e || r, s = x.from(n.headers); + let c = n.data; + return m.forEach(t, function(i) { + c = i.call(r, c, s.normalize(), e ? e.status : void 0); + }), s.normalize(), c; +} +function he(t) { + return !(!t || !t.__CANCEL__); +} +function H(t, e, r) { + A.call(this, t ?? "canceled", A.ERR_CANCELED, e, r), this.name = "CanceledError"; +} +function de(t, e, r) { + const n = r.config.validateStatus; + r.status && n && !n(r.status) ? e(new A("Request failed with status code " + r.status, [A.ERR_BAD_REQUEST, A.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r); +} +x.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), m.reduceDescriptors(x.prototype, ({ value: t }, e) => { + let r = e[0].toUpperCase() + e.slice(1); + return { get: () => t, set(n) { + this[r] = n; + } }; +}), m.freezeMethods(x), m.inherits(H, A, { __CANCEL__: !0 }); +const st = (t, e, r = 3) => { + let n = 0; + const s = function(c, i) { + c = c || 10; + const g = new Array(c), y = new Array(c); + let p, b = 0, w = 0; + return i = i !== void 0 ? i : 1e3, function(v) { + const E = Date.now(), h = y[w]; + p || (p = E), g[b] = v, y[b] = E; + let l = w, o = 0; + for (; l !== b; ) o += g[l++], l %= c; + if (b = (b + 1) % c, b === w && (w = (w + 1) % c), E - p < i) return; + const a = h && E - h; + return a ? Math.round(1e3 * o / a) : void 0; + }; + }(50, 250); + return function(c, i) { + let g = 0; + const y = 1e3 / i; + let p = null; + return function() { + const b = this === !0, w = Date.now(); + if (b || w - g > y) return p && (clearTimeout(p), p = null), g = w, c.apply(null, arguments); + p || (p = setTimeout(() => (p = null, g = Date.now(), c.apply(null, arguments)), y - (w - g))); + }; + }((c) => { + const i = c.loaded, g = c.lengthComputable ? c.total : void 0, y = i - n, p = s(y); + n = i; + const b = { loaded: i, total: g, progress: g ? i / g : void 0, bytes: y, rate: p || void 0, estimated: p && g && i <= g ? (g - i) / p : void 0, event: c, lengthComputable: g != null }; + b[e ? "download" : "upload"] = !0, t(b); + }, r); +}, Ke = j.hasStandardBrowserEnv ? function() { + const t = /(msie|trident)/i.test(navigator.userAgent), e = document.createElement("a"); + let r; + function n(s) { + let c = s; + return t && (e.setAttribute("href", c), c = e.href), e.setAttribute("href", c), { href: e.href, protocol: e.protocol ? e.protocol.replace(/:$/, "") : "", host: e.host, search: e.search ? e.search.replace(/^\?/, "") : "", hash: e.hash ? e.hash.replace(/^#/, "") : "", hostname: e.hostname, port: e.port, pathname: e.pathname.charAt(0) === "/" ? e.pathname : "/" + e.pathname }; + } + return r = n(window.location.href), function(s) { + const c = m.isString(s) ? n(s) : s; + return c.protocol === r.protocol && c.host === r.host; + }; +}() : function() { + return !0; +}, Ge = j.hasStandardBrowserEnv ? { write(t, e, r, n, s, c) { + const i = [t + "=" + encodeURIComponent(e)]; + m.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), m.isString(n) && i.push("path=" + n), m.isString(s) && i.push("domain=" + s), c === !0 && i.push("secure"), document.cookie = i.join("; "); +}, read(t) { + const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)")); + return e ? decodeURIComponent(e[3]) : null; +}, remove(t) { + this.write(t, "", Date.now() - 864e5); +} } : { write() { +}, read: () => null, remove() { +} }; +function pe(t, e) { + return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(r, n) { + return n ? r.replace(/\/?\/$/, "") + "/" + n.replace(/^\/+/, "") : r; + }(t, e) : e; +} +const Gt = (t) => t instanceof x ? { ...t } : t; +function I(t, e) { + e = e || {}; + const r = {}; + function n(p, b, w) { + return m.isPlainObject(p) && m.isPlainObject(b) ? m.merge.call({ caseless: w }, p, b) : m.isPlainObject(b) ? m.merge({}, b) : m.isArray(b) ? b.slice() : b; + } + function s(p, b, w) { + return m.isUndefined(b) ? m.isUndefined(p) ? void 0 : n(void 0, p, w) : n(p, b, w); + } + function c(p, b) { + if (!m.isUndefined(b)) return n(void 0, b); + } + function i(p, b) { + return m.isUndefined(b) ? m.isUndefined(p) ? void 0 : n(void 0, p) : n(void 0, b); + } + function g(p, b, w) { + return w in e ? n(p, b) : w in t ? n(void 0, p) : void 0; + } + const y = { url: c, method: c, data: c, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: g, headers: (p, b) => s(Gt(p), Gt(b), !0) }; + return m.forEach(Object.keys(Object.assign({}, t, e)), function(p) { + const b = y[p] || s, w = b(t[p], e[p], p); + m.isUndefined(w) && b !== g || (r[p] = w); + }), r; +} +const ge = (t) => { + const e = I({}, t); + let r, { data: n, withXSRFToken: s, xsrfHeaderName: c, xsrfCookieName: i, headers: g, auth: y } = e; + if (e.headers = g = x.from(g), e.url = ue(pe(e.baseURL, e.url), t.params, t.paramsSerializer), y && g.set("Authorization", "Basic " + btoa((y.username || "") + ":" + (y.password ? unescape(encodeURIComponent(y.password)) : ""))), m.isFormData(n)) { + if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv) g.setContentType(void 0); + else if ((r = g.getContentType()) !== !1) { + const [p, ...b] = r ? r.split(";").map((w) => w.trim()).filter(Boolean) : []; + g.setContentType([p || "multipart/form-data", ...b].join("; ")); + } + } + if (j.hasStandardBrowserEnv && (s && m.isFunction(s) && (s = s(e)), s || s !== !1 && Ke(e.url))) { + const p = c && i && Ge.read(i); + p && g.set(c, p); + } + return e; +}, Xe = typeof XMLHttpRequest < "u" && function(t) { + return new Promise(function(e, r) { + const n = ge(t); + let s = n.data; + const c = x.from(n.headers).normalize(); + let i, { responseType: g } = n; + function y() { + n.cancelToken && n.cancelToken.unsubscribe(i), n.signal && n.signal.removeEventListener("abort", i); + } + let p = new XMLHttpRequest(); + function b() { + if (!p) return; + const v = x.from("getAllResponseHeaders" in p && p.getAllResponseHeaders()); + de(function(E) { + e(E), y(); + }, function(E) { + r(E), y(); + }, { data: g && g !== "text" && g !== "json" ? p.response : p.responseText, status: p.status, statusText: p.statusText, headers: v, config: t, request: p }), p = null; + } + p.open(n.method.toUpperCase(), n.url, !0), p.timeout = n.timeout, "onloadend" in p ? p.onloadend = b : p.onreadystatechange = function() { + p && p.readyState === 4 && (p.status !== 0 || p.responseURL && p.responseURL.indexOf("file:") === 0) && setTimeout(b); + }, p.onabort = function() { + p && (r(new A("Request aborted", A.ECONNABORTED, n, p)), p = null); + }, p.onerror = function() { + r(new A("Network Error", A.ERR_NETWORK, n, p)), p = null; + }, p.ontimeout = function() { + let v = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded"; + const E = n.transitional || le; + n.timeoutErrorMessage && (v = n.timeoutErrorMessage), r(new A(v, E.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED, n, p)), p = null; + }, s === void 0 && c.setContentType(null), "setRequestHeader" in p && m.forEach(c.toJSON(), function(v, E) { + p.setRequestHeader(E, v); + }), m.isUndefined(n.withCredentials) || (p.withCredentials = !!n.withCredentials), g && g !== "json" && (p.responseType = n.responseType), typeof n.onDownloadProgress == "function" && p.addEventListener("progress", st(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && p.upload && p.upload.addEventListener("progress", st(n.onUploadProgress)), (n.cancelToken || n.signal) && (i = (v) => { + p && (r(!v || v.type ? new H(null, t, p) : v), p.abort(), p = null); + }, n.cancelToken && n.cancelToken.subscribe(i), n.signal && (n.signal.aborted ? i() : n.signal.addEventListener("abort", i))); + const w = function(v) { + const E = /^([-+\w]{1,25})(:?\/\/|:)/.exec(v); + return E && E[1] || ""; + }(n.url); + w && j.protocols.indexOf(w) === -1 ? r(new A("Unsupported protocol " + w + ":", A.ERR_BAD_REQUEST, t)) : p.send(s || null); + }); +}, Qe = (t, e) => { + let r, n = new AbortController(); + const s = function(y) { + if (!r) { + r = !0, i(); + const p = y instanceof Error ? y : this.reason; + n.abort(p instanceof A ? p : new H(p instanceof Error ? p.message : p)); + } + }; + let c = e && setTimeout(() => { + s(new A(`timeout ${e} of ms exceeded`, A.ETIMEDOUT)); + }, e); + const i = () => { + t && (c && clearTimeout(c), c = null, t.forEach((y) => { + y && (y.removeEventListener ? y.removeEventListener("abort", s) : y.unsubscribe(s)); + }), t = null); + }; + t.forEach((y) => y && y.addEventListener && y.addEventListener("abort", s)); + const { signal: g } = n; + return g.unsubscribe = i, [g, () => { + c && clearTimeout(c), c = null; + }]; +}, Ye = function* (t, e) { + let r = t.byteLength; + if (!e || r < e) return void (yield t); + let n, s = 0; + for (; s < r; ) n = s + e, yield t.slice(s, n), s = n; +}, Xt = (t, e, r, n, s) => { + const c = async function* (g, y, p) { + for await (const b of g) yield* Ye(ArrayBuffer.isView(b) ? b : await p(String(b)), y); + }(t, e, s); + let i = 0; + return new ReadableStream({ type: "bytes", async pull(g) { + const { done: y, value: p } = await c.next(); + if (y) return g.close(), void n(); + let b = p.byteLength; + r && r(i += b), g.enqueue(new Uint8Array(p)); + }, cancel: (g) => (n(g), c.return()) }, { highWaterMark: 2 }); +}, Qt = (t, e) => { + const r = t != null; + return (n) => setTimeout(() => e({ lengthComputable: r, total: t, loaded: n })); +}, ct = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", me = ct && typeof ReadableStream == "function", yt = ct && (typeof TextEncoder == "function" ? (Yt = new TextEncoder(), (t) => Yt.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())); +var Yt; +const Ze = me && (() => { + let t = !1; + const e = new Request(j.origin, { body: new ReadableStream(), method: "POST", get duplex() { + return t = !0, "half"; + } }).headers.has("Content-Type"); + return t && !e; +})(), bt = me && !!(() => { + try { + return m.isReadableStream(new Response("").body); + } catch { + } +})(), it = { stream: bt && ((t) => t.body) }; +var Zt; +ct && (Zt = new Response(), ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { + !it[t] && (it[t] = m.isFunction(Zt[t]) ? (e) => e[t]() : (e, r) => { + throw new A(`Response type '${t}' is not supported`, A.ERR_NOT_SUPPORT, r); + }); +})); +const tr = async (t, e) => { + const r = m.toFiniteNumber(t.getContentLength()); + return r ?? (async (n) => n == null ? 0 : m.isBlob(n) ? n.size : m.isSpecCompliantForm(n) ? (await new Request(n).arrayBuffer()).byteLength : m.isArrayBufferView(n) ? n.byteLength : (m.isURLSearchParams(n) && (n += ""), m.isString(n) ? (await yt(n)).byteLength : void 0))(e); +}, ye = { http: null, xhr: Xe, fetch: ct && (async (t) => { + let { url: e, method: r, data: n, signal: s, cancelToken: c, timeout: i, onDownloadProgress: g, onUploadProgress: y, responseType: p, headers: b, withCredentials: w = "same-origin", fetchOptions: v } = ge(t); + p = p ? (p + "").toLowerCase() : "text"; + let E, h, [l, o] = s || c || i ? Qe([s, c], i) : []; + const a = () => { + !E && setTimeout(() => { + l && l.unsubscribe(); + }), E = !0; + }; + let u; + try { + if (y && Ze && r !== "get" && r !== "head" && (u = await tr(b, n)) !== 0) { + let S, T = new Request(e, { method: "POST", body: n, duplex: "half" }); + m.isFormData(n) && (S = T.headers.get("content-type")) && b.setContentType(S), T.body && (n = Xt(T.body, 65536, Qt(u, st(y)), null, yt)); + } + m.isString(w) || (w = w ? "cors" : "omit"), h = new Request(e, { ...v, signal: l, method: r.toUpperCase(), headers: b.normalize().toJSON(), body: n, duplex: "half", withCredentials: w }); + let d = await fetch(h); + const f = bt && (p === "stream" || p === "response"); + if (bt && (g || f)) { + const S = {}; + ["status", "statusText", "headers"].forEach((U) => { + S[U] = d[U]; + }); + const T = m.toFiniteNumber(d.headers.get("content-length")); + d = new Response(Xt(d.body, 65536, g && Qt(T, st(g, !0)), f && a, yt), S); + } + p = p || "text"; + let O = await it[m.findKey(it, p) || "text"](d, t); + return !f && a(), o && o(), await new Promise((S, T) => { + de(S, T, { data: O, headers: x.from(d.headers), status: d.status, statusText: d.statusText, config: t, request: h }); + }); + } catch (d) { + throw a(), d && d.name === "TypeError" && /fetch/i.test(d.message) ? Object.assign(new A("Network Error", A.ERR_NETWORK, t, h), { cause: d.cause || d }) : A.from(d, d && d.code, t, h); + } +}) }; +m.forEach(ye, (t, e) => { + if (t) { + try { + Object.defineProperty(t, "name", { value: e }); + } catch { + } + Object.defineProperty(t, "adapterName", { value: e }); + } +}); +const te = (t) => `- ${t}`, er = (t) => m.isFunction(t) || t === null || t === !1, be = (t) => { + t = m.isArray(t) ? t : [t]; + const { length: e } = t; + let r, n; + const s = {}; + for (let c = 0; c < e; c++) { + let i; + if (r = t[c], n = r, !er(r) && (n = ye[(i = String(r)).toLowerCase()], n === void 0)) throw new A(`Unknown adapter '${i}'`); + if (n) break; + s[i || "#" + c] = n; + } + if (!n) { + const c = Object.entries(s).map(([i, g]) => `adapter ${i} ` + (g === !1 ? "is not supported by the environment" : "is not available in the build")); + throw new A("There is no suitable adapter to dispatch the request " + (e ? c.length > 1 ? `since : +` + c.map(te).join(` +`) : " " + te(c[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); + } + return n; +}; +function gt(t) { + if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new H(null, t); +} +function ee(t) { + return gt(t), t.headers = x.from(t.headers), t.data = pt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), be(t.adapter || Q.adapter)(t).then(function(e) { + return gt(t), e.data = pt.call(t, t.transformResponse, e), e.headers = x.from(e.headers), e; + }, function(e) { + return he(e) || (gt(t), e && e.response && (e.response.data = pt.call(t, t.transformResponse, e.response), e.response.headers = x.from(e.response.headers))), Promise.reject(e); + }); +} +const rr = "1.7.2", Ut = {}; +["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { + Ut[t] = function(r) { + return typeof r === t || "a" + (e < 1 ? "n " : " ") + t; + }; +}); +const re = {}; +Ut.transitional = function(t, e, r) { + function n(s, c) { + return "[Axios v1.7.2] Transitional option '" + s + "'" + c + (r ? ". " + r : ""); + } + return (s, c, i) => { + if (t === !1) throw new A(n(c, " has been removed" + (e ? " in " + e : "")), A.ERR_DEPRECATED); + return e && !re[c] && (re[c] = !0, console.warn(n(c, " has been deprecated since v" + e + " and will be removed in the near future"))), !t || t(s, c, i); + }; +}; +const wt = { assertOptions: function(t, e, r) { + if (typeof t != "object") throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE); + const n = Object.keys(t); + let s = n.length; + for (; s-- > 0; ) { + const c = n[s], i = e[c]; + if (i) { + const g = t[c], y = g === void 0 || i(g, c, t); + if (y !== !0) throw new A("option " + c + " must be " + y, A.ERR_BAD_OPTION_VALUE); + } else if (r !== !0) throw new A("Unknown option " + c, A.ERR_BAD_OPTION); + } +}, validators: Ut }, L = wt.validators; +class q { + constructor(e) { + this.defaults = e, this.interceptors = { request: new $t(), response: new $t() }; + } + async request(e, r) { + try { + return await this._request(e, r); + } catch (n) { + if (n instanceof Error) { + let s; + Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error(); + const c = s.stack ? s.stack.replace(/^.+\n/, "") : ""; + try { + n.stack ? c && !String(n.stack).endsWith(c.replace(/^.+\n.+\n/, "")) && (n.stack += ` +` + c) : n.stack = c; + } catch { + } + } + throw n; + } + } + _request(e, r) { + typeof e == "string" ? (r = r || {}).url = e : r = e || {}, r = I(this.defaults, r); + const { transitional: n, paramsSerializer: s, headers: c } = r; + n !== void 0 && wt.assertOptions(n, { silentJSONParsing: L.transitional(L.boolean), forcedJSONParsing: L.transitional(L.boolean), clarifyTimeoutError: L.transitional(L.boolean) }, !1), s != null && (m.isFunction(s) ? r.paramsSerializer = { serialize: s } : wt.assertOptions(s, { encode: L.function, serialize: L.function }, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase(); + let i = c && m.merge(c.common, c[r.method]); + c && m.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (h) => { + delete c[h]; + }), r.headers = x.concat(i, c); + const g = []; + let y = !0; + this.interceptors.request.forEach(function(h) { + typeof h.runWhen == "function" && h.runWhen(r) === !1 || (y = y && h.synchronous, g.unshift(h.fulfilled, h.rejected)); + }); + const p = []; + let b; + this.interceptors.response.forEach(function(h) { + p.push(h.fulfilled, h.rejected); + }); + let w, v = 0; + if (!y) { + const h = [ee.bind(this), void 0]; + for (h.unshift.apply(h, g), h.push.apply(h, p), w = h.length, b = Promise.resolve(r); v < w; ) b = b.then(h[v++], h[v++]); + return b; + } + w = g.length; + let E = r; + for (v = 0; v < w; ) { + const h = g[v++], l = g[v++]; + try { + E = h(E); + } catch (o) { + l.call(this, o); + break; + } + } + try { + b = ee.call(this, E); + } catch (h) { + return Promise.reject(h); + } + for (v = 0, w = p.length; v < w; ) b = b.then(p[v++], p[v++]); + return b; + } + getUri(e) { + return ue(pe((e = I(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer); + } +} +m.forEach(["delete", "get", "head", "options"], function(t) { + q.prototype[t] = function(e, r) { + return this.request(I(r || {}, { method: t, url: e, data: (r || {}).data })); + }; +}), m.forEach(["post", "put", "patch"], function(t) { + function e(r) { + return function(n, s, c) { + return this.request(I(c || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: n, data: s })); + }; + } + q.prototype[t] = e(), q.prototype[t + "Form"] = e(!0); +}); +class Nt { + constructor(e) { + if (typeof e != "function") throw new TypeError("executor must be a function."); + let r; + this.promise = new Promise(function(s) { + r = s; + }); + const n = this; + this.promise.then((s) => { + if (!n._listeners) return; + let c = n._listeners.length; + for (; c-- > 0; ) n._listeners[c](s); + n._listeners = null; + }), this.promise.then = (s) => { + let c; + const i = new Promise((g) => { + n.subscribe(g), c = g; + }).then(s); + return i.cancel = function() { + n.unsubscribe(c); + }, i; + }, e(function(s, c, i) { + n.reason || (n.reason = new H(s, c, i), r(n.reason)); + }); + } + throwIfRequested() { + if (this.reason) throw this.reason; + } + subscribe(e) { + this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e]; + } + unsubscribe(e) { + if (!this._listeners) return; + const r = this._listeners.indexOf(e); + r !== -1 && this._listeners.splice(r, 1); + } + static source() { + let e; + return { token: new Nt(function(r) { + e = r; + }), cancel: e }; + } +} +const vt = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; +Object.entries(vt).forEach(([t, e]) => { + vt[e] = t; +}); +const C = function t(e) { + const r = new q(e), n = ie(q.prototype.request, r); + return m.extend(n, q.prototype, r, { allOwnKeys: !0 }), m.extend(n, r, null, { allOwnKeys: !0 }), n.create = function(s) { + return t(I(e, s)); + }, n; +}(Q); +C.Axios = q, C.CanceledError = H, C.CancelToken = Nt, C.isCancel = he, C.VERSION = rr, C.toFormData = ot, C.AxiosError = A, C.Cancel = C.CanceledError, C.all = function(t) { + return Promise.all(t); +}, C.spread = function(t) { + return function(e) { + return t.apply(null, e); + }; +}, C.isAxiosError = function(t) { + return m.isObject(t) && t.isAxiosError === !0; +}, C.mergeConfig = I, C.AxiosHeaders = x, C.formToJSON = (t) => fe(m.isHTMLForm(t) ? new FormData(t) : t), C.getAdapter = be, C.HttpStatusCode = vt, C.default = C; +var nr = Object.defineProperty, P = (t, e, r) => (((n, s, c) => { + s in n ? nr(n, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : n[s] = c; +})(t, typeof e != "symbol" ? e + "" : e, r), r), we = (t, e, r) => { + if (!e.has(t)) throw TypeError("Cannot " + r); +}, R = (t, e, r) => (we(t, e, "read from private field"), r ? r.call(t) : e.get(t)), _ = (t, e, r) => { + if (e.has(t)) throw TypeError("Cannot add the same private member more than once"); + e instanceof WeakSet ? e.add(t) : e.set(t, r); +}, D = (t, e, r, n) => (we(t, e, "write to private field"), e.set(t, r), r); +function ve(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var or = function(t) { + if (t.length >= 255) throw new TypeError("Alphabet too long"); + for (var e = new Uint8Array(256), r = 0; r < e.length; r++) e[r] = 255; + for (var n = 0; n < t.length; n++) { + var s = t.charAt(n), c = s.charCodeAt(0); + if (e[c] !== 255) throw new TypeError(s + " is ambiguous"); + e[c] = n; + } + var i = t.length, g = t.charAt(0), y = Math.log(i) / Math.log(256), p = Math.log(256) / Math.log(i); + function b(w) { + if (typeof w != "string") throw new TypeError("Expected String"); + if (w.length === 0) return new Uint8Array(); + for (var v = 0, E = 0, h = 0; w[v] === g; ) E++, v++; + for (var l = (w.length - v) * y + 1 >>> 0, o = new Uint8Array(l); w[v]; ) { + var a = e[w.charCodeAt(v)]; + if (a === 255) return; + for (var u = 0, d = l - 1; (a !== 0 || u < h) && d !== -1; d--, u++) a += i * o[d] >>> 0, o[d] = a % 256 >>> 0, a = a / 256 >>> 0; + if (a !== 0) throw new Error("Non-zero carry"); + h = u, v++; + } + for (var f = l - h; f !== l && o[f] === 0; ) f++; + for (var O = new Uint8Array(E + (l - f)), S = E; f !== l; ) O[S++] = o[f++]; + return O; + } + return { encode: function(w) { + if (w instanceof Uint8Array || (ArrayBuffer.isView(w) ? w = new Uint8Array(w.buffer, w.byteOffset, w.byteLength) : Array.isArray(w) && (w = Uint8Array.from(w))), !(w instanceof Uint8Array)) throw new TypeError("Expected Uint8Array"); + if (w.length === 0) return ""; + for (var v = 0, E = 0, h = 0, l = w.length; h !== l && w[h] === 0; ) h++, v++; + for (var o = (l - h) * p + 1 >>> 0, a = new Uint8Array(o); h !== l; ) { + for (var u = w[h], d = 0, f = o - 1; (u !== 0 || d < E) && f !== -1; f--, d++) u += 256 * a[f] >>> 0, a[f] = u % i >>> 0, u = u / i >>> 0; + if (u !== 0) throw new Error("Non-zero carry"); + E = d, h++; + } + for (var O = o - E; O !== o && a[O] === 0; ) O++; + for (var S = g.repeat(v); O < o; ++O) S += t.charAt(a[O]); + return S; + }, decodeUnsafe: b, decode: function(w) { + var v = b(w); + if (v) return v; + throw new Error("Non-base" + i + " character"); + } }; +}; +const sr = ve(or); +var ne, Ee = {}; +ne = Ee, function(t, e) { + var r = e(); + for (var n in r) ne[n] = r[n]; +}(0, function() { + var t = function(c) { + return typeof c != "string" ? c : c.replace(/[\+ \|\^\%]/g, function(i) { + return { " ": "+", "+": "%2B", "|": "%7C", "^": "%5E", "%": "%25" }[i]; + }); + }, e = function(c) { + return typeof c != "string" ? c : c.replace(/\+|%2B|%7C|%5E|%25/g, function(i) { + return { "+": " ", "%2B": "+", "%7C": "|", "%5E": "^", "%25": "%" }[i]; + }); + }, r = function(c) { + return Number.prototype.toString.call(c, 36).toUpperCase(); + }, n = function(c) { + return parseInt(c, 36); + }, s = Array.prototype.indexOf || function(c, i) { + for (var g = i || 0, y = this.length; g < y; g++) if (this[g] === c) return g; + return -1; + }; + return { JSON, pack: function(c, i) { + var g = (i = i || {}).verbose || !1; + g && console.log("Normalize the JSON Object"), c = typeof c == "string" ? this.JSON.parse(c) : c, g && console.log("Creating a empty dictionary"); + var y = { strings: [], integers: [], floats: [] }; + g && console.log("Creating the AST"); + var p = function E(h) { + g && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(h)); + var l, o = typeof h; + if (h === null) return { type: "null", index: -3 }; + if (typeof h > "u") return { type: "undefined", index: -5 }; + if (h instanceof Array) { + var a = ["@"]; + for (var u in h) h.hasOwnProperty(u) && a.push(E(h[u])); + return a; + } + if (o === "object") { + for (var d in a = ["$"], h) h.hasOwnProperty(d) && (a.push(E(d)), a.push(E(h[d]))); + return a; + } + if (h === "") return { type: "empty", index: -4 }; + if (o === "string") return (l = s.call(y.strings, h)) == -1 && (y.strings.push(t(h)), l = y.strings.length - 1), { type: "strings", index: l }; + if (o === "number" && h % 1 == 0) return (l = s.call(y.integers, h)) == -1 && (y.integers.push(r(h)), l = y.integers.length - 1), { type: "integers", index: l }; + if (o === "number") return (l = s.call(y.floats, h)) == -1 && (y.floats.push(h), l = y.floats.length - 1), { type: "floats", index: l }; + if (o === "boolean") return { type: "boolean", index: h ? -1 : -2 }; + throw new Error("Unexpected argument of type " + typeof h); + }(c), b = y.strings.length, w = y.integers.length; + y.floats.length, g && console.log("Parsing the dictionary"); + var v = y.strings.join("|"); + return v += "^" + y.integers.join("|"), v += "^" + y.floats.join("|"), g && console.log("Parsing the structure"), v += "^" + function E(h) { + if (g && console.log("Calling a recursiveParser with " + this.JSON.stringify(h)), h instanceof Array) { + var l = h.shift(); + for (var o in h) h.hasOwnProperty(o) && (l += E(h[o]) + "|"); + return (l[l.length - 1] === "|" ? l.slice(0, -1) : l) + "]"; + } + var a = h.type, u = h.index; + if (a === "strings") return r(u); + if (a === "integers") return r(b + u); + if (a === "floats") return r(b + w + u); + if (a === "boolean") return h.index; + if (a === "null") return -3; + if (a === "undefined") return -5; + if (a === "empty") return -4; + throw new TypeError("The item is alien!"); + }(p), g && console.log("Ending parser"), i.debug ? { dictionary: y, ast: p, packed: v } : v; + }, unpack: function(c, i) { + i = i || {}; + var g = c.split("^"); + i.verbose && console.log("Building dictionary"); + var y = [], p = g[0]; + if (p !== "") { + p = p.split("|"), i.verbose && console.log("Parse the strings dictionary"); + for (var b = 0, w = p.length; b < w; b++) y.push(e(p[b])); + } + if ((p = g[1]) !== "") for (p = p.split("|"), i.verbose && console.log("Parse the integers dictionary"), b = 0, w = p.length; b < w; b++) y.push(n(p[b])); + if ((p = g[2]) !== "") for (p = p.split("|"), i.verbose && console.log("Parse the floats dictionary"), b = 0, w = p.length; b < w; b++) y.push(parseFloat(p[b])); + p = null, i.verbose && console.log("Tokenizing the structure"); + var v = "", E = [], h = g[3].length; + for (b = 0; b < h; b++) { + var l = g[3].charAt(b); + l === "|" || l === "$" || l === "@" || l === "]" ? (v && (E.push(n(v)), v = ""), l !== "|" && E.push(l)) : v += l; + } + var o = E.length, a = 0; + return i.verbose && console.log("Starting recursive parser"), function u() { + var d = E[a++]; + if (i.verbose && console.log("Reading collection type " + (d === "$" ? "object" : "Array")), d === "@") { + for (var f = []; a < o; a++) { + var O = E[a]; + if (i.verbose && console.log("Read " + O + " symbol"), O === "]") return f; + if (O === "@" || O === "$") f.push(u()); + else switch (O) { + case -1: + f.push(!0); + break; + case -2: + f.push(!1); + break; + case -3: + f.push(null); + break; + case -5: + f.push(void 0); + break; + case -4: + f.push(""); + break; + default: + f.push(y[O]); + } + } + return i.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; + } + if (d === "$") { + for (f = {}; a < o; a++) { + var S = E[a]; + if (S === "]") return f; + if (S = S === -4 ? "" : y[S], (O = E[++a]) === "@" || O === "$") f[S] = u(); + else switch (O) { + case -1: + f[S] = !0; + break; + case -2: + f[S] = !1; + break; + case -3: + f[S] = null; + break; + case -5: + f[S] = void 0; + break; + case -4: + f[S] = ""; + break; + default: + f[S] = y[O]; + } + } + return i.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; + } + throw new TypeError("Bad token " + d + " isn't a type"); + }(); + } }; +}); +const oe = ve(Ee); +var K, G, z, M, Et, St, et, Ot, At; +class Rt { + constructor(e, r, n, s, c) { + return P(this, "code", 0), P(this, "message", "操作成功"), P(this, "data", null), P(this, "url", ""), P(this, "res", ""), _(this, K, null), _(this, G, !0), _(this, z, !0), _(this, M, { get: (i, g) => R(this, Et).call(this, g), ownKeys: () => Object.keys(R(this, M).getPrototypeOf() || {}), getPrototypeOf: () => R(this, G) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: R(this, M).getPrototypeOf() }) }), _(this, Et, (i) => i === "$echoMsg" ? R(this, et) : i === "msg" ? R(this, St) : i === "then" || i === "resp" ? (D(this, z, !0), D(this, G, i === "resp"), R(this, Ot)) : i === "catch" ? R(this, At) : i === "IS_ECHO_MSG" ? R(this, z) : Reflect.get(this, i)), _(this, St, (i = (y) => y, g = !1) => (R(this, et).call(this), D(this, G, g), Promise.resolve(i == null ? void 0 : i(R(this, M).getPrototypeOf())))), _(this, et, () => { + R(this, z) && (D(this, z, !1), cr.onMsg(this.code, this.message)); + }), _(this, Ot, (i) => [0, 1].includes(this.code) ? Promise.resolve(i == null ? void 0 : i(R(this, M).getPrototypeOf())) : Promise.reject(R(this, K))), _(this, At, (i) => Promise.resolve(i(R(this, K)))), this.code = e, this.message = r, this.data = n, this.url = s, this.res = c, D(this, K, new Proxy(this, R(this, M))); + } +} +K = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(); +const mt = (t, e, r, n = "/", s = "") => new Rt(t, e, r, n, s); +var se = ["utf8", "utf-8", "unicode-1-1-utf-8"], Se = { TextEncoder: function(t) { + if (se.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); + this.encoding = "utf-8", this.encode = function(e) { + if (typeof e != "string") throw new TypeError("passed argument must be of tye string"); + var r = unescape(encodeURIComponent(e)), n = new Uint8Array(r.length); + const s = r.split(""); + for (let c = 0; c < s.length; c++) n[c] = s[c].charCodeAt(0); + return n; + }; +}, TextDecoder: function(t) { + if (se.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); + this.encoding = "utf-8", this.decode = function(e, r) { + if (typeof e > "u") return ""; + var n = typeof r < "u" && n in r && r.stream; + if (typeof n != "boolean") throw new TypeError("stream option must be boolean"); + if (ArrayBuffer.isView(e)) { + var s = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), c = new Array(s.length); + for (let i = 0; i < s.length; i++) c[i] = String.fromCharCode(s[i]); + return decodeURIComponent(escape(c.join(""))); + } + throw new TypeError("passed argument must be an array buffer view"); + }; +} }; +const ir = new Se.TextEncoder("utf8"), ar = new Se.TextDecoder("utf8"); +var rt, X, Tt, F, B; +Promise.withResolvers || (Promise.withResolvers = function() { + let t, e; + return { promise: new Promise((r, n) => { + t = r, e = n; + }), resolve: t, reject: e }; +}); +class Ct { + constructor(e, r, n = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) { + _(this, rt, void 0), _(this, X, void 0), _(this, Tt, void 0), _(this, F, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), _(this, B, /* @__PURE__ */ new Map()), P(this, "request", ({ url: s = "/", method: c = "GET", ...i }, g = !1) => { + var y, p; + const b = c.toUpperCase(), w = ((o) => { + let a = 5381; + for (let u = 0; u < o.length; u++) a = 33 * a ^ o.charCodeAt(u); + return (a >>> 0).toString(16); + })(JSON.stringify([s, b, i])), v = (y = s == null ? void 0 : s.includes) != null && y.call(s, "/_/") ? "#" : "$", { promise: E, resolve: h, reject: l } = Promise.withResolvers(); + return R(this, F)[v].has(w) ? (console.log("缓存命中", s), h(R(this, F)[v].get(w))) : (R(this, B).has(w) ? R(this, B).get(w).push([h, l]) : R(this, B).set(w, [[h, l]]), (p = R(this, B).get(w)) != null && p.some((o) => o) && R(this, rt).call(this, { url: s, method: b, ...i }).then((o) => { + if (![0, 1].includes(o.code)) throw mt(o.code, o.msg, o.data, s, o == null ? void 0 : o.res); + return [o.code, o.msg, o.data, s, o == null ? void 0 : o.res]; + }).then((o) => ((v == "#" || g && b === "GET") && R(this, F)[v].set(w, o), o)).then((o) => { + var a; + return (a = R(this, B).get(w)) == null ? void 0 : a.forEach((u, d, f) => { + u && u[0](o), delete f[d]; + }); + }).catch((o) => { + var a; + R(this, F)[v].delete(w), (a = R(this, B).get(w)) == null || a.forEach((u, d, f) => { + u && u[1](o instanceof Rt ? o : mt(-1, o, null, s)), delete f[d]; + }); + }).finally(() => R(this, B).delete(w))), new Proxy(E, { get: (o, a) => (...u) => o.then((d) => mt(...d)[a](...u)).catch((d) => { + if (!d instanceof Rt) throw d; + return typeof d[a] == "function" ? d[a](...u) : d[a]; + }) }); + }), P(this, "get", (s, c = {}) => this.request({ url: s, method: "GET", params: c })), P(this, "post", (s, c = {}, i = {}) => this.request({ url: s, method: "POST", data: c, params: i })), P(this, "put", (s, c = {}, i = {}) => this.request({ url: s, method: "PUT", data: c, params: i })), P(this, "del", (s, c = {}, i = {}) => this.request({ url: s, method: "DELETE", data: c, params: i })), P(this, "download", (s, c) => { + }), P(this, "cache", (s, c = {}) => this.request({ url: s, method: "GET", params: c }, !0)), P(this, "list", (s, c = {}) => this.get(`/api/${s}/${this.encode(c)}`)), P(this, "getAppInfo", () => { + }), P(this, "refreshCache", (s = !1) => { + s && R(this, F)["#"].clear(), R(this, F).$.clear(); + }), P(this, "decode", (s = "", c = {}) => { + if (s === void 0 || s === "" || s === null) return c; + try { + const i = R(this, X).decode(s).buffer; + return oe.unpack(((g) => ar.decode(new DataView(g), {}))(i)); + } catch { + return console.warn("core.decode", s), c; + } + }), P(this, "encode", (s = {}) => { + const c = JSON.stringify(s, (i, g) => g === void 0 ? null : g); + return R(this, X).encode(((i) => ir.encode(i || ""))(oe.pack(c))); + }), D(this, Tt, e), D(this, rt, n), D(this, X, sr(r)); + } +} +rt = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(); +const cr = Ct; +Ct.onUnhandledRejection = (t) => { + var e, r, n, s, c, i; + t != null && t.IS_ECHO_MSG ? ((e = t == null ? void 0 : t.$echoMsg) == null || e.call(t), (r = t == null ? void 0 : t.preventDefault) == null || r.call(t)) : (n = t.reason) != null && n.IS_ECHO_MSG && ((c = (s = t.reason) == null ? void 0 : s.$echoMsg) == null || c.call(s), (i = t == null ? void 0 : t.preventDefault) == null || i.call(t)); +}, Ct.onMsg = (t, e) => [0, 1].includes(t) ? console.log(e) : console.warn(e); +function Oe(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var Ae = { exports: {} }; +/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */ +Ae.exports = function() { + var t, e, r = { version: "0.2.0" }, n = r.settings = { minimum: 0.08, easing: "ease", positionUsing: "", speed: 200, trickle: !0, trickleRate: 0.02, trickleSpeed: 800, showSpinner: !0, barSelector: '[role="bar"]', spinnerSelector: '[role="spinner"]', parent: "body", template: '
' }; + function s(h, l, o) { + return h < l ? l : h > o ? o : h; + } + function c(h) { + return 100 * (-1 + h); + } + function i(h, l, o) { + var a; + return (a = n.positionUsing === "translate3d" ? { transform: "translate3d(" + c(h) + "%,0,0)" } : n.positionUsing === "translate" ? { transform: "translate(" + c(h) + "%,0)" } : { "margin-left": c(h) + "%" }).transition = "all " + l + "ms " + o, a; + } + r.configure = function(h) { + var l, o; + for (l in h) (o = h[l]) !== void 0 && h.hasOwnProperty(l) && (n[l] = o); + return this; + }, r.status = null, r.set = function(h) { + var l = r.isStarted(); + h = s(h, n.minimum, 1), r.status = h === 1 ? null : h; + var o = r.render(!l), a = o.querySelector(n.barSelector), u = n.speed, d = n.easing; + return o.offsetWidth, g(function(f) { + n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), y(a, i(h, u, d)), h === 1 ? (y(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() { + y(o, { transition: "all " + u + "ms linear", opacity: 0 }), setTimeout(function() { + r.remove(), f(); + }, u); + }, u)) : setTimeout(f, u); + }), this; + }, r.isStarted = function() { + return typeof r.status == "number"; + }, r.start = function() { + r.status || r.set(0); + var h = function() { + setTimeout(function() { + r.status && (r.trickle(), h()); + }, n.trickleSpeed); + }; + return n.trickle && h(), this; + }, r.done = function(h) { + return h || r.status ? r.inc(0.3 + 0.5 * Math.random()).set(1) : this; + }, r.inc = function(h) { + var l = r.status; + return l ? (typeof h != "number" && (h = (1 - l) * s(Math.random() * l, 0.1, 0.95)), l = s(l + h, 0, 0.994), r.set(l)) : r.start(); + }, r.trickle = function() { + return r.inc(Math.random() * n.trickleRate); + }, t = 0, e = 0, r.promise = function(h) { + return h && h.state() !== "resolved" ? (e === 0 && r.start(), t++, e++, h.always(function() { + --e == 0 ? (t = 0, r.done()) : r.set((t - e) / t); + }), this) : this; + }, r.render = function(h) { + if (r.isRendered()) return document.getElementById("nprogress"); + b(document.documentElement, "nprogress-busy"); + var l = document.createElement("div"); + l.id = "nprogress", l.innerHTML = n.template; + var o, a = l.querySelector(n.barSelector), u = h ? "-100" : c(r.status || 0), d = document.querySelector(n.parent); + return y(a, { transition: "all 0 linear", transform: "translate3d(" + u + "%,0,0)" }), n.showSpinner || (o = l.querySelector(n.spinnerSelector)) && E(o), d != document.body && b(d, "nprogress-custom-parent"), d.appendChild(l), l; + }, r.remove = function() { + w(document.documentElement, "nprogress-busy"), w(document.querySelector(n.parent), "nprogress-custom-parent"); + var h = document.getElementById("nprogress"); + h && E(h); + }, r.isRendered = function() { + return !!document.getElementById("nprogress"); + }, r.getPositioningCSS = function() { + var h = document.body.style, l = "WebkitTransform" in h ? "Webkit" : "MozTransform" in h ? "Moz" : "msTransform" in h ? "ms" : "OTransform" in h ? "O" : ""; + return l + "Perspective" in h ? "translate3d" : l + "Transform" in h ? "translate" : "margin"; + }; + var g = /* @__PURE__ */ function() { + var h = []; + function l() { + var o = h.shift(); + o && o(l); + } + return function(o) { + h.push(o), h.length == 1 && l(); + }; + }(), y = /* @__PURE__ */ function() { + var h = ["Webkit", "O", "Moz", "ms"], l = {}; + function o(f) { + return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(O, S) { + return S.toUpperCase(); + }); + } + function a(f) { + var O = document.body.style; + if (f in O) return f; + for (var S, T = h.length, U = f.charAt(0).toUpperCase() + f.slice(1); T--; ) if ((S = h[T] + U) in O) return S; + return f; + } + function u(f) { + return f = o(f), l[f] || (l[f] = a(f)); + } + function d(f, O, S) { + O = u(O), f.style[O] = S; + } + return function(f, O) { + var S, T, U = arguments; + if (U.length == 2) for (S in O) (T = O[S]) !== void 0 && O.hasOwnProperty(S) && d(f, S, T); + else d(f, U[1], U[2]); + }; + }(); + function p(h, l) { + return (typeof h == "string" ? h : v(h)).indexOf(" " + l + " ") >= 0; + } + function b(h, l) { + var o = v(h), a = o + l; + p(o, l) || (h.className = a.substring(1)); + } + function w(h, l) { + var o, a = v(h); + p(h, l) && (o = a.replace(" " + l + " ", " "), h.className = o.substring(1, o.length - 1)); + } + function v(h) { + return (" " + (h.className || "") + " ").replace(/\s+/gi, " "); + } + function E(h) { + h && h.parentNode && h.parentNode.removeChild(h); + } + return r; +}(); +const ur = Oe(Ae.exports); +var Re = { exports: {} }; +Re.exports = function(t) { + var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + function r(l, o) { + var a = l[0], u = l[1], d = l[2], f = l[3]; + u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[0] - 680876936 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[1] - 389564586 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[2] + 606105819 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[3] - 1044525330 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[4] - 176418897 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[5] + 1200080426 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[6] - 1473231341 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[7] - 45705983 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[8] + 1770035416 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[9] - 1958414417 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[10] - 42063 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[11] - 1990404162 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[12] + 1804603682 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[13] - 40341101 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[14] - 1502002290 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[15] + 1236535329 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[1] - 165796510 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[6] - 1069501632 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[11] + 643717713 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[0] - 373897302 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[5] - 701558691 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[10] + 38016083 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[15] - 660478335 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[4] - 405537848 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[9] + 568446438 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[14] - 1019803690 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[3] - 187363961 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[8] + 1163531501 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[13] - 1444681467 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[2] - 51403784 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[7] + 1735328473 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[12] - 1926607734 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[5] - 378558 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[8] - 2022574463 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[11] + 1839030562 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[14] - 35309556 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[1] - 1530992060 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[4] + 1272893353 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[7] - 155497632 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[10] - 1094730640 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[13] + 681279174 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[0] - 358537222 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[3] - 722521979 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[6] + 76029189 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[9] - 640364487 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[12] - 421815835 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[15] + 530742520 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[2] - 995338651 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[0] - 198630844 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[7] + 1126891415 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[14] - 1416354905 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[5] - 57434055 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[12] + 1700485571 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[3] - 1894986606 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[10] - 1051523 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[1] - 2054922799 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[8] + 1873313359 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[15] - 30611744 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[6] - 1560198380 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[13] + 1309151649 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[4] - 145523070 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[11] - 1120210379 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[2] + 718787259 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[9] - 343485551 | 0) << 21 | u >>> 11) + d | 0, l[0] = a + l[0] | 0, l[1] = u + l[1] | 0, l[2] = d + l[2] | 0, l[3] = f + l[3] | 0; + } + function n(l) { + var o, a = []; + for (o = 0; o < 64; o += 4) a[o >> 2] = l.charCodeAt(o) + (l.charCodeAt(o + 1) << 8) + (l.charCodeAt(o + 2) << 16) + (l.charCodeAt(o + 3) << 24); + return a; + } + function s(l) { + var o, a = []; + for (o = 0; o < 64; o += 4) a[o >> 2] = l[o] + (l[o + 1] << 8) + (l[o + 2] << 16) + (l[o + 3] << 24); + return a; + } + function c(l) { + var o, a, u, d, f, O, S = l.length, T = [1732584193, -271733879, -1732584194, 271733878]; + for (o = 64; o <= S; o += 64) r(T, n(l.substring(o - 64, o))); + for (a = (l = l.substring(o - 64)).length, u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) u[o >> 2] |= l.charCodeAt(o) << (o % 4 << 3); + if (u[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, u), o = 0; o < 16; o += 1) u[o] = 0; + return d = (d = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(d[2], 16), O = parseInt(d[1], 16) || 0, u[14] = f, u[15] = O, r(T, u), T; + } + function i(l) { + var o, a, u, d, f, O, S = l.length, T = [1732584193, -271733879, -1732584194, 271733878]; + for (o = 64; o <= S; o += 64) r(T, s(l.subarray(o - 64, o))); + for (a = (l = o - 64 < S ? l.subarray(o - 64) : new Uint8Array(0)).length, u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) u[o >> 2] |= l[o] << (o % 4 << 3); + if (u[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, u), o = 0; o < 16; o += 1) u[o] = 0; + return d = (d = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(d[2], 16), O = parseInt(d[1], 16) || 0, u[14] = f, u[15] = O, r(T, u), T; + } + function g(l) { + var o, a = ""; + for (o = 0; o < 4; o += 1) a += e[l >> 8 * o + 4 & 15] + e[l >> 8 * o & 15]; + return a; + } + function y(l) { + var o; + for (o = 0; o < l.length; o += 1) l[o] = g(l[o]); + return l.join(""); + } + function p(l) { + return /[\u0080-\uFFFF]/.test(l) && (l = unescape(encodeURIComponent(l))), l; + } + function b(l, o) { + var a, u = l.length, d = new ArrayBuffer(u), f = new Uint8Array(d); + for (a = 0; a < u; a += 1) f[a] = l.charCodeAt(a); + return o ? f : d; + } + function w(l) { + return String.fromCharCode.apply(null, new Uint8Array(l)); + } + function v(l, o, a) { + var u = new Uint8Array(l.byteLength + o.byteLength); + return u.set(new Uint8Array(l)), u.set(new Uint8Array(o), l.byteLength), u; + } + function E(l) { + var o, a = [], u = l.length; + for (o = 0; o < u - 1; o += 2) a.push(parseInt(l.substr(o, 2), 16)); + return String.fromCharCode.apply(String, a); + } + function h() { + this.reset(); + } + return y(c("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { + function l(o, a) { + return (o = 0 | o || 0) < 0 ? Math.max(o + a, 0) : Math.min(o, a); + } + ArrayBuffer.prototype.slice = function(o, a) { + var u, d, f, O, S = this.byteLength, T = l(o, S), U = S; + return a !== t && (U = l(a, S)), T > U ? new ArrayBuffer(0) : (u = U - T, d = new ArrayBuffer(u), f = new Uint8Array(d), O = new Uint8Array(this, T, u), f.set(O), d); + }; + }(), h.prototype.append = function(l) { + return this.appendBinary(p(l)), this; + }, h.prototype.appendBinary = function(l) { + this._buff += l, this._length += l.length; + var o, a = this._buff.length; + for (o = 64; o <= a; o += 64) r(this._hash, n(this._buff.substring(o - 64, o))); + return this._buff = this._buff.substring(o - 64), this; + }, h.prototype.end = function(l) { + var o, a, u = this._buff, d = u.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (o = 0; o < d; o += 1) f[o >> 2] |= u.charCodeAt(o) << (o % 4 << 3); + return this._finish(f, d), a = y(this._hash), l && (a = E(a)), this.reset(), a; + }, h.prototype.reset = function() { + return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; + }, h.prototype.getState = function() { + return { buff: this._buff, length: this._length, hash: this._hash.slice() }; + }, h.prototype.setState = function(l) { + return this._buff = l.buff, this._length = l.length, this._hash = l.hash, this; + }, h.prototype.destroy = function() { + delete this._hash, delete this._buff, delete this._length; + }, h.prototype._finish = function(l, o) { + var a, u, d, f = o; + if (l[f >> 2] |= 128 << (f % 4 << 3), f > 55) for (r(this._hash, l), f = 0; f < 16; f += 1) l[f] = 0; + a = (a = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), u = parseInt(a[2], 16), d = parseInt(a[1], 16) || 0, l[14] = u, l[15] = d, r(this._hash, l); + }, h.hash = function(l, o) { + return h.hashBinary(p(l), o); + }, h.hashBinary = function(l, o) { + var a = y(c(l)); + return o ? E(a) : a; + }, h.ArrayBuffer = function() { + this.reset(); + }, h.ArrayBuffer.prototype.append = function(l) { + var o, a = v(this._buff.buffer, l), u = a.length; + for (this._length += l.byteLength, o = 64; o <= u; o += 64) r(this._hash, s(a.subarray(o - 64, o))); + return this._buff = o - 64 < u ? new Uint8Array(a.buffer.slice(o - 64)) : new Uint8Array(0), this; + }, h.ArrayBuffer.prototype.end = function(l) { + var o, a, u = this._buff, d = u.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (o = 0; o < d; o += 1) f[o >> 2] |= u[o] << (o % 4 << 3); + return this._finish(f, d), a = y(this._hash), l && (a = E(a)), this.reset(), a; + }, h.ArrayBuffer.prototype.reset = function() { + return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; + }, h.ArrayBuffer.prototype.getState = function() { + var l = h.prototype.getState.call(this); + return l.buff = w(l.buff), l; + }, h.ArrayBuffer.prototype.setState = function(l) { + return l.buff = b(l.buff, !0), h.prototype.setState.call(this, l); + }, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(l, o) { + var a = y(i(new Uint8Array(l))); + return o ? E(a) : a; + }, h; +}(); +const lr = Oe(Re.exports); +export { + ur as N, + lr as S, + C as a, + cr as w +}; diff --git a/dist/components.js b/dist/components.js index feabd77..30cd9ca 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,5 +1,8 @@ -import { N, h } from "./common/main-DHW9LhcM.js"; +import { X as s, N as p, Y as n, Z as t, W as d } from "./common/main-2s1hdQO8.js"; export { - N as Icon, - h as Popup + s as Empty, + p as Icon, + n as Loading, + t as NotFound, + d as Popup }; diff --git a/dist/container.js b/dist/container.js index e10f913..33b6e77 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,8 +1,11 @@ -import { S, g, h, f, F } from "./common/main-DHW9LhcM.js"; +import { T as o, X as s, Y as p, Z as t, U as d, W as n, V as r, S as u } from "./common/main-2s1hdQO8.js"; export { - S as Context, - g as FFPageRender, - h as FFPopupRender, - f as SlotRender, - F as default + o as Context, + s as Empty, + p as Loading, + t as NotFound, + d as PageRender, + n as Popup, + r as PopupRender, + u as default }; diff --git a/dist/data-list.js b/dist/data-list.js index 6ea6b76..410171f 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,19 +1,19 @@ -import { s, q, l, o, t, p, n, r, m, v, D, w, x, z, A, y } from "./common/main-DHW9LhcM.js"; +import { m as s, k as e, e as r, i, n as o, j as D, h as l, l as u, f as L, o as n, D as d, p as m, q as F, s as p, t as C, r as b } from "./common/main-2s1hdQO8.js"; export { s as DataListContent, - q as DataListContext, - l as DataListFilter, - o as DataListFooter, - t as DataListFramework, - p as DataListHelper, - n as DataListSider, - r as DataListTable, - m as DataListToolbar, - v as DataTableFramework, - D as default, - w as loadDataListFieldWidget, - x as useColumnsRender, - z as useDataSource, - A as useHasOperationColumn, - y as useStructure + e as DataListContext, + r as DataListFilter, + i as DataListFooter, + o as DataListFramework, + D as DataListHelper, + l as DataListSider, + u as DataListTable, + L as DataListToolbar, + n as DataTableFramework, + d as default, + m as loadDataListFieldWidget, + F as useColumnsRender, + p as useDataSource, + C as useHasOperationColumn, + b as useStructure }; diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js new file mode 100644 index 0000000..211f40e --- /dev/null +++ b/dist/data-list/utils.js @@ -0,0 +1,5 @@ +import "lodash"; +import { a as t } from "../common/main-2s1hdQO8.js"; +export { + t as getDefaultExpandRowKeys +}; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index 3b4f4bc..0281909 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,9 +1,11 @@ -import { I, K, J, H, M, L } from "./common/main-DHW9LhcM.js"; +import { E as r, I as u, F as e, C as o, M as t, L as F, K as d, J as m } from "./common/main-2s1hdQO8.js"; export { - I as GridLayoutForm, - K as GridLayoutFormHelper, - J as GridLayoutFormWidget, - H as default, - M as getOptionItemByValue, - L as useFnRun + r as GridLayoutForm, + u as GridLayoutFormHelper, + e as GridLayoutFormWidget, + o as default, + t as useFnRun, + F as useFormData, + d as useRules, + m as useStructure }; diff --git a/dist/grid-layout-form/utils.js b/dist/grid-layout-form/utils.js new file mode 100644 index 0000000..b3bcd1e --- /dev/null +++ b/dist/grid-layout-form/utils.js @@ -0,0 +1,5 @@ +import "lodash"; +import { a7 as a } from "../common/main-2s1hdQO8.js"; +export { + a as getOptionItemByValue +}; diff --git a/dist/grid-layout.js b/dist/grid-layout.js index 2e952ef..860dd7e 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,6 +1,9 @@ -import { j, k, G } from "./common/main-DHW9LhcM.js"; +import { b as d, c as e, H as u, G as i, u as t, d as o } from "./common/main-2s1hdQO8.js"; export { - j as GridLayout, - k as GridLayoutWidget, - G as default + d as GridLayout, + e as GridLayoutWidget, + u as HOOK_MARK, + i as default, + t as useField, + o as useGridLayoutFields }; diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js new file mode 100644 index 0000000..59f5484 --- /dev/null +++ b/dist/grid-layout/utils.js @@ -0,0 +1,4 @@ +import { g as t } from "../common/main-2s1hdQO8.js"; +export { + t as getBoxStyle +}; diff --git a/dist/hooks.js b/dist/hooks.js index 6423406..88b87a3 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,12 +1,13 @@ import "lodash"; import "rc-field-form"; import "react"; -import { c, d, a, b, e, u } from "./common/main-DHW9LhcM.js"; +import { z as p, y as i, A as o, w as r, x as f, B as c, v as m } from "./common/main-2s1hdQO8.js"; export { - c as useDeepEqualEffect, - d as useOptions, - a as usePrevious, - b as useStateWithCallback, - e as useSubscribeRequest, - u as useUpdate + p as useDeepEffect, + i as useDeepEqualEffect, + o as useOptions, + r as usePrevious, + f as useStateWithCallback, + c as useSubscribeRequest, + m as useUpdate }; diff --git a/dist/iconfont.js b/dist/iconfont.js new file mode 100644 index 0000000..40067ec --- /dev/null +++ b/dist/iconfont.js @@ -0,0 +1,8 @@ +import "react/jsx-runtime"; +import "react"; +import "prop-types"; +import "classnames"; +import { N as a } from "./common/main-2s1hdQO8.js"; +export { + a as default +}; diff --git a/dist/index.js b/dist/index.js index c4e5276..85290fb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,17 +1,12 @@ -import "lodash"; -import "axios"; -import "react"; -import { Z, V, _, $, a1, Y, a0, W, X, a2 } from "./common/main-DHW9LhcM.js"; -import "ff-request"; +import { a5 as t, a6 as e, a1 as o, a2 as p, _ as n, a3 as c, a0 as r, $ as f, a4 as u } from "./common/main-2s1hdQO8.js"; export { - Z as AppGlobalParamsContext, - V as AppUrl, - _ as cache, - $ as configure, - a1 as core, - Y as default, - a0 as func, - W as http, - X as isReactComponent, - a2 as route + t as AppContext, + e as AppGlobalParamsContext, + o as cache, + p as configure, + n as default, + c as func, + r as http, + f as isReactComponent, + u as route }; diff --git a/dist/res-ws.js b/dist/res-ws.js index aba1cc3..3501eca 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R } from "./common/main-DHW9LhcM.js"; +import { R as a } from "./common/main-2s1hdQO8.js"; export { - R as default + a as default }; diff --git a/dist/service.js b/dist/service.js deleted file mode 100644 index a4781c7..0000000 --- a/dist/service.js +++ /dev/null @@ -1,8 +0,0 @@ -import { a5, a4, a7, a3, a6 } from "./common/main-DHW9LhcM.js"; -export { - a5 as getConfigure, - a4 as getMenus, - a7 as getPhoneNumber, - a3 as getRoutes, - a6 as getWidgetOperationAuth -}; diff --git a/dist/style.css b/dist/style.css index 109688a..7521277 100644 --- a/dist/style.css +++ b/dist/style.css @@ -1 +1 @@ -#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ff-container{height:100%;padding:var(--ff-padding, 0px);background-color:var(--ff-bg-color, #fff)}.ff-drawer .ant-drawer-header{padding:0 8px 0 0}.ff-drawer .ant-drawer-header .ant-drawer-title{height:50px;line-height:50px}.ff-drawer .ant-drawer-header .ant-drawer-close{margin-inline-end:0}.ff-drawer .ant-drawer-body{padding:8px}.ff-drawer .ff-popup-footer{padding:8px;height:46px;align-items:center;display:flex}.ff-drawer .ff-popup-footer .ff-popup-extras,.ff-drawer .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-drawer .ff-popup-footer .ff-popup-extras{flex:1}.ff-modal>div:not([aria-hidden]){height:inherit}.ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}.ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}.ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}.ff-modal .ff-popup-footer .ff-popup-extras,.ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}.ff-modal .ff-popup-footer .ff-popup-extras{flex:1}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-xs)}page-container{--bg-color: #fff;--mask-bg-color: rgba(0, 0, 0, .6)}page-container .ff-notification{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}page-container .ff-notification .ff-notification-container{color:#fff;border-radius:12rpx;background-color:#0009;height:fit-content;padding:28rpx;max-width:50%;max-height:50%;text-align:center}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon{font-size:62rpx}page-container .ff-notification .ff-notification-container .iconfont.ff-notification-icon+view{margin-top:20rpx}page-container .ff-confirm{display:flex;align-items:center;justify-content:center;color:var(--text-color, #737373);background-color:#0006}page-container .ff-confirm .ff-confirm-container{background-color:#fff;width:80%;min-height:240rpx;max-height:80%;border-radius:12rpx;padding:38rpx;display:flex;flex-direction:column;gap:18rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-title{font-size:36rpx;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-content{flex:1;overflow-y:auto;min-height:1.8em;max-height:70vh}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations{display:flex;gap:38rpx}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok,page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{flex:1;border-radius:32rpx;padding:10rpx 0;text-align:center}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-cancel{box-shadow:0 0 3rpx var(--text-color, #737373);border:1rpx solid var(--text-color, #737373)}page-container .ff-confirm .ff-confirm-container .ff-confirm-operations .ff-confirm-ok{color:#fff;background-color:var(--primary-color, #1890ff)}page-container .ff-modal>div:not([aria-hidden]){height:inherit}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content{height:inherit;display:flex;flex-direction:column}page-container .ff-modal>div:not([aria-hidden])>.ant-modal-content>.ant-modal-body{flex:1;overflow-y:overlay}page-container .ff-modal .ff-popup-footer{height:46px;align-items:center;display:flex}page-container .ff-modal .ff-popup-footer .ff-popup-extras,page-container .ff-modal .ff-popup-footer .ff-popup-actions{display:flex;gap:4px}page-container .ff-modal .ff-popup-footer .ff-popup-extras{flex:1}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}.ant-form-vertical .ant-form-item-label,.ant-form.ant-vertical .ant-form-item-label{padding-bottom:0;text-align:start}.ant-form-vertical .ant-form-item-row,.ant-form.ant-vertical .ant-form-item-row{flex-direction:column}.ant-form-item .ant-form-item-label>label{height:22px}.anticon.iconfont{transform:scale(1.14)}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px} +#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.react-grid-layout .react-grid-item{box-sizing:border-box!important}.monaco-editor .parameter-hints-widget{border:0px}.monaco-editor .parameter-hints-widget .signature{padding:0}.monaco-editor .suggest-widget,.monaco-editor.vs-dark .suggest-widget{border:0px}.monaco-editor .rename-box{top:0}.ant-divider:has(+.ant-form .ant-divider:first-child){display:none}:root{--padding-lg: 24px;--padding-md: 16px;--padding-sm: 12px;--padding-xs: 8px;--padding-xss: 4px;--margin-lg: 24px;--margin-md: 16px;--margin-sm: 12px;--margin-xs: 8px;--margin-xss: 4px;--border-color: #f2f2f2;--bg-color: rgba(0, 0, 0, .02)}#root{height:100vh;background-color:#f0f2f5}*::-webkit-scrollbar-thumb{background:#aaa;border-radius:5px}*::-webkit-scrollbar-thumb:hover{background:#999}*::-webkit-scrollbar-track{background-color:#ddd}*::-webkit-scrollbar-corner{background-color:#ddd}*::-webkit-scrollbar{width:5px;height:5px}.ff-container{height:100%}.ff-loading{height:100vh;width:100%;background-color:#f0f2f5;display:flex;justify-content:center;align-items:center}.ff-loading .loader{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:128px;height:80px}.ff-loading .loader .square{position:relative}.ff-loading .loader .square:nth-child(1){margin-left:0}.ff-loading .loader .square:nth-child(1) span{-webkit-animation:animsquare1 2s infinite ease-in;animation:animsquare1 2s infinite ease-in}.ff-loading .loader .square:nth-child(2){margin-left:44px}.ff-loading .loader .square:nth-child(2) span{-webkit-animation:animsquare2 2s infinite ease-in;animation:animsquare2 2s infinite ease-in}.ff-loading .loader .square:nth-child(3){margin-left:88px}.ff-loading .loader .square:nth-child(3) span{-webkit-animation:animsquare3 2s infinite ease-in;animation:animsquare3 2s infinite ease-in}.ff-loading .loader .square:nth-child(4){margin-left:132px}.ff-loading .loader .square:nth-child(4) span{-webkit-animation:animsquare4 2s infinite ease-in;animation:animsquare4 2s infinite ease-in}.ff-loading .loader .square span{position:absolute;top:0;left:20px;height:36px;width:36px;border-radius:2px;background-color:#fff}.ff-loading .loader .square span:nth-child(1){top:0;-webkit-animation-delay:0s;animation-delay:0s}.ff-loading .loader .square span:nth-child(2){top:44px;-webkit-animation-delay:.15s;animation-delay:.15s}.ff-loading .loader .square span:nth-child(3){top:88px;-webkit-animation-delay:.3s;animation-delay:.3s}@media (max-width: 550px){.ff-loading .loader{-webkit-transform:scale(.75);transform:scale(.75)}}@media (max-width: 440px){.ff-loading .loader{-webkit-transform:scale(.5);transform:scale(.5)}}@keyframes animsquare4{0%,5%,95%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}30%,70%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare3{0%,10%,90%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}35%,65%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare2{0%,15%,85%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}40%,60%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}@keyframes animsquare1{0%,20%,80%,to{-webkit-transform:translate(0px,0px) rotate(0deg);transform:translate(0) rotate(0)}45%,55%{-webkit-transform:translate(40px,0px) rotate(90deg);transform:translate(40px) rotate(90deg)}}.ff-notification{position:fixed;z-index:2000;display:flex;max-height:100vh;padding:20px;align-items:flex-end;width:380px;overflow-x:hidden;overflow-y:clip;height:100vh;box-sizing:content-box;pointer-events:none;flex-direction:column;gap:24px}.ff-notification-top,.ff-notification-topLeft,.ff-notification-topRight{top:0}.ff-notification-bottom,.ff-notification-bottomRight,.ff-notification-bottomLeft{bottom:0}.ff-notification-bottomRight,.ff-notification-topRight{right:0}.ff-notification-notice{position:relative;display:block;box-sizing:border-box;line-height:1.5;width:100%}.ff-notification-notice-wrapper{z-index:2000;pointer-events:auto;position:relative;display:block;box-sizing:border-box;border-radius:8px;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;width:calc(100% - 40px);background-color:#fff;right:0}.ff-notification-notice-content{padding:14px 18px;display:flex;gap:8px;white-space:pre-wrap}.ff-notification-notice-content .ff-notification-icon.ff-notification-error{--bg-color: #ff4d4f}.ff-notification-notice-content .ff-notification-icon.ff-notification-success{--bg-color: #52c41a}.ff-notification-notice-content .ff-notification-icon.ff-notification-info{--bg-color: #1677ff}.ff-notification-notice-content .ff-notification-icon>*:first-child{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;background-color:var(--bg-color)}.ff-notification-notice-progress{position:absolute;left:3px;right:3px;border-radius:1px;overflow:hidden;-moz-appearance:none;appearance:none;-webkit-appearance:none;display:block;inline-size:100%;block-size:2px;border:0}.ff-notification-notice-progress,.ff-notification-notice-progress::-webkit-progress-bar{background-color:#0000000a}.ff-notification-notice-progress::-moz-progress-bar{background-color:#31afff}.ff-notification-notice-progress::-webkit-progress-value{background-color:#31afff}.ff-notification-fade{overflow:hidden;transition:all .3s}.ff-notification-fade-appear-prepare{pointer-events:none;opacity:0!important}.ff-notification-fade-appear-start{transform:translate(100%);opacity:0}.ff-notification-fade-appear-active{transform:translate(0);opacity:1}.ff-data-list-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-list-framework .ff-data-list-container{width:100%;height:100%;row-gap:var(--gap);display:flex;flex-direction:column}.ff-data-list-framework .ff-data-list-container .ff-data-list-content{flex:1;overflow-y:auto;display:grid;gap:var(--gap);padding:calc(var(--gap) / 2);grid-template-columns:repeat(var(--col-num),1fr);grid-auto-rows:min-content}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item{display:flex;flex-direction:column;justify-content:space-between;row-gap:8px;border-radius:4px;background-color:#fff;box-shadow:0 0 8px #00000014}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .ff-grid-layout{padding:8px}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions{margin-top:8px;display:flex;justify-content:space-between;border-top:1px solid #f0f0f0}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action{text-align:center;margin:2px 0;flex:1}.ff-data-list-framework .ff-data-list-container .ff-data-list-content .ff-data-list-framework-item .data-list-grid-layout-item-actions .data-list-grid-layout-item-action:not(:last-child){border-right:1px solid #f0f0f0}.ff-data-table-framework{height:100%;--sider-width: 280px;--col-num: 1;--gap: 8px;display:flex;gap:var(--gap)}.ff-data-table-framework .ff-data-table-container{width:100%;height:100%;display:flex;flex-direction:column;row-gap:var(--gap)}.ff-data-list-item-operations{max-width:180px;display:flex;flex-wrap:wrap;gap:var(--margin-xss, 4px)}.ff-data-list-item-operations>.ant-btn:not(.ant-btn-circle){flex-grow:1}.ff-data-list-helper{height:100%}.ff-data-list-filter:has(.ff-data-list-filter-actions:not(.expanded)){height:60px;overflow-y:hidden}.ff-data-list-filter .ff-data-list-filter-default-form.ff-grid-layout-form{--grid-layout-cols: 25;--grid-layout-item-margin-x: 8px;--grid-layout-item-margin-y: 16px}.ff-data-list-filter .ff-data-list-filter-actions{grid-column:span var(--itemp-span, 5) / calc(var(--grid-layout-cols, 25) + 1)}.ff-data-list-filter .ff-data-list-filter-actions:not(.expanded){grid-row:1}.ff-data-list-filter .ff-data-list-filter-actions .ff-data-list-filter-expanded-button{margin-left:8px}.ff-data-list-filter .ff-data-list-filter-actions .ant-form-item-control-input-content{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ff-data-list-toolbar{gap:8px;display:flex;justify-content:space-between;align-items:center}.ff-data-list-toolbar .ff-data-list-title{color:#000000e0;font-weight:600;font-size:14px}.ff-data-list-toolbar .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-toolbar .ff-data-list-tabs{cursor:pointer}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab{color:#00000073}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab:hover{font-weight:600}.ff-data-list-toolbar .ff-data-list-tabs .ff-data-list-tab.active{color:#1677ff;font-weight:600}.ff-data-list-sider{width:var(--sider-width, 280px);overflow-y:auto;box-shadow:8px 0 4px -8px #0000000d}.ff-data-list-sider+.ff-data-list-container{width:calc(100% - var(--sider-width, 280px))}.ff-data-list-footer{padding-block-start:8px;display:flex;justify-content:space-between}.ff-data-list-footer .ff-data-list-actions{display:flex;justify-content:center;gap:8px}.ff-data-list-table{height:100%;overflow-y:hidden}.ff-data-list-table .ant-table *{scrollbar-width:auto;scrollbar-color:auto}.ff-grid-layout{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x);row-gap:var(--grid-layout-item-margin-y)}.ff-grid-layout .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-paddin);margin:var(--grid-layout-box-margin)}.ff-grid-layout-form{--grid-layout-h: 1;--grid-layout-row: none;--grid-layout-row-height: 18px;--grid-layout-row-height-offset: 0px;--grid-layout-cols: 12;display:grid;grid-template-columns:repeat(var(--grid-layout-cols),1fr);grid-auto-rows:minmax(min-content,max-content);padding:var(--grid-layout-container-padding-y, 0) var(--grid-layout-container-padding-x, 0);column-gap:var(--grid-layout-item-margin-x, 8px);row-gap:var(--grid-layout-item-margin-y, 16px)}.ff-grid-layout-form .grid-layout-item{grid-row:span var(--grid-layout-h, 1);grid-column:calc(var(--grid-layout-x, 1) + 1)/calc(var(--grid-layout-x, 1) + var(--grid-layout-w, 1) + 1);height:calc(var(--grid-layout-row-height) * var(--grid-layout-h) + var(--grid-layout-row-height-offset));padding:var(--grid-layout-box-padding-y, 0) var(--grid-layout-box-padding-x, 0);margin:var(--grid-layout-box-margin)}.ff-iconfont{transform:scale(1.14);vertical-align:-.125em;display:inline-flex;align-items:center;justify-content:center}.ff-iconfont:not(:last-child){margin-right:8px}.ff-button.ant-btn-link,.ff-button.ant-btn-text{width:initial;padding:0;height:auto}.ff-default.ant-btn-link{color:#000000e0}.ant-btn-link.ant-btn:not(:disabled):focus-visible{outline:initial;outline-offset:initial;transition:initial}.ff-popover .ff-popup-footer{display:flex;justify-content:space-between;margin-top:var(--margin-xs)}.ff-modal-form{display:flex;flex-direction:column;gap:var(--modal-form-gap, 8px)}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave-active{transition:all .3s}.mask-motion-enter,.mask-motion-appear{opacity:0}.mask-motion-enter-active,.mask-motion-appear-active,.mask-motion-leave{opacity:1}.mask-motion-leave-active{opacity:0}.panel-motion-left-enter-start,.panel-motion-left-appear-start,.panel-motion-left-leave-start{transition:none!important}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave-active{transition:all .3s}.panel-motion-left-enter,.panel-motion-left-appear{transform:translate(-100%)}.panel-motion-left-enter-active,.panel-motion-left-appear-active,.panel-motion-left-leave{transform:translate(0)}.panel-motion-left-leave-active{transform:translate(-100%)!important}.panel-motion-right-enter-start,.panel-motion-right-appear-start,.panel-motion-right-leave-start{transition:none!important}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave-active{transition:all .3s}.panel-motion-right-enter,.panel-motion-right-appear{transform:translate(100%)}.panel-motion-right-enter-active,.panel-motion-right-appear-active,.panel-motion-right-leave{transform:translate(0)}.panel-motion-right-leave-active{transform:translate(100%)!important}.panel-motion-top-enter-start,.panel-motion-top-appear-start,.panel-motion-top-leave-start{transition:none!important}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave-active{transition:all .3s}.panel-motion-top-enter,.panel-motion-top-appear{transform:translateY(-100%)}.panel-motion-top-enter-active,.panel-motion-top-appear-active,.panel-motion-top-leave{transform:translateY(0)}.panel-motion-top-leave-active{transform:translateY(-100%)!important}.panel-motion-bottom-enter-start,.panel-motion-bottom-appear-start,.panel-motion-bottom-leave-start{transition:none!important}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave-active{transition:all .3s}.panel-motion-bottom-enter,.panel-motion-bottom-appear{transform:translateY(100%)}.panel-motion-bottom-enter-active,.panel-motion-bottom-appear-active,.panel-motion-bottom-leave{transform:translateY(0)}.panel-motion-bottom-leave-active{transform:translateY(100%)!important}.ff-drawer-mask{top:0;right:0;bottom:0;left:0;position:absolute;z-index:1050;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45))}.ff-drawer{top:0;right:0;bottom:0;left:0;position:fixed;z-index:1050;pointer-events:none}.ff-drawer .ff-popup-close{top:14px;right:0}.ff-drawer-inline{position:absolute}.ff-drawer-left .ff-drawer-content-wrapper{inset:0 auto 0 0;box-shadow:6px 0 16px #00000014,3px 0 6px -4px #0000001f,9px 0 28px 8px #0000000d}.ff-drawer-right .ff-drawer-content-wrapper{inset:0 0 0 auto;box-shadow:-6px 0 16px #00000014,-3px 0 6px -4px #0000001f,-9px 0 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper{top:0;box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d}.ff-drawer-bottom .ff-drawer-content-wrapper{bottom:0;box-shadow:0 -6px 16px #00000014,0 -3px 6px -4px #0000001f,0 -9px 28px 8px #0000000d}.ff-drawer-top .ff-drawer-content-wrapper,.ff-drawer-bottom .ff-drawer-content-wrapper{inset-inline:0}.ff-drawer-content{width:100%;height:100%;overflow:auto;background-color:var(--popup-bg-color, #fff);pointer-events:auto}.ff-drawer .ff-popup-header{padding:16px 8px;border-bottom:1px solid rgba(5,5,5,.06)}.ff-drawer .ff-popup-footer{border-top:1px solid rgba(5,5,5,.06);padding:12px 8px}.ff-drawer .ff-popup-body{padding:8px}.ff-drawer-content-wrapper{position:absolute;z-index:1050;overflow:hidden;transition:transform .3s;max-width:100vw}.ff-drawer-content-wrapper-hidden{display:none}.ff-modal-mask{position:fixed;top:0;right:0;left:0;bottom:0;pointer-events:auto;background-color:var(--popup-mask-bg-color, rgba(0, 0, 0, .45));height:100%;filter:alpha(opacity=50);z-index:1050}.ff-modal-mask-hidden{display:none}.ff-modal-fade-enter,.ff-modal-fade-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-play-state:paused}.ff-modal-fade-enter.ff-modal-fade-enter-active,.ff-modal-fade-appear.ff-modal-fade-appear-active{animation-name:rcDialogFadeIn;animation-play-state:running}.ff-modal-fade-leave.ff-modal-fade-leave-active{animation-name:rcDialogFadeOut;animation-play-state:running}@keyframes rcDialogFadeIn{0%{opacity:0}to{opacity:1}}@keyframes rcDialogFadeOut{0%{opacity:1}to{opacity:0}}.ff-modal{position:relative;top:100px;width:min-content;margin:0 auto}.ff-modal .ff-popup-close{top:14px;right:8px}.ff-modal .ff-popup-footer:not(:empty){margin-top:12px}.ff-modal-wrap{position:fixed;overflow:auto;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.ff-modal-title{margin:0;font-size:14px;line-height:21px;font-weight:700}.ff-modal-content{position:relative;background-color:var(--popup-bg-color, #fff);border-radius:8px;background-clip:padding-box;max-height:calc(100vh - 150px);width:max(35vw,600px);box-shadow:0 6px 16px #00000014,0 3px 6px -4px #0000001f,0 9px 28px 8px #0000000d;padding:20px 24px}.ff-modal-zoom-enter,.ff-modal-zoom-appear{opacity:0;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-play-state:paused}.ff-modal-zoom-leave{animation-duration:.3s;animation-fill-mode:both;animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-play-state:paused}.ff-modal-zoom-enter.ff-modal-zoom-enter-active,.ff-modal-zoom-appear.ff-modal-zoom-appear-active{animation-name:rcDialogZoomIn;animation-play-state:running}.ff-modal-zoom-leave.ff-modal-zoom-leave-active{animation-name:rcDialogZoomOut;animation-play-state:running}@keyframes rcDialogZoomIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcDialogZoomOut{0%{transform:scale(1)}to{opacity:0;transform:scale(0)}}.ff-popup-close{cursor:pointer;border:0;background:transparent;font-size:24px;position:absolute;line-height:1;color:#000;opacity:.5}.ff-popup-close:disabled{pointer-events:none}.ff-popup-close:hover{opacity:.65}.ff-popup{display:flex;flex-direction:column}.ff-popup-header:has(.ff-popup-title),.ff-popup-header:has(.ff-popup-sub-title){margin-bottom:8px}.ff-popup-title,.ff-popup-sub-title{display:inline}.ff-popup-title{font-size:18px;font-weight:600}.ff-popup-footer{display:flex;gap:8px;justify-content:flex-end}.ff-popup-extras,.ff-popup-actions{display:flex;align-items:center;gap:8px}.ff-popup-extras{flex:1}.ff-popup-body{flex:1;overflow-y:auto} diff --git a/dist/user.js b/dist/user.js deleted file mode 100644 index fd1573d..0000000 --- a/dist/user.js +++ /dev/null @@ -1,13 +0,0 @@ -import "spark-md5"; -import "react/jsx-runtime"; -import "react"; -import "@ant-design/icons"; -import "classnames"; -import { P, Q, O, T, U } from "./common/main-DHW9LhcM.js"; -export { - P as checkUserToken, - Q as getUserInfo, - O as getUserToken, - T as login, - U as logout -}; diff --git a/dist/utils.js b/dist/utils.js deleted file mode 100644 index 28e427e..0000000 --- a/dist/utils.js +++ /dev/null @@ -1,5 +0,0 @@ -import "lodash"; -import { i } from "./common/main-DHW9LhcM.js"; -export { - i as getDefaultExpandRowKeys -}; diff --git a/package.json b/package.json index 5f8559a..0adaa50 100644 --- a/package.json +++ b/package.json @@ -1,60 +1,59 @@ { "name": "ff", "private": true, - "version": "0.2.2", + "version": "0.4.1", + "author": "www.fsdpf.com", "type": "module", - "files": [ - "dist/" - ], "main": "./dist/index.js", "exports": { ".": "./dist/index.js", - "./hooks": "./dist/hooks.js", - "./utils": "./dist/utils.js", - "./res-ws": "./dist/res-ws.js", - "./service": "./dist/service.js", - "./user": "./dist/user.js", - "./button": "./dist/button.js", - "./components": "./dist/components.js", - "./container": "./dist/container.js", - "./data-list": "./dist/data-list.js", - "./grid-layout": "./dist/grid-layout.js", - "./grid-layout-form": "./dist/grid-layout-form.js", - "./style.css": "./dist/style.css" + "./*": "./dist/*" }, "scripts": { + "start": "vite", "dev": "vite build --mode development", - "build": "vite build", - "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "build": "vite build" }, "dependencies": { - "nprogress": "^0.2.0" + "axios": "^1.7.2", + "ff-request": "git+https://git.fsdpf.net/npm/ff-request-dist.git", + "nprogress": "^0.2.0", + "spark-md5": "^3.0.2" }, "peerDependencies": { "antd": "^5.17.0", - "axios": "^1.5.0", "classnames": "^2.5.1", - "ff-request": "git+https://git.fsdpf.net/npm/ff-request-dist.git", "immutability-helper": "^3.1.1", "lodash": "^4.17.21", + "rc-dialog": "^9.5.2", + "rc-drawer": "^7.2.0", "rc-field-form": "^1.44.0", + "rc-notification": "^5.6.0", "rc-util": "^5.41.0", "react": "^18.2.0", - "spark-md5": "^3.0.2", "react-dom": "^18.2.0", - "react-router-dom": "^6.22.3" + "react-router-dom": "6.21.2" }, "devDependencies": { "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", "@vitejs/plugin-react": "^4.2.1", - "eslint": "^8.57.0", - "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.6", + "classnames": "^2.5.1", "less": "^4.2.0", + "mockjs": "^1.1.0", + "prop-types": "^15.8.1", "rollup-plugin-copy": "^3.5.0", - "vite": "^5.2.0" + "rollup-plugin-terser": "^7.0.2", + "vite": "^5.2.0", + "vite-plugin-mock": "^3.0.2" + }, + "build": { + "external": [ + "react", + "react-dom", + "react-is", + "react/jsx-runtime", + "prop-types" + ] } }