cloudcommerce 2.0.7 → 2.0.9

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 (168) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.vscode/settings.json +8 -2
  3. package/CHANGELOG.md +20 -0
  4. package/action.yml +1 -1
  5. package/ecomplus-stores/barra-doce/.husky/pre-commit +4 -0
  6. package/ecomplus-stores/barra-doce/.vscode/settings.json +3 -2
  7. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  8. package/ecomplus-stores/barra-doce/functions/ssr/.staged.eslintrc.cjs +6 -0
  9. package/ecomplus-stores/barra-doce/functions/ssr/package.json +9 -8
  10. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +4 -1
  11. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountPage.vue +6 -3
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +2 -1
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/components/BlogPosts.vue +8 -2
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.vue +4 -1
  15. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +4 -3
  16. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +1 -1
  17. package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +2 -2
  18. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ContentEntry.vue +1 -1
  19. package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +8 -6
  20. package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +7 -3
  21. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +13 -11
  22. package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +1 -1
  23. package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +5 -2
  24. package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +1 -1
  25. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +13 -13
  26. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +1 -1
  27. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +9 -6
  28. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +1 -1
  29. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +8 -9
  30. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +15 -6
  31. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +10 -10
  32. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +2 -1
  33. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +7 -4
  34. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +5 -2
  35. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +3 -2
  36. package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +8 -5
  37. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +1 -2
  38. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +2 -1
  39. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +3 -3
  40. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Main.astro +2 -2
  41. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +4 -4
  42. package/ecomplus-stores/barra-doce/functions/ssr/src/scripts/InlineScripts.astro +8 -8
  43. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  44. package/ecomplus-stores/barra-doce/package.json +10 -3
  45. package/ecomplus-stores/barra-doce/tailwind.config.cjs +5 -0
  46. package/ecomplus-stores/tia-sonia/.vscode/launch.json +11 -0
  47. package/ecomplus-stores/tia-sonia/.vscode/settings.json +7 -1
  48. package/package.json +9 -4
  49. package/packages/api/package.json +1 -1
  50. package/packages/apps/affiliate-program/package.json +1 -1
  51. package/packages/apps/correios/package.json +2 -2
  52. package/packages/apps/custom-payment/package.json +1 -1
  53. package/packages/apps/custom-shipping/package.json +1 -1
  54. package/packages/apps/datafrete/package.json +1 -1
  55. package/packages/apps/discounts/package.json +1 -1
  56. package/packages/apps/emails/package.json +1 -1
  57. package/packages/apps/fb-conversions/package.json +1 -1
  58. package/packages/apps/flash-courier/package.json +1 -1
  59. package/packages/apps/frenet/package.json +1 -1
  60. package/packages/apps/galaxpay/package.json +1 -1
  61. package/packages/apps/google-analytics/package.json +1 -1
  62. package/packages/apps/jadlog/package.json +1 -1
  63. package/packages/apps/loyalty-points/package.json +1 -1
  64. package/packages/apps/mandae/package.json +1 -1
  65. package/packages/apps/melhor-envio/package.json +1 -1
  66. package/packages/apps/mercadopago/package.json +1 -1
  67. package/packages/apps/pagarme/package.json +1 -1
  68. package/packages/apps/pagarme-v5/package.json +1 -1
  69. package/packages/apps/paghiper/package.json +1 -1
  70. package/packages/apps/pix/package.json +1 -1
  71. package/packages/apps/tiny-erp/package.json +1 -1
  72. package/packages/apps/webhooks/package.json +1 -1
  73. package/packages/cli/package.json +1 -1
  74. package/packages/config/package.json +1 -1
  75. package/packages/emails/package.json +1 -1
  76. package/packages/eslint/base.eslintrc.cjs +3 -4
  77. package/packages/eslint/package.json +6 -5
  78. package/packages/eslint/storefront.eslintrc.cjs +19 -2
  79. package/packages/eslint/storefront.staged.eslintrc.cjs +9 -0
  80. package/packages/events/package.json +1 -1
  81. package/packages/feeds/package.json +1 -1
  82. package/packages/firebase/package.json +2 -2
  83. package/packages/i18n/package.json +1 -1
  84. package/packages/modules/package.json +2 -2
  85. package/packages/passport/package.json +1 -1
  86. package/packages/ssr/package.json +5 -5
  87. package/packages/storefront/dist/client/_astro/{AccountPage.oxrx8xO0.js → AccountPage.9BlGHXT3.js} +1 -1
  88. package/packages/storefront/dist/client/_astro/CartSidebar.55UgTcV0.js +1 -0
  89. package/packages/storefront/dist/client/_astro/{HeroSlider.OYdereCn.js → HeroSlider.XZb2xsyV.js} +1 -1
  90. package/packages/storefront/dist/client/_astro/{PitchBar.RVEArMQA.js → PitchBar.Nr7T3S3T.js} +1 -1
  91. package/packages/storefront/dist/client/_astro/{Prices.Bsod-tLh.js → Prices.Ye-m2HTo.js} +1 -1
  92. package/packages/storefront/dist/client/_astro/ProductDetails.ENLKdSz_.js +7 -0
  93. package/packages/storefront/dist/client/_astro/ProductShelf.CNf5JDrU.js +1 -0
  94. package/packages/storefront/dist/client/_astro/ProductShelf.lCBJky3e.js +1 -0
  95. package/packages/storefront/dist/client/_astro/{QuantitySelector.SEAsIOhe.js → QuantitySelector.tumfWDjC.js} +1 -1
  96. package/packages/storefront/dist/client/_astro/{SearchModal.JVuqMQFe.js → SearchModal.4osqtafp.js} +1 -1
  97. package/packages/storefront/dist/client/_astro/{SearchShowcase.zwEq0xsL.js → SearchShowcase.hg6TWrz3.js} +1 -1
  98. package/packages/storefront/dist/client/_astro/ShopHeader.xLMeJpqV.js +7 -0
  99. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.SO-0jCqa.js +5 -0
  100. package/packages/storefront/dist/client/_astro/_slug_.r344YGqG.css +1 -0
  101. package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +1 -0
  102. package/packages/storefront/dist/client/_astro/{customer-session.yn5lG3w3.js → customer-session.hXdZh5Ii.js} +1 -1
  103. package/packages/storefront/dist/client/_astro/{format-money.ykh8O7d2.js → format-money.iK5LGydz.js} +1 -1
  104. package/packages/storefront/dist/client/_astro/{grid-title.z5ui_5pL.js → grid-title.vGKBy72g.js} +1 -1
  105. package/packages/storefront/dist/client/_astro/{hoisted.hpPOAcMM.js → hoisted.HGTzAuTI.js} +1 -1
  106. package/packages/storefront/dist/client/_astro/{hoisted.daSrX1-i.js → hoisted.J15ErMtK.js} +1 -1
  107. package/packages/storefront/dist/client/_astro/hoisted.KYhwGfsv.js +1 -0
  108. package/packages/storefront/dist/client/_astro/{i18n.MycOopxQ.js → i18n.Lxnz1oF-.js} +1 -1
  109. package/packages/storefront/dist/client/_astro/{img.c2KI4eO6.js → img.WnsidxCx.js} +1 -1
  110. package/packages/storefront/dist/client/_astro/{index.NRzvVgQf.js → index.R7A-Pg5V.js} +1 -1
  111. package/packages/storefront/dist/client/_astro/{index.8acAQSHW.js → index.q6KIyKlJ.js} +1 -1
  112. package/packages/storefront/dist/client/_astro/{modules-info.dHD0h8Nc.js → modules-info.tVRhvxNm.js} +1 -1
  113. package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +1 -0
  114. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +13 -0
  115. package/packages/storefront/dist/client/_astro/sf-utils.Z4H-dRBJ.js +1 -0
  116. package/packages/storefront/dist/client/_astro/{shopping-cart.MgpVRgys.js → shopping-cart.ZdSCrjS6.js} +1 -1
  117. package/packages/storefront/dist/client/_astro/{use-analytics.D9xd-k7D.js → use-analytics.tCrQbW8O.js} +1 -1
  118. package/packages/storefront/dist/client/_astro/{use-product-card.gKh9czSW.js → use-product-card.-9TsgDDW.js} +1 -1
  119. package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +4 -0
  120. package/packages/storefront/dist/server/chunks/{CartSidebar_8VAKl-jR.mjs → CartSidebar_7UWmGIF6.mjs} +5 -5
  121. package/packages/storefront/dist/server/chunks/{SearchModal_7debttOi.mjs → SearchModal_MNdcYMws.mjs} +4 -4
  122. package/packages/storefront/dist/server/chunks/{_.._D6rq0cLa.mjs → _.._h5R83hoK.mjs} +1 -1
  123. package/packages/storefront/dist/server/chunks/{_page__WXDIwV7g.mjs → _page__lWVlZyRe.mjs} +1 -1
  124. package/packages/storefront/dist/server/chunks/{account_DOT2RzND.mjs → account_jmelxnlw.mjs} +1 -1
  125. package/packages/storefront/dist/server/chunks/astro/{assets-service_gJYJeEDH.mjs → assets-service_xNulQtBO.mjs} +1 -1
  126. package/packages/storefront/dist/server/chunks/{astro_H-6uiAAG.mjs → astro_tggR3S_9.mjs} +2 -2
  127. package/packages/storefront/dist/server/chunks/{index_eXlHIU83.mjs → index_e3ytAL8v.mjs} +1 -1
  128. package/packages/storefront/dist/server/chunks/{node_-eQO2yOn.mjs → node_kUJIRL0c.mjs} +1 -1
  129. package/packages/storefront/dist/server/chunks/pages/{__fI3NeWvy.mjs → __wihn0dYD.mjs} +864 -856
  130. package/packages/storefront/dist/server/chunks/pages/{_page__Piz8geXW.mjs → _page__Sb1eYhpz.mjs} +2 -2
  131. package/packages/storefront/dist/server/chunks/pages/{account_6pD7OYw-.mjs → account_-mULVQUB.mjs} +2 -2
  132. package/packages/storefront/dist/server/chunks/pages/{index_2F5yi6YO.mjs → index_mQXYNYRg.mjs} +4 -4
  133. package/packages/storefront/dist/server/chunks/pages/{node_-Buhxl8v.mjs → node_-qe5LuQh.mjs} +3 -3
  134. package/packages/storefront/dist/server/chunks/pages/{~fallback_okEL1qQ3.mjs → ~fallback_ad_xyGHU.mjs} +4 -4
  135. package/packages/storefront/dist/server/chunks/~fallback_EZqiEAFE.mjs +6 -0
  136. package/packages/storefront/dist/server/entry.mjs +376 -307
  137. package/packages/storefront/dist/server/manifest_RrmXPEuL.mjs +196 -0
  138. package/packages/storefront/dist/server/renderers.mjs +1 -1
  139. package/packages/storefront/package.json +7 -6
  140. package/packages/storefront/src/helpers/server-data.ts +2 -1
  141. package/packages/storefront/src/lib/components/BannerPictures.astro +7 -6
  142. package/packages/storefront/src/lib/components/CarouselControl.vue +2 -2
  143. package/packages/storefront/src/lib/components/ContentClearfix.vue +1 -1
  144. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  145. package/packages/storefront/src/lib/components/Picture.astro +2 -2
  146. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  147. package/packages/storefront/src/lib/components/ViewTransitions.astro +1 -0
  148. package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -3
  149. package/packages/storefront/src/lib/layouts/BaseHead.astro +29 -29
  150. package/packages/storefront/src/lib/pages/_vue.ts +3 -2
  151. package/packages/test-base/package.json +1 -1
  152. package/packages/types/package.json +1 -1
  153. package/tailwind.config.cjs +5 -0
  154. package/packages/storefront/dist/client/_astro/CartSidebar.ShqcM66P.js +0 -1
  155. package/packages/storefront/dist/client/_astro/ProductDetails.TQM36pzk.js +0 -7
  156. package/packages/storefront/dist/client/_astro/ProductShelf.HX1P9sTW.js +0 -1
  157. package/packages/storefront/dist/client/_astro/ProductShelf._0iHMZBO.js +0 -1
  158. package/packages/storefront/dist/client/_astro/ShopHeader.BoPmUmjI.js +0 -7
  159. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.40kDRyEO.js +0 -1
  160. package/packages/storefront/dist/client/_astro/_slug_.PTG68eA8.css +0 -1
  161. package/packages/storefront/dist/client/_astro/client.nPN_zw-c.js +0 -1
  162. package/packages/storefront/dist/client/_astro/hoisted.FcmEawNA.js +0 -1
  163. package/packages/storefront/dist/client/_astro/name.itYHl42A.js +0 -1
  164. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.Pr2hdd7G.js +0 -1
  165. package/packages/storefront/dist/client/_astro/sf-utils.yjuG8NjM.js +0 -1
  166. package/packages/storefront/dist/client/_astro/use-text-value.ZIz7zsXT.js +0 -4
  167. package/packages/storefront/dist/server/chunks/~fallback_M-xiy2GE.mjs +0 -6
  168. package/packages/storefront/dist/server/manifest_oV2meNKS.mjs +0 -196
@@ -1,6 +1,6 @@
1
1
  import { img, imgSizes, i18n, formatMoney, price, randomObjectId, nickname, inStock, gridTitle, categoriesList, name, onPromotion, variationsGrids, specTextValue, specValueByText } from '@ecomplus/utils';
2
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_H-6uiAAG.mjs';
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_tggR3S_9.mjs';
4
4
  import 'kleur/colors';
5
5
  import api from '@cloudcommerce/api';
6
6
  import { EventEmitter } from 'node:events';
@@ -12,10 +12,10 @@ import 'clsx';
12
12
  /* empty css */
13
13
  import { renderSync, parse as parse$1, ELEMENT_NODE, walkSync } from 'ultrahtml';
14
14
  import mime from 'mime/lite.js';
15
- import { i as isESMImportedImage, a as isLocalService, b as isRemoteImage, D as DEFAULT_HASH_PROPS } from '../astro/assets-service_gJYJeEDH.mjs';
15
+ import { i as isESMImportedImage, a as isLocalService, b as isRemoteImage, D as DEFAULT_HASH_PROPS } from '../astro/assets-service_xNulQtBO.mjs';
16
16
  import imageSize from 'image-size';
17
- import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, 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';
18
- import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrInterpolate, ssrRenderSuspense, ssrLooseEqual } from 'vue/server-renderer';
17
+ import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, resolveComponent, openBlock, createBlock, createCommentVNode, createTextVNode, toDisplayString, reactive, shallowRef, withDirectives, vShow, Fragment as Fragment$1, renderList, nextTick, withModifiers, Teleport, defineAsyncComponent, vModelText, Suspense, createSlots, shallowReactive, withAsyncContext, vModelRadio } from 'vue';
18
+ import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderStyle, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrRenderSuspense, ssrLooseEqual } from 'vue/server-renderer';
19
19
  import { useScroll, useElementHover, useDebounceFn, watchDebounced, useTimeout, promiseTimeout, watchOnce, onClickOutside, useUrlSearchParams, createReusableTemplate } from '@vueuse/core';
20
20
  import mitt from 'mitt';
21
21
  import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem, Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/vue';
@@ -193,6 +193,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
193
193
  const domain = globalThis.$storefront.settings.domain || window.location.host;
194
194
  if (props.href.startsWith(`https://${domain}`))
195
195
  return void 0;
196
+ return "_blank";
196
197
  }
197
198
  return void 0;
198
199
  });
@@ -319,8 +320,9 @@ const createApp$1 = (app) => {
319
320
  };
320
321
  app2.config.globalProperties.$money = formatMoney;
321
322
  app2.config.globalProperties.$percentage = formatPercentage;
322
- app2.config.globalProperties.$settings = globalThis.$storefront.settings;
323
- app2.config.globalProperties.$apiContext = globalThis.$storefront.apiContext;
323
+ const { settings, apiContext } = globalThis.$storefront || {};
324
+ app2.config.globalProperties.$settings = settings;
325
+ app2.config.globalProperties.$apiContext = apiContext;
324
326
  }
325
327
  });
326
328
  app.component("Fade", Fade);
@@ -356,7 +358,7 @@ function _sfc_ssrRender$B(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
356
358
  "rotate-180 group-active:-translate-x-1": $setup.isX && $props.isPrev,
357
359
  "rotate-90 group-active:translate-y-1": !$setup.isX && !$props.isPrev,
358
360
  "-rotate-90 group-active:-translate-y-1": !$setup.isX && $props.isPrev
359
- }, "i-chevron-right m-0"])}"></i>`);
361
+ }, "m-0 i-chevron-right"])}"></i>`);
360
362
  }, _push, _parent);
361
363
  _push(`</button>`);
362
364
  }
@@ -638,7 +640,7 @@ async function getConfiguredImageService() {
638
640
  if (!globalThis?.astroAsset?.imageService) {
639
641
  const { default: service } = await import(
640
642
  // @ts-expect-error
641
- '../astro/assets-service_gJYJeEDH.mjs'
643
+ '../astro/assets-service_xNulQtBO.mjs'
642
644
  ).then(n => n.s).catch((e) => {
643
645
  const error = new AstroError(InvalidImageService);
644
646
  error.cause = e;
@@ -673,6 +675,7 @@ async function getImage$1(options, imageConfig) {
673
675
  ...options,
674
676
  src: typeof options.src === "object" && "then" in options.src ? (await options.src).default ?? await options.src : options.src
675
677
  };
678
+ const originalPath = isESMImportedImage(resolvedOptions.src) ? resolvedOptions.src.fsPath : resolvedOptions.src;
676
679
  const clonedSrc = isESMImportedImage(resolvedOptions.src) ? (
677
680
  // @ts-expect-error - clone is a private, hidden prop
678
681
  resolvedOptions.src.clone ?? resolvedOptions.src
@@ -691,10 +694,10 @@ async function getImage$1(options, imageConfig) {
691
694
  );
692
695
  if (isLocalService(service) && globalThis.astroAsset.addStaticImage && !(isRemoteImage(validatedOptions.src) && imageURL === validatedOptions.src)) {
693
696
  const propsToHash = service.propertiesToHash ?? DEFAULT_HASH_PROPS;
694
- imageURL = globalThis.astroAsset.addStaticImage(validatedOptions, propsToHash);
697
+ imageURL = globalThis.astroAsset.addStaticImage(validatedOptions, propsToHash, originalPath);
695
698
  srcSets = srcSetTransforms.map((srcSet) => ({
696
699
  transform: srcSet.transform,
697
- url: globalThis.astroAsset.addStaticImage(srcSet.transform, propsToHash),
700
+ url: globalThis.astroAsset.addStaticImage(srcSet.transform, propsToHash, originalPath),
698
701
  descriptor: srcSet.descriptor,
699
702
  attributes: srcSet.attributes
700
703
  }));
@@ -1165,536 +1168,236 @@ const loadRouteContext = async (Astro, {
1165
1168
  return routeContext;
1166
1169
  };
1167
1170
 
1168
- /* eslint-disable */
1169
-
1170
- const pwaInfo = false;
1171
-
1172
- const $$Astro$f = createAstro("https://demo.ecomplus.app");
1173
- const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
1174
- const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
1175
- Astro2.self = $$ViewTransitions;
1176
- const { fallback = "animate" } = Astro2.props;
1177
- return renderTemplate`<meta name="astro-view-transitions-enabled" content="true">
1178
- <meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>
1179
- `;
1180
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
1181
-
1182
- var __freeze$3 = Object.freeze;
1183
- var __defProp$3 = Object.defineProperty;
1184
- var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
1185
- var _b, _c;
1186
- const $$Astro$e = createAstro("https://demo.ecomplus.app");
1187
- const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
1188
- const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
1189
- Astro2.self = $$BaseHead;
1190
- const isPWA = pwaInfo !== false;
1191
- const hasViewTransitions = Astro2.props.hasViewTransitions !== false && !Astro2.url.pathname.startsWith("/app/");
1192
- const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
1193
- const getIconUrl = (size) => {
1194
- return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
1195
- };
1196
- const {
1197
- storeId,
1198
- isHomepage,
1199
- isSearchPage,
1200
- searchPageTerm,
1201
- cmsContent,
1202
- fetchingApiContext,
1203
- apiContext,
1204
- lang,
1205
- countryCode,
1206
- currency,
1207
- currencySymbol,
1208
- domain,
1209
- primaryColor,
1210
- settings,
1211
- isPreview,
1212
- getContent
1213
- } = Astro2.locals.routeContext;
1214
- if (fetchingApiContext) {
1215
- await fetchingApiContext;
1171
+ function removeQueryString(src) {
1172
+ const index = src.lastIndexOf("?");
1173
+ return index > 0 ? src.substring(0, index) : src;
1174
+ }
1175
+ function basename(src) {
1176
+ return removeQueryString(src.replace(/^.*[\\\/]/, ""));
1177
+ }
1178
+ const extname = (src) => {
1179
+ const base = basename(src);
1180
+ const index = base.lastIndexOf(".");
1181
+ if (index <= 0) {
1182
+ return "";
1216
1183
  }
1217
- const apiDoc = apiContext.doc;
1218
- const state = apiDoc || cmsContent || {};
1219
- let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
1220
- let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
1221
- if (isHomepage) {
1222
- if (!title)
1223
- title = settings.name;
1224
- if (!description)
1225
- description = settings.description;
1184
+ return base.substring(index);
1185
+ };
1186
+ function parseAspectRatio(aspectRatio) {
1187
+ if (!aspectRatio) {
1188
+ return void 0;
1226
1189
  }
1227
- if (isSearchPage) {
1228
- if (searchPageTerm) {
1229
- if (!title)
1230
- title = settings.name;
1231
- title = title.replace("$term", searchPageTerm);
1232
- if (!title.includes(searchPageTerm)) {
1233
- title = `${searchPageTerm} | ${title}`;
1234
- }
1235
- } else if (!title) {
1236
- title = `${i19searchProducts} | ${settings.name}`;
1237
- }
1190
+ if (typeof aspectRatio === "number") {
1191
+ return aspectRatio;
1238
1192
  }
1239
- const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
1240
- const shortcutIcon = settings.icon ? getIconUrl(192) : null;
1241
- const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
1242
- const { metatags: metatagsContent } = await getContent("layout");
1243
- const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
1244
- let ogImage;
1245
- if (apiDoc) {
1246
- const picture = img(state, void 0, "zoom");
1247
- ogImage = picture && picture.url;
1193
+ const [width, height] = aspectRatio.split(":");
1194
+ return parseInt(width, 10) / parseInt(height, 10);
1195
+ }
1196
+ async function resolveAspectRatio({ src, aspectRatio }) {
1197
+ if (typeof src === "string") {
1198
+ return parseAspectRatio(aspectRatio);
1248
1199
  }
1249
- if (!ogImage) {
1250
- if (metatagsContent?.ogImage) {
1251
- ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
1252
- }
1200
+ throw new Error('Custom (faster) `Picture.runtime.astro` works only with string ("remote") src');
1201
+ }
1202
+ async function resolveFormats({ src, formats }) {
1203
+ const unique = new Set(formats);
1204
+ if (typeof src === "string") {
1205
+ unique.add(extname(src).replace(".", ""));
1253
1206
  } else {
1254
- ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
1207
+ throw new Error("Custom `Picture.ssr.astro` works only with string src");
1255
1208
  }
1256
- let inlineClientJS = `
1257
- window._emitApiContext = (id = null) => {
1258
- console.log('[ctx] emit ' + id);
1259
- window.dispatchEvent(new Event('storefront:apiContext'));
1260
- window._emitedContextId = id;
1209
+ return Array.from(unique).filter(Boolean);
1210
+ }
1211
+ const createPictureGetter = (getImage) => {
1212
+ return async (params) => {
1213
+ const {
1214
+ src,
1215
+ alt,
1216
+ widths,
1217
+ fit,
1218
+ position,
1219
+ background
1220
+ } = params;
1221
+ if (!src) {
1222
+ throw new Error("[@astrojs/image] `src` is required");
1223
+ }
1224
+ if (!widths || !Array.isArray(widths)) {
1225
+ throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
1226
+ }
1227
+ const aspectRatio = await resolveAspectRatio(params);
1228
+ if (!aspectRatio) {
1229
+ throw new Error("`aspectRatio` must be provided for remote images");
1230
+ }
1231
+ const allFormats = await resolveFormats(params);
1232
+ const lastFormat = allFormats[allFormats.length - 1];
1233
+ const maxWidth = Math.max(...widths);
1234
+ let image;
1235
+ async function getSource(format) {
1236
+ const imgs = await Promise.all(
1237
+ widths.map(async (width) => {
1238
+ const img = await getImage({
1239
+ src,
1240
+ alt,
1241
+ format,
1242
+ width,
1243
+ height: width / aspectRatio,
1244
+ fit,
1245
+ position,
1246
+ background,
1247
+ aspectRatio
1248
+ });
1249
+ if (format === lastFormat && width === maxWidth) {
1250
+ image = img;
1251
+ }
1252
+ return `${img.src} ${width}w`;
1253
+ })
1254
+ );
1255
+ return {
1256
+ type: mime.getType(format) || format,
1257
+ srcset: imgs.join(",")
1258
+ };
1259
+ }
1260
+ const sources = await Promise.all(allFormats.map((format) => getSource(format)));
1261
+ return {
1262
+ sources,
1263
+ // @ts-ignore
1264
+ image
1265
+ };
1266
+ };
1261
1267
  };
1262
- window.ECOM_STORE_ID = ${storeId};
1263
- window.ECOM_LANG = '${lang}';
1264
- window.ECOM_CURRENCY = '${currency}';
1265
- window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
1266
- window.ECOM_COUNTRY_CODE = '${countryCode}';
1267
- window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
1268
- if (apiContext.error) {
1269
- const { message, statusCode } = apiContext.error;
1270
- const url = Astro2.url.pathname;
1271
- inlineClientJS += `
1272
- console.error(${JSON.stringify(message)});
1273
- setTimeout(() => {
1274
- window.location.replace("/~fallback?status=${statusCode}&url=${encodeURIComponent(url)}");
1275
- }, 1);`;
1268
+
1269
+ const getAspectRatio = (src, tryImageSize) => {
1270
+ if (typeof src === "string") {
1271
+ src = tryImageSize(src);
1272
+ } else if (src.width) {
1273
+ return src.height ? src.width / src.height : 1;
1276
1274
  }
1277
- let contextInlineClientJS;
1278
- if (apiDoc) {
1279
- if (typeof apiDoc.price === "number") {
1280
- apiDoc.price = price(apiDoc);
1275
+ return 0;
1276
+ };
1277
+ const useSSRPicture = async (params) => {
1278
+ const {
1279
+ src,
1280
+ alt,
1281
+ sizes: propSizes,
1282
+ widths,
1283
+ aspectRatio: propAspectRatio,
1284
+ fit,
1285
+ background,
1286
+ position,
1287
+ formats = ["avif", "webp"],
1288
+ loading = "lazy",
1289
+ decoding = "async",
1290
+ hasImg = true,
1291
+ tryImageSize,
1292
+ getPicture,
1293
+ assetsPrefix,
1294
+ ...attrs
1295
+ } = params;
1296
+ let aspectRatio;
1297
+ if (propAspectRatio) {
1298
+ if (typeof propAspectRatio === "number") {
1299
+ aspectRatio = propAspectRatio;
1300
+ } else {
1301
+ const [width, height] = propAspectRatio.split(":");
1302
+ aspectRatio = Number(width) / Number(height);
1281
1303
  }
1282
- const slimDocRegex = globalThis.$storefrontSlimDocRegex || /body_|meta_|metafields|_records|i18n/;
1283
- const minifyApiDoc = (nestedDoc) => {
1284
- if (typeof nestedDoc === "object" && nestedDoc) {
1285
- if (Array.isArray(nestedDoc)) {
1286
- nestedDoc.forEach((item) => minifyApiDoc(item));
1287
- } else {
1288
- Object.keys(nestedDoc).forEach((field) => {
1289
- if (slimDocRegex.test(field)) {
1290
- delete nestedDoc[field];
1291
- } else {
1292
- minifyApiDoc(nestedDoc[field]);
1293
- }
1294
- });
1304
+ } else if ((!attrs.width || !attrs.height) && typeof src === "string") {
1305
+ const { width, height } = tryImageSize(src);
1306
+ if (width && height) {
1307
+ aspectRatio = getAspectRatio({ width, height }, tryImageSize);
1308
+ let hasSplicedWidths = false;
1309
+ for (let i = widths.length - 1; i >= 0; i--) {
1310
+ if (widths[i] > width) {
1311
+ widths.splice(i, 1);
1312
+ hasSplicedWidths = true;
1295
1313
  }
1296
1314
  }
1297
- return nestedDoc;
1298
- };
1299
- inlineClientJS += `
1300
- window._firstLoadContextId = '${apiDoc._id}';`;
1301
- contextInlineClientJS = `
1302
- $storefront.apiContext = ${JSON.stringify({
1303
- resource: apiContext.resource,
1304
- doc: minifyApiDoc({ ...apiDoc }),
1305
- timestamp: Date.now()
1306
- })};
1307
- $storefront.context /* DEPRECATED */ = $storefront.apiContext;
1308
- _emitApiContext('${apiDoc._id}');`;
1309
- } else {
1310
- inlineClientJS += `
1311
- window._firstLoadContextId = null;`;
1312
- contextInlineClientJS = `
1313
- $storefront.apiContext = null;
1314
- delete $storefront.apiContext;
1315
- delete $storefront.context;
1316
- _emitApiContext();`;
1317
- }
1318
- if (isPreview) {
1319
- inlineClientJS += `
1320
- window.$isCmsPreview = true;`;
1321
- }
1322
- const inlineJSONLd = JSON.stringify({
1323
- "@context": "http://schema.org",
1324
- "@type": "Organization",
1325
- name: settings.name,
1326
- url: `https://${domain}/`,
1327
- logo: `https://${domain}${settings.logo}`
1328
- });
1329
- 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)));
1330
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
1331
-
1332
- function has(value) {
1333
- return typeof value === "string";
1334
- }
1335
- function is(a, b) {
1336
- return a === b;
1337
- }
1338
- function any(a, b) {
1339
- return has(a) && b.includes(a.toLowerCase());
1340
- }
1341
- const ElementWeights = {
1342
- META: 10,
1343
- TITLE: 9,
1344
- PRECONNECT: 8,
1345
- ASYNC_SCRIPT: 7,
1346
- IMPORT_STYLES: 6,
1347
- SYNC_SCRIPT: 5,
1348
- SYNC_STYLES: 4,
1349
- PRELOAD: 3,
1350
- DEFER_SCRIPT: 2,
1351
- PREFETCH_PRERENDER: 1,
1352
- OTHER: 0
1353
- };
1354
- const ElementDetectors = {
1355
- META: isMeta,
1356
- TITLE: isTitle,
1357
- PRECONNECT: isPreconnect,
1358
- DEFER_SCRIPT: isDeferScript,
1359
- ASYNC_SCRIPT: isAsyncScript,
1360
- IMPORT_STYLES: isImportStyles,
1361
- SYNC_SCRIPT: isSyncScript,
1362
- SYNC_STYLES: isSyncStyles,
1363
- PRELOAD: isPreload,
1364
- PREFETCH_PRERENDER: isPrefetchPrerender
1365
- };
1366
- const META_HTTP_EQUIV_KEYWORDS = [
1367
- "accept-ch",
1368
- "content-security-policy",
1369
- "content-type",
1370
- "default-style",
1371
- "delegate-ch",
1372
- "origin-trial",
1373
- "x-dns-prefetch-control"
1374
- ];
1375
- function isMeta(name, a) {
1376
- if (name === "base")
1377
- return true;
1378
- if (name !== "meta")
1379
- return false;
1380
- return has(a.charset) || is(a.name, "viewport") || any(a["http-equiv"], META_HTTP_EQUIV_KEYWORDS);
1381
- }
1382
- function isTitle(name) {
1383
- return name === "title";
1384
- }
1385
- function isPreconnect(name, { rel }) {
1386
- return name === "link" && is(rel, "preconnect");
1387
- }
1388
- function isAsyncScript(name, { src, async }) {
1389
- return name === "script" && has(src) && has(async);
1390
- }
1391
- function isImportStyles(name, a, children) {
1392
- const importRe = /@import/;
1393
- if (name === "style") {
1394
- return importRe.test(children);
1395
- }
1396
- return false;
1397
- }
1398
- function isSyncScript(name, { src, defer, async, type = "" }) {
1399
- if (name !== "script")
1400
- return false;
1401
- return !(has(src) && (has(defer) || has(async) || is(type, "module")) || type.includes("json"));
1402
- }
1403
- function isSyncStyles(name, { rel }) {
1404
- if (name === "style")
1405
- return true;
1406
- return name === "link" && is(rel, "stylesheet");
1407
- }
1408
- function isPreload(name, { rel }) {
1409
- return name === "link" && any(rel, ["preload", "modulepreload"]);
1410
- }
1411
- function isDeferScript(name, { src, defer, async, type }) {
1412
- if (name !== "script")
1413
- return false;
1414
- return has(src) && has(defer) || has(src) && is(type, "module") && !has(async);
1415
- }
1416
- function isPrefetchPrerender(name, { rel }) {
1417
- return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
1418
- }
1419
- function getWeight(element) {
1420
- for (const [id, detector] of Object.entries(ElementDetectors)) {
1421
- const children = element.name === "style" && element.children.length > 0 ? renderSync(element) : "";
1422
- if (detector(element.name, element.attributes, children)) {
1423
- return ElementWeights[id];
1315
+ if (hasSplicedWidths) {
1316
+ attrs.width = width;
1317
+ attrs.height = height;
1318
+ if (!widths.find((w) => w === width)) {
1319
+ widths.push(width);
1320
+ }
1321
+ } else {
1322
+ attrs.width = Math.max(...widths);
1323
+ attrs.height = Math.round(attrs.width / aspectRatio);
1324
+ }
1424
1325
  }
1425
1326
  }
1426
- return ElementWeights.OTHER;
1427
- }
1428
-
1429
- function capo(html) {
1430
- const ast = parse$1(html);
1431
- try {
1432
- walkSync(ast, (node, parent, index) => {
1433
- if (node.type === ELEMENT_NODE && node.name === "head") {
1434
- if (parent) {
1435
- parent.children.splice(index, 1, getSortedHead(node));
1436
- throw "done";
1327
+ let sizes = propSizes || "";
1328
+ if (!sizes && attrs.class) {
1329
+ const classNames = attrs.class.split(" ");
1330
+ let nextSize;
1331
+ const breakpoints = {
1332
+ sm: 640,
1333
+ md: 768,
1334
+ lg: 1024,
1335
+ xl: 1280,
1336
+ "2xl": 1536
1337
+ };
1338
+ [
1339
+ ["", 0],
1340
+ ...Object.entries(breakpoints)
1341
+ ].forEach(([breakpoint, minWidth]) => {
1342
+ const classRegex = breakpoint ? new RegExp(`^${breakpoint}:max-w-(\\[\\w+\\]|screen-\\w+)$`) : /^max-w-(\[\w+\]|screen-\w+)$/;
1343
+ let classMaxW;
1344
+ classNames.find((_class) => {
1345
+ const maxW = _class.replace(classRegex, "$1");
1346
+ if (maxW !== _class) {
1347
+ classMaxW = maxW;
1348
+ return true;
1349
+ }
1350
+ return false;
1351
+ });
1352
+ if (classMaxW) {
1353
+ if (nextSize) {
1354
+ if (sizes)
1355
+ sizes += ", ";
1356
+ sizes += `(max-width: ${minWidth - 1}px) ${nextSize}`;
1357
+ }
1358
+ if (classMaxW.charAt(0) === "[") {
1359
+ nextSize = classMaxW.slice(1, classMaxW.length - 1);
1360
+ } else {
1361
+ const screenSize = breakpoints[classMaxW.slice(7)];
1362
+ if (screenSize) {
1363
+ nextSize = `${screenSize}px`;
1364
+ }
1437
1365
  }
1438
1366
  }
1439
1367
  });
1440
- } catch (e) {
1441
- if (e !== "done")
1442
- throw e;
1443
- }
1444
- return renderSync(ast);
1445
- }
1446
- function getSortedHead(head) {
1447
- const weightedChildren = head.children.map((node) => {
1448
- if (node.type === ELEMENT_NODE) {
1449
- const weight = getWeight(node);
1450
- return [weight, node];
1368
+ if (nextSize) {
1369
+ if (sizes)
1370
+ sizes += ", ";
1371
+ sizes += nextSize;
1451
1372
  }
1452
- }).filter(Boolean);
1453
- const children = weightedChildren.sort((a, b) => b[0] - a[0]).map(([_, element]) => element);
1454
- return { ...head, children };
1455
- }
1456
-
1457
- const Head = createComponent({
1458
- factory: async (result, props, slots) => {
1459
- let head = "";
1460
- head += `<head${spreadAttributes(props)} data-capo>`;
1461
- head += await renderSlotToString(result, slots.default);
1462
- head += renderAllHeadContent(result);
1463
- head += "</head>";
1464
- return unescapeHTML(capo(head));
1465
1373
  }
1466
- });
1467
-
1468
- function removeQueryString(src) {
1469
- const index = src.lastIndexOf("?");
1470
- return index > 0 ? src.substring(0, index) : src;
1471
- }
1472
- function basename(src) {
1473
- return removeQueryString(src.replace(/^.*[\\\/]/, ""));
1474
- }
1475
- const extname = (src) => {
1476
- const base = basename(src);
1477
- const index = base.lastIndexOf(".");
1478
- if (index <= 0) {
1479
- return "";
1374
+ if (!sizes && widths.length === 1) {
1375
+ sizes = `${widths[0] / 2}px`;
1480
1376
  }
1481
- return base.substring(index);
1482
- };
1483
- function parseAspectRatio(aspectRatio) {
1484
- if (!aspectRatio) {
1485
- return void 0;
1377
+ const { image, sources } = await getPicture({
1378
+ src,
1379
+ widths,
1380
+ formats,
1381
+ aspectRatio,
1382
+ fit,
1383
+ background,
1384
+ position,
1385
+ alt
1386
+ });
1387
+ delete image.width;
1388
+ delete image.height;
1389
+ if (assetsPrefix && image.src?.charAt(0) === "/") {
1390
+ image.src = `${assetsPrefix}${image.src}`;
1391
+ sources.forEach((source) => {
1392
+ source.srcset = `${assetsPrefix}${source.srcset}`.replace(/,\//g, `,${assetsPrefix}/`);
1393
+ });
1486
1394
  }
1487
- if (typeof aspectRatio === "number") {
1488
- return aspectRatio;
1489
- }
1490
- const [width, height] = aspectRatio.split(":");
1491
- return parseInt(width, 10) / parseInt(height, 10);
1492
- }
1493
- async function resolveAspectRatio({ src, aspectRatio }) {
1494
- if (typeof src === "string") {
1495
- return parseAspectRatio(aspectRatio);
1496
- }
1497
- throw new Error('Custom (faster) `Picture.runtime.astro` works only with string ("remote") src');
1498
- }
1499
- async function resolveFormats({ src, formats }) {
1500
- const unique = new Set(formats);
1501
- if (typeof src === "string") {
1502
- unique.add(extname(src).replace(".", ""));
1503
- } else {
1504
- throw new Error("Custom `Picture.ssr.astro` works only with string src");
1505
- }
1506
- return Array.from(unique).filter(Boolean);
1507
- }
1508
- const createPictureGetter = (getImage) => {
1509
- return async (params) => {
1510
- const {
1511
- src,
1512
- alt,
1513
- widths,
1514
- fit,
1515
- position,
1516
- background
1517
- } = params;
1518
- if (!src) {
1519
- throw new Error("[@astrojs/image] `src` is required");
1520
- }
1521
- if (!widths || !Array.isArray(widths)) {
1522
- throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
1523
- }
1524
- const aspectRatio = await resolveAspectRatio(params);
1525
- if (!aspectRatio) {
1526
- throw new Error("`aspectRatio` must be provided for remote images");
1527
- }
1528
- const allFormats = await resolveFormats(params);
1529
- const lastFormat = allFormats[allFormats.length - 1];
1530
- const maxWidth = Math.max(...widths);
1531
- let image;
1532
- async function getSource(format) {
1533
- const imgs = await Promise.all(
1534
- widths.map(async (width) => {
1535
- const img = await getImage({
1536
- src,
1537
- alt,
1538
- format,
1539
- width,
1540
- height: width / aspectRatio,
1541
- fit,
1542
- position,
1543
- background,
1544
- aspectRatio
1545
- });
1546
- if (format === lastFormat && width === maxWidth) {
1547
- image = img;
1548
- }
1549
- return `${img.src} ${width}w`;
1550
- })
1551
- );
1552
- return {
1553
- type: mime.getType(format) || format,
1554
- srcset: imgs.join(",")
1555
- };
1556
- }
1557
- const sources = await Promise.all(allFormats.map((format) => getSource(format)));
1558
- return {
1559
- sources,
1560
- // @ts-ignore
1561
- image
1562
- };
1563
- };
1564
- };
1565
-
1566
- const getAspectRatio = (src, tryImageSize) => {
1567
- if (typeof src === "string") {
1568
- src = tryImageSize(src);
1569
- } else if (src.width) {
1570
- return src.height ? src.width / src.height : 1;
1571
- }
1572
- return 0;
1573
- };
1574
- const useSSRPicture = async (params) => {
1575
- const {
1576
- src,
1577
- alt,
1578
- sizes: propSizes,
1579
- widths,
1580
- aspectRatio: propAspectRatio,
1581
- fit,
1582
- background,
1583
- position,
1584
- formats = ["avif", "webp"],
1585
- loading = "lazy",
1586
- decoding = "async",
1587
- hasImg = true,
1588
- tryImageSize,
1589
- getPicture,
1590
- assetsPrefix,
1591
- ...attrs
1592
- } = params;
1593
- let aspectRatio;
1594
- if (propAspectRatio) {
1595
- if (typeof propAspectRatio === "number") {
1596
- aspectRatio = propAspectRatio;
1597
- } else {
1598
- const [width, height] = propAspectRatio.split(":");
1599
- aspectRatio = Number(width) / Number(height);
1600
- }
1601
- } else if ((!attrs.width || !attrs.height) && typeof src === "string") {
1602
- const { width, height } = tryImageSize(src);
1603
- if (width && height) {
1604
- aspectRatio = getAspectRatio({ width, height }, tryImageSize);
1605
- let hasSplicedWidths = false;
1606
- for (let i = widths.length - 1; i >= 0; i--) {
1607
- if (widths[i] > width) {
1608
- widths.splice(i, 1);
1609
- hasSplicedWidths = true;
1610
- }
1611
- }
1612
- if (hasSplicedWidths) {
1613
- attrs.width = width;
1614
- attrs.height = height;
1615
- if (!widths.find((w) => w === width)) {
1616
- widths.push(width);
1617
- }
1618
- } else {
1619
- attrs.width = Math.max(...widths);
1620
- attrs.height = Math.round(attrs.width / aspectRatio);
1621
- }
1622
- }
1623
- }
1624
- let sizes = propSizes || "";
1625
- if (!sizes && attrs.class) {
1626
- const classNames = attrs.class.split(" ");
1627
- let nextSize;
1628
- const breakpoints = {
1629
- sm: 640,
1630
- md: 768,
1631
- lg: 1024,
1632
- xl: 1280,
1633
- "2xl": 1536
1634
- };
1635
- [
1636
- ["", 0],
1637
- ...Object.entries(breakpoints)
1638
- ].forEach(([breakpoint, minWidth]) => {
1639
- const classRegex = breakpoint ? new RegExp(`^${breakpoint}:max-w-(\\[\\w+\\]|screen-\\w+)$`) : /^max-w-(\[\w+\]|screen-\w+)$/;
1640
- let classMaxW;
1641
- classNames.find((_class) => {
1642
- const maxW = _class.replace(classRegex, "$1");
1643
- if (maxW !== _class) {
1644
- classMaxW = maxW;
1645
- return true;
1646
- }
1647
- return false;
1648
- });
1649
- if (classMaxW) {
1650
- if (nextSize) {
1651
- if (sizes)
1652
- sizes += ", ";
1653
- sizes += `(max-width: ${minWidth - 1}px) ${nextSize}`;
1654
- }
1655
- if (classMaxW.charAt(0) === "[") {
1656
- nextSize = classMaxW.slice(1, classMaxW.length - 1);
1657
- } else {
1658
- const screenSize = breakpoints[classMaxW.slice(7)];
1659
- if (screenSize) {
1660
- nextSize = `${screenSize}px`;
1661
- }
1662
- }
1663
- }
1664
- });
1665
- if (nextSize) {
1666
- if (sizes)
1667
- sizes += ", ";
1668
- sizes += nextSize;
1669
- }
1670
- }
1671
- if (!sizes && widths.length === 1) {
1672
- sizes = `${widths[0] / 2}px`;
1673
- }
1674
- const { image, sources } = await getPicture({
1675
- src,
1676
- widths,
1677
- formats,
1678
- aspectRatio,
1679
- fit,
1680
- background,
1681
- position,
1682
- alt
1683
- });
1684
- delete image.width;
1685
- delete image.height;
1686
- if (assetsPrefix && image.src?.charAt(0) === "/") {
1687
- image.src = `${assetsPrefix}${image.src}`;
1688
- sources.forEach((source) => {
1689
- source.srcset = `${assetsPrefix}${source.srcset}`.replace(/,\//g, `,${assetsPrefix}/`);
1690
- });
1691
- }
1692
- const pictureAttrs = {};
1693
- if (!hasImg) {
1694
- pictureAttrs["data-alt"] = alt;
1695
- Object.assign(pictureAttrs, attrs);
1696
- delete pictureAttrs.width;
1697
- delete pictureAttrs.height;
1395
+ const pictureAttrs = {};
1396
+ if (!hasImg) {
1397
+ pictureAttrs["data-alt"] = alt;
1398
+ Object.assign(pictureAttrs, attrs);
1399
+ delete pictureAttrs.width;
1400
+ delete pictureAttrs.height;
1698
1401
  }
1699
1402
  return {
1700
1403
  sizes,
@@ -1711,9 +1414,9 @@ const useSSRPicture = async (params) => {
1711
1414
  };
1712
1415
  };
1713
1416
 
1714
- const $$Astro$d = createAstro("https://demo.ecomplus.app");
1417
+ const $$Astro$f = createAstro("https://demo.ecomplus.app");
1715
1418
  const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
1716
- const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
1419
+ const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
1717
1420
  Astro2.self = $$Picture;
1718
1421
  const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND;
1719
1422
  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}` : "";
@@ -1770,30 +1473,330 @@ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
1770
1473
  }
1771
1474
  }
1772
1475
  }
1773
- const {
1774
- src,
1775
- attributes: { width, height }
1776
- } = await getImage({
1777
- ...imageOptions,
1778
- src: imageMetadata || imageOptions.src
1779
- });
1780
- return { src, width, height };
1781
- }),
1782
- assetsPrefix: Astro2.locals.assetsPrefix
1783
- });
1784
- if (imgAttrs) {
1785
- imgAttrs.src += versionSuffix;
1476
+ const {
1477
+ src,
1478
+ attributes: { width, height }
1479
+ } = await getImage({
1480
+ ...imageOptions,
1481
+ src: imageMetadata || imageOptions.src
1482
+ });
1483
+ return { src, width, height };
1484
+ }),
1485
+ assetsPrefix: Astro2.locals.assetsPrefix
1486
+ });
1487
+ if (imgAttrs) {
1488
+ imgAttrs.src += versionSuffix;
1489
+ }
1490
+ return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}>
1491
+ ${sources.map((attrs) => {
1492
+ if (versionSuffix) {
1493
+ attrs.srcset = attrs.srcset.replace(/\s(\w+)$/, `${versionSuffix} $1`);
1494
+ }
1495
+ return renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`;
1496
+ })}
1497
+ ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`}
1498
+ </picture>`;
1499
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
1500
+
1501
+ /* eslint-disable */
1502
+
1503
+ const pwaInfo = false;
1504
+
1505
+ const $$Astro$e = createAstro("https://demo.ecomplus.app");
1506
+ const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
1507
+ const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
1508
+ Astro2.self = $$ViewTransitions;
1509
+ const { fallback = "animate" } = Astro2.props;
1510
+ return renderTemplate`<meta name="astro-view-transitions-enabled" content="true">
1511
+ <meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>
1512
+ `;
1513
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
1514
+
1515
+ var __freeze$3 = Object.freeze;
1516
+ var __defProp$3 = Object.defineProperty;
1517
+ var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
1518
+ var _b, _c;
1519
+ const $$Astro$d = createAstro("https://demo.ecomplus.app");
1520
+ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
1521
+ const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
1522
+ Astro2.self = $$BaseHead;
1523
+ const isPWA = pwaInfo !== false;
1524
+ const hasViewTransitions = Astro2.props.hasViewTransitions !== false && !Astro2.url.pathname.startsWith("/app/");
1525
+ const {
1526
+ storeId,
1527
+ isHomepage,
1528
+ isSearchPage,
1529
+ searchPageTerm,
1530
+ cmsContent,
1531
+ fetchingApiContext,
1532
+ apiContext,
1533
+ lang,
1534
+ countryCode,
1535
+ currency,
1536
+ currencySymbol,
1537
+ domain,
1538
+ primaryColor,
1539
+ settings,
1540
+ isPreview,
1541
+ getContent
1542
+ } = Astro2.locals.routeContext;
1543
+ if (fetchingApiContext) {
1544
+ await fetchingApiContext;
1545
+ }
1546
+ const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
1547
+ const getIconUrl = (size) => {
1548
+ return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
1549
+ };
1550
+ const apiDoc = apiContext.doc;
1551
+ const state = apiDoc || cmsContent || {};
1552
+ let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
1553
+ let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
1554
+ if (isHomepage) {
1555
+ if (!title)
1556
+ title = settings.name;
1557
+ if (!description)
1558
+ description = settings.description;
1559
+ }
1560
+ if (isSearchPage) {
1561
+ if (searchPageTerm) {
1562
+ if (!title)
1563
+ title = settings.name;
1564
+ title = title.replace("$term", searchPageTerm);
1565
+ if (!title.includes(searchPageTerm)) {
1566
+ title = `${searchPageTerm} | ${title}`;
1567
+ }
1568
+ } else if (!title) {
1569
+ title = `${i19searchProducts} | ${settings.name}`;
1570
+ }
1571
+ }
1572
+ const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
1573
+ const shortcutIcon = settings.icon ? getIconUrl(192) : null;
1574
+ const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
1575
+ const { metatags: metatagsContent } = await getContent("layout");
1576
+ const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
1577
+ let ogImage;
1578
+ if (apiDoc) {
1579
+ const picture = img(state, void 0, "zoom");
1580
+ ogImage = picture && picture.url;
1581
+ }
1582
+ if (!ogImage) {
1583
+ if (metatagsContent?.ogImage) {
1584
+ ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
1585
+ }
1586
+ } else {
1587
+ ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
1588
+ }
1589
+ let inlineClientJS = `
1590
+ window._emitApiContext = (id = null) => {
1591
+ console.log('[ctx] emit ' + id);
1592
+ window.dispatchEvent(new Event('storefront:apiContext'));
1593
+ window._emitedContextId = id;
1594
+ };
1595
+ window.ECOM_STORE_ID = ${storeId};
1596
+ window.ECOM_LANG = '${lang}';
1597
+ window.ECOM_CURRENCY = '${currency}';
1598
+ window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
1599
+ window.ECOM_COUNTRY_CODE = '${countryCode}';
1600
+ window.$storefront = ${JSON.stringify({ settings, data: {} })};`;
1601
+ if (apiContext.error) {
1602
+ const { message, statusCode } = apiContext.error;
1603
+ const url = Astro2.url.pathname;
1604
+ inlineClientJS += `
1605
+ console.error(${JSON.stringify(message)});
1606
+ setTimeout(() => {
1607
+ window.location.replace("/~fallback?status=${statusCode}&url=${encodeURIComponent(url)}");
1608
+ }, 1);`;
1609
+ }
1610
+ let contextInlineClientJS;
1611
+ if (apiDoc) {
1612
+ if (typeof apiDoc.price === "number") {
1613
+ apiDoc.price = price(apiDoc);
1614
+ }
1615
+ const slimDocRegex = globalThis.$storefrontSlimDocRegex || /body_|meta_|metafields|_records|i18n/;
1616
+ const minifyApiDoc = (nestedDoc) => {
1617
+ if (typeof nestedDoc === "object" && nestedDoc) {
1618
+ if (Array.isArray(nestedDoc)) {
1619
+ nestedDoc.forEach((item) => minifyApiDoc(item));
1620
+ } else {
1621
+ Object.keys(nestedDoc).forEach((field) => {
1622
+ if (slimDocRegex.test(field)) {
1623
+ delete nestedDoc[field];
1624
+ } else {
1625
+ minifyApiDoc(nestedDoc[field]);
1626
+ }
1627
+ });
1628
+ }
1629
+ }
1630
+ return nestedDoc;
1631
+ };
1632
+ inlineClientJS += `
1633
+ window._firstLoadContextId = '${apiDoc._id}';`;
1634
+ contextInlineClientJS = `
1635
+ $storefront.apiContext = ${JSON.stringify({
1636
+ resource: apiContext.resource,
1637
+ doc: minifyApiDoc({ ...apiDoc }),
1638
+ timestamp: Date.now()
1639
+ })};
1640
+ $storefront.context /* DEPRECATED */ = $storefront.apiContext;
1641
+ _emitApiContext('${apiDoc._id}');`;
1642
+ } else {
1643
+ inlineClientJS += `
1644
+ window._firstLoadContextId = null;`;
1645
+ contextInlineClientJS = `
1646
+ $storefront.apiContext = null;
1647
+ delete $storefront.apiContext;
1648
+ delete $storefront.context;
1649
+ _emitApiContext();`;
1650
+ }
1651
+ if (isPreview) {
1652
+ inlineClientJS += `
1653
+ window.$isCmsPreview = true;`;
1654
+ }
1655
+ const inlineJSONLd = JSON.stringify({
1656
+ "@context": "http://schema.org",
1657
+ "@type": "Organization",
1658
+ name: settings.name,
1659
+ url: `https://${domain}/`,
1660
+ logo: `https://${domain}${settings.logo}`
1661
+ });
1662
+ 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)));
1663
+ }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
1664
+
1665
+ function has(value) {
1666
+ return typeof value === "string";
1667
+ }
1668
+ function is(a, b) {
1669
+ return a === b;
1670
+ }
1671
+ function any(a, b) {
1672
+ return has(a) && b.includes(a.toLowerCase());
1673
+ }
1674
+ const ElementWeights = {
1675
+ META: 10,
1676
+ TITLE: 9,
1677
+ PRECONNECT: 8,
1678
+ ASYNC_SCRIPT: 7,
1679
+ IMPORT_STYLES: 6,
1680
+ SYNC_SCRIPT: 5,
1681
+ SYNC_STYLES: 4,
1682
+ PRELOAD: 3,
1683
+ DEFER_SCRIPT: 2,
1684
+ PREFETCH_PRERENDER: 1,
1685
+ OTHER: 0
1686
+ };
1687
+ const ElementDetectors = {
1688
+ META: isMeta,
1689
+ TITLE: isTitle,
1690
+ PRECONNECT: isPreconnect,
1691
+ DEFER_SCRIPT: isDeferScript,
1692
+ ASYNC_SCRIPT: isAsyncScript,
1693
+ IMPORT_STYLES: isImportStyles,
1694
+ SYNC_SCRIPT: isSyncScript,
1695
+ SYNC_STYLES: isSyncStyles,
1696
+ PRELOAD: isPreload,
1697
+ PREFETCH_PRERENDER: isPrefetchPrerender
1698
+ };
1699
+ const META_HTTP_EQUIV_KEYWORDS = [
1700
+ "accept-ch",
1701
+ "content-security-policy",
1702
+ "content-type",
1703
+ "default-style",
1704
+ "delegate-ch",
1705
+ "origin-trial",
1706
+ "x-dns-prefetch-control"
1707
+ ];
1708
+ function isMeta(name, a) {
1709
+ if (name === "base")
1710
+ return true;
1711
+ if (name !== "meta")
1712
+ return false;
1713
+ return has(a.charset) || is(a.name, "viewport") || any(a["http-equiv"], META_HTTP_EQUIV_KEYWORDS);
1714
+ }
1715
+ function isTitle(name) {
1716
+ return name === "title";
1717
+ }
1718
+ function isPreconnect(name, { rel }) {
1719
+ return name === "link" && is(rel, "preconnect");
1720
+ }
1721
+ function isAsyncScript(name, { src, async }) {
1722
+ return name === "script" && has(src) && has(async);
1723
+ }
1724
+ function isImportStyles(name, a, children) {
1725
+ const importRe = /@import/;
1726
+ if (name === "style") {
1727
+ return importRe.test(children);
1728
+ }
1729
+ return false;
1730
+ }
1731
+ function isSyncScript(name, { src, defer, async, type = "" }) {
1732
+ if (name !== "script")
1733
+ return false;
1734
+ return !(has(src) && (has(defer) || has(async) || is(type, "module")) || type.includes("json"));
1735
+ }
1736
+ function isSyncStyles(name, { rel }) {
1737
+ if (name === "style")
1738
+ return true;
1739
+ return name === "link" && is(rel, "stylesheet");
1740
+ }
1741
+ function isPreload(name, { rel }) {
1742
+ return name === "link" && any(rel, ["preload", "modulepreload"]);
1743
+ }
1744
+ function isDeferScript(name, { src, defer, async, type }) {
1745
+ if (name !== "script")
1746
+ return false;
1747
+ return has(src) && has(defer) || has(src) && is(type, "module") && !has(async);
1748
+ }
1749
+ function isPrefetchPrerender(name, { rel }) {
1750
+ return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
1751
+ }
1752
+ function getWeight(element) {
1753
+ for (const [id, detector] of Object.entries(ElementDetectors)) {
1754
+ const children = element.name === "style" && element.children.length > 0 ? renderSync(element) : "";
1755
+ if (detector(element.name, element.attributes, children)) {
1756
+ return ElementWeights[id];
1757
+ }
1758
+ }
1759
+ return ElementWeights.OTHER;
1760
+ }
1761
+
1762
+ function capo(html) {
1763
+ const ast = parse$1(html);
1764
+ try {
1765
+ walkSync(ast, (node, parent, index) => {
1766
+ if (node.type === ELEMENT_NODE && node.name === "head") {
1767
+ if (parent) {
1768
+ parent.children.splice(index, 1, getSortedHead(node));
1769
+ throw "done";
1770
+ }
1771
+ }
1772
+ });
1773
+ } catch (e) {
1774
+ if (e !== "done")
1775
+ throw e;
1786
1776
  }
1787
- return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}>
1788
- ${sources.map((attrs) => {
1789
- if (versionSuffix) {
1790
- attrs.srcset = attrs.srcset.replace(/\s(\w+)$/, `${versionSuffix} $1`);
1777
+ return renderSync(ast);
1778
+ }
1779
+ function getSortedHead(head) {
1780
+ const weightedChildren = head.children.map((node) => {
1781
+ if (node.type === ELEMENT_NODE) {
1782
+ const weight = getWeight(node);
1783
+ return [weight, node];
1791
1784
  }
1792
- return renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`;
1793
- })}
1794
- ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`}
1795
- </picture>`;
1796
- }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Picture.astro", void 0);
1785
+ }).filter(Boolean);
1786
+ const children = weightedChildren.sort((a, b) => b[0] - a[0]).map(([_, element]) => element);
1787
+ return { ...head, children };
1788
+ }
1789
+
1790
+ const Head = createComponent({
1791
+ factory: async (result, props, slots) => {
1792
+ let head = "";
1793
+ head += `<head${spreadAttributes(props)} data-capo>`;
1794
+ head += await renderSlotToString(result, slots.default);
1795
+ head += renderAllHeadContent(result);
1796
+ head += "</head>";
1797
+ return unescapeHTML(capo(head));
1798
+ }
1799
+ });
1797
1800
 
1798
1801
  const $$Astro$c = createAstro("https://demo.ecomplus.app");
1799
1802
  const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
@@ -1806,7 +1809,7 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
1806
1809
  ${renderSlot$1($$result, $$slots["default"])}
1807
1810
  ${renderSlot$1($$result, $$slots["before-body-end"])}
1808
1811
  <div id="teleported-bottom" class="relative z-[19]"></div>
1809
- ${settings.icon && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": settings.icon, "alt": "Icon", "formats": ["png"], "widths": [32, 192, 512], "sizes": "32px", "class": "hidden absolute", "style": "bottom: -1000px", "hasImg": false })}`}
1812
+ ${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 })}`}
1810
1813
  </body>`;
1811
1814
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro", void 0);
1812
1815
 
@@ -1836,7 +1839,7 @@ const $$Astro$a = createAstro("https://demo.ecomplus.app");
1836
1839
  const $$InlineScripts = createComponent(async ($$result, $$props, $$slots) => {
1837
1840
  const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
1838
1841
  Astro2.self = $$InlineScripts;
1839
- return renderTemplate(_a$2 || (_a$2 = __template$2(['<script>\n window.$firebaseConfig = {\n apiKey: "AIzaSyCnvm7QrPKzSBrUi09Z3zTgjDST0t4Yikg",\n authDomain: "ecom2-demo.firebaseapp.com",\n projectId: "ecom2-demo",\n storageBucket: "ecom2-demo.appspot.com",\n messagingSenderId: "70369627313",\n appId: "1:70369627313:web:06634033b9c6208fe7e690"\n };\n<\/script>'])));
1842
+ return renderTemplate(_a$2 || (_a$2 = __template$2(['<script>\nwindow.$firebaseConfig = {\n apiKey: "AIzaSyCnvm7QrPKzSBrUi09Z3zTgjDST0t4Yikg",\n authDomain: "ecom2-demo.firebaseapp.com",\n projectId: "ecom2-demo",\n storageBucket: "ecom2-demo.appspot.com",\n messagingSenderId: "70369627313",\n appId: "1:70369627313:web:06634033b9c6208fe7e690",\n};\n<\/script>'])));
1840
1843
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/scripts/InlineScripts.astro", void 0);
1841
1844
 
1842
1845
  const $$Astro$9 = createAstro("https://demo.ecomplus.app");
@@ -1852,6 +1855,176 @@ const $$Base = createComponent(async ($$result, $$props, $$slots) => {
1852
1855
  ` })}`;
1853
1856
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro", void 0);
1854
1857
 
1858
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
1859
+ __name: "PaymentMethodFlag",
1860
+ props: {
1861
+ as: { default: "i" },
1862
+ flag: {}
1863
+ },
1864
+ setup(__props, { expose: __expose }) {
1865
+ __expose();
1866
+ const props = __props;
1867
+ const iconClassName = computed(() => {
1868
+ switch (props.flag) {
1869
+ case "pix":
1870
+ return "i-pix text-[#77B6A8]";
1871
+ case "visa":
1872
+ return "i-visa";
1873
+ case "mastercard":
1874
+ return "i-mastercard";
1875
+ case "elo":
1876
+ return "i-elo";
1877
+ case "amex":
1878
+ return "i-amex";
1879
+ case "hipercard":
1880
+ return "i-hipercard";
1881
+ case "diners":
1882
+ return "i-dinersclub";
1883
+ case "discover":
1884
+ return "i-discover";
1885
+ default:
1886
+ return "";
1887
+ }
1888
+ });
1889
+ const __returned__ = { props, iconClassName };
1890
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1891
+ return __returned__;
1892
+ }
1893
+ });
1894
+ function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1895
+ if (!$setup.iconClassName) {
1896
+ _push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
1897
+ } else {
1898
+ ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
1899
+ }
1900
+ }
1901
+ const _sfc_setup$z = _sfc_main$z.setup;
1902
+ _sfc_main$z.setup = (props, ctx) => {
1903
+ const ssrContext = useSSRContext();
1904
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
1905
+ return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
1906
+ };
1907
+ const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
1908
+
1909
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1910
+ __name: "FooterStamps",
1911
+ props: {
1912
+ stamps: {}
1913
+ },
1914
+ setup(__props, { expose: __expose }) {
1915
+ __expose();
1916
+ const __returned__ = { PaymentMethodFlag };
1917
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
1918
+ return __returned__;
1919
+ }
1920
+ });
1921
+ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
1922
+ const _component_ALink = resolveComponent("ALink");
1923
+ _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"><!--[-->`);
1924
+ ssrRenderList($props.stamps, (stamp, i) => {
1925
+ _push(`<li>`);
1926
+ _push(ssrRenderComponent(_component_ALink, {
1927
+ href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
1928
+ }, {
1929
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
1930
+ if (_push2) {
1931
+ ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
1932
+ if (!stamp.img) {
1933
+ _push2(`<span class="flex items-center"${_scopeId}>`);
1934
+ if (stamp.icon) {
1935
+ _push2(`<span class="[&amp;&gt;*]:from-success-200 [&amp;&gt;*]:to-success-700 mr-2 text-4xl [&amp;&gt;*]:bg-gradient-to-br"${_scopeId}>`);
1936
+ if (stamp.icon === "lock") {
1937
+ _push2(`<i class="i-lock-closed"${_scopeId}></i>`);
1938
+ } else if (stamp.icon === "check") {
1939
+ _push2(`<i class="i-check-badge"${_scopeId}></i>`);
1940
+ } else {
1941
+ _push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
1942
+ }
1943
+ _push2(`</span>`);
1944
+ } else {
1945
+ _push2(`<!---->`);
1946
+ }
1947
+ _push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
1948
+ if (stamp.href && stamp.href.charAt(0) !== "/") {
1949
+ _push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
1950
+ } else {
1951
+ _push2(`<!---->`);
1952
+ }
1953
+ _push2(`</span></span>`);
1954
+ } else {
1955
+ _push2(`<!---->`);
1956
+ }
1957
+ } else {
1958
+ return [
1959
+ renderSlot(_ctx.$slots, `picture-${i}`),
1960
+ !stamp.img ? (openBlock(), createBlock("span", {
1961
+ key: 0,
1962
+ class: "flex items-center"
1963
+ }, [
1964
+ stamp.icon ? (openBlock(), createBlock("span", {
1965
+ key: 0,
1966
+ class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
1967
+ }, [
1968
+ stamp.icon === "lock" ? (openBlock(), createBlock("i", {
1969
+ key: 0,
1970
+ class: "i-lock-closed"
1971
+ })) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
1972
+ key: 1,
1973
+ class: "i-check-badge"
1974
+ })) : (openBlock(), createBlock("i", {
1975
+ key: 2,
1976
+ class: "i-arrow-path-rounded-square"
1977
+ }))
1978
+ ])) : createCommentVNode("", true),
1979
+ createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
1980
+ createTextVNode(toDisplayString(stamp.alt) + " ", 1),
1981
+ stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
1982
+ key: 0,
1983
+ class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
1984
+ })) : createCommentVNode("", true)
1985
+ ])
1986
+ ])) : createCommentVNode("", true)
1987
+ ];
1988
+ }
1989
+ }),
1990
+ _: 2
1991
+ }, _parent));
1992
+ _push(`</li>`);
1993
+ });
1994
+ _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"><!--[-->`);
1995
+ ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
1996
+ _push(ssrRenderComponent($setup["PaymentMethodFlag"], {
1997
+ key: paymentMethod,
1998
+ flag: paymentMethod
1999
+ }, null, _parent));
2000
+ });
2001
+ _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>`);
2002
+ _push(ssrRenderComponent(_component_ALink, {
2003
+ href: "https://www.ecomplus.io/",
2004
+ class: "italic text-[#37003c]"
2005
+ }, {
2006
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
2007
+ if (_push2) {
2008
+ _push2(` powered by <b${_scopeId}>e-com.plus</b>`);
2009
+ } else {
2010
+ return [
2011
+ createTextVNode(" powered by "),
2012
+ createVNode("b", null, "e-com.plus")
2013
+ ];
2014
+ }
2015
+ }),
2016
+ _: 1
2017
+ }, _parent));
2018
+ _push(`</div></div>`);
2019
+ }
2020
+ const _sfc_setup$y = _sfc_main$y.setup;
2021
+ _sfc_main$y.setup = (props, ctx) => {
2022
+ const ssrContext = useSSRContext();
2023
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
2024
+ return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
2025
+ };
2026
+ const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
2027
+
1855
2028
  const emitter = new EventEmitter();
1856
2029
  const useSharedData = async (props) => {
1857
2030
  const { field, timeout = 1e3 } = props;
@@ -1956,6 +2129,8 @@ const networkNames = [
1956
2129
  ];
1957
2130
  const socialNetworks = {};
1958
2131
  const setSocialNetworks = () => {
2132
+ if (!globalThis.$storefront)
2133
+ return;
1959
2134
  const { settings } = globalThis.$storefront;
1960
2135
  networkNames.forEach((network) => {
1961
2136
  if (settings[network]) {
@@ -1963,8 +2138,10 @@ const setSocialNetworks = () => {
1963
2138
  }
1964
2139
  });
1965
2140
  };
1966
- {
2141
+ if (global.$storefront) {
1967
2142
  global.$storefront.onLoad(() => setSocialNetworks());
2143
+ } else {
2144
+ setSocialNetworks();
1968
2145
  }
1969
2146
 
1970
2147
  const emptyInfo = {
@@ -2082,7 +2259,7 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
2082
2259
  };
2083
2260
  };
2084
2261
 
2085
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
2262
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2086
2263
  __name: "PitchBar",
2087
2264
  props: {
2088
2265
  slides: {}
@@ -2099,7 +2276,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2099
2276
  return __returned__;
2100
2277
  }
2101
2278
  });
2102
- function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2279
+ function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2103
2280
  const _component_Carousel = resolveComponent("Carousel");
2104
2281
  const _component_ALink = resolveComponent("ALink");
2105
2282
  const _component_CarouselControl = resolveComponent("CarouselControl");
@@ -2143,7 +2320,7 @@ function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2143
2320
  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
2144
2321
  if (_push3) {
2145
2322
  if ($setup.parsedContents[i]) {
2146
- _push3(`<span class="prose text-base-800 text-sm"${_scopeId2}>${$setup.parsedContents[i]}</span>`);
2323
+ _push3(`<span class="text-base-800 prose text-sm"${_scopeId2}>${$setup.parsedContents[i]}</span>`);
2147
2324
  } else {
2148
2325
  _push3(`<!---->`);
2149
2326
  }
@@ -2152,7 +2329,7 @@ function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2152
2329
  $setup.parsedContents[i] ? (openBlock(), createBlock("span", {
2153
2330
  key: 0,
2154
2331
  innerHTML: $setup.parsedContents[i],
2155
- class: "prose text-base-800 text-sm"
2332
+ class: "text-base-800 prose text-sm"
2156
2333
  }, null, 8, ["innerHTML"])) : createCommentVNode("", true)
2157
2334
  ];
2158
2335
  }
@@ -2178,7 +2355,7 @@ function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2178
2355
  $setup.parsedContents[i] ? (openBlock(), createBlock("span", {
2179
2356
  key: 0,
2180
2357
  innerHTML: $setup.parsedContents[i],
2181
- class: "prose text-base-800 text-sm"
2358
+ class: "text-base-800 prose text-sm"
2182
2359
  }, null, 8, ["innerHTML"])) : createCommentVNode("", true)
2183
2360
  ]),
2184
2361
  _: 2
@@ -2192,13 +2369,13 @@ function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2192
2369
  }, _parent));
2193
2370
  _push(`</div></div>`);
2194
2371
  }
2195
- const _sfc_setup$z = _sfc_main$z.setup;
2196
- _sfc_main$z.setup = (props, ctx) => {
2372
+ const _sfc_setup$x = _sfc_main$x.setup;
2373
+ _sfc_main$x.setup = (props, ctx) => {
2197
2374
  const ssrContext = useSSRContext();
2198
2375
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
2199
- return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
2376
+ return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0;
2200
2377
  };
2201
- const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
2378
+ const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["ssrRender", _sfc_ssrRender$x]]);
2202
2379
 
2203
2380
  const useStorage = (key, initialValue, storage = globalThis.localStorage) => {
2204
2381
  if (!storage) {
@@ -2582,7 +2759,7 @@ const useShopHeader = (props) => {
2582
2759
  };
2583
2760
  };
2584
2761
 
2585
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
2762
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2586
2763
  __name: "Drawer",
2587
2764
  props: {
2588
2765
  modelValue: { type: Boolean, default: false },
@@ -2685,7 +2862,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
2685
2862
  return __returned__;
2686
2863
  }
2687
2864
  });
2688
- function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2865
+ function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2689
2866
  const _component_Fade = resolveComponent("Fade");
2690
2867
  _push(ssrRenderComponent(_component_Fade, mergeProps({
2691
2868
  slide: $setup.slideTo,
@@ -2713,7 +2890,7 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2713
2890
  if ($props.hasCloseButton) {
2714
2891
  _push2(`<button type="button"${ssrRenderAttr("aria-label", "Fechar")} class="${ssrRenderClass([$props.placement === "end" ? "left-2" : "right-2", "absolute top-2 z-30 rounded"])}" data-drawer-close${_scopeId}>`);
2715
2892
  ssrRenderSlot(_ctx.$slots, "close", {}, () => {
2716
- _push2(`<i class="i-close text-base-400 hover:text-base-600 m-0 text-3xl"${_scopeId}></i>`);
2893
+ _push2(`<i class="m-0 text-3xl text-base-400 i-close hover:text-base-600"${_scopeId}></i>`);
2717
2894
  }, _push2, _parent2, _scopeId);
2718
2895
  _push2(`</button>`);
2719
2896
  } else {
@@ -2727,7 +2904,7 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2727
2904
  default: withCtx((_2, _push4, _parent3, _scopeId2) => {
2728
2905
  if (_push4) {
2729
2906
  if ($props.modelValue && !$props.isHidden) {
2730
- _push4(`<div class="fixed left-0 top-0 z-30 h-screen w-screen bg-black/50" data-drawer-backdrop${_scopeId2}></div>`);
2907
+ _push4(`<div class="size-screen fixed left-0 top-0 z-30 bg-black/50" data-drawer-backdrop${_scopeId2}></div>`);
2731
2908
  } else {
2732
2909
  _push4(`<!---->`);
2733
2910
  }
@@ -2735,7 +2912,7 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2735
2912
  return [
2736
2913
  $props.modelValue && !$props.isHidden ? (openBlock(), createBlock("div", {
2737
2914
  key: 0,
2738
- class: "fixed left-0 top-0 z-30 h-screen w-screen bg-black/50",
2915
+ class: "size-screen fixed left-0 top-0 z-30 bg-black/50",
2739
2916
  "data-drawer-backdrop": ""
2740
2917
  })) : createCommentVNode("", true)
2741
2918
  ];
@@ -2782,7 +2959,7 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2782
2959
  "data-drawer-close": ""
2783
2960
  }, [
2784
2961
  renderSlot(_ctx.$slots, "close", {}, () => [
2785
- createVNode("i", { class: "i-close text-base-400 hover:text-base-600 m-0 text-3xl" })
2962
+ createVNode("i", { class: "m-0 text-3xl text-base-400 i-close hover:text-base-600" })
2786
2963
  ])
2787
2964
  ], 2)) : createCommentVNode("", true),
2788
2965
  renderSlot(_ctx.$slots, "default")
@@ -2795,7 +2972,7 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2795
2972
  default: withCtx(() => [
2796
2973
  $props.modelValue && !$props.isHidden ? (openBlock(), createBlock("div", {
2797
2974
  key: 0,
2798
- class: "fixed left-0 top-0 z-30 h-screen w-screen bg-black/50",
2975
+ class: "size-screen fixed left-0 top-0 z-30 bg-black/50",
2799
2976
  "data-drawer-backdrop": ""
2800
2977
  })) : createCommentVNode("", true)
2801
2978
  ]),
@@ -2811,13 +2988,13 @@ function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
2811
2988
  _: 3
2812
2989
  }, _parent));
2813
2990
  }
2814
- const _sfc_setup$y = _sfc_main$y.setup;
2815
- _sfc_main$y.setup = (props, ctx) => {
2991
+ const _sfc_setup$w = _sfc_main$w.setup;
2992
+ _sfc_main$w.setup = (props, ctx) => {
2816
2993
  const ssrContext = useSSRContext();
2817
2994
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
2818
- return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
2995
+ return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0;
2819
2996
  };
2820
- const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
2997
+ const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["ssrRender", _sfc_ssrRender$w]]);
2821
2998
 
2822
2999
  const storageKey$1 = "ecomSession";
2823
3000
  const emptySession = {
@@ -2856,7 +3033,7 @@ const initializeFirebaseAuth = (canWaitIdle) => {
2856
3033
  return;
2857
3034
  };
2858
3035
 
2859
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
3036
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2860
3037
  __name: "AccountLink",
2861
3038
  props: {
2862
3039
  to: {},
@@ -2898,20 +3075,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2898
3075
  return __returned__;
2899
3076
  }
2900
3077
  });
2901
- function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3078
+ function _sfc_ssrRender$v(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2902
3079
  _push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
2903
3080
  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
2904
3081
  _push(`</a>`);
2905
3082
  }
2906
- const _sfc_setup$x = _sfc_main$x.setup;
2907
- _sfc_main$x.setup = (props, ctx) => {
3083
+ const _sfc_setup$v = _sfc_main$v.setup;
3084
+ _sfc_main$v.setup = (props, ctx) => {
2908
3085
  const ssrContext = useSSRContext();
2909
3086
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/AccountLink.vue");
2910
- return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0;
3087
+ return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0;
2911
3088
  };
2912
- const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["ssrRender", _sfc_ssrRender$x]]);
3089
+ const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["ssrRender", _sfc_ssrRender$v]]);
2913
3090
 
2914
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
3091
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2915
3092
  __name: "SocialNetworkIcon",
2916
3093
  props: {
2917
3094
  as: { default: "i" },
@@ -2947,18 +3124,18 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2947
3124
  return __returned__;
2948
3125
  }
2949
3126
  });
2950
- function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3127
+ function _sfc_ssrRender$u(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2951
3128
  ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
2952
3129
  }
2953
- const _sfc_setup$w = _sfc_main$w.setup;
2954
- _sfc_main$w.setup = (props, ctx) => {
3130
+ const _sfc_setup$u = _sfc_main$u.setup;
3131
+ _sfc_main$u.setup = (props, ctx) => {
2955
3132
  const ssrContext = useSSRContext();
2956
3133
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkIcon.vue");
2957
- return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0;
3134
+ return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0;
2958
3135
  };
2959
- const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["ssrRender", _sfc_ssrRender$w]]);
3136
+ const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["ssrRender", _sfc_ssrRender$u]]);
2960
3137
 
2961
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
3138
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2962
3139
  __name: "SocialNetworkLink",
2963
3140
  props: {
2964
3141
  network: {},
@@ -2984,7 +3161,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2984
3161
  return __returned__;
2985
3162
  }
2986
3163
  });
2987
- function _sfc_ssrRender$v(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3164
+ function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
2988
3165
  const _component_ALink = resolveComponent("ALink");
2989
3166
  _push(ssrRenderComponent(_component_ALink, mergeProps({ href: $setup.fixedHref }, _attrs), {
2990
3167
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -3005,15 +3182,15 @@ function _sfc_ssrRender$v(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3005
3182
  _: 3
3006
3183
  }, _parent));
3007
3184
  }
3008
- const _sfc_setup$v = _sfc_main$v.setup;
3009
- _sfc_main$v.setup = (props, ctx) => {
3185
+ const _sfc_setup$t = _sfc_main$t.setup;
3186
+ _sfc_main$t.setup = (props, ctx) => {
3010
3187
  const ssrContext = useSSRContext();
3011
3188
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkLink.vue");
3012
- return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0;
3189
+ return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0;
3013
3190
  };
3014
- const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["ssrRender", _sfc_ssrRender$v]]);
3191
+ const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["ssrRender", _sfc_ssrRender$t]]);
3015
3192
 
3016
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
3193
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
3017
3194
  __name: "ShopSidenavCategory",
3018
3195
  props: {
3019
3196
  categoryTree: {}
@@ -3036,12 +3213,12 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
3036
3213
  return __returned__;
3037
3214
  }
3038
3215
  });
3039
- function _sfc_ssrRender$u(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3216
+ function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3040
3217
  const _component_AImg = resolveComponent("AImg");
3041
3218
  const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
3042
3219
  _push(`<li${ssrRenderAttrs(mergeProps({ class: "text-base-800 text-lg" }, _attrs))}>`);
3043
3220
  if ($props.categoryTree.subcategories.length) {
3044
- _push(`<details class="z-10 overflow-y-auto overflow-x-hidden bg-white open:absolute open:left-0 open:top-0 open:h-full open:w-full"><summary class="${ssrRenderClass([$setup.isOpen ? "bg-base-100" : null, "active:bg-base-100 cursor-pointer list-none px-6 py-3 transition-colors"])}"><i class="${ssrRenderClass(!$setup.isOpen ? "i-arrow-right float-right mb-0 mt-1 text-xl text-base-500" : "i-arrow-right rotate-180 text-lg")}"></i>`);
3221
+ _push(`<details class="z-10 overflow-y-auto overflow-x-hidden bg-white open:absolute open:left-0 open:top-0 open:size-full"><summary class="${ssrRenderClass([$setup.isOpen ? "bg-base-100" : null, "active:bg-base-100 cursor-pointer list-none px-6 py-3 transition-colors"])}"><i class="${ssrRenderClass(!$setup.isOpen ? "i-arrow-right float-right mb-0 mt-1 text-xl text-base-500" : "i-arrow-right rotate-180 text-lg")}"></i>`);
3045
3222
  if (!$setup.isOpen && $props.categoryTree.icon) {
3046
3223
  _push(ssrRenderComponent(_component_AImg, {
3047
3224
  picture: $props.categoryTree.icon,
@@ -3074,15 +3251,15 @@ function _sfc_ssrRender$u(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3074
3251
  }
3075
3252
  _push(`</li>`);
3076
3253
  }
3077
- const _sfc_setup$u = _sfc_main$u.setup;
3078
- _sfc_main$u.setup = (props, ctx) => {
3254
+ const _sfc_setup$s = _sfc_main$s.setup;
3255
+ _sfc_main$s.setup = (props, ctx) => {
3079
3256
  const ssrContext = useSSRContext();
3080
3257
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenavCategory.vue");
3081
- return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0;
3258
+ return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0;
3082
3259
  };
3083
- const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["ssrRender", _sfc_ssrRender$u]]);
3260
+ const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["ssrRender", _sfc_ssrRender$s]]);
3084
3261
 
3085
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
3262
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
3086
3263
  __name: "ShopSidenav",
3087
3264
  props: {
3088
3265
  categoryTrees: {}
@@ -3103,7 +3280,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
3103
3280
  return __returned__;
3104
3281
  }
3105
3282
  });
3106
- function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3283
+ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3107
3284
  _push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex h-full flex-col bg-white" }, _attrs))}><nav class="grow py-4"><ul class="relative h-full"><!--[-->`);
3108
3285
  ssrRenderList($props.categoryTrees, (categoryTree, i) => {
3109
3286
  _push(ssrRenderComponent($setup["ShopSidenavCategory"], {
@@ -3115,10 +3292,10 @@ function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3115
3292
  _push(ssrRenderComponent($setup["AccountLink"], { class: "flex grow items-center gap-3 p-2" }, {
3116
3293
  default: withCtx((_, _push2, _parent2, _scopeId) => {
3117
3294
  if (_push2) {
3118
- _push2(`<i class="i-user-circle text-base-500 m-0 text-4xl"${_scopeId}></i><span class="leading-tight"${_scopeId}>${ssrInterpolate(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`)} <small class="text-primary block font-semibold lowercase"${_scopeId}>${ssrInterpolate("Meus pedidos")}, ${ssrInterpolate("Minha conta")}</small></span>`);
3295
+ _push2(`<i class="text-base-500 i-user-circle m-0 text-4xl"${_scopeId}></i><span class="leading-tight"${_scopeId}>${ssrInterpolate(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`)} <small class="text-primary block font-semibold lowercase"${_scopeId}>${ssrInterpolate("Meus pedidos")}, ${ssrInterpolate("Minha conta")}</small></span>`);
3119
3296
  } else {
3120
3297
  return [
3121
- createVNode("i", { class: "i-user-circle text-base-500 m-0 text-4xl" }),
3298
+ createVNode("i", { class: "text-base-500 i-user-circle m-0 text-4xl" }),
3122
3299
  createVNode("span", { class: "leading-tight" }, [
3123
3300
  createTextVNode(toDisplayString(`${"Ol\xE1"} ${$setup.customerName || "Visitante"}`) + " ", 1),
3124
3301
  createVNode("small", { class: "text-primary block font-semibold lowercase" }, toDisplayString("Meus pedidos") + ", " + toDisplayString("Minha conta"))
@@ -3144,13 +3321,13 @@ function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3144
3321
  });
3145
3322
  _push(`<!--]--></ul></footer></aside>`);
3146
3323
  }
3147
- const _sfc_setup$t = _sfc_main$t.setup;
3148
- _sfc_main$t.setup = (props, ctx) => {
3324
+ const _sfc_setup$r = _sfc_main$r.setup;
3325
+ _sfc_main$r.setup = (props, ctx) => {
3149
3326
  const ssrContext = useSSRContext();
3150
3327
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenav.vue");
3151
- return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0;
3328
+ return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0;
3152
3329
  };
3153
- const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["ssrRender", _sfc_ssrRender$t]]);
3330
+ const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["ssrRender", _sfc_ssrRender$r]]);
3154
3331
 
3155
3332
  const useShopHeaderSubmenu = (props) => {
3156
3333
  const categoryPicture = computed(() => {
@@ -3199,7 +3376,7 @@ const useShopHeaderSubmenu = (props) => {
3199
3376
  };
3200
3377
  };
3201
3378
 
3202
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
3379
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
3203
3380
  __name: "ShopHeaderSubmenu",
3204
3381
  props: {
3205
3382
  categoryTree: {},
@@ -3228,7 +3405,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
3228
3405
  return __returned__;
3229
3406
  }
3230
3407
  });
3231
- function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3408
+ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3232
3409
  const _component_Fade = resolveComponent("Fade");
3233
3410
  const _component_AImg = resolveComponent("AImg");
3234
3411
  _push(ssrRenderComponent($setup["Popover"], _attrs, {
@@ -3542,15 +3719,15 @@ function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3542
3719
  _: 3
3543
3720
  }, _parent));
3544
3721
  }
3545
- const _sfc_setup$s = _sfc_main$s.setup;
3546
- _sfc_main$s.setup = (props, ctx) => {
3722
+ const _sfc_setup$q = _sfc_main$q.setup;
3723
+ _sfc_main$q.setup = (props, ctx) => {
3547
3724
  const ssrContext = useSSRContext();
3548
3725
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderSubmenu.vue");
3549
- return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0;
3726
+ return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0;
3550
3727
  };
3551
- const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["ssrRender", _sfc_ssrRender$s]]);
3728
+ const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["ssrRender", _sfc_ssrRender$q]]);
3552
3729
 
3553
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
3730
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3554
3731
  __name: "ShopHeaderMenu",
3555
3732
  props: {
3556
3733
  inlineMenuTrees: {}
@@ -3566,7 +3743,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
3566
3743
  return __returned__;
3567
3744
  }
3568
3745
  });
3569
- function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3746
+ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3570
3747
  _push(`<nav${ssrRenderAttrs(_attrs)}><ul class="${ssrRenderClass([$props.inlineMenuTrees.length < 7 ? "text-base" : "text-sm", "text-base-700 flex gap-4 xl:gap-5"])}"><!--[-->`);
3571
3748
  ssrRenderList($props.inlineMenuTrees, (categoryTree, i) => {
3572
3749
  _push(`<li>`);
@@ -3579,7 +3756,7 @@ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3579
3756
  open ? "underline" : null
3580
3757
  ], "inline group-hover:underline"])}"${_scopeId}>${ssrInterpolate(categoryTree.name)}</h3>`);
3581
3758
  if ($setup.hasOneLevelSubcategories) {
3582
- _push2(`<i class="${ssrRenderClass([open ? "-rotate-90" : "rotate-90", "i-chevron-right text-base-400 group-hover:text-primary-subtle ml-1 transition-transform"])}"${_scopeId}></i>`);
3759
+ _push2(`<i class="${ssrRenderClass([open ? "-rotate-90" : "rotate-90", "text-base-400 i-chevron-right group-hover:text-primary-subtle ml-1 transition-transform"])}"${_scopeId}></i>`);
3583
3760
  } else {
3584
3761
  _push2(`<!---->`);
3585
3762
  }
@@ -3595,7 +3772,7 @@ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3595
3772
  }, toDisplayString(categoryTree.name), 3),
3596
3773
  $setup.hasOneLevelSubcategories ? (openBlock(), createBlock("i", {
3597
3774
  key: 0,
3598
- class: ["i-chevron-right text-base-400 group-hover:text-primary-subtle ml-1 transition-transform", open ? "-rotate-90" : "rotate-90"]
3775
+ class: ["text-base-400 i-chevron-right group-hover:text-primary-subtle ml-1 transition-transform", open ? "-rotate-90" : "rotate-90"]
3599
3776
  }, null, 2)) : createCommentVNode("", true)
3600
3777
  ])
3601
3778
  ];
@@ -3610,15 +3787,15 @@ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3610
3787
  });
3611
3788
  _push(`<!--]--></ul></nav>`);
3612
3789
  }
3613
- const _sfc_setup$r = _sfc_main$r.setup;
3614
- _sfc_main$r.setup = (props, ctx) => {
3790
+ const _sfc_setup$p = _sfc_main$p.setup;
3791
+ _sfc_main$p.setup = (props, ctx) => {
3615
3792
  const ssrContext = useSSRContext();
3616
3793
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderMenu.vue");
3617
- return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0;
3794
+ return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0;
3618
3795
  };
3619
- const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["ssrRender", _sfc_ssrRender$r]]);
3796
+ const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["ssrRender", _sfc_ssrRender$p]]);
3620
3797
 
3621
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
3798
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
3622
3799
  __name: "AccountMenu",
3623
3800
  setup(__props, { expose: __expose }) {
3624
3801
  __expose();
@@ -3645,7 +3822,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
3645
3822
  return __returned__;
3646
3823
  }
3647
3824
  });
3648
- function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3825
+ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3649
3826
  const _component_Fade = resolveComponent("Fade");
3650
3827
  const _component_ALink = resolveComponent("ALink");
3651
3828
  _push(ssrRenderComponent($setup["Menu"], mergeProps({
@@ -4269,15 +4446,15 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4269
4446
  _: 3
4270
4447
  }, _parent));
4271
4448
  }
4272
- const _sfc_setup$q = _sfc_main$q.setup;
4273
- _sfc_main$q.setup = (props, ctx) => {
4449
+ const _sfc_setup$o = _sfc_main$o.setup;
4450
+ _sfc_main$o.setup = (props, ctx) => {
4274
4451
  const ssrContext = useSSRContext();
4275
4452
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/AccountMenu.vue");
4276
- return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0;
4453
+ return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
4277
4454
  };
4278
- const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["ssrRender", _sfc_ssrRender$q]]);
4455
+ const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["ssrRender", _sfc_ssrRender$o]]);
4279
4456
 
4280
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
4457
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
4281
4458
  __name: "ShopHeader",
4282
4459
  props: {
4283
4460
  searchInput: {},
@@ -4288,8 +4465,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
4288
4465
  },
4289
4466
  setup(__props, { expose: __expose }) {
4290
4467
  __expose();
4291
- const SearchModal = defineAsyncComponent(() => import('../SearchModal_7debttOi.mjs'));
4292
- const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_8VAKl-jR.mjs'));
4468
+ const SearchModal = defineAsyncComponent(() => import('../SearchModal_MNdcYMws.mjs'));
4469
+ const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_7UWmGIF6.mjs'));
4293
4470
  const props = __props;
4294
4471
  const header = ref(null);
4295
4472
  const searchInput = ref(null);
@@ -4321,7 +4498,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
4321
4498
  return __returned__;
4322
4499
  }
4323
4500
  });
4324
- function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
4501
+ function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
4325
4502
  const _component_Fade = resolveComponent("Fade");
4326
4503
  const _component_Skeleton = resolveComponent("Skeleton");
4327
4504
  _push(`<header${ssrRenderAttrs(mergeProps({
@@ -4344,7 +4521,7 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4344
4521
  _push(ssrRenderComponent(_component_Fade, null, {
4345
4522
  default: withCtx((_, _push2, _parent2, _scopeId) => {
4346
4523
  if (_push2) {
4347
- _push2(`<div style="${ssrRenderStyle($setup.isSearchOpen ? null : { display: "none" })}" class="absolute -right-0.5 -top-2.5 flex items-stretch"${_scopeId}><div class="hidden w-12 bg-gradient-to-r from-transparent to-white sm:block"${_scopeId}></div><input type="search" id="HeaderSearch" name="q"${ssrRenderAttr("value", $setup.searchTerm)} class="to-primary-50 border-primary/20 border-1 w-72 max-w-md bg-gradient-to-r from-white py-3 pl-5 pr-12 text-base ring-0 md:w-screen"${ssrRenderAttr("placeholder", `${"Buscar produtos"} ...`)}${_scopeId}></div>`);
4524
+ _push2(`<div style="${ssrRenderStyle($setup.isSearchOpen ? null : { display: "none" })}" class="absolute -right-0.5 -top-2.5 flex items-stretch"${_scopeId}><div class="hidden w-12 bg-gradient-to-r from-transparent to-white sm:block"${_scopeId}></div><input type="search" id="HeaderSearch" name="q"${ssrRenderAttr("value", $setup.searchTerm)} class="border-1 border-primary/20 to-primary-50 w-72 max-w-md bg-gradient-to-r from-white py-3 pl-5 pr-12 text-base ring-0 md:w-screen"${ssrRenderAttr("placeholder", `${"Buscar produtos"} ...`)}${_scopeId}></div>`);
4348
4525
  } else {
4349
4526
  return [
4350
4527
  withDirectives(createVNode("div", { class: "absolute -right-0.5 -top-2.5 flex items-stretch" }, [
@@ -4355,7 +4532,7 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4355
4532
  id: "HeaderSearch",
4356
4533
  name: "q",
4357
4534
  "onUpdate:modelValue": ($event) => $setup.searchTerm = $event,
4358
- class: "to-primary-50 border-primary/20 border-1 w-72 max-w-md bg-gradient-to-r from-white py-3 pl-5 pr-12 text-base ring-0 md:w-screen",
4535
+ class: "border-1 border-primary/20 to-primary-50 w-72 max-w-md bg-gradient-to-r from-white py-3 pl-5 pr-12 text-base ring-0 md:w-screen",
4359
4536
  placeholder: `${"Buscar produtos"} ...`
4360
4537
  }, null, 8, ["onUpdate:modelValue", "placeholder"]), [
4361
4538
  [
@@ -4373,16 +4550,16 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4373
4550
  }),
4374
4551
  _: 1
4375
4552
  }, _parent));
4376
- _push(`<button type="submit"${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="${ssrRenderClass([$setup.isSearchOpen && "text-primary-600 -translate-x-2", "i-magnifying-glass hover:text-primary h-7 w-7 hover:scale-110 active:scale-125"])}"></i></button></form>`);
4553
+ _push(`<button type="submit"${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="${ssrRenderClass([$setup.isSearchOpen && "text-primary-600 -translate-x-2", "i-magnifying-glass hover:text-primary size-7 hover:scale-110 active:scale-125"])}"></i></button></form>`);
4377
4554
  if (!$setup.isMobile) {
4378
4555
  _push(ssrRenderComponent($setup["AccountMenu"], { class: "hidden sm:block" }, {
4379
4556
  button: withCtx(({ open }, _push2, _parent2, _scopeId) => {
4380
4557
  if (_push2) {
4381
- _push2(`<i class="${ssrRenderClass([open ? "text-black scale-110" : null, "i-user-circle hover:text-primary h-7 w-7 hover:scale-110 active:scale-125"])}"${_scopeId}></i>`);
4558
+ _push2(`<i class="${ssrRenderClass([open ? "text-black scale-110" : null, "i-user-circle hover:text-primary size-7 hover:scale-110 active:scale-125"])}"${_scopeId}></i>`);
4382
4559
  } else {
4383
4560
  return [
4384
4561
  createVNode("i", {
4385
- class: ["i-user-circle hover:text-primary h-7 w-7 hover:scale-110 active:scale-125", open ? "text-black scale-110" : null]
4562
+ class: ["i-user-circle hover:text-primary size-7 hover:scale-110 active:scale-125", open ? "text-black scale-110" : null]
4386
4563
  }, null, 2)
4387
4564
  ];
4388
4565
  }
@@ -4392,7 +4569,7 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4392
4569
  } else {
4393
4570
  _push(`<!---->`);
4394
4571
  }
4395
- _push(`<a${ssrRenderAttr("href", _ctx.$settings.cartUrl || "/app/")}${ssrRenderAttr("aria-label", "Abrir carrinho")} class="group relative" role="button"><i class="i-shopping-bag group-hover:text-primary h-7 w-7 group-hover:scale-110 group-active:scale-125"></i>`);
4572
+ _push(`<a${ssrRenderAttr("href", _ctx.$settings.cartUrl || "/app/")}${ssrRenderAttr("aria-label", "Abrir carrinho")} class="group relative" role="button"><i class="i-shopping-bag group-hover:text-primary size-7 group-hover:scale-110 group-active:scale-125"></i>`);
4396
4573
  if ($setup.cartTotalItems) {
4397
4574
  _push(`<span class="ui-badge-pill-sm absolute -right-1.5 -top-1">${ssrInterpolate($setup.cartTotalItems)}</span>`);
4398
4575
  } else {
@@ -4540,13 +4717,13 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4540
4717
  }
4541
4718
  _push(`</header>`);
4542
4719
  }
4543
- const _sfc_setup$p = _sfc_main$p.setup;
4544
- _sfc_main$p.setup = (props, ctx) => {
4720
+ const _sfc_setup$n = _sfc_main$n.setup;
4721
+ _sfc_main$n.setup = (props, ctx) => {
4545
4722
  const ssrContext = useSSRContext();
4546
4723
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeader.vue");
4547
- return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0;
4724
+ return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
4548
4725
  };
4549
- const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["ssrRender", _sfc_ssrRender$p]]);
4726
+ const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["ssrRender", _sfc_ssrRender$n]]);
4550
4727
 
4551
4728
  var __freeze$1 = Object.freeze;
4552
4729
  var __defProp$1 = Object.defineProperty;
@@ -4567,182 +4744,12 @@ const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
4567
4744
  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`
4568
4745
  ${maybeRenderHead()}<a href="/">
4569
4746
  ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate`
4570
- ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "hover:drop-shadow-sm max-w-[150px] mx-auto" })}
4747
+ ${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" })}
4571
4748
  ` })}
4572
4749
  </a>
4573
4750
  ` })}` })))}`;
4574
4751
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
4575
4752
 
4576
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
4577
- __name: "PaymentMethodFlag",
4578
- props: {
4579
- as: { default: "i" },
4580
- flag: {}
4581
- },
4582
- setup(__props, { expose: __expose }) {
4583
- __expose();
4584
- const props = __props;
4585
- const iconClassName = computed(() => {
4586
- switch (props.flag) {
4587
- case "pix":
4588
- return "i-pix text-[#77B6A8]";
4589
- case "visa":
4590
- return "i-visa";
4591
- case "mastercard":
4592
- return "i-mastercard";
4593
- case "elo":
4594
- return "i-elo";
4595
- case "amex":
4596
- return "i-amex";
4597
- case "hipercard":
4598
- return "i-hipercard";
4599
- case "diners":
4600
- return "i-dinersclub";
4601
- case "discover":
4602
- return "i-discover";
4603
- default:
4604
- return "";
4605
- }
4606
- });
4607
- const __returned__ = { props, iconClassName };
4608
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
4609
- return __returned__;
4610
- }
4611
- });
4612
- function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
4613
- if (!$setup.iconClassName) {
4614
- _push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
4615
- } else {
4616
- ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
4617
- }
4618
- }
4619
- const _sfc_setup$o = _sfc_main$o.setup;
4620
- _sfc_main$o.setup = (props, ctx) => {
4621
- const ssrContext = useSSRContext();
4622
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
4623
- return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
4624
- };
4625
- const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["ssrRender", _sfc_ssrRender$o]]);
4626
-
4627
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
4628
- __name: "FooterStamps",
4629
- props: {
4630
- stamps: {}
4631
- },
4632
- setup(__props, { expose: __expose }) {
4633
- __expose();
4634
- const __returned__ = { PaymentMethodFlag };
4635
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
4636
- return __returned__;
4637
- }
4638
- });
4639
- function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
4640
- const _component_ALink = resolveComponent("ALink");
4641
- _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"><!--[-->`);
4642
- ssrRenderList($props.stamps, (stamp, i) => {
4643
- _push(`<li>`);
4644
- _push(ssrRenderComponent(_component_ALink, {
4645
- href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
4646
- }, {
4647
- default: withCtx((_, _push2, _parent2, _scopeId) => {
4648
- if (_push2) {
4649
- ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
4650
- if (!stamp.img) {
4651
- _push2(`<span class="flex items-center"${_scopeId}>`);
4652
- if (stamp.icon) {
4653
- _push2(`<span class="[&amp;&gt;*]:from-success-200 [&amp;&gt;*]:to-success-700 mr-2 text-4xl [&amp;&gt;*]:bg-gradient-to-br"${_scopeId}>`);
4654
- if (stamp.icon === "lock") {
4655
- _push2(`<i class="i-lock-closed"${_scopeId}></i>`);
4656
- } else if (stamp.icon === "check") {
4657
- _push2(`<i class="i-check-badge"${_scopeId}></i>`);
4658
- } else {
4659
- _push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
4660
- }
4661
- _push2(`</span>`);
4662
- } else {
4663
- _push2(`<!---->`);
4664
- }
4665
- _push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
4666
- if (stamp.href && stamp.href.charAt(0) !== "/") {
4667
- _push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
4668
- } else {
4669
- _push2(`<!---->`);
4670
- }
4671
- _push2(`</span></span>`);
4672
- } else {
4673
- _push2(`<!---->`);
4674
- }
4675
- } else {
4676
- return [
4677
- renderSlot(_ctx.$slots, `picture-${i}`),
4678
- !stamp.img ? (openBlock(), createBlock("span", {
4679
- key: 0,
4680
- class: "flex items-center"
4681
- }, [
4682
- stamp.icon ? (openBlock(), createBlock("span", {
4683
- key: 0,
4684
- class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
4685
- }, [
4686
- stamp.icon === "lock" ? (openBlock(), createBlock("i", {
4687
- key: 0,
4688
- class: "i-lock-closed"
4689
- })) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
4690
- key: 1,
4691
- class: "i-check-badge"
4692
- })) : (openBlock(), createBlock("i", {
4693
- key: 2,
4694
- class: "i-arrow-path-rounded-square"
4695
- }))
4696
- ])) : createCommentVNode("", true),
4697
- createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
4698
- createTextVNode(toDisplayString(stamp.alt) + " ", 1),
4699
- stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
4700
- key: 0,
4701
- class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
4702
- })) : createCommentVNode("", true)
4703
- ])
4704
- ])) : createCommentVNode("", true)
4705
- ];
4706
- }
4707
- }),
4708
- _: 2
4709
- }, _parent));
4710
- _push(`</li>`);
4711
- });
4712
- _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"><!--[-->`);
4713
- ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
4714
- _push(ssrRenderComponent($setup["PaymentMethodFlag"], {
4715
- key: paymentMethod,
4716
- flag: paymentMethod
4717
- }, null, _parent));
4718
- });
4719
- _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>`);
4720
- _push(ssrRenderComponent(_component_ALink, {
4721
- href: "https://www.ecomplus.io/",
4722
- class: "italic text-[#37003c]"
4723
- }, {
4724
- default: withCtx((_, _push2, _parent2, _scopeId) => {
4725
- if (_push2) {
4726
- _push2(` powered by <b${_scopeId}>e-com.plus</b>`);
4727
- } else {
4728
- return [
4729
- createTextVNode(" powered by "),
4730
- createVNode("b", null, "e-com.plus")
4731
- ];
4732
- }
4733
- }),
4734
- _: 1
4735
- }, _parent));
4736
- _push(`</div></div>`);
4737
- }
4738
- const _sfc_setup$n = _sfc_main$n.setup;
4739
- _sfc_main$n.setup = (props, ctx) => {
4740
- const ssrContext = useSSRContext();
4741
- (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
4742
- return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
4743
- };
4744
- const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["ssrRender", _sfc_ssrRender$n]]);
4745
-
4746
4753
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
4747
4754
  __name: "ShopFooter",
4748
4755
  props: {
@@ -4763,7 +4770,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
4763
4770
  });
4764
4771
  function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
4765
4772
  const _component_ALink = resolveComponent("ALink");
4766
- _push(`<footer${ssrRenderAttrs(mergeProps({ class: "bg-base-50 border-base-100 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">`);
4773
+ _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">`);
4767
4774
  ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
4768
4775
  if (_ctx.$settings.description) {
4769
4776
  _push(`<div class="prose"><p>${ssrInterpolate(_ctx.$settings.description)}</p></div>`);
@@ -4824,9 +4831,9 @@ function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4824
4831
  if ($props.categories?.length) {
4825
4832
  _push(`<div class="basis-1/2 pr-2 sm:basis-auto sm:pr-0"><div class="mb-2.5 text-lg font-medium">${ssrInterpolate($props.categoriesColTitle || "Categorias")}</div><ul class="${ssrRenderClass([$props.categories.length > 4 ? "grid md:grid-cols-2 gap-x-5 gap-y-1.5" : "space-y-1.5", "text-sm"])}"><!--[-->`);
4826
4833
  ssrRenderList($props.categories, ({ name, slug }, i) => {
4827
- _push(`<li><a${ssrRenderAttr("href", `/${slug}`)} class="ui-link text-base-600">${ssrInterpolate(name)}</a></li>`);
4834
+ _push(`<li><a${ssrRenderAttr("href", `/${slug}`)} class="text-base-600 ui-link">${ssrInterpolate(name)}</a></li>`);
4828
4835
  });
4829
- _push(`<!--]--><li><a href="/s" class="ui-link text-base-900">${ssrInterpolate("Todos os produtos")}</a></li></ul></div>`);
4836
+ _push(`<!--]--><li><a href="/s" class="text-base-900 ui-link">${ssrInterpolate("Todos os produtos")}</a></li></ul></div>`);
4830
4837
  } else {
4831
4838
  _push(`<!---->`);
4832
4839
  }
@@ -5976,8 +5983,9 @@ const $$BannerPictures = createComponent(async ($$result, $$props, $$slots) => {
5976
5983
  if (!mobileWidths?.length) {
5977
5984
  mobileWidths = [640, 1024];
5978
5985
  }
5979
- 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 text-sm text-opacity-70 ${className}` })}`}
5980
- ${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `md:hidden mx-auto text-sm text-opacity-70 ${mobileClass}` })}`}`;
5986
+ 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
5987
+ text-sm text-opacity-70 ${className}` })}`}
5988
+ ${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}` })}`}`;
5981
5989
  }, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/BannerPictures.astro", void 0);
5982
5990
 
5983
5991
  const useBanner = (props) => {
@@ -6133,7 +6141,7 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6133
6141
  if (_push2) {
6134
6142
  _push2(`<div style="${ssrRenderStyle($props.slides.length > 1 ? null : { display: "none" })}" class="absolute bottom-5 right-5 z-10 flex w-screen items-center justify-end xl:left-1/2 xl:right-auto xl:-ms-[640px] xl:max-w-screen-xl"${_scopeId}><div class="${ssrRenderClass([$setup.isMounted ? "opacity-100" : "opacity-20 [&>*]:cursor-wait", "text-primary relative h-10 w-20 rounded-full bg-white/50 shadow-sm ring-1 ring-black/5 transition-opacity"])}"${_scopeId}>`);
6135
6143
  _push2(ssrRenderComponent(_component_CarouselControl, {
6136
- class: "hover:bg-primary/10 h-10 w-10 rounded-full",
6144
+ class: "hover:bg-primary/10 size-10 rounded-full",
6137
6145
  "is-prev": ""
6138
6146
  }, {
6139
6147
  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
@@ -6147,7 +6155,7 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6147
6155
  }),
6148
6156
  _: 1
6149
6157
  }, _parent2, _scopeId));
6150
- _push2(ssrRenderComponent(_component_CarouselControl, { class: "hover:bg-primary/10 h-10 w-10 rounded-full" }, {
6158
+ _push2(ssrRenderComponent(_component_CarouselControl, { class: "hover:bg-primary/10 size-10 rounded-full" }, {
6151
6159
  default: withCtx((_2, _push3, _parent3, _scopeId2) => {
6152
6160
  if (_push3) {
6153
6161
  _push3(`<i class="i-arrow-right"${_scopeId2}></i>`);
@@ -6167,7 +6175,7 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6167
6175
  class: ["text-primary relative h-10 w-20 rounded-full bg-white/50 shadow-sm ring-1 ring-black/5 transition-opacity", $setup.isMounted ? "opacity-100" : "opacity-20 [&>*]:cursor-wait"]
6168
6176
  }, [
6169
6177
  createVNode(_component_CarouselControl, {
6170
- class: "hover:bg-primary/10 h-10 w-10 rounded-full",
6178
+ class: "hover:bg-primary/10 size-10 rounded-full",
6171
6179
  "is-prev": ""
6172
6180
  }, {
6173
6181
  default: withCtx(() => [
@@ -6175,7 +6183,7 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6175
6183
  ]),
6176
6184
  _: 1
6177
6185
  }),
6178
- createVNode(_component_CarouselControl, { class: "hover:bg-primary/10 h-10 w-10 rounded-full" }, {
6186
+ createVNode(_component_CarouselControl, { class: "hover:bg-primary/10 size-10 rounded-full" }, {
6179
6187
  default: withCtx(() => [
6180
6188
  createVNode("i", { class: "i-arrow-right" })
6181
6189
  ]),
@@ -6263,7 +6271,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6263
6271
  }
6264
6272
  });
6265
6273
  function _sfc_ssrRender$i(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
6266
- _push(`<article${ssrRenderAttrs(mergeProps({ class: "prose !max-w-full overflow-x-auto" }, _attrs))}><div class="[&amp;_iframe]:max-w-full [&amp;_img]:max-w-full [&amp;_table]:max-w-full">${$setup.parsedHTML}</div></article>`);
6274
+ _push(`<article${ssrRenderAttrs(mergeProps({ class: "!max-w-full overflow-x-auto prose" }, _attrs))}><div class="[&amp;_iframe]:max-w-full [&amp;_img]:max-w-full [&amp;_table]:max-w-full">${$setup.parsedHTML}</div></article>`);
6267
6275
  }
6268
6276
  const _sfc_setup$i = _sfc_main$i.setup;
6269
6277
  _sfc_main$i.setup = (props, ctx) => {
@@ -6897,26 +6905,26 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6897
6905
  }, {
6898
6906
  default: withCtx((_, _push2, _parent2, _scopeId) => {
6899
6907
  if (_push2) {
6900
- _push2(`<div class="aspect-square p-2 transition-transform motion-safe:group-hover:scale-110"${_scopeId}><div class="relative h-full w-full overflow-hidden rounded bg-white group-hover:rounded-none"${_scopeId}>`);
6908
+ _push2(`<div class="aspect-square p-2 transition-transform motion-safe:group-hover:scale-110"${_scopeId}><div class="relative size-full overflow-hidden rounded bg-white group-hover:rounded-none"${_scopeId}>`);
6901
6909
  if ($setup.images?.length) {
6902
6910
  _push2(`<span class="text-xs text-opacity-70"${_scopeId}>`);
6903
6911
  _push2(ssrRenderComponent(_component_AImg, {
6904
6912
  picture: $setup.images[0],
6905
6913
  alt: $setup.title,
6906
- class: "absolute left-0 top-0 block h-full w-full object-cover"
6914
+ class: "absolute left-0 top-0 block size-full object-cover"
6907
6915
  }, null, _parent2, _scopeId));
6908
6916
  if ($setup.images[1] && $setup.wasHoveredOnce) {
6909
6917
  _push2(ssrRenderComponent(_component_AImg, {
6910
6918
  picture: $setup.images[1],
6911
6919
  alt: $setup.title,
6912
- class: "absolute left-0 top-0 z-10 block h-full w-full object-cover text-transparent opacity-0 transition-opacity group-hover:opacity-100 motion-safe:duration-300"
6920
+ class: "absolute left-0 top-0 z-10 block size-full object-cover text-transparent opacity-0 transition-opacity group-hover:opacity-100 motion-safe:duration-300"
6913
6921
  }, null, _parent2, _scopeId));
6914
6922
  } else {
6915
6923
  _push2(`<!---->`);
6916
6924
  }
6917
6925
  _push2(`</span>`);
6918
6926
  } else {
6919
- _push2(`<div class="from-base-50/20 to-base-100 h-full w-full bg-gradient-to-br"${_scopeId}></div>`);
6927
+ _push2(`<div class="from-base-50/20 to-base-100 size-full bg-gradient-to-br"${_scopeId}></div>`);
6920
6928
  }
6921
6929
  _push2(`</div></div>`);
6922
6930
  if ($setup.discountPercentage) {
@@ -6948,11 +6956,11 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6948
6956
  _push2(ssrRenderComponent($setup["Prices"], { product: $setup.product }, null, _parent2, _scopeId));
6949
6957
  _push2(`</div>`);
6950
6958
  } else {
6951
- _push2(`<span class="ui-badge bg-warning-100 text-warning-700"${_scopeId}>${ssrInterpolate(!$setup.isInStock ? "Sem estoque" : "Inativo")}</span>`);
6959
+ _push2(`<span class="bg-warning-100 text-warning-700 ui-badge"${_scopeId}>${ssrInterpolate(!$setup.isInStock ? "Sem estoque" : "Inativo")}</span>`);
6952
6960
  }
6953
6961
  _push2(`</div>`);
6954
6962
  if ($setup.isActive && !$setup.hasVariations) {
6955
- _push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><span class="bg-on-primary text-primary mr-1 inline-block h-4 w-4 rounded-full text-center text-base leading-none opacity-80"${_scopeId}> + </span> ${ssrInterpolate("Adicionar ao carrinho")}</button>`);
6963
+ _push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><span class="bg-on-primary text-primary mr-1 inline-block size-4 rounded-full text-center text-base leading-none opacity-80"${_scopeId}> + </span> ${ssrInterpolate("Adicionar ao carrinho")}</button>`);
6956
6964
  } else {
6957
6965
  _push2(`<!---->`);
6958
6966
  }
@@ -6960,7 +6968,7 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6960
6968
  } else {
6961
6969
  return [
6962
6970
  createVNode("div", { class: "aspect-square p-2 transition-transform motion-safe:group-hover:scale-110" }, [
6963
- createVNode("div", { class: "relative h-full w-full overflow-hidden rounded bg-white group-hover:rounded-none" }, [
6971
+ createVNode("div", { class: "relative size-full overflow-hidden rounded bg-white group-hover:rounded-none" }, [
6964
6972
  $setup.images?.length ? (openBlock(), createBlock("span", {
6965
6973
  key: 0,
6966
6974
  class: "text-xs text-opacity-70"
@@ -6968,17 +6976,17 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
6968
6976
  createVNode(_component_AImg, {
6969
6977
  picture: $setup.images[0],
6970
6978
  alt: $setup.title,
6971
- class: "absolute left-0 top-0 block h-full w-full object-cover"
6979
+ class: "absolute left-0 top-0 block size-full object-cover"
6972
6980
  }, null, 8, ["picture", "alt"]),
6973
6981
  $setup.images[1] && $setup.wasHoveredOnce ? (openBlock(), createBlock(_component_AImg, {
6974
6982
  key: 0,
6975
6983
  picture: $setup.images[1],
6976
6984
  alt: $setup.title,
6977
- class: "absolute left-0 top-0 z-10 block h-full w-full object-cover text-transparent opacity-0 transition-opacity group-hover:opacity-100 motion-safe:duration-300"
6985
+ class: "absolute left-0 top-0 z-10 block size-full object-cover text-transparent opacity-0 transition-opacity group-hover:opacity-100 motion-safe:duration-300"
6978
6986
  }, null, 8, ["picture", "alt"])) : createCommentVNode("", true)
6979
6987
  ])) : (openBlock(), createBlock("div", {
6980
6988
  key: 1,
6981
- class: "from-base-50/20 to-base-100 h-full w-full bg-gradient-to-br"
6989
+ class: "from-base-50/20 to-base-100 size-full bg-gradient-to-br"
6982
6990
  }))
6983
6991
  ])
6984
6992
  ]),
@@ -7007,15 +7015,15 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7007
7015
  createVNode($setup["Prices"], { product: $setup.product }, null, 8, ["product"])
7008
7016
  ])) : (openBlock(), createBlock("span", {
7009
7017
  key: 1,
7010
- class: "ui-badge bg-warning-100 text-warning-700"
7018
+ class: "bg-warning-100 text-warning-700 ui-badge"
7011
7019
  }, toDisplayString(!$setup.isInStock ? "Sem estoque" : "Inativo"), 1))
7012
7020
  ]),
7013
7021
  $setup.isActive && !$setup.hasVariations ? (openBlock(), createBlock("button", {
7014
7022
  key: 0,
7015
7023
  class: "uno-3suct9 ui-btn-sm ui-btn-primary",
7016
- onClick: withModifiers(($event) => $setup.addProductToCart($setup.product), ["prevent"])
7024
+ onClick: withModifiers(($event) => $setup.addProductToCart($setup.product), ["stop", "prevent"])
7017
7025
  }, [
7018
- createVNode("span", { class: "bg-on-primary text-primary mr-1 inline-block h-4 w-4 rounded-full text-center text-base leading-none opacity-80" }, " + "),
7026
+ createVNode("span", { class: "bg-on-primary text-primary mr-1 inline-block size-4 rounded-full text-center text-base leading-none opacity-80" }, " + "),
7019
7027
  createTextVNode(" " + toDisplayString("Adicionar ao carrinho"))
7020
7028
  ], 8, ["onClick"])) : createCommentVNode("", true)
7021
7029
  ])
@@ -7139,13 +7147,13 @@ function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7139
7147
  if (_push3) {
7140
7148
  _push3(ssrRenderComponent(_component_CarouselControl, {
7141
7149
  style: $setup.products.length > 2 ? null : { display: "none" },
7142
- class: ["uno-c36cp5", isPrev ? "!-left-4" : "!-right-4"],
7150
+ class: ["uno-t0rdy7", isPrev ? "!-left-4" : "!-right-4"],
7143
7151
  "is-prev": isPrev
7144
7152
  }, null, _parent3, _scopeId2));
7145
7153
  } else {
7146
7154
  return [
7147
7155
  withDirectives(createVNode(_component_CarouselControl, {
7148
- class: ["uno-c36cp5", isPrev ? "!-left-4" : "!-right-4"],
7156
+ class: ["uno-t0rdy7", isPrev ? "!-left-4" : "!-right-4"],
7149
7157
  "is-prev": isPrev
7150
7158
  }, null, 8, ["class", "is-prev"]), [
7151
7159
  [vShow, $setup.products.length > 2]
@@ -7162,7 +7170,7 @@ function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7162
7170
  createVNode($setup["DefineCarouselControl"], null, {
7163
7171
  default: withCtx(({ isPrev }) => [
7164
7172
  withDirectives(createVNode(_component_CarouselControl, {
7165
- class: ["uno-c36cp5", isPrev ? "!-left-4" : "!-right-4"],
7173
+ class: ["uno-t0rdy7", isPrev ? "!-left-4" : "!-right-4"],
7166
7174
  "is-prev": isPrev
7167
7175
  }, null, 8, ["class", "is-prev"]), [
7168
7176
  [vShow, $setup.products.length > 2]
@@ -7385,7 +7393,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7385
7393
  function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
7386
7394
  _push(`<button${ssrRenderAttrs(mergeProps({
7387
7395
  type: "button",
7388
- class: "leading-12 enabled:text-primary enabled:hover:bg-primary-100/70 h-12 w-10 text-xl disabled:opacity-40",
7396
+ class: "leading-12 h-12 w-10 text-xl enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40",
7389
7397
  "data-quantity-selector-control": $props.isMinus ? "minus" : "plus",
7390
7398
  "aria-label": $props.isMinus ? "Menos" : "Mais",
7391
7399
  disabled: $props.isMinus ? $setup.isBoundMin : $setup.isBoundMax
@@ -7574,7 +7582,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7574
7582
  if (_push2) {
7575
7583
  _push2(`<span${_scopeId}>`);
7576
7584
  if ($props.pictures.length > 6) {
7577
- _push2(ssrRenderComponent(_component_CarouselControl, { class: "hover:bg-primary-300/60 text-primary !bottom-3 !left-1/2 -ml-5 h-10 w-10 rounded-full bg-white/60 text-xl opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90" }, null, _parent2, _scopeId));
7585
+ _push2(ssrRenderComponent(_component_CarouselControl, { class: "text-primary hover:bg-primary-300/60 !bottom-3 !left-1/2 -ml-5 size-10 rounded-full bg-white/60 text-xl opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90" }, null, _parent2, _scopeId));
7578
7586
  } else {
7579
7587
  _push2(`<!---->`);
7580
7588
  }
@@ -7584,7 +7592,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7584
7592
  createVNode("span", null, [
7585
7593
  $props.pictures.length > 6 ? (openBlock(), createBlock(_component_CarouselControl, {
7586
7594
  key: 0,
7587
- class: "hover:bg-primary-300/60 text-primary !bottom-3 !left-1/2 -ml-5 h-10 w-10 rounded-full bg-white/60 text-xl opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90"
7595
+ class: "text-primary hover:bg-primary-300/60 !bottom-3 !left-1/2 -ml-5 size-10 rounded-full bg-white/60 text-xl opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90"
7588
7596
  })) : createCommentVNode("", true),
7589
7597
  createVNode("span", { class: "absolute bottom-0 block h-2 w-full bg-gradient-to-b from-transparent to-white" })
7590
7598
  ])
@@ -7602,7 +7610,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7602
7610
  _push2(`<button class="bg-secondary-100 block rounded md:h-[175px]"${_scopeId}>`);
7603
7611
  _push2(ssrRenderComponent(_component_AImg, {
7604
7612
  picture: $props.pictures[index],
7605
- class: ["ring-secondary/10 h-full w-full rounded border-2 object-cover opacity-90 transition-colors", index === $setup.activeIndex ? "border-secondary/50 ring-4 cursor-auto" : "border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"]
7613
+ class: ["ring-secondary/10 size-full rounded border-2 object-cover opacity-90 transition-colors", index === $setup.activeIndex ? "border-secondary/50 ring-4 cursor-auto" : "border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"]
7606
7614
  }, null, _parent2, _scopeId));
7607
7615
  _push2(`</button>`);
7608
7616
  } else {
@@ -7631,7 +7639,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7631
7639
  }, [
7632
7640
  createVNode(_component_AImg, {
7633
7641
  picture: $props.pictures[index],
7634
- class: ["ring-secondary/10 h-full w-full rounded border-2 object-cover opacity-90 transition-colors", index === $setup.activeIndex ? "border-secondary/50 ring-4 cursor-auto" : "border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"]
7642
+ class: ["ring-secondary/10 size-full rounded border-2 object-cover opacity-90 transition-colors", index === $setup.activeIndex ? "border-secondary/50 ring-4 cursor-auto" : "border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"]
7635
7643
  }, null, 8, ["picture", "class"])
7636
7644
  ], 8, ["onClick"])) : createCommentVNode("", true)
7637
7645
  ], 64);
@@ -7651,7 +7659,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7651
7659
  as: "div",
7652
7660
  index: $setup.activeIndex,
7653
7661
  "onUpdate:index": ($event) => $setup.activeIndex = $event,
7654
- class: ["text-base-600 [&_i]:i-arrow-right mx-auto h-full w-full max-w-[525px] [&>*]:h-full [&_i]:mx-2 [&_i]:text-2xl", $setup.isLoadingLightbox && "opacity-80"],
7662
+ class: ["text-base-600 [&_i]:i-arrow-right mx-auto size-full max-w-[525px] [&>*]:h-full [&_i]:mx-2 [&_i]:text-2xl", $setup.isLoadingLightbox && "opacity-80"],
7655
7663
  id: $setup.psId
7656
7664
  }, {
7657
7665
  default: withCtx((_, _push2, _parent2, _scopeId) => {
@@ -7673,7 +7681,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7673
7681
  _push3(ssrRenderComponent(_component_AImg, {
7674
7682
  picture,
7675
7683
  "preferred-size": "big",
7676
- class: "h-full w-full rounded object-cover",
7684
+ class: "size-full rounded object-cover",
7677
7685
  fetchpriority: i === 0 ? "high" : "low",
7678
7686
  loading: i === 0 ? "eager" : "lazy"
7679
7687
  }, null, _parent3, _scopeId2));
@@ -7682,7 +7690,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7682
7690
  createVNode(_component_AImg, {
7683
7691
  picture,
7684
7692
  "preferred-size": "big",
7685
- class: "h-full w-full rounded object-cover",
7693
+ class: "size-full rounded object-cover",
7686
7694
  fetchpriority: i === 0 ? "high" : "low",
7687
7695
  loading: i === 0 ? "eager" : "lazy"
7688
7696
  }, null, 8, ["picture", "fetchpriority", "loading"])
@@ -7710,7 +7718,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7710
7718
  createVNode(_component_AImg, {
7711
7719
  picture,
7712
7720
  "preferred-size": "big",
7713
- class: "h-full w-full rounded object-cover",
7721
+ class: "size-full rounded object-cover",
7714
7722
  fetchpriority: i === 0 ? "high" : "low",
7715
7723
  loading: i === 0 ? "eager" : "lazy"
7716
7724
  }, null, 8, ["picture", "fetchpriority", "loading"])
@@ -7724,7 +7732,7 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7724
7732
  _: 1
7725
7733
  }, _parent));
7726
7734
  if ($setup.isLoadingLightbox) {
7727
- _push(`<i class="i-arrow-path bg-base-200 absolute left-1/2 top-1/2 -ml-7 -mt-7 h-14 w-14 animate-spin"${ssrRenderAttr("aria-label", "Carregando")}></i>`);
7735
+ _push(`<i class="bg-base-200 i-arrow-path absolute left-1/2 top-1/2 -ml-7 -mt-7 size-14 animate-spin"${ssrRenderAttr("aria-label", "Carregando")}></i>`);
7728
7736
  } else {
7729
7737
  _push(`<!---->`);
7730
7738
  }
@@ -7900,9 +7908,9 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7900
7908
  ssrRenderList(options, (optionText, i) => {
7901
7909
  _push(`<li><button class="${ssrRenderClass([[
7902
7910
  $setup.selectedOptions[gridId] === optionText ? "border-primary ring-2" : null,
7903
- gridId === "colors" ? "h-9 w-9 text-[0px]" : "px-2.5 py-2 leading-none",
7904
- $setup.activeVariationsGrids[gridId].includes(optionText) ? "text-primary-950 bg-primary-100 border-primary-400" : "text-primary-600 bg-primary-200 border-primary-300"
7905
- ], "ring-primary/60 rounded border"])}" style="${ssrRenderStyle(gridId === "colors" ? $setup.getColorOptionBg(optionText) : void 0)}">${ssrInterpolate(optionText)}</button></li>`);
7911
+ gridId === "colors" ? "size-9 text-[0px]" : "px-2.5 py-2 leading-none",
7912
+ $setup.activeVariationsGrids[gridId].includes(optionText) ? "border-primary-400 bg-primary-100 text-primary-950" : "border-primary-300 bg-primary-200 text-primary-600"
7913
+ ], "ring-primary/60 rounded border"])}" style="${ssrRenderStyle(gridId === "colors" && $setup.getColorOptionBg(optionText))}">${ssrInterpolate(optionText)}</button></li>`);
7906
7914
  });
7907
7915
  _push(`<!--]--></ul>`);
7908
7916
  } else {
@@ -7983,7 +7991,7 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
7983
7991
  } else {
7984
7992
  _push(`<!---->`);
7985
7993
  }
7986
- _push(`</div><div class="lg:sticky-header:translate-y-14 top-0 py-4 transition-transform lg:sticky"><h1 class="ui-text-brand text-secondary-900 text-lg">${ssrInterpolate($setup.title)}</h1>`);
7994
+ _push(`</div><div class="lg:sticky-header:translate-y-14 top-0 py-4 transition-transform lg:sticky"><h1 class="text-secondary-900 ui-text-brand text-lg">${ssrInterpolate($setup.title)}</h1>`);
7987
7995
  if ($setup.isActive) {
7988
7996
  _push(`<div class="mt-5">`);
7989
7997
  _push(ssrRenderComponent($setup["Prices"], {
@@ -8357,7 +8365,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8357
8365
  const _component_Fade = resolveComponent("Fade");
8358
8366
  _push(`<!--[-->`);
8359
8367
  if ($setup.searchTerm) {
8360
- _push(`<section class="${ssrRenderClass([$setup.hasFiltersBar ? "relative z-[14] -mb-4" : "mb-0", "ui-section-slim text-base-700 px-6 text-center text-xl lowercase"])}">${ssrInterpolate("Buscando por")} <h1 class="text-base-800 inline font-bold italic">${ssrInterpolate($setup.searchTerm)}</h1></section>`);
8368
+ _push(`<section class="${ssrRenderClass([$setup.hasFiltersBar ? "relative z-[14] -mb-4" : "mb-0", "text-base-700 ui-section-slim px-6 text-center text-xl lowercase"])}">${ssrInterpolate("Buscando por")} <h1 class="text-base-800 inline font-bold italic">${ssrInterpolate($setup.searchTerm)}</h1></section>`);
8361
8369
  } else {
8362
8370
  _push(`<!---->`);
8363
8371
  }
@@ -8377,15 +8385,15 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8377
8385
  default: withCtx((_, _push2, _parent2, _scopeId) => {
8378
8386
  if (_push2) {
8379
8387
  if ($setup.hasFiltersBar) {
8380
- _push2(`<section class="ui-section-slim sticky-header:translate-y-16 lg:sticky-header:translate-y-14 to-base-100 sticky top-0 z-[12] flex items-center justify-between rounded-b bg-white/80 px-6 py-4 shadow-sm backdrop-blur-sm transition-transform"${_scopeId}><strong class="text-base-700 font-medium lowercase"${_scopeId}>`);
8388
+ _push2(`<section class="to-base-100 ui-section-slim sticky-header:translate-y-16 lg:sticky-header:translate-y-14 sticky top-0 z-[12] flex items-center justify-between rounded-b bg-white/80 px-6 py-4 shadow-sm backdrop-blur-sm transition-transform"${_scopeId}><strong class="text-base-700 font-medium lowercase"${_scopeId}>`);
8381
8389
  if ($setup.resultMeta.count > 1) {
8382
8390
  _push2(`<!--[-->${ssrInterpolate($setup.resultMeta.count)} <span class="hidden lg:inline"${_scopeId}>${ssrInterpolate("Itens encontrados")}</span><span class="lg:hidden"${_scopeId}>${ssrInterpolate("Produtos")}</span><!--]-->`);
8383
8391
  } else {
8384
8392
  _push2(`<!---->`);
8385
8393
  }
8386
- _push2(`</strong><div class="flex items-center gap-4"${_scopeId}><span class="hidden text-xl leading-none md:block"${_scopeId}><i class="i-adjustments-horizontal text-base-600 m-0"${_scopeId}></i></span><button class="ui-btn-sm ui-btn-secondary relative"${_scopeId}><span class="hidden md:inline"${_scopeId}>${ssrInterpolate("Filtrar produtos")}</span><span class="md:hidden"${_scopeId}><i class="i-adjustments-horizontal mr-1"${_scopeId}></i> ${ssrInterpolate("Filtrar")}</span>`);
8394
+ _push2(`</strong><div class="flex items-center gap-4"${_scopeId}><span class="hidden text-xl leading-none md:block"${_scopeId}><i class="text-base-600 i-adjustments-horizontal m-0"${_scopeId}></i></span><button class="ui-btn-sm ui-btn-secondary relative"${_scopeId}><span class="hidden md:inline"${_scopeId}>${ssrInterpolate("Filtrar produtos")}</span><span class="md:hidden"${_scopeId}><i class="i-adjustments-horizontal mr-1"${_scopeId}></i> ${ssrInterpolate("Filtrar")}</span>`);
8387
8395
  if ($setup.filtersCount) {
8388
- _push2(`<span class="ui-badge-pill-sm outline-secondary/80 outline-3 absolute -right-1.5 -top-1 outline"${_scopeId}>${ssrInterpolate($setup.filtersCount)}</span>`);
8396
+ _push2(`<span class="outline-3 outline-secondary/80 ui-badge-pill-sm absolute -right-1.5 -top-1 outline"${_scopeId}>${ssrInterpolate($setup.filtersCount)}</span>`);
8389
8397
  } else {
8390
8398
  _push2(`<!---->`);
8391
8399
  }
@@ -8598,7 +8606,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8598
8606
  return [
8599
8607
  $setup.hasFiltersBar ? (openBlock(), createBlock("section", {
8600
8608
  key: 0,
8601
- class: "ui-section-slim sticky-header:translate-y-16 lg:sticky-header:translate-y-14 to-base-100 sticky top-0 z-[12] flex items-center justify-between rounded-b bg-white/80 px-6 py-4 shadow-sm backdrop-blur-sm transition-transform"
8609
+ class: "to-base-100 ui-section-slim sticky-header:translate-y-16 lg:sticky-header:translate-y-14 sticky top-0 z-[12] flex items-center justify-between rounded-b bg-white/80 px-6 py-4 shadow-sm backdrop-blur-sm transition-transform"
8602
8610
  }, [
8603
8611
  createVNode("strong", { class: "text-base-700 font-medium lowercase" }, [
8604
8612
  $setup.resultMeta.count > 1 ? (openBlock(), createBlock(Fragment$1, { key: 0 }, [
@@ -8609,7 +8617,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8609
8617
  ]),
8610
8618
  createVNode("div", { class: "flex items-center gap-4" }, [
8611
8619
  createVNode("span", { class: "hidden text-xl leading-none md:block" }, [
8612
- createVNode("i", { class: "i-adjustments-horizontal text-base-600 m-0" })
8620
+ createVNode("i", { class: "text-base-600 i-adjustments-horizontal m-0" })
8613
8621
  ]),
8614
8622
  createVNode("button", {
8615
8623
  onClick: ($event) => $setup.isFiltersOpen = !$setup.isFiltersOpen,
@@ -8622,7 +8630,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8622
8630
  ]),
8623
8631
  $setup.filtersCount ? (openBlock(), createBlock("span", {
8624
8632
  key: 0,
8625
- class: "ui-badge-pill-sm outline-secondary/80 outline-3 absolute -right-1.5 -top-1 outline"
8633
+ class: "outline-3 outline-secondary/80 ui-badge-pill-sm absolute -right-1.5 -top-1 outline"
8626
8634
  }, toDisplayString($setup.filtersCount), 1)) : createCommentVNode("", true)
8627
8635
  ], 8, ["onClick"]),
8628
8636
  createVNode($setup["Listbox"], {
@@ -8747,7 +8755,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8747
8755
  default: withCtx((_, _push2, _parent2, _scopeId) => {
8748
8756
  if (_push2) {
8749
8757
  if ($setup.isFetching) {
8750
- _push2(`<div class="absolute left-0 top-0 z-[14] h-full w-full bg-white/40"${_scopeId}></div>`);
8758
+ _push2(`<div class="absolute left-0 top-0 z-[14] size-full bg-white/40"${_scopeId}></div>`);
8751
8759
  } else {
8752
8760
  _push2(`<!---->`);
8753
8761
  }
@@ -8755,7 +8763,7 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
8755
8763
  return [
8756
8764
  $setup.isFetching ? (openBlock(), createBlock("div", {
8757
8765
  key: 0,
8758
- class: "absolute left-0 top-0 z-[14] h-full w-full bg-white/40"
8766
+ class: "absolute left-0 top-0 z-[14] size-full bg-white/40"
8759
8767
  })) : createCommentVNode("", true)
8760
8768
  ];
8761
8769
  }
@@ -8866,7 +8874,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8866
8874
  }
8867
8875
  });
8868
8876
  function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
8869
- _push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><article class="prose"><h1 class="ui-title not-prose my-4">${ssrInterpolate($props.title)}</h1>`);
8877
+ _push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><article class="prose"><h1 class="not-prose ui-title my-4">${ssrInterpolate($props.title)}</h1>`);
8870
8878
  _push(ssrRenderComponent($setup["ContentClearfix"], { html: $setup.html }, null, _parent));
8871
8879
  _push(`</article></section>`);
8872
8880
  }
@@ -8980,7 +8988,7 @@ async function getStaticPaths() {
8980
8988
  const $$ = createComponent(async ($$result, $$props, $$slots) => {
8981
8989
  const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
8982
8990
  Astro2.self = $$;
8983
- let slug = Astro2.params.slug || "";
8991
+ const slug = Astro2.params.slug || "";
8984
8992
  if (slug.endsWith(".map")) {
8985
8993
  return new Response(null, { status: 404 });
8986
8994
  }