build: include production build artifacts in repo
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { u as useRuntimeConfig } from './nitro.mjs';
|
||||
|
||||
const serverApi = (path) => $fetch(path, { baseURL: useRuntimeConfig().apiInternalUrl, retry: 1 });
|
||||
const fetchCategories = () => serverApi("/public/categories");
|
||||
const fetchSite = () => serverApi("/public/site");
|
||||
const absUrl = (p) => new URL(p, useRuntimeConfig().public.siteUrl).toString();
|
||||
|
||||
export { absUrl as a, fetchCategories as b, fetchSite as f, serverApi as s };
|
||||
//# sourceMappingURL=api.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"api.mjs","sources":["../../../../server/utils/api.ts"],"names":[],"mappings":";;AAGO,MAAM,SAAA,GAAY,CAAI,IAAA,KAC3B,MAAA,CAAU,IAAA,EAAM,EAAE,OAAA,EAAS,gBAAA,EAAiB,CAAE,cAAA,EAAgB,KAAA,EAAO,CAAA,EAAG;AAEnE,MAAM,eAAA,GAAkB,MAAM,SAAA,CAAmC,oBAAoB;AACrF,MAAM,SAAA,GAAY,MAAM,SAAA,CAAsB,cAAc;AAG5D,MAAM,MAAA,GAAS,CAAC,CAAA,KAAc,IAAI,GAAA,CAAI,CAAA,EAAG,gBAAA,EAAiB,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,QAAA;;"}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { escapeHtml } from '@vue/shared';
|
||||
|
||||
//#region src/runtime/server/renderer/error-template.ts
|
||||
const _messages = {
|
||||
"appName": "Nuxt",
|
||||
"status": 500,
|
||||
"statusText": "Internal server error",
|
||||
"description": "This page is temporarily unavailable.",
|
||||
"refresh": "Refresh this page"
|
||||
};
|
||||
const template = (messages) => {
|
||||
messages = {
|
||||
..._messages,
|
||||
...messages
|
||||
};
|
||||
return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.status) + " - " + escapeHtml(messages.statusText) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1,minimum-scale=1\" name=\"viewport\"><style>*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb);--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:after,:before{--un-content:\"\"}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}.grid{display:grid}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2{padding-left:.5rem;padding-right:.5rem}.text-center{text-align:center}.text-\\[56px\\]{font-size:56px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-neutral-500{--un-text-opacity:1;color:rgb(115 115 115/var(--un-text-opacity))}.text-neutral-950{--un-text-opacity:1;color:rgb(10 10 10/var(--un-text-opacity))}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-neutral-950{--un-bg-opacity:1;background-color:rgb(10 10 10/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(width>=640px){.sm\\:text-\\[72px\\]{font-size:72px}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}</style></head><body class=\"antialiased bg-white dark:bg-neutral-950 dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-neutral-950 tracking-wide\"><div class=\"max-w-520px text-center\"><h1 class=\"font-medium leading-none mb-4 sm:text-[72px] tabular-nums text-[56px]\">" + escapeHtml(messages.status) + "</h1><h2 class=\"font-semibold mb-2 sm:text-3xl text-2xl\">" + escapeHtml(messages.statusText) + "</h2><p class=\"mb-4 px-2 text-md text-neutral-500\">" + escapeHtml(messages.description) + "</p></div></body></html>";
|
||||
};
|
||||
|
||||
export { template };
|
||||
//# sourceMappingURL=error-template.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error-template.mjs","sources":["../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/error-template.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
const siteConfig = {
|
||||
locale: "fa_IR",
|
||||
lang: "fa",
|
||||
dir: "rtl",
|
||||
logo: "/images/logo.png",
|
||||
favicon: "/favicon.svg",
|
||||
themeColor: "#0b1224",
|
||||
areaServed: "IR"
|
||||
};
|
||||
|
||||
export { siteConfig as s };
|
||||
//# sourceMappingURL=site.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"site.mjs","sources":["../../../../shared/config/site.ts"],"names":[],"mappings":"AAIO,MAAM,UAAA,GAAa;AAAA,EAGxB,MAAA,EAAQ,OAAA;AAAA,EACR,IAAA,EAAM,IAAA;AAAA,EACN,GAAA,EAAK,KAAA;AAAA,EACL,IAAA,EAAM,kBAAA;AAAA,EACN,OAAA,EAAS,cAAA;AAAA,EACT,UAAA,EAAY,SAAA;AAAA,EACZ,UAAA,EAAY;AACd;;"}
|
||||
@@ -0,0 +1,152 @@
|
||||
import { a as fade } from './motion-BvlOLZ1k.mjs';
|
||||
import { defineComponent, computed, unref, mergeProps, withCtx, renderSlot, createVNode, toDisplayString, resolveDynamicComponent, openBlock, createBlock, createCommentVNode, Fragment, useSSRContext } from 'vue';
|
||||
import { ssrRenderComponent, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrInterpolate, ssrRenderVNode, ssrRenderList } from 'vue/server-renderer';
|
||||
import { motion } from 'motion-v';
|
||||
|
||||
//#region app/components/ui/Lines.vue?vue&type=script&setup=true&lang.ts
|
||||
var Lines_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Lines",
|
||||
__ssrInlineRender: true,
|
||||
props: { text: {} },
|
||||
setup(__props) {
|
||||
/** Renders editor text where "\n" means a line break */
|
||||
const props = __props;
|
||||
const lines = computed(() => props.text.split("\n"));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<!--[-->`);
|
||||
ssrRenderList(unref(lines), (line, i) => {
|
||||
_push(`<!--[-->`);
|
||||
if (i > 0) _push(`<br>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`${ssrInterpolate(line)}<!--]-->`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/Lines.vue
|
||||
var _sfc_setup$2 = Lines_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Lines_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Lines.vue");
|
||||
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
||||
};
|
||||
var Lines_default = Object.assign(Lines_vue_vue_type_script_setup_true_lang_default, { __name: "UiLines" });
|
||||
//#endregion
|
||||
//#region app/components/ui/Reveal.vue?vue&type=script&setup=true&lang.ts
|
||||
var Reveal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Reveal",
|
||||
__ssrInlineRender: true,
|
||||
props: { delay: { default: 0 } },
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const motionProps = computed(() => fade(props.delay, 34));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(motion).div, mergeProps(unref(motionProps), _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent, _scopeId);
|
||||
else return [renderSlot(_ctx.$slots, "default")];
|
||||
}),
|
||||
_: 3
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/Reveal.vue
|
||||
var _sfc_setup$1 = Reveal_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Reveal_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Reveal.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
var Reveal_default = Object.assign(Reveal_vue_vue_type_script_setup_true_lang_default, { __name: "UiReveal" });
|
||||
//#endregion
|
||||
//#region app/components/ui/SectionHead.vue?vue&type=script&setup=true&lang.ts
|
||||
var SectionHead_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "SectionHead",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
tag: {},
|
||||
title: {},
|
||||
highlight: {},
|
||||
desc: {},
|
||||
center: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
headingId: {},
|
||||
level: { default: 2 }
|
||||
},
|
||||
setup(__props) {
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: __props.center ? "text-center" : "" }, _attrs))}>`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="${ssrRenderClass(`flex items-center gap-3 ${__props.center ? "justify-center" : ""}`)}"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span><span class="font-mono text-xs tracking-[0.25em] text-muted"${_scopeId}>${ssrInterpolate(__props.tag)}</span><span class="h-px w-14 bg-line"${_scopeId}></span></div>`);
|
||||
else return [createVNode("div", { class: `flex items-center gap-3 ${__props.center ? "justify-center" : ""}` }, [
|
||||
createVNode("span", { class: "font-mono text-sm text-accent" }, "//"),
|
||||
createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-muted" }, toDisplayString(__props.tag), 1),
|
||||
createVNode("span", { class: "h-px w-14 bg-line" })
|
||||
], 2)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .08 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderVNode(_push, createVNode(resolveDynamicComponent(`h${__props.level}`), {
|
||||
id: __props.headingId,
|
||||
class: "mt-3.5 sm:mt-5 text-2xl sm:text-3xl md:text-5xl font-black leading-tight sm:leading-[1.25] md:leading-[1.2]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) ssrRenderSlot(_ctx.$slots, "title", {}, () => {
|
||||
if (__props.title) _push(ssrRenderComponent(Lines_default, { text: __props.title }, null, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
if (__props.highlight) _push(`<!--[--><br${_scopeId}><span class="text-accent"${_scopeId}>${ssrInterpolate(__props.highlight)}</span><!--]-->`);
|
||||
else _push(`<!---->`);
|
||||
}, _push, _parent, _scopeId);
|
||||
else return [renderSlot(_ctx.$slots, "title", {}, () => [__props.title ? (openBlock(), createBlock(Lines_default, {
|
||||
key: 0,
|
||||
text: __props.title
|
||||
}, null, 8, ["text"])) : createCommentVNode("", true), __props.highlight ? (openBlock(), createBlock(Fragment, { key: 1 }, [createVNode("br"), createVNode("span", { class: "text-accent" }, toDisplayString(__props.highlight), 1)], 64)) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 3
|
||||
}), _parent, _scopeId);
|
||||
else return [(openBlock(), createBlock(resolveDynamicComponent(`h${__props.level}`), {
|
||||
id: __props.headingId,
|
||||
class: "mt-3.5 sm:mt-5 text-2xl sm:text-3xl md:text-5xl font-black leading-tight sm:leading-[1.25] md:leading-[1.2]"
|
||||
}, {
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [__props.title ? (openBlock(), createBlock(Lines_default, {
|
||||
key: 0,
|
||||
text: __props.title
|
||||
}, null, 8, ["text"])) : createCommentVNode("", true), __props.highlight ? (openBlock(), createBlock(Fragment, { key: 1 }, [createVNode("br"), createVNode("span", { class: "text-accent" }, toDisplayString(__props.highlight), 1)], 64)) : createCommentVNode("", true)])]),
|
||||
_: 3
|
||||
}, 8, ["id"]))];
|
||||
}),
|
||||
_: 3
|
||||
}, _parent));
|
||||
if (__props.desc) _push(ssrRenderComponent(Reveal_default, { delay: .16 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<p class="${ssrRenderClass(`mt-3 sm:mt-5 max-w-xl text-xs sm:text-base leading-6 sm:leading-8 text-muted ${__props.center ? "mx-auto" : ""}`)}"${_scopeId}>${ssrInterpolate(__props.desc)}</p>`);
|
||||
else return [createVNode("p", { class: `mt-3 sm:mt-5 max-w-xl text-xs sm:text-base leading-6 sm:leading-8 text-muted ${__props.center ? "mx-auto" : ""}` }, toDisplayString(__props.desc), 3)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/SectionHead.vue
|
||||
var _sfc_setup = SectionHead_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
SectionHead_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/SectionHead.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var SectionHead_default = Object.assign(SectionHead_vue_vue_type_script_setup_true_lang_default, { __name: "UiSectionHead" });
|
||||
|
||||
export { Lines_default as L, Reveal_default as R, SectionHead_default as S };
|
||||
//# sourceMappingURL=SectionHead-n0GUJPlh.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SectionHead-n0GUJPlh.mjs","sources":["../../../../app/components/ui/Lines.vue","../../../../app/components/ui/Reveal.vue","../../../../app/components/ui/SectionHead.vue"],"names":["_unref","_ssrInterpolate","_ssrRenderComponent","_mergeProps","_withCtx","_renderSlot","_ssrRenderClass","_createVNode","_toDisplayString","Reveal","_resolveDynamicComponent","Lines","_openBlock","_createBlock","_Fragment"],"mappings":";;;;;;;;;;;;AAEA,EAAA,MAAM,KAAA,GAAQ,OAAA;AACd,EAAA,MAAM,QAAQ,QAAA,CAAA,MAAe,KAAA,CAAM,IAAA,CAAK,KAAA,CAAM,IAAI,CAAC,CAAA;;;AAInB,GAAA,aAAA,CAAAA,KAAAA,CAAA,KAAA,CAAA,EAAA,CAAZ,IAAA,EAAM,CAAA,KAAC;;AAA+B,IAAA,IAAA,IAAC,CAAA;;AAAW,IAAA,KAAA,CAAA,CAAA,EAAAC,cAAAA,CAAA,IAAI,CAAA,CAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;ACJ1E,EAAA,MAAM,KAAA,GAAQ,OAAA;AACd,EAAA,MAAM,cAAc,QAAA,CAAA,MAAe,IAAA,CAAK,KAAA,CAAM,KAAA,EAAO,EAAE,CAAC,CAAA;;GAIlC,KAAA,CAAAC,kBAAAA,CAAAF,KAAAA,CAAA,MAAA,CAAA,CAAA,GAAA,EAAAG,UAAAA,CAAAH,KAAAA,CAAA,WAAA,CAAA,EAAW,MAAA,CAAA,EAAA;AAA/B,IAAA,OAAA,EAAAI,OAAAA,CAAAA,CAEa,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;;kBADXC,UAAAA,CAAQ,IAAA,CAAA,MAAA,EAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CCaJ,KAAA,EAAO,OAAA,CAAA,MAAA,GAAM,aAAA,GAAA,EAAA;;AACjB,IAAA,OAAA,EAAAD,OAAAA,CAAAA,CAQS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;qCAPiCE,cAAAA,CAAA,CAAA,wBAAA,EAAA,OAAA,CAAA,MAAA,GAAM,gBAAA,GAAA,EAAA,CAAA,CAAA,CAAA,wJAGvCL,cAAAA,CAAA,OAAA,CAAA,GAAG,CAAA;kBAHVM,WAAAA,CAMM,OAAA,EANA,KAAA,EAAK,2BAA6B,OAAA,CAAA,MAAA,GAAM,mBAAA,EAAA,CAAA,CAAA;AAC5CA,MAAAA,WAAAA,CAAqD,MAAA,EAAA,EAA/C,KAAA,EAAM,+BAAA,IAAgC,IAAE,CAAA;MAC9CA,WAAAA,CAEO,MAAA,EAAA,EAFD,KAAA,EAAM,gDAAA,IAAgDC,eAAAA,CACvD,OAAA,CAAA,GAAG,CAAA,EAAA,CAAA,CAAA;AAERD,MAAAA,WAAAA,CAAkC,MAAA,EAAA,EAA5B,KAAA,EAAM,mBAAA,EAAmB;;;;;AAG1B,GAAA,KAAA,CAAAL,kBAAAA,CAAAO,cAAAA,EAAA,EAAA,KAAA,EAAO,KAAI,EAAA;AAApB,IAAA,OAAA,EAAAL,OAAAA,CAAAA,CAcS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;gBAZI,eAAA,KAAA,EAAAG,WAAAA,CAAAG,wBAAA,CAAA,CAAA,EAAA,OAAA,CAAA,OAAK,CAAA,EAAA;AACb,MAAA,EAAA,EAAI,OAAA,CAAA,SAAA;MACL,KAAA,EAAM;;AAHR,MAAA,OAAA,EAAAN,OAAAA,CAAAA,CAYY,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;;AANK,QAAA,IAAA,OAAA,CAAA,KAAA,EAAQ,KAAA,CAAAF,kBAAAA,CAAAS,aAAAA,EAAA,EAAA,IAAA,EAAM,OAAA,CAAA,KAAA,EAAK,EAAA,IAAA,EAAA,OAAA,EAAA,QAAA,CAAA,CAAA;;AAChB,QAAA,IAAA,QAAA,SAAA,uEAEeV,cAAAA,CAAA,OAAA,CAAA,SAAS,CAAA;;;oBAJ1CI,UAAAA,CAMO,IAAA,CAAA,MAAA,EAAA,OAAA,EAAA,EAAA,EAAA,MAAA,CALQ,OAAA,CAAA,KAAA,IAAbO,SAAAA,EAAA,EAAAC,WAAAA,CAAoCF,aAAAA,EAAA;;AAAf,QAAA,IAAA,EAAM,OAAA,CAAA;8DACX,OAAA,CAAA,SAAA,IAAhBC,SAAAA,EAAA,EAAAC,WAAAA,CAGWC,UAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA,CAFTP,WAAAA,CAAM,IAAA,CAAA,EACNA,WAAAA,CAAgD,MAAA,EAAA,EAA1C,KAAA,EAAM,aAAA,EAAa,EAAAC,eAAAA,CAAI,OAAA,CAAA,SAAS,CAAA,EAAA,CAAA;;;;mBAT5CI,WAAA,EAAAC,WAAAA,CAYYH,wBAAA,CAAA,CAAA,EAXD,OAAA,CAAA,OAAK,CAAA,EAAA;AACb,MAAA,EAAA,EAAI,OAAA,CAAA,SAAA;MACL,KAAA,EAAM;;AAEN,MAAA,OAAA,EAAAN,OAAAA,CAAAA,MAMO,CANPC,UAAAA,CAMO,IAAA,CAAA,QAAA,OAAA,EAAA,EAAA,EAAA,MAAA,CALQ,OAAA,CAAA,KAAA,IAAbO,SAAAA,EAAA,EAAAC,YAAoCF,aAAAA,EAAA;;AAAf,OAAA,IAAA,EAAM,OAAA,CAAA;6DACX,OAAA,CAAA,SAAA,IAAhBC,SAAAA,EAAA,EAAAC,WAAAA,CAGWC,UAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA,CAFTP,WAAAA,CAAM,IAAA,CAAA,EACNA,WAAAA,CAAgD,MAAA,EAAA,EAA1C,KAAA,EAAM,aAAA,EAAa,EAAAC,eAAAA,CAAI,OAAA,CAAA,SAAS,CAAA,EAAA,CAAA;;;;;;GAKhC,IAAA,OAAA,CAAA,MAAO,KAAA,CAAAN,kBAAAA,CAAAO,gBAAA,EAAA,KAAA,EAAO,KAAI,EAAA;AAAhC,IAAA,OAAA,EAAAL,OAAAA,CAAAA,CAIS,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,KAAA;mCAHoFE,cAAAA,CAAA,CAAA,6EAAA,EAAA,OAAA,CAAA,MAAA,GAAM,SAAA,GAAA,EAAA,CAAA,CAAA,CAAA,gBAC5FL,cAAAA,CAAA,OAAA,CAAA,IAAI,CAAA;kBADTM,WAAAA,CAEI,GAAA,EAAA,EAFA,KAAA,EAAK,gFAAkF,OAAA,CAAA,MAAA,GAAM,SAAA,GAAA,EAAA,CAAA,CAAA,IAC5FC,eAAAA,CAAA,OAAA,CAAA,IAAI,CAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
//#region app/components/ui/VuesaxIcon.vue?vue&type=style&index=0&scoped=ca18e3bd&inline&used&lang.css
|
||||
var VuesaxIcon_vue_vue_type_style_index_0_scoped_ca18e3bd_inline_used_lang_default = ".vx-icon[data-v-ca18e3bd]{color:inherit;vertical-align:-.15em;flex-shrink:0;justify-content:center;align-items:center;line-height:0;display:inline-flex}.vx-icon[data-v-ca18e3bd] svg{width:100%;height:100%;display:block}";
|
||||
|
||||
const VuesaxIconStyles_D5MiLdu2 = [
|
||||
VuesaxIcon_vue_vue_type_style_index_0_scoped_ca18e3bd_inline_used_lang_default
|
||||
];
|
||||
|
||||
export { VuesaxIconStyles_D5MiLdu2 as default };
|
||||
//# sourceMappingURL=VuesaxIcon-styles.D5MiLdu2.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VuesaxIcon-styles.D5MiLdu2.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/VuesaxIcon-styles.D5MiLdu2.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0]}
|
||||
@@ -0,0 +1,321 @@
|
||||
import { u as useRoute$1, a as useNuxtApp, c as useSiteStore, d as useAsyncData, e as createError, f as useAbsUrl, g as useHead, h as useSeoMeta, i as useJsonLd, j as categoryPageSchema, k as useSeoContext, N as NuxtLink, V as VuesaxIcon_default } from '../virtual/entry.mjs';
|
||||
import { f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { R as Reveal_default, S as SectionHead_default } from './SectionHead-n0GUJPlh.mjs';
|
||||
import { defineComponent, withAsyncContext, ref, computed, unref, withCtx, createTextVNode, createVNode, toDisplayString, openBlock, createBlock, createCommentVNode, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderComponent, ssrInterpolate, ssrRenderClass, ssrRenderList } from 'vue/server-renderer';
|
||||
import 'vue-router';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
import 'motion-v';
|
||||
|
||||
//#region app/pages/categories/[slug].vue?vue&type=script&setup=true&lang.ts
|
||||
var _slug__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "[slug]",
|
||||
__ssrInlineRender: true,
|
||||
async setup(__props) {
|
||||
let __temp, __restore;
|
||||
const slug = useRoute$1().params.slug;
|
||||
const { $api } = useNuxtApp();
|
||||
const site = useSiteStore();
|
||||
const { data, error } = ([__temp, __restore] = withAsyncContext(() => useAsyncData(`category:${slug}`, () => $api(`/public/categories/${encodeURIComponent(slug)}`))), __temp = await __temp, __restore(), __temp);
|
||||
if (error.value || !data.value) {
|
||||
const notFound = error.value?.statusCode === 404;
|
||||
throw createError({
|
||||
statusCode: notFound ? 404 : 500,
|
||||
statusMessage: notFound ? "دستهبندی یافت نشد" : "خطا در دریافت اطلاعات",
|
||||
fatal: true
|
||||
});
|
||||
}
|
||||
const category = data.value;
|
||||
const categoryIndex = site.categories.findIndex((c) => c.slug === slug);
|
||||
const canonical = useAbsUrl()(`/categories/${slug}`);
|
||||
const description = category.seoDescription || category.fullDesc;
|
||||
useHead({
|
||||
title: category.seoTitle || category.name,
|
||||
link: [{
|
||||
rel: "canonical",
|
||||
href: canonical
|
||||
}]
|
||||
});
|
||||
useSeoMeta({
|
||||
description,
|
||||
robots: "index, follow",
|
||||
ogUrl: canonical,
|
||||
ogTitle: `${category.seoTitle || category.name} | ${site.settings.name}`,
|
||||
ogDescription: description
|
||||
});
|
||||
useJsonLd(categoryPageSchema(useSeoContext(), category), `category-${slug}`);
|
||||
const activeGroup = ref(null);
|
||||
const visibleProducts = computed(() => activeGroup.value ? category.products.filter((p) => p.group === activeGroup.value) : category.products);
|
||||
const activeGroupDesc = computed(() => category.groups?.find((g) => g.slug === activeGroup.value)?.desc);
|
||||
const groupCount = (g) => category.products.filter((p) => p.group === g).length;
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
_push(`<main${ssrRenderAttrs(_attrs)}><section class="relative overflow-hidden pt-32 pb-20 md:pt-40 md:pb-28"><div class="absolute inset-0">`);
|
||||
if (unref(category).coverImage) _push(`<img${ssrRenderAttr("src", unref(category).coverImage)}${ssrRenderAttr("alt", unref(category).name)} class="absolute inset-0 size-full object-cover" fetchpriority="high" decoding="async">`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-0 bg-gradient-to-l from-bg via-bg/85 to-bg/40"></div><div class="absolute inset-0 bg-gradient-to-t from-bg via-bg/50 to-bg/30"></div><div class="absolute inset-0 bg-grid opacity-40"></div></div><div class="tape-v absolute bottom-0 end-0 z-10 h-32 w-1.5 opacity-70"></div><div class="relative z-10 mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<nav class="flex items-center gap-2 text-sm text-muted" aria-label="مسیر"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`خانه`);
|
||||
else return [createTextVNode("خانه")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(` محصولات `);
|
||||
else return [createTextVNode(" محصولات ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span><span class="text-ink"${_scopeId}>${ssrInterpolate(unref(category).name)}</span></nav>`);
|
||||
} else return [createVNode("nav", {
|
||||
class: "flex items-center gap-2 text-sm text-muted",
|
||||
"aria-label": "مسیر"
|
||||
}, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("خانه")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" محصولات ")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode("span", { class: "text-ink" }, toDisplayString(unref(category).name), 1)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="mt-8">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: `${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(categoryIndex) + 1).padStart(2, "0"))} — محصولات`,
|
||||
desc: unref(category).fullDesc,
|
||||
level: 1
|
||||
}, {
|
||||
title: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(category).name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(category).name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="mt-8 flex flex-wrap items-center gap-4"${_scopeId}><span class="rounded-full border border-accent/40 bg-accent/10 px-4 py-1.5 font-mono text-xs text-accent backdrop-blur"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length))} محصول </span><span class="font-mono text-xs tracking-[0.25em] text-muted/60"${_scopeId}>${ssrInterpolate(unref(category).nameEn)}</span></div>`);
|
||||
else return [createVNode("div", { class: "mt-8 flex flex-wrap items-center gap-4" }, [createVNode("span", { class: "rounded-full border border-accent/40 bg-accent/10 px-4 py-1.5 font-mono text-xs text-accent backdrop-blur" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length)) + " محصول ", 1), createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-muted/60" }, toDisplayString(unref(category).nameEn), 1)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></section><section class="relative py-16 md:py-24"><div class="absolute inset-0 bg-grid-fine opacity-30"></div><div class="relative mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
if (unref(category).groups?.length) {
|
||||
_push(`<div class="mb-10"><div class="flex flex-wrap gap-2" role="tablist" aria-label="فیلتر زیردسته"><button type="button" role="tab"${ssrRenderAttr("aria-selected", unref(activeGroup) === null)} class="${ssrRenderClass([unref(activeGroup) === null ? "border-accent bg-accent text-bg font-bold" : "border-line text-muted hover:border-accent/60 hover:text-accent", "rounded-full border px-4 py-2 text-sm transition-colors"])}"> همه <span class="ms-1 font-mono text-xs opacity-70">${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(unref(category).products.length))}</span></button><!--[-->`);
|
||||
ssrRenderList(unref(category).groups, (g) => {
|
||||
_push(`<button type="button" role="tab"${ssrRenderAttr("aria-selected", unref(activeGroup) === g.slug)} class="${ssrRenderClass([unref(activeGroup) === g.slug ? "border-accent bg-accent text-bg font-bold" : "border-line text-muted hover:border-accent/60 hover:text-accent", "rounded-full border px-4 py-2 text-sm transition-colors"])}">${ssrInterpolate(g.name)} <span class="ms-1 font-mono text-xs opacity-70">${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(groupCount(g.slug)))}</span></button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
if (unref(activeGroupDesc)) _push(`<p class="mt-4 text-sm text-muted">${ssrInterpolate(unref(activeGroupDesc))}</p>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3"><!--[-->`);
|
||||
ssrRenderList(unref(visibleProducts), (product, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: product.code,
|
||||
delay: i * .06
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: `/products/${product.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 backdrop-blur transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="${ssrRenderClass([product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]", "relative aspect-[4/3] overflow-hidden"])}"${_scopeId}><img${ssrRenderAttr("src", product.image ?? unref(category).coverImage ?? void 0)}${ssrRenderAttr("alt", product.name)} loading="lazy" decoding="async" class="${ssrRenderClass([product.image ? "object-contain p-8" : "object-cover", "size-full transition-transform duration-700 group-hover:scale-105"])}"${_scopeId}>`);
|
||||
if (!product.image) _push(`<div class="absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"${_scopeId}></div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-x-0 top-0 flex items-center justify-between p-4"${_scopeId}><span class="rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(product.code)}</span><span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0")))}</span></div></div><div class="flex flex-1 flex-col p-5 md:p-6"${_scopeId}><h3 class="text-xl font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(product.name)}</h3><p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted"${_scopeId}>${ssrInterpolate(product.nameEn)}</p><p class="mt-3 text-sm leading-8 text-muted"${_scopeId}>${ssrInterpolate(product.desc)}</p><div class="mt-4 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(product.specs, (s) => {
|
||||
_push(`<span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
if (product.variants?.length) {
|
||||
_push(`<div class="mt-4"${_scopeId}><div class="mb-2 text-xs text-muted"${_scopeId}>مدلها / رنگها:</div><div class="flex flex-wrap gap-1.5"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(product.variants, (v) => {
|
||||
_push(`<span class="rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"${_scopeId}>${ssrInterpolate(v)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<span class="mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent"${_scopeId}> مشاهده جزئیات `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span></div>`);
|
||||
} else return [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [
|
||||
createVNode("img", {
|
||||
src: product.image ?? unref(category).coverImage ?? void 0,
|
||||
alt: product.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", product.image ? "object-contain p-8" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]),
|
||||
!product.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(product.code), 1), createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1)])
|
||||
], 2), createVNode("div", { class: "flex flex-1 flex-col p-5 md:p-6" }, [
|
||||
createVNode("h3", { class: "text-xl font-black transition-colors group-hover:text-accent" }, toDisplayString(product.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(product.nameEn), 1),
|
||||
createVNode("p", { class: "mt-3 text-sm leading-8 text-muted" }, toDisplayString(product.desc), 1),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))]),
|
||||
product.variants?.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4"
|
||||
}, [createVNode("div", { class: "mb-2 text-xs text-muted" }, "مدلها / رنگها:"), createVNode("div", { class: "flex flex-wrap gap-1.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent" }, [createTextVNode(" مشاهده جزئیات "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: `/products/${product.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 backdrop-blur transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", product.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [
|
||||
createVNode("img", {
|
||||
src: product.image ?? unref(category).coverImage ?? void 0,
|
||||
alt: product.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", product.image ? "object-contain p-8" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]),
|
||||
!product.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/60 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(product.code), 1), createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1)])
|
||||
], 2), createVNode("div", { class: "flex flex-1 flex-col p-5 md:p-6" }, [
|
||||
createVNode("h3", { class: "text-xl font-black transition-colors group-hover:text-accent" }, toDisplayString(product.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(product.nameEn), 1),
|
||||
createVNode("p", { class: "mt-3 text-sm leading-8 text-muted" }, toDisplayString(product.desc), 1),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-[10px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))]),
|
||||
product.variants?.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4"
|
||||
}, [createVNode("div", { class: "mb-2 text-xs text-muted" }, "مدلها / رنگها:"), createVNode("div", { class: "flex flex-wrap gap-1.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(product.variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-md border border-line bg-panel-2 px-2.5 py-1 text-[11px] text-ink/70"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-5 text-sm font-bold text-accent" }, [createTextVNode(" مشاهده جزئیات "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])]),
|
||||
_: 2
|
||||
}, 1032, ["to"])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></div></div></section><section class="border-t border-line py-12 md:py-16"><div class="mx-auto flex max-w-[1480px] flex-wrap items-center justify-between gap-6 px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "group inline-flex items-center gap-2 text-muted transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` بازگشت به دستهبندیها `);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}), createTextVNode(" بازگشت به دستهبندیها ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<a href="/#contact" class="inline-flex items-center gap-2 rounded-full bg-accent px-6 py-3 text-sm font-bold text-bg transition-all hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]">`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent));
|
||||
_push(` درخواست قیمت </a></div></section></main>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/pages/categories/[slug].vue
|
||||
var _sfc_setup = _slug__vue_vue_type_script_setup_true_lang_default.setup;
|
||||
_slug__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/categories/[slug].vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var _slug__default = _slug__vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { _slug__default as default };
|
||||
//# sourceMappingURL=_slug_-B1b2FwF6.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,914 @@
|
||||
import { u as useRoute$1, a as useNuxtApp, c as useSiteStore, d as useAsyncData, e as createError, f as useAbsUrl, g as useHead, h as useSeoMeta, k as useSeoContext, i as useJsonLd, p as productSchema, l as breadcrumbSchema, N as NuxtLink, V as VuesaxIcon_default, C as ClientOnly } from '../virtual/entry.mjs';
|
||||
import { f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { R as Reveal_default, S as SectionHead_default } from './SectionHead-n0GUJPlh.mjs';
|
||||
import { u as useContactStore, D as DynamicIcon_default } from './contact-DBTK0GHP.mjs';
|
||||
import { defineComponent, withAsyncContext, ref, computed, watch, withCtx, createTextVNode, unref, toDisplayString, createVNode, Transition, openBlock, createBlock, createCommentVNode, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderClass, ssrRenderAttr, ssrRenderList, ssrRenderStyle } from 'vue/server-renderer';
|
||||
import 'vue-router';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
import 'motion-v';
|
||||
|
||||
//#region app/pages/products/[slug].vue?vue&type=script&setup=true&lang.ts
|
||||
var _slug__vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "[slug]",
|
||||
__ssrInlineRender: true,
|
||||
async setup(__props) {
|
||||
let __temp, __restore;
|
||||
const slug = useRoute$1().params.slug;
|
||||
const { $api } = useNuxtApp();
|
||||
const site = useSiteStore();
|
||||
const contact = useContactStore();
|
||||
const { data, error } = ([__temp, __restore] = withAsyncContext(() => useAsyncData(`product:${slug}`, () => $api(`/public/products/${encodeURIComponent(slug)}`))), __temp = await __temp, __restore(), __temp);
|
||||
if (error.value || !data.value) {
|
||||
const notFound = error.value?.statusCode === 404;
|
||||
throw createError({
|
||||
statusCode: notFound ? 404 : 500,
|
||||
statusMessage: notFound ? "محصول یافت نشد" : "خطا در دریافت اطلاعات",
|
||||
fatal: true
|
||||
});
|
||||
}
|
||||
const product = data.value;
|
||||
const categoryPath = `/categories/${product.category.slug}`;
|
||||
const ownImages = product.images.length > 0;
|
||||
const images = ownImages ? product.images : product.category.coverImage ? [{
|
||||
url: product.category.coverImage,
|
||||
alt: product.name,
|
||||
width: null,
|
||||
height: null
|
||||
}] : [];
|
||||
const active = ref(0);
|
||||
const current = computed(() => images[active.value]);
|
||||
const go = (step) => {
|
||||
active.value = (active.value + step + images.length) % images.length;
|
||||
};
|
||||
const lightbox = ref(false);
|
||||
watch(lightbox, (open) => {
|
||||
(void 0).body.style.overflow = open ? "hidden" : "";
|
||||
});
|
||||
/** a blank line in the admin text starts a new paragraph */
|
||||
const paragraphs = product.details.split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
|
||||
const facts = [
|
||||
{
|
||||
label: "برند",
|
||||
value: product.brand
|
||||
},
|
||||
{
|
||||
label: "کشور سازنده",
|
||||
value: product.origin
|
||||
},
|
||||
{
|
||||
label: "بستهبندی",
|
||||
value: product.packaging
|
||||
},
|
||||
{
|
||||
label: "حداقل سفارش",
|
||||
value: product.minOrder
|
||||
}
|
||||
].filter((f) => f.value);
|
||||
const specRows = [
|
||||
{
|
||||
name: "کد محصول",
|
||||
value: product.code,
|
||||
ltr: true
|
||||
},
|
||||
{
|
||||
name: "دسته",
|
||||
value: product.category.name
|
||||
},
|
||||
...product.groupName ? [{
|
||||
name: "زیرگروه",
|
||||
value: product.groupName
|
||||
}] : [],
|
||||
...product.brand ? [{
|
||||
name: "برند",
|
||||
value: product.brand
|
||||
}] : [],
|
||||
...product.origin ? [{
|
||||
name: "کشور سازنده",
|
||||
value: product.origin
|
||||
}] : [],
|
||||
...product.attributes,
|
||||
...product.standards.length ? [{
|
||||
name: "استانداردها",
|
||||
value: product.standards.join("، "),
|
||||
ltr: true
|
||||
}] : [],
|
||||
...product.sizes.length ? [{
|
||||
name: "سایزها",
|
||||
value: product.sizes.join("، ")
|
||||
}] : [],
|
||||
...product.variants.length ? [{
|
||||
name: "مدلها / رنگها",
|
||||
value: product.variants.join("، ")
|
||||
}] : [],
|
||||
...product.packaging ? [{
|
||||
name: "بستهبندی",
|
||||
value: product.packaging
|
||||
}] : [],
|
||||
...product.minOrder ? [{
|
||||
name: "حداقل سفارش",
|
||||
value: product.minOrder
|
||||
}] : []
|
||||
];
|
||||
const trust = computed(() => site.sections.productsIntro.trust);
|
||||
const settings = computed(() => site.settings);
|
||||
/** fills the contact form on the home page with this product, then scrolls to it */
|
||||
const requestQuote = () => contact.prefill(`درخواست قیمت و موجودی:\n${product.name} — کد ${product.code}`);
|
||||
const absUrl = useAbsUrl();
|
||||
const canonical = absUrl(`/products/${slug}`);
|
||||
const title = product.seoTitle || product.name;
|
||||
const description = (product.seoDescription || product.desc || paragraphs[0] || product.category.fullDesc).slice(0, 300);
|
||||
useHead({
|
||||
title,
|
||||
link: [{
|
||||
rel: "canonical",
|
||||
href: canonical
|
||||
}, ...images[0] ? [{
|
||||
rel: "preload",
|
||||
as: "image",
|
||||
href: images[0].url
|
||||
}] : []]
|
||||
});
|
||||
useSeoMeta({
|
||||
description,
|
||||
robots: "index, follow",
|
||||
ogUrl: canonical,
|
||||
ogTitle: `${title} | ${site.settings.name}`,
|
||||
ogDescription: description,
|
||||
...images[0] && {
|
||||
ogImage: absUrl(images[0].url),
|
||||
ogImageAlt: images[0].alt,
|
||||
twitterImage: absUrl(images[0].url)
|
||||
}
|
||||
});
|
||||
const seo = useSeoContext();
|
||||
useJsonLd([productSchema(seo, product), breadcrumbSchema(seo, [
|
||||
{
|
||||
name: "خانه",
|
||||
path: "/"
|
||||
},
|
||||
{
|
||||
name: product.category.name,
|
||||
path: categoryPath
|
||||
},
|
||||
{
|
||||
name: product.name,
|
||||
path: `/products/${slug}`
|
||||
}
|
||||
])], `product-${slug}`);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
const _component_ClientOnly = ClientOnly;
|
||||
_push(`<main${ssrRenderAttrs(_attrs)}><section class="relative overflow-hidden pt-28 pb-16 md:pt-36 md:pb-24"><div class="absolute inset-0 bg-grid opacity-30"></div><div class="tape-v absolute bottom-0 end-0 z-10 h-32 w-1.5 opacity-70"></div><div class="relative mx-auto max-w-[1480px] px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<nav class="flex flex-wrap items-center gap-2 text-sm text-muted" aria-label="مسیر"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`خانه`);
|
||||
else return [createTextVNode("خانه")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`محصولات`);
|
||||
else return [createTextVNode("محصولات")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(product).category.name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>/</span><span class="text-ink"${_scopeId}>${ssrInterpolate(unref(product).name)}</span></nav>`);
|
||||
} else return [createVNode("nav", {
|
||||
class: "flex flex-wrap items-center gap-2 text-sm text-muted",
|
||||
"aria-label": "مسیر"
|
||||
}, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("خانه")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#products",
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode("محصولات")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(unref(product).category.name), 1)]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "/"),
|
||||
createVNode("span", { class: "text-ink" }, toDisplayString(unref(product).name), 1)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="mt-8 grid gap-10 lg:grid-cols-12 lg:gap-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
class: "lg:col-span-6",
|
||||
delay: .08
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="relative"${_scopeId}><div class="hazard absolute -top-3 -end-3 z-10 h-6 w-28 rounded-full opacity-90"${_scopeId}></div><div class="relative overflow-hidden rounded-2xl border border-line bg-panel/80"${_scopeId}><div class="${ssrRenderClass([ownImages && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.16),transparent_70%)]", "group relative aspect-square overflow-hidden"])}"${_scopeId}>`);
|
||||
if (unref(current)) _push(`<img${ssrRenderAttr("src", unref(current).url)}${ssrRenderAttr("alt", unref(current).alt)}${ssrRenderAttr("width", unref(current).width ?? void 0)}${ssrRenderAttr("height", unref(current).height ?? void 0)} fetchpriority="high" decoding="async" class="${ssrRenderClass([ownImages ? "object-contain p-10 md:p-16" : "object-cover", "size-full"])}"${_scopeId}>`);
|
||||
else _push(`<!---->`);
|
||||
if (!ownImages) _push(`<div class="absolute inset-0 bg-gradient-to-t from-bg/70 to-transparent"${_scopeId}></div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`<div class="absolute inset-x-0 top-0 flex items-center justify-between p-4 md:p-5"${_scopeId}><span class="rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(unref(product).code)}</span>`);
|
||||
if (unref(images).length > 1) _push(`<span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(active) + 1).padStart(2, "0")))} / ${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(images).length).padStart(2, "0")))}</span>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
if (unref(current)) {
|
||||
_push(`<button type="button" aria-label="نمایش بزرگ تصویر" class="absolute bottom-4 start-4 flex size-11 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 backdrop-blur transition-colors hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "maximize-4",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(images).length > 1) {
|
||||
_push(`<!--[--><button type="button" aria-label="تصویر قبلی" class="absolute start-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right-1",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button><button type="button" aria-label="تصویر بعدی" class="absolute end-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left-1",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button><!--]-->`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div></div>`);
|
||||
if (unref(images).length > 1) {
|
||||
_push(`<div class="mt-4 flex gap-3 overflow-x-auto pb-1"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(images), (img, i) => {
|
||||
_push(`<button type="button"${ssrRenderAttr("aria-label", `تصویر ${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(i + 1)}`)}${ssrRenderAttr("aria-current", i === unref(active))} class="${ssrRenderClass([i === unref(active) ? "border-accent shadow-[0_0_24px_rgba(255,90,0,0.25)]" : "border-line opacity-60 hover:opacity-100", "size-20 shrink-0 overflow-hidden rounded-xl border bg-panel/80 transition-all md:size-24"])}"${_scopeId}><img${ssrRenderAttr("src", img.url)}${ssrRenderAttr("alt", img.alt)} loading="lazy" class="size-full object-contain p-2"${_scopeId}></button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "relative" }, [
|
||||
createVNode("div", { class: "hazard absolute -top-3 -end-3 z-10 h-6 w-28 rounded-full opacity-90" }),
|
||||
createVNode("div", { class: "relative overflow-hidden rounded-2xl border border-line bg-panel/80" }, [createVNode("div", { class: ["group relative aspect-square overflow-hidden", ownImages && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.16),transparent_70%)]"] }, [
|
||||
createVNode(Transition, {
|
||||
"enter-active-class": "transition duration-500 ease-out",
|
||||
"enter-from-class": "opacity-0 scale-[0.97]",
|
||||
"leave-active-class": "absolute inset-0 transition duration-200",
|
||||
"leave-to-class": "opacity-0"
|
||||
}, {
|
||||
default: withCtx(() => [unref(current) ? (openBlock(), createBlock("img", {
|
||||
key: unref(current).url,
|
||||
src: unref(current).url,
|
||||
alt: unref(current).alt,
|
||||
width: unref(current).width ?? void 0,
|
||||
height: unref(current).height ?? void 0,
|
||||
fetchpriority: "high",
|
||||
decoding: "async",
|
||||
class: ["size-full", ownImages ? "object-contain p-10 md:p-16" : "object-cover"]
|
||||
}, null, 10, [
|
||||
"src",
|
||||
"alt",
|
||||
"width",
|
||||
"height"
|
||||
])) : createCommentVNode("", true)]),
|
||||
_: 1
|
||||
}),
|
||||
!ownImages ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "absolute inset-0 bg-gradient-to-t from-bg/70 to-transparent"
|
||||
})) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "absolute inset-x-0 top-0 flex items-center justify-between p-4 md:p-5" }, [createVNode("span", { class: "rounded-full bg-bg/60 px-3 py-1 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(unref(product).code), 1), unref(images).length > 1 ? (openBlock(), createBlock("span", {
|
||||
key: 0,
|
||||
class: "font-mono text-xs text-accent"
|
||||
}, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(active) + 1).padStart(2, "0"))) + " / " + toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(unref(images).length).padStart(2, "0"))), 1)) : createCommentVNode("", true)]),
|
||||
unref(current) ? (openBlock(), createBlock("button", {
|
||||
key: 1,
|
||||
type: "button",
|
||||
"aria-label": "نمایش بزرگ تصویر",
|
||||
class: "absolute bottom-4 start-4 flex size-11 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 backdrop-blur transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: ($event) => lightbox.value = true
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "maximize-4",
|
||||
class: "size-4"
|
||||
})], 8, ["onClick"])) : createCommentVNode("", true),
|
||||
unref(images).length > 1 ? (openBlock(), createBlock(Fragment, { key: 2 }, [createVNode("button", {
|
||||
type: "button",
|
||||
"aria-label": "تصویر قبلی",
|
||||
class: "absolute start-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100",
|
||||
onClick: ($event) => go(-1)
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right-1",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"]), createVNode("button", {
|
||||
type: "button",
|
||||
"aria-label": "تصویر بعدی",
|
||||
class: "absolute end-4 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-full border border-line bg-bg/70 text-ink/80 opacity-0 backdrop-blur transition-all hover:border-accent hover:text-accent group-hover:opacity-100 max-md:opacity-100",
|
||||
onClick: ($event) => go(1)
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left-1",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])], 64)) : createCommentVNode("", true)
|
||||
], 2)]),
|
||||
unref(images).length > 1 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "mt-4 flex gap-3 overflow-x-auto pb-1"
|
||||
}, [(openBlock(true), createBlock(Fragment, null, renderList(unref(images), (img, i) => {
|
||||
return openBlock(), createBlock("button", {
|
||||
key: img.url,
|
||||
type: "button",
|
||||
"aria-label": `تصویر ${("faNum" in _ctx ? _ctx.faNum : unref(faNum))(i + 1)}`,
|
||||
"aria-current": i === unref(active),
|
||||
class: ["size-20 shrink-0 overflow-hidden rounded-xl border bg-panel/80 transition-all md:size-24", i === unref(active) ? "border-accent shadow-[0_0_24px_rgba(255,90,0,0.25)]" : "border-line opacity-60 hover:opacity-100"],
|
||||
onClick: ($event) => active.value = i
|
||||
}, [createVNode("img", {
|
||||
src: img.url,
|
||||
alt: img.alt,
|
||||
loading: "lazy",
|
||||
class: "size-full object-contain p-2"
|
||||
}, null, 8, ["src", "alt"])], 10, [
|
||||
"aria-label",
|
||||
"aria-current",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))])) : createCommentVNode("", true)
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<div class="lg:col-span-6">`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .12 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex flex-wrap items-center gap-2"${_scopeId}><span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(unref(product).code)}</span>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted transition-colors hover:border-accent/60 hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(unref(product).category.name)}`);
|
||||
else return [createTextVNode(toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
if (unref(product).groupName) _push(`<span class="rounded-full border border-line px-3 py-1 text-xs text-muted"${_scopeId}>${ssrInterpolate(unref(product).groupName)}</span>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div><h1 class="mt-6 text-3xl font-black leading-[1.3] md:text-5xl md:leading-[1.25]"${_scopeId}>${ssrInterpolate(unref(product).name)}</h1>`);
|
||||
if (unref(product).nameEn) _push(`<p class="mt-3 font-mono text-xs tracking-[0.25em] text-muted"${_scopeId}>${ssrInterpolate(unref(product).nameEn)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).desc) _push(`<p class="mt-6 max-w-2xl leading-9 text-ink/75"${_scopeId}>${ssrInterpolate(unref(product).desc)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).specs.length) {
|
||||
_push(`<div class="mt-6 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).specs, (s) => {
|
||||
_push(`<span class="rounded-full border border-accent/40 bg-accent/10 px-3 py-1.5 font-mono text-[11px] text-accent"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else _push(`<!---->`);
|
||||
} else return [
|
||||
createVNode("div", { class: "flex flex-wrap items-center gap-2" }, [
|
||||
createVNode("span", { class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1 font-mono text-xs text-accent" }, toDisplayString(unref(product).code), 1),
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted transition-colors hover:border-accent/60 hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(toDisplayString(unref(product).category.name), 1)]),
|
||||
_: 1
|
||||
}),
|
||||
unref(product).groupName ? (openBlock(), createBlock("span", {
|
||||
key: 0,
|
||||
class: "rounded-full border border-line px-3 py-1 text-xs text-muted"
|
||||
}, toDisplayString(unref(product).groupName), 1)) : createCommentVNode("", true)
|
||||
]),
|
||||
createVNode("h1", { class: "mt-6 text-3xl font-black leading-[1.3] md:text-5xl md:leading-[1.25]" }, toDisplayString(unref(product).name), 1),
|
||||
unref(product).nameEn ? (openBlock(), createBlock("p", {
|
||||
key: 0,
|
||||
class: "mt-3 font-mono text-xs tracking-[0.25em] text-muted"
|
||||
}, toDisplayString(unref(product).nameEn), 1)) : createCommentVNode("", true),
|
||||
unref(product).desc ? (openBlock(), createBlock("p", {
|
||||
key: 1,
|
||||
class: "mt-6 max-w-2xl leading-9 text-ink/75"
|
||||
}, toDisplayString(unref(product).desc), 1)) : createCommentVNode("", true),
|
||||
unref(product).specs.length ? (openBlock(), createBlock("div", {
|
||||
key: 2,
|
||||
class: "mt-6 flex flex-wrap gap-2"
|
||||
}, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).specs, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-full border border-accent/40 bg-accent/10 px-3 py-1.5 font-mono text-[11px] text-accent"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])) : createCommentVNode("", true)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(facts).length || unref(product).standards.length) _push(ssrRenderComponent(Reveal_default, { delay: .18 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<dl class="mt-8 grid gap-px overflow-hidden rounded-xl border border-line bg-line sm:grid-cols-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(facts), (f) => {
|
||||
_push(`<div class="bg-panel/80 p-4"${_scopeId}><dt class="text-xs text-muted"${_scopeId}>${ssrInterpolate(f.label)}</dt><dd class="mt-1.5 font-bold"${_scopeId}>${ssrInterpolate(f.value)}</dd></div>`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (unref(product).standards.length) {
|
||||
_push(`<div class="bg-panel/80 p-4 sm:col-span-2"${_scopeId}><dt class="text-xs text-muted"${_scopeId}>استانداردها و گواهیها</dt><dd class="mt-2 flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).standards, (s) => {
|
||||
_push(`<span class="rounded-md border border-ink/15 px-2.5 py-1 font-mono text-xs tracking-wider text-ink/85" dir="ltr"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></dd></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</dl>`);
|
||||
} else return [createVNode("dl", { class: "mt-8 grid gap-px overflow-hidden rounded-xl border border-line bg-line sm:grid-cols-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(facts), (f) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: f.label,
|
||||
class: "bg-panel/80 p-4"
|
||||
}, [createVNode("dt", { class: "text-xs text-muted" }, toDisplayString(f.label), 1), createVNode("dd", { class: "mt-1.5 font-bold" }, toDisplayString(f.value), 1)]);
|
||||
}), 128)), unref(product).standards.length ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "bg-panel/80 p-4 sm:col-span-2"
|
||||
}, [createVNode("dt", { class: "text-xs text-muted" }, "استانداردها و گواهیها"), createVNode("dd", { class: "mt-2 flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).standards, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "rounded-md border border-ink/15 px-2.5 py-1 font-mono text-xs tracking-wider text-ink/85",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])])) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
if (unref(product).variants.length || unref(product).sizes.length) _push(ssrRenderComponent(Reveal_default, { delay: .22 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-8 space-y-5"${_scopeId}>`);
|
||||
if (unref(product).variants.length) {
|
||||
_push(`<div${_scopeId}><div class="mb-2.5 text-xs text-muted"${_scopeId}>مدلها / رنگها</div><div class="flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).variants, (v) => {
|
||||
_push(`<span class="rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-sm text-ink/80"${_scopeId}>${ssrInterpolate(v)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(product).sizes.length) {
|
||||
_push(`<div${_scopeId}><div class="mb-2.5 text-xs text-muted"${_scopeId}>سایزها</div><div class="flex flex-wrap gap-2"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).sizes, (s) => {
|
||||
_push(`<span class="min-w-11 rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-center font-mono text-sm text-ink/80"${_scopeId}>${ssrInterpolate(s)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "mt-8 space-y-5" }, [unref(product).variants.length ? (openBlock(), createBlock("div", { key: 0 }, [createVNode("div", { class: "mb-2.5 text-xs text-muted" }, "مدلها / رنگها"), createVNode("div", { class: "flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).variants, (v) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: v,
|
||||
class: "rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-sm text-ink/80"
|
||||
}, toDisplayString(v), 1);
|
||||
}), 128))])])) : createCommentVNode("", true), unref(product).sizes.length ? (openBlock(), createBlock("div", { key: 1 }, [createVNode("div", { class: "mb-2.5 text-xs text-muted" }, "سایزها"), createVNode("div", { class: "flex flex-wrap gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).sizes, (s) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: s,
|
||||
class: "min-w-11 rounded-lg border border-line bg-panel-2 px-3 py-1.5 text-center font-mono text-sm text-ink/80"
|
||||
}, toDisplayString(s), 1);
|
||||
}), 128))])])) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .26 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-9 flex flex-wrap items-center gap-4"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "group inline-flex items-center gap-2.5 rounded-full bg-accent px-7 py-4 font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(` درخواست قیمت و موجودی `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
}, null, _parent, _scopeId));
|
||||
} else return [createTextVNode(" درخواست قیمت و موجودی "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="inline-flex items-center gap-2.5 rounded-full border border-ink/25 px-6 py-4 font-bold text-ink transition-colors duration-300 hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<span class="font-mono tracking-wider" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</span></a></div>`);
|
||||
} else return [createVNode("div", { class: "mt-9 flex flex-wrap items-center gap-4" }, [createVNode(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "group inline-flex items-center gap-2.5 rounded-full bg-accent px-7 py-4 font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" درخواست قیمت و موجودی "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-5 transition-transform duration-300 group-hover:-translate-x-1.5"
|
||||
})]),
|
||||
_: 1
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "inline-flex items-center gap-2.5 rounded-full border border-ink/25 px-6 py-4 font-bold text-ink transition-colors duration-300 hover:border-accent hover:text-accent"
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createVNode("span", {
|
||||
class: "font-mono tracking-wider",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 1)], 8, ["href"])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(trust).length) _push(ssrRenderComponent(Reveal_default, { delay: .3 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<ul class="mt-9 grid gap-4 border-t border-line pt-7 sm:grid-cols-3"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(trust), (t) => {
|
||||
_push(`<li class="flex items-start gap-3"${_scopeId}><span class="flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(DynamicIcon_default, {
|
||||
name: t.icon,
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span><span class="text-xs leading-6 text-ink/75"${_scopeId}>${ssrInterpolate(t.title)}</span></li>`);
|
||||
});
|
||||
_push(`<!--]--></ul>`);
|
||||
} else return [createVNode("ul", { class: "mt-9 grid gap-4 border-t border-line pt-7 sm:grid-cols-3" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(trust), (t) => {
|
||||
return openBlock(), createBlock("li", {
|
||||
key: t.title,
|
||||
class: "flex items-start gap-3"
|
||||
}, [createVNode("span", { class: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent" }, [createVNode(DynamicIcon_default, {
|
||||
name: t.icon,
|
||||
class: "size-4"
|
||||
}, null, 8, ["name"])]), createVNode("span", { class: "text-xs leading-6 text-ink/75" }, toDisplayString(t.title), 1)]);
|
||||
}), 128))])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(`</div></div></div></section><section class="relative border-t border-line py-20 md:py-28"><div class="absolute inset-0 bg-grid-fine opacity-30"></div><div class="relative mx-auto grid max-w-[1480px] gap-14 px-5 md:px-8 lg:grid-cols-12"><div class="lg:col-span-7">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: "توضیحات",
|
||||
title: unref(paragraphs).length ? "درباره این محصول" : `درباره ${unref(product).category.name}`
|
||||
}, null, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-8 space-y-5 leading-9 text-ink/75"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(paragraphs), (p, i) => {
|
||||
_push(`<p class="whitespace-pre-line"${_scopeId}>${ssrInterpolate(p)}</p>`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (!unref(paragraphs).length) _push(`<p${_scopeId}>${ssrInterpolate(unref(product).category.fullDesc)}</p>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div>`);
|
||||
} else return [createVNode("div", { class: "mt-8 space-y-5 leading-9 text-ink/75" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(paragraphs), (p, i) => {
|
||||
return openBlock(), createBlock("p", {
|
||||
key: i,
|
||||
class: "whitespace-pre-line"
|
||||
}, toDisplayString(p), 1);
|
||||
}), 128)), !unref(paragraphs).length ? (openBlock(), createBlock("p", { key: 0 }, toDisplayString(unref(product).category.fullDesc), 1)) : createCommentVNode("", true)])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(product).features.length) {
|
||||
_push(`<div class="mt-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<h3 class="flex items-center gap-3 text-xl font-black"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span> ویژگیهای کلیدی </h3>`);
|
||||
else return [createVNode("h3", { class: "flex items-center gap-3 text-xl font-black" }, [createVNode("span", { class: "font-mono text-sm text-accent" }, "//"), createTextVNode(" ویژگیهای کلیدی ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<ul class="mt-6 grid gap-3 sm:grid-cols-2"><!--[-->`);
|
||||
ssrRenderList(unref(product).features, (f, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: f,
|
||||
delay: i * .04
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<li class="flex h-full items-start gap-3 rounded-xl border border-line bg-panel/60 p-4"${_scopeId}><span class="mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-accent text-bg"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "tick-circle",
|
||||
class: "size-3.5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span><span class="text-sm leading-7 text-ink/85"${_scopeId}>${ssrInterpolate(f)}</span></li>`);
|
||||
} else return [createVNode("li", { class: "flex h-full items-start gap-3 rounded-xl border border-line bg-panel/60 p-4" }, [createVNode("span", { class: "mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-accent text-bg" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "tick-circle",
|
||||
class: "size-3.5"
|
||||
})]), createVNode("span", { class: "text-sm leading-7 text-ink/85" }, toDisplayString(f), 1)])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></ul></div>`);
|
||||
} else _push(`<!---->`);
|
||||
if (unref(product).applications.length) {
|
||||
_push(`<div class="mt-14">`);
|
||||
_push(ssrRenderComponent(Reveal_default, null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<h3 class="flex items-center gap-3 text-xl font-black"${_scopeId}><span class="font-mono text-sm text-accent"${_scopeId}>//</span> کاربردها و محیطهای مناسب </h3>`);
|
||||
else return [createVNode("h3", { class: "flex items-center gap-3 text-xl font-black" }, [createVNode("span", { class: "font-mono text-sm text-accent" }, "//"), createTextVNode(" کاربردها و محیطهای مناسب ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .1 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mt-6 flex flex-wrap gap-2.5"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(product).applications, (a) => {
|
||||
_push(`<span class="rounded-full border border-line bg-panel/60 px-4 py-2 text-sm text-ink/80"${_scopeId}>${ssrInterpolate(a)}</span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else return [createVNode("div", { class: "mt-6 flex flex-wrap gap-2.5" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(product).applications, (a) => {
|
||||
return openBlock(), createBlock("span", {
|
||||
key: a,
|
||||
class: "rounded-full border border-line bg-panel/60 px-4 py-2 text-sm text-ink/80"
|
||||
}, toDisplayString(a), 1);
|
||||
}), 128))])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`</div><aside class="lg:col-span-5"><div class="space-y-6 lg:sticky lg:top-28">`);
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .1 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="overflow-hidden rounded-2xl border border-line bg-panel/80"${_scopeId}><div class="flex items-center justify-between border-b border-line px-6 py-4"${_scopeId}><span class="font-mono text-xs tracking-[0.25em] text-accent"${_scopeId}>// مشخصات فنی</span><span class="font-mono text-[10px] tracking-[0.25em] text-muted/60"${_scopeId}>SPECIFICATIONS</span></div><dl${_scopeId}><!--[-->`);
|
||||
ssrRenderList(specRows, (row) => {
|
||||
_push(`<div class="grid grid-cols-5 gap-4 border-b border-line/70 px-6 py-3.5 last:border-b-0"${_scopeId}><dt class="col-span-2 text-sm text-muted"${_scopeId}>${ssrInterpolate(row.name)}</dt><dd class="${ssrRenderClass([row.ltr && "font-mono tracking-wider", "col-span-3 text-sm font-medium text-ink/90"])}"${ssrRenderAttr("dir", row.ltr ? "ltr" : void 0)} style="${ssrRenderStyle(row.ltr ? "text-align: right" : void 0)}"${_scopeId}>${ssrInterpolate(row.value)}</dd></div>`);
|
||||
});
|
||||
_push(`<!--]--></dl></div>`);
|
||||
} else return [createVNode("div", { class: "overflow-hidden rounded-2xl border border-line bg-panel/80" }, [createVNode("div", { class: "flex items-center justify-between border-b border-line px-6 py-4" }, [createVNode("span", { class: "font-mono text-xs tracking-[0.25em] text-accent" }, "// مشخصات فنی"), createVNode("span", { class: "font-mono text-[10px] tracking-[0.25em] text-muted/60" }, "SPECIFICATIONS")]), createVNode("dl", null, [(openBlock(), createBlock(Fragment, null, renderList(specRows, (row) => {
|
||||
return createVNode("div", {
|
||||
key: row.name,
|
||||
class: "grid grid-cols-5 gap-4 border-b border-line/70 px-6 py-3.5 last:border-b-0"
|
||||
}, [createVNode("dt", { class: "col-span-2 text-sm text-muted" }, toDisplayString(row.name), 1), createVNode("dd", {
|
||||
class: ["col-span-3 text-sm font-medium text-ink/90", row.ltr && "font-mono tracking-wider"],
|
||||
dir: row.ltr ? "ltr" : void 0,
|
||||
style: row.ltr ? "text-align: right" : void 0
|
||||
}, toDisplayString(row.value), 15, ["dir"])]);
|
||||
}), 64))])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .18 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex items-start gap-4 rounded-xl border border-hazard/30 bg-hazard/5 p-5"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "24-support",
|
||||
class: "size-6 shrink-0 text-hazard"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<div${_scopeId}><div class="font-bold text-hazard"${_scopeId}>مشاوره رایگان انتخاب تجهیزات</div><p class="mt-1.5 text-sm leading-7 text-muted"${_scopeId}> برای انتخاب مدل و سایز مناسب محیط کار، خرید سازمانی یا دریافت نمونه، با کارشناسان ما تماس بگیرید. </p><div class="mt-4 flex flex-wrap gap-3 text-sm"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "font-bold text-accent hover:underline",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(` ثبت درخواست `);
|
||||
else return [createTextVNode(" ثبت درخواست ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
_push(`<span class="text-line"${_scopeId}>|</span><a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="font-mono tracking-wider text-ink/80 hover:text-accent" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</a></div></div></div>`);
|
||||
} else return [createVNode("div", { class: "flex items-start gap-4 rounded-xl border border-hazard/30 bg-hazard/5 p-5" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "24-support",
|
||||
class: "size-6 shrink-0 text-hazard"
|
||||
}), createVNode("div", null, [
|
||||
createVNode("div", { class: "font-bold text-hazard" }, "مشاوره رایگان انتخاب تجهیزات"),
|
||||
createVNode("p", { class: "mt-1.5 text-sm leading-7 text-muted" }, " برای انتخاب مدل و سایز مناسب محیط کار، خرید سازمانی یا دریافت نمونه، با کارشناسان ما تماس بگیرید. "),
|
||||
createVNode("div", { class: "mt-4 flex flex-wrap gap-3 text-sm" }, [
|
||||
createVNode(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "font-bold text-accent hover:underline",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" ثبت درخواست ")]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode("span", { class: "text-line" }, "|"),
|
||||
createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono tracking-wider text-ink/80 hover:text-accent",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])
|
||||
])
|
||||
])])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></aside></div></section>`);
|
||||
if (unref(product).related.length) {
|
||||
_push(`<section class="border-t border-line py-20 md:py-28"><div class="mx-auto max-w-[1480px] px-5 md:px-8"><div class="flex flex-wrap items-end justify-between gap-6">`);
|
||||
_push(ssrRenderComponent(SectionHead_default, {
|
||||
tag: "محصولات مرتبط",
|
||||
title: `محصولات دیگر\n${unref(product).category.name}`
|
||||
}, null, _parent));
|
||||
_push(ssrRenderComponent(Reveal_default, { delay: .2 }, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 rounded-full border border-line px-6 py-3 text-sm text-muted transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(` مشاهده همه `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
} else return [createTextVNode(" مشاهده همه "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 rounded-full border border-line px-6 py-3 text-sm text-muted transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createTextVNode(" مشاهده همه "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-4 transition-transform group-hover:-translate-x-1"
|
||||
})]),
|
||||
_: 1
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div><div class="mt-12 grid gap-5 sm:grid-cols-2 lg:grid-cols-4"><!--[-->`);
|
||||
ssrRenderList(unref(product).related, (r, i) => {
|
||||
_push(ssrRenderComponent(Reveal_default, {
|
||||
key: r.code,
|
||||
delay: i * .06
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: `/products/${r.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="${ssrRenderClass([r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]", "relative aspect-[4/3] overflow-hidden"])}"${_scopeId}><img${ssrRenderAttr("src", r.image ?? unref(product).category.coverImage ?? void 0)}${ssrRenderAttr("alt", r.name)} loading="lazy" decoding="async" class="${ssrRenderClass([r.image ? "object-contain p-7" : "object-cover", "size-full transition-transform duration-700 group-hover:scale-105"])}"${_scopeId}><span class="absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur"${_scopeId}>${ssrInterpolate(r.code)}</span></div><div class="flex flex-1 flex-col p-5"${_scopeId}><h3 class="font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(r.name)}</h3><p class="mt-1 font-mono text-[10px] tracking-[0.2em] text-muted"${_scopeId}>${ssrInterpolate(r.nameEn)}</p><span class="mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent"${_scopeId}> مشاهده محصول `);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</span></div>`);
|
||||
} else return [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [createVNode("img", {
|
||||
src: r.image ?? unref(product).category.coverImage ?? void 0,
|
||||
alt: r.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", r.image ? "object-contain p-7" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]), createVNode("span", { class: "absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(r.code), 1)], 2), createVNode("div", { class: "flex flex-1 flex-col p-5" }, [
|
||||
createVNode("h3", { class: "font-black transition-colors group-hover:text-accent" }, toDisplayString(r.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(r.nameEn), 1),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent" }, [createTextVNode(" مشاهده محصول "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
else return [createVNode(_component_NuxtLink, {
|
||||
to: `/products/${r.slug}`,
|
||||
class: "group flex h-full flex-col overflow-hidden rounded-xl border border-line bg-panel/80 transition-all duration-500 hover:border-accent/40 hover:shadow-[0_8px_40px_rgba(255,90,0,0.08)]"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("div", { class: ["relative aspect-[4/3] overflow-hidden", r.image && "bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.14),transparent_70%)]"] }, [createVNode("img", {
|
||||
src: r.image ?? unref(product).category.coverImage ?? void 0,
|
||||
alt: r.name,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
class: ["size-full transition-transform duration-700 group-hover:scale-105", r.image ? "object-contain p-7" : "object-cover"]
|
||||
}, null, 10, ["src", "alt"]), createVNode("span", { class: "absolute start-3 top-3 rounded-full bg-bg/60 px-2.5 py-0.5 font-mono text-[10px] tracking-widest text-ink/70 backdrop-blur" }, toDisplayString(r.code), 1)], 2), createVNode("div", { class: "flex flex-1 flex-col p-5" }, [
|
||||
createVNode("h3", { class: "font-black transition-colors group-hover:text-accent" }, toDisplayString(r.name), 1),
|
||||
createVNode("p", { class: "mt-1 font-mono text-[10px] tracking-[0.2em] text-muted" }, toDisplayString(r.nameEn), 1),
|
||||
createVNode("span", { class: "mt-auto inline-flex items-center gap-2 pt-4 text-xs font-bold text-accent" }, [createTextVNode(" مشاهده محصول "), createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-left",
|
||||
class: "size-3.5 transition-transform group-hover:-translate-x-1"
|
||||
})])
|
||||
])]),
|
||||
_: 2
|
||||
}, 1032, ["to"])];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></div></div></section>`);
|
||||
} else _push(`<!---->`);
|
||||
_push(`<section class="border-t border-line py-12 md:py-16"><div class="mx-auto flex max-w-[1480px] flex-wrap items-center justify-between gap-6 px-5 md:px-8">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: categoryPath,
|
||||
class: "group inline-flex items-center gap-2 text-muted transition-colors hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` بازگشت به ${ssrInterpolate(unref(product).category.name)}`);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-right",
|
||||
class: "size-4 transition-transform group-hover:translate-x-1"
|
||||
}), createTextVNode(" بازگشت به " + toDisplayString(unref(product).category.name), 1)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/#contact",
|
||||
class: "inline-flex items-center gap-2 rounded-full bg-accent px-6 py-3 text-sm font-bold text-bg transition-all hover:bg-accent-soft hover:shadow-[0_8px_45px_rgba(255,90,0,0.5)]",
|
||||
onClick: requestQuote
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` درخواست قیمت این محصول `);
|
||||
} else return [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createTextVNode(" درخواست قیمت این محصول ")];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></section>`);
|
||||
_push(ssrRenderComponent(_component_ClientOnly, null, {}, _parent));
|
||||
_push(`</main>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/pages/products/[slug].vue
|
||||
var _sfc_setup = _slug__vue_vue_type_script_setup_true_lang_default.setup;
|
||||
_slug__vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/products/[slug].vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var _slug__default = _slug__vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { _slug__default as default };
|
||||
//# sourceMappingURL=_slug_-CkwmjXFv.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,78 @@
|
||||
import { a as useNuxtApp, V as VuesaxIcon_default } from '../virtual/entry.mjs';
|
||||
import { defineComponent, mergeProps, useSSRContext } from 'vue';
|
||||
import { ssrRenderComponent } from 'vue/server-renderer';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
//#region app/components/ui/DynamicIcon.vue?vue&type=script&setup=true&lang.ts
|
||||
var DynamicIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "DynamicIcon",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
name: {},
|
||||
size: {}
|
||||
},
|
||||
setup(__props) {
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, mergeProps({
|
||||
name: __props.name,
|
||||
size: __props.size
|
||||
}, _attrs), null, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/ui/DynamicIcon.vue
|
||||
var _sfc_setup = DynamicIcon_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
DynamicIcon_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/DynamicIcon.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var DynamicIcon_default = Object.assign(DynamicIcon_vue_vue_type_script_setup_true_lang_default, { __name: "UiDynamicIcon" });
|
||||
//#endregion
|
||||
//#region app/stores/contact.ts
|
||||
/** `website` is a honeypot field, hidden from people and left empty */
|
||||
var emptyForm = () => ({
|
||||
name: "",
|
||||
org: "",
|
||||
phone: "",
|
||||
message: "",
|
||||
website: ""
|
||||
});
|
||||
var useContactStore = defineStore("contact", {
|
||||
state: () => ({
|
||||
form: emptyForm(),
|
||||
status: "idle",
|
||||
error: ""
|
||||
}),
|
||||
actions: {
|
||||
async submit() {
|
||||
this.status = "loading";
|
||||
this.error = "";
|
||||
try {
|
||||
await useNuxtApp().$api("/public/contact", {
|
||||
method: "POST",
|
||||
body: this.form
|
||||
});
|
||||
this.status = "success";
|
||||
} catch (e) {
|
||||
const err = e;
|
||||
this.error = err.statusCode === 429 ? "تعداد درخواستها زیاد است؛ لطفاً چند دقیقه بعد دوباره تلاش کنید." : err.data?.message ?? "ارسال درخواست انجام نشد؛ لطفاً دوباره تلاش کنید یا تماس بگیرید.";
|
||||
this.status = "error";
|
||||
}
|
||||
},
|
||||
/** Pre-fills the message, e.g. from a product page's "request a quote" button */
|
||||
prefill(message) {
|
||||
if (this.status === "success") this.reset();
|
||||
this.form.message = message;
|
||||
},
|
||||
reset() {
|
||||
this.form = emptyForm();
|
||||
this.status = "idle";
|
||||
this.error = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export { DynamicIcon_default as D, useContactStore as u };
|
||||
//# sourceMappingURL=contact-DBTK0GHP.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"contact-DBTK0GHP.mjs","sources":["../../../../app/components/ui/DynamicIcon.vue","../../../../app/stores/contact.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOe,IAAA,IAAA,EAAM,OAAA,CAAA,IAAA;AAAO,IAAA,IAAA,EAAM,OAAA,CAAA;;;;;;;;;;;;;;;;;ACFlC,IAAM,SAAA,GAAA,OAAmB;CAAE,IAAA,EAAM,EAAA;CAAI,GAAA,EAAK,EAAA;CAAI,KAAA,EAAO,EAAA;CAAI,OAAA,EAAS,EAAA;CAAI,OAAA,EAAS;AAAG,CAAA,CAAA;AAOlF,IAAa,eAAA,GAAkB,YAAY,SAAA,EAAW;CACpD,KAAA,EAAA,OAAc;AACZ,EAAA,IAAA,EAAM,SAAA,EAAU;EAChB,MAAA,EAAQ,MAAA;EACR,KAAA,EAAO;AACT,EAAA,CAAA;CACA,OAAA,EAAS;AACP,EAAA,MAAM,MAAA,GAAS;AACb,GAAA,IAAA,CAAK,MAAA,GAAS,SAAA;AACd,GAAA,IAAA,CAAK,KAAA,GAAQ,EAAA;GACb,IAAI;AACF,IAAA,MAAM,UAAA,EAAY,CAAC,IAAA,CAAK,iBAAA,EAAmB;KAAE,MAAA,EAAQ,MAAA;AAAQ,KAAA,IAAA,EAAM,IAAA,CAAK;KAAM,CAAA;AAC9E,IAAA,IAAA,CAAK,MAAA,GAAS,SAAA;AAChB,GAAA,CAAA,CAAA,OAAS,CAAA,EAAG;AACV,IAAA,MAAM,GAAA,GAAM,CAAA;AACZ,IAAA,IAAA,CAAK,QACH,GAAA,CAAI,UAAA,KAAe,MACf,kEAAA,GACC,GAAA,CAAI,MAAM,OAAA,IAAW,iEAAA;AAC5B,IAAA,IAAA,CAAK,MAAA,GAAS,OAAA;AAChB,GAAA;AACF,EAAA,CAAA;;AAEA,EAAA,OAAA,CAAQ,OAAA,EAAiB;AACvB,GAAA,IAAI,IAAA,CAAK,MAAA,KAAW,SAAA,EAAW,IAAA,CAAK,KAAA,EAAM;AAC1C,GAAA,IAAA,CAAK,KAAK,OAAA,GAAU,OAAA;AACtB,EAAA,CAAA;EACA,KAAA,GAAQ;AACN,GAAA,IAAA,CAAK,OAAO,SAAA,EAAU;AACtB,GAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,GAAA,IAAA,CAAK,KAAA,GAAQ,EAAA;AACf,EAAA;AACF;AACF,CAAC;;"}
|
||||
@@ -0,0 +1,824 @@
|
||||
import { c as useSiteStore, V as VuesaxIcon_default, N as NuxtLink, ai as _plugin_vue_export_helper_default } from '../virtual/entry.mjs';
|
||||
import { E as EASE, f as faNum } from './motion-BvlOLZ1k.mjs';
|
||||
import { defineComponent, unref, withCtx, openBlock, createBlock, createCommentVNode, ref, computed, mergeProps, createVNode, createTextVNode, toDisplayString, watch, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { p as publicAssetsURL } from '../routes/renderer.mjs';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderSlot, ssrRenderAttr, ssrInterpolate, ssrRenderStyle, ssrRenderClass, ssrRenderList } from 'vue/server-renderer';
|
||||
import { defineStore } from 'pinia';
|
||||
import { AnimatePresence, motion, useMotionValue, useSpring } from 'motion-v';
|
||||
import 'vue-router';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../_/site.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
|
||||
//#region app/stores/ui.ts
|
||||
var useUiStore = defineStore("ui", {
|
||||
state: () => ({
|
||||
/** true once the preloader has finished */
|
||||
ready: false,
|
||||
/** mobile navigation overlay */
|
||||
menuOpen: false
|
||||
}),
|
||||
actions: {
|
||||
setReady() {
|
||||
this.ready = true;
|
||||
},
|
||||
openMenu() {
|
||||
this.menuOpen = true;
|
||||
},
|
||||
closeMenu() {
|
||||
this.menuOpen = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/composables/useScrollY.ts
|
||||
/** Reactive `window.scrollY > threshold`, evaluated after mount (passive listener). */
|
||||
function useScrolledPast(threshold) {
|
||||
return ref(false);
|
||||
}
|
||||
//#endregion
|
||||
//#region app/components/layout/BackToTop.vue?vue&type=script&setup=true&lang.ts
|
||||
var BackToTop_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "BackToTop",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const show = useScrolledPast();
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), _attrs, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (unref(show)) _push(ssrRenderComponent(unref(motion).a, {
|
||||
href: "#home",
|
||||
"aria-label": "بازگشت به بالا",
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
exit: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
class: "fixed bottom-6 left-6 z-[70] flex size-12 items-center justify-center rounded-full border border-line bg-panel/90 text-ink shadow-[0_10px_40px_rgba(0,0,0,0.5)] backdrop-blur transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
else return [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
})];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [unref(show) ? (openBlock(), createBlock(unref(motion).a, {
|
||||
key: 0,
|
||||
href: "#home",
|
||||
"aria-label": "بازگشت به بالا",
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
exit: {
|
||||
opacity: 0,
|
||||
y: 24
|
||||
},
|
||||
class: "fixed bottom-6 left-6 z-[70] flex size-12 items-center justify-center rounded-full border border-line bg-panel/90 text-ink shadow-[0_10px_40px_rgba(0,0,0,0.5)] backdrop-blur transition-colors hover:border-accent hover:text-accent"
|
||||
}, {
|
||||
default: withCtx(() => [createVNode(VuesaxIcon_default, {
|
||||
name: "arrow-up",
|
||||
class: "size-5"
|
||||
})]),
|
||||
_: 1
|
||||
})) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/BackToTop.vue
|
||||
var _sfc_setup$6 = BackToTop_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
BackToTop_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/BackToTop.vue");
|
||||
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
||||
};
|
||||
var BackToTop_default = Object.assign(BackToTop_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutBackToTop" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Cursor.vue?vue&type=script&setup=true&lang.ts
|
||||
var Cursor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Cursor",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const x = useMotionValue(-100);
|
||||
const y = useMotionValue(-100);
|
||||
const sx = useSpring(x, {
|
||||
stiffness: 550,
|
||||
damping: 45,
|
||||
mass: .4
|
||||
});
|
||||
const sy = useSpring(y, {
|
||||
stiffness: 550,
|
||||
damping: 45,
|
||||
mass: .4
|
||||
});
|
||||
const hover = ref(false);
|
||||
const visible = ref(false);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "pointer-events-none fixed inset-0 z-[120] hidden [@media(pointer:fine)]:block" }, _attrs))}>`);
|
||||
_push(ssrRenderComponent(unref(motion).div, {
|
||||
style: {
|
||||
x: unref(sx),
|
||||
y: unref(sy)
|
||||
},
|
||||
class: "absolute -left-4 -top-4 size-8"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(ssrRenderComponent(unref(motion).div, {
|
||||
animate: {
|
||||
scale: unref(hover) ? 1.9 : 1,
|
||||
opacity: unref(visible) ? 1 : 0,
|
||||
rotate: unref(hover) ? 45 : 0
|
||||
},
|
||||
transition: {
|
||||
type: "spring",
|
||||
stiffness: 320,
|
||||
damping: 24
|
||||
},
|
||||
class: "size-8 rounded-md border-2 border-accent/80"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<div class="${ssrRenderClass(`absolute inset-0 m-auto size-1 rounded-full bg-accent transition-opacity duration-300 ${unref(visible) ? "opacity-100" : "opacity-0"}`)}"${_scopeId}></div>`);
|
||||
} else return [createVNode(unref(motion).div, {
|
||||
animate: {
|
||||
scale: unref(hover) ? 1.9 : 1,
|
||||
opacity: unref(visible) ? 1 : 0,
|
||||
rotate: unref(hover) ? 45 : 0
|
||||
},
|
||||
transition: {
|
||||
type: "spring",
|
||||
stiffness: 320,
|
||||
damping: 24
|
||||
},
|
||||
class: "size-8 rounded-md border-2 border-accent/80"
|
||||
}, null, 8, ["animate"]), createVNode("div", { class: `absolute inset-0 m-auto size-1 rounded-full bg-accent transition-opacity duration-300 ${unref(visible) ? "opacity-100" : "opacity-0"}` }, null, 2)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Cursor.vue
|
||||
var _sfc_setup$5 = Cursor_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Cursor_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Cursor.vue");
|
||||
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
||||
};
|
||||
var Cursor_default = Object.assign(Cursor_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutCursor" });
|
||||
//#endregion
|
||||
//#region \0virtual:public?%2Fimages%2Flogo.png
|
||||
var _virtual_public__2Fimages_2Flogo_default = publicAssetsURL("/images/logo.png");
|
||||
//#endregion
|
||||
//#region app/components/ui/Logo.vue
|
||||
var _sfc_main = {};
|
||||
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
||||
_push(ssrRenderComponent(NuxtLink, mergeProps({
|
||||
to: "/",
|
||||
class: "flex items-center gap-3",
|
||||
"aria-label": "ایمن پیشگامان"
|
||||
}, _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<span class="flex size-10 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(10,30,92,0.45)]"${_scopeId}><img${ssrRenderAttr("src", _virtual_public__2Fimages_2Flogo_default)} alt="ایمن پیشگامان" width="28" height="28" class="size-7 object-contain"${_scopeId}></span><span class="leading-tight"${_scopeId}><span class="block text-lg font-black"${_scopeId}>ایمن پیشگامان</span><span class="block font-mono text-[9px] tracking-[0.32em] text-muted"${_scopeId}> IMEN PISHGAMAN CO. </span></span>`);
|
||||
else return [createVNode("span", { class: "flex size-10 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(10,30,92,0.45)]" }, [createVNode("img", {
|
||||
src: _virtual_public__2Fimages_2Flogo_default,
|
||||
alt: "ایمن پیشگامان",
|
||||
width: "28",
|
||||
height: "28",
|
||||
class: "size-7 object-contain"
|
||||
})]), createVNode("span", { class: "leading-tight" }, [createVNode("span", { class: "block text-lg font-black" }, "ایمن پیشگامان"), createVNode("span", { class: "block font-mono text-[9px] tracking-[0.32em] text-muted" }, " IMEN PISHGAMAN CO. ")])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
}
|
||||
var _sfc_setup$4 = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/ui/Logo.vue");
|
||||
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
||||
};
|
||||
var Logo_default = /*#__PURE__*/ Object.assign(_plugin_vue_export_helper_default(_sfc_main, [["ssrRender", _sfc_ssrRender]]), { __name: "UiLogo" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Footer.vue?vue&type=script&setup=true&lang.ts
|
||||
var Footer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Footer",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ALL_QUICK_LINKS = [
|
||||
{
|
||||
href: "/#home",
|
||||
label: "خانه",
|
||||
section: "hero"
|
||||
},
|
||||
{
|
||||
href: "/#products",
|
||||
label: "محصولات",
|
||||
section: "productsIntro"
|
||||
},
|
||||
{
|
||||
href: "/#about",
|
||||
label: "درباره ما",
|
||||
section: "about"
|
||||
},
|
||||
{
|
||||
href: "/#services",
|
||||
label: "خدمات",
|
||||
section: "services"
|
||||
},
|
||||
{
|
||||
href: "/#standards",
|
||||
label: "استانداردها",
|
||||
section: "standards"
|
||||
},
|
||||
{
|
||||
href: "/#industries",
|
||||
label: "صنایع",
|
||||
section: "industries"
|
||||
}
|
||||
];
|
||||
const SOCIAL_META = {
|
||||
website: {
|
||||
icon: "global",
|
||||
label: "وبسایت"
|
||||
},
|
||||
telegram: {
|
||||
icon: "send-2",
|
||||
label: "تلگرام"
|
||||
},
|
||||
instagram: {
|
||||
icon: "instagram",
|
||||
label: "اینستاگرام"
|
||||
},
|
||||
linkedin: {
|
||||
icon: "link",
|
||||
label: "لینکدین"
|
||||
},
|
||||
whatsapp: {
|
||||
icon: "messages-2",
|
||||
label: "واتساپ"
|
||||
},
|
||||
bale: {
|
||||
icon: "messages-2",
|
||||
label: "بله"
|
||||
},
|
||||
eitaa: {
|
||||
icon: "messages-2",
|
||||
label: "ایتا"
|
||||
},
|
||||
aparat: {
|
||||
icon: "video-play",
|
||||
label: "آپارات"
|
||||
},
|
||||
youtube: {
|
||||
icon: "video-play",
|
||||
label: "یوتیوب"
|
||||
},
|
||||
email: {
|
||||
icon: "sms",
|
||||
label: "ایمیل"
|
||||
},
|
||||
phone: {
|
||||
icon: "call",
|
||||
label: "تماس"
|
||||
}
|
||||
};
|
||||
const site = useSiteStore();
|
||||
const footer = computed(() => site.sections.footer);
|
||||
const settings = computed(() => site.settings);
|
||||
const QUICK_LINKS = computed(() => ALL_QUICK_LINKS.filter((l) => site.sections?.[l.section]?.enabled !== false));
|
||||
const PRODUCT_LINKS = computed(() => site.categories.map((c) => ({
|
||||
label: c.name,
|
||||
href: `/categories/${c.slug}`
|
||||
})));
|
||||
const SOCIALS = computed(() => settings.value.socials.map((s) => ({
|
||||
...SOCIAL_META[s.type],
|
||||
href: s.url,
|
||||
external: /^https?:\/\//.test(s.url)
|
||||
})));
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = NuxtLink;
|
||||
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "relative overflow-hidden border-t border-line" }, _attrs))}><div class="hazard h-2.5"></div><div class="mx-auto max-w-[1480px] px-5 md:px-8"><div class="grid gap-12 py-16 md:grid-cols-12 md:py-20"><div class="md:col-span-5">`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent));
|
||||
_push(`<p class="mt-6 max-w-sm text-sm leading-8 text-muted">${ssrInterpolate(unref(footer).about)}</p><div class="mt-7 flex gap-3"><!--[-->`);
|
||||
ssrRenderList(unref(SOCIALS), (s) => {
|
||||
_push(`<a${ssrRenderAttr("href", s.href)}${ssrRenderAttr("aria-label", s.label)}${ssrRenderAttr("target", s.external ? "_blank" : void 0)}${ssrRenderAttr("rel", s.external ? "noopener" : void 0)} class="flex size-10 items-center justify-center rounded-lg border border-line text-muted transition-all duration-300 hover:border-accent hover:bg-accent hover:text-bg">`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: s.icon,
|
||||
class: "size-4"
|
||||
}, null, _parent));
|
||||
_push(`</a>`);
|
||||
});
|
||||
_push(`<!--]--></div></div><div class="md:col-span-2"><div class="font-mono text-xs tracking-[0.25em] text-accent">// دسترسی</div><ul class="mt-5 space-y-3"><!--[-->`);
|
||||
ssrRenderList(unref(QUICK_LINKS), (l) => {
|
||||
_push(`<li><a${ssrRenderAttr("href", l.href)} class="text-sm text-muted transition-colors hover:text-ink">${ssrInterpolate(l.label)}</a></li>`);
|
||||
});
|
||||
_push(`<!--]--></ul></div><div class="md:col-span-2"><div class="font-mono text-xs tracking-[0.25em] text-accent">// محصولات</div><ul class="mt-5 space-y-3"><!--[-->`);
|
||||
ssrRenderList(unref(PRODUCT_LINKS), (p) => {
|
||||
_push(`<li>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: p.href,
|
||||
class: "text-sm text-muted transition-colors hover:text-ink"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`${ssrInterpolate(p.label)}`);
|
||||
else return [createTextVNode(toDisplayString(p.label), 1)];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`</li>`);
|
||||
});
|
||||
_push(`<!--]--></ul></div><div class="md:col-span-3"><div class="font-mono text-xs tracking-[0.25em] text-accent">// ارتباط</div><address class="mt-5 space-y-3 text-sm text-muted not-italic"><p class="leading-7">${ssrInterpolate(unref(settings).address.locality)}، ${ssrInterpolate(unref(settings).address.street)}</p><p class="font-mono tracking-wider" dir="ltr"><a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="transition-colors hover:text-ink">${ssrInterpolate(unref(settings).phoneDisplay)}</a></p><p class="font-mono tracking-wider" dir="ltr"><a${ssrRenderAttr("href", `mailto:${unref(settings).email}`)} class="transition-colors hover:text-ink">${ssrInterpolate(unref(settings).email)}</a></p><p class="pt-2 text-xs leading-6">${ssrInterpolate(unref(settings).workingHours)} `);
|
||||
if (unref(footer).emergencyNote) _push(`<!--[--><br> ${ssrInterpolate(unref(footer).emergencyNote)}<!--]-->`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</p></address></div></div><div aria-hidden="true" class="pointer-events-none select-none pb-6"><div class="text-outline text-center text-[17vw] font-black leading-[0.85] md:text-[11vw]">${ssrInterpolate(unref(settings).name)}</div></div><div class="flex flex-wrap items-center justify-between gap-4 border-t border-line py-6 text-xs text-muted"><div>${ssrInterpolate(unref(footer).copyright)}</div>`);
|
||||
if (unref(footer).certLine) _push(`<div class="font-mono text-[10px] tracking-[0.25em]">${ssrInterpolate(unref(footer).certLine)}</div>`);
|
||||
else _push(`<!---->`);
|
||||
_push(`</div></div></footer>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Footer.vue
|
||||
var _sfc_setup$3 = Footer_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Footer_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Footer.vue");
|
||||
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
||||
};
|
||||
var Footer_default = Object.assign(Footer_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutFooter" });
|
||||
//#endregion
|
||||
//#region app/composables/useTehranClock.ts
|
||||
function useTehranClock() {
|
||||
const now = ref(null);
|
||||
return {
|
||||
time: computed(() => now.value ? new Intl.DateTimeFormat("fa-IR", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
timeZone: "Asia/Tehran"
|
||||
}).format(now.value) : "--:--"),
|
||||
shift: computed(() => {
|
||||
if (!now.value) return "";
|
||||
const hour = Number(new Intl.DateTimeFormat("en-US", {
|
||||
hour: "numeric",
|
||||
hour12: false,
|
||||
timeZone: "Asia/Tehran"
|
||||
}).format(now.value));
|
||||
return hour >= 6 && hour < 14 ? "صبح" : hour >= 14 && hour < 22 ? "عصر" : "شب";
|
||||
})
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region app/components/layout/Header.vue?vue&type=script&setup=true&lang.ts
|
||||
var Header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Header",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ALL_LINKS = [
|
||||
{
|
||||
href: "/#home",
|
||||
label: "خانه",
|
||||
section: "hero"
|
||||
},
|
||||
{
|
||||
href: "/#products",
|
||||
label: "محصولات",
|
||||
section: "productsIntro"
|
||||
},
|
||||
{
|
||||
href: "/#about",
|
||||
label: "درباره ما",
|
||||
section: "about"
|
||||
},
|
||||
{
|
||||
href: "/#services",
|
||||
label: "خدمات",
|
||||
section: "services"
|
||||
},
|
||||
{
|
||||
href: "/#standards",
|
||||
label: "استانداردها",
|
||||
section: "standards"
|
||||
},
|
||||
{
|
||||
href: "/#industries",
|
||||
label: "صنایع",
|
||||
section: "industries"
|
||||
},
|
||||
{
|
||||
href: "/#contact",
|
||||
label: "تماس",
|
||||
section: "contact"
|
||||
}
|
||||
];
|
||||
const ui = useUiStore();
|
||||
const site = useSiteStore();
|
||||
const settings = computed(() => site.settings);
|
||||
const sections = computed(() => site.sections);
|
||||
const LINKS = computed(() => ALL_LINKS.filter((l) => sections.value?.[l.section]?.enabled !== false));
|
||||
const scrolled = useScrolledPast();
|
||||
const { time, shift } = useTehranClock();
|
||||
watch(() => ui.menuOpen, (open) => {
|
||||
(void 0).body.style.overflow = open ? "hidden" : "";
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<!--[-->`);
|
||||
_push(ssrRenderComponent(unref(motion).header, {
|
||||
initial: {
|
||||
y: -90,
|
||||
opacity: 0
|
||||
},
|
||||
animate: unref(ui).ready ? {
|
||||
y: 0,
|
||||
opacity: 1
|
||||
} : {},
|
||||
transition: {
|
||||
duration: .9,
|
||||
delay: .15,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: `fixed inset-x-0 top-0 z-[80] transition-all duration-500 ${unref(scrolled) ? "border-b border-line bg-bg/85 py-3 backdrop-blur-xl" : "py-5"}`
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="mx-auto flex max-w-[1480px] items-center justify-between px-5 md:px-8"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent, _scopeId));
|
||||
_push(`<nav class="hidden items-center gap-7 lg:flex"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(LINKS), (l) => {
|
||||
_push(`<a${ssrRenderAttr("href", l.href)} class="group relative py-2 text-sm text-ink/75 transition-colors hover:text-ink"${_scopeId}>${ssrInterpolate(l.label)} <span class="absolute bottom-0 start-0 h-0.5 w-full origin-right scale-x-0 bg-accent transition-transform duration-300 group-hover:scale-x-100"${_scopeId}></span></a>`);
|
||||
});
|
||||
_push(`<!--]--></nav><div class="flex items-center gap-3"${_scopeId}><div class="hidden items-center gap-2.5 rounded-full border border-line px-4 py-2 text-[11px] text-muted xl:flex"${_scopeId}><span class="size-1.5 animate-pulse rounded-full bg-emerald-400"${_scopeId}></span><span class="font-mono"${_scopeId}>${ssrInterpolate(unref(time))}</span><span class="text-muted/50"${_scopeId}>|</span><span${_scopeId}>تهران — شیفت ${ssrInterpolate(unref(shift))}</span></div><a href="/#contact" class="hidden items-center gap-2 rounded-full bg-accent px-5 py-2.5 text-sm font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_0_30px_rgba(255,90,0,0.4)] md:flex"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(` درخواست مشاوره </a><button aria-label="باز کردن منو" class="flex size-11 items-center justify-center rounded-lg border border-line text-ink transition-colors hover:border-accent hover:text-accent lg:hidden"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "menu",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button></div></div>`);
|
||||
} else return [createVNode("div", { class: "mx-auto flex max-w-[1480px] items-center justify-between px-5 md:px-8" }, [
|
||||
createVNode(Logo_default),
|
||||
createVNode("nav", { class: "hidden items-center gap-7 lg:flex" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l) => {
|
||||
return openBlock(), createBlock("a", {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
class: "group relative py-2 text-sm text-ink/75 transition-colors hover:text-ink"
|
||||
}, [createTextVNode(toDisplayString(l.label) + " ", 1), createVNode("span", { class: "absolute bottom-0 start-0 h-0.5 w-full origin-right scale-x-0 bg-accent transition-transform duration-300 group-hover:scale-x-100" })], 8, ["href"]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center gap-3" }, [
|
||||
createVNode("div", { class: "hidden items-center gap-2.5 rounded-full border border-line px-4 py-2 text-[11px] text-muted xl:flex" }, [
|
||||
createVNode("span", { class: "size-1.5 animate-pulse rounded-full bg-emerald-400" }),
|
||||
createVNode("span", { class: "font-mono" }, toDisplayString(unref(time)), 1),
|
||||
createVNode("span", { class: "text-muted/50" }, "|"),
|
||||
createVNode("span", null, "تهران — شیفت " + toDisplayString(unref(shift)), 1)
|
||||
]),
|
||||
createVNode("a", {
|
||||
href: "/#contact",
|
||||
class: "hidden items-center gap-2 rounded-full bg-accent px-5 py-2.5 text-sm font-bold text-bg transition-all duration-300 hover:bg-accent-soft hover:shadow-[0_0_30px_rgba(255,90,0,0.4)] md:flex"
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4"
|
||||
}), createTextVNode(" درخواست مشاوره ")]),
|
||||
createVNode("button", {
|
||||
"aria-label": "باز کردن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line text-ink transition-colors hover:border-accent hover:text-accent lg:hidden",
|
||||
onClick: unref(ui).openMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "menu",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])
|
||||
])
|
||||
])];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (unref(ui).menuOpen) _push(ssrRenderComponent(unref(motion).div, {
|
||||
initial: { opacity: 0 },
|
||||
animate: { opacity: 1 },
|
||||
exit: { opacity: 0 },
|
||||
transition: { duration: .35 },
|
||||
class: "fixed inset-0 z-[110] flex flex-col bg-bg/95 backdrop-blur-2xl"
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
_push(`<div class="flex items-center justify-between border-b border-line px-5 py-4 md:px-8"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(Logo_default, null, null, _parent, _scopeId));
|
||||
_push(`<button aria-label="بستن منو" class="flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`</button></div><nav class="flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8"${_scopeId}><!--[-->`);
|
||||
ssrRenderList(unref(LINKS), (l, i) => {
|
||||
_push(ssrRenderComponent(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<span class="font-mono text-xs text-accent"${_scopeId}>${ssrInterpolate(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0")))}</span><span class="text-3xl font-black transition-colors group-hover:text-accent"${_scopeId}>${ssrInterpolate(l.label)}</span>`);
|
||||
else return [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)];
|
||||
}),
|
||||
_: 2
|
||||
}, _parent, _scopeId));
|
||||
});
|
||||
_push(`<!--]--></nav><div class="flex items-center justify-between border-t border-line p-8 text-sm"${_scopeId}><div class="flex items-center gap-3 text-muted"${_scopeId}>`);
|
||||
_push(ssrRenderComponent(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}, null, _parent, _scopeId));
|
||||
_push(`<a${ssrRenderAttr("href", `tel:${unref(settings).phone}`)} class="font-mono" dir="ltr"${_scopeId}>${ssrInterpolate(unref(settings).phoneDisplay)}</a></div><div class="text-xs text-muted"${_scopeId}>تهران — شیفت ${ssrInterpolate(unref(shift))}، ${ssrInterpolate(unref(time))}</div></div>`);
|
||||
} else return [
|
||||
createVNode("div", { class: "flex items-center justify-between border-b border-line px-5 py-4 md:px-8" }, [createVNode(Logo_default), createVNode("button", {
|
||||
"aria-label": "بستن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])]),
|
||||
createVNode("nav", { class: "flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l, i) => {
|
||||
return openBlock(), createBlock(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"href",
|
||||
"transition",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center justify-between border-t border-line p-8 text-sm" }, [createVNode("div", { class: "flex items-center gap-3 text-muted" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])]), createVNode("div", { class: "text-xs text-muted" }, "تهران — شیفت " + toDisplayString(unref(shift)) + "، " + toDisplayString(unref(time)), 1)])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [unref(ui).menuOpen ? (openBlock(), createBlock(unref(motion).div, {
|
||||
key: 0,
|
||||
initial: { opacity: 0 },
|
||||
animate: { opacity: 1 },
|
||||
exit: { opacity: 0 },
|
||||
transition: { duration: .35 },
|
||||
class: "fixed inset-0 z-[110] flex flex-col bg-bg/95 backdrop-blur-2xl"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "flex items-center justify-between border-b border-line px-5 py-4 md:px-8" }, [createVNode(Logo_default), createVNode("button", {
|
||||
"aria-label": "بستن منو",
|
||||
class: "flex size-11 items-center justify-center rounded-lg border border-line transition-colors hover:border-accent hover:text-accent",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, [createVNode(VuesaxIcon_default, {
|
||||
name: "close-circle",
|
||||
class: "size-5"
|
||||
})], 8, ["onClick"])]),
|
||||
createVNode("nav", { class: "flex flex-1 flex-col justify-center gap-1 overflow-y-auto px-8" }, [(openBlock(true), createBlock(Fragment, null, renderList(unref(LINKS), (l, i) => {
|
||||
return openBlock(), createBlock(unref(motion).a, {
|
||||
key: l.href,
|
||||
href: l.href,
|
||||
initial: {
|
||||
opacity: 0,
|
||||
x: 44
|
||||
},
|
||||
animate: {
|
||||
opacity: 1,
|
||||
x: 0
|
||||
},
|
||||
transition: {
|
||||
delay: .08 + i * .055,
|
||||
duration: .55,
|
||||
ease: "EASE" in _ctx ? _ctx.EASE : unref(EASE)
|
||||
},
|
||||
class: "group flex items-baseline gap-5 border-b border-line/60 py-4",
|
||||
onClick: unref(ui).closeMenu
|
||||
}, {
|
||||
default: withCtx(() => [createVNode("span", { class: "font-mono text-xs text-accent" }, toDisplayString(("faNum" in _ctx ? _ctx.faNum : unref(faNum))(String(i + 1).padStart(2, "0"))), 1), createVNode("span", { class: "text-3xl font-black transition-colors group-hover:text-accent" }, toDisplayString(l.label), 1)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"href",
|
||||
"transition",
|
||||
"onClick"
|
||||
]);
|
||||
}), 128))]),
|
||||
createVNode("div", { class: "flex items-center justify-between border-t border-line p-8 text-sm" }, [createVNode("div", { class: "flex items-center gap-3 text-muted" }, [createVNode(VuesaxIcon_default, {
|
||||
name: "call",
|
||||
class: "size-4 text-accent"
|
||||
}), createVNode("a", {
|
||||
href: `tel:${unref(settings).phone}`,
|
||||
class: "font-mono",
|
||||
dir: "ltr"
|
||||
}, toDisplayString(unref(settings).phoneDisplay), 9, ["href"])]), createVNode("div", { class: "text-xs text-muted" }, "تهران — شیفت " + toDisplayString(unref(shift)) + "، " + toDisplayString(unref(time)), 1)])
|
||||
]),
|
||||
_: 1
|
||||
})) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<!--]-->`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Header.vue
|
||||
var _sfc_setup$2 = Header_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Header_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Header.vue");
|
||||
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
||||
};
|
||||
var Header_default = Object.assign(Header_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutHeader" });
|
||||
//#endregion
|
||||
//#region app/components/layout/Preloader.vue?vue&type=script&setup=true&lang.ts
|
||||
var Preloader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "Preloader",
|
||||
__ssrInlineRender: true,
|
||||
emits: ["complete"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const STEPS = [
|
||||
"بررسی سیستمهای ایمنی",
|
||||
"تأیید استانداردهای بینالمللی",
|
||||
"بارگذاری تجهیزات حفاظت فردی",
|
||||
"محیط کاری آماده است"
|
||||
];
|
||||
const progress = ref(0);
|
||||
const step = computed(() => STEPS[Math.min(STEPS.length - 1, Math.floor(progress.value / 100 * STEPS.length))]);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(ssrRenderComponent(unref(motion).div, mergeProps({
|
||||
exit: { y: "-100%" },
|
||||
transition: {
|
||||
duration: .85,
|
||||
ease: [
|
||||
.76,
|
||||
0,
|
||||
.24,
|
||||
1
|
||||
]
|
||||
},
|
||||
class: "fixed inset-0 z-[200] flex flex-col items-center justify-center bg-bg"
|
||||
}, _attrs), {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) _push(`<div class="hazard absolute inset-x-0 top-0 h-3"${_scopeId}></div><div class="hazard absolute inset-x-0 bottom-0 h-3"${_scopeId}></div><div class="flex items-center gap-4"${_scopeId}><span class="flex size-12 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(255,90,0,0.3)] ring-1 ring-white/10"${_scopeId}><img${ssrRenderAttr("src", _virtual_public__2Fimages_2Flogo_default)} alt="ایمن پیشگامان" width="32" height="32" class="size-8 object-contain"${_scopeId}></span><span class="font-mono text-xs tracking-[0.35em] text-muted"${_scopeId}> IMEN PISHGAMAN CO. </span></div><div class="mt-12 font-mono text-7xl font-semibold tabular-nums md:text-8xl"${_scopeId}>${ssrInterpolate(unref(progress).toLocaleString("fa-IR"))}<span class="text-accent"${_scopeId}>٪</span></div><div class="mt-8 h-[3px] w-64 overflow-hidden rounded-full bg-line md:w-80"${_scopeId}><div class="h-full bg-accent transition-all duration-200" style="${ssrRenderStyle({ width: `${unref(progress)}%` })}"${_scopeId}></div></div><div class="mt-6 flex items-center gap-3 text-xs text-muted"${_scopeId}><span class="size-1.5 animate-pulse rounded-full bg-accent"${_scopeId}></span> ${ssrInterpolate(unref(step))} <span class="animate-blink text-accent"${_scopeId}>▍</span></div>`);
|
||||
else return [
|
||||
createVNode("div", { class: "hazard absolute inset-x-0 top-0 h-3" }),
|
||||
createVNode("div", { class: "hazard absolute inset-x-0 bottom-0 h-3" }),
|
||||
createVNode("div", { class: "flex items-center gap-4" }, [createVNode("span", { class: "flex size-12 items-center justify-center rounded-xl bg-white shadow-[0_0_28px_rgba(255,90,0,0.3)] ring-1 ring-white/10" }, [createVNode("img", {
|
||||
src: _virtual_public__2Fimages_2Flogo_default,
|
||||
alt: "ایمن پیشگامان",
|
||||
width: "32",
|
||||
height: "32",
|
||||
class: "size-8 object-contain"
|
||||
})]), createVNode("span", { class: "font-mono text-xs tracking-[0.35em] text-muted" }, " IMEN PISHGAMAN CO. ")]),
|
||||
createVNode("div", { class: "mt-12 font-mono text-7xl font-semibold tabular-nums md:text-8xl" }, [createTextVNode(toDisplayString(unref(progress).toLocaleString("fa-IR")), 1), createVNode("span", { class: "text-accent" }, "٪")]),
|
||||
createVNode("div", { class: "mt-8 h-[3px] w-64 overflow-hidden rounded-full bg-line md:w-80" }, [createVNode("div", {
|
||||
class: "h-full bg-accent transition-all duration-200",
|
||||
style: { width: `${unref(progress)}%` }
|
||||
}, null, 4)]),
|
||||
createVNode("div", { class: "mt-6 flex items-center gap-3 text-xs text-muted" }, [
|
||||
createVNode("span", { class: "size-1.5 animate-pulse rounded-full bg-accent" }),
|
||||
createTextVNode(" " + toDisplayString(unref(step)) + " ", 1),
|
||||
createVNode("span", { class: "animate-blink text-accent" }, "▍")
|
||||
])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/components/layout/Preloader.vue
|
||||
var _sfc_setup$1 = Preloader_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
Preloader_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/layout/Preloader.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
var Preloader_default = Object.assign(Preloader_vue_vue_type_script_setup_true_lang_default, { __name: "LayoutPreloader" });
|
||||
//#endregion
|
||||
//#region app/layouts/default.vue?vue&type=script&setup=true&lang.ts
|
||||
var default_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
||||
__name: "default",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const ui = useUiStore();
|
||||
const site = useSiteStore();
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}>`);
|
||||
_push(ssrRenderComponent(unref(AnimatePresence), null, {
|
||||
default: withCtx((_, _push, _parent, _scopeId) => {
|
||||
if (_push) {
|
||||
if (!unref(ui).ready) _push(ssrRenderComponent(Preloader_default, { onComplete: unref(ui).setReady }, null, _parent, _scopeId));
|
||||
else _push(`<!---->`);
|
||||
} else return [!unref(ui).ready ? (openBlock(), createBlock(Preloader_default, {
|
||||
key: 0,
|
||||
onComplete: unref(ui).setReady
|
||||
}, null, 8, ["onComplete"])) : createCommentVNode("", true)];
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(Cursor_default, null, null, _parent));
|
||||
_push(`<div class="noise" aria-hidden="true"></div>`);
|
||||
_push(ssrRenderComponent(Header_default, null, null, _parent));
|
||||
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
||||
if (unref(site).sections?.footer?.enabled !== false) _push(ssrRenderComponent(Footer_default, null, null, _parent));
|
||||
else _push(`<!---->`);
|
||||
_push(ssrRenderComponent(BackToTop_default, null, null, _parent));
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
//#region app/layouts/default.vue
|
||||
var _sfc_setup = default_vue_vue_type_script_setup_true_lang_default.setup;
|
||||
default_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
var default_default = default_vue_vue_type_script_setup_true_lang_default;
|
||||
|
||||
export { default_default as default };
|
||||
//# sourceMappingURL=default-BNP_R9fa.mjs.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
|
||||
//#region app/utils/motion.ts
|
||||
var EASE = [
|
||||
.22,
|
||||
1,
|
||||
.36,
|
||||
1
|
||||
];
|
||||
/** Convert latin digits to Persian digits */
|
||||
var faNum = (v) => String(v).replace(/\d/g, (d) => "۰۱۲۳۴۵۶۷۸۹"[Number(d)]);
|
||||
/** While-in-view fade-up props for motion elements (spread with v-bind) */
|
||||
var fade = (delay = 0, y = 36) => ({
|
||||
initial: {
|
||||
opacity: 0,
|
||||
y
|
||||
},
|
||||
whileInView: {
|
||||
opacity: 1,
|
||||
y: 0
|
||||
},
|
||||
inViewOptions: {
|
||||
once: true,
|
||||
margin: "-60px"
|
||||
},
|
||||
transition: {
|
||||
duration: .8,
|
||||
delay,
|
||||
ease: EASE
|
||||
}
|
||||
});
|
||||
|
||||
export { EASE as E, fade as a, faNum as f };
|
||||
//# sourceMappingURL=motion-BvlOLZ1k.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"motion-BvlOLZ1k.mjs","sources":["../../../../app/utils/motion.ts"],"names":[],"mappings":";AAAA,IAAa,IAAA,GAAyC;AAAC,CAAA,GAAA;AAAM,CAAA,CAAA;AAAG,CAAA,GAAA;AAAM,CAAA;AAAC;;AAGvE,IAAa,KAAA,GAAA,CAAS,CAAA,KACpB,MAAA,CAAO,CAAC,CAAC,CAAC,OAAA,CAAQ,KAAA,EAAA,CAAQ,CAAA,KAAM,YAAA,CAAa,MAAA,CAAO,CAAC,CAAA,CAAG;;AAG1D,IAAa,IAAA,GAAA,CAAQ,KAAA,GAAQ,CAAA,EAAG,CAAA,GAAI,EAAA,MAAQ;CAC1C,OAAA,EAAS;EAAE,OAAA,EAAS,CAAA;AAAG,EAAA;AAAE,EAAA;CACzB,WAAA,EAAa;EAAE,OAAA,EAAS,CAAA;EAAG,CAAA,EAAG;AAAE,EAAA;CAChC,aAAA,EAAe;EAAE,IAAA,EAAM,IAAA;EAAM,MAAA,EAAQ;AAAiB,EAAA;CACtD,UAAA,EAAY;EAAE,QAAA,EAAU,EAAA;AAAK,EAAA,KAAA;EAAO,IAAA,EAAM;AAAK;AACjD,CAAA;;"}
|
||||
@@ -0,0 +1,204 @@
|
||||
import { b as br, q as qn } from '../virtual/entry.mjs';
|
||||
import 'vue';
|
||||
import 'vue-router';
|
||||
import 'vue/server-renderer';
|
||||
import 'pinia';
|
||||
import 'node:module';
|
||||
import 'node:buffer';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:zlib';
|
||||
import 'node:stream';
|
||||
import 'node:util';
|
||||
import 'node:url';
|
||||
import 'node:net';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import '../routes/renderer.mjs';
|
||||
import '../_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:crypto';
|
||||
import 'nostics';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'devalue';
|
||||
import '../_/site.mjs';
|
||||
|
||||
//#region ../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs
|
||||
var B = Object.defineProperty;
|
||||
var E = (u, a) => B(u, "name", {
|
||||
value: a,
|
||||
configurable: true
|
||||
});
|
||||
var D = 0;
|
||||
var t = {
|
||||
START_BOUNDARY: D++,
|
||||
HEADER_FIELD_START: D++,
|
||||
HEADER_FIELD: D++,
|
||||
HEADER_VALUE_START: D++,
|
||||
HEADER_VALUE: D++,
|
||||
HEADER_VALUE_ALMOST_DONE: D++,
|
||||
HEADERS_ALMOST_DONE: D++,
|
||||
PART_DATA_START: D++,
|
||||
PART_DATA: D++,
|
||||
END: D++
|
||||
};
|
||||
var w = 1;
|
||||
var R = {
|
||||
PART_BOUNDARY: w,
|
||||
LAST_BOUNDARY: w *= 2
|
||||
};
|
||||
var g = 10;
|
||||
var N = 13;
|
||||
var x = 32;
|
||||
var P = 45;
|
||||
var C = 58;
|
||||
var I = 97;
|
||||
var M = 122;
|
||||
var $ = E((u) => u | 32, "lower");
|
||||
var m = E(() => {}, "noop");
|
||||
var F = class F {
|
||||
constructor(a) {
|
||||
this.index = 0, this.flags = 0, this.onHeaderEnd = m, this.onHeaderField = m, this.onHeadersEnd = m, this.onHeaderValue = m, this.onPartBegin = m, this.onPartData = m, this.onPartEnd = m, this.boundaryChars = {}, a = `\r
|
||||
--` + a;
|
||||
const n = new Uint8Array(a.length);
|
||||
for (let r = 0; r < a.length; r++) n[r] = a.charCodeAt(r), this.boundaryChars[n[r]] = true;
|
||||
this.boundary = n, this.lookbehind = new Uint8Array(this.boundary.length + 8), this.state = t.START_BOUNDARY;
|
||||
}
|
||||
write(a) {
|
||||
let n = 0;
|
||||
const r = a.length;
|
||||
let d = this.index, { lookbehind: l, boundary: c, boundaryChars: p, index: e, state: i, flags: A } = this;
|
||||
const H = this.boundary.length, O = H - 1, y = a.length;
|
||||
let o, L;
|
||||
const f = E((h) => {
|
||||
this[h + "Mark"] = n;
|
||||
}, "mark"), s = E((h) => {
|
||||
delete this[h + "Mark"];
|
||||
}, "clear"), T = E((h, S, _, U) => {
|
||||
(S === void 0 || S !== _) && this[h](U && U.subarray(S, _));
|
||||
}, "callback"), b = E((h, S) => {
|
||||
const _ = h + "Mark";
|
||||
_ in this && (S ? (T(h, this[_], n, a), delete this[_]) : (T(h, this[_], a.length, a), this[_] = 0));
|
||||
}, "dataCallback");
|
||||
for (n = 0; n < r; n++) switch (o = a[n], i) {
|
||||
case t.START_BOUNDARY:
|
||||
if (e === c.length - 2) {
|
||||
if (o === P) A |= R.LAST_BOUNDARY;
|
||||
else if (o !== N) return;
|
||||
e++;
|
||||
break;
|
||||
} else if (e - 1 === c.length - 2) {
|
||||
if (A & R.LAST_BOUNDARY && o === P) i = t.END, A = 0;
|
||||
else if (!(A & R.LAST_BOUNDARY) && o === g) e = 0, T("onPartBegin"), i = t.HEADER_FIELD_START;
|
||||
else return;
|
||||
break;
|
||||
}
|
||||
o !== c[e + 2] && (e = -2), o === c[e + 2] && e++;
|
||||
break;
|
||||
case t.HEADER_FIELD_START: i = t.HEADER_FIELD, f("onHeaderField"), e = 0;
|
||||
case t.HEADER_FIELD:
|
||||
if (o === N) {
|
||||
s("onHeaderField"), i = t.HEADERS_ALMOST_DONE;
|
||||
break;
|
||||
}
|
||||
if (e++, o === P) break;
|
||||
if (o === C) {
|
||||
if (e === 1) return;
|
||||
b("onHeaderField", true), i = t.HEADER_VALUE_START;
|
||||
break;
|
||||
}
|
||||
if (L = $(o), L < I || L > M) return;
|
||||
break;
|
||||
case t.HEADER_VALUE_START:
|
||||
if (o === x) break;
|
||||
f("onHeaderValue"), i = t.HEADER_VALUE;
|
||||
case t.HEADER_VALUE:
|
||||
o === N && (b("onHeaderValue", true), T("onHeaderEnd"), i = t.HEADER_VALUE_ALMOST_DONE);
|
||||
break;
|
||||
case t.HEADER_VALUE_ALMOST_DONE:
|
||||
if (o !== g) return;
|
||||
i = t.HEADER_FIELD_START;
|
||||
break;
|
||||
case t.HEADERS_ALMOST_DONE:
|
||||
if (o !== g) return;
|
||||
T("onHeadersEnd"), i = t.PART_DATA_START;
|
||||
break;
|
||||
case t.PART_DATA_START: i = t.PART_DATA, f("onPartData");
|
||||
case t.PART_DATA:
|
||||
if (d = e, e === 0) {
|
||||
for (n += O; n < y && !(a[n] in p);) n += H;
|
||||
n -= O, o = a[n];
|
||||
}
|
||||
if (e < c.length) c[e] === o ? (e === 0 && b("onPartData", true), e++) : e = 0;
|
||||
else if (e === c.length) e++, o === N ? A |= R.PART_BOUNDARY : o === P ? A |= R.LAST_BOUNDARY : e = 0;
|
||||
else if (e - 1 === c.length) if (A & R.PART_BOUNDARY) {
|
||||
if (e = 0, o === g) {
|
||||
A &= ~R.PART_BOUNDARY, T("onPartEnd"), T("onPartBegin"), i = t.HEADER_FIELD_START;
|
||||
break;
|
||||
}
|
||||
} else A & R.LAST_BOUNDARY && o === P ? (T("onPartEnd"), i = t.END, A = 0) : e = 0;
|
||||
if (e > 0) l[e - 1] = o;
|
||||
else if (d > 0) {
|
||||
const h = new Uint8Array(l.buffer, l.byteOffset, l.byteLength);
|
||||
T("onPartData", 0, d, h), d = 0, f("onPartData"), n--;
|
||||
}
|
||||
break;
|
||||
case t.END: break;
|
||||
default: throw new Error(`Unexpected state entered: ${i}`);
|
||||
}
|
||||
b("onHeaderField"), b("onHeaderValue"), b("onPartData"), this.index = e, this.state = i, this.flags = A;
|
||||
}
|
||||
end() {
|
||||
if (this.state === t.HEADER_FIELD_START && this.index === 0 || this.state === t.PART_DATA && this.index === this.boundary.length) this.onPartEnd();
|
||||
else if (this.state !== t.END) throw new Error("MultipartParser.end(): stream ended unexpectedly");
|
||||
}
|
||||
};
|
||||
E(F, "MultipartParser");
|
||||
var k = F;
|
||||
function v(u) {
|
||||
const a = u.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
||||
if (!a) return;
|
||||
const n = a[2] || a[3] || "";
|
||||
let r = n.slice(n.lastIndexOf("\\") + 1);
|
||||
return r = r.replace(/%22/g, "\""), r = r.replace(/&#(\d{4});/g, (d, l) => String.fromCharCode(l)), r;
|
||||
}
|
||||
E(v, "_fileName");
|
||||
async function Z(u, a) {
|
||||
if (!/multipart/i.test(a)) throw new TypeError("Failed to fetch");
|
||||
const n = a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
|
||||
if (!n) throw new TypeError("no or bad content-type header, no multipart boundary");
|
||||
const r = new k(n[1] || n[2]);
|
||||
let d, l, c, p, e, i;
|
||||
const A = [], H = new br(), O = E((s) => {
|
||||
c += f.decode(s, { stream: true });
|
||||
}, "onPartData"), y = E((s) => {
|
||||
A.push(s);
|
||||
}, "appendToFile"), o = E(() => {
|
||||
const s = new qn(A, i, { type: e });
|
||||
H.append(p, s);
|
||||
}, "appendFileToFormData"), L = E(() => {
|
||||
H.append(p, c);
|
||||
}, "appendEntryToFormData"), f = new TextDecoder("utf-8");
|
||||
f.decode(), r.onPartBegin = function() {
|
||||
r.onPartData = O, r.onPartEnd = L, d = "", l = "", c = "", p = "", e = "", i = null, A.length = 0;
|
||||
}, r.onHeaderField = function(s) {
|
||||
d += f.decode(s, { stream: true });
|
||||
}, r.onHeaderValue = function(s) {
|
||||
l += f.decode(s, { stream: true });
|
||||
}, r.onHeaderEnd = function() {
|
||||
if (l += f.decode(), d = d.toLowerCase(), d === "content-disposition") {
|
||||
const s = l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
|
||||
s && (p = s[2] || s[3] || ""), i = v(l), i && (r.onPartData = y, r.onPartEnd = o);
|
||||
} else d === "content-type" && (e = l);
|
||||
l = "", d = "";
|
||||
};
|
||||
for await (const s of u) r.write(s);
|
||||
return r.end(), H;
|
||||
}
|
||||
E(Z, "toFormData");
|
||||
|
||||
export { Z as toFormData };
|
||||
//# sourceMappingURL=multipart-parser-BeH9w6_V.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multipart-parser-BeH9w6_V.mjs","sources":["../../../../../../node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs"],"names":["V","Y"],"mappings":"","x_google_ignoreList":[0]}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
||||
import { c as defineEventHandler, u as useRuntimeConfig, g as getHeader, e as createError, f as useStorage } from '../../_/nitro.mjs';
|
||||
import { timingSafeEqual } from 'node:crypto';
|
||||
import 'unhead/server';
|
||||
import 'vue';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:url';
|
||||
|
||||
const revalidate_post = defineEventHandler(async (event) => {
|
||||
var _a;
|
||||
const expected = useRuntimeConfig().revalidateSecret;
|
||||
const given = (_a = getHeader(event, "x-revalidate-secret")) != null ? _a : "";
|
||||
if (!expected || !safeEqual(given, expected)) {
|
||||
throw createError({ statusCode: 401, statusMessage: "Unauthorized" });
|
||||
}
|
||||
const storage = useStorage("cache");
|
||||
const keys = await storage.getKeys("nitro:routes");
|
||||
await Promise.all(keys.map((k) => storage.removeItem(k)));
|
||||
return { cleared: keys.length };
|
||||
});
|
||||
function safeEqual(a, b) {
|
||||
const ab = Buffer.from(a);
|
||||
const bb = Buffer.from(b);
|
||||
return ab.length === bb.length && timingSafeEqual(ab, bb);
|
||||
}
|
||||
|
||||
export { revalidate_post as default };
|
||||
//# sourceMappingURL=revalidate.post.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"revalidate.post.mjs","sources":["../../../../../server/routes/_internal/revalidate.post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAMA,wBAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;;AACjD,EAAA,MAAM,QAAA,GAAW,kBAAiB,CAAE,gBAAA;AACpC,EAAA,MAAM,KAAA,GAAA,CAAQ,EAAA,GAAA,SAAA,CAAU,KAAA,EAAO,qBAAqB,MAAtC,IAAA,GAAA,EAAA,GAA2C,EAAA;AACzD,EAAA,IAAI,CAAC,QAAA,IAAY,CAAC,SAAA,CAAU,KAAA,EAAO,QAAQ,CAAA,EAAG;AAC5C,IAAA,MAAM,YAAY,EAAE,UAAA,EAAY,GAAA,EAAK,aAAA,EAAe,gBAAgB,CAAA;AAAA,EACtE;AAGA,EAAA,MAAM,OAAA,GAAU,WAAW,OAAO,CAAA;AAClC,EAAA,MAAM,IAAA,GAAO,MAAM,OAAA,CAAQ,OAAA,CAAQ,cAAc,CAAA;AACjD,EAAA,MAAM,OAAA,CAAQ,GAAA,CAAI,IAAA,CAAK,GAAA,CAAI,CAAC,MAAM,OAAA,CAAQ,UAAA,CAAW,CAAC,CAAC,CAAC,CAAA;AACxD,EAAA,OAAO,EAAE,OAAA,EAAS,IAAA,CAAK,MAAA,EAAO;AAChC,CAAC,CAAA;AAED,SAAS,SAAA,CAAU,GAAW,CAAA,EAAW;AACvC,EAAA,MAAM,EAAA,GAAK,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA;AACxB,EAAA,MAAM,EAAA,GAAK,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA;AACxB,EAAA,OAAO,GAAG,MAAA,KAAW,EAAA,CAAG,MAAA,IAAU,eAAA,CAAgB,IAAI,EAAE,CAAA;AAC1D;;"}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { c as defineEventHandler, h as setHeader } from '../_/nitro.mjs';
|
||||
import { f as fetchSite } from '../_/api.mjs';
|
||||
import { s as siteConfig } from '../_/site.mjs';
|
||||
import 'unhead/server';
|
||||
import 'vue';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
|
||||
const manifest_webmanifest = defineEventHandler(async (event) => {
|
||||
const name = await fetchSite().then((s) => s.sections.settings.name).catch(() => "\u0627\u06CC\u0645\u0646 \u067E\u06CC\u0634\u06AF\u0627\u0645\u0627\u0646");
|
||||
setHeader(event, "Content-Type", "application/manifest+json; charset=utf-8");
|
||||
return {
|
||||
name,
|
||||
short_name: name,
|
||||
lang: siteConfig.lang,
|
||||
dir: siteConfig.dir,
|
||||
start_url: "/",
|
||||
display: "standalone",
|
||||
background_color: siteConfig.themeColor,
|
||||
theme_color: siteConfig.themeColor,
|
||||
icons: [
|
||||
{
|
||||
src: siteConfig.favicon,
|
||||
sizes: "any",
|
||||
type: "image/svg+xml",
|
||||
purpose: "any"
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
export { manifest_webmanifest as default };
|
||||
//# sourceMappingURL=manifest.webmanifest.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"manifest.webmanifest.mjs","sources":["../../../../server/routes/manifest.webmanifest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,6BAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;AACjD,EAAA,MAAM,IAAA,GAAO,MAAM,SAAA,EAAU,CAC1B,KAAK,CAAC,CAAA,KAAM,CAAA,CAAE,QAAA,CAAS,QAAA,CAAS,IAAI,CAAA,CACpC,KAAA,CAAM,MAAM,2EAAe,CAAA;AAE9B,EAAA,SAAA,CAAU,KAAA,EAAO,gBAAgB,0CAA0C,CAAA;AAC3E,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,UAAA,EAAY,IAAA;AAAA,IACZ,MAAM,UAAA,CAAW,IAAA;AAAA,IACjB,KAAK,UAAA,CAAW,GAAA;AAAA,IAChB,SAAA,EAAW,GAAA;AAAA,IACX,OAAA,EAAS,YAAA;AAAA,IACT,kBAAkB,UAAA,CAAW,UAAA;AAAA,IAC7B,aAAa,UAAA,CAAW,UAAA;AAAA,IACxB,KAAA,EAAO;AAAA,MACL;AAAA,QACE,KAAK,UAAA,CAAW,OAAA;AAAA,QAChB,KAAA,EAAO,KAAA;AAAA,QACP,IAAA,EAAM,eAAA;AAAA,QACN,OAAA,EAAS;AAAA;AACX;AACF,GACF;AACF,CAAC,CAAA;;"}
|
||||
@@ -0,0 +1,708 @@
|
||||
import { j as joinRelativeURL, u as useRuntimeConfig, i as appRootTag, k as appRootAttrs, l as appSpaLoaderTag, m as appSpaLoaderAttrs, w as writeEarlyHints, e as createError, b as useNitroApp, n as getRouteRules, o as createHead, N as NUXT_PRERENDER_NO_SSR_ROUTES, p as unheadOptions, q as appId, r as getQuery, v as appHead, d as destr, x as NUXT_SSR_STREAMING, y as renderSSRHeadOptions, z as appTeleportAttrs, A as NUXT_NO_SCRIPTS_PATTERNS, B as relative, C as joinURL, D as NUXT_PAYLOAD_INLINE, E as appTeleportTag, F as NUXT_PAGE_PATTERNS, G as defineRenderHandler, H as toRequestEvent, I as setResponseHeader } from '../_/nitro.mjs';
|
||||
import { defineDiagnostics, createConsoleReporter } from 'nostics';
|
||||
import { renderToString } from 'vue/server-renderer';
|
||||
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
|
||||
import { propsToString, renderSSRHead } from 'unhead/server';
|
||||
import { stringify, uneval } from 'devalue';
|
||||
|
||||
//#region src/runtime/utils/response.ts
|
||||
/**
|
||||
* The response the renderer builds, keeping its body as the renderer produced it.
|
||||
*
|
||||
* A real `Response` turns every body into a `ReadableStream`, which would send a rendered
|
||||
* document as a chunked stream where nitro sends the string it was given. The renderer only
|
||||
* reads the fields below back, so this describes just those.
|
||||
*/
|
||||
var NodeRenderResponse = class {
|
||||
body;
|
||||
status;
|
||||
statusText;
|
||||
headers;
|
||||
constructor(body, init) {
|
||||
this.body = body;
|
||||
this.status = init?.status || 200;
|
||||
this.statusText = init?.statusText || "";
|
||||
this.headers = init?.headers instanceof Headers ? init.headers : new Headers(init?.headers);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* The headers of a node response as the record nitro's `render:response` hook passes,
|
||||
* read from and written to the node response itself. `set-cookie` is omitted, as it
|
||||
* cannot be represented as one string. The proxy target is kept as a snapshot for
|
||||
* `util.inspect`, which bypasses the traps.
|
||||
*/
|
||||
function createResponseHeaderRecord(res) {
|
||||
const read = (name) => {
|
||||
if (typeof name !== "string" || name.toLowerCase() === "set-cookie") return;
|
||||
const value = res.getHeader(name);
|
||||
if (value === void 0) return;
|
||||
return Array.isArray(value) ? value.join(", ") : String(value);
|
||||
};
|
||||
const snapshot = {};
|
||||
const sync = (name) => {
|
||||
const value = read(name);
|
||||
if (value === void 0) delete snapshot[name.toLowerCase()];
|
||||
else snapshot[name.toLowerCase()] = value;
|
||||
};
|
||||
for (const name of res.getHeaderNames()) sync(name);
|
||||
return new Proxy(snapshot, {
|
||||
get: (_, name) => read(name),
|
||||
has: (_, name) => read(name) !== void 0,
|
||||
set(_, name, value) {
|
||||
if (typeof name === "string") {
|
||||
if (value === void 0 || value === null) res.removeHeader(name);
|
||||
else res.setHeader(name, value);
|
||||
sync(name);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
deleteProperty(_, name) {
|
||||
if (typeof name === "string") {
|
||||
res.removeHeader(name);
|
||||
sync(name);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
ownKeys: () => res.getHeaderNames().filter((name) => name !== "set-cookie"),
|
||||
getOwnPropertyDescriptor(_, name) {
|
||||
const value = read(name);
|
||||
return value === void 0 ? void 0 : {
|
||||
value,
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//#region src/runtime/utils/paths.ts
|
||||
function baseURL() {
|
||||
return useRuntimeConfig().app.baseURL;
|
||||
}
|
||||
function buildAssetsDir() {
|
||||
return useRuntimeConfig().app.buildAssetsDir;
|
||||
}
|
||||
function buildAssetsURL(...path) {
|
||||
return joinRelativeURL(publicAssetsURL(), buildAssetsDir(), ...path);
|
||||
}
|
||||
function publicAssetsURL(...path) {
|
||||
const app = useRuntimeConfig().app;
|
||||
const publicBase = app.cdnURL || app.baseURL;
|
||||
return path.length ? joinRelativeURL(publicBase, ...path) : publicBase;
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/cache.ts
|
||||
function lazyCachedFunction(fn) {
|
||||
let res = null;
|
||||
return () => {
|
||||
if (res === null) res = fn().catch((err) => {
|
||||
res = null;
|
||||
throw err;
|
||||
});
|
||||
return res;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* E8xxx
|
||||
* SSR rendering diagnostics, sharing the range with the server runtime that
|
||||
* hosts the renderer.
|
||||
*/
|
||||
const docsBase = (code) => `https://nuxt.com/docs/4.x/errors/${code.replace("NUXT_", "").toLowerCase()}`;
|
||||
const rendererDiagnostics = /* #__PURE__ */ defineDiagnostics({
|
||||
docsBase,
|
||||
reporters: [/* @__PURE__ */ createConsoleReporter(void 0)],
|
||||
codes: {
|
||||
NUXT_E8001: {
|
||||
why: (p) => `\`render:html\` mutated \`body\`/\`bodyAppend\` while streaming (\`${p.path}\`). These fields are silently dropped because the body is about to stream.`,
|
||||
fix: "Use the `render:html:close` hook instead.",
|
||||
docs: false
|
||||
},
|
||||
NUXT_E8002: {
|
||||
why: (p) => `SSR streaming committed the response before render completed (\`${p.path}\`). The following mutations did not reach the client and were dropped:\n - ${p.mutations}`,
|
||||
fix: (p) => `Move the mutation into a plugin (which runs before the shell is flushed), or opt this route out of streaming with \`routeRules: { '${p.path}': { streaming: false } }\` or the \`render:route\` hook.`,
|
||||
docs: false
|
||||
},
|
||||
NUXT_E8004: {
|
||||
why: "The server bundle is not available.",
|
||||
fix: "Ensure the Nuxt build completed successfully and the server entry was emitted by your builder.",
|
||||
docs: false
|
||||
},
|
||||
NUXT_E8006: {
|
||||
why: (p) => `The payload for \`${p.path}\` is ${p.size}, which will increase the page size and slow down hydration.${p.keys ? ` Largest payload keys:\n - ${p.keys}` : ""}`,
|
||||
fix: "Use the `pick` or `transform` options of `useAsyncData`/`useFetch` to strip out data the client does not need.",
|
||||
docs: false
|
||||
},
|
||||
NUXT_E8007: {
|
||||
why: (p) => `\`${p.path}\` relies on client-side JavaScript, but \`features.noScripts: 'production'\` will strip scripts from this route in production:\n - ${p.reasons}`,
|
||||
fix: "Remove the client-side dependency from this route, or scope script stripping with the `noScripts` route rule instead of enabling it globally."
|
||||
},
|
||||
NUXT_E8009: {
|
||||
why: (p) => `A page error interrupted the stream for \`${p.path}\`, and ${p.what} also failed while rendering the error response.\n ${p.cause}`,
|
||||
fix: "Fix the page error first. If it keeps happening, report the failure below - the browser will show a blank or partial page instead of the error page."
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//#region src/runtime/server/renderer/build-files.ts
|
||||
const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
|
||||
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
|
||||
const getServerEntry = () => import('../virtual/entry.mjs').then(function (n) { return n.aj; }).then((r) => r.default || r);
|
||||
const getPrecomputedDependencies = () => import('../virtual/precomputed.mjs').then((r) => "default" in r ? r.default : r).then((r) => typeof r === "function" ? r() : r);
|
||||
/** Load the build artifacts for a set of renderer options, caching each of them on the returned object. */
|
||||
function createBuildFiles(options) {
|
||||
const buildAssetsURL = (...path) => options.buildAssetsURL(...path);
|
||||
const getSSRRenderer = lazyCachedFunction(async () => {
|
||||
const createSSRApp = await getServerEntry();
|
||||
if (!createSSRApp) throw rendererDiagnostics.NUXT_E8004();
|
||||
const precomputed = await getPrecomputedDependencies();
|
||||
const renderer = createRenderer(createSSRApp, {
|
||||
precomputed,
|
||||
manifest: void 0,
|
||||
renderToString: renderToString$1,
|
||||
buildAssetsURL
|
||||
});
|
||||
async function renderToString$1(input, context) {
|
||||
const html = await renderToString(input, context);
|
||||
return APP_ROOT_OPEN_TAG + html + APP_ROOT_CLOSE_TAG;
|
||||
}
|
||||
return renderer;
|
||||
});
|
||||
const getSPARenderer = lazyCachedFunction(async () => {
|
||||
const precomputed = await getPrecomputedDependencies();
|
||||
const template = renderSPATemplate();
|
||||
const renderer = createRenderer(() => () => {}, {
|
||||
precomputed,
|
||||
manifest: void 0,
|
||||
renderToString: () => template,
|
||||
buildAssetsURL
|
||||
});
|
||||
const result = await renderer.renderToString({});
|
||||
const renderToString = (ssrContext) => {
|
||||
const config = ssrContext.runtimeConfig;
|
||||
ssrContext.modules ||= /* @__PURE__ */ new Set();
|
||||
ssrContext.payload.serverRendered = false;
|
||||
ssrContext.config = {
|
||||
public: config.public,
|
||||
app: config.app
|
||||
};
|
||||
return Promise.resolve(result);
|
||||
};
|
||||
return {
|
||||
rendererContext: renderer.rendererContext,
|
||||
renderToString
|
||||
};
|
||||
});
|
||||
return {
|
||||
getRenderer: (ssrContext) => ssrContext.noSSR ? getSPARenderer() : getSSRRenderer(),
|
||||
getSSRRenderer,
|
||||
getServerApp: lazyCachedFunction(getServerEntry)
|
||||
};
|
||||
}
|
||||
function renderSPATemplate() {
|
||||
{
|
||||
`<${appSpaLoaderTag}${propsToString(appSpaLoaderAttrs)}>`;
|
||||
return APP_ROOT_OPEN_TAG + APP_ROOT_CLOSE_TAG + ("");
|
||||
}
|
||||
}
|
||||
const getSSRStyles = lazyCachedFunction(() => import('../virtual/styles.mjs').then((r) => r.default || r));
|
||||
const getInlinedCSS = lazyCachedFunction(() => import('../virtual/styles.mjs').then((r) => r.inlinedCSS || {}));
|
||||
|
||||
//#region src/runtime/server/renderer/instance.ts
|
||||
/**
|
||||
* Create the renderer state for a set of options.
|
||||
*
|
||||
* Called by `createNuxtRenderer()`; call it directly only to render against the same
|
||||
* artifacts as a renderer created elsewhere (an island handler sharing the server bundle
|
||||
* loaded for page renders), and pass the result to `createNuxtRenderer()`.
|
||||
*/
|
||||
function createRendererInstance(options) {
|
||||
return {
|
||||
options,
|
||||
...createBuildFiles(options)
|
||||
};
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/runtime.ts
|
||||
/** The event to pass to application code and to the render hooks. */
|
||||
function appEvent(event) {
|
||||
return event["~app"] ?? event;
|
||||
}
|
||||
function getRequestState(event) {
|
||||
return event.context.nuxt;
|
||||
}
|
||||
|
||||
//#region src/runtime/utils/renderer/options.ts
|
||||
globalThis.__buildAssetsURL = buildAssetsURL;
|
||||
globalThis.__publicAssetsURL = publicAssetsURL;
|
||||
/** The capabilities a nitropack v2 host provides to the Nuxt renderer. */
|
||||
const rendererOptions = {
|
||||
runtimeConfig: (event) => useRuntimeConfig(appEvent(event)),
|
||||
buildAssetsURL,
|
||||
publicAssetsURL,
|
||||
getRouteRules: (event) => getRouteRules(appEvent(event)),
|
||||
hooks: () => useNitroApp().hooks,
|
||||
createResponse: (body, init) => new NodeRenderResponse(body, init),
|
||||
createError: (init) => createError({
|
||||
statusCode: init.status,
|
||||
statusMessage: init.statusText,
|
||||
message: init.statusText,
|
||||
data: init.data
|
||||
}),
|
||||
writeEarlyHints: (event, hints) => writeEarlyHints(appEvent(event), hints.link),
|
||||
onRenderSuccess: void 0,
|
||||
prerender: void 0
|
||||
};
|
||||
/**
|
||||
* The renderer the page and island handlers share, so that both render against a single
|
||||
* load of the server bundle and its manifest.
|
||||
*/
|
||||
const rendererInstance = createRendererInstance(rendererOptions);
|
||||
|
||||
//#region src/runtime/server/renderer/url.ts
|
||||
/**
|
||||
* The fragment of a request URL, avoiding the lazy URL parse that reading `hash` triggers when
|
||||
* there is none. A fragment is never sent over the wire, so it can only appear on a URL the
|
||||
* server constructed itself.
|
||||
*/
|
||||
function urlHash(url) {
|
||||
return url.href.includes("#") ? url.hash : "";
|
||||
}
|
||||
const PAYLOAD_BUILD_ID_PARAM = "_b";
|
||||
/** Parse a request path without treating a leading `//` as an authority. */
|
||||
function parseRequestPath(path) {
|
||||
return new URL("http://localhost" + path);
|
||||
}
|
||||
/** The page route a `_payload.json` (or `_payload.js`) request renders, without the build id param. */
|
||||
function payloadRequestToRoute(path, filename = "_payload.json") {
|
||||
const payloadURL = parseRequestPath(path);
|
||||
const url = payloadURL.pathname.slice(0, -`/${filename}`.length) || "/";
|
||||
payloadURL.searchParams.delete(PAYLOAD_BUILD_ID_PARAM);
|
||||
return url + payloadURL.search;
|
||||
}
|
||||
const LEADING_SLASHES_RE = /^\/+/;
|
||||
const TRAILING_SLASHES_RE = /\/*$/;
|
||||
/** The same-origin `_payload.json` (or `_payload.js`) URL for a page route, tagged with the build id. */
|
||||
function routeToPayloadURL(baseURL, path, buildId, filename = "_payload.json") {
|
||||
const request = parseRequestPath(path);
|
||||
const base = new URL(baseURL.replace(TRAILING_SLASHES_RE, "/"), "http://localhost");
|
||||
const route = request.pathname.replace(LEADING_SLASHES_RE, "").replace(TRAILING_SLASHES_RE, "/");
|
||||
const url = new URL("./" + (route === "/" ? "" : route) + filename, base);
|
||||
url.search = request.search;
|
||||
url.searchParams.set(PAYLOAD_BUILD_ID_PARAM, buildId);
|
||||
return URL.canParse(baseURL) ? url.href : url.pathname + url.search;
|
||||
}
|
||||
/** `url` with its path and query replaced by those of the request path `path`, keeping its origin. */
|
||||
function withRequestPath(url, path) {
|
||||
const request = parseRequestPath(path);
|
||||
const target = new URL(url);
|
||||
target.pathname = request.pathname;
|
||||
target.search = request.search;
|
||||
return target;
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/app.ts
|
||||
new Set(NUXT_PRERENDER_NO_SSR_ROUTES);
|
||||
function createServerHead() {
|
||||
return createHead(unheadOptions);
|
||||
}
|
||||
function createSSRContext(options, event) {
|
||||
const url = event.url.pathname + event.url.search + urlHash(event.url);
|
||||
const ssrContext = {
|
||||
url,
|
||||
event: appEvent(event),
|
||||
runtimeConfig: options.runtimeConfig(event),
|
||||
noSSR: getRequestState(event)?.noSSR || (false),
|
||||
head: createServerHead(),
|
||||
error: false,
|
||||
nuxt: void 0,
|
||||
payload: {},
|
||||
["~payloadReducers"]: Object.create(null),
|
||||
modules: /* @__PURE__ */ new Set()
|
||||
};
|
||||
return ssrContext;
|
||||
}
|
||||
/**
|
||||
* Turn the response the renderer assembled into a web-standard `Response`, carrying the
|
||||
* headers queued on the event alongside the ones the response names for itself.
|
||||
*/
|
||||
function returnRenderResponse(options, event, response) {
|
||||
const headers = new Headers(event.res.headers);
|
||||
for (const name in response.headers) headers.set(name, response.headers[name]);
|
||||
return options.createResponse(response.body ?? null, {
|
||||
status: response.statusCode ?? event.res.status,
|
||||
statusText: response.statusMessage ?? event.res.statusText,
|
||||
headers
|
||||
});
|
||||
}
|
||||
function setSSRError(ssrContext, error) {
|
||||
ssrContext.error = true;
|
||||
ssrContext.payload = { error };
|
||||
ssrContext.url = error.url;
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/payload.ts
|
||||
function renderPayloadResponse(ssrContext, event) {
|
||||
return {
|
||||
body: encodeForwardSlashes(stringify(splitPayload(ssrContext).payload, ssrContext["~payloadReducers"])) ,
|
||||
statusCode: event.res.status,
|
||||
statusMessage: event.res.statusText,
|
||||
headers: {
|
||||
"content-type": "application/json;charset=utf-8" ,
|
||||
"x-powered-by": "Nuxt"
|
||||
}
|
||||
};
|
||||
}
|
||||
function renderPayloadJsonScript(opts) {
|
||||
const contents = opts.data ? encodeForwardSlashes(stringify(opts.data, opts.ssrContext["~payloadReducers"])) : "";
|
||||
const payload = {
|
||||
"type": "application/json",
|
||||
"innerHTML": contents,
|
||||
"data-nuxt-data": appId,
|
||||
"data-ssr": !(opts.ssrContext.noSSR)
|
||||
};
|
||||
payload.id = "__NUXT_DATA__";
|
||||
if (opts.src) payload["data-src"] = opts.src;
|
||||
const config = uneval(opts.ssrContext.config);
|
||||
return [payload, { innerHTML: `window.__NUXT__={};window.__NUXT__.config=${config}` }];
|
||||
}
|
||||
/**
|
||||
* Encode forward slashes as unicode escape sequences to prevent
|
||||
* Google from treating them as internal links and trying to crawl them.
|
||||
* @see https://github.com/nuxt/nuxt/issues/24175
|
||||
*/
|
||||
function encodeForwardSlashes(str) {
|
||||
return str.replaceAll("/", "\\u002F");
|
||||
}
|
||||
function splitPayload(ssrContext) {
|
||||
const { data, prerenderedAt, prefetchLinks, ...initial } = ssrContext.payload;
|
||||
const payload = {
|
||||
data,
|
||||
prerenderedAt
|
||||
};
|
||||
if (prefetchLinks?.length) payload.prefetchLinks = prefetchLinks;
|
||||
return {
|
||||
initial: {
|
||||
...initial,
|
||||
prerenderedAt
|
||||
},
|
||||
payload
|
||||
};
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/inline-styles.ts
|
||||
async function renderInlineStyles(usedModules) {
|
||||
const styleMap = await getSSRStyles();
|
||||
const inlinedStyles = /* @__PURE__ */ new Set();
|
||||
const promises = [];
|
||||
for (const mod of usedModules) if (mod in styleMap && styleMap[mod]) promises.push(styleMap[mod]());
|
||||
for (const styles of await Promise.all(promises)) for (const style of styles) inlinedStyles.add(style);
|
||||
return Array.from(inlinedStyles).map((style) => ({ innerHTML: style }));
|
||||
}
|
||||
|
||||
//#region src/runtime/server/renderer/inlined-css.ts
|
||||
/**
|
||||
* Build a predicate telling whether the contents of an emitted CSS file were
|
||||
* inlined as `<style>` tags for this request, meaning its `<link>` can be
|
||||
* dropped.
|
||||
*
|
||||
* The builder can only remove a link at build time when every CSS source in
|
||||
* the file is inlined for a module that is always rendered. For the rest it
|
||||
* records the modules that inline each source, and the answer depends on what
|
||||
* the request actually rendered: a component inside `<ClientOnly>` never
|
||||
* reaches `ssrContext.modules`, so its styles are only ever delivered by the
|
||||
* link. (#36058)
|
||||
*/
|
||||
async function createInlinedCSSFilter(modules) {
|
||||
const inlinedCSS = await getInlinedCSS();
|
||||
return (file) => {
|
||||
const conditions = inlinedCSS[file.slice(file.lastIndexOf("/") + 1)];
|
||||
if (!conditions) return false;
|
||||
if (!modules?.size) return false;
|
||||
for (const inliners of conditions) {
|
||||
let inlined = false;
|
||||
for (const id of inliners) if (modules.has(id)) {
|
||||
inlined = true;
|
||||
break;
|
||||
}
|
||||
if (!inlined) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
const entryIds = [];
|
||||
|
||||
const entryFileName = "DlDWjZRl.js";
|
||||
|
||||
//#region src/runtime/server/renderer/index.ts
|
||||
const HAS_APP_TELEPORTS = !!(appTeleportAttrs.id);
|
||||
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : "";
|
||||
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : "";
|
||||
const PAYLOAD_URL_RE = /^[^?]*\/_payload.json(?:\?.*)?$/ ;
|
||||
const PAYLOAD_FILENAME = "_payload.json" ;
|
||||
/**
|
||||
* Create a Nuxt SSR renderer, returning a web-standard handler for the requests a Nuxt
|
||||
* app serves from its pages.
|
||||
*
|
||||
* Everything the renderer reads belongs to the renderer it was created for, so a bundle
|
||||
* may create as many as it needs. Pass an instance from `createRendererInstance()` to
|
||||
* render against the artifacts already loaded for another renderer.
|
||||
*/
|
||||
function createNuxtRenderer(optionsOrInstance) {
|
||||
const instance = "getRenderer" in optionsOrInstance ? optionsOrInstance : createRendererInstance(optionsOrInstance);
|
||||
return { fetch: (event) => fetch(instance, event) };
|
||||
}
|
||||
function fetch(instance, event) {
|
||||
const runtime = instance.options;
|
||||
const isErrorRoute = event.url.pathname.startsWith("/__nuxt_error");
|
||||
if (isErrorRoute && !getRequestState(event)?.["~rendering-error"]) {
|
||||
return Promise.reject(runtime.createError({
|
||||
status: 404,
|
||||
statusText: "Page Not Found: /__nuxt_error"
|
||||
}));
|
||||
}
|
||||
const ssrError = isErrorRoute ? getQuery(event.url.href) : null;
|
||||
const render = () => renderRoute(instance, event, ssrError).then((response) => returnRenderResponse(runtime, event, response));
|
||||
const rendering = render();
|
||||
return rendering;
|
||||
}
|
||||
async function renderRoute(instance, event, ssrError) {
|
||||
const runtime = instance.options;
|
||||
const hooks = runtime.hooks();
|
||||
const hookEvent = appEvent(event);
|
||||
runtime.prerender?.payloadCache;
|
||||
const ssrContext = createSSRContext(runtime, event);
|
||||
ssrContext.head.push(appHead);
|
||||
if (ssrError) {
|
||||
const status = ssrError.status || ssrError.statusCode;
|
||||
if (status) ssrError.status = ssrError.statusCode = Number.parseInt(status);
|
||||
if (typeof ssrError.data === "string") try {
|
||||
ssrError.data = destr(ssrError.data);
|
||||
} catch {}
|
||||
setSSRError(ssrContext, ssrError);
|
||||
}
|
||||
const routeOptions = runtime.getRouteRules(event);
|
||||
const NO_SCRIPTS = !!routeOptions.noScripts;
|
||||
if (routeOptions.ssr === false && true) ssrContext.noSSR = true;
|
||||
const _PAYLOAD_EXTRACTION = !ssrContext.noSSR && !ssrError && !!((routeOptions.isr || routeOptions.cache));
|
||||
const _PAYLOAD_INLINE = !_PAYLOAD_EXTRACTION || NUXT_PAYLOAD_INLINE;
|
||||
const isRenderingPayload = (_PAYLOAD_EXTRACTION || false) && PAYLOAD_URL_RE.test(ssrContext.url);
|
||||
if (isRenderingPayload) {
|
||||
ssrContext.url = payloadRequestToRoute(ssrContext.url, PAYLOAD_FILENAME);
|
||||
event.url = withRequestPath(event.url, ssrContext.url);
|
||||
getPayloadCacheKey(ssrContext.url);
|
||||
}
|
||||
const payloadURL = _PAYLOAD_EXTRACTION ? buildPayloadURL(ssrContext) : void 0;
|
||||
const renderer = await instance.getRenderer(ssrContext);
|
||||
for (const id of entryIds) ssrContext.modules.add(id);
|
||||
const canStream = NUXT_SSR_STREAMING;
|
||||
const renderRouteContext = {
|
||||
canStream,
|
||||
prefersStream: false
|
||||
};
|
||||
await hooks.callHook("render:route", renderRouteContext, { event: hookEvent });
|
||||
const _rendered = await (renderer.renderToString(ssrContext)).catch(async (error) => {
|
||||
if ((ssrContext["~renderResponse"] || ssrContext._renderResponse) && error.message === "skipping render") return {};
|
||||
const _err = !ssrError && ssrContext.payload?.error || error;
|
||||
await ssrContext.nuxt?.hooks.callHook("app:error", _err);
|
||||
throw _err;
|
||||
});
|
||||
const inlinedStyles = !ssrContext["~renderResponse"] && !ssrContext._renderResponse && !isRenderingPayload ? await renderInlineStyles(ssrContext.modules ?? []) : [];
|
||||
await ssrContext.nuxt?.hooks.callHook("app:rendered", {
|
||||
ssrContext,
|
||||
renderResult: _rendered
|
||||
});
|
||||
if (ssrContext["~renderResponse"] || ssrContext._renderResponse) return ssrContext["~renderResponse"] || ssrContext._renderResponse;
|
||||
if (ssrContext.payload?.error && !ssrError) throw ssrContext.payload.error;
|
||||
if (isRenderingPayload) {
|
||||
const response = renderPayloadResponse(ssrContext, event);
|
||||
return response;
|
||||
}
|
||||
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
||||
pushNoScriptsHints(ssrContext, NO_SCRIPTS);
|
||||
if (!NO_SCRIPTS) {
|
||||
const path = entryImportMapPath(instance, event, ssrContext);
|
||||
ssrContext.head.push({ script: [{
|
||||
type: "importmap",
|
||||
innerHTML: { imports: { "#entry": path } }
|
||||
}] });
|
||||
}
|
||||
if (_PAYLOAD_EXTRACTION && !_PAYLOAD_INLINE && !NO_SCRIPTS) ssrContext.head.push({ link: [{
|
||||
rel: "preload",
|
||||
as: "fetch",
|
||||
crossorigin: "anonymous",
|
||||
href: payloadURL
|
||||
} ] });
|
||||
if (inlinedStyles.length) ssrContext.head.push({ style: inlinedStyles });
|
||||
const link = [];
|
||||
const inlinedHrefs = [];
|
||||
const isCSSInlined = await createInlinedCSSFilter(ssrContext.modules) ;
|
||||
for (const resource of Object.values(styles)) {
|
||||
if (isCSSInlined?.(resource.file)) {
|
||||
inlinedHrefs.push(renderer.rendererContext.buildAssetsURL(resource.file));
|
||||
continue;
|
||||
}
|
||||
link.push({
|
||||
rel: "stylesheet",
|
||||
href: renderer.rendererContext.buildAssetsURL(resource.file),
|
||||
crossorigin: ""
|
||||
});
|
||||
}
|
||||
if (link.length) ssrContext.head.push({ link });
|
||||
const dependencyOptions = {
|
||||
exclude: ssrContext["~lazyHydratedModules"]?.size ? ssrContext["~lazyHydratedModules"] : void 0,
|
||||
scripts: !NO_SCRIPTS
|
||||
};
|
||||
const excludeHrefs = new Set(link.map((l) => l.href));
|
||||
for (const href of inlinedHrefs) excludeHrefs.add(href);
|
||||
for (const id of ssrContext["~neverHydratedModules"] ?? []) {
|
||||
const file = renderer.rendererContext.manifest?.[id]?.file;
|
||||
if (file) excludeHrefs.add(renderer.rendererContext.buildAssetsURL(file));
|
||||
}
|
||||
const hints = [];
|
||||
for (const l of getPreloadLinks(ssrContext, renderer.rendererContext, dependencyOptions)) if (!excludeHrefs.has(l.href)) hints.push(l);
|
||||
for (const l of getPrefetchLinks(ssrContext, renderer.rendererContext, dependencyOptions)) if (!excludeHrefs.has(l.href)) hints.push(l);
|
||||
if (hints.length) ssrContext.head.push({ link: hints });
|
||||
if (!NO_SCRIPTS) ssrContext.head.push({ script: _PAYLOAD_INLINE ? renderPayloadJsonScript({
|
||||
ssrContext,
|
||||
data: stripInlineOnlyPayloadFields(ssrContext.payload)
|
||||
}) : renderPayloadJsonScript({
|
||||
ssrContext,
|
||||
data: splitPayload(ssrContext).initial,
|
||||
src: payloadURL
|
||||
}) }, {
|
||||
tagPosition: "bodyClose",
|
||||
tagPriority: "high"
|
||||
});
|
||||
if (!routeOptions.noScripts) {
|
||||
const tagPosition = "head";
|
||||
ssrContext.head.push({ script: Object.values(scripts).map((resource) => ({
|
||||
type: resource.module ? "module" : null,
|
||||
src: renderer.rendererContext.buildAssetsURL(resource.file),
|
||||
defer: resource.module ? null : true,
|
||||
tagPosition,
|
||||
crossorigin: ""
|
||||
})) });
|
||||
}
|
||||
const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = renderSSRHead(ssrContext.head, renderSSRHeadOptions);
|
||||
const htmlContext = {
|
||||
htmlAttrs: htmlAttrs ? [htmlAttrs] : [],
|
||||
head: normalizeChunks([headTags]),
|
||||
bodyAttrs: bodyAttrs ? [bodyAttrs] : [],
|
||||
bodyPrepend: normalizeChunks([bodyTagsOpen, ssrContext.teleports?.body]),
|
||||
body: [_rendered.html, APP_TELEPORT_OPEN_TAG + (HAS_APP_TELEPORTS ? joinTags([ssrContext.teleports?.[`#${appTeleportAttrs.id}`]]) : "") + APP_TELEPORT_CLOSE_TAG],
|
||||
bodyAppend: [bodyTags]
|
||||
};
|
||||
await hooks.callHook("render:html", htmlContext, { event: hookEvent });
|
||||
return {
|
||||
body: renderHTMLDocument(htmlContext),
|
||||
statusCode: event.res.status,
|
||||
statusMessage: event.res.statusText,
|
||||
headers: {
|
||||
"content-type": "text/html;charset=utf-8",
|
||||
"x-powered-by": "Nuxt"
|
||||
}
|
||||
};
|
||||
}
|
||||
function getPayloadCacheKey(url) {
|
||||
const { pathname, search } = new URL(url, "http://localhost");
|
||||
return (pathname === "/" ? "/" : pathname.replace(/\/$/, "")) + (search ? encodeURIComponent(search) : "") + ".json";
|
||||
}
|
||||
/**
|
||||
* Routes served without scripts navigate with full-page loads. This emits the
|
||||
* declarative navigation hints that speed those up, on both the pages served
|
||||
* without scripts (a blanket rule over same-origin links) and scripted pages
|
||||
* that may link to them (rules scoped to the `noScripts` route patterns):
|
||||
*
|
||||
* - speculation rules, so supporting browsers prefetch and prerender the
|
||||
* target ahead of the navigation;
|
||||
* - when view transitions are enabled, an opt-in to same-origin cross-document
|
||||
* view transitions, animating the navigation without a client runtime (the
|
||||
* client-side `startViewTransition` plugin is not shipped).
|
||||
*
|
||||
* Both tags are declarative and execute no JavaScript.
|
||||
*/
|
||||
function pushNoScriptsHints(ssrContext, noScripts) {
|
||||
if (noScripts) pushSpeculationRulesScript(ssrContext, NUXT_PAGE_PATTERNS.length ? NUXT_PAGE_PATTERNS : ["/*"]);
|
||||
else if (NUXT_NO_SCRIPTS_PATTERNS.length) pushSpeculationRulesScript(ssrContext, NUXT_NO_SCRIPTS_PATTERNS);
|
||||
else return;
|
||||
}
|
||||
const entryPaths = /* @__PURE__ */ new WeakMap();
|
||||
/** URL of the hashed entry chunk, which `#entry` is pinned to so chunk hashes stay stable across it. */
|
||||
function entryImportMapPath(instance, event, ssrContext) {
|
||||
const cached = entryPaths.get(instance);
|
||||
if (cached) return cached;
|
||||
const url = instance.options.buildAssetsURL(entryFileName);
|
||||
if (ssrContext.runtimeConfig.app.cdnURL || /^(?:\/|\.+\/)/.test(url)) {
|
||||
entryPaths.set(instance, url);
|
||||
return url;
|
||||
}
|
||||
const path = relative(event.url.pathname.replace(/\/[^/]+$/, "/"), joinURL("/", url));
|
||||
return /^(?:\/|\.+\/)/.test(path) ? path : `./${path}`;
|
||||
}
|
||||
function pushSpeculationRulesScript(ssrContext, patterns) {
|
||||
const rules = patterns.map((href_matches) => ({
|
||||
where: { href_matches },
|
||||
eagerness: "moderate"
|
||||
}));
|
||||
ssrContext.head.push({ script: [{
|
||||
tagPosition: "head",
|
||||
type: "speculationrules",
|
||||
innerHTML: {
|
||||
prefetch: rules,
|
||||
prerender: rules
|
||||
}
|
||||
}] });
|
||||
}
|
||||
function buildPayloadURL(ssrContext) {
|
||||
const baseURL = ssrContext.runtimeConfig.app.cdnURL || ssrContext.runtimeConfig.app.baseURL;
|
||||
return routeToPayloadURL(baseURL, ssrContext.url, ssrContext.runtimeConfig.app.buildId, PAYLOAD_FILENAME);
|
||||
}
|
||||
function normalizeChunks(chunks) {
|
||||
const result = [];
|
||||
for (const _chunk of chunks) {
|
||||
const chunk = _chunk?.trim();
|
||||
if (chunk) result.push(chunk);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function joinTags(tags) {
|
||||
return tags.join("");
|
||||
}
|
||||
function joinAttrs(chunks) {
|
||||
if (chunks.length === 0) return "";
|
||||
return " " + chunks.join(" ");
|
||||
}
|
||||
function renderHTMLDocument(html) {
|
||||
return `<!DOCTYPE html><html${joinAttrs(html.htmlAttrs)}><head>${joinTags(html.head)}</head><body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body></html>`;
|
||||
}
|
||||
function stripInlineOnlyPayloadFields(payload) {
|
||||
if (!payload.prefetchLinks) return payload;
|
||||
const { prefetchLinks: _, ...rest } = payload;
|
||||
return rest;
|
||||
}
|
||||
|
||||
const renderer = createNuxtRenderer(rendererInstance);
|
||||
const handler = defineRenderHandler(async (event) => {
|
||||
const response = await renderer.fetch(toRequestEvent(event));
|
||||
for (const [name, value] of response.headers) {
|
||||
if (name === "set-cookie") continue;
|
||||
setResponseHeader(event, name, value);
|
||||
}
|
||||
return {
|
||||
body: response.body,
|
||||
statusCode: response.status,
|
||||
statusMessage: response.statusText || void 0,
|
||||
headers: createResponseHeaderRecord(event.node.res)
|
||||
};
|
||||
});
|
||||
|
||||
const renderer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
||||
__proto__: null,
|
||||
default: handler
|
||||
}, Symbol.toStringTag, { value: 'Module' }));
|
||||
|
||||
export { baseURL as b, publicAssetsURL as p, renderer$1 as r };
|
||||
//# sourceMappingURL=renderer.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"renderer.mjs","sources":["../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.6.2_fbe41d24c9f3c490f436923e6993b09f/node_modules/@nuxt/nitro-server/dist/runtime/utils/response.mjs","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.6.2_fbe41d24c9f3c490f436923e6993b09f/node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.mjs","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/cache.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/diagnostics.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/build-files.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/instance.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/runtime.js","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.6.2_fbe41d24c9f3c490f436923e6993b09f/node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/options.mjs","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/url.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/app.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/payload.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/inline-styles.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/inlined-css.js","../../../../../../node_modules/.pnpm/nuxt@4.6.2_@babel+plugin-sy_c474c58bd1a08492d1f039ec0a278899/node_modules/nuxt/dist/runtime/server/renderer/index.js","../../../../../../node_modules/.pnpm/@nuxt+nitro-server@4.6.2_fbe41d24c9f3c490f436923e6993b09f/node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { c as defineEventHandler, u as useRuntimeConfig, h as setHeader } from '../_/nitro.mjs';
|
||||
import { a as absUrl } from '../_/api.mjs';
|
||||
import 'unhead/server';
|
||||
import 'vue';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
|
||||
const robots_txt = defineEventHandler((event) => {
|
||||
const { siteUrl } = useRuntimeConfig().public;
|
||||
setHeader(event, "Content-Type", "text/plain; charset=utf-8");
|
||||
return [
|
||||
"User-Agent: *",
|
||||
"Allow: /",
|
||||
"Disallow: /_internal/",
|
||||
"",
|
||||
`Host: ${siteUrl}`,
|
||||
`Sitemap: ${absUrl("/sitemap.xml")}`,
|
||||
""
|
||||
].join("\n");
|
||||
});
|
||||
|
||||
export { robots_txt as default };
|
||||
//# sourceMappingURL=robots.txt.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"robots.txt.mjs","sources":["../../../../server/routes/robots.txt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mBAAe,kBAAA,CAAmB,CAAC,KAAA,KAAU;AAC3C,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,gBAAA,EAAiB,CAAE,MAAA;AACvC,EAAA,SAAA,CAAU,KAAA,EAAO,gBAAgB,2BAA2B,CAAA;AAC5D,EAAA,OAAO;AAAA,IACL,eAAA;AAAA,IACA,UAAA;AAAA,IACA,uBAAA;AAAA,IACA,EAAA;AAAA,IACA,SAAS,OAAO,CAAA,CAAA;AAAA,IAChB,CAAA,SAAA,EAAY,MAAA,CAAO,cAAc,CAAC,CAAA,CAAA;AAAA,IAClC;AAAA,GACF,CAAE,KAAK,IAAI,CAAA;AACb,CAAC,CAAA;;"}
|
||||
@@ -0,0 +1,47 @@
|
||||
import { c as defineEventHandler, h as setHeader } from '../_/nitro.mjs';
|
||||
import { b as fetchCategories, s as serverApi, a as absUrl } from '../_/api.mjs';
|
||||
import 'unhead/server';
|
||||
import 'vue';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
|
||||
const sitemap_xml = defineEventHandler(async (event) => {
|
||||
const [categories, products] = await Promise.all([
|
||||
fetchCategories(),
|
||||
serverApi("/public/products")
|
||||
]);
|
||||
const pages = [
|
||||
{ loc: "/", priority: "1" },
|
||||
...categories.map((c) => ({ loc: `/categories/${c.slug}`, priority: "0.8" })),
|
||||
...products.map((p) => ({ loc: `/products/${p.slug}`, priority: "0.6", lastmod: p.updatedAt }))
|
||||
];
|
||||
setHeader(event, "Content-Type", "application/xml; charset=utf-8");
|
||||
const lastmod = (/* @__PURE__ */ new Date()).toISOString();
|
||||
const urls = pages.map(
|
||||
(p) => {
|
||||
var _a;
|
||||
return `<url>
|
||||
<loc>${absUrl(p.loc)}</loc>
|
||||
<lastmod>${(_a = p.lastmod) != null ? _a : lastmod}</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>${p.priority}</priority>
|
||||
</url>`;
|
||||
}
|
||||
).join("\n");
|
||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
${urls}
|
||||
</urlset>
|
||||
`;
|
||||
});
|
||||
|
||||
export { sitemap_xml as default };
|
||||
//# sourceMappingURL=sitemap.xml.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sitemap.xml.mjs","sources":["../../../../server/routes/sitemap.xml.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,oBAAe,kBAAA,CAAmB,OAAO,KAAA,KAAU;AACjD,EAAA,MAAM,CAAC,UAAA,EAAY,QAAQ,CAAA,GAAI,MAAM,QAAQ,GAAA,CAAI;AAAA,IAC/C,eAAA,EAAgB;AAAA,IAChB,UAA8B,kBAAkB;AAAA,GACjD,CAAA;AACD,EAAA,MAAM,KAAA,GAAwB;AAAA,IAC5B,EAAE,GAAA,EAAK,GAAA,EAAK,QAAA,EAAU,GAAA,EAAI;AAAA,IAC1B,GAAG,UAAA,CAAW,GAAA,CAAI,CAAC,CAAA,MAAO,EAAE,GAAA,EAAK,CAAA,YAAA,EAAe,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,QAAA,EAAU,OAAM,CAAE,CAAA;AAAA,IAC5E,GAAG,QAAA,CAAS,GAAA,CAAI,CAAC,CAAA,MAAO,EAAE,GAAA,EAAK,CAAA,UAAA,EAAa,CAAA,CAAE,IAAI,IAAI,QAAA,EAAU,KAAA,EAAO,OAAA,EAAS,CAAA,CAAE,WAAU,CAAE;AAAA,GAChG;AAEA,EAAA,SAAA,CAAU,KAAA,EAAO,gBAAgB,gCAAgC,CAAA;AACjE,EAAA,MAAM,OAAA,GAAA,iBAAU,IAAI,IAAA,EAAK,EAAE,WAAA,EAAY;AACvC,EAAA,MAAM,OAAO,KAAA,CACV,GAAA;AAAA,IACC,CAAC,CAAA,KAAG;;AACF,MAAA,OAAA,CAAA;AAAA,KAAA,EAAe,MAAA,CAAO,CAAA,CAAE,GAAG,CAAC,CAAA;AAAA,SAAA,EAAA,CAAoB,EAAA,GAAA,CAAA,CAAE,OAAA,KAAF,IAAA,GAAA,EAAA,GAAa,OAAO,CAAA;AAAA;AAAA,UAAA,EAA0D,EAAE,QAAQ,CAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,GAC5I,CACC,KAAK,IAAI,CAAA;AACZ,EAAA,OAAO,CAAA;AAAA;AAAA,EAAyG,IAAI;AAAA;AAAA,CAAA;AACtH,CAAC,CAAA;;"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"precomputed.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/client.precomputed.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0]}
|
||||
@@ -0,0 +1,9 @@
|
||||
const interopDefault = r => r.default || r || [];
|
||||
const styles = {
|
||||
"components/ui/VuesaxIcon.vue": () => import('../build/VuesaxIcon-styles.D5MiLdu2.mjs').then(interopDefault)
|
||||
};
|
||||
|
||||
const inlinedCSS = {"VuesaxIcon.4cYnpGo8.css":[["components/ui/VuesaxIcon.vue"]]};
|
||||
|
||||
export { styles as default, inlinedCSS };
|
||||
//# sourceMappingURL=styles.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"styles.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/styles.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0]}
|
||||
@@ -0,0 +1,43 @@
|
||||
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import { Server as Server$1 } from 'node:http';
|
||||
import { Server } from 'node:https';
|
||||
import { t as toNodeListener, d as destr, u as useRuntimeConfig, a as trapUnhandledNodeErrors, s as setupGracefulShutdown, b as useNitroApp } from './chunks/_/nitro.mjs';
|
||||
import 'unhead/server';
|
||||
import 'vue';
|
||||
import 'unhead/legacy';
|
||||
import 'unhead/plugins';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
|
||||
const cert = process.env.NITRO_SSL_CERT;
|
||||
const key = process.env.NITRO_SSL_KEY;
|
||||
const nitroApp = useNitroApp();
|
||||
const server = cert && key ? new Server({ key, cert }, toNodeListener(nitroApp.h3App)) : new Server$1(toNodeListener(nitroApp.h3App));
|
||||
const _port = destr(process.env.NITRO_PORT || process.env.PORT);
|
||||
const port = _port === 0 ? 0 : _port || 3e3;
|
||||
const host = process.env.NITRO_HOST || process.env.HOST;
|
||||
const path = process.env.NITRO_UNIX_SOCKET;
|
||||
const listener = server.listen(path ? { path } : { port, host }, (err) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
const protocol = cert && key ? "https" : "http";
|
||||
const addressInfo = listener.address();
|
||||
if (typeof addressInfo === "string") {
|
||||
console.log(`Listening on unix socket ${addressInfo}`);
|
||||
return;
|
||||
}
|
||||
const baseURL = (useRuntimeConfig().app.baseURL || "").replace(/\/$/, "");
|
||||
const url = `${protocol}://${addressInfo.family === "IPv6" ? `[${addressInfo.address}]` : addressInfo.address}:${addressInfo.port}${baseURL}`;
|
||||
console.log(`Listening on ${url}`);
|
||||
});
|
||||
trapUnhandledNodeErrors();
|
||||
setupGracefulShutdown(listener, nitroApp);
|
||||
const nodeServer = {};
|
||||
|
||||
export { nodeServer as default };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","sources":["../../../../node_modules/.pnpm/nitropack@2.13.5_@electric-_ebbe948bd4fb9bf30a70b7ec0313af63/node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0]}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "@imen/web-prod",
|
||||
"version": "0.3.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.29.9",
|
||||
"@vue/compiler-core": "3.5.44",
|
||||
"@vue/compiler-dom": "3.5.44",
|
||||
"@vue/compiler-ssr": "3.5.44",
|
||||
"@vue/devtools-api": "8.2.1",
|
||||
"@vue/reactivity": "3.5.44",
|
||||
"@vue/runtime-core": "3.5.44",
|
||||
"@vue/runtime-dom": "3.5.44",
|
||||
"@vue/server-renderer": "3.5.44",
|
||||
"@vue/shared": "3.5.44",
|
||||
"@vueuse/core": "15.0.0",
|
||||
"@vueuse/shared": "15.0.0",
|
||||
"devalue": "6.0.3",
|
||||
"entities": "7.0.1",
|
||||
"estree-walker": "2.0.2",
|
||||
"framer-motion": "14.3.1",
|
||||
"hey-listen": "1.0.8",
|
||||
"hookable": "6.1.2",
|
||||
"lucide-vue-next": "0.475.0",
|
||||
"motion-dom": "14.3.1",
|
||||
"motion-utils": "14.1.1",
|
||||
"motion-v": "2.8.0",
|
||||
"nostics": "1.3.0",
|
||||
"pinia": "4.1.0",
|
||||
"source-map-js": "1.2.2",
|
||||
"ufo": "1.6.4",
|
||||
"unhead": "3.4.3",
|
||||
"vue": "3.5.44",
|
||||
"vue-bundle-renderer": "2.4.0",
|
||||
"vue-router": "5.4.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user