import { createVNode, defineComponent, ref, mergeProps, unref, withCtx, computed, inject, Fragment, watch, Transition, withDirectives, vShow, reactive, nextTick, useSSRContext, provide } from 'vue'; import { ssrRenderComponent, ssrRenderAttrs, ssrRenderList, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer'; import { C as CustomerCard, a as CustomerCardSkeleton } from './CustomerCardSkeleton-HHHLikpL.mjs'; import { b8 as Icon, b as useUserStore, a as useConfigStore, u as useRouter$1, z as useConfigInject, A as classNames, Q as initDefaultProps, B as genComponentStyleHook, C as merge, by as initFadeMotion, R as filterEmpty, P as PropTypes, F as functionType, a9 as objectType, G as stringType, J as resetComponent, ai as initMotion, K as Keyframe, ad as getTransitionProps, af as CloseOutlined, H as booleanType } from './server.mjs'; import { B as BasicIconOld } from './BasicIconOld-Booq7UXp.mjs'; import _objectSpread$2 from '@babel/runtime/helpers/esm/objectSpread2'; import { _ as __nuxt_component_2, w as wrapperRaf } from './index-DN2Eqyc3.mjs'; import { B as Badge } from './index-CY26U1sZ.mjs'; import _extends from '@babel/runtime/helpers/esm/extends'; import { u as useMergedState } from './useMergedState-BZEfJ8Fl.mjs'; import './UserProfilePic-CSSFM-Xe.mjs'; import './empty_user-DSxcM_ac.mjs'; import './_plugin-vue_export-helper-1tPrXgE0.mjs'; import './BasicButton-7YIRCRg8.mjs'; import '@ant-design/icons-vue'; import './index-CO_xVqO1.mjs'; import 'throttle-debounce'; import 'vue-content-loader'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'consola'; import 'fast-xml-parser'; import 'ipx'; import 'pinia'; import '@supabase/supabase-js'; import 'axios'; import 'lodash-es'; import '@ant-design/colors'; import '@ctrl/tinycolor'; import 'stylis'; import 'vue-types'; import 'unhead/utils'; import 'dom-align'; import './isNumeric-BvXfUD6Q.mjs'; // This icon file is generated automatically. var FileTextOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" }; function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; } function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var FileTextOutlined = function FileTextOutlined(props, context) { var p = _objectSpread$1({}, props, context.attrs); return createVNode(Icon, _objectSpread$1({}, p, { "icon": FileTextOutlined$1 }), null); }; FileTextOutlined.displayName = 'FileTextOutlined'; FileTextOutlined.inheritAttrs = false; // This icon file is generated automatically. var VerticalAlignTopOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z" } }] }, "name": "vertical-align-top", "theme": "outlined" }; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var VerticalAlignTopOutlined = function VerticalAlignTopOutlined(props, context) { var p = _objectSpread({}, props, context.attrs); return createVNode(Icon, _objectSpread({}, p, { "icon": VerticalAlignTopOutlined$1 }), null); }; VerticalAlignTopOutlined.displayName = 'VerticalAlignTopOutlined'; VerticalAlignTopOutlined.inheritAttrs = false; function throttleByAnimationFrame(fn) { let requestId; const later = (args) => () => { requestId = null; fn(...args); }; const throttled = function() { if (requestId == null) { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } requestId = wrapperRaf(later(args)); } }; throttled.cancel = () => { wrapperRaf.cancel(requestId); requestId = null; }; return throttled; } function easeInOutCubic(t, b, c, d) { const cc = c - b; t /= d / 2; if (t < 1) { return cc / 2 * t * t * t + b; } return cc / 2 * ((t -= 2) * t * t + 2) + b; } function isWindow(obj) { return obj !== null && obj !== void 0 && obj === obj.window; } function getScroll(target, top) { { return 0; } } function scrollTo(y) { let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const { getContainer = () => void 0, callback, duration = 450 } = options; const container = getContainer(); const scrollTop = getScroll(); const startTime = Date.now(); const frameFunc = () => { const timestamp = Date.now(); const time = timestamp - startTime; const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration); if (isWindow(container)) { container.scrollTo((void 0).pageXOffset, nextScrollTop); } else if (container instanceof Document || container.constructor.name === "HTMLDocument") { container.documentElement.scrollTop = nextScrollTop; } else { container.scrollTop = nextScrollTop; } if (time < duration) { wrapperRaf(frameFunc); } else if (typeof callback === "function") { callback(); } }; wrapperRaf(frameFunc); } const floatButtonProps = () => { return { prefixCls: String, description: PropTypes.any, type: stringType("default"), shape: stringType("circle"), tooltip: PropTypes.any, href: String, target: functionType(), badge: objectType(), onClick: functionType() }; }; const floatButtonContentProps = () => { return { prefixCls: stringType() }; }; const floatButtonGroupProps = () => { return _extends(_extends({}, floatButtonProps()), { // 包含的 Float Button // 触发方式 (有触发方式为菜单模式) trigger: stringType(), // 受控展开 open: booleanType(), // 展开收起的回调 onOpenChange: functionType(), "onUpdate:open": functionType() }); }; const backTopProps = () => { return _extends(_extends({}, floatButtonProps()), { prefixCls: String, duration: Number, target: functionType(), visibilityHeight: Number, onClick: functionType() }); }; const FloatButtonContent = defineComponent({ compatConfig: { MODE: 3 }, name: "AFloatButtonContent", inheritAttrs: false, props: floatButtonContentProps(), setup(props, _ref) { let { attrs, slots } = _ref; return () => { var _a; const { prefixCls } = props; const description = filterEmpty((_a = slots.description) === null || _a === void 0 ? void 0 : _a.call(slots)); return createVNode("div", _objectSpread$2(_objectSpread$2({}, attrs), {}, { "class": [attrs.class, `${prefixCls}-content`] }), [slots.icon || description.length ? createVNode(Fragment, null, [slots.icon && createVNode("div", { "class": `${prefixCls}-icon` }, [slots.icon()]), description.length ? createVNode("div", { "class": `${prefixCls}-description` }, [description]) : null]) : createVNode("div", { "class": `${prefixCls}-icon` }, [createVNode(FileTextOutlined, null, null)])]); }; } }); const contextKey = /* @__PURE__ */ Symbol("floatButtonGroupContext"); const useProvideFloatButtonGroupContext = (props) => { provide(contextKey, props); return props; }; const useInjectFloatButtonGroupContext = () => { return inject(contextKey, { shape: ref() }); }; const getOffset = (radius) => { if (radius === 0) { return 0; } return radius - Math.sqrt(Math.pow(radius, 2) / 2); }; const initFloatButtonGroupMotion = (token) => { const { componentCls, floatButtonSize, motionDurationSlow, motionEaseInOutCirc } = token; const groupPrefixCls = `${componentCls}-group`; const moveDownIn = new Keyframe("antFloatButtonMoveDownIn", { "0%": { transform: `translate3d(0, ${floatButtonSize}px, 0)`, transformOrigin: "0 0", opacity: 0 }, "100%": { transform: "translate3d(0, 0, 0)", transformOrigin: "0 0", opacity: 1 } }); const moveDownOut = new Keyframe("antFloatButtonMoveDownOut", { "0%": { transform: "translate3d(0, 0, 0)", transformOrigin: "0 0", opacity: 1 }, "100%": { transform: `translate3d(0, ${floatButtonSize}px, 0)`, transformOrigin: "0 0", opacity: 0 } }); return [{ [`${groupPrefixCls}-wrap`]: _extends({}, initMotion(`${groupPrefixCls}-wrap`, moveDownIn, moveDownOut, motionDurationSlow, true)) }, { [`${groupPrefixCls}-wrap`]: { [` &${groupPrefixCls}-wrap-enter, &${groupPrefixCls}-wrap-appear `]: { opacity: 0, animationTimingFunction: motionEaseInOutCirc }, [`&${groupPrefixCls}-wrap-leave`]: { animationTimingFunction: motionEaseInOutCirc } } }]; }; const floatButtonGroupStyle = (token) => { const { antCls, componentCls, floatButtonSize, margin, borderRadiusLG, borderRadiusSM, badgeOffset, floatButtonBodyPadding } = token; const groupPrefixCls = `${componentCls}-group`; return { [groupPrefixCls]: _extends(_extends({}, resetComponent(token)), { zIndex: 99, display: "block", border: "none", position: "fixed", width: floatButtonSize, height: "auto", boxShadow: "none", minHeight: floatButtonSize, insetInlineEnd: token.floatButtonInsetInlineEnd, insetBlockEnd: token.floatButtonInsetBlockEnd, borderRadius: borderRadiusLG, [`${groupPrefixCls}-wrap`]: { zIndex: -1, display: "block", position: "relative", marginBottom: margin }, [`&${groupPrefixCls}-rtl`]: { direction: "rtl" }, [componentCls]: { position: "static" } }), [`${groupPrefixCls}-circle`]: { [`${componentCls}-circle:not(:last-child)`]: { marginBottom: token.margin, [`${componentCls}-body`]: { width: floatButtonSize, height: floatButtonSize, borderRadius: "50%" } } }, [`${groupPrefixCls}-square`]: { [`${componentCls}-square`]: { borderRadius: 0, padding: 0, "&:first-child": { borderStartStartRadius: borderRadiusLG, borderStartEndRadius: borderRadiusLG }, "&:last-child": { borderEndStartRadius: borderRadiusLG, borderEndEndRadius: borderRadiusLG }, "&:not(:last-child)": { borderBottom: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` }, [`${antCls}-badge`]: { [`${antCls}-badge-count`]: { top: -(floatButtonBodyPadding + badgeOffset), insetInlineEnd: -(floatButtonBodyPadding + badgeOffset) } } }, [`${groupPrefixCls}-wrap`]: { display: "block", borderRadius: borderRadiusLG, boxShadow: token.boxShadowSecondary, [`${componentCls}-square`]: { boxShadow: "none", marginTop: 0, borderRadius: 0, padding: floatButtonBodyPadding, "&:first-child": { borderStartStartRadius: borderRadiusLG, borderStartEndRadius: borderRadiusLG }, "&:last-child": { borderEndStartRadius: borderRadiusLG, borderEndEndRadius: borderRadiusLG }, "&:not(:last-child)": { borderBottom: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}` }, [`${componentCls}-body`]: { width: token.floatButtonBodySize, height: token.floatButtonBodySize } } } }, [`${groupPrefixCls}-circle-shadow`]: { boxShadow: "none" }, [`${groupPrefixCls}-square-shadow`]: { boxShadow: token.boxShadowSecondary, [`${componentCls}-square`]: { boxShadow: "none", padding: floatButtonBodyPadding, [`${componentCls}-body`]: { width: token.floatButtonBodySize, height: token.floatButtonBodySize, borderRadius: borderRadiusSM } } } }; }; const sharedFloatButtonStyle = (token) => { const { antCls, componentCls, floatButtonBodyPadding, floatButtonIconSize, floatButtonSize, borderRadiusLG, badgeOffset, dotOffsetInSquare, dotOffsetInCircle } = token; return { [componentCls]: _extends(_extends({}, resetComponent(token)), { border: "none", position: "fixed", cursor: "pointer", zIndex: 99, display: "block", justifyContent: "center", alignItems: "center", width: floatButtonSize, height: floatButtonSize, insetInlineEnd: token.floatButtonInsetInlineEnd, insetBlockEnd: token.floatButtonInsetBlockEnd, boxShadow: token.boxShadowSecondary, // Pure Panel "&-pure": { position: "relative", inset: "auto" }, "&:empty": { display: "none" }, [`${antCls}-badge`]: { width: "100%", height: "100%", [`${antCls}-badge-count`]: { transform: "translate(0, 0)", transformOrigin: "center", top: -badgeOffset, insetInlineEnd: -badgeOffset } }, [`${componentCls}-body`]: { width: "100%", height: "100%", display: "flex", justifyContent: "center", alignItems: "center", transition: `all ${token.motionDurationMid}`, [`${componentCls}-content`]: { overflow: "hidden", textAlign: "center", minHeight: floatButtonSize, display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", padding: `${floatButtonBodyPadding / 2}px ${floatButtonBodyPadding}px`, [`${componentCls}-icon`]: { textAlign: "center", margin: "auto", width: floatButtonIconSize, fontSize: floatButtonIconSize, lineHeight: 1 } } } }), [`${componentCls}-rtl`]: { direction: "rtl" }, [`${componentCls}-circle`]: { height: floatButtonSize, borderRadius: "50%", [`${antCls}-badge`]: { [`${antCls}-badge-dot`]: { top: dotOffsetInCircle, insetInlineEnd: dotOffsetInCircle } }, [`${componentCls}-body`]: { borderRadius: "50%" } }, [`${componentCls}-square`]: { height: "auto", minHeight: floatButtonSize, borderRadius: borderRadiusLG, [`${antCls}-badge`]: { [`${antCls}-badge-dot`]: { top: dotOffsetInSquare, insetInlineEnd: dotOffsetInSquare } }, [`${componentCls}-body`]: { height: "auto", borderRadius: borderRadiusLG } }, [`${componentCls}-default`]: { backgroundColor: token.floatButtonBackgroundColor, transition: `background-color ${token.motionDurationMid}`, [`${componentCls}-body`]: { backgroundColor: token.floatButtonBackgroundColor, transition: `background-color ${token.motionDurationMid}`, "&:hover": { backgroundColor: token.colorFillContent }, [`${componentCls}-content`]: { [`${componentCls}-icon`]: { color: token.colorText }, [`${componentCls}-description`]: { display: "flex", alignItems: "center", lineHeight: `${token.fontSizeLG}px`, color: token.colorText, fontSize: token.fontSizeSM } } } }, [`${componentCls}-primary`]: { backgroundColor: token.colorPrimary, [`${componentCls}-body`]: { backgroundColor: token.colorPrimary, transition: `background-color ${token.motionDurationMid}`, "&:hover": { backgroundColor: token.colorPrimaryHover }, [`${componentCls}-content`]: { [`${componentCls}-icon`]: { color: token.colorTextLightSolid }, [`${componentCls}-description`]: { display: "flex", alignItems: "center", lineHeight: `${token.fontSizeLG}px`, color: token.colorTextLightSolid, fontSize: token.fontSizeSM } } } } }; }; const useStyle = genComponentStyleHook("FloatButton", (token) => { const { colorTextLightSolid, colorBgElevated, controlHeightLG, marginXXL, marginLG, fontSize, fontSizeIcon, controlItemBgHover, paddingXXS, borderRadiusLG } = token; const floatButtonToken = merge(token, { floatButtonBackgroundColor: colorBgElevated, floatButtonColor: colorTextLightSolid, floatButtonHoverBackgroundColor: controlItemBgHover, floatButtonFontSize: fontSize, floatButtonIconSize: fontSizeIcon * 1.5, floatButtonSize: controlHeightLG, floatButtonInsetBlockEnd: marginXXL, floatButtonInsetInlineEnd: marginLG, floatButtonBodySize: controlHeightLG - paddingXXS * 2, // 这里的 paddingXXS 是简写,完整逻辑是 (controlHeightLG - (controlHeightLG - paddingXXS * 2)) / 2, floatButtonBodyPadding: paddingXXS, badgeOffset: paddingXXS * 1.5, dotOffsetInCircle: getOffset(controlHeightLG / 2), dotOffsetInSquare: getOffset(borderRadiusLG) }); return [floatButtonGroupStyle(floatButtonToken), sharedFloatButtonStyle(floatButtonToken), initFadeMotion(token), initFloatButtonGroupMotion(floatButtonToken)]; }); var __rest = function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; const floatButtonPrefixCls = "float-btn"; const FloatButton = defineComponent({ compatConfig: { MODE: 3 }, name: "AFloatButton", inheritAttrs: false, props: initDefaultProps(floatButtonProps(), { type: "default", shape: "circle" }), setup(props, _ref) { let { attrs, slots } = _ref; const { prefixCls, direction } = useConfigInject(floatButtonPrefixCls, props); const [wrapSSR, hashId] = useStyle(prefixCls); const { shape: groupShape } = useInjectFloatButtonGroupContext(); const floatButtonRef = ref(null); const mergeShape = computed(() => { return (groupShape === null || groupShape === void 0 ? void 0 : groupShape.value) || props.shape; }); return () => { var _a; const { prefixCls: customPrefixCls, type = "default", shape = "circle", description = (_a = slots.description) === null || _a === void 0 ? void 0 : _a.call(slots), tooltip, badge = {} } = props, restProps = __rest(props, ["prefixCls", "type", "shape", "description", "tooltip", "badge"]); const classString = classNames(prefixCls.value, `${prefixCls.value}-${type}`, `${prefixCls.value}-${mergeShape.value}`, { [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, attrs.class, hashId.value); const buttonNode = createVNode(__nuxt_component_2, { "placement": "left" }, { title: slots.tooltip || tooltip ? () => slots.tooltip && slots.tooltip() || tooltip : void 0, default: () => createVNode(Badge, badge, { default: () => [createVNode("div", { "class": `${prefixCls.value}-body` }, [createVNode(FloatButtonContent, { "prefixCls": prefixCls.value }, { icon: slots.icon, description: () => description })])] }) }); return wrapSSR(props.href ? createVNode("a", _objectSpread$2(_objectSpread$2(_objectSpread$2({ "ref": floatButtonRef }, attrs), restProps), {}, { "class": classString }), [buttonNode]) : createVNode("button", _objectSpread$2(_objectSpread$2(_objectSpread$2({ "ref": floatButtonRef }, attrs), restProps), {}, { "class": classString, "type": "button" }), [buttonNode])); }; } }); const FloatButtonGroup = defineComponent({ compatConfig: { MODE: 3 }, name: "AFloatButtonGroup", inheritAttrs: false, props: initDefaultProps(floatButtonGroupProps(), { type: "default", shape: "circle" }), setup(props, _ref) { let { attrs, slots, emit } = _ref; const { prefixCls, direction } = useConfigInject(floatButtonPrefixCls, props); const [wrapSSR, hashId] = useStyle(prefixCls); const [open, setOpen] = useMergedState(false, { value: computed(() => props.open) }); const floatButtonGroupRef = ref(null); const floatButtonRef = ref(null); useProvideFloatButtonGroupContext({ shape: computed(() => props.shape) }); const hoverTypeAction = { onMouseenter() { var _a; setOpen(true); emit("update:open", true); (_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, true); }, onMouseleave() { var _a; setOpen(false); emit("update:open", false); (_a = props.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(props, false); } }; const hoverAction = computed(() => { return props.trigger === "hover" ? hoverTypeAction : {}; }); watch(computed(() => props.trigger), (value) => { { return; } }, { immediate: true }); return () => { var _a; const { shape = "circle", type = "default", tooltip, description, trigger } = props; const groupPrefixCls = `${prefixCls.value}-group`; const groupCls = classNames(groupPrefixCls, hashId.value, attrs.class, { [`${groupPrefixCls}-rtl`]: direction.value === "rtl", [`${groupPrefixCls}-${shape}`]: shape, [`${groupPrefixCls}-${shape}-shadow`]: !trigger }); const wrapperCls = classNames(hashId.value, `${groupPrefixCls}-wrap`); const transitionProps = getTransitionProps(`${groupPrefixCls}-wrap`); return wrapSSR(createVNode("div", _objectSpread$2(_objectSpread$2({ "ref": floatButtonGroupRef }, attrs), {}, { "class": groupCls }, hoverAction.value), [trigger && ["click", "hover"].includes(trigger) ? createVNode(Fragment, null, [createVNode(Transition, transitionProps, { default: () => [withDirectives(createVNode("div", { "class": wrapperCls }, [slots.default && slots.default()]), [[vShow, open.value]])] }), createVNode(FloatButton, { "ref": floatButtonRef, "type": type, "shape": shape, "tooltip": tooltip, "description": description }, { icon: () => { var _a2, _b; return open.value ? ((_a2 = slots.closeIcon) === null || _a2 === void 0 ? void 0 : _a2.call(slots)) || createVNode(CloseOutlined, null, null) : ((_b = slots.icon) === null || _b === void 0 ? void 0 : _b.call(slots)) || createVNode(FileTextOutlined, null, null); }, tooltip: slots.tooltip, description: slots.description })]) : (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)])); }; } }); const BackTop = defineComponent({ compatConfig: { MODE: 3 }, name: "ABackTop", inheritAttrs: false, props: initDefaultProps(backTopProps(), { visibilityHeight: 400, target: () => void 0, duration: 450, type: "default", shape: "circle" }), // emits: ['click'], setup(props, _ref) { let { slots, attrs, emit } = _ref; const { prefixCls, direction } = useConfigInject(floatButtonPrefixCls, props); const [wrapSSR] = useStyle(prefixCls); const domRef = ref(); const state = reactive({ visible: props.visibilityHeight === 0, scrollEvent: null }); const getDefaultTarget = () => domRef.value && domRef.value.ownerDocument ? domRef.value.ownerDocument : void 0; const scrollToTop = (e) => { const { target = getDefaultTarget, duration } = props; scrollTo(0, { getContainer: target, duration }); emit("click", e); }; const handleScroll = throttleByAnimationFrame((e) => { const { visibilityHeight } = props; const scrollTop = getScroll(e.target); state.visible = scrollTop >= visibilityHeight; }); const bindScrollEvent = () => { const { target } = props; const getTarget = target || getDefaultTarget; const container = getTarget(); handleScroll({ target: container }); container === null || container === void 0 ? void 0 : container.addEventListener("scroll", handleScroll); }; const scrollRemove = () => { const { target } = props; const getTarget = target || getDefaultTarget; const container = getTarget(); handleScroll.cancel(); container === null || container === void 0 ? void 0 : container.removeEventListener("scroll", handleScroll); }; watch(() => props.target, () => { scrollRemove(); nextTick(() => { bindScrollEvent(); }); }); const floatButtonGroupContext = useInjectFloatButtonGroupContext(); return () => { const { description, type, shape, tooltip, badge } = props; const floatButtonProps2 = _extends(_extends({}, attrs), { shape: (floatButtonGroupContext === null || floatButtonGroupContext === void 0 ? void 0 : floatButtonGroupContext.shape.value) || shape, onClick: scrollToTop, class: { [`${prefixCls.value}`]: true, [`${attrs.class}`]: attrs.class, [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, description, type, tooltip, badge }); const transitionProps = getTransitionProps("fade"); return wrapSSR(createVNode(Transition, transitionProps, { default: () => [withDirectives(createVNode(FloatButton, _objectSpread$2(_objectSpread$2({}, floatButtonProps2), {}, { "ref": domRef }), { icon: () => { var _a; return ((_a = slots.icon) === null || _a === void 0 ? void 0 : _a.call(slots)) || createVNode(VerticalAlignTopOutlined, null, null); } }), [[vShow, state.visible]])] })); }; } }); FloatButton.Group = FloatButtonGroup; FloatButton.BackTop = BackTop; FloatButton.install = function(app) { app.component(FloatButton.name, FloatButton); app.component(FloatButtonGroup.name, FloatButtonGroup); app.component(BackTop.name, BackTop); return app; }; const _imports_0 = "" + __buildAssetsURL("not_found.CbOIXISv.svg"); const _sfc_main$1 = /* @__PURE__ */ defineComponent({ __name: "CustomersList", __ssrInlineRender: true, setup(__props) { useUserStore(); const config = useConfigStore(); const router = useRouter$1(); const loading = ref(false); ref(false); ref(0); ref(10); const users = ref([]); function deleteUser(id) { users.value.splice(users.value.findIndex((x) => x.id === id), 1); } return (_ctx, _push, _parent, _attrs) => { const _component_a_float_button = FloatButton; _push(` 0 ? "" : "justify-center"] }, _attrs))}>`); if (!loading.value) { _push(``); if (users.value.length !== 0) { _push(``); ssrRenderList(users.value, (user) => { _push(ssrRenderComponent(CustomerCard, { user, onRefresh: ($event) => deleteUser(user.id) }, null, _parent)); }); _push(``); } else { _push(`

${ssrInterpolate(unref(config).useString("customerListIsEmpty"))}

`); } _push(``); } else { _push(``); ssrRenderList(8, (i) => { _push(ssrRenderComponent(CustomerCardSkeleton, null, null, _parent)); }); _push(``); } if (unref(config).isSeller) { _push(ssrRenderComponent(_component_a_float_button, { shape: "circle", type: "primary", onClick: ($event) => unref(router).push({ name: "user-add" }), class: "bottom-10vh w-3rem h-3rem" }, { icon: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:add" }, null, _parent2, _scopeId)); } else { return [ createVNode(BasicIconOld, { icon: "vuesax-linear:add" }) ]; } }), _: 1 }, _parent)); } else { _push(``); } _push(``); }; } }); const _sfc_setup$1 = _sfc_main$1.setup; _sfc_main$1.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/statisticsList/components/CustomersList.vue"); return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0; }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "customers", __ssrInlineRender: true, setup(__props) { return (_ctx, _push, _parent, _attrs) => { _push(ssrRenderComponent(_sfc_main$1, _attrs, null, _parent)); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/user/statistics_list/customers.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default };