cloudcommerce 2.10.7 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-apps.yml +2 -2
- package/CHANGELOG.md +19 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barradoce/functions/many/package.json +3 -3
- package/ecomplus-stores/barradoce/functions/ssr/content/extra-pages/promocoes.md +1 -1
- package/ecomplus-stores/barradoce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barradoce/functions/ssr/public/robots.txt +1 -0
- package/ecomplus-stores/barradoce/functions/ssr/src/state/midd-search-engine.ts +9 -1
- package/ecomplus-stores/barradoce/functions/ssr/tsconfig.json +6 -2
- package/ecomplus-stores/barradoce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barradoce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/lib/api.d.ts +8 -1
- package/packages/api/lib/api.js +12 -3
- package/packages/api/lib/api.js.map +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/src/api.ts +20 -5
- 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/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/serve-storefront.js +3 -1
- package/packages/ssr/lib/lib/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/ssr/src/lib/serve-storefront.ts +3 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.BpZtnS8j.js +1 -7
- package/packages/storefront/dist/client/_astro/hoisted.-C0vLMXT.js +8 -0
- package/packages/storefront/dist/server/_astro-internal_middleware.mjs +2 -2
- package/packages/storefront/dist/server/chunks/{404_jTV5wvby.mjs → 404_BcY_5eJJ.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{CartSidebar_CV9qwGNE.mjs → CartSidebar_tmly-0ip.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{SearchModal_Cw1ECnXI.mjs → SearchModal_CGNQss2j.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{_.._k1NruPDv.mjs → _.._Bt6Uzpk2.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{_astro-internal_middleware_DIG56BhA.mjs → _astro-internal_middleware_CqUpziyW.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{_page__BKNX3RH7.mjs → _page__Dz-iZHMh.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{account_BZOa6Kmc.mjs → account_tfs9KFTy.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/astro/{assets-service_MW85B416.mjs → assets-service_DSoC_W52.mjs} +2 -1
- package/packages/storefront/dist/server/chunks/{astro_8KdHu_Gf.mjs → astro_Cu3MZ9xv.mjs} +72 -33
- package/packages/storefront/dist/server/chunks/{index_D1o9pXka.mjs → index_BKS_40rA.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{index_CZ6FSUEb.mjs → index_CGzMgZTN.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{node_Khrf-0bH.mjs → node_lZaNT3E1.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{404_BPSxJtl3.mjs → 404_CMwuVMu1.mjs} +9 -10
- package/packages/storefront/dist/server/chunks/pages/{__ByRpsTnC.mjs → __Dz53F-0T.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{_page__BasreLue.mjs → _page__C1x19nYF.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{account_MZBvNAyZ.mjs → account_B5Z6wDBy.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{index_CV2ET14h.mjs → index_CqvjdvSg.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{node_1tKTIKG-.mjs → node_mvX6Tssv.mjs} +4 -111
- package/packages/storefront/dist/server/chunks/pages/{~fallback_BVYzgZ5p.mjs → ~fallback_D2ugBVgc.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{~fallback_xH9bJF7E.mjs → ~fallback_CrFe__-f.mjs} +1 -1
- package/packages/storefront/dist/server/entry.mjs +15 -14
- package/packages/storefront/dist/server/{manifest_S9lE9v48.mjs → manifest_D4v8KX-D.mjs} +2 -2
- package/packages/storefront/dist/server/middleware.mjs +2 -2
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/server.d.ts +2 -4
- package/packages/storefront/src/lib/$storefront.d.ts +4 -0
- package/packages/storefront/src/lib/ssr-context.ts +3 -3
- package/packages/storefront/tsconfig.base.json +16 -0
- package/packages/storefront/tsconfig.json +5 -13
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/hoisted.CSjieYcR.js +0 -8
|
@@ -277,7 +277,9 @@ export default async (req, res) => {
|
|
|
277
277
|
}
|
|
278
278
|
if (headers && BUNNYNET_API_KEY && DEPLOY_RAND) {
|
|
279
279
|
// Tag for CDN cache purge
|
|
280
|
-
headers['CDN-Tag'] = `[${DEPLOY_RAND}]`;
|
|
280
|
+
// headers['CDN-Tag'] = `[${DEPLOY_RAND}]`;
|
|
281
|
+
// FIXME: Disabled while having unexpected troubles with bunny.net CDN cache purge
|
|
282
|
+
delete headers['CDN-Tag'];
|
|
281
283
|
}
|
|
282
284
|
_writeHead.apply(res, [status, headers]);
|
|
283
285
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-storefront.js","sourceRoot":"","sources":["../../src/lib/serve-storefront.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAWzD,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAC5C,MAAM,OAAO,GAAG,mBAAmB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACrD,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;AACzC,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;AACzC,IAAI,cAAsB,CAAC;AAE3B,MAAM,WAAW,GAAiB,EAAE,CAAC;AAErC,MAAM,eAAe,GAAa,EAAE,CAAC;AACrC,IAAI,WAA+B,CAAC;AACpC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE,OAAO,CAAC;KAClE,IAAI,CAAC,CAAC,oBAAoB,EAAE,EAAE;IAC7B,MAAM,QAAQ,GAA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-1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@cloudcommerce/i18n": "workspace:*",
|
|
39
39
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
40
40
|
"@vueuse/core": "10.9.0",
|
|
41
|
-
"astro": "4.5.
|
|
41
|
+
"astro": "4.5.10",
|
|
42
42
|
"astro-capo": "^0.0.1",
|
|
43
43
|
"axios": "^1.6.8",
|
|
44
44
|
"firebase-admin": "^12.0.0",
|
|
@@ -304,7 +304,9 @@ export default async (req: Request, res: Response) => {
|
|
|
304
304
|
}
|
|
305
305
|
if (headers && BUNNYNET_API_KEY && DEPLOY_RAND) {
|
|
306
306
|
// Tag for CDN cache purge
|
|
307
|
-
headers['CDN-Tag'] = `[${DEPLOY_RAND}]`;
|
|
307
|
+
// headers['CDN-Tag'] = `[${DEPLOY_RAND}]`;
|
|
308
|
+
// FIXME: Disabled while having unexpected troubles with bunny.net CDN cache purge
|
|
309
|
+
delete headers['CDN-Tag'];
|
|
308
310
|
}
|
|
309
311
|
_writeHead.apply(res, [status, headers]);
|
|
310
312
|
};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
function __vite__mapDeps(indexes) {
|
|
2
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
-
__vite__mapDeps.viteFileDeps = []
|
|
4
|
-
}
|
|
5
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
|
-
}
|
|
7
|
-
import{d as D,a as S,j as V,k as u,e as m,$ as I,i as A,f as v,p as b,F as w,m as P,n as z,h as k,aa as U,ab as H,Y as J,r as L,w as E,a8 as M,c as Q,a0 as B,a1 as C,ac as K,o as W,Z as X}from"./sf-utils.C9ygvYIB.js";import{_ as F,w as Y}from"./_plugin-vue_export-helper.6K9uDcVo.js";import{u as $}from"./index.BgtOIB20.js";import{a as tt}from"./shopping-cart.Cqc6p5UR.js";import{u as et}from"./use-product-card.Cj9Q-Y1A.js";import{C as ot,Q as it,S as rt}from"./ShippingCalculator.DZSCK4xv.js";import{P as at}from"./Prices.9RhV7hCY.js";import{_ as j}from"./customer-session.Cctko5_9.js";import{i as st}from"./img-sizes.rFK7so02.js";import"./index.BCNoXz_Z.js";import{g as nt}from"./grid-title.CZdq2sDS.js";import"./price.CHiL6Z1J.js";import"./use-analytics.bP3a5cR0.js";import"./afetch.DPLba2tr.js";import"./name.Dll7Wwmg.js";import"./i18n.DPcLqMFO.js";import"./img.Be85e5da.js";import"./_commonjsHelpers.Cpj98o6Y.js";import"./modules-info.BswYf_-7.js";import"./format-money.D19_eJVX.js";const G=(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(G(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}})),G(s,n)}}return t},Z=(a,n,l,t=", ")=>{let e=G(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},lt=(a,n,l,t)=>{const e=G(a,l,t);for(let s=0;s<e.length;s++)if(e[s].text===n)return e[s].value},q=(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=>Z(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 f=i(r);if(!e.hasOwnProperty(r))e[r]=[];else if(e[r].indexOf(f)!==-1)continue;e[r].push(f)}}}),e},ct=D({__name:"ImagesGallery",props:{pictures:{}},setup(a,{expose:n}){n();const l=S(0),t=S("");let e;const s=S(!1),i={activeIndex:l,psId:t,get lightbox(){return e},set lightbox(r){e=r},isLoadingLightbox:s,zoom:r=>{if(t.value=`ps-${H()}`,!e&&!s.value){s.value=!0;const f="photoswipe-style";Promise.all([j(()=>import("./photoswipe-lightbox.esm.BbYxSZIB.js"),__vite__mapDeps([])),j(()=>import("./photoswipe.esm.C0FT-EY-.js"),__vite__mapDeps([])),!document.getElementById(f)&&j(()=>import("./photoswipe.CNpEZKfy.js"),__vite__mapDeps([]))]).then(([{default:o},{default:c},h])=>{if(h){const{default:y}=h,g=document.createElement("style");g.id=f,g.textContent=y,document.head.appendChild(g)}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}}),dt={class:"-mx-4 flex w-screen gap-3 sm:mx-0 sm:w-full md:h-[525px] 2xl:gap-5"},ut=["onClick"],mt=v("span",{class:"absolute bottom-0 block h-2 w-full bg-gradient-to-b from-transparent to-white"},null,-1),ft={class:"relative aspect-square h-full grow md:aspect-auto"},pt={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"},gt={key:1,class:"mt-2 flex justify-center gap-1.5 md:hidden"},ht=["aria-label","onClick"];function _t(a,n,l,t,e,s){const d=V("AImg"),i=V("CarouselControl"),r=V("Carousel"),f=V("ALink");return u(),m("div",dt,[l.pictures.length>1?(u(),I(r,{key:0,axis:"y",class:"group hidden w-[300px] shrink-0 md:block"},{controls:A(()=>[v("span",null,[l.pictures.length>6?(u(),I(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),mt])]),default:A(()=>[(u(!0),m(w,null,P(Math.ceil(l.pictures.length/2),o=>(u(),m("li",{key:o,class:z(["grid w-full grid-cols-2 gap-3 px-1 pb-3",o===1&&"pt-1"])},[(u(!0),m(w,null,P([1,2].map(c=>(o-1)*2+(c-1)),c=>(u(),m(w,{key:`${o}-${c}`},[c<l.pictures.length?(u(),m("button",{key:0,class:"bg-secondary-100 block rounded md:h-[175px]",onClick:h=>t.activeIndex=c},[k(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,ut)):b("",!0)],64))),128))],2))),128))]),_:1})):b("",!0),v("div",ft,[k(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:A(()=>[n[0]||(U(-1),n[0]=(u(!0),m(w,null,P(l.pictures,(o,c)=>(u(),I(f,{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:Y(()=>o.zoom?.size&&t.zoom(c),["prevent"])},{default:A(()=>[k(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)),U(1),n[0])]),_:1},8,["index","class","id"]),t.isLoadingLightbox?(u(),m("i",pt)):b("",!0),l.pictures.length>1?(u(),m("ul",gt,[(u(!0),m(w,null,P(l.pictures.length,o=>(u(),m("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,ht)]))),128))])):b("",!0)])])}const vt=F(ct,[["render",_t]]),yt=a=>{const n=J(a.grids||globalThis.$storefront.data.grids||[]);n.length||window.addEventListener("storefront:data:grids",()=>{globalThis.$storefront.data.grids?.forEach(o=>n.push(o))},{once:!0});const l=L({}),t=L({});E(M(a,"variations"),()=>{Object.assign(t,q(a,void 0,!0));const o=q(a);Object.keys(o).forEach(c=>{t[c]?l[c]=t[c]:delete l[c]})},{immediate:!0});const e=Q(()=>Object.keys(l)),s=L({}),d=S(),i=({optionText:o,gridId:c,gridIndex:h})=>{s[c]=o;const y={};for(let p=0;p<=h;p++){const _=e[p];s[_]&&(y[_]=s[_])}const g=q(a,y,!0);for(let p=h+1;p<e.value.length;p++){const _=e[p],O=g[_];t[_]=O,s[_]&&!O.includes(s[_])&&delete s[_]}const x=a.variations.slice(0);for(let p=0;p<x.length;p++){const _=x[p],{specifications:O}=_,R=Object.keys(O);for(let T=0;T<R.length;T++){const N=R[T];if(s[N]!==Z(_,N)){x.splice(p,1),p-=1;break}}}d.value=x[0]?._id||null};return E(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:h}=c,y=Object.keys(h),g=(x=0)=>{const p=y[x];if(y[x]&&h[p]&&h[p].length===1){const _=h[p][0].text;l[p].find(O=>O===_)&&(i({optionText:_,gridId:p,gridIndex:e.value.indexOf(p)}),g(x+1))}};g()},{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(h=>lt(a.variations,h.trim(),"colors"));return c.length>1?`background:linear-gradient(to right bottom, ${c[0]} 50%, ${c[1]} 50%)`:`background:${c[0]}`}}},bt=D({__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:f,getGridTitle:o,getColorOptionBg:c}=yt(t);E(f,y=>{e("update:variationId",y)});const h={props:t,emit:e,variationsGrids:s,activeVariationsGrids:d,selectOption:i,selectedOptions:r,variationId:f,getGridTitle:o,getColorOptionBg:c};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),xt={class:"text-base-700 text-sm font-medium"},kt={key:0,class:"text-base-800"},wt={key:0,class:"mt-2 flex gap-2"},Ct=["onClick"];function St(a,n,l,t,e,s){return u(),m("div",null,[(u(!0),m(w,null,P(t.variationsGrids,(d,i)=>(u(),m("div",{key:i,class:"mt-3"},[v("span",xt,[B(C(t.getGridTitle(i))+": ",1),t.selectedOptions[i]?(u(),m("strong",kt,C(t.selectedOptions[i]),1)):b("",!0)]),d.length<7?(u(),m("ul",wt,[(u(!0),m(w,null,P(d,(r,f)=>(u(),m("li",{key:`${i}-${f}`},[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:K(i==="colors"&&t.getColorOptionBg(r)),onClick:o=>t.selectOption({optionText:r,gridId:i,gridIndex:f})},C(r),15,Ct)]))),128))])):b("",!0)]))),128))])}const Ot=F(bt,[["render",St]]),zt=D({__name:"ProductDetails",props:{product:{default:()=>globalThis.$storefront.apiContext?.doc},cmsPreview:{}},setup(a,{expose:n}){n();const l=a,{product:t,title:e,isActive:s}=et(l),d=S(t.min_quantity||1),i=$("history"),r=S(!1),f=S(null);E(f,g=>{g&&(i.var=g,r.value=!1)}),W(()=>{E(i,({var:g})=>{typeof g=="string"&&g&&(f.value=g)},{immediate:!0})});const o=Q(()=>!!(!t.variations?.length||f.value)),c=g=>(o.value?r.value=!1:(g&&g.preventDefault(),r.value=!0),!r.value),y={props:l,product:t,title:e,isActive:s,quantity:d,params:i,hasSkuSelectionAlert:r,variationId:f,isSkuSelected:o,checkVariation:c,addToCart:()=>{c()&&tt(t,f.value||void 0,d.value)},CheckoutLink:ot,QuantitySelector:it,Prices:at,ImagesGallery:vt,SkuSelector:Ot,ShippingCalculator:rt};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),At={class:"relative grid grid-cols-1 items-start gap-x-5 ui-section lg:grid-cols-4 lg:gap-x-4 2xl:gap-x-6"},Pt={class:"w-full lg:col-span-3"},Vt={class:"top-0 pt-4 transition-transform lg:sticky lg:pb-4 lg:sticky-header:translate-y-14"},It={class:"text-lg text-secondary-900 ui-text-brand"},Et={key:0,class:"mt-5"},Gt={key:0,class:"inline-block ui-alert"},Tt=v("i",{class:"ml-1 -rotate-90 i-arrow-right"},null,-1),Lt={class:"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 md:flex-nowrap lg:mt-4 lg:flex-wrap"},jt=v("i",{class:"mr-1 i-chevron-double-right"},null,-1),qt=["data-tooltip"],Bt={class:"mt-6 rounded border-2 border-base-50 border-t-base-100 p-4 lg:mt-4"},Dt={class:"w-full lg:col-span-3"};function Ft(a,n,l,t,e,s){const d=V("Fade");return u(),m("section",At,[v("div",Pt,[t.product.pictures?.length?(u(),I(t.ImagesGallery,{key:0,pictures:t.product.pictures,class:"mb-5"},null,8,["pictures"])):b("",!0)]),v("div",Vt,[v("h1",It,C(t.title),1),t.isActive?(u(),m("div",Et,[k(t.Prices,{product:t.product,"is-big":"","is-literal":""},null,8,["product"]),t.product.variations?(u(),I(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),k(d,{slide:"down"},{default:A(()=>[t.hasSkuSelectionAlert?(u(),m("div",Gt,[B(C("Por favor selecione uma opção em cada campo acima")+" "),Tt])):b("",!0)]),_:1}),v("div",Lt,[k(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:"rounded border-base-100 md:mr-5 lg:mb-2 lg:mr-auto lg:border-2"},null,8,["modelValue","min","max"]),k(t.CheckoutLink,{class:"grow text-center ui-btn-lg ui-btn-primary",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:A(()=>[jt,B(" "+C("Comprar"))]),_:1},8,["cart-item","data-tooltip"]),v("button",{class:"grow ui-btn-lg ui-btn-contrast",onClick:Y(t.addToCart,["prevent"]),"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar"},C("Adicionar ao carrinho"),8,qt)]),v("div",Bt,[k(t.ShippingCalculator,{"shipped-items":[{...t.product,quantity:t.quantity}],"has-label":""},null,8,["shipped-items"])])])):b("",!0)]),v("div",Dt,[X(a.$slots,"description")])])}const ne=F(zt,[["render",Ft]]);export{ne as default};
|
|
1
|
+
import{d as D,a as S,j as V,k as u,e as m,$ as I,i as A,f as v,p as b,F as w,m as P,n as z,h as k,aa as U,ab as H,Y as J,r as L,w as E,a8 as M,c as Q,a0 as B,a1 as C,ac as K,o as W,Z as X}from"./sf-utils.C9ygvYIB.js";import{_ as F,w as Y}from"./_plugin-vue_export-helper.6K9uDcVo.js";import{u as $}from"./index.BgtOIB20.js";import{a as tt}from"./shopping-cart.Cqc6p5UR.js";import{u as et}from"./use-product-card.Cj9Q-Y1A.js";import{C as ot,Q as it,S as rt}from"./ShippingCalculator.DZSCK4xv.js";import{P as at}from"./Prices.9RhV7hCY.js";import{_ as j}from"./customer-session.Cctko5_9.js";import{i as st}from"./img-sizes.rFK7so02.js";import"./index.BCNoXz_Z.js";import{g as nt}from"./grid-title.CZdq2sDS.js";import"./price.CHiL6Z1J.js";import"./use-analytics.bP3a5cR0.js";import"./afetch.DPLba2tr.js";import"./name.Dll7Wwmg.js";import"./i18n.DPcLqMFO.js";import"./img.Be85e5da.js";import"./_commonjsHelpers.Cpj98o6Y.js";import"./modules-info.BswYf_-7.js";import"./format-money.D19_eJVX.js";const G=(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(G(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}})),G(s,n)}}return t},Z=(a,n,l,t=", ")=>{let e=G(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},lt=(a,n,l,t)=>{const e=G(a,l,t);for(let s=0;s<e.length;s++)if(e[s].text===n)return e[s].value},q=(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=>Z(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 f=i(r);if(!e.hasOwnProperty(r))e[r]=[];else if(e[r].indexOf(f)!==-1)continue;e[r].push(f)}}}),e},ct=D({__name:"ImagesGallery",props:{pictures:{}},setup(a,{expose:n}){n();const l=S(0),t=S("");let e;const s=S(!1),i={activeIndex:l,psId:t,get lightbox(){return e},set lightbox(r){e=r},isLoadingLightbox:s,zoom:r=>{if(t.value=`ps-${H()}`,!e&&!s.value){s.value=!0;const f="photoswipe-style";Promise.all([j(()=>import("./photoswipe-lightbox.esm.BbYxSZIB.js"),[]),j(()=>import("./photoswipe.esm.C0FT-EY-.js"),[]),!document.getElementById(f)&&j(()=>import("./photoswipe.CNpEZKfy.js"),[])]).then(([{default:o},{default:c},h])=>{if(h){const{default:y}=h,g=document.createElement("style");g.id=f,g.textContent=y,document.head.appendChild(g)}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}}),dt={class:"-mx-4 flex w-screen gap-3 sm:mx-0 sm:w-full md:h-[525px] 2xl:gap-5"},ut=["onClick"],mt=v("span",{class:"absolute bottom-0 block h-2 w-full bg-gradient-to-b from-transparent to-white"},null,-1),ft={class:"relative aspect-square h-full grow md:aspect-auto"},pt={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"},gt={key:1,class:"mt-2 flex justify-center gap-1.5 md:hidden"},ht=["aria-label","onClick"];function _t(a,n,l,t,e,s){const d=V("AImg"),i=V("CarouselControl"),r=V("Carousel"),f=V("ALink");return u(),m("div",dt,[l.pictures.length>1?(u(),I(r,{key:0,axis:"y",class:"group hidden w-[300px] shrink-0 md:block"},{controls:A(()=>[v("span",null,[l.pictures.length>6?(u(),I(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),mt])]),default:A(()=>[(u(!0),m(w,null,P(Math.ceil(l.pictures.length/2),o=>(u(),m("li",{key:o,class:z(["grid w-full grid-cols-2 gap-3 px-1 pb-3",o===1&&"pt-1"])},[(u(!0),m(w,null,P([1,2].map(c=>(o-1)*2+(c-1)),c=>(u(),m(w,{key:`${o}-${c}`},[c<l.pictures.length?(u(),m("button",{key:0,class:"bg-secondary-100 block rounded md:h-[175px]",onClick:h=>t.activeIndex=c},[k(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,ut)):b("",!0)],64))),128))],2))),128))]),_:1})):b("",!0),v("div",ft,[k(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:A(()=>[n[0]||(U(-1),n[0]=(u(!0),m(w,null,P(l.pictures,(o,c)=>(u(),I(f,{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:Y(()=>o.zoom?.size&&t.zoom(c),["prevent"])},{default:A(()=>[k(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)),U(1),n[0])]),_:1},8,["index","class","id"]),t.isLoadingLightbox?(u(),m("i",pt)):b("",!0),l.pictures.length>1?(u(),m("ul",gt,[(u(!0),m(w,null,P(l.pictures.length,o=>(u(),m("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,ht)]))),128))])):b("",!0)])])}const vt=F(ct,[["render",_t]]),yt=a=>{const n=J(a.grids||globalThis.$storefront.data.grids||[]);n.length||window.addEventListener("storefront:data:grids",()=>{globalThis.$storefront.data.grids?.forEach(o=>n.push(o))},{once:!0});const l=L({}),t=L({});E(M(a,"variations"),()=>{Object.assign(t,q(a,void 0,!0));const o=q(a);Object.keys(o).forEach(c=>{t[c]?l[c]=t[c]:delete l[c]})},{immediate:!0});const e=Q(()=>Object.keys(l)),s=L({}),d=S(),i=({optionText:o,gridId:c,gridIndex:h})=>{s[c]=o;const y={};for(let p=0;p<=h;p++){const _=e[p];s[_]&&(y[_]=s[_])}const g=q(a,y,!0);for(let p=h+1;p<e.value.length;p++){const _=e[p],O=g[_];t[_]=O,s[_]&&!O.includes(s[_])&&delete s[_]}const x=a.variations.slice(0);for(let p=0;p<x.length;p++){const _=x[p],{specifications:O}=_,R=Object.keys(O);for(let T=0;T<R.length;T++){const N=R[T];if(s[N]!==Z(_,N)){x.splice(p,1),p-=1;break}}}d.value=x[0]?._id||null};return E(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:h}=c,y=Object.keys(h),g=(x=0)=>{const p=y[x];if(y[x]&&h[p]&&h[p].length===1){const _=h[p][0].text;l[p].find(O=>O===_)&&(i({optionText:_,gridId:p,gridIndex:e.value.indexOf(p)}),g(x+1))}};g()},{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(h=>lt(a.variations,h.trim(),"colors"));return c.length>1?`background:linear-gradient(to right bottom, ${c[0]} 50%, ${c[1]} 50%)`:`background:${c[0]}`}}},bt=D({__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:f,getGridTitle:o,getColorOptionBg:c}=yt(t);E(f,y=>{e("update:variationId",y)});const h={props:t,emit:e,variationsGrids:s,activeVariationsGrids:d,selectOption:i,selectedOptions:r,variationId:f,getGridTitle:o,getColorOptionBg:c};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),xt={class:"text-base-700 text-sm font-medium"},kt={key:0,class:"text-base-800"},wt={key:0,class:"mt-2 flex gap-2"},Ct=["onClick"];function St(a,n,l,t,e,s){return u(),m("div",null,[(u(!0),m(w,null,P(t.variationsGrids,(d,i)=>(u(),m("div",{key:i,class:"mt-3"},[v("span",xt,[B(C(t.getGridTitle(i))+": ",1),t.selectedOptions[i]?(u(),m("strong",kt,C(t.selectedOptions[i]),1)):b("",!0)]),d.length<7?(u(),m("ul",wt,[(u(!0),m(w,null,P(d,(r,f)=>(u(),m("li",{key:`${i}-${f}`},[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:K(i==="colors"&&t.getColorOptionBg(r)),onClick:o=>t.selectOption({optionText:r,gridId:i,gridIndex:f})},C(r),15,Ct)]))),128))])):b("",!0)]))),128))])}const Ot=F(bt,[["render",St]]),zt=D({__name:"ProductDetails",props:{product:{default:()=>globalThis.$storefront.apiContext?.doc},cmsPreview:{}},setup(a,{expose:n}){n();const l=a,{product:t,title:e,isActive:s}=et(l),d=S(t.min_quantity||1),i=$("history"),r=S(!1),f=S(null);E(f,g=>{g&&(i.var=g,r.value=!1)}),W(()=>{E(i,({var:g})=>{typeof g=="string"&&g&&(f.value=g)},{immediate:!0})});const o=Q(()=>!!(!t.variations?.length||f.value)),c=g=>(o.value?r.value=!1:(g&&g.preventDefault(),r.value=!0),!r.value),y={props:l,product:t,title:e,isActive:s,quantity:d,params:i,hasSkuSelectionAlert:r,variationId:f,isSkuSelected:o,checkVariation:c,addToCart:()=>{c()&&tt(t,f.value||void 0,d.value)},CheckoutLink:ot,QuantitySelector:it,Prices:at,ImagesGallery:vt,SkuSelector:Ot,ShippingCalculator:rt};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),At={class:"relative grid grid-cols-1 items-start gap-x-5 ui-section lg:grid-cols-4 lg:gap-x-4 2xl:gap-x-6"},Pt={class:"w-full lg:col-span-3"},Vt={class:"top-0 pt-4 transition-transform lg:sticky lg:pb-4 lg:sticky-header:translate-y-14"},It={class:"text-lg text-secondary-900 ui-text-brand"},Et={key:0,class:"mt-5"},Gt={key:0,class:"inline-block ui-alert"},Tt=v("i",{class:"ml-1 -rotate-90 i-arrow-right"},null,-1),Lt={class:"mt-5 flex flex-wrap items-center gap-x-4 gap-y-2 md:flex-nowrap lg:mt-4 lg:flex-wrap"},jt=v("i",{class:"mr-1 i-chevron-double-right"},null,-1),qt=["data-tooltip"],Bt={class:"mt-6 rounded border-2 border-base-50 border-t-base-100 p-4 lg:mt-4"},Dt={class:"w-full lg:col-span-3"};function Ft(a,n,l,t,e,s){const d=V("Fade");return u(),m("section",At,[v("div",Pt,[t.product.pictures?.length?(u(),I(t.ImagesGallery,{key:0,pictures:t.product.pictures,class:"mb-5"},null,8,["pictures"])):b("",!0)]),v("div",Vt,[v("h1",It,C(t.title),1),t.isActive?(u(),m("div",Et,[k(t.Prices,{product:t.product,"is-big":"","is-literal":""},null,8,["product"]),t.product.variations?(u(),I(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),k(d,{slide:"down"},{default:A(()=>[t.hasSkuSelectionAlert?(u(),m("div",Gt,[B(C("Por favor selecione uma opção em cada campo acima")+" "),Tt])):b("",!0)]),_:1}),v("div",Lt,[k(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:"rounded border-base-100 md:mr-5 lg:mb-2 lg:mr-auto lg:border-2"},null,8,["modelValue","min","max"]),k(t.CheckoutLink,{class:"grow text-center ui-btn-lg ui-btn-primary",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:A(()=>[jt,B(" "+C("Comprar"))]),_:1},8,["cart-item","data-tooltip"]),v("button",{class:"grow ui-btn-lg ui-btn-contrast",onClick:Y(t.addToCart,["prevent"]),"data-tooltip":t.isSkuSelected?null:"Escolha os detalhes do produto para comprar"},C("Adicionar ao carrinho"),8,qt)]),v("div",Bt,[k(t.ShippingCalculator,{"shipped-items":[{...t.product,quantity:t.quantity}],"has-label":""},null,8,["shipped-items"])])])):b("",!0)]),v("div",Dt,[X(a.$slots,"description")])])}const ne=F(zt,[["render",Ft]]);export{ne as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{g as L}from"./_commonjsHelpers.Cpj98o6Y.js";import{a as R}from"./afetch.DPLba2tr.js";import{i as $}from"./i18n.DPcLqMFO.js";import{a as D,s as T,w as P}from"./sf-utils.C9ygvYIB.js";import{e as U}from"./index.BCNoXz_Z.js";import"./hoisted.BeKMioW4.js";import"./index.DlxZwqDP.js";import"./use-analytics.bP3a5cR0.js";import"./customer-session.Cctko5_9.js";import"./shopping-cart.Cqc6p5UR.js";import"./price.CHiL6Z1J.js";import"./name.Dll7Wwmg.js";var I={exports:{}};const q=Object.getPrototypeOf({});function E(t){function d(e){return e!=="constructor"&&e!=="prototype"&&e!=="__proto__"}function a(e){let n=0;const s=e.length,i=new Array(s);for(n=0;n<s;++n)i[n]=h(e[n]);return i}function o(e){const n={};if(b&&Object.getPrototypeOf(e)!==q)return b(e);const s=m(e);let i,c,u;for(i=0,c=s.length;i<c;++i)d(u=s[i])&&(n[u]=h(e[u]));return n}function r(e,n){const s=e.length,i=n.length;let c=0;const u=new Array(s+i);for(c=0;c<s;++c)u[c]=h(e[c]);for(c=0;c<i;++c)u[c+s]=h(n[c]);return u}const l=Object.prototype.propertyIsEnumerable;function g(e){const n=Object.keys(e),s=Object.getOwnPropertySymbols(e);for(let i=0,c=s.length;i<c;++i)l.call(e,s[i])&&n.push(s[i]);return n}const m=t&&t.symbols?g:Object.keys,b=typeof t?.cloneProtoObject=="function"?t.cloneProtoObject:void 0;function w(e){return typeof e=="object"&&e!==null&&!(e instanceof RegExp)&&!(e instanceof Date)}function p(e){return typeof e!="object"||e===null}const _=typeof Buffer<"u"?e=>typeof e!="object"||e===null||e instanceof RegExp||e instanceof Date||e instanceof Buffer:e=>typeof e!="object"||e===null||e instanceof RegExp||e instanceof Date,S=t&&typeof t.mergeArray=="function"?t.mergeArray({clone:h,deepmerge:C,getKeys:m,isMergeableObject:w}):r;function h(e){return w(e)?Array.isArray(e)?a(e):o(e):e}function A(e,n){const s={},i=m(e),c=m(n);let u,O,k;for(u=0,O=i.length;u<O;++u)d(k=i[u])&&c.indexOf(k)===-1&&(s[k]=h(e[k]));for(u=0,O=c.length;u<O;++u)d(k=c[u])&&(k in e&&(i.indexOf(k)!==-1&&(s[k]=C(e[k],n[k])),!0)||(s[k]=h(n[k])));return s}function C(e,n){const s=Array.isArray(n),i=Array.isArray(e);return p(n)?n:_(e)?h(n):s&&i?S(e,n):s!==i?h(n):A(e,n)}function y(){switch(arguments.length){case 0:return{};case 1:return h(arguments[0]);case 2:return C(arguments[0],arguments[1])}let e;for(let n=0,s=arguments.length;n<s;++n)e=C(e,arguments[n]);return e}return t&&t.all?y:C}I.exports=E;I.exports.default=E;I.exports.deepmerge=E;var N=I.exports;const x=L(N),W=()=>{const{CMS_REPO_BASE_DIR:t,CMS_LANG:d,CMS_MAX_FILE_SIZE:a,CMS:o}=window;if(!o)throw Error("Missing global CMS");const{domain:r}=window.$storefront?.settings||{},l=t||"functions/ssr/",g=d||"pt",m=_=>$(_,g),b=x();o.registerLocale(g,b(o.getLocale(g),{editor:{editorWidgets:{image:{chooseDifferent:m({en:"Change image",pt:"Mudar imagem"}),remove:m({en:"Remove",pt:"Remover"})}}}}));const w=Math.max(a||0,1e6);return{locale:g,load_config_file:!1,publish_mode:"editorial_workflow",media_folder:`${l}public/img/uploads`,public_folder:"/img/uploads",site_url:`https://${r}/~preview`,display_url:`https://${r}`,logo_url:"https://ecom.nyc3.digitaloceanspaces.com/storefront/cms.png",show_preview_links:!0,search:!1,slug:{encoding:"ascii",clean_accents:!0,sanitize_replacement:"-"},collections:m([{name:"config",label:{en:"Settings",pt:"Configurações"},description:{en:"General settings for site identity and metadata",pt:"Configurações gerais para identidade e metadados do site"},delete:!1,editor:{preview:!1},files:[{name:"settings",label:{en:"General config",pt:"Configurações gerais"},file:`${l}content/settings.json`,editor:{preview:!0},fields:[{label:"e-com.plus Store ID",name:"storeId",widget:"hidden"},{label:"Repository",name:"repository",widget:"hidden"},{label:{en:"Domain name",pt:"Domínio"},name:"domain",widget:"string"},{label:{en:"Store name",pt:"Nome da loja"},name:"name",widget:"string"},{label:{en:"Short description",pt:"Descrição curta"},name:"description",widget:"text"},{label:{en:"Logo",pt:"Logomarca"},name:"logo",widget:"image",media_library:{config:{max_file_size:w}}},{label:{en:"Icon",pt:"Ícone"},name:"icon",widget:"image",media_library:{config:{max_file_size:w}}},{label:{en:"Primary color",pt:"Cor primária"},name:"primaryColor",widget:"color"},{label:{en:"Secondary color",pt:"Cor secundária"},name:"secondaryColor",widget:"color",required:!1},{label:{en:"Contact email",pt:"E-mail de contato"},name:"email",widget:"string",required:!1},{label:{en:"Service telephone",pt:"Telefone de atendimento"},name:"phone",widget:"string",required:!1},{label:{en:"Store address",pt:"Endereço da loja"},name:"address",widget:"string",required:!1},{label:{en:"Corporate name",pt:"Razão social da empresa"},name:"corporateName",widget:"string"},{label:{en:"Store document number",pt:"CNPJ"},name:"docNumber",widget:"string"},{label:{en:"Service links",pt:"Links de atendimento"},name:"serviceLinks",widget:"list",summary:"{{fields.title}}",fields:[{label:{en:"Title",pt:"Título"},name:"title",widget:"string"},{label:"Link",name:"href",widget:"string"}]},{label:{en:"Payment methods",pt:"Formas de pagamento"},name:"paymentMethods",widget:"select",multiple:!0,options:["pix","visa","mastercard","elo","amex","hipercard","boleto","diners","discover"]},{label:"WhatsApp",name:"whatsapp",widget:"string",required:!1},{label:"Instagram",name:"instagram",widget:"string",required:!1},{label:"Facebook",name:"facebook",widget:"string",required:!1},{label:"X / Twitter",name:"twitter",widget:"string",required:!1},{label:"YouTube",name:"youtube",widget:"string",required:!1},{label:"TikTok",name:"tiktok",widget:"string",required:!1},{label:"Pinterest",name:"pinterest",widget:"string",required:!1},{label:"Threads",name:"threads",widget:"string",required:!1},{label:{en:"Default locale",pt:"Língua padrão"},name:"lang",widget:"select",options:[{label:"Português",value:"pt_br"},{label:"Inglês",value:"en_us"}],default:"pt_br"},{label:{en:"Currency code",pt:"Código da moeda"},name:"currency",widget:"hidden",default:"BRL"},{label:{en:"Currency symbol",pt:"Símbolo da moeda"},name:"currencySymbol",widget:"hidden",default:"R$"},{label:{en:"Country code",pt:"Código do país"},name:"countryCode",widget:"hidden",default:"BR"},{name:"modules",widget:"hidden"},{name:"cartUrl",widget:"hidden"},{name:"checkoutUrl",widget:"hidden"},{name:"accountUrl",widget:"hidden"},{name:"ordersUrl",widget:"hidden"},{name:"favoritesUrl",widget:"hidden"},{name:"metafields",widget:"hidden"}]}]}])}},v=(t,d,a,o)=>{const r=o?t[a]?.[o]:t[a],l=o?d[a]?.[o]:d[a];if(typeof r!=typeof l)return!1;if(typeof r=="object"&&r&&l){const g=Object.keys(r);return g.length!==Object.keys(l).length?!1:g.every(m=>v(r,l,m))}return r===l},B=(t,d)=>{const a=[];return Object.keys(t).forEach(o=>{if(typeof t[o]=="object"&&t[o]){Object.keys(t[o]).forEach(r=>{Array.isArray(t[o])&&(r=Number(r)),v(t,d,o,r)||a.push([o,r])});return}v(t,d,o)||a.push([o])}),a},F=({createClass:t,h:d})=>{const{host:a}=window.location,o=a.includes("localhost")||a.includes("127.0.0.1"),r=D(null),l=T({}),g=U((b,w)=>{r.value=new URL(`http${o?"":"s"}://${a}/~preview/${b}`),w.forEach(({filename:p,data:_})=>{r.value.searchParams.append(`content:${p}`,JSON.stringify(_))})},100),m="pagePreview";return t({render(){const b=this.props.entry;l.value=b.toJS().data;const w=`
|
|
2
|
+
<iframe
|
|
3
|
+
id="${m}"
|
|
4
|
+
border="0"
|
|
5
|
+
width="100%"
|
|
6
|
+
height="100%"
|
|
7
|
+
style="border: 1px solid #EEE; height: calc(100dvh - 12px)"
|
|
8
|
+
></iframe>`;return d("div",{dangerouslySetInnerHTML:{__html:w}})},componentDidMount(){const b=window.location.hash.split("/entries/").pop()||"",w="",_=document.getElementById("preview-pane").contentWindow,S=_.document.getElementById(m),h=S.contentWindow,A=[];_.addEventListener("message",y=>{y.data.type==="open"&&y.data.filename===b&&(y.data.field&&A.push([y.data.field,y.data.subfield]),h?.postMessage({id:y.data.id,data:l.value}))});const C=()=>g(w,[{filename:b,data:l.value}]);P(l,(y,e)=>{r.value&&e&&B(y,e).every(i=>A.some(([c,u])=>c===i[0]&&u===i[1]))||C()},{immediate:!0}),P(r,y=>{y&&(S.src=y.toString())},{immediate:!0})}})};let f={};const j=()=>{const{createClass:t,h:d,CMS:a}=window;if(a.init({config:f}),t&&d){const o=F({createClass:t,h:d,cmsConfig:f});f.collections.forEach(({name:r,files:l})=>{const g=r.charAt(0);if(!(g==="_"||g===".")){if(l){l.forEach(m=>{a.registerPreviewTemplate(m.name,o)});return}a.registerPreviewTemplate(r,o)}})}},M=async()=>{const{location:t,sessionStorage:d,ECOM_STORE_ID:a,GIT_REPO:o,CMS_CUSTOM_CONFIG:r,CMS_SSO_URL:l="https://app.e-com.plus/pages/login?api_version=2"}=window;f=W(),r&&(f=x()(f,r));const g="__cms_token";let m=d.getItem(g);const b=new URLSearchParams(t.search),w=b.get("sso_token")||b.get("access_token");if(!f.backend?.base_url){if(!m&&!w&&l){const p=new URL(l);p.searchParams.set("sso_store_id",`${a}`),p.searchParams.set("sso_redirect",t.href),t.href=p.toString();return}if(f.backend={repo:o||"_owner/_name",api_root:`https://ecomplus.app/api/${a}/git/github/`,name:"github",base_url:`https://${t.hostname}`,auth_endpoint:t.pathname,branch:"main",commit_messages:{create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"[skip ci] Delete “{{path}}”",openAuthoring:"{{message}}",...f.backend?.commit_messages},...f.backend},f.backend.api_root?.startsWith("https://ecomplus.app/")){const p=await R("https://ecomplus.app/api/github-installations",{headers:{"X-Store-ID":`${a}`,Authorization:`Bearer ${w}`}});if(p.ok){const{installations:_}=await p.json();if(Array.isArray(_)){const{repo:S}=f.backend,h=S!=="_owner/_name"?_.find(({repository:A})=>A===S):_[0];h?.gh_token&&h.gh_token.charAt(0)!=="*"&&(m=h.gh_token,delete f.backend.api_root,f.backend.repo=h.repository,f.backend.name="github")}}}}if(m){d.removeItem(g),window.opener||j();const p=window.opener||window;setTimeout(()=>{p.postMessage("authorizing:github","*"),p.postMessage(`authorization:github:success:${JSON.stringify({token:m,provider:f.backend.name})}`,f.backend.base_url)},100);return}if(w){window.history?.pushState("hide-token",document.title,`${t.pathname}${t.search}${t.hash}`);const p=f.backend.name;p&&p!=="git-gateway"&&d.setItem(g,w)}j()};if(window.CMS_MANUAL_INIT=!0,window.CMS)M();else{const t=document.createElement("script");t.src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js",t.onload=M,document.body.appendChild(t)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@astrojs/internal-helpers/path';
|
|
2
2
|
import 'cookie';
|
|
3
|
-
export { o as onRequest } from './chunks/_astro-
|
|
4
|
-
import './chunks/pages/
|
|
3
|
+
export { o as onRequest } from './chunks/_astro-internal_middleware_CqUpziyW.mjs';
|
|
4
|
+
import './chunks/pages/404_CMwuVMu1.mjs';
|
package/packages/storefront/dist/server/chunks/{CartSidebar_CV9qwGNE.mjs → CartSidebar_tmly-0ip.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a2 as parseProduct, _ as _export_sfc, a3 as removeCartItem, a4 as freeShippingFromValue, a5 as shoppingCart, a6 as totalItems } from './pages/
|
|
1
|
+
import { a2 as parseProduct, _ as _export_sfc, a3 as removeCartItem, a4 as freeShippingFromValue, a5 as shoppingCart, a6 as totalItems } from './pages/404_CMwuVMu1.mjs';
|
|
2
2
|
import { computed, useSSRContext, defineComponent, resolveComponent, mergeProps, withCtx, openBlock, createBlock, createCommentVNode, createVNode, toDisplayString, ref, createTextVNode } from 'vue';
|
|
3
|
-
import { Q as QuantitySelector, b as Prices, C as CheckoutLink, c as ShippingCalculator } from './pages/
|
|
3
|
+
import { Q as QuantitySelector, b as Prices, C as CheckoutLink, c as ShippingCalculator } from './pages/__Dz53F-0T.mjs';
|
|
4
4
|
import { name, img } from '@ecomplus/utils';
|
|
5
5
|
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderAttr, ssrRenderList } from 'vue/server-renderer';
|
|
6
6
|
|
package/packages/storefront/dist/server/chunks/{SearchModal_Cw1ECnXI.mjs → SearchModal_CGNQss2j.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a0 as clearAccents, _ as _export_sfc, a1 as getSearchUrl } from './pages/
|
|
1
|
+
import { a0 as clearAccents, _ as _export_sfc, a1 as getSearchUrl } from './pages/404_CMwuVMu1.mjs';
|
|
2
2
|
import { ref, watch, toRef, defineComponent, resolveComponent, mergeProps, withCtx, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, createVNode, createCommentVNode, useSSRContext } from 'vue';
|
|
3
3
|
import Wade from 'wade';
|
|
4
|
-
import { S as SearchEngine, s as searchHistory, a as ProductShelf } from './pages/
|
|
4
|
+
import { S as SearchEngine, s as searchHistory, a as ProductShelf } from './pages/__Dz53F-0T.mjs';
|
|
5
5
|
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderClass, ssrRenderList, ssrInterpolate, ssrRenderAttr } from 'vue/server-renderer';
|
|
6
6
|
|
|
7
7
|
const wadeDocs = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@astrojs/internal-helpers/path';
|
|
2
2
|
import 'cookie';
|
|
3
|
-
import { Z as onRequest$1 } from './pages/
|
|
3
|
+
import { Z as onRequest$1 } from './pages/404_CMwuVMu1.mjs';
|
|
4
4
|
|
|
5
5
|
function sequence(...handlers) {
|
|
6
6
|
const filtered = handlers.filter((h) => !!h);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRemotePath, joinPaths } from '@astrojs/internal-helpers/path';
|
|
2
|
-
import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as MissingSharp } from '../
|
|
2
|
+
import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as MissingSharp } from '../astro_Cu3MZ9xv.mjs';
|
|
3
3
|
|
|
4
4
|
const InvalidImageService = {
|
|
5
5
|
name: "InvalidImageService",
|
|
@@ -419,6 +419,7 @@ async function loadSharp() {
|
|
|
419
419
|
} catch (e) {
|
|
420
420
|
throw new AstroError$1(MissingSharp);
|
|
421
421
|
}
|
|
422
|
+
sharpImport.cache(false);
|
|
422
423
|
return sharpImport;
|
|
423
424
|
}
|
|
424
425
|
const sharpService = {
|
|
@@ -301,7 +301,7 @@ class AstroError extends Error {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
const ASTRO_VERSION = "4.5.
|
|
304
|
+
const ASTRO_VERSION = "4.5.15";
|
|
305
305
|
const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
|
|
306
306
|
const ROUTE_TYPE_HEADER = "X-Astro-Route-Type";
|
|
307
307
|
const DEFAULT_404_COMPONENT = "astro-default-404";
|
|
@@ -938,25 +938,37 @@ function renderElement$1(name, { props: _props, children = "" }, shouldEscape =
|
|
|
938
938
|
}
|
|
939
939
|
return `<${name}${internalSpreadAttributes(props, shouldEscape)}>${children}</${name}>`;
|
|
940
940
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
941
|
+
const noop = () => {
|
|
942
|
+
};
|
|
943
|
+
class BufferedRenderer {
|
|
944
|
+
chunks = [];
|
|
945
|
+
renderPromise;
|
|
946
|
+
destination;
|
|
947
|
+
constructor(bufferRenderFunction) {
|
|
948
|
+
this.renderPromise = bufferRenderFunction(this);
|
|
949
|
+
Promise.resolve(this.renderPromise).catch(noop);
|
|
950
|
+
}
|
|
951
|
+
write(chunk) {
|
|
952
|
+
if (this.destination) {
|
|
953
|
+
this.destination.write(chunk);
|
|
954
|
+
} else {
|
|
955
|
+
this.chunks.push(chunk);
|
|
956
956
|
}
|
|
957
|
-
}
|
|
957
|
+
}
|
|
958
|
+
async renderToFinalDestination(destination) {
|
|
959
|
+
for (const chunk of this.chunks) {
|
|
960
|
+
destination.write(chunk);
|
|
961
|
+
}
|
|
962
|
+
this.destination = destination;
|
|
963
|
+
await this.renderPromise;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
function renderToBufferDestination(bufferRenderFunction) {
|
|
967
|
+
const renderer = new BufferedRenderer(bufferRenderFunction);
|
|
968
|
+
return renderer;
|
|
958
969
|
}
|
|
959
970
|
const isNode = typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]";
|
|
971
|
+
const isDeno = typeof Deno !== "undefined";
|
|
960
972
|
function promiseWithResolvers() {
|
|
961
973
|
let resolve, reject;
|
|
962
974
|
const promise = new Promise((_resolve, _reject) => {
|
|
@@ -1156,7 +1168,9 @@ function isRenderInstance(obj) {
|
|
|
1156
1168
|
}
|
|
1157
1169
|
|
|
1158
1170
|
async function renderChild(destination, child) {
|
|
1159
|
-
child
|
|
1171
|
+
if (isPromise(child)) {
|
|
1172
|
+
child = await child;
|
|
1173
|
+
}
|
|
1160
1174
|
if (child instanceof SlotString) {
|
|
1161
1175
|
destination.write(child);
|
|
1162
1176
|
} else if (isHTMLString(child)) {
|
|
@@ -1525,6 +1539,7 @@ function getHTMLElementName(constructor) {
|
|
|
1525
1539
|
|
|
1526
1540
|
const needsHeadRenderingSymbol = Symbol.for("astro.needsHeadRendering");
|
|
1527
1541
|
const rendererAliases = /* @__PURE__ */ new Map([["solid", "solid-js"]]);
|
|
1542
|
+
const clientOnlyValues = /* @__PURE__ */ new Set(["solid-js", "react", "preact", "vue", "svelte", "lit"]);
|
|
1528
1543
|
function guessRenderers(componentUrl) {
|
|
1529
1544
|
const extname = componentUrl?.split(".").pop();
|
|
1530
1545
|
switch (extname) {
|
|
@@ -1559,7 +1574,7 @@ function removeStaticAstroSlot(html, supportsAstroStaticSlot = true) {
|
|
|
1559
1574
|
return html.replace(exp, "");
|
|
1560
1575
|
}
|
|
1561
1576
|
async function renderFrameworkComponent(result, displayName, Component, _props, slots = {}) {
|
|
1562
|
-
if (!Component &&
|
|
1577
|
+
if (!Component && "client:only" in _props === false) {
|
|
1563
1578
|
throw new Error(
|
|
1564
1579
|
`Unable to render ${displayName} because it is ${Component}!
|
|
1565
1580
|
Did you forget to import the component or is it possible there is a typo?`
|
|
@@ -1627,11 +1642,12 @@ Did you forget to import the component or is it possible there is a typo?`
|
|
|
1627
1642
|
}
|
|
1628
1643
|
} else {
|
|
1629
1644
|
if (metadata.hydrateArgs) {
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1645
|
+
const rendererName = rendererAliases.has(metadata.hydrateArgs) ? rendererAliases.get(metadata.hydrateArgs) : metadata.hydrateArgs;
|
|
1646
|
+
if (clientOnlyValues.has(rendererName)) {
|
|
1647
|
+
renderer = renderers.find(
|
|
1648
|
+
({ name }) => name === `@astrojs/${rendererName}` || name === rendererName
|
|
1649
|
+
);
|
|
1650
|
+
}
|
|
1635
1651
|
}
|
|
1636
1652
|
if (!renderer && validRenderers.length === 1) {
|
|
1637
1653
|
renderer = validRenderers[0];
|
|
@@ -1646,13 +1662,30 @@ Did you forget to import the component or is it possible there is a typo?`
|
|
|
1646
1662
|
let componentServerRenderEndTime;
|
|
1647
1663
|
if (!renderer) {
|
|
1648
1664
|
if (metadata.hydrate === "only") {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1665
|
+
const rendererName = rendererAliases.has(metadata.hydrateArgs) ? rendererAliases.get(metadata.hydrateArgs) : metadata.hydrateArgs;
|
|
1666
|
+
if (clientOnlyValues.has(rendererName)) {
|
|
1667
|
+
const plural = validRenderers.length > 1;
|
|
1668
|
+
throw new AstroError({
|
|
1669
|
+
...NoMatchingRenderer,
|
|
1670
|
+
message: NoMatchingRenderer.message(
|
|
1671
|
+
metadata.displayName,
|
|
1672
|
+
metadata?.componentUrl?.split(".").pop(),
|
|
1673
|
+
plural,
|
|
1674
|
+
validRenderers.length
|
|
1675
|
+
),
|
|
1676
|
+
hint: NoMatchingRenderer.hint(
|
|
1677
|
+
formatList(probableRendererNames.map((r) => "`" + r + "`"))
|
|
1678
|
+
)
|
|
1679
|
+
});
|
|
1680
|
+
} else {
|
|
1681
|
+
throw new AstroError({
|
|
1682
|
+
...NoClientOnlyHint,
|
|
1683
|
+
message: NoClientOnlyHint.message(metadata.displayName),
|
|
1684
|
+
hint: NoClientOnlyHint.hint(
|
|
1685
|
+
probableRendererNames.map((r) => r.replace("@astrojs/", "")).join("|")
|
|
1686
|
+
)
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1656
1689
|
} else if (typeof Component !== "string") {
|
|
1657
1690
|
const matchingRenderers = validRenderers.filter(
|
|
1658
1691
|
(r) => probableRendererNames.includes(r.name)
|
|
@@ -1696,6 +1729,12 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr
|
|
|
1696
1729
|
}
|
|
1697
1730
|
} else {
|
|
1698
1731
|
if (metadata.hydrate === "only") {
|
|
1732
|
+
const rendererName = rendererAliases.has(metadata.hydrateArgs) ? rendererAliases.get(metadata.hydrateArgs) : metadata.hydrateArgs;
|
|
1733
|
+
if (!clientOnlyValues.has(rendererName)) {
|
|
1734
|
+
console.warn(
|
|
1735
|
+
`The client:only directive for ${metadata.displayName} is not recognized. The renderer ${renderer.name} will be used. If you intended to use a different renderer, please provide a valid client:only directive.`
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1699
1738
|
html = await renderSlotToString(result, slots?.fallback);
|
|
1700
1739
|
} else {
|
|
1701
1740
|
const componentRenderStartTime = performance.now();
|
|
@@ -2012,7 +2051,7 @@ Did you forget to import the component or is it possible there is a typo?`);
|
|
|
2012
2051
|
};
|
|
2013
2052
|
extractSlots2(children);
|
|
2014
2053
|
for (const [key, value] of Object.entries(props)) {
|
|
2015
|
-
if (value["$$slot"]) {
|
|
2054
|
+
if (value?.["$$slot"]) {
|
|
2016
2055
|
_slots[key] = value;
|
|
2017
2056
|
delete props[key];
|
|
2018
2057
|
}
|
|
@@ -2091,7 +2130,7 @@ async function renderPage(result, componentFactory, props, children, streaming,
|
|
|
2091
2130
|
result._metadata.headInTree = result.componentMetadata.get(componentFactory.moduleId)?.containsHead ?? false;
|
|
2092
2131
|
let body;
|
|
2093
2132
|
if (streaming) {
|
|
2094
|
-
if (isNode) {
|
|
2133
|
+
if (isNode && !isDeno) {
|
|
2095
2134
|
const nodeBody = await renderToAsyncIterable(
|
|
2096
2135
|
result,
|
|
2097
2136
|
componentFactory,
|