@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,235 lines • 256 kB
JavaScript
var Hi = Object.defineProperty;
var qi = (e, t, n) => t in e ? Hi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var we = (e, t, n) => qi(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as y, defineComponent as Ae, computed as X, watch as Me, createVNode as v, Fragment as mt, reactive as on, createApp as In, onUnmounted as bt, onMounted as et, Transition as kn, mergeProps as ut, nextTick as Ct, createTextVNode as qe, inject as xe, withDirectives as an, resolveDirective as rn, onBeforeMount as Pn, provide as It, triggerRef as Wi, onBeforeUnmount as On, isVNode as Gi, watchEffect as Yi, Teleport as Ki, shallowRef as Xi, render as Zt, h as Qi, cloneVNode as Ji, withModifiers as Zi } from "vue";
import { debounce as ea, isUndefined as Ze, cloneDeep as Ut, mergeWith as ta, merge as Bt, findIndex as wn } from "lodash-es";
import { LocaleService as $e } from "../locale/index.esm.js";
import "bignumber.js";
import { getCustomClass as dt, withInstall as na, EVENT_PROPERTY_TAB_IDS as oa, FormSchemaEntityField$Type as Sn, FormSchemaEntityFieldTypeName as Tn, useThirdComponent as Vn, isMobilePhone as ln, getMaxZIndex as Fn } from "../common/index.esm.js";
import { useResizeObserver as ia } from "@vueuse/core";
import { getHierarchyRow as aa, useIdentify as ra, useGroupData as la, useFilter as sa, useHierarchy as ca, useLoading as ua, useDataView as da, useSelection as fa, useSelectHierarchyItem as ma, usePagination as pa, useDataViewContainerStyle as va, useCommandColumn as ga, useSettingColumn as ha, useColumn as ya, useSort as Ca, useGroupColumn as ba, useRow as wa, useEdit as Sa, useVisualDataBound as Ta, useVisualDataCell as Fa, useVisualDataRow as Ea, useVisualData as xa, useCellPosition as Ma, useSidebar as Ba, useVirtualScroll as Da, useFitColumn as Ia, useFilterHistory as ka, useColumnFilter as Pa, useDragColumn as Oa, getColumnHeader as Va, getSidebar as Na, getDisableMask as La, getHorizontalScrollbar as Ra, getVerticalScrollbar as Aa, getEmpty as ja, getPagination as _a, getSummary as $a, ColumnSettingSolution as za, refreshScrollAfterDataSourceLoad as Ua, COMMAND_COLUMN_DATA_TYPE as en, SETTING_COLUMN_DATA_TYPE as tn } from "../data-view/index.esm.js";
import { resolveField as Ha } from "../common/index.esm.js/utils/resolve-field";
import qa from "../input-group/index.esm.js";
import yt from "../button/index.esm.js";
import { resolveAppearance as Nn, createPropsResolver as Ot, schemaResolverMap as Wa, propertyEffectMap as Ga, propertyConfigSchemaMap as Ya, schemaMap as Ka, schemaResolverMapForDesigner as Ln, propertyEffectMapForDesigner as Rn, propertyConfigSchemaMapForDesigner as An, schemaMapForDesigner as jn, getSchemaByTypeForDesigner as _n } from "../dynamic-resolver/index.esm.js";
import { DgControl as En, canvasChanged as Xa, refreshCanvas as Qa, useDesignerComponent as Ja } from "../designer-canvas/index.esm.js";
import { loadRegister as Za, useComponentManager as er, useEntityState as tr, useDynamicViewUtils as nr, componentMap as nn, resolverMap as or, componentPropsConverter as ir } from "../dynamic-view/index.esm.js";
import ar from "../section/index.esm.js";
import $n from "../accordion/index.esm.js";
import zn from "../../designer/avatar/index.esm.js";
import Un from "../../designer/approval-logs/index.esm.js";
import Hn from "../../designer/button-edit/index.esm.js";
import qn from "../button-group/index.esm.js";
import Wn from "../calendar/index.esm.js";
import Gn from "../../designer/capsule/index.esm.js";
import sn from "../../designer/checkbox/index.esm.js";
import _t from "../../designer/checkbox-group/index.esm.js";
import Yn from "../combo-list/index.esm.js";
import rr from "../combo-tree/index.esm.js";
import Kn from "../component/index.esm.js";
import Xn from "../color-picker/index.esm.js";
import Qn from "../content-container/index.esm.js";
import Jn from "../table/index.esm.js";
import Zn from "../../designer/date-picker/index.esm.js";
import eo from "../../designer/data-grid/index.esm.js";
import to from "../dropdown/index.esm.js";
import no from "../../designer/dynamic-form/index.esm.js";
import lr from "../events-editor/index.esm.js";
import oo from "../filter-bar/index.esm.js";
import sr from "../field-selector/index.esm.js";
import cr, { FBindingSelectorContainer as ur } from "../binding-selector/index.esm.js";
import io from "../image-cropper/index.esm.js";
import ao from "../../designer/input-group/index.esm.js";
import ro from "../layout/index.esm.js";
import lo from "../list-nav/index.esm.js";
import so from "../../designer/list-view/index.esm.js";
import co from "../lookup/index.esm.js";
import dr from "../mapping-editor/index.esm.js";
import uo from "../../designer/nav/index.esm.js";
import fo from "../number-range/index.esm.js";
import mo from "../../designer/number-spinner/index.esm.js";
import po from "../order/index.esm.js";
import vo from "../page-header/index.esm.js";
import go from "../page-footer/index.esm.js";
import ho from "../pagination/index.esm.js";
import yo from "../progress/index.esm.js";
import Co from "../query-solution/index.esm.js";
import bo from "../../designer/radio-group/index.esm.js";
import wo from "../../designer/rate/index.esm.js";
import So from "../../designer/response-toolbar/index.esm.js";
import To from "../response-layout/index.esm.js";
import Fo from "../../designer/response-layout-editor/index.esm.js";
import Eo from "../search-box/index.esm.js";
import xo from "../../designer/section/index.esm.js";
import Mo from "../smoke-detector/index.esm.js";
import Bo from "../splitter/index.esm.js";
import Do from "../step/index.esm.js";
import Io from "../../designer/switch/index.esm.js";
import ko from "../../designer/tabs/index.esm.js";
import Po from "../../designer/tags/index.esm.js";
import Oo from "../text/index.esm.js";
import Vo from "../../designer/time-picker/index.esm.js";
import No from "../transfer/index.esm.js";
import Lo from "../tree-view/index.esm.js";
import Ro from "../uploader/index.esm.js";
import Ao from "../verify-detail/index.esm.js";
import jo from "../video/index.esm.js";
import _o from "../../designer/textarea/index.esm.js";
import fr from "../schema-selector/index.esm.js";
import $o from "../../designer/tree-grid/index.esm.js";
import mr from "../event-parameter/index.esm.js";
import pr from "../filter-condition-editor/index.esm.js";
import zo from "../fieldset/index.esm.js";
import vr from "../sort-condition-editor/index.esm.js";
import gr from "../menu-lookup/index.esm.js";
import Uo from "../../designer/drawer/index.esm.js";
import hr from "../json-editor/index.esm.js";
import yr from "../property-editor/index.esm.js";
import Cr from "../expression-editor/index.esm.js";
import br from "../code-editor/index.esm.js";
import Ho from "../html-template/index.esm.js";
import wr from "../collection-property-editor/index.esm.js";
import Sr from "../../designer/modal/index.esm.js";
import qo from "../external-container/index.esm.js";
import Wo from "../language-textbox/index.esm.js";
import Go from "../image/index.esm.js";
import Yo from "../comment/index.esm.js";
import Ko from "../../designer/wizard/index.esm.js";
import Tr from "../tooltip/index.esm.js";
import "../property-panel/index.esm.js";
import { FNotifyService as Fr } from "../notify/index.esm.js";
import "../collection-property-editor/index.esm.js/src/use-button-items.designer";
const at = y(0);
function Er() {
at.value++;
}
function xr(e, t) {
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = o.top >= n.top, a = o.top <= n.bottom;
return i && a;
}
function Xo(e) {
const t = e.querySelector(".component-btn-group");
if (!t)
return;
t.style.display = "";
const n = t.getBoundingClientRect();
if (!(n.top === 0 && n.left === 0)) {
const o = t.querySelector("div");
if (o) {
const i = o.getBoundingClientRect();
o.style.top = n.top + "px";
let a = n.left - i.width;
const r = document.querySelector(".editorDiv");
if (r) {
const c = r.getBoundingClientRect();
a < c.left && ({ left: a } = e.getBoundingClientRect());
}
o.style.left = a + "px";
}
}
}
function Qo(e) {
var n, o, i, a, r;
if (!window.scrollContainerList)
return;
const t = Array.from(window.scrollContainerList);
if (t.length)
if (t.length === 1) {
const c = t[0], s = document.querySelector(`[id=${c}]`);
if (s && s.contains(e))
return s;
} else {
const { componentInstance: c } = e;
if (((n = c == null ? void 0 : c.value) == null ? void 0 : n.scrollElementId) === ((o = c == null ? void 0 : c.value.schema) == null ? void 0 : o.id))
return e;
if (((i = c == null ? void 0 : c.value) == null ? void 0 : i.scrollElementId) === `${(a = c == null ? void 0 : c.value.schema) == null ? void 0 : a.id}-design-item`)
return e.parentElement;
if ((r = c.value.parent) != null && r.elementRef)
return Qo(c.value.parent.elementRef);
}
}
function fn(e) {
if (!e)
return;
const t = e.getBoundingClientRect();
if (t.width === 0 && t.height === 0)
return;
const n = e.querySelector(".component-btn-group");
if (n) {
let o = !0;
const i = Qo(e);
if (i && (o = xr(e, i)), !o) {
n.style.display = "none";
return;
}
Xo(e);
}
}
function kt(e) {
if (!e)
return;
let t;
e.className.includes("dgComponentSelected") ? t = e : t = e.querySelector(".dgComponentSelected"), t && fn(t);
}
function Jc() {
const e = document.querySelector(".dgComponentSelected");
if (!e)
return;
const t = e.querySelector(".component-btn-group");
t && t.getBoundingClientRect().top !== 0 && Xo(e);
}
const Mr = {
/**
* 组件值
*/
modelValue: { type: Object, default: {} },
componentId: { type: String, default: "" },
components: { type: Array },
canvasMode: { type: String, default: "PC" }
};
var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Br(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Rt(e) {
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var Jo = { exports: {} };
(function(e, t) {
(function(n) {
e.exports = n();
})(function() {
return (/* @__PURE__ */ function() {
function n(o, i, a) {
function r(u, m) {
if (!i[u]) {
if (!o[u]) {
var f = typeof Rt == "function" && Rt;
if (!m && f) return f(u, !0);
if (c) return c(u, !0);
var b = new Error("Cannot find module '" + u + "'");
throw b.code = "MODULE_NOT_FOUND", b;
}
var l = i[u] = { exports: {} };
o[u][0].call(l.exports, function(d) {
var T = o[u][1][d];
return r(T || d);
}, l, l.exports, n, o, i, a);
}
return i[u].exports;
}
for (var c = typeof Rt == "function" && Rt, s = 0; s < a.length; s++) r(a[s]);
return r;
}
return n;
}())({
1: [function(n, o, i) {
var a = {}, r = "(?:^|\\s)", c = "(?:\\s|$)";
function s(f) {
var b = a[f];
return b ? b.lastIndex = 0 : a[f] = b = new RegExp(r + f + c, "g"), b;
}
function u(f, b) {
var l = f.className;
l.length ? s(b).test(l) || (f.className += " " + b) : f.className = b;
}
function m(f, b) {
f.className = f.className.replace(s(b), " ").trim();
}
o.exports = {
add: u,
rm: m
};
}, {}],
2: [function(n, o, i) {
(function(a) {
var r = n("contra/emitter"), c = n("crossvent"), s = n("./classes"), u = document, m = u.documentElement;
function f(I, _) {
var M = arguments.length;
M === 1 && Array.isArray(I) === !1 && (_ = I, I = []);
var N, $, L, U, O, z, oe, E, A, ae = null, ie, J, ve = !1, Se = 0, de, Z = _ || {};
Z.moves === void 0 && (Z.moves = h), Z.accepts === void 0 && (Z.accepts = h), Z.invalid === void 0 && (Z.invalid = rt), Z.containers === void 0 && (Z.containers = I || []), Z.isContainer === void 0 && (Z.isContainer = B), Z.copy === void 0 && (Z.copy = !1), Z.copySortSource === void 0 && (Z.copySortSource = !1), Z.revertOnSpill === void 0 && (Z.revertOnSpill = !1), Z.removeOnSpill === void 0 && (Z.removeOnSpill = !1), Z.direction === void 0 && (Z.direction = "vertical"), Z.ignoreInputTextSelection === void 0 && (Z.ignoreInputTextSelection = !0), Z.mirrorContainer === void 0 && (Z.mirrorContainer = u.body);
var F = r({
containers: Z.containers,
start: Pe,
end: pt,
cancel: ot,
remove: gt,
destroy: ke,
canMove: Ve,
dragging: !1
});
return Z.removeOnSpill === !0 && F.on("over", Ee).on("out", Ue), le(), F;
function re(P) {
return F.containers.indexOf(P) !== -1 || Z.isContainer(P);
}
function le(P) {
var K = P ? "remove" : "add";
d(m, K, "mousedown", Le), d(m, K, "mouseup", Qe);
}
function ce(P) {
var K = P ? "remove" : "add";
d(m, K, "mousemove", Te);
}
function Ce(P) {
var K = P ? "remove" : "add";
c[K](m, "selectstart", je), c[K](m, "click", je);
}
function ke() {
le(!0), Qe({});
}
function je(P) {
ie && P.preventDefault();
}
function Le(P) {
U = P.clientX, O = P.clientY;
var K = T(P) !== 1 || P.metaKey || P.ctrlKey;
if (!K) {
var Q = P.target, se = Oe(Q);
se && (ie = se, ce(), P.type === "mousedown" && (C(Q) ? Q.focus() : P.preventDefault()));
}
}
function Te(P) {
if (ie) {
if (T(P) === 0) {
Qe({});
return;
}
if (!(P.clientX !== void 0 && Math.abs(P.clientX - U) <= (Z.slideFactorX || 0) && P.clientY !== void 0 && Math.abs(P.clientY - O) <= (Z.slideFactorY || 0))) {
if (Z.ignoreInputTextSelection) {
var K = x("clientX", P) || 0, Q = x("clientY", P) || 0, se = u.elementFromPoint(K, Q);
if (C(se))
return;
}
var he = ie;
ce(!0), Ce(), pt(), Be(he), s.add(E || L, "gu-transit"), st(), wt(), Se = 0, ue(P);
}
}
}
function Oe(P) {
if (!(F.dragging && N) && !re(P)) {
for (var K = P; k(P) && re(k(P)) === !1; )
if (Z.invalid(P, K) || (P = k(P), !P))
return;
var Q = k(P);
if (Q && !Z.invalid(P, K)) {
var se = Z.moves(P, Q, K, p(P));
if (se)
return {
item: P,
source: Q
};
}
}
}
function Ve(P) {
return !!Oe(P);
}
function Pe(P) {
var K = Oe(P);
K && Be(K);
}
function Be(P) {
Xt(P.item, P.source) && (E = P.item.cloneNode(!0), F.emit("cloned", E, P.item, "copy")), $ = P.source, L = P.item, z = oe = p(P.item), F.dragging = !0, F.emit("drag", L, $);
}
function rt() {
return !1;
}
function pt() {
if (F.dragging) {
var P = E || L;
tt(P, k(P));
}
}
function vt() {
ie = !1, ce(!0), Ce(!0);
}
function Qe(P) {
if (vt(), !!F.dragging) {
var K = E || L, Q = x("clientX", P) || 0, se = x("clientY", P) || 0, he = D(N, Q, se), be = j(he, Q, se);
be && (E && Z.copySortSource || !E || be !== $) ? tt(K, be) : Z.removeOnSpill ? gt() : ot();
}
}
function tt(P, K) {
var Q = k(P);
E && Z.copySortSource && K === $ && Q.removeChild(L), Ie(K) ? F.emit("cancel", P, $) : F.emit("drop", P, K, $, oe), lt();
}
function gt() {
if (F.dragging) {
var P = E || L, K = k(P);
K && K.removeChild(P), F.emit(E ? "cancel" : "remove", P, K, $), lt();
}
}
function ot(P) {
if (F.dragging) {
var K = arguments.length > 0 ? P : Z.revertOnSpill, Q = E || L, se = k(Q), he = Ie(se);
he === !1 && K && (E ? se && se.removeChild(E) : $.insertBefore(Q, z)), he || K ? F.emit("cancel", Q, $, $) : F.emit("drop", Q, se, $, oe), lt();
}
}
function lt() {
var P = E || L;
vt(), ht(), Vt(), P && s.rm(P, "gu-transit"), A && clearTimeout(A), F.dragging = !1, ae && F.emit("out", P, ae, $), F.emit("dragend", P, Se), $ = L = E = z = oe = A = ae = null;
}
function Ie(P, K) {
var Q;
return K !== void 0 ? Q = K : N ? Q = oe : Q = p(E || L), P === $ && Q === z;
}
function j(P, K, Q) {
for (var se = P; se && !he(); )
se = k(se);
return se;
function he() {
var be = re(se);
if (be === !1)
return !1;
var Ke = Nt(se, P), ze = Lt(se, Ke, K, Q), We = Ie(se, ze);
return We ? !0 : Z.accepts(L, se, $, ze);
}
}
function ue(P) {
if (!N)
return;
P.preventDefault();
var K = x("clientX", P) || 0, Q = x("clientY", P) || 0;
N.style.left = K - 2 + "px", N.style.top = Q - 2 + "px";
var se = E || L, he = D(N, K, Q), be = j(he, K, Q), Ke = be !== null && be !== ae;
(Ke || be === null) && (He(), ae = be, Je()), Kt(he, Q);
var ze = k(se);
if (be === $ && E && !Z.copySortSource) {
ze && ze.removeChild(se);
return;
}
var We, Ge = Nt(be, he);
if (ve = qt(Ge, be), Ge !== null)
We = Lt(be, Ge, K, Q);
else if (Z.revertOnSpill === !0 && !E)
We = z, be = $;
else {
E && ze && ze.removeChild(se), E && J && (J.style.display = "none");
return;
}
J.style.display = "block", Fe(We, se, Ke), We ? Gt(Ge, We) : Yt(be);
function Re(_e) {
F.emit(_e, se, ae, $);
}
function Je() {
Ke && Re("over");
}
function He() {
ae && Re("out");
}
}
function Fe(P, K, Q) {
(P === K || P === p(K)) && (oe = p(K)), (P === null && Q || P !== K && P !== p(K)) && (oe = P);
}
function Ee(P) {
s.rm(P, "gu-hide");
}
function Ue(P) {
F.dragging && s.add(P, "gu-hide");
}
function wt() {
N || (N = document.createElement("div"), N.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", N.innerHTML = Z.getMirrorText && Z.getMirrorText(L) || "控件", s.add(N, "gu-mirror"), Z.mirrorContainer.appendChild(N), d(m, "add", "mousemove", ue), s.add(Z.mirrorContainer, "gu-unselectable"), F.emit("cloned", N, L, "mirror"));
}
function st() {
if (J = document.createElement("div"), s.add(J, "gu-insertion"), L) {
var P = L.getBoundingClientRect();
J.style.left = P.left + "px", J.style.top = P.top + "px";
}
ve = !1, Z.mirrorContainer.appendChild(J);
}
function ht() {
N && (s.rm(Z.mirrorContainer, "gu-unselectable"), d(m, "remove", "mousemove", ue), k(N).removeChild(N), N = null);
}
function Vt() {
J && (k(J).removeChild(J), J = null);
}
function Nt(P, K) {
for (var Q = K; Q !== P && k(Q) !== P; )
Q = k(Q);
return Q === m ? null : Q;
}
function qt(P, K) {
if (!K)
return ve;
var Q = P || K && K.lastElementChild;
if (!Q)
return !0;
var se = getComputedStyle(P), he = /^inline/.test(se.getPropertyValue("display")) || /^(left|right)$/.test(se.getPropertyValue("float"));
if (he)
return !0;
if (K) {
var be = getComputedStyle(K), Ke = be.getPropertyValue("display");
if (/flex$/.test(Ke)) {
var ze = be.getPropertyValue("flex-direction") || "row";
if (ze === "row" || ze === "row-reverse")
return !Wt(K);
}
return !1;
}
return !0;
}
function Wt(P) {
if (!P.children || !P.children.length)
return !1;
for (const K of Array.from(P.children)) {
const se = (K.className && K.className.split(" ") || []).filter((he) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(he));
if (!se.length)
return !1;
for (const he of se) {
const be = he.slice(he.lastIndexOf("-") + 1);
if (parseInt(be, 10) !== 12)
return !1;
}
}
return !0;
}
function Gt(P, K) {
const Q = K.getBoundingClientRect();
if (J.style.left = Q.left + "px", J.style.top = Q.top + "px", ve) {
if (J.style.height = Q.height + "px", J.style.width = "4px", P) {
const se = P.getBoundingClientRect();
se.top !== Q.top && (J.style.left = se.right + "px", J.style.top = se.top + "px", J.style.height = se.height + "px");
}
} else if (J.style.height = "4px", J.style.width = Q.width + "px", de) {
const se = de.getBoundingClientRect();
Q.top < se.top && (J.style.display = "none");
}
K === L && L && (J.style.display = "none");
}
function Yt(P) {
oe = null;
var K = P.lastElementChild;
if (K) {
var Q = K.getBoundingClientRect();
ve ? (J.style.left = Q.right + "px", J.style.top = Q.top + "px", J.style.height = Q.height + "px", J.style.width = "4px") : (J.style.left = Q.left + "px", J.style.top = Q.bottom + "px", J.style.height = "4px", J.style.width = Q.width + "px"), K === L && L && (J.style.display = "none");
} else
J.style.display = "none";
}
function Kt(P, K) {
if (!Z.mirrorContainer.contains(P) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (de = b(P), !de || !de.contains(P)))
return;
const Q = document.querySelector(".dgComponentSelected"), se = de.getBoundingClientRect();
if (K - 30 < se.top && de.scrollTop > 0) {
let he = de.scrollTop < 10 ? de.scrollTop : 10;
de.scrollBy(0, -1 * he), Q && de.contains(Q) && (Se = Se + -1 * he);
}
if (K + 30 > se.bottom && de.scrollTop < de.scrollHeight - de.clientHeight) {
const he = de.scrollHeight - de.clientHeight - de.scrollTop;
let be = he < 10 ? he : 10;
de.scrollBy(0, be), Q && de.contains(Q) && (Se = Se + be);
}
}
function Lt(P, K, Q, se) {
var he = Z.direction === "horizontal", be = Z.direction === "mixed", Ke = K !== P ? We() : ze();
return Ke;
function ze() {
var Re = P.children.length, Je, He, _e;
for (Je = 0; Je < Re; Je++)
if (He = P.children[Je], _e = He.getBoundingClientRect(), he && _e.left + _e.width / 2 > Q || !be && !he && _e.top + _e.height / 2 > se || be && _e.left + _e.width > Q && _e.top + _e.height > se)
return He;
return null;
}
function We() {
var Re = K.getBoundingClientRect();
if (be) {
var Je = se - Re.top, He = Q - Re.left, _e = Re.bottom - se, St = Re.right - Q, Tt = Math.min(He, St, Je, _e), Ft;
return ve ? Ft = St < He : Ft = _e === Tt || St === Tt || He === Tt, Ge(Ft);
}
return Ge(he ? Q > Re.left + S(Re) / 2 : se > Re.top + V(Re) / 2);
}
function Ge(Re) {
return Re ? p(K) : K;
}
}
function Xt(P, K) {
return typeof Z.copy == "boolean" ? Z.copy : Z.copy(P, K);
}
}
function b(I) {
const _ = Array.from(window.scrollContainerList);
if (_.length === 1) {
const N = Array.from(window.scrollContainerList)[0];
return document.getElementById(N);
}
const M = l(_);
for (const N of M)
if (N.contains(I))
return N;
return null;
}
function l(I) {
const _ = [];
return I.forEach((M) => {
const N = document.getElementById(M);
N && _.push(N);
}), _.sort((M, N) => M.contains(N) ? 1 : N.contains(M) ? -1 : 0), _;
}
function d(I, _, M, N) {
var $ = {
mouseup: "touchend",
mousedown: "touchstart",
mousemove: "touchmove"
}, L = {
mouseup: "pointerup",
mousedown: "pointerdown",
mousemove: "pointermove"
}, U = {
mouseup: "MSPointerUp",
mousedown: "MSPointerDown",
mousemove: "MSPointerMove"
};
a.navigator.pointerEnabled ? c[_](I, L[M], N) : a.navigator.msPointerEnabled ? c[_](I, U[M], N) : (c[_](I, $[M], N), c[_](I, M, N));
}
function T(I) {
if (I.touches !== void 0)
return I.touches.length;
if (I.which !== void 0 && I.which !== 0)
return I.which;
if (I.buttons !== void 0)
return I.buttons;
var _ = I.button;
if (_ !== void 0)
return _ & 1 ? 1 : _ & 2 ? 3 : _ & 4 ? 2 : 0;
}
function D(I, _, M) {
I = I || {};
var N = I.className || "", $;
return I.className += " gu-hide", $ = u.elementFromPoint(_, M), I.className = N, $;
}
function B() {
return !1;
}
function h() {
return !0;
}
function S(I) {
return I.width || I.right - I.left;
}
function V(I) {
return I.height || I.bottom - I.top;
}
function k(I) {
return I.parentNode === u ? null : I.parentNode;
}
function C(I) {
return I.tagName === "INPUT" || I.tagName === "TEXTAREA" || I.tagName === "SELECT" || g(I);
}
function g(I) {
return !I || I.contentEditable === "false" ? !1 : I.contentEditable === "true" ? !0 : g(k(I));
}
function p(I) {
return I.nextElementSibling || _();
function _() {
var M = I;
do
M = M.nextSibling;
while (M && M.nodeType !== 1);
return M;
}
}
function w(I) {
return I.targetTouches && I.targetTouches.length ? I.targetTouches[0] : I.changedTouches && I.changedTouches.length ? I.changedTouches[0] : I;
}
function x(I, _) {
var M = w(_), N = {
pageX: "clientX",
// IE8
pageY: "clientY"
// IE8
};
return I in N && !(I in M) && N[I] in M && (I = N[I]), M[I];
}
o.exports = f;
}).call(this, typeof it < "u" ? it : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./classes": 1, "contra/emitter": 5, crossvent: 6 }],
3: [function(n, o, i) {
o.exports = function(r, c) {
return Array.prototype.slice.call(r, c);
};
}, {}],
4: [function(n, o, i) {
var a = n("ticky");
o.exports = function(c, s, u) {
c && a(function() {
c.apply(u || null, s || []);
});
};
}, { ticky: 10 }],
5: [function(n, o, i) {
var a = n("atoa"), r = n("./debounce");
o.exports = function(s, u) {
var m = u || {}, f = {};
return s === void 0 && (s = {}), s.on = function(b, l) {
return f[b] ? f[b].push(l) : f[b] = [l], s;
}, s.once = function(b, l) {
return l._once = !0, s.on(b, l), s;
}, s.off = function(b, l) {
var d = arguments.length;
if (d === 1)
delete f[b];
else if (d === 0)
f = {};
else {
var T = f[b];
if (!T)
return s;
T.splice(T.indexOf(l), 1);
}
return s;
}, s.emit = function() {
var b = a(arguments);
return s.emitterSnapshot(b.shift()).apply(this, b);
}, s.emitterSnapshot = function(b) {
var l = (f[b] || []).slice(0);
return function() {
var d = a(arguments), T = this || s;
if (b === "error" && m.throws !== !1 && !l.length)
throw d.length === 1 ? d[0] : d;
return l.forEach(function(B) {
m.async ? r(B, d, T) : B.apply(T, d), B._once && s.off(b, B);
}), s;
};
}, s;
};
}, { "./debounce": 4, atoa: 3 }],
6: [function(n, o, i) {
(function(a) {
var r = n("custom-event"), c = n("./eventmap"), s = a.document, u = b, m = d, f = [];
a.addEventListener || (u = l, m = T), o.exports = {
add: u,
remove: m,
fabricate: D
};
function b(k, C, g, p) {
return k.addEventListener(C, g, p);
}
function l(k, C, g) {
return k.attachEvent("on" + C, h(k, C, g));
}
function d(k, C, g, p) {
return k.removeEventListener(C, g, p);
}
function T(k, C, g) {
var p = S(k, C, g);
if (p)
return k.detachEvent("on" + C, p);
}
function D(k, C, g) {
var p = c.indexOf(C) === -1 ? x() : w();
k.dispatchEvent ? k.dispatchEvent(p) : k.fireEvent("on" + C, p);
function w() {
var I;
return s.createEvent ? (I = s.createEvent("Event"), I.initEvent(C, !0, !0)) : s.createEventObject && (I = s.createEventObject()), I;
}
function x() {
return new r(C, { detail: g });
}
}
function B(k, C, g) {
return function(w) {
var x = w || a.event;
x.target = x.target || x.srcElement, x.preventDefault = x.preventDefault || function() {
x.returnValue = !1;
}, x.stopPropagation = x.stopPropagation || function() {
x.cancelBubble = !0;
}, x.which = x.which || x.keyCode, g.call(k, x);
};
}
function h(k, C, g) {
var p = S(k, C, g) || B(k, C, g);
return f.push({
wrapper: p,
element: k,
type: C,
fn: g
}), p;
}
function S(k, C, g) {
var p = V(k, C, g);
if (p) {
var w = f[p].wrapper;
return f.splice(p, 1), w;
}
}
function V(k, C, g) {
var p, w;
for (p = 0; p < f.length; p++)
if (w = f[p], w.element === k && w.type === C && w.fn === g)
return p;
}
}).call(this, typeof it < "u" ? it : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, { "./eventmap": 7, "custom-event": 8 }],
7: [function(n, o, i) {
(function(a) {
var r = [], c = "", s = /^on/;
for (c in a)
s.test(c) && r.push(c.slice(2));
o.exports = r;
}).call(this, typeof it < "u" ? it : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
8: [function(n, o, i) {
(function(a) {
var r = a.CustomEvent;
function c() {
try {
var s = new r("cat", { detail: { foo: "bar" } });
return s.type === "cat" && s.detail.foo === "bar";
} catch {
}
return !1;
}
o.exports = c() ? r : (
// IE >= 9
typeof document < "u" && typeof document.createEvent == "function" ? function(u, m) {
var f = document.createEvent("CustomEvent");
return m ? f.initCustomEvent(u, m.bubbles, m.cancelable, m.detail) : f.initCustomEvent(u, !1, !1, void 0), f;
} : (
// IE <= 8
function(u, m) {
var f = document.createEventObject();
return f.type = u, m ? (f.bubbles = !!m.bubbles, f.cancelable = !!m.cancelable, f.detail = m.detail) : (f.bubbles = !1, f.cancelable = !1, f.detail = void 0), f;
}
)
);
}).call(this, typeof it < "u" ? it : typeof self < "u" ? self : typeof window < "u" ? window : {});
}, {}],
9: [function(n, o, i) {
var a = o.exports = {}, r, c;
function s() {
throw new Error("setTimeout has not been defined");
}
function u() {
throw new Error("clearTimeout has not been defined");
}
(function() {
try {
typeof setTimeout == "function" ? r = setTimeout : r = s;
} catch {
r = s;
}
try {
typeof clearTimeout == "function" ? c = clearTimeout : c = u;
} catch {
c = u;
}
})();
function m(V) {
if (r === setTimeout)
return setTimeout(V, 0);
if ((r === s || !r) && setTimeout)
return r = setTimeout, setTimeout(V, 0);
try {
return r(V, 0);
} catch {
try {
return r.call(null, V, 0);
} catch {
return r.call(this, V, 0);
}
}
}
function f(V) {
if (c === clearTimeout)
return clearTimeout(V);
if ((c === u || !c) && clearTimeout)
return c = clearTimeout, clearTimeout(V);
try {
return c(V);
} catch {
try {
return c.call(null, V);
} catch {
return c.call(this, V);
}
}
}
var b = [], l = !1, d, T = -1;
function D() {
!l || !d || (l = !1, d.length ? b = d.concat(b) : T = -1, b.length && B());
}
function B() {
if (!l) {
var V = m(D);
l = !0;
for (var k = b.length; k; ) {
for (d = b, b = []; ++T < k; )
d && d[T].run();
T = -1, k = b.length;
}
d = null, l = !1, f(V);
}
}
a.nextTick = function(V) {
var k = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var C = 1; C < arguments.length; C++)
k[C - 1] = arguments[C];
b.push(new h(V, k)), b.length === 1 && !l && m(B);
};
function h(V, k) {
this.fun = V, this.array = k;
}
h.prototype.run = function() {
this.fun.apply(null, this.array);
}, a.title = "browser", a.browser = !0, a.env = {}, a.argv = [], a.version = "", a.versions = {};
function S() {
}
a.on = S, a.addListener = S, a.once = S, a.off = S, a.removeListener = S, a.removeAllListeners = S, a.emit = S, a.prependListener = S, a.prependOnceListener = S, a.listeners = function(V) {
return [];
}, a.binding = function(V) {
throw new Error("process.binding is not supported");
}, a.cwd = function() {
return "/";
}, a.chdir = function(V) {
throw new Error("process.chdir is not supported");
}, a.umask = function() {
return 0;
};
}, {}],
10: [function(n, o, i) {
(function(a) {
var r = typeof a == "function", c;
r ? c = function(s) {
a(s);
} : c = function(s) {
setTimeout(s, 0);
}, o.exports = c;
}).call(this, n("timers").setImmediate);
}, { timers: 11 }],
11: [function(n, o, i) {
(function(a, r) {
var c = n("process/browser.js").nextTick, s = Function.prototype.apply, u = Array.prototype.slice, m = {}, f = 0;
i.setTimeout = function() {
return new b(s.call(setTimeout, window, arguments), clearTimeout);
}, i.setInterval = function() {
return new b(s.call(setInterval, window, arguments), clearInterval);
}, i.clearTimeout = i.clearInterval = function(l) {
l.close();
};
function b(l, d) {
this._id = l, this._clearFn = d;
}
b.prototype.unref = b.prototype.ref = function() {
}, b.prototype.close = function() {
this._clearFn.call(window, this._id);
}, i.enroll = function(l, d) {
clearTimeout(l._idleTimeoutId), l._idleTimeout = d;
}, i.unenroll = function(l) {
clearTimeout(l._idleTimeoutId), l._idleTimeout = -1;
}, i._unrefActive = i.active = function(l) {
clearTimeout(l._idleTimeoutId);
var d = l._idleTimeout;
d >= 0 && (l._idleTimeoutId = setTimeout(function() {
l._onTimeout && l._onTimeout();
}, d));
}, i.setImmediate = typeof a == "function" ? a : function(l) {
var d = f++, T = arguments.length < 2 ? !1 : u.call(arguments, 1);
return m[d] = !0, c(function() {
m[d] && (T ? l.apply(null, T) : l.call(null), i.clearImmediate(d));
}), d;
}, i.clearImmediate = typeof r == "function" ? r : function(l) {
delete m[l];
};
}).call(this, n("timers").setImmediate, n("timers").clearImmediate);
}, { "process/browser.js": 9, timers: 11 }]
}, {}, [2])(2);
});
})(Jo);
var Dr = Jo.exports;
const xn = /* @__PURE__ */ Br(Dr), Ir = {
showCloseButton: { type: Boolean, default: !0 },
position: { type: String, default: "top-center" },
timeout: { type: Number, default: 3e3 },
theme: { type: String, default: "bootstrap" },
left: { type: Number },
right: { type: Number },
top: { type: Number },
bottom: { type: Number },
id: { type: String },
animate: { type: String, default: "fadeIn" },
options: { type: Object },
safeHtml: { type: Boolean, default: !0 }
}, kr = {
showCloseButton: { type: Boolean, default: !0 },
animate: { type: String, default: "fadeIn" },
options: { type: Object }
}, cn = /* @__PURE__ */ Ae({
name: "Toast",
props: kr,
emits: ["close", "click"],
setup: (e, t) => {
const n = y(e.animate), o = "fadeOut", i = X(() => e.options), a = y(!1), r = X(() => i.value.title && i.value.message), c = X(() => !i.value.title && i.value.message), s = X(() => {
const h = {
animated: a.value,
toast: !0,
"toast--only-content": !r.value
};
return h[e.animate] = !1, h[o] = a.value, h["toasty-type-" + i.value.type] = !0, i.value.theme && (h[i.value.theme] = !0), h;
}), u = X(() => {
const V = `f-icon-${i.value && i.value.type ? i.value.type.replace("toasty-type-", "") : "default"}`, k = {
"f-icon": !0
};
return k[V] = !0, k;
}), m = X(() => i.value.title || i.value.message), f = X(() => e.showCloseButton), b = X(() => !!i.value.buttons || !!t.slots.default), l = X(() => $e.getLocale() === "en" ? {
wordBreak: "keep-all",
overflowWrap: "break-word"
} : {});
function d(h) {
h.stopPropagation(), h.preventDefault(), a.value = !1, setTimeout(() => {
t.emit("close", i.value);
}, 200);
}
function T(h, S) {
}
function D(h) {
return `f-preten-link ${h.customClass ? h.customClass : ""}`;
}
Me(n, () => {
n.value;
});
const B = () => {
var h;
return v(mt, null, [v("div", {
class: "after-toast-msg text-right"
}, [!t.slots.default && ((h = i.value.buttons) == null ? void 0 : h.map((S) => v("span", {
class: D(S),
onClick: (V) => void 0
}, [S.text]))), t.slots.default && t.slots.default()])]);
};
return () => v("div", {
class: s.value,
style: "min-height:44px"
}, [f.value && v("button", {
title: $e.getLocaleValue("messageBox.close"),
class: "toast-close f-btn-icon f-bare",
onClick: d
}, [v("span", {
class: "f-icon modal_close"
}, null)]), m.value && v("section", {
class: "modal-tips"
}, [!r.value && v("div", {
class: "float-left modal-tips-iconwrap"
}, [v("span", {
class: u.value
}, null)]), v("div", {
class: "modal-tips-content"
}, [r.value && v(mt, null, [v("h5", {
class: "toast-title modal-tips-title",
innerHTML: i.value.title
}, null), v("p", {
class: "toast-msg",
innerHTML: i.value.message,
style: l.value
}, null), b.value && B()]), c.value && (i.value.buttons ? v("div", {
class: "toast-title-btns-wrapper d-flex"
}, [v("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: l.value,
innerHTML: i.value.message
}, null), v("div", {
class: "after-toast-title text-right ml-auto"
}, [B()])]) : v("h5", {
class: "toast-title modal-tips-title only-toast-msg",
style: l.value,
innerHTML: i.value.message
}, null))])])]);
}
}), Pr = ["moz", "ms", "webkit"];
function Or() {
let e = 0;
return (t) => {
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - e)), i = setTimeout(() => {
t(n + o);
}, o);
return e = n + o, i;
};
}
function Vr() {
if (typeof window > "u")
return () => 0;
if (window.requestAnimationFrame)
return window.requestAnimationFrame.bind(window);
const e = Pr.filter((t) => `${t}RequestAnimationFrame` in window)[0];
return e ? window[`${e}RequestAnimationFrame`] : Or();
}
Vr();
y("");
function Zo() {
if (typeof window > "u" || typeof navigator > "u")
return !1;
const e = navigator.userAgent || navigator.vendor || window.opera, t = [
/iPhone/i,
/iPod/i,
/Android.*Mobile/i,
// Android 手机通常包含 "Mobile" 字样,而平板不包含
/webOS/i,
/BlackBerry/i,
/IEMobile/i,
/Opera Mini/i,
/Harmony/i
], n = [
/iPad/i,
/Android(?!.*Mobile)/i,
// Android 平板通常不含 "Mobile"
/Tablet/i,
/PlayBook/i,
/Kindle/i,
/Silk/i
];
for (const s of n)
if (s.test(e))
return !1;
for (const s of t)
if (s.test(e))
return !0;
if (typeof screen > "u")
return !1;
const o = "ontouchstart" in window || navigator.maxTouchPoints > 0, i = screen.width, a = screen.height, r = Math.min(i, a);
return !!(o && r <= 768);
}
function Nr() {
const e = Zo();
return e && document.body.classList.add("f-mobile"), e;
}
typeof document < "u" && Nr();
const At = /* @__PURE__ */ Ae({
name: "Notify",
props: Ir,
emits: ["close", "empty"],
setup(e, t) {
var T;
const n = Zo(), i = `farris-notify-${(T = e.options) != null && T.type ? e.options.type : "info"}}`, a = X(() => ({
"farris-notify": !0,
[i]: n
})), r = {
left: 12,
right: 12,
top: 20,
bottom: 12
}, c = y(), s = y(e.options), u = y(e.showCloseButton), m = X(() => e.position || "bottom-right"), f = X(() => e.timeout != null ? e.timeout : 3e3), b = X(() => {
const D = e.bottom ? e.bottom : r.bottom, B = e.top ? e.top : r.top, h = {
transition: "all 0.2s ease",
left: m.value.indexOf("left") > -1 ? `${e.left ? e.left : r.left}px` : "",
right: m.value.indexOf("right") > -1 ? `${e.right ? e.right : r.right}px` : "",
top: m.value.indexOf("top") > -1 ? `${B}px` : "",
bottom: m.value.indexOf("bottom") > -1 ? `${D}px` : ""
};
return m.value.indexOf("center") > -1 && (h.left = "50%", h.marginLeft = "calc(-24rem / 2)", m.value === "center-center" && (h.top = "50%", h.transform = "translate(-50%, -50%)")), h;
});
function l(D) {
t.emit("close");
}
f.value && setTimeout(() => {
l();
}, f.value), t.expose({
closeToast: l,
container: c,
notifyPosition: m
});
function d(D, B) {
l();
}
return () => {
var D;
return n ? v("div", {
class: a.value,
ref: c
}, [(D = e.options) == null ? void 0 : D.message]) : v("div", {
class: a.value,
style: b.value,
ref: c
}, [v(cn, {
options: s.value,
showCloseButton: u.value,
animate: e.animate,
onClose: (B) => d(B, s.value)
}, null)]);
};
}
});
class mn {
constructor() {
we(this, "notifyRefs", []);
we(this, "globalConfig", on({}));
}
escapeAllHtml(t) {
if (typeof t != "string" || !t)
return "";
const n = document.createElement("div");
return n.textContent = t || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
}
createNotifyInstance(t) {
const n = this, i = Object.assign({
timeout: 3e3,
position: "bottom-right",
showCloseButton: !0,
safeHtml: !0
}, this.globalConfig, {
...t
}), a = document.createElement("div");
a.style.display = "contents";
const r = In({
setup() {
var u;
const c = y();
function s() {
c.value.container.style.transform = "scale(0)", setTimeout(() => {
n.updateNotifyPositionForClose(i, c), r.unmount();
}, 220);
}
if (i.position.indexOf("top") > -1) {
const m = n.getNotifyInstances(i.position), f = m[m.length - 1];
if (f) {
const b = f.value.container.getBoundingClientRect();
i.top = b.bottom;
}
}
return i.safeHtml && ((u = i.options) != null && u.message) && (i.options.message = n.escapeAllHtml(i.options.message)), bt(() => {
document.body.removeChild(a);
}), et(() => {
n.updateNotifyPositionForCreate(i, c);
}), () => v(kn, {
mode: "out-in",
name: "fade",
appear: !0
}, {
default: () => [v(At, ut({
ref: c
}, i, {
onClose: s
}), null)]
});
}
});
return r.provide("NotifyService", this), document.body.appendChild(a), r.use($e.i18n), r.mount(a), r;
}
getNotifyInstances(t) {
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
}
updateNotifyPositionForCreate(t, n) {
if (this.notifyRefs && this.notifyRefs.length) {
const o = window.innerHeight;
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((i) => {
const a = i.value.container.getBoundingClientRect();
i.value.container.style.bottom = a.height + o - a.bottom + "px";
});
}
this.notifyRefs = [...this.notifyRefs, n];
}
updateNotifyPositionForClose(t, n) {
const o = this.notifyRefs.indexOf(n);
if (t.position.indexOf("top") > -1) {
const i = this.getNotifyInstances(t.position), a = i.indexOf(n);
i.slice(a + 1).forEach((r) => {
r.value.container.style.top = r.value.container.offsetTop - r.value.container.offsetHeight + "px";
});
}
o > -1 && this.notifyRefs.splice(o, 1);
}
show(t) {
return this.createNotifyInstance(t);
}
buildNotifyProps(t, n) {
let o = "", i = "", a, r, c;
typeof n == "string" ? o = n : n && (o = n.message || "", i = n.title || "", r = n.position || null, c = n.showCloseButton != null ? n.showCloseButton : null, a = n.timeout != nul