@gem-sdk/components 12.0.0-staging.0 → 12.0.0-staging.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/carousel-v3/components/item/CarouselItem.liquid.js +1 -0
  2. package/dist/cjs/carousel-v3/components/swiper/SwiperSlide.js +1 -1
  3. package/dist/cjs/countdown-timer/common/helpers.js +1 -1
  4. package/dist/cjs/countdown-timer/hooks/useCountDownTimer.js +1 -1
  5. package/dist/cjs/countdown-timer/hooks/useTimeLeft.js +1 -1
  6. package/dist/cjs/countdown-timer/settings/Countdown.js +1 -1
  7. package/dist/cjs/countdown-timer/settings/configs/setting.js +1 -1
  8. package/dist/cjs/countdown-timer/settings/configs/ui-v2.js +1 -1
  9. package/dist/cjs/hero-banner/settings/configs/ui-v2.js +1 -1
  10. package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
  11. package/dist/cjs/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
  12. package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
  13. package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
  14. package/dist/cjs/product/components/product-badge/ProductBadge.liquid.js +18 -18
  15. package/dist/cjs/product/components/product-badge/common/classes.js +1 -1
  16. package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
  17. package/dist/cjs/product/components/product-badge/utils/common.js +1 -1
  18. package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
  19. package/dist/cjs/product/components/product-button/hooks/useAddToCart.js +1 -1
  20. package/dist/cjs/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
  21. package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
  22. package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
  23. package/dist/cjs/product/components/product-title/ProductTitle.liquid.js +10 -3
  24. package/dist/cjs/product/components/product-variants/ProductVariants.liquid.js +4 -4
  25. package/dist/cjs/product/components/product-wrap/Product.liquid.js +25 -25
  26. package/dist/cjs/product/helpers/product-bundle.js +1 -1
  27. package/dist/cjs/product/settings/bundle-layout/horizontal-three.js +1 -1
  28. package/dist/cjs/product/settings/bundle-layout/horizontal-two.js +1 -1
  29. package/dist/esm/carousel-v3/components/item/CarouselItem.liquid.js +3 -2
  30. package/dist/esm/carousel-v3/components/swiper/SwiperSlide.js +1 -1
  31. package/dist/esm/countdown-timer/common/helpers.js +1 -1
  32. package/dist/esm/countdown-timer/hooks/useCountDownTimer.js +1 -1
  33. package/dist/esm/countdown-timer/hooks/useTimeLeft.js +1 -1
  34. package/dist/esm/countdown-timer/settings/Countdown.js +3 -3
  35. package/dist/esm/countdown-timer/settings/configs/setting.js +1 -1
  36. package/dist/esm/countdown-timer/settings/configs/ui-v2.js +1 -1
  37. package/dist/esm/hero-banner/settings/configs/ui-v2.js +1 -1
  38. package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
  39. package/dist/esm/post-purchase/product/constants/ProductOfferPlaceholder.js +1 -1
  40. package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
  41. package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
  42. package/dist/esm/product/components/product-badge/ProductBadge.liquid.js +22 -22
  43. package/dist/esm/product/components/product-badge/common/classes.js +1 -1
  44. package/dist/esm/product/components/product-badge/common/styles.js +1 -1
  45. package/dist/esm/product/components/product-badge/utils/common.js +1 -1
  46. package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +3 -4
  47. package/dist/esm/product/components/product-button/hooks/useAddToCart.js +1 -1
  48. package/dist/esm/product/components/product-discount-tag/hooks/useGpDiscountTag.js +1 -1
  49. package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
  50. package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
  51. package/dist/esm/product/components/product-title/ProductTitle.liquid.js +10 -3
  52. package/dist/esm/product/components/product-variants/ProductVariants.liquid.js +9 -9
  53. package/dist/esm/product/components/product-wrap/Product.liquid.js +26 -26
  54. package/dist/esm/product/helpers/product-bundle.js +1 -1
  55. package/dist/esm/product/settings/bundle-layout/horizontal-three.js +1 -1
  56. package/dist/esm/product/settings/bundle-layout/horizontal-two.js +1 -1
  57. package/dist/types/index.d.ts +1 -0
  58. package/package.json +2 -2
@@ -1,39 +1,39 @@
1
- import{template as e,dataStringify as s,sanitizeLiquid as t,RenderIf as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as c,getSettingPreloadData as o}from"../../../helpers.js";import{checkDiscountContentProductBadge as n}from"./utils/common.js";import{generateBadgeContent as p}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as d}from"./utils/renderBadgeLiquid.js";import{createStyle as l,createClass as u,createAttr as m,createStateOrContext as g}from"@gem-sdk/system";import{IS_LIQUID as y}from"./constants.js";import{getContainerStyle as $,getSubWrapperStyle as v,getContentStyleInternal as f,getTextBadgeWrapperStyles as j,getTextContentStyle as P,getImageContainerStyles as D}from"./common/styles.js";import{getWrapperClasses as V,getSubWrapperClass as S,getTextContainerClasses as b,getTextWrapperClasses as C,getTextContentClasses as T,getImageContainerClasses as k,getImageClasses as q}from"./common/classes.js";import{getSubWrapperAttrs as A,getContainerAttrs as E,getTextContentAttrs as I,getImageAttr as K}from"./common/attrs.js";let ProductBadge=N=>{let{styles:_,setting:h,builderProps:B,pageContext:L}=N,O=h?.shape!=="image",Q=n(h?.displayContent),w=l({...$(N,y)}),G=u({...V(N)}),J=u({...S(N)}),x=l({...v(N)}),M=m({...A(N)}),R=f(N),Y=u({...b()}),z=m({...E(N)}),F=u({...C()}),H=l({...j({setting:h,styles:_})}),U=u({...T(_)}),W=l({...P({setting:h,styles:_})}),X=m({...I()}),Z=u({...k()}),ee=l({...D({setting:h,styles:_})}),es=u({...q()}),et=m({...K({setting:h})}),ei=g({minPrice:"{{ minPriceValue | replace: '\"', '\\\"' | escape }}",variantIDs:'{{ product.variants | map: "id" | json | escape }}',variantInventoryQuantities:'{{ product.variants | map: "inventory_quantity" | json | escape }}',amountDiscount:"{{amountDiscountValue | replace: '\"', '\\\"' | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:JSON.parse(JSON.stringify(h?.displayTrigger).replaceAll("'","'")),uid:N.builderProps?.uid,productCreatedAt:'{{product.created_at | date: "%Y-%m-%d" }}',productTags:"{{ product.tags | join: \",\" | replace: '\"', '\\\"' | escape }}",isTextBadge:O}),{displayContent:er,translate:ea}=h??{},ec=c({val:er?.trim(),uid:B?.uid,settingId:"displayContent",isLiquid:!0,pageContext:L,translate:ea});return e`
1
+ import{template as e,dataStringify as t,sanitizeLiquid as s,RenderIf as i,isLocalEnv as r,baseAssetURL as a}from"@gem-sdk/core";import{getDynamicSourceLocales as c,getSettingPreloadData as n}from"../../../helpers.js";import{generateBadgeContent as o}from"./utils/generateLiquidContent.js";import{renderBadgeInFirstTime as p}from"./utils/renderBadgeLiquid.js";import{createClass as d,createStyle as l,createAttr as u,createStateOrContext as m}from"@gem-sdk/system";import{IS_LIQUID as g}from"./constants.js";import{getContainerStyle as y,getSubWrapperStyle as $,getContentStyleInternal as v,getTextBadgeWrapperStyles as f,getTextContentStyle as j,getImageContainerStyles as P}from"./common/styles.js";import{getContainerClasses as D,getWrapperClasses as V,getSubWrapperClass as S,getTextContainerClasses as b,getTextWrapperClasses as I,getTextContentClasses as T,getImageContainerClasses as k,getImageClasses as q}from"./common/classes.js";import{getSubWrapperAttrs as A,getContainerAttrs as C,getTextContentAttrs as E,getImageAttr as K}from"./common/attrs.js";let ProductBadge=_=>{let{styles:h,setting:B,builderProps:L,pageContext:N}=_,O=B?.shape!=="image",Q=O&&B?.displayContent?.trim()==="",w=d({...D({isInstant:!1,props:_})}),G=l({...y(_,g)}),J=d({...V(_)}),x=d({...S(_)}),M=l({...$({props:_})}),R=u({...A(_)}),Y=v(_),z=d({...b()}),F=u({...C(_)}),H=d({...I()}),U=l({...f({setting:B,styles:h})}),W=d({...T(h)}),X=l({...j({setting:B,styles:h})}),Z=u({...E()}),ee=d({...k()}),et=l({...P({setting:B,styles:h})}),es=d({...q()}),ei=u({...K({setting:B})}),er=m({minPrice:"{{ minPriceValue | replace: '\"', '\\\"' | escape }}",variantIDs:'{{ product.variants | map: "id" | json | escape }}',variantInventoryQuantities:'{{ product.variants | map: "inventory_quantity" | json | escape }}',amountDiscount:"{{amountDiscountValue | replace: '\"', '\\\"' | escape }}",percentDiscount:"{{percentDiscountValue}}",price:"{{price}}",displayTrigger:JSON.parse(JSON.stringify(B?.displayTrigger).replaceAll("'","'")),uid:_.builderProps?.uid,productCreatedAt:'{{product.created_at | date: "%Y-%m-%d" }}',productTags:"{{ product.tags | join: \",\" | replace: '\"', '\\\"' | escape }}",isTextBadge:O}),{displayContent:ea,translate:ec}=B??{},en=c({val:ea?.trim(),uid:L?.uid,settingId:"displayContent",isLiquid:!0,pageContext:N,translate:ec});return e`
2
2
  {% if product %}
3
- ${p(ec,L?.isPreviewing)}
4
- ${d(h?.displayTrigger,Q,O)}
3
+ ${o(en,N?.isPreviewing)}
4
+ ${p(B?.displayTrigger,!Q)}
5
5
  <gp-product-badge
6
- ${{...z}}
7
- gp-data='${s(ei)}'
8
- class="containerClass {{className}}"
9
- style="${w}"
10
- data-display-content="${L?.isPreviewing?ec:t(`{{${ec}}}`)}"
6
+ ${{...F}}
7
+ gp-data='${t(er)}'
8
+ class="${w}"
9
+ style="${G}"
10
+ data-display-content="${N?.isPreviewing?en:s(`{{${en}}}`)}"
11
11
  >
12
- <div class="${G}">
12
+ <div class="${J}">
13
13
  <div
14
- ${{...M}}
15
- class="${J}"
16
- style="${x}"
14
+ ${{...R}}
15
+ class="${x}"
16
+ style="${M}"
17
17
  >
18
- <style>${R}</style>
18
+ <style>${Y}</style>
19
19
  ${i(O,e`
20
- <div class="${Y}">
20
+ <div class="${z}">
21
21
  <div
22
- class="${F}"
23
- style="${H}"
22
+ class="${H}"
23
+ style="${U}"
24
24
  >
25
25
  <pre
26
- ${{...X}}
27
- class="${U}"
28
- style="${W}"
26
+ ${{...Z}}
27
+ class="${W}"
28
+ style="${X}"
29
29
  >{{ content | replace: percentDiscountKey, percentDiscountValue | replace: amountDiscountKey, amountDiscountValue | replace: inventoryQuantityKey, inventoryQuantityValue | replace: minPriceKey, minPriceValue }}</pre>
30
30
  </div>
31
- </div>`,e`<div class="${Z}" style="${ee}">
32
- <img ${{...et}} class="${es}" alt="" />
31
+ </div>`,e`<div class="${ee}" style="${et}">
32
+ <img ${{...ei}} class="${es}" alt="" />
33
33
  </div>`)}
34
34
  </div>
35
35
  </div>
36
36
  </gp-product-badge>
37
- ${i(r,`<script ${o('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${o('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
37
+ ${i(r,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-badge-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${a}/assets-v2/gp-product-badge-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
38
38
  {% endif %}
39
39
  `};export{ProductBadge as default};
@@ -1 +1 @@
1
- import{composeClasses as e,composeTypographyClassName as t}from"@gem-sdk/core";import{toggleBadge as s}from"../utils/renderBadgeILP.js";import{getAlignShape as g,getShapePlacementClass as r}from"../utils/common.js";let getContainerClasses=({mode:t,isInstant:g,product:r,currentVariant:l,props:a})=>{let{setting:p,builderProps:i}=a,n="gp-shrink-0 product-badge ",o=!t&&g?s(p?.displayTrigger,r,l):"{{className}}",d=i?.builderData?.advanced?.cssClass||"";return o&&(n+=`${o} `),d&&(n+=`${d} `),i?.uid&&(n+=`${i?.uid} `),p?.positionWithImage==="inside"&&(n+="inside-image "),{...e(n)}},getTextContainerClasses=()=>({...e("gp-w-full gp-h-full gp-overflow-hidden product-badge-item")}),getTextWrapperClasses=()=>({...e("gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center gp-overflow-hidden")}),getTextContentClasses=s=>{let g="gp-break-words gp-text-center ",r=t(s?.typo);return r&&(g+=`${r} `),{...e(g)}},getImageContainerClasses=()=>({...e("product-badge-item gp-w-full gp-h-full gp-overflow-hidden")}),getImageClasses=()=>({...e("gp-object-cover gp-w-full gp-h-full gp-pointer-events-none")}),getWrapperClasses=t=>{let{styles:s,setting:r}=t,{align:l}=s??{},a=r?.positionWithImage==="outside",p=a?"gp-flex ":"gp-h-full",i=g(l,!1);return a&&i&&(p+=`${i} `),{...e(p)}},getSubWrapperClass=(t,s)=>{let{setting:g,style:l}=t,a=g?.positionWithImage==="inside",p=!a&&s?r(a,l,s):"gp-h-full";return{...e(p)}};export{getContainerClasses,getImageClasses,getImageContainerClasses,getSubWrapperClass,getTextContainerClasses,getTextContentClasses,getTextWrapperClasses,getWrapperClasses};
1
+ import{composeClasses as e,composeTypographyClassName as t}from"@gem-sdk/core";import{toggleBadge as s}from"../utils/renderBadgeILP.js";import{getAlignShape as g,getShapePlacementClass as r}from"../utils/common.js";let getContainerClasses=({mode:t,isInstant:g,product:r,currentVariant:l,props:a})=>{let{setting:p,builderProps:i}=a,n="gp-shrink-0 product-badge ",o=!t&&g?s(p?.displayTrigger,r,l):`${i?.uid}`,d=i?.builderData?.advanced?.cssClass||"";return o&&(n+=`${o} `),d&&(n+=`${d} `),i?.uid&&(n+=`${i?.uid} `),p?.positionWithImage==="inside"&&(n+="inside-image "),{...e(n)}},getTextContainerClasses=()=>({...e("gp-w-full gp-h-full gp-overflow-hidden product-badge-item")}),getTextWrapperClasses=()=>({...e("gp-w-full gp-h-full gp-flex gp-items-center gp-justify-center gp-overflow-hidden")}),getTextContentClasses=s=>{let g="gp-break-words gp-text-center ",r=t(s?.typo);return r&&(g+=`${r} `),{...e(g)}},getImageContainerClasses=()=>({...e("product-badge-item gp-w-full gp-h-full gp-overflow-hidden")}),getImageClasses=()=>({...e("gp-object-cover gp-w-full gp-h-full gp-pointer-events-none")}),getWrapperClasses=t=>{let{styles:s,setting:r}=t,{align:l}=s??{},a=r?.positionWithImage==="outside",p=a?"gp-flex ":"gp-h-full",i=g(l,!1);return a&&i&&(p+=`${i} `),{...e(p)}},getSubWrapperClass=(t,s)=>{let{setting:g,style:l}=t,a=g?.positionWithImage==="inside",p=!a&&s?r(a,l,s):"gp-h-full";return{...e(p)}};export{getContainerClasses,getImageClasses,getImageContainerClasses,getSubWrapperClass,getTextContainerClasses,getTextContentClasses,getTextWrapperClasses,getWrapperClasses};
@@ -1 +1 @@
1
- import{makeGlobalSize as e,composeTypographyStyle as t,getStyleShadow as o}from"@gem-sdk/core";import{convertToStyle as r,getSize as i,getWrapperStyle as a,getShapeWrapperPadding as n,checkDiscountContentProductBadge as s}from"../utils/common.js";import{getShapePosition as p}from"../utils/getShapePosition.js";import{composeTextStyleByPosition as g,composeShapeStyleByPosition as l}from"../utils/getRotateShape.js";import{getStyleAdvanced as d}from"../utils/getStyleAdvanced.js";import{getWhiteSpaceStyle as u}from"../utils/getWhiteSpace.js";import{getStyleBackground as S,generateShadowCSS as y,getStyleBorder as m,getStyleCornerRadius as h}from"../utils/stylesV2.js";import{getShape as x}from"../utils/shape.js";import{checkShowBadge as c}from"../utils/renderBadgeILP.js";let getSizeStyles=e=>{let{setting:t,styles:o}=e,r=x(t?.shape),a=t?.contentType==="text",n=a?o?.textSizeV2:o?.imageSizeV2;return a?i(r,n):i(void 0,n)},getContainerStyle=(e,t=!1)=>{let{setting:o,styles:r,style:i,navigationPosition:n,imageData:s,dotData:g}=e,l=o?.positionWithImage==="outside",u=a(t),S=p({positionType:r?.position,isLiquid:!1,navigationPosition:n,dataImage:{...s,...g}}),y=getSizeStyles(e),m=d(l?{}:{...S,...y},i);return{...!l&&{"--pos":"absolute"},...u,...m}},getTextContentStyle=({styles:i,setting:a})=>{let n=e(i?.textSizeV2).padding,s=x(a?.shape),p=a?.positionWithImage==="outside";return{...u(i?.textSizeV2),...r(s?.textStyle),...g(s,i?.position,p),...t(i?.typo),...o({value:i?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:i?.typo?.custom?.hasShadowText}),...S(!!s?.backgroundColorInText,i?.badgeColorV2),...n}},getBorderStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=t?.contentType==="text";return o?.supportBorder?r?m(e?.textBadgeBorder):m(e?.imageBadgeBorder):{}},getCornerStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=t?.contentType==="text";return o?.supportCorner?r?h(e?.textBadgeCorner,o?.shapeRadius):h(e?.imageBadgeCorner,o?.shapeRadius):{}},getTextBadgeWrapperStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=getBorderStyles({setting:t,styles:e}),i=t?.positionWithImage==="outside",a=getCornerStyles({setting:t,styles:e}),s=n(o?.ratio);return{...r,...a,...l(o,e?.position,i),...S(!o?.backgroundColorInText,e?.badgeColorV2),...s,height:o?.ratio===1?"0px":"100%"}},getImageContainerStyles=({styles:t,setting:o})=>{let r=getBorderStyles({setting:o,styles:t}),i=getCornerStyles({setting:o,styles:t}),a=e(t?.imageSizeV2).padding;return{...r,...i,...a}},getOpacityProductBadge=(e,t,o,r)=>{let{"bundle-item":i,setting:a}=e;if(i)return 1;let n=s(a?.displayContent)&&a?.contentType==="text";if(!n)return 1;let p=t?.price??0,g=t?.salePrice??0,l=g-p>0,d=c(a?.displayTrigger,o,t);return l&&d?1:"edit"===r?.2:0},getSubWrapperStyle=(e,t,o,r)=>{let{setting:i}=e,a=i?.positionWithImage==="outside",n=getSizeStyles(e),s=r&&o?getOpacityProductBadge(e,o,t,r):1;return{...a?{...n,"--mb":0}:{},opacity:s}},getContentStyleInternal=e=>{let{styles:t,setting:o,builderProps:r}=e,i=o?.contentType==="text";return y(`[id="${r?.uid}"] .product-badge-item`,i?t?.textBadgeShadow:t?.imageBadgeShadow)};export{getContainerStyle,getContentStyleInternal,getImageContainerStyles,getSubWrapperStyle,getTextBadgeWrapperStyles,getTextContentStyle};
1
+ import{makeGlobalSize as e,composeTypographyStyle as t,getStyleShadow as o,convertDecimalToNumber as r}from"@gem-sdk/core";import{convertToStyle as i,getSize as a,getWrapperStyle as n,getShapeWrapperPadding as s}from"../utils/common.js";import{getShapePosition as p}from"../utils/getShapePosition.js";import{composeTextStyleByPosition as g,composeShapeStyleByPosition as l}from"../utils/getRotateShape.js";import{getStyleAdvanced as d}from"../utils/getStyleAdvanced.js";import{getWhiteSpaceStyle as u}from"../utils/getWhiteSpace.js";import{getStyleBackground as S,generateShadowCSS as m,getStyleBorder as y,getStyleCornerRadius as h}from"../utils/stylesV2.js";import{getShape as x}from"../utils/shape.js";import{checkShowBadge as c}from"../utils/renderBadgeILP.js";let getSizeStyles=e=>{let{setting:t,styles:o}=e,r=x(t?.shape),i=t?.contentType==="text",n=i?o?.textSizeV2:o?.imageSizeV2;return i?a(r,n):a(void 0,n)},getContainerStyle=(e,t=!1)=>{let{setting:o,styles:r,style:i,navigationPosition:a,imageData:s,dotData:g}=e,l=o?.positionWithImage==="outside",u=n(t),S=p({positionType:r?.position,isLiquid:!1,navigationPosition:a,dataImage:{...s,...g}}),m=getSizeStyles(e),y=d(l?{}:{...S,...m},i);return{...!l&&{"--pos":"absolute"},...u,...y}},getTextContentStyle=({styles:r,setting:a})=>{let n=e(r?.textSizeV2).padding,s=x(a?.shape),p=a?.positionWithImage==="outside";return{...u(r?.textSizeV2),...i(s?.textStyle),...g(s,r?.position,p),...t(r?.typo),...o({value:r?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.typo?.custom?.hasShadowText}),...S(!!s?.backgroundColorInText,r?.badgeColorV2),...n}},getBorderStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=t?.contentType==="text";return o?.supportBorder?r?y(e?.textBadgeBorder):y(e?.imageBadgeBorder):{}},getCornerStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=t?.contentType==="text";return o?.supportCorner?r?h(e?.textBadgeCorner,o?.shapeRadius):h(e?.imageBadgeCorner,o?.shapeRadius):{}},getTextBadgeWrapperStyles=({styles:e,setting:t})=>{let o=x(t?.shape),r=getBorderStyles({setting:t,styles:e}),i=t?.positionWithImage==="outside",a=getCornerStyles({setting:t,styles:e}),n=s(o?.ratio);return{...r,...a,...l(o,e?.position,i),...S(!o?.backgroundColorInText,e?.badgeColorV2),...n,height:o?.ratio===1?"0px":"100%"}},getImageContainerStyles=({styles:t,setting:o})=>{let r=getBorderStyles({setting:o,styles:t}),i=getCornerStyles({setting:o,styles:t}),a=e(t?.imageSizeV2).padding;return{...r,...i,...a}},getOpacityProductBadge=({props:e,currentVariant:t,product:o,isEditMode:i})=>{let{"bundle-item":a,setting:n}=e;if(a)return 1;let s=n?.contentType==="text",p=s&&!n?.displayContent?.trim();if(p)return i?.2:0;let g=r(t?.price)??0,l=r(t?.salePrice)??0,d=l-g>0,u=c(n?.displayTrigger,o,t);return d&&u?1:i?.2:0},getSubWrapperStyle=({props:e,product:t,currentVariant:o,isEditMode:r})=>{let{setting:i}=e,a=i?.positionWithImage==="outside",n=getSizeStyles(e),s=r&&o?getOpacityProductBadge({props:e,currentVariant:o,product:t,isEditMode:r}):1;return{...a?{...n,"--mb":0}:{},opacity:s}},getContentStyleInternal=e=>{let{styles:t,setting:o,builderProps:r}=e,i=o?.contentType==="text";return m(`[id="${r?.uid}"] .product-badge-item`,i?t?.textBadgeShadow:t?.imageBadgeShadow)};export{getContainerStyle,getContentStyleInternal,getImageContainerStyles,getSubWrapperStyle,getTextBadgeWrapperStyles,getTextContentStyle};
@@ -1 +1 @@
1
- import{cls as e,formatMoney as t,makeStyleResponsive as r,getResponsiveValueByScreen as i}from"@gem-sdk/core";import{applyBundleDiscountAmount as n}from"../../../helpers/product-bundle.js";import{DiscountType as o}from"../../constants/product-bundle.js";let removeTrailingZeros=e=>e.replace(/\.00$/,""),getPriceDiffByPercent=(e,t)=>{if(!t)return"0";let r=1e3*t-1e3*e;return Math.round(100*r/(1e3*t))},getPriceDiffByValue=(e,r,i)=>removeTrailingZeros(t(r?(r-e).toFixed(2):"0",i)),getMinPrice=(e,r)=>{let i=e?.edges?.length&&e.edges.length>0?1/0:0;return e?.edges.forEach(({node:e})=>{if(!e)return;let t=e?.price;void 0!==t&&t<i&&(i=t)}),removeTrailingZeros(t(i.toString(),r))},checkNoDiscountState=(e,t)=>{let{discountPercentAmount:r}=n({currentVariant:e?.currentVariant,bundleItem:e?.bundleItem,options:{moneyFormat:t,useProductCompareAtPrice:e?.useProductCompareAtPrice}});return!(e?.bundleItem?.discountType===o.NoDiscount&&e?.useProductCompareAtPrice||Number(e?.bundleItem?.discountValue)&&r)&&!e?.currentVariant?.salePrice},getBadgeContent=(e,r,i)=>{if(!e.detail||!r?.trim()?.length)return r;let{detail:u,currentVariant:c}=e,{discountPercentAmount:l,discountAmount:a}=n({currentVariant:c,bundleItem:e?.bundleItem,options:{moneyFormat:i,useProductCompareAtPrice:e?.useProductCompareAtPrice}}),d=()=>e?.bundleItem?.discountType!==o.NoDiscount||e?.useProductCompareAtPrice?Number(e?.bundleItem?.discountValue)>0?`${l}%`:`${getPriceDiffByPercent(c?.price||0,c?.salePrice||0)||0}%`:"0%",s=()=>e?.bundleItem?.discountType!==o.NoDiscount||e?.useProductCompareAtPrice?Number(e?.bundleItem?.discountValue)>0?a:getPriceDiffByValue(c?.price||0,c?.salePrice||0,i):t("0",i),p=new Map([["{percent_discount}",d],["{amount_discount}",s],["{min_price}",()=>getMinPrice(u.variants,i)||0],["{inventory_quantity}",()=>c?.inventoryQuantity||0]]);return[...p.entries()].reduce((e,[t,r])=>e.replaceAll(t,r()),r)},checkDiscountContentProductBadge=e=>{if(!e)return!1;let t=/\{percent_discount\}|\{amount_discount\}/;return t.test(e)},getShapePlacementClass=(e,t,r="desktop")=>e?t?.[`--pos${deviceWithSurfix(r)}`]?"w-full h-full":"!gp-absolute":t?.[`--d${deviceWithSurfix(r)}`]?"":"!gp-inline-block gp-w-fit",getAlignShape=(t,r)=>r?"":e("gp-flex",{"gp-justify-start":t?.desktop==="left","gp-justify-center":t?.desktop==="center","gp-justify-end":t?.desktop==="right","tablet:gp-justify-start":t?.tablet==="left","tablet:gp-justify-center":t?.tablet==="center","tablet:gp-justify-end":t?.tablet==="right","mobile:gp-justify-start":t?.mobile==="left","mobile:gp-justify-center":t?.mobile==="center","mobile:gp-justify-end":t?.mobile==="right"}),convertToStyle=e=>Object.entries(e||{}).reduce((e,[t,r])=>{let i=new Map([["clipPath","clip-path"],["writingMode","writing-mode"],["borderRadius","border-radius"],["transform","transform"],["alignItems","align-items"],["maxWidth","max-width"]]),n=i.get(t)||t;return{...e,[n]:r}},{}),getWrapperStyle=e=>({[e?"z-index":"zIndex"]:2}),getWidthByShapeSize=(e,t)=>{let r={},n=["desktop","mobile","tablet"];return n.forEach(n=>{let o=i(e,n,null),u=o?.width||t?.wrapperWidth;u&&(r={...r,[n]:u})}),r},getHeightByShapeSize=(e,t)=>{let r={},n=["desktop","mobile","tablet"];return n.forEach(n=>{let o=i(e,n,null);r={...r,[n]:o?.height||t?.wrapperHeight}}),r},getSize=(e,t)=>{let i=r("w",getWidthByShapeSize(t,e)),n=r("h",getHeightByShapeSize(t,e));return{...i,...n}},getShapeWrapperPadding=e=>{let t={};if(1!==e)return t;let r=["desktop","mobile","tablet"];return r.forEach(e=>{t={...t,height:0,[`--p${"desktop"!==e?`-${e}`:""}`]:"50% 0"}}),t},deviceWithSurfix=e=>"desktop"===e?"":`-${e}`,getDeviceSpecificStyle=(e,t)=>{for(let r of({desktop:["desktop"],tablet:["tablet","desktop"],mobile:["mobile","tablet","desktop"]})[t])if(e?.[r])return e[r]},getIsNoDiscountState=({props:e,product:t,currentVariant:r,moneyFormat:i,useProductCompareAtPrice:n})=>{let{setting:o,"bundle-item":u}=e,c=checkDiscountContentProductBadge(o?.displayContent);return c&&checkNoDiscountState({detail:t,currentVariant:r,bundleItem:u,useProductCompareAtPrice:n},i)};export{checkDiscountContentProductBadge,checkNoDiscountState,convertToStyle,deviceWithSurfix,getAlignShape,getBadgeContent,getDeviceSpecificStyle,getIsNoDiscountState,getShapePlacementClass,getShapeWrapperPadding,getSize,getWidthByShapeSize,getWrapperStyle};
1
+ import{cls as e,convertDecimalToNumber as t,formatMoney as r,makeStyleResponsive as i,getResponsiveValueByScreen as n}from"@gem-sdk/core";import{applyBundleDiscountAmount as o}from"../../../helpers/product-bundle.js";import{DiscountType as u}from"../../constants/product-bundle.js";let removeTrailingZeros=e=>e.replace(/\.00$/,""),getPriceDiffByPercent=(e,t)=>{if(!t)return"0";let r=1e3*t-1e3*e;return Math.round(100*r/(1e3*t))},getPriceDiffByValue=(e,t,i)=>removeTrailingZeros(r(t?(t-e).toFixed(2):"0",i)),getMinPrice=(e,i)=>{let n=e?.edges?.length&&e.edges.length>0?1/0:0;return e?.edges.forEach(({node:e})=>{if(!e)return;let r=t(e?.price);void 0!==r&&r<n&&(n=r)}),removeTrailingZeros(r(n.toString(),i))},checkNoDiscountState=(e,t)=>{let{discountPercentAmount:r}=o({currentVariant:e?.currentVariant,bundleItem:e?.bundleItem,options:{moneyFormat:t,useProductCompareAtPrice:e?.useProductCompareAtPrice}});return!(e?.bundleItem?.discountType===u.NoDiscount&&e?.useProductCompareAtPrice||Number(e?.bundleItem?.discountValue)&&r)&&!e?.currentVariant?.salePrice},getBadgeContent=(e,i,n)=>{if(!e.detail||!i?.trim()?.length)return i;let{detail:c,currentVariant:l}=e,{discountPercentAmount:a,discountAmount:d}=o({currentVariant:l,bundleItem:e?.bundleItem,options:{moneyFormat:n,useProductCompareAtPrice:e?.useProductCompareAtPrice}}),s=()=>e?.bundleItem?.discountType!==u.NoDiscount||e?.useProductCompareAtPrice?Number(e?.bundleItem?.discountValue)>0?`${a}%`:`${getPriceDiffByPercent(t(l?.price)??0,t(l?.salePrice)??0)||0}%`:"0%",p=()=>e?.bundleItem?.discountType!==u.NoDiscount||e?.useProductCompareAtPrice?Number(e?.bundleItem?.discountValue)>0?d:getPriceDiffByValue(t(l?.price)??0,t(l?.salePrice)??0,n):r("0",n),g=new Map([["{percent_discount}",s],["{amount_discount}",p],["{min_price}",()=>getMinPrice(c.variants,n)||0],["{inventory_quantity}",()=>l?.inventoryQuantity||0]]);return[...g.entries()].reduce((e,[t,r])=>e.replaceAll(t,r()),i)},checkDiscountContentProductBadge=e=>{if(!e)return!1;let t=/\{percent_discount\}|\{amount_discount\}/;return t.test(e)},getShapePlacementClass=(e,t,r="desktop")=>e?t?.[`--pos${deviceWithSurfix(r)}`]?"w-full h-full":"!gp-absolute":t?.[`--d${deviceWithSurfix(r)}`]?"":"!gp-inline-block gp-w-fit",getAlignShape=(t,r)=>r?"":e("gp-flex",{"gp-justify-start":t?.desktop==="left","gp-justify-center":t?.desktop==="center","gp-justify-end":t?.desktop==="right","tablet:gp-justify-start":t?.tablet==="left","tablet:gp-justify-center":t?.tablet==="center","tablet:gp-justify-end":t?.tablet==="right","mobile:gp-justify-start":t?.mobile==="left","mobile:gp-justify-center":t?.mobile==="center","mobile:gp-justify-end":t?.mobile==="right"}),convertToStyle=e=>Object.entries(e||{}).reduce((e,[t,r])=>{let i=new Map([["clipPath","clip-path"],["writingMode","writing-mode"],["borderRadius","border-radius"],["transform","transform"],["alignItems","align-items"],["maxWidth","max-width"]]),n=i.get(t)||t;return{...e,[n]:r}},{}),getWrapperStyle=e=>({[e?"z-index":"zIndex"]:2}),getWidthByShapeSize=(e,t)=>{let r={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let o=n(e,i,null),u=o?.width||t?.wrapperWidth;u&&(r={...r,[i]:u})}),r},getHeightByShapeSize=(e,t)=>{let r={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let o=n(e,i,null);r={...r,[i]:o?.height||t?.wrapperHeight}}),r},getSize=(e,t)=>{let r=i("w",getWidthByShapeSize(t,e)),n=i("h",getHeightByShapeSize(t,e));return{...r,...n}},getShapeWrapperPadding=e=>{let t={};if(1!==e)return t;let r=["desktop","mobile","tablet"];return r.forEach(e=>{t={...t,height:0,[`--p${"desktop"!==e?`-${e}`:""}`]:"50% 0"}}),t},deviceWithSurfix=e=>"desktop"===e?"":`-${e}`,getDeviceSpecificStyle=(e,t)=>{for(let r of({desktop:["desktop"],tablet:["tablet","desktop"],mobile:["mobile","tablet","desktop"]})[t])if(e?.[r])return e[r]},getIsNoDiscountState=({props:e,product:t,currentVariant:r,moneyFormat:i,useProductCompareAtPrice:n})=>{let{setting:o,"bundle-item":u}=e,c=checkDiscountContentProductBadge(o?.displayContent);return c&&checkNoDiscountState({detail:t,currentVariant:r,bundleItem:u,useProductCompareAtPrice:n},i)};export{checkDiscountContentProductBadge,checkNoDiscountState,convertToStyle,deviceWithSurfix,getAlignShape,getBadgeContent,getDeviceSpecificStyle,getIsNoDiscountState,getShapePlacementClass,getShapeWrapperPadding,getSize,getWidthByShapeSize,getWrapperStyle};
@@ -1,4 +1,4 @@
1
- import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.ABOVE?0:i===e.BELOW?2:1,renderBadgeInFirstTime=(e,i,n)=>`
1
+ import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.ABOVE?0:i===e.BELOW?2:1,renderBadgeInFirstTime=(e,i)=>`
2
2
  {% assign isShow = true %}
3
3
  {% assign conditionTriggers = "" %}
4
4
  {% assign isInventoryStatus = false %}
@@ -16,9 +16,8 @@ import{CompareType as e}from"../types.js";let getMinValueForInventory=i=>i===e.A
16
16
  {% assign price = variant.price | times: 1.0 %}
17
17
  {% assign salePrice = variant.compare_at_price | times: 1.0 %}
18
18
  {% assign priceSave = salePrice | minus: price %}
19
- {% assign isDiscountContent = ${i} %}
20
- {% assign isTextBadge = ${n} %}
21
- {% if priceSave <= 0 or isDiscountContent == false or isTextBadge == false %}
19
+ {% assign isEmptyBadgeContent = ${!i} %}
20
+ {% if priceSave <= 0 or isEmptyBadgeContent == true %}
22
21
  {% assign isShow = false %}
23
22
  {% endif %}
24
23
  {% if isShow %}
@@ -1 +1 @@
1
- import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as s,useCurrentVariant as n,useHasPreSelected as o,useStickyStore as a,useProductStore as u,useCreateCart as l,useAddToCart as c,useCurrentVariantInStock as m}from"@gem-sdk/core";import{useRef as b,useEffect as d,useCallback as f}from"react";import{addToCartTracking as p}from"../../../helpers/tracking.js";import{useDispatchAfterSubmitEvent as v}from"./useDispatchAfterSubmitEvent.js";import{useCartMessage as g}from"./useCartMessage.js";import{useCartOperations as I}from"./useCartOperations.js";let useBtnAddToCart=({styles:k,setting:D,builderProps:S})=>{let E=b(null),{isEditMode:h,isPreviewSharePageMode:j}=e(),y=t(),{currency:C}=r(),{quantity:A}=i(),M=s(),O=n(),{hasPreSelected:w}=o(),B=a(e=>e.setStickyVisible),T=u(e=>e.updateIsSubmit),q=v(S?.uid),{showMessage:x,notiComponent:L}=g(k,D),{handleSuccess:U,handleError:V,cartId:z}=I(D,x,q),{isMutating:F,trigger:G}=l({onSuccess:U,onError:V}),{isMutating:H,trigger:J}=c({onSuccess:U,onError:V});d(()=>{let e=new IntersectionObserver(e=>{let t=e[0];B(t?.isIntersecting)},{threshold:.1}),t=E.current;return E.current&&e.observe(E.current),()=>{t&&e.unobserve(t)}},[B]);let K=f(()=>{if(!O?.baseID||!A||!y?.baseID||void 0!==w&&!w||h||j)return;let e=M?.some(e=>e.required&&!e.value);if(T(!0),e)return;let t=M?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));p({quantity:A,currency:C,id:y?.baseID,name:y?.title,brand:y?.vendor,sku:O.sku,price:O?.price,variant:O.title});let r={quantity:A,attributes:t,variantId:O.baseID};D?.actionEffect!=="buy-now"&&z?J({cartId:z,lines:[r]}):G({items:[r]})},[h,j,z,C,A,M,w,y?.title,y?.vendor,y?.baseID,O?.sku,O?.price,O?.title,O?.baseID,D?.actionEffect,G,J,T]),N=m(),P=F||H,Q=O?D?.outOfStockLabel:"Unavailable";return{addToCartRef:E,isLoading:P,isInStock:N,notiComponent:L,outOfStockLabel:Q,addToCart:K}};export{useBtnAddToCart};
1
+ import{useRenderMode as e,useProduct as t,useCurrency as r,useQuantity as i,useProductProperties as s,useCurrentVariant as n,useHasPreSelected as o,useStickyStore as a,useProductStore as u,useCreateCart as l,useAddToCart as c,convertDecimalToNumber as m,useCurrentVariantInStock as b}from"@gem-sdk/core";import{useRef as d,useEffect as f,useCallback as p}from"react";import{addToCartTracking as v}from"../../../helpers/tracking.js";import{useDispatchAfterSubmitEvent as g}from"./useDispatchAfterSubmitEvent.js";import{useCartMessage as I}from"./useCartMessage.js";import{useCartOperations as k}from"./useCartOperations.js";let useBtnAddToCart=({styles:D,setting:S,builderProps:E})=>{let h=d(null),{isEditMode:j,isPreviewSharePageMode:y}=e(),C=t(),{currency:A}=r(),{quantity:M}=i(),O=s(),w=n(),{hasPreSelected:B}=o(),T=a(e=>e.setStickyVisible),q=u(e=>e.updateIsSubmit),x=g(E?.uid),{showMessage:L,notiComponent:U}=I(D,S),{handleSuccess:V,handleError:z,cartId:F}=k(S,L,x),{isMutating:G,trigger:H}=l({onSuccess:V,onError:z}),{isMutating:J,trigger:K}=c({onSuccess:V,onError:z});f(()=>{let e=new IntersectionObserver(e=>{let t=e[0];T(t?.isIntersecting)},{threshold:.1}),t=h.current;return h.current&&e.observe(h.current),()=>{t&&e.unobserve(t)}},[T]);let N=p(()=>{if(!w?.baseID||!M||!C?.baseID||void 0!==B&&!B||j||y)return;let e=O?.some(e=>e.required&&!e.value);if(q(!0),e)return;let t=O?.filter(e=>!!e.value)?.map(e=>({key:e.key,value:e.value}));v({quantity:M,currency:A,id:C?.baseID,name:C?.title,brand:C?.vendor,sku:w.sku,price:m(w?.price),variant:w.title});let r={quantity:M,attributes:t,variantId:w.baseID};S?.actionEffect!=="buy-now"&&F?K({cartId:F,lines:[r]}):H({items:[r]})},[j,y,F,A,M,O,B,C?.title,C?.vendor,C?.baseID,w?.sku,w?.price,w?.title,w?.baseID,S?.actionEffect,H,K,q]),P=b(),Q=G||J,R=w?S?.outOfStockLabel:"Unavailable";return{addToCartRef:h,isLoading:Q,isInStock:P,notiComponent:U,outOfStockLabel:R,addToCart:N}};export{useBtnAddToCart};
@@ -1 +1 @@
1
- import{useMoneyFormat as e,useEditorMode as t,useProduct as r,useCurrentVariant as n,useQuantity as o,useFormatMoney as u,useProductBundleDiscount as i,formatMoney as p}from"@gem-sdk/core";import{useMemo as c}from"react";import{applyBundleDiscountAmount as s}from"../../../helpers/product-bundle.js";import{DiscountType as a}from"../../constants/product-bundle.js";let useGpDiscountTag=m=>{let{setting:l,...d}=m,{customContent:g}=l??{},f=d["bundle-item"],{moneyFormat:b}=e(),h=t(),D=r(),$=n(),{quantity:j,hasUpdatePrice:y}=o(),G=c(()=>y&&g?.unit!=="percentage"?j??1:1,[y,g?.unit,j]),P=$?.price??0,T=$?.salePrice??0,k=(T-P)*G,x=u(k<0?0:k,l?.moneyWithCurrentFormat||!1),C=c(()=>{if(!T&&0!==T||!P&&0!==P)return`${g?.unit==="percentage"?"0%":x}`;if(g?.unit==="percentage"){let e=Math.round(k/(T/100));return`${e<0?0:e}%`}return`${x}`},[g?.unit,x,P,k,T]),{useProductCompareAtPrice:F}=i(),{discountPercentAmount:I}=s({currentVariant:$,bundleItem:f,options:{moneyFormat:b,useProductCompareAtPrice:F}}),M=c(()=>{if(!f)return 0;let{discountPercentAmount:e,discountAmount:t}=s({currentVariant:$,bundleItem:f,options:{moneyFormat:b,useProductCompareAtPrice:F}}),{discountType:r}=f,{unit:n}=g||{};return r!==a.NoDiscount||F?"percentage"===n?`${e}%`:t:"percentage"===n?"0%":p("0",b)},[f,$,b,F,g]),N=c(()=>f?M:C,[M,f,C]),W=D?.baseID?.replace("gid://shopify/Product/",""),q=c(()=>{let e=f?I<=0:k<=0;return"edit"===h&&e},[f,I,h,k]);return{mode:h,product:D,salePrice:T,priceSave:k,currentProductId:W,unitCustomDisplay:N,shouldPlaceholderNoDiscount:q}};export{useGpDiscountTag};
1
+ import{useMoneyFormat as e,useEditorMode as t,useProduct as r,useCurrentVariant as n,useQuantity as o,convertDecimalToNumber as u,useFormatMoney as i,useProductBundleDiscount as p,formatMoney as c}from"@gem-sdk/core";import{useMemo as s}from"react";import{applyBundleDiscountAmount as a}from"../../../helpers/product-bundle.js";import{DiscountType as m}from"../../constants/product-bundle.js";let useGpDiscountTag=l=>{let{setting:d,...g}=l,{customContent:f}=d??{},b=g["bundle-item"],{moneyFormat:h}=e(),D=t(),$=r(),j=n(),{quantity:y,hasUpdatePrice:G}=o(),P=s(()=>G&&f?.unit!=="percentage"?y??1:1,[G,f?.unit,y]),T=u(j?.price)??0,k=u(j?.salePrice)??0,x=(k-T)*P,C=i(x<0?0:x,d?.moneyWithCurrentFormat||!1),F=s(()=>{if(!k&&0!==k||!T&&0!==T)return`${f?.unit==="percentage"?"0%":C}`;if(f?.unit==="percentage"){let e=Math.round(x/(k/100));return`${e<0?0:e}%`}return`${C}`},[f?.unit,C,T,x,k]),{useProductCompareAtPrice:I}=p(),{discountPercentAmount:M}=a({currentVariant:j,bundleItem:b,options:{moneyFormat:h,useProductCompareAtPrice:I}}),N=s(()=>{if(!b)return 0;let{discountPercentAmount:e,discountAmount:t}=a({currentVariant:j,bundleItem:b,options:{moneyFormat:h,useProductCompareAtPrice:I}}),{discountType:r}=b,{unit:n}=f||{};return r!==m.NoDiscount||I?"percentage"===n?`${e}%`:t:"percentage"===n?"0%":c("0",h)},[b,j,h,I,f]),W=s(()=>b?N:F,[N,b,F]),q=$?.baseID?.replace("gid://shopify/Product/",""),v=s(()=>{let e=b?M<=0:x<=0;return"edit"===D&&e},[b,M,D,x]);return{mode:D,product:$,salePrice:k,priceSave:x,currentProductId:q,unitCustomDisplay:W,shouldPlaceholderNoDiscount:v}};export{useGpDiscountTag};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as n,usePageType as s,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as P,useProductsQuery as f,useCollectionQuery as b,flattenConnection as k,ProductListProvider as T,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import N from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let ProductNotFound=r(()=>import("../ProductNotFound.js"),{loading:d}),ProductList=r=>{let{children:W,styles:j,builderProps:x,setting:G,builderAttrs:M}=r,{isRelatedProduct:B,productSetting:A}=w(r),F=A.relatedTag&&A.relatedTag[0],{isEditMode:Q,isPreviewSharePageMode:z}=c(),D=n(),H=s(),R=u(e=>e.dynamicProduct),$=u(e=>e.dynamicCollection),[_,V]=l(1),[q,U]=l(!0),[J,K]=l(),[X,Y]=l(!1),Z="GP_FUNNEL_PAGE"===H,ee="GP_COLLECTION"==H;ee&&(A.productSrc="DynamicCollection",A.collectionId=$?.collectionId??"latest");let et=A?.productSrc??"Collection",eo=R?.productId&&R?.productId!==A.relatedProductId?R?.productId:A.relatedProductId,er=m(),ed=u(e=>e.publicStoreFrontData),el=i(()=>g(ed)?h(ed):er,[ed]),{data:ei}=p(B&&eo?eo:void 0,{revalidateOnMount:Q||z},el),ea=A.relatedTag&&"tags"===A.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),ec=A.relatedTag&&"collection"===A.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=A.relatedTag&&"vendor"===A.relatedTag[0]&&!ei?.vendor,es=ea||ec||en,eu=P(J,{revalidateOnMount:Q||z},el),em=Q||z,eg=f("PickProduct"===et?A?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:A?.numOfSelectedProducts}),eh=i(()=>({id:A?.collectionId??"latest",numberOfProducts:G?.numberOfProducts??4,orderBy:G?.orderBy}),[A?.collectionId,Number(G?.numberOfProducts),G?.orderBy]),ep=b("PickProduct"!==et?eh:void 0,{revalidateOnMount:em});a(()=>{if(B&&ei&&A.relatedTag&&"recommended-product"!==A.relatedType){let e;switch(Y(!1),A.hasRelatedExclude&&(e=A?.relatedExclude&&A.relatedExclude.split(",").map(e=>e.trim())),A.relatedTag[0]){case"vendor":K({vendor:A.relatedTag&&"vendor"===A.relatedTag[0]?ei?.vendor:"",limit:G?.numberOfProducts,idNEQ:ei.id});break;case"collection":{let t;let o=ei?.collections?.edges.map(e=>e.node?.id);if(!o||o?.length===0){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o},{titleNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o}]}],limit:G?.numberOfProducts});break}case"tags":{let t;if(!ei.tags||0===ei.tags.length){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}],limit:G?.numberOfProducts})}}}},[ei,A.relatedType,A.relatedTag,G?.numberOfProducts,A.relatedExclude,A.hasRelatedExclude,B]);let eP="PickProduct"===et?eg.isValidating:ep.isValidating,ef="PickProduct"===et?eg.isLoading:ep.isLoading,eb="PickProduct"===et?eg.error:ep.error,ek=ep.data?.collections?.edges?.[0]?.node,eT="PickProduct"===et?k(eg.data?.products):k(ek?.products),eI=eu?.data?.products?k(eu?.data?.products):void 0,ev=B&&eI?eI:"PickProduct"===et&&A?.productIds?.length?A?.productIds?.map(e=>eT?.find(t=>t?.baseID===e)).filter(Boolean)??eT:"PickProduct"!==et?eT:eT.filter((e,t)=>t<(A?.numOfSelectedProducts??4)),ey=i(()=>X&&B&&Q||!ev.length&&!ef&&q&&Q,[q,ef,X,B,Q,ev.length]),eO=i(()=>!ev||X&&B,[X,B,ev]),eN=i(()=>{if(!G?.sameHeight)return[];let e=0,t=Math.ceil((ev?.length??0)/+(G?.slidesToShow?.[D]??1));return Array.from(Array(ev?.length??0)).map((o,r)=>(r>=+(G?.slidesToShow?.[D]??1)*(e+1)&&++e,{gridRow:`${1+_*e}/${_+1+_*e}`,marginBottom:e+1<t?L(j?.horizontalGutter,D):void 0}))},[G?.sameHeight,G?.slidesToShow,_,ev?.length,D,j?.horizontalGutter]),eS=i(()=>eP||ef||eb||!ev||X&&B,[eb,ef,X,B,eP,ev]);a(()=>{eS||setTimeout(()=>{let{builderData:e}=x??{},t=e?.childrens?.[0];if(!t)return;let o=document.querySelector(`[data-id=${t}] div`);o&&V(o.childElementCount||1)},Q?0:500)},[x,eS,Q]);let eC=i(()=>({collection:ek,products:ev,settings:{loop:G?.loop??{desktop:!1},scrollMode:G?.scrollMode??{desktop:"snap"},slidesToShow:G?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:j?.layout,dot:G?.dot,dotStyle:G?.dotStyle,arrow:G?.arrow,controlOverContent:G?.controlOverContent},styles:{horizontalGutter:j?.horizontalGutter,verticalGutter:j?.verticalGutter,fullWidth:j?.fullWidth,spacing:j?.spacing,width:j?.width,height:j?.height}}),[ek,ev,G,j]);if(x?.isPreview&&Z)return e(t,{});if(ey)return e(t,{children:C(q,e(ProductNotFound,{builderAttrs:M,collectionHandle:ek?.handle,productSrc:et,onClose:()=>U(!1),children:W,relatedTagString:F,assignProductNoTags:es,noAssignedProduct:!eo}))});let{productListWrapStyle:eE,productListContentStyle:ew,productListWrapAlignStyle:eL}=S(r),{productListWrapClass:eW}=E(r),ej=()=>e(t,{children:C(j?.layout==="grid",e(O,{...r,productSortedById:ev,generateGridRowArray:eN}),e(N,{...r,productSortedById:ev}))});return o("div",{...M,className:eW,style:eE,children:[!!j?.preloadBgImage&&o(y,{children:[!!j.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage.desktop.image.src,as:"image"}),!!j.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.tablet?.image?.src,as:"image"}),!!j.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||ef?e(d,{}):eb?o("div",{children:["Error: ",eb?.message]}):eO?e("div",{children:"Products not found"}):e(T,{...eC,children:e("div",{className:"gp-flex gp-w-full",style:eL,children:o("div",{style:ew,children:[Z&&e(v,{}),ej()]})})}),I(W,!0)]})};export{ProductList as default};
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import r from"next/dynamic";import d from"../../../common/components/Loading.js";import{useState as l,useMemo as i,useEffect as a}from"react";import{useRenderMode as c,useCurrentDevice as n,usePageType as s,usePageStore as u,useFetchHandle as m,hasPublicStoreFrontData as g,createStoreFrontFetcher as h,useProductQuery as p,useProductsQueryAll as P,useProductsQuery as f,useCollectionQuery as b,flattenConnection as T,ProductListProvider as k,filterToolbarPreview as I}from"@gem-sdk/core";import v from"../SalePageProductListWarning.js";import y from"next/head";import O from"./ProductListGridLayout.js";import N from"./ProductListCarouselLayout.js";import{getStyle as S}from"./common/styles.js";import{If as C}from"@gem-sdk/system";import{getClass as E}from"./common/classes.js";import{getData as w}from"./common/helpers.js";import{getPropertyByDevice as L}from"../../../dialog/common/helpers.js";let ProductNotFound=r(()=>import("../ProductNotFound.js"),{loading:d}),ProductList=r=>{let{children:W,styles:j,builderProps:x,setting:G,builderAttrs:M}=r,{isRelatedProduct:A,productSetting:B}=w(r),F=B.relatedTag&&B.relatedTag[0],{isEditMode:H,isPreviewSharePageMode:Q}=c(),z=n(),D=s(),R=u(e=>e.dynamicProduct),$=u(e=>e.dynamicCollection),[_,V]=l(1),[q,U]=l(!0),[J,K]=l(),[X,Y]=l(!1),Z="GP_FUNNEL_PAGE"===D,ee="GP_COLLECTION"==D;ee&&(B.productSrc="DynamicCollection",B.collectionId=$?.collectionId??"latest");let et=B?.productSrc??"Collection",eo=R?.productId&&R?.productId!==B.relatedProductId?R?.productId:B.relatedProductId,er=m(),ed=u(e=>e.publicStoreFrontData),el=i(()=>g(ed)?h(ed):er,[ed]),{data:ei}=p(A&&eo?eo:void 0,{revalidateOnMount:H||Q},el),ea=B.relatedTag&&"tags"===B.relatedTag[0]&&(!ei?.tags||ei?.tags.length===0),ec=B.relatedTag&&"collection"===B.relatedTag[0]&&(!ei?.collections?.edges||ei?.collections.edges.length===0),en=B.relatedTag&&"vendor"===B.relatedTag[0]&&!ei?.vendor,es=ea||ec||en,eu=P(J,{revalidateOnMount:H||Q},el),em=H||Q,eg=f("PickProduct"===et?B?.productIds:void 0,{revalidateOnMount:em},{defaultSelectedProductCount:B?.numOfSelectedProducts}),eh=i(()=>({id:B?.collectionId??"latest",numberOfProducts:G?.numberOfProducts??4,orderBy:G?.orderBy}),[B?.collectionId,Number(G?.numberOfProducts),G?.orderBy]),ep=b("PickProduct"!==et?eh:void 0,{revalidateOnMount:em});a(()=>{if(A&&ei&&B.relatedTag&&"recommended-product"!==B.relatedType){let e;switch(Y(!1),B.hasRelatedExclude&&(e=B?.relatedExclude&&B.relatedExclude.split(",").map(e=>e.trim())),B.relatedTag[0]){case"vendor":K({vendor:B.relatedTag&&"vendor"===B.relatedTag[0]?ei?.vendor:"",limit:G?.numberOfProducts,idNEQ:ei.id});break;case"collection":{let t;let o=ei?.collections?.edges.map(e=>e.node?.id);if(!o||o?.length===0){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o},{titleNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasCollectionProductsWith:[{hasCollectionWith:[{idIn:o}]}],limit:G?.numberOfProducts});break}case"tags":{let t;if(!ei.tags||0===ei.tags.length){Y(!0);break}K(t=e&&e.length>0?{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags},{nameNotIn:e}]}],limit:G?.numberOfProducts}:{idNEQ:ei.id,hasProductTagsWith:[{hasTagsWith:[{nameIn:ei.tags}]}],limit:G?.numberOfProducts})}}}},[ei,B.relatedType,B.relatedTag,G?.numberOfProducts,B.relatedExclude,B.hasRelatedExclude,A]);let eP="PickProduct"===et?eg.isValidating:ep.isValidating,ef="PickProduct"===et?eg.isLoading:ep.isLoading,eb="PickProduct"===et?eg.error:ep.error,eT=ep.data?.collections?.edges?.[0]?.node,ek="PickProduct"===et?T(eg.data?.products):T(eT?.products),eI=u(e=>e.assignedProductIds),ev=u(e=>e.isApplyAllProducts),ey=i(()=>(eI??[]).length>0&&!ev||ev,[eI,ev]),eO=eu?.data?.products&&ey?T(eu?.data?.products):[],eN=A?eO:"PickProduct"===et&&B?.productIds?.length?B?.productIds?.map(e=>ek?.find(t=>t?.baseID===e)).filter(Boolean)??ek:"PickProduct"!==et?ek:ek.filter((e,t)=>t<(B?.numOfSelectedProducts??4)),eS=i(()=>X&&A&&H||!eN.length&&!ef&&q&&H,[q,ef,X,A,H,eN.length]),eC=i(()=>!eN||X&&A,[X,A,eN]),eE=i(()=>{if(!G?.sameHeight)return[];let e=0,t=Math.ceil((eN?.length??0)/+(G?.slidesToShow?.[z]??1));return Array.from(Array(eN?.length??0)).map((o,r)=>(r>=+(G?.slidesToShow?.[z]??1)*(e+1)&&++e,{gridRow:`${1+_*e}/${_+1+_*e}`,marginBottom:e+1<t?L(j?.horizontalGutter,z):void 0}))},[G?.sameHeight,G?.slidesToShow,_,eN?.length,z,j?.horizontalGutter]),ew=i(()=>eP||ef||eb||!eN||X&&A,[eb,ef,X,A,eP,eN]);a(()=>{if(ew||!G?.sameHeight)return;let e=null,t=setTimeout(()=>{let{builderData:t}=x??{},o=t?.childrens?.[0];if(!o)return;let r=document.querySelector(`[data-id=${o}] div`);r&&(V(r.childElementCount||1),e=new MutationObserver(()=>{let e=r.childElementCount||1;V(e)}),H&&e.observe(r,{childList:!0,subtree:!1}))},500);return()=>{clearTimeout(t),e&&e.disconnect()}},[x,ew,H,G?.sameHeight]);let eL=i(()=>({collection:eT,products:eN,settings:{loop:G?.loop??{desktop:!1},scrollMode:G?.scrollMode??{desktop:"snap"},slidesToShow:G?.slidesToShow??{desktop:4,tablet:3,mobile:1},layout:j?.layout,dot:G?.dot,dotStyle:G?.dotStyle,arrow:G?.arrow,controlOverContent:G?.controlOverContent},styles:{horizontalGutter:j?.horizontalGutter,verticalGutter:j?.verticalGutter,fullWidth:j?.fullWidth,spacing:j?.spacing,width:j?.width,height:j?.height}}),[eT,eN,G,j]);if(x?.isPreview&&Z)return e(t,{});if(eS)return e(t,{children:C(q,e(ProductNotFound,{builderAttrs:M,collectionHandle:eT?.handle,productSrc:et,onClose:()=>U(!1),children:W,relatedTagString:F,assignProductNoTags:es,noAssignedProduct:!eo}))});let{productListWrapStyle:eW,productListContentStyle:ej,productListWrapAlignStyle:ex}=S(r),{productListWrapClass:eG}=E(r),eM=()=>e(t,{children:C(j?.layout==="grid",e(O,{...r,productSortedById:eN,generateGridRowArray:eE}),e(N,{...r,productSortedById:eN}))});return o("div",{...M,className:eG,style:eW,children:[!!j?.preloadBgImage&&o(y,{children:[!!j.backgroundImage?.desktop?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage.desktop.image.src,as:"image"}),!!j.backgroundImage?.tablet?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.tablet?.image?.src,as:"image"}),!!j.backgroundImage?.mobile?.image?.src&&e("link",{rel:"preload",href:j.backgroundImage?.mobile?.image?.src,as:"image"})]}),eP||ef?e(d,{}):eb?o("div",{children:["Error: ",eb?.message]}):eC?e("div",{children:"Products not found"}):e(k,{...eL,children:e("div",{className:"gp-flex gp-w-full",style:ex,children:o("div",{style:ej,children:[Z&&e(v,{}),eM()]})})}),I(W,!0)]})};export{ProductList as default};
@@ -1 +1 @@
1
- import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,useInteraction as o,useProduct as u,useShopStore as p,useFormatMoney as d}from"@gem-sdk/core";let useGpPrice=l=>{let{setting:m,builderProps:s}=l,g=e(null),b=c(),{quantity:h,hasUpdatePrice:y}=i(),P=a(),{useProductCompareAtPrice:v}=n(),f=l["bundle-item"],w=P?.price??0,V=P?.salePrice??0,k=m?.priceType==="compare",{trigger:q}=o(),T=u(),x=T?.baseID?.replace("gid://shopify/Product/",""),C=p(e=>e.showPriceCurrency),E=r(()=>f?.quantity?f.quantity:y&&h||1,[h,y,f?.quantity]),G=r(()=>{let e=Number(f?.discountValue);return f?.discountType==="percentage"?w*E*e/100:e},[f?.discountType,f?.discountValue,w,E]),$=r(()=>f?.discountValue?v?(V||w)*E:w*E:V*E,[f?.discountValue,w,E,V,v]),j=r(()=>{let e=w*E;return k?$:G?Math.max(0,e-G):e},[w,E,G,$,k]),D=r(()=>!!k&&(!(V>w)||!(V>=0)),[k,V,w]),I=(e,r)=>{q({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${s?.uid}"]`,element:g.current}),q({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${s?.uid}"]`,element:g.current})};t(e=>{e!==w&&I(w,"price")},[w]),t(e=>{e!==V&&I(V,"compare")},[V]);let M=()=>{if("edit"!==b)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:s?.uid,value:!j&&k,tag:"ProductPrice"}});window.dispatchEvent(e)},N=d(j??0,C||!1),z=k&&!j,A="edit"!==b&&z;return{elementRef:g,moneyFormatted:N,currentProductId:x,isNoComparePrice:z,isNoComparePriceILP:A,emitNoDataSignal:M,shouldHiddenComparePrice:D}};export{useGpPrice};
1
+ import{useRef as e,useMemo as r}from"react";import{useTransition as t}from"../../product-variants/common/common.js";import{useEditorMode as c,useQuantity as i,useCurrentVariant as a,useProductBundleDiscount as n,convertDecimalToNumber as o,useInteraction as u,useProduct as p,useShopStore as d,useFormatMoney as l}from"@gem-sdk/core";let useGpPrice=m=>{let{setting:s,builderProps:g}=m,b=e(null),h=c(),{quantity:y,hasUpdatePrice:P}=i(),v=a(),{useProductCompareAtPrice:f}=n(),w=m["bundle-item"],V=o(v?.price)??0,k=o(v?.salePrice)??0,q=s?.priceType==="compare",{trigger:T}=u(),x=p(),C=x?.baseID?.replace("gid://shopify/Product/",""),E=d(e=>e.showPriceCurrency),G=r(()=>w?.quantity?w.quantity:P&&y||1,[y,P,w?.quantity]),$=r(()=>{let e=Number(w?.discountValue);return w?.discountType==="percentage"?V*G*e/100:e},[w?.discountType,w?.discountValue,V,G]),j=r(()=>w?.discountValue?f?(k||V)*G:V*G:k*G,[w?.discountValue,V,G,k,f]),D=r(()=>{let e=V*G;return q?j:$?Math.max(0,e-$):e},[V,G,$,j,q]),I=r(()=>!!q&&(!(k>V)||!(k>=0)),[q,k,V]),M=(e,r)=>{T({event:"price"===r?"gp:rollback:price-change":"gp:rollback:compare-price-change",selector:`[data-id="${g?.uid}"]`,element:b.current}),T({event:"price"===r?"gp:price-change":"gp:compare-price-change",data:e,selector:`[data-id="${g?.uid}"]`,element:b.current})};t(e=>{e!==V&&M(V,"price")},[V]),t(e=>{e!==k&&M(k,"compare")},[k]);let N=()=>{if("edit"!==h)return;let e=new CustomEvent("editor:product-source-no-data-warning",{bubbles:!0,detail:{uid:g?.uid,value:!D&&q,tag:"ProductPrice"}});window.dispatchEvent(e)},z=l(D??0,E||!1),A=q&&!D,B="edit"!==h&&A;return{elementRef:b,moneyFormatted:z,currentProductId:C,isNoComparePrice:A,isNoComparePriceILP:B,emitNoDataSignal:N,shouldHiddenComparePrice:I}};export{useGpPrice};
@@ -1,3 +1,10 @@
1
- import{template as t}from"@gem-sdk/core";import{getStaticLocale as o}from"../../../helpers.js";import r from"../../../text/components/Text.liquid.js";import{createClass as e,LiquidUnless as p,If as m}from"@gem-sdk/system";import{getTextProps as i}from"./common/helpers.js";let ProductTitle=l=>{let{setting:s}=l,d=`<p>${o("ProductTitle","product_not_found")}</p>`,c=()=>r(i(l)),u={},n=s?.linkProduct,f=e({"gp-product-title-link-wrapper":!0});return p("product",`${d}`,m(n,t`<a ${u} class="${f}">
2
- ${c()}
3
- </a>`,`${c()}`))};export{ProductTitle as default};
1
+ import{template as t,dataStringify as r,isLocalEnv as e,baseAssetURL as o}from"@gem-sdk/core";import{getStaticLocale as p,getSettingPreloadData as s}from"../../../helpers.js";import i from"../../../text/components/Text.liquid.js";import{createAttr as l,createClass as d,createStateOrContext as u,LiquidUnless as c,If as m}from"@gem-sdk/system";import{getTextProps as a}from"./common/helpers.js";let ProductTitle=n=>{let{setting:$,builderProps:f}=n,g=`<p>${p("ProductTitle","product_not_found")}</p>`,k=()=>i(a(n)),P=l({href:"{{ product.url }}",title:"{{ product.title }}"}),j=$?.linkProduct,S=d({"gp-product-title-link-wrapper":!0}),T=u({setting:{linkProduct:$?.linkProduct},uid:f?.uid}),h=()=>{let t=e?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${o}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${s('class="gps-link" delay',"src")}="${t}" defer="defer"></script>`};return c("product",`${g}`,t`
2
+ <gp-product-title
3
+ gp-data='${r(T)}'
4
+ >
5
+ ${m(j,t`<a ${P} class="${S}">
6
+ ${k()}
7
+ </a>`,t`${k()}`)}
8
+ </gp-product-title>
9
+ ${h()}
10
+ `)};export{ProductTitle as default};
@@ -1,8 +1,8 @@
1
- import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiveValueByScreen as s}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as _,If as $}from"@gem-sdk/system";import{getAttrs as g}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as S,getDropdownGroupData as b}from"./common/main/getData.js";import{getWrapVariantOptionClass as A}from"./common/variants/classes.js";import{getStyleOfObject as P}from"../../helpers/function.js";import{getMarginBottomStyle as D}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as V}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=E=>{let{builderProps:O,styles:T,setting:x,advanced:q}=E,{align:F,swatchItemWidth:G,dropdownItemWidth:C,swatchSpacing:I,optionTypo:k,marginBottom:L}=T??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=O??{},H="groupOption"===z,K=()=>{let e={};return o.forEach(t=>{let i=s(G,t);e[t]="auto"===i}),e},Q=()=>{let e={};return o.forEach(t=>{e[t]=C?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,T):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresetsOptionType:X},ee=e=>{let t={"'":"&apos;",'"':"&quot;"},i=e;for(let o in t)e.indexOf(o)>=0&&(i=i.replaceAll(o,t[o]));return i},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),ei=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),eo=({showDropdown:t,isRenderDefault:i,typeOfOption:o})=>e`
2
- ${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:o,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:i}))}
3
- ${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,es=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:eo,variantPresetsLiquid:es??""},en=m(j(F)),er=c(h(I,I)),ep=S(E,"Liquid"),el=m(A(U,F)),ed=()=>e`
1
+ import{template as e,isLocalEnv as t,baseAssetURL as s,DEVICES as i,getResponsiveValueByScreen as o}from"@gem-sdk/core";import a from"../../../text/components/Text.liquid.js";import n from"./components/variants/index.liquid.js";import r from"./components/dropdown-swatches/Dropdown.liquid.js";import p from"./components/dropdown-group/DropdownGroup.liquid.js";import{getSettingPreloadData as l}from"../../../helpers.js";import{mappingVariantStyles as d}from"./utils/mappingVariantStyles.js";import{createClass as m,createStyle as c,createAttr as u,Liquid as v,LiquidFor as f,LiquidIf as _,If as $}from"@gem-sdk/system";import{getAttrs as g}from"./common/main/getAttr.js";import{getVariantOptionGroupStyle as h,getWrapperStyle as y}from"./common/main/styles.js";import{getVariantOptionGroupClass as j,getWrapDropdownClass as w}from"./common/main/classes.js";import{getTextVariantTitleData as S,getDropdownGroupData as P}from"./common/main/getData.js";import{getWrapVariantOptionClass as b}from"./common/variants/classes.js";import{getStyleOfObject as A}from"../../helpers/function.js";import{getMarginBottomStyle as D}from"./common/variants/styles.js";import{renderOptionValuesNewFormatSwatches as N}from"./OptionVariantsNewFormat.liquid.js";import{renderOptionValuesOld as V}from"./OptionVariantsOldFormat.liquid.js";let DEFAULT_ADVANCED_DISPLAY_SETTING={desktop:!0,tablet:!0,mobile:!0},ProductVariants=E=>{let{builderProps:O,styles:T,setting:x,advanced:q}=E,{align:F,swatchItemWidth:G,dropdownItemWidth:C,swatchSpacing:I,optionTypo:k,marginBottom:L}=T??{},{label:J,optionType:z,showAsSwatches:M,layout:U,hasPreSelected:W}=x??{},R=q?.d??DEFAULT_ADVANCED_DISPLAY_SETTING,{uid:Y}=O??{},H="groupOption"===z,K=()=>{let e={};return i.forEach(t=>{let s=o(G,t);e[t]="auto"===s}),e},Q=()=>{let e={};return i.forEach(t=>{e[t]=C?.[t]==="fill"}),e},B=x?.variantPresets?d(x?.variantPresets,T):[],X=B?.map(e=>({...e,presets:{[e.optionType]:e.presets[e.optionType]}})),Z={...x,variantPresets:X},ee=e=>{let t={"'":"&apos;",'"':"&quot;"},s=e;for(let i in t)e.indexOf(i)>=0&&(s=s.replaceAll(i,t[i]));return s},et=()=>x?.variantPresets?.map(e=>`${ee(e.optionName)}($2)${e.optionType}`).join("($1)"),es=()=>x?.variantPresets?.filter(e=>!!e?.hide)?.map(e=>e.optionName).join(","),ei=({showDropdown:t,isRenderDefault:s,typeOfOption:i})=>e`
2
+ ${f("value in values",n({id:"{{option.name | escape}}-{{value | escape}}",variantKey:"{{option.name | escape}}-{{option.position}}-{{ forloop.index }}",showAsSwatches:M,uid:Y,name:"{{option.name | escape}}",value:{label:"{{value | escape}}"},checked:W?"{%- if option.selected_value == value -%}true{% else %}false{%- endif -%}":"false",optionPosition:"rootForloop",typeOfOption:i,activeClass:W?"{%- if option.selected_value == value -%}option-item-active{%- endif -%}":"",...T,...Z,swatchAutoWidth:K(),optionTypo:k,isRenderDefault:s}))}
3
+ ${_(t?'type == "dropdown"':"false",r({...T,...Z,swatchAutoWidth:Q(),optionTypo:k}))}`,eo=x?.variantPresets?.map(e=>({name:ee(e.optionName),type:e.optionType})).map(e=>`${e.name}($1)${e.type}`).join("($2)").toString(),ea={renderVariantItem:ei,variantPresetsLiquid:eo??""},en=m(j(F)),er=c(h(I,I)),ep=S(E,"Liquid"),el=m(b(U,F)),ed=()=>e`
4
4
  ${v(`{%- assign presets = "${et()}" | split: '($1)' -%}`)}
5
- ${v(`{% assign hiddenPresetOptions = "${ei()}" | split: ',' %}`)}
5
+ ${v(`{% assign hiddenPresetOptions = "${es()}" | split: ',' %}`)}
6
6
 
7
7
  ${v(`{% assign all_option_names = options | map: 'name' %}
8
8
  {% assign filtered_options_string = '' %}
@@ -33,7 +33,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
33
33
  <div
34
34
  option-name="{{option.name | escape}}"
35
35
  class="${el} ${_("hiddenPresetOptions contains option.name","gp-hidden")}"
36
- style="${P(D(L))}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
36
+ style="${A(D(L))}${v("{% if forloop.last or option.name == last_option_name %}--mb:0;--mb-mobile:0;--mb-tablet:0;{% endif %}")}"
37
37
  >
38
38
  ${v("{%- assign showVariantClass = 'variant-display' -%}")}
39
39
  ${v("{%- assign optionName = option.name -%}")}
@@ -45,7 +45,7 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
45
45
  <div
46
46
  variant-option-name="{{option.name | escape}}"
47
47
  class="${en}"
48
- style="${P(er)}"
48
+ style="${A(er)}"
49
49
  >
50
50
  ${v("{%- assign values = option.values -%}")}
51
51
  ${v("{%- assign rootForloop = forloop.index0 -%}")}
@@ -59,16 +59,16 @@ import{template as e,isLocalEnv as t,baseAssetURL as i,DEVICES as o,getResponsiv
59
59
  {%- endif -%}
60
60
  `)}
61
61
  ${$(!W,v("{%- assign selectedValue = null -%}"),"")}
62
- ${$(M,em(),eo({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
62
+ ${$(M,em(),ei({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
63
63
  </div>
64
64
  </div>`)}
65
65
  `,em=()=>e`
66
66
  ${_("shop.metafields.GEMPAGES.swatchesJSONFormat and shop.metafields.GEMPAGES.swatchesJSONFormat != blank",N(ea),V(ea))}
67
- `,ec=m(w(F)),eu=b(E),ev=()=>`
67
+ `,ec=m(w(F)),eu=P(E),ev=()=>`
68
68
  <div className="${ec}">
69
69
  ${p(eu)}
70
70
  </div>
71
- `,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${i}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
71
+ `,ef=u(g({uid:Y,hasPreSelected:W,cssClass:q?.cssClass})),e_=c(y(E)),e$=m({"gp-flex gp-flex-col !gp-ml-0":!0}),eg=()=>{let e=t?"{{ 'gp-product-variant-v7-5.js' | asset_url }}":`${s}/assets-v2/gp-product-variant-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${l('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return e`
72
72
  ${v("{%- assign total_combinations = 1 -%}")}
73
73
  ${f("option in product.options_with_values","{%- assign total_combinations = total_combinations | times: option.values.size -%}")}
74
74
  <gp-product-variants
@@ -1,14 +1,14 @@
1
- import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-sdk/core";import o from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as a,If as d}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as p,STATIC_PRODUCT_STATUS as l,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let Product=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:I}=g??{},{rowSetting:S,rowStyles:b,formatVariantId:j,formatProductId:h,productStatus:q,preSelectedOptionIds:V,productHandle:P,advancedStyle:k}=c(f),w=()=>t`
1
+ import{template as t,RenderIf as e,isLocalEnv as r,baseAssetURL as i}from"@gem-sdk/core";import a from"../../../grid/components/row/Row.liquid.js";import{LiquidIf as o,If as d}from"@gem-sdk/system";import{getSettingPreloadData as n,getStaticLocale as s}from"../../../helpers.js";import{getData as c,DYNAMIC_PRODUCT_STATUS as p,STATIC_PRODUCT_STATUS as l,PRODUCT_ID_LATEST as u}from"./common/helpers.js";let Product=f=>{let{children:m,setting:g,style:y,builderProps:v,rawChildren:_,advanced:$}=f,{isSyncProduct:S,productSetting:I}=g??{},b=I?.hasPreSelected??!1,{rowSetting:j,rowStyles:h,formatVariantId:q,formatProductId:P,productStatus:V,preSelectedOptionIds:k,productHandle:w,advancedStyle:E}=c(f),x=()=>t`
2
2
  {%- liquid
3
3
  if request.page_type == 'product'
4
- if '${q}' == '${l}'
5
- if '${h}' == '${u}'
4
+ if '${V}' == '${l}'
5
+ if '${P}' == '${u}'
6
6
  paginate collections.all.products by 100000
7
7
  assign product = collections.all.products | sort: 'created_at' | reverse | first
8
8
  endpaginate
9
9
  else
10
- assign product = all_products['${P}']
11
- assign productId = '${h}' | times: 1
10
+ assign product = all_products['${w}']
11
+ assign productId = '${P}' | times: 1
12
12
  if product == empty or product == null
13
13
  paginate collections.all.products by 100000
14
14
  for item in collections.all.products
@@ -21,13 +21,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
21
21
  endif
22
22
  endif
23
23
  else
24
- if '${h}' == '${u}'
24
+ if '${P}' == '${u}'
25
25
  paginate collections.all.products by 100000
26
26
  assign product = collections.all.products | sort: 'created_at'| reverse | first
27
27
  endpaginate
28
28
  else
29
- assign product = all_products['${P}']
30
- assign productId = '${h}' | times: 1
29
+ assign product = all_products['${w}']
30
+ assign productId = '${P}' | times: 1
31
31
  if product == empty or product == null
32
32
  paginate collections.all.products by 100000
33
33
  for item in collections.all.products
@@ -40,11 +40,11 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
40
40
  endif
41
41
  endif
42
42
  -%}
43
- `,E=()=>t`
43
+ `,A=()=>t`
44
44
  {%- liquid
45
45
  if request.page_type != 'product'
46
- assign product = all_products['${P}']
47
- assign productId = '${h}' | times: 1
46
+ assign product = all_products['${w}']
47
+ assign productId = '${P}' | times: 1
48
48
  if product == empty or product == null
49
49
  paginate collections.all.products by 100000
50
50
  for item in collections.all.products
@@ -56,30 +56,30 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
56
56
  endif
57
57
  endif
58
58
  -%}
59
- `,x=()=>t`
59
+ `,B=()=>t`
60
60
  {%- assign gpBkProduct = product -%}
61
- ${d(q==p,E(),w())}
62
- `,A=()=>t`
63
- {%- assign initVariantId = ${j} -%}
61
+ ${d(V==p,A(),x())}
62
+ `,G=()=>t`
63
+ {%- assign initVariantId = ${q} -%}
64
64
  {%- assign product_form_id = 'product-form-' | append: "${v?.uid}" -%}
65
- ${j?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
66
- ${j?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
65
+ ${q?"{%- assign variant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign variant = product.selected_or_first_available_variant -%}"}
66
+ ${q?"{%- assign productSelectedVariant = product.variants | where: 'id', initVariantId | first -%}":"{%- assign productSelectedVariant = product.selected_or_first_available_variant -%}"}
67
67
  {%-if productSelectedVariant == empty or productSelectedVariant == null -%}
68
68
  {%- assign productSelectedVariant = product.selected_or_first_available_variant -%}
69
69
  {%- endif -%}
70
70
  {%-if variant == empty or variant == null -%}
71
71
  {%- assign variant = product.selected_or_first_available_variant -%}
72
72
  {%- endif -%}
73
- `,B=()=>t`
73
+ `,H=()=>t`
74
74
  <div class="gp-text-center">${s("Product","product_not_found")}</div>
75
- `,G=()=>t`
76
- ${A()}
75
+ `,O=()=>t`
76
+ ${G()}
77
77
  <gp-product
78
78
  data-uid="${v?.uid}"
79
79
  data-id="${v?.uid}"
80
- style="${k}"
80
+ style="${E}"
81
81
  class="${$?.cssClass}"
82
- gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${V}], "isSyncProduct": "${I}", "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
82
+ gp-context='{"productId": {{ product.id }}, "preSelectedOptionIds": [${k}], "isSyncProduct": "${S}", "hasPreSelected": ${b}, "variantSelected": {{ variant | json | escape }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "inventoryQuantity": {{ variant.inventory_quantity }}, "quantity": 1, "formId": "{{ product_form_id }}" }'
83
83
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }}}'
84
84
  >
85
85
  <product-form class="product-form">
@@ -87,13 +87,13 @@ import{template as t,RenderIf as e,isLocalEnv as i,baseAssetURL as r}from"@gem-s
87
87
  <input type="hidden" name="id" value="{{ variant.id }}" />
88
88
  <input type="hidden" name="quantity" value="{{ quantity }}" />
89
89
  <button type="submit" onclick="return false;" style="display:none;"></button>
90
- ${o({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:b,setting:S,children:m,rawChildren:_})}
90
+ ${a({builderProps:{...v,uid:v?.uid,uidInteraction:`${v?.uid}-row`},style:y,styles:h,setting:j,children:m,rawChildren:_})}
91
91
  {%- endform -%}
92
92
  </product-form>
93
93
  </gp-product>
94
94
  {%- assign product = gpBkProduct -%}
95
95
  `;return t`
96
- ${x()}
97
- ${a("product != empty and product != null",G(),B())}
98
- ${e(i,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${r}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
96
+ ${B()}
97
+ ${o("product != empty and product != null",O(),H())}
98
+ ${e(r,`<script ${n('class="gps-link" delay',"src")}="{{ 'gp-product-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${n('class="gps-link" delay',"src")}="${i}/assets-v2/gp-product-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
99
99
  `};export{Product as default};
@@ -1 +1 @@
1
- import{formatMoney as t}from"@gem-sdk/core";import{DiscountType as e}from"../components/constants/product-bundle.js";let noDiscount=e=>({discountPercentAmount:0,discountAmount:t("0",e)}),applyBundleDiscountAmount=n=>{let{currentVariant:o,bundleItem:u,options:c}=n;if(!c?.useProductCompareAtPrice&&u?.discountType===e.NoDiscount||!u||!o?.price)return noDiscount(c?.moneyFormat||"${{amount}}");let r=Number(o?.price),i=Number(o?.salePrice)||r,a=Number(u?.quantity),m=calculateBundleFixedDiscount(r,u),s=discountPercentAmount(m,a*r),d=r*a-m,l=i*a;return i<=r&&m<=0?noDiscount(c?.moneyFormat||"${{amount}}"):{discountPercentAmount:c?.useProductCompareAtPrice?calculateDiffPercentPrice(d,l):s,discountAmount:c?.useProductCompareAtPrice?calculateDiffFixedPrice(d,l,c?.moneyFormat):t(m.toString(),c?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(e,n,o)=>t((n-e).toString(),o),calculateBundleFixedDiscount=(t,n)=>{let o=parseInt(n?.discountValue);return n?.discountType===e.Percentage?t*n.quantity*o/100:n?.discountType===e.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
1
+ import{convertDecimalToNumber as t,formatMoney as e}from"@gem-sdk/core";import{DiscountType as n}from"../components/constants/product-bundle.js";let noDiscount=t=>({discountPercentAmount:0,discountAmount:e("0",t)}),applyBundleDiscountAmount=o=>{let{currentVariant:u,bundleItem:c,options:r}=o;if(!r?.useProductCompareAtPrice&&c?.discountType===n.NoDiscount||!c||!u?.price)return noDiscount(r?.moneyFormat||"${{amount}}");let i=t(u?.price)??0,a=t(u?.salePrice)??i,m=Number(c?.quantity),s=calculateBundleFixedDiscount(i,c),d=discountPercentAmount(s,m*i),l=i*m-s,p=a*m;return a<=i&&s<=0?noDiscount(r?.moneyFormat||"${{amount}}"):{discountPercentAmount:r?.useProductCompareAtPrice?calculateDiffPercentPrice(l,p):d,discountAmount:r?.useProductCompareAtPrice?calculateDiffFixedPrice(l,p,r?.moneyFormat):e(s.toString(),r?.moneyFormat)}},calculateDiffPercentPrice=(t,e)=>{let n=(e-t)/e*100;return Math.round(n)},calculateDiffFixedPrice=(t,n,o)=>e((n-t).toString(),o),calculateBundleFixedDiscount=(t,e)=>{let o=parseInt(e?.discountValue);return e?.discountType===n.Percentage?t*e.quantity*o/100:e?.discountType===n.FixedAmount?o:0},discountPercentAmount=(t,e)=>Math.round(t/e*100);export{applyBundleDiscountAmount};
@@ -1 +1 @@
1
- let horizontalThree=[{advanced:{},childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{css:".{{rootClassName}} > div > div{\nwidth:100%;\n}",rootClassName:"{{rootClassName}}"},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"static"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"Auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-d6e2c48e-485d-4db2-a00e-9fe3bde2c3d5.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{gap:"",height:"",shape:"original",shapeLinked:!0,width:"100%"}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gdzIKI_0T_"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gn1nFyt3q6"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Deluxe choice</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gRom-20zjM"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gzjaV2bhnA"},{childrens:[{childrens:[],label:"Product Price",settings:{hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,priceType:"regular",textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gPxDKeAt0Y"}],label:"Block",settings:{},tag:"Col",uid:"gaMYmxtRAS"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gQvPWxec6X"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gY3R2wmMlG"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalThree};
1
+ let horizontalThree=[{advanced:{},childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"relative"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"100%",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-d6e2c48e-485d-4db2-a00e-9fe3bde2c3d5.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{gap:"",height:"",shape:"original",shapeLinked:!0,width:"100%"}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gdzIKI_0T_"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gn1nFyt3q6"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Deluxe choice</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gRom-20zjM"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gzjaV2bhnA"},{childrens:[{childrens:[],label:"Product Price",settings:{hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,priceType:"regular",textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gPxDKeAt0Y"}],label:"Block",settings:{},tag:"Col",uid:"gaMYmxtRAS"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gQvPWxec6X"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gY3R2wmMlG"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalThree};
@@ -1 +1 @@
1
- let horizontalTwo=[{childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{css:".{{rootClassName}} > div > div{\nwidth:100%;\n}",rootClassName:"{{rootClassName}}"},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"static"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"Auto",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-b286a16e-98e6-48ba-889d-a36b64249436.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{shape:"original",shapeLinked:!0}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gRq0Y_6o_C"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gZCW_UZNgX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Great value</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gXozhYepEX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-1"},lineThrough:!0,thickness:2,lineColor:"text-1",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gU7z9j0jbp"},{childrens:[{childrens:[],label:"Product Price",settings:{priceType:"regular",hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gP9Tq9YUJq"}],label:"Block",settings:{},tag:"Col",uid:"gEOSPx4VOT"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gVq8mfQa7w"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gM8gt27sCy"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalTwo};
1
+ let horizontalTwo=[{childrens:[{childrens:[{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{},hasBoxShadow:{desktop:{normal:!1}},left:{desktop:"0px"},op:{desktop:"100%"},pos:{desktop:"relative"},right:{desktop:"0px"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{bottom:"8px"}}},z:{desktop:1}},label:"Product Badge",settings:{contentType:"text",displayContent:"SALE {percent_discount}",translate:"displayContent",displayTrigger:[{conditionType:"exact_or_above",from:"1",priority:0,quantityType:"exact_or_above",to:"15",triggerEvent:"inventory_status",type:"in_stock"}],image:{src:"https://cdn.shopify.com/s/files/1/0697/6182/7064/files/gempages_523190969722471488-fc9fecb6-26b8-4836-b417-2dfb9ea43bd5.png?v=1723733677"},positionWithImage:"outside",shape:"horizontal_rectangle"},styles:{align:{desktop:"left"},badgeColorV2:{desktop:"#FF614C"},borderRadius:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"custom"},hasShadow:!1,imageSize:{desktop:{disableShapeLinked:!0,height:"auto",shape:"original",shapeLinked:!0,width:"20%"}},position:{desktop:{bottomGap:"0",leftGap:"0",placement:"top-left",rightGap:"0",topGap:"0"}},shapeShadow:{angle:90,blur:"12px",color:"#121212",distance:"4px",spread:"0px",type:"shadow-1"},textColor:"text-3",textSize:{desktop:{disableShapeLinked:!0,gap:"",height:"Auto",hiddenShape:!0,padding:{bottom:"8px",left:"12px",right:"12px",top:"8px"},shape:"custom",shapeLinked:!1,width:"100%"}},typo:{attrs:{color:"text-3"},custom:{fontSize:{desktop:"15px"}},type:"paragraph-1"},textSizeV2:{desktop:{width:"100%",height:"auto",shapeLinked:!1,disableShapeLinked:!0,hiddenShape:!0,shape:"custom",padding:{top:"12px",bottom:"12px",left:"12px",right:"12px"}}}},tag:"ProductBadge",uid:"gXAaVIfN3P",childrens:[]},{advanced:{d:{desktop:!0,mobile:!0,tablet:!0},editorData:{cssPlaceholder:".{{rootClassName}} {\n\n}\n.{{rootClassName}} > figure > img {\n\n}"},hasBoxShadow:{desktop:{normal:!1}},op:{desktop:"100%"},rounded:{desktop:{normal:{bblr:"0px",bbrr:"0px",btlr:"0px",btrr:"0px",radiusType:"none"}}},"spacing-setting":{desktop:{margin:{}}}},label:"Image",settings:{image:{height:1678,src:"https://cdn.shopify.com/s/files/1/2005/9307/files/image_demo.jpg",width:2237},imageLink:{link:"",target:"_self"},isAdaptive:!0,isNotLazyload:!1,priority:!1,quality:70,srcSet:{desktop:{height:240,src:"https://cdn.shopify.com/s/files/1/0617/5296/7323/files/gempages_516637113702155432-b286a16e-98e6-48ba-889d-a36b64249436.png",storage:"FILE_CONTENT",width:241}}},styles:{align:{desktop:"center"},borderImg:{normal:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!1,width:"1px 1px 1px 1px"}},borderRadius:{radiusType:"none"},boxShadowImg:{normal:{angle:90,blur:"12px",color:"rgba(0, 0, 0, 0.20)",distance:"4px",spread:"0px",type:"shadow-1"}},hasActiveShadow:!1,hasBoxShadowImg:{normal:!1},objectFit:{desktop:"cover"},opacity:{normal:0},opacityColor:{normal:"#242424"},shadow:{angle:40,blur:"12px",color:"rgba(18, 18, 18, 0.77)",distance:"10px",spread:"10px",type:"custom"},shape:{desktop:{shape:"original",shapeLinked:!0}},wrapperBorder:{border:"none",borderType:"none",borderWidth:"1px",color:"#000000",isCustom:!0,position:"all",width:"1px 1px 1px 1px"}},tag:"Image",uid:"gRq0Y_6o_C"},{childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"bundle-title",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{bold:!0,color:"#121212"},type:"subheading-2"}},tag:"Text",uid:"gZCW_UZNgX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[],label:"Text Block",settings:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},globalSize:{desktop:{padding:{type:"custom"},width:"100%"}},htmlTag:"div",text:"<p>Great value</p>",translate:"text"},styles:{align:{desktop:"left"},hasLineClamp:{desktop:!1},lineClamp:{desktop:1,mobile:1,tablet:1},textAlign:{desktop:"center"},typo:{attrs:{color:"#121212"},type:"paragraph-1"}},tag:"Text",uid:"gXozhYepEX"},{advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}}},childrens:[{childrens:[{tag:"ProductPrice",label:"Product Price",settings:{priceType:"compare"},styles:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-2"},lineThrough:!0,thickness:2,lineColor:"text-2",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"}},advanced:{"spacing-setting":{desktop:{margin:{bottom:0}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"}},defaultPresetConfig:{typo:{type:"subheading-2",default:{type:"subheading-2"}},color:{normal:"text-1"},lineThrough:!0,thickness:2,lineColor:"text-1",disableHoverColor:!0,hasTextShadow:{normal:!1},textShadow:{normal:{type:"shadow-1"}},textAlign:{desktop:"left"},"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}},d:{desktop:!0,tablet:!0,mobile:!0},border:{desktop:{normal:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",color:"#121212",isCustom:!0}}},rounded:{desktop:{normal:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},hasBoxShadow:{desktop:{normal:!1}},boxShadow:{desktop:{normal:{}}},op:{desktop:"100%"},animation:{desktop:{enabled:!1,trigger:"appear",triggerConfig:{appear:{animation:"fade",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!0,easing:"ease-out",zoomDirection:"in",scale:{in:[80,100],out:[120,100]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}},hover:{animation:"none",setting:{fade:{delay:"0",speed:1.7,easing:"ease-out"},zoom:{delay:"0",speed:1.7,isFade:!1,easing:"ease-out",zoomDirection:"in",scale:{in:[100,120],out:[100,80]}},slide:{delay:"0",speed:1.7,easing:"ease-out",direction:"left",isCustomDistance:!1},shake:{delay:"0",speed:.7,loop:!1,intensity:11,easing:"linear"}}}}}},priceType:"compare"}}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gU7z9j0jbp"},{childrens:[{childrens:[],label:"Product Price",settings:{priceType:"regular",hasOnlyDefaultVariant:!1},styles:{color:{normal:"#242424"},hasTextShadow:{normal:!1},lineColor:"text-1",lineThrough:!0,textAlign:{desktop:"right"},textShadow:{normal:{type:"shadow-1"}},thickness:1,typo:{type:"subheading-2"}},tag:"ProductPrice",uid:"gP9Tq9YUJq"}],label:"Block",settings:{},tag:"Col",uid:"gEOSPx4VOT"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"center"},inlineAlignment:"start",layout:{desktop:{cols:[6,6],display:"fit"},mobile:{cols:[6,6],display:"fit"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!1,mobile:!1,tablet:!1},preloadBgImage:!1,verticalGutter:{desktop:"8px"},width:{desktop:"100%"}},tag:"Row",uid:"gVq8mfQa7w"}],label:"Block",settings:{},styles:{},tag:"Col",uid:"gM8gt27sCy"}],label:"Row",settings:{blockAlignment:"start",horizontalAlign:{desktop:"space-between"},inlineAlignment:"start",layout:{desktop:{cols:[12],display:"fill"},mobile:{cols:[12],display:"fill"}},verticalAlign:{desktop:"center"}},styles:{background:{desktop:{attachment:"scroll",color:"transparent",image:{height:0,src:"",width:0},position:{x:50,y:50},repeat:"no-repeat",size:"cover",type:"color"}},columnGap:{desktop:"1%"},fullWidth:{desktop:!0,mobile:!0,tablet:!0},preloadBgImage:!1,verticalGutter:{desktop:"16px"},width:{}},tag:"Row"}];export{horizontalTwo};