PageSourceSearch

https://www.yashojewellers.com/_next/static/chunks/861-58d5e2ddadf6f740.js

js yashojewellers.com collected 2026-10-02 01:55:50 UTC 42,653 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[861,5271,5566],{14762:function(e,t,a){var i=a(85893),s=a(67294),l=a(43495),n=a(8193);let r=e=>{let{isOpen:t,type:a,title:r,subText:o,onConfirm:c,onClose:d,autoClose:u,confirmLabel:m="Confirm",cancelLabel:p="Cancel",showConfirmButton:x=!0,showCancelButton:h=!0,showCloseIcon:g=!0}=e,v=(0,s.useRef)(),[_,f]=(0,s.useState)(!0);(0,s.useEffect)(()=>{let e;return t&&u&&(e=setTimeout(d,1e3*u)),()=>clearTimeout(e)},[t,u,d]),(0,s.useEffect)(()=>{let e=e=>{v.current&&!v.current.contains(e.target)&&d()};return t?document.addEventListener("mousedown",e):document.removeEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t,d]),(0,s.useEffect)(()=>{t&&f(!0)},[t]);let y=async()=>{await c(),f(!1)};return t?(0,i.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] px-4 py-6 sm:px-0 ",children:[(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity"}),(0,i.jsxs)(l.E.div,{ref:v,className:"bg-white p-6 rounded-xl font-primary shadow-2xl relative z-10 w-full max-w-md ",initial:{opacity:0,y:-50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.5,ease:"easeInOut"},children:[(0,i.jsx)(l.E.div,{className:"absolute inset-x-0 -top-8 flex justify-center",initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.7,ease:"easeInOut"},children:(0,i.jsx)("div",{className:"bg-white w-20 h-20 rounded-full flex items-center justify-center",children:(()=>{switch(a){case"success":return(0,i.jsx)(n.KP3,{className:"text-green-600 h-10 w-10"});case"error":return(0,i.jsx)(n.SV5,{className:"text-red-600 h-10 w-10"});case"warning":return(0,i.jsx)(n.SR5,{className:"text-yellow-600 h-10 w-10"});case"info":return(0,i.jsx)(n.ocf,{className:"text-blue-600 h-10 w-10"});default:return null}})()})}),g&&(0,i.jsx)("button",{onClick:d,className:"absolute top-3 right-3 text-gray-500 hover:text-gray-700",children:(0,i.jsx)(n.SV5,{className:"h-6 w-6"})}),(0,i.jsxs)("div",{className:"text-center mt-10",children:[(0,i.jsx)("h2",{className:"text-xl md:text-2xl font-semibold",children:r}),(0,i.jsx)("p",{className:"text-gray-600 mt-2",children:o})]}),_&&(h||x)&&(0,i.jsxs)("div",{className:"flex justify-center space-x-4 mt-6",children:[h&&(0,i.jsx)("button",{className:"bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded-full transition-all duration-200 ease-in-out",onClick:d,children:p}),x&&(0,i.jsx)("button",{className:"bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-full transition-all duration-200 ease-in-out",onClick:y,children:m})]}),u&&(0,i.jsx)("div",{className:"mt-6 h-1 w-full bg-gray-100 rounded overflow-hidden relative",children:(0,i.jsx)(l.E.div,{className:"h-full bg-primary absolute left-0 top-0",initial:{width:"0%"},animate:{width:"100%"},transition:{ease:"linear",duration:u}})})]})]}):null};t.Z=r},95431:function(e,t,a){a.d(t,{A:function(){return c}});var i=a(85893),s=a(67294);a(25675);var l=a(41664),n=a.n(l),r=a(35271),o=a(43812);let c=e=>{var t,a;let l,{product:c,isOpen:d,setIsOpen:u,quantity:m="",relatedProducts:p=""}
1=e,[x,h]=(0,s.useState)(!1),{cart:g,addToCart:v,updateQuantity:_,isSnackbarVisible:f,cartResponse:y}=(0,s.useContext)(r.CartContext),b=(0,o.setImageSrc)((null==c?void 0:null===(t=c.json)||void 0===t?void 0:t.Images)||(null==c?void 0:c.image)||(null==c?void 0:null===(a=c.images)||void 0===a?void 0:a.base_image)||(null==c?void 0:c.image_url),(null==c?void 0:c.name)||(null==c?void 0:c.product_name));return(b&&"string"==typeof b&&b.trim(),(0,s.useEffect)(()=>{d&&(setTimeout(()=>h(!0),5e3),setTimeout(()=>{u(!1),h(!1)},5e3))},[d,u]),d)?(l=""!=m&&m>0?"Cart updated: ".concat(m," ").concat(1==m?"item":"items"," in  cart."):""!=m&&0==m?"has been removed from your cart.":"Already Same Data Exists"==y?"is already in the cart.":"has been added to the cart.",(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"".concat("true"==p?"fixed z-50 left-5 bottom-5 w-full max-w-md bg-white p-4 rounded shadow-lg flex justify-between items-center transition-transform duration-200 transform-gpu ".concat(x?"translate-y-full":"translate-y-0"):"fixed z-50 left-0 lg:left-20 bottom-20 w-96 bg-white p-4 rounded shadow-lg flex justify-between transition-transform duration-200 transform-gpu ".concat(x?"translate-y-full":"translate-y-0")," max-w-full"),children:(0,i.jsxs)("div",{className:"flex items-center",children:[b&&(0,i.jsx)("div",{className:"w-20 h-20 relative",children:(0,i.jsx)("img",{src:b,alt:(null==c?void 0:c.name)||(null==c?void 0:c.product_name)||(null==c?void 0:c.json["Product Name"]),className:"rounded-lg",style:{objectFit:"contain",width:"100%",height:"100%"}})}),(0,i.jsxs)("div",{className:"ml-4 flex-grow",children:[(0,i.jsx)("h3",{className:"text-xl font-bold mb-2 truncate max-w-[200px] overflow-hidden",style:{textOverflow:"ellipsis",whiteSpace:"nowrap"},title:(null==c?void 0:c.name)||(null==c?void 0:c.product_name)||(null==c?void 0:c.json["Product Name"]),children:(null==c?void 0:c.name)||(null==c?void 0:c.product_name)||(null==c?void 0:c.json["Product Name"])}),(0,i.jsx)("p",{className:"text-sm",children:l}),0==m&&m?null:(0,i.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,i.jsxs)(n(),{href:"/Cart",className:"bg-primary text-white text-sm rounded px-4 py-2 flex items-center justify-center",children:[(0,i.jsx)("i",{className:"fas fa-shopping-cart"})," "]}),(0,i.jsxs)("a",{href:"/checkout/Checkout",className:"bg-primary text-white text-sm rounded px-4 py-2 flex items-center justify-center",children:[(0,i.jsx)("i",{className:"fas fa-credit-card"})," "]})]})]})]})})})):null}},15268:function(e,t,a){var i=a(87066),s=a(43812);let l=s.BUILDER_URL,n=e=>{let{job_id:t,endpoint:a,payload:n,responseData:r,errorMsg:o}=e,c=JSON.stringify(n),d=JSON.stringify(o),u={responseData:JSON.stringify({job_id:t,endpoint:a,payLoad:c,responseData:r,error:d})};(0,s.isDevelopment)()||i.Z.post("".concat(l,"/error-log"),u).then(e=>{200===e.status&&console.log("Success response",e.data)}).catch(e=>{})};t.Z=n},35271:function(e,t,a){a.r(t),a.d(t,{CartContext:function(){return x},CartProvider:function(){return h}});var i=a(85893),s=a(67294),l=a(82940),n=a(37351),r=a(60017),o=a(85574),c=a(68015),d=a(15268),u=a(14762),m=a(11163),p=a(55678);let x=(0,s.createContext)(),h=e=>{let{children:t}=e,a=(0,m.useRouter)(),[h,g]=(0,s.useState)([]),[v,_]=(0,s.useState)(""),f=(0,s.useContext)(n.ThemeContext),[y,b]=(0,s.useState)(0),[j,w]=(0,s.useState)({}),[C,N]=(0,s.useState)(""),[P,k]=(0,s.useState)(""),[S,A]=(0,s.useState)(2),[T,I]=(0,s.use
1State)(2),[R,W]=(0,s.useState)(""),[E,U]=(0,s.useState)(4),[q,M]=(0,s.useState)(),[O,L]=(0,s.useState)(""),[B,D]=(0,s.useState)(""),[F,Z]=(0,s.useState)(""),[V,J]=(0,s.useState)(),[z,Q]=(0,s.useState)(),[$,G]=(0,s.useState)(!0),[Y,H]=(0,s.useState)(!0),[K,X]=(0,s.useState)(!1),ee=(0,l.b)(),{userId:et,token:ea,websiteStatus:ei,userDetails:es,setMobEnb:el}=(0,s.useContext)(o.UserContext),{currentCurrency:en}=(0,s.useContext)(r.CurrencyContext),[er,eo]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(""),{jboId:eu}=(0,c.useJobId)(),[em,ep]=(0,s.useState)(""),[ex,eh]=(0,s.useState)(""),[eg,ev]=(0,s.useState)(null),[e_,ef]=(0,s.useState)(null),[ey,eb]=(0,s.useState)(null),[ej,ew]=(0,s.useState)(!1),[eC,eN]=(0,s.useState)(!1),[eP,ek]=(0,s.useState)({}),eS=e=>{ek(e),eN(!0)},eA=()=>{eN(!1)},eT=async()=>{var e,t,a,i,s=sessionStorage.getItem("promoStatusCheck"),l=sessionStorage.getItem("prev_status_check"),n=1==s?sessionStorage.getItem("promocode"):"",r=1==l?sessionStorage.getItem("previlageCardvalue"):"";try{let o=3==ei&&(null==es?void 0:es.user_type)==1?"product/siteCartProduct":"product/getCartProduct",c=await ee.post(o,{user_id:et,token:ea,checkout:0,promo_code:1==s?n:1==l?r:"",privilege_card_status:l?1:2});if(200===c.status){H(!1),g(c.data.product),w(c.data.total),localStorage.setItem("cart",JSON.stringify(c.data.product)),A(c.data.privilege_card_status),sessionStorage.setItem("previlageCardvalue",c.data.privilege_card),L(c.data.taxable_amount),D(c.data.total_quantity),_(null===(e=c.data)||void 0===e?void 0:e.total_u_saved),J(c.data.total_discount),Q(null==c?void 0:null===(t=c.data)||void 0===t?void 0:t.special_discount_price),Z(c.data.tax_amount),N(c.data.total_price),ep(c.data.pay_over_counter_enable),ev(c.data.multipayment_enable),eb(c.data.og_value_enable),ew(1==c.data.bnpl_enable),ef(c.data.pickup_enable),eh(c.data.is_click_and_collect);let u=(null==c?void 0:null===(a=c.data)||void 0===a?void 0:a.mobile_no_verified)==1;el(u),c.data.product.map(e=>e.product_id)}X(!1)}catch(x){X(!0);let m=3==ei&&(null==es?void 0:es.user_type)==1?"product/siteCartProduct":"product/getCartProduct",p=(null==x?void 0:null===(i=x.response)||void 0===i?void 0:i.data)?x.response.data:"";(0,d.Z)({job_id:eu,endpoint:m,payload:{user_id:et,token:ea},responseData:p,errorMsg:x}),H(!1)}},eI=async()=>{try{let e=await ee.post("user/userCartCount",{user_id:et});e.data&&e.data.count?(b(e.data.count),localStorage.setItem("cartCount",e.data.count.toString())):b(0)}catch(i){var t;let a=(null==i?void 0:null===(t=i.response)||void 0===t?void 0:t.data)?i.response.data:"";(0,d.Z)({job_id:eu,endpoint:"user/userCartCount",payload:{user_id:et},responseData:a,errorMsg:i})}};(0,s.useEffect)(()=>{if(et&&"null"!==et&&ea&&1===f.siteStatus){let e=a.pathname;if(eI(),"/Cart"===e||"/checkout/Checkout"===e)eT();else{let t=localStorage.getItem("cart"),i=localStorage.getItem("cartCount");t&&i?(g(JSON.parse(t)),b(Number(i))):eT()}}else g([]),w({}),localStorage.removeItem("cart"),localStorage.removeItem("cartCount")},[et,ea,a.pathname]);let eR=async e=>{let t={user_id:et,token:ea,product_id:e.product_id?e.product_id:e.id,quantity:1};try{let a=await ee.post("user/setaddtocart",t);eo(!0),ed(a.data.message),1==a.data.status&&(eT(),eI(),G(!$))}catch(n){var i;let s={user_id:et,token:ea,product_id:e.product_id?e.product_id:e.id,quantity:1},l=(null==n?void 0:null===(i=n.response)||void 0===i?void 0:i.data)?n.response.data:"";(0,d.Z)({job_id:eu,endpoint:"user/setaddtocart",payload:s,responseData:l,errorMsg:n})}},eW=async e=>{let t={mProductId:null==e?void 0:e.product_id1,product_id:null==e?void 0:e.product_id1,quantity:1};try{var a,i,s;let l=await ee.post("user/setaddtocartQuantity",t);if((null===(a=l.data)||void 0===a?void 0:a.status)===1)eI();else{let n=(null===(i=l.data)||void 0===i?void 0:i.message)||"something went wrong",r="We apologize, but the quantity you've requested has reached its maximum limit for this product"===n,o=r?"Maximum Limit - ".concat(null==l?void 0:null===(s=l.data)||void 0===s?void 0:s.qty," qty: ").concat(n):n;r?p.Am.info(o):p.Am.error(o)}eT()}catch(c){console.error(c)}},eE=(e,t)=>{g(h.map(a=>a.id===e.id?{...a,quantity:t}:a))},eU=async e=>{let t={user_id:et,product_id:(null==e?void 0:e.mProductId)?null==e?void 0:e.mProductId:e.product_id1||e.id||e.product_id};eS({type:"warning",title:"Are you sure?",subText:"You want to delete this item from your cart?",confirmLabel:"Yes, remove",cancelLabel:"No, keep it",showCloseIcon:!1,onConfirm:async()=>{try{let a=await ee.post("user/removeCart",t);if(1==a.data.status)eT(),eI(),eS({type:"success",title:"Deleted!",subText:"The item has been removed from your cart.",onClose:eA,autoClose:2});else throw Error("Failed to remove from Cart")}catch(n){var i;eT(),eI();let s={user_id:et,product_id:e.id},l=(null==n?void 0:null===(i=n.response)||void 0===i?void 0:i.data)?n.response.data:"";(0,d.Z)({job_id:eu,endpoint:"user/removeCart",payload:s,responseData:l,errorMsg:n}),eS({type:"error",title:"Error!",subText:"Failed to remove the item from your cart.",onClose:eA,autoClose:3})}},onClose:eA})},eq=async e=>{let t={user_id:et,product_id:(null==e?void 0:e.mProductId)?null==e?void 0:e.mProductId:e.product_id1||e.id||e.product_id};try{let a=await ee.post("user/removeCart",t);if(1==a.data.status)eT(),eI(),eS({type:"success",title:"Move to Wishlist!",subText:"The item has been moved to your wishlist.",onClose:eA,autoClose:2,showConfirmButton:!1,showCancelButton:!1});else throw Error("Failed to remove from Cart")}catch(n){var i;eT(),eI();let s={user_id:et,product_id:e.id},l=(null==n?void 0:null===(i=n.response)||void 0===i?void 0:i.data)?n.response.data:"";(0,d.Z)({job_id:eu,endpoint:"user/removeCart",payload:s,responseData:l,errorMsg:n}),eS({type:"error",title:"Error!",subText:"Failed to remove the item from your cart.",onClose:eA,autoClose:3})}};return(0,i.jsxs)(x.Provider,{value:{promoMessageData:P,specialPriceDiscount:z,setTarangDiscountData:_,TarangDiscountData:v,setSpecialPriceDiscount:Q,setLoa
1ding:H,setTotalDiscount:J,previlegeCardStatus:S,setPrevilegeCardData:I,previlegeCardData:T,previlegeCardValue:R,promoStatus:E,setPromoStatus:U,promoStatusData:q,Totaldiscount:V,TotalQuantity:B,loading:Y,TaxAmount:F,TotalAmount:O,cartCount:y,cart:h,cartTotal:j,TotalPrice:C,fetchCartCount:eI,cartResponse:ec,fetchCart:eT,addToCart:eR,updateQuantity:eE,removeFromCart:eU,isSnackbarVisible:er,errorstate:K,isShowPayOverCounter:em,isShowPartialPayment:eg,isShowOldGold:ey,isShowPickup:e_,isClickAndCollect:ex,setIsClickAndCollect:eh,bookNowPayLaterEnable:ej,removeFromCartDrawer:eq,handleQuantityUpdate:eW},children:[t,(0,i.jsx)(u.Z,{isOpen:eC,type:eP.type,title:eP.title,subText:eP.subText,onConfirm:eP.onConfirm,onClose:eP.onClose,autoClose:eP.autoClose,confirmLabel:eP.confirmLabel,cancelLabel:eP.cancelLabel,showCloseIcon:eP.showCloseIcon,showConfirmButton:eP.showConfirmButton,showCancelButton:eP.showCancelButton})]})}},55566:function(e,t,a){a.r(t);var i=a(85893),s=a(67294),l=a(82940),n=a(35271),r=a(85574),o=a(11163),c=a(33654),d=a(55678),u=a(95431),m=a(37351),p=a(68015);let x=e=>{var t;let a,{product:x,uiMode:h,isCheckout:g=!1,isCart:v,isRelated:_="",fetchCartProducts:f={},isDrawer:y=!1,isCartDrawer:b=!1}=e,j=(0,l.b)(),w=(0,s.useContext)(m.ThemeContext),[C,N]=(0,s.useState)(!1),[P,k]=(0,s.useState)(null),[S,A]=(0,s.useState)("0"),[T,I]=(0,s.use
1State)("0"),[R,W]=(0,s.useState)(!1),{cart:E,fetchCart:U,fetchCartCount:q}=(0,s.useContext)(n.CartContext),{token:M,userDetails:O}=(0,s.useContext)(r.UserContext),L=(0,o.useRouter)(),{openAuthPopup:B}=(0,c.Pd)(),{jboId:D}=(0,p.useJobId)();(0,s.useEffect)(()=>{if(E&&Array.isArray(E)){let e=1==h?x.product_id1||x.mProductId:x.product_id,t=E.find(t=>t.product_id1===e);if(t){let a=String(t.qty);A(a),I(a)}}},[E,x.product_id,x.product_id1,h]),(0,s.useEffect)(()=>{let e=e=>{("ArrowLeft"===e.key||"ArrowRight"===e.key)&&window.location.reload()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]);let F=async e=>{if(0==w.siteStatus){d.Am.info('Actions like "Add to Cart" are disabled during preview.');return}if(!O){let t=window.location.href;document.cookie="initialReferrer=".concat(encodeURIComponent(t),"; path=/"),B(L.asPath);return}if(R)return;W(!0);let a={mProductId:null==x?void 0:x.product_id1,product_id:1==h?x.product_id1||x.mProductId:x.product_id,quantity:e};try{var i,s,l;let n=await j.post("user/setaddtocartQuantity",a);if((null===(i=n.data)||void 0===i?void 0:i.status)===1)I(String(e)),A(String(e)),q(),k(x),N(!0),g&&f();else{A(T);let r=(null===(s=n.data)||void 0===s?void 0:s.message)||"something went wrong",o="We apologize, but the quantity you've requested has reached its maximum limit for this product"===r,c=o?"Maximum Limit - ".concat(null==n?void 0:null===(l=n.data)||void 0===l?void 0:l.qty," qty: ").concat(r):r;o?d.Am.info(c):d.Am.error(c)}U()}catch(u){A(T)}finally{W(!1)}},Z=(0,s.useCallback)((t=e=>{F(e)},function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];clearTimeout(a),a=setTimeout(()=>{t(...i)},1e3)}),[T]),V=e=>{let t=e.target.value;/^\d*$/.test(t)&&(A(t),""!==t.trim()&&Z(parseInt(t,10)))},J=()=>{""===S.trim()&&A(T)},z=1==h?"text-primary text-sm px-2 py-1 rounded-md transform transition-all hover:scale-105":"text-white text-lg px-4 py-2 rounded-full transform transition-all hover:scale-105";return(0,i.jsx)(i.Fragment,{children:361==D&&y?(0,i.jsx)("div",{className:"w-full",children:"0"==S?(0,i.jsx)("button",{className:"w-full flex items-center justify-center gap-2 rounded-md border border-primary bg-primary px-4 py-2.5 text-sm text-white shadow-sm transform transition-all hover:scale-105",onClick:()=>F(1),disabled:R,children:R?(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("i",{className:"fas fa-plus text-xs"}),"Add"]})}):(0,i.jsxs)("div",{className:"w-full flex rounded-md border border-primary overflow-hidden ".concat(R?"opacity-50 pointer-events-none":""),children:[(0,i.jsx)("button",{className:"flex items-center justify-center bg-gray-300 px-4 text-primary transform transition-all hover:scale-105",onClick:()=>F(Math.max(parseInt(S,10)-1,0)),disabled:R,children:R?(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,i.jsx)("i",{className:"fas fa-minus text-sm"})}),(0,i.jsx)("div",{className:"flex-1 px-2 py-2 flex items-center justify-center",children:(0,i.jsx)("input",{type:"text",value:S,onChange:V,onBlur:J,disabled:R,className:"w-full bg-transparent text-center text-primary font-medium focus:outline-none appearance-none",style:{border:"none",boxShadow:"none",outline:"none",padding:"0px"}})}),(0,i.jsx)("button",{className:"flex items-center justify-center bg-primary px-4 text-white transform transition-all hover:scale-105",onClick:()=>F(parseInt(S,10)+1),disabled:R,children:R?(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,i.jsx)("i",{className:"fas fa-plus text-sm"})})]})}):(0,i.jsxs)("div",{className:"flex items-center gap-2",children:["0"==S?(0,i.jsx)("button",{className:"bg-gray-800 text-white shadow-lg transform transition-all hover:scale-105 ".concat(1==h?"text-sm px-3 py-2 rounded-md":"text-lg px-6 py-3 sm:py-4 rounded-full"),onClick:()=>F(1),disabled:R,children:R?(0,i.jsxs)("span",{className:"flex items-center justify-center",children:[(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"})," Loading..."]}):(0,i.jsxs)("span",{className:"flex items-center ".concat(1==h?"gap-1 text-sm":"gap-2 text-lg"),children:[(0,i.jsx)("i",{className:"fas fa-plus-circle ".concat(1==h?"text-xs":"text-base")}),2==h?"Add to Cart":"Add"]})}):(0,i.jsxs)("div",{className:1==h?"flex items-center shadow-sm rounded-md px-2 py-1 gap-2 border border-primary ".concat(R?"opacity-50 pointer-events-none":""," sm:px-1 sm:py-0.5 sm:gap-1"):"flex  items-center bg-primary rounded-full px-4 py-2 shadow-md gap-4 ".concat(R?"opacity-50 pointer-events-none":""),children:[(0,i.jsx)("button",{className:z,onClick:()=>F(Math.max(parseInt(S,10)-1,0)),disabled:R,children:R?(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,i.jsx)("i",{className:"fas fa-minus"})}),(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)("input",{type:"text",value:S,onChange:V,onBlur:J,className:"text-center w-5 lg:w-6 bg-transparent focus:outline-none appearance-none text-base ".concat(1==h?"text-primary":"text-white"),disabled:R,style:{border:"none",boxShadow:"none",outline:"none",padding:"0px"}})}),(0,i.jsx)("button",{className:z,onClick:()=>F(parseInt(S,10)+1),disabled:R,children:R?(0,i.jsx)("i",{className:"fas fa-spinner fa-spin"}):(0,i.jsx)("i",{className:"fas fa-plus"})})]}),S&&!b&&(0,i.jsx)(u.A,{product:P,isOpen:C,setIsOpen:N,quantity:S,relatedProducts:1==_?"true":"false"})]})})};t.default=x},93624:function(e,t,a){a.r(t);var i=a(85893),s=a(67294),l=a(43495),n=a(60017),r=a(18357);let o=e=>{let{data:t,showPurchaseCost:a}=e,{formatCurrency:o}=(0,s.useContext)(n.CurrencyContext),c={hidden:{opacity:0,x:-100},visible:{opacity:1,x:0}},d={hidden:{opacity:0}
1,visible:{opacity:1}},[u,m]=(0,r.YD)({triggerOnce:!0,threshold:.1}),p=e=>["Purchase Price","Purchase Price With Tax","Taxable Amount","Final Amount"].includes(e.Components),x=(e,t)=>{let a=e.trim(),i=null!=t&&""!==t&&"-"!==t;return i&&"click_and_collect"===e&&"string"!=typeof t&&"number"!=typeof t||i&&"specialprice"===e&&"string"!=typeof t&&"number"!=typeof t?t:["price","amount","cost","tax","purchase_price_with_tax","final_price","total","purchase_cost","margin","purchase_touch","","specialprice","click_and_collect"].includes(a.toLowerCase())&&i?o(t):t};return(0,i.jsx)("div",{ref:u,className:"block xl:container my-8 p-4 sm:p-6 rounded-lg shadow-sm bg-cream-500 ",style:{marginTop:"5px"},children:(0,i.jsx)("div",{className:"overflow-x-auto custom-scrollbar",children:(0,i.jsxs)("table",{className:"min-w-full leading-normal capitalize",children:[(0,i.jsx)("thead",{children:t.length>0&&(0,i.jsx)("tr",{children:Object.keys(t[0]).map(e=>(0,i.jsx)(l.E.th,{className:"px-4 py-2 text-left text-md xl:text-xl font-semibold uppercase tracking-wider bg-gold-500 text-cream-500",children:e.replace(/_/g," ")},e))})}),(0,i.jsx)("tbody",{children:t.map((e,t)=>{if(!a&&("Purchase Price"===e.Components||"Purchase Price With Tax"===e.Components))return null;let s=p(e);return(0,i.jsx)(l.E.tr,{variants:c,initial:"hidden",animate:m?"visible":"hidden",transition:{duration:.5,delay:.1*t},className:"border-b ".concat(s?"bg-gold-100":"bg-white"),children:Object.entries(e).map((t,a,n)=>{let[r,c]=t;return(0,i.jsx)(l.E.td,{variants:d,initial:"hidden",animate:m?"visible":"hidden",transition:{duration:.5},className:"px-4 py-2 ".concat(s?"font-semibold":"text-gray-800"," text-xs sm:text-xs lg:text-lg"),children:"Total Click and Collect Savings"===e.Components&&(0==a||a===n.length-1)?(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsx)("span",{className:"text-sm md:text-sm lg:text-lg font-bold text-primary",children:0!=a?o(c):c})]}):x(r,c)},a)})},t)})})]})})})};t.default=o},95371:function(e,t,a){a.r(t),a.d(t,{default:function(){return k}});var i=a(85893),s=a(67294),l=a(82940),n=a(11163),r=a(33654),o=a(45793),c=a(93624),d=a(642);a(25675),a(41664),a(22546);var u=a(44988);a(95431),a(83253);var m=a(60017);a(35271);var p=a(85574);a(79458),a(21082);var x=a(43812);u.ZP.use([u.W_]);var h=a(73658),g=a(4921),v=a(37351),_=a(54154),f=a(90614),y=a(68015),b=a(15268),j=a(4422),w=a(6490);let C=(e,t,a,s,l,n)=>{var r,o,c,d,u;let{b2c_metal_category:m,b2c_stone:p,b2c_price:x,b2c_va_data:h,b2c_mc_data:g,b2c_dimond:v}=e,_=(null!==(o=null==x?void 0:null===(r=x[0])||void 0===r?void 0:r.special_final_price)&&void 0!==o?o:0)>0,f=[];if((null==m?void 0:m.length)&&m.map(e=>{let t={Components:e.metal_category_name,Purity:e.Purity,Rate:e.rate,Weight:e.volume,Units:e.measurement,Amount:e.Amount};_&&(t.specialprice=e.Amount),1==s&&(0==a||1==a)&&(t.click_and_collect=e.Amount),f.push(t)}),null==g?void 0:g.length){let y={Components:"Making Charge",Purity:"",Rate:g[0].attribute_value,Weight:"",Units:g[0].mc_type,Amount:g[0].MC};_&&(0==g[0].special_mc?y.specialprice=g[0].MC:y.specialprice=g[0].special_mc),1==s&&(0==a||1==a)&&(0==l.click_and_collect_mc?y.click_and_collect=g[0].MC:y.click_and_collect=l.click_and_collect_mc),0!==g[0].MC&&f.push(y)}if((null==p?void 0:p.length)&&p.map(e=>{let t={Components:e.metal_category_name,Purity:e.Purity,Rate:e.rate,Weight:e.volume,Units:e.measurement,Amount:e.Amount};_&&(t.specialprice=e.Amount),s&&(0==a||1==a)&&(t.click_and_collect=e.Amount),f.push(t)}),(null==v?void 0:v.length)&&v.map((e,t)=>{let i={Components:e.metal_category_name,Purity:e.Purity,Rate:e.rate,Weight:e.volume,Units:e.measurement,Amount:e.Amount};_&&(i.specialprice=e.Amount),s&&(0==a||1==a)&&(i.click_and_collect=e.Amount),f.push(i)}),null==h?void 0:h.length){let b={Components:"Wastage",Purity:"",Rate:h[0].attribute_value,Weight:"",Units:h[0].va_type,Amount:h[0].VA};_&&(0==h[0].special_VA?b.specialprice=h[0].VA:(b.specialprice=h[0].special_VA,b.specialprice=(0,i.jsxs)("div",{children:[(0,i.jsxs)("span",{className:"font-bold",children:["₹ ",null===(c=h[0])||void 0===c?void 0:c.special_VA]}),(null===(d=h[0])||void 0===d?void 0:d.special_wastage_percentage)!=0?(0,i.jsx)("div",{className:"min-w-[150px]",children:(0,i.jsx)("div",{className:" inline-block animate-pulse",children:(0,i.jsx)("div",{className:"bg-yellow-100 border border-yellow-400 rounded-lg p-1 px-2 shadow-md",children:(0,i.jsxs)("span",{className:"text-green-700 font-extrabold text-sm lg:text-lg",children:[(0,i.jsx)("span",{className:"text-xs lg:text-sm",children:"Only "}),(0,i.jsxs)("span",{className:"ml-1 strike-red text-xs font-bold lg:text-base text-red-500",children:[h[0].attribute_value,"%"]})," ".concat(null===(u=h[0])||void 0===u?void 0:u.special_wastage_percentage,"%")]})})})}):null]}))),1==s&&(0==a||1==a)&&(0==l.click_and_collect_va?b.click_and_collect=h[0].VA:b.click_and_collect=(0,i.jsxs)("div",{children:[(0,i.jsxs)("span",{className:"font-bold",children:["₹ ",null==l?void 0:l.click_and_collect_va]}),(0,i.jsx)("div",{className:"min-w-[150px]",children:(0,i.jsx)("div",{className:" inline-block animate-pulse",children:(0,i.jsx)("div",{className:"bg-yellow-100 border border-yellow-400 rounded-lg p-1 px-2 shadow-md",children:(0,i.jsxs)("span",{className:"text-green-700 font-extrabold text-sm lg:text-lg",children:[(0,i.jsx)("span",{className:"text-xs lg:text-sm",children:"Only "}),(0,i.jsxs)("span",{className:"ml-1 line-through text-xs font-bold lg:text-base text-red-500",children:[h[0].attribute_value,"%"]})," ".concat(null==l?void 0:l.click_and_collect_wastage,"%")]})})})})]})),0!==h[0].VA&&f.push(b)}
1if(null==x?void 0:x.length){let j={"Taxable Amount":x[0].price,["Tax (".concat(x[0].tax_percentage,"%)")]:x[0].Tax,"Final Amount":x[0].final_price,...1===s&&{"Total Click and Collect Savings":x[0].final_price}},w=0;for(let[C,N]of Object.entries(j)){if(0===x[0].Tax&&("Taxable Amount"===C||C.startsWith("Tax ("))){w++;continue}if(1!=s||_||0!=a&&1!=a){if(1==s&&_){let P=[x[0].special_amount,x[0].special_tax,x[0].special_final_price],k=[l.click_and_collect_taxable_amount,l.click_and_collect_tax,l.click_and_collect_amount];"Total Click and Collect Savings"==C?f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:"",specialprice:"",click_and_collect:null==l?void 0:l.click_and_collect_total_discount}):f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:N,specialprice:P[w],click_and_collect:k[w]})}else if(1!=s&&_){let S=[x[0].special_amount,x[0].special_tax,x[0].special_final_price];f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:N,specialprice:S[w]})}else f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:N})}else{let A=[l.click_and_collect_taxable_amount,l.click_and_collect_tax,l.click_and_collect_amount];"Total Click and Collect Savings"==C?f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:"",click_and_collect:null==l?void 0:l.click_and_collect_total_discount}):f.push({Components:C,Purity:"",Rate:"",Weight:"",Units:"",Amount:N,click_and_collect:A[w]})}w++}}return f},N=(e,t,a,i,s)=>{let l=1==i&&1==s?null==e?void 0:e.b2b_gross_stone:null==e?void 0:e.b2b_stone,{b2b_metal_category:n,b2b_price:r,b2b_dimond:o,b2b_mc_data:c}=e,{b2c_price:d}=t,u=[];if((null==n?void 0:n.length)&&n.map(e=>{u.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Touch:(null==r?void 0:r.length)?r[0].purchase_touch:"","Pure Weight":e.pure_weight,"Pure Rate":a((null==r?void 0:r.length)?r[0].pure_rate:0),Amount:e.Amount})}),(null==c?void 0:c.length)&&0!=c[0].MC){let m={Components:"Making Charge",Purity:"",Weight:"",Units:"",Touch:"","Pure Weight":"","Pure Rate":"",Amount:c[0].MC};u.push(m)}if((null==o?void 0:o.length)&&o.map(e=>{u.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Touch:"","Pure Weight":"","Pure Rate":"",Amount:e.Amount})}),(null==l?void 0:l.length)&&l.map(e=>{u.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Touch:"-","Pure Weight":"-","Pure Rate":a(e.rate),Amount:"".concat(e.Amount)})}),null==r?void 0:r.length){let p={"Purchase Price":"".concat(r[0].purchase_cost),["Tax (".concat(r[0].tax_percentage,"%)")]:"".concat(r[0].Tax),"Purchase Price With Tax":"".concat(r[0].purchase_price_with_tax),"Selling Price":"".concat(d[0].final_price),Margin:"".concat(r[0].margin)};for(let[x,h]of Object.entries(p))0==r[0].Tax&&("Purchase Price With Tax"===x||x.startsWith("Tax ("))||u.push({Components:x,Purity:"",Weight:"",Touch:"","Pure Weight":"","Pure Rate":"",Units:"",Amount:h})}return u},P=(e,t,a,i)=>{var s;let{b2b_metal_category:l,b2b_stone:n,b2b_price:r,b2b_dimond:o,b2b_mc_data:c,b2b_va_data:d,b2b_making_charge:u}=e,{b2c_price:m,b2c_metal_category:p}=t,x=[];if((null==l?void 0:l.length)&&l.map(e=>{var t,i;x.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Rate:a(null===(t=p[0])||void 0===t?void 0:t.rate),Amount:null===(i=p[0])||void 0===i?void 0:i.Amount})}),(null==d?void 0:d.length)&&(null===(s=d[0])||void 0===s?void 0:s.VA)!=0){let h={Components:"Wastage",Purity:"",Weight:"",Units:d[0].va_type,"Pure Rate":d[0].attribute_value,Amount:d[0].VA};x.push(h)}if((null==u?void 0:u.length)&&0!=u[0].MC){let g={Components:"Making Charge",Purity:"",Weight:"",Units:"","Pure Rate":"",Amount:u[0].MC};x.push(g)}if((null==o?void 0:o.length)&&o.map(e=>{x.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Rate:"",Amount:e.Amount})}),(null==n?void 0:n.length)&&n.map(e=>{x.push({Components:e.metal_category_name,Purity:e.Purity,Weight:e.volume,Units:e.measurement,Rate:a(e.rate),Amount:"".concat(e.Amount)})}),null==r?void 0:r.length){let v={"Purchase Price":"".concat(r[0].purchase_cost),["Tax (".concat(r[0].tax_percentage,"%)")]:"".concat(r[0].Tax),"Purchase Price With Tax":"".concat(r[0].purchase_price_with_tax),"Selling Price":"".concat(m[0].final_price),Margin:"".concat(r[0].margin)};for(let[_,f]of Object.entries(v))0==r[0].Tax&&("Purchase Price With Tax"===_||_.startsWith("Tax ("))||x.push({Components:_,Purity:"",Weight:"",Rate:"",Units:"",Amount:f})}return x};function k(e){let{serverReferrer:t}=e,{redisProductDetailPage:a}=(0,s.useContext)(w.m),u=(0,s.useRef)(null);(0,s.useContext)(v.ThemeContext);
1let[k,S]=(0,s.useState)(),[A,T]=(0,s.useState)({}),[I,R]=(0,s.useState)([]),[W,E]=(0,s.useState)(),[U,q]=(0,s.useState)([]),[M,O]=(0,s.useState)([]),[L,B]=(0,s.useState)(!0),[D,F]=(0,s.useState)([]),{domainData:Z,setArEnable:V}=(0,s.useContext)(p.UserContext),{jboId:J}=(0,y.useJobId)(),z=(0,j.Z)("product Page"),Q=(0,l.b)(),$=(0,n.useRouter)(),{openAuthPopup:G}=(0,r.Pd)(),{slug:Y}=$.query,[H,K]=(0,s.useState)(!1),[X,ee]=(0,s.useState)(null),[et,ea]=(0,s.useState)(null),[ei,es]=(0,s.useState)(null),[el,en]=(0,s.useState)(null),[er,eo]=(0,s.useState)(null),[ec,ed]=(0,s.useState)(null),[eu,em]=(0,s.useState)(null),{userDetails:ep,privilegeStatus:ex,shouldShowOnSite:eh}=(0,s.useContext)(p.UserContext),{formatCurrency:eg}=(0,s.useContext)(m.CurrencyContext),[ev,e_]=(0,s.useState)({}),[ef,ey]=(0,s.useState)(a||""),eb=()=>{if(u.current){let e="B2C Price Breakup"==u.current.textContent,t=e?u.current.offsetTop-600:u.current.offsetTop-100;window.scrollTo({top:t,behavior:"smooth"})}},ej=async()=>{let e=Y[1];if(!/^(?:\d+|m\d+|c\d+p\d+)$/i.test(e)){B(!1);return}let a={pro:e,promo_code:"{}"};$.query.pt&&(a.price_type=$.query.pt);try{let i=await Q.post("product/getSingleProduct",a);if(i.data){let s=i.data.product[0];S(s.consolidated),V(null==s?void 0:s.ar_enable);let l=null!==(D=null===(h=i.data)||void 0===h?void 0:h.stone_status)&&void 0!==D?D:null,n=null!==(z=null==s?void 0:s.price_type)&&void 0!==z?z:null;eo(l),ed(n);let r=$.query.pt||null;em(r||(n?String(n):null));let o=i.data,c="/"!==t?new URL(t).pathname:null,d="";if(c){var u;let m=c.replace(/^\/|\/$/g,"").split("/");3!==m.length||(u=m[2],/^\d+$/.test(u))||m[2].includes("buy")||(d=c)}E(d);let p={title:o.page_property[0].seo_title,description:o.page_property[0].seo_description,keyword:o.page_property[0].seo_keyword};e_(p);var x,h,g,v,_,f,y,j,w,P,k,A,I,W,U,M,L,D,z,G,H,K=window.location.href,X=o.page_property[0].currency,et=1==s.Availability?"https://schema.org/InStock":"https://schema.org/PreOrder",ei=1==s.special_price_status?s.special_price:s.json.price||0,el=window.location.origin+"/product_image/s1200__"+o.images.base_image,er=o.page_property[0].seo_description,ec=s.product_name,eu=["product",ec,er,K,el,ei,X,et],ep=["og:type","og:title","og:description","og:url","og:image","og:price:amount","og:price:currency","og:availability"];if(1!=s.Availability){let ex=new Date,eh=new Date(ex);eh.setDate(ex.getDate()+21);var ev=eh.toISOString().split("T")[0];eu.push(ev),ep.push("og:availability_date")}if(eu.length>3)for(let ef=0;ef<eu.length;ef++){var ey=document.createElement("meta");ey.setAttribute("property",ep[ef]),ey.content=eu[ef],document.head.appendChild(ey)}var eb=document.createElement("script"),ej=Z.seo_domain_name||window.location.hostname,eC='   {\n  "@context": "https://schema.org",\n  "@type": "Product",\n  "name": "'+ec+'",\n  "url": "'+window.location.href+'",\n  "description": "'+er+'",\n  "image":"'+el+'",\n  "offers": {\n    "@type": "Offer",                  \n    "priceCurrency": "INR",\n    "price": '+ei.toString()+',\n    "availability": "'+et+'",\n    "quantity":"1",\n    '.concat(ev?'"availability_date": "'+ev+'",':"",'\n    "itemCondition": "https://schema.org/NewCondition",\n    "seller": {\n      "@type": "Organization",\n      "name": "')+ej+'"\n  }\n\n\n  }\n \n \n }';eb.type="application/ld+json",eb.textContent=eC,document.head.appendChild(eb);let eN=(null===(g=i.data)||void 0===g?void 0:null===(v=g.b2b_price_break_up)||void 0===v?void 0:null===(_=v.b2b_price)||void 0===_?void 0:_.length)>0,eP=(null===(f=i.data)||void 0===f?void 0:null===(y=f.b2c_price_break_up)||void 0===y?void 0:null===(j=y.b2c_price)||void 0===j?void 0:j.length)>0,ek=$.query.pt||((null==s?void 0:s.price_type)?String(s.price_type):null),eS=eN?N(null===(w=i.data)||void 0===w?void 0:w.b2b_price_break_up,null===(P=i.data)||void 0===P?void 0:P.b2c_price_break_up,eg,null!==(G=null===(k=i.data)||void 0===k?void 0:k.stone_status)&&void 0!==G?G:null,ek):null;ea(null===(A=i.data)||void 0===A?void 0:A.b2b_price_break_up),es(null===(I=i.data)||void 0===I?void 0:I.b2c_price_break_up);let eA=N(null===(W=i.data)||void 0===W?void 0:W.b2b_price_break_up,null===(U=i.data)||void 0===U?void 0:U.b2c_price_break_up,eg,null!==(H=null===(M=i.data)||void 0===M?void 0:M.stone_status)&&void 0!==H?H:null,ek);ee(eA);let eT=eP?C(null===(L=i.data)||void 0===L?void 0:L.b2c_price_break_up,s.special_price_status,ew,s.click_and_collect_status,i.data.click_and_collect,eg):null;T({...o,...s,images:i.data.images,b2b_price_break_up:eS,b2c_price_break_up:eT,price:s.json.price,specialPrice
1:s.special_price,isSpecialPrice:s.special_price_status,grouping_products:o.grouping_products}),O({categoryName:null==s?void 0:s.category_name,image:i.data.images.base_image||"",name:s.product_name,id:s.product_id,price:s.json.price||0,productCount:1});let eI=i.data.related_product.map(e=>{var t;return{id:e.product_id,mProductId:null==e?void 0:e.product_id1,name:e.product_name||"",price:e.json.price||0,categoryName:e.json.category_name||"",weight:e.json.weight||null,url:e.url,image:e.images||"",hoverImage:(null===(t=null==e?void 0:e.thumbnail_image[1])||void 0===t?void 0:t.thumbnail_image)||"",isRemoved:!1,touch:e.json.touch,productCount:1,specialPrice:e.special_price,isSpecialPrice:e.special_price_status}});R(eI);let eR=i.data.similar_product.map(e=>{var t;return{id:e.product_id,mProductId:null==e?void 0:e.product_id1,name:e.product_name||"",price:e.json.price||0,categoryName:e.json.category_name||"",weight:e.json.weight||null,url:e.url,image:e.images||"",hoverImage:(null===(t=null==e?void 0:e.thumbnail_image[1])||void 0===t?void 0:t.thumbnail_image)||"",isRemoved:!1,touch:e.json.touch,productCount:1,specialPrice:e.special_price,isSpecialPrice:e.special_price_status}});q(eR),en(o.faq),F(i.data.frame_data||[])}else{let eW=window.location.href,eE=await Q.post("user/viewRedirect302",{old_url:eW});1==eE.data.status&&(window.location.href=eE.data.redirect[0].new_url)}}catch(eL){let eU=window.location.href,eq=await Q.post("user/viewRedirect302",{old_url:eU});1==eq.data.status&&(window.location.href=eq.data.redirect[0].new_url);let eM=Y[1],eO=(null==eL?void 0:null===(x=eL.response)||void 0===x?void 0:x.data)?eL.response.data:"";(0,b.Z)({job_id:J,endpoint:"product/getSingleProduct",payload:{pro:eM,promo_code:"{}"},responseData:eO,errorMsg:eL})}finally{B(!1)}};(0,s.useEffect)(()=>{ej()},[$]),(0,s.useEffect)(()=>{var e;(null==et?void 0:null===(e=et.b2b_price)||void 0===e?void 0:e.length)&&ee(H?P(et,ei,eg,H):N(et,ei,eg,er,eu))},[et,H,er,eu]),(0,s.useEffect)(()=>{Y&&z()},[Y]),(0,s.useEffect)(()=>{let e=document.getElementById("product-faq-schema");if(e&&e.remove(),Array.isArray(null==el?void 0:el.items)&&el.items.length>0){let t=document.createElement("script");t.id="product-faq-schema",t.type="application/ld+json",t.textContent=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:el.items.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))}),document.head.appendChild(t)}return()=>{let e=document.getElementById("product-faq-schema");e&&e.remove()}},[null==el?void 0:el.items]),x.BUILDER_URL;let ew=(null==ep?void 0:ep.user_type)||0,eC=ew>2,eN=2===ew,eP=e=>{em(e);let t=$.pathname,a={...$.query,pt:e};$.push({pathname:t,query:a},void 0,{shallow:!1})};return L?(0,i.jsx)(h.Z,{}):ef?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(_.default,{children:[(0,i.jsx)(g.Z,{title:null==ev?void 0:ev.title,description:null==ev?void 0:ev.description,keyword:null==ev?void 0:ev.keyword}),(0,i.jsx)("div",{className:"block xl:container px-4 py-4 ",children:(0,i.jsx)("div",{className:"flex flex-col space-y-4 md:space-y-10",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.default,{priceBreakUpConsolidated:k,slugData:W,snackBarProducts:M,product:A,productDetailsInfo:ef,frameData:D,scrollToRef:eb}),eh&&(null==ef?void 0:ef.price_breakdown)===1&&0==k&&(0,i.jsxs)(i.Fragment,{children:[(eN||eC)&&A.b2b_price_break_up&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between pt-4 sm:pt-6 md:pt-8",children:[(0,i.jsx)("span",{ref:u,className:"uppercase text-xl md:text-2xl text-gray-800 font-semibold text-center sm:text-left mb-3 sm:mb-0",children:"B2B Price Breakup"}),(0,i.jsxs)("div",{className:"flex items-center gap-6 flex-wrap",children:[1===er&&(0,i.jsx)("div",{className:"flex items-center gap-4",children:[{value:"1",label:"Gross"},{value:"2",label:"Net"}].map(e=>{let{value:t,label:a}=e;return(0,i.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[(0,i.jsx)("input",{type:"radio",name:"priceType",value:t,checked:eu===t,onChange:e=>eP(e.target.value),className:"w-5 h-5 accent-green-500"}),(0,i.jsx)("span",{className:"text-base font-medium text-gray-700",children:a})]},t)})}),1==A.b2b_wastage_status&&(0,i.jsxs)("div",{className:"inline-flex ml-8 md:ml-0 pr-9",children:[(0,i.jsx)("span",{className:"mr-2 text-gray-800 font-medium",children:"Show Wastage"}),(0,i.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,i.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:H,onChange:()=>K(!H)}),(0,i.jsx)("div",{className:"w-11 h-6 bg-gray-300 rounded-full peer-checked:bg-primary transition-colors duration-300"}),(0,i.jsx)("div",{className:"absolute left-1 top-1 w-4 h-4 bg-white rounded-full shadow-md transform transition-transform duration-300 peer-checked:translate-x-5"})]})]})]})]}),(0,i.jsx)(c.default,{data:X,showPurchaseCost:eN||eC})]}),(1===ew||0===ew||!ep||eN||eC)&&A.b2c_price_break_up&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h3",{ref:u,className:"uppercase text-2xl md:text-2xl pt-8 md:pt-0 text-gray-800 font-semibold flex justify-center lg:justify-start items-center",children:(null==ep?void 0:ep.user_type)!==1&&(null==ep?void 0:ep.user_type)!==0&&ep?"B2C Price Breakup":"Price Breakup"}),(0,i.jsx)(c.default,{data:A.b2c_price_break_up})]}),1==A.isSpecialPrice&&(1==ew||0==ew)&&(0,i.jsx)(i.Fragment,{children:233===J&&(0!=ex&&ex?(0,i.jsx)("div",{className:"p-4 mb-6 mt-4 rounded-md shadow-lg transition-transform transform",children:(0,i.jsx)("p",{className:"text-primary text-sm mb-2 font-normal",children:"Apply your privilege number at checkout to claim this offer"})}):(0,i.jsxs)("div",{className:"border p-4 mb-6 mt-4 rounded-lg shadow-md transition-transform transform hover:shadow-lg",children:[(0,i.jsx)("h2",{className:"font-bold text-primary text-sm mb-1",children:"Special price is for Privilege Customers Only"}),(0,i.jsx)("p",{className:"text-primary text-sm mb-2",children:"Become a Privilege Customer for free. Register now!"}),(0,i.jsx)("button",{onClick:()=>G($.asPath),className:"bg-primary text-white text-sm font-semibold py-1 px-4 roun
1ded transition duration-200 shadow-sm hover:shadow-md",children:"Register Now"})]}))})]})]})})}),(null==ef?void 0:ef.general_disclaimer)&&(0,i.jsx)("div",{className:"container shadow-sm mt-2 p-4 md:p-2 text-sm sm:text-base text-justify",dangerouslySetInnerHTML:{__html:(null==ef?void 0:ef.general_disclaimer)!==""?null==ef?void 0:ef.general_disclaimer.replace(/<p>/g,'<p class="mb-4">'):""}}),U&&0!==U.length&&(0,i.jsxs)("div",{className:"block xl:container px-4 pb-16 pt-8",children:[(0,i.jsx)("h3",{className:"uppercase text-2xl md:text-2xl text-gray-800 mb-6 font-semibold flex justify-center lg:justify-start items-center",children:"Similar Products"}),(0,i.jsx)(d.Z,{products:U,isLoading:L,isSpecificGrid:!0})]}),(0,i.jsx)("div",{className:"flex flex-col space-y-10",children:I&&0!==I.length&&(0,i.jsxs)("div",{className:"block xl:container px-4 pb-16",children:[(0,i.jsx)("h3",{className:"uppercase text-2xl md:text-2xl text-gray-800 mb-6 font-semibold flex justify-center lg:justify-start items-center",children:"Related Products"}),(0,i.jsx)(d.Z,{products:I,isLoading:L,isSpecificGrid:!0})]})}),Array.isArray(null==el?void 0:el.items)&&el.items.length>0&&(0,i.jsxs)("div",{className:"border border-gray-300 p-5 mt-2 mx-4 md:mx-8 mb-4 rounded-xl shadow-sm",children:[el.topic&&(0,i.jsx)("h2",{className:"text-xl font-semibold text-gray-800 mb-4 border-b border-gray-200 pb-2",children:el.topic||"FAQ Details"}),Array.isArray(null==el?void 0:el.items)&&el.items.length>0&&(0,i.jsx)("div",{className:"space-y-4",children:el.items.map((e,t)=>(0,i.jsxs)("div",{className:"flex gap-2 px-1 py-1",children:[(0,i.jsxs)("span",{className:"flex-shrink-0 text-base font-bold text-gray-700",children:[t+1,"."]}),(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)("p",{className:"text-md font-semibold text-gray-800",children:e.question}),(0,i.jsx)("p",{className:"text-sm text-gray-600 leading-relaxed",children:e.answer})]})]},t))})]})]})}):(0,i.jsx)(f.default,{})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.