PageSourceSearch

https://snd.in/_next/static/chunks/11-8e561691fe782b9f.js

js snd.in collected 2026-10-10 02:10:44 UTC 17,490 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11],{16149:function(e,s,t){t.d(s,{Z:function(){return g}});var r=t(5237),n=t(65358),l=t(48220),a=t(5065),i=t(6881),o=t(23646),c=t(98954),d=t(45630),u=t(55223),m=t(72593);function x(e){let{isOpen:s,onClose:t,redirectTo:n}=e,[l,c]=(0,i.useState)(1),[x,p]=(0,i.useState)(""),[h,f]=(0,i.useState)(""),[g,v]=(0,i.useState)(!1),[j,b]=(0,i.useState)(!1),[y,N]=(0,i.useState)(30),w=(0,u.useRouter)(),k=async()=>{v(!0);let e=await (0,o.TA)(x);v(!1),e.success?(c(2),b(!1),N(30)):alert(e.message)},_=async()=>{let e=n||"/my-account",s=await (0,o.KC)(x,h);if(!(null==s?void 0:s.success)){alert((null==s?void 0:s.message)||"OTP verification failed");return}try{let s=await (0,o.Su)(x,e);if(null==s?void 0:s.message){alert(s.message);return}if("/checkout"===e){c(3),w.refresh();return}if(null==s?void 0:s.ok){c(3),w.push(e),w.refresh();return}c(3)}catch(e){alert((null==e?void 0:e.message)||"OTP login failed")}};return((0,i.useEffect)(()=>{let e;return!j&&y>0?e=setInterval(()=>{N(e=>e-1)},1e3):0===y&&(b(!0),clearInterval(e)),()=>clearInterval(e)},[y,j]),s)?(0,r.jsx)("div",{className:"otp_overlay",children:(0,r.jsxs)("div",{className:"otp_modal",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("button",{onClick:t,className:"absolute top-4 right-4",children:"❌"}),1===l&&(0,r.jsxs)("div",{className:"space-y-5 ",children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(d.default,{src:"/assets/staranddaisy/logo.png",width:143,height:54,alt:"Logo",className:"logo__image "})}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px"},children:[(0,r.jsx)("span",{children:"\uD83C\uDDEE\uD83C\uDDF3 +91"}),(0,r.jsx)("input",{type:"text",placeholder:"Enter mobile number",value:x,onChange:e=>p(e.target.value),className:"otp_input text-base"})]}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{onClick:k,className:"otp_button",children:g?(0,r.jsx)(m.Z,{}):"Continue"})}),(0,r.jsx)("div",{className:"cursor-pointer",onClick:t,children:(0,r.jsx)("p",{style:{marginTop:"8px"},children:(0,r.jsx)("div",{children:"Signup with email"})})})]}),2===l&&(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(d.default,{src:"/assets/staranddaisy/logo.png",width:143,height:54,alt:"Logo",className:"logo__image "})}),(0,r.jsx)("p",{className:"font-medium",children:"Verify your account"}),(0,r.jsx)("p",{children:"Enter the verification code sent to your phone."}),(0,r.jsx)("div",{className:"flex justify-between mb-4",children:Array.from({length:6}).map((e,s)=>(0,r.jsx)("input",{type:"tel",inputMode:"numeric",pattern:"[0-9]*",maxLength:6,className:"otp_input text-center w-10 text-base",value:h[s]||"",id:"otp-".concat(s),onChange:e=>{let t=e.target.value.replace(/\D/g,"");if(6===t.length)f(t),setTimeout(()=>{let e=document.getElementById("otp-5");e&&e.focus()},30);else{t=t.charAt(0)||"";let e=h.split("");if(e[s]=t,f(e.join("").slice(0,6)),t&&s<5){let e=document.getElementById("otp-".concat(s+1));e&&e.focus()}}},onPaste:e=>{e.preventDefault();let s=e.clipboardData.getData("text").replace(/\D/g,"");6===s.length&&(f(s),setTimeout(()=>{let e=document.getElementById("otp-5");e&&e.focus()},30))},onKeyDown:e=>{if("Backspace"===e.key){let e=h.split("");if(e[s]="",f(e.join("")),s>0){let e=document.getElementById("otp-".concat(s-1));e&&e.focus()}}}},s))}),(0,r.jsx)("button",{onClick:_,className:"otp_button",children:"Submit"}),(0,r.jsxs)("p",{style:{marginTop:"8px"},children:["Haven’t received the otp? ",(0,r.jsx)("span",{children:(0,r.jsx)("button",{onClick:k,disabled:!j,style:{color:j?"blue":"gray",cursor:j?"pointer":"not-allowed"},children:j?"Send again":"Send again in ".concat(y,"s")})})]})]}),3===l&&(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(d.default,{src:"/assets/staranddaisy/logo.png",width:143,height:54,alt:"Logo",className:"logo__image "})}),(0,r.jsx)("div",{style:{marginBottom:"16px"},children:(0,r.jsx)("span",{style:{fontSize:"48px",color:"green"},children:"✓"})}),(0,r.jsx)("p",{className:"font-medium",children:"Account verified!"}),(0,r.jsx)("p",{className:"mb-2",children:"Welcome to Star And Daisy"}),(0,r.jsx)(a.default,{href:"/",className:"bg-[#007bff] text-white p-2",children:"Go to dashboard"})]})]})}):null}var p=t(69981);function h(){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})}function f(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"})})}function g(e){var s,t,d,g;let{redirectTo:v,onSuccess:j}=e,[b,y]=(0,i.useState)(!1),[N,w]=(0,i.useTransition)(),[k,_]=(0,i.useState)(!0),C=(0,i.useCallback)(()=>_(e=>!e),[]),S=(0,i.useCallback)(()=>y(e=>!e),[]),[L,Z]=(0,n.useFormState)(o.y,void 0),[T,D]=(0,i.useState)(!1),[F,E]=(0,i.useState)(!1),I=(0,u.useRouter)(),A=async e=>{E(!0);let s=null==e?void 0:e.credential;if(!s){E(!1),console.error("Google ID Token is missing");return}let t=v||"/my-account",r=new FormData;r.append("type","google"),r.append("idToken",s),r.append("redirectTo",t);try{let e=await (0,o.y)({},r);if(null==e?void 0:e.errors){console.error("Validation errors:",e.errors);return}if(null==e?void 0:e.message){console.error("Google Login failed:",e.message);return}if("/checkout"===t){I.refresh(),null==j||j();return}I.push(t),I.refresh()}catch(e){console.error("Error during Google Login:",e)}finally{E(!1)}};return(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-center text-gray-800 mb
1-4",children:"Login"}),(0,r.jsxs)("form",{onSubmit:e=>{let s=new FormData(e.currentTarget);s.append("type","password"),s.append("redirectTo",v||"/my-account"),e.preventDefault(),w(async()=>{await Z(s)})},className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block mb-1 text-gray-700 font-medium",htmlFor:"login-username",children:["Username or email address ",(0,r.jsx)("span",{className:"text-pink-600",children:"*"})]}),(0,r.jsx)("input",{id:"login-username",type:"text",className:(0,l.Z)("w-full px-4 py-3 border rounded-lg bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 transition",{"border-red-400":null==L?void 0:null===(s=L.errors)||void 0===s?void 0:s.username}),placeholder:"Enter your username or email",name:"username"}),(null==L?void 0:null===(t=L.errors)||void 0===t?void 0:t.username)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:L.errors.username})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block mb-1 text-gray-700 font-medium",htmlFor:"login-password",children:["Password ",(0,r.jsx)("span",{className:"text-pink-600",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{id:"login-password",type:k?"password":"text",className:(0,l.Z)("w-full px-4 py-3 border rounded-lg bg-gray-50 focus:outline-none focus:ring-2 focus:ring-green-500 transition pr-12",{"border-red-400":null==L?void 0:null===(d=L.errors)||void 0===d?void 0:d.password}),placeholder:"Enter your password",name:"password"}),(0,r.jsx)("button",{type:"button",tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),C()},className:"absolute top-1/2 right-3 -translate-y-1/2 p-2 rounded hover:bg-gray-200","aria-label":"Toggle password visibility",children:k?(0,r.jsx)(h,{}):(0,r.jsx)(f,{})})]}),(null==L?void 0:null===(g=L.errors)||void 0===g?void 0:g.password)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:L.errors.password})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer select-none",children:[(0,r.jsx)("input",{type:"checkbox",checked:b,onChange:S,className:"accent-green-600 h-4 w-4 rounded",name:"login-remember"}),(0,r.jsx)("span",{className:"text-gray-600",children:"Remember me"})]}),(0,r.jsx)(a.default,{href:"/my-account/lost-password",className:"text-green-600 hover:underline text-sm",children:"Lost password?"})]}),(null==L?void 0:L.message)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:L.message}),(0,r.jsx)(c.Z,{isPending:N,label:"Log In"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 my-1",children:[(0,r.jsx)("hr",{className:"flex-1 border-gray-200"}),(0,r.jsx)("span",{className:"text-gray-400 text-sm",children:"OR"}),(0,r.jsx)("hr",{className:"flex-1 border-gray-200"})]}),(0,r.jsxs)("div",{className:"flex flex-row gap-3 w-full mt-1 justify-center items-center",children:[(0,r.jsxs)("button",{onClick:()=>D(!0),className:"w-full min-h-[2.6rem] rounded-lg bg-blue-600 hover:bg-blue-700 text-white transition flex justify-center items-center gap-2",style:{letterSpacing:".02em"},children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 ",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 10h.01M12 10h.01M16 10h.01M21 12c0 4.418-4.03 8-9 8a9.77 9.77 0 0 1-4-.8L3 21l1.8-4A7.97 7.97 0 0 1 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),"Otp Login"]}),(0,r.jsx)(x,{redirectTo:v,isOpen:T,onClose:()=>D(!1)}),(0,r.jsxs)("div",{className:"w-full items-center relative",children:[(0,r.jsx)(p.kZ,{onSuccess:A,onError:()=>{console.error("Google Login failed")},size:"large",theme:"filled_blue"}),F&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10",children:(0,r.jsx)(m.Z,{})})]})]})]})}},96017:function(e,s,t){t.d(s,{Z:function(){return c}});var r=t(5237),n=t(48220),l=t(6881),a=t(65358),i=t(23646),o=t(98954);function c(e){var s,t,c,d,u,m,x,p,h,f,g,v,j,b,y,N,w;let{redirectTo:k}=e,[_,C]=(0,l.useTransition)(),[S,L]=(0,a.useFormState)(i.zl,void 0);return(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-center text-gray-800 mb
1-4",children:"Signup"}),(0,r.jsxs)("form",{onSubmit:e=>{let s=new FormData(e.currentTarget);s.append("redirect_to",k||window.location.href),e.preventDefault(),C(async()=>{await L(s)})},children:[(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"form-floating",children:[(0,r.jsx)("input",{type:"text",className:(0,n.Z)("form-control",{"is-invalid":null==S?void 0:null===(s=S.errors)||void 0===s?void 0:s.user_login}),placeholder:"First name",name:"user_login",id:"user_login"}),(0,r.jsxs)("label",{htmlFor:"user_login",children:["Username ",(0,r.jsx)("b",{className:"text-pink-600",children:"*"})]})]}),(null==S?void 0:null===(t=S.errors)||void 0===t?void 0:t.user_login)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(c=S.errors)||void 0===c?void 0:c.user_login})]}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"form-floating",children:[(0,r.jsx)("input",{type:"text",className:(0,n.Z)("form-control",{"is-invalid":null==S?void 0:null===(d=S.errors)||void 0===d?void 0:d.first_name}),placeholder:"First name",name:"first_name",id:"register-firstname"}),(0,r.jsxs)("label",{htmlFor:"register-firstname",children:["First name ",(0,r.jsx)("b",{className:"text-pink-600",children:"*"})]})]}),(null==S?void 0:null===(u=S.errors)||void 0===u?void 0:u.first_name)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(m=S.errors)||void 0===m?void 0:m.first_name})]}),(0,r.jsxs)("div",{className:"my-3",children:[(0,r.jsxs)("div",{className:"form-floating",children:[(0,r.jsx)("input",{type:"text",className:(0,n.Z)("form-control",{"is-invalid":null==S?void 0:null===(x=S.errors)||void 0===x?void 0:x.last_name}),placeholder:"Last name",name:"last_name",id:"register-lastname"}),(0,r.jsxs)("label",{htmlFor:"register-lastname",children:["Last name ",(0,r.jsx)("b",{className:"text-pink-600",children:"*"})]})]}),(null==S?void 0:null===(p=S.errors)||void 0===p?void 0:p.last_name)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(h=S.errors)||void 0===h?void 0:h.last_name})]}),(0,r.jsxs)("div",{className:"my-3",children:[(0,r.jsxs)("div",{className:"form-floating",children:[(0,r.jsx)("input",{type:"text",className:(0,n.Z)("form-control",{"is-invalid":null==S?void 0:null===(f=S.errors)||void 0===f?void 0:f.email}),placeholder:"Email",name:"email",id:"register-email"}),(0,r.jsxs)("label",{htmlFor:"register-email",children:["Email ",(0,r.jsx)("b",{className:"text-pink-600",children:"*"})]})]}),(null==S?void 0:null===(g=S.errors)||void 0===g?void 0:g.email)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(v=S.errors)||void 0===v?void 0:v.email})]}),(0,r.jsxs)("div",{className:"my-3",children:[(0,r.jsxs)("div",{className:"form-floating",children:[(0,r.jsx)("input",{type:"password",className:(0,n.Z)("form-control",{"is-invalid":null==S?void 0:null===(j=S.errors)||void 0===j?void 0:j.password}),placeholder:"Password",name:"password",id:"register-password",autoComplete:"off"}),(0,r.jsxs)("label",{htmlFor:"register-password",children:["Password ",(0,r.jsx)("b",{className:"text-pink-600",children:"*"})]})]}),(null==S?void 0:null===(b=S.errors)||void 0===b?void 0:b.password)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(y=S.errors)||void 0===y?void 0:y.password})]}),(0,r.jsxs)("div",{className:"form-check",children:[(0,r.jsx)("input",{className:"form-check-input form-check-input_fill",type:"checkbox",name:"agree_privacy_term"}),(0,r.jsx)("label",{htmlFor:"register-send-info",className:"form-check-label text-secondary",children:"Term and conditions"}),(null==S?void 0:null===(N=S.errors)||void 0===N?void 0:N.agree_privacy_term)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",children:null==S?void 0:null===(w=S.errors)||void 0===w?void 0:w.agree_privacy_term})]}),(0,r.jsx)("p",{className:"mb-3 text-secondary",children:"Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described 
1in our privacy policy."}),(null==S?void 0:S.message)&&(0,r.jsx)("p",{className:"text-xs text-red-500 mt-1",dangerouslySetInnerHTML:{__html:S.message}}),(0,r.jsx)(o.Z,{isPending:_,label:"Register"})]})]})}},11:function(e,s,t){t.d(s,{Z:function(){return i}});var r=t(5237),n=t(6881),l=t(16149),a=t(96017);function i(e){let{redirectTo:s,onSuccess:t}=e,[i,o]=(0,n.useState)(!1);return(0,r.jsx)("div",{className:"w-full max-w-lg mx-auto bg-white rounded-2xl shadow-lg p-8",children:i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{redirectTo:s}),(0,r.jsx)("div",{className:"mt-6 text-center",children:(0,r.jsxs)("span",{className:"text-sm",children:["Already a user?"," ",(0,r.jsx)("button",{className:"text-blue-600 font-semibold hover:underline",onClick:()=>o(!1),children:"Login"})]})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{redirectTo:s,onSuccess:t}),(0,r.jsx)("div",{className:"mt-6 text-center",children:(0,r.jsxs)("span",{className:"text-sm",children:["Not a user?"," ",(0,r.jsx)("button",{className:"text-blue-600 font-semibold hover:underline",onClick:()=>o(!0),children:"Sign up"})]})})]})})}},23646:function(e,s,t){t.d(s,{AU:function(){return o},EB:function(){return m},KC:function(){return d},Su:function(){return a},TA:function(){return c},at:function(){return x},h6:function(){return u},qZ:function(){return n},y:function(){return l},zl:function(){return i}}),t(98473);var r=t(33177),n=(0,r.$)("79c8f906c2ae57e8ad6d043de550f4c5492a27bb"),l=(0,r.$)("48bfac1ecbc19d55ff3dcaeddf36be9fdbd3c95c"),a=(0,r.$)("4ce1550f6e94f2181408701df796100e92eeab7f"),i=(0,r.$)("48a7c7959f80887046165eb93e3006ffdf187c15"),o=(0,r.$)("59d731cd5f1263e43b2f398317e7841126ddd25c"),c=(0,r.$)("2e4ee9b60715fba9346c7348def4d10e268f1019"),d=(0,r.$)("759598a8387507e09005bd63cc80796cb4a6eca9"),u=(0,r.$)("e2b7b7ed8084056919b505e32a72da01861b29cb"),m=(0,r.$)("92c3518233781dcc54843cc2a84b186e55048b5b"),x=(0,r.$)("f8ba21448e8f4d94343b62f492cd0ea128b2cea7")},98954:function(e,s,t){t.d(s,{Z:function(){return l}});var r=t(5237),n=t(72593);function l(e){let{isPending:s,label:t}=e;return(0,r.jsx)("button",{className:"bg-green-600 text-white p-2 h-[3.2rem] items-center  w-full text-uppercase rounded-lg",type:"submit",children:s?(0,r.jsx)(n.Z,{className:"spinner-border-sm text-white"}):t})}},72593:function(e,s,t){t.d(s,{Z:function(){return n}});var r=t(5237);function n(e){let{className:s=""}=e;return(0,r.jsx)("div",{className:"spinner-border ".concat(s),role:"status",children:(0,r.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}}}]);

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.