cloudcommerce 0.35.0 → 0.36.0

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 (219) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  3. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  4. package/ecomplus-stores/barra-doce/functions/ssr/src/env.d.ts +2 -1
  5. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +1 -1
  6. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +1 -1
  7. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +1 -1
  8. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +1 -1
  9. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +1 -1
  10. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  11. package/ecomplus-stores/barra-doce/package.json +2 -2
  12. package/package.json +3 -3
  13. package/packages/api/lib/api.js.map +1 -1
  14. package/packages/api/package.json +1 -1
  15. package/packages/apps/affilate-program/lib/events-to-affilate-program.js.map +1 -1
  16. package/packages/apps/affilate-program/package.json +1 -1
  17. package/packages/apps/correios/package.json +1 -1
  18. package/packages/apps/custom-payment/lib/custom-payment-create-transaction.js.map +1 -1
  19. package/packages/apps/custom-payment/lib/custom-payment-list-payments.js.map +1 -1
  20. package/packages/apps/custom-payment/package.json +1 -1
  21. package/packages/apps/custom-shipping/package.json +1 -1
  22. package/packages/apps/datafrete/lib/datafrete-webhook.js.map +1 -1
  23. package/packages/apps/datafrete/package.json +1 -1
  24. package/packages/apps/discounts/package.json +1 -1
  25. package/packages/apps/emails/lib/events-to-app-emails.js.map +1 -1
  26. package/packages/apps/emails/lib/functios-lib/abandoned-carts.js.map +1 -1
  27. package/packages/apps/emails/lib/functios-lib/handle-orders.js.map +1 -1
  28. package/packages/apps/emails/package.json +1 -1
  29. package/packages/apps/fb-conversions/lib/fb-conversions-events.js.map +1 -1
  30. package/packages/apps/fb-conversions/lib/functions-lib/create-fb-objects.js.map +1 -1
  31. package/packages/apps/fb-conversions/package.json +1 -1
  32. package/packages/apps/flash-courier/package.json +1 -1
  33. package/packages/apps/frenet/lib/functions-lib/database.js.map +1 -1
  34. package/packages/apps/frenet/lib/functions-lib/events-to-frenet.js.map +1 -1
  35. package/packages/apps/frenet/lib/functions-lib/remove-delivered.js.map +1 -1
  36. package/packages/apps/frenet/lib/functions-lib/tracking-codes.js.map +1 -1
  37. package/packages/apps/frenet/lib/functions-lib/update-fulfillments.js.map +1 -1
  38. package/packages/apps/frenet/package.json +1 -1
  39. package/packages/apps/galaxpay/lib/functions-lib/all-parses.js.map +1 -1
  40. package/packages/apps/galaxpay/lib/functions-lib/ecom/events-to-galaxpay.js.map +1 -1
  41. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-access.js.map +1 -1
  42. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/create-axios.js.map +1 -1
  43. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/auth/gerate-token.js.map +1 -1
  44. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/handle-plans.js.map +1 -1
  45. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/update-subscription.js.map +1 -1
  46. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.d.ts +0 -1
  47. package/packages/apps/galaxpay/lib/functions-lib/galaxpay/webhook.js.map +1 -1
  48. package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js +2 -2
  49. package/packages/apps/galaxpay/lib/galaxpay-create-transaction.js.map +1 -1
  50. package/packages/apps/galaxpay/lib/galaxpay-events.js.map +1 -1
  51. package/packages/apps/galaxpay/lib/galaxpay-list-payments.js +1 -1
  52. package/packages/apps/galaxpay/lib/galaxpay-list-payments.js.map +1 -1
  53. package/packages/apps/galaxpay/package.json +1 -1
  54. package/packages/apps/google-analytics/lib/google-analytics-events.js.map +1 -1
  55. package/packages/apps/google-analytics/package.json +1 -1
  56. package/packages/apps/jadlog/package.json +1 -1
  57. package/packages/apps/loyalty-points/lib/functions-lib/cron-add-points.js.map +1 -1
  58. package/packages/apps/loyalty-points/lib/functions-lib/get-program-id.js.map +1 -1
  59. package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js.map +1 -1
  60. package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js.map +1 -1
  61. package/packages/apps/loyalty-points/lib/loyalty-list-payments.js.map +1 -1
  62. package/packages/apps/loyalty-points/lib/loyalty-points-events.js.map +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/lib/functions-lib/database.js.map +1 -1
  66. package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js.map +1 -1
  67. package/packages/apps/melhor-envio/lib/functions-lib/new-label.js.map +1 -1
  68. package/packages/apps/melhor-envio/lib/functions-lib/order-is-valid.js.map +1 -1
  69. package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js.map +1 -1
  70. package/packages/apps/melhor-envio/package.json +1 -1
  71. package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +1 -1
  72. package/packages/apps/mercadopago/lib/mp-list-payments.js.map +1 -1
  73. package/packages/apps/mercadopago/lib/mp-webhook.js.map +1 -1
  74. package/packages/apps/mercadopago/package.json +1 -1
  75. package/packages/apps/pagarme/lib/functions-lib/add-installments.js.map +1 -1
  76. package/packages/apps/pagarme/lib/functions-lib/parse-status-to-ecom.js.map +1 -1
  77. package/packages/apps/pagarme/lib/pagarme-create-transaction.js.map +1 -1
  78. package/packages/apps/pagarme/lib/pagarme-list-payments.js.map +1 -1
  79. package/packages/apps/pagarme/lib/pagarme-webhook.js.map +1 -1
  80. package/packages/apps/pagarme/package.json +1 -1
  81. package/packages/apps/pagarme-v5/lib/pagarme-v5-events.js.map +1 -1
  82. package/packages/apps/pagarme-v5/package.json +1 -1
  83. package/packages/apps/paghiper/lib/functions-lib/handle-webhook.d.ts +0 -1
  84. package/packages/apps/paghiper/lib/functions-lib/handle-webhook.js.map +1 -1
  85. package/packages/apps/paghiper/lib/paghiper-create-transaction.js.map +1 -1
  86. package/packages/apps/paghiper/lib/paghiper-list-payments.js.map +1 -1
  87. package/packages/apps/paghiper/lib/paghiper-webhook.js.map +1 -1
  88. package/packages/apps/paghiper/package.json +1 -1
  89. package/packages/apps/pix/lib/functions-lib/get-certificate.js.map +1 -1
  90. package/packages/apps/pix/lib/functions-lib/pix-auth/construtor.js.map +1 -1
  91. package/packages/apps/pix/lib/functions-lib/pix-auth/create-axios.js.map +1 -1
  92. package/packages/apps/pix/lib/functions-lib/pix-auth/oauth.js.map +1 -1
  93. package/packages/apps/pix/lib/pix-create-transaction.js.map +1 -1
  94. package/packages/apps/pix/lib/pix-list-payments.js.map +1 -1
  95. package/packages/apps/pix/lib/pix-webhook.js.map +1 -1
  96. package/packages/apps/pix/package.json +1 -1
  97. package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -1
  98. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -1
  99. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  100. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js.map +1 -1
  101. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  102. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  103. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  104. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  105. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  106. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  107. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js.map +1 -1
  108. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js.map +1 -1
  109. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js.map +1 -1
  110. package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +1 -1
  111. package/packages/apps/tiny-erp/package.json +1 -1
  112. package/packages/apps/webhooks/lib/events-to-webhooks-app.js.map +1 -1
  113. package/packages/apps/webhooks/package.json +1 -1
  114. package/packages/cli/package.json +4 -1
  115. package/packages/config/lib/config.js.map +1 -1
  116. package/packages/config/lib/env.js.map +1 -1
  117. package/packages/config/package.json +1 -1
  118. package/packages/emails/lib/index.js.map +1 -1
  119. package/packages/emails/lib/parse-template-to-html.js.map +1 -1
  120. package/packages/emails/lib/providers/sendgrid/index.js.map +1 -1
  121. package/packages/emails/lib/providers/sendgrid/parse-to-data.js.map +1 -1
  122. package/packages/emails/lib/providers/smtp/index.js.map +1 -1
  123. package/packages/emails/package.json +1 -1
  124. package/packages/eslint/package.json +1 -1
  125. package/packages/events/package.json +1 -1
  126. package/packages/feeds/lib/firebase/serve-feeds.js.map +1 -1
  127. package/packages/feeds/package.json +1 -1
  128. package/packages/firebase/lib/config.js.map +1 -1
  129. package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
  130. package/packages/firebase/lib/helpers/pubsub.js.map +1 -1
  131. package/packages/firebase/lib/helpers/update-app-data.js.map +1 -1
  132. package/packages/firebase/package.json +1 -1
  133. package/packages/i18n/package.json +1 -1
  134. package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
  135. package/packages/modules/lib/firebase/checkout.js.map +1 -1
  136. package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -1
  137. package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -1
  138. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
  139. package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
  140. package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
  141. package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
  142. package/packages/modules/lib/firebase/handle-module.js.map +1 -1
  143. package/packages/modules/lib/firebase/serve-modules-api.js.map +1 -1
  144. package/packages/modules/lib/firebase.js.map +1 -1
  145. package/packages/modules/package.json +1 -1
  146. package/packages/passport/lib/firebase/authenticate-customer.js.map +1 -1
  147. package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
  148. package/packages/passport/lib/firebase.js.map +1 -1
  149. package/packages/passport/package.json +1 -1
  150. package/packages/ssr/package.json +3 -2
  151. package/packages/storefront/astro.config.mjs +4 -4
  152. package/packages/storefront/client.d.ts +0 -1
  153. package/packages/storefront/dist/client/_astro/AccountPage.700be123.js +1 -0
  154. package/packages/storefront/dist/client/_astro/{CartSidebar.005ec337.js → CartSidebar.430b55df.js} +1 -1
  155. package/packages/storefront/dist/client/_astro/HeroSlider.bd684ed8.js +1 -0
  156. package/packages/storefront/dist/client/_astro/PitchBar.06e0f831.js +1 -0
  157. package/packages/storefront/dist/client/_astro/{Prices.862d15eb.js → Prices.0e829c31.js} +1 -1
  158. package/packages/storefront/dist/client/_astro/ProductDetails.06da998d.js +1 -0
  159. package/packages/storefront/dist/client/_astro/ProductShelf.3f4f38b5.js +1 -0
  160. package/packages/storefront/dist/client/_astro/ProductShelf.bf82838b.js +1 -0
  161. package/packages/storefront/dist/client/_astro/QuantitySelector.ebf60845.js +1 -0
  162. package/packages/storefront/dist/client/_astro/SearchModal.b6aa5ef7.js +1 -0
  163. package/packages/storefront/dist/client/_astro/ShopHeader.2d6e361a.js +4 -0
  164. package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.d927d271.js → _plugin-vue_export-helper.f75743ee.js} +1 -1
  165. package/packages/storefront/dist/client/_astro/_slug_.e7cac999.css +1 -0
  166. package/packages/storefront/dist/client/_astro/client.41b42098.js +1 -0
  167. package/packages/storefront/dist/client/_astro/{customer-session.68901b4c.js → customer-session.5ab9ab1a.js} +1 -1
  168. package/packages/storefront/dist/client/_astro/{ecom-utils.f65876ca.js → ecom-utils.5cbfb95e.js} +1 -1
  169. package/packages/storefront/dist/client/_astro/{format-money.db179bca.js → format-money.9cf6b04d.js} +1 -1
  170. package/packages/storefront/dist/client/_astro/{hoisted.719d11e3.js → hoisted.54eaab04.js} +1 -1
  171. package/packages/storefront/dist/client/_astro/hoisted.c90fc6ab.js +1 -0
  172. package/packages/storefront/dist/client/_astro/{i18n.614beec4.js → i18n.29216eeb.js} +1 -1
  173. package/packages/storefront/dist/client/_astro/{img.27573b8b.js → img.4f23a3dd.js} +1 -1
  174. package/packages/storefront/dist/client/_astro/index.570b84fe.js +1 -0
  175. package/packages/storefront/dist/client/_astro/index.8ac1db99.js +1 -0
  176. package/packages/storefront/dist/client/_astro/{modules-info.4373e917.js → modules-info.55780599.js} +1 -1
  177. package/packages/storefront/dist/client/_astro/name.01410784.js +1 -0
  178. package/packages/storefront/dist/client/_astro/shopping-cart.d9f601dd.js +1 -0
  179. package/packages/storefront/dist/client/_astro/{use-analytics.205d2b8f.js → use-analytics.cc95e346.js} +1 -1
  180. package/packages/storefront/dist/client/_astro/{use-product-card.cc44716b.js → use-product-card.437911bb.js} +1 -1
  181. package/packages/storefront/dist/server/chunks/{CartSidebar_6cb69be3.mjs → CartSidebar_eab28771.mjs} +1 -1
  182. package/packages/storefront/dist/server/chunks/SearchModal_f66549d4.mjs +147 -0
  183. package/packages/storefront/dist/server/chunks/{_.._07cccbbe.mjs → _.._5a781fb3.mjs} +1 -1
  184. package/packages/storefront/dist/server/chunks/{account_e71f4214.mjs → account_519edb70.mjs} +1 -1
  185. package/packages/storefront/dist/server/chunks/{index_414d53c7.mjs → index_10e14f85.mjs} +1 -1
  186. package/packages/storefront/dist/server/chunks/{index_a7b0afbf.mjs → index_5e3ed8a0.mjs} +1 -1
  187. package/packages/storefront/dist/server/chunks/{node_7efff4d0.mjs → node_1119b0d1.mjs} +1 -1
  188. package/packages/storefront/dist/server/chunks/pages/{__e7ddf925.mjs → __93ade2dd.mjs} +150 -60
  189. package/packages/storefront/dist/server/chunks/pages/{account_f14e6f5a.mjs → account_e5d410a7.mjs} +1 -1
  190. package/packages/storefront/dist/server/chunks/pages/{index_b300d887.mjs → index_7e25afc1.mjs} +1 -1
  191. package/packages/storefront/dist/server/chunks/pages/{node_2b0cb889.mjs → node_bd378ac0.mjs} +1 -1
  192. package/packages/storefront/dist/server/chunks/pages/{~fallback_2bbdf875.mjs → ~fallback_73578d2f.mjs} +1 -1
  193. package/packages/storefront/dist/server/chunks/{~fallback_43c17ff0.mjs → ~fallback_41122b9b.mjs} +1 -1
  194. package/packages/storefront/dist/server/entry.mjs +7 -7
  195. package/packages/storefront/dist/server/{manifest_4dba1382.mjs → manifest_221d806b.mjs} +1 -1
  196. package/packages/storefront/dist/server/renderers.mjs +5 -3
  197. package/packages/storefront/package.json +1 -1
  198. package/packages/storefront/src/lib/components/Drawer.vue +1 -0
  199. package/packages/storefront/src/lib/ssr-context.ts +11 -8
  200. package/packages/storefront/src/vue-globals.d.ts +1 -0
  201. package/packages/test-base/lib/endpoints.js.map +1 -1
  202. package/packages/test-base/package.json +1 -1
  203. package/packages/types/package.json +1 -1
  204. package/packages/storefront/dist/client/_astro/AccountPage.77d861e9.js +0 -1
  205. package/packages/storefront/dist/client/_astro/HeroSlider.b35ac2f9.js +0 -1
  206. package/packages/storefront/dist/client/_astro/PitchBar.7965ce11.js +0 -1
  207. package/packages/storefront/dist/client/_astro/ProductDetails.120b6513.js +0 -1
  208. package/packages/storefront/dist/client/_astro/ProductShelf.4a2f57cf.js +0 -1
  209. package/packages/storefront/dist/client/_astro/QuantitySelector.d7dd044c.js +0 -1
  210. package/packages/storefront/dist/client/_astro/SearchModal.0bf88bcc.js +0 -1
  211. package/packages/storefront/dist/client/_astro/ShopHeader.57302617.js +0 -4
  212. package/packages/storefront/dist/client/_astro/_slug_.f458f318.css +0 -1
  213. package/packages/storefront/dist/client/_astro/client.409c434f.js +0 -1
  214. package/packages/storefront/dist/client/_astro/hoisted.f4c55052.js +0 -1
  215. package/packages/storefront/dist/client/_astro/index.aac4c53d.js +0 -1
  216. package/packages/storefront/dist/client/_astro/index.d93220be.js +0 -1
  217. package/packages/storefront/dist/client/_astro/name.2999355b.js +0 -1
  218. package/packages/storefront/dist/client/_astro/shopping-cart.608866aa.js +0 -1
  219. package/packages/storefront/dist/server/chunks/SearchModal_930845a4.mjs +0 -18
@@ -0,0 +1,147 @@
1
+ import { ref, shallowReactive, watch, defineComponent, toRef, resolveComponent, withCtx, openBlock, createBlock, Fragment, renderList, toDisplayString, useSSRContext } from 'vue';
2
+ import { useDebounceFn } from '@vueuse/core';
3
+ import api from '@cloudcommerce/api';
4
+ import { h as useStorage, _ as _export_sfc, P as ProductShelf } from './pages/__93ade2dd.mjs';
5
+ import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrInterpolate } from 'vue/server-renderer';
6
+
7
+ const storageKey = "ecomSeachHistory";
8
+ const searchHistory = useStorage(storageKey, []);
9
+ const search = async ({
10
+ term,
11
+ params,
12
+ fields,
13
+ url = "search/v1"
14
+ }) => {
15
+ term = term.trim();
16
+ if (term.length < 2) {
17
+ return { data: { result: [], meta: null } };
18
+ }
19
+ const response = await api.get(url, {
20
+ fields,
21
+ params: {
22
+ ...params,
23
+ term
24
+ }
25
+ });
26
+ if (response.data.result.length && !searchHistory.includes(term)) {
27
+ const termIndex = searchHistory.findIndex((_term) => term.startsWith(_term));
28
+ if (termIndex > -1) {
29
+ searchHistory[termIndex] = term;
30
+ } else {
31
+ searchHistory.unshift(term);
32
+ }
33
+ while (searchHistory.length > 20) {
34
+ searchHistory.pop();
35
+ }
36
+ }
37
+ return response;
38
+ };
39
+ class SearchEngine {
40
+ url;
41
+ fields;
42
+ term = ref("");
43
+ params = shallowReactive({});
44
+ pageSize = ref(24);
45
+ pageNumber = ref(1);
46
+ products = shallowReactive([]);
47
+ #search;
48
+ constructor({
49
+ fields,
50
+ url = "search/v1",
51
+ debounce = 150
52
+ } = {}) {
53
+ this.fields = fields;
54
+ this.url = url;
55
+ this.products = shallowReactive([]);
56
+ this.#search = useDebounceFn(search, debounce);
57
+ watch([this.term, this.params], () => {
58
+ this.pageNumber.value = 1;
59
+ });
60
+ }
61
+ async fetch(term) {
62
+ if (term && term !== this.term.value) {
63
+ this.term.value = term;
64
+ this.pageNumber.value = 1;
65
+ }
66
+ const limit = this.pageSize.value;
67
+ const offset = limit * (this.pageNumber.value - 1);
68
+ const response = await this.#search({
69
+ term: this.term.value,
70
+ params: {
71
+ limit,
72
+ offset,
73
+ ...this.params
74
+ },
75
+ url: this.url,
76
+ fields: this.fields
77
+ });
78
+ if (response) {
79
+ const { data } = response;
80
+ if (data.meta) {
81
+ this.products.splice(0);
82
+ }
83
+ data.result.forEach((item) => this.products.push(item));
84
+ }
85
+ }
86
+ }
87
+
88
+ const _sfc_main = /* @__PURE__ */ defineComponent({
89
+ __name: "SearchModal",
90
+ props: {
91
+ term: {}
92
+ },
93
+ setup(__props, { expose: __expose }) {
94
+ __expose();
95
+ const props = __props;
96
+ const searchEngine = new SearchEngine();
97
+ watch(toRef(props, "term"), (term) => searchEngine.fetch(term));
98
+ const __returned__ = { props, searchEngine, get searchHistory() {
99
+ return searchHistory;
100
+ }, ProductShelf };
101
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
102
+ return __returned__;
103
+ }
104
+ });
105
+ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
106
+ const _component_Carousel = resolveComponent("Carousel");
107
+ _push(`<article${ssrRenderAttrs(_attrs)}><nav class="bg-base-100/80 p-4 backdrop-blur-md lg:rounded">`);
108
+ _push(ssrRenderComponent(_component_Carousel, {
109
+ class: "gap-2 px-6",
110
+ "wrapper-key": $props.term
111
+ }, {
112
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
113
+ if (_push2) {
114
+ _push2(`<!--[-->`);
115
+ ssrRenderList($setup.searchHistory, (term, i) => {
116
+ _push2(`<li class="shrink-0"${_scopeId}>${ssrInterpolate(term)}</li>`);
117
+ });
118
+ _push2(`<!--]-->`);
119
+ } else {
120
+ return [
121
+ (openBlock(true), createBlock(Fragment, null, renderList($setup.searchHistory, (term, i) => {
122
+ return openBlock(), createBlock("li", {
123
+ key: i,
124
+ class: "shrink-0"
125
+ }, toDisplayString(term), 1);
126
+ }), 128))
127
+ ];
128
+ }
129
+ }),
130
+ _: 1
131
+ }, _parent));
132
+ _push(`</nav>`);
133
+ _push(ssrRenderComponent($setup["ProductShelf"], {
134
+ products: $setup.searchEngine.products,
135
+ class: "rounded bg-white"
136
+ }, null, _parent));
137
+ _push(`</article>`);
138
+ }
139
+ const _sfc_setup = _sfc_main.setup;
140
+ _sfc_main.setup = (props, ctx) => {
141
+ const ssrContext = useSSRContext();
142
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/SearchModal.vue");
143
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
144
+ };
145
+ const SearchModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
146
+
147
+ export { SearchModal as default };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/__e7ddf925.mjs').then(n => n.j);
4
+ const page = () => import('./pages/__93ade2dd.mjs').then(n => n.m);
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/account_f14e6f5a.mjs');
4
+ const page = () => import('./pages/account_e5d410a7.mjs');
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/index_b300d887.mjs').then(n => n.a);
4
+ const page = () => import('./pages/index_7e25afc1.mjs').then(n => n.a);
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/index_b300d887.mjs').then(n => n.i);
4
+ const page = () => import('./pages/index_7e25afc1.mjs').then(n => n.i);
5
5
 
6
6
  export { page };
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/node_2b0cb889.mjs');
4
+ const page = () => import('./pages/node_bd378ac0.mjs');
5
5
 
6
6
  export { page };
@@ -11,9 +11,9 @@ import 'clsx';
11
11
  import mime from 'mime/lite.js';
12
12
  import { i as isESMImportedImage, g as getImage$1 } from '../astro/assets-service_a9d9ab5f.mjs';
13
13
  import imageSize from 'image-size';
14
- import { reactive, computed, shallowRef, useSSRContext, defineComponent, resolveComponent, mergeProps, withCtx, withDirectives, createVNode, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, watch, ref, toRef, nextTick, withModifiers, renderSlot as renderSlot$1, Teleport, resolveDynamicComponent, onMounted, createTextVNode, toDisplayString, defineAsyncComponent, Suspense, createSlots, shallowReactive, withAsyncContext, inject, provide } from 'vue';
14
+ import { reactive, computed, shallowRef, useSSRContext, defineComponent, resolveComponent, mergeProps, withCtx, withDirectives, createVNode, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, watch, ref, toRef, nextTick, withModifiers, renderSlot as renderSlot$1, Teleport, resolveDynamicComponent, onMounted, createTextVNode, toDisplayString, defineAsyncComponent, vModelText, Suspense, createSlots, shallowReactive, withAsyncContext, inject, provide } from 'vue';
15
15
  import { ssrRenderAttrs, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrRenderClass, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderSlot, ssrRenderTeleport, ssrRenderVNode, ssrInterpolate, ssrRenderSuspense } from 'vue/server-renderer';
16
- import { watchDebounced, useDebounceFn, useTimeout, promiseTimeout, onClickOutside, watchOnce, useElementHover, useUrlSearchParams } from '@vueuse/core';
16
+ import { watchDebounced, useDebounceFn, useTimeout, promiseTimeout, onClickOutside, watchOnce, useElementHover, createReusableTemplate, useUrlSearchParams } from '@vueuse/core';
17
17
  import mitt from 'mitt';
18
18
  import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/vue';
19
19
 
@@ -296,7 +296,7 @@ const loadRouteContext = async (Astro, {
296
296
  const { slug } = Astro.params;
297
297
  if (isHomepage) {
298
298
  cmsContent = await config.getContent("pages/home");
299
- } else if (slug) {
299
+ } else if (slug && typeof slug === "string") {
300
300
  if (contentCollection) {
301
301
  cmsContent = await config.getContent(`${contentCollection}/${slug}`);
302
302
  } else if (slug.startsWith("_api/") || slug === "_analytics") {
@@ -1739,10 +1739,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1739
1739
  __name: "Drawer",
1740
1740
  props: {
1741
1741
  modelValue: { type: Boolean, default: false },
1742
+ isHidden: { type: Boolean, default: false },
1742
1743
  placement: { default: "start" },
1743
1744
  position: { default: "fixed" },
1744
1745
  animation: { default: "slide" },
1745
1746
  hasCloseButton: { type: Boolean, default: true },
1747
+ anchorEl: {},
1746
1748
  backdropTarget: { default: "#teleported-top" },
1747
1749
  maxWidth: {},
1748
1750
  class: {}
@@ -1756,6 +1758,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1756
1758
  const drawer = ref(null);
1757
1759
  const outsideClickListener = (ev) => {
1758
1760
  if (!drawer.value?.contains(ev.target)) {
1761
+ if (props.anchorEl?.contains(ev.target))
1762
+ return;
1759
1763
  close();
1760
1764
  }
1761
1765
  };
@@ -1839,7 +1843,12 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1839
1843
  default: withCtx((_, _push2, _parent2, _scopeId) => {
1840
1844
  if (_push2) {
1841
1845
  if ($props.modelValue) {
1842
- _push2(`<dialog class="${ssrRenderClass([[
1846
+ _push2(`<dialog style="${ssrRenderStyle([
1847
+ !$props.isHidden ? null : { display: "none" },
1848
+ {
1849
+ maxWidth: $props.maxWidth ? `min(${$props.maxWidth}, calc(100vw - ${$setup.scrollbarWidth}px))` : !$setup.isPlacementX ? `calc(100vw - ${$setup.scrollbarWidth}px)` : void 0
1850
+ }
1851
+ ])}" class="${ssrRenderClass([[
1843
1852
  $props.position,
1844
1853
  $setup.isPlacementX ? "m-0" : "mx-auto",
1845
1854
  $setup.isPlacementX && !$props.maxWidth ? "max-w-sm" : null,
@@ -1848,9 +1857,7 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1848
1857
  $setup.isFixed && $props.placement === "end" ? "left-auto right-0" : null,
1849
1858
  $setup.animationClassName,
1850
1859
  ...$setup.customClassList
1851
- ], "z-40 w-screen p-0"])}" style="${ssrRenderStyle({
1852
- maxWidth: $props.maxWidth ? `min(${$props.maxWidth}, calc(100vw - ${$setup.scrollbarWidth}px))` : !$setup.isPlacementX ? `calc(100vw - ${$setup.scrollbarWidth}px)` : void 0
1853
- })}"${ssrIncludeBooleanAttr($props.modelValue) ? " open" : ""}${ssrRenderAttr("data-drawer", $props.placement)}${_scopeId}><div class="relative h-full"${_scopeId}>`);
1860
+ ], "z-40 w-screen p-0"])}"${ssrIncludeBooleanAttr($props.modelValue) ? " open" : ""}${ssrRenderAttr("data-drawer", $props.placement)}${_scopeId}><div class="relative h-full"${_scopeId}>`);
1854
1861
  if ($props.hasCloseButton) {
1855
1862
  _push2(`<button type="button"${ssrRenderAttr("aria-label", "Fechar")} class="${ssrRenderClass([$props.placement === "end" ? "left-2" : "right-2", "absolute top-2 z-30"])}" data-drawer-close${_scopeId}>`);
1856
1863
  ssrRenderSlot(_ctx.$slots, "close", {}, () => {
@@ -1862,35 +1869,39 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1862
1869
  }
1863
1870
  ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
1864
1871
  _push2(`</div>`);
1865
- ssrRenderTeleport(_push2, (_push3) => {
1866
- _push3(ssrRenderComponent(_component_Fade, null, {
1867
- default: withCtx((_2, _push4, _parent3, _scopeId2) => {
1868
- if (_push4) {
1869
- if ($props.modelValue) {
1870
- _push4(`<div class="fixed left-0 top-0 z-30 h-screen w-screen bg-black/50" data-drawer-backdrop${_scopeId2}></div>`);
1872
+ if ($props.backdropTarget) {
1873
+ ssrRenderTeleport(_push2, (_push3) => {
1874
+ _push3(ssrRenderComponent(_component_Fade, null, {
1875
+ default: withCtx((_2, _push4, _parent3, _scopeId2) => {
1876
+ if (_push4) {
1877
+ if ($props.modelValue && !$props.isHidden) {
1878
+ _push4(`<div class="fixed left-0 top-0 z-30 h-screen w-screen bg-black/50" data-drawer-backdrop${_scopeId2}></div>`);
1879
+ } else {
1880
+ _push4(`<!---->`);
1881
+ }
1871
1882
  } else {
1872
- _push4(`<!---->`);
1883
+ return [
1884
+ $props.modelValue && !$props.isHidden ? (openBlock(), createBlock("div", {
1885
+ key: 0,
1886
+ class: "fixed left-0 top-0 z-30 h-screen w-screen bg-black/50",
1887
+ "data-drawer-backdrop": ""
1888
+ })) : createCommentVNode("", true)
1889
+ ];
1873
1890
  }
1874
- } else {
1875
- return [
1876
- $props.modelValue ? (openBlock(), createBlock("div", {
1877
- key: 0,
1878
- class: "fixed left-0 top-0 z-30 h-screen w-screen bg-black/50",
1879
- "data-drawer-backdrop": ""
1880
- })) : createCommentVNode("", true)
1881
- ];
1882
- }
1883
- }),
1884
- _: 1
1885
- }, _parent2, _scopeId));
1886
- }, $props.backdropTarget, false, _parent2);
1891
+ }),
1892
+ _: 1
1893
+ }, _parent2, _scopeId));
1894
+ }, $props.backdropTarget, false, _parent2);
1895
+ } else {
1896
+ _push2(`<!---->`);
1897
+ }
1887
1898
  _push2(`</dialog>`);
1888
1899
  } else {
1889
1900
  _push2(`<!---->`);
1890
1901
  }
1891
1902
  } else {
1892
1903
  return [
1893
- $props.modelValue ? (openBlock(), createBlock("dialog", {
1904
+ $props.modelValue ? withDirectives((openBlock(), createBlock("dialog", {
1894
1905
  key: 0,
1895
1906
  ref: "drawer",
1896
1907
  class: ["z-40 w-screen p-0", [
@@ -1924,10 +1935,13 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1924
1935
  ], 10, ["onClick"])) : createCommentVNode("", true),
1925
1936
  renderSlot$1(_ctx.$slots, "default")
1926
1937
  ]),
1927
- (openBlock(), createBlock(Teleport, { to: $props.backdropTarget }, [
1938
+ $props.backdropTarget ? (openBlock(), createBlock(Teleport, {
1939
+ key: 0,
1940
+ to: $props.backdropTarget
1941
+ }, [
1928
1942
  createVNode(_component_Fade, null, {
1929
1943
  default: withCtx(() => [
1930
- $props.modelValue ? (openBlock(), createBlock("div", {
1944
+ $props.modelValue && !$props.isHidden ? (openBlock(), createBlock("div", {
1931
1945
  key: 0,
1932
1946
  class: "fixed left-0 top-0 z-30 h-screen w-screen bg-black/50",
1933
1947
  "data-drawer-backdrop": ""
@@ -1935,8 +1949,10 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
1935
1949
  ]),
1936
1950
  _: 1
1937
1951
  })
1938
- ], 8, ["to"]))
1939
- ], 14, ["open", "data-drawer"])) : createCommentVNode("", true)
1952
+ ], 8, ["to"])) : createCommentVNode("", true)
1953
+ ], 14, ["open", "data-drawer"])), [
1954
+ [vShow, !$props.isHidden]
1955
+ ]) : createCommentVNode("", true)
1940
1956
  ];
1941
1957
  }
1942
1958
  }),
@@ -3412,8 +3428,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
3412
3428
  },
3413
3429
  setup(__props, { expose: __expose }) {
3414
3430
  __expose();
3415
- const SearchModal = defineAsyncComponent(() => import('../SearchModal_930845a4.mjs'));
3416
- const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_6cb69be3.mjs'));
3431
+ const SearchModal = defineAsyncComponent(() => import('../SearchModal_f66549d4.mjs'));
3432
+ const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_eab28771.mjs'));
3417
3433
  const props = __props;
3418
3434
  const header = ref(null);
3419
3435
  const {
@@ -3428,6 +3444,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
3428
3444
  watchOnce(isSearchOpen, () => {
3429
3445
  isSearchOpenOnce.value = true;
3430
3446
  });
3447
+ const searchTerm = ref("");
3448
+ const searchInput = ref(null);
3449
+ const toggleSearch = (ev) => {
3450
+ isSearchOpen.value = !isSearchOpen.value;
3451
+ if (isSearchOpen.value) {
3452
+ ev.preventDefault();
3453
+ nextTick(() => searchInput.value?.focus());
3454
+ } else if (!searchTerm.value) {
3455
+ ev.preventDefault();
3456
+ }
3457
+ };
3431
3458
  const isCartOpen = ref(false);
3432
3459
  const isCartOpenOnce = ref(false);
3433
3460
  watchOnce(isCartOpen, () => {
@@ -3448,12 +3475,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
3448
3475
  delayedTotalItems.value = newTotalItems;
3449
3476
  }, { immediate: true });
3450
3477
  });
3451
- const __returned__ = { SearchModal, CartSidebar, props, header, isSticky, positionY, categoryTrees, inlineMenuTrees, isSidenavOpen, isSearchOpen, isSearchOpenOnce, isCartOpen, isCartOpenOnce, isMounted, delayedTotalItems, Drawer, ShopSidenav, ShopHeaderMenu, AccountMenu };
3478
+ const __returned__ = { SearchModal, CartSidebar, props, header, isSticky, positionY, categoryTrees, inlineMenuTrees, isSidenavOpen, isSearchOpen, isSearchOpenOnce, searchTerm, searchInput, toggleSearch, isCartOpen, isCartOpenOnce, isMounted, delayedTotalItems, Drawer, ShopSidenav, ShopHeaderMenu, AccountMenu };
3452
3479
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
3453
3480
  return __returned__;
3454
3481
  }
3455
3482
  });
3456
3483
  function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
3484
+ const _component_Fade = resolveComponent("Fade");
3457
3485
  const _component_Skeleton = resolveComponent("Skeleton");
3458
3486
  _push(`<header${ssrRenderAttrs(mergeProps({
3459
3487
  ref: "header",
@@ -3467,7 +3495,40 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3467
3495
  ], "text-3xl transition-colors"])}"></i></button></div>`);
3468
3496
  ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
3469
3497
  _push(ssrRenderComponent($setup["ShopHeaderMenu"], mergeProps({ class: "hidden lg:block" }, { inlineMenuTrees: $setup.inlineMenuTrees }), null, _parent));
3470
- _push(`<div class="text-base-800 flex basis-1/4 items-center justify-end gap-3 px-2 lg:gap-4"><a href="/s"${ssrRenderAttr("aria-label", "Buscar produtos")} role="button"><i class="i-magnifying-glass hover:text-primary h-7 w-7 hover:scale-110 active:scale-125"></i></a>`);
3498
+ _push(`<div class="text-base-800 flex basis-1/4 items-center justify-end gap-3 px-2 lg:gap-4"><form action="/s" method="get" class="relative"><label for="HeaderSearch" class="sr-only">${ssrInterpolate("Buscar produtos")}</label>`);
3499
+ _push(ssrRenderComponent(_component_Fade, null, {
3500
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
3501
+ if (_push2) {
3502
+ _push2(`<div style="${ssrRenderStyle($setup.isSearchOpen ? null : { display: "none" })}" class="absolute -right-0.5 -top-2 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="term"${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>`);
3503
+ } else {
3504
+ return [
3505
+ withDirectives(createVNode("div", { class: "absolute -right-0.5 -top-2 flex items-stretch" }, [
3506
+ createVNode("div", { class: "hidden w-12 bg-gradient-to-r from-transparent to-white sm:block" }),
3507
+ withDirectives(createVNode("input", {
3508
+ ref: "searchInput",
3509
+ type: "search",
3510
+ id: "HeaderSearch",
3511
+ name: "term",
3512
+ "onUpdate:modelValue": ($event) => $setup.searchTerm = $event,
3513
+ 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",
3514
+ placeholder: `${"Buscar produtos"} ...`
3515
+ }, null, 8, ["onUpdate:modelValue", "placeholder"]), [
3516
+ [
3517
+ vModelText,
3518
+ $setup.searchTerm,
3519
+ void 0,
3520
+ { trim: true }
3521
+ ]
3522
+ ])
3523
+ ], 512), [
3524
+ [vShow, $setup.isSearchOpen]
3525
+ ])
3526
+ ];
3527
+ }
3528
+ }),
3529
+ _: 1
3530
+ }, _parent));
3531
+ _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>`);
3471
3532
  _push(ssrRenderComponent($setup["AccountMenu"], { class: "hidden sm:block" }, {
3472
3533
  button: withCtx(({ open }, _push2, _parent2, _scopeId) => {
3473
3534
  if (_push2) {
@@ -3514,7 +3575,9 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3514
3575
  _push(ssrRenderComponent($setup["Drawer"], {
3515
3576
  modelValue: $setup.isSearchOpen,
3516
3577
  "onUpdate:modelValue": ($event) => $setup.isSearchOpen = $event,
3578
+ "is-hidden": !$setup.searchTerm || $setup.searchTerm.length < 2,
3517
3579
  "has-close-button": false,
3580
+ "anchor-el": $setup.searchInput?.parentElement,
3518
3581
  placement: "top",
3519
3582
  animation: "scale",
3520
3583
  "max-width": "55rem",
@@ -3534,7 +3597,7 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3534
3597
  },
3535
3598
  default: () => {
3536
3599
  if ($setup.isSearchOpenOnce) {
3537
- _push2(ssrRenderComponent($setup["SearchModal"], null, null, _parent2, _scopeId));
3600
+ _push2(ssrRenderComponent($setup["SearchModal"], { term: $setup.searchTerm }, null, _parent2, _scopeId));
3538
3601
  } else {
3539
3602
  _push2(`<!---->`);
3540
3603
  }
@@ -3554,7 +3617,10 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
3554
3617
  ])
3555
3618
  ]),
3556
3619
  default: withCtx(() => [
3557
- $setup.isSearchOpenOnce ? (openBlock(), createBlock($setup["SearchModal"], { key: 0 })) : createCommentVNode("", true)
3620
+ $setup.isSearchOpenOnce ? (openBlock(), createBlock($setup["SearchModal"], {
3621
+ key: 0,
3622
+ term: $setup.searchTerm
3623
+ }, null, 8, ["term"])) : createCommentVNode("", true)
3558
3624
  ]),
3559
3625
  _: 1
3560
3626
  }))
@@ -4860,11 +4926,11 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4860
4926
  _push(`<article${ssrRenderAttrs(mergeProps({
4861
4927
  ref: "card",
4862
4928
  "data-sku": $setup.product.sku,
4863
- class: "group relative mx-auto h-full max-w-[350px] py-3"
4929
+ class: "group relative mx-auto h-full max-w-[350px] px-0.5 py-3 hover:z-[1]"
4864
4930
  }, _attrs))}>`);
4865
4931
  _push(ssrRenderComponent(_component_ALink, {
4866
4932
  href: $setup.link,
4867
- class: "flex h-full flex-col overflow-hidden rounded ring-black/5 group-hover:shadow group-hover:ring-1"
4933
+ class: "flex h-full flex-col overflow-hidden rounded bg-white ring-black/5 group-hover:shadow group-hover:ring-1"
4868
4934
  }, {
4869
4935
  default: withCtx((_, _push2, _parent2, _scopeId) => {
4870
4936
  if (_push2) {
@@ -4895,7 +4961,7 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4895
4961
  } else {
4896
4962
  _push2(`<!---->`);
4897
4963
  }
4898
- _push2(`<div class="relative z-10 flex grow flex-col justify-between bg-white/40 p-4 group-hover:backdrop-blur-md"${_scopeId}>`);
4964
+ _push2(`<div class="relative z-10 flex grow flex-col justify-between p-4"${_scopeId}>`);
4899
4965
  ssrRenderVNode(_push2, createVNode(resolveDynamicComponent($props.headingTag), {
4900
4966
  class: ["ui-link line-clamp-2 no-underline", [
4901
4967
  $setup.isActive ? "text-base-700" : "text-base-500",
@@ -4961,7 +5027,7 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
4961
5027
  createVNode("strong", null, toDisplayString($setup.discountPercentage), 1),
4962
5028
  createTextVNode("% ")
4963
5029
  ])) : createCommentVNode("", true),
4964
- createVNode("div", { class: "relative z-10 flex grow flex-col justify-between bg-white/40 p-4 group-hover:backdrop-blur-md" }, [
5030
+ createVNode("div", { class: "relative z-10 flex grow flex-col justify-between p-4" }, [
4965
5031
  (openBlock(), createBlock(resolveDynamicComponent($props.headingTag), {
4966
5032
  class: ["ui-link line-clamp-2 no-underline", [
4967
5033
  $setup.isActive ? "text-base-700" : "text-base-500",
@@ -5022,6 +5088,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5022
5088
  __expose();
5023
5089
  let __temp, __restore;
5024
5090
  const props = __props;
5091
+ const [
5092
+ DefineCarouselControl,
5093
+ ReuseCarouselControl
5094
+ ] = createReusableTemplate();
5025
5095
  const {
5026
5096
  title,
5027
5097
  titleLink,
@@ -5032,7 +5102,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5032
5102
  [__temp, __restore] = withAsyncContext(() => fetching), await __temp, __restore();
5033
5103
  }
5034
5104
  const listName = title.value || `Shelf ${useId()}`;
5035
- const __returned__ = { props, title, titleLink, fetching, products, listName, ProductCard };
5105
+ const __returned__ = { props, DefineCarouselControl, ReuseCarouselControl, title, titleLink, fetching, products, listName, ProductCard };
5036
5106
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
5037
5107
  return __returned__;
5038
5108
  }
@@ -5066,24 +5136,44 @@ function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
5066
5136
  _push(ssrRenderComponent(_component_Carousel, { class: "group/shelf" }, {
5067
5137
  controls: withCtx((_, _push2, _parent2, _scopeId) => {
5068
5138
  if (_push2) {
5069
- _push2(`<div style="${ssrRenderStyle($setup.products.length > 2 ? null : { display: "none" })}" class="text-primary text-3xl leading-none transition-opacity group-hover/shelf:opacity-90 lg:text-2xl lg:opacity-0"${_scopeId}>`);
5070
- _push2(ssrRenderComponent(_component_CarouselControl, {
5071
- class: "lg:hover:bg-primary-300/60 !-left-4 !top-1/2 h-12 w-12 rounded-full bg-transparent ring-black/5 lg:bg-white/80 lg:shadow-sm lg:ring-1",
5072
- "is-prev": ""
5073
- }, null, _parent2, _scopeId));
5074
- _push2(ssrRenderComponent(_component_CarouselControl, { class: "lg:hover:bg-primary-300/60 !-right-4 !top-1/2 h-12 w-12 rounded-full bg-transparent ring-black/5 lg:bg-white/80 lg:shadow-sm lg:ring-1" }, null, _parent2, _scopeId));
5075
- _push2(`</div>`);
5139
+ _push2(ssrRenderComponent($setup["DefineCarouselControl"], null, {
5140
+ default: withCtx(({ isPrev }, _push3, _parent3, _scopeId2) => {
5141
+ if (_push3) {
5142
+ _push3(ssrRenderComponent(_component_CarouselControl, {
5143
+ style: $setup.products.length > 2 ? null : { display: "none" },
5144
+ class: ["uno-nxxji7", isPrev ? "!-left-4" : "!-right-4"],
5145
+ "is-prev": isPrev
5146
+ }, null, _parent3, _scopeId2));
5147
+ } else {
5148
+ return [
5149
+ withDirectives(createVNode(_component_CarouselControl, {
5150
+ class: ["uno-nxxji7", isPrev ? "!-left-4" : "!-right-4"],
5151
+ "is-prev": isPrev
5152
+ }, null, 8, ["class", "is-prev"]), [
5153
+ [vShow, $setup.products.length > 2]
5154
+ ])
5155
+ ];
5156
+ }
5157
+ }),
5158
+ _: 1
5159
+ }, _parent2, _scopeId));
5160
+ _push2(ssrRenderComponent($setup["ReuseCarouselControl"], { "is-prev": true }, null, _parent2, _scopeId));
5161
+ _push2(ssrRenderComponent($setup["ReuseCarouselControl"], null, null, _parent2, _scopeId));
5076
5162
  } else {
5077
5163
  return [
5078
- withDirectives(createVNode("div", { class: "text-primary text-3xl leading-none transition-opacity group-hover/shelf:opacity-90 lg:text-2xl lg:opacity-0" }, [
5079
- createVNode(_component_CarouselControl, {
5080
- class: "lg:hover:bg-primary-300/60 !-left-4 !top-1/2 h-12 w-12 rounded-full bg-transparent ring-black/5 lg:bg-white/80 lg:shadow-sm lg:ring-1",
5081
- "is-prev": ""
5082
- }),
5083
- createVNode(_component_CarouselControl, { class: "lg:hover:bg-primary-300/60 !-right-4 !top-1/2 h-12 w-12 rounded-full bg-transparent ring-black/5 lg:bg-white/80 lg:shadow-sm lg:ring-1" })
5084
- ], 512), [
5085
- [vShow, $setup.products.length > 2]
5086
- ])
5164
+ createVNode($setup["DefineCarouselControl"], null, {
5165
+ default: withCtx(({ isPrev }) => [
5166
+ withDirectives(createVNode(_component_CarouselControl, {
5167
+ class: ["uno-nxxji7", isPrev ? "!-left-4" : "!-right-4"],
5168
+ "is-prev": isPrev
5169
+ }, null, 8, ["class", "is-prev"]), [
5170
+ [vShow, $setup.products.length > 2]
5171
+ ])
5172
+ ]),
5173
+ _: 1
5174
+ }),
5175
+ createVNode($setup["ReuseCarouselControl"], { "is-prev": true }),
5176
+ createVNode($setup["ReuseCarouselControl"])
5087
5177
  ];
5088
5178
  }
5089
5179
  }),
@@ -6264,4 +6354,4 @@ const ____slug_ = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
6264
6354
  url: $$url
6265
6355
  }, Symbol.toStringTag, { value: 'Module' }));
6266
6356
 
6267
- export { $$BaseHead as $, Banner as B, CheckoutLink as C, FooterStamps as F, Prices as P, QuantitySelector as Q, _export_sfc as _, $$Picture as a, $$Base as b, $$BannerPictures as c, $$Sections as d, $$PageHeader as e, $$PageFooter as f, assetsDir as g, freeShippingFromValue as h, imageConfig as i, ____slug_ as j, loadRouteContext as l, parseProduct as p, removeCartItem as r, shoppingCart as s, totalItems as t, usePageHero as u };
6357
+ export { $$BaseHead as $, Banner as B, CheckoutLink as C, FooterStamps as F, ProductShelf as P, QuantitySelector as Q, _export_sfc as _, $$Picture as a, $$Base as b, $$BannerPictures as c, $$Sections as d, $$PageHeader as e, $$PageFooter as f, assetsDir as g, useStorage as h, imageConfig as i, Prices as j, freeShippingFromValue as k, loadRouteContext as l, ____slug_ as m, parseProduct as p, removeCartItem as r, shoppingCart as s, totalItems as t, usePageHero as u };
@@ -1,5 +1,5 @@
1
1
  import { e as createAstro, f as createComponent, r as renderTemplate, h as addAttribute, i as renderComponent, m as maybeRenderHead } from '../astro_d98f7186.mjs';
2
- import { l as loadRouteContext, $ as $$BaseHead, a as $$Picture, b as $$Base } from './__e7ddf925.mjs';
2
+ import { l as loadRouteContext, $ as $$BaseHead, a as $$Picture, b as $$Base } from './__93ade2dd.mjs';
3
3
 
4
4
  const $$Astro = createAstro("https://demo.ecomplus.app");
5
5
  const $$Account = createComponent(async ($$result, $$props, $$slots) => {
@@ -1,5 +1,5 @@
1
1
  import { e as createAstro, f as createComponent, r as renderTemplate, m as maybeRenderHead, i as renderComponent, h as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro_d98f7186.mjs';
2
- import { _ as _export_sfc, B as Banner, u as usePageHero, c as $$BannerPictures, d as $$Sections, l as loadRouteContext, $ as $$BaseHead, e as $$PageHeader, f as $$PageFooter, b as $$Base, F as FooterStamps, a as $$Picture } from './__e7ddf925.mjs';
2
+ import { _ as _export_sfc, B as Banner, u as usePageHero, c as $$BannerPictures, d as $$Sections, l as loadRouteContext, $ as $$BaseHead, e as $$PageHeader, f as $$PageFooter, b as $$Base, F as FooterStamps, a as $$Picture } from './__93ade2dd.mjs';
3
3
  import 'clsx';
4
4
  import { useSSRContext, defineComponent, ref, onMounted, resolveComponent, mergeProps, withCtx, createVNode, withDirectives, vShow, renderSlot, openBlock, createBlock, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
5
5
  import { ssrRenderAttrs, ssrRenderComponent, ssrRenderStyle, ssrRenderClass, ssrRenderList, ssrRenderSlot, ssrInterpolate } from 'vue/server-renderer';
@@ -3,7 +3,7 @@ import { readFile } from 'fs/promises';
3
3
  import mime from 'mime/lite.js';
4
4
  import 'os';
5
5
  import { a as getConfiguredImageService, b as isRemoteAllowed } from '../astro/assets-service_a9d9ab5f.mjs';
6
- import { i as imageConfig, g as assetsDir } from './__e7ddf925.mjs';
6
+ import { i as imageConfig, g as assetsDir } from './__93ade2dd.mjs';
7
7
 
8
8
  const fnv1a52 = (str) => {
9
9
  const len = str.length;
@@ -1,5 +1,5 @@
1
1
  import { e as createAstro, f as createComponent, r as renderTemplate, m as maybeRenderHead, h as addAttribute, i as renderComponent } from '../astro_d98f7186.mjs';
2
- import { l as loadRouteContext, $ as $$BaseHead, e as $$PageHeader, b as $$Base } from './__e7ddf925.mjs';
2
+ import { l as loadRouteContext, $ as $$BaseHead, e as $$PageHeader, b as $$Base } from './__93ade2dd.mjs';
3
3
  import 'clsx';
4
4
 
5
5
  const $$Astro$1 = createAstro("https://demo.ecomplus.app");
@@ -1,6 +1,6 @@
1
1
  export { renderers } from '../renderers.mjs';
2
2
  export { onRequest } from '../_empty-middleware.mjs';
3
3
 
4
- const page = () => import('./pages/~fallback_2bbdf875.mjs');
4
+ const page = () => import('./pages/~fallback_73578d2f.mjs');
5
5
 
6
6
  export { page };