1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{38540:function(e,t,n){Promise.resolve().then(n.t.bind(n,47960,23)),Promise.resolve().then(n.bind(n,90106)),Promise.resolve().then(n.bind(n,866)),Promise.resolve().then(n.bind(n,84424)),Promise.resolve().then(n.bind(n,93442)),Promise.resolve().then(n.bind(n,70024)),Promise.resolve().then(n.bind(n,23153)),Promise.resolve().then(n.bind(n,49197)),Promise.resolve().then(n.bind(n,1952)),Promise.resolve().then(n.t.bind(n,88003,23)),Promise.resolve().then(n.t.bind(n,97116,23)),Promise.resolve().then(n.t.bind(n,66380,23)),Promise.resolve().then(n.t.bind(n,5776,23)),Promise.resolve().then(n.t.bind(n,86123,23)),Promise.resolve().then(n.t.bind(n,93482,23)),Promise.resolve().then(n.t.bind(n,48997,23)),Promise.resolve().then(n.t.bind(n,63685,23))},90106:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var i=n(2265),r=n(99376),a=n(2141);function o(){let e=(0,r.useRouter)(),t=(0,r.usePathname)(),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{("/"===t||window.location.hash.includes("access_token"))&&!n.current&&(async()=>{let t=window.location.hash;if(t.includes("access_token")||t.includes("error")){n.current=!0,console.log("\uD83D\uDD10 Detected auth tokens in URL hash, processing..."),await new Promise(e=>setTimeout(e,500));let{data:{session:t},error:i}=await a.O.auth.getSession();if(i){console.error("â Error getting session:",i),window.history.replaceState(null,"",window.location.pathname),e.push("/register?error=auth_failed");return}if(null==t?void 0:t.user){console.log("â
Session established, checking profile...");let{data:n,error:i}=await a.O.from("customer_profiles").select("id, is_student").eq("id",t.user.id).single();if(i&&"PGRST116"!==i.code&&console.error("Profile check error:",i),window.history.replaceState(null,"",window.location.pathname),n)console.log("â
Profile exists, redirecting to dashboard"),e.push("/dashboard");else{console.log("\uD83D\uDCDD No profile found, redirecting to complete registration");let n=t.user.email||"",i=n.toLowerCase().trim(),r=i.split("@")[1];/\.ac\.za$/.test(i)||/\.edu$/.test(i)||r&&["tuks.co.za"].includes(r)?(console.log("â
University email detected:",n),e.push("/register/complete?is_student=true")):e.push("/register/complete")}}else console.warn("â ï¸ No session after processing hash"),window.history.replaceState(null,"",window.location.pathname),e.push("/register?error=no_session")}})()},[t,e]),null}},866:function(e,t,n){"use strict";n.d(t,{Kc:function(){return d},Q4:function(){return u},Qc:function(){return m},U3:function(){return f},default:function(){return s},hI:function(){return h},i2:function(){return w},lQ:function(){return g},uk:function(){return c},wI:function(){return p}});var i=n(57437),r=n(2265),a=n(48667),o=n(99376);function s(e){let{pixelId:t}=e,n=(0,o.usePathname)(),s=(0,o.useSearchParams)(),l=t||"374590297673202";return((0,r.useEffect)(()=>{if(!l){console.warn("Facebook Pixel: Pixel ID not configured");return}window.fbq&&(window.fbq("track","PageView"),console.log("\uD83D\uDCCA Facebook Pixel: PageView tracked"))},[n,s,l]),l)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.default,{id:"facebook-pixel",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n !function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '".concat(l,"');\n fbq('track', 'PageView');\n ")}}),(0,i.jsx)("noscript",{children:(0,i.jsx)("img",{height:"1",width:"1",style:{display:"none"},src:"https://www.facebook.com/tr?id=".concat(l,"&ev=PageView&noscript=1"),alt:""})})]}):null}function l(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"track",r=()=>{n?window.fbq(i,e,t,{eventID:n}):window.fbq(i,e,t),console.log("\uD83D\uDCCA Facebook Pixel: "+e,{...t,...n?{eventId:n}:{}})};if(window.fbq){r();return}let a=0,o=setInterval(()=>{if(window.fbq){clearInterval(o),r();return}(a+=200)>=5e3&&(clearInterval(o),console.warn("\uD83D\uDCCA Facebook Pixel: ".concat(e," dropped â fbq never loaded (blocked, or no pixel id).")))},200)}async function c(e,t){let n={eventName:e,eventData:{...t,eventSourceUrl:t.eventSourceUrl||window.location.href}};try{await fetch("/api/facebook/track-event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(e){console.error("â Failed to send Facebook server event:",e)}}function u(e){let{event_id:t,...n}=e;l("ViewContent",n,t)}function d(e){let{event_id:t,...n}=e;l("AddToCart",n,t)}function h(e){let{event_id:t,...n}=e;l("InitiateCheckout",n,t)}function m(e){let{event_id:t,...n}=e;l("Purchase",n,t)}function f(e){let{event_id:t,...n}=e;l("Search",n,t)}function g(e){if(!e){l("Contact",{},void 0);return}let{event_id:t,...n}=e;l("Contact",n,t)}function w(e){let{event_id:t,...n}=e;l("AddToWishlist",n,t)}function p(e){let{event_id:t,...n}=e;l("ViewCategory",n,t,"trackCustom")}},84424:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});
1var i=n(2265),r=n(99376),a=n(61282);function o(){let e=(0,r.usePathname)(),t=(0,r.useSearchParams)();return(0,i.useEffect)(()=>{(0,a.p4)(new URLSearchParams(t.toString()),"".concat(e).concat(t.size?"?".concat(t.toString()):""),document.referrer)},[e,t]),null}},93442:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var i=n(2265),r=n(99376),a=n(87148);function o(){let e=(0,r.usePathname)(),t=(0,r.useSearchParams)();return(0,i.useEffect)(()=>{if(!a.In)return;let n=e+((null==t?void 0:t.toString())?"?".concat(t.toString()):"");a.LV(n)},[e,t]),null}},70024:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var i=n(57437),r=n(2265),a=n(99376);function o(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(""),s=(0,a.usePathname)();return((0,r.useEffect)(()=>{let e=()=>{document.querySelectorAll('[id*="uchat"], [class*="uchat"], [data-uchat]').forEach(e=>{e.remove()}),document.querySelectorAll('script[src*="uchat"]').forEach(e=>{e.remove()}),window.UCchat&&delete window.UCchat};e();let t=setInterval(e,1e3);return()=>{clearInterval(t),e()}},[s]),"/checkout"===s||s.startsWith("/checkout/"))?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"hidden lg:flex fixed bottom-4 right-4 sm:bottom-6 sm:right-6 z-40",children:(0,i.jsx)("button",{onClick:()=>t(!0),className:"bg-[#25D366] hover:bg-[#20b358] rounded-full w-14 h-14 sm:w-16 sm:h-16 flex items-center justify-center shadow-lg hover:scale-110 transition-all duration-300 focus:outline-none focus:ring-4 focus:ring-green-300","aria-label":"Open WhatsApp Chat",children:(0,i.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"white",xmlns:"http://www.w3.org/2000/svg",className:"w-7 h-7 sm:w-8 sm:h-8",children:(0,i.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.465 3.488"})})})}),e&&(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-[60] flex items-center justify-center p-4",onClick:()=>t(!1),children:(0,i.jsxs)("div",{className:"bg-white max-w-sm w-full h-[500px] rounded-lg shadow-xl overflow-hidden flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,i.jsxs)("div",{className:"bg-[#075E54] px-4 py-3 flex items-center gap-3 text-white",children:[(0,i.jsx)("button",{onClick:()=>t(!1),className:"p-1 hover:bg-white/10 rounded-full transition-colors",children:(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,i.jsx)("path",{d:"m15 18-6-6 6-6"})})}),(0,i.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden bg-white",children:(0,i.jsx)("img",{src:"/wizmed-logo.png",alt:"WiZmed Logo",className:"w-full h-full object-cover"})}),(0,i.jsx)("div",{className:"flex-1",children:(0,i.jsx)("div",{className:"font-medium text-[17px]",children:"WiZmed"})}),(0,i.jsx)("button",{className:"p-2 hover:bg-white/10 rounded-full transition-colors",children:(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,i.jsx)("div",{className:"flex-1 relative overflow-hidden",style:{backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewB
1ox='0 0 100 100'%3E%3Cg fill-opacity='0.03'%3E%3Cpolygon fill='%23000' points='50 0 60 40 100 50 60 60 50 100 40 60 0 50 40 40'/%3E%3C/g%3E%3C/svg%3E\")",backgroundColor:"#E5DDD5"},children:(0,i.jsx)("div",{className:"p-4 h-full flex flex-col justify-end",children:(0,i.jsx)("div",{className:"mb-4",children:(0,i.jsxs)("div",{className:"bg-white rounded-lg rounded-bl-none max-w-[80%] p-3 shadow-sm",children:[(0,i.jsxs)("p",{className:"text-gray-900 text-[15px] leading-[1.4]",children:["Hi! Welcome to WiZmed \uD83D\uDC4B",(0,i.jsx)("br",{}),"How can we help you today?"]}),(0,i.jsx)("div",{className:"flex items-center justify-end gap-1 mt-1",children:(0,i.jsx)("span",{className:"text-[11px] text-gray-500",children:new Date().toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})})})]})})})}),(0,i.jsx)("div",{className:"bg-[#F0F0F0] px-2 py-2",children:(0,i.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),n.trim()){let e="https://wa.me/27875377360?text=".concat(encodeURIComponent(n));window.open(e,"_blank"),o(""),t(!1)}},className:"flex items-end gap-2",children:[(0,i.jsxs)("div",{className:"flex-1 bg-white rounded-full flex items-center px-4 py-2 min-h-[40px]",children:[(0,i.jsx)("button",{type:"button",className:"p-1 hover:bg-gray-100 rounded-full transition-colors",children:(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"#8696A0",children:[(0,i.jsx)("path",{d:"M9.153 11.603c.795 0 1.439-.879 1.439-1.962s-.644-1.962-1.439-1.962-1.439.879-1.439 1.962.644 1.962 1.439 1.962zm-3.204 1.362c-.026-.307-.131 5.218 6.063 5.551 6.066-.25 6.066-5.551 6.066-5.551-6.078 1.416-12.129 0-12.129 0zm11.363-1.362c.795 0 1.439-.879 1.439-1.962s-.644-1.962-1.439-1.962-1.439.879-1.439 1.962.644 1.962 1.439 1.962zm-9.591 1.362c-.131 0-.132 5.218 6.062 5.551 6.066-.25 6.066-5.551 6.066-5.551-6.077 1.416-12.128 0-12.128 0z"}),(0,i.jsx)("path",{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"})]})}),(0,i.jsx)("input",{type:"text",value:n,onChange:e=>o(e.target.value),placeholder:"Type a message",className:"flex-1 outline-none text-[15px] text-gray-900 placeholder-gray-500 px-2 py-1"}),(0,i.jsx)("button",{type:"button",className:"p-1 hover:bg-gray-100 rounded-full transition-colors",children:(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"#8696A0",children:(0,i.jsx)("path",{d:"M1.816 15.556v.002c0 1.502.584 2.912 1.646 3.972s2.472 1.647 3.974 1.647a5.58 5.58 0 0 0 3.972-1.645l9.547-9.548c.769-.768 1.147-1.767 1.058-2.817-.079-.968-.548-1.927-1.319-2.698C19.955 3.722 19.01 3.25 18.067 3.25s-1.888.472-2.627 1.21L7.967 12.933c-.518.518-.747 1.188-.644 1.887.103.699.48 1.354 1.061 1.844.581.49 1.312.729 2.058.729.746 0 1.477-.239 2.058-.729l7.916-7.916c.195-.195.512-.195.707 0s.195.512 0 .707L12.207 16.371c-.863.863-2.012 1.338-3.237 1.338s-2.374-.475-3.237-1.338c-.863-.863-1.338-2.012-1.338-3.237s.475-2.374 1.338-3.237L13.206 2.414c.769-.769 1.794-1.193 2.888-1.193s2.119.424 2.888 1.193c.769.769 1.193 1.794 1.193 2.888s-.424 2.119-1.193 2.888L9.433 17.738c-.769.769-1.794 1.193-2.888 1.193s-2.119-.424-2.888-1.193c-.769-.769-1.193-1.794-1.193-2.888v-.002c0-.195.158-.353.353-.353s.353.158.353.353z"})})})]}),(0,i.jsx)("button",{type:"submit",className:"bg-[#00A884] hover:bg-[#008069] rounded-full w-10 h-10 flex items-center justify-center transition-colors",disabled:!n.trim(),children:(0,i.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"white",children:(0,i.jsx)("path",{d:"M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"})})})]})})]})})]})}},23153:function(e,t,n){"use strict";n.d(t,{default:function(){return N}});var i=n(57437),r=n(90946),a=n(29827),o=n(2265),s=n(85694),l=n(64006),c=n(19124),u=n(46281),d=n(45498),h=n(37426),m=n(37788);let f=["Michelle","Megan","Nolwazi","Muhammad","Hannah","Ayanda","Luthando","Nozipho","Rene","Katlego","Thandeka","Karabo","Busisiwe","Nomfundo","Jerry","Michael","Mpho","Precious","Lesego","Jessica","Neo","Lerato","Simone","Anele","Angel","Fezile","Barbara","Melissa","Natasha","Imaan","Philisiwe","Nthabiseng","Fatima","Fisokuhle","Amanda","Joshua","Refilwe","George","Neil","Khanyisile","Danielle","Luyanda","Daniel","Tebogo","Yonela","Hilda","Candice","Jaidon","Ruth","Thapelo","Caitlin","Zinhle","Azola","Faith","Kholofelo","Msutukazi","Amy","John","Abigail","Zoe","Sithembile","Riaan","Mbali","Charlene","Naledi","Lauren","Zama","Nhlanhla","Adzunisiwe","Itumeleng","Riana","Nonhlanhla","Mathapelo","Talya","Nonkosi","Tumelo","Sharon","Robyn","Ahmed","Claudette","Kamogelo","Emma","Nicole","Rizwana","Andrea","Janet","Zandile","Siphokazi","Nonkululeko","Mia","Jean-Michel","Simphiwe","Carla","Mokgadi","Sphesihle","Tasneem","Jana","Queen","Nondumiso","Aadilah","Ingrid","Sisanda","Kayla","Kamohelo","Andrew","Tshegofatso","Lorraine","Linah","Mahlatse","Chelsea","Thato","Jaco","Kitanya","Samukelisiwe","Boitumelo","Lebogang","Palesa","Siphesihle","Sandra","Bongumusa"],g=["Cape Town","Pretoria","Johannesburg","Durban","Bloemfontein","Port Elizabeth","Pietermaritzburg","Polokwane","Centurion","Mthatha","Boksburg","Nelspruit","Parow","Umtata","George","East London","Alberton","Kimberley","Roodepoort","Krugers
1dorp","Newcastle","Edenvale","Benoni","Rustenburg","Randburg","Kempton Park","Klerksdorp","Ga-Rankuwa","Observatory","Empangeni","Marshalltown","Midrand","Halfway House","Witbank","Durbanville","Bellville","Stellenbosch","Sandton","Stanger","Paarl","Worcester","Soweto","Potchefstroom","Mbombela","Bethlehem","Mafikeng","Nigel","Somerset West","Green Point","Durban North","Vanderbijlpark","Secunda","Tzaneen","Welkom","Germiston","Upington","Umhlanga","Middelburg","Ladysmith","Brakpan","Butterworth","Springs","Hatfield","Mowbray","Brits","Vereeniging","Gqeberha","Port Shepstone","Tshwane","Richards Bay","Fourways","Queenstown","Louis Trichardt","Thohoyandou","Hammanskraal","Bedfordview","Delmas","Knysna","Phuthaditjhaba","Burgersfort","Pinetown","Standerton","Paulpietersburg","Madadeni","Sunningdale","Oudtshoorn"];var w=n(99376),p=n(33145),x=n(27648),b=n(32489),v=n(42449);function y(e){let{product:t,customerName:n,location:r,hoursAgo:a,onClose:s,isVisible:l}=e,[c,u]=(0,o.useState)(!1),d=(0,w.usePathname)();(0,o.useEffect)(()=>{if(l){setTimeout(()=>u(!0),100);let e=setTimeout(()=>{h()},8e3);return()=>clearTimeout(e)}},[l]);let h=()=>{u(!1),setTimeout(()=>s(),300)};return l&&"/checkout"!==d?(0,i.jsx)("div",{className:"fixed left-4 z-40 max-w-64 bottom-[calc(4rem+env(safe-area-inset-bottom,0px)+0.75rem)] sm:max-w-72 lg:bottom-4 transition-all duration-500 ease-out motion-reduce:transition-none ".concat(c?"transform translate-x-0 opacity-100 scale-100":"transform -translate-x-full opacity-0 scale-95"),children:(0,i.jsxs)("div",{className:"bg-white rounded-wiz shadow-wiz-md border border-wiz-200 overflow-hidden",children:[(0,i.jsx)("button",{onClick:h,className:"wz-focus absolute top-0 right-0 w-11 h-11 flex items-center justify-center text-wiz-500 hover:text-wiz-ink transition-colors z-10","aria-label":"Close notification",children:(0,i.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-wiz-100",children:(0,i.jsx)(b.Z,{className:"h-3 w-3"})})}),(0,i.jsx)("div",{className:"p-3 pr-10",children:(0,i.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,i.jsx)(x.default,{href:"/product/".concat(t.slug),className:"flex-shrink-0 block group",children:(0,i.jsx)("div",{className:"w-11 h-11 rounded-wiz overflow-hidden bg-wiz-50 border border-wiz-200 transition-all duration-200",children:t.images&&t.images.length>0?(0,i.jsx)(p.default,{src:t.images[0].src,alt:t.name,width:40,height:40,className:"w-full h-full object-contain p-1"}):(0,i.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,i.jsx)(v.Z,{className:"h-5 w-5 text-wiz-400"})})})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,i.jsx)("div",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),(0,i.jsxs)("p",{className:"text-xs text-wiz-600 font-medium truncate",children:[(0,i.jsx)("span",{className:"text-wiz-ink font-semibold",children:n})," from ",(0,i.jsx)("span",{className:"text-wiz-700",children:r})]})]}),(0,i.jsx)(x.default,{href:"/product/".concat(t.slug),className:"block mt-0.5 group after:absolute after:inset-0 after:content-['']",children:(0,i.jsx)("p",{className:"text-sm font-semibold text-wiz-ink group-hover:text-wiz-red transition-colors line-clamp-1 leading-tight",children:t.name})}),(0,i.jsxs)("div",{className:"flex items-center justify-between mt-1",children:[(0,i.jsx)("span",{className:"text-xs text-wiz-500 font-medium",children:(e=>{if(e<1)return"just now";if(1===e)return"1 hour ago";if(e<24)return"".concat(e," hours ago");let t=Math.floor(e/24);return 1===t?"1 day ago":"".concat(t," days ago")})(a)}),(0,i.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,i.jsx)("div",{className:"w-1 h-1 bg-green-500 rounded-full"}),(0,i.jsx)("span",{className:"text-xs text-green-600 font-medium",children:"Verified"})]})]})]})]})}),(0,i.jsx)("div",{className:"h-0.5 bg-[color:var(--wiz-success)] opacity-50"})]})}):null}var j=n(69486);function _(e){let{children:t,products:n}=e,[r,a]=(0,o.useState)(n||[]);(0,o.useEffect)(()=>{n&&0!==n.length||(0,j.t2)().then(e=>{a(e)}).catch(()=>{})},[n]);let{currentNotification:s,isVisible:l,hideNotification:c}=function(e){let[t,n]=(0,o.useState)(null),[i,r]=(0,o.useState)(!1),a=(0,o.useMemo)(()=>e.filter(e=>(0,m.getStockInfo)(e.stock_status).canAddToCart&&"publish"===e.status&&"hidden"
1!==e.catalog_visibility),[e]),s=(0,o.useCallback)(()=>{let e=localStorage.getItem("socialProofSession"),t=Date.now();if(e){let n=JSON.parse(e);if(t-n.startTime<144e5)return n}let n={startTime:t,totalNotificationsShown:0,pageNotificationsShown:0,lastNotificationTime:0,userDismissed:!1};return localStorage.setItem("socialProofSession",JSON.stringify(n)),n},[]),l=(0,o.useCallback)(e=>{let t={...s(),...e};localStorage.setItem("socialProofSession",JSON.stringify(t))},[s]),c=(0,o.useCallback)(()=>{if(0===a.length)return null;let e=a[Math.floor(Math.random()*a.length)],t=f[Math.floor(Math.random()*f.length)],n=g[Math.floor(Math.random()*g.length)];return{id:"".concat(e.id,"-").concat(Date.now(),"-").concat(Math.random()),product:e,customerName:t,location:n,hoursAgo:Math.floor(72*Math.random())+1}},[a]),u=(0,o.useCallback)(()=>{let e=s(),t=Date.now();if(e.userDismissed||e.totalNotificationsShown>=3||e.pageNotificationsShown>=2||e.lastNotificationTime>0&&t-e.lastNotificationTime<4e3)return;let i=c();i&&(n(i),r(!0),l({totalNotificationsShown:e.totalNotificationsShown+1,pageNotificationsShown:e.pageNotificationsShown+1,lastNotificationTime:t}))},[s,c,l]),d=(0,o.useCallback)(()=>{r(!1),setTimeout(()=>{n(null)},300),l({userDismissed:!0})},[l]);return(0,o.useEffect)(()=>{if(0===a.length)return;s(),l({pageNotificationsShown:0});let e=setTimeout(()=>{u()},7e3*Math.random()+18e3),t=setInterval(()=>{let e=s();!e.userDismissed&&e.totalNotificationsShown<3&&e.pageNotificationsShown<2&&u()},4e3+5e3*Math.random());return()=>{clearTimeout(e),clearInterval(t)}},[a.length,s,l,u]),{currentNotification:t,isVisible:i,hideNotification:d}}(r);return(0,o.useEffect)(()=>{},[r]),(0,i.jsxs)(i.Fragment,{children:[t,s&&(0,i.jsx)(y,{product:s.product,customerName:s.customerName,location:s.location,hoursAgo:s.hoursAgo,onClose:c,isVisible:l})]})}function N(e){let{children:t,products:n}=e,[m]=(0,o.useState)(()=>new r.S({defaultOptions:{queries:{staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retry:1}}}));return(0,i.jsx)(a.aH,{client:m,children:(0,i.jsx)(u.H,{children:(0,i.jsx)(d.l,{children:(0,i.jsx)(c.V,{children:(0,i.jsx)(s.Z,{children:(0,i.jsx)(l.h,{children:(0,i.jsx)(_,{products:n,children:(0,i.jsxs)(h.z,{children:[t,!1]})})})})})})})})}},46281:function(e,t,n){"use strict";n.d(t,{H:function(){return s},a:function(){return l}});var i=n(57437),r=n(2265),a=n(2141);let o=(0,r.createContext)(void 0);function s(e){var t;let{children:n}=e,[s,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null),[m,f]=(0,r.useState)(!0);(0,r.useEffect)(()=>{a.O.auth.getSession().then(e=>{var t;let{data:{session:n}}=e;h(n),l(null!==(t=null==n?void 0:n.user)&&void 0!==t?t:null),(null==n?void 0:n.user)?g(n.user.id):f(!1)});let{data:{subscription:e}}=a.O.auth.onAuthStateChange((e,t)=>{var n;h(t),l(null!==(n=null==t?void 0:t.user)&&void 0!==n?n:null),(null==t?void 0:t.user)?g(t.user.id):(u(null),f(!1))});return()=>e.unsubscribe()},[]);let g=async e=>{try{let{data:t,error:n}=await a.O.from("user_profiles").select("*").eq("id",e).single();n?(console.error("Error fetching user profile:",n),u(null)):u(t)}catch(e){console.error("Error fetching user profile:",e),u(null)}finally{f(!1)}},w={user:s,userProfile:c,session:d,loading:m,signInWithGoogle:async()=>{let{error:e}=await a.O.auth.signInWithOAuth({provider:"google",options:{redirectTo:"".concat(window.location.origin,"/auth/callback")}});if(e)throw console.error("Error signing in with Google:",e),e},signOut:async()=>{let{error:e}=await a.O.auth.signOut();if(e)throw console.error("Error signing out:",e),e;l(null),u(null),h(null)},isAdmin:(null==c?void 0:c.role)==="admin",isEmployee:(null==c?void 0:c.role)==="employee",isActive:null!==(t=null==c?void 0:c.is_active)&&void 0!==t&&t};return(0,i.jsx)(o.Provider,{value:w,children:n})}function l(){let e=(0,r.useContext)(o);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},19124:function(e,t,n){"use strict";n.d(t,{V:function(){return h},p:function(){return d}});var i=n(57437),r=n(2265),a=n(65302),o=n(45131),s=n(22252),l=n(33245),c=n(32489);let u=(0,r.createContext)(void 0),d=()=>{let e=(0,r.useContext)(u);if(!e)throw Error("useToast must be used within a ToastProvider");return e},h=e=>{let{children:t}=e,[n,a]=(0,r.useState)([]),o=(0,r.useCallback)(e=>{let t=Math.random().toString(36).substr(2,9),n={...e,id:t};a(e=>[...e,n]),setTimeout(()=>{s(t)},e.duration||3e3)},[]),s=(0,r.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e))},[]),l=(0,r.useCallback)((e,t)=>{o({type:"success",title:e,message:t})},[o]),c=(0,r.useCallback)((e,t)=>{o({type:"error",title:e,message:t})},[o]),d=(0,r.useCallback)((e,t)=>{o({type:"warning",title:e,message:t})},[o]),h=(0,r.useCallback)((e,t)=>{o({type:"info",title:e,message:t})},[o]);return(0,i.jsxs)(u.Provider,{value:{toasts:n,addToast:o,removeToast:s,success:l,error:c,warning:d,info:h},children:[t,(0,i.jsx)(m,{})]})},m=()=>{let{toasts:e,removeToast:t}=d(),n=e=>{switch(e){case"success":return(0,i.jsx)(a.Z,{className:"h-5 w-5 text-green-500"});case"error":return(0,i.jsx)(o.Z,{className:"h-5 w-5 text-red-500"});case"warning":return(0,i.jsx)(s.Z,{className:"h-5 w-5 text-yellow-500"});case"info":return(0,i.jsx)(l.Z,{className:"h-5 w-5 text-blue-500"})}},r=e=>{switch(e){case"success":return"bg-green-50 border-green-200";case"error":return"bg-red-50 border-red-200";case"warning":return"bg-yellow-50 border-yellow-200";case"info":return"bg-blue-50 border-blue-200"}};return 0===e.length?null:(0,i.jsx)("div",{className:"fixed top-4 right-4 z-50 space-y-2",children:e.map(e=>(0,i.jsx)("div",{className:"max-w-sm w-full ".concat(r(e.type)," border rounded-lg shadow-lg p-4 animate-in slide-in-from-right duration-300"),children:(0,i.jsxs)("div",{className:"flex items-start",children:[(0,i.jsx)("div",{className:"flex-shrink-0",children:n(e.type)}),(0,i.jsxs)("div",{className:"ml-3 flex-1",children:[(0,i.jsx)("p",{className:"text-sm font-medium text-gray-900",children:e.title}),e.message&&(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:e.message})]}),(0,i.jsx)("div",{className:"ml-4 flex-shrink-0",children:(0,i.jsx)("button",{onClick:()=>t(e.id),className:"inline-flex text-gray-400 hover:text-gray-600 focus:outline-none",children:(0,i.jsx)(c.Z,{className:"h-4 w-4"})})})]})},e.id))})}},61282:function(e,t,n){"use strict";n.d(t,{p4:function(){return c},yZ:function(){return d}});let i="wizmed_google_ads_attribution_v1",r="wizmed_google_ads_attribution",a={gclid:"gclid",gbraid:"gbraid",wbraid:"wbraid",wiz_campaign_id:"campaignId",campaignid:"campaignId",wiz_adgroup_id:"adGroupId",adgroupid:"adGroupId",wiz_creative_id:"creativeId",creative:"creativeId",wiz_keyword:"keyword",keyword:"keyword",wiz_target_id:"targetId",targetid:"targetId",wiz_asset_group_id:"assetGroupId",assetgroupid:"assetGroupId",wiz_device:"device",device:"device",wiz_network:"network",network:"network",wiz_match_type:"matchType",matchtype:"matchType",wiz_placement:"placement",placement:"placement",utm_source:"utmSource",utm_medium:"utmMedium",utm_campaign:"utmCampaign",utm_term:"utmTerm",utm_content:"utmContent"};function o(e){let t=null==e?void 0:e.trim();if(t)return t.slice(0,500)}function s(e){return!!e&&"object"==typeof e&&1===e.version&&!!e.firstTouch&&!!e.lastTouch&&"string"==typeof e.expiresAt&&Date.parse(e.expiresAt)>Date.now()}function l(){try{let e=window.localStorage.getItem(i),t=e?JSON.parse(e):null;if(s(t))return t;e&&window.localStorage.removeItem(i)}catch(e){}return function(){var e;if("undefined"==typeof document)return null;let t="".concat(r,"="),n=null===(e=document.cookie.split("; ").find(e=>e.startsWith(t)))||void 0===e?void 0:e.slice(t.length);if(!n)return null;try{return function(e){if(!e)return null;try{let t=JSON.parse(decodeURIComponent(e));return s(t)?t:null}catch(e){return null}}(n)}catch(e){return null}}()}
1function c(e,t,n){var s;let c={};for(let[t,n]of Object.entries(a)){let i=o(e.get(t));i&&!c[n]&&(c[n]=i)}let u=!!(c.gclid||c.gbraid||c.wbraid),d=!!(c.campaignId||c.adGroupId||c.creativeId||c.assetGroupId||(null===(s=c.utmSource)||void 0===s?void 0:s.toLowerCase())==="google");if(!u&&!d)return l();let h=new Date,m={capturedAt:h.toISOString(),landingPage:o(t)||"".concat(window.location.pathname).concat(window.location.search),referrer:o(n),...c},f=l(),g={version:1,expiresAt:new Date(h.getTime()+7776e6).toISOString(),firstTouch:(null==f?void 0:f.firstTouch)||m,lastTouch:m};return!function(e){let t=JSON.stringify(e);try{window.localStorage.setItem(i,t)}catch(e){}document.cookie="".concat(r,"=").concat(encodeURIComponent(t),"; Max-Age=").concat(Math.floor(7776e3),"; Path=/; SameSite=Lax; Secure")}(g),g}function u(e,t,n){n&&e.push({key:t,value:n})}function d(e){let t=void 0===e?l():e;if(!t)return[];let n=t.lastTouch,i=[{key:"_wiz_google_ads_attribution_version",value:"1"},{key:"_wiz_ga_first_touch",value:JSON.stringify(t.firstTouch)},{key:"_wiz_ga_last_touch",value:JSON.stringify(n)}];return u(i,"_wiz_gclid",n.gclid),u(i,"_wiz_gbraid",n.gbraid),u(i,"_wiz_wbraid",n.wbraid),u(i,"_wiz_ga_campaign_id",n.campaignId),u(i,"_wiz_ga_ad_group_id",n.adGroupId),u(i,"_wiz_ga_creative_id",n.creativeId),u(i,"_wiz_ga_keyword",n.keyword),u(i,"_wiz_ga_target_id",n.targetId),u(i,"_wiz_ga_asset_group_id",n.assetGroupId),u(i,"_wiz_ga_device",n.device),u(i,"_wiz_ga_network",n.network),u(i,"_wiz_ga_match_type",n.matchType),u(i,"_wiz_ga_placement",n.placement),u(i,"_wiz_utm_source",n.utmSource),u(i,"_wiz_utm_medium",n.utmMedium),u(i,"_wiz_utm_campaign",n.utmCampaign),u(i,"_wiz_utm_term",n.utmTerm),u(i,"_wiz_utm_content",n.utmContent),i}},69486:function(e,t,n){"use strict";n.d(t,{S0:function(){return s},ec:function(){return l},ly:function(){return r},pE:function(){return o},t2:function(){return a}});let i={products:null,categories:null,brands:null,metadata:null,productsPromise:null,categoriesPromise:null,brandsPromise:null,metadataPromise:null,variations:null,variationsPromise:null};async function r(){return i.variations?i.variations:(i.variationsPromise||(i.variationsPromise=fetch("/data/variations.json").then(e=>e.json()).then(e=>(i.variations=e,i.variationsPromise=null,e)).catch(e=>{throw i.variationsPromise=null,e})),i.variationsPromise)}async function a(){return i.products?i.products:(i.productsPromise||(i.productsPromise=fetch("/data/products.json").then(e=>e.json()).then(e=>(i.products=e,i.productsPromise=null,e)).catch(e=>{throw i.productsPromise=null,e})),i.productsPromise)}async function o(){return i.categories?i.categories:(i.categoriesPromise||(i.categoriesPromise=fetch("/data/categories.json").then(e=>e.json()).then(e=>(i.categories=e,i.categoriesPromise=null,e)).catch(e=>{throw i.categoriesPromise=null,e})),i.categoriesPromise)}async function s(){return i.brands?i.brands:(i.brandsPromise||(i.brandsPromise=fetch("/data/brands.json").then(e=>{if(!e.ok)throw Error("Brands not found");return e.json()}).then(e=>(i.brands=e,i.brandsPromise=null,e)).catch(e=>(i.brandsPromise=null,console.error("Error fetching brands:",e),[]))),i.brandsPromise)}async function l(){return i.metadata?i.metadata:(i.metadataPromise||(i.metadataPromise=fetch("/data/metadata.json").then(e=>{if(!e.ok)throw Error("Metadata not found");return e.json()}).then(e=>(i.metadata=e,i.metadataPromise=null,e)).catch(e=>(i.metadataPromise=null,null))),i.metadataPromise)}},47960:function(){}},function(e){e.O(0,[8618,3587,867,7648,3847,6434,1545,3464,5671,9763,6842,5694,7788,8665,2971,2117,1744],function(){return e(e.s=38540)}),_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.