This commit is contained in:
what 2025-01-03 21:19:20 +08:00
parent f1a8379d80
commit 9bae3c3b4b
18 changed files with 275 additions and 274 deletions

2
dist/button.js vendored
View File

@ -1,4 +1,4 @@
import { a4 as s, a3 as u, a5 as e } from "./common/main-BsGJOUs_.js"; import { a4 as s, a3 as u, a5 as e } from "./common/main-CH2QjgF5.js";
export { export {
s as auth, s as auth,
u as default, u as default,

View File

@ -2,8 +2,8 @@ var Pi = Object.defineProperty;
var Et = (e) => { var Et = (e) => {
throw TypeError(e); throw TypeError(e);
}; };
var Ti = (e, t, i) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i; var $i = (e, t, i) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
var S = (e, t, i) => Ti(e, typeof t != "symbol" ? t + "" : t, i), Ot = (e, t, i) => t.has(e) || Et("Cannot " + i); var S = (e, t, i) => $i(e, typeof t != "symbol" ? t + "" : t, i), Ot = (e, t, i) => t.has(e) || Et("Cannot " + i);
var y = (e, t, i) => (Ot(e, t, "read from private field"), i ? i.call(e) : t.get(e)), F = (e, t, i) => t.has(e) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), U = (e, t, i, n) => (Ot(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i); var y = (e, t, i) => (Ot(e, t, "read from private field"), i ? i.call(e) : t.get(e)), F = (e, t, i) => t.has(e) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), U = (e, t, i, n) => (Ot(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i);
var Lt = (e, t, i, n) => ({ var Lt = (e, t, i, n) => ({
set _(r) { set _(r) {
@ -14,7 +14,7 @@ var Lt = (e, t, i, n) => ({
} }
}); });
import { jsx as d, jsxs as O } from "react/jsx-runtime"; import { jsx as d, jsxs as O } from "react/jsx-runtime";
import k, { useEffect as L, useState as N, useCallback as Y, useMemo as H, useRef as q, useContext as oe, useId as Le, isValidElement as $i, useLayoutEffect as Ni } from "react"; import k, { useEffect as L, useState as N, useCallback as Y, useMemo as H, useRef as q, useContext as oe, useId as Le, isValidElement as Ti, useLayoutEffect as Ni } from "react";
import c from "lodash"; import c from "lodash";
import Jt from "immutability-helper"; import Jt from "immutability-helper";
import { Form as Ge, Input as Fi, Button as Xe, Pagination as Ri, Tree as Ei, Breadcrumb as Oi, Table as Li, Empty as Ai, Popconfirm as ji, Tooltip as Vi, Popover as Ii } from "antd"; import { Form as Ge, Input as Fi, Button as Xe, Pagination as Ri, Tree as Ei, Breadcrumb as Oi, Table as Li, Empty as Ai, Popconfirm as ji, Tooltip as Vi, Popover as Ii } from "antd";
@ -25,41 +25,41 @@ import { useParams as zi, generatePath as Di, createBrowserRouter as Bi, useInRo
import b from "prop-types"; import b from "prop-types";
import * as At from "react-is"; import * as At from "react-is";
import { useNotification as Wi } from "rc-notification"; import { useNotification as Wi } from "rc-notification";
import { N as Ee, a as Oe, T as gt, S as Hi } from "./vender-CP6je0ft.js"; import { N as Ee, a as Oe, P as gt, S as Hi } from "./vender-C0IfHU5B.js";
import "rc-util/lib/hooks/useMergedState"; import "rc-util/lib/hooks/useMergedState";
import Ki from "rc-drawer"; import Ki from "rc-drawer";
import Ji from "rc-dialog"; import Ji from "rc-dialog";
var Te, Ve, $e, ce, ke, xe; var $e, Ve, Te, ce, ke, xe;
class Yt { class Yt {
constructor(t, i) { constructor(t, i) {
F(this, Te, /* @__PURE__ */ new Map()); F(this, $e, /* @__PURE__ */ new Map());
F(this, Ve, !0); F(this, Ve, !0);
F(this, $e, []); F(this, Te, []);
F(this, ce); F(this, ce);
F(this, ke, () => y(this, ce)); F(this, ke, () => y(this, ce));
F(this, xe, () => Promise.resolve()); F(this, xe, () => Promise.resolve());
S(this, "get", (...t) => new Promise((i, n) => { S(this, "get", (...t) => new Promise((i, n) => {
const r = JSON.stringify(t); const r = JSON.stringify(t);
if (y(this, Te).has(r)) return i(y(this, xe).call(this, y(this, ce), ...t)); if (y(this, $e).has(r)) return i(y(this, xe).call(this, y(this, ce), ...t));
if (y(this, ce) === void 0) y(this, $e).push([t, i, n]), y(this, Ve) && (U(this, Ve, !1), Promise.resolve(typeof y(this, ke) == "function" ? y(this, ke).call(this) : y(this, ke)).then((a) => U(this, ce, a || null)).finally(() => { if (y(this, ce) === void 0) y(this, Te).push([t, i, n]), y(this, Ve) && (U(this, Ve, !1), Promise.resolve(typeof y(this, ke) == "function" ? y(this, ke).call(this) : y(this, ke)).then((a) => U(this, ce, a || null)).finally(() => {
y(this, $e).forEach(([a, o, s]) => { y(this, Te).forEach(([a, o, s]) => {
try { try {
const l = y(this, xe).call(this, y(this, ce), ...a); const l = y(this, xe).call(this, y(this, ce), ...a);
y(this, Te).set(JSON.stringify(a), l), o(l); y(this, $e).set(JSON.stringify(a), l), o(l);
} catch (l) { } catch (l) {
s(l); s(l);
} }
}), y(this, $e).length = 0; }), y(this, Te).length = 0;
})); }));
else { else {
const a = y(this, xe).call(this, y(this, ce), ...t); const a = y(this, xe).call(this, y(this, ce), ...t);
y(this, Te).set(r, a), i(a); y(this, $e).set(r, a), i(a);
} }
})); }));
U(this, xe, i), U(this, ke, t); U(this, xe, i), U(this, ke, t);
} }
} }
Te = new WeakMap(), Ve = new WeakMap(), $e = new WeakMap(), ce = new WeakMap(), ke = new WeakMap(), xe = new WeakMap(); $e = new WeakMap(), Ve = new WeakMap(), Te = new WeakMap(), ce = new WeakMap(), ke = new WeakMap(), xe = new WeakMap();
const ar = () => d("div", { children: "Empty" }), qe = k.createContext({ ele: {}, mount: () => { const ar = () => d("div", { children: "Empty" }), qe = k.createContext({ ele: {}, mount: () => {
}, unmount: () => { }, unmount: () => {
} }), G = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => { } }), G = ({ rootClassName: e, className: t, children: i, actions: n, title: r, subTitle: a, extras: o, style: s = {} }) => {
@ -249,13 +249,13 @@ const Xi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
const h = c.get(u, "__PARENT_ID__", ""), m = c.get(u, i, c.get(u, [n, i], "")), f = c.findIndex(o.current, ["__PARENT_ID__", h]), C = c.findIndex(f > -1 ? c.get(o.current, [f, "children"]) : o.current, [i, m]); const h = c.get(u, "__PARENT_ID__", ""), m = c.get(u, i, c.get(u, [n, i], "")), f = c.findIndex(o.current, ["__PARENT_ID__", h]), C = c.findIndex(f > -1 ? c.get(o.current, [f, "children"]) : o.current, [i, m]);
if (C === -1) return (g = e.onReload) == null ? void 0 : g.call(e); if (C === -1) return (g = e.onReload) == null ? void 0 : g.call(e);
Promise.all([E.get(`/api/${t}/detail/${m}`), E.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([w, v]) => { Promise.all([E.get(`/api/${t}/detail/${m}`), E.post(`/api/${t}/list-operations-access`, { ids: m })]).then(([w, v]) => {
const $ = c.get(o.current, f > -1 ? [f, "children", C, "children"] : [C, "children"]); const T = c.get(o.current, f > -1 ? [f, "children", C, "children"] : [C, "children"]);
o.current = Jt(o.current, f > -1 ? { [f]: { children: { $splice: [[C, 1, { ...w, children: $ }]] } } } : { $splice: [[C, 1, { ...w, children: $ }]] }); o.current = Jt(o.current, f > -1 ? { [f]: { children: { $splice: [[C, 1, { ...w, children: T }]] } } } : { $splice: [[C, 1, { ...w, children: T }]] });
const T = new Map(v); const $ = new Map(v);
s.current.forEach((z, M) => { s.current.forEach((z, M) => {
var B; var B;
(B = T.get(M)) != null && B.some((A) => A == m) || s.current.set(M, z.filter((A) => A !== m)); (B = $.get(M)) != null && B.some((A) => A == m) || s.current.set(M, z.filter((A) => A !== m));
}), T.forEach((z, M) => { }), $.forEach((z, M) => {
s.current.has(M) ? s.current.set(M, c.uniq([...s.current.get(M) || [], ...z])) : s.current.set(M, z); s.current.has(M) ? s.current.set(M, c.uniq([...s.current.get(M) || [], ...z])) : s.current.set(M, z);
}); });
}).then(() => { }).then(() => {
@ -274,12 +274,12 @@ const Xi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
}, [e, t]); }, [e, t]);
const s = H(() => c.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); const s = H(() => c.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]);
return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, u) => o({ page: l, pageSize: u }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, u) => o({ keyword: u, condition: Jt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o }); return Object.assign(s, { onTabChange: (l) => o({ tab: l, page: 1 }), onPageChange: (l, u) => o({ page: l, pageSize: u }), onPageSizeChange: (l) => o({ pageSize: l, page: 1 }), onConditionChange: (l, u) => o({ keyword: u, condition: Jt(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => o({ sider: l, page: 1 }), onKeywordChange: (l) => o({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: a.current, onReload: o });
}, en = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, itemGridLayout: m, $setting: f, tabs: C, isConditionFormLayout: w, isTreeSider: v, treeSiderConfig: $ }) => { }, en = ({ listCode: e, className: t, layouts: i, dataSource: n, isPaginate: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, itemGridLayout: m, $setting: f, tabs: C, isConditionFormLayout: w, isTreeSider: v, treeSiderConfig: T }) => {
const { classNames: T, onClickCallback: z } = oe(ee), M = ri(l, u, g, p), B = Y((A, j, x) => d(tn, { className: I("ff-data-list-framework-item", T.item), operations: a ? M(j) : [], data: p ? { [p]: j } : j, children: A, onClickCallback: z }), [p, g, a, z, l, u]); const { classNames: $, onClickCallback: z } = oe(ee), M = ri(l, u, g, p), B = Y((A, j, x) => d(tn, { className: I("ff-data-list-framework-item", $.item), operations: a ? M(j) : [], data: p ? { [p]: j } : j, children: A, onClickCallback: z }), [p, g, a, z, l, u]);
return O("div", { className: I("ff-data-list-framework", t), children: [d(i.sider, { isTreeSider: v, ...$ }), O("div", { className: I("ff-data-list-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: w }), d(i.toolbar, { title: h, tabs: C }), d(mn, { ...m, style: { "--col-num": (f == null ? void 0 : f.colNum) || 1 }, primaryKey: g, itemRender: B, dataSource: n }), d(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] }); return O("div", { className: I("ff-data-list-framework", t), children: [d(i.sider, { isTreeSider: v, ...T }), O("div", { className: I("ff-data-list-container", $ == null ? void 0 : $.container), children: [d(i.filter, { isConditionFormLayout: w }), d(i.toolbar, { title: h, tabs: C }), d(mn, { ...m, style: { "--col-num": (f == null ? void 0 : f.colNum) || 1 }, primaryKey: g, itemRender: B, dataSource: n }), d(i.footer, { isPaginate: r, isOperations: o, operations: s })] })] });
}, tn = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => d("span", { className: "data-list-grid-layout-item-action", children: d(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Le()) }, (a == null ? void 0 : a.uuid) || Le())) })] }), nn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, tabs: m, isPaginate: f, isTreeSider: C, treeSiderConfig: w, isConditionFormLayout: v, ...$ }) => { }, tn = ({ className: e, operations: t, children: i, data: n, onClickCallback: r }) => O("div", { className: I("data-list-grid-layout-item-container", e), children: [i, !!(t != null && t.length) && d("div", { className: "data-list-grid-layout-item-actions", children: t.map((a) => d("span", { className: "data-list-grid-layout-item-action", children: d(P.Link, { uuid: a.uuid, type: a.type, name: a.name, widget: a.widget, widgetType: a.widgetType, widgetProps: a.widgetProps, widgetSetting: a.widgetSetting, widgetContainerProps: a.widgetContainerSetting, data: n, confirm: a.confirm, onAfterClick: (o) => o !== !1 && (r == null ? void 0 : r(a.isRefresh, n)) }, a.uuid || Le()) }, (a == null ? void 0 : a.uuid) || Le())) })] }), nn = ({ listCode: e, className: t, layouts: i, dataSource: n, columns: r, isItemOperations: a, isBatchOperations: o, batchOperations: s, itemOperations: l, itemOperationsAccess: u, resource: p, primaryKey: g, title: h, tabs: m, isPaginate: f, isTreeSider: C, treeSiderConfig: w, isConditionFormLayout: v, ...T }) => {
const { classNames: T, onClickCallback: z } = oe(ee), M = ri(l, u, g, p), B = ht(n, l, u, g, p); const { classNames: $, onClickCallback: z } = oe(ee), M = ri(l, u, g, p), B = ht(n, l, u, g, p);
return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", T == null ? void 0 : T.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: h, tabs: m }), d(cn, { ...$, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: B ? (A) => { return O("div", { className: I("ff-data-table-framework", t), children: [d(i.sider, { isTreeSider: C, ...w }), O("div", { className: I("ff-data-table-container", $ == null ? void 0 : $.container), children: [d(i.filter, { isConditionFormLayout: v }), d(i.toolbar, { title: h, tabs: m }), d(cn, { ...T, primaryKey: g, className: "ff-data-table-content", columns: r, dataSource: n, operationRender: B ? (A) => {
var j; var j;
return d("div", { className: "ff-data-table-actions", children: (j = M(A)) == null ? void 0 : j.map((x, R) => d(P.Link, { size: "small", uuid: x.uuid, type: x.type, name: x.name, widget: x.widget, widgetType: x.widgetType, widgetProps: x.widgetProps, widgetData: x.widgetData, widgetSetting: x.widgetSetting, widgetContainerProps: x.widgetContainerSetting, data: A, confirm: x.confirm, onAfterClick: (V) => V !== !1 && (z == null ? void 0 : z(x.isRefresh, A)) }, x.uuid || R)) }); return d("div", { className: "ff-data-table-actions", children: (j = M(A)) == null ? void 0 : j.map((x, R) => d(P.Link, { size: "small", uuid: x.uuid, type: x.type, name: x.name, widget: x.widget, widgetType: x.widgetType, widgetProps: x.widgetProps, widgetData: x.widgetData, widgetSetting: x.widgetSetting, widgetContainerProps: x.widgetContainerSetting, data: A, confirm: x.confirm, onAfterClick: (V) => V !== !1 && (z == null ? void 0 : z(x.isRefresh, A)) }, x.uuid || R)) });
} : null }), d(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] }); } : null }), d(i.footer, { isPaginate: f, isOperations: o, operations: s })] })] });
@ -299,8 +299,8 @@ const Xi = (e, t = {}) => H(() => e == null ? void 0 : e.map(({ widgetByJs: i, w
var h, m; var h, m;
const [i, n] = N({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = k.useContext(ee), { keyword: u, condition: p } = (s == null ? void 0 : s()) || {}, [g] = Ge.useForm(); const [i, n] = N({}), { listCode: r, onKeywordChange: a, onConditionChange: o, getBase62params: s, classNames: l } = k.useContext(ee), { keyword: u, condition: p } = (s == null ? void 0 : s()) || {}, [g] = Ge.useForm();
return L(() => { return L(() => {
r && t && E.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: C, marginY: w, rowHeight: v, cols: $, fields: T }) => { r && t && E.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: f, marginX: C, marginY: w, rowHeight: v, cols: T, fields: $ }) => {
n({ resource: f, itemMargin: [C, w], rowHeight: v, cols: $, fields: T }); n({ resource: f, itemMargin: [C, w], rowHeight: v, cols: T, fields: $ });
}).catch(() => n({})); }).catch(() => n({}));
}, [r, t]), L(() => { }, [r, t]), L(() => {
g.setFieldsValue({ keyword: u, ...p }); g.setFieldsValue({ keyword: u, ...p });
@ -325,18 +325,18 @@ const an = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
}, ln = ({ className: e, title: t, tabs: i }) => { }, ln = ({ className: e, title: t, tabs: i }) => {
const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = oe(ee), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Mi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); const { getBase62params: n, onTabChange: r, onReload: a, classNames: o } = oe(ee), { tab: s } = (n == null ? void 0 : n()) || {}, [l, u] = Mi((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r });
return O("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Oi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: g, value: h }) => d("span", { onClick: () => u(h ?? g), className: I("ff-data-list-tab", { active: (h ?? g) == l }), children: p }), items: i }), O("div", { className: "ff-data-list-actions", children: [d(P.Link, { icon: "icon-reload", widget: () => a() }), d(P.Link, { icon: "icon-setting" })] })] }); return O("div", { className: I("ff-data-list-toolbar", o.toolbar, e), children: [d("div", { className: "ff-data-list-title", children: t }), d(Oi, { className: "ff-data-list-tabs", itemRender: ({ label: p, code: g, value: h }) => d("span", { onClick: () => u(h ?? g), className: I("ff-data-list-tab", { active: (h ?? g) == l }), children: p }), items: i }), O("div", { className: "ff-data-list-actions", children: [d(P.Link, { icon: "icon-reload", widget: () => a() }), d(P.Link, { icon: "icon-setting" })] })] });
}, oi = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: g, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: w, sider: v, onSiderChange: $, layouts: T, classNames: z = {}, ...M }) => { }, oi = ({ isItemGridLayout: e, theme: t, themeProps: i, onClickCallback: n, onReload: r, listCode: a, total: o = 0, page: s = 0, onPageChange: l, pageSize: u = 30, onPageSizeChange: p, tab: g, onTabChange: h, keyword: m, onKeywordChange: f, condition: C, onConditionChange: w, sider: v, onSiderChange: T, layouts: $, classNames: z = {}, ...M }) => {
const [B, A] = N(), j = H(() => { const [B, A] = N(), j = H(() => {
let x = { sider: on, filter: si, footer: an, toolbar: ln }; let x = { sider: on, filter: si, footer: an, toolbar: ln };
T === !1 ? x = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject(T) && (x = Object.assign({}, x, T)); $ === !1 ? x = { sider: null, filter: null, footer: null, toolbar: null } : c.isPlainObject($) && (x = Object.assign({}, x, $));
for (const R in x) if (x[R]) { for (const R in x) if (x[R]) {
if ($i(x[R])) { if (Ti(x[R])) {
const V = x[R]; const V = x[R];
x[R] = (W) => k.cloneElement(V, W); x[R] = (W) => k.cloneElement(V, W);
} }
} else x[R] = () => d(k.Fragment, {}); } else x[R] = () => d(k.Fragment, {});
return x; return x;
}, [T]); }, [$]);
return L(() => { return L(() => {
t ? se.getWidgetComponent(t).then((x) => { t ? se.getWidgetComponent(t).then((x) => {
if (!x) throw `${t} not found`; if (!x) throw `${t} not found`;
@ -345,7 +345,7 @@ const an = ({ className: e, operations: t, isOperations: i, isPaginate: n }) =>
}, [t, i]), d(ee.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: (x, R) => { }, [t, i]), d(ee.Provider, { value: { classNames: z, listCode: a, onClickCallback: n, onReload: r, getBase62params: (x, R) => {
const V = { tab: g, page: s, pageSize: u, keyword: m, sider: v, condition: C, total: o }; const V = { tab: g, page: s, pageSize: u, keyword: m, sider: v, condition: C, total: o };
return x && x != "init" ? c.get(V, x, R) : V; return x && x != "init" ? c.get(V, x, R) : V;
}, onPageChange: l, onPageSizeChange: p, onTabChange: h, onSiderChange: $, onKeywordChange: f, onConditionChange: w }, children: B && k.cloneElement(B, M) }); }, onPageChange: l, onPageSizeChange: p, onTabChange: h, onSiderChange: T, onKeywordChange: f, onConditionChange: w }, children: B && k.cloneElement(B, M) });
}; };
oi.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]) }), b.bool]) }; oi.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]) }), b.bool]) };
var me, de, ve, it; var me, de, ve, it;
@ -373,13 +373,13 @@ const ne = class ne {
me = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), it = new WeakMap(), F(ne, me, null), S(ne, "getInstance", () => (y(ne, me) || U(ne, me, new ne()), y(ne, me))); me = new WeakMap(), de = new WeakMap(), ve = new WeakMap(), it = new WeakMap(), F(ne, me, null), S(ne, "getInstance", () => (y(ne, me) || U(ne, me, new ne()), y(ne, me)));
let ft = ne; let ft = ne;
const li = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => { const li = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t, className: i, theme: n, themeProps: r, layouts: a, classNames: o }, s) => {
const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: g = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: $, itemGridLayout: T, title: z, isPaginate: M, tabs: B }, A] = N({ isItemGridLayout: !1, itemGridLayout: {} }), j = Zi(e, t), [{ dataSource: x, itemOperationsAccess: R, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, onReload: lt }, Rt] = Qi(j, e, u, l), xi = ht(g, x, R, u), vi = ht(p); const [{ resource: l, primaryKey: u, batchOperations: p = [], itemOperations: g = [], columns: h = [], themeConfig: m, theme: f, isConditionFormLayout: C = !1, isTreeSider: w, treeSiderConfig: v, isItemGridLayout: T, itemGridLayout: $, title: z, isPaginate: M, tabs: B }, A] = N({ isItemGridLayout: !1, itemGridLayout: {} }), j = Zi(e, t), [{ dataSource: x, itemOperationsAccess: R, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, onReload: lt }, Rt] = Qi(j, e, u, l), xi = ht(g, x, R, u), vi = ht(p);
return L(() => { return L(() => {
let Ke = null; let Ke = null;
return e && E.get(`/api/_/${e}`).resp(({ data: Je, res: Si }) => { return e && E.get(`/api/_/${e}`).resp(({ data: Je, res: Si }) => {
Je != null && Je.isDynamicRefresh && (Ke = li.subscribe(() => lt(), Si)), A(Je); Je != null && Je.isDynamicRefresh && (Ke = li.subscribe(() => lt(), Si)), A(Je);
}).catch(() => A({})), () => Ke == null ? void 0 : Ke(); }).catch(() => A({})), () => Ke == null ? void 0 : Ke();
}, [e]), k.useImperativeHandle(s, () => ({ onReload: lt, onClickCallback: Rt })), d(oi, { listCode: e, title: z, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: w, treeSiderConfig: v, isPaginate: M, tabs: B, isItemOperations: xi, isBatchOperations: vi, batchOperations: p, itemOperations: g, isItemGridLayout: $, columns: h, itemGridLayout: T, isConditionFormLayout: C, itemOperationsAccess: R, dataSource: x, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Rt }); }, [e]), k.useImperativeHandle(s, () => ({ onReload: lt, onClickCallback: Rt })), d(oi, { listCode: e, title: z, classNames: o, layouts: a, resource: l, primaryKey: u, theme: n || f, themeProps: r || m, isTreeSider: w, treeSiderConfig: v, isPaginate: M, tabs: B, isItemOperations: xi, isBatchOperations: vi, batchOperations: p, itemOperations: g, isItemGridLayout: T, columns: h, itemGridLayout: $, isConditionFormLayout: C, itemOperationsAccess: R, dataSource: x, onConditionChange: ot, onTabChange: Ft, onKeywordChange: wi, onPageChange: bi, onPageSizeChange: Ci, onSiderChange: ki, condition: V, tab: W, keyword: le, page: Se, total: K, pageSize: st, sider: He, className: I("ff-data-list-helper", i), onReload: lt, onClickCallback: Rt });
}), ci = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(ci(r.children, t, i)) : n), []) : [], cn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => { }), ci = (e, t, i = !0) => i !== !0 && i-- <= 0 ? [] : c.isArray(e) && !c.isEmpty(e) ? e.reduce((n, r) => (Reflect.has(r, t) && Reflect.has(r, "children") && n.push(r[t]), Reflect.has(r, "children") && !c.isEmpty(r.children) ? n.concat(ci(r.children, t, i)) : n), []) : [], cn = ({ className: e, primaryKey: t, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: a = 180, ...o }) => {
const { classNames: s } = oe(ee); const { classNames: s } = oe(ee);
Le(); Le();
@ -420,10 +420,10 @@ const li = ft.getInstance(), St = k.forwardRef(({ listCode: e, base62params: t,
}, [r]), a; }, [r]), a;
}, pn = (e, t = {}, i = null) => (n) => { }, pn = (e, t = {}, i = null) => (n) => {
const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, value: h, ...m } = c.merge({}, t, n), [f, C] = un(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, i), w = H(() => { const { code: r, label: a, extras: o, isVirtual: s, initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, value: h, ...m } = c.merge({}, t, n), [f, C] = un(s ? null : r, { initialValue: l, initialValueLanguage: u, convertJs: p, convertJsSetting: g, type: (m == null ? void 0 : m.type) || "string" }, i), w = H(() => {
const T = Object.keys((t == null ? void 0 : t.extras) || {}); const $ = Object.keys((t == null ? void 0 : t.extras) || {});
return c.over([c.partialRight(c.pick, T), c.partialRight(c.omit, T)]); return c.over([c.partialRight(c.pick, $), c.partialRight(c.omit, $)]);
}, [t == null ? void 0 : t.extras]), [v, $] = w(m); }, [t == null ? void 0 : t.extras]), [v, T] = w(m);
return d(e, { ...$, value: f, rawValue: C, $setting: Object.assign({}, o, v) }); return d(e, { ...T, value: f, rawValue: C, $setting: Object.assign({}, o, v) });
}, ui = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...u }) => { }, ui = ({ className: e, cols: t = 12, rowHeight: i = 21, containerPadding: n = [0, 0], itemMargin: r = [4, 0], formProps: a = {}, fields: o = [], data: s, basicForm: l = null, ...u }) => {
const [p] = Z.useForm(), g = di(o, gn, l), h = H(() => [{ name: "__PROPS__", value: a }], [a]); const [p] = Z.useForm(), g = di(o, gn, l), h = H(() => [{ name: "__PROPS__", value: a }], [a]);
return Ue(() => (p.setFieldsValue(s), () => p.resetFields()), [s]), d(Z, { fields: h, form: p, component: !1, children: d("div", { ...u, className: I("ff-grid-layout", e), 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": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: g }) }); return Ue(() => (p.setFieldsValue(s), () => p.resetFields()), [s]), d(Z, { fields: h, form: p, component: !1, children: d("div", { ...u, className: I("ff-grid-layout", e), 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": `${(n == null ? void 0 : n[0]) || 0}px`, "--grid-layout-container-padding-x": `${(n == null ? void 0 : n[1]) || 0}px`, "--grid-layout-cols": t, "--grid-layout-row-height": `${i}px` }, children: g }) });
@ -518,7 +518,7 @@ const re = class re {
const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => se.getWidgetComponent(s).then((u) => u.default || function() { const i = Ae.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ae.get(se.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, a = (s, l) => () => se.getWidgetComponent(s).then((u) => u.default || function() {
return `${s}`; return `${s}`;
}).then((u) => ({ Component: () => k.createElement(Xt, {}, k.createElement(u, l)) })), o = Array.from(y(this, X).values()).reduce((s, { uuid: l, uri: u, name: p, type: g, component: h, widgetSetting: m, isLogin: f, isLayout: C, extra: w }) => { }).then((u) => ({ Component: () => k.createElement(Xt, {}, k.createElement(u, l)) })), o = Array.from(y(this, X).values()).reduce((s, { uuid: l, uri: u, name: p, type: g, component: h, widgetSetting: m, isLogin: f, isLayout: C, extra: w }) => {
let v = {}, $ = 0; let v = {}, T = 0;
switch (g) { switch (g) {
case "list": case "list":
v.element = k.createElement(hn, { component: h }); v.element = k.createElement(hn, { component: h });
@ -528,9 +528,9 @@ const re = class re {
} }
if (w != null && w.layout) { if (w != null && w.layout) {
if (!r[w == null ? void 0 : w.layout]) return r[w == null ? void 0 : w.layout] = s.length, [...s, { path: "/", lazy: a(w == null ? void 0 : w.layout, {}), children: [{ path: u, ...v }] }]; if (!r[w == null ? void 0 : w.layout]) return r[w == null ? void 0 : w.layout] = s.length, [...s, { path: "/", lazy: a(w == null ? void 0 : w.layout, {}), children: [{ path: u, ...v }] }];
$ = r[w == null ? void 0 : w.layout]; T = r[w == null ? void 0 : w.layout];
} }
return C && $ > -1 ? (s[$].children.push({ path: u, ...v }), s) : [...s, { path: u, ...v }]; return C && T > -1 ? (s[T].children.push({ path: u, ...v }), s) : [...s, { path: u, ...v }];
}, [{ path: "/", lazy: a(i, {}), children: [] }]); }, [{ path: "/", lazy: a(i, {}), children: [] }]);
return o.push({ index: !0, element: k.createElement(wn, { to: n, replace: !0 }) }), U(this, ye, Bi(o, t)); return o.push({ index: !0, element: k.createElement(wn, { to: n, replace: !0 }) }), U(this, ye, Bi(o, t));
}); });
@ -705,13 +705,13 @@ const Ce = wt.getInstance(), rt = () => {
s && se.getWidgetComponent(s).then(({ defaultProps: g = {}, default: h }) => ({ default: Sn(h, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => p(k.createElement(g.default, a))); s && se.getWidgetComponent(s).then(({ defaultProps: g = {}, default: h }) => ({ default: Sn(h, g, r) })).catch((g) => ({ default: () => `${g}` })).then((g) => p(k.createElement(g.default, a)));
}, [s]), u && k.cloneElement(u, { ...a, ...l }); }, [s]), u && k.cloneElement(u, { ...a, ...l });
}, Sn = (e, t = {}, i = null) => (n) => { }, Sn = (e, t = {}, i = null) => (n) => {
const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: p, validators: g, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: w, ...v } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), $ = Cn(Object.assign({}, g, u ? { required: !0 } : {}), a, r), T = H(() => { const { type: r, code: a, label: o, noStyle: s, placeholder: l, required: u = !1, extras: p, validators: g, help: h, isVirtual: m, $isReserved: f, initialValue: C, initialValueLanguage: w, ...v } = c.omit(c.merge({}, t, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), T = Cn(Object.assign({}, g, u ? { required: !0 } : {}), a, r), $ = H(() => {
const j = Object.keys((t == null ? void 0 : t.extras) || {}); const j = Object.keys((t == null ? void 0 : t.extras) || {});
return c.over([c.partialRight(c.pick, j), c.partialRight(c.omit, j)]); return c.over([c.partialRight(c.pick, j), c.partialRight(c.omit, j)]);
}, [t == null ? void 0 : t.extras]), [z, M] = T(v), B = { label: o, noStyle: s, colon: !1, layout: "vertical" }, A = Y((j) => j == null ? void 0 : Q(j, r), [r]); }, [t == null ? void 0 : t.extras]), [z, M] = $(v), B = { label: o, noStyle: s, colon: !1, layout: "vertical" }, A = Y((j) => j == null ? void 0 : Q(j, r), [r]);
return d(Gt, { name: a, rules: $, initialValue: A(C), normalize: A, children: (j, x, R) => { return d(Gt, { name: a, rules: T, initialValue: A(C), normalize: A, children: (j, x, R) => {
var V; var V;
return d(e, { type: r, rcform: R, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: h, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = $ == null ? void 0 : $[0]) == null ? void 0 : V.required) || !1, ...B }, fieldProps: { placeholder: l, ...M, ...j }, $setting: Object.assign({}, p, z) }); return d(e, { type: r, rcform: R, basicForm: i, itemProps: { validateStatus: x.errors.length > 0 ? "error" : "success", tooltip: h, help: x.errors.length > 0 ? x.errors.join("、") : null, required: ((V = T == null ? void 0 : T[0]) == null ? void 0 : V.required) || !1, ...B }, fieldProps: { placeholder: l, ...M, ...j }, $setting: Object.assign({}, p, z) });
} }); } });
}, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => { }, Pt = ({ cols: e = 24, rowHeight: t = 16, itemMargin: i = [8, 16], containerPadding: n = [0, 0], fields: r = [], children: a, basicForm: o = null }) => {
const s = di(r, mi, o); const s = di(r, mi, o);
@ -720,10 +720,10 @@ const Ce = wt.getInstance(), rt = () => {
Pt.propTypes = { fields: b.array }; Pt.propTypes = { fields: b.array };
const Pn = (Bt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: p, onValuesChange: g = () => { const Pn = (Bt = Pt, ({ code: e, layout: t, name: i, primaryKey: n = 0, style: r = {}, formProps: a = {}, form: o, basicForm: s, isPreview: l = !1, className: u, onFinish: p, onValuesChange: g = () => {
}, ...h }) => { }, ...h }) => {
const { align: m, autoComplete: f, resource: C, items: w, hides: v, rowHeight: $, marginX: T, marginY: z, cols: M, listenChangeFields: B, listenChangeFieldsFunc: A, pk: j, uuid: x } = bn(e), [R] = Z.useForm(o), V = H(() => [{ name: "__PK__", value: j }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: x }, { name: "__PRIMARY_KEY__", value: n }], [j, e, x, C, n, a]); const { align: m, autoComplete: f, resource: C, items: w, hides: v, rowHeight: T, marginX: $, marginY: z, cols: M, listenChangeFields: B, listenChangeFieldsFunc: A, pk: j, uuid: x } = bn(e), [R] = Z.useForm(o), V = H(() => [{ name: "__PK__", value: j }, { name: "__PROPS__", value: a }, { name: "__RESOURCE__", value: C }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: x }, { name: "__PRIMARY_KEY__", value: n }], [j, e, x, C, n, a]);
return O(Z, { className: u, name: i || e, layout: t || m, fields: V, form: R, autoComplete: f, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (W, le) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Ft }) => { return O(Z, { className: u, name: i || e, layout: t || m, fields: V, form: R, autoComplete: f, style: { ...r, position: "relative" }, onFinish: p, onValuesChange: (W, le) => (({ changedValues: Se, allValues: K, listenChangeFields: st, listenChangeFieldsFunc: He, onValuesChange: ot, code: Ft }) => {
ot(Se, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: Se, allValues: K }, { getFieldValue: R.getFieldValue, setFieldValue: R.setFieldValue, setFieldsValue: R.setFieldsValue, isFieldTouched: R.isFieldTouched, isFieldsTouched: R.isFieldsTouched }); ot(Se, K), He && Array.isArray(st) && Ce.exec(He, { changedValues: Se, allValues: K }, { getFieldValue: R.getFieldValue, setFieldValue: R.setFieldValue, setFieldsValue: R.setFieldsValue, isFieldTouched: R.isFieldTouched, isFieldsTouched: R.isFieldsTouched });
})({ changedValues: W, allValues: le, listenChangeFields: B, listenChangeFieldsFunc: A, onValuesChange: g, code: e }), children: [d(Bt, { ...h, form: R, basicForm: s, code: e, fields: w, cols: M, rowHeight: $, itemMargin: [T, z] }), v == null ? void 0 : v.map((W) => { })({ changedValues: W, allValues: le, listenChangeFields: B, listenChangeFieldsFunc: A, onValuesChange: g, code: e }), children: [d(Bt, { ...h, form: R, basicForm: s, code: e, fields: w, cols: M, rowHeight: T, itemMargin: [$, z] }), v == null ? void 0 : v.map((W) => {
var le; var le;
return d(Gt, { name: W.code, children: d(vn, { form: R, basicForm: s, name: W.code, type: W.type, initialValue: W.initialValue, initialValueLanguage: (le = W.extras) == null ? void 0 : le.initialValueLanguage }) }, JSON.stringify(W.code)); return d(Gt, { name: W.code, children: d(vn, { form: R, basicForm: s, name: W.code, type: W.type, initialValue: W.initialValue, initialValueLanguage: (le = W.extras) == null ? void 0 : le.initialValueLanguage }) }, JSON.stringify(W.code));
})] }, e); })] }, e);
@ -749,7 +749,7 @@ const hi = ({ $setting: e, $close: t, extras: i, code: n, primaryKey: r, ...a })
} }
}, Ct = ({ className: e, type: t, style: i = {}, ...n }) => d("span", { role: "img", className: I("ff-iconfont", e), style: i, ...n, children: d("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: d("use", { xlinkHref: `#${t}` }) }) }); }, Ct = ({ className: e, type: t, style: i = {}, ...n }) => d("span", { role: "img", className: I("ff-iconfont", e), style: i, ...n, children: d("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: d("use", { xlinkHref: `#${t}` }) }) });
Ct.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, Ct.init = bt; Ct.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, Ct.init = bt;
const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t, { replace: n }), $n = (e, t = {}, i, n = {}) => { const $n = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t, { replace: n }), Tn = (e, t = {}, i, n = {}) => {
var a; var a;
const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, u]) => { const r = (a = n.router) == null ? void 0 : a.reduce((o, [s, l, u]) => {
const p = c.get(t, ["router", s]); const p = c.get(t, ["router", s]);
@ -766,7 +766,7 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
const l = oe(ee), [u, p] = N({ leading: !0, trailing: !1 }), g = H(() => { const l = oe(ee), [u, p] = N({ leading: !0, trailing: !1 }), g = H(() => {
switch (t) { switch (t) {
case "redirect": case "redirect":
return c.partialRight(Tn, e, r); return c.partialRight($n, e, r);
case "func": case "func":
return c.partialRight(Ut, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: p }); return c.partialRight(Ut, (r == null ? void 0 : r.code) ?? e, { status: u, setStatus: p });
case "fsdpf-component": case "fsdpf-component":
@ -776,7 +776,7 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
case "data-list": case "data-list":
return c.partialRight(Fn, e, r, a); return c.partialRight(Fn, e, r, a);
case "destroy": case "destroy":
return c.partialRight($n, e, r, a); return c.partialRight(Tn, e, r, a);
default: default:
if (Nt(e) || k.isValidElement(e)) return c.partialRight(Wt, e, r, a); if (Nt(e) || k.isValidElement(e)) return c.partialRight(Wt, e, r, a);
if (c.isFunction(e)) return c.partialRight(Ut, (r == null ? void 0 : r.code) || e, { status: u, setStatus: p }); if (c.isFunction(e)) return c.partialRight(Ut, (r == null ? void 0 : r.code) || e, { status: u, setStatus: p });
@ -788,8 +788,8 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
const s = { type: "primary", className: I("ff-button", i), iconPosition: r, size: a }; const s = { type: "primary", className: I("ff-button", i), iconPosition: r, size: a };
return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = d(Ct, { type: n })), t && (s.children = t), s; return e === "danger" ? s.danger = !0 : e === "default" && (s.type = e), o === "link" || o === "dashed" ? (s.type = o, e === "default" && (s.className = I(s.className, "ff-default"))) : o !== "circle" && o !== "round" || (s.shape = o), n && (s.icon = d(Ct, { type: n })), t && (s.children = t), s;
}, [o, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: g, loading: h, disabled: m, tooltip: f, confirm: C, widget: w = () => { }, [o, e, i, n, r]), We = (e) => function({ className: t, variant: i, children: n, name: r, icon: a, type: o = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: u, onBeforeClick: p, data: g, loading: h, disabled: m, tooltip: f, confirm: C, widget: w = () => {
}, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M, ...B }) { }, widgetType: v, widgetData: T, widgetProps: $, widgetSetting: z, widgetContainerProps: M, ...B }) {
const A = c.isEmpty(f) || !f.enabled ? {} : f, j = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = fi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [R, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: $, widgetProps: T, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p }); const A = c.isEmpty(f) || !f.enabled ? {} : f, j = c.isEmpty(C) ? { enabled: !1 } : Object.assign({ enabled: !0 }, C), x = fi({ className: t, name: r, type: o, icon: a, iconPosition: s }, i ?? e), [R, V] = N(!1), [W, { disabled: le, loading: Se }] = Rn({ widget: w, widgetType: v, widgetData: T, widgetProps: $, widgetSetting: z, widgetContainerProps: M }, { onAfterClick: u, onBeforeClick: p });
return d(ji, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...j, disabled: le || m, open: R, onOpenChange: (K) => { return d(ji, { okText: "确定", cancelText: "取消", getPopupContainer: (K) => K, ...j, disabled: le || m, open: R, onOpenChange: (K) => {
if (!K) return V(K); if (!K) return V(K);
j.enabled ? V(K) : W(g); j.enabled ? V(K) : W(g);
@ -800,37 +800,37 @@ const Tn = (e, t, i, { isReplaceRouteHistory: n = !1 } = {}) => ue.redirect(i, t
}, children: d(Vi, { getPopupContainer: (K) => K, ...A, title: R ? null : A == null ? void 0 : A.title, trigger: ["hover", "click"], children: d(Xe, { loading: Se || h, disabled: le || m, ...x, ...B, children: n || r }) }) }); }, children: d(Vi, { getPopupContainer: (K) => K, ...A, title: R ? null : A == null ? void 0 : A.title, trigger: ["hover", "click"], children: d(Xe, { loading: Se || h, disabled: le || m, ...x, ...B, children: n || r }) }) });
}, P = We("default"); }, P = We("default");
P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) }; P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) };
const En = We("link"), On = We("circle"), Ln = We("round"), An = We("dashed"), Tt = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: p }) => { const En = We("link"), On = We("circle"), Ln = We("round"), An = We("dashed"), $t = ({ data: e, widget: t, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: a, widgetContainerProps: o, onAfterClick: s, onBeforeClick: l, children: u, extras: p }) => {
const g = oe(ee), [h, m] = N(!1), [f, C] = N("hover"), [w, v] = N({}), [$, T] = N(), { placement: z, align: M, arrow: B = { pointAtCenter: !0 }, getPopupContainer: A, ...j } = o || {}; const g = oe(ee), [h, m] = N(!1), [f, C] = N("hover"), [w, v] = N({}), [T, $] = N(), { placement: z, align: M, arrow: B = { pointAtCenter: !0 }, getPopupContainer: A, ...j } = o || {};
L(() => { L(() => {
i == "grid-layout-form" ? T(k.createElement(hi, { ...n, $setting: a, code: t })) : i == "data-list" ? T(k.createElement(St, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? se.getWidgetComponent(t).then(({ default: V }) => { i == "grid-layout-form" ? $(k.createElement(hi, { ...n, $setting: a, code: t })) : i == "data-list" ? $(k.createElement(St, { base62params: e, $setting: a, listCode: t })) : c.isString(t) ? se.getWidgetComponent(t).then(({ default: V }) => {
T(k.createElement(V, { ...n, $setting: a })); $(k.createElement(V, { ...n, $setting: a }));
}).catch((V) => T(V.toString())) : Nt(t) ? T(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && T(k.cloneElement(t, { ...n, $setting: a })); }).catch((V) => $(V.toString())) : Nt(t) ? $(k.createElement(t, { ...n, $setting: a })) : k.isValidElement(t) && $(k.cloneElement(t, { ...n, $setting: a }));
}, [t, i, n]), L(() => { }, [t, i, n]), L(() => {
Promise.resolve(ei(r, e, { list: g })).then(v); Promise.resolve(ei(r, e, { list: g })).then(v);
}, [r, e]); }, [r, e]);
const x = (V, W = !1) => (m(V), !V && C("hover"), V ? l == null ? void 0 : l(w) : s == null ? void 0 : s(W)), R = (V) => { const x = (V, W = !1) => (m(V), !V && C("hover"), V ? l == null ? void 0 : l(w) : s == null ? void 0 : s(W)), R = (V) => {
m(!0), C("click"); m(!0), C("click");
}; };
return d(Ii, { zIndex: 1080, placement: z, onPopupClick: R, onClick: R, open: h, align: M, arrow: B, trigger: f, getPopupContainer: A, content: d(jn, { ...j, extras: p, children: $ && k.cloneElement($, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x }); return d(Ii, { zIndex: 1080, placement: z, onPopupClick: R, onClick: R, open: h, align: M, arrow: B, trigger: f, getPopupContainer: A, content: d(jn, { ...j, extras: p, children: T && k.cloneElement(T, { ...w, $close: (V) => x(!1, V) }) }), children: u, onOpenChange: x });
}, jn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => { }, jn = ({ title: e, className: t, children: i, extras: n, width: r, height: a, ...o }) => {
const [s, l] = N({}), u = Y((m, f) => l((C) => ({ ...C, [m]: f })), []), p = Y((m) => l((f) => ({ ...f, [m]: void 0 })), []), g = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n); const [s, l] = N({}), u = Y((m, f) => l((C) => ({ ...C, [m]: f })), []), p = Y((m) => l((f) => ({ ...f, [m]: void 0 })), []), g = e ? k.createElement("div", { className: "ff-popup-title" }, e) : s == null ? void 0 : s.title, h = n ?? k.createElement("div", { className: "ff-popup-reserved-extras" }, n);
return d(qe.Provider, { value: { ele: s, mount: u, unmount: p }, children: O("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [O("div", { className: "ff-popup-header", children: [g, s == null ? void 0 : s["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) }); return d(qe.Provider, { value: { ele: s, mount: u, unmount: p }, children: O("div", { className: I("ff-popup ff-popover", t, s.rootClassName), style: { width: r, height: a }, ...o, children: [O("div", { className: "ff-popup-header", children: [g, s == null ? void 0 : s["sub-title"]] }), i, O("div", { className: "ff-popup-footer", children: [h, s == null ? void 0 : s.extras, s == null ? void 0 : s.actions] })] }) });
}; };
Tt.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; $t.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) };
const Ht = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, f, C) => { const Ht = ({ options: e = [], triggerWeights: t = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (m, f, C) => {
}, onBeforeClick: n = (m, f, C) => { }, onBeforeClick: n = (m, f, C) => {
}, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (m, f) => d(P, { ...m, data: f }, m.uuid || Le()), widgetContainerProps: p = {}, children: g, data: h }) => { }, labelVariant: r = "link", labelSize: a, labelRender: o, btnVariant: s, btnSize: l, btnRender: u = (m, f) => d(P, { ...m, data: f }, m.uuid || Le()), widgetContainerProps: p = {}, children: g, data: h }) => {
if (c.isEmpty(e)) return g; if (c.isEmpty(e)) return g;
const [m, f] = H(() => (e || []).reduce((w, v) => { const [m, f] = H(() => (e || []).reduce((w, v) => {
const $ = t.indexOf(v.widgetType); const T = t.indexOf(v.widgetType);
return $ === -1 ? w[1].push(v) : w[0] ? $ < t.indexOf(w[0].widgetType) ? (w[1].push(w[0]), w[0] = v) : w[1].push(v) : w[0] = v, w; return T === -1 ? w[1].push(v) : w[0] ? T < t.indexOf(w[0].widgetType) ? (w[1].push(w[0]), w[0] = v) : w[1].push(v) : w[0] = v, w;
}, [null, []]), [e, t]); }, [null, []]), [e, t]);
o ? g = o(m, h) || g : g || (g = d(Xe, { ...fi(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) })); o ? g = o(m, h) || g : g || (g = d(Xe, { ...fi(Object.assign(m != null && m.name || m != null && m.icon ? {} : { icon: "icon-location" }, m, { size: a }), r) }));
const C = f.map((w) => u(Object.assign({ uuid: w.uuid, type: w.type, name: w.name, widget: w.widget, widgetType: w.widgetType, widgetProps: w.widgetProps, widgetData: w.widgetData, widgetSetting: w.widgetSetting, widgetContainerProps: w.widgetContainerSetting, confirm: w.confirm, onAfterClick: c.partialRight(i, w, h), onBeforeClick: c.partialRight(n, w, h) }, { size: l, variant: s }), h)); const C = f.map((w) => u(Object.assign({ uuid: w.uuid, type: w.type, name: w.name, widget: w.widget, widgetType: w.widgetType, widgetProps: w.widgetProps, widgetData: w.widgetData, widgetSetting: w.widgetSetting, widgetContainerProps: w.widgetContainerSetting, confirm: w.confirm, onAfterClick: c.partialRight(i, w, h), onBeforeClick: c.partialRight(n, w, h) }, { size: l, variant: s }), h));
return d(Tt, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, p, m == null ? void 0 : m.widgetContainerProps), data: h, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: c.partialRight(i, m, h), onBeforeClick: c.partialRight(n, m, h), children: g }); return d($t, { widget: m == null ? void 0 : m.widget, widgetType: m == null ? void 0 : m.widgetType, widgetProps: m == null ? void 0 : m.widgetProps, widgetSetting: m == null ? void 0 : m.widgetSetting, widgetContainerProps: Object.assign({}, p, m == null ? void 0 : m.widgetContainerProps), data: h, widgetData: m == null ? void 0 : m.widgetData, extras: C, onAfterClick: c.partialRight(i, m, h), onBeforeClick: c.partialRight(n, m, h), children: g });
}; };
Ht.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = En, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = On, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Ln, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = An, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Tt, P.GroupPopover = Ht; Ht.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = En, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = On, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Ln, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = An, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = $t, P.GroupPopover = Ht;
const Vn = ({ fields: e, formProps: t, $close: i }) => { const Vn = ({ fields: e, formProps: t, $close: i }) => {
const [n] = Z.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]); const [n] = Z.useForm(), r = H(() => [{ name: "__PROPS__", value: t }], [t]);
return d(G, { actions: O(k.Fragment, { children: [d(P, { name: "取消", widget: () => i(!1) }), d(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: d(Z, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => d(mi, { code: a, ...o }, a)) }) }); return d(G, { actions: O(k.Fragment, { children: [d(P, { name: "取消", widget: () => i(!1) }), d(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: d(Z, { fields: r, form: n, className: "ff-modal-form", children: e == null ? void 0 : e.map(({ code: a, ...o }) => d(mi, { code: a, ...o }, a)) }) });
@ -880,9 +880,9 @@ Ee.configure({ showSpinner: !1 }), Oe.interceptors.request.use((e) => {
const kt = { appUrl: "", init: (e, t, i) => { const kt = { appUrl: "", init: (e, t, i) => {
kt.appUrl = i, Oe.defaults.baseURL = i, Oe.defaults.timeout = 15e3, Object.assign(kt, new gt(e, t, Oe)); kt.appUrl = i, Oe.defaults.baseURL = i, Oe.defaults.timeout = 15e3, Object.assign(kt, new gt(e, t, Oe));
} }, E = kt; } }, E = kt;
class $t extends Error { class Tt extends Error {
constructor(t, i) { constructor(t, i) {
super(i), Error.captureStackTrace && Error.captureStackTrace(this, $t), !i instanceof je && (this.name = `${t} Error Runtime`); super(i), Error.captureStackTrace && Error.captureStackTrace(this, Tt), !i instanceof je && (this.name = `${t} Error Runtime`);
} }
} }
class je extends Error { class je extends Error {
@ -914,7 +914,7 @@ const ae = class ae {
try { try {
return y(this, Re).has("pkg") ? await y(this, Re).get("pkg").get(i) : await import(`${E.appUrl}/api/pkg-import/web?name=${t}`); return y(this, Re).has("pkg") ? await y(this, Re).get("pkg").get(i) : await import(`${E.appUrl}/api/pkg-import/web?name=${t}`);
} catch (n) { } catch (n) {
throw new $t(t, n); throw new Tt(t, n);
} }
}); });
S(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/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t))); S(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/ff-design/components/DataListSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-setting", isLayout: !0, uri: "/grid-layout-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "grid-layout-form-setting", isLayout: !0, uri: "/grid-layout-form-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/GridLayoutFormSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "resource-api-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ResourceApiSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "charts-setting", isLayout: !0, uri: "/resource-api-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ChartsSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "fsm-setting", isLayout: !0, uri: "/fsm-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/FsmSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "component-setting", isLayout: !0, uri: "/component-setting/:category/:categoryUuid", type: "fsdpf-component", component: "@pkg/ff-design/components/ComponentSetting", extra: { layout: "@pkg/ff-design/frameworks/DesignTheme" } }, { uuid: "login", uri: "/login", name: "登录", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/Login" }, { uuid: "not-found", uri: "*", name: "Not Found", type: "fsdpf-component", isLogin: !1, component: "@pkg/ff/components/NotFound" }].map(({ uuid: i, ...n }) => [i, { uuid: i, ...n }])).then((t) => new Map(t)));

View File

@ -8,7 +8,7 @@ const { toString: Ce } = Object.prototype, { getPrototypeOf: xt } = Object, st =
return ft[e] || (ft[e] = e.slice(8, -1).toLowerCase()); return ft[e] || (ft[e] = e.slice(8, -1).toLowerCase());
}); });
var ft; var ft;
const k = (t) => (t = t.toLowerCase(), (e) => st(e) === t), ut = (t) => (e) => typeof e === t, { isArray: W } = Array, $ = ut("undefined"), Bt = k("ArrayBuffer"), Pe = ut("string"), N = ut("function"), Lt = ut("number"), Y = (t) => t !== null && typeof t == "object", Z = (t) => { const k = (t) => (t = t.toLowerCase(), (e) => st(e) === t), ut = (t) => (e) => typeof e === t, { isArray: W } = Array, J = ut("undefined"), Bt = k("ArrayBuffer"), Pe = ut("string"), N = ut("function"), Lt = ut("number"), Y = (t) => t !== null && typeof t == "object", Z = (t) => {
if (st(t) !== "object") return !1; if (st(t) !== "object") return !1;
const e = xt(t); const e = xt(t);
return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t); return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t);
@ -19,8 +19,8 @@ function V(t, e, { allOwnKeys: n = !1 } = {}) {
if (typeof t != "object" && (t = [t]), W(t)) for (r = 0, s = t.length; r < s; r++) e.call(null, t[r], r, t); if (typeof t != "object" && (t = [t]), W(t)) for (r = 0, s = t.length; r < s; r++) e.call(null, t[r], r, t);
else { else {
const i = n ? Object.getOwnPropertyNames(t) : Object.keys(t), a = i.length; const i = n ? Object.getOwnPropertyNames(t) : Object.keys(t), a = i.length;
let m; let g;
for (r = 0; r < a; r++) m = i[r], e.call(null, t[m], m, t); for (r = 0; r < a; r++) g = i[r], e.call(null, t[g], g, t);
} }
} }
function Ft(t, e) { function Ft(t, e) {
@ -30,7 +30,7 @@ function Ft(t, e) {
for (; s-- > 0; ) if (r = n[s], e === r.toLowerCase()) return r; for (; s-- > 0; ) if (r = n[s], e === r.toLowerCase()) return r;
return null; return null;
} }
const ue = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Mt = (t) => !$(t) && t !== ue, Me = (ht = typeof Uint8Array < "u" && xt(Uint8Array), (t) => ht && t instanceof ht); const ue = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Mt = (t) => !J(t) && t !== ue, Me = (ht = typeof Uint8Array < "u" && xt(Uint8Array), (t) => ht && t instanceof ht);
var ht; var ht;
const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), qe = k("RegExp"), qt = (t, e) => { const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), qe = k("RegExp"), qt = (t, e) => {
const n = Object.getOwnPropertyDescriptors(t), r = {}; const n = Object.getOwnPropertyDescriptors(t), r = {};
@ -39,14 +39,14 @@ const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.ca
(a = e(s, i, t)) !== !1 && (r[i] = a || s); (a = e(s, i, t)) !== !1 && (r[i] = a || s);
}), Object.defineProperties(t, r); }), Object.defineProperties(t, r);
}, dt = "abcdefghijklmnopqrstuvwxyz", It = "0123456789", Wt = { DIGIT: It, ALPHA: dt, ALPHA_DIGIT: dt + dt.toUpperCase() + It }, Ie = k("AsyncFunction"), y = { isArray: W, isArrayBuffer: Bt, isBuffer: function(t) { }, dt = "abcdefghijklmnopqrstuvwxyz", It = "0123456789", Wt = { DIGIT: It, ALPHA: dt, ALPHA_DIGIT: dt + dt.toUpperCase() + It }, Ie = k("AsyncFunction"), y = { isArray: W, isArrayBuffer: Bt, isBuffer: function(t) {
return t !== null && !$(t) && t.constructor !== null && !$(t.constructor) && N(t.constructor.isBuffer) && t.constructor.isBuffer(t); return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && N(t.constructor.isBuffer) && t.constructor.isBuffer(t);
}, isFormData: (t) => { }, isFormData: (t) => {
let e; let e;
return t && (typeof FormData == "function" && t instanceof FormData || N(t.append) && ((e = st(t)) === "formdata" || e === "object" && N(t.toString) && t.toString() === "[object FormData]")); return t && (typeof FormData == "function" && t instanceof FormData || N(t.append) && ((e = st(t)) === "formdata" || e === "object" && N(t.toString) && t.toString() === "[object FormData]"));
}, isArrayBufferView: function(t) { }, isArrayBufferView: function(t) {
let e; let e;
return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && Bt(t.buffer), e; return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && Bt(t.buffer), e;
}, isString: Pe, isNumber: Lt, isBoolean: (t) => t === !0 || t === !1, isObject: Y, isPlainObject: Z, isReadableStream: ke, isRequest: Be, isResponse: Le, isHeaders: Fe, isUndefined: $, isDate: _e, isFile: xe, isBlob: je, isRegExp: qe, isFunction: N, isStream: (t) => Y(t) && N(t.pipe), isURLSearchParams: Ue, isTypedArray: Me, isFileList: Ne, forEach: V, merge: function t() { }, isString: Pe, isNumber: Lt, isBoolean: (t) => t === !0 || t === !1, isObject: Y, isPlainObject: Z, isReadableStream: ke, isRequest: Be, isResponse: Le, isHeaders: Fe, isUndefined: J, isDate: _e, isFile: xe, isBlob: je, isRegExp: qe, isFunction: N, isStream: (t) => Y(t) && N(t.pipe), isURLSearchParams: Ue, isTypedArray: Me, isFileList: Ne, forEach: V, merge: function t() {
const { caseless: e } = Mt(this) && this || {}, n = {}, r = (s, i) => { const { caseless: e } = Mt(this) && this || {}, n = {}, r = (s, i) => {
const a = e && Ft(n, i) || i; const a = e && Ft(n, i) || i;
Z(n[a]) && Z(s) ? n[a] = t(n[a], s) : Z(s) ? n[a] = t({}, s) : W(s) ? n[a] = s.slice() : n[a] = s; Z(n[a]) && Z(s) ? n[a] = t(n[a], s) : Z(s) ? n[a] = t({}, s) : W(s) ? n[a] = s.slice() : n[a] = s;
@ -59,10 +59,10 @@ const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.ca
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), n && Object.assign(t.prototype, n); t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), n && Object.assign(t.prototype, n);
}, toFlatObject: (t, e, n, r) => { }, toFlatObject: (t, e, n, r) => {
let s, i, a; let s, i, a;
const m = {}; const g = {};
if (e = e || {}, t == null) return e; if (e = e || {}, t == null) return e;
do { do {
for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; ) a = s[i], r && !r(a, t, e) || m[a] || (e[a] = t[a], m[a] = !0); for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; ) a = s[i], r && !r(a, t, e) || g[a] || (e[a] = t[a], g[a] = !0);
t = n !== !1 && xt(t); t = n !== !1 && xt(t);
} while (t && (!n || n(t, e)) && t !== Object.prototype); } while (t && (!n || n(t, e)) && t !== Object.prototype);
return e; return e;
@ -122,9 +122,9 @@ const De = k("HTMLFormElement"), Dt = (({ hasOwnProperty: t }) => (e, n) => t.ca
if (!("toJSON" in r)) { if (!("toJSON" in r)) {
e[s] = r; e[s] = r;
const i = W(r) ? [] : {}; const i = W(r) ? [] : {};
return V(r, (a, m) => { return V(r, (a, g) => {
const g = n(a, s + 1); const m = n(a, s + 1);
!$(g) && (i[m] = g); !J(m) && (i[g] = m);
}), e[s] = void 0, i; }), e[s] = void 0, i;
} }
} }
@ -138,14 +138,14 @@ function O(t, e, n, r, s) {
y.inherits(O, Error, { toJSON: function() { y.inherits(O, 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: y.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; 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: y.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null };
} }); } });
const zt = O.prototype, Ht = {}; const zt = O.prototype, $t = {};
["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) => { ["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) => {
Ht[t] = { value: t }; $t[t] = { value: t };
}), Object.defineProperties(O, Ht), Object.defineProperty(zt, "isAxiosError", { value: !0 }), O.from = (t, e, n, r, s, i) => { }), Object.defineProperties(O, $t), Object.defineProperty(zt, "isAxiosError", { value: !0 }), O.from = (t, e, n, r, s, i) => {
const a = Object.create(zt); const a = Object.create(zt);
return y.toFlatObject(t, a, function(m) { return y.toFlatObject(t, a, function(g) {
return m !== Error.prototype; return g !== Error.prototype;
}, (m) => m !== "isAxiosError"), O.call(a, t.message, e, n, r, s), a.cause = t, a.name = t.name, i && Object.assign(a, i), a; }, (g) => g !== "isAxiosError"), O.call(a, t.message, e, n, r, s), a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
}; };
function pt(t) { function pt(t) {
return y.isPlainObject(t) || y.isArray(t); return y.isPlainObject(t) || y.isArray(t);
@ -153,7 +153,7 @@ function pt(t) {
function le(t) { function le(t) {
return y.endsWith(t, "[]") ? t.slice(0, -2) : t; return y.endsWith(t, "[]") ? t.slice(0, -2) : t;
} }
function Jt(t, e, n) { function Ht(t, e, n) {
return t ? t.concat(e).map(function(r, s) { return t ? t.concat(e).map(function(r, s) {
return r = le(r), !n && s ? "[" + r + "]" : r; return r = le(r), !n && s ? "[" + r + "]" : r;
}).join(n ? "." : "") : e; }).join(n ? "." : "") : e;
@ -166,13 +166,13 @@ function it(t, e, n) {
e = e || new FormData(); e = e || new FormData();
const r = (n = y.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(w, E) { const r = (n = y.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(w, E) {
return !y.isUndefined(E[w]); return !y.isUndefined(E[w]);
})).metaTokens, s = n.visitor || d, i = n.dots, a = n.indexes, m = (n.Blob || typeof Blob < "u" && Blob) && y.isSpecCompliantForm(e); })).metaTokens, s = n.visitor || d, i = n.dots, a = n.indexes, g = (n.Blob || typeof Blob < "u" && Blob) && y.isSpecCompliantForm(e);
if (!y.isFunction(s)) throw new TypeError("visitor must be a function"); if (!y.isFunction(s)) throw new TypeError("visitor must be a function");
function g(w) { function m(w) {
if (w === null) return ""; if (w === null) return "";
if (y.isDate(w)) return w.toISOString(); if (y.isDate(w)) return w.toISOString();
if (!m && y.isBlob(w)) throw new O("Blob is not supported. Use a Buffer instead."); if (!g && y.isBlob(w)) throw new O("Blob is not supported. Use a Buffer instead.");
return y.isArrayBuffer(w) || y.isTypedArray(w) ? m && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w; return y.isArrayBuffer(w) || y.isTypedArray(w) ? g && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w;
} }
function d(w, E, h) { function d(w, E, h) {
let u = w; let u = w;
@ -181,12 +181,12 @@ function it(t, e, n) {
else if (y.isArray(w) && function(o) { else if (y.isArray(w) && function(o) {
return y.isArray(o) && !o.some(pt); return y.isArray(o) && !o.some(pt);
}(w) || (y.isFileList(w) || y.endsWith(E, "[]")) && (u = y.toArray(w))) return E = le(E), u.forEach(function(o, c) { }(w) || (y.isFileList(w) || y.endsWith(E, "[]")) && (u = y.toArray(w))) return E = le(E), u.forEach(function(o, c) {
!y.isUndefined(o) && o !== null && e.append(a === !0 ? Jt([E], c, i) : a === null ? E : E + "[]", g(o)); !y.isUndefined(o) && o !== null && e.append(a === !0 ? Ht([E], c, i) : a === null ? E : E + "[]", m(o));
}), !1; }), !1;
} }
return !!pt(w) || (e.append(Jt(h, E, i), g(w)), !1); return !!pt(w) || (e.append(Ht(h, E, i), m(w)), !1);
} }
const b = [], v = Object.assign(We, { defaultVisitor: d, convertValue: g, isVisitable: pt }); const b = [], v = Object.assign(We, { defaultVisitor: d, convertValue: m, isVisitable: pt });
if (!y.isObject(t)) throw new TypeError("data must be an object"); if (!y.isObject(t)) throw new TypeError("data must be an object");
return function w(E, h) { return function w(E, h) {
if (!y.isUndefined(E)) { if (!y.isUndefined(E)) {
@ -197,7 +197,7 @@ function it(t, e, n) {
} }
}(t), e; }(t), e;
} }
function $t(t) { function Jt(t) {
const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" };
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) { return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) {
return e[n]; return e[n];
@ -224,8 +224,8 @@ Vt.append = function(t, e) {
this._pairs.push([t, e]); this._pairs.push([t, e]);
}, Vt.toString = function(t) { }, Vt.toString = function(t) {
const e = t ? function(n) { const e = t ? function(n) {
return t.call(this, n, $t); return t.call(this, n, Jt);
} : $t; } : Jt;
return this._pairs.map(function(n) { return this._pairs.map(function(n) {
return e(n[0]) + "=" + e(n[1]); return e(n[0]) + "=" + e(n[1]);
}, "").join("&"); }, "").join("&");
@ -249,22 +249,22 @@ class Kt {
}); });
} }
} }
const he = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, He = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : jt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Nt = typeof window < "u" && typeof document < "u", Je = (Gt = typeof navigator < "u" && navigator.product, Nt && ["ReactNative", "NativeScript", "NS"].indexOf(Gt) < 0); const he = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, $e = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : jt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Nt = typeof window < "u" && typeof document < "u", He = (Gt = typeof navigator < "u" && navigator.product, Nt && ["ReactNative", "NativeScript", "NS"].indexOf(Gt) < 0);
var Gt; var Gt;
const $e = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ve = Nt && window.location.href || "http://localhost", U = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Nt, hasStandardBrowserEnv: Je, hasStandardBrowserWebWorkerEnv: $e, origin: Ve }, Symbol.toStringTag, { value: "Module" })), ...He }; const Je = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ve = Nt && window.location.href || "http://localhost", U = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Nt, hasStandardBrowserEnv: He, hasStandardBrowserWebWorkerEnv: Je, origin: Ve }, Symbol.toStringTag, { value: "Module" })), ...$e };
function de(t) { function de(t) {
function e(n, r, s, i) { function e(n, r, s, i) {
let a = n[i++]; let a = n[i++];
if (a === "__proto__") return !0; if (a === "__proto__") return !0;
const m = Number.isFinite(+a), g = i >= n.length; const g = Number.isFinite(+a), m = i >= n.length;
return a = !a && y.isArray(s) ? s.length : a, g ? (y.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !m) : (s[a] && y.isObject(s[a]) || (s[a] = []), e(n, r, s[a], i) && y.isArray(s[a]) && (s[a] = function(d) { return a = !a && y.isArray(s) ? s.length : a, m ? (y.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !g) : (s[a] && y.isObject(s[a]) || (s[a] = []), e(n, r, s[a], i) && y.isArray(s[a]) && (s[a] = function(d) {
const b = {}, v = Object.keys(d); const b = {}, v = Object.keys(d);
let w; let w;
const E = v.length; const E = v.length;
let h; let h;
for (w = 0; w < E; w++) h = v[w], b[h] = d[h]; for (w = 0; w < E; w++) h = v[w], b[h] = d[h];
return b; return b;
}(s[a])), !m); }(s[a])), !g);
} }
if (y.isFormData(t) && y.isFunction(t.entries)) { if (y.isFormData(t) && y.isFunction(t.entries)) {
const n = {}; const n = {};
@ -284,23 +284,23 @@ const Q = { transitional: he, adapter: ["xhr", "http", "fetch"], transformReques
if (y.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); if (y.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
let i; let i;
if (s) { if (s) {
if (n.indexOf("application/x-www-form-urlencoded") > -1) return function(a, m) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return function(a, g) {
return it(a, new U.classes.URLSearchParams(), Object.assign({ visitor: function(g, d, b, v) { return it(a, new U.classes.URLSearchParams(), Object.assign({ visitor: function(m, d, b, v) {
return U.isNode && y.isBuffer(g) ? (this.append(d, g.toString("base64")), !1) : v.defaultVisitor.apply(this, arguments); return U.isNode && y.isBuffer(m) ? (this.append(d, m.toString("base64")), !1) : v.defaultVisitor.apply(this, arguments);
} }, m)); } }, g));
}(t, this.formSerializer).toString(); }(t, this.formSerializer).toString();
if ((i = y.isFileList(t)) || n.indexOf("multipart/form-data") > -1) { if ((i = y.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
const a = this.env && this.env.FormData; const a = this.env && this.env.FormData;
return it(i ? { "files[]": t } : t, a && new a(), this.formSerializer); return it(i ? { "files[]": t } : t, a && new a(), this.formSerializer);
} }
} }
return s || r ? (e.setContentType("application/json", !1), function(a, m, g) { return s || r ? (e.setContentType("application/json", !1), function(a, g, m) {
if (y.isString(a)) try { if (y.isString(a)) try {
return (m || JSON.parse)(a), y.trim(a); return (g || JSON.parse)(a), y.trim(a);
} catch (d) { } catch (d) {
if (d.name !== "SyntaxError") throw d; if (d.name !== "SyntaxError") throw d;
} }
return (g || JSON.stringify)(a); return (m || JSON.stringify)(a);
}(t)) : t; }(t)) : t;
}], transformResponse: [function(t) { }], transformResponse: [function(t) {
const e = this.transitional || Q.transitional, n = e && e.forcedJSONParsing, r = this.responseType === "json"; const e = this.transitional || Q.transitional, n = e && e.forcedJSONParsing, r = this.responseType === "json";
@ -322,13 +322,13 @@ y.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
Q.headers[t] = {}; Q.headers[t] = {};
}); });
const Ke = y.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"]), Xt = Symbol("internals"); const Ke = y.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"]), Xt = Symbol("internals");
function J(t) { function H(t) {
return t && String(t).trim().toLowerCase(); return t && String(t).trim().toLowerCase();
} }
function tt(t) { function tt(t) {
return t === !1 || t == null ? t : y.isArray(t) ? t.map(tt) : String(t); return t === !1 || t == null ? t : y.isArray(t) ? t.map(tt) : String(t);
} }
function mt(t, e, n, r, s) { function gt(t, e, n, r, s) {
return y.isFunction(r) ? r.call(this, e, n) : (s && (e = n), y.isString(e) ? y.isString(r) ? e.indexOf(r) !== -1 : y.isRegExp(r) ? r.test(e) : void 0 : void 0); return y.isFunction(r) ? r.call(this, e, n) : (s && (e = n), y.isString(e) ? y.isString(r) ? e.indexOf(r) !== -1 : y.isRegExp(r) ? r.test(e) : void 0 : void 0);
} }
class x { class x {
@ -337,36 +337,36 @@ class x {
} }
set(e, n, r) { set(e, n, r) {
const s = this; const s = this;
function i(m, g, d) { function i(g, m, d) {
const b = J(g); const b = H(m);
if (!b) throw new Error("header name must be a non-empty string"); if (!b) throw new Error("header name must be a non-empty string");
const v = y.findKey(s, b); const v = y.findKey(s, b);
(!v || s[v] === void 0 || d === !0 || d === void 0 && s[v] !== !1) && (s[v || g] = tt(m)); (!v || s[v] === void 0 || d === !0 || d === void 0 && s[v] !== !1) && (s[v || m] = tt(g));
} }
const a = (m, g) => y.forEach(m, (d, b) => i(d, b, g)); const a = (g, m) => y.forEach(g, (d, b) => i(d, b, m));
if (y.isPlainObject(e) || e instanceof this.constructor) a(e, n); if (y.isPlainObject(e) || e instanceof this.constructor) a(e, n);
else if (y.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) a(((m) => { else if (y.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) a(((g) => {
const g = {}; const m = {};
let d, b, v; let d, b, v;
return m && m.split(` return g && g.split(`
`).forEach(function(w) { `).forEach(function(w) {
v = w.indexOf(":"), d = w.substring(0, v).trim().toLowerCase(), b = w.substring(v + 1).trim(), !d || g[d] && Ke[d] || (d === "set-cookie" ? g[d] ? g[d].push(b) : g[d] = [b] : g[d] = g[d] ? g[d] + ", " + b : b); v = w.indexOf(":"), d = w.substring(0, v).trim().toLowerCase(), b = w.substring(v + 1).trim(), !d || m[d] && Ke[d] || (d === "set-cookie" ? m[d] ? m[d].push(b) : m[d] = [b] : m[d] = m[d] ? m[d] + ", " + b : b);
}), g; }), m;
})(e), n); })(e), n);
else if (y.isHeaders(e)) for (const [m, g] of e.entries()) i(g, m, r); else if (y.isHeaders(e)) for (const [g, m] of e.entries()) i(m, g, r);
else e != null && i(n, e, r); else e != null && i(n, e, r);
return this; return this;
} }
get(e, n) { get(e, n) {
if (e = J(e)) { if (e = H(e)) {
const r = y.findKey(this, e); const r = y.findKey(this, e);
if (r) { if (r) {
const s = this[r]; const s = this[r];
if (!n) return s; if (!n) return s;
if (n === !0) return function(i) { if (n === !0) return function(i) {
const a = /* @__PURE__ */ Object.create(null), m = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; const a = /* @__PURE__ */ Object.create(null), g = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let g; let m;
for (; g = m.exec(i); ) a[g[1]] = g[2]; for (; m = g.exec(i); ) a[m[1]] = m[2];
return a; return a;
}(s); }(s);
if (y.isFunction(n)) return n.call(this, s, r); if (y.isFunction(n)) return n.call(this, s, r);
@ -376,9 +376,9 @@ class x {
} }
} }
has(e, n) { has(e, n) {
if (e = J(e)) { if (e = H(e)) {
const r = y.findKey(this, e); const r = y.findKey(this, e);
return !(!r || this[r] === void 0 || n && !mt(0, this[r], r, n)); return !(!r || this[r] === void 0 || n && !gt(0, this[r], r, n));
} }
return !1; return !1;
} }
@ -386,9 +386,9 @@ class x {
const r = this; const r = this;
let s = !1; let s = !1;
function i(a) { function i(a) {
if (a = J(a)) { if (a = H(a)) {
const m = y.findKey(r, a); const g = y.findKey(r, a);
!m || n && !mt(0, r[m], m, n) || (delete r[m], s = !0); !g || n && !gt(0, r[g], g, n) || (delete r[g], s = !0);
} }
} }
return y.isArray(e) ? e.forEach(i) : i(e), s; return y.isArray(e) ? e.forEach(i) : i(e), s;
@ -398,7 +398,7 @@ class x {
let r = n.length, s = !1; let r = n.length, s = !1;
for (; r--; ) { for (; r--; ) {
const i = n[r]; const i = n[r];
e && !mt(0, this[i], i, e, !0) || (delete this[i], s = !0); e && !gt(0, this[i], i, e, !0) || (delete this[i], s = !0);
} }
return s; return s;
} }
@ -407,10 +407,10 @@ class x {
return y.forEach(this, (s, i) => { return y.forEach(this, (s, i) => {
const a = y.findKey(r, i); const a = y.findKey(r, i);
if (a) return n[a] = tt(s), void delete n[i]; if (a) return n[a] = tt(s), void delete n[i];
const m = e ? function(g) { const g = e ? function(m) {
return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (d, b, v) => b.toUpperCase() + v); return m.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (d, b, v) => b.toUpperCase() + v);
}(i) : String(i).trim(); }(i) : String(i).trim();
m !== i && delete n[i], n[m] = tt(s), r[m] = !0; g !== i && delete n[i], n[g] = tt(s), r[g] = !0;
}), this; }), this;
} }
concat(...e) { concat(...e) {
@ -442,12 +442,12 @@ class x {
static accessor(e) { static accessor(e) {
const n = (this[Xt] = this[Xt] = { accessors: {} }).accessors, r = this.prototype; const n = (this[Xt] = this[Xt] = { accessors: {} }).accessors, r = this.prototype;
function s(i) { function s(i) {
const a = J(i); const a = H(i);
n[a] || (function(m, g) { n[a] || (function(g, m) {
const d = y.toCamelCase(" " + g); const d = y.toCamelCase(" " + m);
["get", "set", "has"].forEach((b) => { ["get", "set", "has"].forEach((b) => {
Object.defineProperty(m, b + d, { value: function(v, w, E) { Object.defineProperty(g, b + d, { value: function(v, w, E) {
return this[b].call(this, g, v, w, E); return this[b].call(this, m, v, w, E);
}, configurable: !0 }); }, configurable: !0 });
}); });
}(r, i), n[a] = !0); }(r, i), n[a] = !0);
@ -455,7 +455,7 @@ class x {
return y.isArray(e) ? e.forEach(s) : s(e), this; return y.isArray(e) ? e.forEach(s) : s(e), this;
} }
} }
function gt(t, e) { function mt(t, e) {
const n = this || Q, r = e || n, s = x.from(r.headers); const n = this || Q, r = e || n, s = x.from(r.headers);
let i = r.data; let i = r.data;
return y.forEach(t, function(a) { return y.forEach(t, function(a) {
@ -465,10 +465,10 @@ function gt(t, e) {
function pe(t) { function pe(t) {
return !(!t || !t.__CANCEL__); return !(!t || !t.__CANCEL__);
} }
function H(t, e, n) { function $(t, e, n) {
O.call(this, t ?? "canceled", O.ERR_CANCELED, e, n), this.name = "CanceledError"; O.call(this, t ?? "canceled", O.ERR_CANCELED, e, n), this.name = "CanceledError";
} }
function me(t, e, n) { function ge(t, e, n) {
const r = n.config.validateStatus; const r = n.config.validateStatus;
n.status && r && !r(n.status) ? e(new O("Request failed with status code " + n.status, [O.ERR_BAD_REQUEST, O.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : t(n); n.status && r && !r(n.status) ? e(new O("Request failed with status code " + n.status, [O.ERR_BAD_REQUEST, O.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n)) : t(n);
} }
@ -477,36 +477,36 @@ x.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User
return { get: () => t, set(r) { return { get: () => t, set(r) {
this[n] = r; this[n] = r;
} }; } };
}), y.freezeMethods(x), y.inherits(H, O, { __CANCEL__: !0 }); }), y.freezeMethods(x), y.inherits($, O, { __CANCEL__: !0 });
const at = (t, e, n = 3) => { const at = (t, e, n = 3) => {
let r = 0; let r = 0;
const s = function(i, a) { const s = function(i, a) {
i = i || 10; i = i || 10;
const m = new Array(i), g = new Array(i); const g = new Array(i), m = new Array(i);
let d, b = 0, v = 0; let d, b = 0, v = 0;
return a = a !== void 0 ? a : 1e3, function(w) { return a = a !== void 0 ? a : 1e3, function(w) {
const E = Date.now(), h = g[v]; const E = Date.now(), h = m[v];
d || (d = E), m[b] = w, g[b] = E; d || (d = E), g[b] = w, m[b] = E;
let u = v, o = 0; let u = v, o = 0;
for (; u !== b; ) o += m[u++], u %= i; for (; u !== b; ) o += g[u++], u %= i;
if (b = (b + 1) % i, b === v && (v = (v + 1) % i), E - d < a) return; if (b = (b + 1) % i, b === v && (v = (v + 1) % i), E - d < a) return;
const c = h && E - h; const c = h && E - h;
return c ? Math.round(1e3 * o / c) : void 0; return c ? Math.round(1e3 * o / c) : void 0;
}; };
}(50, 250); }(50, 250);
return function(i, a) { return function(i, a) {
let m = 0; let g = 0;
const g = 1e3 / a; const m = 1e3 / a;
let d = null; let d = null;
return function() { return function() {
const b = this === !0, v = Date.now(); const b = this === !0, v = Date.now();
if (b || v - m > g) return d && (clearTimeout(d), d = null), m = v, i.apply(null, arguments); if (b || v - g > m) return d && (clearTimeout(d), d = null), g = v, i.apply(null, arguments);
d || (d = setTimeout(() => (d = null, m = Date.now(), i.apply(null, arguments)), g - (v - m))); d || (d = setTimeout(() => (d = null, g = Date.now(), i.apply(null, arguments)), m - (v - g)));
}; };
}((i) => { }((i) => {
const a = i.loaded, m = i.lengthComputable ? i.total : void 0, g = a - r, d = s(g); const a = i.loaded, g = i.lengthComputable ? i.total : void 0, m = a - r, d = s(m);
r = a; r = a;
const b = { loaded: a, total: m, progress: m ? a / m : void 0, bytes: g, rate: d || void 0, estimated: d && m && a <= m ? (m - a) / d : void 0, event: i, lengthComputable: m != null }; const b = { loaded: a, total: g, progress: g ? a / g : void 0, bytes: m, rate: d || void 0, estimated: d && g && a <= g ? (g - a) / d : void 0, event: i, lengthComputable: g != null };
b[e ? "download" : "upload"] = !0, t(b); b[e ? "download" : "upload"] = !0, t(b);
}, n); }, n);
}, Ge = U.hasStandardBrowserEnv ? function() { }, Ge = U.hasStandardBrowserEnv ? function() {
@ -533,7 +533,7 @@ const at = (t, e, n = 3) => {
} } : { write() { } } : { write() {
}, read: () => null, remove() { }, read: () => null, remove() {
} }; } };
function ge(t, e) { function me(t, e) {
return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(n, r) { return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(n, r) {
return r ? n.replace(/\/?\/$/, "") + "/" + r.replace(/^\/+/, "") : n; return r ? n.replace(/\/?\/$/, "") + "/" + r.replace(/^\/+/, "") : n;
}(t, e) : e; }(t, e) : e;
@ -554,28 +554,28 @@ function I(t, e) {
function a(d, b) { function a(d, b) {
return y.isUndefined(b) ? y.isUndefined(d) ? void 0 : r(void 0, d) : r(void 0, b); return y.isUndefined(b) ? y.isUndefined(d) ? void 0 : r(void 0, d) : r(void 0, b);
} }
function m(d, b, v) { function g(d, b, v) {
return v in e ? r(d, b) : v in t ? r(void 0, d) : void 0; return v in e ? r(d, b) : v in t ? r(void 0, d) : void 0;
} }
const g = { url: i, method: i, data: i, baseURL: a, transformRequest: a, transformResponse: a, paramsSerializer: a, timeout: a, timeoutMessage: a, withCredentials: a, withXSRFToken: a, adapter: a, responseType: a, xsrfCookieName: a, xsrfHeaderName: a, onUploadProgress: a, onDownloadProgress: a, decompress: a, maxContentLength: a, maxBodyLength: a, beforeRedirect: a, transport: a, httpAgent: a, httpsAgent: a, cancelToken: a, socketPath: a, responseEncoding: a, validateStatus: m, headers: (d, b) => s(Qt(d), Qt(b), !0) }; const m = { url: i, method: i, data: i, baseURL: a, transformRequest: a, transformResponse: a, paramsSerializer: a, timeout: a, timeoutMessage: a, withCredentials: a, withXSRFToken: a, adapter: a, responseType: a, xsrfCookieName: a, xsrfHeaderName: a, onUploadProgress: a, onDownloadProgress: a, decompress: a, maxContentLength: a, maxBodyLength: a, beforeRedirect: a, transport: a, httpAgent: a, httpsAgent: a, cancelToken: a, socketPath: a, responseEncoding: a, validateStatus: g, headers: (d, b) => s(Qt(d), Qt(b), !0) };
return y.forEach(Object.keys(Object.assign({}, t, e)), function(d) { return y.forEach(Object.keys(Object.assign({}, t, e)), function(d) {
const b = g[d] || s, v = b(t[d], e[d], d); const b = m[d] || s, v = b(t[d], e[d], d);
y.isUndefined(v) && b !== m || (n[d] = v); y.isUndefined(v) && b !== g || (n[d] = v);
}), n; }), n;
} }
const ye = (t) => { const ye = (t) => {
const e = I({}, t); const e = I({}, t);
let n, { data: r, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName: a, headers: m, auth: g } = e; let n, { data: r, withXSRFToken: s, xsrfHeaderName: i, xsrfCookieName: a, headers: g, auth: m } = e;
if (e.headers = m = x.from(m), e.url = fe(ge(e.baseURL, e.url), t.params, t.paramsSerializer), g && m.set("Authorization", "Basic " + btoa((g.username || "") + ":" + (g.password ? unescape(encodeURIComponent(g.password)) : ""))), y.isFormData(r)) { if (e.headers = g = x.from(g), e.url = fe(me(e.baseURL, e.url), t.params, t.paramsSerializer), m && g.set("Authorization", "Basic " + btoa((m.username || "") + ":" + (m.password ? unescape(encodeURIComponent(m.password)) : ""))), y.isFormData(r)) {
if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) m.setContentType(void 0); if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) g.setContentType(void 0);
else if ((n = m.getContentType()) !== !1) { else if ((n = g.getContentType()) !== !1) {
const [d, ...b] = n ? n.split(";").map((v) => v.trim()).filter(Boolean) : []; const [d, ...b] = n ? n.split(";").map((v) => v.trim()).filter(Boolean) : [];
m.setContentType([d || "multipart/form-data", ...b].join("; ")); g.setContentType([d || "multipart/form-data", ...b].join("; "));
} }
} }
if (U.hasStandardBrowserEnv && (s && y.isFunction(s) && (s = s(e)), s || s !== !1 && Ge(e.url))) { if (U.hasStandardBrowserEnv && (s && y.isFunction(s) && (s = s(e)), s || s !== !1 && Ge(e.url))) {
const d = i && a && Xe.read(a); const d = i && a && Xe.read(a);
d && m.set(i, d); d && g.set(i, d);
} }
return e; return e;
}, Qe = typeof XMLHttpRequest < "u" && function(t) { }, Qe = typeof XMLHttpRequest < "u" && function(t) {
@ -583,19 +583,19 @@ const ye = (t) => {
const r = ye(t); const r = ye(t);
let s = r.data; let s = r.data;
const i = x.from(r.headers).normalize(); const i = x.from(r.headers).normalize();
let a, { responseType: m } = r; let a, { responseType: g } = r;
function g() { function m() {
r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a); r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
} }
let d = new XMLHttpRequest(); let d = new XMLHttpRequest();
function b() { function b() {
if (!d) return; if (!d) return;
const w = x.from("getAllResponseHeaders" in d && d.getAllResponseHeaders()); const w = x.from("getAllResponseHeaders" in d && d.getAllResponseHeaders());
me(function(E) { ge(function(E) {
e(E), g(); e(E), m();
}, function(E) { }, function(E) {
n(E), g(); n(E), m();
}, { data: m && m !== "text" && m !== "json" ? d.response : d.responseText, status: d.status, statusText: d.statusText, headers: w, config: t, request: d }), d = null; }, { data: g && g !== "text" && g !== "json" ? d.response : d.responseText, status: d.status, statusText: d.statusText, headers: w, config: t, request: d }), d = null;
} }
d.open(r.method.toUpperCase(), r.url, !0), d.timeout = r.timeout, "onloadend" in d ? d.onloadend = b : d.onreadystatechange = function() { d.open(r.method.toUpperCase(), r.url, !0), d.timeout = r.timeout, "onloadend" in d ? d.onloadend = b : d.onreadystatechange = function() {
d && d.readyState === 4 && (d.status !== 0 || d.responseURL && d.responseURL.indexOf("file:") === 0) && setTimeout(b); d && d.readyState === 4 && (d.status !== 0 || d.responseURL && d.responseURL.indexOf("file:") === 0) && setTimeout(b);
@ -609,8 +609,8 @@ const ye = (t) => {
r.timeoutErrorMessage && (w = r.timeoutErrorMessage), n(new O(w, E.clarifyTimeoutError ? O.ETIMEDOUT : O.ECONNABORTED, r, d)), d = null; r.timeoutErrorMessage && (w = r.timeoutErrorMessage), n(new O(w, E.clarifyTimeoutError ? O.ETIMEDOUT : O.ECONNABORTED, r, d)), d = null;
}, s === void 0 && i.setContentType(null), "setRequestHeader" in d && y.forEach(i.toJSON(), function(w, E) { }, s === void 0 && i.setContentType(null), "setRequestHeader" in d && y.forEach(i.toJSON(), function(w, E) {
d.setRequestHeader(E, w); d.setRequestHeader(E, w);
}), y.isUndefined(r.withCredentials) || (d.withCredentials = !!r.withCredentials), m && m !== "json" && (d.responseType = r.responseType), typeof r.onDownloadProgress == "function" && d.addEventListener("progress", at(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && d.upload && d.upload.addEventListener("progress", at(r.onUploadProgress)), (r.cancelToken || r.signal) && (a = (w) => { }), y.isUndefined(r.withCredentials) || (d.withCredentials = !!r.withCredentials), g && g !== "json" && (d.responseType = r.responseType), typeof r.onDownloadProgress == "function" && d.addEventListener("progress", at(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && d.upload && d.upload.addEventListener("progress", at(r.onUploadProgress)), (r.cancelToken || r.signal) && (a = (w) => {
d && (n(!w || w.type ? new H(null, t, d) : w), d.abort(), d = null); d && (n(!w || w.type ? new $(null, t, d) : w), d.abort(), d = null);
}, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a))); }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
const v = function(w) { const v = function(w) {
const E = /^([-+\w]{1,25})(:?\/\/|:)/.exec(w); const E = /^([-+\w]{1,25})(:?\/\/|:)/.exec(w);
@ -620,24 +620,24 @@ const ye = (t) => {
}); });
}, Ye = (t, e) => { }, Ye = (t, e) => {
let n, r = new AbortController(); let n, r = new AbortController();
const s = function(g) { const s = function(m) {
if (!n) { if (!n) {
n = !0, a(); n = !0, a();
const d = g instanceof Error ? g : this.reason; const d = m instanceof Error ? m : this.reason;
r.abort(d instanceof O ? d : new H(d instanceof Error ? d.message : d)); r.abort(d instanceof O ? d : new $(d instanceof Error ? d.message : d));
} }
}; };
let i = e && setTimeout(() => { let i = e && setTimeout(() => {
s(new O(`timeout ${e} of ms exceeded`, O.ETIMEDOUT)); s(new O(`timeout ${e} of ms exceeded`, O.ETIMEDOUT));
}, e); }, e);
const a = () => { const a = () => {
t && (i && clearTimeout(i), i = null, t.forEach((g) => { t && (i && clearTimeout(i), i = null, t.forEach((m) => {
g && (g.removeEventListener ? g.removeEventListener("abort", s) : g.unsubscribe(s)); m && (m.removeEventListener ? m.removeEventListener("abort", s) : m.unsubscribe(s));
}), t = null); }), t = null);
}; };
t.forEach((g) => g && g.addEventListener && g.addEventListener("abort", s)); t.forEach((m) => m && m.addEventListener && m.addEventListener("abort", s));
const { signal: m } = r; const { signal: g } = r;
return m.unsubscribe = a, [m, () => { return g.unsubscribe = a, [g, () => {
i && clearTimeout(i), i = null; i && clearTimeout(i), i = null;
}]; }];
}, Ze = function* (t, e) { }, Ze = function* (t, e) {
@ -646,16 +646,16 @@ const ye = (t) => {
let r, s = 0; let r, s = 0;
for (; s < n; ) r = s + e, yield t.slice(s, r), s = r; for (; s < n; ) r = s + e, yield t.slice(s, r), s = r;
}, Yt = (t, e, n, r, s) => { }, Yt = (t, e, n, r, s) => {
const i = async function* (m, g, d) { const i = async function* (g, m, d) {
for await (const b of m) yield* Ze(ArrayBuffer.isView(b) ? b : await d(String(b)), g); for await (const b of g) yield* Ze(ArrayBuffer.isView(b) ? b : await d(String(b)), m);
}(t, e, s); }(t, e, s);
let a = 0; let a = 0;
return new ReadableStream({ type: "bytes", async pull(m) { return new ReadableStream({ type: "bytes", async pull(g) {
const { done: g, value: d } = await i.next(); const { done: m, value: d } = await i.next();
if (g) return m.close(), void r(); if (m) return g.close(), void r();
let b = d.byteLength; let b = d.byteLength;
n && n(a += b), m.enqueue(new Uint8Array(d)); n && n(a += b), g.enqueue(new Uint8Array(d));
}, cancel: (m) => (r(m), i.return()) }, { highWaterMark: 2 }); }, cancel: (g) => (r(g), i.return()) }, { highWaterMark: 2 });
}, Zt = (t, e) => { }, Zt = (t, e) => {
const n = t != null; const n = t != null;
return (r) => setTimeout(() => e({ lengthComputable: n, total: t, loaded: r })); return (r) => setTimeout(() => e({ lengthComputable: n, total: t, loaded: r }));
@ -683,7 +683,7 @@ const en = async (t, e) => {
const n = y.toFiniteNumber(t.getContentLength()); const n = y.toFiniteNumber(t.getContentLength());
return n ?? (async (r) => r == null ? 0 : y.isBlob(r) ? r.size : y.isSpecCompliantForm(r) ? (await new Request(r).arrayBuffer()).byteLength : y.isArrayBufferView(r) ? r.byteLength : (y.isURLSearchParams(r) && (r += ""), y.isString(r) ? (await wt(r)).byteLength : void 0))(e); return n ?? (async (r) => r == null ? 0 : y.isBlob(r) ? r.size : y.isSpecCompliantForm(r) ? (await new Request(r).arrayBuffer()).byteLength : y.isArrayBufferView(r) ? r.byteLength : (y.isURLSearchParams(r) && (r += ""), y.isString(r) ? (await wt(r)).byteLength : void 0))(e);
}, we = { http: null, xhr: Qe, fetch: lt && (async (t) => { }, we = { http: null, xhr: Qe, fetch: lt && (async (t) => {
let { url: e, method: n, data: r, signal: s, cancelToken: i, timeout: a, onDownloadProgress: m, onUploadProgress: g, responseType: d, headers: b, withCredentials: v = "same-origin", fetchOptions: w } = ye(t); let { url: e, method: n, data: r, signal: s, cancelToken: i, timeout: a, onDownloadProgress: g, onUploadProgress: m, responseType: d, headers: b, withCredentials: v = "same-origin", fetchOptions: w } = ye(t);
d = d ? (d + "").toLowerCase() : "text"; d = d ? (d + "").toLowerCase() : "text";
let E, h, [u, o] = s || i || a ? Ye([s, i], a) : []; let E, h, [u, o] = s || i || a ? Ye([s, i], a) : [];
const c = () => { const c = () => {
@ -693,25 +693,25 @@ const en = async (t, e) => {
}; };
let l; let l;
try { try {
if (g && tn && n !== "get" && n !== "head" && (l = await en(b, r)) !== 0) { if (m && tn && n !== "get" && n !== "head" && (l = await en(b, r)) !== 0) {
let S, T = new Request(e, { method: "POST", body: r, duplex: "half" }); let S, T = new Request(e, { method: "POST", body: r, duplex: "half" });
y.isFormData(r) && (S = T.headers.get("content-type")) && b.setContentType(S), T.body && (r = Yt(T.body, 65536, Zt(l, at(g)), null, wt)); y.isFormData(r) && (S = T.headers.get("content-type")) && b.setContentType(S), T.body && (r = Yt(T.body, 65536, Zt(l, at(m)), null, wt));
} }
y.isString(v) || (v = v ? "cors" : "omit"), h = new Request(e, { ...w, signal: u, method: n.toUpperCase(), headers: b.normalize().toJSON(), body: r, duplex: "half", withCredentials: v }); y.isString(v) || (v = v ? "cors" : "omit"), h = new Request(e, { ...w, signal: u, method: n.toUpperCase(), headers: b.normalize().toJSON(), body: r, duplex: "half", withCredentials: v });
let p = await fetch(h); let p = await fetch(h);
const f = vt && (d === "stream" || d === "response"); const f = vt && (d === "stream" || d === "response");
if (vt && (m || f)) { if (vt && (g || f)) {
const S = {}; const S = {};
["status", "statusText", "headers"].forEach((j) => { ["status", "statusText", "headers"].forEach((j) => {
S[j] = p[j]; S[j] = p[j];
}); });
const T = y.toFiniteNumber(p.headers.get("content-length")); const T = y.toFiniteNumber(p.headers.get("content-length"));
p = new Response(Yt(p.body, 65536, m && Zt(T, at(m, !0)), f && c, wt), S); p = new Response(Yt(p.body, 65536, g && Zt(T, at(g, !0)), f && c, wt), S);
} }
d = d || "text"; d = d || "text";
let A = await ct[y.findKey(ct, d) || "text"](p, t); let A = await ct[y.findKey(ct, d) || "text"](p, t);
return !f && c(), o && o(), await new Promise((S, T) => { return !f && c(), o && o(), await new Promise((S, T) => {
me(S, T, { data: A, headers: x.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: h }); ge(S, T, { data: A, headers: x.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: h });
}); });
} catch (p) { } catch (p) {
throw c(), p && p.name === "TypeError" && /fetch/i.test(p.message) ? Object.assign(new O("Network Error", O.ERR_NETWORK, t, h), { cause: p.cause || p }) : O.from(p, p && p.code, t, h); throw c(), p && p.name === "TypeError" && /fetch/i.test(p.message) ? Object.assign(new O("Network Error", O.ERR_NETWORK, t, h), { cause: p.cause || p }) : O.from(p, p && p.code, t, h);
@ -738,7 +738,7 @@ const ne = (t) => `- ${t}`, nn = (t) => y.isFunction(t) || t === null || t === !
s[a || "#" + i] = r; s[a || "#" + i] = r;
} }
if (!r) { if (!r) {
const i = Object.entries(s).map(([a, m]) => `adapter ${a} ` + (m === !1 ? "is not supported by the environment" : "is not available in the build")); const i = Object.entries(s).map(([a, g]) => `adapter ${a} ` + (g === !1 ? "is not supported by the environment" : "is not available in the build"));
throw new O("There is no suitable adapter to dispatch the request " + (e ? i.length > 1 ? `since : throw new O("There is no suitable adapter to dispatch the request " + (e ? i.length > 1 ? `since :
` + i.map(ne).join(` ` + i.map(ne).join(`
`) : " " + ne(i[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); `) : " " + ne(i[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
@ -746,13 +746,13 @@ const ne = (t) => `- ${t}`, nn = (t) => y.isFunction(t) || t === null || t === !
return r; return r;
}; };
function yt(t) { function yt(t) {
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new H(null, t); if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new $(null, t);
} }
function re(t) { function re(t) {
return yt(t), t.headers = x.from(t.headers), t.data = gt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ve(t.adapter || Q.adapter)(t).then(function(e) { return yt(t), t.headers = x.from(t.headers), t.data = mt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), ve(t.adapter || Q.adapter)(t).then(function(e) {
return yt(t), e.data = gt.call(t, t.transformResponse, e), e.headers = x.from(e.headers), e; return yt(t), e.data = mt.call(t, t.transformResponse, e), e.headers = x.from(e.headers), e;
}, function(e) { }, function(e) {
return pe(e) || (yt(t), e && e.response && (e.response.data = gt.call(t, t.transformResponse, e.response), e.response.headers = x.from(e.response.headers))), Promise.reject(e); return pe(e) || (yt(t), e && e.response && (e.response.data = mt.call(t, t.transformResponse, e.response), e.response.headers = x.from(e.response.headers))), Promise.reject(e);
}); });
} }
const rn = "1.7.2", Ut = {}; const rn = "1.7.2", Ut = {};
@ -778,8 +778,8 @@ const Et = { assertOptions: function(t, e, n) {
for (; s-- > 0; ) { for (; s-- > 0; ) {
const i = r[s], a = e[i]; const i = r[s], a = e[i];
if (a) { if (a) {
const m = t[i], g = m === void 0 || a(m, i, t); const g = t[i], m = g === void 0 || a(g, i, t);
if (g !== !0) throw new O("option " + i + " must be " + g, O.ERR_BAD_OPTION_VALUE); if (m !== !0) throw new O("option " + i + " must be " + m, O.ERR_BAD_OPTION_VALUE);
} else if (n !== !0) throw new O("Unknown option " + i, O.ERR_BAD_OPTION); } else if (n !== !0) throw new O("Unknown option " + i, O.ERR_BAD_OPTION);
} }
}, validators: Ut }, F = Et.validators; }, validators: Ut }, F = Et.validators;
@ -812,10 +812,10 @@ class q {
i && y.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (h) => { i && y.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (h) => {
delete i[h]; delete i[h];
}), n.headers = x.concat(a, i); }), n.headers = x.concat(a, i);
const m = []; const g = [];
let g = !0; let m = !0;
this.interceptors.request.forEach(function(h) { this.interceptors.request.forEach(function(h) {
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (g = g && h.synchronous, m.unshift(h.fulfilled, h.rejected)); typeof h.runWhen == "function" && h.runWhen(n) === !1 || (m = m && h.synchronous, g.unshift(h.fulfilled, h.rejected));
}); });
const d = []; const d = [];
let b; let b;
@ -823,15 +823,15 @@ class q {
d.push(h.fulfilled, h.rejected); d.push(h.fulfilled, h.rejected);
}); });
let v, w = 0; let v, w = 0;
if (!g) { if (!m) {
const h = [re.bind(this), void 0]; const h = [re.bind(this), void 0];
for (h.unshift.apply(h, m), h.push.apply(h, d), v = h.length, b = Promise.resolve(n); w < v; ) b = b.then(h[w++], h[w++]); for (h.unshift.apply(h, g), h.push.apply(h, d), v = h.length, b = Promise.resolve(n); w < v; ) b = b.then(h[w++], h[w++]);
return b; return b;
} }
v = m.length; v = g.length;
let E = n; let E = n;
for (w = 0; w < v; ) { for (w = 0; w < v; ) {
const h = m[w++], u = m[w++]; const h = g[w++], u = g[w++];
try { try {
E = h(E); E = h(E);
} catch (o) { } catch (o) {
@ -848,7 +848,7 @@ class q {
return b; return b;
} }
getUri(e) { getUri(e) {
return fe(ge((e = I(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer); return fe(me((e = I(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer);
} }
} }
y.forEach(["delete", "get", "head", "options"], function(t) { y.forEach(["delete", "get", "head", "options"], function(t) {
@ -878,14 +878,14 @@ class kt {
r._listeners = null; r._listeners = null;
}), this.promise.then = (s) => { }), this.promise.then = (s) => {
let i; let i;
const a = new Promise((m) => { const a = new Promise((g) => {
r.subscribe(m), i = m; r.subscribe(g), i = g;
}).then(s); }).then(s);
return a.cancel = function() { return a.cancel = function() {
r.unsubscribe(i); r.unsubscribe(i);
}, a; }, a;
}, e(function(s, i, a) { }, e(function(s, i, a) {
r.reason || (r.reason = new H(s, i, a), n(r.reason)); r.reason || (r.reason = new $(s, i, a), n(r.reason));
}); });
} }
throwIfRequested() { throwIfRequested() {
@ -916,7 +916,7 @@ const C = function t(e) {
return t(I(e, s)); return t(I(e, s));
}, r; }, r;
}(Q); }(Q);
C.Axios = q, C.CanceledError = H, C.CancelToken = kt, C.isCancel = pe, C.VERSION = rn, C.toFormData = it, C.AxiosError = O, C.Cancel = C.CanceledError, C.all = function(t) { C.Axios = q, C.CanceledError = $, C.CancelToken = kt, C.isCancel = pe, C.VERSION = rn, C.toFormData = it, C.AxiosError = O, C.Cancel = C.CanceledError, C.all = function(t) {
return Promise.all(t); return Promise.all(t);
}, C.spread = function(t) { }, C.spread = function(t) {
return function(e) { return function(e) {
@ -954,16 +954,16 @@ se = Se, function(t, e) {
}, r = function(i) { }, r = function(i) {
return parseInt(i, 36); return parseInt(i, 36);
}, s = Array.prototype.indexOf || function(i, a) { }, s = Array.prototype.indexOf || function(i, a) {
for (var m = a || 0, g = this.length; m < g; m++) if (this[m] === i) return m; for (var g = a || 0, m = this.length; g < m; g++) if (this[g] === i) return g;
return -1; return -1;
}; };
return { JSON, pack: function(i, a) { return { JSON, pack: function(i, a) {
var m = (a = a || {}).verbose || !1; var g = (a = a || {}).verbose || !1;
m && console.log("Normalize the JSON Object"), i = typeof i == "string" ? this.JSON.parse(i) : i, m && console.log("Creating a empty dictionary"); g && console.log("Normalize the JSON Object"), i = typeof i == "string" ? this.JSON.parse(i) : i, g && console.log("Creating a empty dictionary");
var g = { strings: [], integers: [], floats: [] }; var m = { strings: [], integers: [], floats: [] };
m && console.log("Creating the AST"); g && console.log("Creating the AST");
var d = function E(h) { var d = function E(h) {
m && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(h)); g && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(h));
var u, o = typeof h; var u, o = typeof h;
if (h === null) return { type: "null", index: -3 }; if (h === null) return { type: "null", index: -3 };
if (typeof h > "u") return { type: "undefined", index: -5 }; if (typeof h > "u") return { type: "undefined", index: -5 };
@ -977,16 +977,16 @@ se = Se, function(t, e) {
return c; return c;
} }
if (h === "") return { type: "empty", index: -4 }; if (h === "") return { type: "empty", index: -4 };
if (o === "string") return (u = s.call(g.strings, h)) == -1 && (g.strings.push(t(h)), u = g.strings.length - 1), { type: "strings", index: u }; if (o === "string") return (u = s.call(m.strings, h)) == -1 && (m.strings.push(t(h)), u = m.strings.length - 1), { type: "strings", index: u };
if (o === "number" && h % 1 == 0) return (u = s.call(g.integers, h)) == -1 && (g.integers.push(n(h)), u = g.integers.length - 1), { type: "integers", index: u }; if (o === "number" && h % 1 == 0) return (u = s.call(m.integers, h)) == -1 && (m.integers.push(n(h)), u = m.integers.length - 1), { type: "integers", index: u };
if (o === "number") return (u = s.call(g.floats, h)) == -1 && (g.floats.push(h), u = g.floats.length - 1), { type: "floats", index: u }; if (o === "number") return (u = s.call(m.floats, h)) == -1 && (m.floats.push(h), u = m.floats.length - 1), { type: "floats", index: u };
if (o === "boolean") return { type: "boolean", index: h ? -1 : -2 }; if (o === "boolean") return { type: "boolean", index: h ? -1 : -2 };
throw new Error("Unexpected argument of type " + typeof h); throw new Error("Unexpected argument of type " + typeof h);
}(i), b = g.strings.length, v = g.integers.length; }(i), b = m.strings.length, v = m.integers.length;
g.floats.length, m && console.log("Parsing the dictionary"); m.floats.length, g && console.log("Parsing the dictionary");
var w = g.strings.join("|"); var w = m.strings.join("|");
return w += "^" + g.integers.join("|"), w += "^" + g.floats.join("|"), m && console.log("Parsing the structure"), w += "^" + function E(h) { return w += "^" + m.integers.join("|"), w += "^" + m.floats.join("|"), g && console.log("Parsing the structure"), w += "^" + function E(h) {
if (m && console.log("Calling a recursiveParser with " + this.JSON.stringify(h)), h instanceof Array) { if (g && console.log("Calling a recursiveParser with " + this.JSON.stringify(h)), h instanceof Array) {
var u = h.shift(); var u = h.shift();
for (var o in h) h.hasOwnProperty(o) && (u += E(h[o]) + "|"); for (var o in h) h.hasOwnProperty(o) && (u += E(h[o]) + "|");
return (u[u.length - 1] === "|" ? u.slice(0, -1) : u) + "]"; return (u[u.length - 1] === "|" ? u.slice(0, -1) : u) + "]";
@ -1000,22 +1000,22 @@ se = Se, function(t, e) {
if (c === "undefined") return -5; if (c === "undefined") return -5;
if (c === "empty") return -4; if (c === "empty") return -4;
throw new TypeError("The item is alien!"); throw new TypeError("The item is alien!");
}(d), m && console.log("Ending parser"), a.debug ? { dictionary: g, ast: d, packed: w } : w; }(d), g && console.log("Ending parser"), a.debug ? { dictionary: m, ast: d, packed: w } : w;
}, unpack: function(i, a) { }, unpack: function(i, a) {
a = a || {}; a = a || {};
var m = i.split("^"); var g = i.split("^");
a.verbose && console.log("Building dictionary"); a.verbose && console.log("Building dictionary");
var g = [], d = m[0]; var m = [], d = g[0];
if (d !== "") { if (d !== "") {
d = d.split("|"), a.verbose && console.log("Parse the strings dictionary"); d = d.split("|"), a.verbose && console.log("Parse the strings dictionary");
for (var b = 0, v = d.length; b < v; b++) g.push(e(d[b])); for (var b = 0, v = d.length; b < v; b++) m.push(e(d[b]));
} }
if ((d = m[1]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the integers dictionary"), b = 0, v = d.length; b < v; b++) g.push(r(d[b])); if ((d = g[1]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the integers dictionary"), b = 0, v = d.length; b < v; b++) m.push(r(d[b]));
if ((d = m[2]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the floats dictionary"), b = 0, v = d.length; b < v; b++) g.push(parseFloat(d[b])); if ((d = g[2]) !== "") for (d = d.split("|"), a.verbose && console.log("Parse the floats dictionary"), b = 0, v = d.length; b < v; b++) m.push(parseFloat(d[b]));
d = null, a.verbose && console.log("Tokenizing the structure"); d = null, a.verbose && console.log("Tokenizing the structure");
var w = "", E = [], h = m[3].length; var w = "", E = [], h = g[3].length;
for (b = 0; b < h; b++) { for (b = 0; b < h; b++) {
var u = m[3].charAt(b); var u = g[3].charAt(b);
u === "|" || u === "$" || u === "@" || u === "]" ? (w && (E.push(r(w)), w = ""), u !== "|" && E.push(u)) : w += u; u === "|" || u === "$" || u === "@" || u === "]" ? (w && (E.push(r(w)), w = ""), u !== "|" && E.push(u)) : w += u;
} }
var o = E.length, c = 0; var o = E.length, c = 0;
@ -1043,7 +1043,7 @@ se = Se, function(t, e) {
f.push(""); f.push("");
break; break;
default: default:
f.push(g[A]); f.push(m[A]);
} }
} }
return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f;
@ -1052,7 +1052,7 @@ se = Se, function(t, e) {
for (f = {}; c < o; c++) { for (f = {}; c < o; c++) {
var S = E[c]; var S = E[c];
if (S === "]") return f; if (S === "]") return f;
if (S = S === -4 ? "" : g[S], (A = E[++c]) === "@" || A === "$") f[S] = l(); if (S = S === -4 ? "" : m[S], (A = E[++c]) === "@" || A === "$") f[S] = l();
else switch (A) { else switch (A) {
case -1: case -1:
f[S] = !0; f[S] = !0;
@ -1070,7 +1070,7 @@ se = Se, function(t, e) {
f[S] = ""; f[S] = "";
break; break;
default: default:
f[S] = g[A]; f[S] = m[A];
} }
} }
return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; return a.verbose && console.log("Parsed " + this.JSON.stringify(f)), f;
@ -1083,7 +1083,7 @@ const ie = sn(Se);
var K, G, z, D, Ot, Rt, et, At, Tt; var K, G, z, D, Ot, Rt, et, At, Tt;
class Ct { class Ct {
constructor(e, n, r, s, i) { constructor(e, n, r, s, i) {
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, D, { get: (a, m) => R(this, Ot).call(this, m), ownKeys: () => Object.keys(R(this, D).getPrototypeOf() || {}), getPrototypeOf: () => R(this, G) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: R(this, D).getPrototypeOf() }) }), _(this, Ot, (a) => a === "$echoMsg" ? R(this, et) : a === "msg" ? R(this, Rt) : a === "then" || a === "resp" ? (B(this, z, !0), B(this, G, a === "resp"), R(this, At)) : a === "catch" ? R(this, Tt) : a === "IS_ECHO_MSG" ? R(this, z) : Reflect.get(this, a)), _(this, Rt, (a = (g) => g, m = !1) => (R(this, et).call(this), B(this, G, m), Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())))), _(this, et, () => { 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, D, { get: (a, g) => R(this, Ot).call(this, g), ownKeys: () => Object.keys(R(this, D).getPrototypeOf() || {}), getPrototypeOf: () => R(this, G) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: R(this, D).getPrototypeOf() }) }), _(this, Ot, (a) => a === "$echoMsg" ? R(this, et) : a === "msg" ? R(this, Rt) : a === "then" || a === "resp" ? (B(this, z, !0), B(this, G, a === "resp"), R(this, At)) : a === "catch" ? R(this, Tt) : a === "IS_ECHO_MSG" ? R(this, z) : Reflect.get(this, a)), _(this, Rt, (a = (m) => m, g = !1) => (R(this, et).call(this), B(this, G, g), Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())))), _(this, et, () => {
R(this, z) && (B(this, z, !1), fn.onMsg(this.code, this.message)); R(this, z) && (B(this, z, !1), fn.onMsg(this.code, this.message));
}), _(this, At, (a) => [0, 1].includes(this.code) ? Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())) : Promise.reject(R(this, K))), _(this, Tt, (a) => Promise.resolve(a(R(this, K)))), this.code = e, this.message = n, this.data = r, this.url = s, this.res = i, B(this, K, new Proxy(this, R(this, D))); }), _(this, At, (a) => [0, 1].includes(this.code) ? Promise.resolve(a == null ? void 0 : a(R(this, D).getPrototypeOf())) : Promise.reject(R(this, K))), _(this, Tt, (a) => Promise.resolve(a(R(this, K)))), this.code = e, this.message = n, this.data = r, this.url = s, this.res = i, B(this, K, new Proxy(this, R(this, D)));
} }
@ -1164,9 +1164,9 @@ class ln {
const n = new Uint8Array(Math.ceil(6 * e.length / 8) + 1); const n = new Uint8Array(Math.ceil(6 * e.length / 8) + 1);
let r = n.length, s = 0, i = 0; let r = n.length, s = 0, i = 0;
for (let a = 0; a < e.length; a++) { for (let a = 0; a < e.length; a++) {
const m = e[a].charCodeAt(0), g = R(this, rt).decodeMap[m]; const g = e[a].charCodeAt(0), m = R(this, rt).decodeMap[g];
if (g === 255) throw new Error(`CorruptInputError at index ${a}`); if (m === 255) throw new Error(`CorruptInputError at index ${a}`);
a === e.length - 1 ? (i |= g << s, s += Math.ceil(Math.log2(g + 1))) : 30 & ~g ? (i |= g << s, s += 6) : (i |= g << s, s += 5), s >= 8 && (r--, n[r] = 255 & i, s %= 8, i >>= 8); a === e.length - 1 ? (i |= m << s, s += Math.ceil(Math.log2(m + 1))) : 30 & ~m ? (i |= m << s, s += 6) : (i |= m << s, s += 5), s >= 8 && (r--, n[r] = 255 & i, s %= 8, i >>= 8);
} }
return s > 0 && (r--, n[r] = 255 & i), n.slice(r); return s > 0 && (r--, n[r] = 255 & i), n.slice(r);
} }
@ -1179,17 +1179,18 @@ rt = /* @__PURE__ */ new WeakMap(), Promise.withResolvers || (Promise.withResolv
}); });
class _t { class _t {
constructor(e, n, r = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) { constructor(e, n, r = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) {
_(this, ot, void 0), _(this, X, void 0), _(this, Pt, void 0), _(this, L, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), _(this, M, /* @__PURE__ */ new Map()), P(this, "request", ({ url: s = "/", method: i = "GET", ...a }, m = !1) => { _(this, ot, void 0), _(this, X, void 0), _(this, Pt, void 0), _(this, L, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), _(this, M, /* @__PURE__ */ new Map()), P(this, "request", ({ url: s = "/", method: i = "GET", ...a }, g = !1) => {
var g; var m;
s = ((u, o) => u.replace(new RegExp(`^${o}+|${o}+$`, "g"), ""))(s, "/");
const d = i.toUpperCase(), b = ((u) => { const d = i.toUpperCase(), b = ((u) => {
let o = 5381; let o = 5381;
for (let c = 0; c < u.length; c++) o = 33 * o ^ u.charCodeAt(c); for (let c = 0; c < u.length; c++) o = 33 * o ^ u.charCodeAt(c);
return (o >>> 0).toString(16); return (o >>> 0).toString(16);
})(JSON.stringify([s, d, a])), v = (g = s == null ? void 0 : s.includes) != null && g.call(s, "/_/") ? "#" : "$", { promise: w, resolve: E, reject: h } = Promise.withResolvers(); })(JSON.stringify([s, d, a])), v = (m = s == null ? void 0 : s.includes) != null && m.call(s, "/_/") ? "#" : "$", { promise: w, resolve: E, reject: h } = Promise.withResolvers();
return R(this, L)[v].has(b) ? (console.log("cache", s), E(R(this, L)[v].get(b))) : R(this, M).has(b) ? R(this, M).get(b).push([E, h]) : (R(this, M).set(b, [[E, h]]), R(this, ot).call(this, { url: s, method: d, ...a }).then((u) => { return R(this, L)[v].has(b) ? (console.log("cache", s), E(R(this, L)[v].get(b))) : R(this, M).has(b) ? R(this, M).get(b).push([E, h]) : (R(this, M).set(b, [[E, h]]), R(this, ot).call(this, { url: s, method: d, ...a }).then((u) => {
if (![0, 1].includes(u.code)) throw bt(u.code, u.msg, u.data, s, u == null ? void 0 : u.res); if (![0, 1].includes(u.code)) throw bt(u.code, u.msg, u.data, s, u == null ? void 0 : u.res);
return [u.code, u.msg, u.data, s, u == null ? void 0 : u.res]; return [u.code, u.msg, u.data, s, u == null ? void 0 : u.res];
}).then((u) => ((v == "#" || d == "GET") && R(this, L)[v].set(b, u), v != "#" && d == "GET" && !m && setTimeout(() => { }).then((u) => ((v == "#" || d == "GET") && R(this, L)[v].set(b, u), v != "#" && d == "GET" && !g && setTimeout(() => {
R(this, L)[v].delete(b); R(this, L)[v].delete(b);
}, 300), u)).then((u) => { }, 300), u)).then((u) => {
var o; var o;
@ -1218,7 +1219,7 @@ class _t {
return console.warn("core.decode", s), i; return console.warn("core.decode", s), i;
} }
}), P(this, "encode", (s = {}) => { }), P(this, "encode", (s = {}) => {
const i = JSON.stringify(s, (a, m) => m === void 0 ? null : m); const i = JSON.stringify(s, (a, g) => g === void 0 ? null : g);
return R(this, X).encode(ie.pack(i)); return R(this, X).encode(ie.pack(i));
}), B(this, Pt, e), B(this, ot, r), B(this, X, new cn(n)); }), B(this, Pt, e), B(this, ot, r), B(this, X, new cn(n));
} }
@ -1255,9 +1256,9 @@ Ae.exports = function() {
var u = n.isStarted(); var u = n.isStarted();
h = s(h, r.minimum, 1), n.status = h === 1 ? null : h; h = s(h, r.minimum, 1), n.status = h === 1 ? null : h;
var o = n.render(!u), c = o.querySelector(r.barSelector), l = r.speed, p = r.easing; var o = n.render(!u), c = o.querySelector(r.barSelector), l = r.speed, p = r.easing;
return o.offsetWidth, m(function(f) { return o.offsetWidth, g(function(f) {
r.positionUsing === "" && (r.positionUsing = n.getPositioningCSS()), g(c, a(h, l, p)), h === 1 ? (g(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() { r.positionUsing === "" && (r.positionUsing = n.getPositioningCSS()), m(c, a(h, l, p)), h === 1 ? (m(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() {
g(o, { transition: "all " + l + "ms linear", opacity: 0 }), setTimeout(function() { m(o, { transition: "all " + l + "ms linear", opacity: 0 }), setTimeout(function() {
n.remove(), f(); n.remove(), f();
}, l); }, l);
}, l)) : setTimeout(f, l); }, l)) : setTimeout(f, l);
@ -1289,7 +1290,7 @@ Ae.exports = function() {
var u = document.createElement("div"); var u = document.createElement("div");
u.id = "nprogress", u.innerHTML = r.template; u.id = "nprogress", u.innerHTML = r.template;
var o, c = u.querySelector(r.barSelector), l = h ? "-100" : i(n.status || 0), p = document.querySelector(r.parent); var o, c = u.querySelector(r.barSelector), l = h ? "-100" : i(n.status || 0), p = document.querySelector(r.parent);
return g(c, { transition: "all 0 linear", transform: "translate3d(" + l + "%,0,0)" }), r.showSpinner || (o = u.querySelector(r.spinnerSelector)) && E(o), p != document.body && b(p, "nprogress-custom-parent"), p.appendChild(u), u; return m(c, { transition: "all 0 linear", transform: "translate3d(" + l + "%,0,0)" }), r.showSpinner || (o = u.querySelector(r.spinnerSelector)) && E(o), p != document.body && b(p, "nprogress-custom-parent"), p.appendChild(u), u;
}, n.remove = function() { }, n.remove = function() {
v(document.documentElement, "nprogress-busy"), v(document.querySelector(r.parent), "nprogress-custom-parent"); v(document.documentElement, "nprogress-busy"), v(document.querySelector(r.parent), "nprogress-custom-parent");
var h = document.getElementById("nprogress"); var h = document.getElementById("nprogress");
@ -1300,7 +1301,7 @@ Ae.exports = function() {
var h = document.body.style, u = "WebkitTransform" in h ? "Webkit" : "MozTransform" in h ? "Moz" : "msTransform" in h ? "ms" : "OTransform" in h ? "O" : ""; var h = document.body.style, u = "WebkitTransform" in h ? "Webkit" : "MozTransform" in h ? "Moz" : "msTransform" in h ? "ms" : "OTransform" in h ? "O" : "";
return u + "Perspective" in h ? "translate3d" : u + "Transform" in h ? "translate" : "margin"; return u + "Perspective" in h ? "translate3d" : u + "Transform" in h ? "translate" : "margin";
}; };
var m = /* @__PURE__ */ function() { var g = /* @__PURE__ */ function() {
var h = []; var h = [];
function u() { function u() {
var o = h.shift(); var o = h.shift();
@ -1309,7 +1310,7 @@ Ae.exports = function() {
return function(o) { return function(o) {
h.push(o), h.length == 1 && u(); h.push(o), h.length == 1 && u();
}; };
}(), g = /* @__PURE__ */ function() { }(), m = /* @__PURE__ */ function() {
var h = ["Webkit", "O", "Moz", "ms"], u = {}; var h = ["Webkit", "O", "Moz", "ms"], u = {};
function o(f) { function o(f) {
return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(A, S) { return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(A, S) {
@ -1385,14 +1386,14 @@ Te.exports = function(t) {
if (l[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (n(T, l), o = 0; o < 16; o += 1) l[o] = 0; if (l[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (n(T, l), o = 0; o < 16; o += 1) l[o] = 0;
return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(p[2], 16), A = parseInt(p[1], 16) || 0, l[14] = f, l[15] = A, n(T, l), T; return p = (p = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(p[2], 16), A = parseInt(p[1], 16) || 0, l[14] = f, l[15] = A, n(T, l), T;
} }
function m(u) { function g(u) {
var o, c = ""; var o, c = "";
for (o = 0; o < 4; o += 1) c += e[u >> 8 * o + 4 & 15] + e[u >> 8 * o & 15]; for (o = 0; o < 4; o += 1) c += e[u >> 8 * o + 4 & 15] + e[u >> 8 * o & 15];
return c; return c;
} }
function g(u) { function m(u) {
var o; var o;
for (o = 0; o < u.length; o += 1) u[o] = m(u[o]); for (o = 0; o < u.length; o += 1) u[o] = g(u[o]);
return u.join(""); return u.join("");
} }
function d(u) { function d(u) {
@ -1418,7 +1419,7 @@ Te.exports = function(t) {
function h() { function h() {
this.reset(); this.reset();
} }
return g(i("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { return m(i("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() {
function u(o, c) { function u(o, c) {
return (o = 0 | o || 0) < 0 ? Math.max(o + c, 0) : Math.min(o, c); return (o = 0 | o || 0) < 0 ? Math.max(o + c, 0) : Math.min(o, c);
} }
@ -1436,7 +1437,7 @@ Te.exports = function(t) {
}, h.prototype.end = function(u) { }, h.prototype.end = function(u) {
var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (o = 0; o < p; o += 1) f[o >> 2] |= l.charCodeAt(o) << (o % 4 << 3); for (o = 0; o < p; o += 1) f[o >> 2] |= l.charCodeAt(o) << (o % 4 << 3);
return this._finish(f, p), c = g(this._hash), u && (c = E(c)), this.reset(), c; return this._finish(f, p), c = m(this._hash), u && (c = E(c)), this.reset(), c;
}, h.prototype.reset = function() { }, h.prototype.reset = function() {
return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
}, h.prototype.getState = function() { }, h.prototype.getState = function() {
@ -1452,7 +1453,7 @@ Te.exports = function(t) {
}, h.hash = function(u, o) { }, h.hash = function(u, o) {
return h.hashBinary(d(u), o); return h.hashBinary(d(u), o);
}, h.hashBinary = function(u, o) { }, h.hashBinary = function(u, o) {
var c = g(i(u)); var c = m(i(u));
return o ? E(c) : c; return o ? E(c) : c;
}, h.ArrayBuffer = function() { }, h.ArrayBuffer = function() {
this.reset(); this.reset();
@ -1463,7 +1464,7 @@ Te.exports = function(t) {
}, h.ArrayBuffer.prototype.end = function(u) { }, h.ArrayBuffer.prototype.end = function(u) {
var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var o, c, l = this._buff, p = l.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (o = 0; o < p; o += 1) f[o >> 2] |= l[o] << (o % 4 << 3); for (o = 0; o < p; o += 1) f[o >> 2] |= l[o] << (o % 4 << 3);
return this._finish(f, p), c = g(this._hash), u && (c = E(c)), this.reset(), c; return this._finish(f, p), c = m(this._hash), u && (c = E(c)), this.reset(), c;
}, h.ArrayBuffer.prototype.reset = function() { }, h.ArrayBuffer.prototype.reset = function() {
return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
}, h.ArrayBuffer.prototype.getState = function() { }, h.ArrayBuffer.prototype.getState = function() {
@ -1472,14 +1473,14 @@ Te.exports = function(t) {
}, h.ArrayBuffer.prototype.setState = function(u) { }, h.ArrayBuffer.prototype.setState = function(u) {
return u.buff = b(u.buff, !0), h.prototype.setState.call(this, u); return u.buff = b(u.buff, !0), h.prototype.setState.call(this, u);
}, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(u, o) { }, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(u, o) {
var c = g(a(new Uint8Array(u))); var c = m(a(new Uint8Array(u)));
return o ? E(c) : c; return o ? E(c) : c;
}, h; }, h;
}(); }();
const dn = Re(Te.exports); const dn = Re(Te.exports);
export { export {
hn as N, hn as N,
fn as P,
dn as S, dn as S,
fn as T,
C as a C as a
}; };

2
dist/components.js vendored
View File

@ -1,4 +1,4 @@
import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-BsGJOUs_.js"; import { ab as s, a2 as p, ac as d, ad as n, aa as t } from "./common/main-CH2QjgF5.js";
export { export {
s as Empty, s as Empty,
p as Icon, p as Icon,

2
dist/container.js vendored
View File

@ -1,4 +1,4 @@
import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-BsGJOUs_.js"; import { a7 as o, ab as s, ac as d, ad as p, a8 as t, aa as n, a9 as r, a6 as u } from "./common/main-CH2QjgF5.js";
export { export {
o as Context, o as Context,
s as Empty, s as Empty,

View File

@ -1,6 +1,6 @@
import "lodash"; import "lodash";
import "react"; import "react";
import { D as p } from "./common/main-BsGJOUs_.js"; import { D as p } from "./common/main-CH2QjgF5.js";
export { export {
p as default p as default
}; };

2
dist/data-list.js vendored
View File

@ -1,4 +1,4 @@
import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-BsGJOUs_.js"; import { z as t, x as e, p as r, v as o, A as i, w as u, s as D, y as l, q as L, B as n, o as p, C as m, L as C, F as c, J as F, I as b, K as d, E as k } from "./common/main-CH2QjgF5.js";
export { export {
t as DataListContent, t as DataListContent,
e as DataListContext, e as DataListContext,

View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { j as a } from "../common/main-BsGJOUs_.js"; import { j as a } from "../common/main-CH2QjgF5.js";
export { export {
a as getDefaultExpandRowKeys a as getDefaultExpandRowKeys
}; };

View File

@ -1,4 +1,4 @@
import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-BsGJOUs_.js"; import { V as s, X as r, W as u, U as o, $ as t, _ as d, a1 as m, Z as F, Y as i, a0 as g } from "./common/main-CH2QjgF5.js";
export { export {
s as GridLayoutForm, s as GridLayoutForm,
r as GridLayoutFormHelper, r as GridLayoutFormHelper,

View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { g as o, a as g } from "../common/main-BsGJOUs_.js"; import { g as o, a as g } from "../common/main-CH2QjgF5.js";
export { export {
o as getOptionItemByValue, o as getOptionItemByValue,
g as getWidgetByNormalize g as getWidgetByNormalize

2
dist/grid-layout.js vendored
View File

@ -1,4 +1,4 @@
import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-BsGJOUs_.js"; import { k as d, l as e, H as i, G as t, m as u, n as o } from "./common/main-CH2QjgF5.js";
export { export {
d as GridLayout, d as GridLayout,
e as GridLayoutWidget, e as GridLayoutWidget,

View File

@ -1,4 +1,4 @@
import { h as o, i as a } from "../common/main-BsGJOUs_.js"; import { h as o, i as a } from "../common/main-CH2QjgF5.js";
export { export {
o as getBoxStyle, o as getBoxStyle,
a as getWidgetByNormalize a as getWidgetByNormalize

2
dist/hooks.js vendored
View File

@ -1,7 +1,7 @@
import "lodash"; import "lodash";
import "rc-field-form"; import "rc-field-form";
import "react"; import "react";
import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-BsGJOUs_.js"; import { Q as r, P as o, S as p, N as f, O as i, T as m, M as c } from "./common/main-CH2QjgF5.js";
import { default as S } from "rc-util/lib/hooks/useMergedState"; import { default as S } from "rc-util/lib/hooks/useMergedState";
export { export {
r as useDeepEffect, r as useDeepEffect,

2
dist/iconfont.js vendored
View File

@ -2,7 +2,7 @@ import "react/jsx-runtime";
import "react"; import "react";
import "prop-types"; import "prop-types";
import "classnames"; import "classnames";
import { a2 as a } from "./common/main-BsGJOUs_.js"; import { a2 as a } from "./common/main-CH2QjgF5.js";
export { export {
a as default a as default
}; };

2
dist/index.js vendored
View File

@ -1,4 +1,4 @@
import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-BsGJOUs_.js"; import { am as t, an as e, ai as o, aj as n, ae as p, ak as r, ah as c, ag as f, af as l, al as i } from "./common/main-CH2QjgF5.js";
export { export {
t as AppContext, t as AppContext,
e as AppGlobalParamsContext, e as AppGlobalParamsContext,

2
dist/res-ws.js vendored
View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { R as a } from "./common/main-BsGJOUs_.js"; import { R as a } from "./common/main-CH2QjgF5.js";
export { export {
a as default a as default
}; };

2
dist/utils.js vendored
View File

@ -1,5 +1,5 @@
import "lodash"; import "lodash";
import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-BsGJOUs_.js"; import { d as s, e as g, c as r, f as o, b as i, r as m, t as p, u as P } from "./common/main-CH2QjgF5.js";
export { export {
s as deepSome, s as deepSome,
g as getPkgCategory, g as getPkgCategory,

View File

@ -1,7 +1,7 @@
{ {
"name": "ff", "name": "ff",
"private": true, "private": true,
"version": "0.4.59", "version": "0.4.60",
"author": "www.fsdpf.com", "author": "www.fsdpf.com",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",