yt-uikit 0.7.415 → 0.7.416-collection-bundle-fixes.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,9 +65,9 @@ export type BundleConfig = {
65
65
  products: Product[];
66
66
  }[];
67
67
  };
68
- form: {
69
- title: string;
70
- sections: {
68
+ form?: {
69
+ title?: string;
70
+ sections?: {
71
71
  title: string;
72
72
  type: "text" | "image";
73
73
  fields: {
package/dist/esm/index.js CHANGED
@@ -4229,26 +4229,17 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4229
4229
  `,ag=x.div`
4230
4230
  position: relative;
4231
4231
  width: 90%;
4232
- max-height: 55vh;
4232
+ max-height: 57vh;
4233
4233
  max-width: 800px;
4234
4234
  background-color: white;
4235
4235
  border-radius: 8px;
4236
- padding: 12px 10px;
4237
- overflow-y: auto;
4236
+ overflow-y: hidden;
4238
4237
  z-index: 1001;
4239
4238
 
4240
- /* Hide scrollbar (Chrome, Safari) */
4241
- &::-webkit-scrollbar {
4242
- display: none;
4243
- }
4244
-
4245
- /* Hide scrollbar (Firefox) */
4246
- scrollbar-width: none;
4247
- -ms-overflow-style: none;
4248
4239
 
4249
4240
  @media (max-width: 600px) {
4250
- padding: 12px;
4251
- width: 100%;
4241
+ box-sizing: border-box;
4242
+ width: 100% ;
4252
4243
  max-height: 37vh;
4253
4244
  position: absolute;
4254
4245
  left: 0;
@@ -4261,7 +4252,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4261
4252
  display: flex;
4262
4253
  flex-direction: column;
4263
4254
  align-items: center;
4264
- padding: 8px 0px;
4255
+ padding: 10px 7px 0px 7px;
4265
4256
  `,lg=x.input`
4266
4257
  flex-grow: 1;
4267
4258
  padding: 8px 12px;
@@ -4278,10 +4269,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4278
4269
  padding: 6px 10px;
4279
4270
  }
4280
4271
  `,cg=x.button`
4272
+ font-weight: 600;
4273
+ font-size: 12px;
4281
4274
  background: none;
4282
4275
  border: none;
4283
4276
  color: #666;
4284
- font-size: 14px;
4285
4277
  padding: 5.36px 10.7px;
4286
4278
  cursor: pointer;
4287
4279
  `;x.div`
@@ -4310,18 +4302,24 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4310
4302
  margin-left: 4px;
4311
4303
  }
4312
4304
  `;const dg=x.div`
4305
+ max-height: calc(57vh - 80px);
4306
+ overflow-y: auto;
4313
4307
  display: flex;
4314
4308
  flex-direction: column;
4315
4309
  gap: 12px;
4310
+ @media (max-width: 600px) {
4311
+ max-height: calc(37vh - 80px);
4312
+ }
4313
+
4316
4314
  `,sg=x.div`
4317
4315
  display: flex;
4318
4316
  align-items: center;
4319
- padding: 8px;
4317
+ padding: 8px 4px;
4320
4318
  border-radius: 8px;
4321
4319
  cursor: pointer;
4322
4320
  transition: background-color 0.2s ease;
4323
-
4324
- background-color: ${e=>e.isSelected?e.primaryBgColor+"10":"transparent"};
4321
+ margin: 0px 6px;
4322
+ background-color: ${e=>e.isSelected?e.primaryBgColor+"10":"transparent"};
4325
4323
  border: ${e=>e.isSelected?"1px solid "+(e.primaryBgColor+"40"):"1px solid transparent"};
4326
4324
 
4327
4325
  &:hover {
@@ -4366,7 +4364,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4366
4364
  cursor: pointer;
4367
4365
  white-space: nowrap;
4368
4366
  transition: background-color 0.2s ease;
4369
-
4367
+ font-weight: 600;
4370
4368
  &:hover {
4371
4369
  background-color: ${e=>e.primaryBgColor?e.primaryBgColor+"20":"#e75a87cc"};
4372
4370
  cursor: pointer;
@@ -4413,7 +4411,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
4413
4411
  font-size: 11px;
4414
4412
  padding: 4px 8px;
4415
4413
  }
4416
- `,bg=({bundle:e,addToCartFunction:n})=>{const[r,a]=c({}),[d,s]=c(!1),[p,u]=c(0),[m,f]=c(0),[g,h]=c(""),[x,y]=c([]),[b,v]=c({}),[w,C]=c(!1),[E,k]=c(window.innerWidth<450),T=e.builderTiers?.productTier||[],{originalPrice:S,dealPrice:$,offerValue:B}=i((()=>{const t=[];let n=0;Object.values(r).forEach((e=>{e.productId&&e.variantId&&(t.push({productId:e.productId,variantId:e.variantId}),n++)}));let o=0,a=0;for(const{productId:n,variantId:r}of t){const t=e.products.find((e=>e.productId===n));if(!t)continue;const i=t.productDetails.variants.edges.find((e=>e.node.id===r))?.node;if(!i)continue;const l=Number.parseFloat(i.price||"0"),c=Number.parseFloat(i.compareAtPrice||"0");o+=l,a+=c>0?c:l}let i=o;(n===T.length||e?.dealAmount)&&(e?.percentageOff?i=o*(1-e.percentageOff/100):e?.dealAmount?i=e.dealAmount:e?.amountOff&&e.amountOff<o&&(i=o-e.amountOff));const l=a||o,c=l-i;return{originalPrice:l.toFixed(2),dealPrice:i.toFixed(2),offerValue:c.toFixed(2)}}),[e,r,T.length]);l((()=>{u(T.length-Object.keys(r).length)}),[r]),l((()=>{const e={};let t=!1;T.forEach(((n,r)=>{if(n.isFixed&&n.products&&n.products.length>0){const o=n.products[0];if(o&&o.productId){const n=o.variantIds?.[0]||I(o.productId);n&&(e[r]={productId:o.productId,variantId:n},t=!0)}}})),t&&a((t=>({...t,...e})))}),[T]),l((()=>{if(null===m||0===T.length)return;const t=T[m].products.map((e=>e.productId)),n=new Map;e.products.forEach((e=>{t.includes(e.productId)&&!n.has(e.productId)&&n.set(e.productId,e)}));let r=Array.from(n.values());if(""!==g.trim()){const e=g.toLowerCase();r=r.filter((t=>t.productDetails.title.toLowerCase().includes(e)||t.productDetails.selectedVariant?.displayName?.toLowerCase().includes(e)||t.productDetails.collections?.edges?.some((t=>t.node.title.toLowerCase().includes(e)))))}y(r)}),[g,e.products,m,T]);const z=t=>{const n=e.products.find((e=>e.productId===t));return n?.productDetails},I=t=>{const n=e.products.find((e=>e.productId===t));return n&&n.productDetails.variants.edges.length?n.productDetails.variants.edges[0].node.id:""},D=(e,t)=>{if(null==m)return;const n=t||I(e);a((t=>({...t,[m]:{productId:e,variantId:n}}))),s(!1),h("")},_=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})};console.log("version 8 ");const N=t=>{const n=T[t];if(console.log("Opening product selection for tier:",t,n),n.isFixed)return;f(t),s(!0),h("");const r=n.products.map((e=>e.productId)),o=e.products.filter((e=>r.includes(e.productId))),a=new Map;o.forEach((e=>{a.has(e.productId)||a.set(e.productId,e)})),console.log("Filtered products for tier:",Array.from(a.values())),y(Array.from(a.values()))};l((()=>{const e=()=>{k(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const P=e.customizations,O=E,A="bundles"===e.appName?e.pageHeader?.title:e?.title,F="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(jf,{verticalMargin:P.comboBundle.verticalMargin,borderRadius:"20px"},P.comboBundle.embedContentVisibility&&t.createElement(Vf,null,P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"10px",width:"100%",textAlign:P.comboBundle.infoAlignment||"left"}},t.createElement("h2",{style:{fontSize:"28px",color:P.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},A)),P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number($)>1&&t.createElement(t.Fragment,null,t.createElement(Wf,{infoAlignment:P.comboBundle.infoAlignment},t.createElement(Hf,null,Wh(P.general.currencySymbol,e.storeCurrencyCode),Vh($)),Number($)<Number(S)&&t.createElement(Uf,{style:{minWidth:"fit-content"}},Wh(P.general.currencySymbol,e.storeCurrencyCode)," ",Vh(S)),t.createElement(qf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Qf,{style:{textAlign:P.comboBundle.infoAlignment||"left",fontSize:P.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(Gf,{gridSize:T.length,isHorizontal:O},T.map(((e,n)=>{const a=(e=>!!r[e]&&!!r[e].productId)(n),{product:i,variantId:c}=(e=>{const t=r?.[e];return t?{product:z(t.productId),variantId:t.variantId}:{product:void 0,variantId:""}})(n),d=i?((e,t)=>{if(!e||!e.variants.edges)return null;const n=e.variants.edges.find((e=>e.node.id===t));return n?.node})(i,c):null;console.log("Selected Variants",d);const s=e.isFixed,p=o(null);return l((()=>{const e=p.current;if(!e)return;const t=e.querySelector("span");if(!t)return;const n=e.clientWidth,r=t.scrollWidth;if(r<=n)return e.setAttribute("data-overflow","false"),e.style.removeProperty("--scroll-end"),void e.style.removeProperty("--duration");const o=-(r-n);e.style.setProperty("--scroll-end",`${o}px`);const a=2*Math.max(1,Math.abs(o)/40)+3;e.style.setProperty("--duration",`${a}s`),e.setAttribute("data-overflow","true")}),[d?.displayName,d?.title]),console.log(d),a&&i?t.createElement(Yf,{key:`tier-${n}`,onClick:()=>!s&&N(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},!s&&t.createElement(tg,{onClick:e=>{e.stopPropagation(),_(n)}},"×"),t.createElement(Xf,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:P?.general.imageAspectRatio||"1/1"},isHorizontal:O}),t.createElement(Kf,{style:{color:"#1e1e1e",textAlign:"center",...O&&"right"===P.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 10px"},...O&&"center"===P.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:O},t.createElement(eg,{style:{fontSize:"15px",width:"100%",display:"flex",alignItems:"center",fontWeight:"600",textAlign:"center",lineHeight:"normal"},ref:p},t.createElement("span",null,i?.title," - ",d?.title)))):t.createElement(Zf,{key:`tier-${n}`,onClick:()=>!s&&N(n),isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment,style:{cursor:s?"default":"pointer"}},s?t.createElement("div",{style:{textAlign:"center",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t.createElement("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px"}},"Fixed Product"),t.createElement("div",{style:{fontSize:"14px",fontWeight:"600"}},e.title||`Product ${n+1}`)):t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",height:"80%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderTopLeftRadius:"18px",borderTopRightRadius:"18px",flexShrink:0,backgroundColor:"#f8f9fa"}},t.createElement(ng,null,"+")),t.createElement(Jf,{style:{fontSize:"15px",fontWeight:"600",color:P.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},t.createElement("p",{style:{width:"80%",margin:"0",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},e.title?`${e.title}`:`Select Product ${n+1}`))))}))),t.createElement(rg,{hoverProperties:{customizeHoverState:P.general.customizeHoverState,backgroundColor:P.general.ctaHoverBackgroundColor,textColor:P.general.ctaHoverTextColor},borderRadius:P.general.ctaBorderRadius,primaryBgColor:P.general.ctaBackgroundColor,onClick:async()=>{C(!0);try{if(p>0)return console.log("Please select all products"),void C(!1);const t=Object.values(r).map((e=>e.variantId)),o=Object.values(r).map((t=>{const n=e.products.find((e=>e.productId===t.productId));if(!n)return null;const r=n?.productDetails?.variants?.edges?.find((e=>e.node.id===t.variantId))?.node;return r?{variantId:t.variantId,price:Number(r.price)}:null})).filter(Boolean);await n(t.length,t,Number($),o)}catch(e){console.log("Add to cart error:",e)}finally{C(!1)}},textColor:P.general.ctaTextColor,borderColor:P.general.ctaBorderColor},0===p?w?t.createElement(Yo,{color:"white",loading:w,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,P.comboBundle.ctaTitle||"Add Bundle to cart"):`Add ${p} more item(s)`),P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:P.general.primaryColor+"20",textAlign:P.comboBundle.infoAlignment||"left"}},"Description"),t.createElement("div",{style:{fontSize:P.comboBundle.productDescriptionFontSize||"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:P.general.primaryColor+"08",textAlign:P.comboBundle.infoAlignment||"left"},dangerouslySetInnerHTML:{__html:F}})),d&&t.createElement(og,{onClick:()=>s(!1)},t.createElement(ag,{onClick:e=>e.stopPropagation()},t.createElement(ig,null,t.createElement("div",{style:{display:"flex",width:"100%",gap:"2px",alignItems:"center",marginBottom:"8px"}},t.createElement(lg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(cg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement(dg,null,x.length>0?x.map((n=>{const o=n.productDetails,a=(e=>{if(null==m)return!1;const t=r?.[m];return!!t&&t.productId===e})(n.productId);let i=o.variants.edges[0].node.id;return i=a&&null!==m?r?.[m]?.variantId||i:b[n.productId]||(o.variants.edges.length>0?o.variants.edges[0].node.id:""),t.createElement(sg,{className:"mixAndMatch-product-item",primaryBgColor:P.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{D(n.productId,i)}},t.createElement(pg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(ug,{className:"mixAndMatch-vendor-info"},t.createElement(mg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(xg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(yg,{className:"mixAndMatch-variant-button "+(i===e.id?"mixAndMatch-variant-button--selected":""),primaryBgColor:P.general?.primaryColor,disabled:!!a,key:e.id,isSelected:i===e.id,tierHasProductId:!!a,onClick:t=>{var r,o;t.stopPropagation(),r=n.productId,o=e.id,v((e=>({...e,[r]:o})))}},e.title))))),t.createElement(fg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:P.general?.primaryColor||"#1e1e1e",onClick:()=>a?_(m||0):D(n.productId,i)},a?t.createElement(gg,null,"Added"):" + Add"))})):t.createElement(hg,null,'No products found matching "',g,'"')))))},vg=x.div`
4414
+ `,bg=({bundle:e,addToCartFunction:n})=>{const[r,a]=c({}),[d,s]=c(!1),[p,u]=c(0),[m,f]=c(0),[g,h]=c(""),[x,y]=c([]),[b,v]=c({}),[w,C]=c(!1),[E,k]=c(window.innerWidth<450),T=e.builderTiers?.productTier||[],{originalPrice:S,dealPrice:$,offerValue:B}=i((()=>{const t=[];let n=0;Object.values(r).forEach((e=>{e.productId&&e.variantId&&(t.push({productId:e.productId,variantId:e.variantId}),n++)}));let o=0,a=0;for(const{productId:n,variantId:r}of t){const t=e.products.find((e=>e.productId===n));if(!t)continue;const i=t.productDetails.variants.edges.find((e=>e.node.id===r))?.node;if(!i)continue;const l=Number.parseFloat(i.price||"0"),c=Number.parseFloat(i.compareAtPrice||"0");o+=l,a+=c>0?c:l}let i=o;(n===T.length||e?.dealAmount)&&(e?.percentageOff?i=o*(1-e.percentageOff/100):e?.dealAmount?i=e.dealAmount:e?.amountOff&&e.amountOff<o&&(i=o-e.amountOff));const l=a||o,c=l-i;return{originalPrice:l.toFixed(2),dealPrice:i.toFixed(2),offerValue:c.toFixed(2)}}),[e,r,T.length]);l((()=>{u(T.length-Object.keys(r).length)}),[r]),l((()=>{const e={};let t=!1;T.forEach(((n,r)=>{if(n.isFixed&&n.products&&n.products.length>0){const o=n.products[0];if(o&&o.productId){const n=o.variantIds?.[0]||I(o.productId);n&&(e[r]={productId:o.productId,variantId:n},t=!0)}}})),t&&a((t=>({...t,...e})))}),[T]),l((()=>{if(null===m||0===T.length)return;const t=T[m].products.map((e=>e.productId)),n=new Map;e.products.forEach((e=>{t.includes(e.productId)&&!n.has(e.productId)&&n.set(e.productId,e)}));let r=Array.from(n.values());if(""!==g.trim()){const e=g.toLowerCase();r=r.filter((t=>t.productDetails.title.toLowerCase().includes(e)||t.productDetails.selectedVariant?.displayName?.toLowerCase().includes(e)||t.productDetails.collections?.edges?.some((t=>t.node.title.toLowerCase().includes(e)))))}y(r)}),[g,e.products,m,T]);const z=t=>{const n=e.products.find((e=>e.productId===t));return n?.productDetails},I=t=>{const n=e.products.find((e=>e.productId===t));if(!n||!n.productDetails.variants.edges.length)return"";const r=n.productDetails.variants.edges.find((e=>e.node.inventoryQuantity>0))?.node;return r?r.id:n.productDetails.variants.edges[0].node.id},D=(e,t)=>{if(null==m)return;const n=t||I(e);a((t=>({...t,[m]:{productId:e,variantId:n}}))),s(!1),h("")},_=e=>{a((t=>{const n={...t};return delete n[e],n})),v({})};console.log("version 8 ");const N=t=>{const n=T[t];if(console.log("Opening product selection for tier:",t,n),n.isFixed)return;f(t),s(!0),h("");const r=n.products.map((e=>e.productId)),o=e.products.filter((e=>r.includes(e.productId))),a=new Map;o.forEach((e=>{a.has(e.productId)||a.set(e.productId,e)})),console.log("Filtered products for tier:",Array.from(a.values())),y(Array.from(a.values()))};l((()=>{const e=()=>{k(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const P=e.customizations,O=E,A="bundles"===e.appName?e.pageHeader?.title:e?.title,F="bundles"===e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(jf,{verticalMargin:P.comboBundle.verticalMargin,borderRadius:"20px"},P.comboBundle.embedContentVisibility&&t.createElement(Vf,null,P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"10px",width:"100%",textAlign:P.comboBundle.infoAlignment||"left"}},t.createElement("h2",{style:{fontSize:"28px",color:P.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},A)),P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number($)>1&&t.createElement(t.Fragment,null,t.createElement(Wf,{infoAlignment:P.comboBundle.infoAlignment},t.createElement(Hf,null,Wh(P.general.currencySymbol,e.storeCurrencyCode),Vh($)),Number($)<Number(S)&&t.createElement(Uf,{style:{minWidth:"fit-content"}},Wh(P.general.currencySymbol,e.storeCurrencyCode)," ",Vh(S)),t.createElement(qf,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(Qf,{style:{textAlign:P.comboBundle.infoAlignment||"left",fontSize:P.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(Gf,{gridSize:T.length,isHorizontal:O},T.map(((e,n)=>{const a=(e=>!!r[e]&&!!r[e].productId)(n),{product:i,variantId:c}=(e=>{const t=r?.[e];return t?{product:z(t.productId),variantId:t.variantId}:{product:void 0,variantId:""}})(n),d=i?((e,t)=>{if(!e||!e.variants.edges)return null;const n=e.variants.edges.find((e=>e.node.id===t));return n?.node})(i,c):null,s=e.isFixed,p=o(null);return l((()=>{const e=p.current;if(!e)return;const t=e.querySelector("span");if(!t)return;const n=e.clientWidth,r=t.scrollWidth;if(r<=n)return e.setAttribute("data-overflow","false"),e.style.removeProperty("--scroll-end"),void e.style.removeProperty("--duration");const o=-(r-n);e.style.setProperty("--scroll-end",`${o}px`);const a=2*Math.max(1,Math.abs(o)/40)+3;e.style.setProperty("--duration",`${a}s`),e.setAttribute("data-overflow","true")}),[d?.displayName,d?.title]),a&&i?t.createElement(Yf,{key:`tier-${n}`,onClick:()=>!s&&N(n),style:{borderRadius:"20px",cursor:s?"default":"pointer"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},!s&&t.createElement(tg,{onClick:e=>{e.stopPropagation(),_(n)}},"×"),t.createElement(Xf,{src:i?.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:i?.title,style:{aspectRatio:P?.general.imageAspectRatio||"1/1"},isHorizontal:O}),t.createElement(Kf,{style:{color:"#1e1e1e",textAlign:"center",...O&&"right"===P.comboBundle.infoAlignment&&{padding:"0 8px",textAlign:"right",alignItems:"flex-end"},...O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 5px",textAlign:"left",alignItems:"flex-start"},...!O&&"left"===P.comboBundle.infoAlignment&&{padding:"0 10px"},...O&&"center"===P.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 5px"}},isHorizontal:O},t.createElement(eg,{style:{fontSize:"15px",width:"100%",display:"flex",alignItems:"center",fontWeight:"600",textAlign:"center",lineHeight:"normal"},ref:p},t.createElement("span",null,i?.title," - ",d?.title)))):t.createElement(Zf,{key:`tier-${n}`,onClick:()=>!s&&N(n),isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment,style:{cursor:s?"default":"pointer"}},s?t.createElement("div",{style:{textAlign:"center",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t.createElement("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px"}},"Fixed Product"),t.createElement("div",{style:{fontSize:"14px",fontWeight:"600"}},e.title||`Product ${n+1}`)):t.createElement(t.Fragment,null,t.createElement("div",{style:{width:"100%",height:"80%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderTopLeftRadius:"18px",borderTopRightRadius:"18px",flexShrink:0,backgroundColor:"#f8f9fa"}},t.createElement(ng,null,"+")),t.createElement(Jf,{style:{fontSize:"15px",fontWeight:"600",color:P.comboBundle.titleTextColor||"#1e1e1e",lineHeight:"normal",height:"20%",display:"flex",alignItems:"center",justifyContent:"center"},isHorizontal:O,infoAlignment:P.comboBundle.infoAlignment},t.createElement("p",{style:{width:"80%",margin:"0",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},e.title?`${e.title}`:`Select Product ${n+1}`))))}))),t.createElement(rg,{hoverProperties:{customizeHoverState:P.general.customizeHoverState,backgroundColor:P.general.ctaHoverBackgroundColor,textColor:P.general.ctaHoverTextColor},borderRadius:P.general.ctaBorderRadius,primaryBgColor:P.general.ctaBackgroundColor,onClick:async()=>{C(!0);try{if(p>0)return console.log("Please select all products"),void C(!1);const t=Object.values(r).map((e=>e.variantId)),o=Object.values(r).map((t=>{const n=e.products.find((e=>e.productId===t.productId));if(!n)return null;const r=n?.productDetails?.variants?.edges?.find((e=>e.node.id===t.variantId))?.node;return r?{variantId:t.variantId,price:Number(r.price)}:null})).filter(Boolean);await n(t.length,t,Number($),o)}catch(e){console.log("Add to cart error:",e)}finally{C(!1)}},textColor:P.general.ctaTextColor,borderColor:P.general.ctaBorderColor},0===p?w?t.createElement(Yo,{color:"white",loading:w,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,P.comboBundle.ctaTitle||"Add Bundle to cart"):`Add ${p} more item(s)`),P.comboBundle?.embedContentVisibility&&P.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:P.general.primaryColor+"20",textAlign:P.comboBundle.infoAlignment||"left"}},"Description"),t.createElement("div",{style:{fontSize:P.comboBundle.productDescriptionFontSize||"16px",color:P.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:P.general.primaryColor+"08",textAlign:P.comboBundle.infoAlignment||"left"},dangerouslySetInnerHTML:{__html:F}})),d&&t.createElement(og,{onClick:()=>s(!1)},t.createElement(ag,{onClick:e=>e.stopPropagation()},t.createElement(ig,{style:{position:"sticky",top:0,background:"#fff",zIndex:10}},t.createElement("div",{style:{display:"flex",width:"100%",gap:"2px",alignItems:"center",marginBottom:"8px"}},t.createElement(lg,{placeholder:"Search",value:g,onChange:e=>{h(e.target.value)}}),t.createElement(cg,{onClick:()=>s(!1)},"Cancel")),t.createElement("div",{style:{height:"1px",width:"100%",backgroundColor:"#EBEBEB"}})),t.createElement(dg,null,x.length>0?x.map((n=>{const o=n.productDetails,a=(e=>{if(null==m)return!1;const t=r?.[m];return!!t&&t.productId===e})(n.productId),i=I(n.productId);let l=i||"";return l=a&&null!==m?r?.[m]?.variantId||l:b[n.productId]||i,t.createElement(sg,{className:"mixAndMatch-product-item",primaryBgColor:P.general.primaryColor||"#1e1e1e",key:o.id,isSelected:a,onClick:()=>{D(n.productId,l)}},t.createElement(pg,{className:"mixAndMatch-vendor-image",src:o.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:o.title}),t.createElement(ug,{className:"mixAndMatch-vendor-info"},t.createElement(mg,{className:"mixAndMatch-vendor-name"},o.title),t.createElement(xg,{className:"mixAndMatch-variant-options"},o.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(yg,{className:"mixAndMatch-variant-button "+(l===e.id?"mixAndMatch-variant-button--selected":""),primaryBgColor:P.general?.primaryColor,disabled:!!a,key:e.id,isSelected:l===e.id,tierHasProductId:!!a,onClick:t=>{var r,o;t.stopPropagation(),r=n.productId,o=e.id,v((e=>({...e,[r]:o})))}},e.title))))),t.createElement(fg,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:P.general?.primaryColor||"#1e1e1e",onClick:()=>a?_(m||0):D(n.productId,l)},a?t.createElement(gg,null,"Added"):" + Add"))})):t.createElement(hg,null,'No products found matching "',g,'"')))))},vg=x.div`
4417
4415
  border-radius: 8px;
4418
4416
  container-type: inline-size;
4419
4417
  `,wg=x.div`
@@ -5084,4 +5082,4 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
5084
5082
  }
5085
5083
  `,Bh=x.span`
5086
5084
  font-size: 12px;
5087
- `,zh=({productsWithIndices:e,isOpen:n,onClose:r,cta:o,variantOptions:a,onVariantChange:i,handleAddToCart:d,primaryProductId:s,variantId:p})=>{const[u,m]=c((()=>{const t={};return e?.forEach((({product:e,index:n})=>{let r=e?.productDetails?.options?.map((e=>e.values[0]??""));if(e.productId===s&&p){const t=e?.productDetails?.variants?.edges.find((e=>e?.node?.id?.includes(p)))?.node;t&&(r=t.title.split(" / "))}t[n]=r})),t}));l((()=>{if(!s||!p)return;const t=e?.find((({product:e})=>e?.productId===s));if(!t)return;const{product:n,index:r}=t,o=n?.productDetails?.variants?.edges?.find((e=>e.node.id.includes(p)))?.node;if(o){const e=o.title.split(" / ");m((t=>({...t,[r]:e}))),g((e=>({...e,[r]:{node:o}}))),i(r,o.id)}}),[p,s,e,i]);const[f,g]=c({}),h=(t,n,r)=>{const o={...u};o[t][r]=n,m(o);const{product:a}=e?.find((e=>e.index===t))||{product:{productDetails:{variants:{edges:[]}}}};if(!a?.productDetails)return;const l=a?.productDetails?.variants?.edges?.find((e=>e.node.title===o[t].join(" / ")))?.node;l&&(i(t,l.id),g((e=>({...e,[t]:{node:l}}))))};if(!n)return null;const x=t.createElement(fh,{className:"yt-fixedBundle-variant-modal_overlay",onClick:r},t.createElement(gh,{className:"yt-fixedBundle-variant-modal_container",onClick:e=>e.stopPropagation()},t.createElement(hh,{className:"yt-fixedBundle-variant-modal_header",style:{backgroundColor:o.backgroundColor,color:o.textColor}},"Select Options"),e?.map((({product:n,index:r},o)=>t.createElement(t.Fragment,null,t.createElement(yh,{className:"yt-fixedBundle-variant-modal_product-block"},t.createElement(bh,{className:"yt-fixedBundle-variant-modal_thumbnail",src:f[r]?.node?.image?.url||n.productDetails.featuredMedia?.preview?.image?.url,alt:n.productDetails.title}),t.createElement(vh,{className:"yt-fixedBundle-variant-modal_product-info"},t.createElement(wh,{className:"yt-fixedBundle-variant-modal_product-name"},n.productDetails.title,n.productDetails.variants.edges.length>1&&t.createElement(Eh,{className:"yt-fixedBundle-variant-modal_selected-value"},u[r].join(" / "))),n.productDetails.options.map(((e,n)=>{const o=a&&a?.options?.find((t=>t.name===e.name));return e.values.length<=1?t.createElement(t.Fragment,null):o&&"color"===o?.type?t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(Th,{className:"yt-fixedBundle-variant-modal_color-swatch",key:a,color:o.values.find((t=>t.name===e))?.value||e,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},t.createElement("span",null)):t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))):o&&"image"===o?.type?t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o?.values.find((t=>t.name===e))?.value?t.createElement($h,{className:"yt-fixedBundle-variant-modal_image-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)},src:o.values.find((t=>t.name===e))?.value},t.createElement("span",null)):t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))):t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,o)=>t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:o,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))})))),o<e.length-1&&t.createElement(Ch,{className:"yt-fixedBundle-variant-modal_divider"})))),t.createElement(xh,{className:"yt-fixedBundle-variant-modal_confirm-button",style:{backgroundColor:o.backgroundColor,color:o.textColor},onClick:d},"Add bundle to cart")));return v.createPortal(x,document.body)},Ih=({options:e,selectedValue:n,onChange:r,type:a="text"})=>{const[i,d]=c(!1),s=o(null);l((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]);const p=e=>"color"===a?t.createElement(ah,{className:"yt-fixedBundle-variant-dropdown-horizontal_color-swatch",$color:e.value},t.createElement("span",null)):"image"===a?t.createElement(ih,{className:"yt-fixedBundle-variant-dropdown-horizontal_image-swatch",src:e.value||"/placeholder.svg",alt:e.name},t.createElement("span",null)):null;return t.createElement(Kg,{className:"yt-fixedBundle-variant-dropdown-horizontal_container",ref:s},t.createElement(Jg,{className:"yt-fixedBundle-variant-dropdown-horizontal_header",onClick:()=>d(!i)},t.createElement(eh,{className:"yt-fixedBundle-variant-dropdown-horizontal_content"},n&&("color"===a||"image"===a)&&p(n),t.createElement("span",{className:"yt-fixedBundle-variant-dropdown-horizontal_selected-text"},n&&n.name)),t.createElement(th,{className:"yt-fixedBundle-variant-dropdown-horizontal_chevron-icon",$isOpen:i})),i&&t.createElement(nh,{className:"yt-fixedBundle-variant-dropdown-horizontal_list"},e?.map((e=>t.createElement(rh,{className:"yt-fixedBundle-variant-selector_dropdown-item "+(n?.name===e.name?"yt-fixedBundle-variant-selector_dropdown-item--selected":""),key:e.name,$isSelected:n?.name===e.name,onClick:()=>{r(e),d(!1)}},("color"===a||"image"===a)&&p(e),t.createElement(oh,{className:"yt-fixedBundle-variant-dropdown-horizontal_item-text"},e.name))))))},Dh=({product:e,variantOptions:n,selectedVariants:r,onVariantChange:o,variantId:a,primaryProductId:i,variantType:d="dropdown"})=>{const[s,p]=c(r||[]);l((()=>{if(a&&e.variants.edges.some((e=>e.node.id.includes(a)))){const t=e.variants.edges.find((e=>e.node.id.includes(a)))?.node;if(t){const e=t.title.split(" / ");p(e)}}}),[a,e]);const u=e=>{if(!n?.options)return"text";const t=n.options.find((t=>t.name===e));return t?.type||"text"},m=(e,t)=>{if(!n?.options)return e.values.map((e=>({name:e,value:e})));const r=n.options.find((t=>t.name===e.name));return e.values.map((e=>{const t=r?.values?.find((t=>t.name===e));return{name:e,value:t?.value||e}}))},f=(e,t)=>{const n=s[t];if(!n)return null;return m(e).find((e=>e.name===n))||null};return t.createElement(lh,{className:"yt-fixedBundle-variant-selector-horizontal_container"},e.options.map(((n,r)=>t.createElement(ch,{className:"yt-fixedBundle-variant-selector-horizontal_option-row",key:n.name,$isFirst:0===r},n?.values?.length>1&&t.createElement(Ih,{options:m(n),selectedValue:f(n,r),onChange:t=>{console.log(t),((t,n)=>{const r=[...s];r[t]=n.name,p(r);const a=e.variants.edges.find((n=>n.node.title===(e.options?.length>0?r.join(" / "):r[t])))?.node.id;o(a||"")})(r,t)},type:u(n.name)})))))},_h=({product:e,selectedVariantId:n,isChecked:r,canCustomize:o,styles:a,onVariantChange:i,onCheckChange:d,isMobile:s,isHorizontal:p,index:u,variantOptions:m,productsLength:f,handleOpenModal:g,storeCurrencyCode:h,primaryProductId:x,variantId:y})=>{const[b,v]=c(e?.variants?.edges.find((e=>e?.node?.id===n))?.node),[w]=c(e?.options?.map((e=>e?.values?.[0]))||[]),C=e?.id===x;l((()=>{if(y&&e.id===x){const t=e?.variants?.edges?.find((e=>e?.node?.id?.includes(y)))?.node;t&&(v(t),i(t.id))}else{const t=e?.variants?.edges?.find((e=>e?.node?.id===n))?.node;v(t)}}),[e,x,n,y,i]);const E="undefined"!=typeof window&&"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain||"usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain,k=b?.image?.url||e.featuredMedia?.preview?.image?.url;return t.createElement(t.Fragment,null,p?t.createElement("div",{className:""+(e.id===x?"yt-fixedBundle-product-card--horizontal-primary":"yt-fixedBundle-product-card--horizontal-associated"),style:{display:"flex",alignItems:"center",gap:"10px",backgroundColor:a.fixedBundle?.cardBackgroundColor}},o&&t.createElement(uh,{className:"yt-fixedBundle-product-card_checkbox-wrapper--horizontal"},t.createElement(sh,{className:"yt-fixedBundle-product-card_checkbox-hidden",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}-${u}`,defaultChecked:r,onChange:e=>d(e.target.checked),disabled:C}),t.createElement(ph,{className:"yt-fixedBundle-product-card_checkbox-label",htmlFor:`checkbox-${e.id}-${u}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(rt,null))),t.createElement(kg,{className:"yt-fixedBundle-product-card-horizontal_item",style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}80`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`8px 8px 8px -6px ${a.fixedBundle.borderColor}`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}80`}[a.fixedBundle.shadowType]||"none"},canCustomize:o},"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Tg,{className:"yt-fixedBundle-product-card-horizontal_image",src:Hh(k),alt:e.title,style:{borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,aspectRatio:a.general.imageAspectRatio||"1/1",borderTopRightRadius:"0",borderBottomRightRadius:"0"}}),t.createElement(Sg,{className:"yt-fixedBundle-product-card-horizontal_details"},t.createElement($g,{className:"yt-fixedBundle-product-card-horizontal_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Bg,{className:"yt-fixedBundle-product-card-horizontal_price-section"},t.createElement(zg,{className:"yt-fixedBundle-product-card-horizontal_price--new"},Wh(a.general.currencySymbol,h)," ",Vh(b?.price)),a.fixedBundle.compareAtPriceVisibility&&b?.compareAtPrice&&parseFloat(b.compareAtPrice)>parseFloat(b?.price)&&t.createElement(Ig,{className:"yt-fixedBundle-product-card-horizontal_price--old"},Wh(a.general.currencySymbol,h),Vh(b?.compareAtPrice))),t.createElement(Dh,{product:e,variantOptions:m,selectedVariants:w,onVariantChange:e=>{i(e)},variantId:y,primaryProductId:x})))):t.createElement(t.Fragment,null,t.createElement(Rg,{className:""+(e.id===x?"yt-fixedBundle-product-card--vertical-primary":"yt-fixedBundle-product-card--vertical-associated"),productsLength:f,style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}50`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`0 4px 10px -6px ${a.fixedBundle.borderColor}50`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}50`}[a.fixedBundle.shadowType]||"none",...o&&{position:"relative"},...E&&{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",minWidth:"max-content",paddingLeft:"2px"}},borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.fixedBundle?.cardBackgroundColor},o&&t.createElement(mh,{className:"yt-fixedBundle-product-card_checkbox-wrapper--vertical",isImage:E},t.createElement(sh,{className:"yt-fixedBundle-product-card_checkbox-hidden--vertical",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}-${u}`,defaultChecked:r,onChange:e=>d(e.target.checked),disabled:C}),t.createElement(ph,{className:"yt-fixedBundle-product-card_checkbox-label--vertical",htmlFor:`checkbox-${e.id}-${u}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(rt,{size:10}))),"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Lg,{className:"yt-fixedBundle-product-card_image-wrapper--vertical",style:{aspectRatio:a.general.imageAspectRatio,height:"fit-content"}},t.createElement(jg,{className:"yt-fixedBundle-product-card_image--vertical",src:Hh(k),style:{aspectRatio:a.general.imageAspectRatio},alt:e.title}),e.variants.edges.length>1&&t.createElement(Vg,{className:"yt-fixedBundle-product-card_badge-container"},t.createElement(Wg,{className:"yt-fixedBundle-product-card_circle-button"},t.createElement("span",null)),t.createElement(Hg,{className:"yt-fixedBundle-product-card_circle-button-two"},t.createElement("span",null)),t.createElement(Ug,{className:"yt-fixedBundle-product-card_count-badge"},e.variants.edges.length,"+"))),t.createElement(qg,{className:"yt-fixedBundle-product-card-vertical_info"},t.createElement(Qg,{className:"yt-fixedBundle-product-card-vertical_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Yg,{className:"yt-fixedBundle-product-card-vertical_price-line"},t.createElement(Gg,{className:"yt-fixedBundle-product-card-vertical_price--new"},Wh(a.general.currencySymbol,h),Vh(b?.price)),a.fixedBundle.compareAtPriceVisibility&&b?.compareAtPrice&&parseFloat(b.compareAtPrice)>parseFloat(b?.price)&&t.createElement(Ig,{className:"yt-fixedBundle-product-card-vertical_price--old"},Wh(a.general.currencySymbol,h),Vh(b?.compareAtPrice))))),(f<=3||!s)&&u<f-1&&t.createElement(Zg,{className:"yt-fixedBundle-plus-wrapper"}," ",t.createElement(Xg,{className:"yt-fixedBundle-plus-icon"},"+")," ")))},Nh=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[d,s]=c(window.innerWidth<786),[p,u]=c(null),[m,f]=c(!1),g="undefined"!=typeof window?window.location.href:null,h=e?.products?.find((e=>e.productDetails?.handle===g?.split("/").pop()?.split("?")[0])),x=h?.productId,[y,b]=c(Object.fromEntries(e?.products?.map(((e,t)=>[t.toString(),e?.productDetails?.variants?.edges?.find((e=>e?.node?.inventoryQuantity>0))?.node?.id||e.productDetails?.variants?.edges?.[0]?.node?.id])))),v="undefined"!=typeof window&&("usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain||"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain),w=e?.showIndividualProductSelector||!0,[C,E]=c(new Set(e.products.reduce(((e,t,n)=>(v&&t?.productId!==x&&!w||e.push(n),e)),[])));l((()=>{const e=()=>{const e=new URL(window.location.href).searchParams.get("variant");u(e)},t=e=>{const t=history[e];return function(...n){const r=t.apply(this,n);return window.dispatchEvent(new Event(e.toLowerCase())),r}};return history.pushState=t("pushState"),history.replaceState=t("replaceState"),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),e(),()=>{window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}}),[]),l((()=>{p&&x&&b((t=>{const n={...t};return e?.products?.forEach(((e,t)=>{e.productId===x&&(n[t.toString()]=p)})),n}))}),[p,x,e?.products]),l((()=>{const e=()=>{s(window.innerWidth<600)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const k=a(((e,t)=>{b((n=>({...n,[e.toString()]:t})))}),[]),T=(t,n)=>{const r=e.products[n].productId;v&&w&&r===x||E((e=>{const r=new Set(e);return t?r.add(n):r.delete(n),r}))},S=e.disableInventoryTracking||e.products.every((e=>e.productDetails.variants.edges.some((e=>e.node.inventoryQuantity>0)))),$=i((()=>e.products.some(((e,t)=>C.has(t)&&e.productDetails.variants.edges.length>1))),[e.products,C]),{originalPrice:B,dealPrice:z,offerValue:I}=i((()=>{const{price:t,compareAtPrice:n}=e.products.reduce(((e,t,n)=>{if(!C.has(n))return e;const r=y[n.toString()];if(!r)return e;const o=t.productDetails.variants.edges?.find((e=>e.node.id===r))?.node;if(!o)return e;const a=parseFloat(o?.price??"0"),i=parseFloat(o?.compareAtPrice||a.toString());return e.price+=a,e.compareAtPrice+=i,e}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);C.size===e.products.length&&(e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff));const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[e.products,y,C,e.percentageOff,e.dealAmount,e.amountOff]),D=async e=>{e.preventDefault(),e.stopPropagation(),o(!0),f(!1);try{const e=Object.entries(y).map((([e,t])=>{const n=parseInt(e);return isNaN(n)||!C.has(n)?null:t})).filter(Boolean);n&&await n(Number(B),e)}catch(e){console.error("Error adding to cart:",e)}o(!1)},_=i((()=>e.products.map(((e,t)=>({product:e,index:t}))).filter((({index:e})=>C.has(e)))),[e.products,C]);if(!n)return t.createElement(t.Fragment,null);if(e?.customizations.general?.trackInventory&&!S)return t.createElement(t.Fragment,null);const N=e.customizations,P=N.fixedBundle?.cardLayoutStyle||"auto",O="horizontal"===P||"auto"===P&&d,A="bundles"==e.appName?e.pageHeader?.title:e?.title,F="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(vg,{id:"yt-fixedBundle-container",className:"yt-fixedBundle-container",style:{maxWidth:"800px",backgroundColor:N.fixedBundle.sectionBackgroundColor,..."transparent"!==N.fixedBundle.sectionBackgroundColor&&{padding:"20px"}}},A&&t.createElement(wg,{id:"yt-fixedBundle-header",className:"yt-fixedBundle-header",style:{backgroundColor:N.fixedBundle?.titleBackgroundColor||"none",color:N.fixedBundle?.titleTextColor||"black",textAlign:N.fixedBundle.infoAlignment??"center",fontSize:N.fixedBundle?.titleFontSize,..."transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingBlock:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"===N.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},A),F&&t.createElement(Cg,{id:"yt-fixedBundle-subheader",className:"yt-fixedBundle-subheader",style:{color:"#121212",fontSize:N.fixedBundle?.subtitleFontSize,textAlign:N.fixedBundle.infoAlignment??"center",..."left"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"===N.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},F),O?t.createElement(Eg,{id:"yt-fixedBundle-horizontal-container",className:"yt-fixedBundle-horizontal-container"},e?.products?.map(((n,r)=>t.createElement(t.Fragment,{key:`${n.productId}-${r}`},t.createElement(_h,{isChecked:C.has(r),product:n.productDetails,selectedVariantId:y[r.toString()]||"",canCustomize:e?.canCustomizeFixedBundle||!1,styles:N,onVariantChange:e=>k(r,e),onCheckChange:e=>{T(e,r)},isMobile:d,index:r,isHorizontal:O,variantOptions:e.variantOptions,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:x,variantId:p||void 0}))))):t.createElement(Fg,{id:"yt-fixedBundle-vertical-container",className:"yt-fixedBundle-vertical-container"},t.createElement(Mg,{id:"yt-fixedBundle-product-list",className:"yt-fixedBundle-product-list",style:{justifyContent:"left"===N.fixedBundle.infoAlignment?"flex-start":"right"===N.fixedBundle.infoAlignment?"flex-end":"center"}},e?.products?.map(((n,r)=>t.createElement(_h,{key:`${n.productId}-${r}`,isChecked:C.has(r),product:n.productDetails,selectedVariantId:y[r.toString()]||"",canCustomize:e?.canCustomizeFixedBundle||!1,styles:N,onVariantChange:e=>k(r,e),onCheckChange:e=>T(e,r),isMobile:d,index:r,isHorizontal:O,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:x,variantId:p||void 0}))),$&&t.createElement(zh,{productsWithIndices:_,isOpen:m,onClose:()=>f(!1),variantOptions:e.variantOptions,cta:{textColor:N.general.ctaTextColor,backgroundColor:N.general.ctaBackgroundColor},onVariantChange:k,handleAddToCart:D,primaryProductId:x,variantId:p||void 0}))),t.createElement(Dg,{id:"yt-fixedBundle-summary",className:"yt-fixedBundle-summary",style:{alignItems:"left"===N.fixedBundle.infoAlignment?"flex-start":"right"===N.fixedBundle.infoAlignment?"flex-end":"center"}},Number(B)>0&&Number(I)>0&&N.fixedBundle.compareAtPriceVisibility&&t.createElement(_g,{className:"yt-fixedBundle-summary_original-price"},"Original Price:"," ",t.createElement(Pg,{className:"yt-fixedBundle-summary_price"},Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(B))),0!==C.size&&t.createElement(Ng,{className:"yt-fixedBundle-summary_total-price"},"Total Price:"," ",t.createElement(Pg,{className:"yt-fixedBundle-summary_price"},Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(z))," ",Number(I)>0&&t.createElement(Og,{className:"yt-fixedBundle-summary_save-tag"},"Save:"," ",Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(I)))),t.createElement(Ag,{id:"yt-fixedBundle-add-to-cart",className:"yt-fixedBundle-add-to-cart",onClick:e=>{e.preventDefault(),e.stopPropagation(),O||!$?D(e):f(!0)},disabled:C.size<1||r,style:{backgroundColor:N.general?.ctaBackgroundColor||"#121212",color:N.general?.ctaTextColor||"#FFFFFF",border:`1px solid ${N.general?.ctaBackgroundColor||"#121212"}`,boxShadow:N.general.ctaShadowType,paddingTop:N.general?.ctaPadding,paddingBottom:N.general?.ctaPadding,borderRadius:N.general.ctaBorderRadius,width:N.general.ctaWidth||"100%",textAlign:"center"},onMouseOver:e=>{N.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=N.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=N.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{N.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=N.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=N.general?.ctaTextColor||"#FFFFFF")}},r?t.createElement(Yo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,N.fixedBundle?.ctaTitle??"Add Bundle to cart")))},Ph=()=>t.createElement(t.Fragment,null,t.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg); } }"),t.createElement("div",{style:{width:"14px",height:"14px",border:"2px solid #f3f3f3",borderTop:"2px solid #007bff",borderRadius:"50%",animation:"spin 1s linear infinite",display:"block"}})),Oh=({product:e,tierIdx:n,isOpen:r,onClose:o,onAddToBundle:a,canAdd:i,isSelected:d,customizations:s,isMobile:p})=>{const[u,m]=c(0),[f,g]=c(e.variants[0].id.toString()),h=e.variants.find((e=>e.id.toString()===f))||e.variants[0],x=e.images.filter(Boolean);if(l((()=>(r&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow=""})),[r]),!r)return null;const y=t.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.75)",zIndex:9999,display:"flex"},onClick:o},t.createElement("div",{style:{background:"#fff",borderRadius:s?.borderRadius||"12px",maxWidth:1e3,width:"100%",height:"72dvh",margin:"auto",display:"flex",overflow:"hidden",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:o,style:{position:"absolute",top:12,right:12,zIndex:10,background:"#fff",border:"1px solid #ddd",borderRadius:"50%",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(ct,{size:22})),t.createElement("div",{style:{flex:1,position:"relative",margin:"20px 0 20px 20px",borderRadius:s?.borderRadius||"12px"}},x.length>0&&t.createElement("img",{src:h.featured_image?.src||x[u]||e.images[0],alt:e.title,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:s?.borderRadius||"12px"}}),x.length>1&&t.createElement("div",{style:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:8,background:"rgba(0,0,0,0.4)",padding:"6px 12px",borderRadius:20}},x.map(((e,n)=>t.createElement("div",{key:n,onClick:()=>m(n),style:{width:10,height:10,borderRadius:"50%",background:n===u?"#fff":"#fff8",cursor:"pointer",display:"block"}}))))),t.createElement("div",{style:{flex:1,padding:"30px",overflowY:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none"}},t.createElement("h2",{style:{margin:"0 0 12px",fontSize:24,fontWeight:600}},e.title),e.variants.length>1&&t.createElement("div",{style:{position:"relative"}},t.createElement("div",{style:{padding:"8px 0",borderBottom:"1px solid #eee"}},e?.options?.join(" & "),":"," ",t.createElement("strong",null,h.title)),t.createElement("select",{value:f,onChange:e=>g(e.target.value),style:{position:"absolute",inset:0,opacity:0,cursor:"pointer"}},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{style:{fontSize:28,fontWeight:"bold",margin:"10px 0"}},"₹",(h.price/100).toFixed(0),h.compare_at_price&&h.compare_at_price>h.price&&t.createElement("span",{style:{marginLeft:12,fontSize:20,textDecoration:"line-through",color:"#999"}},"₹",(h.compare_at_price/100).toFixed(0))),t.createElement("div",{style:{position:"sticky",bottom:0,background:"white"}},t.createElement("button",{onClick:()=>a(e,n),disabled:!i||!h.available,style:{width:"100%",padding:"12px",fontSize:17,fontWeight:600,border:"none",borderRadius:s?.borderRadius||"8px",background:h.available?d||!i?"#28a745":s?.atcBg||"#007bff":"rgb(204, 204, 204)",color:s?.atcText||"#fff",cursor:i&&h.available?"pointer":"not-allowed"}},d?"Added to Box":h.available?"Add to Box":"Out of Stock")),e.description&&t.createElement("div",{dangerouslySetInnerHTML:{__html:e.description},style:{lineHeight:1.7,color:"#444"}})))),b=t.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.75)",zIndex:9999,display:"flex"},onClick:o},t.createElement("div",{style:{background:"#fff",width:"100%",height:"100dvh",display:"flex",flexDirection:"column",overflow:"hidden",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:o,style:{position:"absolute",top:12,right:12,zIndex:10,background:"#fff",border:"1px solid #ddd",borderRadius:"50%",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(ct,{size:22})),t.createElement("div",{style:{flex:1,overflowY:"auto",paddingBottom:100}},x.length>0&&t.createElement("div",{style:{position:"relative"}},t.createElement("img",{src:h.featured_image?.src||x[u]||e.images[0],alt:e.title,style:{width:"100%",display:"block",maxHeight:"50vh",objectFit:"cover",objectPosition:"center"}}),x.length>1&&t.createElement("div",{style:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:8,background:"rgba(0,0,0,0.4)",padding:"6px 12px",borderRadius:20}},x.map(((e,n)=>t.createElement("div",{key:n,onClick:()=>m(n),style:{width:10,height:10,borderRadius:"50%",background:n===u?"#fff":"#fff8",cursor:"pointer"}}))))),t.createElement("div",{style:{padding:"20px"}},t.createElement("h2",{style:{margin:"0 0 12px",fontSize:22,fontWeight:600}},e.title),e.variants.length>1&&t.createElement("div",{style:{position:"relative",marginBottom:20}},t.createElement("div",{style:{padding:"8px 0",borderBottom:"1px solid #eee"}},"Variant: ",t.createElement("strong",null,h.title)),t.createElement("select",{value:f,onChange:e=>g(e.target.value),style:{position:"absolute",inset:0,opacity:0,cursor:"pointer"}},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{style:{fontSize:28,fontWeight:"bold",margin:"10px 0"}},"₹",(h.price/100).toFixed(0),h.compare_at_price&&h.compare_at_price>h.price&&t.createElement("span",{style:{marginLeft:12,fontSize:20,textDecoration:"line-through",color:"#999"}},"₹",(h.compare_at_price/100).toFixed(0))),e.description&&t.createElement("div",{dangerouslySetInnerHTML:{__html:e.description},style:{lineHeight:1.7,color:"#444"}}))),t.createElement("div",{style:{position:"sticky",bottom:0,background:"#fff",padding:"8px 10px",borderTop:"1px solid #eee",boxShadow:"0 -4px 10px rgba(0,0,0,0.05)"}},t.createElement("button",{onClick:()=>a(e,n),disabled:!i||!h.available,style:{width:"100%",padding:"10px",fontSize:14,fontWeight:600,border:"none",borderRadius:s?.borderRadius||"8px",background:!d&&i&&h.available?s?.atcBg||"#007bff":"#28a745",color:s?.atcText||"#fff",cursor:i&&h.available?"pointer":"not-allowed"}},d?"Added to Box":h.available?"Add to Box":"Out of Stock"))));return v.createPortal(p?b:y,document.body)},Ah=({title:e,uploadState:n,onUpload:r,onRemove:o,onRetry:a})=>{const i="object"==typeof n&&n?.loading,l="object"==typeof n&&n?.error,c="object"==typeof n&&n?.url;return t.createElement("div",{style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",textAlign:"center",background:"#fafafa"}},t.createElement("div",{style:{fontWeight:500,color:"#333",marginBottom:"4px"}},e),i&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",color:"#007bff",fontSize:"13px",margin:"12px 0"}},t.createElement(Ph,null)," Uploading ",n?.name,"...")),l&&t.createElement(t.Fragment,null,t.createElement("div",{style:{color:"#dc3545",fontSize:"13px",margin:"8px 0"}},"Upload failed. Try again."),t.createElement("button",{type:"button",onClick:a,style:{color:"#303030",fontSize:"12px",borderRadius:"10px",border:"1px solid #E3E3E3",fontWeight:550,padding:"8px 16px",background:"white",cursor:"pointer"}},"Retry Upload")),c&&!i&&!l&&t.createElement(t.Fragment,null,t.createElement("div",{style:{margin:"12px 0"}},t.createElement("img",{src:n.url,alt:"Uploaded",style:{maxWidth:"100%",maxHeight:"150px",borderRadius:"6px"}})),t.createElement("div",{style:{fontSize:"12px",color:"#28a745",marginBottom:"8px"}},n.name),t.createElement("button",{type:"button",onClick:o,style:{background:"#dc3545",color:"white",border:"none",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",cursor:"pointer"}},"Remove")),!n&&t.createElement(t.Fragment,null,t.createElement("div",{style:{color:"#888",fontSize:"12px",marginBottom:"12px"}},"jpeg/png (max 5MB)"),t.createElement("button",{type:"button",onClick:r,style:{color:"#303030",fontSize:"12px",borderRadius:"10px",border:"1px solid #E3E3E3",fontWeight:550,padding:"8px 16px",background:"white",cursor:"pointer"}},"Upload")))},Fh=({config:e,bundleAddToCartLoading:n,addCustomBundleToCart:r})=>{const[a,i]=c(1),[d,s]=c([]),[p,u]=c(null),[m,f]=c({}),[g,h]=c(window.innerWidth<640),x=o(new Map),[y,b]=c(!1);l((()=>{const e=document.querySelector(".box-loader-scene");e&&e.setAttribute("style","display: none;");const t=()=>h(window.innerWidth<640);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]);const{customizations:v}=e,w=e.config.builderTiers.collectionTier.sort(((e,t)=>e.tier-t.tier)),C=w.length+1,E=C,k=v.hideSelectedProducts,T=v.allowMultipleQty,S=v.hideOutOfStockProducts,$=d.reduce(((e,t)=>e+t.quantity),0),B=d.reduce(((e,t)=>e+t.price*t.quantity),0)/100,z=d.reduce(((e,t)=>{const n=w.flatMap((e=>e.products)).find((e=>e.id.toString()===t.productId)),r=n?.variants.find((e=>e.id.toString()===t.variantId));return e+(r?.compare_at_price??t.price)*t.quantity}),0)/100,I=(e,t)=>{const n=e.variants.find((e=>e.id===parseInt(t)));if(!n)return;const r=document.querySelector(`[data-product-id="${e.id}"]`);r&&(r.dataset.selectedVariant=t,r.dataset.currentPrice=n.price.toString())},D=(e,t)=>{const n=document.querySelector(`[data-product-id="${e.id}"]`);if(!n)return;const r=n.dataset.selectedVariant||e.variants[0].id.toString(),o=parseInt(n.dataset.currentPrice||e.variants[0].price.toString());s((n=>{const a=`${e.id}-${r}-${t}`,i=n.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===a));if(i)return n.filter((e=>e!==i));const l=P[t],c=_(t);return c!==1/0&&l>=c?n:[...n,{productId:e.id.toString(),variantId:r,price:o,quantity:1,tierIndex:t}]}))},_=e=>{const t=w[e];return t.minimumQuantity>0?t.minimumQuantity:1/0},N=(e,t)=>{const n=_(t);if(n===1/0)return!0;const r=P[t],o=d.some((n=>n.productId===e.id.toString()&&n.tierIndex===t));return!!o||r<n},P=w.map(((e,t)=>d.filter((e=>e.tierIndex===t)).reduce(((e,t)=>e+t.quantity),0))),O=(e,t,n)=>{const r=_(n);if(r===1/0)return!0;return P[n]<r},A=e=>{if(!x.current.has(e)){const t=document.createElement("input");t.type="file",t.accept="image/jpeg,image/png",t.style.display="none",t.onchange=async t=>{const n=t.target.files?.[0];if(n){if(n.size>5242880)return alert("Max 5MB");if(!n.type.match(/^image\/(jpeg|png)$/i))return alert("JPEG/PNG only");f((t=>({...t,[e]:{loading:!0,name:n.name}})));try{const t=await(async e=>{const t=new FormData;t.append("file",e),b(!0);try{const e=window?.Shopify?.shop||"falah-devstore.myshopify.com",n=window?.Shopify?.shop?"https://products.yourtoken.io":"http://localhost:8000",r=await fetch(`${n}/shopify/upload?shop=${e}`,{method:"POST",headers:{"x-yourtoken-app-name":"bundles"},body:t});if(!r.ok)throw new Error("Upload failed");return(await r.json()).url}catch(e){throw b(!1),alert("Upload failed. Try again."),e}finally{b(!1)}})(n);f((r=>({...r,[e]:{url:t,name:n.name}})))}catch{f((t=>({...t,[e]:{error:!0,name:n.name}})))}}},document.body.appendChild(t),x.current.set(e,t)}return x.current.get(e)},F=a<=w.length?w[a-1]:null,M=F?_(a-1):0,R=w.map(((e,t)=>{const n=d.filter((e=>e.tierIndex===t)).reduce(((e,t)=>{const n=`${t.productId}-${t.variantId}`,r=e.find((e=>`${e.productId}-${e.variantId}`===n));return r?r.quantity+=t.quantity:e.push({...t,quantity:t.quantity}),e}),[]);return{tier:e,items:n,count:P[t]}}));return t.createElement("div",{className:"yt-collection-bundle-builder",style:{margin:"20px auto",maxWidth:"1400px"}},t.createElement(Mh,{totalSteps:C,formStepIndex:E,currentStep:a,getStepTitle:e=>e===E?"Customize Gift Details":w[e-1]?.title||`Step ${e}`,isMobile:g,formTitle:e.config.form.title,onStepClick:e=>{if(e>1&&!d.length)return alert("Add at least one product first");i(e),window.scrollTo(0,0)}}),Array.from({length:C},((e,t)=>t+1)).map((n=>{const r=n===E,o=r?[]:(e=>w[e-1]?.products||[])(n),i=S?o.filter((e=>e.available)):o,l=n-1;return t.createElement("div",{key:n,className:"yt-collection-bundle-step-content "+(a===n?"yt-collection-bundle-step-content-active":""),style:{display:a===n?"block":"none",padding:"1.5rem 0",minHeight:"40vh"}},r&&e.config.form?t.createElement("div",{className:"yt-collection-bundle-customize-form",style:{maxWidth:"80%",margin:"0 auto",padding:"1rem",marginBottom:g?"180px":"160px"}},e.config.form.sections.map(((e,n)=>t.createElement("div",{key:`sec_${n}`,className:"yt-collection-bundle-form-group",style:{marginBottom:"32px"}},t.createElement("label",{className:"yt-collection-bundle-label",style:{display:"block",fontWeight:600,marginBottom:"12px",color:"#333",fontSize:"16px"}},e.title),"text"===e.type&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"12px"}},e.fields.map(((e,n)=>{const r=e.title??"Field "+n;return t.createElement("textarea",{key:r,className:"yt-collection-bundle-textarea",placeholder:e.title,rows:3,maxLength:500,onChange:e=>f((t=>({...t,[r]:e.target.value}))),style:{padding:"12px",border:"1px solid #ddd",borderRadius:"6px",fontSize:"14px",resize:"vertical"}})}))),"image"===e.type&&t.createElement("div",{style:{marginBottom:"24px"}},t.createElement("sub",{style:{display:"block",color:"#666",fontSize:"12px",marginBottom:"8px"}},"jpeg/png (max 5MB)"),t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e.fields.map(((e,n)=>{const r=e.title??"Field "+n,o=m[r];return t.createElement(Ah,{key:r,title:e.title,uploadState:o,onUpload:()=>A(r).click(),onRemove:()=>f((e=>{const{[r]:t,...n}=e;return n})),onRetry:()=>A(r).click()})})))))))):t.createElement("div",{className:"yt-collection-bundle-product-grid",style:{display:g?"grid":"flex",gridTemplateColumns:g?"repeat(2,1fr)":"",flexWrap:g?"unset":"wrap",justifyContent:"center",gap:"16px",padding:"16px",marginBottom:g?"180px":"160px"}},i.map((e=>t.createElement(Rh,{key:e.id,product:e,tierIdx:l,customizations:v,isMobile:g,hoveredCard:p,setHoveredCard:u,selectedProducts:d,handleAddToBundle:D,canAddProduct:N,allowMultipleQty:T,handleVariantChange:I,canIncrement:O,setSelectedProducts:s})))))})),t.createElement(Lh,{config:e,selectedProducts:d,selectedByTier:R,totalItems:$,totalPrice:B,totalCompareAtPrice:z,currentStep:a,formStepIndex:E,currentTierMax:M,tierSelectedCounts:P,isMobile:g,bundleAddToCartLoading:n,isUploading:y,hoveredCard:p,setHoveredCard:u,hideSelectedProducts:k,getProductStep:e=>{for(let t=0;t<w.length;t++)if(w[t].products.some((t=>t.id.toString()===e)))return t+1;return E},setCurrentStep:i,handleRemoveItem:(e,t,n)=>{s((r=>r.filter((r=>!(r.productId===e&&r.variantId===t&&r.tierIndex===n)))))},handleCheckout:async()=>{if(a!==E||!d.length)return;const e={};Object.entries(m).forEach((([t,n])=>{const r=t.split("|").pop()?.replace(/^f_\d+$/,"")||t;"string"==typeof n&&n.trim()?e[r]=n:n&&"object"==typeof n&&"url"in n&&(e[r]=n.url)}));const t=d.map((t=>({variantId:t.variantId,quantity:t.quantity,properties:e})));r(t)}}))},Mh=({totalSteps:e,formStepIndex:n,currentStep:r,getStepTitle:o,isMobile:a,formTitle:i,onStepClick:l})=>t.createElement("div",{className:"yt-collection-bundle-steps-nav-container",style:{display:"flex",justifyContent:"center",flexDirection:"column",gap:a?"0":"1rem",overflowX:"auto",scrollbarWidth:"none",borderBottom:"1px solid #878787",marginInline:a?"0":"2%",paddingBottom:"1rem",textAlign:"center"}},t.createElement("div",{className:"yt-collection-bundle-steps-nav",style:{display:"flex",justifyContent:"center",gap:a?"0":"2rem",overflowX:"auto",scrollbarWidth:"none"}},Array.from({length:e},((e,t)=>t+1)).map((e=>t.createElement("div",{key:e,className:"yt-collection-bundle-step-item "+(r===e?"yt-collection-bundle-step-item-active":""),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem",minWidth:"120px",cursor:"pointer",opacity:r===e?1:.5,transition:"opacity 0.2s"},onClick:()=>l(e)},t.createElement("div",{className:"yt-collection-bundle-step-icon "+(r===e?"yt-collection-bundle-step-icon-active":""),style:{width:"40px",height:"40px",background:r===e?"#000":"#fff",border:"2px solid #ccc",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"}},e===n?t.createElement("svg",{viewBox:"0 0 24 24",style:{width:"20px",height:"20px",fill:r===e?"#fff":"#999"}},t.createElement("path",{d:"M20 6h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.67C10.96 2.54 10.05 2 9 2c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1h-2c-.55 0-1-.45-1-1s.45-1 1-1h2zm-6 0c.55 0 1 .45 1 1s-.45 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2zM20 19H4V8h16v11z"})):t.createElement("svg",{viewBox:"0 0 24 24",style:{width:"20px",height:"20px",fill:r===e?"#fff":"#999"}},t.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))),t.createElement("div",{className:"yt-collection-bundle-step-label",style:{fontSize:"14px",textAlign:"center",color:"#333",fontWeight:"600"}},o(e)))))),i&&t.createElement("p",{className:"yt-collection-bundle-steps-nav-description",style:{fontSize:a?"14px":"16px",marginBottom:a?"0":"14px",fontWeight:"400",color:"#000"}},i)),Rh=({product:e,tierIdx:n,customizations:r,isMobile:o,hoveredCard:a,setHoveredCard:i,selectedProducts:l,handleAddToBundle:d,canAddProduct:s,allowMultipleQty:p,handleVariantChange:u,canIncrement:m,setSelectedProducts:f})=>{const[g,h]=c(!1),x=document.querySelector(`[data-product-id="${e.id}"]`),y=x?.dataset.selectedVariant||e.variants[0].id.toString(),b=e.variants.find((e=>e.id.toString()===y))||e.variants[0],v=l.some((t=>t.productId===e.id.toString()&&t.variantId===y&&t.tierIndex===n)),w=a===e.id,C=l.filter((t=>t.productId===e.id.toString()&&t.variantId===b.id.toString()&&t.tierIndex===n)).reduce(((e,t)=>e+t.quantity),0);return t.createElement(t.Fragment,null,t.createElement("div",{key:e.id,className:"yt-collection-bundle-product-item","data-product-id":e.id,"data-selected-variant":b.id,"data-current-price":b.price,style:{display:"flex",flexDirection:"column",border:r?.productCardBorder||"1px solid #ddd",background:r?.productCardBg||"#fff",overflow:"hidden",transition:"all 0.2s ease",minWidth:o?0:"250px",maxWidth:o?"none":"250px",borderRadius:r?.borderRadius||"8px",boxShadow:"spread"===r?.productCardShadow?"8px 8px 8px -6px #0000004D":"no-spread"===r?.productCardShadow?"6px 6px 0px -1px #00000033":"none",width:o?"100%":""}},t.createElement("div",{className:"yt-collection-bundle-product-image",style:{position:"relative",width:"100%",aspectRatio:r?.productImageRatio||"1/1",overflow:"hidden",cursor:"pointer",background:"#f9f9f9"},onClick:()=>h(!0),onMouseEnter:()=>i(e.id),onMouseLeave:()=>i(null)},t.createElement("img",{src:e.images[0]||"https://cdn.shopify.com/s/files/1/0750/9937/3789/files/placeholder-thumbnail.png?width=250px",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",transition:"opacity 0.3s ease, transform 0.3s ease",opacity:w?0:1,transform:w?"scale(1.05)":"scale(1)"},alt:e.title}),t.createElement("img",{src:e.images[1]||e.images[0],style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",transition:"opacity 0.3s ease, transform 0.3s ease",opacity:w?1:0,transform:"scale(1.05)"},alt:e.title}),e.variants.length>1&&t.createElement("select",{style:{position:"absolute",bottom:"10px",left:"10px",right:"10px",background:"rgba(255,255,255,0.9)",border:"none",borderRadius:"4px",padding:"10px",fontSize:"12px",zIndex:2},onChange:t=>u(e,t.target.value),defaultValue:b.id},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{className:"yt-collection-bundle-product-info",style:{padding:"12px",flexGrow:1,display:"flex",flexDirection:"column"}},t.createElement("h3",{className:"yt-collection-bundle-product-title",style:{fontSize:o?"12px":"14px",fontWeight:600,margin:"0 0 4px",lineHeight:1.3,color:"#333",flexGrow:1}},e.title),t.createElement("div",{className:"yt-collection-bundle-product-prices",style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"nowrap",whiteSpace:"nowrap",overflow:"hidden"}},t.createElement("span",{className:"yt-collection-bundle-product-price",style:{fontSize:o?"14px":"16px",fontWeight:"bold",color:"#000",flexShrink:0}},"₹",(b.price/100).toFixed(0)),b.compare_at_price&&b.compare_at_price>b.price&&t.createElement("span",{className:"yt-collection-bundle-product-compare",style:{fontSize:"14px",textDecoration:"line-through",color:"#999",flexShrink:0}},"₹",(b.compare_at_price/100).toFixed(0)))),p&&C>0?t.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"nowrap",background:"#cccccc"}},t.createElement("button",{style:{width:"40%",height:b.available?"fit-content":"36px",border:"1px solid #ddd",background:"#fff",fontWeight:"bold",cursor:"pointer",padding:o?"6px":"12px",fontSize:o?"12px":"14px"},onClick:()=>{f((t=>{const r=`${e.id}-${b.id}-${n}`,o=t.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===r));return o&&o.quantity>1?t.map((e=>e===o?{...e,quantity:e.quantity-1}:e)):o?t.filter((e=>e!==o)):t}))}},"-"),t.createElement("span",{style:{minWidth:"24px",textAlign:"center",fontWeight:600,width:"100%"}},C),t.createElement("button",{style:{width:"40%",height:b.available?"fit-content":"36px",border:"1px solid #ddd",background:"#fff",fontWeight:"bold",cursor:"pointer",padding:o?"6px":"12px",fontSize:o?"12px":"14px"},onClick:()=>{b.available&&m(e,b.id.toString(),n)&&f((t=>{const r=`${e.id}-${b.id}-${n}`,o=t.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===r));return o?t.map((e=>e===o?{...e,quantity:e.quantity+1}:e)):[...t,{productId:e.id.toString(),variantId:b.id.toString(),price:b.price,quantity:1,tierIndex:n}]}))},disabled:!b.available||!m(e,b.id.toString(),n)},"+")):t.createElement("button",{className:"yt-collection-bundle-add-btn "+(v?"yt-collection-bundle-add-btn-added":""),style:{background:v?"#28a745":s(e,n)&&b.available?r?.atcBg||"#007bff":"#ccc",color:r?.atcText||"#fff",border:"none",padding:o?"6px":"12px",fontSize:o?"12px":"14px",fontWeight:600,cursor:"pointer",transition:"all 0.2s",opacity:b.available?1:.6},onClick:()=>{b.available&&s(e,n)&&d(e,n)},disabled:!b.available||!s(e,n)},v?"Added":b.available?"ADD TO BOX":"Out of Stock")),g&&t.createElement(Oh,{product:e,tierIdx:n,isOpen:g,onClose:()=>h(!1),onAddToBundle:(e,t)=>{d(e,t),h(!1)},canAdd:s(e,n),isSelected:v,customizations:r,isMobile:o}))},Lh=e=>{const{config:n,selectedProducts:r,selectedByTier:a,totalItems:i,totalPrice:d,totalCompareAtPrice:s,currentStep:p,formStepIndex:u,currentTierMax:m,tierSelectedCounts:f,isMobile:g,bundleAddToCartLoading:h,isUploading:x,hoveredCard:y,setHoveredCard:b,getProductStep:v,setCurrentStep:w,handleRemoveItem:C,handleCheckout:E}=e,{customizations:k}=n,[T,S]=c(!0),[$,B]=c(!1),z=o(null);return l((()=>(m!==1/0&&f[p-1]===m-2&&m>1&&!$&&(B(!0),z.current=setTimeout((()=>{B(!1),z.current=null}),3e3)),()=>{z.current&&clearTimeout(z.current)})),[m,f,p]),t.createElement("div",{className:"yt-collection-bundle-bar",style:{background:k?.bundleBg||"#fff",color:k?.bundleText||"#333",border:k?.bundleBorder||"1px solid #878787",display:"flex",flexDirection:"column",position:"fixed",bottom:"10px",left:"50%",transform:"translateX(-50%)",width:"600px",maxWidth:"95%",zIndex:899,boxShadow:"0 -2px 10px rgba(0,0,0,0.1)",transition:"bottom 0.3s ease",borderRadius:k?.borderRadius||"8px"}},t.createElement("div",{style:{position:"relative",textAlign:"center"}},r.length>0&&t.createElement("button",{onClick:()=>S((e=>!e)),style:{background:"#87878766",border:"none",cursor:"pointer",fontSize:"16px",padding:"4px 12px",color:"#555555",borderRadius:"0 0 28px 28px"}},T?t.createElement(gn,null):t.createElement(at,null)),$&&t.createElement(t.Fragment,null,t.createElement("style",null,"\n @keyframes fadeIn {\n from { opacity: 0; transform: translateX(-50%) translateY(10px); }\n to { opacity: 1; transform: translateX(-50%) translateY(0); }\n }\n "),t.createElement("div",{className:"yt-collection-bundle-ctx",style:{position:"absolute",top:"-40px",left:"50%",transform:"translateX(-50%)",background:k?.atcBg||"#007bff",color:k?.atcText||"#fff",padding:"4px 8px",borderRadius:k?.borderRadius||"8px",fontSize:"14px",whiteSpace:"nowrap",zIndex:10,boxShadow:"0 4px 12px rgba(0,0,0,0.2)",animation:"fadeIn 0.3s ease-out",minWidth:"300px",textAlign:"center",border:"1px solid rgba(0,0,0,0.1)"}},"Add up to"," ",t.createElement("span",{style:{fontWeight:600}},m," item",m>1?"s":"")))),T&&r.length>0&&t.createElement("div",{className:"yt-collection-bundle-bar-top",style:{display:"flex",alignItems:"center",padding:"8px 8px 0",position:"relative",borderRadius:k?.borderRadius||"8px"}},t.createElement("div",{className:"yt-collection-bundle-images",style:{display:"flex",flex:1,gap:"5px",justifyContent:"center",alignItems:"center",overflowX:"auto",padding:"4px 0",scrollbarWidth:"none"}},a.filter((({count:e})=>e>0)).map((({items:e},r,o)=>t.createElement(t.Fragment,{key:r},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",minWidth:"fit-content"}},t.createElement("div",{style:{display:"flex",gap:"4px"}},e.map(((e,o)=>{const a=n.config.builderTiers.collectionTier.flatMap((e=>e.products)).find((t=>t.id.toString()===e.productId));if(!a)return null;const i=v(e.productId),l=p===i;return t.createElement("div",{key:o,className:"yt-collection-bundle-img-wrapper",style:{position:"relative",flexShrink:0,height:"65px"}},t.createElement("div",{style:{position:"relative",width:"65px",height:"65px",borderRadius:`calc(${k?.borderRadius||"8px"} / 2)`,overflow:"hidden",cursor:l?"default":"pointer",transition:"transform 0.2s ease"},onMouseEnter:e=>!l&&(e.currentTarget.style.transform="scale(1.08)"),onMouseLeave:e=>e.currentTarget.style.transform="scale(1)",onClick:()=>!l&&w(i)},t.createElement("img",{src:a.images[0],style:{width:"65px",height:"65px",objectFit:"cover",borderRadius:`calc(${k?.borderRadius||"8px"} / 2)`,transition:"opacity 0.2s",pointerEvents:"none"},alt:"Selected"}),e.quantity>1&&t.createElement("div",{style:{position:"absolute",bottom:"4px",right:"4px",background:"rgba(0,0,0,0.7)",color:"#fff",borderRadius:"10px",padding:"2px 6px",fontSize:"10px",fontWeight:600}},"x",e.quantity),t.createElement("button",{style:{position:"absolute",top:"4px",right:"4px",width:"20px",height:"20px",background:"rgba(220,53,69,0.95)",color:"white",border:"none",borderRadius:"50%",fontSize:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"},onClick:t=>{t.stopPropagation(),C(e.productId,e.variantId,r)}},"×")))})))),r<o.length-1&&o[r+1].count>0&&t.createElement("div",{style:{color:"#666",paddingInline:"6px"}},t.createElement(lt,null))))))),g?t.createElement("div",{style:{display:"flex",flexDirection:"column",padding:"4px",gap:"10px"}},t.createElement("div",{style:{flex:1,textAlign:"center",display:"flex",flexDirection:"row",justifyContent:r.length>0?"space-between":"center",paddingInline:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d"}},i," items Selected"),i>0&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d",fontWeight:600}},"₹",d.toLocaleString()),t.createElement("div",{style:{fontSize:"14px",color:"#6c757dc9",fontWeight:500,textDecoration:"line-through"}},"₹",s.toLocaleString()))),t.createElement("div",{style:{display:"flex",flexWrap:"nowrap",gap:"4px"}},t.createElement("button",{className:"yt-collection-bundle-back-btn",style:{background:"#000",color:"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"100%",transition:"background 0.2s",borderRadius:k?.borderRadius||"8px"},onClick:()=>w((e=>Math.max(1,e-1))),onMouseEnter:()=>b(-1),onMouseLeave:()=>b(null),disabled:1===p},"Back"),t.createElement("button",{className:"yt-collection-bundle-next-btn "+(p===u&&0===i||x?"yt-collection-bundle-next-btn-disabled":""),style:{background:k?.btnPrimaryBg||"#28a745",color:k?.btnPrimaryText||"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"100%",transition:"background 0.2s",opacity:p===u&&0===i||x?.6:1,borderRadius:k?.borderRadius||"8px"},onClick:p===u?E:()=>w(p+1),disabled:p===u&&0===i||h||x},h?t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"center"}},t.createElement(Ph,null)):p===u?"Checkout":"Next"))):t.createElement("div",{className:"yt-collection-bundle-bar-bottom",style:{display:"flex",alignItems:"center",padding:"0px",background:"#dbdbdb",margin:"8px",borderRadius:k?.borderRadius||"8px",overflow:"hidden",scrollbarWidth:"none"}},t.createElement("button",{className:"yt-collection-bundle-back-btn",style:{background:"#000",color:"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"138px",transition:"all 0.2s",...-1===y&&{filter:"brightness(60%)"}},onClick:()=>w((e=>Math.max(1,e-1))),onMouseEnter:()=>b(-1),onMouseLeave:()=>b(null),disabled:1===p},"Back"),t.createElement("div",{style:{flex:1,textAlign:"center",display:"flex",flexDirection:"row",justifyContent:r.length>0?"space-between":"center",paddingInline:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d"}},i," items Selected"),i>0&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d",fontWeight:600}},"₹",d.toLocaleString()),t.createElement("div",{style:{fontSize:"14px",color:"#6c757dc9",fontWeight:500,textDecoration:"line-through"}},"₹",s.toLocaleString()))),t.createElement("button",{className:"yt-collection-bundle-next-btn "+(p===u&&0===i||x?"yt-collection-bundle-next-btn-disabled":""),style:{background:k?.btnPrimaryBg||"#28a745",color:k?.btnPrimaryText||"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"138px",transition:"all 0.2s",opacity:p===u&&0===i||x?.6:1,...-2===y&&{filter:"brightness(90%)"}},onClick:p===u?E:()=>w(p+1),disabled:p===u&&0===i||h||x,onMouseEnter:()=>b(-2),onMouseLeave:()=>b(null)},h?t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"center"}},t.createElement(Ph,null)):p===u?"Checkout":"Next")))},jh=window?.Shopify?.currency||{rate:1,active:"INR"},Vh=e=>{if(!e)return;const t=navigator.language||"en-US",n=Number((Number(e)*jh.rate).toFixed(2));return new Intl.NumberFormat(t).format(n)},Wh=(e,t)=>t==jh.active?e:sn(jh.active)||jh.active,Hh=e=>{if(!e)return e;try{const t=new URL(e),n=t.searchParams;return n.has("format")||n.set("format","webp"),n.has("quality")||n.set("quality","70"),n.has("width")||n.set("width","600"),t.toString()}catch{const t=e.includes("?")?"&":"?";return e+t+"format=webp&quality=70&width=600"}},Uh=(e,t,n,r,o)=>{const a=r.findIndex((t=>t.variantId===e));o(0===n?e=>e.filter(((e,t)=>t!==a)):-1===a?r=>[...r,{product:t,variantId:e,quantity:n}]:e=>e.map(((e,t)=>t===a?{...e,quantity:e.quantity+n}:e)))},qh=({bundle:e,currentProductId:n,addToCartFunction:r,addCustomBundleToCart:o,selectedItems:a,setSelectedItems:i,bundleAddToCartLoading:l,handleRemoveItem:c,selectedItemsQuantity:d,renderingOnPage:s,bundleSubtotal:p})=>"fixed"!==e.type&&e.type&&0!==e?.type?.length?"builder"===e.type?t.createElement(lf,{bundleAddToCartLoading:l,bundle:e,selectedItems:a,setSelectedItems:i,handleAddToCart:o,handleRemoveItem:c,renderingOnPage:s,selectedItemsQuantity:d??0,bundleSubtotal:p??{price:0,compareAtPrice:0}}):"combo"===e.type?t.createElement(df,{bundle:e,addToCartFunction:r}):"mixAndMatch"===e.type?t.createElement(bg,{bundle:e,addToCartFunction:r}):"collection"===e.type?t.createElement(Fh,{config:e,addCustomBundleToCart:o,bundleAddToCartLoading:l}):t.createElement(Lf,{bundle:e,currentProductId:n,addToCartFunction:r}):t.createElement(Nh,{addToCartFunction:r,bundle:e});L(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Qh=()=>t.createElement("div",{className:"scene"},t.createElement("div",{className:"floating"},t.createElement("div",{className:"cube"},t.createElement("div",{className:"side front"},"‎"),t.createElement("div",{className:"side back"},"‎"),t.createElement("div",{className:"side left"},"‎"),t.createElement("div",{className:"side right"},"‎"),t.createElement("div",{className:"side bottom"},"‎"),t.createElement("div",{className:"lid"},t.createElement("div",{className:"flap north"},"‎"),t.createElement("div",{className:"flap south"},"‎"),t.createElement("div",{className:"flap east"},"‎"),t.createElement("div",{className:"flap west"},"‎")))));export{qh as Bundle,Qh as BundleLoader,uu as Cart,la as CouponFrame,qe as Nudge,Je as SpinnerWheel};
5085
+ `,zh=({productsWithIndices:e,isOpen:n,onClose:r,cta:o,variantOptions:a,onVariantChange:i,handleAddToCart:d,primaryProductId:s,variantId:p})=>{const[u,m]=c((()=>{const t={};return e?.forEach((({product:e,index:n})=>{let r=e?.productDetails?.options?.map((e=>e.values[0]??""));if(e.productId===s&&p){const t=e?.productDetails?.variants?.edges.find((e=>e?.node?.id?.includes(p)))?.node;t&&(r=t.title.split(" / "))}t[n]=r})),t}));l((()=>{if(!s||!p)return;const t=e?.find((({product:e})=>e?.productId===s));if(!t)return;const{product:n,index:r}=t,o=n?.productDetails?.variants?.edges?.find((e=>e.node.id.includes(p)))?.node;if(o){const e=o.title.split(" / ");m((t=>({...t,[r]:e}))),g((e=>({...e,[r]:{node:o}}))),i(r,o.id)}}),[p,s,e,i]);const[f,g]=c({}),h=(t,n,r)=>{const o={...u};o[t][r]=n,m(o);const{product:a}=e?.find((e=>e.index===t))||{product:{productDetails:{variants:{edges:[]}}}};if(!a?.productDetails)return;const l=a?.productDetails?.variants?.edges?.find((e=>e.node.title===o[t].join(" / ")))?.node;l&&(i(t,l.id),g((e=>({...e,[t]:{node:l}}))))};if(!n)return null;const x=t.createElement(fh,{className:"yt-fixedBundle-variant-modal_overlay",onClick:r},t.createElement(gh,{className:"yt-fixedBundle-variant-modal_container",onClick:e=>e.stopPropagation()},t.createElement(hh,{className:"yt-fixedBundle-variant-modal_header",style:{backgroundColor:o.backgroundColor,color:o.textColor}},"Select Options"),e?.map((({product:n,index:r},o)=>t.createElement(t.Fragment,null,t.createElement(yh,{className:"yt-fixedBundle-variant-modal_product-block"},t.createElement(bh,{className:"yt-fixedBundle-variant-modal_thumbnail",src:f[r]?.node?.image?.url||n.productDetails.featuredMedia?.preview?.image?.url,alt:n.productDetails.title}),t.createElement(vh,{className:"yt-fixedBundle-variant-modal_product-info"},t.createElement(wh,{className:"yt-fixedBundle-variant-modal_product-name"},n.productDetails.title,n.productDetails.variants.edges.length>1&&t.createElement(Eh,{className:"yt-fixedBundle-variant-modal_selected-value"},u[r].join(" / "))),n.productDetails.options.map(((e,n)=>{const o=a&&a?.options?.find((t=>t.name===e.name));return e.values.length<=1?t.createElement(t.Fragment,null):o&&"color"===o?.type?t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(Th,{className:"yt-fixedBundle-variant-modal_color-swatch",key:a,color:o.values.find((t=>t.name===e))?.value||e,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},t.createElement("span",null)):t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))):o&&"image"===o?.type?t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o?.values.find((t=>t.name===e))?.value?t.createElement($h,{className:"yt-fixedBundle-variant-modal_image-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)},src:o.values.find((t=>t.name===e))?.value},t.createElement("span",null)):t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))):t.createElement(kh,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Bh,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," :"," "),e.values.map(((e,o)=>t.createElement(Sh,{className:"yt-fixedBundle-variant-modal_text-swatch",key:o,selected:u[r][n]==e,onClick:()=>{h(r,e,n)}},e))))})))),o<e.length-1&&t.createElement(Ch,{className:"yt-fixedBundle-variant-modal_divider"})))),t.createElement(xh,{className:"yt-fixedBundle-variant-modal_confirm-button",style:{backgroundColor:o.backgroundColor,color:o.textColor},onClick:d},"Add bundle to cart")));return v.createPortal(x,document.body)},Ih=({options:e,selectedValue:n,onChange:r,type:a="text"})=>{const[i,d]=c(!1),s=o(null);l((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]);const p=e=>"color"===a?t.createElement(ah,{className:"yt-fixedBundle-variant-dropdown-horizontal_color-swatch",$color:e.value},t.createElement("span",null)):"image"===a?t.createElement(ih,{className:"yt-fixedBundle-variant-dropdown-horizontal_image-swatch",src:e.value||"/placeholder.svg",alt:e.name},t.createElement("span",null)):null;return t.createElement(Kg,{className:"yt-fixedBundle-variant-dropdown-horizontal_container",ref:s},t.createElement(Jg,{className:"yt-fixedBundle-variant-dropdown-horizontal_header",onClick:()=>d(!i)},t.createElement(eh,{className:"yt-fixedBundle-variant-dropdown-horizontal_content"},n&&("color"===a||"image"===a)&&p(n),t.createElement("span",{className:"yt-fixedBundle-variant-dropdown-horizontal_selected-text"},n&&n.name)),t.createElement(th,{className:"yt-fixedBundle-variant-dropdown-horizontal_chevron-icon",$isOpen:i})),i&&t.createElement(nh,{className:"yt-fixedBundle-variant-dropdown-horizontal_list"},e?.map((e=>t.createElement(rh,{className:"yt-fixedBundle-variant-selector_dropdown-item "+(n?.name===e.name?"yt-fixedBundle-variant-selector_dropdown-item--selected":""),key:e.name,$isSelected:n?.name===e.name,onClick:()=>{r(e),d(!1)}},("color"===a||"image"===a)&&p(e),t.createElement(oh,{className:"yt-fixedBundle-variant-dropdown-horizontal_item-text"},e.name))))))},Dh=({product:e,variantOptions:n,selectedVariants:r,onVariantChange:o,variantId:a,primaryProductId:i,variantType:d="dropdown"})=>{const[s,p]=c(r||[]);l((()=>{if(a&&e.variants.edges.some((e=>e.node.id.includes(a)))){const t=e.variants.edges.find((e=>e.node.id.includes(a)))?.node;if(t){const e=t.title.split(" / ");p(e)}}}),[a,e]);const u=e=>{if(!n?.options)return"text";const t=n.options.find((t=>t.name===e));return t?.type||"text"},m=(e,t)=>{if(!n?.options)return e.values.map((e=>({name:e,value:e})));const r=n.options.find((t=>t.name===e.name));return e.values.map((e=>{const t=r?.values?.find((t=>t.name===e));return{name:e,value:t?.value||e}}))},f=(e,t)=>{const n=s[t];if(!n)return null;return m(e).find((e=>e.name===n))||null};return t.createElement(lh,{className:"yt-fixedBundle-variant-selector-horizontal_container"},e.options.map(((n,r)=>t.createElement(ch,{className:"yt-fixedBundle-variant-selector-horizontal_option-row",key:n.name,$isFirst:0===r},n?.values?.length>1&&t.createElement(Ih,{options:m(n),selectedValue:f(n,r),onChange:t=>{console.log(t),((t,n)=>{const r=[...s];r[t]=n.name,p(r);const a=e.variants.edges.find((n=>n.node.title===(e.options?.length>0?r.join(" / "):r[t])))?.node.id;o(a||"")})(r,t)},type:u(n.name)})))))},_h=({product:e,selectedVariantId:n,isChecked:r,canCustomize:o,styles:a,onVariantChange:i,onCheckChange:d,isMobile:s,isHorizontal:p,index:u,variantOptions:m,productsLength:f,handleOpenModal:g,storeCurrencyCode:h,primaryProductId:x,variantId:y})=>{const[b,v]=c(e?.variants?.edges.find((e=>e?.node?.id===n))?.node),[w]=c(e?.options?.map((e=>e?.values?.[0]))||[]),C=e?.id===x;l((()=>{if(y&&e.id===x){const t=e?.variants?.edges?.find((e=>e?.node?.id?.includes(y)))?.node;t&&(v(t),i(t.id))}else{const t=e?.variants?.edges?.find((e=>e?.node?.id===n))?.node;v(t)}}),[e,x,n,y,i]);const E="undefined"!=typeof window&&"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain||"usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain,k=b?.image?.url||e.featuredMedia?.preview?.image?.url;return t.createElement(t.Fragment,null,p?t.createElement("div",{className:""+(e.id===x?"yt-fixedBundle-product-card--horizontal-primary":"yt-fixedBundle-product-card--horizontal-associated"),style:{display:"flex",alignItems:"center",gap:"10px",backgroundColor:a.fixedBundle?.cardBackgroundColor}},o&&t.createElement(uh,{className:"yt-fixedBundle-product-card_checkbox-wrapper--horizontal"},t.createElement(sh,{className:"yt-fixedBundle-product-card_checkbox-hidden",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}-${u}`,defaultChecked:r,onChange:e=>d(e.target.checked),disabled:C}),t.createElement(ph,{className:"yt-fixedBundle-product-card_checkbox-label",htmlFor:`checkbox-${e.id}-${u}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(rt,null))),t.createElement(kg,{className:"yt-fixedBundle-product-card-horizontal_item",style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}80`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`8px 8px 8px -6px ${a.fixedBundle.borderColor}`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}80`}[a.fixedBundle.shadowType]||"none"},canCustomize:o},"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Tg,{className:"yt-fixedBundle-product-card-horizontal_image",src:Hh(k),alt:e.title,style:{borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,aspectRatio:a.general.imageAspectRatio||"1/1",borderTopRightRadius:"0",borderBottomRightRadius:"0"}}),t.createElement(Sg,{className:"yt-fixedBundle-product-card-horizontal_details"},t.createElement($g,{className:"yt-fixedBundle-product-card-horizontal_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Bg,{className:"yt-fixedBundle-product-card-horizontal_price-section"},t.createElement(zg,{className:"yt-fixedBundle-product-card-horizontal_price--new"},Wh(a.general.currencySymbol,h)," ",Vh(b?.price)),a.fixedBundle.compareAtPriceVisibility&&b?.compareAtPrice&&parseFloat(b.compareAtPrice)>parseFloat(b?.price)&&t.createElement(Ig,{className:"yt-fixedBundle-product-card-horizontal_price--old"},Wh(a.general.currencySymbol,h),Vh(b?.compareAtPrice))),t.createElement(Dh,{product:e,variantOptions:m,selectedVariants:w,onVariantChange:e=>{i(e)},variantId:y,primaryProductId:x})))):t.createElement(t.Fragment,null,t.createElement(Rg,{className:""+(e.id===x?"yt-fixedBundle-product-card--vertical-primary":"yt-fixedBundle-product-card--vertical-associated"),productsLength:f,style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}50`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`0 4px 10px -6px ${a.fixedBundle.borderColor}50`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}50`}[a.fixedBundle.shadowType]||"none",...o&&{position:"relative"},...E&&{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",minWidth:"max-content",paddingLeft:"2px"}},borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.fixedBundle?.cardBackgroundColor},o&&t.createElement(mh,{className:"yt-fixedBundle-product-card_checkbox-wrapper--vertical",isImage:E},t.createElement(sh,{className:"yt-fixedBundle-product-card_checkbox-hidden--vertical",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}-${u}`,defaultChecked:r,onChange:e=>d(e.target.checked),disabled:C}),t.createElement(ph,{className:"yt-fixedBundle-product-card_checkbox-label--vertical",htmlFor:`checkbox-${e.id}-${u}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(rt,{size:10}))),"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Lg,{className:"yt-fixedBundle-product-card_image-wrapper--vertical",style:{aspectRatio:a.general.imageAspectRatio,height:"fit-content"}},t.createElement(jg,{className:"yt-fixedBundle-product-card_image--vertical",src:Hh(k),style:{aspectRatio:a.general.imageAspectRatio},alt:e.title}),e.variants.edges.length>1&&t.createElement(Vg,{className:"yt-fixedBundle-product-card_badge-container"},t.createElement(Wg,{className:"yt-fixedBundle-product-card_circle-button"},t.createElement("span",null)),t.createElement(Hg,{className:"yt-fixedBundle-product-card_circle-button-two"},t.createElement("span",null)),t.createElement(Ug,{className:"yt-fixedBundle-product-card_count-badge"},e.variants.edges.length,"+"))),t.createElement(qg,{className:"yt-fixedBundle-product-card-vertical_info"},t.createElement(Qg,{className:"yt-fixedBundle-product-card-vertical_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Yg,{className:"yt-fixedBundle-product-card-vertical_price-line"},t.createElement(Gg,{className:"yt-fixedBundle-product-card-vertical_price--new"},Wh(a.general.currencySymbol,h),Vh(b?.price)),a.fixedBundle.compareAtPriceVisibility&&b?.compareAtPrice&&parseFloat(b.compareAtPrice)>parseFloat(b?.price)&&t.createElement(Ig,{className:"yt-fixedBundle-product-card-vertical_price--old"},Wh(a.general.currencySymbol,h),Vh(b?.compareAtPrice))))),(f<=3||!s)&&u<f-1&&t.createElement(Zg,{className:"yt-fixedBundle-plus-wrapper"}," ",t.createElement(Xg,{className:"yt-fixedBundle-plus-icon"},"+")," ")))},Nh=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[d,s]=c(window.innerWidth<786),[p,u]=c(null),[m,f]=c(!1),g="undefined"!=typeof window?window.location.href:null,h=e?.products?.find((e=>e.productDetails?.handle===g?.split("/").pop()?.split("?")[0])),x=h?.productId,[y,b]=c(Object.fromEntries(e?.products?.map(((e,t)=>[t.toString(),e?.productDetails?.variants?.edges?.find((e=>e?.node?.inventoryQuantity>0))?.node?.id||e.productDetails?.variants?.edges?.[0]?.node?.id])))),v="undefined"!=typeof window&&("usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain||"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain),w=e?.showIndividualProductSelector||!0,[C,E]=c(new Set(e.products.reduce(((e,t,n)=>(v&&t?.productId!==x&&!w||e.push(n),e)),[])));l((()=>{const e=()=>{const e=new URL(window.location.href).searchParams.get("variant");u(e)},t=e=>{const t=history[e];return function(...n){const r=t.apply(this,n);return window.dispatchEvent(new Event(e.toLowerCase())),r}};return history.pushState=t("pushState"),history.replaceState=t("replaceState"),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),e(),()=>{window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}}),[]),l((()=>{p&&x&&b((t=>{const n={...t};return e?.products?.forEach(((e,t)=>{e.productId===x&&(n[t.toString()]=p)})),n}))}),[p,x,e?.products]),l((()=>{const e=()=>{s(window.innerWidth<600)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const k=a(((e,t)=>{b((n=>({...n,[e.toString()]:t})))}),[]),T=(t,n)=>{const r=e.products[n].productId;v&&w&&r===x||E((e=>{const r=new Set(e);return t?r.add(n):r.delete(n),r}))},S=e.disableInventoryTracking||e.products.every((e=>e.productDetails.variants.edges.some((e=>e.node.inventoryQuantity>0)))),$=i((()=>e.products.some(((e,t)=>C.has(t)&&e.productDetails.variants.edges.length>1))),[e.products,C]),{originalPrice:B,dealPrice:z,offerValue:I}=i((()=>{const{price:t,compareAtPrice:n}=e.products.reduce(((e,t,n)=>{if(!C.has(n))return e;const r=y[n.toString()];if(!r)return e;const o=t.productDetails.variants.edges?.find((e=>e.node.id===r))?.node;if(!o)return e;const a=parseFloat(o?.price??"0"),i=parseFloat(o?.compareAtPrice||a.toString());return e.price+=a,e.compareAtPrice+=i,e}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);C.size===e.products.length&&(e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff));const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[e.products,y,C,e.percentageOff,e.dealAmount,e.amountOff]),D=async e=>{e.preventDefault(),e.stopPropagation(),o(!0),f(!1);try{const e=Object.entries(y).map((([e,t])=>{const n=parseInt(e);return isNaN(n)||!C.has(n)?null:t})).filter(Boolean);n&&await n(Number(B),e)}catch(e){console.error("Error adding to cart:",e)}o(!1)},_=i((()=>e.products.map(((e,t)=>({product:e,index:t}))).filter((({index:e})=>C.has(e)))),[e.products,C]);if(!n)return t.createElement(t.Fragment,null);if(e?.customizations.general?.trackInventory&&!S)return t.createElement(t.Fragment,null);const N=e.customizations,P=N.fixedBundle?.cardLayoutStyle||"auto",O="horizontal"===P||"auto"===P&&d,A="bundles"==e.appName?e.pageHeader?.title:e?.title,F="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(vg,{id:"yt-fixedBundle-container",className:"yt-fixedBundle-container",style:{maxWidth:"800px",backgroundColor:N.fixedBundle.sectionBackgroundColor,..."transparent"!==N.fixedBundle.sectionBackgroundColor&&{padding:"20px"}}},A&&t.createElement(wg,{id:"yt-fixedBundle-header",className:"yt-fixedBundle-header",style:{backgroundColor:N.fixedBundle?.titleBackgroundColor||"none",color:N.fixedBundle?.titleTextColor||"black",textAlign:N.fixedBundle.infoAlignment??"center",fontSize:N.fixedBundle?.titleFontSize,..."transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingBlock:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"===N.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},A),F&&t.createElement(Cg,{id:"yt-fixedBundle-subheader",className:"yt-fixedBundle-subheader",style:{color:"#121212",fontSize:N.fixedBundle?.subtitleFontSize,textAlign:N.fixedBundle.infoAlignment??"center",..."left"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===N.fixedBundle.infoAlignment&&"transparent"!==N.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===N.fixedBundle.infoAlignment&&"transparent"===N.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},F),O?t.createElement(Eg,{id:"yt-fixedBundle-horizontal-container",className:"yt-fixedBundle-horizontal-container"},e?.products?.map(((n,r)=>t.createElement(t.Fragment,{key:`${n.productId}-${r}`},t.createElement(_h,{isChecked:C.has(r),product:n.productDetails,selectedVariantId:y[r.toString()]||"",canCustomize:e?.canCustomizeFixedBundle||!1,styles:N,onVariantChange:e=>k(r,e),onCheckChange:e=>{T(e,r)},isMobile:d,index:r,isHorizontal:O,variantOptions:e.variantOptions,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:x,variantId:p||void 0}))))):t.createElement(Fg,{id:"yt-fixedBundle-vertical-container",className:"yt-fixedBundle-vertical-container"},t.createElement(Mg,{id:"yt-fixedBundle-product-list",className:"yt-fixedBundle-product-list",style:{justifyContent:"left"===N.fixedBundle.infoAlignment?"flex-start":"right"===N.fixedBundle.infoAlignment?"flex-end":"center"}},e?.products?.map(((n,r)=>t.createElement(_h,{key:`${n.productId}-${r}`,isChecked:C.has(r),product:n.productDetails,selectedVariantId:y[r.toString()]||"",canCustomize:e?.canCustomizeFixedBundle||!1,styles:N,onVariantChange:e=>k(r,e),onCheckChange:e=>T(e,r),isMobile:d,index:r,isHorizontal:O,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:x,variantId:p||void 0}))),$&&t.createElement(zh,{productsWithIndices:_,isOpen:m,onClose:()=>f(!1),variantOptions:e.variantOptions,cta:{textColor:N.general.ctaTextColor,backgroundColor:N.general.ctaBackgroundColor},onVariantChange:k,handleAddToCart:D,primaryProductId:x,variantId:p||void 0}))),t.createElement(Dg,{id:"yt-fixedBundle-summary",className:"yt-fixedBundle-summary",style:{alignItems:"left"===N.fixedBundle.infoAlignment?"flex-start":"right"===N.fixedBundle.infoAlignment?"flex-end":"center"}},Number(B)>0&&Number(I)>0&&N.fixedBundle.compareAtPriceVisibility&&t.createElement(_g,{className:"yt-fixedBundle-summary_original-price"},"Original Price:"," ",t.createElement(Pg,{className:"yt-fixedBundle-summary_price"},Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(B))),0!==C.size&&t.createElement(Ng,{className:"yt-fixedBundle-summary_total-price"},"Total Price:"," ",t.createElement(Pg,{className:"yt-fixedBundle-summary_price"},Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(z))," ",Number(I)>0&&t.createElement(Og,{className:"yt-fixedBundle-summary_save-tag"},"Save:"," ",Wh(N.general.currencySymbol,e?.storeCurrencyCode),Vh(I)))),t.createElement(Ag,{id:"yt-fixedBundle-add-to-cart",className:"yt-fixedBundle-add-to-cart",onClick:e=>{e.preventDefault(),e.stopPropagation(),O||!$?D(e):f(!0)},disabled:C.size<1||r,style:{backgroundColor:N.general?.ctaBackgroundColor||"#121212",color:N.general?.ctaTextColor||"#FFFFFF",border:`1px solid ${N.general?.ctaBackgroundColor||"#121212"}`,boxShadow:N.general.ctaShadowType,paddingTop:N.general?.ctaPadding,paddingBottom:N.general?.ctaPadding,borderRadius:N.general.ctaBorderRadius,width:N.general.ctaWidth||"100%",textAlign:"center"},onMouseOver:e=>{N.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=N.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=N.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{N.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=N.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=N.general?.ctaTextColor||"#FFFFFF")}},r?t.createElement(Yo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,N.fixedBundle?.ctaTitle??"Add Bundle to cart")))},Ph=()=>t.createElement(t.Fragment,null,t.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg); } }"),t.createElement("div",{style:{width:"14px",height:"14px",border:"2px solid #f3f3f3",borderTop:"2px solid #007bff",borderRadius:"50%",animation:"spin 1s linear infinite",display:"block"}})),Oh=({product:e,tierIdx:n,isOpen:r,onClose:o,onAddToBundle:a,canAdd:i,isSelected:d,customizations:s,isMobile:p})=>{const[u,m]=c(0),[f,g]=c(e.variants[0].id.toString()),h=e.variants.find((e=>e.id.toString()===f))||e.variants[0],x=e.images.filter(Boolean);if(l((()=>(r&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow=""})),[r]),!r)return null;const y=t.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.75)",zIndex:9999,display:"flex"},onClick:o},t.createElement("div",{style:{background:"#fff",borderRadius:s?.borderRadius||"12px",maxWidth:1e3,width:"100%",height:"72dvh",margin:"auto",display:"flex",overflow:"hidden",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:o,style:{position:"absolute",top:12,right:12,zIndex:10,background:"#fff",border:"1px solid #ddd",borderRadius:"50%",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(ct,{size:22})),t.createElement("div",{style:{flex:1,position:"relative",margin:"20px 0 20px 20px",borderRadius:s?.borderRadius||"12px"}},x.length>0&&t.createElement("img",{src:h.featured_image?.src||x[u]||e.images[0],alt:e.title,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:s?.borderRadius||"12px"}}),x.length>1&&t.createElement("div",{style:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:8,background:"rgba(0,0,0,0.4)",padding:"6px 12px",borderRadius:20}},x.map(((e,n)=>t.createElement("div",{key:n,onClick:()=>m(n),style:{width:10,height:10,borderRadius:"50%",background:n===u?"#fff":"#fff8",cursor:"pointer",display:"block"}}))))),t.createElement("div",{style:{flex:1,padding:"30px",overflowY:"auto",display:"flex",flexDirection:"column",scrollbarWidth:"none"}},t.createElement("h2",{style:{margin:"0 0 12px",fontSize:24,fontWeight:600}},e.title),e.variants.length>1&&t.createElement("div",{style:{position:"relative"}},t.createElement("div",{style:{padding:"8px 0",borderBottom:"1px solid #eee"}},e?.options?.join(" & "),":"," ",t.createElement("strong",null,h.title)),t.createElement("select",{value:f,onChange:e=>g(e.target.value),style:{position:"absolute",inset:0,opacity:0,cursor:"pointer"}},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{style:{fontSize:28,fontWeight:"bold",margin:"10px 0"}},"₹",(h.price/100).toFixed(0),h.compare_at_price&&h.compare_at_price>h.price&&t.createElement("span",{style:{marginLeft:12,fontSize:20,textDecoration:"line-through",color:"#999"}},"₹",(h.compare_at_price/100).toFixed(0))),t.createElement("div",{style:{position:"sticky",bottom:0,background:"white"}},t.createElement("button",{onClick:()=>a(e,n),disabled:!i||!h.available,style:{width:"100%",padding:"12px",fontSize:17,fontWeight:600,border:"none",borderRadius:s?.borderRadius||"8px",background:h.available?d||!i?"#28a745":s?.atcBg||"#007bff":"rgb(204, 204, 204)",color:s?.atcText||"#fff",cursor:i&&h.available?"pointer":"not-allowed"}},d?"Added to Box":h.available?"Add to Box":"Out of Stock")),e.description&&t.createElement("div",{dangerouslySetInnerHTML:{__html:e.description},style:{lineHeight:1.7,color:"#444"}})))),b=t.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.75)",zIndex:9999,display:"flex"},onClick:o},t.createElement("div",{style:{background:"#fff",width:"100%",height:"100dvh",display:"flex",flexDirection:"column",overflow:"hidden",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:o,style:{position:"absolute",top:12,right:12,zIndex:10,background:"#fff",border:"1px solid #ddd",borderRadius:"50%",width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center"}},t.createElement(ct,{size:22})),t.createElement("div",{style:{flex:1,overflowY:"auto",paddingBottom:100}},x.length>0&&t.createElement("div",{style:{position:"relative"}},t.createElement("img",{src:h.featured_image?.src||x[u]||e.images[0],alt:e.title,style:{width:"100%",display:"block",maxHeight:"50vh",objectFit:"cover",objectPosition:"center"}}),x.length>1&&t.createElement("div",{style:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:8,background:"rgba(0,0,0,0.4)",padding:"6px 12px",borderRadius:20}},x.map(((e,n)=>t.createElement("div",{key:n,onClick:()=>m(n),style:{width:10,height:10,borderRadius:"50%",background:n===u?"#fff":"#fff8",cursor:"pointer"}}))))),t.createElement("div",{style:{padding:"20px"}},t.createElement("h2",{style:{margin:"0 0 12px",fontSize:22,fontWeight:600}},e.title),e.variants.length>1&&t.createElement("div",{style:{position:"relative",marginBottom:20}},t.createElement("div",{style:{padding:"8px 0",borderBottom:"1px solid #eee"}},"Variant: ",t.createElement("strong",null,h.title)),t.createElement("select",{value:f,onChange:e=>g(e.target.value),style:{position:"absolute",inset:0,opacity:0,cursor:"pointer"}},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{style:{fontSize:28,fontWeight:"bold",margin:"10px 0"}},"₹",(h.price/100).toFixed(0),h.compare_at_price&&h.compare_at_price>h.price&&t.createElement("span",{style:{marginLeft:12,fontSize:20,textDecoration:"line-through",color:"#999"}},"₹",(h.compare_at_price/100).toFixed(0))),e.description&&t.createElement("div",{dangerouslySetInnerHTML:{__html:e.description},style:{lineHeight:1.7,color:"#444"}}))),t.createElement("div",{style:{position:"sticky",bottom:0,background:"#fff",padding:"8px 10px",borderTop:"1px solid #eee",boxShadow:"0 -4px 10px rgba(0,0,0,0.05)"}},t.createElement("button",{onClick:()=>a(e,n),disabled:!i||!h.available,style:{width:"100%",padding:"10px",fontSize:14,fontWeight:600,border:"none",borderRadius:s?.borderRadius||"8px",background:!d&&i&&h.available?s?.atcBg||"#007bff":"#28a745",color:s?.atcText||"#fff",cursor:i&&h.available?"pointer":"not-allowed"}},d?"Added to Box":h.available?"Add to Box":"Out of Stock"))));return v.createPortal(p?b:y,document.body)},Ah=({title:e,uploadState:n,onUpload:r,onRemove:o,onRetry:a})=>{const i="object"==typeof n&&n?.loading,l="object"==typeof n&&n?.error,c="object"==typeof n&&n?.url;return t.createElement("div",{style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",textAlign:"center",background:"#fafafa"}},t.createElement("div",{style:{fontWeight:500,color:"#333",marginBottom:"4px"}},e),i&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",color:"#007bff",fontSize:"13px",margin:"12px 0"}},t.createElement(Ph,null)," Uploading ",n?.name,"...")),l&&t.createElement(t.Fragment,null,t.createElement("div",{style:{color:"#dc3545",fontSize:"13px",margin:"8px 0"}},"Upload failed. Try again."),t.createElement("button",{type:"button",onClick:a,style:{color:"#303030",fontSize:"12px",borderRadius:"10px",border:"1px solid #E3E3E3",fontWeight:550,padding:"8px 16px",background:"white",cursor:"pointer"}},"Retry Upload")),c&&!i&&!l&&t.createElement(t.Fragment,null,t.createElement("div",{style:{margin:"12px 0"}},t.createElement("img",{src:n.url,alt:"Uploaded",style:{maxWidth:"100%",maxHeight:"150px",borderRadius:"6px"}})),t.createElement("div",{style:{fontSize:"12px",color:"#28a745",marginBottom:"8px"}},n.name),t.createElement("button",{type:"button",onClick:o,style:{background:"#dc3545",color:"white",border:"none",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",cursor:"pointer"}},"Remove")),!n&&t.createElement(t.Fragment,null,t.createElement("div",{style:{color:"#888",fontSize:"12px",marginBottom:"12px"}},"jpeg/png (max 5MB)"),t.createElement("button",{type:"button",onClick:r,style:{color:"#303030",fontSize:"12px",borderRadius:"10px",border:"1px solid #E3E3E3",fontWeight:550,padding:"8px 16px",background:"white",cursor:"pointer"}},"Upload")))},Fh=({config:e,bundleAddToCartLoading:n,addCustomBundleToCart:r})=>{const[a,i]=c(1),[d,s]=c([]),[p,u]=c(null),[m,f]=c({}),[g,h]=c(window.innerWidth<640),x=o(new Map),[y,b]=c(!1);l((()=>{const e=document.querySelector(".box-loader-scene");e&&e.setAttribute("style","display: none;");const t=()=>h(window.innerWidth<640);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]);const{customizations:v}=e,w=e.config.builderTiers.collectionTier.sort(((e,t)=>e.tier-t.tier)),C=w.length+1,E=C,k=v.hideSelectedProducts,T=v.allowMultipleQty,S=v.hideOutOfStockProducts,$=d.reduce(((e,t)=>e+t.quantity),0),B=d.reduce(((e,t)=>e+t.price*t.quantity),0)/100,z=d.reduce(((e,t)=>{const n=w.flatMap((e=>e.products)).find((e=>e.id.toString()===t.productId)),r=n?.variants.find((e=>e.id.toString()===t.variantId));return e+(r?.compare_at_price??t.price)*t.quantity}),0)/100,I=(e,t)=>{const n=e.variants.find((e=>e.id===parseInt(t)));if(!n)return;const r=document.querySelector(`[data-product-id="${e.id}"]`);r&&(r.dataset.selectedVariant=t,r.dataset.currentPrice=n.price.toString())},D=(e,t)=>{const n=document.querySelector(`[data-product-id="${e.id}"]`);if(!n)return;const r=n.dataset.selectedVariant||e.variants[0].id.toString(),o=parseInt(n.dataset.currentPrice||e.variants[0].price.toString());s((n=>{const a=`${e.id}-${r}-${t}`,i=n.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===a));if(i)return n.filter((e=>e!==i));const l=P[t],c=_(t);return c!==1/0&&l>=c?n:[...n,{productId:e.id.toString(),variantId:r,price:o,quantity:1,tierIndex:t}]}))},_=e=>{const t=w[e];return t.minimumQuantity>0?t.minimumQuantity:1/0},N=(e,t)=>{const n=_(t);if(n===1/0)return!0;const r=P[t],o=d.some((n=>n.productId===e.id.toString()&&n.tierIndex===t));return!!o||r<n},P=w.map(((e,t)=>d.filter((e=>e.tierIndex===t)).reduce(((e,t)=>e+t.quantity),0))),O=(e,t,n)=>{const r=_(n);if(r===1/0)return!0;return P[n]<r},A=e=>{if(!x.current.has(e)){const t=document.createElement("input");t.type="file",t.accept="image/jpeg,image/png",t.style.display="none",t.onchange=async t=>{const n=t.target.files?.[0];if(n){if(n.size>5242880)return alert("Max 5MB");if(!n.type.match(/^image\/(jpeg|png)$/i))return alert("JPEG/PNG only");f((t=>({...t,[e]:{loading:!0,name:n.name}})));try{const t=await(async e=>{const t=new FormData;t.append("file",e),b(!0);try{const e=window?.Shopify?.shop||"falah-devstore.myshopify.com",n=window?.Shopify?.shop?"https://products.yourtoken.io":"http://localhost:8000",r=await fetch(`${n}/shopify/upload?shop=${e}`,{method:"POST",headers:{"x-yourtoken-app-name":"bundles"},body:t});if(!r.ok)throw new Error("Upload failed");return(await r.json()).url}catch(e){throw b(!1),alert("Upload failed. Try again."),e}finally{b(!1)}})(n);f((r=>({...r,[e]:{url:t,name:n.name}})))}catch{f((t=>({...t,[e]:{error:!0,name:n.name}})))}}},document.body.appendChild(t),x.current.set(e,t)}return x.current.get(e)},F=a<=w.length?w[a-1]:null,M=F?_(a-1):0,R=w.map(((e,t)=>{const n=d.filter((e=>e.tierIndex===t)).reduce(((e,t)=>{const n=`${t.productId}-${t.variantId}`,r=e.find((e=>`${e.productId}-${e.variantId}`===n));return r?r.quantity+=t.quantity:e.push({...t,quantity:t.quantity}),e}),[]);return{tier:e,items:n,count:P[t]}}));return t.createElement("div",{className:"yt-collection-bundle-builder",style:{margin:"20px auto",maxWidth:"1400px"}},t.createElement(Mh,{totalSteps:C,formStepIndex:E,currentStep:a,getStepTitle:e=>e===E?"Customize Gift Details":w[e-1]?.title||`Step ${e}`,isMobile:g,formTitle:e?.config?.form?.title,onStepClick:e=>{if(e>1&&!d.length)return alert("Add at least one product first");i(e),window.scrollTo(0,0)}}),Array.from({length:C},((e,t)=>t+1)).map((n=>{const r=n===E,o=r?[]:(e=>w[e-1]?.products||[])(n),i=S?o.filter((e=>e.available)):o,l=n-1;return t.createElement("div",{key:n,className:"yt-collection-bundle-step-content "+(a===n?"yt-collection-bundle-step-content-active":""),style:{display:a===n?"block":"none",padding:"1.5rem 0",minHeight:"40vh"}},r&&e.config.form?t.createElement("div",{className:"yt-collection-bundle-customize-form",style:{maxWidth:"80%",margin:"0 auto",padding:"1rem",marginBottom:g?"180px":"160px"}},e?.config?.form?.sections?.map(((e,n)=>t.createElement("div",{key:`sec_${n}`,className:"yt-collection-bundle-form-group",style:{marginBottom:"32px"}},t.createElement("label",{className:"yt-collection-bundle-label",style:{display:"block",fontWeight:600,marginBottom:"12px",color:"#333",fontSize:"16px"}},e?.title),"text"===e.type&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"12px"}},e.fields.map(((e,n)=>{const r=e?.title??"Field "+n;return t.createElement("textarea",{key:r,className:"yt-collection-bundle-textarea",placeholder:e?.title,rows:3,maxLength:500,onChange:e=>f((t=>({...t,[r]:e.target.value}))),style:{padding:"12px",border:"1px solid #ddd",borderRadius:"6px",fontSize:"14px",resize:"vertical"}})}))),"image"===e.type&&t.createElement("div",{style:{marginBottom:"24px"}},t.createElement("sub",{style:{display:"block",color:"#666",fontSize:"12px",marginBottom:"8px"}},"jpeg/png (max 5MB)"),t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e.fields.map(((e,n)=>{const r=e?.title??"Field "+n,o=m[r];return t.createElement(Ah,{key:r,title:e?.title,uploadState:o,onUpload:()=>A(r).click(),onRemove:()=>f((e=>{const{[r]:t,...n}=e;return n})),onRetry:()=>A(r).click()})})))))))):t.createElement("div",{className:"yt-collection-bundle-product-grid",style:{display:g?"grid":"flex",gridTemplateColumns:g?"repeat(2,1fr)":"",flexWrap:g?"unset":"wrap",justifyContent:"center",gap:"16px",padding:"16px",marginBottom:g?"180px":"160px"}},i.map((e=>t.createElement(Rh,{key:e.id,product:e,tierIdx:l,customizations:v,isMobile:g,hoveredCard:p,setHoveredCard:u,selectedProducts:d,handleAddToBundle:D,canAddProduct:N,allowMultipleQty:T,handleVariantChange:I,canIncrement:O,setSelectedProducts:s})))))})),t.createElement(Lh,{config:e,selectedProducts:d,selectedByTier:R,totalItems:$,totalPrice:B,totalCompareAtPrice:z,currentStep:a,formStepIndex:E,currentTierMax:M,tierSelectedCounts:P,isMobile:g,bundleAddToCartLoading:n,isUploading:y,hoveredCard:p,setHoveredCard:u,hideSelectedProducts:k,getProductStep:e=>{for(let t=0;t<w.length;t++)if(w[t].products.some((t=>t.id.toString()===e)))return t+1;return E},setCurrentStep:i,handleRemoveItem:(e,t,n)=>{s((r=>r.filter((r=>!(r.productId===e&&r.variantId===t&&r.tierIndex===n)))))},handleCheckout:async()=>{if(a!==E||!d.length)return;const e={};Object.entries(m).forEach((([t,n])=>{const r=t.split("|").pop()?.replace(/^f_\d+$/,"")||t;"string"==typeof n&&n.trim()?e[r]=n:n&&"object"==typeof n&&"url"in n&&(e[r]=n.url)}));const t=d.map((t=>({variantId:t.variantId,quantity:t.quantity,properties:e})));r(t)}}))},Mh=({totalSteps:e,formStepIndex:n,currentStep:r,getStepTitle:o,isMobile:a,formTitle:i,onStepClick:l})=>t.createElement("div",{className:"yt-collection-bundle-steps-nav-container",style:{display:"flex",justifyContent:"center",flexDirection:"column",gap:a?"0":"1rem",overflowX:"auto",scrollbarWidth:"none",borderBottom:"1px solid #878787",marginInline:a?"0":"2%",paddingBottom:"1rem",textAlign:"center"}},t.createElement("div",{className:"yt-collection-bundle-steps-nav",style:{display:"flex",justifyContent:"center",gap:a?"0":"2rem",overflowX:"auto",scrollbarWidth:"none"}},Array.from({length:e},((e,t)=>t+1)).map((e=>t.createElement("div",{key:e,className:"yt-collection-bundle-step-item "+(r===e?"yt-collection-bundle-step-item-active":""),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem",minWidth:"120px",cursor:"pointer",opacity:r===e?1:.5,transition:"opacity 0.2s"},onClick:()=>l(e)},t.createElement("div",{className:"yt-collection-bundle-step-icon "+(r===e?"yt-collection-bundle-step-icon-active":""),style:{width:"40px",height:"40px",background:r===e?"#000":"#fff",border:"2px solid #ccc",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"}},e===n?t.createElement("svg",{viewBox:"0 0 24 24",style:{width:"20px",height:"20px",fill:r===e?"#fff":"#999"}},t.createElement("path",{d:"M20 6h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.67C10.96 2.54 10.05 2 9 2c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1h-2c-.55 0-1-.45-1-1s.45-1 1-1h2zm-6 0c.55 0 1 .45 1 1s-.45 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2zM20 19H4V8h16v11z"})):t.createElement("svg",{viewBox:"0 0 24 24",style:{width:"20px",height:"20px",fill:r===e?"#fff":"#999"}},t.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}))),t.createElement("div",{className:"yt-collection-bundle-step-label",style:{fontSize:"14px",textAlign:"center",color:"#333",fontWeight:"600"}},o(e)))))),i&&t.createElement("p",{className:"yt-collection-bundle-steps-nav-description",style:{fontSize:a?"14px":"16px",marginBottom:a?"0":"14px",fontWeight:"400",color:"#000"}},i)),Rh=({product:e,tierIdx:n,customizations:r,isMobile:o,hoveredCard:a,setHoveredCard:i,selectedProducts:l,handleAddToBundle:d,canAddProduct:s,allowMultipleQty:p,handleVariantChange:u,canIncrement:m,setSelectedProducts:f})=>{const[g,h]=c(!1),x=document.querySelector(`[data-product-id="${e.id}"]`),y=x?.dataset.selectedVariant||e.variants[0].id.toString(),b=e.variants.find((e=>e.id.toString()===y))||e.variants[0],v=l.some((t=>t.productId===e.id.toString()&&t.variantId===y&&t.tierIndex===n)),w=a===e.id,C=l.filter((t=>t.productId===e.id.toString()&&t.variantId===b.id.toString()&&t.tierIndex===n)).reduce(((e,t)=>e+t.quantity),0);return t.createElement(t.Fragment,null,t.createElement("div",{key:e.id,className:"yt-collection-bundle-product-item","data-product-id":e.id,"data-selected-variant":b.id,"data-current-price":b.price,style:{display:"flex",flexDirection:"column",border:r?.productCardBorder||"1px solid #ddd",background:r?.productCardBg||"#fff",overflow:"hidden",transition:"all 0.2s ease",minWidth:o?0:"250px",maxWidth:o?"none":"250px",borderRadius:r?.borderRadius||"8px",boxShadow:"spread"===r?.productCardShadow?"8px 8px 8px -6px #0000004D":"no-spread"===r?.productCardShadow?"6px 6px 0px -1px #00000033":"none",width:o?"100%":""}},t.createElement("div",{className:"yt-collection-bundle-product-image",style:{position:"relative",width:"100%",aspectRatio:r?.productImageRatio||"1/1",overflow:"hidden",cursor:"pointer",background:"#f9f9f9"},onClick:()=>h(!0),onMouseEnter:()=>i(e.id),onMouseLeave:()=>i(null)},t.createElement("img",{src:e.images[0]||"https://cdn.shopify.com/s/files/1/0750/9937/3789/files/placeholder-thumbnail.png?width=250px",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",transition:"opacity 0.3s ease, transform 0.3s ease",opacity:w?0:1,transform:w?"scale(1.05)":"scale(1)"},alt:e.title}),t.createElement("img",{src:e.images[1]||e.images[0],style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",transition:"opacity 0.3s ease, transform 0.3s ease",opacity:w?1:0,transform:"scale(1.05)"},alt:e.title}),e.variants.length>1&&t.createElement("select",{style:{position:"absolute",bottom:"10px",left:"10px",right:"10px",background:"rgba(255,255,255,0.9)",border:"none",borderRadius:"4px",padding:"10px",fontSize:"12px",zIndex:2},onChange:t=>u(e,t.target.value),defaultValue:b.id},e.variants.map((e=>t.createElement("option",{key:e.id,value:e.id,disabled:!e.available},e.title," ",!e.available&&"(Out of stock)"))))),t.createElement("div",{className:"yt-collection-bundle-product-info",style:{padding:"12px",flexGrow:1,display:"flex",flexDirection:"column"}},t.createElement("h3",{className:"yt-collection-bundle-product-title",style:{fontSize:o?"12px":"14px",fontWeight:600,margin:"0 0 4px",lineHeight:1.3,color:"#333",flexGrow:1}},e.title),t.createElement("div",{className:"yt-collection-bundle-product-prices",style:{display:"flex",alignItems:"center",gap:"6px",flexWrap:"nowrap",whiteSpace:"nowrap",overflow:"hidden"}},t.createElement("span",{className:"yt-collection-bundle-product-price",style:{fontSize:o?"14px":"16px",fontWeight:"bold",color:"#000",flexShrink:0}},"₹",(b.price/100).toFixed(0)),b.compare_at_price&&b.compare_at_price>b.price&&t.createElement("span",{className:"yt-collection-bundle-product-compare",style:{fontSize:"14px",textDecoration:"line-through",color:"#999",flexShrink:0}},"₹",(b.compare_at_price/100).toFixed(0)))),p&&C>0?t.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"nowrap",background:"#cccccc"}},t.createElement("button",{style:{width:"40%",height:b.available?"fit-content":"36px",border:"1px solid #ddd",background:"#fff",fontWeight:"bold",cursor:"pointer",padding:o?"6px":"12px",fontSize:o?"12px":"14px"},onClick:()=>{f((t=>{const r=`${e.id}-${b.id}-${n}`,o=t.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===r));return o&&o.quantity>1?t.map((e=>e===o?{...e,quantity:e.quantity-1}:e)):o?t.filter((e=>e!==o)):t}))}},"-"),t.createElement("span",{style:{minWidth:"24px",textAlign:"center",fontWeight:600,width:"100%"}},C),t.createElement("button",{style:{width:"40%",height:b.available?"fit-content":"36px",border:"1px solid #ddd",background:"#fff",fontWeight:"bold",cursor:"pointer",padding:o?"6px":"12px",fontSize:o?"12px":"14px"},onClick:()=>{b.available&&m(e,b.id.toString(),n)&&f((t=>{const r=`${e.id}-${b.id}-${n}`,o=t.find((e=>`${e.productId}-${e.variantId}-${e.tierIndex}`===r));return o?t.map((e=>e===o?{...e,quantity:e.quantity+1}:e)):[...t,{productId:e.id.toString(),variantId:b.id.toString(),price:b.price,quantity:1,tierIndex:n}]}))},disabled:!b.available||!m(e,b.id.toString(),n)},"+")):t.createElement("button",{className:"yt-collection-bundle-add-btn "+(v?"yt-collection-bundle-add-btn-added":""),style:{background:v?"#28a745":s(e,n)&&b.available?r?.atcBg||"#007bff":"#ccc",color:r?.atcText||"#fff",border:"none",padding:o?"6px":"12px",fontSize:o?"12px":"14px",fontWeight:600,cursor:"pointer",transition:"all 0.2s",opacity:b.available?1:.6},onClick:()=>{b.available&&s(e,n)&&d(e,n)},disabled:!b.available||!s(e,n)},v?"Added":b.available?"ADD TO BOX":"Out of Stock")),g&&t.createElement(Oh,{product:e,tierIdx:n,isOpen:g,onClose:()=>h(!1),onAddToBundle:(e,t)=>{d(e,t),h(!1)},canAdd:s(e,n),isSelected:v,customizations:r,isMobile:o}))},Lh=e=>{const{config:n,selectedProducts:r,selectedByTier:a,totalItems:i,totalPrice:d,totalCompareAtPrice:s,currentStep:p,formStepIndex:u,currentTierMax:m,tierSelectedCounts:f,isMobile:g,bundleAddToCartLoading:h,isUploading:x,hoveredCard:y,setHoveredCard:b,getProductStep:v,setCurrentStep:w,handleRemoveItem:C,handleCheckout:E}=e,{customizations:k}=n,[T,S]=c(!0),[$,B]=c(!1),z=o(null);return l((()=>(m!==1/0&&f[p-1]===m-2&&m>1&&!$&&(B(!0),z.current=setTimeout((()=>{B(!1),z.current=null}),3e3)),()=>{z.current&&clearTimeout(z.current)})),[m,f,p]),t.createElement("div",{className:"yt-collection-bundle-bar",style:{background:k?.bundleBg||"#fff",color:k?.bundleText||"#333",border:k?.bundleBorder||"1px solid #878787",display:"flex",flexDirection:"column",position:"fixed",bottom:"10px",left:"50%",transform:"translateX(-50%)",width:"600px",maxWidth:"95%",zIndex:899,boxShadow:"0 -2px 10px rgba(0,0,0,0.1)",transition:"bottom 0.3s ease",borderRadius:k?.borderRadius||"8px"}},t.createElement("div",{style:{position:"relative",textAlign:"center"}},r.length>0&&t.createElement("button",{onClick:()=>S((e=>!e)),style:{background:"#87878766",border:"none",cursor:"pointer",fontSize:"16px",padding:"4px 12px",color:"#555555",borderRadius:"0 0 28px 28px"}},T?t.createElement(gn,null):t.createElement(at,null)),$&&t.createElement(t.Fragment,null,t.createElement("style",null,"\n @keyframes fadeIn {\n from { opacity: 0; transform: translateX(-50%) translateY(10px); }\n to { opacity: 1; transform: translateX(-50%) translateY(0); }\n }\n "),t.createElement("div",{className:"yt-collection-bundle-ctx",style:{position:"absolute",top:"-40px",left:"50%",transform:"translateX(-50%)",background:k?.atcBg||"#007bff",color:k?.atcText||"#fff",padding:"4px 8px",borderRadius:k?.borderRadius||"8px",fontSize:"14px",whiteSpace:"nowrap",zIndex:10,boxShadow:"0 4px 12px rgba(0,0,0,0.2)",animation:"fadeIn 0.3s ease-out",minWidth:"300px",textAlign:"center",border:"1px solid rgba(0,0,0,0.1)"}},"Add up to"," ",t.createElement("span",{style:{fontWeight:600}},m," item",m>1?"s":"")))),T&&r.length>0&&t.createElement("div",{className:"yt-collection-bundle-bar-top",style:{display:"flex",alignItems:"center",padding:"8px 8px 0",position:"relative",borderRadius:k?.borderRadius||"8px"}},t.createElement("div",{className:"yt-collection-bundle-images",style:{display:"flex",flex:1,gap:"5px",justifyContent:"center",alignItems:"center",overflowX:"auto",padding:"4px 0",scrollbarWidth:"none"}},a.filter((({count:e})=>e>0)).map((({items:e},r,o)=>t.createElement(t.Fragment,{key:r},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",minWidth:"fit-content"}},t.createElement("div",{style:{display:"flex",gap:"4px"}},e.map(((e,o)=>{const a=n.config.builderTiers.collectionTier.flatMap((e=>e.products)).find((t=>t.id.toString()===e.productId));if(!a)return null;const i=v(e.productId),l=p===i;return t.createElement("div",{key:o,className:"yt-collection-bundle-img-wrapper",style:{position:"relative",flexShrink:0,height:"65px"}},t.createElement("div",{style:{position:"relative",width:"65px",height:"65px",borderRadius:`calc(${k?.borderRadius||"8px"} / 2)`,overflow:"hidden",cursor:l?"default":"pointer",transition:"transform 0.2s ease"},onMouseEnter:e=>!l&&(e.currentTarget.style.transform="scale(1.08)"),onMouseLeave:e=>e.currentTarget.style.transform="scale(1)",onClick:()=>!l&&w(i)},t.createElement("img",{src:a.images[0],style:{width:"65px",height:"65px",objectFit:"cover",borderRadius:`calc(${k?.borderRadius||"8px"} / 2)`,transition:"opacity 0.2s",pointerEvents:"none"},alt:"Selected"}),e.quantity>1&&t.createElement("div",{style:{position:"absolute",bottom:"4px",right:"4px",background:"rgba(0,0,0,0.7)",color:"#fff",borderRadius:"10px",padding:"2px 6px",fontSize:"10px",fontWeight:600}},"x",e.quantity),t.createElement("button",{style:{position:"absolute",top:"4px",right:"4px",width:"20px",height:"20px",background:"rgba(220,53,69,0.95)",color:"white",border:"none",borderRadius:"50%",fontSize:"12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 1px 3px rgba(0,0,0,0.3)"},onClick:t=>{t.stopPropagation(),C(e.productId,e.variantId,r)}},"×")))})))),r<o.length-1&&o[r+1].count>0&&t.createElement("div",{style:{color:"#666",paddingInline:"6px"}},t.createElement(lt,null))))))),g?t.createElement("div",{style:{display:"flex",flexDirection:"column",padding:"4px",gap:"10px"}},t.createElement("div",{style:{flex:1,textAlign:"center",display:"flex",flexDirection:"row",justifyContent:r.length>0?"space-between":"center",paddingInline:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d"}},i," items Selected"),i>0&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d",fontWeight:600}},"₹",d.toLocaleString()),t.createElement("div",{style:{fontSize:"14px",color:"#6c757dc9",fontWeight:500,textDecoration:"line-through"}},"₹",s.toLocaleString()))),t.createElement("div",{style:{display:"flex",flexWrap:"nowrap",gap:"4px"}},t.createElement("button",{className:"yt-collection-bundle-back-btn",style:{background:"#000",color:"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"100%",transition:"background 0.2s",borderRadius:k?.borderRadius||"8px"},onClick:()=>w((e=>Math.max(1,e-1))),onMouseEnter:()=>b(-1),onMouseLeave:()=>b(null),disabled:1===p},"Back"),t.createElement("button",{className:"yt-collection-bundle-next-btn "+(p===u&&0===i||x?"yt-collection-bundle-next-btn-disabled":""),style:{background:k?.btnPrimaryBg||"#28a745",color:k?.btnPrimaryText||"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"100%",transition:"background 0.2s",opacity:p===u&&0===i||x?.6:1,borderRadius:k?.borderRadius||"8px"},onClick:p===u?E:()=>w(p+1),disabled:p===u&&0===i||h||x},h?t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"center"}},t.createElement(Ph,null)):p===u?"Checkout":"Next"))):t.createElement("div",{className:"yt-collection-bundle-bar-bottom",style:{display:"flex",alignItems:"center",padding:"0px",background:"#dbdbdb",margin:"8px",borderRadius:k?.borderRadius||"8px",overflow:"hidden",scrollbarWidth:"none"}},t.createElement("button",{className:"yt-collection-bundle-back-btn",style:{background:"#000",color:"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"138px",transition:"all 0.2s",...-1===y&&{filter:"brightness(60%)"}},onClick:()=>w((e=>Math.max(1,e-1))),onMouseEnter:()=>b(-1),onMouseLeave:()=>b(null),disabled:1===p},"Back"),t.createElement("div",{style:{flex:1,textAlign:"center",display:"flex",flexDirection:"row",justifyContent:r.length>0?"space-between":"center",paddingInline:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d"}},i," items Selected"),i>0&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement("div",{style:{fontSize:"14px",color:"#6c757d",fontWeight:600}},"₹",d.toLocaleString()),t.createElement("div",{style:{fontSize:"14px",color:"#6c757dc9",fontWeight:500,textDecoration:"line-through"}},"₹",s.toLocaleString()))),t.createElement("button",{className:"yt-collection-bundle-next-btn "+(p===u&&0===i||x?"yt-collection-bundle-next-btn-disabled":""),style:{background:k?.btnPrimaryBg||"#28a745",color:k?.btnPrimaryText||"#fff",border:"none",padding:"12px 24px",cursor:"pointer",fontWeight:600,width:"138px",transition:"all 0.2s",opacity:p===u&&0===i||x?.6:1,...-2===y&&{filter:"brightness(90%)"}},onClick:p===u?E:()=>w(p+1),disabled:p===u&&0===i||h||x,onMouseEnter:()=>b(-2),onMouseLeave:()=>b(null)},h?t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"center"}},t.createElement(Ph,null)):p===u?"Checkout":"Next")))},jh=window?.Shopify?.currency||{rate:1,active:"INR"},Vh=e=>{if(!e)return;const t=navigator.language||"en-US",n=Number((Number(e)*jh.rate).toFixed(2));return new Intl.NumberFormat(t).format(n)},Wh=(e,t)=>t==jh.active?e:sn(jh.active)||jh.active,Hh=e=>{if(!e)return e;try{const t=new URL(e),n=t.searchParams;return n.has("format")||n.set("format","webp"),n.has("quality")||n.set("quality","70"),n.has("width")||n.set("width","600"),t.toString()}catch{const t=e.includes("?")?"&":"?";return e+t+"format=webp&quality=70&width=600"}},Uh=(e,t,n,r,o)=>{const a=r.findIndex((t=>t.variantId===e));o(0===n?e=>e.filter(((e,t)=>t!==a)):-1===a?r=>[...r,{product:t,variantId:e,quantity:n}]:e=>e.map(((e,t)=>t===a?{...e,quantity:e.quantity+n}:e)))},qh=({bundle:e,currentProductId:n,addToCartFunction:r,addCustomBundleToCart:o,selectedItems:a,setSelectedItems:i,bundleAddToCartLoading:l,handleRemoveItem:c,selectedItemsQuantity:d,renderingOnPage:s,bundleSubtotal:p})=>"fixed"!==e.type&&e.type&&0!==e?.type?.length?"builder"===e.type?t.createElement(lf,{bundleAddToCartLoading:l,bundle:e,selectedItems:a,setSelectedItems:i,handleAddToCart:o,handleRemoveItem:c,renderingOnPage:s,selectedItemsQuantity:d??0,bundleSubtotal:p??{price:0,compareAtPrice:0}}):"combo"===e.type?t.createElement(df,{bundle:e,addToCartFunction:r}):"mixAndMatch"===e.type?t.createElement(bg,{bundle:e,addToCartFunction:r}):"collection"===e.type?t.createElement(Fh,{config:e,addCustomBundleToCart:o,bundleAddToCartLoading:l}):t.createElement(Lf,{bundle:e,currentProductId:n,addToCartFunction:r}):t.createElement(Nh,{addToCartFunction:r,bundle:e});L(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Qh=()=>t.createElement("div",{className:"scene"},t.createElement("div",{className:"floating"},t.createElement("div",{className:"cube"},t.createElement("div",{className:"side front"},"‎"),t.createElement("div",{className:"side back"},"‎"),t.createElement("div",{className:"side left"},"‎"),t.createElement("div",{className:"side right"},"‎"),t.createElement("div",{className:"side bottom"},"‎"),t.createElement("div",{className:"lid"},t.createElement("div",{className:"flap north"},"‎"),t.createElement("div",{className:"flap south"},"‎"),t.createElement("div",{className:"flap east"},"‎"),t.createElement("div",{className:"flap west"},"‎")))));export{qh as Bundle,Qh as BundleLoader,uu as Cart,la as CouponFrame,qe as Nudge,Je as SpinnerWheel};
@@ -65,9 +65,9 @@ export type BundleConfig = {
65
65
  products: Product[];
66
66
  }[];
67
67
  };
68
- form: {
69
- title: string;
70
- sections: {
68
+ form?: {
69
+ title?: string;
70
+ sections?: {
71
71
  title: string;
72
72
  type: "text" | "image";
73
73
  fields: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-uikit",
3
- "version": "0.7.415",
3
+ "version": "0.7.416-collection-bundle-fixes.1",
4
4
  "description": "YourToken UI Kit",
5
5
  "scripts": {
6
6
  "rollup": "tsc && rollup -c",