1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7578],{455:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var l=r(95155),i=r(12115),a=r(53623);function n(e){let{variant:t="pill",label:r="About StyleBuddy",className:n=""}=e;(0,i.useEffect)(()=>{let e=document.getElementById(a.v);if(!e)return;let t=t=>{t.target===e&&e.close()};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[]);let s=()=>{let e=document.getElementById(a.v);e&&!e.open&&e.showModal()};return"icon"===t?(0,l.jsx)("button",{type:"button",onClick:s,"aria-label":r,"aria-haspopup":"dialog","aria-controls":a.v,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors hover:bg-black/5 ".concat(n),children:(0,l.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,l.jsx)("path",{fill:"currentColor",d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8"})})}):(0,l.jsx)("button",{type:"button",onClick:s,"aria-haspopup":"dialog","aria-controls":a.v,className:"min-h-[36px] items-center gap-1.5 rounded-full border border-black/10 bg-white/90 px-4 text-sm font-semibold text-[#28283e] shadow-sm backdrop-blur transition-colors hover:border-[#c49845] hover:text-[#8a6420] ".concat(n),children:r})}},52428:()=>{},53623:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,v:()=>l});let l="about-stylebuddy",i="absolute right-4 top-3 z-20 hidden lg:inline-flex"},86461:(e,t,r)=>{"use strict";r.d(t,{If:()=>a,Lp:()=>n,jb:()=>i});let l=e=>"/get-styled/images/".concat(e),i=[{category:"Everyday Styling & Shopping",items:[{title:"Personal Fashion Stylist Consultation",slug:"personal-styling-consultation",description:"Enhance your style with an online consultation with a personal fashion stylist. Get personalized recommendations.",duration:"2 hours",price:"â¹5,000",image:l("service-style-consultation.webp")},{title:"Personal Shopper Service at Stores",slug:"personal-shopper",description:"Take an expert personal stylist along with you for shopping. Shop smart, look fabulous! Available at top malls and markets.",duration:"4 hours",price:"â¹10,000",image:l("personal-shopper.jpg")},{title:"Wardrobe Stylist at Home",slug:"wardrobe-makeover",description:"Revamp your look with our wardrobe refresh service. Includes a wardrobe audit, decluttering, and shopping session.",duration:"8 hours",price:"â¹15,000",image:l("wardrobe-makeover.webp")},{title:"Virtual Wardrobe Audit",slug:"virtual-wardrobe-audit",description:"Revamp your wardrobe with a virtual consultation. Get expert advice on what to keep, donate, and buy.",duration:"2 hours",price:"â¹5,000",image:l("service-virtual-wardrobe.jpg")},{title:"Workwear & Corporate Styling",slug:"workwear-styling",description:"Build a power wardrobe for boardrooms, client meetings, and everyday office wear. Dress for the career you want.",duration:"2 hours",price:"â¹5,000",image:l("workwear-styling.webp")},{title:"Makeup Styling & Consultation",slug:"makeup-styling",description:"Expert makeup consultation tailored to your skin tone, face shape & lifestyle. Learn techniques & get personalised product recommendations.",duration:"2 hours",price:"â¹5,000",image:l("service-makeup.jpg")}]},{category:"Special Occasions",items:[{title:"Wedding Shopping & Styling",slug:"wedding-shopping-styling",description:"Let a wedding stylist help you find the perfect outfits for all wedding events. Includes pre-wedding consultation, shopping assistance, and styling for all ceremonies.",duration:"8 hours",price:"â¹15,000",image:l("wedding-styling.webp")},{title:"Celebrity Styling",slug:"celebrity-styling",description:"Get the celebrity treatment with our premium styling service. Perfect for public figures, influencers, and anyone who wants red carpet-ready looks.",duration:"Custom",price:"â¹25,000",image:l("service-celebrity-styling.webp")},{title:"Personal Stylist for Photo Shoots",slug:"photo-shoot-styling",description:"Planning a photo shoot? Book a personal stylist to get the best looks that photograph beautifully.",duration:"2 hours",price:"â¹5,000",image:l("service-photoshoot-styling.webp")},{title:"Personal Stylist for Vacations",slug:"vacation-styling",description:"Let our expert vacation personal stylists curate a destination-ready wardrobe for your trip.",duration:"2 hours",price:"â¹5,000",image:l("service-vacation-styling.webp")},{title:"Business Event Styling",slug:"business-event-styling",description:"Make a lasting impression at conferences, galas, award nights & corporate gatherings with event-appropriate looks.",duration:"2 hours",price:"â¹7,000",image:l("service-business-event.webp")}]},{category:"Ethnic & Traditional",items:[{title:"Ethnic Wear Styling",slug:"ethnic-wear-styling",description:"Navigate the rich world of Indian ethnic fashion with confidence. Find the perfect sarees, lehengas, kurtas & sherw
1anis for any occasion.",duration:"4 hours",price:"â¹5,000",image:l("service-ethnic-wear.webp")},{title:"Chikankari Styling",slug:"chikankari-styling",description:"Experience the timeless elegance of Lucknow's Chikankari with expert guidance. Find authentic, hand-embroidered pieces styled for you.",duration:"4 hours",price:"â¹5,000",image:l("service-chikankari.jpg")}]},{category:"Premium & Consulting",items:[{title:"Image Consulting",slug:"image-consulting",description:"Build a powerful personal brand through appearance, body language, and styling. Holistic image transformation for professionals.",duration:"3 hours",price:"â¹8,000",image:l("service-image-consulting.webp")},{title:"Color Analysis",slug:"color-analysis",description:"Discover your most flattering colours with professional seasonal colour analysis. Stop guessing and start wearing what suits you.",duration:"1.5 hours",price:"â¹5,000",image:l("service-color-analysis.jpg")},{title:"Luxury Styling",slug:"luxury-styling",description:"An ultra-premium styling experience with bespoke wardrobe curation, luxury brand shopping, and white-glove service.",duration:"Custom",price:"â¹50,000",image:l("service-luxury-styling.webp")}]},{category:"Personality & Development",items:[{title:"Etiquette Training",slug:"etiquette-training",description:"Master dining, business & social etiquette. Learn the unspoken rules that open doors in professional and social settings.",duration:"3 hours",price:"â¹7,000",image:l("service-etiquette-training.webp")},{title:"Communication Coaching",slug:"communication-coaching",description:"Speak with clarity, conviction & charisma. Improve public speaking, presentation skills, and executive presence.",duration:"2 hours",price:"â¹7,000",image:l("service-communication-coaching.webp")},{title:"Personal Grooming",slug:"personal-grooming",description:"Complete grooming consultation â skincare, haircare, fragrance & hygiene routines tailored to your lifestyle and goals.",duration:"2 hours",price:"â¹5,000",image:l("service-personal-grooming.webp")},{title:"Confidence Training",slug:"confidence-training",description:"Build unshakeable self-assurance through body language mastery, mindset coaching & executive presence training.",duration:"2 hours",price:"â¹8,000",image:l("service-confidence-training.webp")}]}],a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return e.flatMap(e=>(e.items||[]).map(t=>({slug:t.slug,title:t.title,shortSummary:t.description,price:t.price,duration:String(t.duration||"").replace(/\s*hours?\s*$/i," hrs").trim(),category:e.category})))}(),n="919717799562"},93918:(e,t,r)=>{"use strict";r.d(t,{A:()=>eL});var l=r(95155),i=r(12115),a=r(66766),n=r(55028),s=r(27677),o=r(97469);r(2252),r(52428);var c=r(23191),d=r(80783),u=r(98784),p=r(13596),g=r(85257),m=r(58950),h=r(34910),f=r(68470),y=r(33209),x=r(19371),b=r(90589),v=r(6874),w=r.n(v),_=r(35695),k=r(77144),j=r(97499);r(72701);var S=r(98926),N=r(56420),A=r(31191),I=r(89664),C=r(94016);let M=[3,9,18,27],T={3:"By the way, StyleBuddy isn't only AI styling. Our NIFT-certified human stylists can help you in real life too, from everyday wardrobe upgrades to wedding and ethnic wear. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers. Take a look:",9:"Quick reminder: if you'd like hands-on help beyond this chat, our expert human stylists are ready for you. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers.",18:"Whenever you're ready for real stylist support, these popular services are still here for you. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers.",27:"Still exploring your style journey? Our human stylists can help with any of these. Book whenever you like. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers."},B={catalog:"By the way, we also offer real human stylist services if you want hands-on help beyond this chat. These could be a great fit for what you're exploring. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers.",selected:"By the way, for exactly this kind of need, our expert human stylists offer dedicated services you can book in one tap. Book a Styling Session Today and get Rs 2000 worth of coupons and vouchers."};function P(){return(0,b.Qv)()}function E(e){let{id:t,ui:r,allowedServiceSlugs:l,defaultServiceSlugs:i}=e;if(!r||"object"!=typeof r)return null;let a=String(r.mode||"").trim().toLowerCase(),n="detail"===a?"selected":a,s=function(e,t){let r=Array.isArray(e)?e.map(e=>
1String(e||"").trim()).filter(Boolean):[];if(!Array.isArray(t)||0===t.length)return r;let l=new Set(t.map(e=>String(e||"").trim()).filter(Boolean));return r.filter(e=>l.has(e))}(r.slugs,l),o=Array.isArray(i)&&i.length>0?i:void 0;if("selected"===n&&1===s.length)return{id:t,showBotname:!1,type:"bot",text:B.selected,isStylingServicesAgentFollowUp:!0,stylingServicesBlock:"detail",stylingServiceSlug:s[0],stylingServicesCatalogVariant:"promo",feedback:null,layout:P(),showRating:!1};if("selected"===n&&s.length>1)return{id:t,showBotname:!1,type:"bot",text:B.selected,isStylingServicesAgentFollowUp:!0,stylingServicesBlock:"catalog",stylingServiceSlugs:s,stylingServicesCatalogVariant:"promo",feedback:null,layout:P(),showRating:!1};if("detail"===n||"catalog"!==n)return null;let c=(0,C.zg)(l),d=c?l:s.length>0?s:o;return Array.isArray(d)&&0!==d.length?{id:t,showBotname:!1,type:"bot",text:B.catalog,isStylingServicesAgentFollowUp:!0,stylingServicesBlock:"catalog",stylingServiceSlugs:c?[...l]:d,stylingServicesCatalogVariant:"promo",feedback:null,layout:P(),showRating:!1}:null}function F(e){let{id:t,serviceSlugs:r,defaultServiceSlugs:l,allowedServiceSlugs:i}=e,a=(0,C.zg)(i),n=a?i:Array.isArray(r)&&r.length>0?r:l;return E({id:t,ui:{mode:"catalog",slugs:n||[]},allowedServiceSlugs:i,defaultServiceSlugs:n})||{id:t,showBotname:!1,type:"bot",text:B.catalog,isStylingServicesAgentFollowUp:!0,stylingServicesBlock:"catalog",stylingServiceSlugs:a?[...i]:Array.isArray(n)&&n.length>0?n:void 0,stylingServicesCatalogVariant:"promo",feedback:null,layout:P(),showRating:!1}}function L(e){if(!e||"bot"!==e.type)return!1;if(String(e.text||"").trim())return!0;let t=e.layout||{};return!!(Array.isArray(t.stylist_layout_blocks)&&t.stylist_layout_blocks.length>0||Array.isArray(t.products)&&t.products.length>0||Array.isArray(t.products_by_vibe)&&t.products_by_vibe.some(e=>Array.isArray(null==e?void 0:e.products)&&e.products.length>0)||Array.isArray(t.images)&&t.images.length>0||Array.isArray(t.outfits_list)&&t.outfits_list.length>0)||!!e.showPreferenceNudge||!!e.showChatPreferenceNudge}function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{stylingServiceCatalogSlugs:r}=t,l=(0,C.zg)(r)?r:null;return(function(e){let{stylingServiceCatalogSlugs:t,nextId:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e))return[];let l=[];for(let i of e){if(!((null==i?void 0:i.type)==="bot"&&i.stylingServicesBlock&&L(i)&&!i.isStylingServicesIntro&&!i.isStylingServicesAgentFollowUp)){l.push(i);continue}let{stylingServicesBlock:e,stylingServiceSlug:a,stylingServiceSlugs:n,stylingServicesCatalogVariant:s,stylingServiceBookingPrompt:o,isStylingServicesIntro:c,stylingServicesIntroMilestone:d,isStylingServicesAgentFollowUp:u,...p}=i;l.push(p);let g=E({id:"function"==typeof r?r():Date.now()+Math.floor(1e3*Math.random()),ui:{mode:"detail"===e?"detail":"catalog",slugs:a?[a]:n||t||[]},allowedServiceSlugs:t,defaultServiceSlugs:t||n});g&&l.push(g)}return l})(e,t).map(e=>{let t=U(e);return(null==e?void 0:e.stylingServicesBlock)==="catalog"&&l&&(null==e?void 0:e.isStylingServicesIntro)?{...e,showBotname:!1,stylingServicesCatalogVariant:"promo",stylingServiceSlugs:[...l]}:t?{...e,showBotname:!1,stylingServicesCatalogVariant:e.stylingServicesCatalogVariant||"promo"}:e})}function U(e){return!!((null==e?void 0:e.isStylingServicesIntro)||(null==e?void 0:e.isStylingServicesAgentFollowUp)||(null==e?void 0:e.stylingServicesBlock)&&!L(e))}var D=r(70742),O=r(9985);let q=(0,n.default)(()=>r.e(5458).then(r.bind(r,75458)),{loadableGenerated:{webpack:()=>[75458]}}),G=(0,n.default)(()=>r.e(6321).then(r.bind(r,66321)),{loadableGenerated:{webpack:()=>[66321]}}),z=(0,n.default)(()=>r.e(3353).then(r.bind(r,93353)),{loadableGenerated:{webpack:()=>[93353]}}),V=()=>(0,D.m)([()=>r.e(5458).then(r.bind(r,75458)),()=>r.e(6321).then(r.bind(r,66321)),()=>r.e(3353).then(r.bind(r,93353))]),J=(0,n.default)(()=>Promise.all([r.e(4970),r.e(7453)]).then(r.bind(r,37453)),{loadableGenerated:{webpack:()=>[37453]},ssr:!1}),$=(0,n.default)(()=>Promise.all([r.e(4970),r.e(6808)]).then(r.bind(r,26808)),{loadableGenerated:{webpack:()=>[26808]},ssr:!1}),K=(0,n.default)(()=>r.e(6359).then(r.bind(r,16359)),{loadableGenerated:{webpack:()=>[16359]},ssr:!1}),H=(0,n.default)(()=>Promise.all([r.e(4970),r.e(2382),r.e(852),r.e(2509),r.e(4047),r.e(8025),r.e(6843)]).then(r.bind(r,38340)),{loadableGenerated:{webpack:()=>[38340]},ssr:!1}),W=(0,n.default)(()=>Promise.resolve().then(r.bind(r,2443)),{loadableGenerated:{webpack:()=>[2443]},ssr:!1}),Y=(0,n.default)(()=>Promise.all([r.e(4970),r.e(9585),r.e(9834)]).then(r.bind(r,49585)),{loadableGenerated:{webpack:()=>[49585]},ssr:!1});function Z(e){if(!e||"object"!=typeof e||!0===e.ecom||"shopify_ucp"===e.source)return!1;
1let t=String(e.product_id||"").trim(),r=String(e.url||"").trim();return!!(t&&r)}function Q(e){let t=String((null==e?void 0:e.url)||"").trim();return t?Z(e)?(0,j.F)({productUrl:t,productId:String(e.product_id||"").trim(),brandId:String(e.brand_website||e.brand||"").trim(),isEcom:!1}):t:""}function X(e){let t=Q(e);t&&window.open(t,"_blank","noopener,noreferrer")}let ee=e=>{let{selected:t,onToggle:r,disabled:i=!1}=e;return(0,l.jsx)("button",{type:"button",onClick:r,"aria-pressed":t,"aria-label":t?"Deselect product":"Select product for outfit question",className:"absolute top-2 right-2 z-20 flex h-7 w-7 items-center justify-center rounded-full border-2 transition-all ".concat(t?"border-[#8f00ff] bg-[#8f00ff] text-white shadow-md":"border-white/90 bg-black/35 text-white hover:bg-black/50"," ").concat(i?"opacity-40 cursor-not-allowed":"cursor-pointer"),children:t?(0,l.jsx)(c.Icon,{icon:"mdi:check",width:16}):null})};function et(e){let{product:t,turnId:r,onProductLinkClick:i,size:a="full"}=e,n=(0,N.Ms)(t);if(!(null==n?void 0:n.product_id))return null;let s=ea(n.price,n),o=ep(n.price,s),d="pair"===a;return(0,l.jsxs)("div",{role:"button",tabIndex:0,onClick:e=>{var t;if(null==e||null==(t=e.stopPropagation)||t.call(e),r&&i)return void i({product:n,turnId:r,itemType:"product"}).finally(()=>X(n));X(n)},className:"group flex shrink-0 flex-col overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:border-gray-300 hover:shadow-md cursor-pointer ".concat(d?"w-[108px] sm:w-[132px]":"w-[140px] sm:w-[160px]"),children:[(0,l.jsxs)("div",{className:"relative shrink-0 bg-gray-100",children:[n.image?(0,l.jsx)("img",{src:n.image,alt:"",className:"w-full object-cover ".concat(d?"h-[132px] sm:h-[170px]":"h-[180px] sm:h-[200px]")}):(0,l.jsx)("div",{className:"w-full bg-gray-100 ".concat(d?"h-[132px] sm:h-[170px]":"h-[180px] sm:h-[200px]")}),(0,l.jsx)("span",{className:"absolute bottom-1.5 right-1.5 inline-flex h-5 w-5 items-center justify-center rounded-full bg-white/95 text-gray-700 shadow-sm ring-1 ring-black/5 backdrop-blur transition-colors duration-200 group-hover:bg-gray-900 group-hover:text-white",children:(0,l.jsx)(c.Icon,{icon:"mdi:arrow-top-right",width:12})})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-0.5 p-2.5",children:[(0,l.jsx)("p",{className:"line-clamp-2 text-[10px] font-medium leading-snug text-gray-900 font-poppins",children:n.name||"Product"}),o?(0,l.jsx)("p",{className:"text-[10px] font-semibold text-gray-900 font-poppins",children:o}):null]})]})}function er(e){let{products:t}=e,r=(Array.isArray(t)?t:[]).map(e=>(0,N.Ms)(e)).filter(Boolean);return r.length?(0,l.jsxs)("div",{className:"mt-2.5 rounded-xl border border-white/15 bg-white/10 px-2.5 py-2",children:[(0,l.jsxs)("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-white/70 font-poppins",children:["Your selected picks (",r.length,")"]}),(0,l.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-0.5",children:r.map(e=>(0,l.jsx)("div",{className:"relative shrink-0 w-[52px] h-[52px] rounded-lg overflow-hidden border border-white/25 bg-white/90",title:e.name||"Selected product",children:e.image?(0,l.jsx)("img",{src:e.image,alt:"",className:"w-full h-full object-cover"}):(0,l.jsx)("div",{className:"w-full h-full bg-gray-200"})},e.product_id))})]}):null}function el(e){let{products:t,pairs:r,turnId:a,onProductLinkClick:n}=e,s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],l=new Map;for(let e of[...t||[],...r||[]]){let t=(0,N.Ms)(e);(null==t?void 0:t.product_id)&&l.set(String(t.product_id),t)}let i=e=>{let t=(Array.isArray(null==e?void 0:e.products)?e.products:[]).map(e=>(0,N.Ms)(e)).filter(Boolean),r=new Map(t.map(e=>[String(e.product_id),e])),i=Array.isArray(null==e?void 0:e.product_ids)?e.product_ids.map(e=>String(e||"").trim()).filter(Boolean):[];if(!i.length)return t;let a=i.map(e=>l.get(e)||r.get(e)).filter(Boolean);return a.length===i.length?a:t.length?t:a};return Array.isArray(e)&&e.length?e.map(e=>{let t=String((null==e?void 0:e.label)||"Outfit pairing").trim()||"Outfit pairing",r=String((null==e?void 0:e.note)||"").trim(),l=i(e);return l.length?{label:t,note:r,product_ids:l.map(e=>e.product_id),products:l}:null}
1).filter(Boolean):Array.isArray(t)&&t.length?t.map(e=>(0,N.Ms)(e)).filter(Boolean).map(e=>({label:"Top pick",note:"",product_ids:[e.product_id],products:[e]})):[]}(r,t,t);if(!s.length)return null;let o=s.some(e=>Array.isArray(e.products)&&e.products.length>1),d=s.reduce((e,t)=>e+(Array.isArray(t.products)?t.products.length:0),0)>1;return(0,l.jsxs)("div",{className:"mt-4 min-w-0 rounded-2xl border border-emerald-200/90 bg-gradient-to-br from-emerald-50/90 via-white to-white px-3 py-3",children:[d?(0,l.jsxs)("p",{className:"mb-2.5 flex items-center gap-1.5 text-xs font-semibold text-gray-800 font-poppins",children:[(0,l.jsx)(c.Icon,{icon:"mdi:star-circle",width:16,className:"text-emerald-600 shrink-0"}),o?"Mayaâs top pairings for you":"Mayaâs top picks for you"]}):null,(0,l.jsx)("div",{className:"-mx-1 flex gap-3 overflow-x-auto overscroll-x-contain px-1 pb-2 snap-x snap-mandatory [touch-action:pan-x_pan-y] [scrollbar-width:thin]",children:s.map((e,t)=>1===e.products.length?(0,l.jsxs)("div",{className:"flex shrink-0 snap-start flex-col gap-1.5",children:[d?(0,l.jsx)("p",{className:"line-clamp-1 px-0.5 text-[10px] font-semibold text-emerald-800 font-poppins",children:e.label}):null,(0,l.jsx)(et,{product:e.products[0],turnId:a,onProductLinkClick:n,size:"full"}),e.note?(0,l.jsx)("p",{className:"max-w-[140px] line-clamp-2 px-0.5 text-[10px] leading-snug text-gray-500 sm:max-w-[160px] font-poppins",children:e.note}):null]},"".concat(e.label,"-").concat(t)):(0,l.jsxs)("div",{className:"flex w-[268px] shrink-0 snap-start flex-col rounded-2xl border border-emerald-200/70 bg-white/90 p-2.5 shadow-sm sm:w-[340px]",children:[(0,l.jsx)("p",{className:"mb-2 line-clamp-1 text-[11px] font-semibold text-emerald-800 font-poppins",children:e.label}),(0,l.jsx)("div",{className:"flex flex-nowrap items-start gap-1 sm:gap-1.5 ".concat(e.products.length>2?"overflow-x-auto overscroll-x-contain pb-0.5":"justify-center"),children:e.products.map((e,r)=>(0,l.jsxs)(i.Fragment,{children:[r>0?(0,l.jsx)("div",{className:"flex shrink-0 items-center self-center px-0.5",children:(0,l.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-emerald-700 sm:h-7 sm:w-7",children:(0,l.jsx)(c.Icon,{icon:"mdi:plus",width:14})})}):null,(0,l.jsx)(et,{product:e,turnId:a,onProductLinkClick:n,size:"pair"})]},e.product_id||"".concat(t,"-").concat(r)))}),e.note?(0,l.jsx)("p",{className:"mt-2 line-clamp-2 text-[10px] leading-snug text-gray-500 font-poppins",children:e.note}):null]},"".concat(e.label,"-").concat(t)))})]})}let ei={USD:84,EUR:91,GBP:106,SGD:62.5,AUD:54,CAD:61,AED:22.9,HKD:10.7,NZD:50,MYR:18};function ea(e,t){if(t&&null!=t.price_inr){let e=Math.round(Number(t.price_inr));if(Number.isFinite(e)&&e>0)return e}if(null==e)return null;let r=String(e).trim();if(!r)return null;let l=r.toLowerCase();for(let[e,t]of[[/^\s*(?:usd\s*)?\$\s*([\d,]+(?:\.\d+)?)\s*$/i,"USD"],[/^\s*â¬\s*([\d,]+(?:\.\d+)?)\s*$/i,"EUR"],[/^\s*eur\s*([\d,]+(?:\.\d+)?)\s*$/i,"EUR"],[/^\s*£\s*([\d,]+(?:\.\d+)?)\s*$/i,"GBP"],[/^\s*gbp\s*([\d,]+(?:\.\d+)?)\s*$/i,"GBP"],[/^\s*s\$\s*([\d,]+(?:\.\d+)?)\s*$/i,"SGD"],[/^\s*sgd\s*([\d,]+(?:\.\d+)?)\s*$/i,"SGD"],[/^\s*a\$\s*([\d,]+(?:\.\d+)?)\s*$/i,"AUD"],[/^\s*aud\s*([\d,]+(?:\.\d+)?)\s*$/i,"AUD"],[/^\s*(\d+(?:\.\d+)?)\s*(usd|eur|gbp|sgd|aud)\s*$/i,null]]){let l=r.match(e);if(!l)continue;let i=ei[t||String(l[2]||"").toUpperCase()];if(!i)continue;let a=Math.round(parseFloat(String(l[1]).replace(/,/g,""))*i);if(Number.isFinite(a)&&a>0)return a}if(l.includes("$")||/\busd\b/i.test(l)){let e=r.match(/\$\s*(\d+(?:\.\d+)?)/);if(e){let t=Math.round(84*parseFloat(e[1]));return Number.isFinite(t)&&t>0?t:null}}let i=(r=l.replace(/â¹|rs\.?|inr|\u20b9/gi,"").replace(/,/g,"").trim()).match(/^(\d+(?:\.\d+)?)\s*k$/i);if(i){let e=Math.round(1e3*parseFloat(i[1]));return Number.isFinite(e)&&e>0?e:null}let a=r.match(/(\d+(?:\.\d+)?)/);if(!a)return null;let n=Math.round(parseFloat(a[1]));return Number.isFinite(n)&&n>0?n:null}let en=[{id:"under_5k",label:"Under â¹5,000",min:0,max:4999},{id:"5k_10k",label:"â¹5,000 â â¹10,000",min:5e3,max:9999},{id:"10k_20k",label:"â¹10,000 â â¹20,000",min:1e4,max:19999},{id:"above_20k",label:"Above â¹20,000",min:2e4,max:1/0}];function es(e){return!Array.isArray(e)||e.length<2?Array.isArray(e)?e:[]:[...e].sort((e,t)=>
1{let r=ea(null==e?void 0:e.price,e),l=ea(null==t?void 0:t.price,t);return null==r&&null==l?0:null==r?1:null==l?-1:r-l})}let eo={BEST_PICK:"best_pick",AFFORDABLE:"affordable"};function ec(e){if(null==e||""===e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function ed(e){let{userBudgetInr:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return[];let r=e.map((e,t)=>({p:e,i:t,price:ea(null==e?void 0:e.price,e),hasCaption:!!String((null==e?void 0:e.layout_caption)||"").trim()})),l=r.length,i=new Map;for(let e of r)(function(e,t){if(null==e||!Number.isFinite(e))return!1;let r=function(e){let t=ec(e);if(null==t)return{min:0,max:4999};let r=en.find(e=>t>=e.min&&t<=e.max);return r?{min:r.min,max:r.max}:{min:0,max:4999}}(t);return e>=r.min&&e<=r.max})(e.price,t)&&i.set(e.i,eo.AFFORDABLE);let a=l<=2?+(l>=1):Math.min(2,Math.max(1,Math.floor(.3*l))),n=0;for(let e of r){if(n>=a)break;!i.has(e.i)&&e.hasCaption&&(i.set(e.i,eo.BEST_PICK),n++)}if(n<a){let e=[...r.filter(e=>!i.has(e.i)&&null!=e.price)].sort((e,t)=>e.price-t.price);if(e.length>0){let t=Math.floor((e.length-1)/2);for(let r of[0,-1,1,-2,2]){let l=e[t+r];if(!(!l||i.has(l.i))&&(i.set(l.i,eo.BEST_PICK),++n>=a))break}}}return 1!==l||i.has(0)||i.set(0,eo.BEST_PICK),function(e){if(!Array.isArray(e)||e.length<2)return Array.isArray(e)?e:[];let t=e=>{let t=String(e||"").trim();return t===eo.BEST_PICK?0:t===eo.AFFORDABLE?1:2};return[...e].sort((e,r)=>{let l=t(null==e?void 0:e.purchase_tag),i=t(null==r?void 0:r.purchase_tag);if(l!==i)return l-i;let a=ea(null==e?void 0:e.price,e),n=ea(null==r?void 0:r.price,r);return null==a&&null==n?0:null==a?1:null==n?-1:a-n})}(r.map(e=>{let{p:t,i:r}=e;return{...t,purchase_tag:i.get(r)||""}}))}function eu(e){let{tag:t}=e,r=String(t||"").trim();return r===eo.BEST_PICK?(0,l.jsxs)("span",{className:"absolute top-2.5 left-2.5 z-10 inline-flex items-center gap-1 rounded-full bg-gradient-to-r from-amber-500 to-orange-500 px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white shadow-lg shadow-amber-900/40 ring-1 ring-white/20",children:[(0,l.jsx)(c.Icon,{icon:"mdi:star",width:12}),"Best pick"]}):r===eo.AFFORDABLE?(0,l.jsxs)("span",{className:"absolute top-2.5 left-2.5 z-10 inline-flex items-center gap-1 rounded-full bg-gradient-to-r from-emerald-600 to-teal-600 px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white shadow-lg shadow-emerald-900/40 ring-1 ring-white/20",children:[(0,l.jsx)(c.Icon,{icon:"mdi:tag-heart",width:12}),"Affordable"]}):null}function ep(e,t){if(null!=t)return"â¹".concat(t.toLocaleString("en-IN"));let r=String(null!=e?e:"").trim();if(!r)return"";if(r.includes("$")||/\busd\b/i.test(r)){let e=ea(r);if(null!=e)return"â¹".concat(e.toLocaleString("en-IN"))}return r.startsWith("â¹")?r.replace(/\$/g,""):"â¹".concat(r.replace(/^rs\.?\s*/i,"").replace(/\$/g,""))}function eg(e){let{products:t,productsByVibe:r,layoutBlocks:l}=e,i=[],a=new Set,n=e=>{if(!e||"object"!=typeof e)return;let t=String(e.product_id||e.url||"").trim();!t||a.has(t)||(a.add(t),i.push(e))};return(t||[]).forEach(n),(r||[]).forEach(e=>{((null==e?void 0:e.products)||[]).forEach(n)}),(l||[]).forEach(e=>{(null==e?void 0:e.type)==="product_grid"&&((null==e?void 0:e.products)||[]).forEach(n)}),i}function em(e){var t,r,l;if((null==e?void 0:e.type)!=="bot")return!1;let i=ej(null==(t=e.layout)?void 0:t.stylist_layout_blocks);return eg({products:null==(r=e.layout)?void 0:r.products,productsByVibe:null==(l=e.layout)?void 0:l.products_by_vibe,layoutBlocks:i}).length>0}function eh(e){let{turnId:t="",products:r=[],productsByVibe:l=[],layoutBlocks:a=[]}=e;return(0,i.useEffect)(()=>{if(!t)return;let e=eg({products:r,productsByVibe:l,layoutBlocks:a}).filter(Z);e.length&&(0,p.$P)("/talk_to_maya_v2/integrated-brand-view",{turn_id:t,tracking_source:"website",products:e.map(e=>({product_id:String(e.product_id||"").trim(),product_page_url:String(e.url||"").trim(),product_image_url:String(e.image||"").trim(),brand_website:String(e.brand_website||"").trim(),ecom:!!e.ecom}))}).catch(()=>{})},[t,r,l,a]),null}function ef(){var e,t;let r=((null==(t=globalThis.crypto)||null==(e=t.randomUUID)?void 0:e.call(t))||"".concat(Date.now(),"-").concat(Math.random())).toString();return localStorage.setItem("generation_sessionId",r),r}function ey(){let e=localStorage.getItem("generation_sessionId");return e||ef()}function ex(e){return"talkToMaya_chat_user_settings_".concat(String(e||"").trim())}function eb(e,t){let r=String(e||"").trim();r&&localStorage.setItem(ex(r),JSON.stringify((0,S.ce)(t)))}let ev=e=>/^\d+\.\s+/.test(String(e||"").trim()),ew=e=>{let t=String(e||"").trim();return!(!t||t.length>48||/[.!?]$/.test(t))&&/^[A-Za-z][A-Za-z\s&/-]+$/.test(t)},e_=(e,t)=>
1{let r=String(e||"").trim();return r&&t?r.split("\n").map(e=>e.trimEnd()).filter(e=>!ev(e)).join("\n").replace(/\n{3,}/g,"\n\n").trim():r};function ek(e){if(null==e)return[];let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return[]}if(!Array.isArray(t))return[];let r=e=>{let t=String(e||"").trim().toLowerCase().replace(/-/g,"_");return({sectiontitle:"section_title",section_title:"section_title",vibeline:"vibe_line",vibe_line:"vibe_line",productgrid:"product_grid",product_grid:"product_grid",videogrid:"video_grid",video_grid:"video_grid",youtube_grid:"video_grid",richlist:"rich_list",rich_list:"rich_list",divider:"divider",paragraph:"paragraph",stylistquestion:"stylist_question",stylist_question:"stylist_question"})[t]||t},l=[];for(let e of t){var i,a,n,s,o,c,d,u,p,g,m,h,f,y,x,b,v,w,_;if(!e||"object"!=typeof e)continue;let t=r(null!=(n=null!=(a=null!=(i=e.type)?i:e.block_type)?a:e.kind)?n:e.blockType);if(!t)if(Array.isArray(e.items)&&(e.heading||e.title))t="rich_list";else if(e.title&&"string"==typeof e.title)t="section_title";else if(Array.isArray(e.catalog_numbers)||Array.isArray(e.numbers))t="product_grid";else if(Array.isArray(e.video_refs)||Array.isArray(e.video_ids)||Array.isArray(e.videos))t="video_grid";else if(!Array.isArray(e.items)||e.heading||e.title)if(!("string"==typeof e.text&&/^vibe\s*:/i.test(e.text.trim())))continue;else t="vibe_line";else e.items.every(e=>"string"==typeof e)&&e.items.length>0&&(t="stylist_question");if("section_title"===t){let t=String(e.title||"").trim();if(!t)continue;l.push({type:"section_title",title:t,subtitle:String(e.subtitle||e.deck||"").trim()})}else if("vibe_line"===t){let t=String(e.text||e.line||"").trim();if(!t)continue;l.push({type:"vibe_line",text:t})}else if("product_grid"===t){let t=Array.isArray(e.catalog_numbers)?e.catalog_numbers:Array.isArray(e.numbers)?e.numbers:[],r=Array.isArray(e.products)?e.products:[],i=Array.isArray(e.captions)?e.captions:[];l.push({type:"product_grid",catalog_numbers:t,products:r,captions:i})}else if("video_grid"===t){let t=Array.isArray(e.video_refs)?e.video_refs:[],r=Array.isArray(e.video_ids)?e.video_ids:[],i=Array.isArray(e.videos)?e.videos:[],a=Array.isArray(e.captions)?e.captions:[];if(!i.length&&!t.length&&!r.length)continue;l.push({type:"video_grid",video_refs:t,video_ids:r,videos:i,captions:a})}else if("rich_list"===t){let t=String(e.heading||e.title||"").trim(),r=null!=(o=null!=(s=e.items)?s:e.bullets)?o:e.points;if(!t||!Array.isArray(r))continue;let i=[];for(let e of r){if("string"==typeof e){let t=e.trim();t&&i.push({text:t,children:[]});continue}if(!e||"object"!=typeof e)continue;let t=String(null!=(p=null!=(u=null!=(d=null!=(c=e.text)?c:e.label)?d:e.body)?u:e.line)?p:"").trim();if(!t)continue;let r=null!=(m=null!=(g=e.children)?g:e.subbullets)?m:e.nested,l=[];if(Array.isArray(r))for(let e of r){let t="string"==typeof e?e.trim():String(null!=(f=null!=(h=null==e?void 0:e.text)?h:null==e?void 0:e.label)?f:"").trim();t&&l.push(t)}i.push({text:t,children:l})}if(!i.length)continue;l.push({type:"rich_list",heading:t,items:i})}else if("paragraph"===t){let t=String(null!=(x=null!=(y=e.text)?y:e.body)?x:"").trim();if(!t)continue;l.push({type:"paragraph",text:t})}else if("stylist_question"===t){let t=null!=(b=e.items)?b:e.questions,r=[];if(Array.isArray(t))for(let e of t){let t=String(null!=e?e:"").trim();t&&r.push(t)}let i=String(null!=(_=null!=(w=null!=(v=e.text)?v:e.question)?w:e.body)?_:"").trim();r.length>1?l.push({type:"stylist_question",items:r.slice(0,4),text:""}):1===r.length?l.push({type:"stylist_question",text:r[0],items:[]}):i&&l.push({type:"stylist_question",text:i,items:[]})}else"divider"===t&&l.push({type:"divider"})}return l}function ej(e){if(null==e)return[];if("string"==typeof e)try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}return Array.isArray(e)?e:[]}let eS=e=>{let t=String(e||"").split("\n").map(e=>e.trim()).filter(Boolean),r={},l="";for(let e of t)if(!ev(e)){if(ew(e)){r[l=e]||(r[l]=[]);continue}l&&r[l].push(e)}let i={};return Object.entries(r).forEach(e=>{let[t,r]=e,l=r.join(" ").trim();l&&(i[t.toLowerCase()]=l)}),i},eN=e=>{let{groups:t,fallbackText:r="",turnId:i="",onProductLinkClick:a,userBudgetInr:n=null,sessionId:s="",isProductSaved:o,onProductSaved:c,onRequireAuth:d,isProductSelected:u,onToggleProductSelect:p,selectionLimitReached:g=!1}=e;if(!Array.isArray(t)||0===t.length)return null;let m=eS(r),h=(e,t)=>{if(!String((null==t?void 0:t.url)||"").trim())return;e.preventDefault();let r=()=>X(t);if(i&&a)return void a({product:t,turnId:i,itemType:"product"}).finally(r);r()},f=e=>{let{p:t}=e,r=ea(null==t?void 0:t.price,t),a=ep(null==t?void 0:t.price,r),n=String((null==t?void 0:t.product_id)||"").trim(),m=!!(null==u?void 0:u(n));return(0,l.jsxs)("div",{onClick:e=>h(e,t),role:"button",tabIndex:0,className:"flex flex-col flex-shrink-0 w-[140px] sm:w-[160px] rounded-2xl bg-white overflow-hidden border shadow-sm transition-all duration-200 hover:-translate-y-0.5 cursor-pointer ".concat(m?"border-[#8f00ff] ring-2 ring-[#8f00ff]/30 shadow-md":"border-gray-200 hover:border-gray-300"),children:[(0,l.jsxs)("div",{className:"relative flex-shrink-0",children:[(null==t?void 0:t.image)?(0,l.jsx)("img",{src:t.image,alt:"",className:"w-full h-[180px] sm:h-[200px] object-cover bg-gray-100"}):(0,l.jsx)("div",{className:"w-full h-[100px] bg-gray-100"}),(0,l.jsx)(eu,{tag:null==t?void 0:t.purchase_tag}),p?(0,l.jsx)(ee,{selected:m,disabled:!m&&g,onToggle:e=>p(t,e)}):null]}),(0,l.jsxs)("div",{className:"flex flex-col flex-grow p-2.5 space-y-1",children:[(0,l.jsx)("p",{className:"text-[10px] text-gray-900 line-clamp-2 leading-snug font-poppins",children:(null==t?void 0:t.name)||"Product"}),(null==t?void 0:t.brand)?(0,l.jsx)("p",{className:"text-[9px] text-gray-500 truncate font-poppins",children:t.brand}):null,a?(0,l.jsx)("p",{className:"text-[10px] text-gray-900 font-semibold font-poppins",children:a}):null,(0,l.jsx)("div",{className:"flex-grow"}),(0,l.jsxs)("div",{className:"flex items-center justify-between gap-1 flex-wrap",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(N.aZ,{product:t,turnId:i,sessionId:s,source:"website",variant:"light",placement:"static"}),(0,l.jsx)(A.ie,{product:t,variant:"light",iconOnly:!0,initialSaved:null==o?void 0:o(n),onSaved:c,onRequireAuth:d})]}),(null==t?void 0:t.url)?(0,l.jsx)("a",{href:Q(t)||t.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>{e.stopPropagation(),h(e,t)},className:"inline-flex items-center text-[9px] font-semibold text-[#8f00ff] hover:text-[#7a00db] transition-colors",children:"View â"}):null]})]})]})};return(0,l.jsxs)("div",{className:"mt-5 w-full border-t border-gray-200 pt-4 space-y-5",children:[(0,l.jsx)("p",{className:"text-[11px] text-[#8f00ff] font-semibold uppercase tracking-widest font-poppins",children:"⦠Picks by vibe"}),t.map((e,t)=>{let r=String((null==e?void 0:e.vibe)||"").trim()||"Style ".concat(t+1),i=ed(es(Array.isArray(null==e?void 0:e.products)?e.products:[]),{userBudgetInr:n});if(0===i.length)return null;let a=String((null==e?void 0:e.info)||(null==e?void 0:e.description)||(null==e?void 0:e.context)||"").trim()||m[r.toLowerCase()]||"";return(0,l.jsxs)("div",{className:"space-y-2.5",children:[(0,l.jsx)("p",{className:"text-[13px] font-semibold text-gray-900 font-poppins",children:r}),a?(0,l.jsx)("p",{className:"text-[11px] text-gray-500 leading-relaxed font-poppins",children:a}):null,(0,l.jsx)("div",{className:"flex gap-2.5 overflow-x-auto pb-2 no-scrollbar",children:i.map((e,r)=>(0,l.jsx)(f,{p:e},"".concat(t,"-").concat((null==e?void 0:e.product_id)||"","-").concat(r)))})]},"vibe-".concat(t,"-").concat(r))})]})},eA=e=>{let{v:t,turnId:r="",onVideoLinkClick:i}
1=e,a=String((null==t?void 0:t.title)||"YouTube video").trim(),n=String((null==t?void 0:t.url)||"").trim(),s=String((null==t?void 0:t.thumbnail)||"").trim(),o=String((null==t?void 0:t.layout_caption)||"").trim();return(0,l.jsxs)("a",{href:n||"#",target:"_blank",rel:"noopener noreferrer",onClick:e=>{if(!n)return void e.preventDefault();e.preventDefault();let l=()=>window.open(n,"_blank","noopener,noreferrer");if(r&&i)return void i({video:t,turnId:r}).finally(l);l()},className:"flex-shrink-0 w-[240px] sm:w-[280px] rounded-2xl bg-white overflow-hidden border border-gray-200 shadow-sm block hover:border-gray-300 hover:-translate-y-0.5 transition-all duration-200",children:[(0,l.jsxs)("div",{className:"relative",children:[s?(0,l.jsx)("img",{src:s,alt:"",className:"w-full h-[150px] sm:h-[170px] object-cover bg-gray-100"}):(0,l.jsx)("div",{className:"w-full h-[150px] sm:h-[170px] bg-gray-100"}),(0,l.jsxs)("span",{className:"absolute bottom-2 right-2 rounded-lg bg-red-600/90 backdrop-blur-sm px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white flex items-center gap-1",children:[(0,l.jsx)(c.Icon,{icon:"mdi:youtube",width:12})," YouTube"]})]}),(0,l.jsxs)("div",{className:"p-4 space-y-2",children:[(0,l.jsx)("p",{className:"text-[14px] font-semibold text-gray-900 leading-snug line-clamp-3 font-poppins",children:a}),o?(0,l.jsx)("p",{className:"text-xs sm:text-sm text-gray-500 leading-relaxed line-clamp-3 font-poppins",children:o}):null,(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-[#8f00ff] hover:text-[#7a00db]",children:["Watch video ",(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:12})]})]})]})},eI=e=>{let{p:t,turnId:r="",onProductLinkClick:i,sessionId:a="",isProductSaved:n,onProductSaved:s,onRequireAuth:o,isSelected:d=!1,onToggleSelect:u,selectionLimitReached:p=!1}=e,g=ea(null==t?void 0:t.price,t),m=ep(null==t?void 0:t.price,g);[null==t?void 0:t.color,null==t?void 0:t.category].filter(Boolean).join(" ⢠"),String((null==t?void 0:t.layout_caption)||"").trim();let h=String((null==t?void 0:t.product_id)||"").trim(),f=e=>{if(!String((null==t?void 0:t.url)||"").trim())return;e.preventDefault();let l=()=>X(t);if(r&&i)return void i({product:t,turnId:r,itemType:"product"}).finally(l);l()};return(0,l.jsxs)("div",{onClick:f,role:"button",tabIndex:0,className:"flex flex-col flex-shrink-0 w-[210px] sm:w-[260px] rounded-2xl bg-white overflow-hidden border shadow-sm transition-all duration-200 hover:-translate-y-0.5 cursor-pointer ".concat(d?"border-[#8f00ff] ring-2 ring-[#8f00ff]/30 shadow-md":"border-gray-200 hover:border-gray-300"),children:[(0,l.jsxs)("div",{className:"relative flex-shrink-0",children:[(null==t?void 0:t.image)?(0,l.jsx)("img",{src:t.image,alt:"",className:"w-full h-[260px] sm:h-[300px] object-cover bg-gray-100"}):(0,l.jsx)("div",{className:"w-full h-[260px] sm:h-[300px] bg-gray-100"}),(0,l.jsx)(eu,{tag:null==t?void 0:t.purchase_tag}),u?(0,l.jsx)(ee,{selected:d,disabled:!d&&p,onToggle:e=>u(t,e)}):null]}),(0,l.jsxs)("div",{className:"flex flex-col flex-grow p-4 space-y-2",children:[(0,l.jsx)("p",{className:"text-[15px] font-semibold text-gray-900 leading-snug line-clamp-1 font-poppins",children:(null==t?void 0:t.name)||"Product"}),m?(0,l.jsx)("p",{className:"text-sm font-semibold text-gray-900 font-poppins",children:m}):null,(0,l.jsx)("div",{className:"flex-grow"}),(0,l.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-2 flex-wrap",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)(N.aZ,{product:t,turnId:r,sessionId:a,source:"website",variant:"light",placement:"static"}),(0,l.jsx)(A.ie,{product:t,variant:"light",iconOnly:!0,initialSaved:null==n?void 0:n(h),onSaved:s,onRequireAuth:o})]}),(null==t?void 0:t.url)?(0,l.jsxs)("a",{href:Q(t)||t.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>{e.stopPropagation(),f(e)},className:"inline-flex items-center gap-0.5 text-xs font-semibold text-[#8f00ff] hover:text-[#7a00db] transition-colors",children:["View ",(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:12})]}):null]})]})]})},eC=e=>{let{blocks:t,className:r="",turnId:i="",onProductLinkClick:a,onVideoLinkClick:n,userBudgetInr:s=null,sessionId:o="",messageVariant:c="b2c",messageTheme:d="light",isProductSaved:u,onProductSaved:p,onRequireAuth:g,isProductSelected:m,onToggleProductSelect:h,selectionLimitReached:f=!1}=e,y=ek(t);
1return y.length?(0,l.jsx)("div",{className:"max-w-full min-w-0 w-full space-y-4 ".concat(r).trim(),children:y.map((e,t)=>{let r="stylist-blk-".concat(t,"-").concat((null==e?void 0:e.type)||"x");if(!e||"object"!=typeof e)return null;switch(e.type){case"section_title":return(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("h3",{className:"text-xl sm:text-2xl font-bold text-gray-900 tracking-tight leading-tight font-poppins",children:e.title}),e.subtitle?(0,l.jsx)("p",{className:"text-sm text-gray-500 font-poppins",children:(0,l.jsx)(q,{text:e.subtitle,variant:c,theme:d})}):null]},r);case"vibe_line":return(0,l.jsx)("p",{className:"text-base sm:text-lg text-gray-700 font-poppins italic border-l-2 border-gray-300 pl-4",children:(0,l.jsx)(q,{text:e.text,variant:c,theme:d})},r);case"product_grid":{let t=Array.isArray(e.products)?e.products:[];if(0===t.length)return null;let n=es(t.map((t,r)=>{let l=Array.isArray(e.captions)?String(e.captions[r]||"").trim():"";return t&&"object"==typeof t?{...t,layout_caption:String(t.layout_caption||"").trim()||l||""}:t})),c=function(e){if(!Array.isArray(e)||0===e.length)return[];let t=en.map(e=>({...e,products:[]})),r=[];for(let l of e){let e=ea(null==l?void 0:l.price,l);if(null==e){r.push(l);continue}let i=t.find(t=>e>=t.min&&e<=t.max);i?i.products.push(l):r.push(l)}let l=t.filter(e=>e.products.length>0).map(e=>({...e,products:es(e.products).slice(0,8)}));return r.length>0&&l.push({id:"unknown",label:"Price on request",products:es(r).slice(0,8)}),l}(n),d=c.length>0&&c.some(e=>"unknown"!==e.id),y=(e,t)=>{let r=ed(e,{userBudgetInr:s});return(0,l.jsx)("div",{className:"max-w-full min-w-0 flex gap-4 sm:gap-5 overflow-x-auto pb-3 sm:pb-4 -mx-1 px-1 snap-x snap-mandatory [scrollbar-width:thin] [scrollbar-color:rgba(139,92,246,0.3)_transparent]",children:r.map((e,r)=>(0,l.jsx)("div",{className:"snap-start shrink-0",children:(0,l.jsx)(eI,{p:e,turnId:i,onProductLinkClick:a,sessionId:o,isProductSaved:u,onProductSaved:p,onRequireAuth:g,isSelected:!!(null==m?void 0:m(String((null==e?void 0:e.product_id)||"").trim())),onToggleSelect:h,selectionLimitReached:f})},"".concat(t,"-p-").concat(r)))},t)};if(!d)return y(n,r);return(0,l.jsx)("div",{className:"space-y-3",children:c.map(e=>(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-widest text-green-600/80 font-poppins",children:e.label}),(0,l.jsxs)("span",{className:"text-[10px] text-gray-500 font-poppins",children:[e.products.length," ",1===e.products.length?"pick":"picks"]})]}),y(e.products,"".concat(r,"-").concat(e.id))]},"".concat(r,"-").concat(e.id)))},r)}case"video_grid":{let t=Array.isArray(e.videos)?e.videos:[];if(0===t.length)return null;return(0,l.jsx)("div",{className:"max-w-full min-w-0 flex gap-4 sm:gap-5 overflow-x-auto pb-3 sm:pb-4 -mx-1 px-1 snap-x snap-mandatory [scrollbar-width:thin] [scrollbar-color:rgba(139,92,246,0.3)_transparent]",children:t.map((t,a)=>{let s=Array.isArray(e.captions)?String(e.captions[a]||"").trim():"",o=t&&"object"==typeof t?{...t,layout_caption:String(t.layout_caption||"").trim()||s||""}:t;return(0,l.jsx)("div",{className:"snap-start shrink-0",children:(0,l.jsx)(eA,{v:o,turnId:i,onVideoLinkClick:n})},"".concat(r,"-v-").concat(a))})},r)}case"rich_list":return(0,l.jsxs)("div",{className:"space-y-3 rounded-xl bg-gray-50 border border-gray-200 p-4",children:[(0,l.jsxs)("p",{className:"text-sm sm:text-base font-bold text-gray-900 font-poppins flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#8f00ff]
1inline-block"}),e.heading]}),(0,l.jsx)("ul",{className:"space-y-2 text-sm text-gray-700 leading-relaxed",children:(e.items||[]).map((e,t)=>(0,l.jsxs)("li",{className:"flex gap-2.5",children:[(0,l.jsx)("span",{className:"text-gray-500 mt-1 flex-shrink-0",children:"âº"}),(0,l.jsxs)("span",{children:[(0,l.jsx)(q,{text:"string"==typeof e?e:null==e?void 0:e.text,variant:c,theme:d}),Array.isArray(null==e?void 0:e.children)&&e.children.length>0?(0,l.jsx)("ul",{className:"ml-4 mt-2 space-y-1.5 text-gray-600",children:e.children.map((e,t)=>(0,l.jsxs)("li",{className:"flex gap-2",children:[(0,l.jsx)("span",{className:"text-gray-300",children:"\xb7"}),(0,l.jsx)("span",{children:(0,l.jsx)(q,{text:e,variant:c,theme:d})})]},"".concat(r,"-sub-").concat(t)))}):null]})]},"".concat(r,"-li-").concat(t)))})]},r);case"paragraph":return(0,l.jsx)(q,{as:"p",text:e.text,variant:c,theme:d,className:"text-sm text-gray-700 leading-relaxed font-poppins"},r);case"stylist_question":{let t=(Array.isArray(e.items)?e.items.filter(e=>String(e||"").trim()):[]).slice(0,4),i=String(e.text||"").trim();if(!i&&0===t.length)return null;return(0,l.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-gray-50 px-4 py-3.5",children:[(0,l.jsxs)("p",{className:"text-[11px] font-semibold uppercase tracking-widest text-gray-500 font-poppins mb-1.5 flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#8f00ff]
1inline-block animate-pulse"}),t.length>1?"Quick questions":"Quick question"]}),t.length>1?(0,l.jsx)("ul",{className:"space-y-2 text-sm text-gray-800 leading-relaxed",children:t.map((e,t)=>(0,l.jsxs)("li",{className:"flex gap-2.5",children:[(0,l.jsx)("span",{className:"text-gray-500 mt-0.5 flex-shrink-0",children:"â¢"}),(0,l.jsx)("span",{children:(0,l.jsx)(q,{text:e,variant:c,theme:d})})]},"".concat(r,"-q-").concat(t)))}):(0,l.jsx)("p",{className:"text-sm text-gray-800 leading-relaxed whitespace-pre-line font-poppins",children:(0,l.jsx)(q,{text:i||t[0],variant:c,theme:d})})]},r)}case"divider":return(0,l.jsx)("hr",{className:"border-gray-200 my-2"},r);default:return null}})}):null},eM="talkToMaya_local_context_v1",eT=()=>(0,l.jsx)("span",{className:"inline-flex items-center gap-0.75",children:[0,1,2].map(e=>(0,l.jsx)("span",{className:"w-1.75 h-1.75 rounded-full bg-gray-500",style:{animation:"typingWave 1.2s ease-in-out infinite",animationDelay:"".concat(.18*e,"s")}},e))}),eB="landing_trending_looks_v1",eP=null,eE=()=>(eP||(eP=(0,p.Vg)("/api/website/trending_looks/categories?limit=5").catch(e=>{throw eP=null,e})),eP);eE().catch(()=>{});let eF=e=>(Array.isArray(null==e?void 0:e.categories)?e.categories:[]).map(e=>({label:String((null==e?void 0:e.category)||"").trim(),looks:(Array.isArray(null==e?void 0:e.latest_looks)?e.latest_looks:[]).filter(e=>(null==e?void 0:e.image_url)||(null==e?void 0:e.original_image_url)).slice(0,5)})).filter(e=>e.label&&e.looks.length>0).slice(0,4),eL=e=>{let{setIsOptionsChanged:t,guestMode:r=!1,onGuestAction:n,onGuestRegister:v,onGuestLogin:j,onAuthSuccess:B,stylingServiceCatalogSlugs:L=C.yJ,hideStylingServicePricing:X=!0,onConversationStartedChange:ee}=e,et=C.yJ,[ei,ea]=(0,i.useState)(null),[en,es]=(0,i.useState)(null),[eo,ed]=(0,i.useState)(""),[eu,ep]=(0,i.useState)(!1),[ev,ew]=(0,i.useState)(!1),[eS,eA]=(0,i.useState)({show:!1,message:"",type:"error"});(0,_.useRouter)();let[eI,eP]=(0,i.useState)(!1),[eL,eR]=(0,i.useState)(!1),[eU,eD]=(0,i.useState)(!1),[eO,eq]=(0,i.useState)({image:"",title:""}),[eG,ez]=(0,i.useState)("English"),[eV,eJ]=(0,i.useState)(""),[e$,eK]=(0,i.useState)([]),eH=(0,i.useRef)(null),[eW,eY]=(0,i.useState)(null),[eZ,eQ]=(0,i.useState)(""),[eX,e0]=(0,i.useState)([]),e1=()=>!!r&&(null==n||n(),!0),e2=(0,i.useCallback)(async()=>{try{let e=await (0,g.LZ)({force:!0});if(e&&!e.redirect&&!e.error)return es(e),ed(null==e?void 0:e.user_name),e;return es(null),null}catch(t){var e;return console.warn("Guest profile fetch failed:",(null==t||null==(e=t.response)?void 0:e.status)||(null==t?void 0:t.message)),null}},[]),e5=(0,i.useCallback)(async()=>{if(!r)return!0;try{await (0,I.FA)("")}catch(e){return console.error("Guest trial session failed:",e),null==n||n(),!1}return e2(),!0},[r,n,e2]),e4=(0,i.useCallback)(async()=>!r||!!await e5()&&(!(0,I.T6)("")||(null==n||n(),!1)),[r,e5,n]),e3=(0,i.useCallback)(()=>{e1()},[r,n]),{isSaved:e9,markSaved:e8}=(0,A.Vl)(!r),[e6,e7]=(0,i.useState)(!1),[te,tt]=(0,i.useState)(""),tr=(0,i.useRef)(null),tl=(0,i.useRef)(null),ti=(0,i.useRef)(null),ta=(0,i.useRef)(!1),tn=(0,i.useRef)(!1),ts=(0,i.useRef)(null),[to,tc]=(0,i.useState)(!1),[td,tu]=(0,i.useState)(!1),tp=(0,i.useRef)([]),tg=(0,i.useRef)(""),tm=(0,i.useRef)(!1),th=(0,i.useRef)(null),[tf,ty]=(0,i.useState)(!1),tx=(0,i.useCallback)(async()=>!r||((0,I.T6)("")?(null==n||n(),!1):e5()),[r,n,e5]),tb=(0,i.useCallback)(()=>{if(r)return void(async()=>{await tx()&&(ty(!0),requestAnimationFrame(()=>{var e;null==(e=th.current)||e.scrollIntoView({behavior:"smooth",block:"nearest"})}))})();ty(!0),requestAnimationFrame(()=>{var e;null==(e=th.current)||e.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,tx]),tv=()=>{if(r)return void(async()=>{await tx()&&eP(!0)})();eP(!0)};(0,i.useEffect)(()=>{r||eP(!1)},[r]);let tw=(0,x.o)(eM),[t_,tk]=(0,i.useState)({}),[tj,tS]=(0,i.useState)({}),[tN,tA]=(0,i.useState)([]),[tI,tC]=(0,i.useState)({}),[tM,tT]=(0,i.useState)({show:!1,turnId:""}),[tB,tP]=(0,i.useState)(!1),[tE,tF]=(0,i.useState)(!1),[tL,tR]=(0,i.useState)({open:!1,serviceInterest:"",serviceTitle:"",serviceSlug:""}),tU=(0,i.useRef)(!1),[tD,tO]=(0,i.useState)([]),tq=(0,i.useRef)([]);(0,i.useEffect)(()=>{tq.current=tD},[tD]);let tG=(0,i.useMemo)(()=>new Set(tD.map(e=>
1String((null==e?void 0:e.product_id)||"").trim()).filter(Boolean)),[tD]),[tz,tV]=(0,i.useState)(!1),[tJ,t$]=(0,i.useState)(!1),[tK,tH]=(0,i.useState)(""),[tW,tY]=(0,i.useState)({...S.Gw}),tZ=(0,i.useCallback)(()=>{let e=ey();!r||tU.current||(0,I.lB)(e)||(tU.current=!0,(0,I.KK)(e),window.setTimeout(()=>tF(!0),1200))},[r]);(0,i.useEffect)(()=>{let e=ey();!(!r||tU.current||(0,I.lB)(e))&&e$.some(em)&&tZ()},[r,e$,tZ]);let tQ=(e,t)=>{var r,l;null==t||null==(r=t.stopPropagation)||r.call(t),null==t||null==(l=t.preventDefault)||l.call(t);let i=(0,N.Ms)(e);if(!(null==i?void 0:i.product_id))return;let a=i.product_id;tO(e=>e.some(e=>e.product_id===a)?e.filter(e=>e.product_id!==a):e.length>=6?(eA({show:!0,message:"You can select up to ".concat(6," products."),type:"error"}),e):[...e,i])},tX=e=>{let t=String(e||"").trim();t&&tO(e=>e.filter(e=>e.product_id!==t))},t0=(0,i.useCallback)(e=>tG.has(String(e||"").trim()),[tG]),t1=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";eK(l=>l.map(l=>l.turn_id===e?{...l,feedback:t,feedbackComment:r||l.feedbackComment||""}:l));let l=localStorage.getItem("talkToMaya_chat_messages");if(l)try{let i=JSON.parse(l);Array.isArray(i)&&localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(i.map(l=>l.turn_id===e?{...l,feedback:t,feedbackComment:r||l.feedbackComment||""}:l)))}catch(e){}},t2=async function(e,t){let{comment:r="",quality_rating:l=null,question_responses:i=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e1()&&e)try{let a={turn_id:e,rating:t,comment:String(r||"").trim()};null!=l&&(a.quality_rating=l),Array.isArray(i)&&i.length&&(a.question_responses=i),await (0,p.$P)("/talk_to_maya_v2/feedback",a),t1(e,t,r)}catch(e){console.error("Feedback submit failed:",e)}},t5=async e=>{let{product:t,turnId:r,itemType:l="product",lookTitle:i="",destinationUrl:a=""}=e;if(!r)return;let n=String(a||Q(t)||(null==t?void 0:t.url)||"").trim();try{await (0,p.$P)("/talk_to_maya_v2/affiliate-click",{turn_id:r,session_id:ey(),source:"website",item_type:l,product_id:String((null==t?void 0:t.product_id)||"").trim(),product_name:String((null==t?void 0:t.name)||i||"").trim(),brand_name:String((null==t?void 0:t.brand)||("look"===l?"Look":"")).trim(),product_image_url:String((null==t?void 0:t.image)||"").trim(),product_page_url:n,brand_website:String((null==t?void 0:t.brand_website)||"").trim(),ecom:!!(null==t?void 0:t.ecom),integrated_brand:Z(t),category:String((null==t?void 0:t.category)||"").trim(),price:null==t?void 0:t.price,color:String((null==t?void 0:t.color)||"").trim(),look_title:String(i||"").trim()})}catch(e){console.error("Affiliate click tracking failed:",e)}},t4=async e=>{let{video:t,turnId:r}=e;if(r&&t)try{await (0,p.$P)("/talk_to_maya_v2/video-click",{turn_id:r,session_id:ey(),source:"website",video_id:String((null==t?void 0:t.video_id)||"").trim(),video_title:String((null==t?void 0:t.title)||"").trim(),video_url:String((null==t?void 0:t.url)||"").trim(),video_thumbnail_url:String((null==t?void 0:t.thumbnail)||"").trim()})}catch(e){console.error("Video click tracking failed:",e)}},t3=(e,t)=>{let{turnId:r,lookTitle:l,imageUrl:i,destinationUrl:a}=t;e.preventDefault();let n=()=>window.open(a,"_blank","noopener,noreferrer");if(!r)return void n();t5({product:{name:l,image:i,url:a},turnId:r,itemType:"look",lookTitle:l,destinationUrl:a}).finally(n)},t9=e=>{!e1()&&e&&tT({show:!0,turnId:e})},t8=()=>{tT({show:!1,turnId:""}),tV(!1)},t6=async e=>{let{comment:t="",quality_rating:r=null,question_responses:l=[]}=e;if(tM.turnId&&!tz){tV(!0);try{await t2(tM.turnId,"dislike",{comment:t,quality_rating:r,question_responses:l}),t8(),tH("Thanks â your feedback helps Maya improve.")}finally{tV(!1)}}},t7=async e=>{let{comment:t="",quality_rating:r=null,question_responses:l=[]}=e;if(!e1()&&!tJ){t$(!0);try{await (0,p.$P)("/talk_to_maya_v2/overall-feedback",{comment:String(t||"").trim(),quality_rating:r,question_responses:l,session_id:ey(),source:"website"}),tP(!1),tH("Thank you for your feedback!")}catch(e){console.error("Overall feedback submit failed:",e),tH("Could not submit feedback. Please try again.")}finally{t$(!1)}}};(0,i.useEffect)(()=>
1{if(!tK)return;let e=setTimeout(()=>tH(""),3500);return()=>clearTimeout(e)},[tK]);let re=e=>{if(!e)return"";if("string"==typeof e)return e;if("object"==typeof e){let t=Object.values(e);return(t&&t[0]?String(t[0]):"")||""}return""},rt=e=>e?"string"==typeof e?e:"object"==typeof e?re(e):"":"";(0,i.useEffect)(()=>{history.pushState(null,"",window.location.href);let e=e=>{e6&&(e.preventDefault(),e.returnValue="You will lose data. Are you sure you want to leave?")},t=e=>{e6&&(window.confirm("You will lose data. Do you want to go back?")?window.history.back():history.pushState(null,"",window.location.href))};return window.addEventListener("beforeunload",e),window.addEventListener("popstate",t),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("popstate",t)}},[e6]),(0,i.useEffect)(()=>{ey()},[]);let rr=async e=>{let t=String(e||"").trim();if(!t)return void tY({...S.Gw});tY(function(e){let t=String(e||"").trim();if(!t)return{...S.Gw};try{let e=localStorage.getItem(ex(t));if(!e)return{...S.Gw};return(0,S.ce)(JSON.parse(e))}catch(e){return{...S.Gw}}}(t));try{let e=await (0,p.Vg)("/talk_to_maya_api_website_v2/session-settings",{session_id:t});if(null==e?void 0:e.chat_user_settings){let r=(0,S.ce)(e.chat_user_settings);tY(r),eb(t,r)}}catch(e){console.warn("Could not load chat user settings:",e)}},rl=async(e,t)=>{let r=String(e||"").trim(),l=(0,S.ce)(t);if(!r)return l;tY(l),eb(r,l);try{await (0,p.mu)("/talk_to_maya_api_website_v2/session-settings",{session_id:r,chat_user_settings:l})}catch(e){console.warn("Could not save chat user settings:",e)}return l},ri=async e=>{if(r&&(0,I.T6)("")){null==n||n();return}let t=ey(),l=await rl(t,e);return eK(e=>{let t=[...e,{id:Date.now()+Math.floor(1e3*Math.random()),showBotname:!0,type:"bot",text:(0,k.Fs)(eG).chatPreferencesUpdatedAck,isChatSettingsAck:!0,layout:{layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"#FFDFC4",skin_img:"https://backend.stylebuddy.ai/static/images/male_fair_skin_tone.jpg",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[]},showRating:!1}];return localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(t)),t}),l};(0,i.useEffect)(()=>{rr(ey())},[]);let ra=async()=>{let e=null;try{e=await (0,g.LZ)(),es(e),ed(null==e?void 0:e.user_name)}catch(e){console.error("Profile fetch failed:",e)}localStorage.getItem("talkToMaya_chat_messages")||eK([(0,b.ed)({id:1,showBotname:!0,type:"bot",text:(0,k.Fs)(eG).welcome((null==e?void 0:e.user_name)||""),layout:{layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"#FFDFC4",skin_img:"https://backend.stylebuddy.ai/static/images/male_fair_skin_tone.jpg",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[]},showRating:!1})])},rn=async()=>{try{let e=await (0,p.Vg)("/talk_to_maya_page_website");("true"!==e.stylebotpopup||null===e.stylebotpopup)&&ep(!0)}catch(e){console.error(" fetch failed:",e)}};(0,i.useEffect)(()=>{if(!r){rn(),ra();return}localStorage.getItem("talkToMaya_chat_messages")||eK([(0,b.ed)({id:1,showBotname:!0,type:"bot",text:(0,k.Fs)(eG).welcome(""),layout:{layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"#FFDFC4",skin_img:"https://backend.stylebuddy.ai/static/images/male_fair_skin_tone.jpg",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[]},showRating:!1})])},[r]),(0,i.useEffect)(()=>{let e={layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"#FFDFC4",skin_img:"https://backend.stylebuddy.ai/static/images/male_fair_skin_tone.jpg",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[]},t=async()=>{try{let t=await (0,g.LZ)({force:!0});es(t),ed((null==t?void 0:t.user_name)||""),tm.current=!0,eK(t=>{let r=[...t,{id:Date.now()+Math.floor(1e3*Math.random()),showBotname:!0,type:"bot",text:(0,k.Fs)(eG).profileUpdatedAck,layout:e,showRating:!1}];return localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(r)),r})}catch(e){console.error("Profile refresh after update failed:",e)}};return window.addEventListener("style-profile-updated",t),()=>window.removeEventListener("style-profile-updated",t)},[eG]);let rs=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error";eA({show:!0,message:e,type:t})},ro=(e,t)=>{eA({show:!0,message:e,type:"confirm",onConfirm:async()=>{try{eR(!0),await t(),eA({show:!1,message:"",type:"error"})}finally{eR(!1)}}})};(0,i.useEffect)(()=>
1{if(!tn.current&&e$.length>0){tn.current=!0;let e=tr.current;if(e){e.scrollTo({top:e.scrollHeight,behavior:"auto"});let t=new ResizeObserver(()=>e.scrollTo({top:e.scrollHeight,behavior:"auto"}));Array.from(e.children).forEach(e=>t.observe(e));let r=()=>{t.disconnect(),e.removeEventListener("wheel",r),e.removeEventListener("touchstart",r)};e.addEventListener("wheel",r,{once:!0}),e.addEventListener("touchstart",r,{once:!0});let l=setTimeout(r,2e3);return()=>{clearTimeout(l),r()}}return}let e=ta.current;if(ta.current=e6,e6&&tl.current)return void tl.current.scrollIntoView({behavior:"smooth",block:"nearest"});if(e&&!e6&&ti.current)return void ti.current.scrollIntoView({behavior:"smooth",block:"start"});let t=e$[e$.length-1],r=e$[e$.length-2];if((null==t?void 0:t.type)==="bot"&&(null==r?void 0:r.type)==="user"&&!e6&&ti.current)return void ti.current.scrollIntoView({behavior:"smooth",block:"start"});((null==t?void 0:t.type)==="user"||(null==t?void 0:t.isChatSettingsAck)===!0)&&tr.current&&tr.current.scrollTo({top:tr.current.scrollHeight,behavior:"smooth"})},[e$,e6]);let rc=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(null===rc.current){rc.current=eG;return}rc.current!==eG&&(rc.current=eG,eK(e=>{let t=(0,k.Ru)(e,{userName:eo,language:eG});return t===e?e:(localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(t)),t)}))},[eG,eo]),(0,i.useEffect)(()=>{let e=localStorage.getItem("talkToMaya_language");e&&ez(JSON.parse(e));let t=localStorage.getItem("talkToMaya_chat_messages");if(t)try{let e=JSON.parse(t);if(Array.isArray(e)){let t=R(e,{stylingServiceCatalogSlugs:et,nextId:()=>Date.now()+Math.floor(1e3*Math.random())});eK(t),localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(t))}}catch(e){}let r=localStorage.getItem("talkToMaya_conversation_history");if(r)try{tp.current=JSON.parse(r)}catch(e){tp.current=[]}let l=localStorage.getItem("talkToMaya_persistent_upload_s3_url");l&&"string"==typeof l&&(tg.current=l.trim()),(async()=>{try{let e=await (0,g.X5)();ea(e)}catch(e){console.error("Error fetching data:",e)}})(),tu(!0)},[]),(0,i.useEffect)(()=>{td&&document.documentElement.classList.remove("maya-chat-restoring")},[td]),(0,i.useEffect)(()=>{Array.isArray(et)&&0!==et.length&&eK(e=>{if(!Array.isArray(e)||0===e.length)return e;let t=R(e,{stylingServiceCatalogSlugs:et,nextId:()=>Date.now()+Math.floor(1e3*Math.random())});return localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(t)),t})},[et]);let rd=()=>{var e;if(null==(e=tp.current)?void 0:e.length)return[...tp.current];let t=localStorage.getItem("talkToMaya_conversation_history");if(t)try{let e=JSON.parse(t);return tp.current=Array.isArray(e)?e:[],[...tp.current]}catch(e){}return[]},ru=e=>new Promise((t,r)=>{let l=new FileReader;l.onload=()=>{let e=String(l.result||"").split(",");t(e.length>1?e[1]:"")},l.onerror=r,l.readAsDataURL(e)}),rp=async e=>{var t;if(e1())return;let r=null==(t=e.target.files)?void 0:t[0];if(r)try{let e=await ru(r);eY({data:e,mimeType:r.type||"image/jpeg"}),eQ(URL.createObjectURL(r)),e0([])}catch(e){console.error("Unable to read image:",e),rs("Unable to read selected image","error")}},rg=()=>{eY(null),eZ&&URL.revokeObjectURL(eZ),eQ(""),e0([]),eH.current&&(eH.current.value="")},rm=e=>(Array.isArray(e)?e:[]).map(e=>String(e||"").trim()).filter(Boolean).slice(0,3),rh=()=>Date.now()+Math.floor(1e3*Math.random()),rf=(0,i.useCallback)(e=>{let t=e,r=(0,b.Fm)(t);return r&&(t=[...t,r]),t},[]),ry=(0,i.useCallback)(e=>{eK(t=>{let r=R("function"==typeof e?e(t):e,{stylingServiceCatalogSlugs:et,nextId:rh});return localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(r)),r})},[et]),rx=(0,i.useCallback)(()=>{if(e6)return;let e={id:rh(),type:"user",text:"I'd like to book a styling session"},t=F({id:rh(),defaultServiceSlugs:et,allowedServiceSlugs:et});ry(r=>[...r,e,t])},[e6,ry,et]),rb=(0,i.useCallback)(e=>{let t=function(e){let{id:t,slug:r,allowedServiceSlugs:l,showBookingPrompt:i=!1}=e,a=(0,C.kj)(r,l);return a?{id:t,showBotname:!1,type:"bot",text:"",stylingServicesBlock:"detail",stylingServiceSlug:a.slug,stylingServiceBookingPrompt:i,feedback:null,layout:P(),showRating:!1}:null}({id:rh(),slug:e,allowedServiceSlugs:et});t&&ry(e=>[...e,t])},[ry,et]),rv=(0,i.useCallback)(e=>{tR({open:!0,serviceInterest:(null==e?void 0:e.title)||"",serviceTitle:(null==e?void 0:e.title)||"",serviceSlug:(null==e?void 0:e.slug)||""})},[]),rw=(0,i.useCallback)(()=>{let e=F({id:rh(),defaultServiceSlugs:et,allowedServiceSlugs:et});ry(t=>[...t,e])},[ry,et]),r_=(0,i.useCallback)(e=>{let t=String(e||"").trim();t&&eK(e=>{if(e.some(e=>(null==e?void 0:e.isIdleFollowUp)&&String((null==e?void 0:e.text)||"").trim()===t))return e;let r=[...e,{id:Date.now()+Math.floor(1e3*Math.random()),showBotname:!1,type:"bot",text:t,isIdleFollowUp:!0,feedback:null,layout:{layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"",skin_img:"",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[{type:"stylist_question",text:t,items:[]}],user_budget_inr:null},showRating:!1}];try{localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(r))}catch(e){}return r})},[]),rk=!!(tL.open||tE||tM.show||tB||eU||eu||eS.show),{idlePopup:rj,dism
1issIdlePopup:rS}=(0,f.w)({isLoading:e6,messages:e$,composerText:eV,idleMs:6e4,enabled:!0,blockedByModal:rk,onTrigger:r_});(0,i.useEffect)(()=>{rk&&rS()},[rk,rS]);let rN=async e=>{let t=String(e||"").trim();t&&!e6&&await e4()&&(rS(),await rI({query:t,echoUser:!0,baseMessages:e$}))},rA=async e=>{let t=String(e||"").trim();t&&!e6&&await e4()&&await rI({query:t,echoUser:!0,baseMessages:e$})};async function rI(e){var l,i,a;let{query:s,echoUser:o=!0,baseMessages:c,uploadedImageOverride:d=null,selectedProductsOverride:u=null}=e;if(!(null==s?void 0:s.trim())||e6)return;if(r){try{await (0,I.FA)("")}catch(e){console.error("Guest trial session failed:",e),null==n||n();return}if((0,I.T6)("")){null==n||n();return}}let g=null!=c?c:e$;if(o){let e=(null!=(l=null!=u?u:tq.current)?l:tD).map(e=>(0,N.Ms)(e)).filter(Boolean);eK(g=[...g,{id:rh(),type:"user",text:s,...e.length?{selectedProducts:e}:{}}])}e7(!0),tt("Understanding your style requestâ¦"),t(!0);let m=ey(),h=null,f=null,y=!1,x=e=>{let t=String(e||"").trim();t&&tt(t)},b=()=>{if(y)return;y=!0,f&&(f(),f=null);let e=async()=>{try{let e=await (0,p.Vg)("/talk_to_maya_api_website_v2/status",{session_id:m});x(null==e?void 0:e.message)}catch(e){}};h=setInterval(e,750),e()},v=await (0,p.Zy)();(null==v?void 0:v.redis_available)&&(null==v?void 0:v.delivery)==="sse"?f=(0,p.lR)(m,(e,t)=>{if(null==t?void 0:t.error)return void b();x(e)}):b();let w=null!=(i=null!=d?d:eW)?i:{},_=!!(null==w?void 0:w.data);_||e0([]);try{let e={gender:null==en?void 0:en.gender,bodytype:null==en?void 0:en.bodytype,skintone:null==en?void 0:en.skintone,query:s,conversation_history:rd(),session_id:m,chat_language:eG,generated_Images:tN,shopping_previous_companies:localStorage.getItem("talkToMaya_shopping_previous_companies")||"",shopping_previous_product_keys:localStorage.getItem("talkToMaya_shopping_previous_product_keys")||"",..._?{uploaded_image:w,uploaded_image_s3_url:tg.current||""}:{},...tm.current?{profile_updated:!0}:{},chat_user_settings:tW,...function(){let e=function(){try{let e=localStorage.getItem(eM);if(!e)return{};let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch(e){return{}}}(),t=e.timezone||function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){return""}}(),r={};t&&(r.user_timezone=t);let l=e.latitude,i=e.longitude;return null!=l&&null!=i&&(r.user_latitude=l,r.user_longitude=i),e.city?r.user_location={city:e.city,latitude:l,longitude:i}:null!=l&&null!=i&&(r.user_location={latitude:l,longitude:i}),r}(),...(()=>{var e;let t=(null!=(e=null!=u?u:tq.current)?e:tD).map(e=>(0,N.Ms)(e)).filter(Boolean);return t.length?{selected_products:t}:{}})()},l=!!(null==(a=e.selected_products)?void 0:a.length),i=await (0,p.$P)("/talk_to_maya_api_website_v2",e);if((0,I.v5)(i)||(null==i?void 0:i.code)==="GUEST_LIMIT_REACHED"){r&&(0,I.Ko)(""),t(!1),null==n||n();return}!r||(null==i?void 0:i.error)||(0,I.Ko)("");let o="string"==typeof(null==i?void 0:i.session_id)?i.session_id.trim():"";if(o&&localStorage.setItem("generation_sessionId",o),null==i?void 0:i.chat_user_settings){let e=(0,S.ce)(i.chat_user_settings);tY(e),eb(o||m,e)}let c="string"==typeof(null==i?void 0:i.content)&&""!==i.content.trim()?i.content.trim():"",d=Array.isArray(null==i?void 0:i.products_by_vibe)&&i.products_by_vibe.some(e=>Array.isArray(null==e?void 0:e.products)&&e.products.length>0),h=ej(null==i?void 0:i.stylist_layout_blocks),f=h.length>0,y=Array.isArray(null==i?void 0:i.products)&&i.products.length>0||d||f||Array.isArray(null==i?void 0:i.images)&&i.images.length>0||Array.isArray(null==i?void 0:i.outfits_list)&&i.outfits_list.length>0,x=null;if(c||y){let e=f||!y?"":(0,k.Fs)(eG).productFallback;x={id:rh(),turn_id:(null==i?void 0:i.turn_id)||"",showBotname:!1,type:"bot",text:c||e,feedback:null,layout:{layout_type:i.layout_type||"",topwear_colors:i.topwear_colors||[],bottomwear_colors:i.bottomwear_colors||[],skin_tone:i.skin_tone||"#C68642",skin_img:i.skin_img||"https://backend.stylebuddy.ai/static/images/male_light_brown_skin_tone.jpg",images:Array.isArray(i.images)?i.images:[],outfits_list:Array.isArray(i.outfits_list)?i.outfits_list:[],products:Array.isArray(i.products)?i.products:[],catalog_replay_spec:(null==i?void 0:i.catalog_replay_spec)&&"object"==typeof i.catalog_replay_spec?i.catalog_replay_spec:{},products_pagination:(null==i?void 0:i.products_pagination)&&"object"==typeof i.products_pagination?i.products_pagination:{},products_by_vibe:Array.isArray(null==i?void 0:i.products_by_vibe)?i.products_by_vibe:[],stylist_layout_blocks:h,user_budget_inr:ec(null==i?void 0:i.user_budget_inr),selected_product_picks:Array.isArray(null==i?void 0:i.selected_product_picks)?i.selected_product_picks:[],selected_product_pairs:Array.isArray(null==i?void 0:i.selected_product_pairs)?i.selected_product_pairs:[]},showRating:!1}}let b=null==i?void 0:i.stylebuddy_services_ui,v=!(null==i?void 0:i.error)&&function(){let{stylebuddyServicesUi:e,allowedServiceSlugs:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!!e&&"object"==typeof e&&!!E({id:"stylebuddy-services-validation",ui:e,allowedServiceSlugs:t,defaultServiceSlugs:t})}({stylebuddyServicesUi:b,allowedServiceSlugs:et}),j=v?E({id:rh(),ui:b,allowedServiceSlugs:et,defaultServiceSlugs:et}):null,A=[...g,...x?[x]:[],...j?[j]:[]];!x||(null==i?void 0:i.error)||(A=function(e,t){let{stylingServiceCatalogSlugs:r,nextId:l,skipBecauseAiSuggestedServices:i=!1}=t;if(i||!Array.isArray(r)||0===r.length||!Array.isArray(e))return e;let a=e.filter(e=>(null==e?void 0:e.type)==="user").length;return M.includes(a)?new Set((Array.isArray(e)?e:[]).map(e=>Number(null==e?void 0:e.stylingServicesIntroMilestone)).filter(e=>M.includes(e))).has(a)?e:[...e,function(e){let{id:t,defaultServiceSlugs:r,userMessageMilestone:l=3}=e;return{id:t,showBotname:!1,type:"bot",text:T[l]||T[3],isStylingServicesIntro:!0,stylingServicesIntroMilestone:l,stylingServicesBlock:"catalog",stylingServicesCatalogVariant:"promo",stylingServiceSlugs:Array.isArray(r)&&r.length>0?r:void 0,feedback:null,layout:P(),showRating:!1}}({id:l(),defaultServiceSlugs:r,userMessageMilestone:a})]:e}(A,{stylingServiceCatalogSlugs:et,nextId:rh,skipBecauseAiSuggestedServices:v}));let C=rf(A),B=R(C,{stylingServiceCatalogSlugs:et,nextId:rh});eK(B),!l||(null==i?void 0:i.error)||tO([]),r&&function(e){if(!e||"object"!=typeof e)return!1;let t=ej(null==e?void 0:e.stylist_layout_blocks);return eg({products:null==e?void 0:e.products,productsByVibe:null==e?void 0:e.products_by_vibe,layoutBlocks:t}).length>0}(i)&&tZ();let F=Array.isArray(null==i?void 0:i.conversation_history)?i.conversation_history:[];tp.current=F,localStorage.setItem("talkToMaya_conversation_history",JSON.stringify(F));let L="string"==typeof(null==i?void 0:i.uploaded_image_s3_url)?i.uploaded_image_s3_url.trim():"";L&&(tg.current=L,localStorage.setItem("talkToMaya_persistent_upload_s3_url",L)),_?e0(rm(null==i?void 0:i.uploaded_image_suggested_queries)):e0([]),(null==i?void 0:i.shopping_previous_companies)!=null&&localStorage.setItem("talkToMaya_shopping_previous_companies",String(i.shopping_previous_companies)),(null==i?void 0:i.shopping_previous_product_keys)!=null&&localStorage.setItem("talkToMaya_shopping_previous_product_keys",String(i.shopping_previous_product_keys)),localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(B)),tm.current&&(tm.current=!1),t(!1)}catch(t){console.error("Error calling Maya agent:",t);let e=rf([...g,{id:rh(),type:"bot",text:"Sorry, I'm having trouble connecting right now. Please try again."}]);eK(e),localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(e))}finally{f&&f(),h&&clearInterval(h),e7(!1),tt("")}}let rC=async e=>{let t=String(e||"").trim();t&&!e6&&await e4()&&await rI({query:t,echoUser:!0,baseMessages:e$})},rM=async e=>{if(e.preventDefault(),!eV.trim()&&!(null==eW?void 0:eW.data))return rs("Please Enter Message","error");
1if(e6||!await e4())return;let t=eV.trim(),r=(null==eW?void 0:eW.data)?{...eW}:null,l=r?"data:".concat(r.mimeType||"image/jpeg",";base64,").concat(r.data):"";eJ(""),ts.current&&(ts.current.style.height="auto");let i=tq.current.map(e=>(0,N.Ms)(e)).filter(Boolean),a=[...e$,{id:rh(),type:"user",text:t||" ",imagePreview:l||"",...i.length?{selectedProducts:i}:{}}];eK(a),i.length>0&&tO([]),rg(),await rI({query:t||"Please analyze the uploaded image.",echoUser:!1,baseMessages:a,uploadedImageOverride:r,selectedProductsOverride:tq.current})},rT=()=>{if(e6)return;tF(!1),tU.current=!1,tO([]),ef(),eK([(0,b.ed)({id:1,showBotname:!0,type:"bot",text:(0,k.Fs)(eG).welcome(eo||""),layout:{layout_type:"",topwear_colors:[],bottomwear_colors:[],skin_tone:"#FFDFC4",skin_img:"https://backend.stylebuddy.ai/static/images/male_fair_skin_tone.jpg",images:[],outfits_list:[],products:[],catalog_replay_spec:{},products_pagination:{},products_by_vibe:[],stylist_layout_blocks:[]},showRating:!1})]),eJ(""),tc(!1),tp.current=[],tg.current="",e0([]),localStorage.removeItem("talkToMaya_chat_messages"),localStorage.removeItem("talkToMaya_conversation_history"),localStorage.removeItem("talkToMaya_persistent_upload_s3_url"),localStorage.removeItem("talkToMaya_shopping_previous_companies"),localStorage.removeItem("talkToMaya_shopping_previous_product_keys"),r&&(0,I.hB)("",0);let e=ef();tY({...S.Gw}),rr(e),tk({}),tA([]),tC({}),rg()},rB=async(e,t)=>{if(!e1())try{tS(e=>({...e,[t]:!0}));let r={outfit_name:e,gender:null==en?void 0:en.gender},l=await (0,p.$P)("/generate_image_talk_to_maya",r),i=rt(null==l?void 0:l.image)||rt(l);if(!i)return void rs("No image returned. Please try again.");let[a,n]=t.split("_"),s=Number(a),o=Number(n);eK(e=>{let t=e.map(e=>{if(e.id!==s)return e;let t={...e.layout||{}},r=Array.isArray(t.images)?[...t.images]:[];return r[o]={image:i},t.images=r,{...e,layout:t}});return localStorage.setItem("talkToMaya_chat_messages",JSON.stringify(t)),t}),tk(e=>({...e,[t]:i})),tA(t=>[...t,e])}catch(e){console.log("Image generation failed:",e),rs("Failed to generate image. Please try again.")}finally{tS(e=>({...e,[t]:!1}))}},rP=to||e$.some(e=>(null==e?void 0:e.type)==="user"||(null==e?void 0:e.isChatSettingsAck)===!0);(0,i.useEffect)(()=>{var e;to&&(null==(e=ts.current)||e.focus())},[to]),(0,i.useEffect)(()=>{null==ee||ee(rP)},[rP,ee]);let[rE,rF]=(0,i.useState)([]),[rL,rR]=(0,i.useState)(!0),[rU,rD]=(0,i.useState)(""),[rO,rq]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=!1;try{let e=JSON.parse(localStorage.getItem(eB)||"null");Array.isArray(e)&&e.length>0&&(rF(e),rR(!1))}catch(e){}return eE().then(t=>{if(e||!Array.isArray(null==t?void 0:t.categories))return;let r=eF(t);rF(r);try{localStorage.setItem(eB,JSON.stringify(r))}catch(e){}}).catch(e=>{console.warn("Trending looks fetch failed:",(null==e?void 0:e.message)||e)}).finally(()=>{e||rR(!1)}),()=>{e=!0}},[]);let rG=(0,i.useRef)(null),rz=(0,i.useRef)(null),rV=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=()=>{var e,t;let r=rV.current;r&&!r.destroyed&&"visible"===document.visibilityState&&(null==(e=r.autoplay)||e.stop(),r.slideToLoop(r.realIndex,0,!1),null==(t=r.autoplay)||t.start())};return window.addEventListener("pageshow",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("pageshow",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[]);let rJ=(0,i.useMemo)(()=>{var e,t,r;let l=-1;for(let t=e$.length-1;t>=0;t-=1)if((null==(e=e$[t])?void 0:e.type)==="user"){l=t;break}if(-1===l){for(let e=e$.length-1;e>=0;e-=1)if((null==(t=e$[e])?void 0:t.type)==="bot")return e$[e].id;return null}for(let e=l+1;e<e$.length;e+=1)if((null==(r=e$[e])?void 0:r.type)==="bot")return e$[e].id;return null},[e$]),r$=(0,i.useMemo)(()=>{let e=new Set,t=[];for(let a of e$){var r,l,i;if((null==a?void 0:a.type)!=="bot")continue;let n=ej(null==(r=a.layout)?void 0:r.stylist_layout_blocks);for(let r of eg({products:null==(l=a.layout)?void 0:l.products,productsByVibe:null==(i=a.layout)?void 0:i.products_by_vibe,layoutBlocks:n})){let l=String((null==r?void 0:r.product_id)||"").trim();!l||e.has(l)||(e.add(l),t.push(l))}}return t},[e$]),rK=e=>"https://images.unsplash.com/photo-".concat(e,"?auto=format&fit=crop&w=500&h=360&q=80"),rH=[{label:"Find me an outfit",subtitle:"Outfits picked just for you",image:rK("1490481651871-ab68de25d43d"),fallback:"/home_page/women03.jpeg",icon:"mdi:account-tie-outline",accent:"#8f00ff",onClick:()=>rA("Find me an outfit")},{label:"Instant Shopping Suggestions",subtitle:"Shop smarter, right now",image:rK("1483985988355-763728e1935b"),fallback:"/home_page/men01.jpeg",icon:"mdi:lightning-bolt-outline",accent:"#f59e0b",onClick:()=>rA("Give me instant shopping suggestions")},{label:"Color analysis",subtitle:"Analyze best colors for your skin tone",image:rK("1469334031218-e382a71b716b"),fallback:"/home_page/women02.jpg",icon:"mdi:hanger",accent:"#ec4899",onClick:()=>rA("Help me with color analysis")},{label:"Book styling session",subtitle:"20% Discount",image:rK("1558769132-cb1aea458c5e"),fallback:"/home_page/men04.jpeg",icon:"mdi:calendar-star",accent:"#14b8a6",onClick:()=>rx()},{label:"Get the mobile app",subtitle:"Download on the App Store",image:"/mobile_app/IMG_0981-p
1ortrait.png",imageClassName:"object-cover object-top bg-gradient-to-br from-[#8f00ff] to-[#c86bff]",icon:"mdi:apple",accent:"#111827",onClick:()=>rQ("mobile_app")}],rW=e=>{let t=e.href?{href:e.href,target:"_blank",rel:"noopener noreferrer"}:{type:"button",onClick:e.onClick,disabled:e6},r=e.href?"a":"button";return(0,l.jsxs)(r,{...t,style:{"--accent":e.accent},className:"group relative flex h-[140px] w-full flex-col overflow-hidden rounded-2xl border border-gray-200/80 bg-white text-left shadow-sm transition-all duration-300 hover:-translate-y-1 hover:border-[color:var(--accent)]/40 hover:shadow-[0_14px_30px_-10px_var(--accent)] active:translate-y-0 disabled:opacity-60 sm:h-full",children:[(0,l.jsxs)("div",{className:"relative h-20 sm:h-28 overflow-hidden bg-gray-100 w-full",children:[(0,l.jsx)("img",{src:e.image,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:t=>{e.fallback&&t.currentTarget.src!==e.fallback&&(t.currentTarget.src=e.fallback)},className:"h-full w-full transition-transform duration-500 group-hover:scale-110 ".concat(e.imageClassName||"object-cover object-center")}),(0,l.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/55 via-black/10 to-transparent"}),(0,l.jsx)("span",{className:"absolute left-2 top-2 inline-flex h-7 w-7 items-center justify-center rounded-full bg-white/95 shadow-sm ring-1 ring-black/5 backdrop-blur",style:{color:e.accent},children:(0,l.jsx)(c.Icon,{icon:e.icon,width:16})})]}),(0,l.jsxs)("div",{className:"relative flex flex-1 items-start justify-between p-1.5 sm:p-2",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"line-clamp-2 font-poppins text-[13.5px] font-semibold leading-snug text-gray-900",children:e.label}),(0,l.jsx)("p",{className:"line-clamp-2 mt-0.5 font-poppins text-[11.5px] leading-snug text-gray-500",children:e.subt
1itle})]}),(0,l.jsx)(c.Icon,{icon:"mdi:arrow-top-right",width:20,className:"mt-0.5 bg-white rounded-full p-1 absolute -top-6 right-2 shrink-0 text-gray-800 transition-all duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5 group-hover:text-[color:var(--accent)]"})]})]},e.label)},rY=["/home_page/women03.jpeg","/home_page/men01.jpeg","/home_page/women02.jpg","/home_page/men04.jpeg"],rZ=rE.find(e=>e.label===rU)||rE[0],rQ=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=new URLSearchParams({utm_source:"stylebuddy.in",utm_medium:"chat_landing",utm_campaign:e,source_page:window.location.pathname});t&&r.set("utm_content",t),window.location.href="/get-app?".concat(r.toString())},rX=(0,D.K)(eS.show),r0=(0,D.K)(rj.show&&!rk),r1=(0,D.K)(tE),r2=(0,D.K)(tL.open);return(0,i.useEffect)(()=>V(),[]),(0,l.jsx)(N.qf,{productIds:r$,enabled:!r,children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n @keyframes chatBotMsgIn {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes chatUserMsgIn {\n from { opacity: 0; transform: translateX(12px); }\n to { opacity: 1; transform: translateX(0); }\n }\n @keyframes typingWave {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }\n 30% { transform: translateY(-5px); opacity: 1; }\n }\n .chat-bot-msg { animation: chatBotMsgIn 0.25s ease-out both; }\n .chat-user-msg { animation: chatUserMsgIn 0.2s ease-out both; }\n .chat-loading { animation: chatBotMsgIn 0.2s ease-out both; }\n .landing-chips-swiper .swiper-wrapper { transition-timing-function: linear; }\n "}),rX?(0,l.jsx)(J,{show:eS.show,message:eS.message,type:eS.type,onClose:()=>eA({show:!1,message:"",type:"error"}),onConfirm:eS.onConfirm,isLoading:eL}):null,r0?(0,l.jsx)($,{show:rj.show&&!rk,question:rj.question,onClose:rS,onSend:rN,isLoading:e6,theme:"light",agentName:"Maya"}):null,r1?(0,l.jsx)(K,{show:tE,onClose:()=>tF(!1),onUnlock:()=>{if(tF(!1),v)return void v()}}):null,r2?(0,l.jsx)(H,{open:tL.open,onClose:()=>tR({open:!1,serviceInterest:"",serviceTitle:"",serviceSlug:""}),serviceInterest:tL.serviceInterest,serviceTitle:tL.serviceTitle,serviceSlug:tL.serviceSlug,allowedCatalogSlugs:et,onGuestRegister:v,onGuestLogin:j,onAuthSuccess:B}):null,(0,l.jsxs)(d.lG,{open:tM.show,as:"div",className:"relative z-[99999] focus:outline-none",onClose:t8,children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm","aria-hidden":"true"}),(0,l.jsx)("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center p-4",children:(0,l.jsx)(d.Lj,{className:"w-full max-w-md max-h-[90vh] overflow-y-auto no-scrollbar roun
1ded-2xl border border-gray-200 bg-white p-6 shadow-2xl shadow-gray-200",children:(0,l.jsx)(W,{context:"turn_dislike",showComment:!0,commentLabel:"Anything else you'd like to add?",commentPlaceholder:"e.g. Products weren't relevant, tone felt offâ¦",submitting:tz,onCancel:t8,onSubmit:t6,requiredCount:2},tM.turnId||"dislike")})})]}),(0,l.jsxs)(d.lG,{open:tB,as:"div",className:"relative z-[99999] focus:outline-none",onClose:()=>!tJ&&tP(!1),children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm","aria-hidden":"true"}),(0,l.jsx)("div",{className:"fixed inset-0 z-[99999] flex items-center justify-center p-4",children:(0,l.jsx)(d.Lj,{className:"w-full max-w-md max-h-[90vh] overflow-y-auto no-scrollbar rounded-2xl border border-gray-200 bg-white p-6 shadow-2xl shadow-gray-200",children:(0,l.jsx)(W,{context:"overall",icon:"mdi:message-star-outline",iconTone:"purple",submitting:tJ,onCancel:()=>tP(!1),onSubmit:t7,submitLabel:"Submit feedback"},tB?"overall-open":"overall-closed")})})]}),tK?(0,l.jsx)("div",{className:"fixed bottom-24 left-1/2 z-[99998] -translate-x-1/2 rounded-xl border border-gray-200 bg-white text-gray-800 px-4 py-2.5 text-sm shadow-xl font-poppins",children:tK}):null,(0,l.jsxs)("div",{className:"overflow-hidden flex min-h-0 min-w-0 w-full flex-1 flex-col font-poppins max-w-6xl mx-auto ",children:[(0,l.jsxs)("div",{className:"mx-auto flex flex-1 min-h-0 min-w-0 w-full max-w-[min(100%,100rem)] flex-col bg-white shadow-[0_4px_24px_rgba(0,0,0,0.08)] ".concat(rP?"overflow-hidden":"overflow-y-auto no-scrollbar sm:justify-center sm:overflow-hidden"),children:[(0,l.jsxs)("div",{className:"shrink-0 items-center justify-between px-2 sm:px-5 py-2 sm:py-3 border-b border-gray-200 bg-white ".concat(rP?"flex":"hidden"),children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"relative shrink-0",children:[(0,l.jsx)("div",{className:"w-6 h-6 sm:w-9 sm:h-9 rounded-full bg-gray-100 border border-gray-200 flex items-center justify-center shadow-sm",children:(0,l.jsx)("img",{src:"/home_page/botImage.png",className:"w-full h-full object-contain",alt:""})}),(0,l.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-green-500 border-2 border-white shadow shadow-green-500/40"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"font-poppins text-xs sm:text-[15px] font-semibold text-gray-900 leading-tight",children:"Maya"}),(0,l.jsx)("p",{className:"text-[9px] sm:text-[11px] text-green-600 font-poppins leading-tight",children:"Online \xb7 AI Stylist"}),(0,l.jsx)(y.A,{theme:"light",status:tw.status,label:tw.label})]})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>{e1()||tP(!0)},className:"shrink-0 inline-flex items-center gap-1.5 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-[10px] font-medium text-gray-600 hover:bg-gray-100 hover:border-gray-300 transition-all font-poppins sm:text-sm sm:px-4 sm:py-2",children:[(0,l.jsx)(c.Icon,{icon:"mdi:message-star-outline",width:16}),(0,l.jsx)("span",{className:"hidden xs:inline sm:inline",children:"Provide feedback"}),(0,l.jsx)("span",{className:"xs:hidden sm:hidden",children:"Feedback"})]})]}),(0,l.jsxs)("div",{ref:tr,className:"relative min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden bg-transparent px-3 py-4 sm:px-6 sm:py-5 [scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.1)_transparent] ".concat(rP?"":"hidden"),children:[e$.map(e=>{var t,i,a,n,s;return(0,l.jsx)("div",{ref:e.id===rJ?ti:null,className:"mb-4 w-full min-w-0 scroll-mt-4 sm:scroll-mt-6 ".concat("bot"===e.type?"pt-1 chat-bot-msg":"chat-user-msg"),children:"bot"===e.type?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"botmsg flex w-full min-w-0 items-start gap-3",children:[U(e)?(0,l.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[#8f00ff]/10 text-[#8f00ff] shadow-sm",children:(0,l.jsx)(c.Icon,{icon:"mdi:sparkles",width:16})}):(0,l.jsx)("div",{className:"shrink-0 w-8 h-8 rounded-full flex items-center justify-center shadow-md",children:(0,l.jsx)("img",{src:"/home_page/botImage.png",alt:"Stylist",className:"w-9 h-9 relative drop-shadow-lg object-contain"})}),(0,l.jsx)("div",{className:"min-w-0 flex-1 max-w-full text-gray-900 ".concat(U(e)?"rounded-2xl border border-[#8f00ff]/15 bg-gradient-to-br from-[#faf8ff] via-white to-[#fffdf8] px-4 py-4 shadow-sm sm:px-5":""),children:(0,l.jsx)("div",{className:"flex flex-col gap-2 w-full min-w-0",children:(0,l.jsx)("div",{className:"w-full min-w-0",children:(()=>{var t,i,a,n,s,o,d,u,p,g,m,h,f;let y=Array.isArray(null==(t=e.layout)?void 0:t.products_by_vibe)&&e.layout.products_by_vibe.some(e=>Array.isArray(null==e?void 0:e.products)&&e.products.length>0),x=ek(ej(null==(i=e.layout)?void 0:i.stylist_layout_blocks)).some(e=>!!e&&("product_grid"===e.type?Array.isArray(e.products)&&e.products.length>0:"video_grid"===e.type?Array.isArray(e.videos)&&e.videos.length>0:"section_title"===e.type||"vibe_line"===e.type||"rich_list"===e.type||"paragraph"===e.type||"stylist_question"===e.type||"divi
1der"===e.type)),b=x?"":e_(e.text,y),v="no_links"===b||"string"==typeof b&&""!==b.trim();return(0,l.jsxs)(l.Fragment,{children:[!0===e.showBotname&&(0,l.jsxs)("div",{className:"font-bold text-gray-900 text-[17px] mb-2.5 font-poppins flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 inline-block animate-pulse"}),"Maya"]}),"no_links"===b?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"text-sm leading-relaxed mb-2 whitespace-pre-line break-words text-left text-gray-800 font-poppins",children:"Sure, you can find and explore 1000s of free fashion products in the shopping assistant feature"}),(0,l.jsxs)(w(),{href:"/shopping-assistant",className:"inline-flex items-center gap-1.5 bg-gray-900 text-white font-semibold px-5 py-2 rounded-full text-center text-sm mt-2 hover:bg-gray-800 transition-all",children:["Explore"," ",(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:14})]})]}):v?(0,l.jsx)(q,{as:"p",text:b,variant:"b2c",theme:"light",className:"text-sm leading-relaxed mb-1 text-left text-gray-800 font-poppins"}):null,(0,l.jsx)(G,{message:e,theme:"light",onEditStylePreferences:tv,onEditChatPreferences:tb}),(0,l.jsx)(el,{products:null==(a=e.layout)?void 0:a.selected_product_picks,pairs:null==(n=e.layout)?void 0:n.selected_product_pairs,turnId:e.turn_id,onProductLinkClick:t5}),(0,l.jsx)(eh,{turnId:e.turn_id,products:null==(s=e.layout)?void 0:s.products,productsByVibe:null==(o=e.layout)?void 0:o.products_by_vibe,layoutBlocks:ej(null==(d=e.layout)?void 0:d.stylist_layout_blocks)}),(0,l.jsx)(eC,{className:v?"mt-5":"",blocks:ej(null==(u=e.layout)?void 0:u.stylist_layout_blocks),turnId:e.turn_id,onProductLinkClick:t5,onVideoLinkClick:t4,userBudgetInr:null!=(h=null==(p=e.layout)?void 0:p.user_budget_inr)?h:null,sessionId:ey(),messageVariant:"b2c",messageTheme:"light",isProductSaved:e9,onProductSaved:e8,onRequireAuth:r?e3:null,isProductSelected:t0,onToggleProductSelect:tQ,selectionLimitReached:tD.length>=6}),x?null:(0,l.jsx)(eN,{groups:null==(g=e.layout)?void 0:g.products_by_vibe,fallbackText:e.text,turnId:e.turn_id,onProductLinkClick:t5,userBudgetInr:null!=(f=null==(m=e.layout)?void 0:m.user_budget_inr)?f:null,sessionId:ey(),isProductSaved:e9,onProductSaved:e8,onRequireAuth:r?e3:null,isProductSelected:t0,onToggleProductSelect:tQ,selectionLimitReached:tD.length>=6}),e.stylingServicesBlock?(0,l.jsx)(z,{blockType:e.stylingServicesBlock,serviceSlug:e.stylingServiceSlug,serviceSlugs:e.stylingServiceSlugs,allowedCatalogSlugs:et,catalogVariant:e.stylingServicesCatalogVariant,hidePricing:X||Array.isArray(et)&&et.length>0,onSelectService:rb,onBookService:rv,onBackToCatalog:"detail"===e.stylingServicesBlock?rw:void 0}):null]})})()})})})]}),e.turn_id?(0,l.jsxs)("div",{className:"ml-14 mt-2.5 flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] text-gray-400 font-poppins",children:"Was this helpful?"}),(0,l.jsx)("button",{type:"button","aria-label":"Like response",onClick:()=>t2(e.turn_id,"like"),className:"rounded-lg p-1.5 transition-all ".concat("like"===e.feedback?"bg-green-100 text-green-600":"text-gray-400 hover:bg-gray-100 hover:text-gray-700"),children:(0,l.jsx)(c.Icon,{icon:"mdi:thumb-up-outline",width:16})}),(0,l.jsx)("button",{type:"button","aria-label":"Dislike response",onClick:()=>{"dislike"!==e.feedback&&t9(e.turn_id)},className:"rounded-lg p-1.5 transition-all ".concat("dislike"===e.feedback?"bg-rose-100 text-rose-500":"text-gray-400 hover:bg-rose-50 hover:text-rose-500"),children:(0,l.jsx)(c.Icon,{icon:"mdi:thumb-down-outline",width:16})})]}):null,Array.isArray(null==(t=e.layout)?void 0:t.images)&&e.layout.images.length>0?Array.isArray(null==(i=e.layout)?void 0:i.outfits_list)&&e.layout.outfits_list.length>0?(0,l.jsx)("div",{className:"overflow-x-auto no-scrollbar",children:(0,l.jsx)("div",{className:"flex w-max gap-5 mt-4 ml-14",children:e.layout.outfits_list.map((t,r)=>{var i,a;let n="".concat(e.id,"_").concat(r),s=re(null==(a=e.layout)||null==(i=a.images)?void 0:i[r]),o=rt(t_[n]),c=s||o,d=!!tj[n];return(0,l.jsx)("div",{className:"flex flex-col items-center justify-center ".concat(c?"":"gap-2 w-[220px] p-5 rounded-2xl border border-purple-500/20 bg-[#130d1a]"),children:c?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{src:c,alt:"Outfit ".concat(r+1),className:"w-40 h-40 object-contain rounded-2xl cursor-pointer border border-purple-500/20 hover:border-purple-400/40 transition-all",onClick:()=>{eq({image:c,title:t}),eD(!0)}}),(0,l.jsx)("p",{className:"text-xs text-center text-white/70 font-poppins w-40 overflow-hidden text-ellipsis whitespace-nowrap pt-2",children:t}),(0,l.jsx)("a",{href:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(c)),target:"_blank",rel:"noopener noreferrer",onClick:r=>t3(r,{turnId:e.turn_id,lookTitle:t,imageUrl:c,destinationUrl:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(c))}),className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-semibold rounded-full bg-gradient-to-r from-purple-600 to-violet-600 text-white mt-2 hover:from-purple-500 hover:to-violet-500 shadow-lg shadow-purple-900/30 transition-all",children:"Search & Buy"})]}):(0,l.jsx)(l.Fragment,{children:d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:"w-12 rounded-full",src:"/chatloading.gif",alt:"Loading Image"}),(0,l.jsx)("p",{className:"text-sm text-white/60 font-poppins",children:"Generating..."})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{className:"px-5 py-2.5 font-semibold text-sm rounded-full bg-purple-500/15 border border-purple-500/30 text-purple-300 hover:bg-purple-500/25 transition-all cursor-pointer font-poppins",disabled:d,onClick:()=>rB(t,n),children:"Generate Image ".concat(r+1)}),(0,l.jsx)("p",{className:"text-xs mt-2 text-center text-white/60 font-poppins",children:t})]})})},n)})})}):(0,l.jsx)("div",{className:"overflow-x-auto no-scrollbar",children:(0,l.jsx)("div",{className:"flex w-max gap-5 mt-4 ml-14",children:e.layout.images.map((t,r)=>{let i="".concat(e.id,"_").concat(r),a=re(t);return a?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)("img",{src:a,alt:"Image ".concat(r+1),className:"w-40 h-40 object-contain rounded-2xl cursor-pointer border border-purple-500/20 hover:border-purple-400/40 transition-all",onClick:()=>{eq({image:a,title:""}),eD(!0)}}),(0,l.jsx)("a",{href:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(a)),target:"_blank",rel:"noopener noreferrer",onClick:t=>t3(t,{turnId:e.turn_id,lookTitle:"Look ".concat(r+1),imageUrl:a,destinationUrl:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(a))}),className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-semibold rounded-full bg-gradient-to-r from-purple-600 to-violet-600 text-white mt-2 hover:from-purple-500 hover:to-violet-500 shadow-lg shadow-purple-900/30 transition-all",children:"Search & Buy"})]},i):null})})}):Array.isArray(null==(a=e.layout)?void 0:a.outfits_list)&&e.layout.outfits_list.length>0&&(!Array.isArray(null==(n=e.layout)?void 0:n.products)||0===e.layout.products.length)&&(0,l.jsx)("div",{className:"overflow-x-auto no-scrollbar",children:(0,l.jsx)("div",{className:"flex w-max gap-5 mt-4 ml-14",children:e.layout.outfits_list.map((t,r)=>{let i="".concat(e.id,"_").concat(r),a=rt(t_[i]),n=!!tj[i];return(0,l.jsx)("div",{className:"flex flex-col items-center justify-center ".concat(a?"":"gap-2 w-[220px] p-5 rounded-2xl border border-purple-500/20 bg-[#130d1a]"),children:a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{src:a,alt:"Outfit ".concat(r+1),className:"w-40 h-40 object-contain rounded-2xl cursor-pointer border border-purple-500/20 hover:border-purple-400/40 transition-all",onClick:()=>{eq({image:a,title:t}),eD(!0)}}),(0,l.jsx)("p",{className:"text-xs text-center text-white/70 font-poppins w-40 overflow-hidden text-ellipsis whitespace-nowrap pt-2",children:t}),(0,l.jsx)("a",{href:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(a)),target:"_blank",rel:"noopener noreferrer",onClick:r=>t3(r,{turnId:e.turn_id,lookTitle:t,imageUrl:a,destinationUrl:"https://lens.google.com/uploadbyurl?url=".concat(encodeURIComponent(a))}),className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-semibold rounded-full bg-gradient-to-r from-purple-600 to-violet-600 text-white mt-2 hover:from-purple-500 hover:to-violet-500 shadow-lg shadow-purple-900/30 transition-all",children:"Search & Buy"})]}):(0,l.jsx)(l.Fragment,{children:n?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:"w-12 rounded-full",src:"/chatloading.gif",alt:"Loading Image"}),(0,l.jsx)("p",{className:"text-sm text-white/60 font-poppins",children:"Generating..."})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{className:"px-5 py-2.5 font-semibold text-sm rounded-full bg-purple-500/15 border border-purple-500/30 text-purple-300 hover:bg-purple-500/25 transition-all cursor-pointer font-poppins",disabled:n,onClick:()=>rB(t,i),children:"Generate Image ".concat(r+1)}),(0,l.jsx)("p",{className:"text-xs mt-2 text-center text-white/60 font-poppins",children:t})]})})},i)})})})]}):(0,l.jsx)("div",{className:"usermsg flex w-full min-w-0 items-end justify-end gap-2.5",children:(0,l.jsxs)("div",{className:"bg-gray-900 text-white px-4 py-3 rounded-2xl w-fit max-w-[85%] sm:max-w-3xl shadow-sm",children:[e.imagePreview?(0,l.jsx)("img",{src:e.imagePreview,alt:"Uploaded",className:"mb-2 max-w-[180px] max-h-[180px] rounded-xl object-cover border border-white/20",onLoad:()=>{tl.current?tl.current.scrollIntoView({behavior:"smooth",block:"nearest"}):tr.current&&tr.current.scrollTo({top:tr.current.scrollHeight,behavior:"smooth"})}}):null,(null==(s=e.text)?void 0:s.trim())?(0,l.jsx)("p",{className:"text-sm leading-relaxed break-words text-left font-poppins",children:e.text}):null,(0,l.jsx)(er,{products:e.selectedProducts})]})})},e.id)}),e6?(0,l.jsxs)("div",{ref:tl,className:"mb-6 flex w-full min-w-0 items-start gap-3 chat-loading",children:[(0,l.jsx)("div",{className:"shrink-0 w-8 h-8 rounded-full flex items-center justify-center shadow-md",children:(0,l.jsx)("img",{src:"/home_page/botImage.png",alt:"Maya",className:"w-full h-full object-contain"})}),(0,l.jsxs)("div",{className:"rounded-2xl bg-gray-100 border border-gray-200 py-4 px-5 shadow-sm",children:[te?(0,l.jsx)("p",{className:"text-[12px] text-gray-500 font-poppins mb-3 font-medium",children:te}):null,(0,l.jsx)(eT,{})]})]}):null]}),rP?null:(0,l.jsxs)("div",{"data-maya-landing":!0,className:"hidden shrink-0 px-4 py-2 sm:block",children:[(0,l.jsxs)("h1",{className:"text-center font-poppins text-2xl sm:text-[32px] font-semibold text-gray-900 leading-none",children:["Welcome to StyleBuddy",!eo&&","," ",eo&&(0,l.jsx)("br",{className:"sm:hidden"}),eo?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("span",{className:"bg-gradient-to-r from-[#8f00ff] to-[#c86bff] bg-clip-text text-transparent",children:eo})}):null,eo&&",",eo&&(0,l.jsx)("br",{className:"="}),"how can we help you?"]}),(0,l.jsx)("p",{className:"mt-2 text-center font-poppins text-[13px] sm:text-sm text-gray-500",children:"Get more Stylish & fashionable"}),(0,l.jsx)("div",{className:"mx-auto mt-5 grid w-full max-w-5xl grid-cols-5 ga
1p-3.5",children:rH.map(e=>rW(e))})]}),rP?null:(0,l.jsxs)("section",{"data-maya-landing":!0,className:"sm:hidden relative isolate flex min-h-[540px] shrink-0 flex-col justify-end overflow-hidden px-4 pb-12 pt-24",children:[(0,l.jsx)(a.default,{src:"/homepage.webp",alt:"",fill:!0,priority:!0,sizes:"100vw",className:"-z-10 object-cover object-[50%_30%]"}),(0,l.jsxs)("div",{className:"mx-auto w-full max-w-3xl text-center text-white pt-12",children:[(0,l.jsxs)("h1",{className:"font-playfair text-[42px] font-semibold leading-[1.02] drop-shadow-md",children:["Your Style Story",(0,l.jsx)("br",{}),"Starts here"]}),(0,l.jsx)("p",{className:"mx-auto mt-3 max-w-md font-poppins text-[14px] leading-snug text-white/95",children:"Discover 10k+ Brands, Expert Stylists & looks for every occasion, anywhere in the world"}),(0,l.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>tc(!0),className:"flex flex-1 max-w-[220px] items-center justify-between gap-2 rounded-full bg-white px-2 py-3 font-poppins text-[12px] font-medium text-gray-900 shadow-md transition hover:bg-gray-50",children:[(0,l.jsxs)("span",{className:"flex items-center",children:[(0,l.jsx)(c.Icon,{icon:"mdi:lightning-bolt-outline",width:16,className:"text-amber-500"}),"Chat with Maya"]}),(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:16})]}),(0,l.jsxs)("button",{type:"button",onClick:()=>rQ("explore_looks"),className:"flex flex-1 max-w-[220px] items-center justify-between gap-2 rounded-full border-2 border-white/90 px-2 py-[9px] font-poppins text-[12px] font-medium text-white backdrop-blur-[1px] transition hover:bg-white/10",children:["Explore Looks",(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:20})]})]}),(0,l.jsx)("div",{className:"-mx-4 mt-8",children:(0,l.jsx)(s.RC,{modules:[o.Ij,o.U1],slidesPerView:"auto",spaceBetween:8,loop:!0,freeMode:!0,speed:3e3,autoplay:{delay:0,disableOnInteraction:!1,pauseOnMouseEnter:!1},grabCursor:!0,onSwiper:e=>{rV.current=e},className:"landing-chips-swiper",children:[...rH,...rH].map((e,t)=>(0,l.jsx)(s.qr,{style:{width:"auto"},children:(0,l.jsx)("button",{type:"button",disabled:e6&&!e.href,onClick:()=>{var t;return e.href?rQ("quick_action_chip"):null==(t=e.onClick)?void 0:t.call(e)},className:"whitespace-nowrap rounded-full border border-white/70 bg-black/10 px-3.5 py-1.5 font-poppins text-[10px] text-white backdrop-blur-[2px] transition hover:bg-white/15 disabled:opacity-60",children:e.label})},"".concat(e.label,"-").concat(t)))})}),(0,l.jsxs)("form",{onSubmit:e=>rM(e),className:"mt-3 flex items-center gap-2 rounded-full bg-white py-1.5 pl-5 pr-1.5 shadow-lg",children:[(0,l.jsx)("input",{ref:rz,type:"text",value:eV,onChange:e=>eJ(e.target.value),onFocus:()=>{r&&!(0,I.T6)("")&&e5()},disabled:e6,placeholder:e6?"Please wait...":"Ask Maya anything about fashionâ¦",className:"min-w-0 flex-1 bg-transparent py-2 font-poppins text-[15px] text-gray-900 placeholder:text-gray-500 focus:outline-none disabled:opacity-60"}),(0,l.jsx)("button",{type:"submit",disabled:e6,"aria-label":"Send message",className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#f07272] text-white shadow-md transition hover:bg-[#e85f5f] disabled:opacity-50",children:(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:24})})]})]})]}),(0,l.jsxs)("div",{className:"relative shrink-0 px-1 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 bg-white sm:px-4 sm:pb-1 ".concat(rP?"border-t border-gray-200":"hidden sm:block"),children:[(0,l.jsx)("input",{ref:eH,type:"file",accept:"image/*",className:"hidden",onChange:rp}),(0,l.jsx)(h.X,{suggestions:eX,isLoading:e6,onSelect:rC,onClose:()=>e0([]),label:(0,k.Fs)(eG).uploadPhotoSuggestionsLabel||"Try with your photo"}),(0,l.jsx)(m.V,{message:eV,setMessage:eJ,isLoading:e6,isFocused:ev,setIsFocused:ew,messagesHistory:e$}),(0,l.jsx)(S.Ay,{settings:tW,onChange:ri,disabled:e6,expanded:tf,onExpandedChange:ty,panelRef:th}),tD.length>0?(0,l.jsxs)("div",{className:"mb-3 w-full max-w-3xl rounded-2xl border border-[#8f00ff]/30 bg-[#8f00ff]/5 px-3 py-2.5 shadow-sm",children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,l.jsxs)("p",{className:"text-xs font-semibold text-gray-800 font-poppins",children:["Selected for your question (",tD.length,"/",6,")"]}),(0,l.jsx)("button",{type:"button",onClick:()=>tO([]),className:"rounded-lg px-2 py-0.5 text-[11px] font-medium text-[#8f00ff] hover:bg-[#8f00ff]/10 font-poppins",children:"Clear all"})]}),(0,l.jsx)("div",{className:"flex gap-2.5 overflow-x-auto pb-1",children:tD.map(e=>(0,l.jsxs)("div",{className:"relative shrink-0 w-12 h-15 rounded-xl overflow-hidden border-2 border-[#8f00ff]/35 bg-white shadow-sm",children:[e.image?(0,l.jsx)("img",{src:e.image,alt:"",className:"w-full h-full object-fill object-center"}):(0,l.jsx)("div",{className:"w-full h-full bg-gray-100"}),(0,l.jsx)("button",{type:"button","aria-label":"Remove ".concat(e.name||"selected product"),onClick:()=>tX(e.product_id),className:"absolute top-1 right-1 flex h-4 w-4 items-center justify-center rounded-full border-2 border-white bg-rose-500 text-white shadow-md transition hover:bg-rose-600",children:(0,l.jsx)(c.Icon,{icon:"mdi:close",className:"w-2 sm:w-4"})})]},e.product_id))}),(0,l.jsx)("p",{className:"mt-2 text-[10px] sm:text-[11px] text-gray-500 font-poppins",children:"Ask anything about these picks â pairing, similar options, styling tips, and more."})]}):null,(0,l.jsxs)("div",{className:"rounded-2xl border transition-all duration-200 bg-gray-100 ".concat(ev?"border-gray-500 bg-gray-50 shadow-[0_0_0_2px_rgba(0,0,0,0.08)]":"border-gray-300 hover:border-gray-400"),children:[eZ?(0,l.jsxs)("div",{className:"mx-3 mt-3 flex items-center gap-2.5 bg-gray-50 border border-gray-200 rounded-xl px-3 py-2",children:[(0,l.jsx)("img",{src:eZ,alt:"uploaded preview",className:"w-9 h-9 rounded-lg object-cover border border-gray-300"}),(0,l.jsx)("span",{className:"text-xs text-gray-600 font-poppins flex-1 truncate",children:"Photo attached"}),(0,l.jsxs)("button",{type:"button",onClick:rg,className:"text-[11px] px-2 py-0.5 rounded-lg border border-rose-500/30 text-rose-400/70 hover:bg-rose-500/10 transition-all font-poppins flex items-center gap-1",children:[(0,l.jsx)(c.Icon,{icon:"mdi:close",width:11})," Remove"]})]}):null,(0,l.jsx)("textarea",{ref:ts,value:eV,onChange:e=>{eJ(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},placeholder:e6?"Please wait...":"Ask Maya anything about fashionâ¦",className:"w-full bg-transparent px-4 pt-3.5 pb-2 text-gray-900 text-sm placeholder:text-gray-500 focus:outline-none resize-none font-poppins sm:text-[14px] disabled:cursor-not-allowed disabled:opacity-60",style:{minHeight:"48px",maxHeight:"120px",overflowY:"auto"},rows:1,disabled:e6,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),rM(e))},onFocus:()=>{ew(!0),r&&!(0,I.T6)("")&&e5()},onBlur:()=>ew(!1)}),(0,l.jsxs)("div",{className:"items-center justify-between px-2.5 sm:pb-2.5 pt-1 ".concat(rP?"flex":"hidden sm:flex"),children:[(0,l.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,l.jsx)("button",{type:"button",onClick:()=>{var e;e1()||null==(e=eH.current)||e.click()},disabled:e6,className:"w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-gray-900 hover:bg-gray-100 transition-all disabled:opacity-30",title:"Upload image",children:(0,l.jsx)(c.Icon,{icon:"material-symbols:upload",className:"w-4.5 h-4.5"})}),(0,l.jsx)("button",{onClick:()=>ro("Are you sure you want to refresh the conversation?",()=>{rT(),eA({show:!1,message:"",type:"error"})}),disabled:e6,className:"w-8 h-8 rounded-lg flex items-center justify-center text-gray-500 hover:text-gray-900 hover:bg-gray-100 transition-all disabled:opacity-30",title:"New conversation",children:(0,l.jsx)(c.Icon,{icon:"material-symbols:refresh",className:"w-4.5 h-4.5"})}),(0,l.jsx)("button",{onClick:()=>{e6||tv()},title:"Edit Profile Preferences",className:"hidden sm:flex w-8 h-8 rounded-lg items-center justify-center text-gray-500 hover:text-gray-900 hover:bg-gray-100 transition-all",children:(0,l.jsx)(c.Icon,{icon:"mdi:tune-variant",className:"w-4.5 h-4.5"})}),(0,l.jsx)("div",{className:"gap-2 px-0.5 pb-1 pt-0",children:(0,l.jsx)(u.A,{value:eG,onChange:e=>{ez(e),localStorage.setItem("talkToMaya_language",JSON.stringify(e))},options:["English","Hindi","Telugu","Tamil","Malayalam","Kannada","Bhojpuri","Gujarati","Punjabi"],placeholder:"Select Language",disabled:e6,position:"top",borderColor:!1,width:"w-24",label_textColor:"text-gray-900",backgroundColor:"bg-gray-100",optionsColor:"bg-gray-200 text-gray-900"})})]}),(0,l.jsxs)("button",{onClick:e=>rM(e),disabled:e6,className:"flex items-center gap-1.5 px-4 py-1.5 rounded-xl bg-gray-900 hover:bg-gray-800 text-white text-sm font-semibold transition-all disabled:opacity-40 disabled:cursor-not-allowed font-poppins",title:"Send message",children:[(0,l.jsx)("span",{children:"Send"}),(0,l.jsx)(c.Icon,{icon:"mdi:send",className:"w-3.5 h-3.5"})]})]})]}),(0,l.jsx)("p",{className:"mt-2 text-center text-[8px] sm:text-[10px] text-gray-400 font-poppins",children:"AI stylists can make mistakes. Always verify important advice."})]}),rP?null:(0,l.jsx)("div",{"data-maya-landing":!0,className:"relative -mt-7 flex-1 shrink-0 rounded-t-[28px] sm:hidden bg-white px-3 pb-4 pt-5 sm:px-6",children:rL?(0,l.jsxs)("div",{className:"animate-pulse",children:[(0,l.jsx)("div",{className:"flex gap-5 border-b border-gray-100 px-1 pb-2",children:[64,110,56,72].map(e=>(0,l.jsx)("div",{className:"h-4 rounded bg-gray-200",style:{width:e}},e))}),(0,l.jsx)("div",{className:"mt-3 flex gap-3 overflow-hidden",children:Array.from({length:5}).map((e,t)=>(0,l.jsx)("div",{className:"h-[150px] w-[105px] shrink-0 rounded-lg bg-gray-200"},t))})]}):rZ?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex gap-5 overflow-x-auto no-scrollbar border-b border-gray-100 px-1",children:rE.map(e=>{let t=e.label===rZ.label;return(0,l.jsx)("button",{type:"button",onClick:()=>{var t;rD(e.label),null==(t=rG.current)||t.scrollTo({left:0})},className:"shrink-0 whitespace-nowrap border-b-2 pb-2 font-poppins text-sm sm:text-[15px] transition-colors ".concat(t?"border-gray-900 font-medium text-gray-900":"border-transparent text-gray-400 hover:text-gray-600"),children:e.label},e.label)})}),(0,l.jsxs)("div",{className:"relative mt-3 flex items-center gap-2",children:[(0,l.jsx)("div",{ref:rG,className:"flex min-w-0 flex-1 gap-3 overflow-x-auto no-scrollbar scroll-smooth snap-x",children:rZ.looks.map((e,t)=>(0,l.jsx)("button",{type:"button",onClick:()=>rq({image:e.image_url||e.original_image_url,fallback:rY[t%rY.length],label:rZ.label,alt:"".concat(rZ.label," look ").concat(t+1)}),className:"group relative h-[150px] w-[105px] shrink-0 snap-start overflow-hidden rounded-lg bg-gray-100 sm:h-[200px] sm:w-[140px]",children:(0,l.jsx)("img",{src:e.image_url||e.original_image_url,alt:"".concat(rZ.label," look ").concat(t+1),loading:t<3?"eager":"lazy",decoding:"async",referrerPolicy:"no-referrer",onError:e=>{let r=rY[t%rY.length];e.currentTarget.src.endsWith(r)||(e.currentTarget.src=r)},className:"h-full w-full object-cover object-center transition-transform duration-500 group-hover:scale-105"})},"".concat(rZ.label,"-").concat(e.id||t)))}),(0,l.jsx)("button",{type:"button","aria-label":"Scroll looks",onClick:()=>{var e;return null==(e=rG.current)?void 0:e.scrollBy({left:240,behavior:"smooth"})},className:"shrink-0 rounded-full p-1 text-gray-800 hover:bg-gray-100",children:(0,l.jsx)(c.Icon,{icon:"mdi:arrow-right",width:20})})]})]}):null})]}),rP?null:(0,l.jsx)(O.A,{onRegister:v})]}),(0,l.jsxs)(d.lG,{open:eI,as:"div",className:"relative z-[9999] focus:outline-none",onClose:()=>{eP(!1)},children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm"}),(0,l.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,l.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,l.jsxs)(d.Lj,{transition:!0,className:"w-full max-w-2xl max-h-[min(92vh,760px)] min-h-[520px] overflow-y-auto rounded-2xl bg-white p-5 sm:p-6 font-poppins duration-300 ease-out data-closed:transform-[scale(95%)] data-closed:opacity-0 shadow-2xl",children:[(0,l.jsxs)("div",{className:"flex justify-center relative",children:[(0,l.jsx)("h2",{className:"text-lg md:text-3xl font-bold mb-2 capitalize bg-gradient-to-r from-purple-600 to-violet-600 bg-clip-text text-transparent",children:"Edit Profile Preferences"}),(0,l.jsx)("button",{onClick:()=>eP(!1),className:"absolute top-0 right-0 w-8 h-8 rounded-full flex items-center justify-center text-gray-500 hover:bg-gray-100 hover:text-gray-700 transition-all cursor-pointer text-xl font-bold",children:"\xd7"})]}),(0,l.jsx)("div",{className:"flex flex-col items-center gap-3",children:(0,l.jsx)(Y,{seprate:!0,fetchdetails:async()=>{try{let e=await (0,g.LZ)({force:!0});!e||e.redirect||e.error||(es(e),ed((null==e?void 0:e.user_name)||(r?"Guest":"")))}catch(t){var e;console.warn("Profile refresh after save failed:",(null==t||null==(e=t.response)?void 0:e.status)||(null==t?void 0:t.message))}eP(!1)},setIsOptionsChanged:t,seprate_savebtn:!0,darktheme:!1,showPhysiqueSelector:!0})})]})})})]}),(0,l.jsxs)(d.lG,{open:eU,as:"div",className:"relative z-[9999] focus:outline-none",onClose:()=>eD(!1),children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black/85 backdrop-blur-md"}),(0,l.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,l.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,l.jsxs)(d.Lj,{transition:!0,className:"w-full max-w-lg overflow-y-auto rounded-2xl font-poppins duration-300 ease-out data-closed:transform-[scale(95%)] data-closed:opacity-0",children:[(0,l.jsx)("div",{className:"flex justify-end relative mb-3",children:(0,l.jsx)("button",{onClick:()=>eD(!1),className:"w-9 h-9 rounded-full flex items-center justify-center bg-white/10 hover:bg-white/20 text-white transition-all cursor-pointer border border-white/20",children:(0,l.jsx)(c.Icon,{icon:"mdi:close",width:18})})}),(0,l.jsxs)("div",{className:"flex flex-col items-center gap-4 mb-4",children:[(0,l.jsx)("img",{src:eO.image,alt:"Preview",className:"w-[300px] h-[258px] sm:w-[400px] sm:h-[400px] object-contain rounded-2xl border border-purple-500/20 shadow-2xl shadow-purple-900/30"}),eO.title?(0,l.jsx)("p",{className:"text-center text-white/80 font-poppins w-[85%] sm:w-[55%] text-sm",children:eO.title}):null]})]})})})]}),(0,l.jsxs)(d.lG,{open:!!rO,as:"div",className:"relative z-[9999] focus:outline-none",onClose:()=>rq(null),children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black/85"}),(0,l.jsx)("div",{className:"fixed inset-0 z-10 flex items-center justify-center p-4",children:(0,l.jsx)(d.Lj,{className:"relative h-full max-h-[72vh] aspect-9/16 max-w-full overflow-hidden rounded-3xl bg-gray-900 shadow-2xl",children:rO?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{src:rO.image,alt:rO.alt,referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.src.endsWith(rO.fallback)||(e.currentTarget.src=rO.fallback)},className:"h-full w-full object-cover object-center"}),(0,l.jsx)("button",{type:"button","aria-label":"Close preview",onClick:()=>rq(null),className:"absolute top-3 right-3 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-black/50 text-white backdrop-blur transition-colors hover:bg-black/70",children:(0,l.jsx)(c.Icon,{icon:"mdi:close",width:20})}),(0,l.jsx)("div",{className:"absolute inset-x-0 bottom-0 px-5 pb-6",children:(0,l.jsxs)("button",{type:"button",onClick:()=>rQ("trending_look",rO.label.toLowerCase().replace(/[^a-z0-9]+/g,"_")),className:"flex w-full cursor-pointer items-center justify-center gap-3 rounded-full bg-linear-to-r from-[#8e44d6] to-[#c0605a] px-6 py-4 font-poppins text-lg font-bold uppercase tracking-wide text-white shadow-xl transition-transform active:scale-95",children:[(0,l.jsx)(c.Icon,{icon:"mdi:auto-fix",width:24}),"Style On Me"]})})]}):null})})]})]})})}},94016:(e,t,r)=>{"use strict";r.d(t,{Bg:()=>p,kj:()=>o,uJ:()=>u,vC:()=>d,yJ:()=>n,zg:()=>c});var l=r(86461),i=r(76497);let a=l.If,n=["personal-styling-consultation","personal-shopper","workwear-styling","
1wedding-shopping-styling","ethnic-wear-styling","color-analysis"];function s(e){return Array.isArray(e)&&0!==e.length?e.map(e=>a.find(t=>t.slug===String(e||"").trim())).filter(Boolean):[]}function o(e,t){let r=String(e||"").trim();return(!Array.isArray(t)||0===t.length?s(n):s(t)).find(e=>e.slug===r)||null}function c(e){return Array.isArray(e)&&e.length>0}function d(){return s(n)}function u(e,t){return s(Array.isArray(e)&&e.length>0?e:n).filter(e=>!Array.isArray(t)||0===t.length||t.includes(e.slug))}function p(e,t){let r=o(e,t);if(!r)return null;let a=i.x[String(e||"").trim()]||null,n=String((null==a?void 0:a.tagline)||"").trim(),s=String((null==a?void 0:a.description)||r.shortSummary||"").trim(),c=String((null==a?void 0:a.image)||function(e){let t=String(e||"").trim();for(let e of l.jb){let r=(e.items||[]).find(e=>e.slug===t);if(null==r?void 0:r.image)return r.image}return""}(e)||"").trim(),d=Array.isArray(null==a?void 0:a.includes)?a.includes.filter(Boolean):[];return{slug:r.slug,title:r.title,tagline:n,description:s,image:c,includes:d}}}}]);
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.