cloudcommerce 0.6.6 → 0.6.7

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/packages/api/package.json +1 -1
  4. package/packages/apps/correios/package.json +1 -1
  5. package/packages/apps/custom-payment/package.json +1 -1
  6. package/packages/apps/custom-shipping/package.json +1 -1
  7. package/packages/apps/datafrete/package.json +1 -1
  8. package/packages/apps/discounts/package.json +1 -1
  9. package/packages/apps/emails/package.json +1 -1
  10. package/packages/apps/fb-conversions/package.json +1 -1
  11. package/packages/apps/frenet/package.json +1 -1
  12. package/packages/apps/galaxpay/assets/onload-expression.min.js +1 -0
  13. package/packages/apps/galaxpay/package.json +1 -1
  14. package/packages/apps/google-analytics/package.json +1 -1
  15. package/packages/apps/infinitepay/package.json +1 -1
  16. package/packages/apps/jadlog/package.json +1 -1
  17. package/packages/apps/loyalty-points/package.json +1 -1
  18. package/packages/apps/melhor-envio/package.json +1 -1
  19. package/packages/apps/mercadopago/assets/onload-expression.min.js +1 -0
  20. package/packages/apps/mercadopago/package.json +1 -1
  21. package/packages/apps/pagarme/assets/onload-expression.min.js +1 -0
  22. package/packages/apps/pagarme/package.json +1 -1
  23. package/packages/apps/paghiper/package.json +1 -1
  24. package/packages/apps/pix/package.json +1 -1
  25. package/packages/apps/tiny-erp/package.json +1 -1
  26. package/packages/apps/webhooks/package.json +1 -1
  27. package/packages/cli/package.json +1 -1
  28. package/packages/config/package.json +1 -1
  29. package/packages/emails/package.json +1 -1
  30. package/packages/events/package.json +1 -1
  31. package/packages/firebase/package.json +1 -1
  32. package/packages/i18n/package.json +1 -1
  33. package/packages/modules/package.json +1 -1
  34. package/packages/passport/package.json +1 -1
  35. package/packages/ssr/package.json +1 -1
  36. package/packages/storefront/dist/client/_astro/{PitchBar.fae93937.js → PitchBar.16431255.js} +1 -1
  37. package/packages/storefront/dist/client/_astro/{Prices.c3513660.js → Prices.7368883b.js} +1 -1
  38. package/packages/storefront/dist/client/_astro/{ProductCard.943cd687.js → ProductCard.b9f8f3e7.js} +1 -1
  39. package/packages/storefront/dist/client/_astro/ShopHeader.7967a383.js +4 -0
  40. package/packages/storefront/dist/client/_astro/{_...slug_.86768317.css → _...slug_.61014c4c.css} +1 -1
  41. package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.a7457a61.js → _plugin-vue_export-helper.3dfd3410.js} +1 -1
  42. package/packages/storefront/dist/client/_astro/{client.e1250adc.js → client.3ab4cffd.js} +1 -1
  43. package/packages/storefront/dist/client/_astro/{format-money.6379f63c.js → format-money.e75b6ce1.js} +1 -1
  44. package/packages/storefront/dist/client/_astro/{index.769c6acb.js → index.140ec818.js} +1 -1
  45. package/packages/storefront/dist/client/_astro/{modules-info.fbf28964.js → modules-info.6e650119.js} +1 -1
  46. package/packages/storefront/dist/client/_astro/{runtime-dom.esm-bundler.4e28b902.js → runtime-dom.esm-bundler.b4764bdb.js} +1 -1
  47. package/packages/storefront/dist/client/sw.js +1 -1
  48. package/packages/storefront/dist/server/chunks/pages/{all.226fa45f.mjs → all.571056bd.mjs} +771 -74
  49. package/packages/storefront/dist/server/entry.mjs +2 -2
  50. package/packages/storefront/package.json +1 -1
  51. package/packages/storefront/server.d.ts +5 -0
  52. package/packages/storefront/src/lib/components/AccountLink.vue +38 -0
  53. package/packages/storefront/src/lib/layouts/PagesHeader.astro +1 -0
  54. package/packages/storefront/src/lib/ssr-context.ts +2 -5
  55. package/packages/storefront/tailwind.config.cjs +1 -0
  56. package/packages/types/index.ts +5 -0
  57. package/packages/types/package.json +1 -1
  58. package/packages/storefront/dist/client/_astro/ShopHeader.5b3abae3.js +0 -4
@@ -11,7 +11,7 @@ import 'magic-string';
11
11
  import 'node:stream';
12
12
  import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, u as unescapeHTML, m as maybeRenderHead, d as renderSlot, e as renderComponent, f as renderHead, F as Fragment, s as spreadAttributes } from '../astro.a9f695c0.mjs';
13
13
  import api from '@cloudcommerce/api';
14
- import { reactive, computed, defineComponent, inject, useSSRContext, mergeProps, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, resolveComponent, withModifiers, Teleport, toDisplayString, createTextVNode } from 'vue';
14
+ import { reactive, computed, defineComponent, inject, useSSRContext, mergeProps, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, resolveComponent, withModifiers, Teleport, createTextVNode, toDisplayString, setBlockTracking } from 'vue';
15
15
  import { img, price, formatMoney, nickname, onPromotion } from '@ecomplus/utils';
16
16
  import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrInterpolate } from 'vue/server-renderer';
17
17
  /* empty css */import { EventEmitter } from 'node:events';
@@ -19,7 +19,7 @@ import fs, { readFileSync } from 'node:fs';
19
19
  import config from '@cloudcommerce/config';
20
20
  import { resolve as resolve$1 } from 'path';
21
21
  /* empty css */import { useScroll, useElementHover, useDebounceFn, useTimeout, promiseTimeout } from '@vueuse/core';
22
- import { Popover, PopoverButton, PopoverPanel } from '@headlessui/vue';
22
+ import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/vue';
23
23
 
24
24
  const _export_sfc = (sfc, props) => {
25
25
  const target = sfc.__vccOpts || sfc;
@@ -1062,7 +1062,7 @@ const usePitchBar = (props) => {
1062
1062
 
1063
1063
  const carouselKey = Symbol("carousel");
1064
1064
 
1065
- const _sfc_main$d = defineComponent({
1065
+ const _sfc_main$f = defineComponent({
1066
1066
  __name: "CarouselControl",
1067
1067
  props: {
1068
1068
  direction: { default: 1 }
@@ -1075,7 +1075,7 @@ const _sfc_main$d = defineComponent({
1075
1075
  return __returned__;
1076
1076
  }
1077
1077
  });
1078
- function _sfc_ssrRender$d(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1078
+ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1079
1079
  _push(`<button${ssrRenderAttrs(mergeProps({
1080
1080
  type: "button",
1081
1081
  "aria-label": $props.direction > 0 ? "Pr\xF3ximo" : "Anterior",
@@ -1087,15 +1087,15 @@ function _sfc_ssrRender$d(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1087
1087
  }, _push, _parent);
1088
1088
  _push(`</button>`);
1089
1089
  }
1090
- const _sfc_setup$d = _sfc_main$d.setup;
1091
- _sfc_main$d.setup = (props, ctx) => {
1090
+ const _sfc_setup$f = _sfc_main$f.setup;
1091
+ _sfc_main$f.setup = (props, ctx) => {
1092
1092
  const ssrContext = useSSRContext();
1093
1093
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
1094
- return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
1094
+ return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
1095
1095
  };
1096
- const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["ssrRender", _sfc_ssrRender$d]]);
1096
+ const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["ssrRender", _sfc_ssrRender$f]]);
1097
1097
 
1098
- const _sfc_main$c = defineComponent({
1098
+ const _sfc_main$e = defineComponent({
1099
1099
  __name: "Carousel",
1100
1100
  props: {
1101
1101
  as: { default: "ul" },
@@ -1235,7 +1235,7 @@ const _sfc_main$c = defineComponent({
1235
1235
  return __returned__;
1236
1236
  }
1237
1237
  });
1238
- function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1238
+ function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1239
1239
  _push(`<div${ssrRenderAttrs(mergeProps({
1240
1240
  ref: "carousel",
1241
1241
  class: "relative",
@@ -1291,15 +1291,15 @@ function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1291
1291
  }, _push, _parent);
1292
1292
  _push(`</div>`);
1293
1293
  }
1294
- const _sfc_setup$c = _sfc_main$c.setup;
1295
- _sfc_main$c.setup = (props, ctx) => {
1294
+ const _sfc_setup$e = _sfc_main$e.setup;
1295
+ _sfc_main$e.setup = (props, ctx) => {
1296
1296
  const ssrContext = useSSRContext();
1297
1297
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
1298
- return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
1298
+ return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
1299
1299
  };
1300
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["ssrRender", _sfc_ssrRender$c]]);
1300
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["ssrRender", _sfc_ssrRender$e]]);
1301
1301
 
1302
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
1302
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1303
1303
  __name: "PitchBar",
1304
1304
  props: {
1305
1305
  slides: null
@@ -1316,7 +1316,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1316
1316
  return __returned__;
1317
1317
  }
1318
1318
  });
1319
- function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1319
+ function _sfc_ssrRender$d(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1320
1320
  _push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-base-100 relative z-1" }, _attrs))}><div class="container md:w-2/3 mx-auto px-3 py-1">`);
1321
1321
  _push(ssrRenderComponent($setup["Carousel"], {
1322
1322
  autoplay: $setup.countValidSlides > 1 ? 7e3 : null
@@ -1406,13 +1406,13 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1406
1406
  }, _parent));
1407
1407
  _push(`</div></div>`);
1408
1408
  }
1409
- const _sfc_setup$b = _sfc_main$b.setup;
1410
- _sfc_main$b.setup = (props, ctx) => {
1409
+ const _sfc_setup$d = _sfc_main$d.setup;
1410
+ _sfc_main$d.setup = (props, ctx) => {
1411
1411
  const ssrContext = useSSRContext();
1412
1412
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
1413
- return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
1413
+ return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
1414
1414
  };
1415
- const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["ssrRender", _sfc_ssrRender$b]]);
1415
+ const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["ssrRender", _sfc_ssrRender$d]]);
1416
1416
 
1417
1417
  const useStickyHeader = (props) => {
1418
1418
  const {
@@ -1548,7 +1548,7 @@ const useShopHeader = ({
1548
1548
  };
1549
1549
  };
1550
1550
 
1551
- const _sfc_main$a = defineComponent({
1551
+ const _sfc_main$c = defineComponent({
1552
1552
  __name: "Drawer",
1553
1553
  props: {
1554
1554
  modelValue: { type: Boolean, default: false },
@@ -1614,7 +1614,7 @@ const _sfc_main$a = defineComponent({
1614
1614
  return __returned__;
1615
1615
  }
1616
1616
  });
1617
- function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1617
+ function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1618
1618
  const _component_Fade = resolveComponent("Fade");
1619
1619
  _push(ssrRenderComponent(_component_Fade, mergeProps({
1620
1620
  slide: $setup.slideTo,
@@ -1718,13 +1718,13 @@ function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1718
1718
  _: 3
1719
1719
  }, _parent));
1720
1720
  }
1721
- const _sfc_setup$a = _sfc_main$a.setup;
1722
- _sfc_main$a.setup = (props, ctx) => {
1721
+ const _sfc_setup$c = _sfc_main$c.setup;
1722
+ _sfc_main$c.setup = (props, ctx) => {
1723
1723
  const ssrContext = useSSRContext();
1724
1724
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
1725
- return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
1725
+ return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
1726
1726
  };
1727
- const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["ssrRender", _sfc_ssrRender$a]]);
1727
+ const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["ssrRender", _sfc_ssrRender$c]]);
1728
1728
 
1729
1729
  const useStorage = (key, initialValue, storage = globalThis.localStorage) => {
1730
1730
  if (!storage) {
@@ -1804,6 +1804,54 @@ networkNames.forEach((network) => {
1804
1804
  }
1805
1805
  });
1806
1806
 
1807
+ const _sfc_main$b = defineComponent({
1808
+ __name: "AccountLink",
1809
+ props: {
1810
+ to: null,
1811
+ accountUrl: { default: globalThis.storefront.settings.account_url || "/app/account" },
1812
+ returnUrl: { default: globalThis.location?.href },
1813
+ isSignUp: { type: Boolean }
1814
+ },
1815
+ setup(__props, { expose }) {
1816
+ expose();
1817
+ const props = __props;
1818
+ const href = computed(() => {
1819
+ let url = props.accountUrl;
1820
+ if (!props.to) {
1821
+ if (props.isSignUp) {
1822
+ url += "?sign_up&";
1823
+ } else {
1824
+ url += "?";
1825
+ }
1826
+ return `${url}return_url=${props.returnUrl}`;
1827
+ }
1828
+ const { settings } = globalThis.storefront;
1829
+ if (props.to === "orders" && settings.orders_url) {
1830
+ return settings.orders_url;
1831
+ }
1832
+ if (props.to === "favorites" && settings.favorites_url) {
1833
+ return settings.favorites_url;
1834
+ }
1835
+ return `${url}/${props.to}`;
1836
+ });
1837
+ const __returned__ = { props, href };
1838
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1839
+ return __returned__;
1840
+ }
1841
+ });
1842
+ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1843
+ _push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
1844
+ ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
1845
+ _push(`</a>`);
1846
+ }
1847
+ const _sfc_setup$b = _sfc_main$b.setup;
1848
+ _sfc_main$b.setup = (props, ctx) => {
1849
+ const ssrContext = useSSRContext();
1850
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/AccountLink.vue");
1851
+ return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
1852
+ };
1853
+ const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["ssrRender", _sfc_ssrRender$b]]);
1854
+
1807
1855
  let userAgent;
1808
1856
  {
1809
1857
  userAgent = "";
@@ -1812,7 +1860,7 @@ userAgent.includes("Safari") && !userAgent.includes("Chrome");
1812
1860
  const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
1813
1861
  const isMobile = isIOS || /Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
1814
1862
 
1815
- const _sfc_main$9 = defineComponent({
1863
+ const _sfc_main$a = defineComponent({
1816
1864
  __name: "SocialNetworkIcon",
1817
1865
  props: {
1818
1866
  as: { default: "i" },
@@ -1846,18 +1894,18 @@ const _sfc_main$9 = defineComponent({
1846
1894
  return __returned__;
1847
1895
  }
1848
1896
  });
1849
- function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1897
+ function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1850
1898
  ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
1851
1899
  }
1852
- const _sfc_setup$9 = _sfc_main$9.setup;
1853
- _sfc_main$9.setup = (props, ctx) => {
1900
+ const _sfc_setup$a = _sfc_main$a.setup;
1901
+ _sfc_main$a.setup = (props, ctx) => {
1854
1902
  const ssrContext = useSSRContext();
1855
1903
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkIcon.vue");
1856
- return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
1904
+ return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
1857
1905
  };
1858
- const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["ssrRender", _sfc_ssrRender$9]]);
1906
+ const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["ssrRender", _sfc_ssrRender$a]]);
1859
1907
 
1860
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1908
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1861
1909
  __name: "SocialNetworkLink",
1862
1910
  props: {
1863
1911
  network: null,
@@ -1883,7 +1931,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1883
1931
  return __returned__;
1884
1932
  }
1885
1933
  });
1886
- function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1934
+ function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1887
1935
  const _component_ALink = resolveComponent("ALink");
1888
1936
  _push(ssrRenderComponent(_component_ALink, mergeProps({ href: $setup.fixedHref }, _attrs), {
1889
1937
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -1904,15 +1952,15 @@ function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1904
1952
  _: 3
1905
1953
  }, _parent));
1906
1954
  }
1907
- const _sfc_setup$8 = _sfc_main$8.setup;
1908
- _sfc_main$8.setup = (props, ctx) => {
1955
+ const _sfc_setup$9 = _sfc_main$9.setup;
1956
+ _sfc_main$9.setup = (props, ctx) => {
1909
1957
  const ssrContext = useSSRContext();
1910
1958
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkLink.vue");
1911
- return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
1959
+ return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
1912
1960
  };
1913
- const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$8]]);
1961
+ const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["ssrRender", _sfc_ssrRender$9]]);
1914
1962
 
1915
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1963
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1916
1964
  __name: "ShopSidenavCategory",
1917
1965
  props: {
1918
1966
  categoryTree: null
@@ -1935,7 +1983,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1935
1983
  return __returned__;
1936
1984
  }
1937
1985
  });
1938
- function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1986
+ function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1939
1987
  const _component_AImg = resolveComponent("AImg");
1940
1988
  const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
1941
1989
  _push(`<li${ssrRenderAttrs(mergeProps({ class: "text-lg text-base-800" }, _attrs))}>`);
@@ -1971,15 +2019,15 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1971
2019
  }
1972
2020
  _push(`</li>`);
1973
2021
  }
1974
- const _sfc_setup$7 = _sfc_main$7.setup;
1975
- _sfc_main$7.setup = (props, ctx) => {
2022
+ const _sfc_setup$8 = _sfc_main$8.setup;
2023
+ _sfc_main$8.setup = (props, ctx) => {
1976
2024
  const ssrContext = useSSRContext();
1977
2025
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenavCategory.vue");
1978
- return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
2026
+ return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
1979
2027
  };
1980
- const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
2028
+ const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$8]]);
1981
2029
 
1982
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2030
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1983
2031
  __name: "ShopSidenav",
1984
2032
  props: {
1985
2033
  categoryTrees: null
@@ -1995,12 +2043,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1995
2043
  return logout;
1996
2044
  }, get socialNetworks() {
1997
2045
  return socialNetworks;
1998
- }, SocialNetworkLink, ShopSidenavCategory };
2046
+ }, AccountLink, SocialNetworkLink, ShopSidenavCategory };
1999
2047
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2000
2048
  return __returned__;
2001
2049
  }
2002
2050
  });
2003
- function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2051
+ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2004
2052
  _push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex flex-col h-full" }, _attrs))}><nav class="py-4 grow"><ul class="relative h-full"><!--[-->`);
2005
2053
  ssrRenderList($props.categoryTrees, (categoryTree) => {
2006
2054
  _push(ssrRenderComponent($setup["ShopSidenavCategory"], {
@@ -2008,7 +2056,23 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2008
2056
  "category-tree": categoryTree
2009
2057
  }, null, _parent));
2010
2058
  });
2011
- _push(`<!--]--></ul></nav><footer class="text-base"><div class="flex items-center px-2 py-4 bg-base-100"><a href="/app/account" class="p-2 grow flex items-center gap-3"><i class="i-account text-4xl text-base-500 m-0"></i><span class="leading-tight">${ssrInterpolate(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`)} <small class="block lowercase font-semibold text-primary">${ssrInterpolate("Meus pedidos")}, ${ssrInterpolate("Minha conta")}</small></span></a>`);
2059
+ _push(`<!--]--></ul></nav><footer class="text-base"><div class="flex items-center px-2 py-4 bg-base-100">`);
2060
+ _push(ssrRenderComponent($setup["AccountLink"], { class: "p-2 grow flex items-center gap-3" }, {
2061
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
2062
+ if (_push2) {
2063
+ _push2(`<i class="i-account text-4xl text-base-500 m-0"${_scopeId}></i><span class="leading-tight"${_scopeId}>${ssrInterpolate(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`)} <small class="block lowercase font-semibold text-primary"${_scopeId}>${ssrInterpolate("Meus pedidos")}, ${ssrInterpolate("Minha conta")}</small></span>`);
2064
+ } else {
2065
+ return [
2066
+ createVNode("i", { class: "i-account text-4xl text-base-500 m-0" }),
2067
+ createVNode("span", { class: "leading-tight" }, [
2068
+ createTextVNode(toDisplayString(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`) + " ", 1),
2069
+ createVNode("small", { class: "block lowercase font-semibold text-primary" }, toDisplayString("Meus pedidos") + ", " + toDisplayString("Minha conta"))
2070
+ ])
2071
+ ];
2072
+ }
2073
+ }),
2074
+ _: 1
2075
+ }, _parent));
2012
2076
  if ($setup.isLogged) {
2013
2077
  _push(`<button class="p-2 text-right text-base-800"><span class="text-base-600">${ssrInterpolate("Sair")}</span><i class="i-logout text-lg ml-1"></i></button>`);
2014
2078
  } else {
@@ -2025,13 +2089,13 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2025
2089
  });
2026
2090
  _push(`<!--]--></ul></footer></aside>`);
2027
2091
  }
2028
- const _sfc_setup$6 = _sfc_main$6.setup;
2029
- _sfc_main$6.setup = (props, ctx) => {
2092
+ const _sfc_setup$7 = _sfc_main$7.setup;
2093
+ _sfc_main$7.setup = (props, ctx) => {
2030
2094
  const ssrContext = useSSRContext();
2031
2095
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenav.vue");
2032
- return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
2096
+ return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
2033
2097
  };
2034
- const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
2098
+ const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
2035
2099
 
2036
2100
  const useShopHeaderSubmenu = (props) => {
2037
2101
  const categoryPicture = computed(() => props.categoryTree.pictures?.[0]);
@@ -2071,7 +2135,7 @@ const useShopHeaderSubmenu = (props) => {
2071
2135
  };
2072
2136
  };
2073
2137
 
2074
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2138
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2075
2139
  __name: "ShopHeaderSubmenu",
2076
2140
  props: {
2077
2141
  categoryTree: null
@@ -2096,7 +2160,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2096
2160
  return __returned__;
2097
2161
  }
2098
2162
  });
2099
- function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2163
+ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2100
2164
  const _component_Fade = resolveComponent("Fade");
2101
2165
  const _component_AImg = resolveComponent("AImg");
2102
2166
  _push(ssrRenderComponent($setup["Popover"], _attrs, {
@@ -2386,15 +2450,15 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2386
2450
  _: 3
2387
2451
  }, _parent));
2388
2452
  }
2389
- const _sfc_setup$5 = _sfc_main$5.setup;
2390
- _sfc_main$5.setup = (props, ctx) => {
2453
+ const _sfc_setup$6 = _sfc_main$6.setup;
2454
+ _sfc_main$6.setup = (props, ctx) => {
2391
2455
  const ssrContext = useSSRContext();
2392
2456
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderSubmenu.vue");
2393
- return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
2457
+ return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
2394
2458
  };
2395
- const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$5]]);
2459
+ const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
2396
2460
 
2397
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2461
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2398
2462
  __name: "ShopHeaderMenu",
2399
2463
  props: {
2400
2464
  inlineMenuTrees: null
@@ -2410,7 +2474,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2410
2474
  return __returned__;
2411
2475
  }
2412
2476
  });
2413
- function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2477
+ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2414
2478
  _push(`<nav${ssrRenderAttrs(_attrs)}><ul class="${ssrRenderClass([$props.inlineMenuTrees.length < 7 ? "text-base" : "text-sm", "flex gap-4 xl:gap-5 text-base-700"])}"><!--[-->`);
2415
2479
  ssrRenderList($props.inlineMenuTrees, (categoryTree, i) => {
2416
2480
  _push(`<li>`);
@@ -2454,26 +2518,638 @@ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2454
2518
  });
2455
2519
  _push(`<!--]--></ul></nav>`);
2456
2520
  }
2457
- const _sfc_setup$4 = _sfc_main$4.setup;
2458
- _sfc_main$4.setup = (props, ctx) => {
2521
+ const _sfc_setup$5 = _sfc_main$5.setup;
2522
+ _sfc_main$5.setup = (props, ctx) => {
2459
2523
  const ssrContext = useSSRContext();
2460
2524
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderMenu.vue");
2461
- return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
2525
+ return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
2462
2526
  };
2463
- const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
2527
+ const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$5]]);
2464
2528
 
2465
- const _sfc_main$3 = {};
2529
+ const _sfc_main$4 = {};
2466
2530
 
2467
- function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs) {
2531
+ function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs) {
2468
2532
  _push(`<div${ssrRenderAttrs(mergeProps({ class: "w-full h-40 bg-base-300" }, _attrs))}></div>`);
2469
2533
  }
2470
- const _sfc_setup$3 = _sfc_main$3.setup;
2471
- _sfc_main$3.setup = (props, ctx) => {
2534
+ const _sfc_setup$4 = _sfc_main$4.setup;
2535
+ _sfc_main$4.setup = (props, ctx) => {
2472
2536
  const ssrContext = useSSRContext()
2473
2537
  ;(ssrContext.modules || (ssrContext.modules = new Set())).add("src/components/SearchModal.vue");
2474
- return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : undefined
2538
+ return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : undefined
2539
+ };
2540
+ const SearchModal = /*#__PURE__*/_export_sfc(_sfc_main$4, [['ssrRender',_sfc_ssrRender$4]]);
2541
+
2542
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2543
+ __name: "AccountMenu",
2544
+ props: {
2545
+ serviceLinks: null
2546
+ },
2547
+ setup(__props, { expose }) {
2548
+ expose();
2549
+ const __returned__ = { get Menu() {
2550
+ return Menu;
2551
+ }, get MenuButton() {
2552
+ return MenuButton;
2553
+ }, get MenuItems() {
2554
+ return MenuItems;
2555
+ }, get MenuItem() {
2556
+ return MenuItem;
2557
+ }, get socialNetworks() {
2558
+ return socialNetworks;
2559
+ }, get customerName() {
2560
+ return customerName;
2561
+ }, get initializeFirebaseAuth() {
2562
+ return initializeFirebaseAuth;
2563
+ }, get isLogged() {
2564
+ return isLogged;
2565
+ }, get logout() {
2566
+ return logout;
2567
+ }, AccountLink, SocialNetworkLink };
2568
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2569
+ return __returned__;
2570
+ }
2571
+ });
2572
+ function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2573
+ const _component_Fade = resolveComponent("Fade");
2574
+ const _component_ALink = resolveComponent("ALink");
2575
+ _push(ssrRenderComponent($setup["Menu"], mergeProps({
2576
+ as: "div",
2577
+ class: "relative text-center text-sm text-base-800"
2578
+ }, _attrs), {
2579
+ default: withCtx(({ open }, _push2, _parent2, _scopeId) => {
2580
+ if (_push2) {
2581
+ if (open) {
2582
+ _push2(`<div${_scopeId}><span${_scopeId}>${ssrInterpolate($setup.initializeFirebaseAuth())}</span></div>`);
2583
+ } else {
2584
+ _push2(`<!---->`);
2585
+ }
2586
+ _push2(ssrRenderComponent($setup["MenuButton"], { class: "outline-none" }, {
2587
+ default: withCtx((_, _push3, _parent3, _scopeId2) => {
2588
+ if (_push3) {
2589
+ ssrRenderSlot(_ctx.$slots, "button", { open }, null, _push3, _parent3, _scopeId2);
2590
+ } else {
2591
+ return [
2592
+ renderSlot$1(_ctx.$slots, "button", { open })
2593
+ ];
2594
+ }
2595
+ }),
2596
+ _: 2
2597
+ }, _parent2, _scopeId));
2598
+ _push2(ssrRenderComponent(_component_Fade, null, {
2599
+ default: withCtx((_, _push3, _parent3, _scopeId2) => {
2600
+ if (_push3) {
2601
+ _push3(ssrRenderComponent($setup["MenuItems"], { class: "absolute -right-8 mt-2 w-56 rounded-md shadow ring-1 ring-black ring-opacity-5 bg-white divide-y divide-base-100 focus:outline-none" }, {
2602
+ default: withCtx((_2, _push4, _parent4, _scopeId3) => {
2603
+ if (_push4) {
2604
+ _push4(`<div class="p-3 text-base-600"${_scopeId3}>${ssrInterpolate(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`)} `);
2605
+ _push4(ssrRenderComponent($setup["AccountLink"], { class: "block py-1.5 rounded primary hover:primary-bold my-1" }, {
2606
+ default: withCtx((_3, _push5, _parent5, _scopeId4) => {
2607
+ if (_push5) {
2608
+ _push5(`${ssrInterpolate("Acessar minha conta")}`);
2609
+ } else {
2610
+ return [
2611
+ createTextVNode(toDisplayString("Acessar minha conta"))
2612
+ ];
2613
+ }
2614
+ }),
2615
+ _: 2
2616
+ }, _parent4, _scopeId3));
2617
+ if (!$setup.isLogged) {
2618
+ _push4(ssrRenderComponent($setup["AccountLink"], {
2619
+ class: "block font-medium text-primary hover:text-primary-bold",
2620
+ "is-sign-up": ""
2621
+ }, {
2622
+ default: withCtx((_3, _push5, _parent5, _scopeId4) => {
2623
+ if (_push5) {
2624
+ _push5(`${ssrInterpolate("Criar uma conta")}`);
2625
+ } else {
2626
+ return [
2627
+ createTextVNode(toDisplayString("Criar uma conta"))
2628
+ ];
2629
+ }
2630
+ }),
2631
+ _: 2
2632
+ }, _parent4, _scopeId3));
2633
+ } else {
2634
+ _push4(`<!---->`);
2635
+ }
2636
+ _push4(`</div><ul class="list-none"${_scopeId3}>`);
2637
+ _push4(ssrRenderComponent($setup["MenuItem"], { as: "li" }, {
2638
+ default: withCtx(({ active }, _push5, _parent5, _scopeId4) => {
2639
+ if (_push5) {
2640
+ _push5(ssrRenderComponent($setup["AccountLink"], {
2641
+ to: "orders",
2642
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2643
+ }, {
2644
+ default: withCtx((_3, _push6, _parent6, _scopeId5) => {
2645
+ if (_push6) {
2646
+ _push6(`${ssrInterpolate("Meus pedidos")}`);
2647
+ } else {
2648
+ return [
2649
+ createTextVNode(toDisplayString("Meus pedidos"))
2650
+ ];
2651
+ }
2652
+ }),
2653
+ _: 2
2654
+ }, _parent5, _scopeId4));
2655
+ } else {
2656
+ return [
2657
+ createVNode($setup["AccountLink"], {
2658
+ to: "orders",
2659
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2660
+ }, {
2661
+ default: withCtx(() => [
2662
+ createTextVNode(toDisplayString("Meus pedidos"))
2663
+ ]),
2664
+ _: 2
2665
+ }, 1032, ["class"])
2666
+ ];
2667
+ }
2668
+ }),
2669
+ _: 2
2670
+ }, _parent4, _scopeId3));
2671
+ _push4(ssrRenderComponent($setup["MenuItem"], { as: "li" }, {
2672
+ default: withCtx(({ active }, _push5, _parent5, _scopeId4) => {
2673
+ if (_push5) {
2674
+ _push5(ssrRenderComponent($setup["AccountLink"], {
2675
+ to: "favorites",
2676
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2677
+ }, {
2678
+ default: withCtx((_3, _push6, _parent6, _scopeId5) => {
2679
+ if (_push6) {
2680
+ _push6(`<i class="i-favorites mr-1"${_scopeId5}></i> ${ssrInterpolate("Meus favoritos")}`);
2681
+ } else {
2682
+ return [
2683
+ createVNode("i", { class: "i-favorites mr-1" }),
2684
+ createTextVNode(" " + toDisplayString("Meus favoritos"))
2685
+ ];
2686
+ }
2687
+ }),
2688
+ _: 2
2689
+ }, _parent5, _scopeId4));
2690
+ } else {
2691
+ return [
2692
+ createVNode($setup["AccountLink"], {
2693
+ to: "favorites",
2694
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2695
+ }, {
2696
+ default: withCtx(() => [
2697
+ createVNode("i", { class: "i-favorites mr-1" }),
2698
+ createTextVNode(" " + toDisplayString("Meus favoritos"))
2699
+ ]),
2700
+ _: 2
2701
+ }, 1032, ["class"])
2702
+ ];
2703
+ }
2704
+ }),
2705
+ _: 2
2706
+ }, _parent4, _scopeId3));
2707
+ _push4(`<!--[-->`);
2708
+ ssrRenderList($props.serviceLinks, ({ title, href }, i) => {
2709
+ _push4(ssrRenderComponent($setup["MenuItem"], {
2710
+ as: "li",
2711
+ key: `s-${i}`
2712
+ }, {
2713
+ default: withCtx(({ active }, _push5, _parent5, _scopeId4) => {
2714
+ if (_push5) {
2715
+ _push5(ssrRenderComponent(_component_ALink, {
2716
+ href,
2717
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2718
+ }, {
2719
+ default: withCtx((_3, _push6, _parent6, _scopeId5) => {
2720
+ if (_push6) {
2721
+ _push6(`${ssrInterpolate(title)}`);
2722
+ } else {
2723
+ return [
2724
+ createTextVNode(toDisplayString(title), 1)
2725
+ ];
2726
+ }
2727
+ }),
2728
+ _: 2
2729
+ }, _parent5, _scopeId4));
2730
+ } else {
2731
+ return [
2732
+ createVNode(_component_ALink, {
2733
+ href,
2734
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2735
+ }, {
2736
+ default: withCtx(() => [
2737
+ createTextVNode(toDisplayString(title), 1)
2738
+ ]),
2739
+ _: 2
2740
+ }, 1032, ["href", "class"])
2741
+ ];
2742
+ }
2743
+ }),
2744
+ _: 2
2745
+ }, _parent4, _scopeId3));
2746
+ });
2747
+ _push4(`<!--]-->`);
2748
+ _push4(ssrRenderComponent($setup["MenuItem"], { as: "li" }, {
2749
+ default: withCtx((_3, _push5, _parent5, _scopeId4) => {
2750
+ if (_push5) {
2751
+ _push5(`<div class="flex justify-center gap-2 p-2 text-base-500 text-base"${_scopeId4}><!--[-->`);
2752
+ ssrRenderList($setup.socialNetworks, (href, network) => {
2753
+ _push5(`<span${_scopeId4}>`);
2754
+ _push5(ssrRenderComponent($setup["SocialNetworkLink"], {
2755
+ network,
2756
+ class: "p-1 hover:text-primary"
2757
+ }, null, _parent5, _scopeId4));
2758
+ _push5(`</span>`);
2759
+ });
2760
+ _push5(`<!--]--></div>`);
2761
+ } else {
2762
+ return [
2763
+ createVNode("div", { class: "flex justify-center gap-2 p-2 text-base-500 text-base" }, [
2764
+ (openBlock(true), createBlock(Fragment$1, null, renderList($setup.socialNetworks, (href, network) => {
2765
+ return openBlock(), createBlock("span", { key: network }, [
2766
+ createVNode($setup["SocialNetworkLink"], {
2767
+ network,
2768
+ class: "p-1 hover:text-primary"
2769
+ }, null, 8, ["network"])
2770
+ ]);
2771
+ }), 128))
2772
+ ])
2773
+ ];
2774
+ }
2775
+ }),
2776
+ _: 2
2777
+ }, _parent4, _scopeId3));
2778
+ if ($setup.isLogged) {
2779
+ _push4(ssrRenderComponent($setup["MenuItem"], { as: "li" }, {
2780
+ default: withCtx((_3, _push5, _parent5, _scopeId4) => {
2781
+ if (_push5) {
2782
+ _push5(`<button class="p-2 text-right text-base-800"${_scopeId4}><span class="text-base-600"${_scopeId4}>${ssrInterpolate("Sair")}</span><i class="i-logout text-lg ml-1"${_scopeId4}></i></button>`);
2783
+ } else {
2784
+ return [
2785
+ createVNode("button", {
2786
+ onClick: $setup.logout,
2787
+ class: "p-2 text-right text-base-800"
2788
+ }, [
2789
+ createVNode("span", { class: "text-base-600" }, toDisplayString("Sair")),
2790
+ createVNode("i", { class: "i-logout text-lg ml-1" })
2791
+ ], 8, ["onClick"])
2792
+ ];
2793
+ }
2794
+ }),
2795
+ _: 2
2796
+ }, _parent4, _scopeId3));
2797
+ } else {
2798
+ _push4(`<!---->`);
2799
+ }
2800
+ _push4(`</ul>`);
2801
+ } else {
2802
+ return [
2803
+ createVNode("div", { class: "p-3 text-base-600" }, [
2804
+ createTextVNode(toDisplayString(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`) + " ", 1),
2805
+ createVNode($setup["AccountLink"], { class: "block py-1.5 rounded primary hover:primary-bold my-1" }, {
2806
+ default: withCtx(() => [
2807
+ createTextVNode(toDisplayString("Acessar minha conta"))
2808
+ ]),
2809
+ _: 1
2810
+ }),
2811
+ !$setup.isLogged ? (openBlock(), createBlock($setup["AccountLink"], {
2812
+ key: 0,
2813
+ class: "block font-medium text-primary hover:text-primary-bold",
2814
+ "is-sign-up": ""
2815
+ }, {
2816
+ default: withCtx(() => [
2817
+ createTextVNode(toDisplayString("Criar uma conta"))
2818
+ ]),
2819
+ _: 1
2820
+ })) : createCommentVNode("", true)
2821
+ ]),
2822
+ createVNode("ul", { class: "list-none" }, [
2823
+ createVNode($setup["MenuItem"], { as: "li" }, {
2824
+ default: withCtx(({ active }) => [
2825
+ createVNode($setup["AccountLink"], {
2826
+ to: "orders",
2827
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2828
+ }, {
2829
+ default: withCtx(() => [
2830
+ createTextVNode(toDisplayString("Meus pedidos"))
2831
+ ]),
2832
+ _: 2
2833
+ }, 1032, ["class"])
2834
+ ]),
2835
+ _: 1
2836
+ }),
2837
+ createVNode($setup["MenuItem"], { as: "li" }, {
2838
+ default: withCtx(({ active }) => [
2839
+ createVNode($setup["AccountLink"], {
2840
+ to: "favorites",
2841
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2842
+ }, {
2843
+ default: withCtx(() => [
2844
+ createVNode("i", { class: "i-favorites mr-1" }),
2845
+ createTextVNode(" " + toDisplayString("Meus favoritos"))
2846
+ ]),
2847
+ _: 2
2848
+ }, 1032, ["class"])
2849
+ ]),
2850
+ _: 1
2851
+ }),
2852
+ (openBlock(true), createBlock(Fragment$1, null, renderList($props.serviceLinks, ({ title, href }, i) => {
2853
+ return openBlock(), createBlock($setup["MenuItem"], {
2854
+ as: "li",
2855
+ key: `s-${i}`
2856
+ }, {
2857
+ default: withCtx(({ active }) => [
2858
+ createVNode(_component_ALink, {
2859
+ href,
2860
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2861
+ }, {
2862
+ default: withCtx(() => [
2863
+ createTextVNode(toDisplayString(title), 1)
2864
+ ]),
2865
+ _: 2
2866
+ }, 1032, ["href", "class"])
2867
+ ]),
2868
+ _: 2
2869
+ }, 1024);
2870
+ }), 128)),
2871
+ createVNode($setup["MenuItem"], { as: "li" }, {
2872
+ default: withCtx(() => [
2873
+ createVNode("div", { class: "flex justify-center gap-2 p-2 text-base-500 text-base" }, [
2874
+ (openBlock(true), createBlock(Fragment$1, null, renderList($setup.socialNetworks, (href, network) => {
2875
+ return openBlock(), createBlock("span", { key: network }, [
2876
+ createVNode($setup["SocialNetworkLink"], {
2877
+ network,
2878
+ class: "p-1 hover:text-primary"
2879
+ }, null, 8, ["network"])
2880
+ ]);
2881
+ }), 128))
2882
+ ])
2883
+ ]),
2884
+ _: 1
2885
+ }),
2886
+ $setup.isLogged ? (openBlock(), createBlock($setup["MenuItem"], {
2887
+ key: 0,
2888
+ as: "li"
2889
+ }, {
2890
+ default: withCtx(() => [
2891
+ createVNode("button", {
2892
+ onClick: $setup.logout,
2893
+ class: "p-2 text-right text-base-800"
2894
+ }, [
2895
+ createVNode("span", { class: "text-base-600" }, toDisplayString("Sair")),
2896
+ createVNode("i", { class: "i-logout text-lg ml-1" })
2897
+ ], 8, ["onClick"])
2898
+ ]),
2899
+ _: 1
2900
+ })) : createCommentVNode("", true)
2901
+ ])
2902
+ ];
2903
+ }
2904
+ }),
2905
+ _: 2
2906
+ }, _parent3, _scopeId2));
2907
+ } else {
2908
+ return [
2909
+ createVNode($setup["MenuItems"], { class: "absolute -right-8 mt-2 w-56 rounded-md shadow ring-1 ring-black ring-opacity-5 bg-white divide-y divide-base-100 focus:outline-none" }, {
2910
+ default: withCtx(() => [
2911
+ createVNode("div", { class: "p-3 text-base-600" }, [
2912
+ createTextVNode(toDisplayString(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`) + " ", 1),
2913
+ createVNode($setup["AccountLink"], { class: "block py-1.5 rounded primary hover:primary-bold my-1" }, {
2914
+ default: withCtx(() => [
2915
+ createTextVNode(toDisplayString("Acessar minha conta"))
2916
+ ]),
2917
+ _: 1
2918
+ }),
2919
+ !$setup.isLogged ? (openBlock(), createBlock($setup["AccountLink"], {
2920
+ key: 0,
2921
+ class: "block font-medium text-primary hover:text-primary-bold",
2922
+ "is-sign-up": ""
2923
+ }, {
2924
+ default: withCtx(() => [
2925
+ createTextVNode(toDisplayString("Criar uma conta"))
2926
+ ]),
2927
+ _: 1
2928
+ })) : createCommentVNode("", true)
2929
+ ]),
2930
+ createVNode("ul", { class: "list-none" }, [
2931
+ createVNode($setup["MenuItem"], { as: "li" }, {
2932
+ default: withCtx(({ active }) => [
2933
+ createVNode($setup["AccountLink"], {
2934
+ to: "orders",
2935
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2936
+ }, {
2937
+ default: withCtx(() => [
2938
+ createTextVNode(toDisplayString("Meus pedidos"))
2939
+ ]),
2940
+ _: 2
2941
+ }, 1032, ["class"])
2942
+ ]),
2943
+ _: 1
2944
+ }),
2945
+ createVNode($setup["MenuItem"], { as: "li" }, {
2946
+ default: withCtx(({ active }) => [
2947
+ createVNode($setup["AccountLink"], {
2948
+ to: "favorites",
2949
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2950
+ }, {
2951
+ default: withCtx(() => [
2952
+ createVNode("i", { class: "i-favorites mr-1" }),
2953
+ createTextVNode(" " + toDisplayString("Meus favoritos"))
2954
+ ]),
2955
+ _: 2
2956
+ }, 1032, ["class"])
2957
+ ]),
2958
+ _: 1
2959
+ }),
2960
+ (openBlock(true), createBlock(Fragment$1, null, renderList($props.serviceLinks, ({ title, href }, i) => {
2961
+ return openBlock(), createBlock($setup["MenuItem"], {
2962
+ as: "li",
2963
+ key: `s-${i}`
2964
+ }, {
2965
+ default: withCtx(({ active }) => [
2966
+ createVNode(_component_ALink, {
2967
+ href,
2968
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
2969
+ }, {
2970
+ default: withCtx(() => [
2971
+ createTextVNode(toDisplayString(title), 1)
2972
+ ]),
2973
+ _: 2
2974
+ }, 1032, ["href", "class"])
2975
+ ]),
2976
+ _: 2
2977
+ }, 1024);
2978
+ }), 128)),
2979
+ createVNode($setup["MenuItem"], { as: "li" }, {
2980
+ default: withCtx(() => [
2981
+ createVNode("div", { class: "flex justify-center gap-2 p-2 text-base-500 text-base" }, [
2982
+ (openBlock(true), createBlock(Fragment$1, null, renderList($setup.socialNetworks, (href, network) => {
2983
+ return openBlock(), createBlock("span", { key: network }, [
2984
+ createVNode($setup["SocialNetworkLink"], {
2985
+ network,
2986
+ class: "p-1 hover:text-primary"
2987
+ }, null, 8, ["network"])
2988
+ ]);
2989
+ }), 128))
2990
+ ])
2991
+ ]),
2992
+ _: 1
2993
+ }),
2994
+ $setup.isLogged ? (openBlock(), createBlock($setup["MenuItem"], {
2995
+ key: 0,
2996
+ as: "li"
2997
+ }, {
2998
+ default: withCtx(() => [
2999
+ createVNode("button", {
3000
+ onClick: $setup.logout,
3001
+ class: "p-2 text-right text-base-800"
3002
+ }, [
3003
+ createVNode("span", { class: "text-base-600" }, toDisplayString("Sair")),
3004
+ createVNode("i", { class: "i-logout text-lg ml-1" })
3005
+ ], 8, ["onClick"])
3006
+ ]),
3007
+ _: 1
3008
+ })) : createCommentVNode("", true)
3009
+ ])
3010
+ ]),
3011
+ _: 1
3012
+ })
3013
+ ];
3014
+ }
3015
+ }),
3016
+ _: 2
3017
+ }, _parent2, _scopeId));
3018
+ } else {
3019
+ return [
3020
+ open ? (openBlock(), createBlock("div", { key: 0 }, [
3021
+ _cache[0] || (setBlockTracking(-1), _cache[0] = createVNode("span", null, [
3022
+ createTextVNode(toDisplayString($setup.initializeFirebaseAuth()), 1)
3023
+ ]), setBlockTracking(1), _cache[0])
3024
+ ])) : createCommentVNode("", true),
3025
+ createVNode($setup["MenuButton"], { class: "outline-none" }, {
3026
+ default: withCtx(() => [
3027
+ renderSlot$1(_ctx.$slots, "button", { open })
3028
+ ]),
3029
+ _: 2
3030
+ }, 1024),
3031
+ createVNode(_component_Fade, null, {
3032
+ default: withCtx(() => [
3033
+ createVNode($setup["MenuItems"], { class: "absolute -right-8 mt-2 w-56 rounded-md shadow ring-1 ring-black ring-opacity-5 bg-white divide-y divide-base-100 focus:outline-none" }, {
3034
+ default: withCtx(() => [
3035
+ createVNode("div", { class: "p-3 text-base-600" }, [
3036
+ createTextVNode(toDisplayString(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`) + " ", 1),
3037
+ createVNode($setup["AccountLink"], { class: "block py-1.5 rounded primary hover:primary-bold my-1" }, {
3038
+ default: withCtx(() => [
3039
+ createTextVNode(toDisplayString("Acessar minha conta"))
3040
+ ]),
3041
+ _: 1
3042
+ }),
3043
+ !$setup.isLogged ? (openBlock(), createBlock($setup["AccountLink"], {
3044
+ key: 0,
3045
+ class: "block font-medium text-primary hover:text-primary-bold",
3046
+ "is-sign-up": ""
3047
+ }, {
3048
+ default: withCtx(() => [
3049
+ createTextVNode(toDisplayString("Criar uma conta"))
3050
+ ]),
3051
+ _: 1
3052
+ })) : createCommentVNode("", true)
3053
+ ]),
3054
+ createVNode("ul", { class: "list-none" }, [
3055
+ createVNode($setup["MenuItem"], { as: "li" }, {
3056
+ default: withCtx(({ active }) => [
3057
+ createVNode($setup["AccountLink"], {
3058
+ to: "orders",
3059
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
3060
+ }, {
3061
+ default: withCtx(() => [
3062
+ createTextVNode(toDisplayString("Meus pedidos"))
3063
+ ]),
3064
+ _: 2
3065
+ }, 1032, ["class"])
3066
+ ]),
3067
+ _: 1
3068
+ }),
3069
+ createVNode($setup["MenuItem"], { as: "li" }, {
3070
+ default: withCtx(({ active }) => [
3071
+ createVNode($setup["AccountLink"], {
3072
+ to: "favorites",
3073
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
3074
+ }, {
3075
+ default: withCtx(() => [
3076
+ createVNode("i", { class: "i-favorites mr-1" }),
3077
+ createTextVNode(" " + toDisplayString("Meus favoritos"))
3078
+ ]),
3079
+ _: 2
3080
+ }, 1032, ["class"])
3081
+ ]),
3082
+ _: 1
3083
+ }),
3084
+ (openBlock(true), createBlock(Fragment$1, null, renderList($props.serviceLinks, ({ title, href }, i) => {
3085
+ return openBlock(), createBlock($setup["MenuItem"], {
3086
+ as: "li",
3087
+ key: `s-${i}`
3088
+ }, {
3089
+ default: withCtx(({ active }) => [
3090
+ createVNode(_component_ALink, {
3091
+ href,
3092
+ class: ["block p-2", active ? "bg-base-100 text-primary" : null]
3093
+ }, {
3094
+ default: withCtx(() => [
3095
+ createTextVNode(toDisplayString(title), 1)
3096
+ ]),
3097
+ _: 2
3098
+ }, 1032, ["href", "class"])
3099
+ ]),
3100
+ _: 2
3101
+ }, 1024);
3102
+ }), 128)),
3103
+ createVNode($setup["MenuItem"], { as: "li" }, {
3104
+ default: withCtx(() => [
3105
+ createVNode("div", { class: "flex justify-center gap-2 p-2 text-base-500 text-base" }, [
3106
+ (openBlock(true), createBlock(Fragment$1, null, renderList($setup.socialNetworks, (href, network) => {
3107
+ return openBlock(), createBlock("span", { key: network }, [
3108
+ createVNode($setup["SocialNetworkLink"], {
3109
+ network,
3110
+ class: "p-1 hover:text-primary"
3111
+ }, null, 8, ["network"])
3112
+ ]);
3113
+ }), 128))
3114
+ ])
3115
+ ]),
3116
+ _: 1
3117
+ }),
3118
+ $setup.isLogged ? (openBlock(), createBlock($setup["MenuItem"], {
3119
+ key: 0,
3120
+ as: "li"
3121
+ }, {
3122
+ default: withCtx(() => [
3123
+ createVNode("button", {
3124
+ onClick: $setup.logout,
3125
+ class: "p-2 text-right text-base-800"
3126
+ }, [
3127
+ createVNode("span", { class: "text-base-600" }, toDisplayString("Sair")),
3128
+ createVNode("i", { class: "i-logout text-lg ml-1" })
3129
+ ], 8, ["onClick"])
3130
+ ]),
3131
+ _: 1
3132
+ })) : createCommentVNode("", true)
3133
+ ])
3134
+ ]),
3135
+ _: 1
3136
+ })
3137
+ ]),
3138
+ _: 1
3139
+ })
3140
+ ];
3141
+ }
3142
+ }),
3143
+ _: 3
3144
+ }, _parent));
3145
+ }
3146
+ const _sfc_setup$3 = _sfc_main$3.setup;
3147
+ _sfc_main$3.setup = (props, ctx) => {
3148
+ const ssrContext = useSSRContext();
3149
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/AccountMenu.vue");
3150
+ return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
2475
3151
  };
2476
- const SearchModal = /*#__PURE__*/_export_sfc(_sfc_main$3, [['ssrRender',_sfc_ssrRender$3]]);
3152
+ const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
2477
3153
 
2478
3154
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2479
3155
  __name: "ShopHeader",
@@ -2481,7 +3157,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2481
3157
  categories: null,
2482
3158
  menuCategorySlugs: null,
2483
3159
  menuRandomCategories: null,
2484
- isAlphabeticalSortSubmenu: { type: Boolean }
3160
+ isAlphabeticalSortSubmenu: { type: Boolean },
3161
+ serviceLinks: null
2485
3162
  },
2486
3163
  setup(__props, { expose }) {
2487
3164
  expose();
@@ -2495,7 +3172,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2495
3172
  } = useShopHeader({ ...props, header });
2496
3173
  const isSidenavOpen = ref(false);
2497
3174
  const isSearchOpen = ref(false);
2498
- const __returned__ = { props, header, isSticky, positionY, categoryTrees, inlineMenuTrees, isSidenavOpen, isSearchOpen, Drawer, ShopSidenav, ShopHeaderMenu, SearchModal };
3175
+ const __returned__ = { props, header, isSticky, positionY, categoryTrees, inlineMenuTrees, isSidenavOpen, isSearchOpen, Drawer, ShopSidenav, ShopHeaderMenu, SearchModal, AccountMenu };
2499
3176
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
2500
3177
  return __returned__;
2501
3178
  }
@@ -2510,7 +3187,26 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2510
3187
  }, _attrs))}><div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center lg:grid-cols-none lg:auto-cols-max"><div class="lg:hidden"><button class="px-2 my-1"${ssrRenderAttr("aria-label", "Abrir/fechar menu")}><i class="${ssrRenderClass([$setup.isSidenavOpen ? "i-close" : "i-menu", "text-base-500 text-3xl"])}"></i></button></div>`);
2511
3188
  ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
2512
3189
  _push(ssrRenderComponent($setup["ShopHeaderMenu"], mergeProps({ class: "hidden lg:block" }, { inlineMenuTrees: $setup.inlineMenuTrees }), null, _parent));
2513
- _push(`<div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="i-search w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button class="hidden sm:block"${ssrRenderAttr("aria-label", "Minha conta")}><i class="i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button${ssrRenderAttr("aria-label", "Abrir carrinho")}><i class="i-shopping-cart w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button></div></div>`);
3190
+ _push(`<div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="i-search w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button>`);
3191
+ _push(ssrRenderComponent($setup["AccountMenu"], {
3192
+ class: "hidden sm:block",
3193
+ "aria-label": "Minha conta",
3194
+ "service-links": $props.serviceLinks
3195
+ }, {
3196
+ button: withCtx(({ open }, _push2, _parent2, _scopeId) => {
3197
+ if (_push2) {
3198
+ _push2(`<i class="${ssrRenderClass([open ? "text-black scale-110" : null, "i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"])}"${_scopeId}></i>`);
3199
+ } else {
3200
+ return [
3201
+ createVNode("i", {
3202
+ class: ["i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125", open ? "text-black scale-110" : null]
3203
+ }, null, 2)
3204
+ ];
3205
+ }
3206
+ }),
3207
+ _: 1
3208
+ }, _parent));
3209
+ _push(`<button${ssrRenderAttr("aria-label", "Abrir carrinho")}><i class="i-shopping-cart w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button></div></div>`);
2514
3210
  _push(ssrRenderComponent($setup["Drawer"], {
2515
3211
  modelValue: $setup.isSidenavOpen,
2516
3212
  "onUpdate:modelValue": ($event) => $setup.isSidenavOpen = $event,
@@ -2577,7 +3273,8 @@ const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
2577
3273
  categories: apiState.categories,
2578
3274
  menuCategorySlugs: cmsHeader.inline_menu_categories?.featured,
2579
3275
  menuRandomCategories: cmsHeader.inline_menu_categories?.random,
2580
- isAlphabeticalSortSubmenu: cmsHeader.alphabetical_sort_submenu
3276
+ isAlphabeticalSortSubmenu: cmsHeader.alphabetical_sort_submenu,
3277
+ serviceLinks: cmsHeader.service_links
2581
3278
  };
2582
3279
  const LogoHeading = Astro2.props.logoHeading || (isHomepage ? "h1" : "h2");
2583
3280
  return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["pitch-bar"], renderTemplate`