import { defineComponent, ref, watch, mergeProps, withCtx, unref, createVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, withModifiers, createCommentVNode, withDirectives, vShow, nextTick, reactive, computed, inject, resolveDirective, shallowRef, watchEffect, provide, toRef, useSSRContext } from 'vue'; import { ssrRenderComponent, ssrInterpolate, ssrRenderAttrs, ssrRenderClass, ssrRenderList, ssrRenderStyle, ssrRenderAttr, ssrGetDirectiveProps } from 'vue/server-renderer'; import { u as useRouter$1, a as useConfigStore, aj as supabaseService, b as useUserStore, N as myAxios, m as useIntersectionObserver, n as getToken, ak as baseConfirm, d as api$1, q as useElementSize, al as deleteProductById, s as supabase, am as onLongPress, an as onClickOutside, z as useConfigInject, E as omit, A as classNames, V as withInstall, B as genComponentStyleHook, ab as flattenChildren, aa as getOptionProps, Q as initDefaultProps, P as PropTypes, ao as anyType, ap as warning, Y as getTransitionName, J as resetComponent, aq as textEllipsis, ar as KeyCode, I as arrayType, a9 as objectType, C as merge, a0 as initZoomMotion, R as filterEmpty, as as tuple } from './server.mjs'; import { B as BasicSheet } from './index-zsqPNrGJ.mjs'; import { U as UserProfilePic } from './UserProfilePic-CSSFM-Xe.mjs'; import { B as BasicButton } from './BasicButton-7YIRCRg8.mjs'; import { B as BasicIconOld } from './BasicIconOld-Booq7UXp.mjs'; import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2'; import _extends from '@babel/runtime/helpers/esm/extends'; import { _ as __nuxt_component_2, t as tooltipDefaultProps, T as Trigger, b as abstractTooltipProps, c as getArrowStyle, P as PresetColors } from './index-DN2Eqyc3.mjs'; import { u as useProvideOverride, M as Menu, _ as __nuxt_component_1 } from './index-CQMiaHEh.mjs'; import { S as Spin } from './index-CO_xVqO1.mjs'; import { a as antInput } from './index-D4HrLPqa.mjs'; import { u as useInjectFormItemContext, F as FormItemInputContext } from './FormItemContext-DTpHAXaY.mjs'; import { g as getMergedStatus, a as getStatusClassNames, i as initInputToken, b as genBasicInputStyle, c as genStatusStyle, d as genPlaceholderStyle, e as genActiveStyle, f as genDisabledStyle } from './index-BTlbWWOl.mjs'; import { a as formatTimeShort } from './useDateTime-iTLoRLEX.mjs'; import { e as empty_user } from './empty_user-DSxcM_ac.mjs'; import { _ as _sfc_main$8 } from './like-D4L8S2C_.mjs'; import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs'; import { ContentLoader } from 'vue-content-loader'; import { u as useProductStore } from './product-qwehvGHt.mjs'; const genBaseStyle = (token) => { const { componentCls, popoverBg, popoverColor, width, fontWeightStrong, popoverPadding, boxShadowSecondary, colorTextHeading, borderRadiusLG: borderRadius, zIndexPopup, marginXS, colorBgElevated } = token; return [ { [componentCls]: _extends(_extends({}, resetComponent(token)), { position: "absolute", top: 0, // use `left` to fix https://github.com/ant-design/ant-design/issues/39195 left: { _skip_check_: true, value: 0 }, zIndex: zIndexPopup, fontWeight: "normal", whiteSpace: "normal", textAlign: "start", cursor: "auto", userSelect: "text", "--antd-arrow-background-color": colorBgElevated, "&-rtl": { direction: "rtl" }, "&-hidden": { display: "none" }, [`${componentCls}-content`]: { position: "relative" }, [`${componentCls}-inner`]: { backgroundColor: popoverBg, backgroundClip: "padding-box", borderRadius, boxShadow: boxShadowSecondary, padding: popoverPadding }, [`${componentCls}-title`]: { minWidth: width, marginBottom: marginXS, color: colorTextHeading, fontWeight: fontWeightStrong }, [`${componentCls}-inner-content`]: { color: popoverColor } }) }, // Arrow Style getArrowStyle(token, { colorBg: "var(--antd-arrow-background-color)" }), // Pure Render { [`${componentCls}-pure`]: { position: "relative", maxWidth: "none", [`${componentCls}-content`]: { display: "inline-block" } } } ]; }; const genColorStyle = (token) => { const { componentCls } = token; return { [componentCls]: PresetColors.map((colorKey) => { const lightColor = token[`${colorKey}-6`]; return { [`&${componentCls}-${colorKey}`]: { "--antd-arrow-background-color": lightColor, [`${componentCls}-inner`]: { backgroundColor: lightColor }, [`${componentCls}-arrow`]: { background: "transparent" } } }; }) }; }; const genWireframeStyle = (token) => { const { componentCls, lineWidth, lineType, colorSplit, paddingSM, controlHeight, fontSize, lineHeight, padding } = token; const titlePaddingBlockDist = controlHeight - Math.round(fontSize * lineHeight); const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2; const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth; const popoverPaddingHorizontal = padding; return { [componentCls]: { [`${componentCls}-inner`]: { padding: 0 }, [`${componentCls}-title`]: { margin: 0, padding: `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px`, borderBottom: `${lineWidth}px ${lineType} ${colorSplit}` }, [`${componentCls}-inner-content`]: { padding: `${paddingSM}px ${popoverPaddingHorizontal}px` } } }; }; const useStyle$1 = genComponentStyleHook("Popover", (token) => { const { colorBgElevated, colorText, wireframe } = token; const popoverToken = merge(token, { popoverBg: colorBgElevated, popoverColor: colorText, popoverPadding: 12 // Fixed Value }); return [genBaseStyle(popoverToken), genColorStyle(popoverToken), wireframe && genWireframeStyle(popoverToken), initZoomMotion(popoverToken, "zoom-big")]; }, (_ref) => { let { zIndexPopupBase } = _ref; return { zIndexPopup: zIndexPopupBase + 30, width: 177 }; }); const popoverProps = () => _extends(_extends({}, abstractTooltipProps()), { content: anyType(), title: anyType() }); const Popover = defineComponent({ compatConfig: { MODE: 3 }, name: "APopover", inheritAttrs: false, props: initDefaultProps(popoverProps(), _extends(_extends({}, tooltipDefaultProps()), { trigger: "hover", placement: "top", mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1 })), setup(props, _ref) { let { expose, slots, attrs } = _ref; const tooltipRef = ref(); warning(props.visible === void 0); expose({ getPopupDomNode: () => { var _a, _b; return (_b = (_a = tooltipRef.value) === null || _a === void 0 ? void 0 : _a.getPopupDomNode) === null || _b === void 0 ? void 0 : _b.call(_a); } }); const { prefixCls, configProvider } = useConfigInject("popover", props); const [wrapSSR, hashId] = useStyle$1(prefixCls); const rootPrefixCls = computed(() => configProvider.getPrefixCls()); const getOverlay = () => { var _a, _b; const { title = filterEmpty((_a = slots.title) === null || _a === void 0 ? void 0 : _a.call(slots)), content = filterEmpty((_b = slots.content) === null || _b === void 0 ? void 0 : _b.call(slots)) } = props; const hasTitle = !!(Array.isArray(title) ? title.length : title); const hasContent = !!(Array.isArray(content) ? content.length : title); if (!hasTitle && !hasContent) return null; return createVNode(Fragment, null, [hasTitle && createVNode("div", { "class": `${prefixCls.value}-title` }, [title]), createVNode("div", { "class": `${prefixCls.value}-inner-content` }, [content])]); }; return () => { const overlayCls = classNames(props.overlayClassName, hashId.value); return wrapSSR(createVNode(__nuxt_component_2, _objectSpread(_objectSpread(_objectSpread({}, omit(props, ["title", "content"])), attrs), {}, { "prefixCls": prefixCls.value, "ref": tooltipRef, "overlayClassName": overlayCls, "transitionName": getTransitionName(rootPrefixCls.value, "zoom-big", props.transitionName), "data-popover-inject": true }), { title: getOverlay, default: slots.default })); }; } }); const __nuxt_component_0$1 = withInstall(Popover); function getBeforeSelectionText(input) { const { selectionStart } = input; return input.value.slice(0, selectionStart); } function getLastMeasureIndex(text) { let prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; const prefixList = Array.isArray(prefix) ? prefix : [prefix]; return prefixList.reduce((lastMatch, prefixStr) => { const lastIndex = text.lastIndexOf(prefixStr); if (lastIndex > lastMatch.location) { return { location: lastIndex, prefix: prefixStr }; } return lastMatch; }, { location: -1, prefix: "" }); } function lower(char) { return (char || "").toLowerCase(); } function reduceText(text, targetText, split) { const firstChar = text[0]; if (!firstChar || firstChar === split) { return text; } let restText = text; const targetTextLen = targetText.length; for (let i = 0; i < targetTextLen; i += 1) { if (lower(restText[i]) !== lower(targetText[i])) { restText = restText.slice(i); break; } else if (i === targetTextLen - 1) { restText = restText.slice(targetTextLen); } } return restText; } function replaceWithMeasure(text, measureConfig) { const { measureLocation, prefix, targetText, selectionStart, split } = measureConfig; let beforeMeasureText = text.slice(0, measureLocation); if (beforeMeasureText[beforeMeasureText.length - split.length] === split) { beforeMeasureText = beforeMeasureText.slice(0, beforeMeasureText.length - split.length); } if (beforeMeasureText) { beforeMeasureText = `${beforeMeasureText}${split}`; } let restText = reduceText(text.slice(selectionStart), targetText.slice(selectionStart - measureLocation - prefix.length), split); if (restText.slice(0, split.length) === split) { restText = restText.slice(split.length); } const connectedStartText = `${beforeMeasureText}${prefix}${targetText}${split}`; return { text: `${connectedStartText}${restText}`, selectionLocation: connectedStartText.length }; } function setInputSelection(input, location) { input.setSelectionRange(location, location); input.blur(); input.focus(); } function validateSearch(text, props) { const { split } = props; return !split || text.indexOf(split) === -1; } function filterOption(input, _ref) { let { value = "" } = _ref; const lowerCase = input.toLowerCase(); return value.toLowerCase().indexOf(lowerCase) !== -1; } const MentionsContextKey = /* @__PURE__ */ Symbol("MentionsContextKey"); function noop$1() { } const DropdownMenu = defineComponent({ compatConfig: { MODE: 3 }, name: "DropdownMenu", props: { prefixCls: String, options: { type: Array, default: () => [] } }, setup(props, _ref) { let { slots } = _ref; const { activeIndex, setActiveIndex, selectOption, onFocus = noop$1, loading } = inject(MentionsContextKey, { activeIndex: shallowRef(), loading: shallowRef(false) }); let timeoutId; const onMousedown = (e) => { clearTimeout(timeoutId); timeoutId = setTimeout(() => { onFocus(e); }); }; return () => { var _a; const { prefixCls, options } = props; const activeOption = options[activeIndex.value] || {}; return createVNode(Menu, { "prefixCls": `${prefixCls}-menu`, "activeKey": activeOption.value, "onSelect": (_ref2) => { let { key } = _ref2; const option = options.find((_ref3) => { let { value } = _ref3; return value === key; }); selectOption(option); }, "onMousedown": onMousedown }, { default: () => [!loading.value && options.map((option, index) => { var _a2, _b; const { value, disabled, label = option.value, class: className, style } = option; return createVNode(__nuxt_component_1, { "key": value, "disabled": disabled, "onMouseenter": () => { setActiveIndex(index); }, "class": className, "style": style }, { default: () => [(_b = (_a2 = slots.option) === null || _a2 === void 0 ? void 0 : _a2.call(slots, option)) !== null && _b !== void 0 ? _b : typeof label === "function" ? label(option) : label] }); }), !loading.value && options.length === 0 ? createVNode(__nuxt_component_1, { "key": "notFoundContent", "disabled": true }, { default: () => [(_a = slots.notFoundContent) === null || _a === void 0 ? void 0 : _a.call(slots)] }) : null, loading.value && createVNode(__nuxt_component_1, { "key": "loading", "disabled": true }, { default: () => [createVNode(Spin, { "size": "small" }, null)] })] }); }; } }); const BUILT_IN_PLACEMENTS = { bottomRight: { points: ["tl", "br"], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, bottomLeft: { points: ["tr", "bl"], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, topRight: { points: ["bl", "tr"], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } }, topLeft: { points: ["br", "tl"], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } } }; const KeywordTrigger = defineComponent({ compatConfig: { MODE: 3 }, name: "KeywordTrigger", props: { loading: { type: Boolean, default: void 0 }, options: { type: Array, default: () => [] }, prefixCls: String, placement: String, visible: { type: Boolean, default: void 0 }, transitionName: String, getPopupContainer: Function, direction: String, dropdownClassName: String }, setup(props, _ref) { let { slots } = _ref; const getDropdownPrefix = () => { return `${props.prefixCls}-dropdown`; }; const getDropdownElement = () => { const { options } = props; return createVNode(DropdownMenu, { "prefixCls": getDropdownPrefix(), "options": options }, { notFoundContent: slots.notFoundContent, option: slots.option }); }; const popupPlacement = computed(() => { const { placement, direction } = props; let popupPlacement2 = "topRight"; if (direction === "rtl") { popupPlacement2 = placement === "top" ? "topLeft" : "bottomLeft"; } else { popupPlacement2 = placement === "top" ? "topRight" : "bottomRight"; } return popupPlacement2; }); return () => { const { visible, transitionName, getPopupContainer } = props; return createVNode(Trigger, { "prefixCls": getDropdownPrefix(), "popupVisible": visible, "popup": getDropdownElement(), "popupClassName": props.dropdownClassName, "popupPlacement": popupPlacement.value, "popupTransitionName": transitionName, "builtinPlacements": BUILT_IN_PLACEMENTS, "getPopupContainer": getPopupContainer }, { default: slots.default }); }; } }); const PlaceMent = tuple("top", "bottom"); const mentionsProps$1 = { autofocus: { type: Boolean, default: void 0 }, prefix: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), prefixCls: String, value: String, disabled: { type: Boolean, default: void 0 }, split: String, transitionName: String, placement: PropTypes.oneOf(PlaceMent), character: PropTypes.any, characterRender: Function, filterOption: { type: [Boolean, Function] }, validateSearch: Function, getPopupContainer: { type: Function }, options: arrayType(), loading: { type: Boolean, default: void 0 }, rows: [Number, String], direction: { type: String } }; const vcMentionsProps = _extends(_extends({}, mentionsProps$1), { dropdownClassName: String }); const defaultProps = { prefix: "@", split: " ", rows: 1, validateSearch, filterOption: () => filterOption }; initDefaultProps(vcMentionsProps, defaultProps); var __rest$1 = 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; }; function noop() { } const Mentions$1 = defineComponent({ compatConfig: { MODE: 3 }, name: "Mentions", inheritAttrs: false, props: initDefaultProps(vcMentionsProps, defaultProps), emits: ["change", "select", "search", "focus", "blur", "pressenter"], setup(props, _ref) { let { emit, attrs, expose, slots } = _ref; const measure = ref(null); const textarea = ref(null); const focusId = ref(); const state = reactive({ value: props.value || "", measuring: false, measureLocation: 0, measureText: null, measurePrefix: "", activeIndex: 0, isFocus: false }); watchEffect(() => { state.value = props.value; }); const triggerChange = (val) => { emit("change", val); }; const onChange = (_ref2) => { let { target: { value, composing }, isComposing } = _ref2; if (isComposing || composing) return; triggerChange(value); }; const startMeasure = (measureText, measurePrefix, measureLocation) => { _extends(state, { measuring: true, measureText, measurePrefix, measureLocation, activeIndex: 0 }); }; const stopMeasure = (callback) => { _extends(state, { measuring: false, measureLocation: 0, measureText: null }); callback === null || callback === void 0 ? void 0 : callback(); }; const onKeyDown = (event) => { const { which } = event; if (!state.measuring) { return; } if (which === KeyCode.UP || which === KeyCode.DOWN) { const optionLen = options.value.length; const offset = which === KeyCode.UP ? -1 : 1; const newActiveIndex = (state.activeIndex + offset + optionLen) % optionLen; state.activeIndex = newActiveIndex; event.preventDefault(); } else if (which === KeyCode.ESC) { stopMeasure(); } else if (which === KeyCode.ENTER) { event.preventDefault(); if (!options.value.length) { stopMeasure(); return; } const option = options.value[state.activeIndex]; selectOption(option); } }; const onKeyUp = (event) => { const { key, which } = event; const { measureText: prevMeasureText, measuring } = state; const { prefix, validateSearch: validateSearch2 } = props; const target = event.target; if (target.composing) { return; } const selectionStartText = getBeforeSelectionText(target); const { location: measureIndex, prefix: measurePrefix } = getLastMeasureIndex(selectionStartText, prefix); if ([KeyCode.ESC, KeyCode.UP, KeyCode.DOWN, KeyCode.ENTER].indexOf(which) !== -1) { return; } if (measureIndex !== -1) { const measureText = selectionStartText.slice(measureIndex + measurePrefix.length); const validateMeasure = validateSearch2(measureText, props); const matchOption = !!getOptions(measureText).length; if (validateMeasure) { if (key === measurePrefix || key === "Shift" || measuring || measureText !== prevMeasureText && matchOption) { startMeasure(measureText, measurePrefix, measureIndex); } } else if (measuring) { stopMeasure(); } if (validateMeasure) { emit("search", measureText, measurePrefix); } } else if (measuring) { stopMeasure(); } }; const onPressEnter = (event) => { if (!state.measuring) { emit("pressenter", event); } }; const onInputFocus = (event) => { onFocus(event); }; const onInputBlur = (event) => { onBlur(event); }; const onFocus = (event) => { clearTimeout(focusId.value); const { isFocus } = state; if (!isFocus && event) { emit("focus", event); } state.isFocus = true; }; const onBlur = (event) => { focusId.value = setTimeout(() => { state.isFocus = false; stopMeasure(); emit("blur", event); }, 100); }; const selectOption = (option) => { const { split } = props; const { value: mentionValue = "" } = option; const { text, selectionLocation } = replaceWithMeasure(state.value, { measureLocation: state.measureLocation, targetText: mentionValue, prefix: state.measurePrefix, selectionStart: textarea.value.selectionStart, split }); triggerChange(text); stopMeasure(() => { setInputSelection(textarea.value, selectionLocation); }); emit("select", option, state.measurePrefix); }; const setActiveIndex = (activeIndex) => { state.activeIndex = activeIndex; }; const getOptions = (measureText) => { const targetMeasureText = measureText || state.measureText || ""; const { filterOption: filterOption2 } = props; const list = props.options.filter((option) => { if (!!filterOption2 === false) { return true; } return filterOption2(targetMeasureText, option); }); return list; }; const options = computed(() => { return getOptions(); }); const focus = () => { textarea.value.focus(); }; const blur = () => { textarea.value.blur(); }; expose({ blur, focus }); provide(MentionsContextKey, { activeIndex: toRef(state, "activeIndex"), setActiveIndex, selectOption, onFocus, onBlur, loading: toRef(props, "loading") }); return () => { const { measureLocation, measurePrefix, measuring } = state; const { prefixCls, placement, transitionName, getPopupContainer, direction } = props, restProps = __rest$1(props, ["prefixCls", "placement", "transitionName", "getPopupContainer", "direction"]); const { class: className, style } = attrs, otherAttrs = __rest$1(attrs, ["class", "style"]); const inputProps = omit(restProps, ["value", "prefix", "split", "validateSearch", "filterOption", "options", "loading"]); const textareaProps = _extends(_extends(_extends({}, inputProps), otherAttrs), { onChange: noop, onSelect: noop, value: state.value, onInput: onChange, onBlur: onInputBlur, onKeydown: onKeyDown, onKeyup: onKeyUp, onFocus: onInputFocus, onPressenter: onPressEnter }); return createVNode("div", { "class": classNames(prefixCls, className), "style": style }, [withDirectives(createVNode("textarea", _objectSpread({ "ref": textarea }, textareaProps), null), [[antInput]]), measuring && createVNode("div", { "ref": measure, "class": `${prefixCls}-measure` }, [state.value.slice(0, measureLocation), createVNode(KeywordTrigger, { "prefixCls": prefixCls, "transitionName": transitionName, "dropdownClassName": props.dropdownClassName, "placement": placement, "options": measuring ? options.value : [], "visible": true, "direction": direction, "getPopupContainer": getPopupContainer }, { default: () => [createVNode("span", null, [measurePrefix])], notFoundContent: slots.notFoundContent, option: slots.option }), state.value.slice(measureLocation + measurePrefix.length)])]); }; } }); const baseOptionsProps = { value: String, disabled: Boolean, payload: objectType() }; const optionProps = _extends(_extends({}, baseOptionsProps), { label: anyType([]) }); const optionOptions = { name: "Option", props: optionProps, render(_props, _ref) { let { slots } = _ref; var _a; return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots); } }; defineComponent(_extends({ compatConfig: { MODE: 3 } }, optionOptions)); const genMentionsStyle = (token) => { const { componentCls, colorTextDisabled, controlItemBgHover, controlPaddingHorizontal, colorText, motionDurationSlow, lineHeight, controlHeight, inputPaddingHorizontal, inputPaddingVertical, fontSize, colorBgElevated, borderRadiusLG, boxShadowSecondary } = token; const itemPaddingVertical = Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2); return { [componentCls]: _extends(_extends(_extends(_extends(_extends({}, resetComponent(token)), genBasicInputStyle(token)), { position: "relative", display: "inline-block", height: "auto", padding: 0, overflow: "hidden", lineHeight, whiteSpace: "pre-wrap", verticalAlign: "bottom" }), genStatusStyle(token, componentCls)), { "&-disabled": { "> textarea": _extends({}, genDisabledStyle(token)) }, "&-focused": _extends({}, genActiveStyle(token)), [`&-affix-wrapper ${componentCls}-suffix`]: { position: "absolute", top: 0, insetInlineEnd: inputPaddingHorizontal, bottom: 0, zIndex: 1, display: "inline-flex", alignItems: "center", margin: "auto" }, // ================= Input Area ================= [`> textarea, ${componentCls}-measure`]: { color: colorText, boxSizing: "border-box", minHeight: controlHeight - 2, margin: 0, padding: `${inputPaddingVertical}px ${inputPaddingHorizontal}px`, overflow: "inherit", overflowX: "hidden", overflowY: "auto", fontWeight: "inherit", fontSize: "inherit", fontFamily: "inherit", fontStyle: "inherit", fontVariant: "inherit", fontSizeAdjust: "inherit", fontStretch: "inherit", lineHeight: "inherit", direction: "inherit", letterSpacing: "inherit", whiteSpace: "inherit", textAlign: "inherit", verticalAlign: "top", wordWrap: "break-word", wordBreak: "inherit", tabSize: "inherit" }, "> textarea": _extends({ width: "100%", border: "none", outline: "none", resize: "none", backgroundColor: "inherit" }, genPlaceholderStyle(token.colorTextPlaceholder)), [`${componentCls}-measure`]: { position: "absolute", top: 0, insetInlineEnd: 0, bottom: 0, insetInlineStart: 0, zIndex: -1, color: "transparent", pointerEvents: "none", "> span": { display: "inline-block", minHeight: "1em" } }, // ================== Dropdown ================== "&-dropdown": _extends(_extends({}, resetComponent(token)), { position: "absolute", top: -9999, insetInlineStart: -9999, zIndex: token.zIndexPopup, boxSizing: "border-box", fontSize, fontVariant: "initial", backgroundColor: colorBgElevated, borderRadius: borderRadiusLG, outline: "none", boxShadow: boxShadowSecondary, "&-hidden": { display: "none" }, [`${componentCls}-dropdown-menu`]: { maxHeight: token.dropdownHeight, marginBottom: 0, paddingInlineStart: 0, overflow: "auto", listStyle: "none", outline: "none", "&-item": _extends(_extends({}, textEllipsis), { position: "relative", display: "block", minWidth: token.controlItemWidth, padding: `${itemPaddingVertical}px ${controlPaddingHorizontal}px`, color: colorText, fontWeight: "normal", lineHeight, cursor: "pointer", transition: `background ${motionDurationSlow} ease`, "&:hover": { backgroundColor: controlItemBgHover }, "&:first-child": { borderStartStartRadius: borderRadiusLG, borderStartEndRadius: borderRadiusLG, borderEndStartRadius: 0, borderEndEndRadius: 0 }, "&:last-child": { borderStartStartRadius: 0, borderStartEndRadius: 0, borderEndStartRadius: borderRadiusLG, borderEndEndRadius: borderRadiusLG }, "&-disabled": { color: colorTextDisabled, cursor: "not-allowed", "&:hover": { color: colorTextDisabled, backgroundColor: controlItemBgHover, cursor: "not-allowed" } }, "&-selected": { color: colorText, fontWeight: token.fontWeightStrong, backgroundColor: controlItemBgHover }, "&-active": { backgroundColor: controlItemBgHover } }) } }) }) }; }; const useStyle = genComponentStyleHook("Mentions", (token) => { const mentionsToken = initInputToken(token); return [genMentionsStyle(mentionsToken)]; }, (token) => ({ dropdownHeight: 250, controlItemWidth: 100, zIndexPopup: token.zIndexPopupBase + 50 })); 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; }; function loadingFilterOption() { return true; } const getMentions = function() { let value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; let config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const { prefix = "@", split = " " } = config; const prefixList = Array.isArray(prefix) ? prefix : [prefix]; return value.split(split).map(function() { let str = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; let hitPrefix = null; prefixList.some((prefixStr) => { const startStr = str.slice(0, prefixStr.length); if (startStr === prefixStr) { hitPrefix = prefixStr; return true; } return false; }); if (hitPrefix !== null) { return { prefix: hitPrefix, value: str.slice(hitPrefix.length) }; } return null; }).filter((entity) => !!entity && !!entity.value); }; const mentionsProps = () => _extends(_extends({}, mentionsProps$1), { loading: { type: Boolean, default: void 0 }, onFocus: { type: Function }, onBlur: { type: Function }, onSelect: { type: Function }, onChange: { type: Function }, onPressenter: { type: Function }, "onUpdate:value": { type: Function }, notFoundContent: PropTypes.any, defaultValue: String, id: String, status: String }); const Mentions = defineComponent({ compatConfig: { MODE: 3 }, name: "AMentions", inheritAttrs: false, props: mentionsProps(), slots: Object, setup(props, _ref) { let { slots, emit, attrs, expose } = _ref; var _b, _c; const { prefixCls, renderEmpty, direction } = useConfigInject("mentions", props); const [wrapSSR, hashId] = useStyle(prefixCls); const focused = shallowRef(false); const vcMentions = shallowRef(null); const value = shallowRef((_c = (_b = props.value) !== null && _b !== void 0 ? _b : props.defaultValue) !== null && _c !== void 0 ? _c : ""); const formItemContext = useInjectFormItemContext(); const formItemInputContext = FormItemInputContext.useInject(); const mergedStatus = computed(() => getMergedStatus(formItemInputContext.status, props.status)); useProvideOverride({ prefixCls: computed(() => `${prefixCls.value}-menu`), mode: computed(() => "vertical"), selectable: computed(() => false), onClick: () => { }, validator: (_ref2) => { let { mode } = _ref2; } }); watch(() => props.value, (val) => { value.value = val; }); const handleFocus = (e) => { focused.value = true; emit("focus", e); }; const handleBlur = (e) => { focused.value = false; emit("blur", e); formItemContext.onFieldBlur(); }; const handleSelect = function() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } emit("select", ...args); focused.value = true; }; const handleChange = (val) => { if (props.value === void 0) { value.value = val; } emit("update:value", val); emit("change", val); formItemContext.onFieldChange(); }; const getNotFoundContent = () => { const notFoundContent = props.notFoundContent; if (notFoundContent !== void 0) { return notFoundContent; } if (slots.notFoundContent) { return slots.notFoundContent(); } return renderEmpty("Select"); }; const getOptions = () => { var _a2; return flattenChildren(((_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots)) || []).map((item) => { var _a3, _b2; return _extends(_extends({}, getOptionProps(item)), { label: (_b2 = (_a3 = item.children) === null || _a3 === void 0 ? void 0 : _a3.default) === null || _b2 === void 0 ? void 0 : _b2.call(_a3) }); }); }; const focus = () => { vcMentions.value.focus(); }; const blur = () => { vcMentions.value.blur(); }; expose({ focus, blur }); const mentionsfilterOption = computed(() => props.loading ? loadingFilterOption : props.filterOption); return () => { const { disabled, getPopupContainer, rows = 1, id = formItemContext.id.value } = props, restProps = __rest(props, ["disabled", "getPopupContainer", "rows", "id"]); const { hasFeedback, feedbackIcon } = formItemInputContext; const { class: className } = attrs, otherAttrs = __rest(attrs, ["class"]); const otherProps = omit(restProps, ["defaultValue", "onUpdate:value", "prefixCls"]); const mergedClassName = classNames({ [`${prefixCls.value}-disabled`]: disabled, [`${prefixCls.value}-focused`]: focused.value, [`${prefixCls.value}-rtl`]: direction.value === "rtl" }, getStatusClassNames(prefixCls.value, mergedStatus.value), !hasFeedback && className, hashId.value); const mentionsProps2 = _extends(_extends(_extends(_extends({ prefixCls: prefixCls.value }, otherProps), { disabled, direction: direction.value, filterOption: mentionsfilterOption.value, getPopupContainer, options: props.loading ? [{ value: "ANTDV_SEARCHING", disabled: true, label: createVNode(Spin, { "size": "small" }, null) }] : props.options || getOptions(), class: mergedClassName }), otherAttrs), { rows, onChange: handleChange, onSelect: handleSelect, onFocus: handleFocus, onBlur: handleBlur, ref: vcMentions, value: value.value, id }); const mentions = createVNode(Mentions$1, _objectSpread(_objectSpread({}, mentionsProps2), {}, { "dropdownClassName": hashId.value }), { notFoundContent: getNotFoundContent, option: slots.option }); if (hasFeedback) { return wrapSSR(createVNode("div", { "class": classNames(`${prefixCls.value}-affix-wrapper`, getStatusClassNames(`${prefixCls.value}-affix-wrapper`, mergedStatus.value, hasFeedback), className, hashId.value) }, [mentions, createVNode("span", { "class": `${prefixCls.value}-suffix` }, [feedbackIcon])])); } return wrapSSR(mentions); }; } }); const MentionsOption = defineComponent(_extends(_extends({ compatConfig: { MODE: 3 } }, optionOptions), { name: "AMentionsOption", props: optionProps })); const __nuxt_component_0 = _extends(Mentions, { Option: MentionsOption, getMentions, install: (app) => { app.component(Mentions.name, Mentions); app.component(MentionsOption.name, MentionsOption); return app; } }); const _imports_0$2 = "data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.7431%2015.215C19.5381%2013.825%2020.0031%2012.22%2020.0031%2010.5C20.0031%205.255%2015.7481%201%2010.5031%201C5.25811%201%201.00311%205.255%201.00311%2010.5C1.00311%2015.745%205.25811%2020%2010.5031%2020C12.2581%2020%2013.8931%2019.515%2015.3031%2018.69L19.3581%2019.775C19.6481%2019.855%2019.9181%2019.585%2019.8381%2019.295L18.7431%2015.215Z'%20stroke='white'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _imports_1$2 = "data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.7431%2015.215C19.5381%2013.825%2020.0031%2012.22%2020.0031%2010.5C20.0031%205.255%2015.7481%201%2010.5031%201C5.25811%201%201.00311%205.255%201.00311%2010.5C1.00311%2015.745%205.25811%2020%2010.5031%2020C12.2581%2020%2013.8931%2019.515%2015.3031%2018.69L19.3581%2019.775C19.6481%2019.855%2019.9181%2019.585%2019.8381%2019.295L18.7431%2015.215Z'%20stroke='black'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _sfc_main$7 = /* @__PURE__ */ defineComponent({ __name: "comment", __ssrInlineRender: true, setup(__props) { const config = useConfigStore(); return (_ctx, _push, _parent, _attrs) => { if (unref(config).isNightStore) { _push(``); } else { _push(``); } }; } }); const _sfc_setup$7 = _sfc_main$7.setup; _sfc_main$7.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("assets/img/icons/comment.vue"); return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0; }; const _imports_0$1 = "data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2011.5L16.94%2019H17V1H1V19H1.06L9%2011.5Z'%20stroke='white'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _imports_1$1 = "data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2011.5L16.94%2019H17V1H1V19H1.06L9%2011.5Z'%20stroke='black'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _imports_2 = "data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2011.5L16.94%2019H17V1H1V19H1.06L9%2011.5Z'%20fill='white'%20stroke='white'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _imports_3 = "data:image/svg+xml,%3csvg%20width='18'%20height='20'%20viewBox='0%200%2018%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2011.5L16.94%2019H17V1H1V19H1.06L9%2011.5Z'%20fill='black'%20stroke='black'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _sfc_main$6 = /* @__PURE__ */ defineComponent({ __name: "save", __ssrInlineRender: true, props: { isSaved: { type: Boolean } }, setup(__props) { const config = useConfigStore(); return (_ctx, _push, _parent, _attrs) => { if (!_ctx.isSaved) { if (unref(config).isNightStore) { _push(``); } else { _push(``); } } else { if (unref(config).isNightStore) { _push(``); } else { _push(``); } } }; } }); const _sfc_setup$6 = _sfc_main$6.setup; _sfc_main$6.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("assets/img/icons/save.vue"); return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0; }; const _imports_0 = "data:image/svg+xml,%3csvg%20width='22'%20height='20'%20viewBox='0%200%2022%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.0031%201H1.00311L8.50311%208.5M21.0031%201L10.5031%2018.5L8.50311%208.5M21.0031%201L8.50311%208.5'%20stroke='white'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _imports_1 = "data:image/svg+xml,%3csvg%20width='22'%20height='20'%20viewBox='0%200%2022%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.0031%201H1.00311L8.50311%208.5M21.0031%201L10.5031%2018.5L8.50311%208.5M21.0031%201L8.50311%208.5'%20stroke='black'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3c/svg%3e"; const _sfc_main$5 = /* @__PURE__ */ defineComponent({ __name: "share", __ssrInlineRender: true, setup(__props) { const config = useConfigStore(); return (_ctx, _push, _parent, _attrs) => { if (unref(config).isNightStore) { _push(``); } else { _push(``); } }; } }); const _sfc_setup$5 = _sfc_main$5.setup; _sfc_main$5.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("assets/img/icons/share.vue"); return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0; }; const createPostLike = async (product_id) => { return await myAxios.post("/media/create-like", { product_id }); }; const deletePostLike = async (product_id) => supabaseService.fetch("likes", "delete", { field: ["user_id", "product_id"], value: [useUserStore().user.id, product_id] }); const createCommentLike = async (comment_id) => { return await myAxios.post("/media/create-comment-like", { comment_id }); }; const deleteCommentLike = async (comment_id) => supabaseService.fetch("likes", "delete", { field: ["user_id", "comment_id"], value: [useUserStore().user.id, comment_id] }); const _sfc_main$4 = /* @__PURE__ */ defineComponent({ __name: "SubCommentCard", __ssrInlineRender: true, props: { item: {}, addLikeLoading: { type: Boolean }, showComment: { type: Boolean }, activeEditId: {} }, emits: ["likeComment", "reply", "edit", "delete", "LongPress"], setup(__props, { emit: __emit }) { const props = __props; const user = useUserStore(); const config = useConfigStore(); const ownerId = inject("ownerPostId"); const targetForLongPressSubItem = ref(); const visiblePopOp = computed(() => { return props.showComment && props.activeEditId == props.item.id; }); const isUserOwnerComment = computed(() => { if (user.user.user_id == ownerId.value || user.user.user_id == props.item.user_id) return true; else return false; }); const emits = __emit; onLongPress(targetForLongPressSubItem, handleLongPressSubItem, { delay: 1e3 }); function handleLongPressSubItem() { if (isUserOwnerComment.value) { emits("LongPress", props.item.id); } } return (_ctx, _push, _parent, _attrs) => { const _component_a_popover = __nuxt_component_0$1; const _directive_lazy = resolveDirective("lazy"); let _temp0; _push(``); _push(ssrRenderComponent(_component_a_popover, { open: visiblePopOp.value, "onUpdate:open": ($event) => visiblePopOp.value = $event, placement: unref(config).lang == "en" ? "bottomLeft" : "bottomRight", trigger: "click" }, { content: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:edit", class: "w-5", color: unref(config).isNightStore ? "black" : "black" }, null, _parent2, _scopeId)); _push2(`${ssrInterpolate(unref(config).useString("edit"))}
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:trash", class: "w-5", color: unref(config).isNightStore ? "red" : "red" }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(unref(config).useString("delete"))}
`); } else { return [ createVNode("div", { class: "flex flex-col gap-1" }, [ createVNode("div", { class: "flex gap-2", onClick: ($event) => emits("edit", _ctx.item) }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:edit", class: "w-5", color: unref(config).isNightStore ? "black" : "black" }, null, 8, ["color"]), createVNode("div", null, toDisplayString(unref(config).useString("edit")), 1) ], 8, ["onClick"]), createVNode("div", { class: "flex gap-2", onClick: () => { emits("edit", _ctx.item); emits("delete"); } }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:trash", class: "w-5", color: unref(config).isNightStore ? "red" : "red" }, null, 8, ["color"]), createVNode("div", { class: "text-red-6" }, toDisplayString(unref(config).useString("delete")), 1) ], 8, ["onClick"]) ]) ]; } }), default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
${"textContent" in _temp0 ? ssrInterpolate(_temp0.textContent) : _temp0.innerHTML ?? ""}
${ssrInterpolate(_ctx.item.user.name)}
${ssrInterpolate(unref(formatTimeShort)(_ctx.item.created_at))}
${ssrInterpolate(_ctx.item.message)}
`); _push2(ssrRenderComponent(_sfc_main$8, { "is-gray": "", "is-liked": _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id) }, null, _parent2, _scopeId)); _push2(`${ssrInterpolate(_ctx.item.like?.length)}
`); } else { return [ createVNode("div", { class: "flex text-xs gap-2" }, [ createVNode("div", null, [ withDirectives(createVNode("img", { alt: unref(config).appName.en, width: "40", class: "rounded-full aspect-square" }, null, 8, ["alt"]), [ [_directive_lazy, { src: unref(config).useDataStorage(_ctx.item?.user?.avatar), loading: unref(empty_user), error: unref(empty_user) }] ]) ]), createVNode("div", { class: "flex-1" }, [ createVNode("div", { class: "flex gap-2 items-center" }, [ createVNode("div", null, toDisplayString(_ctx.item.user.name), 1), createVNode("div", { class: "text-xs text-gray-500" }, toDisplayString(unref(formatTimeShort)(_ctx.item.created_at)), 1) ]), createVNode("div", null, toDisplayString(_ctx.item.message), 1) ]), createVNode("div", { class: "flex flex-col items-center gap-1 w-14px", onClick: ($event) => emits("likeComment", _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id), _ctx.item.id), "aria-disabled": _ctx.addLikeLoading }, [ createVNode(_sfc_main$8, { "is-gray": "", "is-liked": _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id) }, null, 8, ["is-liked"]), createVNode("div", null, toDisplayString(_ctx.item.like?.length), 1) ], 8, ["onClick", "aria-disabled"]) ]) ]; } }), _: 1 }, _parent)); _push(``); }; } }); const _sfc_setup$4 = _sfc_main$4.setup; _sfc_main$4.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/home/components/SubCommentCard.vue"); return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0; }; const _sfc_main$3 = /* @__PURE__ */ defineComponent({ __name: "CommentCard", __ssrInlineRender: true, props: { item: {}, addLikeLoading: { type: Boolean }, showComment: { type: Boolean }, activeEditId: {} }, emits: ["likeComment", "reply", "edit", "startPress", "endPress", "clickOutside", "delete"], setup(__props, { emit: __emit }) { const props = __props; const visiblePopOp = computed(() => { return props.showComment && props.activeEditId == props.item.id; }); const user = useUserStore(); const config = useConfigStore(); const emits = __emit; const showReply = ref(false); const ownerId = inject("ownerPostId"); const targetForClickOutside = ref(); const targetForLongPress = ref(); const subItemId = ref(); const isUserOwnerComment = computed(() => { if (user.user.user_id == ownerId.value || user.user.user_id == props.item.user_id || user.user.user_id == subItemId.value) return true; else return false; }); onLongPress(targetForLongPress, handleLongPress, { delay: 1e3 }); function handleLongPress() { console.log("ddddd"); if (isUserOwnerComment.value) emits("startPress", props.item.id); } function handleLongPressSubItem(id) { console.log("dddddshhhd"); console.log("dddddsd"); emits("startPress", id); } onClickOutside(targetForClickOutside, handleClickOutside); function handleClickOutside() { console.log("aaaaa"); emits("clickOutside"); } return (_ctx, _push, _parent, _attrs) => { const _component_a_popover = __nuxt_component_0$1; const _directive_lazy = resolveDirective("lazy"); let _temp0; _push(``); _push(ssrRenderComponent(_component_a_popover, { open: visiblePopOp.value, "onUpdate:open": ($event) => visiblePopOp.value = $event, trigger: "click", placement: unref(config).lang == "en" ? "bottomLeft" : "bottomRight" }, { content: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:edit", class: "w-5", color: unref(config).isNightStore ? "black" : "black" }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(unref(config).useString("edit"))}
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:trash", class: "w-5", color: unref(config).isNightStore ? "red" : "red" }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(unref(config).useString("delete"))}
`); } else { return [ createVNode("div", { ref_key: "targetForClickOutside", ref: targetForClickOutside, class: "flex flex-col gap-1" }, [ createVNode("div", { class: "flex gap-2", onClick: ($event) => emits("edit", _ctx.item) }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:edit", class: "w-5", color: unref(config).isNightStore ? "black" : "black" }, null, 8, ["color"]), createVNode("div", null, toDisplayString(unref(config).useString("edit")), 1) ], 8, ["onClick"]), createVNode("div", { class: "flex gap-2", onClick: () => { emits("edit", _ctx.item); emits("delete"); } }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:trash", class: "w-5", color: unref(config).isNightStore ? "red" : "red" }, null, 8, ["color"]), createVNode("div", { class: "text-red-6" }, toDisplayString(unref(config).useString("delete")), 1) ], 8, ["onClick"]) ], 512) ]; } }), default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
${"textContent" in _temp0 ? ssrInterpolate(_temp0.textContent) : _temp0.innerHTML ?? ""}
${ssrInterpolate(_ctx.item.user.name)}
${ssrInterpolate(unref(formatTimeShort)(_ctx.item.created_at))}
${ssrInterpolate(_ctx.item.message)}
${ssrInterpolate(unref(config).useString("reply"))}
`); _push2(ssrRenderComponent(_sfc_main$8, { "is-gray": "", "is-liked": _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id) }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(_ctx.item.like?.length)}
`); } else { return [ createVNode("div", { ref_key: "targetForLongPress", ref: targetForLongPress }, [ createVNode("div", { ref_key: "targetForClickOutside", ref: targetForClickOutside, class: ["flex text-xs gap-2", _ctx.showComment && _ctx.activeEditId != _ctx.item.id ? "blur-sm" : ""], onContextmenu: withModifiers(() => { }, ["prevent"]) }, [ createVNode("div", null, [ withDirectives(createVNode("img", { alt: unref(config).appName.en, width: "40", class: "rounded-full aspect-square" }, null, 8, ["alt"]), [ [_directive_lazy, { src: unref(config).useDataStorage(_ctx.item.user.avatar), loading: unref(empty_user), error: unref(empty_user) }] ]) ]), createVNode("div", { class: "flex-1" }, [ createVNode("div", { class: "flex gap-2 items-center" }, [ createVNode("div", null, toDisplayString(_ctx.item.user.name), 1), createVNode("div", { class: "text-xs text-gray-500" }, toDisplayString(unref(formatTimeShort)(_ctx.item.created_at)), 1) ]), createVNode("div", null, toDisplayString(_ctx.item.message), 1), createVNode("div", { class: "text-gray-5", onClick: ($event) => emits("reply") }, toDisplayString(unref(config).useString("reply")), 9, ["onClick"]) ]), createVNode("div", { class: "flex flex-col items-center gap-1 w-14px", "aria-disabled": _ctx.addLikeLoading, onClick: ($event) => emits("likeComment", _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id), _ctx.item.id, false, _ctx.item.id) }, [ createVNode(_sfc_main$8, { "is-gray": "", "is-liked": _ctx.item.like?.some((x) => x.user_id === unref(user).user?.id) }, null, 8, ["is-liked"]), createVNode("div", null, toDisplayString(_ctx.item.like?.length), 1) ], 8, ["aria-disabled", "onClick"]) ], 42, ["onContextmenu"]) ], 512) ]; } }), _: 1 }, _parent)); if (_ctx.item?.replies?.length > 0) { _push(``); if (!showReply.value) { _push(`
${ssrInterpolate(unref(config).useString("viewMoreReplies", _ctx.item?.replies?.length))}
`); } else { _push(`
`); ssrRenderList(_ctx.item?.replies, (subItem) => { _push(ssrRenderComponent(_sfc_main$4, { item: subItem, key: subItem.id, "show-comment": _ctx.showComment, "active-edit-id": _ctx.activeEditId, onDelete: () => { emits("edit", subItem); emits("delete"); }, onEdit: ($event) => emits("edit", subItem), class: _ctx.showComment && _ctx.activeEditId != subItem.id ? "blur-sm" : "", onLongPress: handleLongPressSubItem, onContextmenu: () => { }, onLikeComment: ($event) => emits("likeComment", subItem.like?.some((x) => x.user_id === unref(user).user?.id), subItem.id, true, _ctx.item.id), addLikeLoading: _ctx.addLikeLoading }, null, _parent)); }); _push(`
`); } _push(``); } else { _push(``); } _push(``); }; } }); const _sfc_setup$3 = _sfc_main$3.setup; _sfc_main$3.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/home/components/CommentCard.vue"); return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0; }; const CommentCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f47ce143"]]); const _sfc_main$2 = /* @__PURE__ */ defineComponent({ __name: "CommentCardSkeleton", __ssrInlineRender: true, setup(__props) { const isLoaded = ref(false); const skeletonRatio = ref(null); const skeletonSize = reactive( useElementSize(skeletonRatio, { width: 0, height: 0 }, { box: "border-box" }) ); return (_ctx, _push, _parent, _attrs) => { if (isLoaded.value) { _push(``); _push(ssrRenderComponent(unref(ContentLoader), { width: skeletonSize.width, height: "60" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(``); } else { return [ createVNode("circle", { cx: 15, cy: "30", r: "15" }), createVNode("rect", { x: "45", y: "15", rx: "3", ry: "3", width: "100", height: "12" }), createVNode("rect", { x: "45", y: "35", rx: "5", ry: "5", width: skeletonSize.width - 100, height: "10" }, null, 8, ["width"]) ]; } }), _: 1 }, _parent)); _push(``); } else { _push(``); } }; } }); const _sfc_setup$2 = _sfc_main$2.setup; _sfc_main$2.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/home/components/CommentCardSkeleton.vue"); return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0; }; const getComments = async (product_id, page = 1, limit = 10) => { const start = (page - 1) * limit; const end = start + limit - 1; return (await supabase.from("comments").select(`*, user:users(name, avatar), like:likes(user_id), replies:comments(*, user:users(name, avatar), like:likes(user_id) )`).eq("product_id", product_id).is("parent_id", null).range(start, end).order("created_at", { ascending: false }))?.data; }; const addNewComment = async (message, product_id, parent_id = void 0) => { return await myAxios.post(`/media/add-comment`, { message, product_id, parent_id }); }; const updateComment = async (id, message) => { return await supabaseService.fetch("comments", "update", { columns: `*, user:users(name, avatar), like:likes(user_id), replies:comments(*, user:users(name, avatar), like:likes(user_id) )`, data: { message }, field: "id", value: id }); }; const deleteComment = async (id) => { await supabaseService.fetch("comments", "delete", { field: "id", value: id }); }; const _sfc_main$1 = /* @__PURE__ */ defineComponent({ __name: "CommentAddEdit", __ssrInlineRender: true, props: { open: { type: Boolean }, id: {} }, emits: ["update:open", "addCommentId", "deleteCommentId"], setup(__props, { emit: __emit }) { const router = useRouter$1(); const config = useConfigStore(); const userStore = useUserStore(); const sheetRef = ref(null); const isAtTop = ref(true); const scrollArea = ref(null); const focusInput = ref(false); const addMessageLoading = ref(false); const addLikeLoading = ref(false); useUserStore(); const userReply = ref(void 0); const commentEdit = ref(void 0); function selectCommentForEdit(comment) { userReply.value = void 0; commentEdit.value = comment; messageText.value = comment.message; } function unSelectCommentForEdit() { commentEdit.value = void 0; messageText.value = ""; } const handleScroll = () => { isAtTop.value = scrollArea.value.scrollTop <= 5; }; function resetReply() { userReply.value = void 0; } function scrollInputIntoView() { setTimeout(() => { (void 0).activeElement?.scrollIntoView({ behavior: "smooth", block: "center" }); focusInput.value = true; }, 300); } const props = __props; const emits = __emit; const loading = ref(false); const comments = ref([]); const messageText = ref(""); const inputRef = ref(null); const endPage = ref(false); const currentPage = ref(0); const limit = ref(20); const request = async () => { try { if (!endPage.value) { loading.value = true; const res = await getComments(props.id, ++currentPage.value, limit.value); if (res?.length < limit.value) endPage.value = true; comments.value.push(...res); } } catch (e) { console.log("e ===>", e); } finally { loading.value = false; } }; async function openSheet() { await request(); await nextTick(); await sheetRef.value?.setOpen(); await inputRef.value?.focus(); } async function closeSheet() { await nextTick(); await sheetRef.value?.setClose(); resetList(); resetReply(); unSelectCommentForEdit(); showComment.value = false; } function resetList() { comments.value = []; currentPage.value = 0; endPage.value = false; } const addMessage = async () => { try { if (messageText.value?.length > 0) { addMessageLoading.value = true; if (commentEdit.value) { const inf = await updateComment(commentEdit.value.id, messageText.value); const commentId = commentEdit.value.id; const parentId = commentEdit.value.parent_id; if (parentId) { const parentComment = comments.value.find((comment) => comment.id === parentId); if (parentComment) { const replyIndex = parentComment.replies.findIndex((reply) => reply.id === commentId); if (replyIndex !== -1) { parentComment.replies.splice(replyIndex, 1, inf[0]); } } } else { const commentIndex = comments.value.findIndex((comment) => comment.id === commentId); if (commentIndex !== -1) { comments.value.splice(commentIndex, 1, inf[0]); } } } else if (userReply.value) { const inf = await addNewComment(messageText.value, props.id, userReply.value.id); if (!userReply.value?.replies) userReply.value.replies = []; userReply.value?.replies.push({ message: messageText.value, user: { name: userStore.user.name, avatar: userStore.user.avatar }, like: [], ...inf }); emits("addCommentId", inf.id); } else { const inf = await addNewComment(messageText.value, props.id); comments.value?.unshift({ message: messageText.value, user: { name: userStore.user.name, avatar: userStore.user.avatar }, like: [], replies: [], ...inf }); emits("addCommentId", inf.id); } await nextTick(() => { messageText.value = ""; userReply.value = void 0; commentEdit.value = void 0; }); } } catch (e) { console.log(e); } finally { addMessageLoading.value = false; } }; async function confirmDeleteComment() { await baseConfirm(config.useString("areYouSureToDeleteThisComment"), deleteMessage); } async function deleteMessage() { try { addMessageLoading.value = true; await deleteComment(commentEdit.value.id); const commentId = commentEdit.value.id; const parentId = commentEdit.value.parent_id; if (parentId) { const parentComment = comments.value.find((comment) => comment.id === parentId); if (parentComment) { const replyIndex = parentComment.replies.findIndex((reply) => reply.id === commentId); if (replyIndex !== -1) { parentComment.replies.splice(replyIndex, 1); } } } else { const commentIndex = comments.value.findIndex((comment) => comment.id === commentId); if (commentIndex !== -1) { comments.value.splice(commentIndex, 1); } } emits("deleteCommentId"); await nextTick(() => { messageText.value = ""; userReply.value = void 0; commentEdit.value = void 0; }); } catch (e) { console.log(e); } finally { addMessageLoading.value = false; } } function handleLike(isLiked, id, isSub, searchId) { try { addLikeLoading.value = true; if (getToken()) { if (isLiked) { deleteCommentLike(id); if (isSub) { const item = comments.value.find((x) => x.id === searchId); const subIndex = item?.replies.find((x) => x.id === id); subIndex?.like.splice(subIndex.like?.findIndex((y) => y.user_id === userStore.user?.id)); } else { const item = comments.value.find((x) => x.id === searchId); item?.like.splice(item?.like?.findIndex((y) => y.user_id === userStore.user?.id)); } } else { createCommentLike(id); if (isSub) { const item = comments.value.find((x) => x.id === searchId); const subIndex = item?.replies.find((x) => x.id === id); subIndex?.like.push({ product_id: id, user_id: userStore.user.id }); } else { const item = comments.value.find((x) => x.id === searchId); item?.like?.push({ product_id: id, user_id: userStore.user.id }); } } } else { router.push({ name: "auth-login" }); api$1.warn(config.useString("pleaseLoginOrRegister")); } } catch (e) { console.log(e); } finally { addLikeLoading.value = false; } } const observer = ref(); useIntersectionObserver(observer, ([{ isIntersecting }]) => { if (isIntersecting && props.open) { setTimeout(() => { request(); }, 100); } }); watch(props, (value) => { if (value.open) { openSheet(); } else { closeSheet(); } }); const pressTimer = ref(null); const showComment = ref(false); const activeEditId = ref(void 0); const startPress = (id) => { activeEditId.value = id; showComment.value = true; console.log("Long press detected!", id); }; const endPress = () => { if (pressTimer.value) { clearTimeout(pressTimer.value); pressTimer.value = null; } }; const onClickOutside2 = () => { showComment.value = false; }; return (_ctx, _push, _parent, _attrs) => { const _component_a_mentions = __nuxt_component_0; _push(ssrRenderComponent(BasicSheet, mergeProps({ title: "", ref_key: "sheetRef", ref: sheetRef, headerCls: "", allowCloseScrollup: isAtTop.value, closeOnClickOutside: "", onOnClickOutside: ($event) => emits("update:open", false), onOnClose: ($event) => emits("update:open", false) }, _attrs), { header: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
${ssrInterpolate(unref(config).useString("comments"))}
`); } else { return [ createVNode("div", { flex: "", "justify-center": "", "items-center": "", "flex-col": "", "p-2": "" }, [ createVNode("div", { "bg-gray-500": "", "h-2px": "", "w-2.5rem": "" }), createVNode("div", { "mt-1": "", "font-semibold": "" }, toDisplayString(unref(config).useString("comments")), 1) ]) ]; } }), default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); ssrRenderList(comments.value, (comment) => { _push2(ssrRenderComponent(CommentCard, { item: comment, "active-edit-id": activeEditId.value, "show-comment": showComment.value, onLikeComment: handleLike, onStartPress: startPress, onEndPress: endPress, onClickOutside: onClickOutside2, onDelete: confirmDeleteComment, onContextmenu: () => { }, onEdit: selectCommentForEdit, onReply: ($event) => { userReply.value = comment; unSelectCommentForEdit(); }, addLikeLoading: addLikeLoading.value }, null, _parent2, _scopeId)); }); _push2(``); if (loading.value) { _push2(``); ssrRenderList(5, (item) => { _push2(ssrRenderComponent(_sfc_main$2, null, null, _parent2, _scopeId)); }); _push2(``); } else { _push2(``); } _push2(`
load
`); if (unref(getToken)()) { _push2(`
`); _push2(ssrRenderComponent(UserProfilePic, { width: "40", class: "w-40 ms-2", src: unref(userStore).user?.avatar, "just-show-profile": "" }, null, _parent2, _scopeId)); _push2(`
`); if (userReply.value) { _push2(`
${ssrInterpolate(unref(config).useString("replyingTo"))}${ssrInterpolate(userReply.value?.user?.name)}
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:add", class: "rotate-45", color: unref(config).isNightStore ? "bg-zinc-7" : "text-gray-4", onClick: ($event) => userReply.value = void 0 }, null, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } if (commentEdit.value) { _push2(`
${ssrInterpolate(unref(config).useString("editComment"))}${ssrInterpolate(commentEdit.value?.user?.name)}
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:add", class: "rotate-45", color: unref(config).isNightStore ? "bg-zinc-7" : "text-gray-4", onClick: unSelectCommentForEdit }, null, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } _push2(`
`); _push2(ssrRenderComponent(_component_a_mentions, { value: messageText.value, "onUpdate:value": ($event) => messageText.value = $event, placeholder: unref(config).useString("yourComment"), class: "comment_input" }, null, _parent2, _scopeId)); _push2(ssrRenderComponent(BasicButton, { onClick: addMessage, class: "rounded-full w-3.5rem", type: "primary", loading: addMessageLoading.value }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:arrow-up" }, null, _parent3, _scopeId2)); } else { return [ createVNode(BasicIconOld, { icon: "vuesax-linear:arrow-up" }) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } _push2(`
`); } else { return [ createVNode("div", { class: ["h-70vh w-full relative relative", unref(getToken)() ? "pb-4rem" : ""] }, [ createVNode("div", { class: "h-full px-4 overflow-auto", ref_key: "scrollArea", ref: scrollArea, onScroll: handleScroll }, [ (openBlock(true), createBlock(Fragment, null, renderList(comments.value, (comment) => { return openBlock(), createBlock(CommentCard, { item: comment, "active-edit-id": activeEditId.value, "show-comment": showComment.value, onLikeComment: handleLike, onStartPress: startPress, onEndPress: endPress, onClickOutside: onClickOutside2, onDelete: confirmDeleteComment, onContextmenu: withModifiers(() => { }, ["prevent"]), onEdit: selectCommentForEdit, onReply: ($event) => { userReply.value = comment; unSelectCommentForEdit(); }, addLikeLoading: addLikeLoading.value }, null, 8, ["item", "active-edit-id", "show-comment", "onContextmenu", "onReply", "addLikeLoading"]); }), 256)), loading.value ? (openBlock(), createBlock(Fragment, { key: 0 }, renderList(5, (item) => { return createVNode(_sfc_main$2); }), 64)) : createCommentVNode("", true), withDirectives(createVNode("div", { ref_key: "observer", ref: observer, class: "w-full opacity-0 relative" }, " load ", 512), [ [vShow, !loading.value] ]) ], 544), unref(getToken)() ? (openBlock(), createBlock("div", { key: 0, class: "flex w-inherit fixed gap-1 items-center my-2 px2 py-1 bottom-1", onFocusin: scrollInputIntoView, onFocusout: ($event) => focusInput.value = false }, [ createVNode(UserProfilePic, { width: "40", class: "w-40 ms-2", src: unref(userStore).user?.avatar, "just-show-profile": "" }, null, 8, ["src"]), createVNode("div", { class: ["border-solid flex-1 border-1 comment_input", userReply.value || commentEdit.value ? "rounded-3xl" : "rounded-full"] }, [ userReply.value ? (openBlock(), createBlock("div", { key: 0, class: ["rounded-t-3xl text-xs p3 mb1 flex justify-between", unref(config).isNightStore ? "bg-zinc-7 text-gray-2" : "bg-gray-50 text-gray-4"] }, [ createVNode("div", { class: "flex items-center" }, [ createVNode("span", null, [ createVNode("span", { class: "me-1" }, toDisplayString(unref(config).useString("replyingTo")), 1), createVNode("span", null, toDisplayString(userReply.value?.user?.name), 1) ]) ]), createVNode(BasicIconOld, { icon: "vuesax-linear:add", class: "rotate-45", color: unref(config).isNightStore ? "bg-zinc-7" : "text-gray-4", onClick: ($event) => userReply.value = void 0 }, null, 8, ["color", "onClick"]) ], 2)) : createCommentVNode("", true), commentEdit.value ? (openBlock(), createBlock("div", { key: 1, class: ["rounded-t-3xl text-xs p3 mb1 flex justify-between", unref(config).isNightStore ? "bg-zinc-7 text-gray-2" : "bg-gray-50 text-gray-4"] }, [ createVNode("div", { class: "flex items-center" }, [ createVNode("span", null, [ createVNode("span", { class: "me-1" }, toDisplayString(unref(config).useString("editComment")), 1), createVNode("span", null, toDisplayString(commentEdit.value?.user?.name), 1) ]) ]), createVNode(BasicIconOld, { icon: "vuesax-linear:add", class: "rotate-45", color: unref(config).isNightStore ? "bg-zinc-7" : "text-gray-4", onClick: unSelectCommentForEdit }, null, 8, ["color"]) ], 2)) : createCommentVNode("", true), createVNode("div", { class: "flex items-center p1 gap-1" }, [ createVNode(_component_a_mentions, { value: messageText.value, "onUpdate:value": ($event) => messageText.value = $event, placeholder: unref(config).useString("yourComment"), class: "comment_input" }, null, 8, ["value", "onUpdate:value", "placeholder"]), createVNode(BasicButton, { onClick: addMessage, class: "rounded-full w-3.5rem", type: "primary", loading: addMessageLoading.value }, { default: withCtx(() => [ createVNode(BasicIconOld, { icon: "vuesax-linear:arrow-up" }) ]), _: 1 }, 8, ["loading"]) ]) ], 2) ], 40, ["onFocusout"])) : createCommentVNode("", true) ], 2) ]; } }), _: 1 }, _parent)); }; } }); 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("components/CommentAddEdit.vue"); return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0; }; const CommentAddEdit = Object.assign(_sfc_main$1, { __name: "CommentAddEdit" }); const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "moreOptionProduct", __ssrInlineRender: true, props: { open: { type: Boolean }, id: {} }, emits: ["update:open"], setup(__props, { emit: __emit }) { const router = useRouter$1(); const config = useConfigStore(); const sheetRef = ref(null); const props = __props; const emits = __emit; async function openSheet() { await nextTick(); await sheetRef.value?.setOpen(); } async function closeSheet() { await nextTick(); await sheetRef.value?.setClose(); } async function confirmDeleteProduct() { await baseConfirm(config.useString("areYouSureToDeleteThisProduct"), deleteProduct); } const percent = useProductStore(); async function deleteProduct() { percent.percentUpload = 0; percent.loading = true; try { await deleteProductById(props.id); percent.percentUpload = 100; api$1.success(config.useString("deletedSuccessfully")); } catch (e) { console.log(e); api$1.error(config.useString("errorInAction")); } finally { percent.loading = false; emits("update:open", false); } } watch(props, (value) => { if (value.open) { openSheet(); } else { closeSheet(); } }); return (_ctx, _push, _parent, _attrs) => { _push(ssrRenderComponent(BasicSheet, mergeProps({ title: "", ref_key: "sheetRef", ref: sheetRef, headerCls: "", closeOnClickOutside: "", onOnClickOutside: ($event) => emits("update:open", false), onOnClose: ($event) => emits("update:open", false) }, _attrs), { header: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); } else { return [ createVNode("div", { flex: "", "justify-center": "", "items-center": "", "flex-col": "", "p-2": "" }, [ createVNode("div", { "bg-gray-500": "", "h-2px": "", "w-2.5rem": "" }) ]) ]; } }), default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:edit", color: "white" }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(unref(config).useString("edit"))}
`); _push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:trash", color: "red" }, null, _parent2, _scopeId)); _push2(`
${ssrInterpolate(unref(config).useString("delete"))}
`); } else { return [ createVNode("div", { class: "h-fit px-4" }, [ createVNode("div", { class: "flex flex-col gap-2 mt-5 mb-5" }, [ createVNode("div", { class: "flex items-center gap-3 p-3 rounded-lg bg-primary", onClick: ($event) => unref(router).push({ name: "edit-product-id", params: { id: props.id } }) }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:edit", color: "white" }), createVNode("div", { class: "text-sm text-white" }, toDisplayString(unref(config).useString("edit")), 1) ], 8, ["onClick"]), createVNode("div", { class: "flex items-center gap-3 p-3 rounded-lg bg-red-100", onClick: ($event) => confirmDeleteProduct() }, [ createVNode(BasicIconOld, { icon: "vuesax-linear:trash", color: "red" }), createVNode("div", { class: "text-red text-sm" }, toDisplayString(unref(config).useString("delete")), 1) ], 8, ["onClick"]) ]) ]) ]; } }), _: 1 }, _parent)); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/home/components/moreOptionProduct.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { CommentAddEdit as C, _sfc_main as _, _sfc_main$5 as a, _sfc_main$7 as b, createPostLike as c, deletePostLike as d, _sfc_main$6 as e };