cloudcommerce 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-apps.yml +3 -3
- package/CHANGELOG.md +12 -0
- package/action.yml +6 -6
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/ci/bunny-config-base.sh +4 -2
- package/packages/cli/config/firestore.rules +3 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +11 -5
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +11 -8
- package/packages/storefront/dist/client/_astro/AccountPage.3-eqV6OR.js +1 -0
- package/packages/storefront/dist/client/_astro/CartSidebar.-Gy6eqIy.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.ju9TsLrJ.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.yqD9ycx5.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.xI1rdM1e.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.ATGXfGhG.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.b77WjhZZ.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.qbTNzuvn.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.v7L8EYOR.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.WzDMBjqi.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchShowcase.9gIA4Cq0.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.Ee4OJr3q.js +7 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.SO-0jCqa.js → _plugin-vue_export-helper.xATGHWd9.js} +2 -2
- package/packages/storefront/dist/client/_astro/{_slug_.4W7qhV-L.css → _slug_.WkuZ8tvp.css} +1 -1
- package/packages/storefront/dist/client/_astro/afetch.OifQZgwR.js +1 -0
- package/packages/storefront/dist/client/_astro/client.YJ00ta5M.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.dSYHWdP4.js +7 -0
- package/packages/storefront/dist/client/_astro/format-money.1_HtF5S2.js +1 -0
- package/packages/storefront/dist/client/_astro/grid-title.pK2Nn3i-.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.d2SGwVMl.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.x1b7VHef.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.xTPkED8g.js +1 -0
- package/packages/storefront/dist/client/_astro/i18n.zhlBzJt8.js +1 -0
- package/packages/storefront/dist/client/_astro/img.AnjeGdy_.js +1 -0
- package/packages/storefront/dist/client/_astro/index.KfrHdfOH.js +1 -0
- package/packages/storefront/dist/client/_astro/index.ShNlAyu1.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.HP6478mG.js +1 -0
- package/packages/storefront/dist/client/_astro/name.VA3MEpe0.js +1 -0
- package/packages/storefront/dist/client/_astro/server-data.4C60Esyt.js +1 -0
- package/packages/storefront/dist/client/_astro/sf-utils.c42cbZ9W.js +13 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.v-dB3kHB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-analytics._ef6TM4P.js +1 -0
- package/packages/storefront/dist/client/_astro/use-product-card.nNtSJVtB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-text-value.0OP9HCfP.js +4 -0
- package/packages/storefront/dist/client/{~fallback/index.html → ~fallback.html} +5 -5
- package/packages/storefront/dist/client/{index.html → ~index.html} +7 -7
- package/packages/storefront/dist/server/_noop-middleware.mjs +3 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_yYIzwp_R.mjs → CartSidebar_blvgfFa-.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_GvRUZ6ce.mjs → SearchModal_Sktaq643.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/_.._yTK2xBRC.mjs +5 -0
- package/packages/storefront/dist/server/chunks/_page__9PfWVh79.mjs +5 -0
- package/packages/storefront/dist/server/chunks/account_R4bpY7O1.mjs +5 -0
- package/packages/storefront/dist/server/chunks/astro/{assets-service_yXRChsFH.mjs → assets-service_oQ4-9MNg.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{astro_F4pl3toV.mjs → astro_ECsNQeA2.mjs} +18 -14
- package/packages/storefront/dist/server/chunks/index__PeYBuja.mjs +5 -0
- package/packages/storefront/dist/server/chunks/node_njrZIjT6.mjs +5 -0
- package/packages/storefront/dist/server/chunks/pages/{__z8Igc_-f.mjs → __XOsz50la.mjs} +994 -922
- package/packages/storefront/dist/server/chunks/pages/{_page__-V1Q-Ymk.mjs → _page__cIw_KTpN.mjs} +14 -12
- package/packages/storefront/dist/server/chunks/pages/{account_frSUn7gD.mjs → account_l-FHyDJd.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{index_QqJiJpFy.mjs → index_KP7Gn0ld.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{node_FoDIj_f7.mjs → node_FoLtkdH1.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/pages/{~fallback_t0lNhRm9.mjs → ~fallback_KPp6Nh_p.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/~fallback_p7P7NIL5.mjs +5 -0
- package/packages/storefront/dist/server/entry.mjs +289 -166
- package/packages/storefront/dist/server/manifest_E6KbHQrT.mjs +202 -0
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/dist/server/static-builds.csv +34 -34
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/lib/scripts/git-cms-auth.ts +3 -0
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +6 -1
- package/packages/storefront/src/lib/scripts/sso-ecom.ts +0 -0
- package/packages/storefront/src/lib/ssr-context.ts +3 -1
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/AccountPage.HcKW6HTE.js +0 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.osvr0MUo.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.I5mC8JdX.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.xC4J7MDy.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.Jt09rVKv.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.oouZY3cL.js +0 -7
- package/packages/storefront/dist/client/_astro/ProductShelf.dYlXuNId.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.vGE0E3Qf.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.OL4MN-C_.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.d8lbvLay.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchShowcase.ynowXX4j.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.l4KJGvUd.js +0 -7
- package/packages/storefront/dist/client/_astro/afetch.5c8VmT0-.js +0 -1
- package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.TRPGDX3c.js +0 -7
- package/packages/storefront/dist/client/_astro/format-money.iK5LGydz.js +0 -1
- package/packages/storefront/dist/client/_astro/grid-title.vGKBy72g.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.8pwSenCN.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.SLwcAI01.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.gqV7f6f3.js +0 -1
- package/packages/storefront/dist/client/_astro/i18n.Lxnz1oF-.js +0 -1
- package/packages/storefront/dist/client/_astro/img.WnsidxCx.js +0 -1
- package/packages/storefront/dist/client/_astro/index.R7A-Pg5V.js +0 -1
- package/packages/storefront/dist/client/_astro/index.q6KIyKlJ.js +0 -1
- package/packages/storefront/dist/client/_astro/modules-info.WWsUqEPZ.js +0 -1
- package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +0 -13
- package/packages/storefront/dist/client/_astro/sf-utils.luvTU5uS.js +0 -1
- package/packages/storefront/dist/client/_astro/shopping-cart.ATTXCPd0.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.WpkjGsWi.js +0 -1
- package/packages/storefront/dist/client/_astro/use-product-card.BhUXhJIp.js +0 -1
- package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +0 -4
- package/packages/storefront/dist/client/app/account/index.html +0 -58
- package/packages/storefront/dist/client/app/index.html +0 -98
- package/packages/storefront/dist/client/blog/1/index.html +0 -86
- package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -93
- package/packages/storefront/dist/client/monitores-gamer/index.html +0 -95
- package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -93
- package/packages/storefront/dist/client/p/contato/index.html +0 -90
- package/packages/storefront/dist/client/p/terms/index.html +0 -101
- package/packages/storefront/dist/client/posts/3/index.html +0 -101
- package/packages/storefront/dist/client/posts/4/index.html +0 -101
- package/packages/storefront/dist/server/_empty-middleware.mjs +0 -3
- package/packages/storefront/dist/server/chunks/_.._Lq3r7hpv.mjs +0 -6
- package/packages/storefront/dist/server/chunks/_page__LqbeNfr1.mjs +0 -6
- package/packages/storefront/dist/server/chunks/account_4n4rpirV.mjs +0 -6
- package/packages/storefront/dist/server/chunks/index_SwXtE1IM.mjs +0 -6
- package/packages/storefront/dist/server/chunks/node_Nzz44v5l.mjs +0 -6
- package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +0 -6
- package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +0 -196
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import '@astrojs/internal-helpers/path';
|
|
2
|
+
import 'cookie';
|
|
3
|
+
import { bold, red, yellow, dim, blue } from 'kleur/colors';
|
|
4
|
+
import 'string-width';
|
|
5
|
+
import './chunks/astro_ECsNQeA2.mjs';
|
|
6
|
+
import 'clsx';
|
|
7
|
+
import 'cssesc';
|
|
8
|
+
import { compile } from 'path-to-regexp';
|
|
9
|
+
|
|
10
|
+
const dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
11
|
+
hour: "2-digit",
|
|
12
|
+
minute: "2-digit",
|
|
13
|
+
second: "2-digit",
|
|
14
|
+
hour12: false
|
|
15
|
+
});
|
|
16
|
+
const levels = {
|
|
17
|
+
debug: 20,
|
|
18
|
+
info: 30,
|
|
19
|
+
warn: 40,
|
|
20
|
+
error: 50,
|
|
21
|
+
silent: 90
|
|
22
|
+
};
|
|
23
|
+
function log(opts, level, label, message, newLine = true) {
|
|
24
|
+
const logLevel = opts.level;
|
|
25
|
+
const dest = opts.dest;
|
|
26
|
+
const event = {
|
|
27
|
+
label,
|
|
28
|
+
level,
|
|
29
|
+
message,
|
|
30
|
+
newLine
|
|
31
|
+
};
|
|
32
|
+
if (!isLogLevelEnabled(logLevel, level)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
dest.write(event);
|
|
36
|
+
}
|
|
37
|
+
function isLogLevelEnabled(configuredLogLevel, level) {
|
|
38
|
+
return levels[configuredLogLevel] <= levels[level];
|
|
39
|
+
}
|
|
40
|
+
function info(opts, label, message, newLine = true) {
|
|
41
|
+
return log(opts, "info", label, message, newLine);
|
|
42
|
+
}
|
|
43
|
+
function warn(opts, label, message, newLine = true) {
|
|
44
|
+
return log(opts, "warn", label, message, newLine);
|
|
45
|
+
}
|
|
46
|
+
function error(opts, label, message, newLine = true) {
|
|
47
|
+
return log(opts, "error", label, message, newLine);
|
|
48
|
+
}
|
|
49
|
+
function debug(...args) {
|
|
50
|
+
if ("_astroGlobalDebug" in globalThis) {
|
|
51
|
+
globalThis._astroGlobalDebug(...args);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function getEventPrefix({ level, label }) {
|
|
55
|
+
const timestamp = `${dateTimeFormat.format(/* @__PURE__ */ new Date())}`;
|
|
56
|
+
const prefix = [];
|
|
57
|
+
if (level === "error" || level === "warn") {
|
|
58
|
+
prefix.push(bold(timestamp));
|
|
59
|
+
prefix.push(`[${level.toUpperCase()}]`);
|
|
60
|
+
} else {
|
|
61
|
+
prefix.push(timestamp);
|
|
62
|
+
}
|
|
63
|
+
if (label) {
|
|
64
|
+
prefix.push(`[${label}]`);
|
|
65
|
+
}
|
|
66
|
+
if (level === "error") {
|
|
67
|
+
return red(prefix.join(" "));
|
|
68
|
+
}
|
|
69
|
+
if (level === "warn") {
|
|
70
|
+
return yellow(prefix.join(" "));
|
|
71
|
+
}
|
|
72
|
+
if (prefix.length === 1) {
|
|
73
|
+
return dim(prefix[0]);
|
|
74
|
+
}
|
|
75
|
+
return dim(prefix[0]) + " " + blue(prefix.splice(1).join(" "));
|
|
76
|
+
}
|
|
77
|
+
if (typeof process !== "undefined") {
|
|
78
|
+
let proc = process;
|
|
79
|
+
if ("argv" in proc && Array.isArray(proc.argv)) {
|
|
80
|
+
if (proc.argv.includes("--verbose")) ; else if (proc.argv.includes("--silent")) ; else ;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
class Logger {
|
|
84
|
+
options;
|
|
85
|
+
constructor(options) {
|
|
86
|
+
this.options = options;
|
|
87
|
+
}
|
|
88
|
+
info(label, message, newLine = true) {
|
|
89
|
+
info(this.options, label, message, newLine);
|
|
90
|
+
}
|
|
91
|
+
warn(label, message, newLine = true) {
|
|
92
|
+
warn(this.options, label, message, newLine);
|
|
93
|
+
}
|
|
94
|
+
error(label, message, newLine = true) {
|
|
95
|
+
error(this.options, label, message, newLine);
|
|
96
|
+
}
|
|
97
|
+
debug(label, ...messages) {
|
|
98
|
+
debug(label, ...messages);
|
|
99
|
+
}
|
|
100
|
+
level() {
|
|
101
|
+
return this.options.level;
|
|
102
|
+
}
|
|
103
|
+
forkIntegrationLogger(label) {
|
|
104
|
+
return new AstroIntegrationLogger(this.options, label);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
class AstroIntegrationLogger {
|
|
108
|
+
options;
|
|
109
|
+
label;
|
|
110
|
+
constructor(logging, label) {
|
|
111
|
+
this.options = logging;
|
|
112
|
+
this.label = label;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates a new logger instance with a new label, but the same log options.
|
|
116
|
+
*/
|
|
117
|
+
fork(label) {
|
|
118
|
+
return new AstroIntegrationLogger(this.options, label);
|
|
119
|
+
}
|
|
120
|
+
info(message) {
|
|
121
|
+
info(this.options, this.label, message);
|
|
122
|
+
}
|
|
123
|
+
warn(message) {
|
|
124
|
+
warn(this.options, this.label, message);
|
|
125
|
+
}
|
|
126
|
+
error(message) {
|
|
127
|
+
error(this.options, this.label, message);
|
|
128
|
+
}
|
|
129
|
+
debug(message) {
|
|
130
|
+
debug(this.label, message);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function getRouteGenerator(segments, addTrailingSlash) {
|
|
135
|
+
const template = segments.map((segment) => {
|
|
136
|
+
return "/" + segment.map((part) => {
|
|
137
|
+
if (part.spread) {
|
|
138
|
+
return `:${part.content.slice(3)}(.*)?`;
|
|
139
|
+
} else if (part.dynamic) {
|
|
140
|
+
return `:${part.content}`;
|
|
141
|
+
} else {
|
|
142
|
+
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
143
|
+
}
|
|
144
|
+
}).join("");
|
|
145
|
+
}).join("");
|
|
146
|
+
let trailing = "";
|
|
147
|
+
if (addTrailingSlash === "always" && segments.length) {
|
|
148
|
+
trailing = "/";
|
|
149
|
+
}
|
|
150
|
+
const toPath = compile(template + trailing);
|
|
151
|
+
return toPath;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function deserializeRouteData(rawRouteData) {
|
|
155
|
+
return {
|
|
156
|
+
route: rawRouteData.route,
|
|
157
|
+
type: rawRouteData.type,
|
|
158
|
+
pattern: new RegExp(rawRouteData.pattern),
|
|
159
|
+
params: rawRouteData.params,
|
|
160
|
+
component: rawRouteData.component,
|
|
161
|
+
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
|
|
162
|
+
pathname: rawRouteData.pathname || void 0,
|
|
163
|
+
segments: rawRouteData.segments,
|
|
164
|
+
prerender: rawRouteData.prerender,
|
|
165
|
+
redirect: rawRouteData.redirect,
|
|
166
|
+
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
|
|
167
|
+
fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
|
|
168
|
+
return deserializeRouteData(fallback);
|
|
169
|
+
}),
|
|
170
|
+
isIndex: rawRouteData.isIndex
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function deserializeManifest(serializedManifest) {
|
|
175
|
+
const routes = [];
|
|
176
|
+
for (const serializedRoute of serializedManifest.routes) {
|
|
177
|
+
routes.push({
|
|
178
|
+
...serializedRoute,
|
|
179
|
+
routeData: deserializeRouteData(serializedRoute.routeData)
|
|
180
|
+
});
|
|
181
|
+
const route = serializedRoute;
|
|
182
|
+
route.routeData = deserializeRouteData(serializedRoute.routeData);
|
|
183
|
+
}
|
|
184
|
+
const assets = new Set(serializedManifest.assets);
|
|
185
|
+
const componentMetadata = new Map(serializedManifest.componentMetadata);
|
|
186
|
+
const clientDirectives = new Map(serializedManifest.clientDirectives);
|
|
187
|
+
return {
|
|
188
|
+
// in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
|
|
189
|
+
middleware(_, next) {
|
|
190
|
+
return next();
|
|
191
|
+
},
|
|
192
|
+
...serializedManifest,
|
|
193
|
+
assets,
|
|
194
|
+
componentMetadata,
|
|
195
|
+
clientDirectives,
|
|
196
|
+
routes
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const manifest = deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/astro@4.3.1_@types+node@18.19.10_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.x1b7VHef.js"}],"styles":[{"type":"external","src":"/_astro/_slug_.WkuZ8tvp.css"}],"routeData":{"route":"/~fallback","isIndex":false,"type":"page","pattern":"^\\/~fallback\\/?$","segments":[[{"content":"~fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/~fallback.astro","pathname":"/~fallback","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.xTPkED8g.js"}],"styles":[{"type":"external","src":"/_astro/_slug_.WkuZ8tvp.css"}],"routeData":{"route":"/app","isIndex":true,"type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d2SGwVMl.js"}],"styles":[{"type":"external","src":"/_astro/_slug_.WkuZ8tvp.css"}],"routeData":{"route":"/app/account","isIndex":false,"type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d2SGwVMl.js"}],"styles":[{"type":"external","src":"/_astro/_slug_.WkuZ8tvp.css"}],"routeData":{"route":"/blog/[page]","isIndex":false,"type":"page","pattern":"^\\/blog\\/([^/]+?)\\/?$","segments":[[{"content":"blog","dynamic":false,"spread":false}],[{"content":"page","dynamic":true,"spread":false}]],"params":["page"],"component":"src/pages/blog/[page].astro","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d2SGwVMl.js"}],"styles":[{"type":"external","src":"/_astro/_slug_.WkuZ8tvp.css"}],"routeData":{"route":"/[...slug]","isIndex":false,"type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}}],"site":"https://demo.ecomplus.app","base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro",{"propagation":"in-tree","containsHead":false}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/[...slug]@_@astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astrojs-ssr-virtual-entry",{"propagation":"in-tree","containsHead":false}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/account.astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/app/account@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/app/index@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/blog/[page].astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/blog/[page]@_@astro",{"propagation":"in-tree","containsHead":false}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/~fallback.astro",{"propagation":"in-tree","containsHead":false}],["\u0000@astro-page:src/pages/~fallback@_@astro",{"propagation":"in-tree","containsHead":false}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var l=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let a of e)if(a.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=l;window.dispatchEvent(new Event(\"astro:visible\"));})();"],["context","(()=>{var a=(s,o)=>{let n=async()=>{await(await s())()},r=()=>{let t=Array.isArray(o.value)?o.value:[o.value];for(let e=0;e<t.length;e++)if(typeof t[e]==\"string\"&&t[e].startsWith(\"data:\")){let d=t[e].substring(5);if(!window.$storefront?.data?.[d]){window.addEventListener(`storefront:data:${d}`,r,{once:!0});return}}if(t.includes(\"idle\")){if(typeof window.requestIdleCallback==\"function\"){setTimeout(()=>window.requestIdleCallback(n),9);return}setTimeout(n,200);return}n()},i=window.$storefront?.apiContext?.doc._id||null;if(window._firstLoadContextId===i&&window._emitedContextId===i){console.log(\"[ctx] first load\"),r(),document.addEventListener(\"astro:beforeload\",()=>{delete window._firstLoadContextId},{once:!0});return}window.addEventListener(\"storefront:apiContext\",r,{once:!0})};(self.Astro||(self.Astro={})).context=a;window.dispatchEvent(new Event(\"astro:context\"));})();\n"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000noop-middleware":"_noop-middleware.mjs","/src/pages/blog/[page].astro":"chunks/pages/_page__cIw_KTpN.mjs","/src/pages/app/account.astro":"chunks/pages/account_l-FHyDJd.mjs","/src/pages/app/index.astro":"chunks/pages/index_KP7Gn0ld.mjs","/../../node_modules/.pnpm/astro@4.3.1_@types+node@18.19.10_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js":"chunks/pages/node_FoLtkdH1.mjs","/src/pages/~fallback.astro":"chunks/pages/~fallback_KPp6Nh_p.mjs","\u0000@astrojs-manifest":"manifest_E6KbHQrT.mjs","\u0000@astro-page:../../node_modules/.pnpm/astro@4.3.1_@types+node@18.19.10_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node@_@js":"chunks/node_njrZIjT6.mjs","\u0000@astro-page:src/pages/~fallback@_@astro":"chunks/~fallback_p7P7NIL5.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index__PeYBuja.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account_R4bpY7O1.mjs","\u0000@astro-page:src/pages/blog/[page]@_@astro":"chunks/_page__9PfWVh79.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_.._yTK2xBRC.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/SearchModal.vue":"_astro/SearchModal.WzDMBjqi.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/CartSidebar.vue":"_astro/CartSidebar.-Gy6eqIy.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/photoswipe/dist/photoswipe.css?inline":"_astro/photoswipe.0V7m2jWu.js","/astro/hoisted.js?q=1":"_astro/hoisted.x1b7VHef.js","~/components/AccountPage.vue":"_astro/AccountPage.3-eqV6OR.js","~/components/HeroSlider.vue":"_astro/HeroSlider.ju9TsLrJ.js","/astro/hoisted.js?q=0":"_astro/hoisted.xTPkED8g.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/photoswipe/dist/photoswipe-lightbox.esm.js":"_astro/photoswipe-lightbox.esm.dZBqKD9u.js","~/components/PitchBar.vue":"_astro/PitchBar.yqD9ycx5.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.VduCDgof.js","~/components/ProductShelf.vue":"_astro/ProductShelf.b77WjhZZ.js","/astro/hoisted.js?q=2":"_astro/hoisted.d2SGwVMl.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/photoswipe/dist/photoswipe.esm.js":"_astro/photoswipe.esm.Ylh9TGkz.js","~/components/ProductDetails.vue":"_astro/ProductDetails.ATGXfGhG.js","~/components/ShopHeader.vue":"_astro/ShopHeader.Ee4OJr3q.js","@astrojs/vue/client.js":"_astro/client.YJ00ta5M.js","~/components/SearchShowcase.vue":"_astro/SearchShowcase.9gIA4Cq0.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_slug_.WkuZ8tvp.css","/robots.txt","/_astro/AccountPage.3-eqV6OR.js","/_astro/CartSidebar.-Gy6eqIy.js","/_astro/HeroSlider.ju9TsLrJ.js","/_astro/PitchBar.yqD9ycx5.js","/_astro/Prices.xI1rdM1e.js","/_astro/ProductDetails.ATGXfGhG.js","/_astro/ProductShelf.b77WjhZZ.js","/_astro/ProductShelf.qbTNzuvn.js","/_astro/QuantitySelector.v7L8EYOR.js","/_astro/SearchModal.WzDMBjqi.js","/_astro/SearchShowcase.9gIA4Cq0.js","/_astro/ShopHeader.Ee4OJr3q.js","/_astro/_plugin-vue_export-helper.xATGHWd9.js","/_astro/afetch.OifQZgwR.js","/_astro/client.YJ00ta5M.js","/_astro/customer-session.dSYHWdP4.js","/_astro/firebase-app.VduCDgof.js","/_astro/format-money.1_HtF5S2.js","/_astro/grid-title.pK2Nn3i-.js","/_astro/hoisted.d2SGwVMl.js","/_astro/hoisted.x1b7VHef.js","/_astro/hoisted.xTPkED8g.js","/_astro/i18n.zhlBzJt8.js","/_astro/img-sizes.gxAI9JNh.js","/_astro/img.AnjeGdy_.js","/_astro/index-dd468b12.fl8bpn8l.js","/_astro/index.KfrHdfOH.js","/_astro/index.ShNlAyu1.js","/_astro/modules-info.HP6478mG.js","/_astro/name.VA3MEpe0.js","/_astro/photoswipe-lightbox.esm.dZBqKD9u.js","/_astro/photoswipe.0V7m2jWu.js","/_astro/photoswipe.esm.Ylh9TGkz.js","/_astro/price.Easct8WC.js","/_astro/server-data.4C60Esyt.js","/_astro/sf-utils.c42cbZ9W.js","/_astro/shopping-cart.v-dB3kHB.js","/_astro/use-analytics._ef6TM4P.js","/_astro/use-product-card.nNtSJVtB.js","/_astro/use-text-value.0OP9HCfP.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"],"buildFormat":"directory"});
|
|
201
|
+
|
|
202
|
+
export { AstroIntegrationLogger as A, Logger as L, getEventPrefix as g, levels as l, manifest };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, createSSRApp } from 'vue';
|
|
2
2
|
import { renderToString } from 'vue/server-renderer';
|
|
3
|
-
import { m as mod, n as createApp } from './chunks/pages/
|
|
3
|
+
import { m as mod, n as createApp } from './chunks/pages/__XOsz50la.mjs';
|
|
4
4
|
|
|
5
5
|
const setup = async (app) => {
|
|
6
6
|
if ('default' in mod) {
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/_astro/AccountPage.
|
|
2
|
-
/_astro/afetch.
|
|
3
|
-
/_astro/CartSidebar.
|
|
4
|
-
/_astro/client.
|
|
5
|
-
/_astro/customer-session.
|
|
1
|
+
/_astro/AccountPage.3-eqV6OR.js
|
|
2
|
+
/_astro/afetch.OifQZgwR.js
|
|
3
|
+
/_astro/CartSidebar.-Gy6eqIy.js
|
|
4
|
+
/_astro/client.YJ00ta5M.js
|
|
5
|
+
/_astro/customer-session.dSYHWdP4.js
|
|
6
6
|
/_astro/ecom-icon_12falx.png
|
|
7
7
|
/_astro/ecom-icon_15pqnO.png
|
|
8
8
|
/_astro/ecom-icon_t3guw.png
|
|
9
9
|
/_astro/firebase-app.VduCDgof.js
|
|
10
|
-
/_astro/format-money.
|
|
11
|
-
/_astro/grid-title.
|
|
10
|
+
/_astro/format-money.1_HtF5S2.js
|
|
11
|
+
/_astro/grid-title.pK2Nn3i-.js
|
|
12
12
|
/_astro/headphone_T2Jjc.avif
|
|
13
13
|
/_astro/headphone_Z1CG18r.webp
|
|
14
|
-
/_astro/HeroSlider.
|
|
15
|
-
/_astro/hoisted.
|
|
16
|
-
/_astro/hoisted.
|
|
17
|
-
/_astro/hoisted.
|
|
18
|
-
/_astro/i18n.
|
|
14
|
+
/_astro/HeroSlider.ju9TsLrJ.js
|
|
15
|
+
/_astro/hoisted.d2SGwVMl.js
|
|
16
|
+
/_astro/hoisted.x1b7VHef.js
|
|
17
|
+
/_astro/hoisted.xTPkED8g.js
|
|
18
|
+
/_astro/i18n.zhlBzJt8.js
|
|
19
|
+
/_astro/img.AnjeGdy_.js
|
|
19
20
|
/_astro/img-sizes.gxAI9JNh.js
|
|
20
|
-
/_astro/img.WnsidxCx.js
|
|
21
21
|
/_astro/index-dd468b12.fl8bpn8l.js
|
|
22
|
-
/_astro/index.
|
|
23
|
-
/_astro/index.
|
|
22
|
+
/_astro/index.KfrHdfOH.js
|
|
23
|
+
/_astro/index.ShNlAyu1.js
|
|
24
24
|
/_astro/logo_1UBsBq.webp
|
|
25
25
|
/_astro/logo_Z1K5PE9.png
|
|
26
26
|
/_astro/logo_Z1KIIl1.avif
|
|
27
|
-
/_astro/modules-info.
|
|
28
|
-
/_astro/name.
|
|
27
|
+
/_astro/modules-info.HP6478mG.js
|
|
28
|
+
/_astro/name.VA3MEpe0.js
|
|
29
29
|
/_astro/passion_LHbe9.webp
|
|
30
30
|
/_astro/passion_Z23MeUb.avif
|
|
31
31
|
/_astro/photoswipe.0V7m2jWu.js
|
|
32
32
|
/_astro/photoswipe.esm.Ylh9TGkz.js
|
|
33
33
|
/_astro/photoswipe-lightbox.esm.dZBqKD9u.js
|
|
34
|
-
/_astro/PitchBar.
|
|
35
|
-
/_astro/_plugin-vue_export-helper.
|
|
34
|
+
/_astro/PitchBar.yqD9ycx5.js
|
|
35
|
+
/_astro/_plugin-vue_export-helper.xATGHWd9.js
|
|
36
36
|
/_astro/price.Easct8WC.js
|
|
37
|
-
/_astro/Prices.
|
|
38
|
-
/_astro/ProductDetails.
|
|
39
|
-
/_astro/ProductShelf.
|
|
40
|
-
/_astro/ProductShelf.
|
|
41
|
-
/_astro/QuantitySelector.
|
|
37
|
+
/_astro/Prices.xI1rdM1e.js
|
|
38
|
+
/_astro/ProductDetails.ATGXfGhG.js
|
|
39
|
+
/_astro/ProductShelf.b77WjhZZ.js
|
|
40
|
+
/_astro/ProductShelf.qbTNzuvn.js
|
|
41
|
+
/_astro/QuantitySelector.v7L8EYOR.js
|
|
42
42
|
/_astro/rect8589_1f5opX.webp
|
|
43
43
|
/_astro/rect8589_1TtOHY.png
|
|
44
44
|
/_astro/rect8589_IUskt.webp
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
/_astro/rect859_ZkpPFI.webp
|
|
60
60
|
/_astro/rect89_1TSfW7.avif
|
|
61
61
|
/_astro/rect89_Z1re32x.webp
|
|
62
|
-
/_astro/
|
|
63
|
-
/_astro/
|
|
64
|
-
/_astro/
|
|
65
|
-
/_astro/sf-utils.
|
|
66
|
-
/_astro/ShopHeader.
|
|
67
|
-
/_astro/shopping-cart.
|
|
68
|
-
/_astro/_slug_.
|
|
69
|
-
/_astro/use-analytics.
|
|
70
|
-
/_astro/use-product-card.
|
|
71
|
-
/_astro/use-text-value.
|
|
62
|
+
/_astro/SearchModal.WzDMBjqi.js
|
|
63
|
+
/_astro/SearchShowcase.9gIA4Cq0.js
|
|
64
|
+
/_astro/server-data.4C60Esyt.js
|
|
65
|
+
/_astro/sf-utils.c42cbZ9W.js
|
|
66
|
+
/_astro/ShopHeader.Ee4OJr3q.js
|
|
67
|
+
/_astro/shopping-cart.v-dB3kHB.js
|
|
68
|
+
/_astro/_slug_.WkuZ8tvp.css
|
|
69
|
+
/_astro/use-analytics._ef6TM4P.js
|
|
70
|
+
/_astro/use-product-card.nNtSJVtB.js
|
|
71
|
+
/_astro/use-text-value.0OP9HCfP.js
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint:fix": "eslint -c ../eslint/storefront.staged.eslintrc.cjs src/lib/**/*.{ts,vue,astro} --fix"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@astrojs/node": "8.
|
|
33
|
+
"@astrojs/node": "8.2.0",
|
|
34
34
|
"@astrojs/vue": "4.0.8",
|
|
35
35
|
"@cloudcommerce/api": "workspace:*",
|
|
36
36
|
"@cloudcommerce/config": "workspace:*",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@types/gtag.js": "^0.0.18",
|
|
44
44
|
"@vite-pwa/astro": "^0.2.0",
|
|
45
45
|
"@vueuse/core": "10.7.2",
|
|
46
|
-
"astro": "4.
|
|
46
|
+
"astro": "4.3.1",
|
|
47
47
|
"astro-capo": "^0.0.1",
|
|
48
48
|
"chroma-js": "^2.4.2",
|
|
49
49
|
"dotenv": "^16.4.1",
|
|
@@ -11,6 +11,8 @@ import afetch from '../../helpers/afetch';
|
|
|
11
11
|
import parseGtagToFbq from '../../analytics/event-to-fbq';
|
|
12
12
|
import parseGtagToTtq from '../../analytics/event-to-ttq';
|
|
13
13
|
|
|
14
|
+
const deployRand = import.meta.env.DEPLOY_RAND || '_';
|
|
15
|
+
|
|
14
16
|
type AnalyticsEvent = {
|
|
15
17
|
type: 'gtag' | 'fbq' | 'ttq',
|
|
16
18
|
name: string,
|
|
@@ -32,7 +34,10 @@ const sendServerEvent = (analyticsEvent: AnalyticsEvent) => {
|
|
|
32
34
|
_sendServerEvents();
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
if (
|
|
37
|
+
if (
|
|
38
|
+
!import.meta.env.SSR
|
|
39
|
+
&& !window.location.search.includes(`__isrV=${deployRand}`)
|
|
40
|
+
) {
|
|
36
41
|
useAnalytics();
|
|
37
42
|
watchGtagEvents(async (evMessage) => {
|
|
38
43
|
const { name, params } = evMessage.event;
|
|
File without changes
|
|
@@ -221,7 +221,9 @@ const loadRouteContext = async (
|
|
|
221
221
|
} else {
|
|
222
222
|
Astro.locals.assetsPrefix = '';
|
|
223
223
|
}
|
|
224
|
-
if (
|
|
224
|
+
if (isPreview) {
|
|
225
|
+
setResponseCache(Astro, 0);
|
|
226
|
+
} else if (urlPath === '/~fallback') {
|
|
225
227
|
setResponseCache(Astro, 3600, 86400);
|
|
226
228
|
} else if (isHomepage) {
|
|
227
229
|
setResponseCache(Astro, 180);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as P,a as A,v as M,w as k}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{e as T,f as _,E as V,a as R,d as I}from"./customer-session.TRPGDX3c.js";import{u as j}from"./index.R7A-Pg5V.js";import{g as B,b as O,c as q}from"./index-dd468b12.fl8bpn8l.js";import{b as D}from"./index.q6KIyKlJ.js";import{a as f,w as h,d as C,c as z,M as F,N as l,O as c,Z as N,R as i,S as b,P as r,Q as S,W as x,T as E,U as L,V as U,a2 as W,a3 as Y,X as G,Y as K}from"./runtime-core.esm-bundler.XTSAdOlw.js";import"./sf-utils.luvTU5uS.js";const Q=m=>{T();const s=m?.canUseUrlParams!==!1?j("history"):{},e=s.sign_up!==void 0&&s.sign_up!=="0",a=s.password!==void 0&&s.password!=="0",u=f(e),n=f(!e&&!a);h(u,p=>{p?(n.value=!0,s.sign_up="1"):s.sign_up="0"}),h(n,p=>{s.password=p?"0":"1"});const o=f(""),d=f(!1),g=D(async p=>{d.value=!0;const v=Date.now(),y=B();if(_.value){window.localStorage.setItem(V,_.value);try{if(n.value){const w=new URL(p||window.location.toString());w.searchParams.append("email",_.value),await O(y,_.value,{url:w.toString(),handleCodeInApp:!0})}else await q(y,_.value,o.value)}catch(w){console.warn(w.code),console.error(w)}setTimeout(()=>{d.value=!1},Math.min(2e3-(Date.now()-v),1))}},2e3);return{isLinkSignIn:n,isSignUp:u,email:_,password:o,isSubmitting:d,submitLogin:g}},X=C({__name:"LoginForm",props:{loginLinkActionUrl:{}},setup(m,{expose:t}){t();const{isLinkSignIn:s,isSignUp:e,email:a,password:u,isSubmitting:n,submitLogin:o}=Q(),d=f(!1),g=f(0),p=z(()=>g.value>9);h(n,()=>{!n.value&&s.value&&(d.value=!0,g.value+=1)}),h([a,e],()=>{d.value=!1}),h(p,()=>{s.value=!1});const v={isLinkSignIn:s,isSignUp:e,email:a,password:u,isSubmitting:n,submitLogin:o,isEmailSentMsg:d,countEmailsSent:g,isLinkSignInBlocked:p,get customerName(){return R}};return Object.defineProperty(v,"__isScriptSetup",{enumerable:!1,value:!0}),v}}),Z={class:"text-base-600 mb-4 text-2xl font-light"},$={key:0},H={key:1,class:"lowercase"},J={key:0,for:"login-form-email"},ee={class:"relative"},se=["disabled"],te={key:0,class:"text-success-800 absolute left-0 top-0 mt-4 font-medium"},ne=i("i",{class:"i-check mr-1"},null,-1);function ie(m,t,s,e,a,u){const n=F("Fade");return l(),c("form",{class:"text-base-800 w-full max-w-sm bg-white p-6 text-base md:p-8",onSubmit:t[4]||(t[4]=k(()=>e.submitLogin(s.loginLinkActionUrl),["prevent"]))},[N(m.$slots,"head"),i("p",Z,[b(r("Olá")+" "),e.customerName?(l(),c("span",$,r(e.customerName),1)):(l(),c("span",H,r("Visitante")))]),e.isLinkSignIn?(l(),c("label",J,r("Enviar link de acesso por e-mail"))):S("",!0),x(i("input",{id:"login-form-email",type:"email",placeholder:"email@mail.com","onUpdate:modelValue":t[0]||(t[0]=o=>e.email=o),class:"mb-0.5 mt-2 w-full",required:""},null,512),[[A,e.email]]),e.isLinkSignIn?S("",!0):x((l(),c("input",{key:1,type:"password",placeholder:"Senha","onUpdate:modelValue":t[1]||(t[1]=o=>e.password=o),class:"mb-0.5 mt-2 w-full lowercase",required:""},null,512)),[[A,e.password]]),i("div",ee,[i("div",{class:E(["transition-opacity",e.isEmailSentMsg&&"opacity-0 invisible"])},[x(i("a",{href:"?password",class:"text-base-500 ui-link text-right text-sm lowercase",onClick:t[2]||(t[2]=k(o=>e.isLinkSignIn=!e.isLinkSignIn,["prevent"]))},r(e.isLinkSignIn?"Entrar com senha":"Esqueci minha senha"),513),[[M,!e.isSignUp&&!e.isLinkSignInBlocked]]),i("button",{type:"submit",disabled:e.isSubmitting,class:E(["ui-btn-lg ui-btn-primary mb-2 mt-5 w-full",e.isSubmitting&&"opacity-50"])},r(e.isSignUp?"Cadastrar":"Acessar minha conta"),11,se)],2),L(n,{speed:"slow"},{default:U(()=>[e.isEmailSentMsg?(l(),c("p",te,[ne,b(" "+r("Te enviamos o e-mail, verifique sua caixa de entrada e spam se necessário."),1)])):S("",!0)]),_:1}),i("a",{href:"?sign_up",class:"ui-btn-lg ui-btn-contrast block w-full text-center",onClick:t[3]||(t[3]=k(o=>e.isSignUp=!e.isSignUp,["prevent"]))},r(e.isSignUp?"Acessar minha conta":"Criar uma conta"),1)])],32)}const ae=P(X,[["render",ie]]),oe=C({__name:"AccountPage",setup(m,{expose:t}){t();let s=null;{const{location:a}=window,u=new URLSearchParams(a.search).get("return_url");if(!u){const n=new URL(a.toString());n.pathname="/app/",n.hash=`#${a.pathname.replace("/app/","/")}`,s=n.toString()}h(I,()=>{I.value&&(a.href=u||s)},{immediate:!0})}const e={get loginLinkActionUrl(){return s},set loginLinkActionUrl(a){s=a},LoginForm:ae};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),re={class:"from-secondary-700 to-secondary-950 flex min-h-screen w-full flex-col justify-center bg-gradient-to-br"},le={class:"mx-auto p-4"},ce=i("section",{class:"ui-section text-center"},[i("a",{href:"/",class:"text-base-200 hover:text-white"},[i("i",{class:"i-arrow-right mr-1 rotate-180"}),b(" "+r("Ir para a loja"))])],-1),me={class:"overflow-hidden rounded-md shadow-md ring-4 ring-black/10"},ue={class:"mb-5 text-center"},de={href:"/",class:"inline-block"},pe={key:0,class:"ui-section px-0"},ge={class:"mx-auto flex max-w-sm flex-wrap items-center justify-evenly gap-4 px-3"};function _e(m,t,s,e,a,u){const n=F("ALink");return l(),c("article",re,[i("div",le,[ce,i("section",me,[L(e.LoginForm,W(Y({loginLinkActionUrl:e.loginLinkActionUrl})),{head:U(()=>[i("div",ue,[i("a",de,[N(m.$slots,"logo")])])]),_:3},16)]),m.$settings.serviceLinks?.length?(l(),c("nav",pe,[i("ul",ge,[(l(!0),c(G,null,K(m.$settings.serviceLinks,({title:o,href:d},g)=>(l(),c("li",{key:`s-${g}`},[L(n,{href:d,class:"text-base-200 ui-link hover:text-white"},{default:U(()=>[b(r(o),1)]),_:2},1032,["href"])]))),128))])])):S("",!0)])])}const xe=P(oe,[["render",_e]]);export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as b,w as x}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{f as C}from"./modules-info.WWsUqEPZ.js";import{p as I,r as S,s as w,t as V}from"./shopping-cart.ATTXCPd0.js";import{Q as P,C as F}from"./QuantitySelector.OL4MN-C_.js";import{P as v}from"./Prices.Jt09rVKv.js";import{c as p,d as y,M as f,N as i,O as m,U as d,V as k,$ as z,Q as h,P as o,R as t,S as g,X as j,Y as N}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{g as A}from"./name.urFqJ5yn.js";import{g as L}from"./img.WnsidxCx.js";import"./afetch.5c8VmT0-.js";import"./sf-utils.luvTU5uS.js";import"./format-money.iK5LGydz.js";import"./price.Easct8WC.js";import"./customer-session.TRPGDX3c.js";import"./index.q6KIyKlJ.js";import"./i18n.Lxnz1oF-.js";const q=a=>{const s=p(()=>!a.item&&a.product?I(a.product):null),r=p(()=>a.item||s.value),e=p(()=>A(r.value)),n=p(()=>{const{slug:l}=r.value;return typeof l=="string"?`/${l}`:null}),u=p(()=>{if(r.value.picture)return L(r.value.picture,void 0,a.pictureSize||"small")}),c=p(()=>r.value.final_price||r.value.price);return{cartItem:r,title:e,link:n,image:u,finalPrice:c}},B=y({__name:"CartItem",props:{item:{},product:{},pictureSize:{}},setup(a,{expose:s}){s();const r=a,{cartItem:e,title:n,link:u,image:c,finalPrice:l}=q(r),_={props:r,cartItem:e,title:n,link:u,image:c,finalPrice:l,get removeCartItem(){return S},QuantitySelector:P,Prices:v};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Q={class:"relative bg-white shadow-sm"},E={class:"text-base-700 group-hover:text-base-900 flex-auto py-2 text-sm group-hover:underline"},M=t("span",{class:"border-3 border-danger-700/30 text-danger-800 flex size-5 flex-col justify-center rounded-full text-sm leading-none"},[t("i",{class:"i-close mx-auto my-0"})],-1),O=[M],R={class:"border-base-100 flex items-center justify-between border-t-2"},U={class:"border-base-100 border-r-2"};function D(a,s,r,e,n,u){const c=f("AImg"),l=f("ALink");return i(),m("article",Q,[d(l,{href:e.link,class:"group flex items-center gap-5 p-4"},{default:k(()=>[e.image?(i(),z(c,{key:0,picture:e.image,alt:e.title,class:"size-20 object-cover"},null,8,["picture","alt"])):h("",!0),t("p",E,o(e.title),1)]),_:1},8,["href"]),e.cartItem._id?(i(),m("button",{key:0,onClick:s[0]||(s[0]=x(_=>e.removeCartItem(e.cartItem._id),["stop"])),class:"absolute right-0 top-0 p-2 opacity-70 hover:opacity-100","aria-label":"Remover"},O)):h("",!0),t("div",R,[t("div",U,[d(e.QuantitySelector,{modelValue:e.cartItem.quantity,"onUpdate:modelValue":s[1]||(s[1]=_=>e.cartItem.quantity=_),min:e.cartItem.min_quantity,max:e.cartItem.max_quantity},null,8,["modelValue","min","max"])]),d(e.Prices,{"base-price":e.cartItem.base_price,price:e.finalPrice,"has-cashback":!1,"has-price-options":!1,class:"px-4 py-2.5 text-right text-[95%]"},null,8,["base-price","price"])])])}const T=b(B,[["render",D]]),X=y({__name:"CartSidebar",emits:["close"],setup(a,{expose:s,emit:r}){s();const n={emit:r,get freeShippingFromValue(){return C},get shoppingCart(){return w},get totalItems(){return V},CheckoutLink:F,Prices:v,CartItem:T};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),Y={class:"flex h-screen flex-col bg-white"},G={class:"z-10 flex items-center justify-end gap-3 px-6 py-4 shadow ring-1 ring-black/5"},H=t("span",{class:"text-base-600 text-right text-base font-medium"},o("Meu carrinho de compras"),-1),J={class:"min-w-[3rem] text-right"},K={class:"ui-badge-pill-lg"},W={class:"bg-base-50 grow overflow-y-auto"},Z={key:0,class:"text-center text-sm"},$={key:0,class:"secondary-subtle p-3"},ee=t("strong",{class:"lowercase"},o("Frete grátis"),-1),te={key:1,class:"bg-success-50 text-success-800 p-3"},re=t("i",{class:"text-success-900 i-check mr-1"},null,-1),se={class:"px-4 pb-2 pt-4"},ae={class:"z-10 px-5 pb-3 pt-4 ring-2 ring-black/5"},oe={class:"grid grid-cols-5 items-center gap-3 text-right"},ie=t("div",{class:"col-span-2"},o("Subtotal"),-1),ne=t("i",{class:"i-check mr-2"},null,-1),ce=t("i",{class:"i-arrow-right mr-1 rotate-180"},null,-1);function le(a,s,r,e,n,u){return i(),m("aside",Y,[t("header",G,[H,t("span",J,[t("span",K,o(e.totalItems),1)])]),t("article",W,[e.freeShippingFromValue?(i(),m("div",Z,[e.freeShippingFromValue>e.shoppingCart.subtotal?(i(),m("div",$,[g(o("Adicione $1 para ganhar".replace("$1",a.$money(e.freeShippingFromValue-e.shoppingCart.subtotal)))+" ",1),ee])):(i(),m("div",te,[re,g(" "+o("Frete grátis a partir de")+" "+o(a.$money(e.freeShippingFromValue)),1)]))])):h("",!0),t("ul",se,[(i(!0),m(j,null,N(e.shoppingCart.items,(c,l)=>(i(),m("li",{key:l},[d(e.CartItem,{item:c,class:"mb-3"},null,8,["item"])]))),128))])]),t("footer",ae,[t("div",oe,[ie,d(e.Prices,{price:e.shoppingCart.subtotal,class:"col-span-3 text-lg"},null,8,["price"])]),d(e.CheckoutLink,{to:"checkout",class:"ui-btn-lg ui-btn-primary my-2.5 w-full text-right"},{default:k(()=>[ne,g(" "+o("Finalizar compra"))]),_:1}),t("a",{href:"#",onClick:s[0]||(s[0]=x(c=>e.emit("close"),["prevent"])),class:"text-base-500 ui-link hover:text-base-700 text-sm"},[ce,g(" "+o("Continuar comprando"))])])])}const Se=b(X,[["render",le]]);export{Se as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as w,v as B}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{p as f}from"./modules-info.WWsUqEPZ.js";import{c as d,d as T,M as x,N as r,O as l,U as c,V as o,Z as S,T as b,$ as v,P as g,S as y,a0 as C,Q as m,a as H,H as L,W as N,R as _,X as P,Y as V,a1 as j}from"./runtime-core.esm-bundler.XTSAdOlw.js";import"./afetch.5c8VmT0-.js";import"./sf-utils.luvTU5uS.js";import"./format-money.iK5LGydz.js";import"./price.Easct8WC.js";const z=s=>{const a=d(()=>s.title?f(s.title).value:""),t=d(()=>s.subtitle?f(s.subtitle).value:""),e=d(()=>s.buttonText?f(s.buttonText).value:""),i=d(()=>!!(a.value||t.value||e.value));return{parsedTitle:a,parsedSubtitle:t,parsedButtonText:e,hasHeader:i}},M=T({__name:"Banner",props:{img:{},alt:{},mobileImg:{},href:{},title:{},subtitle:{},buttonLink:{},buttonText:{},headingTag:{default:"h3"}},setup(s,{expose:a}){a();const t=s,{hasHeader:e,parsedTitle:i,parsedSubtitle:p,parsedButtonText:n}=z(t),u={props:t,hasHeader:e,parsedTitle:i,parsedSubtitle:p,parsedButtonText:n};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}}),D={key:0,class:"mb-3 p-12 sm:mb-0 xl:ps-32"},O={key:1,class:"mt-4 text-lg md:mt-6"};function A(s,a,t,e,i,p){const n=x("ALink");return r(),l("div",{class:b(["mx-auto overflow-x-hidden",e.hasHeader?"grid grid-cols-1 sm:grid-cols-2 items-center":null])},[c(n,{href:t.href,class:b(e.hasHeader?"sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover":"[&_img]:max-w-full")},{default:o(()=>[S(s.$slots,"picture")]),_:3},8,["href","class"]),e.hasHeader?(r(),l("div",D,[e.parsedTitle?(r(),v(C(t.headingTag),{key:0,class:"ui-title mt-1"},{default:o(()=>[y(g(e.parsedTitle),1)]),_:1})):m("",!0),e.parsedSubtitle?(r(),l("p",O,g(e.parsedSubtitle),1)):m("",!0),e.parsedButtonText?(r(),v(n,{key:2,href:t.buttonLink,class:"ui-btn-lg ui-btn-contrast mt-7 min-w-[150px] md:mt-10"},{default:o(()=>[y(g(e.parsedButtonText),1)]),_:1},8,["href"])):m("",!0)])):m("",!0)],2)}const E=w(M,[["render",A]]),F=T({__name:"HeroSlider",props:{autoplay:{},slides:{}},setup(s,{expose:a}){a();const t=H(!1);L(()=>{t.value=!0});const e={isMounted:t,Banner:E};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),I={class:"relative mx-auto mb-9 md:mb-12"},Q={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"},R=_("i",{class:"i-arrow-right rotate-180"},null,-1),U=_("i",{class:"i-arrow-right"},null,-1);function W(s,a,t,e,i,p){const n=x("CarouselControl"),u=x("Carousel");return r(),l("section",I,[c(u,{autoplay:t.autoplay,class:"secondary [&>*]:items-center"},{controls:o(()=>[N(_("div",Q,[_("div",{class:b(["text-primary relative h-10 w-20 rounded-full bg-white/50 shadow-sm ring-1 ring-black/5 transition-opacity",e.isMounted?"opacity-100":"opacity-20 [&>*]:cursor-wait"])},[c(n,{class:"hover:bg-primary/10 size-10 rounded-full","is-prev":""},{default:o(()=>[R]),_:1}),c(n,{class:"hover:bg-primary/10 size-10 rounded-full"},{default:o(()=>[U]),_:1})],2)],512),[[B,t.slides.length>1]])]),default:o(()=>[(r(!0),l(P,null,V(t.slides,(k,h)=>(r(),l("li",{key:h,class:"shrink-0 basis-full"},[c(e.Banner,j({...k,headingTag:h===0?"h2":"h3"},{class:"w-screen max-w-screen-2xl"}),{picture:o(()=>[S(s.$slots,`picture-${h}`)]),_:2},1040)]))),128))]),_:3},8,["autoplay"])])}const $=w(F,[["render",W]]);export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as C,v as g}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{p as x}from"./modules-info.WWsUqEPZ.js";import{s as b,c as m,d as w,O as r,R as h,U as i,V as p,M as u,N as l,W as S,X as y,Y as B,T as k,Q as V}from"./runtime-core.esm-bundler.XTSAdOlw.js";import"./afetch.5c8VmT0-.js";import"./sf-utils.luvTU5uS.js";import"./format-money.iK5LGydz.js";import"./price.Easct8WC.js";function L(t,e){{const s=btoa(JSON.stringify({filename:t}));window.parent.postMessage(JSON.parse(JSON.stringify({type:"open",filename:t,id:s})),window.location.origin),window.addEventListener("message",n=>{n.data.id===s&&e(n.data.data)})}}const N=t=>{const e=b(null);return window.$isCmsPreview&&L(t,s=>{e.value=s}),{liveContent:e}},P=t=>{const e={slides:[]};return t.header?.pitchBar&&(e.slides=t.header.pitchBar),e},O=t=>{const{liveContent:e}=N("layout"),s=m(()=>(e.value?P(e.value).slides:t.slides).map(({html:o})=>x(o).value.replace(/<\/?p>/g,"").replace(/<(\/?d-md)>/g,"<$1>"))),n=m(()=>s.value.filter(a=>a).length);return{parsedContents:s,countValidSlides:n}},M=w({__name:"PitchBar",props:{slides:{}},setup(t,{expose:e}){e();const s=t,{parsedContents:n,countValidSlides:a}=O(s),o={props:s,parsedContents:n,countValidSlides:a};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),J={class:"bg-base-100 relative z-20"},T={class:"container mx-auto px-3 py-1 md:w-2/3"},z=["innerHTML"],A={class:"text-base-400 text-xl leading-none"};function E(t,e,s,n,a,o){const f=u("ALink"),_=u("CarouselControl"),v=u("Carousel");return l(),r("div",J,[h("div",T,[i(v,{autoplay:n.countValidSlides>1?7e3:void 0},{controls:p(()=>[S(h("div",A,[i(_,{class:"bg-base-100 hover:text-base-700 pr-2","is-prev":""}),i(_,{class:"bg-base-100 hover:text-base-700 pl-2"})],512),[[g,n.countValidSlides>1]])]),default:p(()=>[(l(!0),r(y,null,B(s.slides,(c,d)=>(l(),r("li",{key:d,class:"h-full shrink-0 basis-full text-center"},[i(f,{href:c.href,target:c.target,class:k(["inline-block px-8",c.href?"hover:underline":null])},{default:p(()=>[n.parsedContents[d]?(l(),r("span",{key:0,innerHTML:n.parsedContents[d],class:"text-base-800 prose text-sm"},null,8,z)):V("",!0)]),_:2},1032,["href","target","class"])]))),128))]),_:1},8,["autoplay"])])])}const W=C(M,[["render",E]]);export{W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as W}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{a as A,i as S,d as z,l as M}from"./modules-info.WWsUqEPZ.js";import{c as s,d as T,M as E,N as o,O as i,P as r,Q as c,R as h,S as N,T as C,U as B,V as L}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{g,c as F}from"./price.Easct8WC.js";const j=(a,l)=>{const{type:n,value:e}=l;let d;return e?(n==="percentage"?d=a*((100-e)/100):d=a-e,d>0?d:0):a},R=a=>{const l=s(()=>a.product||{price:a.price||0,base_price:a.basePrice}),n=s(()=>{const{variations:t}=l.value;if(t){const u=g(l.value);for(let P=0;P<t.length;P++)if(g({...l.value,...t[P]})>u)return!0}return!1}),e=s(()=>{const t=g(l.value),u=A.value;return u&&(!u.min_amount||t>u.min_amount)?j(t,u):t}),d=s(()=>{if(F(l.value))return l.value.base_price;const t=g(l.value);return t>e.value?t:0}),_=s(()=>a.installmentsOption||S.value||{max_number:1}),m=s(()=>{if(_.value.max_number<=1)return 1;const t=_.value.min_installment||5,u=Math.floor(e.value/t);return Math.min(u,_.value.max_number)}),b=s(()=>_.value.monthly_interest||0),k=s(()=>{if(m.value>=2){if(!b.value)return e.value/m.value;const t=b.value/100;return e.value*t/(1-(1+t)**-m.value)}return 0}),f=s(()=>{const t=a.discountOption||z.value;return t&&(!t.min_amount||t.min_amount<=e.value)&&(!a.isAmountTotal||t.apply_at==="total")?t:{}}),O=s(()=>{const{label:t}=f.value;return t?t.includes(" ")?t:`via ${t}`:""}),V=s(()=>j(e.value,f.value)),v=s(()=>{if(a.loyaltyPointsProgram)return a.loyaltyPointsProgram;const t=M.value;if(t){const u=Object.keys(t);for(let P=0;P<u.length;P++){const p=t[u[P]];if(p?.earn_percentage&&p.earn_percentage>0)return p}}return{ratio:0}}),y=s(()=>v.value.min_subtotal_to_earn||0),w=s(()=>v.value.name||""),D=s(()=>v.value.earn_percentage||0),x=s(()=>D.value*v.value.ratio),I=s(()=>x.value>=1?e.value*(x.value/100):0);return{hasVariedPrices:n,salePrice:e,comparePrice:d,installmentsObject:_,installmentsNumber:m,monthlyInterest:b,installmentValue:k,discountObject:f,discountLabel:O,priceWithDiscount:V,pointsProgramObject:v,pointsMinPrice:y,pointsProgramName:w,earnPointsPercentage:D,cashbackPercentage:x,cashbackValue:I}},Q=T({__name:"Prices",props:{isBig:{type:Boolean},isLiteral:{type:Boolean},hasCashback:{type:Boolean,default:!0},hasPriceOptions:{type:Boolean,default:!0},product:{},price:{},basePrice:{},isAmountTotal:{type:Boolean},installmentsOption:{},discountOption:{},loyaltyPointsProgram:{}},setup(a,{expose:l}){l();const n=a,{hasVariedPrices:e,salePrice:d,comparePrice:_,cashbackPercentage:m,cashbackValue:b,installmentsNumber:k,monthlyInterest:f,installmentValue:O,priceWithDiscount:V,discountLabel:v}=R(n),y={props:n,hasVariedPrices:e,salePrice:d,comparePrice:_,cashbackPercentage:m,cashbackValue:b,installmentsNumber:k,monthlyInterest:f,installmentValue:O,priceWithDiscount:V,discountLabel:v};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),U={key:0,class:"text-base-500 mr-1 text-[87%]"},q={key:0},G={key:1},H={key:0},J={key:0,class:"relative z-10"},K=["data-tooltip"],X=h("i",{class:"i-arrow-uturn-left mr-1"},null,-1),Y={class:"font-medium"},Z=h("small",null," cashback",-1),$={key:0},ee={key:0},te={key:1},ae={key:2},ne={key:0},se={key:0},re={key:1};function oe(a,l,n,e,d,_){const m=E("Fade");return o(),i("div",{class:C(["text-base-600 [&>div]:[font-size:90%] [&_small]:lowercase [&_small]:[font-size:92%]",n.isBig?"text-lg":null])},[e.comparePrice?(o(),i("span",U,[n.isLiteral?(o(),i("small",q,r("De "))):c("",!0),h("s",null,r(a.$money(e.comparePrice)),1),n.isLiteral?(o(),i("small",G,r(" Por"))):c("",!0)])):c("",!0),h("strong",{class:C(["text-base-800",n.isBig?"text-4xl block":"inline-block"])},[e.hasVariedPrices?(o(),i("small",H,r("A partir de "))):c("",!0),N(" "+r(a.$money(e.salePrice)),1)],2),B(m,{slide:"down"},{default:L(()=>[e.cashbackValue&&n.hasCashback?(o(),i("div",J,[h("span",{"data-tooltip":"Receba $1 de volta".replace("$1",a.$percentage(e.cashbackPercentage))},[X,h("span",Y,r(a.$money(e.cashbackValue)),1),Z],8,K)])):c("",!0)]),_:1}),B(m,{slide:"down"},{default:L(()=>[e.installmentValue&&n.hasPriceOptions?(o(),i("div",$,[n.isLiteral?(o(),i("small",ee,r("Até "))):c("",!0),N(" "+r(e.installmentsNumber)+"x ",1),n.isLiteral?(o(),i("small",te,r(" De "))):c("",!0),h("span",null,r(a.$money(e.installmentValue)),1),!e.monthlyInterest&&n.isLiteral?(o(),i("small",ae,r(" Sem juros"))):c("",!0)])):c("",!0)]),_:1}),B(m,{slide:"down"},{default:L(()=>[e.priceWithDiscount<e.salePrice&&n.hasPriceOptions?(o(),i("div",ne,[e.discountLabel?c("",!0):(o(),i("small",se,r("A partir de "))),h("span",null,r(a.$money(e.priceWithDiscount)),1),e.discountLabel?(o(),i("small",re,r(` ${e.discountLabel}`),1)):c("",!0)])):c("",!0)]),_:1})],2)}const me=W(Q,[["render",oe]]);export{me as P};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{_ as D,w as Q}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{u as Z}from"./index.R7A-Pg5V.js";import{a as J}from"./shopping-cart.ATTXCPd0.js";import{u as K}from"./use-product-card.BhUXhJIp.js";import{C as W,Q as $}from"./QuantitySelector.OL4MN-C_.js";import{P as tt}from"./Prices.Jt09rVKv.js";import{_ as G}from"./customer-session.TRPGDX3c.js";import{u as et}from"./sf-utils.luvTU5uS.js";import{d as R,a as C,M as I,N as u,O as f,$ as P,V,Q as b,R as v,X as k,T as z,U as w,Y as A,a7 as F,L as ot,r as L,w as T,a6 as M,c as H,S as B,P as S,a8 as it,H as rt,Z as at}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{g as st}from"./img-sizes.gxAI9JNh.js";import"./index.q6KIyKlJ.js";import{g as nt}from"./grid-title.vGKBy72g.js";import"./price.Easct8WC.js";import"./use-analytics.WpkjGsWi.js";import"./afetch.5c8VmT0-.js";import"./name.urFqJ5yn.js";import"./i18n.Lxnz1oF-.js";import"./img.WnsidxCx.js";import"./modules-info.WWsUqEPZ.js";import"./format-money.iK5LGydz.js";const q=(a,n,l)=>{if(typeof a!="object"||a===null)return[];let t=[];if(typeof a=="object"&&a!==null)if(Array.isArray(a))a.length&&(a[0].specifications?a.forEach(e=>{t=t.concat(q(e,n,l))}):a[0].text&&(t=a));else{const{specifications:e}=a;if(e)for(const s in e)e[s]&&s===n&&(t=e[n]);if(t&&!t.length&&Array.isArray(l)&&l.length){let s,d;return l&&(d=l.find(i=>i.grid_id===n))&&d.options&&(s=d.options.map(i=>{let r;return i.colors&&i.colors.length?r=i.colors[0]:r=i.option_id,{text:i.text,value:r}})),q(s,n)}}return t},X=q,lt=(a,n,l,t=", ")=>{let e=X(a,n,l);if(e.length){let s=e[0].text;for(let d=1;d<e.length;d++)s+=t+e[d].text;return s}return null},Y=lt,ct=(a,n,l,t)=>{const e=X(a,l,t);for(let s=0;s<e.length;s++)if(e[s].text===n)return e[s].value},dt=ct,ut=(a,n,l,t)=>{let e={};return a&&Array.isArray(a.variations)&&a.variations.forEach(s=>{if(l&&s.quantity<=0)return;let d=s.specifications,i=r=>Y(s,r,t);if(d){if(n){for(let r in n)if(n.hasOwnProperty(r)&&(!d[r]||i(r)!==n[r]))return}for(let r in d)if(d.hasOwnProperty(r)){let m=i(r);if(!e.hasOwnProperty(r))e[r]=[];else if(e[r].indexOf(m)!==-1)continue;e[r].push(m)}}}),e},j=ut,mt=R({__name:"ImagesGallery",props:{pictures:{}},setup(a,{expose:n}){n();const l=C(0),t=C("");let e;const s=C(!1),i={activeIndex:l,psId:t,get lightbox(){return e},set lightbox(r){e=r},isLoadingLightbox:s,zoom:r=>{if(t.value=`ps-${et()}`,!e&&!s.value){s.value=!0;const m="photoswipe-style";Promise.all([G(()=>import("./photoswipe-lightbox.esm.dZBqKD9u.js"),__vite__mapDeps([])),G(()=>import("./photoswipe.esm.Ylh9TGkz.js"),__vite__mapDeps([])),!document.getElementById(m)&&G(()=>import("./photoswipe.0V7m2jWu.js"),__vite__mapDeps([]))]).then(([{default:o},{default:c},_])=>{if(_){const{default:y}=_,p=document.createElement("style");p.id=m,p.textContent=y,document.head.appendChild(p)}e=new o({gallery:`#${t.value} > div`,children:"a",pswpModule:c,showAnimationDuration:300,hideAnimationDuration:300}),e.init(),e.loadAndOpen(r),s.value=!1})}},get getImgSizes(){return st}};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}}),ft={class:"-mx-4 flex w-screen gap-3 sm:mx-0 sm:w-full md:h-[525px] 2xl:gap-5"},gt=["onClick"],pt=v("span",{class:"absolute bottom-0 block h-2 w-full bg-gradient-to-b from-transparent to-white"},null,-1),_t={class:"relative aspect-square h-full grow md:aspect-auto"},ht={key:0,class:"bg-base-200 i-arrow-path absolute left-1/2 top-1/2 -ml-7 -mt-7 size-14 animate-spin","aria-label":"Carregando"},vt={key:1,class:"mt-2 flex justify-center gap-1.5 md:hidden"},yt=["aria-label","onClick"];function bt(a,n,l,t,e,s){const d=I("AImg"),i=I("CarouselControl"),r=I("Carousel"),m=I("ALink");return u(),f("div",ft,[l.pictures.length>1?(u(),P(r,{key:0,axis:"y",class:"group hidden w-[300px] shrink-0 md:block"},{controls:V(()=>[v("span",null,[l.pictures.length>6?(u(),P(i,{key:0,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"})):b("",!0),pt])]),default:V(()=>[(u(!0),f(k,null,A(Math.ceil(l.pictures.length/2),o=>(u(),f("li",{key:o,class:z(["grid w-full grid-cols-2 gap-3 px-1 pb-3",o===1&&"pt-1"])},[(u(!0),f(k,null,A([1,2].map(c=>(o-1)*2+(c-1)),c=>(u(),f(k,{key:`${o}-${c}`},[c<l.pictures.length?(u(),f("button",{key:0,class:"bg-secondary-100 block rounded md:h-[175px]",onClick:_=>t.activeIndex=c},[w(d,{picture:l.pictures[c],class:z(["ring-secondary/10 size-full rounded border-2 object-cover opacity-90 transition-colors",c===t.activeIndex?"border-secondary/50 ring-4 cursor-auto":"border-transparent hover:border-primary hover:ring-4 hover:ring-primary/20"])},null,8,["picture","class"])],8,gt)):b("",!0)],64))),128))],2))),128))]),_:1})):b("",!0),v("div",_t,[w(r,{as:"div",index:t.activeIndex,"onUpdate:index":n[1]||(n[1]=o=>t.activeIndex=o),class:z(["text-base-600 [&_i]:i-arrow-right mx-auto size-full max-w-[525px] [&>*]:h-full [&_i]:mx-2 [&_i]:text-2xl",t.isLoadingLightbox&&"opacity-80"]),id:t.psId},{default:V(()=>[n[0]||(F(-1),n[0]=(u(!0),f(k,null,A(l.pictures,(o,c)=>(u(),P(m,{key:`big-${c}`,href:o.zoom?.size&&o.zoom.url,"data-pswp-width":t.getImgSizes(o.zoom||"").width,"data-pswp-height":t.getImgSizes(o.zoom||"").height,target:"_blank",rel:"noreferrer",class:z(["shrink-0 basis-full",o.zoom?.size&&"cursor-zoom-in"]),onClick:Q(()=>o.zoom?.size&&t.zoom(c),["prevent"])},{default:V(()=>[w(d,{picture:o,"preferred-size":"big",class:"size-full rounded object-cover",fetchpriority:c===0?"high":"low",loading:c===0?"eager":"lazy"},null,8,["picture","fetchpriority","loading"])]),_:2},1032,["href","data-pswp-width","data-pswp-height","class","onClick"]))),128)),F(1),n[0])]),_:1},8,["index","class","id"]),t.isLoadingLightbox?(u(),f("i",ht)):b("",!0),l.pictures.length>1?(u(),f("ul",vt,[(u(!0),f(k,null,A(l.pictures.length,o=>(u(),f("li",{key:`d-${o}`},[v("button",{class:z(["bg-base-700 block h-1.5 w-3 rounded-full",t.activeIndex!==o-1&&"opacity-40"]),"aria-label":`Imagem ${o}`,onClick:c=>t.activeIndex=o-1},null,10,yt)]))),128))])):b("",!0)])])}const xt=D(mt,[["render",bt]]),kt=a=>{const n=ot(a.grids||globalThis.$storefront.data.grids||[]);n.length||window.addEventListener("storefront:data:data",()=>{globalThis.$storefront.data.grids?.forEach(o=>n.push(o))},{once:!0});const l=L({}),t=L({});T(M(a,"variations"),()=>{Object.assign(t,j(a,void 0,!0));const o=j(a);Object.keys(o).forEach(c=>{t[c]?l[c]=t[c]:delete l[c]})},{immediate:!0});const e=H(()=>Object.keys(l)),s=L({}),d=C(),i=({optionText:o,gridId:c,gridIndex:_})=>{s[c]=o;const y={};for(let g=0;g<=_;g++){const h=e[g];s[h]&&(y[h]=s[h])}const p=j(a,y,!0);for(let g=_+1;g<e.value.length;g++){const h=e[g],O=p[h];t[h]=O,s[h]&&!O.includes(s[h])&&delete s[h]}const x=a.variations.slice(0);for(let g=0;g<x.length;g++){const h=x[g],{specifications:O}=h,N=Object.keys(O);for(let E=0;E<N.length;E++){const U=N[E];if(s[U]!==Y(h,U)){x.splice(g,1),g-=1;break}}}d.value=x[0]?._id||null};return T(M(a,"variationId"),o=>{if(!o||o===d.value)return;const c=a.variations.find(x=>x._id===o);if(!c){d.value=null;return}const{specifications:_}=c,y=Object.keys(_),p=(x=0)=>{const g=y[x];if(y[x]&&_[g]&&_[g].length===1){const h=_[g][0].text;l[g].find(O=>O===h)&&(i({optionText:h,gridId:g,gridIndex:e.value.indexOf(g)}),p(x+1))}};p()},{immediate:!0}),{grids:n,variationsGrids:l,activeVariationsGrids:t,selectOption:i,selectedOptions:s,variationId:d,getGridTitle:o=>nt(o,n),getColorOptionBg:o=>{const c=o.split(",").map(_=>dt(a.variations,_.trim(),"colors"));return c.length>1?`background:linear-gradient(to right bottom, ${c[0]} 50%, ${c[1]} 50%)`:`background:${c[0]}`}}},wt=R({__name:"SkuSelector",props:{variations:{},variationId:{},grids:{}},emits:["update:variationId"],setup(a,{expose:n,emit:l}){n();const t=a,e=l,{variationsGrids:s,activeVariationsGrids:d,selectOption:i,selectedOptions:r,variationId:m,getGridTitle:o,getColorOptionBg:c}=kt(t);T(m,y=>{e("update:variationId",y)});const _={props:t,emit:e,variationsGrids:s,activeVariationsGrids:d,selectOption:i,selectedOptions:r,variationId:m,getGridTitle:o,getColorOptionBg:c};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),St={class:"text-base-700 text-sm font-medium"},Ct={key:0,class:"text-base-800"},Ot={key:0,class:"mt-2 flex gap-2"},zt=["onClick"];function Vt(a,n,l,t,e,s){return u(),f("div",null,[(u(!0),f(k,null,A(t.variationsGrids,(d,i)=>(u(),f("div",{key:i,class:"mt-3"},[v("span",St,[B(S(t.getGridTitle(i))+": ",1),t.selectedOptions[i]?(u(),f("strong",Ct,S(t.selectedOptions[i]),1)):b("",!0)]),d.length<7?(u(),f("ul",Ot,[(u(!0),f(k,null,A(d,(r,m)=>(u(),f("li",{key:`${i}-${m}`},[v("button",{class:z(["ring-primary/60 rounded border",[t.selectedOptions[i]===r?"border-primary ring-2":null,i==="colors"?"size-9 text-[0px]":"px-2.5 py-2 leading-none",t.activeVariationsGrids[i].includes(r)?"border-primary-400 bg-primary-100 text-primary-950":"border-primary-300 bg-primary-200 text-primary-600"]]),style:it(i==="colors"&&t.getColorOptionBg(r)),onClick:o=>t.selectOption({optionText:r,gridId:i,gridIndex:m})},S(r),15,zt)]))),128))])):b("",!0)]))),128))])}const At=D(wt,[["render",Vt]]),It=R({__name:"ProductDetails",props:{product:{default:()=>globalThis.$storefront.apiContext?.doc}},setup(a,{expose:n}){n();const l=a,{product:t,title:e,isActive:s}=K(l),d=C(t.min_quantity||1),i=Z("history"),r=C(!1),m=C(null);T(m,p=>{p&&(i.var=p,r.value=!1)}),rt(()=>{T(i,({var:p})=>{typeof p=="string"&&p&&(m.value=p)},{immediate:!0})});const o=H(()=>!!(!t.variations?.length||m.value)),c=p=>(o.value?r.value=!1:(p&&p.preventDefault(),r.value=!0),!r.value),y={props:l,product:t,title:e,isActive:s,quantity:d,params:i,hasSkuSelectionAlert:r,variationId:m,isSkuSelected:o,checkVariation:c,addToCart:()=>{c()&&J(t,m.value?m.value:void 0)},CheckoutLink:W,QuantitySelector:$,Prices:tt,ImagesGallery:xt,SkuSelector:At};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Pt={class:"ui-section relative grid grid-cols-1 items-start gap-5 md:gap-4 lg:grid-cols-4 2xl:gap-6"},Tt={class:"w-full lg:col-span-3"},Et={class:"lg:sticky-header:translate-y-14 top-0 py-4 transition-transform lg:sticky"},Gt={class:"text-secondary-900 ui-text-brand text-lg"},Lt={key:0,class:"mt-5"},jt={key:0,class:"ui-alert inline-block"},Bt=v("i",{class:"i-arrow-right ml-1 -rotate-90"},null,-1),qt={class:"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 md:flex-nowrap lg:mt-4 lg:flex-wrap"},Dt=v("i",{class:"i-chevron-double-right mr-1"},null,-1),Rt=["data-tooltip"],Nt={class:"w-full lg:col-span-3"};function Ut(a,n,l,t,e,s){const d=I("Fade");return u(),f("section",Pt,[v("div",Tt,[t.product.pictures?.length?(u(),P(t.ImagesGallery,{key:0,pictures:t.product.pictures},null,8,["pictures"])):b("",!0)]),v("div",Et,[v("h1",Gt,S(t.title),1),t.isActive?(u(),f("div",Lt,[w(t.Prices,{product:t.product,"is-big":"","is-literal":""},null,8,["product"]),t.product.variations?(u(),P(t.SkuSelector,{key:0,variations:t.product.variations,"variation-id":t.variationId,"onUpdate:variationId":n[0]||(n[0]=i=>t.variationId=i),class:"my-4"},null,8,["variations","variation-id"])):b("",!0),w(d,{slide:"down"},{default:V(()=>[t.hasSkuSelectionAlert?(u(),f("div",jt,[B(S("Por favor selecione uma opção em cada campo acima")+" "),Bt])):b("",!0)]),_:1}),v("div",qt,[w(t.QuantitySelector,{modelValue:t.quantity,"onUpdate:modelValue":n[1]||(n[1]=i=>t.quantity=i),min:t.product.min_quantity,max:t.product.quantity,class:"border-base-100 rounded md:mr-5 lg:mb-2 lg:mr-auto lg:border-2"},null,8,["modelValue","min","max"]),w(t.CheckoutLink,{class:"ui-btn-lg ui-btn-primary grow text-center",to:"checkout","cart-item":{product_id:t.product._id,quantity:t.quantity,variation_id:t.variationId||void 0},"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar",onClick:t.checkVariation},{default:V(()=>[Dt,B(" "+S("Comprar"))]),_:1},8,["cart-item","data-tooltip"]),v("button",{class:"ui-btn-lg ui-btn-contrast grow",onClick:Q(t.addToCart,["prevent"]),"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar"},S("Adicionar ao carrinho"),8,Rt)])])):b("",!0)]),v("div",Nt,[at(a.$slots,"description")])])}const ce=D(It,[["render",Ut]]);export{ce as default};
|
|
2
|
-
function __vite__mapDeps(indexes) {
|
|
3
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
|
-
__vite__mapDeps.viteFileDeps = []
|
|
5
|
-
}
|
|
6
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as j}from"./ProductShelf.vGE0E3Qf.js";import"./_plugin-vue_export-helper.SO-0jCqa.js";import"./runtime-core.esm-bundler.XTSAdOlw.js";import"./index.R7A-Pg5V.js";import"./index.q6KIyKlJ.js";import"./customer-session.TRPGDX3c.js";import"./sf-utils.luvTU5uS.js";import"./use-product-card.BhUXhJIp.js";import"./use-analytics.WpkjGsWi.js";import"./shopping-cart.ATTXCPd0.js";import"./price.Easct8WC.js";import"./afetch.5c8VmT0-.js";import"./name.urFqJ5yn.js";import"./i18n.Lxnz1oF-.js";import"./img.WnsidxCx.js";import"./Prices.Jt09rVKv.js";import"./modules-info.WWsUqEPZ.js";import"./format-money.iK5LGydz.js";export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as I,w as z,v as N}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{b as R,c as V}from"./index.R7A-Pg5V.js";import{b as A}from"./customer-session.TRPGDX3c.js";import{c as j,u as B}from"./use-product-card.BhUXhJIp.js";import{g as M}from"./index.q6KIyKlJ.js";import{a as p,L as O,d as L,M as w,N as r,O as d,U as h,V as b,$ as S,Q as C,R as v,S as y,P as x,a0 as T,T as P,ah as D,Z as Q,W as E,X as G,Y as H}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{u as q}from"./sf-utils.luvTU5uS.js";import{a as F}from"./shopping-cart.ATTXCPd0.js";import{P as U}from"./Prices.Jt09rVKv.js";const Ce="Acima de",Pe="Marcas",we="Categorias",Se="Desconto",Ae="Maior preço",Ie="Menor preço",Le="Nome",W="Produtos relacionados",Te="Lançamentos",ze="Relevância",Ne="Vendas",Re="Até",X=t=>{const s=p(t.title||""),i=p(t.titleLink||""),e=p(!1);let _=null;const u=p(null),n=O(t.products||[]);return t.products||(e.value=!0,_=(async()=>{const f=t.limit||24;let g=`offset=${t.page?(t.page-1)*f:0}&limit=${f}`;if(t.sort&&(g+=`&sort=${t.sort}`),t.isRelatedProducts){const{apiContext:o}=globalThis.$storefront;o?.resource==="products"&&(g=`like=${o.doc._id}`,!s.value&&s.value!==null&&(s.value=W))}else{let o=t.searchQuery||"",a;if(t.collectionId){try{const{data:c}=await A.get(`collections/${t.collectionId}`);a=c}catch(c){console.error(c),u.value=c}const m=a?.products;Array.isArray(m)&&m.length&&(o+=`&_id=${m.slice(0,60).join(",")}`),!s.value&&s.value!==null&&a?.name&&(s.value=a?.name)}g+=o}try{const{data:o}=await A.get(`search/v1?${g}`);if(t.isShuffle){let a=o.result.filter(k=>k.available&&j(k)).length,m,c;for(;a;)c=Math.floor(Math.random()*a--),m=o.result[a],o.result[a]=o.result[c],o.result[c]=m}o.result.forEach(a=>n.push(a))}catch(o){console.error(o),u.value=o}e.value=!1})()),{title:s,titleLink:i,isFetching:e,fetching:_,fetchError:u,products:n}},Y=L({__name:"ProductCard",props:{product:{},productId:{},listName:{},listId:{},headingTag:{default:"h3"}},setup(t,{expose:s}){s();const i=t,{product:e,title:_,link:u,images:n,isInStock:f,isActive:l,discountPercentage:g,hasVariations:o}=B(i),a=p(null),m=R(a),c=p(!1);M(m,()=>{c.value=!0});const k={props:i,product:e,title:_,link:u,images:n,isInStock:f,isActive:l,discountPercentage:g,hasVariations:o,card:a,isHovered:m,wasHoveredOnce:c,get addProductToCart(){return F},Prices:U};return Object.defineProperty(k,"__isScriptSetup",{enumerable:!1,value:!0}),k}}),Z=["data-sku"],J={class:"aspect-square p-2 transition-transform motion-safe:group-hover:scale-110"},K={class:"relative size-full overflow-hidden rounded bg-white group-hover:rounded-none"},$={key:0,class:"text-xs text-opacity-70"},ee={key:1,class:"from-base-50/20 to-base-100 size-full bg-gradient-to-br"},te={key:0,class:"uno-bm03rg"},oe={class:"relative z-10 flex grow flex-col justify-between p-4"},se={class:"pt-2"},ae={key:0},re={key:1,class:"bg-warning-100 text-warning-700 ui-badge"},ie=v("span",{class:"bg-on-primary text-primary mr-1 inline-block size-4 rounded-full text-center text-base leading-none opacity-80"}," + ",-1);function ne(t,s,i,e,_,u){const n=w("AImg"),f=w("ALink");return r(),d("article",{ref:"card","data-sku":e.product.sku,class:"group relative mx-auto h-full max-w-[350px] px-0.5 py-3 hover:z-[1]"},[h(f,{href:e.link,class:"flex h-full flex-col overflow-hidden rounded bg-white ring-black/5 group-hover:shadow group-hover:ring-1"},{default:b(()=>[v("div",J,[v("div",K,[e.images?.length?(r(),d("span",$,[h(n,{picture:e.images[0],alt:e.title,class:"absolute left-0 top-0 block size-full object-cover"},null,8,["picture","alt"]),e.images[1]&&e.wasHoveredOnce?(r(),S(n,{key:0,picture:e.images[1],alt:e.title,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"},null,8,["picture","alt"])):C("",!0)])):(r(),d("div",ee))])]),e.discountPercentage?(r(),d("span",te,[y(" -"),v("strong",null,x(e.discountPercentage),1),y("% ")])):C("",!0),v("div",oe,[(r(),S(T(i.headingTag),{class:P(["ui-link line-clamp-2 no-underline",[e.isActive?"text-base-700":"text-base-500",e.link?"group-hover:text-primary group-hover:underline":null]])},{default:b(()=>[y(x(e.title),1)]),_:1},8,["class"])),v("div",se,[e.isActive?(r(),d("div",ae,[h(e.Prices,{product:e.product},null,8,["product"])])):(r(),d("span",re,x(e.isInStock?"Inativo":"Sem estoque"),1))]),e.isActive&&!e.hasVariations?(r(),d("button",{key:0,class:"uno-3suct9 ui-btn-sm ui-btn-primary",onClick:s[0]||(s[0]=z(l=>e.addProductToCart(e.product),["stop","prevent"]))},[ie,y(" "+x("Adicionar ao carrinho"))])):C("",!0)])]),_:1},8,["href"])],8,Z)}const le=I(Y,[["render",ne]]),ce=L({__name:"ProductShelf",props:{isGrid:{type:Boolean},collectionId:{},searchQuery:{},sort:{},title:{},titleLink:{},isShuffle:{type:Boolean},limit:{},page:{},products:{},isRelatedProducts:{type:Boolean}},async setup(t,{expose:s}){s();const i=t,[e,_]=V(),{title:u,titleLink:n,fetching:f,products:l}=X(i),g=u.value||`Shelf ${q()}`,o={props:i,DefineCarouselControl:e,ReuseCarouselControl:_,title:u,titleLink:n,fetching:f,products:l,listName:g,ProductCard:le};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),de={class:"ui-section"},ue={key:0,class:"mx-auto mb-4 max-w-prose text-center"},fe={class:"ui-text-brand text-3xl"};function me(t,s,i,e,_,u){const n=w("ALink"),f=w("CarouselControl");return r(),d("section",de,[e.title?(r(),d("div",ue,[v("h2",fe,[h(n,{href:e.titleLink,class:P(e.titleLink?"ui-link":"text-base-700")},{default:b(()=>[y(x(e.title),1)]),_:1},8,["href","class"])])])):C("",!0),(r(),S(T(i.isGrid?"ul":"Carousel"),{class:P(["group/shelf",i.isGrid&&"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4"])},D({default:b(()=>[(r(!0),d(G,null,H(e.products,l=>(r(),d("li",{key:l._id,class:"shrink-0 basis-1/2 md:basis-1/3 lg:basis-1/4"},[h(e.ProductCard,{product:l,"list-name":e.listName},null,8,["product","list-name"])]))),128))]),_:2},[i.isGrid?void 0:{name:"controls",fn:b(()=>[h(e.DefineCarouselControl,null,{default:b(({isPrev:l})=>[E(h(f,{class:P(["uno-t0rdy7",l?"!-left-4":"!-right-4"]),"is-prev":l},null,8,["class","is-prev"]),[[N,e.products.length>2]])]),_:1}),h(e.ReuseCarouselControl,{"is-prev":!0}),h(e.ReuseCarouselControl)]),key:"0"}]),1032,["class"])),Q(t.$slots,"append")])}const Ve=I(ce,[["render",me]]);export{Ve as P,we as a,Re as b,Ce as c,ze as d,Ne as e,Ie as f,Ae as g,Se as h,Pe as i,Te as j,Le as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as v,w as V,a as Q}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{d as S,c as y,N as p,O as f,Z as u,a4 as q,X as k,S as B,a as P,a5 as $,R as x,P as N,a2 as I,a3 as g,W as j,U as w,V as C}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{u as z}from"./sf-utils.luvTU5uS.js";const O=S({__name:"CheckoutLink",props:{to:{default:"cart"},cartUrl:{default:globalThis.$storefront?.settings.cartUrl||"/app/#/cart"},checkoutUrl:{default:globalThis.$storefront?.settings.checkoutUrl||"/app/#/checkout"},cartId:{},cartItem:{}},setup(a,{expose:i}){i();const t=a,e=y(()=>{let n=t.to==="cart"?t.cartUrl:t.checkoutUrl;if(t.cartId)n+=`/${t.cartId}`;else if(t.cartItem){const o={product_id:t.cartItem.product_id},{variation_id:l,quantity:d,sku:c,customizations:m}=t.cartItem;l&&(o.variation_id=l),d&&(o.quantity=String(d)),c&&(o.sku=c),m&&m.forEach(({label:r,option:_,attachment:M},U)=>{const b=`customizations.${U}.`;r&&(o[b+"label"]=r),_&&(_._id&&(o[b+"option._id"]=_._id),o[b+"option.text"]=_.text),M&&(o[b+"attachment"]=M)}),n+="?"+new URLSearchParams(o).toString()}return n}),s={props:t,href:e};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}}),T=["href"];function L(a,i,t,e,s,n){return p(),f("a",{href:e.href},[u(a.$slots,"default")],8,T)}const Y=v(O,[["render",L]]),R=S({__name:"QuantitySelectorControl",props:{isMinus:{type:Boolean}},setup(a,{expose:i}){i();const{value:t,isBoundMin:e,isBoundMax:s}=q(h),n={value:t,isBoundMin:e,isBoundMax:s};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),D=["data-quantity-selector-control","aria-label","disabled"];function E(a,i,t,e,s,n){return p(),f("button",{type:"button",class:"leading-12 h-12 w-10 text-xl enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40","data-quantity-selector-control":t.isMinus?"minus":"plus","aria-label":t.isMinus?"Menos":"Mais",disabled:t.isMinus?e.isBoundMin:e.isBoundMax,onClick:i[0]||(i[0]=V(o=>e.value+=t.isMinus?-1:1,["prevent"]))},[u(a.$slots,"default",{},()=>[t.isMinus?(p(),f(k,{key:0},[B("−")],64)):(p(),f(k,{key:1},[B("+")],64))])],8,D)}const F=v(R,[["render",E]]),h=Symbol("quantitySelector"),K=S({__name:"QuantitySelector",props:{modelValue:{default:1},min:{default:1},max:{},step:{},disabled:{type:Boolean},readonly:{type:Boolean}},emits:["update:modelValue"],setup(a,{expose:i,emit:t}){i();const e=a,s=t,n=P(null),o=`NInput${z()}`,l=y({get(){return e.modelValue},set(r){r<e.min&&(r=e.min,n.value.value=`${r}`),e.max&&r>e.max&&(r=e.max,n.value.value=`${r}`),s("update:modelValue",r)}}),d=y(()=>e.min>=l.value),c=y(()=>e.max<=l.value);$(h,{value:l,isBoundMin:d,isBoundMax:c});const m={quantitySelectorKey:h,props:e,emit:s,input:n,inputId:o,value:l,isBoundMin:d,isBoundMax:c,QuantitySelectorControl:F};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),W={"data-quantity-selector":""},X={class:"flex items-center"},Z=["min","max","step","disabled","readonly"];function A(a,i,t,e,s,n){return p(),f("div",W,[u(a.$slots,"label",I(g({inputId:e.inputId,value:e.value})),()=>[x("label",{for:e.inputId,class:"sr-only"},N("Quantidade"))]),x("div",X,[j(x("input",{ref:"input",type:"number",id:e.inputId,"onUpdate:modelValue":i[0]||(i[0]=o=>e.value=o),min:t.min,max:t.max,step:t.step,disabled:t.disabled,readonly:t.readonly,class:"h-12 w-14 border-transparent px-2 text-center text-lg [-moz-appearance:_textfield] [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none"},null,8,Z),[[Q,e.value]]),u(a.$slots,"controls",I(g({value:e.value,isBoundMin:e.isBoundMin,isBoundMax:e.isBoundMax})),()=>[w(e.QuantitySelectorControl,{"is-minus":"",class:"order-first"},{default:C(()=>[u(a.$slots,"minus")]),_:3}),w(e.QuantitySelectorControl,{class:"order-last"},{default:C(()=>[u(a.$slots,"plus")]),_:3})])])])}const ee=v(K,[["render",A]]);export{Y as C,ee as Q};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as Y}from"./_plugin-vue_export-helper.SO-0jCqa.js";import{c as Q,g as q}from"./sf-utils.luvTU5uS.js";import{S as J,s as N}from"./use-analytics.WpkjGsWi.js";import{a as T,w as V,a6 as K,d as Z,M as j,N as f,O as w,U as F,V as x,T as O,X as R,P as W,S as U,Y as z,R as S,Q as H,$ as G}from"./runtime-core.esm-bundler.XTSAdOlw.js";import{P as $}from"./ProductShelf.vGE0E3Qf.js";import"./customer-session.TRPGDX3c.js";import"./index.q6KIyKlJ.js";import"./shopping-cart.ATTXCPd0.js";import"./price.Easct8WC.js";import"./afetch.5c8VmT0-.js";import"./name.urFqJ5yn.js";import"./i18n.Lxnz1oF-.js";import"./index.R7A-Pg5V.js";import"./use-product-card.BhUXhJIp.js";import"./img.WnsidxCx.js";import"./Prices.Jt09rVKv.js";import"./modules-info.WWsUqEPZ.js";import"./format-money.iK5LGydz.js";var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function te(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X={exports:{}};(function(n){(function(a,i){n.exports?n.exports=i():a.Wade=i()})(ee,function(){var a={stopWords:["about","after","all","also","am","an","and","another","any","are","as","at","be","because","been","before","being","between","both","but","by","came","can","come","could","did","do","each","for","from","get","got","has","had","he","have","her","here","him","himself","his","how","if","in","into","is","it","like","make","many","me","might","more","most","much","must","my","never","now","of","on","only","or","other","our","out","over","said","same","see","should","since","some","still","such","take","than","that","the","their","them","then","there","these","they","this","those","through","to","too","under","up","very","was","way","we","well","were","what","where","which","while","who","with","would","you","your","a","i"],punctuationRE:/[.,!?:;"']/g},i=function(e,o){for(var r=o,c=0;c<e.length&&(r=r[e[c]])!==void 0;c++);return r},t=function(e,o,r,c){for(var h=null,s=0;s<e.length;s++){var u=e[s];(h=r[u])===void 0?(r[u]=o.length,o.push({index:u,score:c})):o[h].score+=c}},k=function(e,o,r,c,h){var s=i(e,o);s!==void 0&&s.id!==void 0&&t(s.id,r,c,h)},g=function(e,o,r,c,h){var s=i(e,o);if(s!==void 0)for(var u=[s],m=null,d=0;u.length!==0;){(m=u[d]).id!==void 0&&t(m.id,r,c,h),u.pop(),d--;for(var _ in m)u.push(m[_]),d++}},v=function(e){var o=e.length-1;return e[0]===" "&&(e=e.substring(1)),e[o]===" "&&(e=e.substring(0,o)),e.split(" ")},y=function(e){return e.toLowerCase()},p=function(e){return e.replace(a.punctuationRE,"")},E=function(e){for(var o=v(e),r=o.length;r--!=0;)l.config.stopWords.indexOf(o[r])!==-1&&o.splice(r,1);return o.join(" ")},l=function(e){var o=function(u){var m=o.index,d=l.process(u);if(d===!1)return[];for(var _=v(d),L=_.length,b=L-1,C=1/L,B=[],M={},P=0;P<b;P++)k(_[P],m,B,M,C);return g(_[b],m,B,M,C),B};if(Array.isArray(e)){for(var r=e.length,c=new Array(r),h=null,s=0;s<r;s++)(h=l.process(e[s]))!==!1&&(c[s]=h);o.index=l.index(c),o.data=c}else o.index=e.index,o.data=e.data;return o};return l.pipeline=[y,p,E],l.process=function(e){for(var o=l.pipeline,r=0;r<o.length;r++)e=o[r](e);return e.length!==0&&e},l.index=function(e){for(var o={},r=0;r<e.length;r++){var c=e[r];if(c!==void 0)for(var h=v(c),s=0;s<h.length;s++){for(var u=h[s],m=u.length-1,d=o,_=0;_<m;_++){var L=u[_],b=d[L];b=b===void 0?{}:b,d[L]=b,d=b}var C=u[m];d[C]===void 0?d[C]={id:[r]}:(d=d[C]).id===void 0?d.id=[r]:d.id.push(r)}}return o},l.save=function(e){return{data:e.data,index:e.index}},l.config=a,l.version="0.3.3",l})})(X);var oe=X.exports;const I=te(oe),A=[];["categories","brands","collections"].forEach(n=>{const a=globalThis.$storefront.data[n];if(a)for(let i=0;i<a.length;i++){const t=a[i];t.name&&t.slug&&A.push({text:Q(`${t.name} ${t.short_description}`),type:n,data:t})}});let D;A.length&&(globalThis.$storefront.settings.lang==="pt_br"&&(I.config.stopWords=["e","a","o","de","para","com","tem"]),D=I(A.map(({text:n})=>n)));const re=n=>{const a=new J({debounce:n.fetchDebounce||300});a.pageSize.value=n.productsLimit||12,a.isWithCount.value=!0,a.isWithBuckets.value=!1;const i=T(0),t=T([]);V(K(n,"term"),async g=>{if(a.fetch(g),D){const v=D(Q(g));t.value=v.map(({index:y})=>{const{name:p,slug:E}=A[y].data;return{title:p,href:`/${E}`}})}},{immediate:!0}),V(a.meta,()=>{i.value=a.meta.count||0});const k=T([]);return V(N,()=>{k.value=N.filter(g=>g!==n.term)},{immediate:!0}),{searchHistory:k,searchEngine:a,isFetching:a.isFetching,products:a.products,productCount:i,linkHits:t}},ne=Z({__name:"SearchModal",props:{term:{},fetchDebounce:{},productsLimit:{}},setup(n,{expose:a}){a();const i=n,{searchHistory:t,isFetching:k,products:g,productCount:v,linkHits:y}=re(i),p={props:i,searchHistory:t,isFetching:k,products:g,productCount:v,linkHits:y,get getSearchUrl(){return q},ProductShelf:$};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),ae={class:"relative"},ie={key:0,class:"bg-base-100/80 grid grid-cols-1 items-center gap-4 p-4 backdrop-blur-md md:grid-cols-2 md:rounded-b lg:mt-5 lg:grid-cols-3 lg:rounded"},se={class:"flex items-center justify-end gap-4 md:order-2"},le={key:0,class:"text-base-900 text-right text-sm lowercase"},ce=["href"],de={class:"lg:col-span-2"},ue=["href"],he=S("i",{class:"i-clock m-0","aria-label":"Buscar novamente"},null,-1);function fe(n,a,i,t,k,g){const v=j("ALink"),y=j("Carousel"),p=j("Fade"),E=j("Skeleton");return f(),w("article",ae,[F(p,{slide:"down"},{default:x(()=>[t.linkHits.length?(f(),w("section",{key:0,class:O(["bg-white p-4",!t.isFetching&&t.products.length?"lg:rounded-t":"lg:rounded"])},[S("nav",null,[F(y,{"wrapper-key":i.term,class:"px-6 [&>ul]:gap-3"},{default:x(()=>[(f(!0),w(R,null,z(t.linkHits,({title:l,href:e},o)=>(f(),w("li",{key:o,class:"shrink-0"},[F(v,{href:e,class:"ui-link"},{default:x(()=>[U(W(l),1)]),_:2},1032,["href"])]))),128))]),_:1},8,["wrapper-key"])])],2)):H("",!0)]),_:1}),t.isFetching?(f(),G(E,{key:0,class:"absolute top-0 w-full px-5 pt-20"})):H("",!0),F(p,{"is-leave-to":!1},{default:x(()=>[!t.isFetching&&t.products.length?(f(),G(t.ProductShelf,{key:0,products:t.products,class:O(["m-0 max-w-none bg-white px-4 lg:[&_[data-carousel-control=next]]:!-right-10 lg:[&_[data-carousel-control=previous]]:!-left-10",t.linkHits.length?"lg:rounded-b":"lg:rounded"])},null,8,["products","class"])):H("",!0)]),_:1}),F(p,{"is-leave-to":!1},{default:x(()=>[!t.isFetching&&(t.searchHistory.length||t.productCount>t.products.length)?(f(),w("section",ie,[S("div",se,[t.productCount>1?(f(),w("p",le,[S("strong",null,W(t.productCount),1),U(" "+W("Itens encontrados"))])):H("",!0),t.productCount>t.products.length?(f(),w("a",{key:1,href:t.getSearchUrl(i.term),class:"ui-btn ui-btn-primary w-auto whitespace-nowrap text-center"},W("Ver todos"),8,ce)):H("",!0)]),S("div",de,[S("nav",null,[F(y,{"wrapper-key":i.term,class:"px-6 [&>ul]:gap-2.5"},{previous:x(()=>[he]),default:x(()=>[(f(!0),w(R,null,z(t.searchHistory,(l,e)=>(f(),w("li",{key:e,class:"shrink-0"},[S("a",{href:t.getSearchUrl(l),class:"text-base-700 ui-link text-sm font-normal"},W(l),9,ue)]))),128))]),_:1},8,["wrapper-key"])])])])):H("",!0)]),_:1})])}const Ae=Y(ne,[["render",fe]]);export{Ae as default};
|