cloudcommerce 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-apps.yml +3 -3
- package/CHANGELOG.md +24 -0
- package/action.yml +6 -6
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/ci/bunny-config-base.sh +4 -2
- package/packages/cli/config/firestore.rules +3 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +5 -5
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/analytics/send-to-ga4.js +2 -1
- package/packages/ssr/lib/lib/analytics/send-to-ga4.js.map +1 -1
- package/packages/ssr/lib/lib/analytics-events.js +11 -1
- package/packages/ssr/lib/lib/analytics-events.js.map +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +11 -5
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/lib/lib/serve-storefront.js +35 -21
- package/packages/ssr/lib/lib/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +4 -4
- package/packages/ssr/src/lib/analytics/send-to-ga4.ts +2 -0
- package/packages/ssr/src/lib/analytics-events.ts +11 -1
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +11 -8
- package/packages/ssr/src/lib/serve-storefront.ts +36 -22
- package/packages/storefront/astro.config.mjs +4 -1
- package/packages/storefront/config/astro/vue-server.mjs +64 -0
- package/packages/storefront/dist/client/_astro/AccountPage.0M6_FdU6.js +1 -0
- package/packages/storefront/dist/client/_astro/CartSidebar.L0Vbhsdt.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.ju9TsLrJ.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.yqD9ycx5.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.xI1rdM1e.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.FQtM5kpd.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.-4fsYkPB.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.GAAhKdTN.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.v7L8EYOR.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.rasg5jV6.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchShowcase.kA6jICYo.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.v_L96Y90.js +7 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.SO-0jCqa.js → _plugin-vue_export-helper.xATGHWd9.js} +2 -2
- package/packages/storefront/dist/client/_astro/afetch.OifQZgwR.js +1 -0
- package/packages/storefront/dist/client/_astro/client.YJ00ta5M.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.ZD6tLDQJ.js +7 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.VduCDgof.js → firebase-app.iLdzDVjL.js} +1 -1
- package/packages/storefront/dist/client/_astro/format-money.1_HtF5S2.js +1 -0
- package/packages/storefront/dist/client/_astro/grid-title.pK2Nn3i-.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.GaT7bmE3.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.ICXGWNEA.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.XOXTrHqn.js +1 -0
- package/packages/storefront/dist/client/_astro/i18n.zhlBzJt8.js +1 -0
- package/packages/storefront/dist/client/_astro/img.AnjeGdy_.js +1 -0
- package/packages/storefront/dist/client/_astro/{index-dd468b12.fl8bpn8l.js → index-bea2a320.eWykogwr.js} +93 -93
- package/packages/storefront/dist/client/_astro/index.KfrHdfOH.js +1 -0
- package/packages/storefront/dist/client/_astro/index.ShNlAyu1.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.HP6478mG.js +1 -0
- package/packages/storefront/dist/client/_astro/name.VA3MEpe0.js +1 -0
- package/packages/storefront/dist/client/_astro/server-data.4C60Esyt.js +1 -0
- package/packages/storefront/dist/client/_astro/sf-utils.c42cbZ9W.js +13 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.nSNNOrp9.js +1 -0
- package/packages/storefront/dist/client/_astro/use-analytics.wTmoP8B1.js +1 -0
- package/packages/storefront/dist/client/_astro/use-product-card.UFr8SCuD.js +1 -0
- package/packages/storefront/dist/client/_astro/use-text-value.lKqoIagH.js +4 -0
- package/packages/storefront/dist/server/_noop-middleware.mjs +3 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_yYIzwp_R.mjs → CartSidebar_3_1aFp67.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_GvRUZ6ce.mjs → SearchModal_2azP1u7P.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/_.._19fCuQdO.mjs +5 -0
- package/packages/storefront/dist/server/chunks/_page__qqIVxbal.mjs +5 -0
- package/packages/storefront/dist/server/chunks/account_vK6pmJlz.mjs +5 -0
- package/packages/storefront/dist/server/chunks/astro/{assets-service_yXRChsFH.mjs → assets-service_631fRtTy.mjs} +66 -11
- package/packages/storefront/dist/server/chunks/{astro_F4pl3toV.mjs → astro_u-oSb215.mjs} +24 -14
- package/packages/storefront/dist/server/chunks/index__05fnqFh.mjs +5 -0
- package/packages/storefront/dist/server/chunks/node_zqXXqc-u.mjs +5 -0
- package/packages/storefront/dist/server/chunks/pages/{__z8Igc_-f.mjs → __ZucPYaOo.mjs} +1313 -979
- package/packages/storefront/dist/server/chunks/pages/{_page__-V1Q-Ymk.mjs → _page__0sN9U0SD.mjs} +30 -12
- package/packages/storefront/dist/server/chunks/pages/account_OQr_6KN1.mjs +33 -0
- package/packages/storefront/dist/server/chunks/pages/{index_QqJiJpFy.mjs → index_3IjgOEIq.mjs} +16 -4
- package/packages/storefront/dist/server/chunks/pages/node_OmjWRf8D.mjs +112 -0
- package/packages/storefront/dist/server/chunks/pages/~fallback_133FK-CP.mjs +59 -0
- package/packages/storefront/dist/server/chunks/~fallback_Wahcp9Wk.mjs +5 -0
- package/packages/storefront/dist/server/entry.mjs +289 -166
- package/packages/storefront/dist/server/manifest_9FASPYUE.mjs +202 -0
- package/packages/storefront/dist/server/renderers.mjs +45 -34
- package/packages/storefront/package.json +5 -5
- package/packages/storefront/server.d.ts +0 -1
- package/packages/storefront/src/lib/$storefront.d.ts +23 -16
- package/packages/storefront/src/lib/composables/use-pagination.ts +1 -3
- package/packages/storefront/src/lib/layouts/BaseHead.astro +5 -0
- package/packages/storefront/src/lib/scripts/git-cms-auth.ts +3 -0
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +14 -7
- package/packages/storefront/src/lib/scripts/sso-ecom.ts +0 -0
- package/packages/storefront/src/lib/ssr-context.ts +49 -7
- package/packages/storefront/src/lib/state/use-analytics.ts +12 -11
- package/packages/storefront/src/lib/state/use-storage.ts +23 -9
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/AccountPage.HcKW6HTE.js +0 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.osvr0MUo.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.I5mC8JdX.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.xC4J7MDy.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.Jt09rVKv.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.oouZY3cL.js +0 -7
- package/packages/storefront/dist/client/_astro/ProductShelf.dYlXuNId.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.vGE0E3Qf.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.OL4MN-C_.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.d8lbvLay.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchShowcase.ynowXX4j.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.l4KJGvUd.js +0 -7
- package/packages/storefront/dist/client/_astro/afetch.5c8VmT0-.js +0 -1
- package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.TRPGDX3c.js +0 -7
- package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
- package/packages/storefront/dist/client/_astro/format-money.iK5LGydz.js +0 -1
- package/packages/storefront/dist/client/_astro/grid-title.vGKBy72g.js +0 -1
- package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
- package/packages/storefront/dist/client/_astro/hoisted.8pwSenCN.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.SLwcAI01.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.gqV7f6f3.js +0 -1
- package/packages/storefront/dist/client/_astro/i18n.Lxnz1oF-.js +0 -1
- package/packages/storefront/dist/client/_astro/img.WnsidxCx.js +0 -1
- package/packages/storefront/dist/client/_astro/index.R7A-Pg5V.js +0 -1
- package/packages/storefront/dist/client/_astro/index.q6KIyKlJ.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
- package/packages/storefront/dist/client/_astro/modules-info.WWsUqEPZ.js +0 -1
- package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +0 -1
- package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +0 -13
- package/packages/storefront/dist/client/_astro/sf-utils.luvTU5uS.js +0 -1
- package/packages/storefront/dist/client/_astro/shopping-cart.ATTXCPd0.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.WpkjGsWi.js +0 -1
- package/packages/storefront/dist/client/_astro/use-product-card.BhUXhJIp.js +0 -1
- package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +0 -4
- package/packages/storefront/dist/client/app/account/index.html +0 -58
- package/packages/storefront/dist/client/app/index.html +0 -98
- package/packages/storefront/dist/client/blog/1/index.html +0 -86
- package/packages/storefront/dist/client/index.html +0 -131
- package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -93
- package/packages/storefront/dist/client/monitores-gamer/index.html +0 -95
- package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -93
- package/packages/storefront/dist/client/p/contato/index.html +0 -90
- package/packages/storefront/dist/client/p/terms/index.html +0 -101
- package/packages/storefront/dist/client/posts/3/index.html +0 -101
- package/packages/storefront/dist/client/posts/4/index.html +0 -101
- package/packages/storefront/dist/client/~fallback/index.html +0 -99
- package/packages/storefront/dist/server/_empty-middleware.mjs +0 -3
- package/packages/storefront/dist/server/chunks/_.._Lq3r7hpv.mjs +0 -6
- package/packages/storefront/dist/server/chunks/_page__LqbeNfr1.mjs +0 -6
- package/packages/storefront/dist/server/chunks/account_4n4rpirV.mjs +0 -6
- package/packages/storefront/dist/server/chunks/index_SwXtE1IM.mjs +0 -6
- package/packages/storefront/dist/server/chunks/node_Nzz44v5l.mjs +0 -6
- package/packages/storefront/dist/server/chunks/pages/account_frSUn7gD.mjs +0 -22
- package/packages/storefront/dist/server/chunks/pages/node_FoDIj_f7.mjs +0 -257
- package/packages/storefront/dist/server/chunks/pages/~fallback_t0lNhRm9.mjs +0 -33
- package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +0 -6
- package/packages/storefront/dist/server/images.dist.csv +0 -30
- package/packages/storefront/dist/server/images.src.csv +0 -11
- package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +0 -196
- package/packages/storefront/dist/server/static-builds.csv +0 -71
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { img, imgSizes, i18n, formatMoney, price, randomObjectId, nickname, inStock, gridTitle, categoriesList, name, onPromotion, variationsGrids, specTextValue, specValueByText } from '@ecomplus/utils';
|
|
2
|
-
import
|
|
2
|
+
import '@astrojs/internal-helpers/path';
|
|
3
|
+
import { A as AstroError, c as ExpectedImageOptions, E as ExpectedImage, d as InvalidImageService, e as createAstro, f as createComponent, g as ImageMissingAlt, r as renderTemplate, m as maybeRenderHead, h as addAttribute, s as spreadAttributes, u as unescapeHTML, i as renderComponent, j as createTransitionScope, k as renderSlotToString, l as renderAllHeadContent, n as renderSlot$1, F as Fragment } from '../astro_u-oSb215.mjs';
|
|
3
4
|
import 'kleur/colors';
|
|
5
|
+
import 'cssesc';
|
|
4
6
|
import api from '@cloudcommerce/api';
|
|
5
7
|
import { EventEmitter } from 'node:events';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
+
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, getCurrentInstance, reactive, shallowRef, resolveComponent, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, nextTick, withModifiers, Teleport, createTextVNode, toDisplayString, defineAsyncComponent, vModelText, Suspense, createSlots, shallowReactive, withAsyncContext, vModelRadio } from 'vue';
|
|
9
|
+
import fs, { copyFileSync } from 'node:fs';
|
|
10
|
+
import { resolve, join, basename as basename$1 } from 'node:path';
|
|
8
11
|
import { parse } from 'yaml';
|
|
9
12
|
import config from '@cloudcommerce/config';
|
|
10
13
|
import 'clsx';
|
|
11
14
|
/* empty css */
|
|
12
15
|
import { renderSync, parse as parse$1, ELEMENT_NODE, walkSync } from 'ultrahtml';
|
|
13
16
|
import mime from 'mime/lite.js';
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
17
|
+
import { i as isESMImportedImage, a as isLocalService, b as isRemoteImage, D as DEFAULT_HASH_PROPS } from '../astro/assets-service_631fRtTy.mjs';
|
|
18
|
+
import imageSize from 'image-size';
|
|
19
|
+
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrInterpolate, ssrRenderSuspense, ssrLooseEqual } from 'vue/server-renderer';
|
|
16
20
|
import { useScroll, useElementHover, useDebounceFn, watchDebounced, useTimeout, promiseTimeout, watchOnce, onClickOutside, useUrlSearchParams, createReusableTemplate } from '@vueuse/core';
|
|
17
21
|
import mitt from 'mitt';
|
|
18
22
|
import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem, Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/vue';
|
|
@@ -26,7 +30,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
26
30
|
return target;
|
|
27
31
|
};
|
|
28
32
|
|
|
29
|
-
const _sfc_main$
|
|
33
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
30
34
|
__name: "Fade",
|
|
31
35
|
props: {
|
|
32
36
|
speed: { default: "default" },
|
|
@@ -161,18 +165,18 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
161
165
|
return __returned__;
|
|
162
166
|
}
|
|
163
167
|
});
|
|
164
|
-
function _sfc_ssrRender$
|
|
168
|
+
function _sfc_ssrRender$G(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
165
169
|
ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
|
|
166
170
|
}
|
|
167
|
-
const _sfc_setup$
|
|
168
|
-
_sfc_main$
|
|
171
|
+
const _sfc_setup$G = _sfc_main$G.setup;
|
|
172
|
+
_sfc_main$G.setup = (props, ctx) => {
|
|
169
173
|
const ssrContext = useSSRContext();
|
|
170
174
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
|
|
171
|
-
return _sfc_setup$
|
|
175
|
+
return _sfc_setup$G ? _sfc_setup$G(props, ctx) : void 0;
|
|
172
176
|
};
|
|
173
|
-
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
177
|
+
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["ssrRender", _sfc_ssrRender$G]]);
|
|
174
178
|
|
|
175
|
-
const _sfc_main$
|
|
179
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
176
180
|
__name: "ALink",
|
|
177
181
|
props: {
|
|
178
182
|
href: {},
|
|
@@ -199,7 +203,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
199
203
|
return __returned__;
|
|
200
204
|
}
|
|
201
205
|
});
|
|
202
|
-
function _sfc_ssrRender$
|
|
206
|
+
function _sfc_ssrRender$F(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
203
207
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a" : "span"), mergeProps({
|
|
204
208
|
href: $props.href,
|
|
205
209
|
target: $setup.linkTarget,
|
|
@@ -217,15 +221,15 @@ function _sfc_ssrRender$E(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
217
221
|
_: 3
|
|
218
222
|
}), _parent);
|
|
219
223
|
}
|
|
220
|
-
const _sfc_setup$
|
|
221
|
-
_sfc_main$
|
|
224
|
+
const _sfc_setup$F = _sfc_main$F.setup;
|
|
225
|
+
_sfc_main$F.setup = (props, ctx) => {
|
|
222
226
|
const ssrContext = useSSRContext();
|
|
223
227
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
|
|
224
|
-
return _sfc_setup$
|
|
228
|
+
return _sfc_setup$F ? _sfc_setup$F(props, ctx) : void 0;
|
|
225
229
|
};
|
|
226
|
-
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
230
|
+
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["ssrRender", _sfc_ssrRender$F]]);
|
|
227
231
|
|
|
228
|
-
const _sfc_main$
|
|
232
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
229
233
|
__name: "AImg",
|
|
230
234
|
props: {
|
|
231
235
|
picture: {},
|
|
@@ -259,19 +263,19 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
259
263
|
return __returned__;
|
|
260
264
|
}
|
|
261
265
|
});
|
|
262
|
-
function _sfc_ssrRender$
|
|
266
|
+
function _sfc_ssrRender$E(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
263
267
|
_push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
|
|
264
268
|
}
|
|
265
|
-
const _sfc_setup$
|
|
266
|
-
_sfc_main$
|
|
269
|
+
const _sfc_setup$E = _sfc_main$E.setup;
|
|
270
|
+
_sfc_main$E.setup = (props, ctx) => {
|
|
267
271
|
const ssrContext = useSSRContext();
|
|
268
272
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
|
|
269
|
-
return _sfc_setup$
|
|
273
|
+
return _sfc_setup$E ? _sfc_setup$E(props, ctx) : void 0;
|
|
270
274
|
};
|
|
271
|
-
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
275
|
+
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["ssrRender", _sfc_ssrRender$E]]);
|
|
272
276
|
|
|
273
277
|
const rowClassName = "bg-gray-200 rounded-md dark:bg-gray-700";
|
|
274
|
-
const _sfc_main$
|
|
278
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
275
279
|
__name: "Skeleton",
|
|
276
280
|
props: {
|
|
277
281
|
isBold: { type: Boolean },
|
|
@@ -291,19 +295,52 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
291
295
|
return __returned__;
|
|
292
296
|
}
|
|
293
297
|
});
|
|
294
|
-
function _sfc_ssrRender$
|
|
298
|
+
function _sfc_ssrRender$D(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
295
299
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
296
300
|
role: "status",
|
|
297
301
|
class: ["animate-pulse", $props.isLarge ? "max-w-4xl" : "max-w-sm"]
|
|
298
302
|
}, _attrs))}><div class="${ssrRenderClass([$setup.firstRowClassName, $props.isLarge ? "w-96" : "w-48"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[680px]" : "max-w-[340px]"])}"></div><div class="${ssrRenderClass($setup.nextRowsClassName)}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[660px]" : "max-w-[330px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[600px]" : "max-w-[300px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[720px]" : "max-w-[360px]"])}"></div><span class="sr-only">Loading...</span></div>`);
|
|
299
303
|
}
|
|
300
|
-
const _sfc_setup$
|
|
301
|
-
_sfc_main$
|
|
304
|
+
const _sfc_setup$D = _sfc_main$D.setup;
|
|
305
|
+
_sfc_main$D.setup = (props, ctx) => {
|
|
302
306
|
const ssrContext = useSSRContext();
|
|
303
307
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Skeleton.vue");
|
|
304
|
-
return _sfc_setup$
|
|
308
|
+
return _sfc_setup$D ? _sfc_setup$D(props, ctx) : void 0;
|
|
309
|
+
};
|
|
310
|
+
const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["ssrRender", _sfc_ssrRender$D]]);
|
|
311
|
+
|
|
312
|
+
if (!globalThis.__sfIds)
|
|
313
|
+
globalThis.__sfIds = {};
|
|
314
|
+
const useId = (prefix = "_") => {
|
|
315
|
+
if (typeof globalThis.__sfIds[prefix] !== "number")
|
|
316
|
+
globalThis.__sfIds[prefix] = -1;
|
|
317
|
+
return `${prefix}${++globalThis.__sfIds[prefix]}`;
|
|
318
|
+
};
|
|
319
|
+
const clearAccents = (str) => {
|
|
320
|
+
return str.replace(/[ÁáÃãÂâÀà]/g, "a").replace(/[ÉéÊê]/g, "e").replace(/[Íí]/g, "i").replace(/[ÕõÓóÔô]/g, "o").replace(/[Úú]/g, "u").replace(/[Çç]/g, "c");
|
|
321
|
+
};
|
|
322
|
+
const slugify = (str) => {
|
|
323
|
+
return clearAccents(str.trim()).toLowerCase().replace(/[\W\r\n]/gm, "-").replace(/-{2,}/g, "-").replace(/(^-)|(-$)/g, "");
|
|
324
|
+
};
|
|
325
|
+
const toLowerCaseAccents = (str) => {
|
|
326
|
+
return str.toLowerCase().replace(/Á/g, "á").replace(/Ã/g, "ã").replace(/Â/g, "â").replace(/À/g, "à").replace(/É/g, "é").replace(/Ê/g, "ê").replace(/Í/g, "í").replace(/Õ/g, "õ").replace(/Ó/g, "ó").replace(/Ô/g, "ô").replace(/Ú/g, "ú").replace(/Ç/g, "ç");
|
|
327
|
+
};
|
|
328
|
+
const termify = (str) => {
|
|
329
|
+
return toLowerCaseAccents(str.trim()).replace(/[\r\n]/gm, " ").replace(/[^\w-&%áãâàéêíõóôúç]/g, " ").replace(/\s{2,}/g, " ");
|
|
330
|
+
};
|
|
331
|
+
const getSearchUrl = (term, baseUrl = "/s/") => {
|
|
332
|
+
return `${baseUrl}${encodeURIComponent(termify(term))}`;
|
|
333
|
+
};
|
|
334
|
+
const scrollToEl = (el, top = 0) => {
|
|
335
|
+
while (el.offsetParent) {
|
|
336
|
+
top += el.offsetTop;
|
|
337
|
+
el = el.offsetParent;
|
|
338
|
+
}
|
|
339
|
+
return window.scroll({
|
|
340
|
+
top,
|
|
341
|
+
behavior: "smooth"
|
|
342
|
+
});
|
|
305
343
|
};
|
|
306
|
-
const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["ssrRender", _sfc_ssrRender$C]]);
|
|
307
344
|
|
|
308
345
|
const formatPercentage = (value, digits = 1) => {
|
|
309
346
|
return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
|
|
@@ -320,6 +357,7 @@ const createApp$1 = (app) => {
|
|
|
320
357
|
const { settings, apiContext } = globalThis.$storefront || {};
|
|
321
358
|
app2.config.globalProperties.$settings = settings;
|
|
322
359
|
app2.config.globalProperties.$apiContext = apiContext;
|
|
360
|
+
app2.config.globalProperties.$useId = useId;
|
|
323
361
|
}
|
|
324
362
|
});
|
|
325
363
|
app.component("Fade", Fade);
|
|
@@ -328,7 +366,7 @@ const createApp$1 = (app) => {
|
|
|
328
366
|
app.component("Skeleton", Skeleton);
|
|
329
367
|
};
|
|
330
368
|
|
|
331
|
-
const _sfc_main$
|
|
369
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
332
370
|
__name: "CarouselControl",
|
|
333
371
|
props: {
|
|
334
372
|
isPrev: { type: Boolean, default: false }
|
|
@@ -342,7 +380,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
342
380
|
return __returned__;
|
|
343
381
|
}
|
|
344
382
|
});
|
|
345
|
-
function _sfc_ssrRender$
|
|
383
|
+
function _sfc_ssrRender$C(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
346
384
|
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
347
385
|
type: "button",
|
|
348
386
|
"aria-label": !$props.isPrev ? "Pr\xF3ximo" : "Anterior",
|
|
@@ -359,16 +397,16 @@ function _sfc_ssrRender$B(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
359
397
|
}, _push, _parent);
|
|
360
398
|
_push(`</button>`);
|
|
361
399
|
}
|
|
362
|
-
const _sfc_setup$
|
|
363
|
-
_sfc_main$
|
|
400
|
+
const _sfc_setup$C = _sfc_main$C.setup;
|
|
401
|
+
_sfc_main$C.setup = (props, ctx) => {
|
|
364
402
|
const ssrContext = useSSRContext();
|
|
365
403
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
|
|
366
|
-
return _sfc_setup$
|
|
404
|
+
return _sfc_setup$C ? _sfc_setup$C(props, ctx) : void 0;
|
|
367
405
|
};
|
|
368
|
-
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
406
|
+
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["ssrRender", _sfc_ssrRender$C]]);
|
|
369
407
|
|
|
370
408
|
const carouselKey = Symbol("carousel");
|
|
371
|
-
const _sfc_main$
|
|
409
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
372
410
|
__name: "Carousel",
|
|
373
411
|
props: {
|
|
374
412
|
as: { default: "ul" },
|
|
@@ -550,7 +588,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
550
588
|
return __returned__;
|
|
551
589
|
}
|
|
552
590
|
});
|
|
553
|
-
function _sfc_ssrRender$
|
|
591
|
+
function _sfc_ssrRender$B(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
554
592
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
555
593
|
ref: "carousel",
|
|
556
594
|
class: `relative ${!$setup.isX ? "overflow-hidden" : ""}`,
|
|
@@ -614,13 +652,13 @@ function _sfc_ssrRender$A(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
614
652
|
}, _push, _parent);
|
|
615
653
|
_push(`</div>`);
|
|
616
654
|
}
|
|
617
|
-
const _sfc_setup$
|
|
618
|
-
_sfc_main$
|
|
655
|
+
const _sfc_setup$B = _sfc_main$B.setup;
|
|
656
|
+
_sfc_main$B.setup = (props, ctx) => {
|
|
619
657
|
const ssrContext = useSSRContext();
|
|
620
658
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
|
|
621
|
-
return _sfc_setup$
|
|
659
|
+
return _sfc_setup$B ? _sfc_setup$B(props, ctx) : void 0;
|
|
622
660
|
};
|
|
623
|
-
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
661
|
+
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["ssrRender", _sfc_ssrRender$B]]);
|
|
624
662
|
|
|
625
663
|
const createApp = (app) => {
|
|
626
664
|
createApp$1(app);
|
|
@@ -633,6 +671,153 @@ const mod = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
633
671
|
default: createApp
|
|
634
672
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
635
673
|
|
|
674
|
+
async function getConfiguredImageService() {
|
|
675
|
+
if (!globalThis?.astroAsset?.imageService) {
|
|
676
|
+
const { default: service } = await import(
|
|
677
|
+
// @ts-expect-error
|
|
678
|
+
'../astro/assets-service_631fRtTy.mjs'
|
|
679
|
+
).then(n => n.s).catch((e) => {
|
|
680
|
+
const error = new AstroError(InvalidImageService);
|
|
681
|
+
error.cause = e;
|
|
682
|
+
throw error;
|
|
683
|
+
});
|
|
684
|
+
if (!globalThis.astroAsset)
|
|
685
|
+
globalThis.astroAsset = {};
|
|
686
|
+
globalThis.astroAsset.imageService = service;
|
|
687
|
+
return service;
|
|
688
|
+
}
|
|
689
|
+
return globalThis.astroAsset.imageService;
|
|
690
|
+
}
|
|
691
|
+
async function getImage$1(options, imageConfig) {
|
|
692
|
+
if (!options || typeof options !== "object") {
|
|
693
|
+
throw new AstroError({
|
|
694
|
+
...ExpectedImageOptions,
|
|
695
|
+
message: ExpectedImageOptions.message(JSON.stringify(options))
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
if (typeof options.src === "undefined") {
|
|
699
|
+
throw new AstroError({
|
|
700
|
+
...ExpectedImage,
|
|
701
|
+
message: ExpectedImage.message(
|
|
702
|
+
options.src,
|
|
703
|
+
"undefined",
|
|
704
|
+
JSON.stringify(options)
|
|
705
|
+
)
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
const service = await getConfiguredImageService();
|
|
709
|
+
const resolvedOptions = {
|
|
710
|
+
...options,
|
|
711
|
+
src: typeof options.src === "object" && "then" in options.src ? (await options.src).default ?? await options.src : options.src
|
|
712
|
+
};
|
|
713
|
+
const originalPath = isESMImportedImage(resolvedOptions.src) ? resolvedOptions.src.fsPath : resolvedOptions.src;
|
|
714
|
+
const clonedSrc = isESMImportedImage(resolvedOptions.src) ? (
|
|
715
|
+
// @ts-expect-error - clone is a private, hidden prop
|
|
716
|
+
resolvedOptions.src.clone ?? resolvedOptions.src
|
|
717
|
+
) : resolvedOptions.src;
|
|
718
|
+
resolvedOptions.src = clonedSrc;
|
|
719
|
+
const validatedOptions = service.validateOptions ? await service.validateOptions(resolvedOptions, imageConfig) : resolvedOptions;
|
|
720
|
+
const srcSetTransforms = service.getSrcSet ? await service.getSrcSet(validatedOptions, imageConfig) : [];
|
|
721
|
+
let imageURL = await service.getURL(validatedOptions, imageConfig);
|
|
722
|
+
let srcSets = await Promise.all(
|
|
723
|
+
srcSetTransforms.map(async (srcSet) => ({
|
|
724
|
+
transform: srcSet.transform,
|
|
725
|
+
url: await service.getURL(srcSet.transform, imageConfig),
|
|
726
|
+
descriptor: srcSet.descriptor,
|
|
727
|
+
attributes: srcSet.attributes
|
|
728
|
+
}))
|
|
729
|
+
);
|
|
730
|
+
if (isLocalService(service) && globalThis.astroAsset.addStaticImage && !(isRemoteImage(validatedOptions.src) && imageURL === validatedOptions.src)) {
|
|
731
|
+
const propsToHash = service.propertiesToHash ?? DEFAULT_HASH_PROPS;
|
|
732
|
+
imageURL = globalThis.astroAsset.addStaticImage(validatedOptions, propsToHash, originalPath);
|
|
733
|
+
srcSets = srcSetTransforms.map((srcSet) => ({
|
|
734
|
+
transform: srcSet.transform,
|
|
735
|
+
url: globalThis.astroAsset.addStaticImage(srcSet.transform, propsToHash, originalPath),
|
|
736
|
+
descriptor: srcSet.descriptor,
|
|
737
|
+
attributes: srcSet.attributes
|
|
738
|
+
}));
|
|
739
|
+
}
|
|
740
|
+
return {
|
|
741
|
+
rawOptions: resolvedOptions,
|
|
742
|
+
options: validatedOptions,
|
|
743
|
+
src: imageURL,
|
|
744
|
+
srcSet: {
|
|
745
|
+
values: srcSets,
|
|
746
|
+
attribute: srcSets.map((srcSet) => `${srcSet.url} ${srcSet.descriptor}`).join(", ")
|
|
747
|
+
},
|
|
748
|
+
attributes: service.getHTMLAttributes !== void 0 ? await service.getHTMLAttributes(validatedOptions, imageConfig) : {}
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
const $$Astro$h = createAstro("https://demo.ecomplus.app");
|
|
753
|
+
const $$Image = createComponent(async ($$result, $$props, $$slots) => {
|
|
754
|
+
const Astro2 = $$result.createAstro($$Astro$h, $$props, $$slots);
|
|
755
|
+
Astro2.self = $$Image;
|
|
756
|
+
const props = Astro2.props;
|
|
757
|
+
if (props.alt === void 0 || props.alt === null) {
|
|
758
|
+
throw new AstroError(ImageMissingAlt);
|
|
759
|
+
}
|
|
760
|
+
if (typeof props.width === "string") {
|
|
761
|
+
props.width = parseInt(props.width);
|
|
762
|
+
}
|
|
763
|
+
if (typeof props.height === "string") {
|
|
764
|
+
props.height = parseInt(props.height);
|
|
765
|
+
}
|
|
766
|
+
const image = await getImage(props);
|
|
767
|
+
const additionalAttributes = {};
|
|
768
|
+
if (image.srcSet.values.length > 0) {
|
|
769
|
+
additionalAttributes.srcset = image.srcSet.attribute;
|
|
770
|
+
}
|
|
771
|
+
return renderTemplate`${maybeRenderHead()}<img${addAttribute(image.src, "src")}${spreadAttributes(additionalAttributes)}${spreadAttributes(image.attributes)}>`;
|
|
772
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Image.astro", void 0);
|
|
773
|
+
|
|
774
|
+
const $$Astro$g = createAstro("https://demo.ecomplus.app");
|
|
775
|
+
const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
776
|
+
const Astro2 = $$result.createAstro($$Astro$g, $$props, $$slots);
|
|
777
|
+
Astro2.self = $$Picture$1;
|
|
778
|
+
const defaultFormats = ["webp"];
|
|
779
|
+
const defaultFallbackFormat = "png";
|
|
780
|
+
const specialFormatsFallback = ["gif", "svg", "jpg", "jpeg"];
|
|
781
|
+
const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, ...props } = Astro2.props;
|
|
782
|
+
if (props.alt === void 0 || props.alt === null) {
|
|
783
|
+
throw new AstroError(ImageMissingAlt);
|
|
784
|
+
}
|
|
785
|
+
const optimizedImages = await Promise.all(
|
|
786
|
+
formats.map(
|
|
787
|
+
async (format) => await getImage({ ...props, format, widths: props.widths, densities: props.densities })
|
|
788
|
+
)
|
|
789
|
+
);
|
|
790
|
+
let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat;
|
|
791
|
+
if (!fallbackFormat && isESMImportedImage(props.src) && specialFormatsFallback.includes(props.src.format)) {
|
|
792
|
+
resultFallbackFormat = props.src.format;
|
|
793
|
+
}
|
|
794
|
+
const fallbackImage = await getImage({
|
|
795
|
+
...props,
|
|
796
|
+
format: resultFallbackFormat,
|
|
797
|
+
widths: props.widths,
|
|
798
|
+
densities: props.densities
|
|
799
|
+
});
|
|
800
|
+
const imgAdditionalAttributes = {};
|
|
801
|
+
const sourceAdditionaAttributes = {};
|
|
802
|
+
if (props.sizes) {
|
|
803
|
+
sourceAdditionaAttributes.sizes = props.sizes;
|
|
804
|
+
}
|
|
805
|
+
if (fallbackImage.srcSet.values.length > 0) {
|
|
806
|
+
imgAdditionalAttributes.srcset = fallbackImage.srcSet.attribute;
|
|
807
|
+
}
|
|
808
|
+
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttributes)}>
|
|
809
|
+
${Object.entries(optimizedImages).map(([_, image]) => {
|
|
810
|
+
const srcsetAttribute = props.densities || !props.densities && !props.widths ? `${image.src}${image.srcSet.values.length > 0 ? ", " + image.srcSet.attribute : ""}` : image.srcSet.attribute;
|
|
811
|
+
return renderTemplate`<source${addAttribute(srcsetAttribute, "srcset")}${addAttribute("image/" + image.options.format, "type")}${spreadAttributes(sourceAdditionaAttributes)}>`;
|
|
812
|
+
})}
|
|
813
|
+
<img${addAttribute(fallbackImage.src, "src")}${spreadAttributes(imgAdditionalAttributes)}${spreadAttributes(fallbackImage.attributes)}>
|
|
814
|
+
</picture>`;
|
|
815
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Picture.astro", void 0);
|
|
816
|
+
|
|
817
|
+
const imageConfig = {"service":{"entrypoint":"astro/assets/services/sharp","config":{}},"domains":[],"remotePatterns":[],"endpoint":"astro/assets/endpoint/node"};
|
|
818
|
+
const assetsDir = new URL("file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/");
|
|
819
|
+
const getImage = async (options) => await getImage$1(options, imageConfig);
|
|
820
|
+
|
|
636
821
|
const i19aboveOf = "Acima de";
|
|
637
822
|
const i19brands = "Marcas";
|
|
638
823
|
const i19categories = "Categorias";
|
|
@@ -805,34 +990,6 @@ const _getConfig = () => {
|
|
|
805
990
|
};
|
|
806
991
|
};
|
|
807
992
|
|
|
808
|
-
let id = -1;
|
|
809
|
-
const useId = () => String(++id);
|
|
810
|
-
const clearAccents = (str) => {
|
|
811
|
-
return str.replace(/[ÁáÃãÂâÀà]/g, "a").replace(/[ÉéÊê]/g, "e").replace(/[Íí]/g, "i").replace(/[ÕõÓóÔô]/g, "o").replace(/[Úú]/g, "u").replace(/[Çç]/g, "c");
|
|
812
|
-
};
|
|
813
|
-
const slugify = (str) => {
|
|
814
|
-
return clearAccents(str.trim()).toLowerCase().replace(/[\W\r\n]/gm, "-").replace(/-{2,}/g, "-").replace(/(^-)|(-$)/g, "");
|
|
815
|
-
};
|
|
816
|
-
const toLowerCaseAccents = (str) => {
|
|
817
|
-
return str.toLowerCase().replace(/Á/g, "á").replace(/Ã/g, "ã").replace(/Â/g, "â").replace(/À/g, "à").replace(/É/g, "é").replace(/Ê/g, "ê").replace(/Í/g, "í").replace(/Õ/g, "õ").replace(/Ó/g, "ó").replace(/Ô/g, "ô").replace(/Ú/g, "ú").replace(/Ç/g, "ç");
|
|
818
|
-
};
|
|
819
|
-
const termify = (str) => {
|
|
820
|
-
return toLowerCaseAccents(str.trim()).replace(/[\r\n]/gm, " ").replace(/[^\w-&%áãâàéêíõóôúç]/g, " ").replace(/\s{2,}/g, " ");
|
|
821
|
-
};
|
|
822
|
-
const getSearchUrl = (term, baseUrl = "/s/") => {
|
|
823
|
-
return `${baseUrl}${encodeURIComponent(termify(term))}`;
|
|
824
|
-
};
|
|
825
|
-
const scrollToEl = (el, top = 0) => {
|
|
826
|
-
while (el.offsetParent) {
|
|
827
|
-
top += el.offsetTop;
|
|
828
|
-
el = el.offsetParent;
|
|
829
|
-
}
|
|
830
|
-
return window.scroll({
|
|
831
|
-
top,
|
|
832
|
-
behavior: "smooth"
|
|
833
|
-
});
|
|
834
|
-
};
|
|
835
|
-
|
|
836
993
|
const emitter$1 = new EventEmitter();
|
|
837
994
|
const getConfig = _getConfig;
|
|
838
995
|
if (!globalThis.$apiMergeConfig) {
|
|
@@ -844,14 +1001,32 @@ if (!globalThis.$apiMergeConfig) {
|
|
|
844
1001
|
if (!globalThis.$apiPrefetchEndpoints) {
|
|
845
1002
|
globalThis.$apiPrefetchEndpoints = [];
|
|
846
1003
|
}
|
|
1004
|
+
const sessions = {};
|
|
847
1005
|
if (!globalThis.$storefront) {
|
|
848
|
-
globalThis.$storefront = {
|
|
1006
|
+
globalThis.$storefront = new Proxy({
|
|
849
1007
|
settings: {},
|
|
850
|
-
|
|
851
|
-
|
|
1008
|
+
data: {},
|
|
1009
|
+
url: void 0,
|
|
1010
|
+
getSession(sid) {
|
|
1011
|
+
if (!sid && !!getCurrentInstance()) {
|
|
1012
|
+
sid = inject("sid");
|
|
1013
|
+
}
|
|
1014
|
+
return sid && sessions[sid] || global.__sfSession;
|
|
852
1015
|
},
|
|
853
|
-
|
|
854
|
-
|
|
1016
|
+
onLoad(callback, sid) {
|
|
1017
|
+
emitter$1.once(sid ? `load:${sid}` : "load", callback);
|
|
1018
|
+
}
|
|
1019
|
+
}, {
|
|
1020
|
+
get(target, prop) {
|
|
1021
|
+
if (prop === "apiContext") {
|
|
1022
|
+
return target.getSession().apiContext;
|
|
1023
|
+
}
|
|
1024
|
+
if (prop === "url") {
|
|
1025
|
+
return target.getSession().url;
|
|
1026
|
+
}
|
|
1027
|
+
return target[prop];
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
855
1030
|
}
|
|
856
1031
|
const setResponseCache = (Astro, maxAge, sMaxAge) => {
|
|
857
1032
|
const headerName = "Cache-Control" ;
|
|
@@ -873,7 +1048,9 @@ const loadRouteContext = async (Astro, {
|
|
|
873
1048
|
contentCollection,
|
|
874
1049
|
apiPrefetchEndpoints = globalThis.$apiPrefetchEndpoints
|
|
875
1050
|
} = {}) => {
|
|
876
|
-
|
|
1051
|
+
const sid = `${Date.now() + Math.random()}`;
|
|
1052
|
+
sessions[sid] = { url: Astro.url };
|
|
1053
|
+
global.__sfSession = sessions[sid];
|
|
877
1054
|
const startedAt = Date.now();
|
|
878
1055
|
let urlPath = Astro.url.pathname;
|
|
879
1056
|
const isPreview = urlPath.startsWith("/~preview");
|
|
@@ -930,11 +1107,15 @@ const loadRouteContext = async (Astro, {
|
|
|
930
1107
|
}).catch(console.warn);
|
|
931
1108
|
const apiDoc = apiContext.doc;
|
|
932
1109
|
apiState[`${apiResource}/${apiDoc._id}`] = apiDoc;
|
|
933
|
-
|
|
1110
|
+
sessions[sid].apiContext = {
|
|
934
1111
|
resource: apiResource,
|
|
935
1112
|
doc: apiDoc,
|
|
936
1113
|
timestamp: Date.now()
|
|
937
1114
|
};
|
|
1115
|
+
setTimeout(() => {
|
|
1116
|
+
sessions[sid] = null;
|
|
1117
|
+
delete sessions[sid];
|
|
1118
|
+
}, 5e3);
|
|
938
1119
|
resolve(null);
|
|
939
1120
|
}).catch((err) => {
|
|
940
1121
|
if (prefetchingsIndex > -1) {
|
|
@@ -994,7 +1175,9 @@ const loadRouteContext = async (Astro, {
|
|
|
994
1175
|
}
|
|
995
1176
|
Astro.locals.assetsPrefix = assetsPrefix || "";
|
|
996
1177
|
}
|
|
997
|
-
if (
|
|
1178
|
+
if (isPreview) {
|
|
1179
|
+
setResponseCache(Astro, 0);
|
|
1180
|
+
} else if (urlPath === "/~fallback") {
|
|
998
1181
|
setResponseCache(Astro, 3600, 86400);
|
|
999
1182
|
} else if (isHomepage) {
|
|
1000
1183
|
setResponseCache(Astro, 180);
|
|
@@ -1010,179 +1193,442 @@ const loadRouteContext = async (Astro, {
|
|
|
1010
1193
|
fetchingApiContext,
|
|
1011
1194
|
apiContext,
|
|
1012
1195
|
apiState,
|
|
1013
|
-
isPreview
|
|
1196
|
+
isPreview,
|
|
1197
|
+
sid
|
|
1014
1198
|
// Astro,
|
|
1015
1199
|
};
|
|
1016
1200
|
Astro.locals.routeContext = routeContext;
|
|
1201
|
+
Astro.cookies.set("sid", sid);
|
|
1017
1202
|
emitter$1.emit("load", routeContext);
|
|
1203
|
+
emitter$1.emit(`load:${sid}`, routeContext);
|
|
1204
|
+
globalThis.__sfIds = {};
|
|
1018
1205
|
return routeContext;
|
|
1019
1206
|
};
|
|
1020
1207
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1208
|
+
/* eslint-disable */
|
|
1209
|
+
|
|
1210
|
+
const pwaInfo = false;
|
|
1211
|
+
|
|
1212
|
+
const $$Astro$f = createAstro("https://demo.ecomplus.app");
|
|
1213
|
+
const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
|
|
1214
|
+
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
1215
|
+
Astro2.self = $$ViewTransitions;
|
|
1216
|
+
const { fallback = "animate" } = Astro2.props;
|
|
1217
|
+
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true">
|
|
1218
|
+
<meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>
|
|
1219
|
+
`;
|
|
1220
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
|
|
1221
|
+
|
|
1222
|
+
var __freeze$3 = Object.freeze;
|
|
1223
|
+
var __defProp$3 = Object.defineProperty;
|
|
1224
|
+
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
|
|
1225
|
+
var _b, _c;
|
|
1226
|
+
const $$Astro$e = createAstro("https://demo.ecomplus.app");
|
|
1227
|
+
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
1228
|
+
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
1229
|
+
Astro2.self = $$BaseHead;
|
|
1230
|
+
const isPWA = pwaInfo !== false;
|
|
1231
|
+
const hasViewTransitions = Astro2.props.hasViewTransitions !== false && !Astro2.url.pathname.startsWith("/app/");
|
|
1232
|
+
const {
|
|
1233
|
+
storeId,
|
|
1234
|
+
isHomepage,
|
|
1235
|
+
isSearchPage,
|
|
1236
|
+
searchPageTerm,
|
|
1237
|
+
cmsContent,
|
|
1238
|
+
fetchingApiContext,
|
|
1239
|
+
apiContext,
|
|
1240
|
+
lang,
|
|
1241
|
+
countryCode,
|
|
1242
|
+
currency,
|
|
1243
|
+
currencySymbol,
|
|
1244
|
+
domain,
|
|
1245
|
+
primaryColor,
|
|
1246
|
+
settings,
|
|
1247
|
+
isPreview,
|
|
1248
|
+
getContent
|
|
1249
|
+
} = Astro2.locals.routeContext;
|
|
1250
|
+
if (fetchingApiContext) {
|
|
1251
|
+
await fetchingApiContext;
|
|
1033
1252
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1253
|
+
const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
|
|
1254
|
+
const getIconUrl = (size) => {
|
|
1255
|
+
return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
|
|
1256
|
+
};
|
|
1257
|
+
const apiDoc = apiContext.doc;
|
|
1258
|
+
const state = apiDoc || cmsContent || {};
|
|
1259
|
+
let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
|
|
1260
|
+
let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
|
|
1261
|
+
if (isHomepage) {
|
|
1262
|
+
if (!title)
|
|
1263
|
+
title = settings.name;
|
|
1264
|
+
if (!description)
|
|
1265
|
+
description = settings.description;
|
|
1039
1266
|
}
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1267
|
+
if (isSearchPage) {
|
|
1268
|
+
if (searchPageTerm) {
|
|
1269
|
+
if (!title)
|
|
1270
|
+
title = settings.name;
|
|
1271
|
+
title = title.replace("$term", searchPageTerm);
|
|
1272
|
+
if (!title.includes(searchPageTerm)) {
|
|
1273
|
+
title = `${searchPageTerm} | ${title}`;
|
|
1274
|
+
}
|
|
1275
|
+
} else if (!title) {
|
|
1276
|
+
title = `${i19searchProducts} | ${settings.name}`;
|
|
1277
|
+
}
|
|
1042
1278
|
}
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1279
|
+
const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
|
|
1280
|
+
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
1281
|
+
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
1282
|
+
const { metatags: metatagsContent } = await getContent("layout");
|
|
1283
|
+
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
1284
|
+
let ogImage;
|
|
1285
|
+
if (apiDoc) {
|
|
1286
|
+
const picture = img(state, void 0, "zoom");
|
|
1287
|
+
ogImage = picture && picture.url;
|
|
1049
1288
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
if (typeof src === "string") {
|
|
1055
|
-
unique.add(extname(src).replace(".", ""));
|
|
1289
|
+
if (!ogImage) {
|
|
1290
|
+
if (metatagsContent?.ogImage) {
|
|
1291
|
+
ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
|
|
1292
|
+
}
|
|
1056
1293
|
} else {
|
|
1057
|
-
|
|
1294
|
+
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
1058
1295
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1296
|
+
let inlineClientJS = `
|
|
1297
|
+
window._emitApiContext = (id = null) => {
|
|
1298
|
+
console.log('[ctx] emit ' + id);
|
|
1299
|
+
window.dispatchEvent(new Event('storefront:apiContext'));
|
|
1300
|
+
window._emitedContextId = id;
|
|
1301
|
+
window.__sfIds = {};
|
|
1302
|
+
};
|
|
1303
|
+
window.ECOM_STORE_ID = ${storeId};
|
|
1304
|
+
window.ECOM_LANG = '${lang}';
|
|
1305
|
+
window.ECOM_CURRENCY = '${currency}';
|
|
1306
|
+
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
1307
|
+
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
1308
|
+
window.GIT_BRANCH = '${{"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.GIT_BRANCH || ""}';
|
|
1309
|
+
window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
|
|
1310
|
+
if (apiContext.error) {
|
|
1311
|
+
const { message, statusCode } = apiContext.error;
|
|
1312
|
+
const url = Astro2.url.pathname;
|
|
1313
|
+
inlineClientJS += `
|
|
1314
|
+
console.error(${JSON.stringify(message)});
|
|
1315
|
+
setTimeout(() => {
|
|
1316
|
+
window.location.replace("/~fallback?status=${statusCode}&url=${encodeURIComponent(url)}");
|
|
1317
|
+
}, 1);`;
|
|
1318
|
+
}
|
|
1319
|
+
let contextInlineClientJS;
|
|
1320
|
+
if (apiDoc) {
|
|
1321
|
+
if (typeof apiDoc.price === "number") {
|
|
1322
|
+
apiDoc.price = price(apiDoc);
|
|
1080
1323
|
}
|
|
1081
|
-
const
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
height: width / aspectRatio,
|
|
1094
|
-
fit,
|
|
1095
|
-
position,
|
|
1096
|
-
background,
|
|
1097
|
-
aspectRatio
|
|
1324
|
+
const slimDocRegex = globalThis.$storefrontSlimDocRegex || /body_|meta_|metafields|_records|i18n/;
|
|
1325
|
+
const minifyApiDoc = (nestedDoc) => {
|
|
1326
|
+
if (typeof nestedDoc === "object" && nestedDoc) {
|
|
1327
|
+
if (Array.isArray(nestedDoc)) {
|
|
1328
|
+
nestedDoc.forEach((item) => minifyApiDoc(item));
|
|
1329
|
+
} else {
|
|
1330
|
+
Object.keys(nestedDoc).forEach((field) => {
|
|
1331
|
+
if (slimDocRegex.test(field)) {
|
|
1332
|
+
delete nestedDoc[field];
|
|
1333
|
+
} else {
|
|
1334
|
+
minifyApiDoc(nestedDoc[field]);
|
|
1335
|
+
}
|
|
1098
1336
|
});
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
return `${img.src} ${width}w`;
|
|
1103
|
-
})
|
|
1104
|
-
);
|
|
1105
|
-
return {
|
|
1106
|
-
type: mime.getType(format) || format,
|
|
1107
|
-
srcset: imgs.join(",")
|
|
1108
|
-
};
|
|
1109
|
-
}
|
|
1110
|
-
const sources = await Promise.all(allFormats.map((format) => getSource(format)));
|
|
1111
|
-
return {
|
|
1112
|
-
sources,
|
|
1113
|
-
// @ts-ignore
|
|
1114
|
-
image
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
return nestedDoc;
|
|
1115
1340
|
};
|
|
1116
|
-
|
|
1341
|
+
inlineClientJS += `
|
|
1342
|
+
window._firstLoadContextId = '${apiDoc._id}';`;
|
|
1343
|
+
contextInlineClientJS = `
|
|
1344
|
+
$storefront.url = new URL(window.location.toString());
|
|
1345
|
+
$storefront.apiContext = ${JSON.stringify({
|
|
1346
|
+
resource: apiContext.resource,
|
|
1347
|
+
doc: minifyApiDoc({ ...apiDoc }),
|
|
1348
|
+
timestamp: Date.now()
|
|
1349
|
+
})};
|
|
1350
|
+
$storefront.getSession = (/* sid */) => {
|
|
1351
|
+
url: $storefront.url,
|
|
1352
|
+
apiContext: $storefront.apiContext,
|
|
1117
1353
|
};
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
width: Number(width),
|
|
1129
|
-
height: Number(height)
|
|
1130
|
-
});
|
|
1131
|
-
});
|
|
1132
|
-
} catch (err) {
|
|
1133
|
-
if (global.$renderStorefront) {
|
|
1134
|
-
console.error(err);
|
|
1354
|
+
$storefront.context /* DEPRECATED */ = $storefront.apiContext;
|
|
1355
|
+
_emitApiContext('${apiDoc._id}');`;
|
|
1356
|
+
} else {
|
|
1357
|
+
inlineClientJS += `
|
|
1358
|
+
window._firstLoadContextId = null;`;
|
|
1359
|
+
contextInlineClientJS = `
|
|
1360
|
+
$storefront.apiContext = null;
|
|
1361
|
+
delete $storefront.apiContext;
|
|
1362
|
+
delete $storefront.context;
|
|
1363
|
+
_emitApiContext();`;
|
|
1135
1364
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
return filename === _builtImage.filename.replace(filenameRegExp, "");
|
|
1147
|
-
};
|
|
1148
|
-
let builtImage = builtImages.find((_builtImage) => {
|
|
1149
|
-
return _builtImage.width >= width && matchFilename(_builtImage);
|
|
1365
|
+
if (isPreview) {
|
|
1366
|
+
inlineClientJS += `
|
|
1367
|
+
window.$isCmsPreview = true;`;
|
|
1368
|
+
}
|
|
1369
|
+
const inlineJSONLd = JSON.stringify({
|
|
1370
|
+
"@context": "http://schema.org",
|
|
1371
|
+
"@type": "Organization",
|
|
1372
|
+
name: settings.name,
|
|
1373
|
+
url: `https://${domain}/`,
|
|
1374
|
+
logo: `https://${domain}${settings.logo}`
|
|
1150
1375
|
});
|
|
1151
|
-
|
|
1152
|
-
|
|
1376
|
+
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width">\n<meta name="theme-color"', '>\n<link rel="icon" type="image/png"', ' sizes="32x32">\n', "\n", "\n", '\n<meta name="author"', '>\n<meta name="generator"', '>\n<link rel="canonical"', ">\n", '\n<meta name="apple-mobile-web-app-capable" content="yes">\n<meta name="apple-mobile-web-app-status-bar-style" content="default">\n<meta property="og:site_name"', '>\n<meta property="og:url"', '>\n<meta property="og:title"', '>\n<meta property="og:description"', '>\n<meta property="og:type" content="website">\n<meta property="og:locale"', ">\n", "\n", '\n<meta name="twitter:card" content="summary">\n', '\n<meta name="ecom-store-id"', ">\n\n", "\n\n<script", ">", '</script>\n<script type="application/ld+json">', "</script>\n\n", "\n", ""])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title && renderTemplate`<title>${title}</title>`, description && renderTemplate`<meta name="description"${addAttribute(description, "content")}>`, addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fbAppId && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fbAppId, "content")}>`, metatagsContent?.twitterUsername && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitterUsername, "content")}>`, addAttribute(String(storeId), "content"), isPWA , addAttribute(createTransitionScope($$result, "kvdive2p"), "data-astro-transition-persist"), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd), hasViewTransitions && renderTemplate`${renderComponent($$result, "ViewTransitions", $$ViewTransitions, { "fallback": "none" })}`, contextInlineClientJS && renderTemplate(_b || (_b = __template$3(["<script>", "</script>"])), unescapeHTML(contextInlineClientJS)));
|
|
1377
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
|
|
1378
|
+
|
|
1379
|
+
function has(value) {
|
|
1380
|
+
return typeof value === "string";
|
|
1381
|
+
}
|
|
1382
|
+
function is(a, b) {
|
|
1383
|
+
return a === b;
|
|
1384
|
+
}
|
|
1385
|
+
function any(a, b) {
|
|
1386
|
+
return has(a) && b.includes(a.toLowerCase());
|
|
1387
|
+
}
|
|
1388
|
+
const ElementWeights = {
|
|
1389
|
+
META: 10,
|
|
1390
|
+
TITLE: 9,
|
|
1391
|
+
PRECONNECT: 8,
|
|
1392
|
+
ASYNC_SCRIPT: 7,
|
|
1393
|
+
IMPORT_STYLES: 6,
|
|
1394
|
+
SYNC_SCRIPT: 5,
|
|
1395
|
+
SYNC_STYLES: 4,
|
|
1396
|
+
PRELOAD: 3,
|
|
1397
|
+
DEFER_SCRIPT: 2,
|
|
1398
|
+
PREFETCH_PRERENDER: 1,
|
|
1399
|
+
OTHER: 0
|
|
1400
|
+
};
|
|
1401
|
+
const ElementDetectors = {
|
|
1402
|
+
META: isMeta,
|
|
1403
|
+
TITLE: isTitle,
|
|
1404
|
+
PRECONNECT: isPreconnect,
|
|
1405
|
+
DEFER_SCRIPT: isDeferScript,
|
|
1406
|
+
ASYNC_SCRIPT: isAsyncScript,
|
|
1407
|
+
IMPORT_STYLES: isImportStyles,
|
|
1408
|
+
SYNC_SCRIPT: isSyncScript,
|
|
1409
|
+
SYNC_STYLES: isSyncStyles,
|
|
1410
|
+
PRELOAD: isPreload,
|
|
1411
|
+
PREFETCH_PRERENDER: isPrefetchPrerender
|
|
1412
|
+
};
|
|
1413
|
+
const META_HTTP_EQUIV_KEYWORDS = [
|
|
1414
|
+
"accept-ch",
|
|
1415
|
+
"content-security-policy",
|
|
1416
|
+
"content-type",
|
|
1417
|
+
"default-style",
|
|
1418
|
+
"delegate-ch",
|
|
1419
|
+
"origin-trial",
|
|
1420
|
+
"x-dns-prefetch-control"
|
|
1421
|
+
];
|
|
1422
|
+
function isMeta(name, a) {
|
|
1423
|
+
if (name === "base")
|
|
1424
|
+
return true;
|
|
1425
|
+
if (name !== "meta")
|
|
1426
|
+
return false;
|
|
1427
|
+
return has(a.charset) || is(a.name, "viewport") || any(a["http-equiv"], META_HTTP_EQUIV_KEYWORDS);
|
|
1428
|
+
}
|
|
1429
|
+
function isTitle(name) {
|
|
1430
|
+
return name === "title";
|
|
1431
|
+
}
|
|
1432
|
+
function isPreconnect(name, { rel }) {
|
|
1433
|
+
return name === "link" && is(rel, "preconnect");
|
|
1434
|
+
}
|
|
1435
|
+
function isAsyncScript(name, { src, async }) {
|
|
1436
|
+
return name === "script" && has(src) && has(async);
|
|
1437
|
+
}
|
|
1438
|
+
function isImportStyles(name, a, children) {
|
|
1439
|
+
const importRe = /@import/;
|
|
1440
|
+
if (name === "style") {
|
|
1441
|
+
return importRe.test(children);
|
|
1153
1442
|
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1443
|
+
return false;
|
|
1444
|
+
}
|
|
1445
|
+
function isSyncScript(name, { src, defer, async, type = "" }) {
|
|
1446
|
+
if (name !== "script")
|
|
1447
|
+
return false;
|
|
1448
|
+
return !(has(src) && (has(defer) || has(async) || is(type, "module")) || type.includes("json"));
|
|
1449
|
+
}
|
|
1450
|
+
function isSyncStyles(name, { rel }) {
|
|
1451
|
+
if (name === "style")
|
|
1452
|
+
return true;
|
|
1453
|
+
return name === "link" && is(rel, "stylesheet");
|
|
1454
|
+
}
|
|
1455
|
+
function isPreload(name, { rel }) {
|
|
1456
|
+
return name === "link" && any(rel, ["preload", "modulepreload"]);
|
|
1457
|
+
}
|
|
1458
|
+
function isDeferScript(name, { src, defer, async, type }) {
|
|
1459
|
+
if (name !== "script")
|
|
1460
|
+
return false;
|
|
1461
|
+
return has(src) && has(defer) || has(src) && is(type, "module") && !has(async);
|
|
1462
|
+
}
|
|
1463
|
+
function isPrefetchPrerender(name, { rel }) {
|
|
1464
|
+
return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
|
|
1465
|
+
}
|
|
1466
|
+
function getWeight(element) {
|
|
1467
|
+
for (const [id, detector] of Object.entries(ElementDetectors)) {
|
|
1468
|
+
const children = element.name === "style" && element.children.length > 0 ? renderSync(element) : "";
|
|
1469
|
+
if (detector(element.name, element.attributes, children)) {
|
|
1470
|
+
return ElementWeights[id];
|
|
1471
|
+
}
|
|
1160
1472
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
|
-
const getBuiltPicture = createPictureGetter(getBuiltImage);
|
|
1473
|
+
return ElementWeights.OTHER;
|
|
1474
|
+
}
|
|
1166
1475
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1476
|
+
function capo(html) {
|
|
1477
|
+
const ast = parse$1(html);
|
|
1478
|
+
try {
|
|
1479
|
+
walkSync(ast, (node, parent, index) => {
|
|
1480
|
+
if (node.type === ELEMENT_NODE && node.name === "head") {
|
|
1481
|
+
if (parent) {
|
|
1482
|
+
parent.children.splice(index, 1, getSortedHead(node));
|
|
1483
|
+
throw "done";
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
} catch (e) {
|
|
1488
|
+
if (e !== "done")
|
|
1489
|
+
throw e;
|
|
1172
1490
|
}
|
|
1173
|
-
return
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
const {
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1491
|
+
return renderSync(ast);
|
|
1492
|
+
}
|
|
1493
|
+
function getSortedHead(head) {
|
|
1494
|
+
const weightedChildren = head.children.map((node) => {
|
|
1495
|
+
if (node.type === ELEMENT_NODE) {
|
|
1496
|
+
const weight = getWeight(node);
|
|
1497
|
+
return [weight, node];
|
|
1498
|
+
}
|
|
1499
|
+
}).filter(Boolean);
|
|
1500
|
+
const children = weightedChildren.sort((a, b) => b[0] - a[0]).map(([_, element]) => element);
|
|
1501
|
+
return { ...head, children };
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const Head = createComponent({
|
|
1505
|
+
factory: async (result, props, slots) => {
|
|
1506
|
+
let head = "";
|
|
1507
|
+
head += `<head${spreadAttributes(props)} data-capo>`;
|
|
1508
|
+
head += await renderSlotToString(result, slots.default);
|
|
1509
|
+
head += renderAllHeadContent(result);
|
|
1510
|
+
head += "</head>";
|
|
1511
|
+
return unescapeHTML(capo(head));
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
|
|
1515
|
+
function removeQueryString(src) {
|
|
1516
|
+
const index = src.lastIndexOf("?");
|
|
1517
|
+
return index > 0 ? src.substring(0, index) : src;
|
|
1518
|
+
}
|
|
1519
|
+
function basename(src) {
|
|
1520
|
+
return removeQueryString(src.replace(/^.*[\\\/]/, ""));
|
|
1521
|
+
}
|
|
1522
|
+
const extname = (src) => {
|
|
1523
|
+
const base = basename(src);
|
|
1524
|
+
const index = base.lastIndexOf(".");
|
|
1525
|
+
if (index <= 0) {
|
|
1526
|
+
return "";
|
|
1527
|
+
}
|
|
1528
|
+
return base.substring(index);
|
|
1529
|
+
};
|
|
1530
|
+
function parseAspectRatio(aspectRatio) {
|
|
1531
|
+
if (!aspectRatio) {
|
|
1532
|
+
return void 0;
|
|
1533
|
+
}
|
|
1534
|
+
if (typeof aspectRatio === "number") {
|
|
1535
|
+
return aspectRatio;
|
|
1536
|
+
}
|
|
1537
|
+
const [width, height] = aspectRatio.split(":");
|
|
1538
|
+
return parseInt(width, 10) / parseInt(height, 10);
|
|
1539
|
+
}
|
|
1540
|
+
async function resolveAspectRatio({ src, aspectRatio }) {
|
|
1541
|
+
if (typeof src === "string") {
|
|
1542
|
+
return parseAspectRatio(aspectRatio);
|
|
1543
|
+
}
|
|
1544
|
+
throw new Error('Custom (faster) `Picture.runtime.astro` works only with string ("remote") src');
|
|
1545
|
+
}
|
|
1546
|
+
async function resolveFormats({ src, formats }) {
|
|
1547
|
+
const unique = new Set(formats);
|
|
1548
|
+
if (typeof src === "string") {
|
|
1549
|
+
unique.add(extname(src).replace(".", ""));
|
|
1550
|
+
} else {
|
|
1551
|
+
throw new Error("Custom `Picture.ssr.astro` works only with string src");
|
|
1552
|
+
}
|
|
1553
|
+
return Array.from(unique).filter(Boolean);
|
|
1554
|
+
}
|
|
1555
|
+
const createPictureGetter = (getImage) => {
|
|
1556
|
+
return async (params) => {
|
|
1557
|
+
const {
|
|
1558
|
+
src,
|
|
1559
|
+
alt,
|
|
1560
|
+
widths,
|
|
1561
|
+
fit,
|
|
1562
|
+
position,
|
|
1563
|
+
background
|
|
1564
|
+
} = params;
|
|
1565
|
+
if (!src) {
|
|
1566
|
+
throw new Error("[@astrojs/image] `src` is required");
|
|
1567
|
+
}
|
|
1568
|
+
if (!widths || !Array.isArray(widths)) {
|
|
1569
|
+
throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
|
|
1570
|
+
}
|
|
1571
|
+
const aspectRatio = await resolveAspectRatio(params);
|
|
1572
|
+
if (!aspectRatio) {
|
|
1573
|
+
throw new Error("`aspectRatio` must be provided for remote images");
|
|
1574
|
+
}
|
|
1575
|
+
const allFormats = await resolveFormats(params);
|
|
1576
|
+
const lastFormat = allFormats[allFormats.length - 1];
|
|
1577
|
+
const maxWidth = Math.max(...widths);
|
|
1578
|
+
let image;
|
|
1579
|
+
async function getSource(format) {
|
|
1580
|
+
const imgs = await Promise.all(
|
|
1581
|
+
widths.map(async (width) => {
|
|
1582
|
+
const img = await getImage({
|
|
1583
|
+
src,
|
|
1584
|
+
alt,
|
|
1585
|
+
format,
|
|
1586
|
+
width,
|
|
1587
|
+
height: width / aspectRatio,
|
|
1588
|
+
fit,
|
|
1589
|
+
position,
|
|
1590
|
+
background,
|
|
1591
|
+
aspectRatio
|
|
1592
|
+
});
|
|
1593
|
+
if (format === lastFormat && width === maxWidth) {
|
|
1594
|
+
image = img;
|
|
1595
|
+
}
|
|
1596
|
+
return `${img.src} ${width}w`;
|
|
1597
|
+
})
|
|
1598
|
+
);
|
|
1599
|
+
return {
|
|
1600
|
+
type: mime.getType(format) || format,
|
|
1601
|
+
srcset: imgs.join(",")
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
const sources = await Promise.all(allFormats.map((format) => getSource(format)));
|
|
1605
|
+
return {
|
|
1606
|
+
sources,
|
|
1607
|
+
// @ts-ignore
|
|
1608
|
+
image
|
|
1609
|
+
};
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
const getAspectRatio = (src, tryImageSize) => {
|
|
1614
|
+
if (typeof src === "string") {
|
|
1615
|
+
src = tryImageSize(src);
|
|
1616
|
+
} else if (src.width) {
|
|
1617
|
+
return src.height ? src.width / src.height : 1;
|
|
1618
|
+
}
|
|
1619
|
+
return 0;
|
|
1620
|
+
};
|
|
1621
|
+
const useSSRPicture = async (params) => {
|
|
1622
|
+
const {
|
|
1623
|
+
src,
|
|
1624
|
+
alt,
|
|
1625
|
+
sizes: propSizes,
|
|
1626
|
+
widths,
|
|
1627
|
+
aspectRatio: propAspectRatio,
|
|
1628
|
+
fit,
|
|
1629
|
+
background,
|
|
1630
|
+
position,
|
|
1631
|
+
formats = ["avif", "webp"],
|
|
1186
1632
|
loading = "lazy",
|
|
1187
1633
|
decoding = "async",
|
|
1188
1634
|
hasImg = true,
|
|
@@ -1312,354 +1758,103 @@ const useSSRPicture = async (params) => {
|
|
|
1312
1758
|
};
|
|
1313
1759
|
};
|
|
1314
1760
|
|
|
1315
|
-
const $$Astro$f = createAstro("https://demo.ecomplus.app");
|
|
1316
|
-
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1317
|
-
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
1318
|
-
Astro2.self = $$Picture;
|
|
1319
|
-
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1320
|
-
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1321
|
-
const originalImages = [];
|
|
1322
|
-
const manifestFilepath = join(baseDir, "dist/server/images.src.csv");
|
|
1323
|
-
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1324
|
-
const [filepath, width, height] = line.split(",");
|
|
1325
|
-
originalImages.push({
|
|
1326
|
-
filepath,
|
|
1327
|
-
width: Number(width),
|
|
1328
|
-
height: Number(height)
|
|
1329
|
-
});
|
|
1330
|
-
});
|
|
1331
|
-
const tryImageSize = (src) => {
|
|
1332
|
-
let dimensions = {};
|
|
1333
|
-
if (typeof src === "string" && src.startsWith("/")) {
|
|
1334
|
-
const originalImage = originalImages.find(({ filepath }) => {
|
|
1335
|
-
return new RegExp(`^/${filepath}\\??.*`).test(src);
|
|
1336
|
-
});
|
|
1337
|
-
if (originalImage) {
|
|
1338
|
-
const { width, height } = originalImage;
|
|
1339
|
-
dimensions = { width, height };
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
return dimensions;
|
|
1343
|
-
};
|
|
1344
|
-
const {
|
|
1345
|
-
sizes,
|
|
1346
|
-
sources,
|
|
1347
|
-
pictureAttrs,
|
|
1348
|
-
imgAttrs
|
|
1349
|
-
} = await useSSRPicture({
|
|
1350
|
-
...Astro2.props,
|
|
1351
|
-
tryImageSize,
|
|
1352
|
-
getPicture: getBuiltPicture,
|
|
1353
|
-
assetsPrefix: Astro2.locals.assetsPrefix
|
|
1354
|
-
});
|
|
1355
|
-
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}> ${sources.map((attrs) => renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`)} ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`} </picture>`;
|
|
1356
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/images/Picture.runtime.astro", void 0);
|
|
1357
|
-
|
|
1358
|
-
/* eslint-disable */
|
|
1359
|
-
|
|
1360
|
-
const pwaInfo = false;
|
|
1361
|
-
|
|
1362
|
-
const $$Astro$e = createAstro("https://demo.ecomplus.app");
|
|
1363
|
-
const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
|
|
1364
|
-
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
1365
|
-
Astro2.self = $$ViewTransitions;
|
|
1366
|
-
const { fallback = "animate" } = Astro2.props;
|
|
1367
|
-
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>`;
|
|
1368
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
|
|
1369
|
-
|
|
1370
|
-
var __freeze$3 = Object.freeze;
|
|
1371
|
-
var __defProp$3 = Object.defineProperty;
|
|
1372
|
-
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
|
|
1373
|
-
var _b, _c;
|
|
1374
1761
|
const $$Astro$d = createAstro("https://demo.ecomplus.app");
|
|
1375
|
-
const $$
|
|
1762
|
+
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1376
1763
|
const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
|
|
1377
|
-
Astro2.self = $$
|
|
1378
|
-
const
|
|
1379
|
-
const
|
|
1380
|
-
const {
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
domain,
|
|
1393
|
-
primaryColor,
|
|
1394
|
-
settings,
|
|
1395
|
-
isPreview,
|
|
1396
|
-
getContent
|
|
1397
|
-
} = Astro2.locals.routeContext;
|
|
1398
|
-
if (fetchingApiContext) {
|
|
1399
|
-
await fetchingApiContext;
|
|
1400
|
-
}
|
|
1401
|
-
const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
|
|
1402
|
-
const getIconUrl = (size) => {
|
|
1403
|
-
return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
|
|
1404
|
-
};
|
|
1405
|
-
const apiDoc = apiContext.doc;
|
|
1406
|
-
const state = apiDoc || cmsContent || {};
|
|
1407
|
-
let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
|
|
1408
|
-
let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
|
|
1409
|
-
if (isHomepage) {
|
|
1410
|
-
if (!title)
|
|
1411
|
-
title = settings.name;
|
|
1412
|
-
if (!description)
|
|
1413
|
-
description = settings.description;
|
|
1414
|
-
}
|
|
1415
|
-
if (isSearchPage) {
|
|
1416
|
-
if (searchPageTerm) {
|
|
1417
|
-
if (!title)
|
|
1418
|
-
title = settings.name;
|
|
1419
|
-
title = title.replace("$term", searchPageTerm);
|
|
1420
|
-
if (!title.includes(searchPageTerm)) {
|
|
1421
|
-
title = `${searchPageTerm} | ${title}`;
|
|
1422
|
-
}
|
|
1423
|
-
} else if (!title) {
|
|
1424
|
-
title = `${i19searchProducts} | ${settings.name}`;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
|
|
1428
|
-
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
1429
|
-
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
1430
|
-
const { metatags: metatagsContent } = await getContent("layout");
|
|
1431
|
-
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
1432
|
-
let ogImage;
|
|
1433
|
-
if (apiDoc) {
|
|
1434
|
-
const picture = img(state, void 0, "zoom");
|
|
1435
|
-
ogImage = picture && picture.url;
|
|
1436
|
-
}
|
|
1437
|
-
if (!ogImage) {
|
|
1438
|
-
if (metatagsContent?.ogImage) {
|
|
1439
|
-
ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
|
|
1440
|
-
}
|
|
1441
|
-
} else {
|
|
1442
|
-
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
1443
|
-
}
|
|
1444
|
-
let inlineClientJS = `
|
|
1445
|
-
window._emitApiContext = (id = null) => {
|
|
1446
|
-
console.log('[ctx] emit ' + id);
|
|
1447
|
-
window.dispatchEvent(new Event('storefront:apiContext'));
|
|
1448
|
-
window._emitedContextId = id;
|
|
1449
|
-
};
|
|
1450
|
-
window.ECOM_STORE_ID = ${storeId};
|
|
1451
|
-
window.ECOM_LANG = '${lang}';
|
|
1452
|
-
window.ECOM_CURRENCY = '${currency}';
|
|
1453
|
-
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
1454
|
-
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
1455
|
-
window.GIT_BRANCH = '${{"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.GIT_BRANCH || ""}';
|
|
1456
|
-
window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
|
|
1457
|
-
if (apiContext.error) {
|
|
1458
|
-
const { message, statusCode } = apiContext.error;
|
|
1459
|
-
const url = Astro2.url.pathname;
|
|
1460
|
-
inlineClientJS += `
|
|
1461
|
-
console.error(${JSON.stringify(message)});
|
|
1462
|
-
setTimeout(() => {
|
|
1463
|
-
window.location.replace("/~fallback?status=${statusCode}&url=${encodeURIComponent(url)}");
|
|
1464
|
-
}, 1);`;
|
|
1465
|
-
}
|
|
1466
|
-
let contextInlineClientJS;
|
|
1467
|
-
if (apiDoc) {
|
|
1468
|
-
if (typeof apiDoc.price === "number") {
|
|
1469
|
-
apiDoc.price = price(apiDoc);
|
|
1470
|
-
}
|
|
1471
|
-
const slimDocRegex = globalThis.$storefrontSlimDocRegex || /body_|meta_|metafields|_records|i18n/;
|
|
1472
|
-
const minifyApiDoc = (nestedDoc) => {
|
|
1473
|
-
if (typeof nestedDoc === "object" && nestedDoc) {
|
|
1474
|
-
if (Array.isArray(nestedDoc)) {
|
|
1475
|
-
nestedDoc.forEach((item) => minifyApiDoc(item));
|
|
1476
|
-
} else {
|
|
1477
|
-
Object.keys(nestedDoc).forEach((field) => {
|
|
1478
|
-
if (slimDocRegex.test(field)) {
|
|
1479
|
-
delete nestedDoc[field];
|
|
1480
|
-
} else {
|
|
1481
|
-
minifyApiDoc(nestedDoc[field]);
|
|
1482
|
-
}
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1764
|
+
Astro2.self = $$Picture;
|
|
1765
|
+
const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND;
|
|
1766
|
+
const versionSuffix = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.BUILD_OUTPUT !== "static" && deployRand ? `&V=${deployRand}` : "";
|
|
1767
|
+
const getImageFilepath = (src) => {
|
|
1768
|
+
const filepath = resolve(process.env.STOREFRONT_BASE_DIR, `public${src}`);
|
|
1769
|
+
if ({"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.BUILD_OUTPUT === "static") {
|
|
1770
|
+
try {
|
|
1771
|
+
copyFileSync(filepath, resolve(
|
|
1772
|
+
process.env.STOREFRONT_BASE_DIR,
|
|
1773
|
+
{"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.BUILD_OUT_DIR || "dist/client",
|
|
1774
|
+
"_astro",
|
|
1775
|
+
basename$1(filepath)
|
|
1776
|
+
));
|
|
1777
|
+
} catch (err) {
|
|
1778
|
+
console.error(err);
|
|
1485
1779
|
}
|
|
1486
|
-
return nestedDoc;
|
|
1487
|
-
};
|
|
1488
|
-
inlineClientJS += `
|
|
1489
|
-
window._firstLoadContextId = '${apiDoc._id}';`;
|
|
1490
|
-
contextInlineClientJS = `
|
|
1491
|
-
$storefront.apiContext = ${JSON.stringify({
|
|
1492
|
-
resource: apiContext.resource,
|
|
1493
|
-
doc: minifyApiDoc({ ...apiDoc }),
|
|
1494
|
-
timestamp: Date.now()
|
|
1495
|
-
})};
|
|
1496
|
-
$storefront.context /* DEPRECATED */ = $storefront.apiContext;
|
|
1497
|
-
_emitApiContext('${apiDoc._id}');`;
|
|
1498
|
-
} else {
|
|
1499
|
-
inlineClientJS += `
|
|
1500
|
-
window._firstLoadContextId = null;`;
|
|
1501
|
-
contextInlineClientJS = `
|
|
1502
|
-
$storefront.apiContext = null;
|
|
1503
|
-
delete $storefront.apiContext;
|
|
1504
|
-
delete $storefront.context;
|
|
1505
|
-
_emitApiContext();`;
|
|
1506
|
-
}
|
|
1507
|
-
if (isPreview) {
|
|
1508
|
-
inlineClientJS += `
|
|
1509
|
-
window.$isCmsPreview = true;`;
|
|
1510
|
-
}
|
|
1511
|
-
const inlineJSONLd = JSON.stringify({
|
|
1512
|
-
"@context": "http://schema.org",
|
|
1513
|
-
"@type": "Organization",
|
|
1514
|
-
name: settings.name,
|
|
1515
|
-
url: `https://${domain}/`,
|
|
1516
|
-
logo: `https://${domain}${settings.logo}`
|
|
1517
|
-
});
|
|
1518
|
-
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8"><meta name="viewport" content="width=device-width"><meta name="theme-color"', '><link rel="icon" type="image/png"', ' sizes="32x32">', "", "", '<meta name="author"', '><meta name="generator"', '><link rel="canonical"', ">", '<meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta property="og:site_name"', '><meta property="og:url"', '><meta property="og:title"', '><meta property="og:description"', '><meta property="og:type" content="website"><meta property="og:locale"', ">", "", '<meta name="twitter:card" content="summary">', '<meta name="ecom-store-id"', ">", "<script", ">", '</script><script type="application/ld+json">', "</script>", "", ""])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title && renderTemplate`<title>${title}</title>`, description && renderTemplate`<meta name="description"${addAttribute(description, "content")}>`, addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fbAppId && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fbAppId, "content")}>`, metatagsContent?.twitterUsername && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitterUsername, "content")}>`, addAttribute(String(storeId), "content"), isPWA , addAttribute(createTransitionScope($$result, "kvdive2p"), "data-astro-transition-persist"), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd), hasViewTransitions && renderTemplate`${renderComponent($$result, "ViewTransitions", $$ViewTransitions, { "fallback": "none" })}`, contextInlineClientJS && renderTemplate(_b || (_b = __template$3(["<script>", "</script>"])), unescapeHTML(contextInlineClientJS)));
|
|
1519
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
|
|
1520
|
-
|
|
1521
|
-
function has(value) {
|
|
1522
|
-
return typeof value === "string";
|
|
1523
|
-
}
|
|
1524
|
-
function is(a, b) {
|
|
1525
|
-
return a === b;
|
|
1526
|
-
}
|
|
1527
|
-
function any(a, b) {
|
|
1528
|
-
return has(a) && b.includes(a.toLowerCase());
|
|
1529
|
-
}
|
|
1530
|
-
const ElementWeights = {
|
|
1531
|
-
META: 10,
|
|
1532
|
-
TITLE: 9,
|
|
1533
|
-
PRECONNECT: 8,
|
|
1534
|
-
ASYNC_SCRIPT: 7,
|
|
1535
|
-
IMPORT_STYLES: 6,
|
|
1536
|
-
SYNC_SCRIPT: 5,
|
|
1537
|
-
SYNC_STYLES: 4,
|
|
1538
|
-
PRELOAD: 3,
|
|
1539
|
-
DEFER_SCRIPT: 2,
|
|
1540
|
-
PREFETCH_PRERENDER: 1,
|
|
1541
|
-
OTHER: 0
|
|
1542
|
-
};
|
|
1543
|
-
const ElementDetectors = {
|
|
1544
|
-
META: isMeta,
|
|
1545
|
-
TITLE: isTitle,
|
|
1546
|
-
PRECONNECT: isPreconnect,
|
|
1547
|
-
DEFER_SCRIPT: isDeferScript,
|
|
1548
|
-
ASYNC_SCRIPT: isAsyncScript,
|
|
1549
|
-
IMPORT_STYLES: isImportStyles,
|
|
1550
|
-
SYNC_SCRIPT: isSyncScript,
|
|
1551
|
-
SYNC_STYLES: isSyncStyles,
|
|
1552
|
-
PRELOAD: isPreload,
|
|
1553
|
-
PREFETCH_PRERENDER: isPrefetchPrerender
|
|
1554
|
-
};
|
|
1555
|
-
const META_HTTP_EQUIV_KEYWORDS = [
|
|
1556
|
-
"accept-ch",
|
|
1557
|
-
"content-security-policy",
|
|
1558
|
-
"content-type",
|
|
1559
|
-
"default-style",
|
|
1560
|
-
"delegate-ch",
|
|
1561
|
-
"origin-trial",
|
|
1562
|
-
"x-dns-prefetch-control"
|
|
1563
|
-
];
|
|
1564
|
-
function isMeta(name, a) {
|
|
1565
|
-
if (name === "base")
|
|
1566
|
-
return true;
|
|
1567
|
-
if (name !== "meta")
|
|
1568
|
-
return false;
|
|
1569
|
-
return has(a.charset) || is(a.name, "viewport") || any(a["http-equiv"], META_HTTP_EQUIV_KEYWORDS);
|
|
1570
|
-
}
|
|
1571
|
-
function isTitle(name) {
|
|
1572
|
-
return name === "title";
|
|
1573
|
-
}
|
|
1574
|
-
function isPreconnect(name, { rel }) {
|
|
1575
|
-
return name === "link" && is(rel, "preconnect");
|
|
1576
|
-
}
|
|
1577
|
-
function isAsyncScript(name, { src, async }) {
|
|
1578
|
-
return name === "script" && has(src) && has(async);
|
|
1579
|
-
}
|
|
1580
|
-
function isImportStyles(name, a, children) {
|
|
1581
|
-
const importRe = /@import/;
|
|
1582
|
-
if (name === "style") {
|
|
1583
|
-
return importRe.test(children);
|
|
1584
|
-
}
|
|
1585
|
-
return false;
|
|
1586
|
-
}
|
|
1587
|
-
function isSyncScript(name, { src, defer, async, type = "" }) {
|
|
1588
|
-
if (name !== "script")
|
|
1589
|
-
return false;
|
|
1590
|
-
return !(has(src) && (has(defer) || has(async) || is(type, "module")) || type.includes("json"));
|
|
1591
|
-
}
|
|
1592
|
-
function isSyncStyles(name, { rel }) {
|
|
1593
|
-
if (name === "style")
|
|
1594
|
-
return true;
|
|
1595
|
-
return name === "link" && is(rel, "stylesheet");
|
|
1596
|
-
}
|
|
1597
|
-
function isPreload(name, { rel }) {
|
|
1598
|
-
return name === "link" && any(rel, ["preload", "modulepreload"]);
|
|
1599
|
-
}
|
|
1600
|
-
function isDeferScript(name, { src, defer, async, type }) {
|
|
1601
|
-
if (name !== "script")
|
|
1602
|
-
return false;
|
|
1603
|
-
return has(src) && has(defer) || has(src) && is(type, "module") && !has(async);
|
|
1604
|
-
}
|
|
1605
|
-
function isPrefetchPrerender(name, { rel }) {
|
|
1606
|
-
return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
|
|
1607
|
-
}
|
|
1608
|
-
function getWeight(element) {
|
|
1609
|
-
for (const [id, detector] of Object.entries(ElementDetectors)) {
|
|
1610
|
-
const children = element.name === "style" && element.children.length > 0 ? renderSync(element) : "";
|
|
1611
|
-
if (detector(element.name, element.attributes, children)) {
|
|
1612
|
-
return ElementWeights[id];
|
|
1613
1780
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
if (parent) {
|
|
1624
|
-
parent.children.splice(index, 1, getSortedHead(node));
|
|
1625
|
-
throw "done";
|
|
1626
|
-
}
|
|
1781
|
+
return filepath;
|
|
1782
|
+
};
|
|
1783
|
+
const tryImageSize = (src) => {
|
|
1784
|
+
let dimensions = {};
|
|
1785
|
+
if (typeof src === "string" && src.startsWith("/")) {
|
|
1786
|
+
try {
|
|
1787
|
+
dimensions = imageSize(getImageFilepath(src));
|
|
1788
|
+
} catch (e) {
|
|
1789
|
+
dimensions = {};
|
|
1627
1790
|
}
|
|
1628
|
-
});
|
|
1629
|
-
} catch (e) {
|
|
1630
|
-
if (e !== "done")
|
|
1631
|
-
throw e;
|
|
1632
|
-
}
|
|
1633
|
-
return renderSync(ast);
|
|
1634
|
-
}
|
|
1635
|
-
function getSortedHead(head) {
|
|
1636
|
-
const weightedChildren = head.children.map((node) => {
|
|
1637
|
-
if (node.type === ELEMENT_NODE) {
|
|
1638
|
-
const weight = getWeight(node);
|
|
1639
|
-
return [weight, node];
|
|
1640
1791
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
});
|
|
1792
|
+
return dimensions;
|
|
1793
|
+
};
|
|
1794
|
+
const {
|
|
1795
|
+
sizes,
|
|
1796
|
+
sources,
|
|
1797
|
+
pictureAttrs,
|
|
1798
|
+
imgAttrs
|
|
1799
|
+
} = await useSSRPicture({
|
|
1800
|
+
...Astro2.props,
|
|
1801
|
+
tryImageSize,
|
|
1802
|
+
getPicture: createPictureGetter(async (imageOptions) => {
|
|
1803
|
+
let imageMetadata;
|
|
1804
|
+
if (imageOptions.src.startsWith("/")) {
|
|
1805
|
+
const imageFilepath = getImageFilepath(imageOptions.src);
|
|
1806
|
+
const { width: width2, height: height2 } = tryImageSize(imageOptions.src);
|
|
1807
|
+
if (width2 && height2) {
|
|
1808
|
+
const mimeType = mime.getType(imageFilepath);
|
|
1809
|
+
if (mimeType?.startsWith("image/")) {
|
|
1810
|
+
imageMetadata = {
|
|
1811
|
+
src: imageFilepath,
|
|
1812
|
+
width: width2,
|
|
1813
|
+
height: height2,
|
|
1814
|
+
// @ts-ignore
|
|
1815
|
+
format: mimeType.replace("image/", "")
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
const {
|
|
1821
|
+
src,
|
|
1822
|
+
attributes: { width, height }
|
|
1823
|
+
} = await getImage({
|
|
1824
|
+
...imageOptions,
|
|
1825
|
+
src: imageMetadata || imageOptions.src
|
|
1826
|
+
});
|
|
1827
|
+
return { src, width, height };
|
|
1828
|
+
}),
|
|
1829
|
+
assetsPrefix: Astro2.locals.assetsPrefix
|
|
1830
|
+
});
|
|
1831
|
+
if (imgAttrs) {
|
|
1832
|
+
imgAttrs.src += versionSuffix;
|
|
1833
|
+
}
|
|
1834
|
+
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}>
|
|
1835
|
+
${sources.map((attrs) => {
|
|
1836
|
+
if (versionSuffix) {
|
|
1837
|
+
attrs.srcset = attrs.srcset.replace(/\s(\w+)$/, `${versionSuffix} $1`);
|
|
1838
|
+
}
|
|
1839
|
+
return renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`;
|
|
1840
|
+
})}
|
|
1841
|
+
${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`}
|
|
1842
|
+
</picture>`;
|
|
1843
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
|
|
1656
1844
|
|
|
1657
1845
|
const $$Astro$c = createAstro("https://demo.ecomplus.app");
|
|
1658
1846
|
const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
1659
1847
|
const Astro2 = $$result.createAstro($$Astro$c, $$props, $$slots);
|
|
1660
1848
|
Astro2.self = $$BaseBody;
|
|
1661
1849
|
const { settings } = Astro2.locals.routeContext;
|
|
1662
|
-
return renderTemplate`${maybeRenderHead()}<body style="visibility:hidden" class="!visible"> <!-- Prevent FOUC -->
|
|
1850
|
+
return renderTemplate`${maybeRenderHead()}<body style="visibility:hidden" class="!visible"> <!-- Prevent FOUC -->
|
|
1851
|
+
<div id="teleported-overlap" class="relative z-[59]"></div>
|
|
1852
|
+
<div id="teleported-top" class="relative z-[19]"></div>
|
|
1853
|
+
${renderSlot$1($$result, $$slots["default"])}
|
|
1854
|
+
${renderSlot$1($$result, $$slots["before-body-end"])}
|
|
1855
|
+
<div id="teleported-bottom" class="relative z-[19]"></div>
|
|
1856
|
+
${settings.icon && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": settings.icon, "alt": "Icon", "formats": ["png"], "widths": [32, 192, 512], "sizes": "32px", "class": "absolute hidden", "style": "bottom: -1000px", "hasImg": false })}`}
|
|
1857
|
+
</body>`;
|
|
1663
1858
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro", void 0);
|
|
1664
1859
|
|
|
1665
1860
|
const $$Astro$b = createAstro("https://demo.ecomplus.app");
|
|
@@ -1668,7 +1863,16 @@ const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1668
1863
|
Astro2.self = $$Base$1;
|
|
1669
1864
|
const { getContent } = Astro2.locals.routeContext;
|
|
1670
1865
|
const { customCode } = await getContent("layout");
|
|
1671
|
-
return renderTemplate`${renderComponent($$result, "Head", Head, {}, { "default": ($$result2) => renderTemplate`
|
|
1866
|
+
return renderTemplate`${renderComponent($$result, "Head", Head, {}, { "default": ($$result2) => renderTemplate`
|
|
1867
|
+
${renderSlot$1($$result2, $$slots["base-head"])}
|
|
1868
|
+
${customCode?.css && renderTemplate`<style>{customCode.css}</style>`}${customCode?.htmlHead && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlHead)}` })}`}${renderSlot$1($$result2, $$slots["base-head-scripts"])}
|
|
1869
|
+
${renderSlot$1($$result2, $$slots["before-head-end"])}
|
|
1870
|
+
` })}
|
|
1871
|
+
${renderComponent($$result, "BaseBody", $$BaseBody, {}, { "default": ($$result2) => renderTemplate`
|
|
1872
|
+
${renderSlot$1($$result2, $$slots["default"])}
|
|
1873
|
+
${customCode?.htmlBody && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(customCode.htmlBody)}` })}`}${renderSlot$1($$result2, $$slots["base-body-scripts"])}
|
|
1874
|
+
${renderSlot$1($$result2, $$slots["before-body-end"])}
|
|
1875
|
+
` })}`;
|
|
1672
1876
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro", void 0);
|
|
1673
1877
|
|
|
1674
1878
|
var __freeze$2 = Object.freeze;
|
|
@@ -1686,179 +1890,15 @@ const $$Astro$9 = createAstro("https://demo.ecomplus.app");
|
|
|
1686
1890
|
const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
1687
1891
|
const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
|
|
1688
1892
|
Astro2.self = $$Base;
|
|
1689
|
-
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
1893
|
+
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
1894
|
+
${renderSlot$1($$result3, $$slots["base-head"])}
|
|
1895
|
+
` })}`, "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
${renderSlot$1($$result2, $$slots["default"])}
|
|
1899
|
+
` })}`;
|
|
1690
1900
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro", void 0);
|
|
1691
1901
|
|
|
1692
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
1693
|
-
__name: "PaymentMethodFlag",
|
|
1694
|
-
props: {
|
|
1695
|
-
as: { default: "i" },
|
|
1696
|
-
flag: {}
|
|
1697
|
-
},
|
|
1698
|
-
setup(__props, { expose: __expose }) {
|
|
1699
|
-
__expose();
|
|
1700
|
-
const props = __props;
|
|
1701
|
-
const iconClassName = computed(() => {
|
|
1702
|
-
switch (props.flag) {
|
|
1703
|
-
case "pix":
|
|
1704
|
-
return "i-pix text-[#77B6A8]";
|
|
1705
|
-
case "visa":
|
|
1706
|
-
return "i-visa";
|
|
1707
|
-
case "mastercard":
|
|
1708
|
-
return "i-mastercard";
|
|
1709
|
-
case "elo":
|
|
1710
|
-
return "i-elo";
|
|
1711
|
-
case "amex":
|
|
1712
|
-
return "i-amex";
|
|
1713
|
-
case "hipercard":
|
|
1714
|
-
return "i-hipercard";
|
|
1715
|
-
case "diners":
|
|
1716
|
-
return "i-dinersclub";
|
|
1717
|
-
case "discover":
|
|
1718
|
-
return "i-discover";
|
|
1719
|
-
default:
|
|
1720
|
-
return "";
|
|
1721
|
-
}
|
|
1722
|
-
});
|
|
1723
|
-
const __returned__ = { props, iconClassName };
|
|
1724
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1725
|
-
return __returned__;
|
|
1726
|
-
}
|
|
1727
|
-
});
|
|
1728
|
-
function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1729
|
-
if (!$setup.iconClassName) {
|
|
1730
|
-
_push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
|
|
1731
|
-
} else {
|
|
1732
|
-
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
const _sfc_setup$z = _sfc_main$z.setup;
|
|
1736
|
-
_sfc_main$z.setup = (props, ctx) => {
|
|
1737
|
-
const ssrContext = useSSRContext();
|
|
1738
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
|
|
1739
|
-
return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
|
|
1740
|
-
};
|
|
1741
|
-
const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
|
|
1742
|
-
|
|
1743
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1744
|
-
__name: "FooterStamps",
|
|
1745
|
-
props: {
|
|
1746
|
-
stamps: {}
|
|
1747
|
-
},
|
|
1748
|
-
setup(__props, { expose: __expose }) {
|
|
1749
|
-
__expose();
|
|
1750
|
-
const __returned__ = { PaymentMethodFlag };
|
|
1751
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1752
|
-
return __returned__;
|
|
1753
|
-
}
|
|
1754
|
-
});
|
|
1755
|
-
function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1756
|
-
const _component_ALink = resolveComponent("ALink");
|
|
1757
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><div class="flex flex-wrap items-start justify-between gap-5 lg:flex-nowrap"><ul class="mx-auto flex items-center gap-x-6 gap-y-3 overflow-x-auto md:mx-0 md:flex-wrap md:overflow-hidden lg:gap-x-8"><!--[-->`);
|
|
1758
|
-
ssrRenderList($props.stamps, (stamp, i) => {
|
|
1759
|
-
_push(`<li>`);
|
|
1760
|
-
_push(ssrRenderComponent(_component_ALink, {
|
|
1761
|
-
href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
|
|
1762
|
-
}, {
|
|
1763
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1764
|
-
if (_push2) {
|
|
1765
|
-
ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
|
|
1766
|
-
if (!stamp.img) {
|
|
1767
|
-
_push2(`<span class="flex items-center"${_scopeId}>`);
|
|
1768
|
-
if (stamp.icon) {
|
|
1769
|
-
_push2(`<span class="[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"${_scopeId}>`);
|
|
1770
|
-
if (stamp.icon === "lock") {
|
|
1771
|
-
_push2(`<i class="i-lock-closed"${_scopeId}></i>`);
|
|
1772
|
-
} else if (stamp.icon === "check") {
|
|
1773
|
-
_push2(`<i class="i-check-badge"${_scopeId}></i>`);
|
|
1774
|
-
} else {
|
|
1775
|
-
_push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
|
|
1776
|
-
}
|
|
1777
|
-
_push2(`</span>`);
|
|
1778
|
-
} else {
|
|
1779
|
-
_push2(`<!---->`);
|
|
1780
|
-
}
|
|
1781
|
-
_push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
|
|
1782
|
-
if (stamp.href && stamp.href.charAt(0) !== "/") {
|
|
1783
|
-
_push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
|
|
1784
|
-
} else {
|
|
1785
|
-
_push2(`<!---->`);
|
|
1786
|
-
}
|
|
1787
|
-
_push2(`</span></span>`);
|
|
1788
|
-
} else {
|
|
1789
|
-
_push2(`<!---->`);
|
|
1790
|
-
}
|
|
1791
|
-
} else {
|
|
1792
|
-
return [
|
|
1793
|
-
renderSlot(_ctx.$slots, `picture-${i}`),
|
|
1794
|
-
!stamp.img ? (openBlock(), createBlock("span", {
|
|
1795
|
-
key: 0,
|
|
1796
|
-
class: "flex items-center"
|
|
1797
|
-
}, [
|
|
1798
|
-
stamp.icon ? (openBlock(), createBlock("span", {
|
|
1799
|
-
key: 0,
|
|
1800
|
-
class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
|
|
1801
|
-
}, [
|
|
1802
|
-
stamp.icon === "lock" ? (openBlock(), createBlock("i", {
|
|
1803
|
-
key: 0,
|
|
1804
|
-
class: "i-lock-closed"
|
|
1805
|
-
})) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
|
|
1806
|
-
key: 1,
|
|
1807
|
-
class: "i-check-badge"
|
|
1808
|
-
})) : (openBlock(), createBlock("i", {
|
|
1809
|
-
key: 2,
|
|
1810
|
-
class: "i-arrow-path-rounded-square"
|
|
1811
|
-
}))
|
|
1812
|
-
])) : createCommentVNode("", true),
|
|
1813
|
-
createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
|
|
1814
|
-
createTextVNode(toDisplayString(stamp.alt) + " ", 1),
|
|
1815
|
-
stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
|
|
1816
|
-
key: 0,
|
|
1817
|
-
class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
|
|
1818
|
-
})) : createCommentVNode("", true)
|
|
1819
|
-
])
|
|
1820
|
-
])) : createCommentVNode("", true)
|
|
1821
|
-
];
|
|
1822
|
-
}
|
|
1823
|
-
}),
|
|
1824
|
-
_: 2
|
|
1825
|
-
}, _parent));
|
|
1826
|
-
_push(`</li>`);
|
|
1827
|
-
});
|
|
1828
|
-
_push(`<!--]--></ul><div class="mx-auto flex flex-wrap items-center justify-end gap-4 overflow-x-auto text-2xl md:mx-0 md:flex-nowrap md:overflow-hidden"><!--[-->`);
|
|
1829
|
-
ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
|
|
1830
|
-
_push(ssrRenderComponent($setup["PaymentMethodFlag"], {
|
|
1831
|
-
key: paymentMethod,
|
|
1832
|
-
flag: paymentMethod
|
|
1833
|
-
}, null, _parent));
|
|
1834
|
-
});
|
|
1835
|
-
_push(`<!--]--></div></div><div class="mt-7 justify-between gap-4 text-center text-xs md:flex md:text-left"><div class="mb-3 md:mb-0"> @ ${ssrInterpolate((/* @__PURE__ */ new Date()).getFullYear())} ${ssrInterpolate(_ctx.$settings.corporateName)} ${ssrInterpolate(_ctx.$settings.address ? `/ ${_ctx.$settings.address}` : "")} / ${ssrInterpolate(_ctx.$settings.docNumber)}</div>`);
|
|
1836
|
-
_push(ssrRenderComponent(_component_ALink, {
|
|
1837
|
-
href: "https://www.ecomplus.io/",
|
|
1838
|
-
class: "italic text-[#37003c]"
|
|
1839
|
-
}, {
|
|
1840
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1841
|
-
if (_push2) {
|
|
1842
|
-
_push2(` powered by <b${_scopeId}>e-com.plus</b>`);
|
|
1843
|
-
} else {
|
|
1844
|
-
return [
|
|
1845
|
-
createTextVNode(" powered by "),
|
|
1846
|
-
createVNode("b", null, "e-com.plus")
|
|
1847
|
-
];
|
|
1848
|
-
}
|
|
1849
|
-
}),
|
|
1850
|
-
_: 1
|
|
1851
|
-
}, _parent));
|
|
1852
|
-
_push(`</div></div>`);
|
|
1853
|
-
}
|
|
1854
|
-
const _sfc_setup$y = _sfc_main$y.setup;
|
|
1855
|
-
_sfc_main$y.setup = (props, ctx) => {
|
|
1856
|
-
const ssrContext = useSSRContext();
|
|
1857
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
|
|
1858
|
-
return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
|
|
1859
|
-
};
|
|
1860
|
-
const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
|
|
1861
|
-
|
|
1862
1902
|
const emitter = new EventEmitter();
|
|
1863
1903
|
const useSharedData = async (props) => {
|
|
1864
1904
|
const { field, timeout = 1e3 } = props;
|
|
@@ -2093,7 +2133,7 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
|
|
|
2093
2133
|
};
|
|
2094
2134
|
};
|
|
2095
2135
|
|
|
2096
|
-
const _sfc_main$
|
|
2136
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2097
2137
|
__name: "PitchBar",
|
|
2098
2138
|
props: {
|
|
2099
2139
|
slides: {}
|
|
@@ -2110,7 +2150,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
2110
2150
|
return __returned__;
|
|
2111
2151
|
}
|
|
2112
2152
|
});
|
|
2113
|
-
function _sfc_ssrRender$
|
|
2153
|
+
function _sfc_ssrRender$A(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2114
2154
|
const _component_Carousel = resolveComponent("Carousel");
|
|
2115
2155
|
const _component_ALink = resolveComponent("ALink");
|
|
2116
2156
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
@@ -2203,31 +2243,44 @@ function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2203
2243
|
}, _parent));
|
|
2204
2244
|
_push(`</div></div>`);
|
|
2205
2245
|
}
|
|
2206
|
-
const _sfc_setup$
|
|
2207
|
-
_sfc_main$
|
|
2246
|
+
const _sfc_setup$A = _sfc_main$A.setup;
|
|
2247
|
+
_sfc_main$A.setup = (props, ctx) => {
|
|
2208
2248
|
const ssrContext = useSSRContext();
|
|
2209
2249
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
|
|
2210
|
-
return _sfc_setup$
|
|
2250
|
+
return _sfc_setup$A ? _sfc_setup$A(props, ctx) : void 0;
|
|
2211
2251
|
};
|
|
2212
|
-
const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2252
|
+
const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["ssrRender", _sfc_ssrRender$A]]);
|
|
2213
2253
|
|
|
2214
|
-
const useStorage = (key, initialValue, storage = globalThis.localStorage) => {
|
|
2254
|
+
const useStorage = (key, initialValue, storage = globalThis.localStorage, isWithBroadcast = true) => {
|
|
2215
2255
|
if (!storage) {
|
|
2216
2256
|
return reactive(initialValue);
|
|
2217
2257
|
}
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2258
|
+
const getStorageItem = () => {
|
|
2259
|
+
const sessionJson = storage.getItem(key);
|
|
2260
|
+
if (sessionJson) {
|
|
2261
|
+
try {
|
|
2262
|
+
return JSON.parse(sessionJson);
|
|
2263
|
+
} catch (e) {
|
|
2264
|
+
storage.removeItem(key);
|
|
2265
|
+
return null;
|
|
2266
|
+
}
|
|
2226
2267
|
}
|
|
2227
|
-
}
|
|
2268
|
+
};
|
|
2269
|
+
const persistedValue = getStorageItem();
|
|
2228
2270
|
const state = reactive(persistedValue || initialValue);
|
|
2271
|
+
let bc;
|
|
2272
|
+
if (isWithBroadcast && false) {
|
|
2273
|
+
bc = new BroadcastChannel(key);
|
|
2274
|
+
bc.onmessage = (event) => {
|
|
2275
|
+
if (event.data === "set") {
|
|
2276
|
+
Object.assign(state, getStorageItem());
|
|
2277
|
+
}
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2229
2280
|
watchDebounced(state, () => {
|
|
2230
2281
|
storage.setItem(key, JSON.stringify(state));
|
|
2282
|
+
if (bc)
|
|
2283
|
+
bc.postMessage("set");
|
|
2231
2284
|
}, {
|
|
2232
2285
|
debounce: 50
|
|
2233
2286
|
});
|
|
@@ -2409,7 +2462,7 @@ const useStickyHeader = (props) => {
|
|
|
2409
2462
|
watchDebounced(_y, (nextY) => {
|
|
2410
2463
|
y.value = nextY;
|
|
2411
2464
|
}, {
|
|
2412
|
-
debounce: isMobile ? 100 :
|
|
2465
|
+
debounce: isMobile ? 100 : 20,
|
|
2413
2466
|
maxWait: isMobile ? 800 : 400
|
|
2414
2467
|
});
|
|
2415
2468
|
const isSticky = computed(() => ready.value && y.value > staticY.value * 1.2);
|
|
@@ -2593,7 +2646,7 @@ const useShopHeader = (props) => {
|
|
|
2593
2646
|
};
|
|
2594
2647
|
};
|
|
2595
2648
|
|
|
2596
|
-
const _sfc_main$
|
|
2649
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
2597
2650
|
__name: "Drawer",
|
|
2598
2651
|
props: {
|
|
2599
2652
|
modelValue: { type: Boolean, default: false },
|
|
@@ -2696,7 +2749,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
2696
2749
|
return __returned__;
|
|
2697
2750
|
}
|
|
2698
2751
|
});
|
|
2699
|
-
function _sfc_ssrRender$
|
|
2752
|
+
function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2700
2753
|
const _component_Fade = resolveComponent("Fade");
|
|
2701
2754
|
_push(ssrRenderComponent(_component_Fade, mergeProps({
|
|
2702
2755
|
slide: $setup.slideTo,
|
|
@@ -2822,13 +2875,13 @@ function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2822
2875
|
_: 3
|
|
2823
2876
|
}, _parent));
|
|
2824
2877
|
}
|
|
2825
|
-
const _sfc_setup$
|
|
2826
|
-
_sfc_main$
|
|
2878
|
+
const _sfc_setup$z = _sfc_main$z.setup;
|
|
2879
|
+
_sfc_main$z.setup = (props, ctx) => {
|
|
2827
2880
|
const ssrContext = useSSRContext();
|
|
2828
2881
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
|
|
2829
|
-
return _sfc_setup$
|
|
2882
|
+
return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
|
|
2830
2883
|
};
|
|
2831
|
-
const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2884
|
+
const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
|
|
2832
2885
|
|
|
2833
2886
|
const storageKey$1 = "ecomSession";
|
|
2834
2887
|
const emptySession = {
|
|
@@ -2867,7 +2920,7 @@ const initializeFirebaseAuth = (canWaitIdle) => {
|
|
|
2867
2920
|
return;
|
|
2868
2921
|
};
|
|
2869
2922
|
|
|
2870
|
-
const _sfc_main$
|
|
2923
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2871
2924
|
__name: "AccountLink",
|
|
2872
2925
|
props: {
|
|
2873
2926
|
to: {},
|
|
@@ -2909,20 +2962,20 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
2909
2962
|
return __returned__;
|
|
2910
2963
|
}
|
|
2911
2964
|
});
|
|
2912
|
-
function _sfc_ssrRender$
|
|
2965
|
+
function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2913
2966
|
_push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
|
|
2914
2967
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
2915
2968
|
_push(`</a>`);
|
|
2916
2969
|
}
|
|
2917
|
-
const _sfc_setup$
|
|
2918
|
-
_sfc_main$
|
|
2970
|
+
const _sfc_setup$y = _sfc_main$y.setup;
|
|
2971
|
+
_sfc_main$y.setup = (props, ctx) => {
|
|
2919
2972
|
const ssrContext = useSSRContext();
|
|
2920
2973
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/AccountLink.vue");
|
|
2921
|
-
return _sfc_setup$
|
|
2974
|
+
return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
|
|
2922
2975
|
};
|
|
2923
|
-
const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2976
|
+
const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
|
|
2924
2977
|
|
|
2925
|
-
const _sfc_main$
|
|
2978
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2926
2979
|
__name: "SocialNetworkIcon",
|
|
2927
2980
|
props: {
|
|
2928
2981
|
as: { default: "i" },
|
|
@@ -2958,18 +3011,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2958
3011
|
return __returned__;
|
|
2959
3012
|
}
|
|
2960
3013
|
});
|
|
2961
|
-
function _sfc_ssrRender$
|
|
3014
|
+
function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2962
3015
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
2963
3016
|
}
|
|
2964
|
-
const _sfc_setup$
|
|
2965
|
-
_sfc_main$
|
|
3017
|
+
const _sfc_setup$x = _sfc_main$x.setup;
|
|
3018
|
+
_sfc_main$x.setup = (props, ctx) => {
|
|
2966
3019
|
const ssrContext = useSSRContext();
|
|
2967
3020
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkIcon.vue");
|
|
2968
|
-
return _sfc_setup$
|
|
3021
|
+
return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0;
|
|
2969
3022
|
};
|
|
2970
|
-
const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3023
|
+
const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["ssrRender", _sfc_ssrRender$x]]);
|
|
2971
3024
|
|
|
2972
|
-
const _sfc_main$
|
|
3025
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2973
3026
|
__name: "SocialNetworkLink",
|
|
2974
3027
|
props: {
|
|
2975
3028
|
network: {},
|
|
@@ -2995,7 +3048,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2995
3048
|
return __returned__;
|
|
2996
3049
|
}
|
|
2997
3050
|
});
|
|
2998
|
-
function _sfc_ssrRender$
|
|
3051
|
+
function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2999
3052
|
const _component_ALink = resolveComponent("ALink");
|
|
3000
3053
|
_push(ssrRenderComponent(_component_ALink, mergeProps({ href: $setup.fixedHref }, _attrs), {
|
|
3001
3054
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
@@ -3016,15 +3069,15 @@ function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3016
3069
|
_: 3
|
|
3017
3070
|
}, _parent));
|
|
3018
3071
|
}
|
|
3019
|
-
const _sfc_setup$
|
|
3020
|
-
_sfc_main$
|
|
3072
|
+
const _sfc_setup$w = _sfc_main$w.setup;
|
|
3073
|
+
_sfc_main$w.setup = (props, ctx) => {
|
|
3021
3074
|
const ssrContext = useSSRContext();
|
|
3022
3075
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkLink.vue");
|
|
3023
|
-
return _sfc_setup$
|
|
3076
|
+
return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0;
|
|
3024
3077
|
};
|
|
3025
|
-
const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3078
|
+
const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["ssrRender", _sfc_ssrRender$w]]);
|
|
3026
3079
|
|
|
3027
|
-
const _sfc_main$
|
|
3080
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
3028
3081
|
__name: "ShopSidenavCategory",
|
|
3029
3082
|
props: {
|
|
3030
3083
|
categoryTree: {}
|
|
@@ -3047,7 +3100,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
3047
3100
|
return __returned__;
|
|
3048
3101
|
}
|
|
3049
3102
|
});
|
|
3050
|
-
function _sfc_ssrRender$
|
|
3103
|
+
function _sfc_ssrRender$v(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3051
3104
|
const _component_AImg = resolveComponent("AImg");
|
|
3052
3105
|
const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
|
|
3053
3106
|
_push(`<li${ssrRenderAttrs(mergeProps({ class: "text-base-800 text-lg" }, _attrs))}>`);
|
|
@@ -3085,15 +3138,15 @@ function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3085
3138
|
}
|
|
3086
3139
|
_push(`</li>`);
|
|
3087
3140
|
}
|
|
3088
|
-
const _sfc_setup$
|
|
3089
|
-
_sfc_main$
|
|
3141
|
+
const _sfc_setup$v = _sfc_main$v.setup;
|
|
3142
|
+
_sfc_main$v.setup = (props, ctx) => {
|
|
3090
3143
|
const ssrContext = useSSRContext();
|
|
3091
3144
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenavCategory.vue");
|
|
3092
|
-
return _sfc_setup$
|
|
3145
|
+
return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0;
|
|
3093
3146
|
};
|
|
3094
|
-
const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3147
|
+
const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["ssrRender", _sfc_ssrRender$v]]);
|
|
3095
3148
|
|
|
3096
|
-
const _sfc_main$
|
|
3149
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
3097
3150
|
__name: "ShopSidenav",
|
|
3098
3151
|
props: {
|
|
3099
3152
|
categoryTrees: {}
|
|
@@ -3114,7 +3167,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3114
3167
|
return __returned__;
|
|
3115
3168
|
}
|
|
3116
3169
|
});
|
|
3117
|
-
function _sfc_ssrRender$
|
|
3170
|
+
function _sfc_ssrRender$u(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3118
3171
|
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex h-full flex-col bg-white" }, _attrs))}><nav class="grow py-4"><ul class="relative h-full"><!--[-->`);
|
|
3119
3172
|
ssrRenderList($props.categoryTrees, (categoryTree, i) => {
|
|
3120
3173
|
_push(ssrRenderComponent($setup["ShopSidenavCategory"], {
|
|
@@ -3155,13 +3208,13 @@ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3155
3208
|
});
|
|
3156
3209
|
_push(`<!--]--></ul></footer></aside>`);
|
|
3157
3210
|
}
|
|
3158
|
-
const _sfc_setup$
|
|
3159
|
-
_sfc_main$
|
|
3211
|
+
const _sfc_setup$u = _sfc_main$u.setup;
|
|
3212
|
+
_sfc_main$u.setup = (props, ctx) => {
|
|
3160
3213
|
const ssrContext = useSSRContext();
|
|
3161
3214
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenav.vue");
|
|
3162
|
-
return _sfc_setup$
|
|
3215
|
+
return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0;
|
|
3163
3216
|
};
|
|
3164
|
-
const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3217
|
+
const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["ssrRender", _sfc_ssrRender$u]]);
|
|
3165
3218
|
|
|
3166
3219
|
const useShopHeaderSubmenu = (props) => {
|
|
3167
3220
|
const categoryPicture = computed(() => {
|
|
@@ -3210,7 +3263,7 @@ const useShopHeaderSubmenu = (props) => {
|
|
|
3210
3263
|
};
|
|
3211
3264
|
};
|
|
3212
3265
|
|
|
3213
|
-
const _sfc_main$
|
|
3266
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
3214
3267
|
__name: "ShopHeaderSubmenu",
|
|
3215
3268
|
props: {
|
|
3216
3269
|
categoryTree: {},
|
|
@@ -3239,14 +3292,17 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3239
3292
|
return __returned__;
|
|
3240
3293
|
}
|
|
3241
3294
|
});
|
|
3242
|
-
function _sfc_ssrRender$
|
|
3295
|
+
function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3243
3296
|
const _component_Fade = resolveComponent("Fade");
|
|
3244
3297
|
const _component_AImg = resolveComponent("AImg");
|
|
3245
3298
|
_push(ssrRenderComponent($setup["Popover"], _attrs, {
|
|
3246
3299
|
default: withCtx(({ open }, _push2, _parent2, _scopeId) => {
|
|
3247
3300
|
if (_push2) {
|
|
3248
3301
|
_push2(`<a${ssrRenderAttr("href", `/${$props.categoryTree.slug}`)} role="button"${_scopeId}>`);
|
|
3249
|
-
_push2(ssrRenderComponent($setup["PopoverButton"], {
|
|
3302
|
+
_push2(ssrRenderComponent($setup["PopoverButton"], {
|
|
3303
|
+
id: `PopB${$props.categoryTree._id || _ctx.$useId("c")}`,
|
|
3304
|
+
class: "outline-none"
|
|
3305
|
+
}, {
|
|
3250
3306
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
3251
3307
|
if (_push3) {
|
|
3252
3308
|
ssrRenderSlot(_ctx.$slots, "button", { open }, null, _push3, _parent3, _scopeId2);
|
|
@@ -3457,12 +3513,15 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3457
3513
|
href: `/${$props.categoryTree.slug}`,
|
|
3458
3514
|
role: "button"
|
|
3459
3515
|
}, [
|
|
3460
|
-
createVNode($setup["PopoverButton"], {
|
|
3516
|
+
createVNode($setup["PopoverButton"], {
|
|
3517
|
+
id: `PopB${$props.categoryTree._id || _ctx.$useId("c")}`,
|
|
3518
|
+
class: "outline-none"
|
|
3519
|
+
}, {
|
|
3461
3520
|
default: withCtx(() => [
|
|
3462
3521
|
renderSlot(_ctx.$slots, "button", { open })
|
|
3463
3522
|
]),
|
|
3464
3523
|
_: 2
|
|
3465
|
-
},
|
|
3524
|
+
}, 1032, ["id"])
|
|
3466
3525
|
], 8, ["href"]),
|
|
3467
3526
|
createVNode("div", {
|
|
3468
3527
|
class: "relative",
|
|
@@ -3553,15 +3612,15 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3553
3612
|
_: 3
|
|
3554
3613
|
}, _parent));
|
|
3555
3614
|
}
|
|
3556
|
-
const _sfc_setup$
|
|
3557
|
-
_sfc_main$
|
|
3615
|
+
const _sfc_setup$t = _sfc_main$t.setup;
|
|
3616
|
+
_sfc_main$t.setup = (props, ctx) => {
|
|
3558
3617
|
const ssrContext = useSSRContext();
|
|
3559
3618
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderSubmenu.vue");
|
|
3560
|
-
return _sfc_setup$
|
|
3619
|
+
return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0;
|
|
3561
3620
|
};
|
|
3562
|
-
const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3621
|
+
const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["ssrRender", _sfc_ssrRender$t]]);
|
|
3563
3622
|
|
|
3564
|
-
const _sfc_main$
|
|
3623
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
3565
3624
|
__name: "ShopHeaderMenu",
|
|
3566
3625
|
props: {
|
|
3567
3626
|
inlineMenuTrees: {}
|
|
@@ -3577,7 +3636,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3577
3636
|
return __returned__;
|
|
3578
3637
|
}
|
|
3579
3638
|
});
|
|
3580
|
-
function _sfc_ssrRender$
|
|
3639
|
+
function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3581
3640
|
_push(`<nav${ssrRenderAttrs(_attrs)}><ul class="${ssrRenderClass([$props.inlineMenuTrees.length < 7 ? "text-base" : "text-sm", "text-base-700 flex gap-4 xl:gap-5"])}"><!--[-->`);
|
|
3582
3641
|
ssrRenderList($props.inlineMenuTrees, (categoryTree, i) => {
|
|
3583
3642
|
_push(`<li>`);
|
|
@@ -3621,15 +3680,15 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3621
3680
|
});
|
|
3622
3681
|
_push(`<!--]--></ul></nav>`);
|
|
3623
3682
|
}
|
|
3624
|
-
const _sfc_setup$
|
|
3625
|
-
_sfc_main$
|
|
3683
|
+
const _sfc_setup$s = _sfc_main$s.setup;
|
|
3684
|
+
_sfc_main$s.setup = (props, ctx) => {
|
|
3626
3685
|
const ssrContext = useSSRContext();
|
|
3627
3686
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderMenu.vue");
|
|
3628
|
-
return _sfc_setup$
|
|
3687
|
+
return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0;
|
|
3629
3688
|
};
|
|
3630
|
-
const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3689
|
+
const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["ssrRender", _sfc_ssrRender$s]]);
|
|
3631
3690
|
|
|
3632
|
-
const _sfc_main$
|
|
3691
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
3633
3692
|
__name: "AccountMenu",
|
|
3634
3693
|
setup(__props, { expose: __expose }) {
|
|
3635
3694
|
__expose();
|
|
@@ -3656,7 +3715,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
3656
3715
|
return __returned__;
|
|
3657
3716
|
}
|
|
3658
3717
|
});
|
|
3659
|
-
function _sfc_ssrRender$
|
|
3718
|
+
function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3660
3719
|
const _component_Fade = resolveComponent("Fade");
|
|
3661
3720
|
const _component_ALink = resolveComponent("ALink");
|
|
3662
3721
|
_push(ssrRenderComponent($setup["Menu"], mergeProps({
|
|
@@ -3678,6 +3737,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3678
3737
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
3679
3738
|
if (_push3) {
|
|
3680
3739
|
_push3(ssrRenderComponent($setup["MenuButton"], {
|
|
3740
|
+
id: "AccountBtn",
|
|
3681
3741
|
class: "outline-none",
|
|
3682
3742
|
"aria-label": "Minha conta"
|
|
3683
3743
|
}, {
|
|
@@ -3695,6 +3755,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3695
3755
|
} else {
|
|
3696
3756
|
return [
|
|
3697
3757
|
createVNode($setup["MenuButton"], {
|
|
3758
|
+
id: "AccountBtn",
|
|
3698
3759
|
class: "outline-none",
|
|
3699
3760
|
"aria-label": "Minha conta"
|
|
3700
3761
|
}, {
|
|
@@ -3823,8 +3884,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3823
3884
|
_push4(`<!--[-->`);
|
|
3824
3885
|
ssrRenderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
3825
3886
|
_push4(ssrRenderComponent($setup["MenuItem"], {
|
|
3826
|
-
|
|
3827
|
-
|
|
3887
|
+
key: `s-${i}`,
|
|
3888
|
+
as: "li"
|
|
3828
3889
|
}, {
|
|
3829
3890
|
default: withCtx(({ active }, _push5, _parent5, _scopeId4) => {
|
|
3830
3891
|
if (_push5) {
|
|
@@ -3970,8 +4031,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3970
4031
|
}),
|
|
3971
4032
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
3972
4033
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
3973
|
-
|
|
3974
|
-
|
|
4034
|
+
key: `s-${i}`,
|
|
4035
|
+
as: "li"
|
|
3975
4036
|
}, {
|
|
3976
4037
|
default: withCtx(({ active }) => [
|
|
3977
4038
|
createVNode(_component_ALink, {
|
|
@@ -4081,8 +4142,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4081
4142
|
}),
|
|
4082
4143
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
4083
4144
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
4084
|
-
|
|
4085
|
-
|
|
4145
|
+
key: `s-${i}`,
|
|
4146
|
+
as: "li"
|
|
4086
4147
|
}, {
|
|
4087
4148
|
default: withCtx(({ active }) => [
|
|
4088
4149
|
createVNode(_component_ALink, {
|
|
@@ -4151,6 +4212,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4151
4212
|
}, {
|
|
4152
4213
|
default: withCtx(() => [
|
|
4153
4214
|
createVNode($setup["MenuButton"], {
|
|
4215
|
+
id: "AccountBtn",
|
|
4154
4216
|
class: "outline-none",
|
|
4155
4217
|
"aria-label": "Minha conta"
|
|
4156
4218
|
}, {
|
|
@@ -4220,8 +4282,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4220
4282
|
}),
|
|
4221
4283
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
4222
4284
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
4223
|
-
|
|
4224
|
-
|
|
4285
|
+
key: `s-${i}`,
|
|
4286
|
+
as: "li"
|
|
4225
4287
|
}, {
|
|
4226
4288
|
default: withCtx(({ active }) => [
|
|
4227
4289
|
createVNode(_component_ALink, {
|
|
@@ -4280,15 +4342,15 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4280
4342
|
_: 3
|
|
4281
4343
|
}, _parent));
|
|
4282
4344
|
}
|
|
4283
|
-
const _sfc_setup$
|
|
4284
|
-
_sfc_main$
|
|
4345
|
+
const _sfc_setup$r = _sfc_main$r.setup;
|
|
4346
|
+
_sfc_main$r.setup = (props, ctx) => {
|
|
4285
4347
|
const ssrContext = useSSRContext();
|
|
4286
4348
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/AccountMenu.vue");
|
|
4287
|
-
return _sfc_setup$
|
|
4349
|
+
return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0;
|
|
4288
4350
|
};
|
|
4289
|
-
const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4351
|
+
const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["ssrRender", _sfc_ssrRender$r]]);
|
|
4290
4352
|
|
|
4291
|
-
const _sfc_main$
|
|
4353
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
4292
4354
|
__name: "ShopHeader",
|
|
4293
4355
|
props: {
|
|
4294
4356
|
searchInput: {},
|
|
@@ -4299,8 +4361,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4299
4361
|
},
|
|
4300
4362
|
setup(__props, { expose: __expose }) {
|
|
4301
4363
|
__expose();
|
|
4302
|
-
const SearchModal = defineAsyncComponent(() => import('../
|
|
4303
|
-
const CartSidebar = defineAsyncComponent(() => import('../
|
|
4364
|
+
const SearchModal = defineAsyncComponent(() => import('../SearchModal_2azP1u7P.mjs'));
|
|
4365
|
+
const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_3_1aFp67.mjs'));
|
|
4304
4366
|
const props = __props;
|
|
4305
4367
|
const header = ref(null);
|
|
4306
4368
|
const searchInput = ref(null);
|
|
@@ -4332,7 +4394,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4332
4394
|
return __returned__;
|
|
4333
4395
|
}
|
|
4334
4396
|
});
|
|
4335
|
-
function _sfc_ssrRender$
|
|
4397
|
+
function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4336
4398
|
const _component_Fade = resolveComponent("Fade");
|
|
4337
4399
|
const _component_Skeleton = resolveComponent("Skeleton");
|
|
4338
4400
|
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
@@ -4551,34 +4613,210 @@ function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4551
4613
|
}
|
|
4552
4614
|
_push(`</header>`);
|
|
4553
4615
|
}
|
|
4554
|
-
const _sfc_setup$
|
|
4555
|
-
_sfc_main$
|
|
4616
|
+
const _sfc_setup$q = _sfc_main$q.setup;
|
|
4617
|
+
_sfc_main$q.setup = (props, ctx) => {
|
|
4618
|
+
const ssrContext = useSSRContext();
|
|
4619
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeader.vue");
|
|
4620
|
+
return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0;
|
|
4621
|
+
};
|
|
4622
|
+
const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["ssrRender", _sfc_ssrRender$q]]);
|
|
4623
|
+
|
|
4624
|
+
var __freeze$1 = Object.freeze;
|
|
4625
|
+
var __defProp$1 = Object.defineProperty;
|
|
4626
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
4627
|
+
var _a$1;
|
|
4628
|
+
const $$Astro$8 = createAstro("https://demo.ecomplus.app");
|
|
4629
|
+
const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
4630
|
+
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
4631
|
+
Astro2.self = $$PageHeader;
|
|
4632
|
+
const { routeContext } = Astro2.locals;
|
|
4633
|
+
const { settings, isHomepage } = routeContext;
|
|
4634
|
+
const LogoHeading = isHomepage ? "h1" : "h2";
|
|
4635
|
+
const {
|
|
4636
|
+
pitchBar,
|
|
4637
|
+
shopHeader
|
|
4638
|
+
} = await usePageHeader({ routeContext });
|
|
4639
|
+
const { getInlineClientJS } = await useSharedData({ field: "categories" });
|
|
4640
|
+
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1(["\n ", "\n ", "\n\n<script async>", "<\/script>\n", ""])), pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`, pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`, unescapeHTML(getInlineClientJS()), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:context": "data:categories", "client:component-hydration": "context", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
|
|
4641
|
+
${maybeRenderHead()}<a href="/">
|
|
4642
|
+
${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
|
|
4643
|
+
${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })}
|
|
4644
|
+
` })}
|
|
4645
|
+
</a>
|
|
4646
|
+
` })}` })))}`;
|
|
4647
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
4648
|
+
|
|
4649
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
4650
|
+
__name: "PaymentMethodFlag",
|
|
4651
|
+
props: {
|
|
4652
|
+
as: { default: "i" },
|
|
4653
|
+
flag: {}
|
|
4654
|
+
},
|
|
4655
|
+
setup(__props, { expose: __expose }) {
|
|
4656
|
+
__expose();
|
|
4657
|
+
const props = __props;
|
|
4658
|
+
const iconClassName = computed(() => {
|
|
4659
|
+
switch (props.flag) {
|
|
4660
|
+
case "pix":
|
|
4661
|
+
return "i-pix text-[#77B6A8]";
|
|
4662
|
+
case "visa":
|
|
4663
|
+
return "i-visa";
|
|
4664
|
+
case "mastercard":
|
|
4665
|
+
return "i-mastercard";
|
|
4666
|
+
case "elo":
|
|
4667
|
+
return "i-elo";
|
|
4668
|
+
case "amex":
|
|
4669
|
+
return "i-amex";
|
|
4670
|
+
case "hipercard":
|
|
4671
|
+
return "i-hipercard";
|
|
4672
|
+
case "diners":
|
|
4673
|
+
return "i-dinersclub";
|
|
4674
|
+
case "discover":
|
|
4675
|
+
return "i-discover";
|
|
4676
|
+
default:
|
|
4677
|
+
return "";
|
|
4678
|
+
}
|
|
4679
|
+
});
|
|
4680
|
+
const __returned__ = { props, iconClassName };
|
|
4681
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
4682
|
+
return __returned__;
|
|
4683
|
+
}
|
|
4684
|
+
});
|
|
4685
|
+
function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4686
|
+
if (!$setup.iconClassName) {
|
|
4687
|
+
_push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
|
|
4688
|
+
} else {
|
|
4689
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4692
|
+
const _sfc_setup$p = _sfc_main$p.setup;
|
|
4693
|
+
_sfc_main$p.setup = (props, ctx) => {
|
|
4694
|
+
const ssrContext = useSSRContext();
|
|
4695
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
|
|
4696
|
+
return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0;
|
|
4697
|
+
};
|
|
4698
|
+
const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["ssrRender", _sfc_ssrRender$p]]);
|
|
4699
|
+
|
|
4700
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
4701
|
+
__name: "FooterStamps",
|
|
4702
|
+
props: {
|
|
4703
|
+
stamps: {}
|
|
4704
|
+
},
|
|
4705
|
+
setup(__props, { expose: __expose }) {
|
|
4706
|
+
__expose();
|
|
4707
|
+
const __returned__ = { PaymentMethodFlag };
|
|
4708
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
4709
|
+
return __returned__;
|
|
4710
|
+
}
|
|
4711
|
+
});
|
|
4712
|
+
function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4713
|
+
const _component_ALink = resolveComponent("ALink");
|
|
4714
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><div class="flex flex-wrap items-start justify-between gap-5 lg:flex-nowrap"><ul class="mx-auto flex items-center gap-x-6 gap-y-3 overflow-x-auto md:mx-0 md:flex-wrap md:overflow-hidden lg:gap-x-8"><!--[-->`);
|
|
4715
|
+
ssrRenderList($props.stamps, (stamp, i) => {
|
|
4716
|
+
_push(`<li>`);
|
|
4717
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
4718
|
+
href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
|
|
4719
|
+
}, {
|
|
4720
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4721
|
+
if (_push2) {
|
|
4722
|
+
ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
|
|
4723
|
+
if (!stamp.img) {
|
|
4724
|
+
_push2(`<span class="flex items-center"${_scopeId}>`);
|
|
4725
|
+
if (stamp.icon) {
|
|
4726
|
+
_push2(`<span class="[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"${_scopeId}>`);
|
|
4727
|
+
if (stamp.icon === "lock") {
|
|
4728
|
+
_push2(`<i class="i-lock-closed"${_scopeId}></i>`);
|
|
4729
|
+
} else if (stamp.icon === "check") {
|
|
4730
|
+
_push2(`<i class="i-check-badge"${_scopeId}></i>`);
|
|
4731
|
+
} else {
|
|
4732
|
+
_push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
|
|
4733
|
+
}
|
|
4734
|
+
_push2(`</span>`);
|
|
4735
|
+
} else {
|
|
4736
|
+
_push2(`<!---->`);
|
|
4737
|
+
}
|
|
4738
|
+
_push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
|
|
4739
|
+
if (stamp.href && stamp.href.charAt(0) !== "/") {
|
|
4740
|
+
_push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
|
|
4741
|
+
} else {
|
|
4742
|
+
_push2(`<!---->`);
|
|
4743
|
+
}
|
|
4744
|
+
_push2(`</span></span>`);
|
|
4745
|
+
} else {
|
|
4746
|
+
_push2(`<!---->`);
|
|
4747
|
+
}
|
|
4748
|
+
} else {
|
|
4749
|
+
return [
|
|
4750
|
+
renderSlot(_ctx.$slots, `picture-${i}`),
|
|
4751
|
+
!stamp.img ? (openBlock(), createBlock("span", {
|
|
4752
|
+
key: 0,
|
|
4753
|
+
class: "flex items-center"
|
|
4754
|
+
}, [
|
|
4755
|
+
stamp.icon ? (openBlock(), createBlock("span", {
|
|
4756
|
+
key: 0,
|
|
4757
|
+
class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
|
|
4758
|
+
}, [
|
|
4759
|
+
stamp.icon === "lock" ? (openBlock(), createBlock("i", {
|
|
4760
|
+
key: 0,
|
|
4761
|
+
class: "i-lock-closed"
|
|
4762
|
+
})) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
|
|
4763
|
+
key: 1,
|
|
4764
|
+
class: "i-check-badge"
|
|
4765
|
+
})) : (openBlock(), createBlock("i", {
|
|
4766
|
+
key: 2,
|
|
4767
|
+
class: "i-arrow-path-rounded-square"
|
|
4768
|
+
}))
|
|
4769
|
+
])) : createCommentVNode("", true),
|
|
4770
|
+
createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
|
|
4771
|
+
createTextVNode(toDisplayString(stamp.alt) + " ", 1),
|
|
4772
|
+
stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
|
|
4773
|
+
key: 0,
|
|
4774
|
+
class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
|
|
4775
|
+
})) : createCommentVNode("", true)
|
|
4776
|
+
])
|
|
4777
|
+
])) : createCommentVNode("", true)
|
|
4778
|
+
];
|
|
4779
|
+
}
|
|
4780
|
+
}),
|
|
4781
|
+
_: 2
|
|
4782
|
+
}, _parent));
|
|
4783
|
+
_push(`</li>`);
|
|
4784
|
+
});
|
|
4785
|
+
_push(`<!--]--></ul><div class="mx-auto flex flex-wrap items-center justify-end gap-4 overflow-x-auto text-2xl md:mx-0 md:flex-nowrap md:overflow-hidden"><!--[-->`);
|
|
4786
|
+
ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
|
|
4787
|
+
_push(ssrRenderComponent($setup["PaymentMethodFlag"], {
|
|
4788
|
+
key: paymentMethod,
|
|
4789
|
+
flag: paymentMethod
|
|
4790
|
+
}, null, _parent));
|
|
4791
|
+
});
|
|
4792
|
+
_push(`<!--]--></div></div><div class="mt-7 justify-between gap-4 text-center text-xs md:flex md:text-left"><div class="mb-3 md:mb-0"> @ ${ssrInterpolate((/* @__PURE__ */ new Date()).getFullYear())} ${ssrInterpolate(_ctx.$settings.corporateName)} ${ssrInterpolate(_ctx.$settings.address ? `/ ${_ctx.$settings.address}` : "")} / ${ssrInterpolate(_ctx.$settings.docNumber)}</div>`);
|
|
4793
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
4794
|
+
href: "https://www.ecomplus.io/",
|
|
4795
|
+
class: "italic text-[#37003c]"
|
|
4796
|
+
}, {
|
|
4797
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4798
|
+
if (_push2) {
|
|
4799
|
+
_push2(` powered by <b${_scopeId}>e-com.plus</b>`);
|
|
4800
|
+
} else {
|
|
4801
|
+
return [
|
|
4802
|
+
createTextVNode(" powered by "),
|
|
4803
|
+
createVNode("b", null, "e-com.plus")
|
|
4804
|
+
];
|
|
4805
|
+
}
|
|
4806
|
+
}),
|
|
4807
|
+
_: 1
|
|
4808
|
+
}, _parent));
|
|
4809
|
+
_push(`</div></div>`);
|
|
4810
|
+
}
|
|
4811
|
+
const _sfc_setup$o = _sfc_main$o.setup;
|
|
4812
|
+
_sfc_main$o.setup = (props, ctx) => {
|
|
4556
4813
|
const ssrContext = useSSRContext();
|
|
4557
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/
|
|
4558
|
-
return _sfc_setup$
|
|
4814
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
|
|
4815
|
+
return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
|
|
4559
4816
|
};
|
|
4560
|
-
const
|
|
4561
|
-
|
|
4562
|
-
var __freeze$1 = Object.freeze;
|
|
4563
|
-
var __defProp$1 = Object.defineProperty;
|
|
4564
|
-
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
4565
|
-
var _a$1;
|
|
4566
|
-
const $$Astro$8 = createAstro("https://demo.ecomplus.app");
|
|
4567
|
-
const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
4568
|
-
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
4569
|
-
Astro2.self = $$PageHeader;
|
|
4570
|
-
const { routeContext } = Astro2.locals;
|
|
4571
|
-
const { settings, isHomepage } = routeContext;
|
|
4572
|
-
const LogoHeading = isHomepage ? "h1" : "h2";
|
|
4573
|
-
const {
|
|
4574
|
-
pitchBar,
|
|
4575
|
-
shopHeader
|
|
4576
|
-
} = await usePageHeader({ routeContext });
|
|
4577
|
-
const { getInlineClientJS } = await useSharedData({ field: "categories" });
|
|
4578
|
-
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1([" ", "", " <script async>", "<\/script> ", ""])), pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`, pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`, unescapeHTML(getInlineClientJS()), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:context": "data:categories", "client:component-hydration": "context", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate` ${maybeRenderHead()}<a href="/"> ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate` ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })} ` })} </a> ` })}` })))}`;
|
|
4579
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
4817
|
+
const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["ssrRender", _sfc_ssrRender$o]]);
|
|
4580
4818
|
|
|
4581
|
-
const _sfc_main$
|
|
4819
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
4582
4820
|
__name: "ShopFooter",
|
|
4583
4821
|
props: {
|
|
4584
4822
|
stamps: {},
|
|
@@ -4596,7 +4834,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4596
4834
|
return __returned__;
|
|
4597
4835
|
}
|
|
4598
4836
|
});
|
|
4599
|
-
function _sfc_ssrRender$
|
|
4837
|
+
function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4600
4838
|
const _component_ALink = resolveComponent("ALink");
|
|
4601
4839
|
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "border-base-100 bg-base-50 mt-auto w-screen border-t py-2" }, _attrs))}><div class="ui-section"><div class="border-base-200 flex flex-wrap justify-between gap-y-5 border-b pb-7 sm:gap-x-10 lg:flex-nowrap"><div class="shrink">`);
|
|
4602
4840
|
ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
|
|
@@ -4694,13 +4932,13 @@ function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4694
4932
|
_push(ssrRenderComponent($setup["FooterStamps"], { stamps: $props.stamps }, null, _parent));
|
|
4695
4933
|
_push(`</footer>`);
|
|
4696
4934
|
}
|
|
4697
|
-
const _sfc_setup$
|
|
4698
|
-
_sfc_main$
|
|
4935
|
+
const _sfc_setup$n = _sfc_main$n.setup;
|
|
4936
|
+
_sfc_main$n.setup = (props, ctx) => {
|
|
4699
4937
|
const ssrContext = useSSRContext();
|
|
4700
4938
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopFooter.vue");
|
|
4701
|
-
return _sfc_setup$
|
|
4939
|
+
return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
|
|
4702
4940
|
};
|
|
4703
|
-
const ShopFooter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4941
|
+
const ShopFooter = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["ssrRender", _sfc_ssrRender$n]]);
|
|
4704
4942
|
|
|
4705
4943
|
const $$Astro$7 = createAstro("https://demo.ecomplus.app");
|
|
4706
4944
|
const $$PageFooter = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -4746,7 +4984,13 @@ const $$PageFooter = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
4746
4984
|
}
|
|
4747
4985
|
}
|
|
4748
4986
|
}
|
|
4749
|
-
return renderTemplate`${renderComponent($$result, "ShopFooter", ShopFooter, { "stamps": stamps, "categories": mainCategories, "categoriesColTitle": categoriesList?.title, "pageLinks": pageLinks, "pagesColTitle": pagesList?.title }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
|
|
4987
|
+
return renderTemplate`${renderComponent($$result, "ShopFooter", ShopFooter, { "stamps": stamps, "categories": mainCategories, "categoriesColTitle": categoriesList?.title, "pageLinks": pageLinks, "pagesColTitle": pagesList?.title }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate`
|
|
4988
|
+
${maybeRenderHead()}<a href="/">
|
|
4989
|
+
${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
|
|
4990
|
+
${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })}
|
|
4991
|
+
` })}
|
|
4992
|
+
</a>
|
|
4993
|
+
` })}` })}`;
|
|
4750
4994
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageFooter.astro", void 0);
|
|
4751
4995
|
|
|
4752
4996
|
const usePagination = (props) => {
|
|
@@ -4795,8 +5039,8 @@ const usePagination = (props) => {
|
|
|
4795
5039
|
return Array.from(Array(endPage.value + 1 - startPage.value).keys()).map((i) => startPage.value + i);
|
|
4796
5040
|
});
|
|
4797
5041
|
const baseUrl = ref("");
|
|
4798
|
-
watch(toRef(props
|
|
4799
|
-
const url =
|
|
5042
|
+
watch(toRef(props, "isUrlPath"), () => {
|
|
5043
|
+
const { url } = globalThis.$storefront;
|
|
4800
5044
|
if (props.isUrlPath && !url.pathname.endsWith("/")) {
|
|
4801
5045
|
url.pathname += "/";
|
|
4802
5046
|
} else {
|
|
@@ -4835,7 +5079,7 @@ const usePagination = (props) => {
|
|
|
4835
5079
|
};
|
|
4836
5080
|
};
|
|
4837
5081
|
|
|
4838
|
-
const _sfc_main$
|
|
5082
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
4839
5083
|
__name: "Pagination",
|
|
4840
5084
|
props: {
|
|
4841
5085
|
totalItems: {},
|
|
@@ -4861,7 +5105,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4861
5105
|
return __returned__;
|
|
4862
5106
|
}
|
|
4863
5107
|
});
|
|
4864
|
-
function _sfc_ssrRender$
|
|
5108
|
+
function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4865
5109
|
const _component_ALink = resolveComponent("ALink");
|
|
4866
5110
|
_push(`<ol${ssrRenderAttrs(mergeProps({ class: "text-base-900 flex justify-center gap-1.5 text-center text-sm font-medium leading-9" }, _attrs))}><li>`);
|
|
4867
5111
|
_push(ssrRenderComponent(_component_ALink, {
|
|
@@ -4922,13 +5166,13 @@ function _sfc_ssrRender$l(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4922
5166
|
}, _parent));
|
|
4923
5167
|
_push(`</li></ol>`);
|
|
4924
5168
|
}
|
|
4925
|
-
const _sfc_setup$
|
|
4926
|
-
_sfc_main$
|
|
5169
|
+
const _sfc_setup$m = _sfc_main$m.setup;
|
|
5170
|
+
_sfc_main$m.setup = (props, ctx) => {
|
|
4927
5171
|
const ssrContext = useSSRContext();
|
|
4928
5172
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Pagination.vue");
|
|
4929
|
-
return _sfc_setup$
|
|
5173
|
+
return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0;
|
|
4930
5174
|
};
|
|
4931
|
-
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5175
|
+
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["ssrRender", _sfc_ssrRender$m]]);
|
|
4932
5176
|
|
|
4933
5177
|
var __freeze = Object.freeze;
|
|
4934
5178
|
var __defProp = Object.defineProperty;
|
|
@@ -5105,7 +5349,10 @@ class SearchEngine {
|
|
|
5105
5349
|
return search(opts);
|
|
5106
5350
|
}, debounce);
|
|
5107
5351
|
watch([this.term, this.params, this.pageSize], () => {
|
|
5108
|
-
this.
|
|
5352
|
+
if (this.wasFetched.value) {
|
|
5353
|
+
this.pageNumber.value = 1;
|
|
5354
|
+
this.#wasFetched.value = false;
|
|
5355
|
+
}
|
|
5109
5356
|
});
|
|
5110
5357
|
watch(this.pageNumber, () => {
|
|
5111
5358
|
this.#wasFetched.value = false;
|
|
@@ -5164,7 +5411,9 @@ class SearchEngine {
|
|
|
5164
5411
|
data.result.forEach((item) => this.products.push(item));
|
|
5165
5412
|
}
|
|
5166
5413
|
if (data.meta && data.result) {
|
|
5167
|
-
|
|
5414
|
+
setTimeout(() => {
|
|
5415
|
+
this.#wasFetched.value = true;
|
|
5416
|
+
}, 9);
|
|
5168
5417
|
}
|
|
5169
5418
|
}
|
|
5170
5419
|
}
|
|
@@ -5429,33 +5678,57 @@ const useSearchShowcase = (props) => {
|
|
|
5429
5678
|
if (term !== void 0) {
|
|
5430
5679
|
searchEngine.term.value = term;
|
|
5431
5680
|
}
|
|
5681
|
+
if (props.pageSize) {
|
|
5682
|
+
searchEngine.pageSize.value = props.pageSize;
|
|
5683
|
+
}
|
|
5432
5684
|
Object.assign(searchEngine.params, props.fixedParams);
|
|
5685
|
+
let hasChangedInitParams = false;
|
|
5433
5686
|
if (urlParams) {
|
|
5434
5687
|
Object.keys(urlParams).forEach((param) => {
|
|
5688
|
+
if (!urlParams[param])
|
|
5689
|
+
return;
|
|
5690
|
+
if (param.startsWith("f\\")) {
|
|
5691
|
+
const field = param.substring(2);
|
|
5692
|
+
searchEngine.params[field] = urlParams[param];
|
|
5693
|
+
if (props.fixedParams?.[field] !== urlParams[param]) {
|
|
5694
|
+
hasChangedInitParams = true;
|
|
5695
|
+
}
|
|
5696
|
+
return;
|
|
5697
|
+
}
|
|
5435
5698
|
if (param === "sort") {
|
|
5436
5699
|
searchEngine.params.sort = urlParams.sort;
|
|
5700
|
+
if (typeof urlParams.sort === "string" && props.resultMeta?.sort?.length === 1) {
|
|
5701
|
+
const { field, order } = props.resultMeta.sort[0];
|
|
5702
|
+
const fetchedSort = order ? field : `-${field}`;
|
|
5703
|
+
if (fetchedSort === urlParams.sort)
|
|
5704
|
+
return;
|
|
5705
|
+
}
|
|
5706
|
+
hasChangedInitParams = true;
|
|
5437
5707
|
return;
|
|
5438
5708
|
}
|
|
5439
5709
|
if (param === "p") {
|
|
5440
5710
|
const pageNumber = parseInt(String(urlParams.p), 10);
|
|
5441
|
-
if (pageNumber >= 1)
|
|
5711
|
+
if (pageNumber >= 1) {
|
|
5442
5712
|
searchEngine.pageNumber.value = pageNumber;
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5713
|
+
if (props.resultMeta?.limit) {
|
|
5714
|
+
const { offset, limit } = props.resultMeta;
|
|
5715
|
+
const fetchedPage = offset ? Math.ceil(offset / limit) : 1;
|
|
5716
|
+
if (fetchedPage === pageNumber)
|
|
5717
|
+
return;
|
|
5718
|
+
}
|
|
5719
|
+
hasChangedInitParams = true;
|
|
5720
|
+
}
|
|
5448
5721
|
}
|
|
5449
5722
|
});
|
|
5450
5723
|
}
|
|
5451
5724
|
if (!searchEngine.wasFetched.value) {
|
|
5452
|
-
if (props.products || props.resultMeta) {
|
|
5725
|
+
if ((props.products || props.resultMeta) && !hasChangedInitParams) {
|
|
5453
5726
|
searchEngine.setResult({
|
|
5454
5727
|
result: props.products,
|
|
5455
5728
|
meta: props.resultMeta
|
|
5456
5729
|
});
|
|
5457
5730
|
}
|
|
5458
|
-
if (!props.products) {
|
|
5731
|
+
if (!props.products || hasChangedInitParams) {
|
|
5459
5732
|
searchEngine.fetch().catch(console.error);
|
|
5460
5733
|
}
|
|
5461
5734
|
}
|
|
@@ -5806,7 +6079,8 @@ const $$BannerPictures = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
5806
6079
|
mobileWidths = [640, 1024];
|
|
5807
6080
|
}
|
|
5808
6081
|
return renderTemplate`${img && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": img, "alt": alt || "", "widths": widths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `${mobileImg ? "hidden md:block " : ""}mx-auto
|
|
5809
|
-
text-sm text-opacity-70 ${className}` })}`}
|
|
6082
|
+
text-sm text-opacity-70 ${className}` })}`}
|
|
6083
|
+
${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `mx-auto text-sm text-opacity-70 md:hidden ${mobileClass}` })}`}`;
|
|
5810
6084
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/BannerPictures.astro", void 0);
|
|
5811
6085
|
|
|
5812
6086
|
const useBanner = (props) => {
|
|
@@ -5830,7 +6104,7 @@ const useBanner = (props) => {
|
|
|
5830
6104
|
};
|
|
5831
6105
|
};
|
|
5832
6106
|
|
|
5833
|
-
const _sfc_main$
|
|
6107
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
5834
6108
|
__name: "Banner",
|
|
5835
6109
|
props: {
|
|
5836
6110
|
img: {},
|
|
@@ -5857,7 +6131,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5857
6131
|
return __returned__;
|
|
5858
6132
|
}
|
|
5859
6133
|
});
|
|
5860
|
-
function _sfc_ssrRender$
|
|
6134
|
+
function _sfc_ssrRender$l(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
5861
6135
|
const _component_ALink = resolveComponent("ALink");
|
|
5862
6136
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
5863
6137
|
class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 sm:grid-cols-2 items-center" : null]
|
|
@@ -5925,15 +6199,15 @@ function _sfc_ssrRender$k(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
5925
6199
|
}
|
|
5926
6200
|
_push(`</div>`);
|
|
5927
6201
|
}
|
|
5928
|
-
const _sfc_setup$
|
|
5929
|
-
_sfc_main$
|
|
6202
|
+
const _sfc_setup$l = _sfc_main$l.setup;
|
|
6203
|
+
_sfc_main$l.setup = (props, ctx) => {
|
|
5930
6204
|
const ssrContext = useSSRContext();
|
|
5931
6205
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Banner.vue");
|
|
5932
|
-
return _sfc_setup$
|
|
6206
|
+
return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0;
|
|
5933
6207
|
};
|
|
5934
|
-
const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6208
|
+
const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["ssrRender", _sfc_ssrRender$l]]);
|
|
5935
6209
|
|
|
5936
|
-
const _sfc_main$
|
|
6210
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5937
6211
|
__name: "HeroSlider",
|
|
5938
6212
|
props: {
|
|
5939
6213
|
autoplay: {},
|
|
@@ -5950,7 +6224,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5950
6224
|
return __returned__;
|
|
5951
6225
|
}
|
|
5952
6226
|
});
|
|
5953
|
-
function _sfc_ssrRender$
|
|
6227
|
+
function _sfc_ssrRender$k(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
5954
6228
|
const _component_Carousel = resolveComponent("Carousel");
|
|
5955
6229
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
5956
6230
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "relative mx-auto mb-9 md:mb-12" }, _attrs))}>`);
|
|
@@ -6059,13 +6333,13 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6059
6333
|
}, _parent));
|
|
6060
6334
|
_push(`</section>`);
|
|
6061
6335
|
}
|
|
6062
|
-
const _sfc_setup$
|
|
6063
|
-
_sfc_main$
|
|
6336
|
+
const _sfc_setup$k = _sfc_main$k.setup;
|
|
6337
|
+
_sfc_main$k.setup = (props, ctx) => {
|
|
6064
6338
|
const ssrContext = useSSRContext();
|
|
6065
6339
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/HeroSlider.vue");
|
|
6066
|
-
return _sfc_setup$
|
|
6340
|
+
return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0;
|
|
6067
6341
|
};
|
|
6068
|
-
const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6342
|
+
const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["ssrRender", _sfc_ssrRender$k]]);
|
|
6069
6343
|
|
|
6070
6344
|
const $$Astro$4 = createAstro("https://demo.ecomplus.app");
|
|
6071
6345
|
const $$Hero = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -6077,7 +6351,7 @@ const $$Hero = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
6077
6351
|
return renderTemplate`${heroSlider.slides.length > 0 && renderTemplate`${renderComponent($$result, "HeroSlider", HeroSlider, { ...heroSlider, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/HeroSlider.vue", "client:component-export": "default" }, { "picture-0": ($$result2) => renderTemplate`${heroSlides[0] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-0", ...heroSlides[0], "index": 0 })}`}`, "picture-1": ($$result2) => renderTemplate`${heroSlides[1] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-1", ...heroSlides[1], "index": 1 })}`}`, "picture-2": ($$result2) => renderTemplate`${heroSlides[2] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-2", ...heroSlides[2], "index": 2 })}`}`, "picture-3": ($$result2) => renderTemplate`${heroSlides[3] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-3", ...heroSlides[3], "index": 3 })}`}`, "picture-4": ($$result2) => renderTemplate`${heroSlides[4] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-4", ...heroSlides[4], "index": 4 })}`}`, "picture-5": ($$result2) => renderTemplate`${heroSlides[5] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-5", ...heroSlides[5], "index": 5 })}`}`, "picture-6": ($$result2) => renderTemplate`${heroSlides[6] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-6", ...heroSlides[6], "index": 6 })}`}`, "picture-7": ($$result2) => renderTemplate`${heroSlides[7] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-7", ...heroSlides[7], "index": 7 })}`}`, "picture-8": ($$result2) => renderTemplate`${heroSlides[8] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-8", ...heroSlides[8], "index": 8 })}`}`, "picture-9": ($$result2) => renderTemplate`${heroSlides[9] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-9", ...heroSlides[9], "index": 9 })}`}` })}`}`;
|
|
6078
6352
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/content/Hero.astro", void 0);
|
|
6079
6353
|
|
|
6080
|
-
const _sfc_main$
|
|
6354
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
6081
6355
|
__name: "ContentClearfix",
|
|
6082
6356
|
props: {
|
|
6083
6357
|
html: {}
|
|
@@ -6091,23 +6365,29 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
6091
6365
|
return __returned__;
|
|
6092
6366
|
}
|
|
6093
6367
|
});
|
|
6094
|
-
function _sfc_ssrRender$
|
|
6368
|
+
function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6095
6369
|
_push(`<article${ssrRenderAttrs(mergeProps({ class: "!max-w-full overflow-x-auto prose" }, _attrs))}><div class="[&_iframe]:max-w-full [&_img]:max-w-full [&_table]:max-w-full">${$setup.parsedHTML}</div></article>`);
|
|
6096
6370
|
}
|
|
6097
|
-
const _sfc_setup$
|
|
6098
|
-
_sfc_main$
|
|
6371
|
+
const _sfc_setup$j = _sfc_main$j.setup;
|
|
6372
|
+
_sfc_main$j.setup = (props, ctx) => {
|
|
6099
6373
|
const ssrContext = useSSRContext();
|
|
6100
6374
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/ContentClearfix.vue");
|
|
6101
|
-
return _sfc_setup$
|
|
6375
|
+
return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0;
|
|
6102
6376
|
};
|
|
6103
|
-
const ContentClearfix = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6377
|
+
const ContentClearfix = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["ssrRender", _sfc_ssrRender$j]]);
|
|
6104
6378
|
|
|
6105
6379
|
const $$Astro$3 = createAstro("https://demo.ecomplus.app");
|
|
6106
6380
|
const $$BannersGrid = createComponent(async ($$result, $$props, $$slots) => {
|
|
6107
6381
|
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
6108
6382
|
Astro2.self = $$BannersGrid;
|
|
6109
6383
|
const { banners } = Astro2.props;
|
|
6110
|
-
return renderTemplate`${maybeRenderHead()}<section class="ui-section">
|
|
6384
|
+
return renderTemplate`${maybeRenderHead()}<section class="ui-section">
|
|
6385
|
+
<ul class="flex flex-wrap gap-4 lg:flex-nowrap">
|
|
6386
|
+
${banners.map((banner) => renderTemplate`<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
|
|
6387
|
+
${renderComponent($$result, "Banner", Banner, { ...banner }, { "picture": ($$result2) => renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { ...banner, "slot": "picture" })}` })}
|
|
6388
|
+
</li>`)}
|
|
6389
|
+
</ul>
|
|
6390
|
+
</section>`;
|
|
6111
6391
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/BannersGrid.astro", void 0);
|
|
6112
6392
|
|
|
6113
6393
|
const useBreadcrumbs = async (props = {}) => {
|
|
@@ -6170,7 +6450,7 @@ const useBreadcrumbs = async (props = {}) => {
|
|
|
6170
6450
|
};
|
|
6171
6451
|
};
|
|
6172
6452
|
|
|
6173
|
-
const _sfc_main$
|
|
6453
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
6174
6454
|
__name: "Breadcrumbs",
|
|
6175
6455
|
props: {
|
|
6176
6456
|
apiDoc: {},
|
|
@@ -6187,7 +6467,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6187
6467
|
return __returned__;
|
|
6188
6468
|
}
|
|
6189
6469
|
});
|
|
6190
|
-
function _sfc_ssrRender$
|
|
6470
|
+
function _sfc_ssrRender$i(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6191
6471
|
_push(`<!--[-->`);
|
|
6192
6472
|
if ($setup.breadcrumbs.length > 1) {
|
|
6193
6473
|
_push(`<section class="ui-section-slim"><nav aria-label="Breadcrumb" class="w-full overflow-hidden text-lg md:text-sm"><ol class="text-base-600 flex items-center gap-1"><li><a href="/" class="hover:text-primary"><span class="sr-only">${ssrInterpolate("In\xEDcio")}</span><i class="i-home"></i></a></li><!--[-->`);
|
|
@@ -6211,13 +6491,13 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6211
6491
|
}
|
|
6212
6492
|
_push(`<!--]-->`);
|
|
6213
6493
|
}
|
|
6214
|
-
const _sfc_setup$
|
|
6215
|
-
_sfc_main$
|
|
6494
|
+
const _sfc_setup$i = _sfc_main$i.setup;
|
|
6495
|
+
_sfc_main$i.setup = (props, ctx) => {
|
|
6216
6496
|
const ssrContext = useSSRContext();
|
|
6217
6497
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Breadcrumbs.vue");
|
|
6218
|
-
return _sfc_setup$
|
|
6498
|
+
return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0;
|
|
6219
6499
|
};
|
|
6220
|
-
const Breadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6500
|
+
const Breadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["ssrRender", _sfc_ssrRender$i]]);
|
|
6221
6501
|
|
|
6222
6502
|
const emitGtagEvent = async (name, _params) => {
|
|
6223
6503
|
return;
|
|
@@ -6498,7 +6778,7 @@ const usePrices = (props) => {
|
|
|
6498
6778
|
};
|
|
6499
6779
|
};
|
|
6500
6780
|
|
|
6501
|
-
const _sfc_main$
|
|
6781
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
6502
6782
|
__name: "Prices",
|
|
6503
6783
|
props: {
|
|
6504
6784
|
isBig: { type: Boolean },
|
|
@@ -6533,7 +6813,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6533
6813
|
return __returned__;
|
|
6534
6814
|
}
|
|
6535
6815
|
});
|
|
6536
|
-
function _sfc_ssrRender$
|
|
6816
|
+
function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6537
6817
|
const _component_Fade = resolveComponent("Fade");
|
|
6538
6818
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
6539
6819
|
class: ["text-base-600 [&>div]:[font-size:90%] [&_small]:lowercase [&_small]:[font-size:92%]", $props.isBig ? "text-lg" : null]
|
|
@@ -6663,15 +6943,15 @@ function _sfc_ssrRender$g(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6663
6943
|
}, _parent));
|
|
6664
6944
|
_push(`</div>`);
|
|
6665
6945
|
}
|
|
6666
|
-
const _sfc_setup$
|
|
6667
|
-
_sfc_main$
|
|
6946
|
+
const _sfc_setup$h = _sfc_main$h.setup;
|
|
6947
|
+
_sfc_main$h.setup = (props, ctx) => {
|
|
6668
6948
|
const ssrContext = useSSRContext();
|
|
6669
6949
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Prices.vue");
|
|
6670
|
-
return _sfc_setup$
|
|
6950
|
+
return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0;
|
|
6671
6951
|
};
|
|
6672
|
-
const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6952
|
+
const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["ssrRender", _sfc_ssrRender$h]]);
|
|
6673
6953
|
|
|
6674
|
-
const _sfc_main$
|
|
6954
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
6675
6955
|
__name: "ProductCard",
|
|
6676
6956
|
props: {
|
|
6677
6957
|
product: {},
|
|
@@ -6706,7 +6986,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
6706
6986
|
return __returned__;
|
|
6707
6987
|
}
|
|
6708
6988
|
});
|
|
6709
|
-
function _sfc_ssrRender$
|
|
6989
|
+
function _sfc_ssrRender$g(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6710
6990
|
const _component_ALink = resolveComponent("ALink");
|
|
6711
6991
|
const _component_AImg = resolveComponent("AImg");
|
|
6712
6992
|
_push(`<article${ssrRenderAttrs(mergeProps({
|
|
@@ -6849,15 +7129,15 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6849
7129
|
}, _parent));
|
|
6850
7130
|
_push(`</article>`);
|
|
6851
7131
|
}
|
|
6852
|
-
const _sfc_setup$
|
|
6853
|
-
_sfc_main$
|
|
7132
|
+
const _sfc_setup$g = _sfc_main$g.setup;
|
|
7133
|
+
_sfc_main$g.setup = (props, ctx) => {
|
|
6854
7134
|
const ssrContext = useSSRContext();
|
|
6855
7135
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductCard.vue");
|
|
6856
|
-
return _sfc_setup$
|
|
7136
|
+
return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0;
|
|
6857
7137
|
};
|
|
6858
|
-
const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7138
|
+
const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["ssrRender", _sfc_ssrRender$g]]);
|
|
6859
7139
|
|
|
6860
|
-
const _sfc_main$
|
|
7140
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
6861
7141
|
__name: "ProductShelf",
|
|
6862
7142
|
props: {
|
|
6863
7143
|
isGrid: { type: Boolean },
|
|
@@ -6895,7 +7175,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6895
7175
|
return __returned__;
|
|
6896
7176
|
}
|
|
6897
7177
|
});
|
|
6898
|
-
function _sfc_ssrRender$
|
|
7178
|
+
function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6899
7179
|
const _component_ALink = resolveComponent("ALink");
|
|
6900
7180
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
6901
7181
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
|
|
@@ -7004,15 +7284,15 @@ function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7004
7284
|
ssrRenderSlot(_ctx.$slots, "append", {}, null, _push, _parent);
|
|
7005
7285
|
_push(`</section>`);
|
|
7006
7286
|
}
|
|
7007
|
-
const _sfc_setup$
|
|
7008
|
-
_sfc_main$
|
|
7287
|
+
const _sfc_setup$f = _sfc_main$f.setup;
|
|
7288
|
+
_sfc_main$f.setup = (props, ctx) => {
|
|
7009
7289
|
const ssrContext = useSSRContext();
|
|
7010
7290
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductShelf.vue");
|
|
7011
|
-
return _sfc_setup$
|
|
7291
|
+
return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
|
|
7012
7292
|
};
|
|
7013
|
-
const ProductShelf = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7293
|
+
const ProductShelf = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["ssrRender", _sfc_ssrRender$f]]);
|
|
7014
7294
|
|
|
7015
|
-
const _sfc_main$
|
|
7295
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
7016
7296
|
__name: "Collapse",
|
|
7017
7297
|
props: {
|
|
7018
7298
|
title: {}
|
|
@@ -7024,20 +7304,20 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7024
7304
|
return __returned__;
|
|
7025
7305
|
}
|
|
7026
7306
|
});
|
|
7027
|
-
function _sfc_ssrRender$
|
|
7307
|
+
function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7028
7308
|
_push(`<details${ssrRenderAttrs(mergeProps({ class: "group my-4 md:my-5 [&_i]:open:-rotate-90" }, _attrs))}><summary role="button" class="text-base-700 hover:text-base-800 [&>i]:hover:text-primary list-none text-2xl font-medium lowercase group-open:mb-3"><i class="i-chevron-right mr-1 rotate-90"></i><span>${ssrInterpolate($props.title)}</span></summary>`);
|
|
7029
7309
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
7030
7310
|
_push(`</details>`);
|
|
7031
7311
|
}
|
|
7032
|
-
const _sfc_setup$
|
|
7033
|
-
_sfc_main$
|
|
7312
|
+
const _sfc_setup$e = _sfc_main$e.setup;
|
|
7313
|
+
_sfc_main$e.setup = (props, ctx) => {
|
|
7034
7314
|
const ssrContext = useSSRContext();
|
|
7035
7315
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Collapse.vue");
|
|
7036
|
-
return _sfc_setup$
|
|
7316
|
+
return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
|
|
7037
7317
|
};
|
|
7038
|
-
const Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7318
|
+
const Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["ssrRender", _sfc_ssrRender$e]]);
|
|
7039
7319
|
|
|
7040
|
-
const _sfc_main$
|
|
7320
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
7041
7321
|
__name: "DocDescription",
|
|
7042
7322
|
props: {
|
|
7043
7323
|
apiDoc: { default: () => globalThis.$storefront.apiContext?.doc },
|
|
@@ -7052,7 +7332,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7052
7332
|
return __returned__;
|
|
7053
7333
|
}
|
|
7054
7334
|
});
|
|
7055
|
-
function _sfc_ssrRender$
|
|
7335
|
+
function _sfc_ssrRender$d(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7056
7336
|
if ($setup.html) {
|
|
7057
7337
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
|
|
7058
7338
|
_push(ssrRenderComponent($setup["Collapse"], {
|
|
@@ -7075,15 +7355,15 @@ function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7075
7355
|
_push(`<!---->`);
|
|
7076
7356
|
}
|
|
7077
7357
|
}
|
|
7078
|
-
const _sfc_setup$
|
|
7079
|
-
_sfc_main$
|
|
7358
|
+
const _sfc_setup$d = _sfc_main$d.setup;
|
|
7359
|
+
_sfc_main$d.setup = (props, ctx) => {
|
|
7080
7360
|
const ssrContext = useSSRContext();
|
|
7081
7361
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/DocDescription.vue");
|
|
7082
|
-
return _sfc_setup$
|
|
7362
|
+
return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
|
|
7083
7363
|
};
|
|
7084
|
-
const DocDescription = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7364
|
+
const DocDescription = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["ssrRender", _sfc_ssrRender$d]]);
|
|
7085
7365
|
|
|
7086
|
-
const _sfc_main$
|
|
7366
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
7087
7367
|
__name: "DocBanners",
|
|
7088
7368
|
props: {
|
|
7089
7369
|
apiDoc: { default: () => globalThis.$storefront.apiContext?.doc },
|
|
@@ -7098,7 +7378,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7098
7378
|
return __returned__;
|
|
7099
7379
|
}
|
|
7100
7380
|
});
|
|
7101
|
-
function _sfc_ssrRender$
|
|
7381
|
+
function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7102
7382
|
const _component_AImg = resolveComponent("AImg");
|
|
7103
7383
|
if ($setup.pictures.length) {
|
|
7104
7384
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><ul class="flex flex-wrap gap-4 lg:flex-nowrap"><!--[-->`);
|
|
@@ -7112,15 +7392,15 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7112
7392
|
_push(`<!---->`);
|
|
7113
7393
|
}
|
|
7114
7394
|
}
|
|
7115
|
-
const _sfc_setup$
|
|
7116
|
-
_sfc_main$
|
|
7395
|
+
const _sfc_setup$c = _sfc_main$c.setup;
|
|
7396
|
+
_sfc_main$c.setup = (props, ctx) => {
|
|
7117
7397
|
const ssrContext = useSSRContext();
|
|
7118
7398
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/DocBanners.vue");
|
|
7119
|
-
return _sfc_setup$
|
|
7399
|
+
return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
|
|
7120
7400
|
};
|
|
7121
|
-
const DocBanners = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7401
|
+
const DocBanners = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["ssrRender", _sfc_ssrRender$c]]);
|
|
7122
7402
|
|
|
7123
|
-
const _sfc_main$
|
|
7403
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
7124
7404
|
__name: "CheckoutLink",
|
|
7125
7405
|
props: {
|
|
7126
7406
|
to: { default: "cart" },
|
|
@@ -7175,20 +7455,20 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
7175
7455
|
return __returned__;
|
|
7176
7456
|
}
|
|
7177
7457
|
});
|
|
7178
|
-
function _sfc_ssrRender$
|
|
7458
|
+
function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7179
7459
|
_push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
|
|
7180
7460
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
7181
7461
|
_push(`</a>`);
|
|
7182
7462
|
}
|
|
7183
|
-
const _sfc_setup$
|
|
7184
|
-
_sfc_main$
|
|
7463
|
+
const _sfc_setup$b = _sfc_main$b.setup;
|
|
7464
|
+
_sfc_main$b.setup = (props, ctx) => {
|
|
7185
7465
|
const ssrContext = useSSRContext();
|
|
7186
7466
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CheckoutLink.vue");
|
|
7187
|
-
return _sfc_setup$
|
|
7467
|
+
return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
|
|
7188
7468
|
};
|
|
7189
|
-
const CheckoutLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7469
|
+
const CheckoutLink = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["ssrRender", _sfc_ssrRender$b]]);
|
|
7190
7470
|
|
|
7191
|
-
const _sfc_main$
|
|
7471
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
7192
7472
|
__name: "QuantitySelectorControl",
|
|
7193
7473
|
props: {
|
|
7194
7474
|
isMinus: { type: Boolean }
|
|
@@ -7205,7 +7485,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
7205
7485
|
return __returned__;
|
|
7206
7486
|
}
|
|
7207
7487
|
});
|
|
7208
|
-
function _sfc_ssrRender$
|
|
7488
|
+
function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7209
7489
|
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
7210
7490
|
type: "button",
|
|
7211
7491
|
class: "leading-12 h-12 w-10 text-xl enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40",
|
|
@@ -7222,16 +7502,16 @@ function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7222
7502
|
}, _push, _parent);
|
|
7223
7503
|
_push(`</button>`);
|
|
7224
7504
|
}
|
|
7225
|
-
const _sfc_setup$
|
|
7226
|
-
_sfc_main$
|
|
7505
|
+
const _sfc_setup$a = _sfc_main$a.setup;
|
|
7506
|
+
_sfc_main$a.setup = (props, ctx) => {
|
|
7227
7507
|
const ssrContext = useSSRContext();
|
|
7228
7508
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelectorControl.vue");
|
|
7229
|
-
return _sfc_setup$
|
|
7509
|
+
return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
|
|
7230
7510
|
};
|
|
7231
|
-
const QuantitySelectorControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7511
|
+
const QuantitySelectorControl = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["ssrRender", _sfc_ssrRender$a]]);
|
|
7232
7512
|
|
|
7233
7513
|
const quantitySelectorKey = Symbol("quantitySelector");
|
|
7234
|
-
const _sfc_main$
|
|
7514
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
7235
7515
|
__name: "QuantitySelector",
|
|
7236
7516
|
props: {
|
|
7237
7517
|
modelValue: { default: 1 },
|
|
@@ -7247,7 +7527,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7247
7527
|
const props = __props;
|
|
7248
7528
|
const emit = __emit;
|
|
7249
7529
|
const input = ref(null);
|
|
7250
|
-
const inputId =
|
|
7530
|
+
const inputId = useId("NInput");
|
|
7251
7531
|
const value = computed({
|
|
7252
7532
|
get() {
|
|
7253
7533
|
return props.modelValue;
|
|
@@ -7280,7 +7560,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7280
7560
|
return __returned__;
|
|
7281
7561
|
}
|
|
7282
7562
|
});
|
|
7283
|
-
function _sfc_ssrRender$
|
|
7563
|
+
function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7284
7564
|
_push(`<div${ssrRenderAttrs(mergeProps({ "data-quantity-selector": "" }, _attrs))}>`);
|
|
7285
7565
|
ssrRenderSlot(_ctx.$slots, "label", { inputId: $setup.inputId, value: $setup.value }, () => {
|
|
7286
7566
|
_push(`<label${ssrRenderAttr("for", $setup.inputId)} class="sr-only">${ssrInterpolate("Quantidade")}</label>`);
|
|
@@ -7317,15 +7597,15 @@ function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7317
7597
|
}, _push, _parent);
|
|
7318
7598
|
_push(`</div></div>`);
|
|
7319
7599
|
}
|
|
7320
|
-
const _sfc_setup$
|
|
7321
|
-
_sfc_main$
|
|
7600
|
+
const _sfc_setup$9 = _sfc_main$9.setup;
|
|
7601
|
+
_sfc_main$9.setup = (props, ctx) => {
|
|
7322
7602
|
const ssrContext = useSSRContext();
|
|
7323
7603
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelector.vue");
|
|
7324
|
-
return _sfc_setup$
|
|
7604
|
+
return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
|
|
7325
7605
|
};
|
|
7326
|
-
const QuantitySelector = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7606
|
+
const QuantitySelector = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["ssrRender", _sfc_ssrRender$9]]);
|
|
7327
7607
|
|
|
7328
|
-
const _sfc_main$
|
|
7608
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
7329
7609
|
__name: "ImagesGallery",
|
|
7330
7610
|
props: {
|
|
7331
7611
|
pictures: {}
|
|
@@ -7382,7 +7662,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
7382
7662
|
return __returned__;
|
|
7383
7663
|
}
|
|
7384
7664
|
});
|
|
7385
|
-
function _sfc_ssrRender$
|
|
7665
|
+
function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7386
7666
|
const _component_Carousel = resolveComponent("Carousel");
|
|
7387
7667
|
const _component_AImg = resolveComponent("AImg");
|
|
7388
7668
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
@@ -7562,13 +7842,13 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7562
7842
|
}
|
|
7563
7843
|
_push(`</div></div>`);
|
|
7564
7844
|
}
|
|
7565
|
-
const _sfc_setup$
|
|
7566
|
-
_sfc_main$
|
|
7845
|
+
const _sfc_setup$8 = _sfc_main$8.setup;
|
|
7846
|
+
_sfc_main$8.setup = (props, ctx) => {
|
|
7567
7847
|
const ssrContext = useSSRContext();
|
|
7568
7848
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ImagesGallery.vue");
|
|
7569
|
-
return _sfc_setup$
|
|
7849
|
+
return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
7570
7850
|
};
|
|
7571
|
-
const ImagesGallery = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7851
|
+
const ImagesGallery = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$8]]);
|
|
7572
7852
|
|
|
7573
7853
|
const useSkuSelector = (props) => {
|
|
7574
7854
|
const grids = shallowReactive(
|
|
@@ -7679,7 +7959,7 @@ const useSkuSelector = (props) => {
|
|
|
7679
7959
|
};
|
|
7680
7960
|
};
|
|
7681
7961
|
|
|
7682
|
-
const _sfc_main$
|
|
7962
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
7683
7963
|
__name: "SkuSelector",
|
|
7684
7964
|
props: {
|
|
7685
7965
|
variations: {},
|
|
@@ -7708,7 +7988,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7708
7988
|
return __returned__;
|
|
7709
7989
|
}
|
|
7710
7990
|
});
|
|
7711
|
-
function _sfc_ssrRender$
|
|
7991
|
+
function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7712
7992
|
_push(`<div${ssrRenderAttrs(_attrs)}><!--[-->`);
|
|
7713
7993
|
ssrRenderList($setup.variationsGrids, (options, gridId) => {
|
|
7714
7994
|
_push(`<div class="mt-3"><span class="text-base-700 text-sm font-medium">${ssrInterpolate($setup.getGridTitle(gridId))}: `);
|
|
@@ -7735,13 +8015,33 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7735
8015
|
});
|
|
7736
8016
|
_push(`<!--]--></div>`);
|
|
7737
8017
|
}
|
|
8018
|
+
const _sfc_setup$7 = _sfc_main$7.setup;
|
|
8019
|
+
_sfc_main$7.setup = (props, ctx) => {
|
|
8020
|
+
const ssrContext = useSSRContext();
|
|
8021
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/SkuSelector.vue");
|
|
8022
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
8023
|
+
};
|
|
8024
|
+
const SkuSelector = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
|
|
8025
|
+
|
|
8026
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
8027
|
+
__name: "ShippingCalculator",
|
|
8028
|
+
setup(__props, { expose: __expose }) {
|
|
8029
|
+
__expose();
|
|
8030
|
+
const __returned__ = {};
|
|
8031
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
8032
|
+
return __returned__;
|
|
8033
|
+
}
|
|
8034
|
+
});
|
|
8035
|
+
function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
8036
|
+
_push(`<div${ssrRenderAttrs(_attrs)}></div>`);
|
|
8037
|
+
}
|
|
7738
8038
|
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
7739
8039
|
_sfc_main$6.setup = (props, ctx) => {
|
|
7740
8040
|
const ssrContext = useSSRContext();
|
|
7741
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/
|
|
8041
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShippingCalculator.vue");
|
|
7742
8042
|
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
7743
8043
|
};
|
|
7744
|
-
const
|
|
8044
|
+
const ShippingCalculator = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
|
|
7745
8045
|
|
|
7746
8046
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
7747
8047
|
__name: "ProductDetails",
|
|
@@ -7791,7 +8091,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
7791
8091
|
return;
|
|
7792
8092
|
addProductToCart(product, variationId.value ? variationId.value : void 0);
|
|
7793
8093
|
};
|
|
7794
|
-
const __returned__ = { props, product, title, isActive, quantity, params, hasSkuSelectionAlert, variationId, isSkuSelected, checkVariation, addToCart, CheckoutLink, QuantitySelector, Prices, ImagesGallery, SkuSelector };
|
|
8094
|
+
const __returned__ = { props, product, title, isActive, quantity, params, hasSkuSelectionAlert, variationId, isSkuSelected, checkVariation, addToCart, CheckoutLink, QuantitySelector, Prices, ImagesGallery, SkuSelector, ShippingCalculator };
|
|
7795
8095
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
7796
8096
|
return __returned__;
|
|
7797
8097
|
}
|
|
@@ -7877,7 +8177,9 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7877
8177
|
}),
|
|
7878
8178
|
_: 1
|
|
7879
8179
|
}, _parent));
|
|
7880
|
-
_push(`<button class="ui-btn-lg ui-btn-contrast grow"${ssrRenderAttr("data-tooltip", !$setup.isSkuSelected ? "Escolha os detalhes do produto para comprar" : null)}>${ssrInterpolate("Adicionar ao carrinho")}</button></div
|
|
8180
|
+
_push(`<button class="ui-btn-lg ui-btn-contrast grow"${ssrRenderAttr("data-tooltip", !$setup.isSkuSelected ? "Escolha os detalhes do produto para comprar" : null)}>${ssrInterpolate("Adicionar ao carrinho")}</button></div>`);
|
|
8181
|
+
_push(ssrRenderComponent($setup["ShippingCalculator"], null, null, _parent));
|
|
8182
|
+
_push(`</div>`);
|
|
7881
8183
|
} else {
|
|
7882
8184
|
_push(`<!---->`);
|
|
7883
8185
|
}
|
|
@@ -8130,6 +8432,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
8130
8432
|
__name: "SearchShowcase",
|
|
8131
8433
|
props: {
|
|
8132
8434
|
term: {},
|
|
8435
|
+
pageSize: {},
|
|
8133
8436
|
fixedParams: {},
|
|
8134
8437
|
products: {},
|
|
8135
8438
|
resultMeta: {},
|
|
@@ -8221,7 +8524,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8221
8524
|
}, {
|
|
8222
8525
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
8223
8526
|
if (_push3) {
|
|
8224
|
-
_push3(ssrRenderComponent($setup["ListboxButton"], {
|
|
8527
|
+
_push3(ssrRenderComponent($setup["ListboxButton"], {
|
|
8528
|
+
id: _ctx.$useId("ss"),
|
|
8529
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8530
|
+
}, {
|
|
8225
8531
|
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
8226
8532
|
if (_push4) {
|
|
8227
8533
|
_push4(`${ssrInterpolate("Ordenar")}`);
|
|
@@ -8366,12 +8672,15 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8366
8672
|
}, _parent3, _scopeId2));
|
|
8367
8673
|
} else {
|
|
8368
8674
|
return [
|
|
8369
|
-
createVNode($setup["ListboxButton"], {
|
|
8675
|
+
createVNode($setup["ListboxButton"], {
|
|
8676
|
+
id: _ctx.$useId("ss"),
|
|
8677
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8678
|
+
}, {
|
|
8370
8679
|
default: withCtx(() => [
|
|
8371
8680
|
createTextVNode(toDisplayString("Ordenar"))
|
|
8372
8681
|
]),
|
|
8373
8682
|
_: 1
|
|
8374
|
-
}),
|
|
8683
|
+
}, 8, ["id"]),
|
|
8375
8684
|
createVNode(_component_Fade, null, {
|
|
8376
8685
|
default: withCtx(() => [
|
|
8377
8686
|
createVNode($setup["ListboxOptions"], { class: "divide-base-100 absolute right-0 mt-2 divide-y rounded bg-white shadow ring-1 ring-black/5 focus:outline-none" }, {
|
|
@@ -8455,12 +8764,15 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8455
8764
|
class: "text-base-800 relative text-sm"
|
|
8456
8765
|
}, {
|
|
8457
8766
|
default: withCtx(() => [
|
|
8458
|
-
createVNode($setup["ListboxButton"], {
|
|
8767
|
+
createVNode($setup["ListboxButton"], {
|
|
8768
|
+
id: _ctx.$useId("ss"),
|
|
8769
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8770
|
+
}, {
|
|
8459
8771
|
default: withCtx(() => [
|
|
8460
8772
|
createTextVNode(toDisplayString("Ordenar"))
|
|
8461
8773
|
]),
|
|
8462
8774
|
_: 1
|
|
8463
|
-
}),
|
|
8775
|
+
}, 8, ["id"]),
|
|
8464
8776
|
createVNode(_component_Fade, null, {
|
|
8465
8777
|
default: withCtx(() => [
|
|
8466
8778
|
createVNode($setup["ListboxOptions"], { class: "divide-base-100 absolute right-0 mt-2 divide-y rounded bg-white shadow ring-1 ring-black/5 focus:outline-none" }, {
|
|
@@ -8642,7 +8954,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8642
8954
|
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
8643
8955
|
const _component_AImg = resolveComponent("AImg");
|
|
8644
8956
|
if ($setup.title) {
|
|
8645
|
-
_push(`<section${ssrRenderAttrs(mergeProps({ class: "
|
|
8957
|
+
_push(`<section${ssrRenderAttrs(mergeProps({ class: "bg-secondary-100 py-1" }, _attrs))}><article class="ui-section"><div class="prose mx-auto"><div class="not-prose flex items-center gap-4 md:justify-center">`);
|
|
8646
8958
|
if ($setup.logo) {
|
|
8647
8959
|
_push(ssrRenderComponent(_component_AImg, {
|
|
8648
8960
|
picture: $setup.logo,
|
|
@@ -8652,13 +8964,13 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8652
8964
|
} else {
|
|
8653
8965
|
_push(`<!---->`);
|
|
8654
8966
|
}
|
|
8655
|
-
_push(`<h1 class="ui-title">${ssrInterpolate($setup.title)}</h1></div
|
|
8967
|
+
_push(`<h1 class="ui-title text-secondary-800 text-center">${ssrInterpolate($setup.title)}</h1></div>`);
|
|
8656
8968
|
if ($setup.description) {
|
|
8657
|
-
_push(`<p>${ssrInterpolate($setup.description)}</p>`);
|
|
8969
|
+
_push(`<p class="${ssrRenderClass($setup.description.length < 120 && "md:text-center")}">${ssrInterpolate($setup.description)}</p>`);
|
|
8658
8970
|
} else {
|
|
8659
8971
|
_push(`<!---->`);
|
|
8660
8972
|
}
|
|
8661
|
-
_push(`</div></section>`);
|
|
8973
|
+
_push(`</div></article></section>`);
|
|
8662
8974
|
} else {
|
|
8663
8975
|
_push(`<!---->`);
|
|
8664
8976
|
}
|
|
@@ -8715,7 +9027,8 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8715
9027
|
}
|
|
8716
9028
|
});
|
|
8717
9029
|
const { cmsContent } = routeContext;
|
|
8718
|
-
return renderTemplate`${maybeRenderHead()}<article class="mb-9 mt-6 md:mb-12 md:mt-8">
|
|
9030
|
+
return renderTemplate`${maybeRenderHead()}<article class="mb-9 mt-6 md:mb-12 md:mt-8">
|
|
9031
|
+
${sections.map(async ({ type, props }, index) => {
|
|
8719
9032
|
switch (type) {
|
|
8720
9033
|
case "product-shelf":
|
|
8721
9034
|
return index === 0 || index < 2 && !cmsContent?.hero?.slides.length ? renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}` : renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:visible": true, "client:component-hydration": "visible", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}`;
|
|
@@ -8732,10 +9045,16 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8732
9045
|
return renderTemplate`${renderComponent($$result, "DocBanners", DocBanners, {})}`;
|
|
8733
9046
|
case "product-details":
|
|
8734
9047
|
const { hasDescription, hasSpecifications, ...detailsProps } = props;
|
|
8735
|
-
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
9048
|
+
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
9049
|
+
${renderComponent($$result2, "ProductDetails", ProductDetails, { ...detailsProps, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/ProductDetails.vue", "client:component-export": "default" }, { "description": ($$result3) => renderTemplate`${renderComponent($$result3, "Fragment", Fragment, { "slot": "description" }, { "default": ($$result4) => renderTemplate`${hasDescription && renderTemplate`${renderComponent($$result4, "DocDescription", DocDescription, {})}`}${hasSpecifications && renderTemplate`${renderComponent($$result4, "ProductSpecifications", ProductSpecifications, {})}`}` })}` })}
|
|
9050
|
+
` })}`;
|
|
8736
9051
|
case "search-showcase":
|
|
8737
9052
|
case "context-showcase":
|
|
8738
|
-
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
9053
|
+
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
9054
|
+
<article class="min-h-[500px]">
|
|
9055
|
+
${renderComponent($$result2, "SearchShowcase", SearchShowcase, { ...props, "client:context": true, "client:component-hydration": "context", "client:component-path": "~/components/SearchShowcase.vue", "client:component-export": "default" })}
|
|
9056
|
+
</article>
|
|
9057
|
+
` })}`;
|
|
8739
9058
|
case "page-title":
|
|
8740
9059
|
return renderTemplate`${renderComponent($$result, "PageTitle", PageTitle, { ...props })}`;
|
|
8741
9060
|
case "content-entry":
|
|
@@ -8747,7 +9066,8 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8747
9066
|
default:
|
|
8748
9067
|
return renderTemplate`<div${addAttribute(type, "data-section")}></div>`;
|
|
8749
9068
|
}
|
|
8750
|
-
})}
|
|
9069
|
+
})}
|
|
9070
|
+
</article>`;
|
|
8751
9071
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/content/Sections.astro", void 0);
|
|
8752
9072
|
|
|
8753
9073
|
const $$Astro$1 = createAstro("https://demo.ecomplus.app");
|
|
@@ -8766,7 +9086,11 @@ const $$Main = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8766
9086
|
]);
|
|
8767
9087
|
sharedData.grids = grids;
|
|
8768
9088
|
}
|
|
8769
|
-
return renderTemplate`${maybeRenderHead()}<main>
|
|
9089
|
+
return renderTemplate`${maybeRenderHead()}<main>
|
|
9090
|
+
${Object.entries(sharedData).map(([field, value]) => renderTemplate`${renderComponent($$result, "SharedData", $$SharedData, { "field": field, "value": value })}`)}
|
|
9091
|
+
${renderComponent($$result, "Hero", $$Hero, {})}
|
|
9092
|
+
${renderComponent($$result, "Sections", $$Sections, {})}
|
|
9093
|
+
</main>`;
|
|
8770
9094
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Main.astro", void 0);
|
|
8771
9095
|
|
|
8772
9096
|
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
@@ -8822,7 +9146,17 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8822
9146
|
}
|
|
8823
9147
|
loadError = err;
|
|
8824
9148
|
}
|
|
8825
|
-
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
9149
|
+
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
9150
|
+
${routeContext && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`
|
|
9151
|
+
${renderComponent($$result2, "Base", $$Base, {}, { "base-head": ($$result3) => renderTemplate`${renderComponent($$result3, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result3) => renderTemplate`
|
|
9152
|
+
|
|
9153
|
+
${renderComponent($$result3, "PageHeader", $$PageHeader, {})}
|
|
9154
|
+
${renderComponent($$result3, "Main", $$Main, {})}
|
|
9155
|
+
${renderComponent($$result3, "PageFooter", $$PageFooter, {})}
|
|
9156
|
+
` })}
|
|
9157
|
+
` })}`}
|
|
9158
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
9159
|
+
</html>`;
|
|
8826
9160
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", void 0);
|
|
8827
9161
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro";
|
|
8828
9162
|
const $$url = "/[...slug]";
|
|
@@ -8835,4 +9169,4 @@ const ____slug_ = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
8835
9169
|
url: $$url
|
|
8836
9170
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
8837
9171
|
|
|
8838
|
-
export { $$
|
|
9172
|
+
export { $$Base as $, ____slug_ as A, CheckoutLink as C, FooterStamps as F, Pagination as P, QuantitySelector as Q, SearchEngine as S, _export_sfc as _, $$BaseHead as a, $$PageHeader as b, $$PageFooter as c, $$Picture as d, i19shoppingCart as e, imageConfig as f, getConfig as g, assetsDir as h, i19myAccount as i, i19error as j, i19errorMsg as k, loadRouteContext as l, i19notFound as m, i19home as n, mod as o, createApp as p, clearAccents as q, getSearchUrl as r, searchHistory as s, ProductShelf as t, parseProduct as u, removeCartItem as v, Prices as w, freeShippingFromValue as x, shoppingCart as y, totalItems as z };
|