513 lines
31 KiB
JavaScript
513 lines
31 KiB
JavaScript
import { defineComponent, ref, computed, withAsyncContext, watch, resolveDirective, unref, withCtx, mergeProps, createVNode, createBlock, openBlock, Fragment, renderList, createCommentVNode, withDirectives, useSSRContext } from 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/vue/index.mjs';
|
|
import { ssrRenderComponent, ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrRenderList, ssrGetDirectiveProps, ssrRenderStyle } from 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/vue/server-renderer/index.mjs';
|
|
import { u as useRouter$1, a as useConfigStore, b as useUserStore, o as useCartStore, p as usePriceStore, m as useIntersectionObserver, _ as __nuxt_component_0 } from './server.mjs';
|
|
import { u as usePrice } from './usePrice-_QzChhgO.mjs';
|
|
import { B as BasicIconOld } from './BasicIconOld-93vAWohq.mjs';
|
|
import numbro from 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/numbro/dist/numbro.min.js';
|
|
import { H as Highlights, T as Tabs, _ as __nuxt_component_1 } from './Highlights-BltqsdO_.mjs';
|
|
import { U as UserProfilePic } from './UserProfilePic-DaZ03Xcl.mjs';
|
|
import { l as loadGray, _ as __nuxt_component_0$1 } from './gray-Bd8mWW-o.mjs';
|
|
import { _ as _sfc_main$6 } from './FullScreenStories-nkUmovER.mjs';
|
|
import { u as useMediaStore } from './media-D7PFhdrG.mjs';
|
|
import { u as useUserPostStore } from './userPostsStore-CAxMlK-n.mjs';
|
|
import { _ as _sfc_main$5 } from './ProductSearchList-BtzyWbWx.mjs';
|
|
import { u as useAsyncData } from './asyncData-Iix-4nDI.mjs';
|
|
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import '../nitro/nitro.mjs';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'node:url';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/consola/dist/index.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/ipx/dist/index.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/pinia/dist/pinia.prod.cjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@supabase/supabase-js/dist/main/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/axios/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/lodash-es/lodash.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@babel/runtime/helpers/esm/extends.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@babel/runtime/helpers/esm/objectSpread2.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@ant-design/colors/dist/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@ctrl/tinycolor/dist/public_api.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/stylis/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/vue-types/dist/vue-types.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@ant-design/icons-vue/lib/index.js';
|
|
import '../routes/renderer.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/vue-bundle-renderer/dist/runtime.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@nuxt/nitro-server/node_modules/vue/server-renderer/index.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/unhead/dist/server.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/devalue/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/unhead/dist/utils.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/@unhead/vue/node_modules/vue/index.mjs';
|
|
import './index-Bn4rLj9V.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/dom-align/dist-node/index.js';
|
|
import './index-D-yl9XJT.mjs';
|
|
import './shallowequal-BEyWmMEh.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/lodash-es/uniq.js';
|
|
import './index-G65aBv4F.mjs';
|
|
import './FormItemContext-BlKvWASA.mjs';
|
|
import './index-BGahPE0Z.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/lodash-es/isPlainObject.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/resize-observer-polyfill/dist/ResizeObserver.js';
|
|
import './useRefs-BHKrVg4I.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/lodash-es/pick.js';
|
|
import './useMergedState-BZEfJ8Fl.mjs';
|
|
import './media-_NDkNIvH.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/swiper/swiper-vue.mjs';
|
|
import './empty_user-DSxcM_ac.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/vue-content-loader/dist/vue-content-loader.cjs.js';
|
|
import './BasicInput-rlXkJMLE.mjs';
|
|
import './like-B155RLSm.mjs';
|
|
import './BasicButton-DhQvSD8U.mjs';
|
|
import './index-BMAjr3Fm.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/throttle-debounce/esm/index.js';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/swiper/modules/index.mjs';
|
|
import './index-BWBnVq-W.mjs';
|
|
import './Checkbox-Dl5Ja72L.mjs';
|
|
import 'file:///mnt/new-volume-7/vue_projects/montify/montify/node_modules/perfect-debounce/dist/index.mjs';
|
|
|
|
const _imports_0$1 = "data:image/svg+xml,%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20512%20512'%20style='enable-background:new%200%200%20512%20512;'%20xml:space='preserve'%3e%3cg%20id='XMLID_2_'%20fill='white'%3e%3cpath%20id='XMLID_14_'%20class='st0'%20d='M460.8,0H51.2C23.3,0,0,23.3,0,51.2v409.6C0,488.7,23.3,512,51.2,512h409.6%20c27.9,0,51.2-23.3,51.2-51.2V51.2C512,23.3,488.7,0,460.8,0z%20M153.6,460.8H51.2V358.4h102.4V460.8z%20M153.6,307.2H51.2V204.8h102.4%20V307.2z%20M153.6,153.6H51.2V51.2h102.4V153.6z%20M307.2,460.8H204.8V358.4h102.4V460.8z%20M307.2,307.2H204.8V204.8h102.4V307.2z%20M307.2,153.6H204.8V51.2h102.4V153.6z%20M460.8,460.8H358.4V358.4h102.4V460.8z%20M460.8,307.2H358.4V204.8h102.4V307.2z%20M460.8,153.6%20H358.4V51.2h102.4V153.6z'/%3e%3c/g%3e%3c/svg%3e";
|
|
const _imports_1$1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20512%20512'%20style='enable-background:new%200%200%20512%20512;'%20xml:space='preserve'%3e%3cg%20id='XMLID_2_'%3e%3cpath%20id='XMLID_14_'%20class='st0'%20d='M460.8,0H51.2C23.3,0,0,23.3,0,51.2v409.6C0,488.7,23.3,512,51.2,512h409.6%20c27.9,0,51.2-23.3,51.2-51.2V51.2C512,23.3,488.7,0,460.8,0z%20M153.6,460.8H51.2V358.4h102.4V460.8z%20M153.6,307.2H51.2V204.8h102.4%20V307.2z%20M153.6,153.6H51.2V51.2h102.4V153.6z%20M307.2,460.8H204.8V358.4h102.4V460.8z%20M307.2,307.2H204.8V204.8h102.4V307.2z%20M307.2,153.6H204.8V51.2h102.4V153.6z%20M460.8,460.8H358.4V358.4h102.4V460.8z%20M460.8,307.2H358.4V204.8h102.4V307.2z%20M460.8,153.6%20H358.4V51.2h102.4V153.6z'/%3e%3c/g%3e%3c/svg%3e";
|
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
__name: "grid",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const config = useConfigStore();
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
if (unref(config).isNightStore) {
|
|
_push(`<img${ssrRenderAttrs(mergeProps({
|
|
src: _imports_0$1,
|
|
class: "w-1rem h-1rem",
|
|
alt: "grid",
|
|
"cursor-pointer": ""
|
|
}, _attrs))}>`);
|
|
} else {
|
|
_push(`<img${ssrRenderAttrs(mergeProps({
|
|
src: _imports_1$1,
|
|
alt: "grid",
|
|
"cursor-pointer": "",
|
|
class: "w-1rem h-1rem"
|
|
}, _attrs))}>`);
|
|
}
|
|
};
|
|
}
|
|
});
|
|
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("assets/img/icons/grid.vue");
|
|
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
};
|
|
const _imports_0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21%206H19M21%2012H16M21%2018H16M7%2020V13.5612C7%2013.3532%207%2013.2492%206.97958%2013.1497C6.96147%2013.0615%206.93151%2012.9761%206.89052%2012.8958C6.84431%2012.8054%206.77934%2012.7242%206.64939%2012.5617L3.35061%208.43826C3.22066%208.27583%203.15569%208.19461%203.10948%208.10417C3.06849%208.02393%203.03853%207.93852%203.02042%207.85026C3%207.75078%203%207.64677%203%207.43875V5.6C3%205.03995%203%204.75992%203.10899%204.54601C3.20487%204.35785%203.35785%204.20487%203.54601%204.10899C3.75992%204%204.03995%204%204.6%204H13.4C13.9601%204%2014.2401%204%2014.454%204.10899C14.6422%204.20487%2014.7951%204.35785%2014.891%204.54601C15%204.75992%2015%205.03995%2015%205.6V7.43875C15%207.64677%2015%207.75078%2014.9796%207.85026C14.9615%207.93852%2014.9315%208.02393%2014.8905%208.10417C14.8443%208.19461%2014.7793%208.27583%2014.6494%208.43826L11.3506%2012.5617C11.2207%2012.7242%2011.1557%2012.8054%2011.1095%2012.8958C11.0685%2012.9761%2011.0385%2013.0615%2011.0204%2013.1497C11%2013.2492%2011%2013.3532%2011%2013.5612V17L7%2020Z'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
const _imports_1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21%206H19M21%2012H16M21%2018H16M7%2020V13.5612C7%2013.3532%207%2013.2492%206.97958%2013.1497C6.96147%2013.0615%206.93151%2012.9761%206.89052%2012.8958C6.84431%2012.8054%206.77934%2012.7242%206.64939%2012.5617L3.35061%208.43826C3.22066%208.27583%203.15569%208.19461%203.10948%208.10417C3.06849%208.02393%203.03853%207.93852%203.02042%207.85026C3%207.75078%203%207.64677%203%207.43875V5.6C3%205.03995%203%204.75992%203.10899%204.54601C3.20487%204.35785%203.35785%204.20487%203.54601%204.10899C3.75992%204%204.03995%204%204.6%204H13.4C13.9601%204%2014.2401%204%2014.454%204.10899C14.6422%204.20487%2014.7951%204.35785%2014.891%204.54601C15%204.75992%2015%205.03995%2015%205.6V7.43875C15%207.64677%2015%207.75078%2014.9796%207.85026C14.9615%207.93852%2014.9315%208.02393%2014.8905%208.10417C14.8443%208.19461%2014.7793%208.27583%2014.6494%208.43826L11.3506%2012.5617C11.2207%2012.7242%2011.1557%2012.8054%2011.1095%2012.8958C11.0685%2012.9761%2011.0385%2013.0615%2011.0204%2013.1497C11%2013.2492%2011%2013.3532%2011%2013.5612V17L7%2020Z'%20stroke='%23000000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
__name: "filter",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const config = useConfigStore();
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
if (unref(config).isNightStore) {
|
|
_push(`<img${ssrRenderAttrs(mergeProps({
|
|
class: "w-1.5rem h-1.5rem",
|
|
src: _imports_0,
|
|
alt: "filter",
|
|
"cursor-pointer": ""
|
|
}, _attrs))}>`);
|
|
} else {
|
|
_push(`<img${ssrRenderAttrs(mergeProps({
|
|
src: _imports_1,
|
|
class: "w-1.5rem h-1.5rem",
|
|
alt: "filter",
|
|
"cursor-pointer": ""
|
|
}, _attrs))}>`);
|
|
}
|
|
};
|
|
}
|
|
});
|
|
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("assets/img/icons/filter.vue");
|
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
};
|
|
function shortenUrl(url, maxLength = 50) {
|
|
if (url.length <= maxLength) return url;
|
|
const start = url.slice(0, Math.floor(maxLength / 2) - 3);
|
|
const end = url.slice(-Math.floor(maxLength / 2));
|
|
return `${start}...${end}`;
|
|
}
|
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
__name: "Seller",
|
|
__ssrInlineRender: true,
|
|
async setup(__props) {
|
|
let __temp, __restore;
|
|
const router = useRouter$1();
|
|
const selectedStoryId = ref(null);
|
|
const activeKey = ref("products");
|
|
ref(false);
|
|
const config = useConfigStore();
|
|
const user = useUserStore();
|
|
const mediaStore = useMediaStore();
|
|
useCartStore();
|
|
const userPost = useUserPostStore();
|
|
const onlinePrices = usePriceStore();
|
|
const seller = computed(() => config.sellerConfig?.store);
|
|
const tala18 = ref(onlinePrices?.prices.find((x) => x?.id_key === "8-geram18")?.price);
|
|
const userStory = computed(() => {
|
|
return mediaStore.users.find((x) => x.id === seller.value?.id);
|
|
});
|
|
const formatNumber = (num) => {
|
|
if (num < 9999) return num;
|
|
return numbro(num).format({
|
|
average: true,
|
|
// Converts 11230 -> 11.2K, 1000000 -> 1M
|
|
mantissa: 1
|
|
// Number of decimal places
|
|
});
|
|
};
|
|
const videoThumbnails = ref({});
|
|
const observer = ref();
|
|
useIntersectionObserver(observer, async ([{ isIntersecting }]) => {
|
|
if (isIntersecting && !userPost.loading && !userPost.endPage) {
|
|
setTimeout(async () => {
|
|
const nextPage = userPost.currentPage + 1;
|
|
const data2 = await userPost.loadPosts(seller.value?.user_id, nextPage);
|
|
userPost.loadStateNextPage(data2);
|
|
}, 100);
|
|
}
|
|
});
|
|
const { data } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData("productMainSeller", async () => {
|
|
userPost.reset();
|
|
return await userPost.loadPosts(seller.value?.user_id, 1);
|
|
})), __temp = await __temp, __restore(), __temp);
|
|
watch(data, () => {
|
|
if (data) {
|
|
userPost.loadStateNextPage(data.value);
|
|
}
|
|
});
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_ClientOnly = __nuxt_component_0;
|
|
const _component_client_only = __nuxt_component_0;
|
|
const _component_ATabs = Tabs;
|
|
const _component_ATabPane = __nuxt_component_1;
|
|
const _directive_lazy = resolveDirective("lazy");
|
|
let _temp0;
|
|
_push(`<div${ssrRenderAttrs(_attrs)} data-v-224dcc9a><div class="absolute top-0 w-inherit right-0 left-0" data-v-224dcc9a><div class="flex justify-between w-full p-4" data-v-224dcc9a><div class="font-semibold text-lg" data-v-224dcc9a>${ssrInterpolate(seller.value?.username)}</div>`);
|
|
_push(ssrRenderComponent(_component_ClientOnly, null, {}, _parent));
|
|
_push(`</div><div class="h-90vh overflow-y-auto pb-5vh" data-v-224dcc9a><div class="px4" data-v-224dcc9a><div class="flex" data-v-224dcc9a>`);
|
|
_push(ssrRenderComponent(UserProfilePic, {
|
|
src: seller.value?.avatar,
|
|
onClick: ($event) => userStory.value?.stories?.length === 0 || !userStory.value?.stories ? "" : selectedStoryId.value = seller.value?.id,
|
|
"just-show-profile": userStory.value?.stories?.length === 0 || !userStory.value?.stories,
|
|
seenStory: !userStory.value?.stories?.length || userStory.value?.stories?.every((item) => item.storyviews.find((_item) => _item.user_id === unref(user).user?.id || _item.user_id === "me")),
|
|
showAdd: unref(config).isSeller
|
|
}, null, _parent));
|
|
_push(`<div class="p3 text-sm" data-v-224dcc9a><div class="flex mt2 gap-3" data-v-224dcc9a><div class="" data-v-224dcc9a><div class="font-semibold" data-v-224dcc9a>${ssrInterpolate(formatNumber(seller.value?.stats?.total_product ?? 0))}</div><div class="text-xs" data-v-224dcc9a>${ssrInterpolate(unref(config).useString("products"))}</div></div>`);
|
|
if (unref(config).isSeller) {
|
|
_push(`<div class="" data-v-224dcc9a><div class="font-semibold" data-v-224dcc9a>${ssrInterpolate(formatNumber(seller.value?.stats?.total_customer ?? 0))}</div><div class="text-xs" data-v-224dcc9a>${ssrInterpolate(unref(config).useString("customers"))}</div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`<div class="" data-v-224dcc9a><div class="font-semibold" data-v-224dcc9a>${ssrInterpolate(formatNumber(unref(config).isSeller ? seller.value?.stats?.sell_total_order_count ?? 0 : unref(user)?.user?.stats?.buy_total_order_count ?? 0))}</div><div class="text-xs" data-v-224dcc9a>${ssrInterpolate(unref(config).isSeller ? unref(config).useString("orders") : unref(config).useString("yourOrders"))}</div></div>`);
|
|
if (unref(config).APP_HAS_GOLD && tala18.value) {
|
|
_push(`<div class="" data-v-224dcc9a><div class="font-semibold flex gap-1" data-v-224dcc9a>${ssrInterpolate(
|
|
// usePrice((tala18/1000)?? 0,true,'')
|
|
("usePrice" in _ctx ? _ctx.usePrice : unref(usePrice))(tala18.value / 10, true, "")
|
|
)} <div class="text-xs" data-v-224dcc9a>${ssrInterpolate(unref(config).useString("toman"))}</div></div><div class="text-xs" data-v-224dcc9a>${ssrInterpolate(unref(config).useString("goldGramPrice"))}</div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div></div></div><div class="text-xs mt-5 whitespace-pre-line" data-v-224dcc9a>${ssrInterpolate(seller.value?.bio)}</div>`);
|
|
if (seller.value?.website) {
|
|
_push(`<a${ssrRenderAttr("href", "https://" + seller.value?.website)} target="_blank" data-v-224dcc9a><div class="flex items-center text-xs gap-1 text-primary" data-v-224dcc9a>`);
|
|
_push(ssrRenderComponent(BasicIconOld, {
|
|
icon: "vuesax-linear:link-1",
|
|
class: "text-primary",
|
|
size: "20"
|
|
}, null, _parent));
|
|
_push(` ${ssrInterpolate(seller.value?.website)}</div></a>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if (unref(config).ENAMAD_URL) {
|
|
_push(`<div data-v-224dcc9a> اینماد <a${ssrRenderAttr("href", unref(config).ENAMAD_URL)} target="_blank" data-v-224dcc9a><div class="flex items-center text-xs gap-1 text-primary" data-v-224dcc9a>`);
|
|
_push(ssrRenderComponent(BasicIconOld, {
|
|
icon: "vuesax-linear:link-1",
|
|
class: "text-primary",
|
|
size: "20"
|
|
}, null, _parent));
|
|
_push(` ${ssrInterpolate(unref(shortenUrl)(unref(config).ENAMAD_URL))}</div></a></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(ssrRenderComponent(_component_client_only, null, {}, _parent));
|
|
_push(`<div class="mt-4 flex -me16px" data-v-224dcc9a>`);
|
|
_push(ssrRenderComponent(Highlights, { "current-user": seller.value }, null, _parent));
|
|
_push(`</div></div>`);
|
|
_push(ssrRenderComponent(_component_ATabs, {
|
|
activeKey: activeKey.value,
|
|
"onUpdate:activeKey": ($event) => activeKey.value = $event,
|
|
centered: "",
|
|
class: "instaTab"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(ssrRenderComponent(_component_ATabPane, {
|
|
class: "!w-full",
|
|
key: "products"
|
|
}, {
|
|
tab: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`<span data-v-224dcc9a${_scopeId2}>`);
|
|
_push3(ssrRenderComponent(_sfc_main$4, null, null, _parent3, _scopeId2));
|
|
_push3(`</span>`);
|
|
} else {
|
|
return [
|
|
createVNode("span", null, [
|
|
createVNode(_sfc_main$4)
|
|
])
|
|
];
|
|
}
|
|
}),
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`<div class="w-full grid grid-cols-3 mt-[1px] gap-2px" data-v-224dcc9a${_scopeId2}><!--[-->`);
|
|
ssrRenderList(unref(userPost).posts, (post, i) => {
|
|
_push3(`<div class="w-full aspect-square relative" data-v-224dcc9a${_scopeId2}>`);
|
|
if (post.files?.length) {
|
|
_push3(`<!--[-->`);
|
|
if (post.files[0]?.type === "image") {
|
|
_push3(`<img${ssrRenderAttrs(_temp0 = mergeProps({
|
|
class: "w-full h-full object-cover",
|
|
alt: unref(config).appName.en
|
|
}, ssrGetDirectiveProps(_ctx, _directive_lazy, { src: unref(config).useDataStorage(post.files[0].url), loading: unref(loadGray), error: unref(loadGray) })))} data-v-224dcc9a${_scopeId2}>${"textContent" in _temp0 ? ssrInterpolate(_temp0.textContent) : _temp0.innerHTML ?? ""}`);
|
|
} else if (post.files[0]?.type === "video") {
|
|
_push3(`<div class="relative w-full h-full" data-v-224dcc9a${_scopeId2}><video${ssrRenderAttr("src", post.files[0]?.url)} class="hidden" data-v-224dcc9a${_scopeId2}></video><img${ssrRenderAttr("src", videoThumbnails.value[post.files[0]?.url])} class="w-full h-full object-cover" alt="Video Thumbnail" data-v-224dcc9a${_scopeId2}><div class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-30" data-v-224dcc9a${_scopeId2}><svg class="w-12 h-12 text-white" fill="currentColor" viewBox="0 0 24 24" data-v-224dcc9a${_scopeId2}><path d="M8 5v14l11-7z" data-v-224dcc9a${_scopeId2}></path></svg></div></div>`);
|
|
} else {
|
|
_push3(`<!---->`);
|
|
}
|
|
_push3(`<!--]-->`);
|
|
} else {
|
|
_push3(`<!---->`);
|
|
}
|
|
_push3(`</div>`);
|
|
});
|
|
_push3(`<!--]--></div>`);
|
|
} else {
|
|
return [
|
|
createVNode("div", { class: "w-full grid grid-cols-3 mt-[1px] gap-2px" }, [
|
|
(openBlock(true), createBlock(Fragment, null, renderList(unref(userPost).posts, (post, i) => {
|
|
return openBlock(), createBlock("div", {
|
|
key: i,
|
|
class: "w-full aspect-square relative",
|
|
onClick: ($event) => unref(router).push({ name: "posts", query: { target: post.id, userId: seller.value?.user_id } })
|
|
}, [
|
|
post.files?.length ? (openBlock(), createBlock(Fragment, { key: 0 }, [
|
|
post.files[0]?.type === "image" ? withDirectives((openBlock(), createBlock("img", {
|
|
key: 0,
|
|
class: "w-full h-full object-cover",
|
|
alt: unref(config).appName.en
|
|
}, null, 8, ["alt"])), [
|
|
[_directive_lazy, { src: unref(config).useDataStorage(post.files[0].url), loading: unref(loadGray), error: unref(loadGray) }]
|
|
]) : post.files[0]?.type === "video" ? (openBlock(), createBlock("div", {
|
|
key: 1,
|
|
class: "relative w-full h-full"
|
|
}, [
|
|
createVNode("video", {
|
|
ref_for: true,
|
|
ref: "videoRefs",
|
|
src: post.files[0]?.url,
|
|
class: "hidden"
|
|
}, null, 8, ["src"]),
|
|
createVNode("img", {
|
|
src: videoThumbnails.value[post.files[0]?.url],
|
|
class: "w-full h-full object-cover",
|
|
alt: "Video Thumbnail"
|
|
}, null, 8, ["src"]),
|
|
createVNode("div", { class: "absolute inset-0 flex items-center justify-center bg-black bg-opacity-30" }, [
|
|
(openBlock(), createBlock("svg", {
|
|
class: "w-12 h-12 text-white",
|
|
fill: "currentColor",
|
|
viewBox: "0 0 24 24"
|
|
}, [
|
|
createVNode("path", { d: "M8 5v14l11-7z" })
|
|
]))
|
|
])
|
|
])) : createCommentVNode("", true)
|
|
], 64)) : createCommentVNode("", true)
|
|
], 8, ["onClick"]);
|
|
}), 128))
|
|
])
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_push2(ssrRenderComponent(_component_ATabPane, {
|
|
class: "!w-full",
|
|
key: "search"
|
|
}, {
|
|
tab: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`<span data-v-224dcc9a${_scopeId2}>`);
|
|
_push3(ssrRenderComponent(_sfc_main$3, null, null, _parent3, _scopeId2));
|
|
_push3(`</span>`);
|
|
} else {
|
|
return [
|
|
createVNode("span", null, [
|
|
createVNode(_sfc_main$3)
|
|
])
|
|
];
|
|
}
|
|
}),
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(ssrRenderComponent(_sfc_main$5, { class: "!-mt-3" }, null, _parent3, _scopeId2));
|
|
} else {
|
|
return [
|
|
createVNode(_sfc_main$5, { class: "!-mt-3" })
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
createVNode(_component_ATabPane, {
|
|
class: "!w-full",
|
|
key: "products"
|
|
}, {
|
|
tab: withCtx(() => [
|
|
createVNode("span", null, [
|
|
createVNode(_sfc_main$4)
|
|
])
|
|
]),
|
|
default: withCtx(() => [
|
|
createVNode("div", { class: "w-full grid grid-cols-3 mt-[1px] gap-2px" }, [
|
|
(openBlock(true), createBlock(Fragment, null, renderList(unref(userPost).posts, (post, i) => {
|
|
return openBlock(), createBlock("div", {
|
|
key: i,
|
|
class: "w-full aspect-square relative",
|
|
onClick: ($event) => unref(router).push({ name: "posts", query: { target: post.id, userId: seller.value?.user_id } })
|
|
}, [
|
|
post.files?.length ? (openBlock(), createBlock(Fragment, { key: 0 }, [
|
|
post.files[0]?.type === "image" ? withDirectives((openBlock(), createBlock("img", {
|
|
key: 0,
|
|
class: "w-full h-full object-cover",
|
|
alt: unref(config).appName.en
|
|
}, null, 8, ["alt"])), [
|
|
[_directive_lazy, { src: unref(config).useDataStorage(post.files[0].url), loading: unref(loadGray), error: unref(loadGray) }]
|
|
]) : post.files[0]?.type === "video" ? (openBlock(), createBlock("div", {
|
|
key: 1,
|
|
class: "relative w-full h-full"
|
|
}, [
|
|
createVNode("video", {
|
|
ref_for: true,
|
|
ref: "videoRefs",
|
|
src: post.files[0]?.url,
|
|
class: "hidden"
|
|
}, null, 8, ["src"]),
|
|
createVNode("img", {
|
|
src: videoThumbnails.value[post.files[0]?.url],
|
|
class: "w-full h-full object-cover",
|
|
alt: "Video Thumbnail"
|
|
}, null, 8, ["src"]),
|
|
createVNode("div", { class: "absolute inset-0 flex items-center justify-center bg-black bg-opacity-30" }, [
|
|
(openBlock(), createBlock("svg", {
|
|
class: "w-12 h-12 text-white",
|
|
fill: "currentColor",
|
|
viewBox: "0 0 24 24"
|
|
}, [
|
|
createVNode("path", { d: "M8 5v14l11-7z" })
|
|
]))
|
|
])
|
|
])) : createCommentVNode("", true)
|
|
], 64)) : createCommentVNode("", true)
|
|
], 8, ["onClick"]);
|
|
}), 128))
|
|
])
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_ATabPane, {
|
|
class: "!w-full",
|
|
key: "search"
|
|
}, {
|
|
tab: withCtx(() => [
|
|
createVNode("span", null, [
|
|
createVNode(_sfc_main$3)
|
|
])
|
|
]),
|
|
default: withCtx(() => [
|
|
createVNode(_sfc_main$5, { class: "!-mt-3" })
|
|
]),
|
|
_: 1
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`<div class="w-full opacity-0 relative" style="${ssrRenderStyle(!unref(userPost).loading ? null : { display: "none" })}" data-v-224dcc9a> load </div>`);
|
|
if (unref(userPost).loading) {
|
|
_push(ssrRenderComponent(__nuxt_component_0$1, null, null, _parent));
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div></div>`);
|
|
if (selectedStoryId.value) {
|
|
_push(ssrRenderComponent(_sfc_main$6, {
|
|
id: selectedStoryId.value,
|
|
"onUpdate:id": ($event) => selectedStoryId.value = $event,
|
|
specifyId: ""
|
|
}, null, _parent));
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
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/user/userMain/components/Seller.vue");
|
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
};
|
|
const Seller = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-224dcc9a"]]);
|
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
__name: "index",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(ssrRenderComponent(Seller, _attrs, null, _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("views/base/pages/user/userMain/index.vue");
|
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
};
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "index",
|
|
__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/index.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|