1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7457],{89145:function(e,t,l){Promise.resolve().then(l.bind(l,14888)),Promise.resolve().then(l.bind(l,98087)),Promise.resolve().then(l.bind(l,47239)),Promise.resolve().then(l.t.bind(l,84798,23)),Promise.resolve().then(l.t.bind(l,65878,23)),Promise.resolve().then(l.t.bind(l,88003,23)),Promise.resolve().then(l.bind(l,4670)),Promise.resolve().then(l.bind(l,90099)),Promise.resolve().then(l.bind(l,24402)),Promise.resolve().then(l.bind(l,46175)),Promise.resolve().then(l.t.bind(l,97425,23)),Promise.resolve().then(l.t.bind(l,49608,23)),Promise.resolve().then(l.bind(l,83274)),Promise.resolve().then(l.bind(l,81518)),Promise.resolve().then(l.bind(l,30272)),Promise.resolve().then(l.bind(l,5242)),Promise.resolve().then(l.bind(l,15815)),Promise.resolve().then(l.bind(l,55286)),Promise.resolve().then(l.bind(l,14129)),Promise.resolve().then(l.bind(l,48258)),Promise.resolve().then(l.bind(l,47355)),Promise.resolve().then(l.bind(l,67545)),Promise.resolve().then(l.bind(l,49318)),Promise.resolve().then(l.t.bind(l,6680,23)),Promise.resolve().then(l.t.bind(l,21241,23))},81518:function(e,t,l){"use strict";l.r(t);var n=l(57437),s=l(2265),a=l(27648),r=l(13786),i=l(68412),o=l(57099);t.default=e=>{let{redirectLink:t,isHandleNetCore:l,payload:c,target:d,rel:u,isSalesAssistEvent:m,children:h}=e,[f,g]=(0,s.useState)(()=>m?{event:o.HA.EVENT,page_name:"",page_url:"",product_name:""}:null);return(0,s.useEffect)(()=>{m&&g({event:o.HA.EVENT,page_name:document.title,page_url:window.location.href,product_name:""})},[m]),t||""===t||m&&null!=t?(0,n.jsx)(a.default,{href:t,className:"text-decoration-none cursor-pointer",...d&&{target:d},...u&&{rel:u},...l&&{onClick:()=>{(0,r.sendGTMEvent)({...c,page_name:document.title,page_url:window.location.href})}},...m&&{onClick:()=>(0,i.qE)(f)},prefetch:!1,children:h}):(0,n.jsx)(n.Fragment,{children:h})}},30272:function(e,t,l){"use strict";var n=l(2265),s=l(80605);t.default=e=>{let{clientId:t}=e,{status:l}=(0,s.useSession)(),a=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{"loading"!==l&&"authenticated"!==l&&window.google&&!a.current&&(window.google.accounts.id.initialize({client_id:t,callback:async e=>{let t=await (0,s.signIn)("google-onetap",{credential:e.credential,redirect:!1,use_fedcm_for_prompt:!0,itp_support:!0});(null==t?void 0:t.ok)&&console.log("Silent login successful!")}}),window.google.accounts.id.prompt(),a.current=!0)},[l,t]),null}},5242:function(e,t,l){"use strict";l.d(t,{MobileVerificationPopUp:function(){return C}});var n=l(57437),s=l(2265),a=l(918),r=l(29501),i=l(13590),o=l(92286),c=l(57797),d=l(71679),u=l(27648),m=l(68017),h=l(45061),f=l(19405),g=l(61418),p=l(30963),v=l(68412),x=e=>{var t;let{showModal:l,handleClose:a,handleVerifyOtp:x,mobileNumber:b}=e,{register:j,handleSubmit:y,setValue:N,formState:{errors:w,isValid:_}}=(0,r.cI)({resolver:(0,i.F)(d.v$),mode:"onChange"}),[C,k]=(0,s.useState)(!1),[S,R]=(0,s.useState)(40);(0,s.useEffect)(()=>{let e;return C&&S>0&&(e=setInterval(()=>{R(e=>e-1)},1e3)),0===S&&(k(!1),clearInterval(e)),()=>clearInterval(e)},[C,S]);let Z=async()=>{try{let e=await (0,m.vN)(b);
1!0===e?((0,h.C)(p.N.OTP_RESEND_SUCCESS),k(!0),R(40)):(0,h.C)({message:null==e?void 0:e.error,type:"error"})}catch(e){(0,h.C)(p.N.COMMON_ERROR)}},E=(e,t,l)=>{let n=e.target.value;N(t,(0,v.Vl)(l,n),{shouldValidate:!0})};return(0,n.jsxs)(c.Z,{show:l,onHide:a,className:"grt-offcanvas variant-2",position:"end",closingButtonRequired:!1,children:[(0,n.jsx)("div",{className:"customoverlay-drawer-header",children:(0,n.jsx)("h2",{className:"overlay-drawer-title",children:"Verify Mobile Number"})}),(0,n.jsxs)("div",{className:"custom-drawer-body",children:[(0,n.jsx)("p",{children:"You will receive an OTP via SMS"}),(0,n.jsx)("p",{className:"mb-4",children:b}),(0,n.jsxs)("form",{onSubmit:y(x),children:[(0,n.jsx)(o.Z,{fieldType:"text",name:"otp",register:j,placeholder:"Enter OTP*",ariaLabel:"otp-input",className:"otp-input-field",onChange:e=>E(e,"otp","numeric"),error:null===(t=w.otp)||void 0===t?void 0:t.message}),(0,n.jsxs)("div",{className:"d-flex mt-4",children:[(0,n.jsx)(g.zx,{handleClick:f.hY,className:"grt-btn btn--ruby btn--outline me-3",children:"Log out"}),(0,n.jsx)(g.zx,{type:"submit",className:"grt-btn btn--ruby btn--medium ".concat(!_&&"disabled-btn"),disabled:!_,children:"Continue"})]})]}),(0,n.jsxs)("p",{className:"resend-otp-link footer-link-style",children:["Didn't receive code? ","",(0,n.jsxs)(u.default,{href:"#",onClick:e=>{e.preventDefault(),C||Z()},className:C?"disabled-link":"",prefetch:!1,children:["Resend OTP ",C&&"(".concat(S,"s)")]})]})]})]})},b=l(99376),j=l(80605),y=l(91351),N=l(46175);let w=y.Ry({mobileNumber:y.Z_().regex(/^\d{10}$/,"*Invalid mobile number").nonempty("Mobile Number is Required"),otp:y.Z_().regex(/^\d{3,10}$/,"*Invalid OTP").optional()});var _=e=>{var t,l;let{onVerificationSuccess:a}=e,{data:d}
1=(0,j.useSession)(),[v,x]=(0,s.useState)(!1),[y,_]=(0,s.useState)(!1),[C,k]=(0,s.useState)(40),S=(0,b.useRouter)(),{register:R,handleSubmit:Z,formState:{errors:E},reset:T,getValues:I}=(0,r.cI)({resolver:(0,i.F)(w),mode:"onChange"}),M=async e=>{try{let t=await (0,m._Z)(e,"social");!0===t?(N.default.success("OTP sent successfully"),x(!0),_(!0),k(40)):(0,h.C)({message:null==t?void 0:t.error,type:"error"})}catch(e){N.default.error("An error occurred while sending OTP. Please try again.")}},P=async e=>{try{let t=await (0,m.Mu)(e);!0===t?(d.accountProvider="",(0,h.C)(p.N.OTP_VERIFICATION_SUCCESS),T(),a(),S.push("/")):(0,h.C)({message:null==t?void 0:t.error,type:"error"})}catch(e){(0,h.C)(p.N.OTP_VERIFICATION_FAILED)}},O=async()=>{try{let e=I("mobileNumber"),t=await (0,m.vN)(e);!0===t?(N.default.success(p.N.OTP_RESEND_SUCCESS.message),_(!0),k(40)):N.default.error(null==t?void 0:t.error)}catch(e){N.default.error(p.N.COMMON_ERROR.message)}};return(0,s.useEffect)(()=>{let e;return v&&C>0&&(e=setInterval(()=>{k(e=>e-1)},1e3)),0===C&&(_(!1),clearInterval(e)),()=>clearInterval(e)},[v,C]),(0,n.jsxs)(c.Z,{show:!0,onHide:()=>{},className:"grt-offcanvas variant-2",position:"end",closingButtonRequired:!1,children:[(0,n.jsx)("div",{className:"customoverlay-drawer-header",children:(0,n.jsx)("h2",{className:"overlay-drawer-title",children:"Verify Your Mobile Number"})}),(0,n.jsxs)("div",{className:"custom-drawer-body",children:[(0,n.jsxs)("p",{className:"d-flex justify-content-center text-center",children:["Get Ready to Enjoy Exclusive Benefits! ",(0,n.jsx)("br",{}),"Verify Your Mobile Number Now!"]})," ",(0,n.jsx)("br",{}),(0,n.jsxs)("form",{onSubmit:Z(e=>{var t,l;v?P(null!==(t=e.otp)&&void 0!==t?t:""):M(null!==(l=e.mobileNumber)&&void 0!==l?l:"")}),children:[(0,n.jsx)(o.Z,{name:"mobileNumber",className:"otp-input-field",fieldType:"text",placeholder:"Mobile Number",error:null===(t=E.mobileNumber)||void 0===t?void 0:t.message,register:R,disabled:v,maxLength:10}),v&&(0,n.jsx)(o.Z,{name:"otp",className:"otp-input-field",error:null===(l=E.otp)||void 0===l?void 0:l.message,fieldType:"text",placeholder:"OTP",register:R}),(0,n.jsxs)("div",{className:"d-flex justify-content-center mt-4",children:[(0,n.jsx)(g.zx,{type:"submit",disabled:!v&&y,className:"grt-btn btn--ruby btn--medium me-3",children:v?"Verify OTP":"Get OTP"}),(0,n.jsx)(g.zx,{handleClick:f.hY,className:"grt-btn btn--ruby btn--medium",children:"Log out"})]}),v&&(0,n.jsxs)("p",{className:"resend-otp-link footer-link-style",children:["Didn't receive code? ","",(0,n.jsxs)(u.default,{href:"#",onClick:e=>{e.preventDefault(),y||O()},className:y?"disabled-link":"",prefetch:!1,children:["Resend OTP ",y&&"(".concat(C,"s)")]})]})]})]})]})};let C=()=>{let e=(0,b.useRouter)(),{data:t,status:l}=(0,j.useSession)(),[r,i]=(0,s.useState)(!1),{handleVerifyOtp:o,showMobileAuthModal:c,setShowMobileAuthModal:d,getMobileNumber:u}=(0,a.Z)(),[f,g]=(0,s.useState)(!1),v=(0,s.useCallback)(async()=>{if("loading"!==l)try{let e=await (0,m.dF)();if(null===e)return;if(!1===e&&"authenticated"===l&&d(!0),g(e),"authenticated"===l&&(null==t?void 0:t.accountProvider)==="google"&&!1===e){i(!0);return}}catch(e){(0,h.C)(p.N.MOBILE_VERIFICATION_ERROR)}},[l,t,e,d]);(0,s.useEffect)(()=>{"authenticated"===l&&!1===f&&v()},[l,f,v]);let y=!f&&(null==t?void 0:t.accountProvider)==="",N=u();return(0,n.jsxs)("div",{children:[y&&(0,n.jsx)(x,{showModal:c,handleClose:()=>{},handleVerifyOtp:o,mobileNumber:N}),!1===f&&r&&(0,n.jsx)(_,{onVerificationSuccess:()=>g(!0)})]})}},12350:function(e,t,l){"use strict";l.r(t);var n=l(57437),s=l(2265),a=l(90099),r=l(78707),i=l(29535);let o={heading:"Somethingâs missing",message:"We couldn't find the page you were looking for."},c={order:{heading:"No orders found",message:"You haven't placed any orders yet.",icon:"bi bi-box-seam"},review:{heading:"No reviews found",message:"You haven't left any reviews yet.",icon:"bi bi-list-stars"},wishlist:{heading:"No items in wishlist",message:"Your wishlist is currently empty.",icon:"bi bi-bag-heart"}},d=e=>e?c[e]:o,u=e=>(null==e?void 0:e.items.map(e=>{var t;let l=null===(t=e.custom_attributes.find(e=>"product_price_details"===e.attribute_code))||void 0===t?void 0:t.value;return{...e,url_key:null==e?void 0:e.product_url_links,product_price_details:l}}))||[],m=async(e,t)=>{try{let l=await (0,i.yz)({currentPage:1,pageSize:16},void 0,void 0,void 0,e),n=u(l);t(n||[])}catch(e){console.error("Error fetching product list:",e)}};t.default=e=>{let{type:t,category_id:l}
1=e,[i,o]=(0,s.useState)([]),u=d(t),h=t?c[t].icon:"";return(0,s.useEffect)(()=>{l&&m(l,o)},[l]),(0,n.jsx)("section",{className:"notfound-empty-section",children:(0,n.jsxs)(a.default,{children:[(0,n.jsx)("h1",{className:"fs26-variant2 mb-3",children:u.heading}),(0,n.jsxs)("section",{className:"notfound-empty-content",children:[(0,n.jsxs)("div",{className:"icon-not-found",children:[h&&(0,n.jsx)("i",{className:h}),(0,n.jsx)("h2",{className:"fs24-variant2",children:u.message})]}),!t&&(0,n.jsx)(r.Z,{products:i})]})]})})}},15815:function(e,t,l){"use strict";var n=l(57099),s=l(99376),a=l(2265),r=l(4828),i=l.n(r);t.default=()=>{let e=(0,s.usePathname)(),t={gtmId:"GTM-KJWJB7M"};return(0,a.useEffect)(()=>{i().initialize(t),i().dataLayer({dataLayer:{event:n.zP,page_url:window.location.href,page_title:document.title}})},[e]),null}},55286:function(e,t,l){"use strict";var n=l(57437),s=l(2265),a=l(27648),r=l(4670),i=l(8166),o=l(61418),c=l(73221),d=l(13786),u=l(57099);t.default=e=>{let{tabTitle:t,additionalFields:l}=e,[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),p=e=>{h(!0),(0,d.sendGTMEvent)({event:u.HQ,page_name:document.title,page_url:window.location.href,footer_name:e})},v=e=>{(0,d.sendGTMEvent)({event:u.HQ,page_name:document.title,page_url:window.location.href,footer_name:e})};return(0,n.jsxs)(r.default,{xs:12,lg:4,className:"footer__content-submenus",children:[(0,n.jsxs)("div",{className:"title",children:[t,(0,n.jsx)("span",{className:"d-block d-lg-none",children:(0,n.jsx)(o.zx,{handleClick:()=>{g(e=>!e)},"aria-label":f?"Collapse submenu":"Expand submenu",className:"plus-icon",children:(0,n.jsx)("i",{className:f?"bi bi-dash-lg":"bi bi-plus-lg"})})})]}),(0,n.jsx)("ul",{className:f?"":"d-none d-md-block",children:null==l?void 0:l.map(e=>{var l,s;return(0,n.jsxs)("li",{children:[(null==e?void 0:e.image)&&(0,n.jsx)(c.xu,{src:"".concat("https://media.grtjewels.com","/").concat(null==e?void 0:e.image),alt:"Icon representing ".concat(null!==(l=null==e?void 0:e.title)&&void 0!==l?l:t),title:null!==(s=null==e?void 0:e.title)&&void 0!==s?s:t,width:"32",height:"32",className:"footer__icon image-ht-auto"}),"Enquiry Form"===e.title?(0,n.jsx)(o.zx,{className:"enquiry-link",onClick:()=>p(e.title),"aria-label":"enquiry-link",children:e.title}):e.title,e.subtitle?(0,n.jsx)("p",{className:"",children:e.subt
1itle}):"",e.buttonLink&&(0,n.jsx)(a.default,{onClick:()=>{v(null==e?void 0:e.buttonLinkText)},href:e.buttonLink,prefetch:!1,children:e.buttonLinkText?e.buttonLinkText:"Learn more"}),(0,n.jsx)("p",{children:e.content})]},null==e?void 0:e.additionalId)})}),m&&(0,n.jsx)(i.Z,{status:m,onClose:()=>{h(!1)}})]})}},14129:function(e,t,l){"use strict";l.d(t,{default:function(){return eD}});var n=l(57437),s=l(2265),a=l(99376),r=l(33145),i=l(27648),o=l(5090),c=l(90099),d=l(96926),u=l(68412),m=l(13786),h=l(57099),f=l(188),g=e=>{var t,l;let{settingsData:g}=e,p=(0,a.usePathname)(),{currency_details:v,module_status:x,gold_rate:b}=g,j=null==x?void 0:x.themes,y=b.find(e=>!0===e.default),N=(null==y?void 0:y.purity)?"".concat(y.purity,"/1g - "):"1g - ",w=y?"".concat(y.type," ").concat(N," ").concat(v.base_currency_symbol," ").concat(y.amount):"Default rate not found",_=(0,s.useMemo)(()=>(0,u.rD)(p,j),[p,j]),C=(0,s.useCallback)((e,t)=>{var l;return Object.fromEntries(null===(l=Object.entries(e).filter(e=>{let[,l]=e;return l.label.toLowerCase()!==t.label.toLowerCase()&&l.enabled}))||void 0===l?void 0:l.map(e=>{let[t,l]=e;return"default"===t?[t,{...l,path:"/"}]:l.is_external?[t,{...l,path:"".concat(l.url)}]:[t,{...l,path:"/".concat(t)}]}))},[])(j,_),k=()=>{(0,m.sendGTMEvent)({event:h.DY,page_url:window.location.href,page_name:document.title})},S=(0,f.af)(x,"need_help"),R=(0,f.af)(x,"store_locator");return(0,n.jsx)(c.default,{children:(0,n.jsx)("div",{className:"top-navbar-section",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("div",{className:"col-md-6 col-lg-5 d-none d-md-flex",children:(0,n.jsx)("ul",{className:"top-header-links d-flex top-grt-logos py-1",children:null===(t=Object.values(C))||void 0===t?void 0:t.map((e,t)=>(null==e?void 0:e.enabled)?(0,n.jsx)("li",{children:(0,n.jsx)(i.default,{href:"".concat(null==e?void 0:e.url),className:"logo-wrapper",prefetch:!1,target:(null==e?void 0:e.is_external)?"_blank":"_self",rel:(null==e?void 0:e.is_external)?"noopener noreferrer":void 0,children:(null==e?void 0:e.logo)?(0,n.jsx)("img",{src:"".concat("https://media.grtjewels.com","/").concat(null==e?void 0:e.logo),className:"img-fluid",alt:null==e?void 0:e.label}):null==e?void 0:e.label})},t+1):"")})}),(0,n.jsx)("div",{className:"col-12 col-md-6 col-lg-7 top-header-section",children:(0,n.jsx)("div",{className:"d-flex justify-content-md-end inner-wrapper justify-center",children:(0,n.jsxs)("ul",{className:"top-header-right py-1",children:[(0,n.jsx)("li",{className:"price-dropdown-select",children:(0,n.jsxs)("div",{className:"select-dropdown",children:[(0,n.jsx)("div",{className:"no-shrink pe-2",children:(0,n.jsx)(r.default,{src:"/assests/images/".concat(null==y?void 0:null===(l=y.type)||void 0===l?void 0:l.toLowerCase(),"-coin.png"),alt:"gold-coin",className:"img-fluid",width:25,height:25})}),(0,n.jsx)(d.Z,{id:"dropdown-basic-button1",title:w,onClick:()=>{(0,m.sendGTMEvent)({event:h.cV,page_name:document.title,page_url:window.location.href})},children:null==b?void 0:b.sort((e,t)=>e.sort_order-t.sort_order).map((e,t)=>{var l,s;let a="/assests/images/".concat(null===(l=e.type)||void 0===l?void 0:l.toLowerCase(),"-coin.png"),i="".concat(null===(s=e.type)||void 0===s?void 0:s.toLowerCase(),"-coin"),c=e.purity?"".concat(e.purity,"/1g - "):"1g - ",d="".concat(v.base_currency_symbol," ").concat(e.amount);return(0,n.jsxs)(o.Z.Item,{children:[(0,n.jsx)(r.default,{src:a,alt:i,className:"img-fluid image-ht-auto me-2",width:25,height:25}),(0,n.jsx)("span",{className:"gold-rate",children:"".concat(e.type," ").concat(c," ").concat(d)})]},t+1)})})]})}),R&&(0,n.jsx)("li",{className:"d-none d-md-block storelocator-menu-icon",children:(0,n.jsx)(i.default,{href:"/storelocator",prefetch:!1,onClick:()=>k(),children:(0,n.jsx)(r.default,{src:"/assests/images/location.png",title:"Store Locator",className:"img-fluid image-ht-auto location-img",alt:"image",width:33,height:32})})}),(0,n.jsx)("li",{className:"d-none d-md-block",children:(0,n.jsx)(i.default,{href:(null==g?void 0:g.flip_calendar)||"#",target:"_blank",prefetch:!1,children:(0,n.jsx)(r.default,{src:"/assests/images/calendar.svg",className:"img-fluid image-ht-auto",title:"GRT Calender Online",alt:"Calendar Icon",width:25,height:25})})}),(0,n.jsxs)("li",{className:"d-flex d-md-none mobile-topheader-icon me-0",children:[(0,n.jsx)(i.default,{href:"/storelocator",onClick:()=>k(),prefetch:!1,children:(0,n.jsx)(r.default,{src:"/assests/images/location.png",className:"img-fluid image-ht-auto me-2",title:"Store Locator",alt:"image",width:30,height:30})}),(0,n.jsx)(i.default,{href:(null==g?void 0:g.flip_calendar)||"#",target:"_blank",prefetch:!1,children:(0,n.jsx)(r.default,{src:"/assests/images/calendar.svg",className:"img-fluid image-ht-auto",title:"GRT Calender Online",alt:"Calendar Icon",width:25,height:25})})]}),(0,n.jsx)("li",{className:"d-none d-lg-inline-flex country-dropdown order-4",children:(0,n.jsxs)("div",{className:"select-dropdown",children:[(0,n.jsx)(r.default,{src:"/assests/images/".concat("inr","-flag.png"),alt:"".concat("INR"," Flag"),title:"Currency",width:25,height:25,className:"img-fluid flag-img"}),(0,n.jsxs)("span",{className:"ps-2",children:[" ","INR"]})]})}),S&&(0,n.jsx)("li",{className:"d-none d-lg-inline-flex order-5",children:(0,n.jsx)(i.default,{href:"/contact-us",prefetch:!1,children:"Need help?"})})]})})})]})})})},p=l(80605),v=l(13239),x=l(34537),b=l(52067),j=e=>{let{headerType:t="generic",backgroundColor:l,color:r}
1=e,o=(0,a.usePathname)(),[c,d]=(0,s.useState)(0),{cartData:u}=(0,x.Z)();(0,s.useEffect)(()=>{u&&d((null==u?void 0:u.items_qty)||0)},[u]);let m=o&&h.Z8.test(o),f=o&&h.Pd.test(o);return(0,n.jsx)(b.M,{condition:!(m&&!f),children:"cart"===t?(0,n.jsxs)("p",{className:"cart-count d-none d-md-block",children:["Shopping Cart (",c,")"]}):(0,n.jsxs)(i.default,{href:"/checkout/cart",prefetch:!1,children:[(0,n.jsx)("div",{style:{color:null!=r?r:"#681016"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"24",viewBox:"0 0 19 24",fill:"none",children:[(0,n.jsx)("title",{children:"My Cart"}),(0,n.jsx)("mask",{id:"path-1-inside-1_35002_5364",fill:"white",children:(0,n.jsx)("rect",{x:"0.820312",y:"4.67969",width:"16.5734",height:"18.2885",rx:"1.17708"})}),(0,n.jsx)("rect",{x:"0.820312",y:"4.67969",width:"16.5734",height:"18.2885",rx:"1.17708",stroke:r,strokeWidth:"3.53125",mask:"url(#path-1-inside-1_35002_5364)"}),(0,n.jsx)("path",{d:"M12.5606 7.90041V5.0313C12.5606 3.05926 11.0179 1.46097 9.1152 1.46097C7.21162 1.45249 5.66154 3.04318 5.65332 5.01522V5.0313V7.90041",stroke:r,strokeWidth:"1.76562",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,n.jsx)("span",{style:{backgroundColor:null!=l?l:"inherit"},children:c})]})})},y=l(92286),N=l(61418),w=l(2770),_=e=>{let{icon:t,size:l=24,...s}=e;return(0,n.jsx)(w.ZPm,{icon:t,size:l,...s})},C=()=>{let[e,t]=(0,s.useState)(""),[l,n]=(0,s.useState)(!1),[a,r]=(0,s.useState)(null),[i,o]=(0,s.useState)(!1),c=(0,s.useRef)(null);return(0,s.useEffect)(()=>{(async()=>{try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop()),o(!0),r(null)}catch(e){console.error("Microphone access denied or failed:",e),r("Please enable microphone permissions in your browser settings.")}})()},[]),(0,s.useEffect)(()=>{if(i&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)){let e=new(window.SpeechRecognition||window.webkitSpeechRecognition);e.lang="en-US",e.interimResults=!0,e.maxAlternatives=1,c.current=e,e.onresult=e=>{t(e.results[e.resultIndex][0].transcript)},e.onerror=e=>{console.error("Speech recognition error:",e.error),r("Speech recognition error: ".concat(e.error)),n(!1)},e.onend=()=>{n(!1)}}else i?(console.error("Speech Recognition API is not supported in this browser"),r("Speech Recognition API is not supported in this browser.")):(console.error("Microphone permission denied."),r("Microphone permission is required to use speech recognition."));return()=>{c.current&&c.current.stop()}},[i]),{transcript:e,setTranscript:t,isRecording:l,error:a,handlePressStart:()=>{c.current&&(t(""),n(!0),c.current.start())},handlePressEnd:()=>{c.current&&(c.current.stop(),n(!1))}}},k=l(18492),S=l(63735),R=e=>{let{showDrawer:t,onClose:l,fontColor:s}=e,{transcript:i,setTranscript:o,isRecording:c,error:d,handlePressStart:u,handlePressEnd:m}=C(),h=(0,a.useRouter)();return t&&(0,n.jsxs)(k.Z,{show:t,onHide:l,className:"voicesearch-popup",children:[(0,n.jsx)(k.Z.Header,{closeButton:!0,children:(0,n.jsx)(k.Z.Title,{children:(0,n.jsx)("h1",{children:"Tell us what you're searching for"})})}),(0,n.jsx)(k.Z.Body,{children:(0,n.jsxs)("div",{className:"custom-drawer-body",children:[d&&(0,n.jsx)(S.default,{variant:"danger",children:d}),(0,n.jsx)(N.zx,{onMouseDown:u,onMouseUp:m,onTouchStart:u,onTouchEnd:m,children:c?(0,n.jsx)("span",{className:"voice-search-icon before-after-icon",onContextMenu:e=>e.preventDefault(),children:(0,n.jsx)(r.default,{src:"/assests/images/Voice.svg",width:35,height:40,alt:"Voice Search"})}):(0,n.jsx)("span",{className:"voice-search-icon",onContextMenu:e=>e.preventDefault(),children:(0,n.jsx)(r.default,{src:"/assests/images/Voice.svg",width:35,height:40,alt:"Voice Search"})})}),(0,n.jsx)("p",{className:"text-center",children:"Press and Hold to record your query "}),(0,n.jsxs)("section",{children:[(0,n.jsx)(y.Z,{fieldType:"text",name:"voice-search",value:i,disabled:!0,fontColor:s,placeholder:"gift for babies"}),(0,n.jsx)(N.zx,{className:"grt-btn btn--medium btn--ruby","aria-label":"Search",handleClick:()=>{i.trim()&&h.push("/catalogsearch/result/?q=".concat(encodeURIComponent(i))),o(""),l()},children:"Search Results"})]})]})})]})},Z=e=>{var t,l,a,r;let{showSuggestions:c,setShowSuggession:d,inputValue:u,handleInputChange:m,suggestions:h,isFetching:f,handleSearch:g,handleClickSuggestion:p,fontColor:v,inputStyle:x,settingsData:b}
1=e,[j,w]=(0,s.useState)(!1),C=null==b?void 0:null===(l=b.module_status)||void 0===l?void 0:null===(t=l.image_search)||void 0===t?void 0:t.is_enabled,k=null==b?void 0:null===(r=b.module_status)||void 0===r?void 0:null===(a=r.voice_search)||void 0===a?void 0:a.is_enabled;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.Z,{fieldType:"text",name:"global-search",value:u,onKeyDown:e=>{"Enter"===e.key&&g()},onChange:m,fontColor:v,style:x}),(0,n.jsx)("span",{style:{color:v},children:(0,n.jsx)(_,{icon:"search",className:"search-icon"})}),(0,n.jsxs)("div",{className:"input-icons",children:[C&&(0,n.jsx)("span",{style:{color:null!=v?v:"#681016"},className:"me-2 cursor-pointer",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.0",width:"24.000000pt",height:"24.000000pt",viewBox:"0 0 24.000000 24.000000",preserveAspectRatio:"xMidYMid meet",style:{width:"20px"},children:(0,n.jsxs)("g",{transform:"translate(0.000000,24.000000) scale(0.100000,-0.100000)",fill:v,stroke:"none",children:[(0,n.jsx)("path",{d:"M27 212 c-10 -10 -17 -27 -16 -38 0 -14 3 -12 10 8 6 15 22 31 37 37 23 8 24 10 6 10 -11 1 -28 -7 -37 -17z"}),(0,n.jsx)("path",{d:"M188 220 c12 -5 27 -22 33 -37 7 -16 13 -23 16 -15 8 21 -25 62 -50 61 l-22 0 23 -9z"}),(0,n.jsx)("path",{d:"M90 175 c-7 -8 -19 -15 -27 -15 -11 0 -13 -12 -11 -52 l3 -53 58 -3 c70 -4 87 7 87 57 0 30 -6 42 -30 59 -34 26 -63 28 -80 7z m78 -15 c18 -15 23 -27 20 -57 l-3 -38 -60 0 -60 0 -3 38 c-3 30 2 42 20 57 13 11 32 19 43 19 11 0 30 -8 43 -19z"}),(0,n.jsx)("path",{d:"M100 125 c-11 -13 -11 -19 3 -32 21 -21 49 -9 45 19 -4 28 -30 35 -48 13z m40 -15 c0 -11 -6 -20 -13 -20 -19 0 -27 10 -20 26 8 21 33 17 33 -6z"}),(0,n.jsx)("path",{d:"M10 63 c0 -28 26 -53 53 -52 21 2 21 2 -1 6 -15 3 -29 17 -37 36 -12 26 -14 28 -15 10z"}),(0,n.jsx)("path",{d:"M220 51 c0 -12 -11 -23 -27 -29 -23 -9 -25 -11 -7 -11 22 -1 54 27 54 47 0 7 -4 12 -10 12 -5 0 -10 -9 -10 -19z"})]})})}),k&&(0,n.jsx)("span",{style:{color:null!=v?v:"#681016"},className:"cursor-pointer",children:(0,n.jsxs)("svg",{onClick:()=>w(!0),xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M11.1191 20.9679V18.0703",stroke:v,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1191 14.4102C9.06281 14.4102 7.39551 12.7361 7.39551 10.6703V6.37368C7.39551 4.30786 9.06281 2.63281 11.1191 2.63281C13.1763 2.63281 14.8427 4.30786 14.8427 6.37368V10.6703C14.8427 12.7361 13.1763 14.4102 11.1191 14.4102Z",stroke:v,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M18.4528 10.6992C18.4528 14.7681 15.1701 18.0671 11.119 18.0671C7.06887 18.0671 3.78613 14.7681 3.78613 10.6992",stroke:v,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsx)(N.zx,{className:"search-icon-bg",style:{backgroundColor:v},"aria-label":"Search",handleClick:g}),(0,n.jsx)("div",{className:"position-absolute global-search",children:(0,n.jsx)(o.Z,{as:"div",className:"suggestion-search-section",show:c,onToggle:e=>d(e),children:(0,n.jsxs)(o.Z.Menu,{as:"div",className:"suggestion-search-innercontainer",style:{color:v},children:[(0,n.jsx)("h2",{style:{color:v},children:"Suggested Searches"}),(0,n.jsx)("ul",{className:"mt-2 ".concat(h.length>5?"overflow-menu":""),children:f?(0,n.jsx)("li",{style:{color:v},children:"Loading..."}):h.length>0?h.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i.default,{href:(null==e?void 0:e.page_redirect)?"/".concat(e.page_redirect):"/catalogsearch/result/?q=".concat(encodeURIComponent(e.title)),onClick:p,style:{color:v},prefetch:!1,children:e.title})},e.title)):(0,n.jsx)("li",{style:{color:v},children:"No suggestions found"})})]})})}),k&&(0,n.jsx)(R,{showDrawer:j,onClose:()=>w(!1),fontColor:v})]})},E=e=>{var t,l,a,r,c,m,f,g,p,v;let{fontColor:x,bodyClass:b,settingsData:j}=e,[y,N]=(0,s.useState)({event:h.HA.EVENT,page_name:"",page_url:"",product_name:""});return(0,s.useEffect)(()=>{N(e=>({...e,page_name:document.title,page_url:window.location.href}))},[]),(0,n.jsxs)("ul",{className:"align-items-center second-lvl-header d-none d-md-flex no-shrink ps-3",children:[(0,n.jsx)("li",{children:(null==j?void 0:null===(l=j.module_status)||void 0===l?void 0:null===(t=l.quick_delivery)||void 0===t?void 0:t.is_enabled)?(0,n.jsx)(i.default,{href:null==j?void 0:null===(r=j.module_status)||void 0===r?void 0:null===(a=r.quick_delivery)||void 0===a?void 0:a.quick_delivery_url,prefetch:!1,children:(0,n.jsxs)("div",{className:"d-flex align-items-center pe-xxl
1-3 cursor-pointer pe-2",children:[(0,n.jsx)("span",{style:{color:null!=x?x:"#681016"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"31",height:"31",viewBox:"0 0 31 31",fill:"none",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_10867_23039)",children:[(0,n.jsx)("path",{d:"M20.1787 4.09375H1.42871V20.3438H20.1787V4.09375Z",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M20.1787 10.3438H25.1787L28.9287 14.0938V20.3438H20.1787V10.3438Z",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.05469 26.5937C8.78058 26.5937 10.1797 25.1946 10.1797 23.4687C10.1797 21.7429 8.78058 20.3438 7.05469 20.3438C5.3288 20.3438 3.92969 21.7429 3.92969 23.4687C3.92969 25.1946 5.3288 26.5937 7.05469 26.5937Z",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M23.3037 26.5937C25.0296 26.5937 26.4287 25.1946 26.4287 23.4687C26.4287 21.7429 25.0296 20.3438 23.3037 20.3438C21.5778 20.3438 20.1787 21.7429 20.1787 23.4687C20.1787 25.1946 21.5778 26.5937 23.3037 26.5937Z",stroke:x,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_10867_23039",children:(0,n.jsx)("rect",{width:"30",height:"30",fill:"white",transform:"translate(0.179688 0.34375)"})})})]})}),(0,n.jsx)("p",{className:"ps-lg-2 ps-1",style:{color:null!=x?x:"#681016"},children:(null==j?void 0:null===(m=j.module_status)||void 0===m?void 0:null===(c=m.quick_delivery)||void 0===c?void 0:c.quick_label)||"QUICK DELIVERY"})]})}):(0,n.jsx)("div",{})}),(0,n.jsx)("li",{children:(0,n.jsx)("div",{className:"d-flex align-items-center ps-xxl-3 ps-2",children:(0,n.jsxs)("div",{className:"select-dropdown navbar-menu ".concat(b),children:[(0,n.jsx)("div",{className:"pe-lg-2 pe-1",children:(0,n.jsx)("span",{style:{color:null!=x?x:"#681016"},children:(0,n.jsx)(_,{icon:"home",className:"menubar-homeicon"})})}),(0,n.jsxs)(d.Z,{id:"dropdown-basic-button",title:(0,n.jsx)("span",{style:{color:null!=x?x:"#681016"},children:"VIRTUAL SHOPPING"}),children:[(null==j?void 0:null===(g=j.module_status)||void 0===g?void 0:null===(f=g.grt_live)||void 0===f?void 0:f.is_enabled)&&(0,n.jsx)(o.Z.Item,{href:"/grtlive",rel:"noopener noreferrer",style:{color:null!=x?x:"#681016"},children:"GRT Live"}),(null==j?void 0:null===(v=j.module_status)||void 0===v?void 0:null===(p=v.instant_video)||void 0===p?void 0:p.is_enabled)&&(0,n.jsx)(o.Z.Item,{id:"videoCallButton",onClick:()=>(0,u.qE)(y),rel:"noopener noreferrer",style:{color:null!=x?x:"#681016"},children:"Instant video shopping"})]})]})})})]})},T=l(61220),I=e=>{let{backgroundColor:t,color:l}=e,[a,r]=(0,s.useState)(0),{wishlistCount:o}=(0,T.Z)();return(0,s.useEffect)(()=>{r(null!=o?o:0)},[o]),(0,n.jsxs)(i.default,{href:"/wishlist",prefetch:!1,children:[(0,n.jsx)("div",{style:{color:null!=l?l:"#681016"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:[(0,n.jsx)("title",{children:"Wishlist"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.1348 1.84032C14.0487 0.630275 16.5912 0.295983 18.7877 0.999879C23.5655 2.54068 25.0486 7.74927 23.722 11.8938C21.6751 18.4031 12.9329 23.2585 12.5621 23.4622C12.4302 23.5351 12.2843 23.5716 12.1383 23.5716C11.9924 23.5716 11.8476 23.5363 11.7158 23.4645C11.3473 23.2632 2.6687 18.4796 0.553476 11.895L0.552299 11.8938C-0.775451 7.7481 0.702966 2.53833 5.47604 0.999879C7.71721 0.274795 10.1597 0.593785 12.1348 1.84032ZM6.0175 2.68075C2.15549 3.92611 1.18557 8.08004 2.23435 11.3559C3.88462 16.4903 10.4045 20.6419 12.1372 21.6695C13.8757 20.6313 20.4427 16.4338 22.04 11.3606C23.0887 8.08121 22.1153 3.92728 18.2474 2.68075C16.3735 2.07926 14.1876 2.44534 12.6786 3.613C12.3632 3.85548 11.9253 3.86019 11.6075 3.62007C10.009 2.41826 7.92084 2.06632 6.0175 2.68075Z",fill:l})]})}),(0,n.jsx)("span",{style:{backgroundColor:null!=t?t:"inherit"},children:a})]})},M=l(11614),P=l(68017),O=l(45061),L=()=>{let e=async()=>{let e=await (0,P.ni)();!0===e||(null==e?void 0:e.statusCode)===401?((0,M.deleteCookie)("next-auth.session-token",{path:"/"}),(0,M.deleteCookie)("__Secure-next-auth.session-token",{path:"/"}),localStorage.clear(),sessionStorage.clear(),await (0,p.signOut)({callbackUrl:"/"}),await (0,p.getSession)()):(0,O.C)({message:null==e?void 0:e.error,type:"error"})};return(0,n.jsx)(N.zx,{handleClick:e,className:"grt-btn btn--ruby btn--medium",children:"Log Out"})},D=l(14944),A=l(57797),V=l(29501),z=l(13590),F=l(65500),q=l(78361),G=l(46175),$=l(30963),B=l(79383),H=e=>{var t,l;let{isPopupOpen:a,handleClosePopup:o}
1=e,[c,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[g,v]=(0,s.useState)(!1),[x,b]=(0,s.useState)(30),[j,w]=(0,s.useState)(null),[_,C]=(0,s.useState)(null),{data:k}=(0,p.useSession)(),{custom_attributes:S}=(0,B.Z)(),R=S?S.find(e=>"mobile"===e.attribute_code):{value:""},Z=null==R?void 0:R.value,{register:E,handleSubmit:T,formState:{errors:I,isValid:M},watch:P,reset:L}=(0,V.cI)({resolver:(0,z.F)(q.Ns),mode:"onChange"}),D=P("mobileNumber"),H=()=>{d(!1),m(!1),f(null),w(null),C(null),L()},U=async e=>{var t,l;if(e.mobileNumber){if(k&&Z&&e.mobileNumber===Z){let l={data:{mobile_number:e.mobileNumber,otp_resend:!1,type:"balance"}};try{let[e]=await (0,F.lZ)(l);if((null==e?void 0:e.status_code)===1e3){let l=null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t[0];w((null==l?void 0:l.point)||null),C((null==l?void 0:l.currencyValue)||null),(0,O.C)({message:null==e?void 0:e.message,type:"success"})}else(0,O.C)({message:null==e?void 0:e.message,type:"error"})}catch(e){G.default.error($.N.COMMON_ERROR.message)}}else try{let t={data:{mobile_number:e.mobileNumber,otp_resend:!1}},[n]=await (0,F.qv)(t);200===n.status_code?((0,O.C)({message:n.message,type:"success"}),f(null==n?void 0:null===(l=n.payload)||void 0===l?void 0:l.otpReference),d(!0),C(null),w(null)):(0,O.C)({message:n.message,type:"error"})}catch(e){G.default.error($.N.COMMON_ERROR.message)}}};(0,s.useEffect)(()=>{let e;return g&&x>0&&(e=setInterval(()=>b(e=>e-1),1e3)),0===x&&(v(!1),clearInterval(e)),()=>clearInterval(e)},[g,x]);let W=async()=>{if(D)try{let[e]=await (0,F.qv)({data:{mobile_number:D,otp_resend:!1}});200===e.status_code?((0,O.C)({message:"OTP Resent Successfully!",type:"success"}),v(!0),b(30)):(0,O.C)({message:e.message,type:"error"})}catch(e){(0,O.C)({message:"Failed to resend OTP. Please try again.",type:"error"})}},Y=async e=>{if(e.otp)try{let l={data:{mobile_number:e.mobileNumber,otp:e.otp,otp_reference:h}},[n]=await (0,F.s7)(l);if((null==n?void 0:n.status_code)===1e3){var t;(0,O.C)({message:null==n?void 0:n.message,type:"success"});let e=null==n?void 0:null===(t=n.payload)||void 0===t?void 0:t[0];w((null==e?void 0:e.point)||null),C((null==e?void 0:e.currencyValue)||null),d(!1),f(null)}else(0,O.C)({message:null==n?void 0:n.message,type:"error"})}catch(e){(0,O.C)({message:"Invalid Otp",type:"error"})}};return(0,s.useEffect)(()=>{a&&Z&&k&&(async()=>{try{var e,t,l,n;let s=await (0,F.lZ)({data:{mobile_number:Z,otp_resend:!1,type:"balance"}});if((null===(e=s[0])||void 0===e?void 0:e.status_code)===1e3){let e=null===(l=s[0])||void 0===l?void 0:null===(t=l.payload)||void 0===t?void 0:t[0];w((null==e?void 0:e.point)||null),C((null==e?void 0:e.currencyValue)||null)}else{if(s.error)return;(0,O.C)({message:null===(n=s[0])||void 0===n?void 0:n.message,type:"success"})}}catch(e){G.default.error($.N.COMMON_ERROR.message)}})()},[a,Z]),(0,n.jsx)(A.Z,{show:a,onHide:()=>{H(),o()},title:"Welcome to GRT Rewards",position:"end",className:"pdp-customization-popup notify-popup rewards-popup",closingButtonRequired:!0,children:(0,n.jsx)("div",{className:"rewards-popup-content text-center",children:(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)(r.default,{src:"/assests/images/grt-rewards.png",alt:"GRT Rewards",width:75,height:75,className:"img-fluid"}),null!==j&&null!==_&&(0,n.jsx)("div",{className:"rewards-balance mt-4",children:(0,n.jsxs)("h5",{children:["Available Points: ",(0,n.jsx)("strong",{children:j})," (",(0,n.jsxs)("strong",{children:["â¹",_.toFixed(2)]}),")"]})}),u?(0,n.jsxs)("section",{className:"grt-form variant-1",children:[(0,n.jsx)("p",{className:"my-3",children:"Enter any mobile number with GRT Reward Points"}),(0,n.jsx)("section",{className:"row",children:(0,n.jsx)("div",{className:"col-md-6 offset-md-3",children:(0,n.jsxs)("form",{onSubmit:T(c?Y:U),children:[(0,n.jsx)(y.Z,{name:"mobileNumber",fieldType:"text",placeholder:"Enter Mobile Number",error:null===(t=I.mobileNumber)||void 0===t?void 0:t.message,register:E,readOnly:c}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.Z,{name:"otp",fieldType:"text",placeholder:"Enter OTP",error:null===(l=I.otp)||void 0===l?void 0:l.message,register:E}),(0,n.jsx)("p",{className:"resend-otp-link footer-link-style",children:(0,n.jsxs)(i.default,{href:"#",onClick:e=>{e.preventDefault(),g||W()},className:g?"disabled-link":"",prefetch:!1,children:["Resend OTP ",g&&"(".concat(x,"s)")]})})]}),(0,n.jsx)(N.zx,{type:"submit",className:"grt-btn btn--ruby ruby--200 btn--medium ".concat(!M&&"disabled-btn"," mt-3"),disabled:!M,children:D===Z?"View Balance":c?"Verify OTP":"Send OTP"}),c&&(0,n.jsx)(N.zx,{type:"button",className:"grt-btn btn--ruby ruby--200 btn--medium mt
1-3",onClick:()=>{f(null),w(null),C(null),d(!1),L()},children:"Reset"})]})})})]}):(0,n.jsxs)("div",{className:"mt-3",children:[(0,n.jsx)(i.default,{href:"/grt-rewards",prefetch:!1,children:(0,n.jsx)(N.zx,{className:"grt-btn btn--ruby ruby--200 btn--medium me-2",children:"About GRT Rewards"})}),(0,n.jsx)(N.zx,{className:"grt-btn btn--ruby ruby--200 btn--medium me-2",onClick:()=>m(!0),children:"View Balance"})]})]})})})},U=e=>{let{menuItems:t,settingsData:l}=e,d=(0,s.useMemo)(()=>["jewellery","rings","necklaces","earrings","bracelets"],[]),m=(0,a.usePathname)(),[g,x]=(0,s.useState)(0),[b,y]=(0,s.useState)(d[0]),[N,w]=(0,s.useState)(""),[_,C]=(0,s.useState)(""),[k,S]=(0,s.useState)([]),[R,T]=(0,s.useState)(!1),[M,P]=(0,s.useState)(!1),O=(0,v.N)(N,300),[A,V]=(0,s.useState)(!0),{data:z,status:F}=(0,p.useSession)(),q=(0,a.useRouter)(),[G,$]=(0,s.useState)(!1),B=h.vb.test(m),{path:U,font_colour:W,logo:Y,body_class:K}=(0,s.useMemo)(()=>(0,u.rD)(m,t),[m,t]),J=Y||h.Uh;(0,s.useEffect)(()=>{let e=setInterval(()=>{x(e=>(e+1)%d.length)},2e3);return()=>{clearInterval(e)}},[d.length]),(0,s.useEffect)(()=>{y(d[g])},[d,g]),(0,s.useEffect)(()=>{(async()=>{if(O.length>=3){T(!0);try{let e=await (0,D.wY)(O);S(e)}catch(e){console.error(e)}finally{T(!1)}}else S([])})()},[O]);let Q=e=>{V(!0);let t=e.target.value,l=(0,u.Vl)("search",t);C(l),w(l)},X=()=>{w(""),C(""),S([])},ee=async()=>{if(!N.trim())return;let e=N.trim(),t=await (0,D._t)(e),l=Array.isArray(t)?t[0]:null;(null==l?void 0:l.page_redirect)&&""!==l.page_redirect?q.push("/".concat(l.page_redirect)):q.push("/catalogsearch/result/?q=".concat(encodeURIComponent(e))),V(!1)},et=()=>{X(),V(!1)},el={};(h._.SILVANA===U||h._.ORIANA===U)&&(el={backgroundColor:h._4,border:"0.063rem solid ".concat(W)});let en=(0,f.af)(null==l?void 0:l.module_status,"grt_rewards"),es=(0,f.af)(null==l?void 0:l.module_status,"grt_live"),ea=(0,f.af)(null==l?void 0:l.module_status,"digigold"),er=(0,f.af)(null==l?void 0:l.module_status,"saving_scheme");return(0,n.jsx)("div",{className:B?"bride-secondlvl":"topmenu",children:(0,n.jsx)(c.default,{children:(0,n.jsxs)("div",{className:"row align-center top-secondlvl-header ".concat(K),children:[(0,n.jsx)("div",{className:"col-5 col-md-5 col-lg-6 col-xl-5",children:(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("div",{className:"header-logo",children:(0,n.jsx)(i.default,{href:U,prefetch:!1,children:(0,n.jsx)("img",{src:"".concat("https://media.grtjewels.com","/").concat(J),className:"img-fluid header-logo-img",alt:"GRT logo"})})}),(0,n.jsx)(E,{settingsData:l,fontColor:W,bodyClass:K})]})}),(0,n.jsx)("div",{className:"col-7 col-md-7 col-lg-6 col-xl-7",children:(0,n.jsxs)("div",{className:"d-flex justify-content-end",children:[(0,n.jsx)("div",{className:"d-flex align-items-center search-box-header",children:(0,n.jsxs)("div",{className:"input-txt-grp d-none d-lg-block placeholder-animate-wrapper relative",children:[(0,n.jsxs)("label",{htmlFor:"global-search",className:"visually-hidden",children:["Search for ",b]}),(0,n.jsxs)("p",{className:"placeholder-animate ".concat(_?"has-value":""),children:["Search for",(0,n.jsx)("span",{children:b})]}),(0,n.jsx)(Z,{id:"global-search",showSuggestions:(null==O?void 0:O.length)>=3&&A,suggestions:k,setShowSuggession:V,inputValue:_,handleInputChange:Q,isFetching:R,handleSearch:ee,handleClickSuggestion:et,fontColor:W,inputStyle:el,"aria-label":"Search for ".concat(b),settingsData:l})]})}),en&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"d-none d-md-flex d-xl-flex align-items-center ps-xxl-3 cursor-pointer ps-2",children:(0,n.jsx)(r.default,{src:"/assests/images/rewards.png",alt:"rewards",width:126,height:35,className:"img-fluid rewards-image",onClick:()=>{$(!0)},style:{cursor:"pointer"},priority:!0})}),(0,n.jsx)(H,{isPopupOpen:G,handleClosePopup:()=>{$(!1)}})]}),(0,n.jsxs)("ul",{className:"d-flex align-items-center second-lvl-rightsection mb-0",children:[(0,n.jsx)("li",{children:"authenticated"===F&&z?(0,n.jsxs)(o.Z,{show:M,onToggle:()=>P(!M),children:[(0,n.jsx)(o.Z.Toggle,{as:"button",id:"profile-dropdown-toggle",onClick:()=>P(!M),className:"icon-profile custom-dropdown-toggle","aria-expanded":M,"aria-controls":"profile-dropdown-menu",children:(0,n.jsx)("span",{style:{color:null!=W?W:"#681016"},children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"24",viewBox:"0 0 19 24",fill:"none",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.834 19.4985C18.834 23.3781 13.5135 23.8266 9.51264 23.8266L9.22633 23.8264
1C6.67729 23.8202 0.188965 23.6592 0.188965 19.4749C0.188965 15.6744 5.29557 15.1665 9.26602 15.1474L9.79894 15.1471C12.3478 15.1532 18.834 15.3142 18.834 19.4985ZM9.51264 16.9124C4.49709 16.9124 1.95459 17.7741 1.95459 19.4749C1.95459 21.1911 4.49709 22.061 9.51264 22.061C14.527 22.061 17.0683 21.1994 17.0683 19.4985C17.0683 17.7823 14.527 16.9124 9.51264 16.9124ZM9.51264 0.4375C12.9591 0.4375 15.7618 3.24131 15.7618 6.68781C15.7618 10.1343 12.9591 12.9369 9.51264 12.9369H9.47498C6.03554 12.9264 3.24938 10.1214 3.26112 6.68428C3.26112 3.24131 6.06497 0.4375 9.51264 0.4375ZM9.51264 2.11838C6.99251 2.11838 4.942 4.16768 4.942 6.68781C4.93379 9.19971 6.96897 11.2478 9.47851 11.2573L9.51264 12.0977V11.2573C12.0316 11.2573 14.0809 9.20677 14.0809 6.68781C14.0809 4.16768 12.0316 2.11838 9.51264 2.11838Z",fill:W})})})}),(0,n.jsxs)(o.Z.Menu,{className:"profile-menu-open",children:[(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/customer/account/details",style:{color:W},prefetch:!1,children:"My Account"})}),(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/sales/order/history",style:{color:W},prefetch:!1,children:"My Orders"})}),(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/wishlist",style:{color:W},prefetch:!1,children:"My Wishlist"})}),(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/customer/account/review",style:{color:W},prefetch:!1,children:"My Review & Ratings"})}),er&&(0,n.jsx)(o.Z.Item,{as:"div",children:(0,n.jsx)(i.default,{href:"/jewellery-purchase-plan/scheme",style:{color:W},prefetch:!1,children:"My Purchase Plan"})}),ea&&(0,n.jsx)(o.Z.Item,{as:"div",children:(0,n.jsx)(i.default,{href:"/digi-gold/profile",style:{color:W},prefetch:!1,children:"My Digital Gold"})}),es&&(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/grtlive/dashboard/",style:{color:W},prefetch:!1,children:"GRT Live"})}),en&&(0,n.jsx)(o.Z.Item,{children:(0,n.jsx)(i.default,{href:"/lpredemption/transaction/index/",style:{color:W},prefetch:!1,children:"GRT Rewards"})}),(0,n.jsx)("li",{className:"signout-btn my-2",children:(0,n.jsx)(L,{})})]})]}):(0,n.jsxs)(i.default,{href:"/customer/account/login",className:"d-inline-flex align-items-center cursor-pointer","aria-label":"Log in to your account",prefetch:!1,children:[(0,n.jsx)("span",{className:"login-text d-none d-lg-block me-2",style:{color:W},children:"LOG IN"}),(0,n.jsx)("span",{style:{color:W},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"24",viewBox:"0 0 19 24",fill:"none",role:"img","aria-hidden":"true",children:[(0,n.jsx)("title",{children:"Account icon"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.834 19.4985C18.834 23.3781 13.5135 23.8266 9.51264 23.8266L9.22633 23.8264C6.67729 23.8202 0.188965 23.6592 0.188965 19.4749C0.188965 15.6744 5.29557 15.1665 9.26602 15.1474L9.79894 15.1471C12.3478 15.1532 18.834 15.3142 18.834 19.4985ZM9.51264 16.9124C4.49709 16.9124 1.95459 17.7741 1.95459 19.4749C1.95459 21.1911 4.49709 22.061 9.51264 22.061C14.527 22.061 17.0683 21.1994 17.0683 19.4985C17.0683 17.7823 14.527 16.9124 9.51264 16.9124ZM9.51264 0.4375C12.9591 0.4375 15.7618 3.24131 15.7618 6.68781C15.7618 10.1343 12.9591 12.9369 9.51264 12.9369H9.47498C6.03554 12.9264 3.24938 10.1214 3.26112 6.68428C3.26112 3.24131 6.06497 0.4375 9.51264 0.4375ZM9.51264 2.11838C6.99251 2.11838 4.942 4.16768 4.942 6.68781C4.93379 9.19971 6.96897 11.2478 9.47851 11.2573L9.51264 12.0977V11.2573C12.0316 11.2573 14.0809 9.20677 14.0809 6.68781C14.0809 4.16768 12.0316 2.11838 9.51264 2.11838Z",fill:W})]})})]})}),(0,n.jsx)("li",{className:"cart-notification wishlist-notification",children:(0,n.jsx)(I,{backgroundColor:W,color:W})}),(0,n.jsx)("li",{className:"cart-notification",children:(0,n.jsx)(j,{backgroundColor:W,color:W})})]})]})}),(0,n.jsx)("div",{className:"col-12 py-lg-0 d-lg-none search-mobile-view py-3",children:(0,n.jsx)("div",{className:"suggest-inputsearch",children:(0,n.jsx)("div",{className:"suggest-inputsearch",children:(0,n.jsx)("div",{className:"d-flex align-items-center input-mobile-view",children:(0,n.jsxs)("div",{className:"input-txt-grp placeholder-animate-wrapper relative",children:[(0,n.jsxs)("label",{htmlFor:"global-search",className:"visually-hidden",children:["Search for ",b]}),(0,n.jsxs)("p",{className:"placeholder-animate ".concat(_?"has-value":""),children:["Search for",(0,n.jsx)("span",{children:b})]}),(0,n.jsx)(Z,{id:"global-search",showSuggestions:(null==O?void 0:O.length)>=3&&A,suggestions:k,setShowSuggession:V,inputValue:_,handleInputChange:Q,isFetching:R,handleSearch:ee,handleClickSuggestion:et,fontColor:W,inputStyle:el,"aria-label":"Search for ".concat(b)})]})})})})})]})})})},W=l(88322),Y=l(93697),K=()=>{let e=(0,a.usePathname)(),t=e&&Y.B8.test(e);return(0,n.jsxs)("section",{className:"align-center flex",children:[(0,n.jsx)(b.M,{condition:t,children:(0,n.jsx)(i.default,{href:"/checkout/cart",prefetch:!1,children:(0,n.jsx)(r.default,{src:"/assests/images/pdp/right-arrow-brown.png",alt:"Back-Button-image",width:30,height:30,className:"header-back-btn"})})}),(0,n.jsx)(i.default,{href:"/",prefetch:!1,children:(0,n.jsx)(r.default,{src:"/assests/images/grt-header-logo.png",alt:"Logo",width:100,height:100,className:"cursor-pointer"})})]})},J=l(61006),Q=l(65113),X=l(19032),ee=l(11279),et=()=>
1{let[e,t]=(0,s.useState)(""),{userDetails:l}=(0,Q.CG)(e=>e.user),r=(0,Q.TL)();(0,s.useEffect)(()=>{o()},[]);let o=async()=>{var e;let[l]=await (0,D.JF)();t(null==l?void 0:null===(e=l.module_status)||void 0===e?void 0:e.whatsapp_assistance.link)},{data:d}=(0,J.u)(""===l.email?"customers/me":null,X.r3,{revalidateOnFocus:!1,shouldRetryOnError:!1});(0,s.useEffect)(()=>{d&&r((0,ee.XN)(d))},[d,r]);let u=(0,a.usePathname)();return(0,n.jsx)("header",{className:"header-zindex px-md-4 justify-around bg-white px-2 py-2",children:(0,n.jsx)(c.default,{children:(0,n.jsxs)("div",{className:"flex-between",children:[(0,n.jsx)(K,{}),(0,n.jsx)(j,{headerType:"cart"}),"/checkout/onepage/success/"!==u&&(0,n.jsx)("section",{className:"get-assitance no-shrink",children:(0,n.jsxs)(i.default,{className:"grt-btn btn--green btn--medium",href:e,target:"_blank",rel:"noopener noreferrer",prefetch:!1,children:[(0,n.jsx)(W.Z,{src:"/assests/images/whatsapp-white-icon.svg",alt:"Icon",className:"me-2",width:"21",height:"21"}),"Get Whatsapp Assistance"]})})]})})})},el=e=>{var t,l,s,a;let{isCheckoutPage:r=!1,settingsData:i}=e,o=null==i?void 0:null===(t=i.notifications)||void 0===t?void 0:t.first,c=null==i?void 0:null===(l=i.notifications)||void 0===l?void 0:l.second;return(0,n.jsx)(b.M,{condition:o||c,children:(0,n.jsxs)("ul",{className:"offer-msg-wrapper ".concat(o&&c?"offer-msg":""),children:[(0,n.jsx)(b.M,{condition:o,children:(0,n.jsx)("li",{className:"bounce-text",children:null==i?void 0:null===(s=i.notifications)||void 0===s?void 0:s.first})}),(0,n.jsx)(b.M,{condition:c,children:(0,n.jsx)("li",{className:"bounce-text",children:null==i?void 0:null===(a=i.notifications)||void 0===a?void 0:a.second})})]})})},en=l(92731),es=l(34370),ea=l(58945);l(83079);var er=l(12119),ei=(0,er.$)("62f0c907d9889aa2202301a9119f9e018bdd06df"),eo=(0,er.$)("9122ae7fab746c8d4523a8a1c3c3d3d4ece80f65"),ec=e=>{let{toggleMenuVisibility:t,currentPathName:l}=e,[a,o]=(0,s.useState)([]),[c,d]=(0,s.useState)(4),[u,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{try{let e=await ei(),t=e[0].items[0].tabItems[0].additionalFields||[],n=parseInt(e[0].items[0].tile_count,10)||4,s=(null==t?void 0:t.length)?t.toSorted((e,t)=>parseInt(e.sortOrder)-parseInt(t.sortOrder)):[],a=(null==s?void 0:s.length)?s.filter(e=>{let t=null==e?void 0:e.buttonLink;return l!==("/"===t?t:"".concat(t,"/"))}):[];o(a),d(n)}catch(e){o([]),(0,O.C)($.N.TILE_FETCH_ERROR)}})()},[l]);let h=()=>{switch(c){case 1:return"col-12";case 2:return"col-6";case 3:return"col-4";default:return"col-3"}},f=()=>{m(!0)};return(0,n.jsxs)("div",{className:"row",children:[null==a?void 0:a.map(e=>{var l;return(0,n.jsx)("div",{className:"".concat(h()),children:(0,n.jsx)("div",{className:"rsp-menu-title",children:"GRT Rewards"===e.title?(0,n.jsxs)(N.zx,{onClick:f,className:"btn btn-link p-0",style:{textDecoration:"none"},children:[(null==e?void 0:e.image)&&(0,n.jsx)("figure",{children:(0,n.jsx)(r.default,{src:"".concat("https://media.grtjewels.com","/").concat(e.image),alt:e.title,width:"75",height:"75",className:"img-fluid mobile-cat-menu"})}),(0,n.jsx)("p",{className:"product-title w-100 mt-1",children:e.title})]}):(0,n.jsxs)(i.default,{href:null!==(l=e.buttonLink)&&void 0!==l?l:"",onClick:t,prefetch:!1,children:[(null==e?void 0:e.image)&&(0,n.jsx)("figure",{children:(0,n.jsx)(r.default,{src:"".concat("https://media.grtjewels.com","/").concat(e.image),alt:e.title,width:"75",height:"75",className:"img-fluid mobile-cat-menu"})}),(0,n.jsx)("p",{className:"product-title w-100 mt-1",children:e.title})]})},e.title)},e.title)}),u&&(0,n.jsx)(H,{isPopupOpen:u,handleClosePopup:()=>{m(!1)}})]})};let ed=e=>"a"===e,eu=e=>"img"===e,em=e=>{let t=e||"/assests/images/digi-gold-logo.svg";return{src:t,alt:t,width:1920,height:768}},eh=(e,t)=>e?(0,n.jsx)("div",{className:"sidebar-image mb-3 mt-3",children:(0,n.jsx)(i.default,{href:e,prefetch:!1,children:(0,n.jsx)(r.default,{...t})},e)}):(0,n.jsx)("div",{className:"sidebar-image mb-3 mt-3",children:(0,n.jsx)(r.default,{...t})},t.src);var ef=e=>{let{imageData:t}=e,l=(0,s.useMemo)(()=>{let e=[];for(let l=0;l<t.length;l+=2){let n=t[l],s=t[l+1];if(ed(n.tag)&&eu(null==s?void 0:s.tag)){let{href:t}=n.attributes,{src:l}=s.attributes,a=em(l);e.push(eh(t||"",a))}}return e},[t]);return(0,n.jsx)(n.Fragment,{children:l})},eg=l(38536),ep=e=>{var t;let{categoryMenuData:l,currency:a,isLoading:o,store_data:c,currentPathName:d}
1=e,[u,f]=(0,s.useState)(!1),g=()=>{f(!u),(0,m.sendGTMEvent)({event:h.Jy,page_name:document.title,page_url:window.location.href})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"d-inline-block d-lg-none hamburgericon-section pe-3",children:u?(0,n.jsx)(N.zx,{className:"bi bi-x-lg",handleClick:g}):(0,n.jsx)(r.default,{src:"/assests/images/menu.svg",width:24,height:24,alt:"menu icon",onClick:g})}),(0,n.jsx)("div",{className:"hamburger-menu-wrapper ".concat(u?"active":""),children:(0,n.jsx)("div",{className:"hamburger-wrapper",children:(0,n.jsx)("div",{className:"hamburger-menu-outersection d-block d-lg-none",children:(0,n.jsxs)("div",{className:"hamburger-menu",children:[(0,n.jsx)("div",{className:"contact-menu-section",children:(0,n.jsxs)("ul",{className:"d-flex align-items-center justify-content-between",children:[(0,n.jsx)("li",{className:"country-dropdown",children:(0,n.jsx)("div",{className:"select-dropdown",children:(0,n.jsxs)("div",{className:"pe-2",children:[(0,n.jsx)(r.default,{src:"/assests/images/".concat(null==a?void 0:a.toLowerCase(),"-flag.png"),alt:"INR Flag",className:"img-fluid",width:25,height:25}),(0,n.jsx)("span",{className:"ms-2 ps-0",children:a})]})})}),(0,n.jsx)("li",{children:(0,n.jsx)("div",{className:"d-flex align-items-center justify-center",children:(0,n.jsxs)(i.default,{href:"/storelocator",prefetch:!1,onClick:g,className:"mx-auto",children:[(0,n.jsx)(r.default,{src:"/assests/images/icon-location.png",alt:"Location Icon",className:"img-fluid",width:15,height:18}),(0,n.jsx)("span",{children:"Locate Us"})]})})}),(0,n.jsx)("li",{children:(0,n.jsx)("div",{className:"d-flex align-items-center justify-center",children:(0,n.jsxs)(i.default,{type:"button",className:"call-button mx-auto",href:"tel:".concat(null==c?void 0:null===(t=c.tollfree_number)||void 0===t?void 0:t.replace(/\D/g,"")),prefetch:!1,children:[(0,n.jsx)(r.default,{src:"/assests/images/icon-call-us.png",alt:"Call Icon",className:"img-fluid",width:16,height:15}),(0,n.jsx)("span",{children:"Call Us"})]})})})]})}),(0,n.jsxs)("div",{className:"hamburger-menu-scroll",children:[(0,n.jsxs)("div",{className:"menu-list-items",children:[o&&(0,n.jsx)("p",{children:"loading..."}),!!(null==l?void 0:l.length)&&(0,n.jsx)(eg.Z,{children:null==l?void 0:l.map(e=>{var t,l,s;return(0,n.jsxs)(eg.Z.Item,{eventKey:e.id,children:[(0,n.jsx)(eg.Z.Header,{className:"category-firstlevel ".concat((null===(t=e.children)||void 0===t?void 0:t.length)?"":"accordion-no-children"),children:e.link?(0,n.jsx)(i.default,{href:"".concat(e.link.replace("{{store url=''}}","/")),onClick:g,prefetch:!1,children:(0,n.jsx)("span",{className:"category-name-firstlvl",children:e.name})}):(0,n.jsx)("span",{children:(0,n.jsx)("span",{className:"category-name-firstlvl",children:e.name})})}),(0,n.jsx)(b.M,{condition:null===(l=e.children)||void 0===l?void 0:l.length,children:(0,n.jsx)(eg.Z.Body,{children:(0,n.jsxs)("div",{className:"children-list",children:[null===(s=e.children)||void 0===s?void 0:s.map(e=>{var t,l,s;return(0,n.jsx)(eg.Z,{children:(0,n.jsxs)(eg.Z.Item,{eventKey:e.id,children:[(0,n.jsx)(eg.Z.Header,{className:"".concat((null==e?void 0:null===(t=e.children)||void 0===t?void 0:t.length)?"":"accordion-child-header accordion-no-children"),children:(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[e.icon&&(0,n.jsx)(r.default,{src:e.icon,alt:e.name,width:70,height:70}),(null==e?void 0:e.link)?(0,n.jsx)(i.default,{href:"".concat(e.link.replace("{{store url=''}}","/")),onClick:g,prefetch:!1,children:(0,n.jsx)("span",{className:"category-name-firstlvl ms-3",children:e.name})}):(0,n.jsx)("span",{children:(0,n.jsx)("span",{className:"category-name-firstlvl ms-3",children:e.name})})]})}),(0,n.jsx)(b.M,{condition:null==e?void 0:null===(l=e.children)||void 0===l?void 0:l.length,children:(0,n.jsx)(eg.Z.Body,{children:(0,n.jsx)("div",{className:"nested-children-list ps-3 pt-3",children:null===(s=e.children)||void 0===s?void 0:s.map(e=>(0,n.jsxs)("div",{className:"nested-child-item d-flex align-items-center mb-3 ".concat(e.icon?"":"no-menu-image"),children:[e.icon&&(0,n.jsx)(r.default,{src:e.icon,alt:e.name,width:50,height:50}),(0,n.jsx)("span",{className:"category-name-secondlvl ms-3",children:e.link?(0,n.jsx)(i.default,{href:"".concat(e.link.replace("{{store url=''}}","/")),onClick:g,prefetch:!1,children:(0,n.jsx)("span",{className:"category-name-secondlvl mt-2",children:e.name})}):(0,n.jsx)("span",{onClick:g,children:(0,n.jsx)("span",{className:"category-name-secondlvl mt-2",children:e.name})})})]},e.id))})})})]})},e.id)}),e.right_sidebar_html_json&&"1"===e.show_right_sidebar&&(0,n.jsx)(ef,{imageData:e.right_sidebar_html_json})]})})})]},e.id)})})]}),(0,n.jsx)("div",{className:"product-tile-section",children:(0,n.jsx)(ec,{toggleMenuVisibility:g,currentPathName:d})})]})]})})})})]})},ev=l(47205),ex=l(24402),eb=l(4670);let ej=(e,t,l)=>{(0,m.sendGTMEvent)({event:h.vI,mega_menu_name:e,category_name:t,sub_category_name:l})},ey=e=>{let{nestedChild:t,category:l,child:s}=e,a=()=>{ej(l,s,t.name)}
1;return(0,n.jsxs)("div",{className:"d-flex align-items-center mt-2 submenu-wrapper",children:["1"===t.show_icon&&t.icon&&(0,n.jsx)("div",{className:"menu-item-img",children:(0,n.jsx)(r.default,{src:t.icon,alt:"".concat(t.name," icon"),width:40,height:40,className:"img-fluid"})}),(null==t?void 0:t.link)?(0,n.jsx)(i.default,{href:t.link.replace("{{store url=''}}","/"),prefetch:!1,onClick:a,children:(0,n.jsx)("span",{className:"category-name",children:t.name})}):(0,n.jsx)("span",{onClick:a,children:(0,n.jsx)("span",{className:"category-name",children:t.name})})]})},eN=e=>{var t,l;let{child:s,category:a}=e,r=()=>{ej(a,s.name,s.name)};return(0,n.jsx)(eb.default,{md:3,className:"mb-4",children:(0,n.jsxs)("div",{children:[s.link?(0,n.jsx)(i.default,{prefetch:!1,href:s.link.replace("{{store url=''}}","/"),onClick:r,children:(0,n.jsx)("h5",{children:s.name})}):(0,n.jsx)("span",{onClick:r,children:(0,n.jsx)("h5",{children:s.name})}),(null==s?void 0:s.children)&&(null==s?void 0:null===(t=s.children)||void 0===t?void 0:t.length)>0&&(0,n.jsx)("div",{className:"mt-3",children:null==s?void 0:null===(l=s.children)||void 0===l?void 0:l.map((e,t)=>(0,n.jsx)(ey,{nestedChild:e,category:a,child:s.name},t+1))})]})})};var ew=e=>{let{categoryData:t}=e;return t&&0!==t.length?(0,n.jsx)("div",{className:"submenu-listitems",children:null==t?void 0:t.map((e,t)=>{var l,s;return(0,n.jsx)("div",{children:(null==e?void 0:e.children)&&(null==e?void 0:null===(l=e.children)||void 0===l?void 0:l.length)>0&&(0,n.jsx)(ex.default,{children:null===(s=e.children)||void 0===s?void 0:s.map(t=>(0,n.jsx)(eN,{child:t,category:e.name},t.name))})},t+1)})}):null},e_=l(73221);let eC=e=>"a"===e,ek=e=>"img"===e,eS=e=>{let t=e.src||"/assests/images/placeholder-image.svg";return{src:t,alt:e.alt||t,width:parseInt(e.width||"0",10),height:parseInt(e.height||"0",10),sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",className:"w-100 img-fluid",containerClassName:"mb-4"}},eR=(e,t)=>e?(0,n.jsx)(i.default,{href:e,prefetch:!1,children:(0,n.jsx)(e_.xu,{...t})},e):(0,s.createElement)(e_.xu,{...t,key:t.src});var eZ=e=>{let{imageData:t}=e,l=(0,s.useMemo)(()=>{let e=[];for(let n=0;n<t.length;n++){var l;let a=t[n];if(eC(a.tag)&&ek(null===(l=t[n+1])||void 0===l?void 0:l.tag)){let l=t[n+1],{href:s}=a.attributes,r=eS(l.attributes);e.push(eR(s||"",r)),n++}else if(ek(a.tag)){let t=eS(a.attributes);e.push((0,s.createElement)(e_.xu,{...t,key:t.src}))}}return e},[t]);return(0,n.jsx)(n.Fragment,{children:l})},eE=l(60180),eT=l(96440),eI=e=>{let{isGrtBridesPage:t,categoryMenuData:l,errorData:r,pathThemeColor:d,pathFontColor:u,currentPathName:f,bodyClass:g}=e,p=(0,a.usePathname)(),v=(0,a.useSearchParams)(),[x,b]=(0,s.useState)(null),[j,y]=(0,s.useState)(!1),{push:N}=(0,a.useRouter)(),w=(0,s.useRef)(null),_=(0,s.useRef)(null),C=(0,s.useRef)(null),k=f.replace(/\/$/,"");(0,s.useEffect)(()=>{let e=()=>{y(window.innerWidth<1199)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,s.useEffect)(()=>{x&&b(null)},[p,v]),(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&b(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[]);let S=e=>{j||(_.current&&clearTimeout(_.current),w.current=setTimeout(()=>{b(e)},200))},R=()=>{j||(w.current&&clearTimeout(w.current),_.current=setTimeout(()=>{b(null)},200))},Z=e=>{j&&b(t=>t===e?null:e)};if(r)return(0,n.jsx)("p",{children:"Failed to load menu items"});let E=e=>{(0,m.sendGTMEvent)({event:h.wi,page_name:document.title,page_url:window.location.href,cta_name:e})};return(0,n.jsx)(eE.default,{cssClass:"navbar-section",backgroundColor:null!=d?d:null,fontColor:null!=u?u:null,children:(0,n.jsx)(ev.Z,{collapseOnSelect:!0,className:"navbar-section ".concat(g," ").concat(t?"navbar-brides":""),ref:C,children:(0,n.jsxs)(c.default,{className:"".concat(t?"grt-container container-lg":""),children:[(0,n.jsx)(ev.Z.Toggle,{"aria-controls":"responsive-navbar-nav"}),(0,n.jsx)(ev.Z.Collapse,{id:"responsive-navbar-nav",children:(0,n.jsx)("div",{className:"megamenu-section",children:!!(null==l?void 0:l.length)&&(null==l?void 0:l.map((e,t)=>{var s,a,r,d;let f=e.link.replace(/\/$/,""),g=e.link.replace("{{store url=''}}","/")===k,p=null==e?void 0:null===(s=e.children)||void 0===s?void 0:s.some(e=>e.link.replace("{{store url=''}}","/")===k),v=k&&k===f&&(null==e?void 0:e.classes)!==(null===h.sk||void 0===h.sk?void 0:h.sk.BUTTON_CLASS),b=k&&(p||g),y=t===l.length-1&&(null==e?void 0:e.classes)===(null===h.sk||void 0===h.sk?void 0:h.sk.BUTTON_CLASS),w=()=>{(0,m.sendGTMEvent)({event:h.vI,mega_menu_name:e.name,category_name:e.name,sub_category_name:e.name,page_name:document.title,page_url:window.location.href})};return(0,n.jsxs)(o.Z,{onMouseEnter:()=>S(e),onMouseLeave:R,show:x===e,style:{color:u},className:"".concat(null==e?void 0:e.classes," menu-link ").concat(y?"gold-scheme-btn":""),children:[(null==e?void 0:e.link)?(0,n.jsx)(i.default,{href:e.link.replace("{{store url=''}}","/"),prefetch:!1,style:{color:u},className:"".concat((null==e?void 0:null===(a=e.children)||void 0===a?void 0:a.length)>0?"active-menu":""," ").concat(v?"active-path":""," ").concat(b?"active-submenu-path":""),onDoubleClick:t=>{j&&(t.preventDefault(),w(),N(e.link.replace("{{store url=''}}","/")))},onClick:t=>{j&&t.preventDefault(),w(),Z(e)},children:y?(0,n.jsx)(eT.default,{renderAs:"span",onClick:()=>E(e.name),children:e.name}):e.name}):(0,n.jsx)("span",{style:{color:u},className:"".concat((null==e?void 0:null===(r=e.children)||void 0===r?void 0:r.length)>0?"active-menu":""," ").concat(v?"active-path":""," ").concat(b?"active-submenu-path":""),children:y?(0,n.jsx)(eT.default,{renderAs:"span",onClick:()=>E(e.name),children:e.name}):e.name}),x===e&&(null==e?void 0:null===(d=e.children)||void 0===d?void 0:d.length)>0&&(0,n.jsx)(o.Z.Menu,{className:"dropdown-menu ".concat(x===e?"show":""),children:(0,n.jsx)(c.default,{fluid:!0,className:"main-megamenu-lvl",children:(0,n.jsxs)(ex.default,{children:[(0,n.jsx)(eb.default,{md:(null==e?void 0:e.right_sidebar_html_json)?9:12,xl:8,children:(0,n.jsx)(ew,{categoryData:[e]})}),(null==e?void 0:e.right_sidebar_html_json)&&"1"===e.show_right_sidebar&&(0,n.jsx)(eb.default,{md:3,xl:4,children:(0,n.jsx)(eZ,{imageData:null==e?void 0:e.right_sidebar_html_json})})]})})})]},e.id)}))})})]})})})},eM=l(58819),eP=l(98820),eO=e=>{let{count:t,pathThemeColor:l,isGrtBridesPage:s,bodyClass:a}=e;return(0,n.jsx)(eE.default,{cssClass:"navbar-section",backgroundColor:null!=l?l:null,children:(0,n.jsx)("section",{className:"menu-placeholder-wrapper navbar-section ".concat(a," ").concat(s?"navbar-brides":""),children:(0,n.jsx)(c.default,{className:"".concat(s?"grt-container container-lg":""),children:(0,n.jsx)("section",{className:"skeleton-menu-col",children:Array(t).fill(null).map((e,l)=>(0,n.jsx)(eP.Z,{as:"div",animation:"glow",className:"menu-placeholder",children:(0,n.jsx)(eP.Z,{xs:8})},"".concat(t,"-").concat(l)))})})})})},eL=e=>{var t;let{menuItems:l,currency:r,store_data:i}=e,o=(0,a.usePathname)(),c=(0,eM.Z)(),d=h.vb.test(o),{mobile_menu_id:m,web_menu_id:f,body_class:g,font_colour:p,theme_colour:v}=(0,s.useMemo)(()=>(0,u.rD)(o,l),[o,l]),{data:x,error:b,isLoading:j}=(0,J.u)(m&&f?{url:"menu",args:{mobile:m,web:f}}:null,eo,{revalidateOnFocus:!1,shouldRetryOnError:!1});return l&&(null===(t=Object.keys(l))||void 0===t?void 0:t.length)>0?(0,n.jsx)(n.Fragment,{children:c?(0,n.jsx)(ep,{categoryMenuData:x,currency:r,isLoading:j,store_data:i,currentPathName:o}):j?(0,n.jsx)(eO,{isGrtBridesPage:d,pathThemeColor:v,count:Y.mH.test(o)?5:9,bodyClass:g}):(0,n.jsx)(eI,{isGrtBridesPage:d,categoryMenuData:x,errorData:b,pathThemeColor:v,pathFontColor:null!=p?p:"",currentPathName:o,bodyClass:g})}):null},eD=e=>{var t;let{settingsData:l}=e,r=(0,a.usePathname)(),i=(0,Q.TL)(),{module_status:o,currency_details:c,preferred_amount:d,store_data:u}=l,m=null==o?void 0:o.themes;return(0,s.useEffect)(()=>{d&&i((0,es.hJ)(d))},[d,i]),(0,s.useEffect)(()=>{var e,t;(null==o?void 0:null===(e=o.digigold)||void 0===e?void 0:e.logo_image)?i((0,ea.Yb)(null==o?void 0:null===(t=o.digigold)||void 0===t?void 0:t.logo_image)):i((0,ea.Yb)(""))},[null==o?void 0:null===(t=o.digigold)||void 0===t?void 0:t.logo_image,i]),(0,s.useEffect)(()=>{window.scrollTo(0,0)},[r]),(0,s.useEffect)(()=>{l.field_labels.address_short_name&&i((0,en.Ld)(l.field_labels.address_short_name))},[l.field_labels.address_short_name,i]),(0,s.useEffect)(()=>{(null==l?void 0:l.module_status)&&i((0,en.og)(null==l?void 0:l.module_status))},[null==l?void 0:l.module_status,i]),(0,s.useEffect)(()=>{(null==l?void 0:l.placeholder_image)&&i((0,en.oK)(null==l?void 0:l.placeholder_image))},[null==l?void 0:l.placeholder_image,i]),(0,n.jsx)(n.Fragment,{children:r&&h.Z8.test(r)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(el,{isCheckoutPage:!0,settingsData:l}),(0,n.jsx)(et,{})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g,{settingsData:l}),(0,n.jsxs)("div",{className:"main-header-sticky",children:[(0,n.jsx)(U,{settingsData:l,menuItems:m}),(0,n.jsx)(eL,{menuItems:m,currency:c.currency,store_data:u})]})]})})}},48258:function(e,t,l){"use strict";l.d(t,{default:function(){return g}});var n=l(57437),s=l(2265),a=l(99376),r=l(33145),i=l(65113),o=l(61418),c=l(58586),d=l(27648),u=l(188),m=e=>{var t;let{settingsData:l}=e,{moduleStatus:m}=(0,i.CG)(e=>
1null==e?void 0:e.globalState),[h,f]=(0,s.useState)(!1),[g,p]=(0,s.useState)(!1),v=(0,a.useRouter)(),x=(0,a.usePathname)(),b=()=>/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent);(0,s.useEffect)(()=>{let e=setTimeout(()=>{p(!0)},3e3);return()=>clearTimeout(e)},[]);let j=()=>{for(let e of[".rightcls svg:first-of-type path",".rightcls svg:first-child path",".chatHeader .rightcls","#bot-layout .rightcls",".chatFade .rightcls"]){let t=document.querySelector(e);if(t){t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0})),console.log("clicked:",e);break}}f(!1)},y=()=>f(e=>!e);(0,s.useEffect)(()=>{b()&&j()},[x]),(0,s.useEffect)(()=>{let e=e=>{try{let{type:t,payload:l}=e.data||{};if("NAVIGATION_GRT_CHAT_BOT"===t&&(null==l?void 0:l.url)){let e=new URL(l.url);v.push(e.pathname+e.search)}}catch(e){console.error("message listener error",e)}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[v]);let N=(0,u.af)(l,"whatsapp_assistance"),w=null==l?void 0:null===(t=l.worktual)||void 0===t?void 0:t.is_enabled;return(0,n.jsxs)(c.Z,{className:"icon-livechat-section",onClick:y,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&y()},tabIndex:0,children:[(0,n.jsxs)(o.zx,{type:"button",className:"icon-chat",children:[(0,n.jsx)(r.default,{className:h?"d-none":"d-block",width:33,height:37,alt:"Live Chat",src:"/assests/images/icon-livechat.png"}),(0,n.jsx)("i",{className:h?"bi bi-x chat-close-icon d-flex":"bi bi-x chat-close-icon d-none"})]}),(0,n.jsx)("div",{className:"livechat-section ".concat(h?"d-block":"d-none"),children:(0,n.jsxs)("ul",{children:[g&&w&&(0,n.jsx)("li",{style:{animation:"fadeIn 0.4s ease-in-out"},children:(0,n.jsxs)("div",{className:"icon-chat-outersection",children:[(0,n.jsx)("h4",{children:"Chat with us"}),(0,n.jsx)("div",{className:"ms-3",children:(0,n.jsx)(o.zx,{type:"button",className:"icon-chat-btn",onClick:e=>{e.stopPropagation();let t=0,l=()=>{t++;let e=document.getElementById("chat_icon"),n=document.getElementById("wortual_chat_icon");if(e){e.click();return}if(n){n.click();return}t<10&&setTimeout(l,500)};l()},children:(0,n.jsx)(r.default,{width:34,height:33,alt:"Chat with Us",src:"/assests/images/icon-chat-us.png"})})})]})}),N&&(0,n.jsx)("li",{children:(0,n.jsxs)("div",{className:"icon-chat-outersection",children:[(0,n.jsx)("h4",{children:"WhatsApp Chat"}),(0,n.jsx)(d.default,{href:m.whatsapp_assistance.link,target:"_blank",rel:"noopener noreferrer",prefetch:!1,children:(0,n.jsx)("div",{className:"ms-3",children:(0,n.jsx)(o.zx,{type:"button",className:"icon-chat-btn",children:(0,n.jsx)(r.default,{width:34,height:34,alt:"Whats app",src:"/assests/images/icon-whatsapp.png"})})})})]})})]})})]})},h=l(48667),f=()=>{let[e,t]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=setTimeout(()=>{t(!0)},3e3);return()=>clearTimeout(e)},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n #bot-layout {\n left: auto !important; \n right: 1px !important;\n }\n "}}),(0,n.jsx)("div",{id:"chat_bot","data-myparam":"dudH5A4G"}),e&&(0,n.jsx)(h.default,{src:"https://aichatbot.worktual.co.uk/worktual_widget.js",strategy:"afterInteractive"})]})},g=e=>{var t;let{settingsData:l}=e,s=null==l?void 0:null===(t=l.worktual)||void 0===t?void 0:t.is_enabled;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m,{settingsData:l}),s&&(0,n.jsx)(f,{})]})}},78707:function(e,t,l){"use strict";var n=l(57437),s=l(2265),a=l(27648),r=l(71490),i=l(30048),o=l(16538),c=l(52067);l(97425),l(49608);var d=l(29535),u=l(68412);t.Z=e=>{let{products:t,title:l,id:m}=e,[h,f]=(0,s.useState)([]),g=(0,s.useCallback)(async()=>{f(await (0,d.pH)()||[])},[]);if((0,s.useEffect)(()=>{g()},[g]),!t)return null;let p={arrows:!0,infinite:t.length>1,speed:500,dots:!1,slidesToShow:4,slidesToScroll:4,swipeToSlide:!0,nextArrow:(0,n.jsx)(o.NextArrow,{iconClassName:"bi bi-chevron-right",className:"slick-next"}),prevArrow:(0,n.jsx)(o.PrevArrow,{iconClassName:"bi bi-chevron-left",className:"slick-prev"}),responsive:[{breakpoint:1150,settings:{slidesToShow:4,slidesToScroll:1,infinite:!1,dots:!1,arrows:!1,swipeToSlide:!0}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:1,initialSlide:0,arrows:!1,swipeToSlide:!0}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1,arrows:!1,swipeToSlide:!0,variableWidth:!0}}]};return(0,n.jsx)("section",{id:"similardesigns",children:(0,n.jsx)(c.M,{condition:t&&(null==t?void 0:t.length)>0,children:(0,n.jsxs)("div",{id:m,children:[(0,n.jsx)("h2",{className:"pdp-subtitle",children:l}),(0,n.jsx)("section",{className:"slickslider variant-2",children:(0,n.jsx)(i.default,{settings:p,children:null==t?void 0:t.map(e=>{var t,l,s;return(0,n.jsx)(a.default,{href:"/".concat(e.url_key),prefetch:!1,children:(0,n.jsx)(r.Z,{productName:e.name,imageUrl:e.cache_thumb_image,hoverImgUrl:e.hover_image,price:null!==(s=null==e?void 0:null===(t=e.product_price_details)||void 0===t?void 0:t.grand_total_with_discount)&&void 0!==s?s:0,originalPrice
1:null==e?void 0:null===(l=e.product_price_details)||void 0===l?void 0:l.grand_total_without_discount,discount:e.discount_percent,isFeatured:"0"!==e.is_featured,newArrival:e.new_arrival_date,fastShip:e.ship_fast,productId:e.id,wishlistItem:(0,u.Of)(h)?null==h?void 0:h.find(t=>t.product_id===e.id):void 0,updateWishlist:g,sku:null==e?void 0:e.sku})},e.id)})})})]})})})}},8166:function(e,t,l){"use strict";var n=l(57437);l(2265);var s=l(29501),a=l(13590),r=l(18492),i=l(24402),o=l(4670),c=l(33145),d=l(3435),u=l(45061),m=l(29535),h=l(61418),f=l(25236),g=l(30963),p=l(92286),v=l(65113),x=l(92731),b=l(68412);t.Z=e=>{var t,l,j,y,N,w;let{status:_,productData:C,formPayload:k,onClose:S,isEmailNotMandatory:R}=e,Z=(0,v.TL)(),E=(0,d.ob)(!R),{register:T,handleSubmit:I,setValue:M,formState:{errors:P,isValid:O}}=(0,s.cI)({resolver:(0,a.F)(E),mode:"onChange"}),{error:L,clearError:D}=(0,f.Z)(),A=async e=>{try{var t,l;Z((0,x.VO)());let n={product_name:null!==(t=null==C?void 0:C.name)&&void 0!==t?t:"",name:e.name,mobile:e.mobile,sku:null!==(l=null==C?void 0:C.sku)&&void 0!==l?l:"",reason:e.reason,...R?{}:{email:null==e?void 0:e.email}};k&&(n={...n,...k});let s=await (0,m.md)(n);"string"==typeof s?(Z((0,x.Gx)()),(0,u.C)({message:"string"==typeof s?s:"",type:"success"}),S()):(Z((0,x.Gx)()),(0,u.C)({message:"string"==typeof(null==s?void 0:s.error)?null==s?void 0:s.error:g.N.UNSUCCESS_ERROR.message,type:"error"}))}catch(e){(0,u.C)(g.N.SEND_ENQUIRY_FAILED)}},V=(e,t,l)=>{let n=e.target.value;M(t,(0,b.Vl)(l,n),{shouldValidate:!0}),D()};return(0,n.jsx)(n.Fragment,{children:_&&(0,n.jsxs)(r.Z,{show:_,onHide:S,className:"enquiry-form",children:[(0,n.jsx)(r.Z.Header,{closeButton:!0,children:(0,n.jsx)(r.Z.Title,{children:(0,n.jsx)("div",{style:{color:"#681016"},children:"Send Enquiry"})})}),(0,n.jsxs)(r.Z.Body,{children:[(0,n.jsxs)(i.default,{className:"align-items-center",children:[(0,n.jsx)(o.default,{xs:4,children:(0,n.jsx)(c.default,{src:null!==(N=null==C?void 0:C.thumb_image)&&void 0!==N?N:"/GRT_Logo.png",alt:null!==(w=null==C?void 0:C.name)&&void 0!==w?w:"Grt jewellers",width:200,height:200})}),(0,n.jsxs)(o.default,{xs:8,children:[(0,n.jsx)("h6",{children:null==C?void 0:C.sku}),(0,n.jsx)("h5",{className:"mt-2",children:null==C?void 0:C.name})]})]}),(0,n.jsxs)("form",{onSubmit:I(A),className:"grt-form",children:[(0,n.jsx)(p.Z,{fieldType:"text",name:"name",label:"Name*",register:T,placeholder:"Enter name",ariaLabel:"Name",onChange:e=>{M("name",e.target.value,{shouldValidate:!0}),D()},error:null===(t=P.name)||void 0===t?void 0:t.message,className:"mb-3 p-2"}),(0,n.jsx)(p.Z,{fieldType:"text",name:"email",label:"Email".concat(R?"":"*"),register:T,placeholder:"Enter email-id",ariaLabel:"Email",onChange:e=>{M("email",e.target.value,{shouldValidate:!0}),D()},error:null===(l=P.email)||void 0===l?void 0:l.message,className:"mb-3 p-2"}),(0,n.jsx)(p.Z,{fieldType:"text",name:"mobile",label:"Mobile Number*",register:T,placeholder:"Enter mobile number",ariaLabel:"Mobile Number",error:null===(j=P.mobile)||void 0===j?void 0:j.message,maxLength:10,onChange:e=>V(e,"mobile","numeric"),className:"mb-3 p-2"}),(0,n.jsx)(p.Z,{fieldType:"text",name:"reason",label:"Reason*",register:T,placeholder:"Enter reason",ariaLabel:"Reason",error:null===(y=P.reason)||void 0===y?void 0:y.message,onChange:e=>{M("reason",e.target.value,{shouldValidate:!0}),D()},className:"mb-3 p-2"}),""!==L&&(0,n.jsx)("p",{className:"error-message mt-1",children:L}),(0,n.jsx)("div",{className:"mt-3 text-center",children:(0,n.jsx)(h.zx,{className:"grt-btn btn--ruby btn--medium mx-auto$ ".concat(!O&&"disabled-btn"),type:"submit",disabled:!O,children:"Submit"})})]})]})]})})}},60180:function(e,t,l){"use strict";l.r(t);var n=l(57437),s=l(2265);t.default=e=>{let{cssClass:t,backgroundColor:l,backgroundImage:a,background:r,children:i,fontColor:o,showBackgroundImage:c}=e;return(0,s.useInsertionEffect)(()=>{let e=document.createElement("style"),n=null==t?void 0:t.split(" ").join("."),s="";a&&(s=c?a:"url(".concat("https://media.grtjewels.com","/").concat(a,")"));let i="\n .".concat(n," {\n ").concat(l?"background-color: ".concat(l," !important"):"",";\n ").concat(a?"background-image: ".concat(s,";"):"","\n ").concat(o?"color: ".concat(o," !important"):"",";\n ").concat(r?"background: ".concat(r," !important"):"",";\n }\n ");return e.appendChild(document.createTextNode(i)),document.head.appendChild(e),()=>{document.head.removeChild(e)}},[t,l,a,o]),(0,n.jsx)(n.Fragment,{children:i})}},67545:function(e,t,l){"use strict";var n=l(57437);l(2265);var s=l(65113);t.default=e=>{let{children:t}=e,{loading:l}=(0,s.CG)(e=>e.globalState);return l?(0,n.jsx)("div",{children:t}):null}},9381:function(e,t,l){"use strict";var n=l(57437);l(2265);var s=l(21404);t.Z=e=>{let{showModal:t=!1,containerClassName:l="",children:a,handleClose:r=()=>{},placement:i,showCancelBtn:o=!0}=e;return(0,n.jsxs)(s.Z,{show:t,onHide:r,className:l,...i&&{placement:i},children:[o&&(0,n.jsx)(s.Z.Header,{closeButton:!0}),(0,n.jsx)(s.Z.Body,{children:a})]})}},57797:function(e,t,l){"use strict";var n=l(57437),s=l(61418);l(2265);var a=l(21404);t.Z=e=>{let{show:t,onHide:l,title:r,className:i,position:o="start",enableBackdrop:c=!0,enableBodyScrolling:d=!1,enableBoth:u=!1,backgroundImage:m,closingButtonRequired:h=!0,children:f}=e;return(0,n.jsxs)(a.Z,{show:t,onHide:l,placement:o,backdrop:u?"static":!!c,scroll:!!(u||d),style:{backgroundImage:m?"url(".concat(m,")"):void 0,backgroundSize:"cover",backgroundPosition:"center"},className:i,children:[(0,n.jsxs)(a.Z.Header,{className:"overlay-drawer-header",children:[(0,n.jsx)(a.Z.Title,{className:"overlay-drawer-title",children:r}),h&&(0,n.jsx)(s.zx,{type:"button",className:"button-close md rounded","aria-label":"Close",handleClick:l,children:(0,n.jsx)("i",{className:"bi bi-x"})})]}),(0,n.jsx)(a.Z.Body,{className:"overlay-drawer-body",children:f})]})}},16538:function(e,t,l){"use strict";l.r(t),l.d(t,{NextArrow:function(){return a},PrevArrow:function(){return r}});var n=l(57437);l(2265);var s=l(61418);let a=e=>{let{onClick:t,className:l}=e;return(0,n.jsx)(s.zx,{type:"button","aria-label":"previous-icon",className:l,handleClick:t,children:(0,n.jsx)("i",{className:"bi bi-chevron-right"})})},r=e=>{let{onClick:t,className:l}=e;return(0,n.jsx)(s.zx,{type:"button","aria-label":"next-icon",className:l,handleClick:t,children:(0,n.jsx)("i",{className:"bi bi-chevron-left"})})}},30048:function(e,t,l){"use strict";l.r(t);var n=l(57437);l(2265);var s=l(6406);l(97425),l(49608),t.default=e=>{let{settings:t,children:l}=e;return(0,n.jsx)(s.Z,{...t,children:l})}},918:function(e,t,l){"use strict";var n=l(2265),s=l(65113),a=l(92731),r=l(45061),i=l(68017),o=l(11279),c=l(19405),d=l(34537),u=l(19032),m=l(99376),h=l(30963);t.Z=()=>
1{let e=(0,s.TL)(),[t,l]=(0,n.useState)(!1),{mutate:f}=(0,d.Z)(),g=(0,m.useRouter)(),p=()=>sessionStorage.getItem("mobileNumber")||"",v=e=>{sessionStorage.setItem("mobileNumber",e)},x=()=>{sessionStorage.removeItem("mobileNumber")},b=async()=>{var t,n;e((0,a.VO)());let s=await (0,u.r3)();e((0,o.XN)(s)),e((0,a.Gx)());let r=null===(t=s.custom_attributes)||void 0===t?void 0:t.find(e=>"mobile"===e.attribute_code);(null==r?void 0:r.value)&&v(r.value),(null===(n=s.custom_attributes)||void 0===n?void 0:n.find(e=>"mobile_authenticated"===e.attribute_code))||l(!0)};(0,n.useEffect)(()=>{t&&p()&&j(p())},[t]);let j=async e=>{try{let t=await (0,i._Z)(e,"user");!0===t?(0,r.C)(h.N.OTP_SENT_SUCCESS):(0,r.C)({message:null==t?void 0:t.error,type:"error"})}catch(e){(0,r.C)(h.N.COMMON_ERROR)}},y=async e=>{(0,r.C)({message:e,type:"success"}),await b();let t=await (0,u.r3)();{var l;let e=JSON.parse(null!==(l=localStorage.getItem("guestCartId"))&&void 0!==l?l:'""'),n=await (0,c.tA)(null==t?void 0:t.id,e);return!n||(f(),n)}};return{getUserDetails:b,handleSendOtp:j,handleVerifyOtp:async e=>{let t=e.otp;try{let e=await (0,i.Mu)(t);
1!0===e?((0,r.C)(h.N.MOBILE_VERIFICATION_SUCCESS),g.push("/"),l(!1)):(0,r.C)({message:null==e?void 0:e.error,type:"error"}),x()}catch(e){(0,r.C)(h.N.COMMON_ERROR),x()}},handleAfterLogin:y,showMobileAuthModal:t,setShowMobileAuthModal:l,getMobileNumber:p}}},25236:function(e,t,l){"use strict";var n=l(2265);t.Z=()=>{let[e,t]=(0,n.useState)("");return{error:e,showError:e=>{t(e)},clearError:()=>{t("")}}}},58819:function(e,t,l){"use strict";var n=l(2265);t.Z=()=>{let[e,t]=(0,n.useState)(!1),[l,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{s(!0)},[]),(0,n.useEffect)(()=>{if(l){let e=window.matchMedia("only screen and (max-width: 768px)");t(e.matches);let l=()=>t(e.matches);return e.addEventListener("change",l),()=>{e.removeEventListener("change",l)}}},[l]),e}},79383:function(e,t,l){"use strict";var n=l(61006),s=l(65113),a=l(19032),r=l(11279);t.Z=()=>{let e=(0,s.TL)(),t=(0,s.CG)(e=>e.user.userDetails),{data:l,error:i,isLoading:o}=(0,n.u)((null==t?void 0:t.id)!==-1?null:"customers/me",a.r3,{revalidateOnFocus:!1,onSuccess:t=>{e((0,r.XN)(t))}});return{...(null==t?void 0:t.id)!==-1?t:l,error:i,isLoading:o}}},65500:function(e,t,l){"use strict";l.d(t,{$T:function(){return k},CQ:function(){return f},DB:function(){return m},Fr:function(){return d},KQ:function(){return R},Ni:function(){return o},Rw:function(){return y},Sv:function(){return h},V5:function(){return p},VX:function(){return N},W7:function(){return j},XE:function(){return _},Ys:function(){return S},_C:function(){return C},et:function(){return w},fX:function(){return r},hp:function(){return g},kO:function(){return v},lZ:function(){return c},mm:function(){return u},q3:function(){return s},qI:function(){return x},qv:function(){return Z},s7:function(){return E},vK:function(){return a},xq:function(){return i},yF:function(){return b}}),l(83079);var n=l(12119),s=(0,n.$)("e44d5a67b4b808f91cef32412ccd67acf794296a"),a=(0,n.$)("5afac777539578ee2ae36594ad62e7032584d7e2"),r=(0,n.$)("494403b1aa35f81ded74759ef574b69f432f8e97"),i=(0,n.$)("6756f29544136db532a32a4e8620d43ec0acdc18"),o=(0,n.$)("0d0fdff550ee5d335a3b3d533d4cbe32244091ff"),c=(0,n.$)("e0ce38d70747a9d2e93d9c2c8b613feef81dc315"),d=(0,n.$)("7c5309545135cbee3c271fd7b771efb054adba54"),u=(0,n.$)("8968b061074d9111ccf5c565eca756beb7b497ab"),m=(0,n.$)("b3b0fd35b419ed6d3de8682f29493a08d61f4c39"),h=(0,n.$)("cdc9e80870cb68f6d745fc730ca05a153bc0c988"),f=(0,n.$)("19bce09a33e526eb9540b34f8d205efcf3bfd13a"),g=(0,n.$)("eb77f66b2c8289606e4a9113b0e6ba3cfa108840"),p=(0,n.$)("a28b8237c72a84be347b14e4f6c5c5ed279ad9e4"),v=(0,n.$)("c58ed98f784456e734e4122a3540d2f99e5d981e"),x=(0,n.$)("f22452e687b071c7ae8f94c000a5cd46b80274c6"),b=(0,n.$)("6113c579734fc0818f091af8222adc38b70f9743"),j=(0,n.$)("65044c4f86383cf8660624d7cf1da858cc166d2e"),y=(0,n.$)("62830473304b607dc6111c0b71cbe2ccf791fade"),N=(0,n.$)("baddd825749e684e1f4ca8a241b7164b19a5448d"),w=(0,n.$)("dea8ce6dfd6573a2e8800a22b0b8a290f9c33dab"),_=(0,n.$)("9ed6d0658f4e0a793b55255589943fae408647b3"),C=(0,n.$)("ae2e74a3b4fbff75f8b140c3557cbd01cecee5bb"),k=(0,n.$)("4c4f1233114edf6986157c26e96baeb483961e85"),S=(0,n.$)("573a0c1dc37d69af01010d86697c76c2f641b35a"),R=(0,n.$)("456e8512ce366e04ae25bc17dfbc38193a5ec369"),Z=(0,n.$)("fb3f5f075e828f602b93fbaaaefd92147173efcd"),E=(0,n.$)("841a237d6f9995f6aeb8333a721b5381edd98ee9")},52708:function(e,t,l){"use strict";l.d(t,{Bx:function(){return s}});let n=(0,l(20301).oM)({name:"appointment",initialState:{date:"",time:"",email:"",phone:""},reducers:{setAppointmentInfo:(e,t)=>{e.date=t.payload.date,e.time=t.payload.time,e.email=t.payload.email,e.phone=t.payload.phone},clearAppointmentInfo:e=>{e.date="",e.time="",e.email="",e.phone=""}}}),{setAppointmentInfo:s,clearAppointmentInfo:a}=n.actions;t.ZP=n.reducer},20310:function(e,t,l){"use strict";l.d(t,{x:function(){return r}});var n=l(20301),s=l(92191),a=l(29535);let r=(0,n.hg)("cart/fetchCart",async(e,t)=>{let{isLoggedIn:l,guestCartId:n}=e,{rejectWithValue:r}=t;if(!l&&!n){let e=await (0,a.BS)();localStorage.setItem("guestCartId",JSON.stringify(e))}try{return await (0,s.zV)({url:l?"carts/mine":"guest-carts/".concat(n),args:{type:l?"customer":"guest"}})}catch(e){return r(e instanceof Error?e.message:"An unknown error occurred.")}}),i=(0,n.oM)({name:"cart",initialState:{cartData:null,loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(r.pending,e=>{e.loading=!0,e.error=null}).addCase(r.fulfilled,(e,t)=>{e.loading=!1,e.cartData=t.payload}).addCase(r.rejected,(e,t)=>{e.loading=!1,e.error=t.payload})}});t.Z=i.reducer},99203:function(e,t,l){"use strict";l.d(t,{D:function(){return a}});var n=l(20301),s=l(92191);let a=(0,n.hg)("cartTotals/fetch",async(e,t)=>{let{rejectWithValue:l}=t,{isLoggedIn:n,guestCartId:a}=e;try{return await (0,s.zV)({url:n?"carts/mine/totals":"guest-carts/".concat(a,"/totals"),args:{type:n?"customer":"guest"}})}catch(e){if(e instanceof Error)return l(e.message);return l("An unknown error occurred.")}}),r=(0,n.oM)({name:"cartTotals",initialState:{totals:null,loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(a.pending,e=>{e.loading=!0,e.error=null}).addCase(a.fulfilled,(e,t)=>{e.loading=!1,e.totals=t.payload}).addCase(a.rejected,(e,t)=>{e.loading=!1,e.error=t.payload})}});t.Z=r.reducer},58945:function(e,t,l){"use strict";l.d(t,{$6:function(){return p},$B:function(){return b},$P:function(){return g},$R:function(){return v},Dj:function(){return w},Gb:function(){return d},NO:function(){return Z},Oe:function(){return x},TR:function(){return j},Um:function(){return a},V5:function(){return c},VS:function(){return N},Yb:function(){return E},a5:function(){return i},eT:function(){return y},eq:function(){return C},i:function(){return S},kO:function(){return h},n$:function(){return R},nV:function(){return f},oO:function(){return r},qv:function(){return _}});var n=l(20301);let s={amount:[],grams:[],minimum_amount:"",maximum_amount:"",minimum_grams:"",maximum_grams:"",tax_percentage:""},a={pre_tax_amount:"",quantity:"",total_tax_amount:"",total_amount:"",tax1_amount:"",tax2_amount:"",tax3_amount:"",quoteId:"",quoteValidityTime:0,current_rate:"",pre_tax_current_rate:"",tax3Amt:"",preTaxAmount:"",createdAt:"",is_registered:!1,quantity_balance:"",amount_balance:"",tax_percent:"",tax1Perc:"",tax2Perc:""},r={quoteId:"",quoteValidityTime:0,current_rate:"",pre_tax_current_rate:"",createdAt:"",is_registered:!1,quantity_balance:"",amount_balance:"",tax_percent:"",max_amount_redeem:"",max_quantity_redeem:"",tax3Amt:"",preTaxAmount:"",tax1Perc:"",tax2Perc:""},i={amount:"",grams:"",selectedOption:""},o={account_name:"",account_number:"",reenter_account_number:"",ifsc_code:"",bank_name:""},c={status:"",quantity:"",mobile:0,payment_status_message:"",type:"",current_rate:""},d={uuid:"",otp_sent:!1,mobile:"",message:""},u=(0,n.oM)({name:"digiGoldSlice",initialState:{buy:s,sell:s,transfer:s,quoteDetails:r,currencySymbol:"",paymentMethod:"",formValues:i,calculatedDetail
1s:a,activeTabkey:"buy",sellCheckoutFormData:o,otpData:d,enteredOTP:"",transferDetailsData:{message:"",mobile:""},transferResponseData:c,orderList:[],redirectURL:"/",closeRedemption:!1,showConfirmRedemption:!1,triggerFormReset:!1,digiGoldLogo:""},reducers:{setCurrencySymbol(e,t){e.currencySymbol=t.payload},setDigiGoldLogo(e,t){e.digiGoldLogo=t.payload},setCloseRedemption(e,t){e.closeRedemption=t.payload},setTriggerFormReset(e,t){e.triggerFormReset=t.payload},setShowConfirmRedemption(e,t){e.showConfirmRedemption=t.payload},setRedirectURL(e,t){e.redirectURL=t.payload},setPaymentMethod(e,t){e.paymentMethod=t.payload},setActiveTabKey(e,t){e.activeTabkey=t.payload},setBuyDetails(e,t){e.buy=t.payload},setQuoteDetails(e,t){e.quoteDetails=t.payload},setCalculatedDetails(e,t){e.calculatedDetails=t.payload},setFormValues(e,t){e.formValues=t.payload},setSellCheckoutFormData(e,t){e.sellCheckoutFormData=t.payload},setOTPData(e,t){e.otpData=t.payload},setEnteredOTP(e,t){e.enteredOTP=t.payload},setTransferDetailsFormData(e,t){e.transferDetailsData=t.payload},setTransferResponseData(e,t){e.transferResponseData=t.payload},setOrderListData(e,t){e.orderList=t.payload},resetAllState(e){e.quoteDetails=r,e.formValues=i,e.enteredOTP="",e.otpData=d,e.sellCheckoutFormData=o,e.calculatedDetails=a}}}),{setBuyDetails:m,setCurrencySymbol:h,setQuoteDetails:f,setPaymentMethod:g,setFormValues:p,setCalculatedDetails:v,setActiveTabKey:x,setSellCheckoutFormData:b,setOTPData:j,setEnteredOTP:y,setTransferDetailsFormData:N,setTransferResponseData:w,setOrderListData:_,resetAllState:C,setRedirectURL:k,setCloseRedemption:S,setShowConfirmRedemption:R,setTriggerFormReset:Z,setDigiGoldLogo:E}=u.actions;t.ZP=u.reducer},29342:function(e,t,l){"use strict";l.d(t,{$P:function(){return s},Mq:function(){return o},S6:function(){return i},Z0:function(){return c},iM:function(){return a},nD:function(){return r}});let n=(0,l(20301).oM)({name:"paymentSlice",initialState:{method:"",paymentOption:"",notifyInWhatsapp:!1,redemptionDetails:{programName:"",cardNumber:"",mobileNumber:"",addedAmount:"",amount:"",quoteId:"",customerId:"",customerAmount:"",customerOtp:"",redeemAmount:"",authCode:"",orderId:"",tokenNumber:"",context:"",grtAppliedMobiles:0,grtAppliedMobileNumbers:[],maxRewardMobNums:1},redeemedCards:[],redeemedGyftr:[]},reducers:{setPaymentMethod(e,t){e.method=t.payload},setNotifyInWhatsapp(e,t){e.notifyInWhatsapp=t.payload},setPaymentOption(e,t){e.paymentOption=t.payload},setRedemptionDetails(e,t){e.redemptionDetails={...e.redemptionDetails,...t.payload}},setRedeemedCards(e,t){e.redeemedCards=t.payload},setRedeemedGyftr(e,t){e.redeemedGyftr=t.payload}}}),{setPaymentMethod:s,setRedemptionDetails:a,setRedeemedCards:r,setRedeemedGyftr:i,setNotifyInWhatsapp:o,setPaymentOption:c}=n.actions;t.ZP=n.reducer},49318:function(e,t,l){"use strict";l.d(t,{default:function(){return b}});var n=l(57437),s=l(2265),a=l(68575),r=l(20301),i=l(59688),o=l(11279),c=l(92731),d=l(29342),u=l(34370),m=l(58945),h=l(20310),f=l(99203),g=l(52708);let p=(0,i.UY)({user:o.ZP,globalState:c.ZP,paymentSlice:d.ZP,savingSchemeSlice:u.ZP,digiGoldSlice:m.ZP,cart:h.Z,cartTotals:f.Z,appointment:g.ZP}),v=()=>(0,r.xC)({reducer:p});var x=l(80605);function b(e){let{children:t}=e,l=(0,s.useRef)();return l.current||(l.current=v()),(0,n.jsxs)(x.SessionProvider,{children:[" ",(0,n.jsx)(a.zt,{store:l.current,children:t})," "]})}},3435:function(e,t,l){"use strict";l.d(t,{RI:function(){return r},V6:function(){return i},Zx:function(){return a},ob:function(){return s}});var n=l(91351);let s=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return n.Ry({name:n.Z_().min(1,"Name is required").regex(/^[a-zA-Z\s]+$/,"Only letters and spaces are allowed"),email:e?n.Z_().min(1,{message:"Email is required"}).email({message:"Invalid email address"}).regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z]+\.[a-zA-Z]{2,}$/,{message:"Invalid email address"}):n.Z_().nullable().or(n.i0("")).refine(e=>!e||/^[a-zA-Z0-9._%+-]+@[a-zA-Z]+\.[a-zA-Z]{2,}$/.test(e),{message:"Invalid email address"}),mobile:n.Z_().min(1,"Mobile number is required").regex(/^\d{10}$/,{message:"Invalid mobile number"}),reason:n.Z_().min(1,{message:"Reason is required"}).max(255,{message:"Reason must be 200 characters or fewer"})})},a=n.Ry({pincode:n.Z_().regex(/^\d{6}$/,{message:"Invalid pincode. It should be exactly 6 digits."})}),r=n.Ry({email:n.Z_().min(1,{message:"Email is required"}).email({message:"Invalid email address"}).regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z]+\.[a-zA-Z]{2,}$/,{message:"Invalid email address"}),mobileNumber:n.Z_().min(1,{message:"Mobile Number is required"}).regex(/^\d{10}$/,{message:"Mobile number must be 10 digits"})}),i=n.Ry({couponCode:n.Z_().min(1,{message:"Please enter coupon code and continue."}).max(24,{message:"Coupon code should not exceed 24 characters."})})},188:function(e,t,l){"use strict";l.d(t,{af:function(){return n}}),l(57437),l(2265),l(68412),l(33145),l(57099),l(12350);let n=(e,t)=>{var l;return null!==(l=e[t])&&void 0!==l&&!!l.is_enabled}},21241:function(){},6680:function(){}},function(e){e.O(0,[9669,8977,4075,1692,1866,3676,5501,5525,5878,3305,6175,9400,9219,301,8553,3974,2255,9296,7396,3786,3810,3567,1268,9171,4567,8215,9151,1418,5195,1490,2971,2117,1744],function(){return e(e.s=89145)}),_N_E=e.O()}]);
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.