PageSourceSearch

https://cdn.faire.com/visitor/_next/static/chunks/2248-43c90f3199bffc1f.js

js faire.com collected 2026-09-24 09:20:59 UTC 115,964 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2248],{79551:(e,t,a)=>{a.d(t,{CS:()=>v,Ov:()=>_,Qv:()=>T,U3:()=>x,b8:()=>S,yz:()=>w,z4:()=>y});var i=a(294799),r=a(11241),s=a(418205),n=a(440980),o=a(201245),l=a(265514),d=a(916614),c=a(768271),u=a(834023),g=a(611336),m=a(594914),h=a(130230),f=a(104889);let p=(0,g.AH)(["&:focus,&:focus-within{border:1px solid ",";}"],n.rc.border.default),x=(0,g.AH)(["border:1px solid ",";border-radius:var(--radius-fs-component-default);&:invalid{border:1px solid ",";}",";"],e=>e.$showErrorState?n.QB.border.critical:n.iJ.border.muted,n.QB.border.critical,p),_=40,b=(0,g.AH)(["background-color:",";cursor:not-allowed;"],n.rc.surface.disabled),S=(0,g.AH)(["",";appearance:none;border:none;outline:none;padding:0 16px;&:invalid{appearance:none;box-shadow:none;}&::placeholder{color:",";}&:disabled{",";}",";"],e=>(0,d.uT)({color:e.disabled?n.iJ.text.subdued:n.iJ.text.primary}),({theme:e})=>(0,h.Y5)(e).input.placeholder.color??n.iJ.text.subdued,b,({disabled:e})=>e?b:""),w=(0,g.AH)(["",";",";"],S,x),y=(0,g.Ay)(l.fI).attrs({align:"center"}).withConfig({componentId:"sc-bbbd18af-0"})(["",";height:","px;padding:0 8px 0 16px;background:",";cursor:text;",";"],({$borderless:e})=>e?p:x,_,n.iJ.surface.primary,({$disabled:e})=>e?(0,g.AH)(["background-color:",";cursor:not-allowed;"],n.rc.surface.disabled):""),E=g.Ay.input.withConfig({componentId:"sc-bbbd18af-1"})(["",";padding:0;@supports (display:flex){width:0;flex:1 1 auto;}background:none;cursor:inherit;border:0 !important;"],S),v=g.Ay.label.withConfig({componentId:"sc-bbbd18af-2"})(["",";"],({$typography:e})=>(0,d.uT)(e??{})),A=g.Ay.div.withConfig({componentId:"sc-bbbd18af-3"})(["position:relative;flex:",';input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type="number"]{-moz-appearance:textfield;}width:100%;'],e=>e.$disableFlex?"none":1),T=e=>{let t,a,h,p,x,_,b,S,w,T,j,I,O,M,N,R,k,L,F,P,D,K,G,W,U,$,V,B,z,H,J=(0,r.c)(72);J[0]!==e?({disableFlex:p,error:x,label:T,tooltip:L,helper:_,prefixNode:O,suffixNode:R,className:h,onClick:I,borderless:a,id:S,"aria-label":t,maxLength:j,hideCharacterCount:b,isButton:k,inputBoxRef:w,wrapperId:F,ref:N,...M}=e,J[0]=e,J[1]=t,J[2]=a,J[3]=h,J[4]=p,J[5]=x,J[6]=_,J[7]=b,J[8]=S,J[9]=w,J[10]=T,J[11]=j,J[12]=I,J[13]=O,J[14]=M,J[15]=N,J[16]=R,J[17]=k,J[18]=L,J[19]=F):(t=J[1],a=J[2],h=J[3],p=J[4],x=J[5],_=J[6],b=J[7],S=J[8],w=J[9],T=J[10],j=J[11],I=J[12],O=J[13],M=J[14],N=J[15],R=J[16],k=J[17],L=J[18],F=J[19]);let Y=void 0===k||k,Q=(0,s.Y)("input-"),{input:X}=(0,g.DP)(),q=u.useRef(null),Z=N??q;J[20]!==x?(P=(0,f.k)({error:x}),J[20]=x,J[21]=P):P=J[21];let{showErrorState:ee,showErrorMessage:et,errorMessage:ea}=P,ei=S??Q,er=T?`${ei}__label`:void 0,es=M.value??"";if(J[22]!==t||J[23]!==er){var en;D=(en=t)?{"aria-label":en}:er?{"aria-labelledby":er}:{},J[22]=t,J[23]=er,J[24]=D}else D=J[24];let eo=D,el=!b&&!!j;J[25]===Symbol.for("react.memo_cache_sentinel")?(K=(0,c.P4)(),J[25]=K):K=J[25],J[26]!==X||J[27]!==ei||J[28]!==T||J[29]!==er||J[30]!==ee||J[31]!==L?(G=T?(0,i.jsx)(v,{id:er,$typography:{...X.label??{},color:ee?n.QB.text.critical:X.label.color},htmlFor:ei,children:L?(0,i.jsxs)(l.fI,{children:[T,(0,i.jsx)(m.hK,{size:"2x"}),L]}):T}):null,J[26]=X,J[27]=ei,J[28]=T,J[29]=er,J[30]=ee,J[31]=L,J[32]=G):G=J[32],J[33]!==Z||J[34]!==I||J[35]!==M.disabled?(W=e=>{Z?.current?.focus(),M.disabled||I?.(e)},J[33]=Z,J[34]=I,J[35]=M.disabled,J[36]=W):W=J[36];let ed=Y?"button":"";return J[37]!==O?(U=(0,o.EA)(O)?(0,i.jsxs)(i.Fragment,{children:["string"==typeof O?(0,i.jsx)(d.o5,{children:O}):O,(0,i.jsx)(m.hK,{size:8})]}):null,J[37]=O,J[38]=U):U=J[38],J[39]!==eo||J[40]!==Z||J[41]!==ei||J[42]!==j||J[43]!==M?($=(0,i.jsx)(E,{ref:Z,placeholder:"",maxLength:j,...M,...eo,id:ei}),J[39]=eo,J[40]=Z,J[41]=ei,J[42]=j,J[43]=M,J[44]=$):$=J[44],J[45]!==M.disabled||J[46]!==R?(V=(0,o.EA)(R)?(0,i.jsx)(i.Fragment,{children:"string"==typeof R?(0,i.jsx)(d.o5,{color:M.disabled?n.rc.text.disabled:n.iJ.text.primary,children:R}):R}):null,J[45]=M.disabled,J[46]=R,J[47]=V):V=J[47],J[48]!==a||J[49]!==h||J[50]!==w||J[51]!==M.disabled||J[52]!==ee||J[53]!==V||J[54]!==W||J[55]!==ed||J[56]!==U||J[57]!==$||J[58]!==F?(B=(0,i.jsxs)(y,{id:F,className:h,$disabled:M.disabled,$showErrorState:ee,onClick:W,role:ed,$borderless:a,ref:w,children:[U,$,V]}
1),J[48]=a,J[49]=h,J[50]=w,J[51]=M.disabled,J[52]=ee,J[53]=V,J[54]=W,J[55]=ed,J[56]=U,J[57]=$,J[58]=F,J[59]=B):B=J[59],J[60]!==ea||J[61]!==_||J[62]!==j||J[63]!==el||J[64]!==et||J[65]!==es?(z=el||ea||_?(0,i.jsx)(C,{errorMessage:ea,showErrorMessage:et,helper:_,maxLength:j,shouldShowCharacterCount:el,value:es}):null,J[60]=ea,J[61]=_,J[62]=j,J[63]=el,J[64]=et,J[65]=es,J[66]=z):z=J[66],J[67]!==p||J[68]!==B||J[69]!==z||J[70]!==G?(H=(0,i.jsxs)(A,{$disableFlex:p,className:K,children:[G,B,z]}),J[67]=p,J[68]=B,J[69]=z,J[70]=G,J[71]=H):H=J[71],H},j=e=>{let t=(0,r.c)(4),{helper:a,errorMessage:s,showErrorMessage:o}=e;if(o){let e;return t[0]!==s?(e=(0,i.jsx)(d.o5,{variant:"labelSansRegular",color:n.QB.text.critical,children:s}),t[0]=s,t[1]=e):e=t[1],e}{let e;return t[2]!==a?(e=(0,i.jsx)(d.o5,{variant:"labelSansRegular",color:n.iJ.text.primary,"data-test-id":"input-helper-message",children:a}),t[2]=a,t[3]=e):e=t[3],e}},C=e=>{let t,a,s,o,c=(0,r.c)(13),{helper:u,errorMessage:g,showErrorMessage:h,maxLength:f,shouldShowCharacterCount:p,value:x}=e,_=h?n.QB.text.critical:n.iJ.text.primary;return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(m.hK,{size:4}),c[0]=t):t=c[0],c[1]!==g||c[2]!==u||c[3]!==h?(a=(0,i.jsx)(j,{helper:u,errorMessage:g,showErrorMessage:h}),c[1]=g,c[2]=u,c[3]=h,c[4]=a):a=c[4],c[5]!==f||c[6]!==p||c[7]!==_||c[8]!==x?.length?(s=p?(0,i.jsxs)(d.o5,{variant:"labelSansRegular",color:_,children:[x?.length,"/",f]}):null,c[5]=f,c[6]=p,c[7]=_,c[8]=x?.length,c[9]=s):s=c[9],c[10]!==a||c[11]!==s?(o=(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsxs)(l.fI,{justify:"space-between",children:[a,s]})]}),c[10]=a,c[11]=s,c[12]=o):o=c[12],o}},104889:(e,t,a)=>{a.d(t,{k:()=>i});let i=({error:e})=>!0===e||""===e?{showErrorState:!0,showErrorMessage:!1,errorMessage:void 0}:"string"==typeof e?{showErrorState:!0,showErrorMessage:!0,errorMessage:e}:{showErrorState:!1,showErrorMessage:!1,errorMessage:void 0}},123515:(e,t,a)=>{a.d(t,{p:()=>v,l:()=>A});var i=a(294799),r=a(807832),s=a(815995),n=a(837021),o=a(924178),l=a(20715),d=a(67612),c=a(20604),u=a(254071),g=a(318180),m=a(575611),h=a(745274),f=a(521506),p=a(442462),x=a(858655),_=a(921442),b=a(592887),S=a(249941),w=a(834023);let{logger:y}=b.Vy.getLogger("SIGNIN"),E=S.$.GOOGLE,v={OAUTH:"oauth",GIS:"gis"},A=e=>{let{disabled:t,isOnSignIn:a,sourceId:b,variant:S=v.OAUTH,gisButtonContainerClassName:A,gisButtonConfig:T}=e,{strictLocalize:j}=(0,h.useStrictLocalization)(),{isScriptLoading:C,hasScriptError:I}=(0,l.L)({isScriptLoaded:d.f,loadScript:d.k,provider:E}),O=(0,o.y)({...e,provider:E,trackRetailerSignupRequiredFromGoogleGisPath:S===v.GIS}),M=(0,w.useRef)(void 0),{errorMessage:N,setErrorMessage:R}=(0,c.o)(),{userClickedSSOButton:k,recordSSOButtonClick:L}=(0,u.m)(),F=(0,g.S)(),P=(0,w.useCallback)(async({code:e})=>{let{sso_token:t}=await (0,f.Ay)({authorization_code:e}),a=t?.id_token;a?O(a):R((0,s.K)(j))},[O,R,j]),D=(0,w.useCallback)(e=>{let{error:t}=e;y.error(e,{tags:{signInType:"SSO",provider:E,code:t}}),t&&R((0,s.B)({provider:E,code:t},j))},[R,j]),K=(0,w.useCallback)(e=>e.error?D(e):P(e),[D,P]),G=(0,w.useCallback)(()=>{M.current?.requestCode(),F()},[F]),W=(0,w.useCallback)(()=>{var e;L(),(0,_.Z)(E,b),e=a?"SIGN_IN":"SIGN_UP",(0,p.x)({eventKey:"logged_out_retailers-google_gis_sso_button_click-action_category_click",realTimeTracking:!1,priority:x.T.Priority.EXTRA_LOW,actionCategory:x.T.ActionCategory.ACTION_CATEGORY_CLICK,parameters:{sso_intent:e,entry_surface2:b}}),F()},[L,b,a,F]),U=(0,w.useCallback)(()=>{F()},[F]);return(w.useEffect(()=>{if(S===v.OAUTH&&!C)try{let t=(0,m.u)();t?.google?.accounts?.oauth2&&"function"==typeof t?.google.accounts.oauth2.initCodeClient&&(M.current=google.accounts.oauth2.initCodeClient({client_id:e.appModalEnv.googleSignInClientId??"",scope:"openid profile email",callback:e=>K(e)}))}catch(e){y.error(e,{tags:{signInType:"SSO",provider:E,code:"auth_init_failed"}}),R((0,s.K)(j))}},[S,C,e.appModalEnv.googleSignInClientId,R,K,j]),S===v.GIS)?(0,i.jsx)(n.Y,{appModalEnv:e.appModalEnv,buttonContainerClassName:A,disabled:t,isOnSignIn:a,sourceId:b,hasScriptError:I,gisButtonConfig:T,onButtonClick:W,onFallbackButtonClick:U,onSSOSuccess:e=>{O(e)}}):I?(0,i.jsx)(r.S,{onClick:()=>R(j({id:"JQATH5",defaultMessage:"Google script is blocked. Unblock and refresh to use Google sign in.",description:{text:"Error message for unable to use Google log in"}})),socialProvider:E,disabled:t,sourceId:b}):!k&&N?(0,i.jsx)(r.S,{onClick:L,socialProvider:E,disabled:t,isOnSignIn:a,sourceId:b}):(0,i.jsx)(r.S,{disabled:t,onClick:G,socialProvider:E,loading:C,isOnSignIn:a,sourceId:b})}},129066:(e,t,a)=>{a.d(t,{iJ:()=>f,pl:()=>h,tA:()=>m});var i=a(302625),r=a(944246),s=a(575611),n=a(592887),o=a(864668),l=a(249941),d=a(937095);let{logger:c}
1=n.Vy.getLogger("SIGNIN"),u="_appleLogin",g=l.$.APPLE,m=()=>!!(0,r.Y)()?.getElementById(u),h=async()=>{!m()&&(0,i.gz)()&&await (0,d.k)("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",u)},f=(e,t)=>{try{let t=(0,s.u)();t?.AppleID?.auth&&"function"==typeof t?.AppleID?.auth.init&&AppleID.auth.init({clientId:e??"com.faire.retailer",scope:"name email",redirectURI:(0,o.a0)(),usePopup:!0})}catch(e){c.error(e,{tags:{signInType:"SSO",provider:g,code:"auth_init_failed"}}),t()}}},143803:(e,t,a)=>{a.d(t,{P:()=>i});function i(...e){let t=e.filter(Boolean);return t.length<=1?t[0]||null:e=>{for(let a of t)"function"==typeof a?a(e):a&&(a.current=e)}}},246202:(e,t,a)=>{a.d(t,{T:()=>m,S:()=>h});var i=a(294799),r=a(11241),s=a(745274),n=a(442462),o=a(858655);function l(){return(0,n.x)({eventKey:"cx_foundations-errorboundary-click",realTimeTracking:!1,priority:o.T.Priority.EXTRA_LOW,actionCategory:o.T.ActionCategory.ACTION_CATEGORY_CLICK})}var d=a(376772),c=a(723321),u=a(472715),g=a.n(u);a(834023);let m=e=>{let t,a,n,o,l=(0,r.c)(11),{children:u,onClick:m,loggedOut:h,brandOrderToken:f}=e,{strictLocalize:p}=(0,s.useStrictLocalization)(),x=h?"true":void 0;return l[0]!==f||l[1]!==x?(t=(0,d.Ay)({contact:"true",loggedOut:x,brand_order_token:f}),l[0]=f,l[1]=x,l[2]=t):t=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(a={font:"inherit"},l[3]=a):a=l[3],l[4]!==u||l[5]!==p?(n=g()(u)?p({id:"wwG3oY",defaultMessage:"contact us",description:{text:"Faire's help center contact form, users contact Faire by filling out this form and submit issues or their requests"}}):u,l[4]=u,l[5]=p,l[6]=n):n=l[6],l[7]!==m||l[8]!==t||l[9]!==n?(o=(0,i.jsx)(c.a,{variant:"tertiary",linkTo:t,onClick:m,target:"_blank",rel:"noreferrer",tertiaryColor:"inherit",style:a,children:n}),l[7]=m,l[8]=t,l[9]=n,l[10]=o):o=l[10],o},h=e=>{let t,a=(0,r.c)(2);return a[0]!==e?(t=(0,i.jsx)(m,{onClick:l,children:e}),a[0]=e,a[1]=t):t=a[1],t}},268979:(e,t,a)=>{a.d(t,{S:()=>c,w:()=>d});var i=a(294799),r=a(11241),s=a(561728),n=a(511270),o=a(246202);a(834023);let l=()=>(0,n.J)((0,s.T)().toString()),d=(e,t)=>(0,i.jsx)(o.T,{loggedOut:!0,onClick:()=>{l(),t?.()},children:e}),c=e=>{let t,a=(0,r.c)(2);return a[0]!==e?(t=(0,i.jsx)(o.T,{onClick:l,children:e}),a[0]=e,a[1]=t):t=a[1],t}},352028:(e,t,a)=>{a.d(t,{n:()=>l});var i=a(294799),r=a(11241),s=a(265514),n=a(594914),o=a(562360);a(834023);let l=e=>{let t,a,l,d=(0,r.c)(6),{children:c,noSpacing:u}=e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsxs)("div",{className:"hidden flex-row md:flex",children:[(0,i.jsx)(n.hK,{size:4}),(0,i.jsx)(o.FaireLogo,{size:88})]}),d[0]=t):t=d[0],d[1]!==u?(a=u?null:(0,i.jsx)(n.hK,{size:"8x",className:"hidden md:block"}),d[1]=u,d[2]=a):a=d[2],d[3]!==c||d[4]!==a?(l=(0,i.jsxs)(s.VP,{className:"mb-16 px-6 pt-10 pb-16 md:m-auto md:min-h-120 md:w-105 md:p-10",children:[t,a,c]}),d[3]=c,d[4]=a,d[5]=l):l=d[5],l}},375173:(e,t,a)=>{a.d(t,{k:()=>r});var i=a(426140);let r=()=>s;async function s(e){let{redirectUrl:t,cleanup:a}=e;a&&await a(),(0,i.Z)().href=t}},387865:(e,t,a)=>{a.d(t,{H:()=>f});var i=a(294799),r=a(11241),s=a(663244),n=a(123515),o=a(897353),l=a(906014),d=a(524760),c=a(595656),u=a(508924),g=a(265514),m=a(594914),h=a(916614);a(834023);let f=e=>{let t,a,f,p,x,_,b,S,w,y,E=(0,r.c)(36),{onSignIn:v,onMFA:A,onSelectMFA:T,onConfirmPassword:j,hideApple:C,disabled:I,separatorPosition:O,isOnSignIn:M,sourceId:N,appModalEnv:R}=e,k=void 0===O?"above":O;(0,o.r)(M);let L=(0,l.T)(),F=(0,d.J)(),P=M?L:F;E[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(m.hK,{height:"4x"}),E[0]=t):t=E[0];let D=t,K=P?"2x":"4x";E[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(u.c,{}),f=(0,i.jsx)(m.hK,{width:"4x"}),E[1]=a,E[2]=f):(a=E[1],f=E[2]),E[3]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(g.fI,{align:"center",children:[a,f,(0,i.jsx)(h.o5,{children:(0,i.jsx)(c.StrictLocalMsg,{id:"XBzqWF",defaultMessage:"or",description:{text:"Use 'this' or 'that'"}})}),(0,i.jsx)(m.hK,{width:"4x"}),(0,i.jsx)(u.c,{})]})}),E[3]=p):p=E[3];let G=p;E[4]===Symbol.for("react.memo_cache_sentinel")?(x={width:"100%"},E[4]=x):x=E[4],E[5]!==k?(_="above"===k?(0,i.jsxs)(i.Fragment,{children:[D,G,D]}):null,E[5]=k,E[6]=_):_=E[6];let W=P?"gis":"oauth";return E[7]!==R||E[8]!==I||E[9]!==M||E[10]!==j||E[11]!==A||E[12]!==T||E[13]!==v||E[14]!==N||E[15]!==W?(b=(0,i.jsx)(n.l,{onSignIn:v,onSelectMFA:T,onMFA:A,onConfirmPassword:j,disabled:I,isOnSignIn:M,sourceId:N,appModalEnv:R,variant:W}),E[7]=R,E[8]=I,E[9]=M,E[10]=j,E[11]=A,E[12]=T,E[13]=v,E[14]=N,E[15]=W,E[16]=b):b=E[16],E[17]!==R||E[18]!==K||E[19]!==I||E[20]!==C||E[21]!==P||E[22]!==M||E[23]!==j||E[24]!==A||E[25]!==T||E[26]!==v||E[27]!==N?(S=C?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.hK,{height:K}),(0,i.jsx)(s.K,{onSignIn:v,onSelectMFA:T,onMFA:A,onConfirmPassword:j,matchGISButtonLayout:P,disabled:I,isOnSignIn:M,sourceId:N,appModalEnv:R})]}),E[17]=R,E[18]=K,E[19]=I,E[20]=C,E[21]=P,E[22]=M,E[23]=j,E[24]=A,E[25]=T,E[26]=v,E[27]=N,E[28]=S):S=E[28],E[29]!==k?(w="below"===k?(0,i.jsxs)(i.Fragment,{children:[D,G,D]}):null,E[29]=k,E[30]=w):w=E[30],E[31]!==S||E[32]!==w||E[33]!==_||E[34]!==b?(y=(0,i.jsxs)(g.VP,{style:x,children:[_,b,S,w]}),E[31]=S,E[32]=w,E[33]=_,E[34]=b,E[35]=y):y=E[35],y}},392536:(e,t,a)=>{a.d(t,{n:()=>r});var i=a(440980);let r=a(611336).Ay.div.withConfig({componentId:"sc-fa3044f0-0"})(["width:100%;height:100%;position:absolute;"," left:0;top:0;z-index:2;pointer-events:none;border-radius:var(--radius-fs-component-default);"],(0,i.xi)`background: ${"Action.surface.active"};`)},428839:(e,t,a)=>{a.d(t,{R:()=>u});var i=a(294799),r=a(11241),s=a(418205),n=a(440980),o=a(130230),l=a(916614),d=a(768271);a(834023);var c=a(611336);let u=e=>{let t,a,n,o,l=(0,r.c)(30),{active:c,align:u,children:_,className:b,color:S,disabled:w,disabledColor:y,error:E,label:v,name:A,onClick:T,secondaryLabel:j}=e,C=void 0!==c&&c,I=void 0!==w&&w,O=void 0!==E&&E,M=(0,s.Y)("radio-button-label-");l[0]!==b?(t=(0,d.P4)(b),l[0]=b,l[1]=t):t=l[1];let N=e["aria-label"],R=e["aria-labelledby"],k=e["data-test-id"],L=void 0===T;return l[2]!==C||l[3]!==u||l[4]!==S||l[5]!==I||l[6]!==y||l[7]!==O||l[8]!==M||l[9]!==A||l[10]!==T||l[11]!==N||l[12]!==R||l[13]!==k||l[14]!==L?(a=(0,i.jsx)(h,{children:(0,i.jsx)(f,{$active:C,$align:u,"aria-label":N,"aria-labelledby":R,checked:C,color:S,"data-test-id":k,disabled:I,$disabledColor:y,$error:O,id:M,name:A,onChange:T,type:"radio",readOnly:L})}),l[2]=C,l[3]=u,l[4]=S,l[5]=I,l[6]=y,l[7]=O,l[8]=M,l[9]=A,l[10]=T,l[11]=N,l[12]=R,l[13]=k,l[14]=L,l[15]=a):a=l[15],l[16]!==_||l[17]!==S||l[18]!==I||l[19]!==y||l[20]!==O||l[21]!==v||l[22]!==M||l[23]!==j?(n=_||v?(0,i.jsx)(p,{disabled:I,htmlFor:M,children:_||(0,i.jsxs)(x,{align:"left",color:S,$disabled:I,$disabledColor:y,$error:O,id:M,children:[v,(0,i.jsx)(g,{children:j})]})}):null,l[16]=_,l[17]=S,l[18]=I,l[19]=y,l[20]=O,l[21]=v,l[22]=M,l[23]=j,l[24]=n):n=l[24],l[25]!==u||l[26]!==t||l[27]!==a||l[28]!==n?(o=(0,i.jsxs)(m,{$align:u,className:t,children:[a,n]}),l[25]=u,l[26]=t,l[27]=a,l[28]=n,l[29]=o):o=l[29],o},g=(0,c.Ay)(l.o5).attrs({color:n.iJ.text.subdued,forwardedAs:"span",variant:"paragraphSansRegular"}).withConfig({componentId:"sc-fb81487b-0"})(["display:block;"]),m=c.Ay.div.attrs({role:"presentation"}).withConfig({componentId:"sc-fb81487b-1"})(["align-items:",";display:flex;"],e=>e.$align??"center"),h=c.Ay.div.withConfig({componentId:"sc-fb81487b-2"})(["align-items:center;display:flex;height:",";"],({theme:e})=>e?.fonts?.sansSerif?.p?.lineHeight||"12px"),f=c.Ay.input.withConfig({componentId:"sc-fb81487b-3"})(["appearance:none;border:1px solid ",";block-size:","px;border-radius:50%;cursor:",";inline-size:","px;margin:0;min-block-size:","px;min-inline-size:","px;position:relative;background-color:",";&:focus-visible{outline:revert;}",";"],({color:e,disabled:t,$disabledColor:a,$error:i,theme:r})=>{let{radios:{enabled:s}}=(0,o.Y5)(r);return t?a||n.iJ.border.muted:i?n.QB.border.critical:e??s},16,({disabled:e})=>e?"not-allowed":"pointer",16,16,16,({disabled:e,$active:t,$disabledColor:a})=>e&&!t?a||n.rc.surface.disabled:void 0,({$active:e,color:t,disabled:a,$disabledColor:i,$error:r,theme:s})=>{let l,{radios:d}=(0,o.Y5)(s);return l=a?i??d.disabled:r?n.QB.text.critical:t??d.enabled,e?(0,c.AH)(["&:before{background-color:",";block-size:",'px;border-radius:50%;content:" ";inline-size:',"px;inset-block-start:3px;inset-inline-start:3px;position:absolute;}"],l,8,8):""}),p=c.Ay.label.withConfig({componentId:"sc-fb81487b-4"})(["cursor:",";padding-inline-start:8px;"],({disabled:e})=>e?"not-allowed":"pointer"),x=(0,c.Ay)(l.o5).withConfig({componentId:"sc-fb81487b-5"})(["&&&{color:",";}"],({$disabled:e,$error:t,theme:a,color:i,$disabledColor:r})=>{let{radios:s}=(0,o.Y5)(a);return e?r||s.disabled:t?n.QB.text.critical:i||s.enabled})},448733:(e,t,a)=>{a.r(t),a.d(t,{AppSignIn:()=>ar});var i,r,s,n,o=a(294799),l=a(11241),d=a(437662);
1class c extends Error{constructor(e,t,a){super(e),this.httpStatusCode=t,this.responseBody=a}get isAccountExistenceError(){return 404===this.httpStatusCode||400===this.httpStatusCode&&this.responseBody?.service_error_code==="UserLoginInvalidCredentialsException.INVALID_CREDENTIALS"}}var u=a(201245),g=a(536203);let m=(e,t,a)=>{if(e instanceof g.x)return 404===e.httpStatusCode?new c(t({id:"S6Fbcx",defaultMessage:"There’s no account associated with that email. Try Again"}),e.httpStatusCode):429===e.httpStatusCode?new c(t({id:"zyGQIV",defaultMessage:"Your account has been locked due to too many failed login attempts, try again in an hour.",description:{text:"Error message shown to user if they called our login endpoint too many times",img:"https://cdn.faire.com/fastly/aff2984cdbc29172ebf3e88dcbd345a7dbc47380a800749af1d6127857047bb6.png"}}),e.httpStatusCode):400===e.httpStatusCode&&a?.isMFALoginAttempt?new c(t({id:"F7Xqi+",defaultMessage:"Invalid combination of email address, code and password.",description:{text:"Error message shown to user if they enter the wrong credentials",img:"https://cdn.faire.com/fastly/2bfce655806471489ec54fd5eca9ab570c1fa6ba9456214e8069a5203b989bd8.png"}})):new c(e.message,e.httpStatusCode,e.responseData);return new c((0,u.bJ)(e)?e.message:t({id:"uuDgUP",defaultMessage:"An error occured"}))};var h=a(561728),f=a(373170),p=a(426140),x=a(595656),_=a(680831),b=a(987457),S=a(440980),w=a(594914),y=a(916614),E=a(380629),v=a.n(E),A=a(834023);let T=e=>{let t,a,i,r=(0,l.c)(21),{error:s,align:n,small:d}=e;if(!s||!v()(s))return null;let c=void 0!==s.httpStatusCode&&s.httpStatusCode>=500,u=void 0!==s.httpStatusCode&&400===s.httpStatusCode&&s.responseBody?.field==="resetPasswordToken";r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,f.U)((0,p.Z)().search).get("native_env"),r[0]=t):t=r[0];let g="true"===t;if(c){let e,t,a;r[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"2x"}),r[1]=e):e=r[1];let i=n??"center",s=d?"labelSansRegular":"paragraphSansRegular";return r[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(x.StrictLocalMsg,{id:"Q9mJ7R",defaultMessage:"Something went wrong. Please try again or contact us."}),r[2]=t):t=r[2],r[3]!==i||r[4]!==s?(a=(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(y.o5,{role:"alert",color:S.QB.text.critical,align:i,"data-test-id":"signin-error-msg",variant:s,children:t})]}),r[3]=i,r[4]=s,r[5]=a):a=r[5],a}if(u){let e,t,a,i,s;r[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"2x"}),r[6]=e):e=r[6];let l=n??"center",c=d?"labelSansRegular":"paragraphSansRegular";return r[7]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(x.StrictLocalMsg,{id:"MNm3VI",defaultMessage:"This reset password link has expired or already been used.",description:{text:"Error message that reset link is expired.",img:"https://cdn.faire.com/fastly/3813a5f893414e0519067ed84ccb9190deca66cce719fddbbd2e3f9c20cc9f7b.png"}}),r[7]=t):t=r[7],r[8]!==l||r[9]!==c?(a=(0,o.jsx)(y.o5,{role:"alert",color:S.QB.text.critical,align:l,"data-test-id":"signin-error-msg",variant:c,children:t}),r[8]=l,r[9]=c,r[10]=a):a=r[10],r[11]!==g?(i=g?null:(0,o.jsx)(_.$,{variant:"plain",onClick:I,children:(0,o.jsx)(x.StrictLocalMsg,{id:"Ap28Q0",defaultMessage:"Login with your new password",description:{text:"CTA to log in with new password.",img:"https://cdn.faire.com/fastly/bbad9032948b3b3757baf8d31a60c75f93983acc13cb434b0c2df255bab44131.png"}})}),r[11]=g,r[12]=i):i=r[12],r[13]!==a||r[14]!==i?(s=(0,o.jsxs)(o.Fragment,{children:[e,a,i]}),r[13]=a,r[14]=i,r[15]=s):s=r[15],s}r[16]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(w.hK,{height:"2x"}),r[16]=a):a=r[16];let m=n??"center",h=d?"labelSansRegular":"paragraphSansRegular",b=s.responseBody?.message??s.message;return r[17]!==m||r[18]!==h||r[19]!==b?(i=(0,o.jsxs)(o.Fragment,{children:[a,(0,o.jsx)(y.o5,{role:"alert",color:S.QB.text.critical,align:m,"data-test-id":"signin-error-msg",variant:h,children:b})]}),r[17]=m,r[18]=h,r[19]=b,r[20]=i):i=r[20],i},j=e=>{let t=(0,l.c)(10),{error:a,email:i,onSignUp:r,isSignUpLoading:s}=e;if(404===a.httpStatusCode&&i){let e,a,n,l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"2x"}),t[0]=e):e=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(a={text:"Let the user know that this email is signed up with Faire and give them the link to sign up"},t[1]=a):a=t[1],t[2]!==i||t[3]!==s||t[4]!==r?(n=C(i,r,s),t[2]=i,t[3]=s,t[4]=r,t[5]=n):n=t[5],t[6]!==n?(l=(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(y.o5,{role:"alert",color:S.QB.text.critical,align:"left","data-test-id":"signin-error-msg",variant:"labelSansRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"9hoR0y",defaultMessage:"No account found for this email. <EmailLinkFormatting>
1Sign up</EmailLinkFormatting>",description:a,values:{EmailLinkFormatting:n}})})]}),t[6]=n,t[7]=l):l=t[7],l}{let e;return t[8]!==a?(e=(0,o.jsx)(T,{error:a,align:"left",small:!0}),t[8]=a,t[9]=e):e=t[9],e}},C=(e,t,a)=>function(i){return(0,o.jsx)(b.N,{as:"button",onClick:()=>t(e),disabled:a,children:i})};function I(){return(0,p.Z)().replace((0,h.T)().replace({signIn:"1"}).toString())}var O=a(352028);let M="appSignInModalTitle";var N=a(508765),R=a(734466),k=a(745274),L=a(987374);a(34268);let F=function(e,t){let a,i=((a=t?.headers??new Headers).has("content-type")||a.set("content-type","application/json"),{route:"/api/user/change-password",service:"backend",url:"/api/user/change-password",method:"POST",data:e,doNotLogRequest:!0,...t,headers:a});return(0,L.E)(i)},P=function(e,t){let a,i=(a=t?.headers??new Headers,{route:"/api/v2/users/validate-reset-password-token/:token",service:"backend",url:`/api/v2/users/validate-reset-password-token/${e}`,method:"POST",doNotLogRequest:!0,...t,headers:a});return(0,L.E)(i)};var D=a(403843),K=a(631115);let G=e=>{let t,a=(0,l.c)(2),{children:i}=e;return a[0]!==i?(t=(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",className:"focus-visible:outline-none",children:i}),a[0]=i,a[1]=t):t=a[1],t},W=e=>{let t,a,i,r,s=(0,l.c)(15),{onReset:n,resetToken:d}=e,{strictLocalize:u}=(0,k.useStrictLocalization)(),[g,h]=(0,A.useState)(!0),[f,p]=(0,A.useState)(""),[b,S]=(0,A.useState)();s[0]!==d||s[1]!==u?(t=()=>{if(!d){S(new c(u({id:"PW9vUd",defaultMessage:"Invalid reset token",description:{text:"Error shown to user when trying to reset password with an invalid token"}}))),h(!1);return}P(d).catch(e=>S(m(e,u))).finally(()=>h(!1))},a=[d,u],s[0]=d,s[1]=u,s[2]=t,s[3]=a):(t=s[2],a=s[3]),(0,A.useEffect)(t,a),s[4]!==n||s[5]!==f||s[6]!==d||s[7]!==u?(i=async()=>{if(f.length<N.A)return void S(new c(u({id:"WAzvY+",defaultMessage:"Password needs at least 8 characters",description:{text:"Prompt for user to create a valid password"}})));try{await F({new_password:f,reset_password_token:d}),n()}catch(e){S(m(e,u))}},s[4]=n,s[5]=f,s[6]=d,s[7]=u,s[8]=i):i=s[8];let E=i;return s[9]!==b||s[10]!==g||s[11]!==E||s[12]!==f||s[13]!==u?(r=(0,o.jsx)(O.n,{children:g?(0,o.jsxs)("div",{className:"self-center",children:[(0,o.jsx)("span",{id:M,className:"sr-only",children:(0,o.jsx)(x.StrictLocalMsg,{id:"aK92jA",defaultMessage:"Reset your password",description:{text:"Allow users to reset a forgotten password"}})}),(0,o.jsx)(D.k,{size:"xLarge","data-test-id":"spinner"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(G,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"aK92jA",defaultMessage:"Reset your password",description:{text:"Allow users to reset a forgotten password"}})}),(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"p24Pru",defaultMessage:"Type your new password to receive access to Faire"})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(K.Qv,{autoFocus:!0,name:"password",placeholder:u({id:"IVu+DN",defaultMessage:"New Password",description:{text:"Placeholder text for users to enter a new password"}}),autoComplete:"new-password","data-test-id":"password",type:"password",role:"password",value:f,onChange:e=>p(e.currentTarget.value),onKeyDown:(0,R.E)(E)}),(0,o.jsx)(w.hK,{height:"8x"}),(0,o.jsx)(_.$,{onClick:E,"data-test-id":"continueButton",children:(0,o.jsx)(x.StrictLocalMsg,{id:"SkPsmn",defaultMessage:"Reset Password",description:{text:"Call to action to reset password to newly entered password"}})}),(0,o.jsx)(T,{error:b})]})}),s[9]=b,s[10]=g,s[11]=E,s[12]=f,s[13]=u,s[14]=r):r=s[14],r};var U=a(853987);let $=e=>{let t,a,i=(0,l.c)(8),{disabled:r,isLoading:s,fullWidth:n,onClick:d,TextOverride:c}=e,u=void 0!==r&&r,g=void 0!==s&&s,m=void 0!==n&&n;return i[0]!==c?(t=c??(0,o.jsx)(x.StrictLocalMsg,{id:"83XsId",defaultMessage:"Next",description:{text:"Submit and continue to the next step"}}),i[0]=c,i[1]=t):t=i[1],i[2]!==u||i[3]!==m||i[4]!==g||i[5]!==d||i[6]!==t?(a=(0,o.jsx)(_.$,{onClick:d,"data-test-id":"continueButton",disabled:u,loading:g,fullWidth:m,children:t}),i[2]=u,i[3]=m,i[4]=g,i[5]=d,i[6]=t,i[7]=a):a=i[7],a};var V=((i={}).ENTER_EMAIL="ENTER_EMAIL",i.ENTER_PASSWORD="ENTER_PASSWORD",i.ENTER_CODE="ENTER_CODE",i.ENTER_MFA="ENTER_MFA",i.CONFIRM_PASSWORD="CONFIRM_PASSWORD",i.CREATE_PASSWORD="CREATE_PASSWORD",i.RESET_PASSWORD="RESET_PASSWORD",i.LOADING="LOADING",i.SSO="SSO",i.SELECT_MFA_OPTION="SELECT_MFA_OPTION",i.ENTER_LOGIN="ENTER_LOGIN",i.AUTO_SIGN_IN_LINK_SENT="AUTO_SIGN_IN_LINK_SENT",i.ENTE
1R_MFA_CODE="ENTER_MFA_CODE",i.MFA_OPTIONS_EMAIL_SENT="MFA_OPTIONS_EMAIL_SENT",i),B=a(725684),z=a(814494),H=a(264450),J=a(247584),Y=a(684293),Q=a(128780);let X=()=>{let e,t,a=(0,l.c)(6),{fetchHCaptchaToken:i}=(0,z.Z)(),r=(0,Q.useQueryClient)(),s=(0,J.D)(q);a[0]!==s?(e=(0,H.EZ)(s),a[0]=s,a[1]=e):e=a[1];let n=e;return a[2]!==i||a[3]!==r||a[4]!==n?(t={hCaptchaLogin:async e=>{await i(!0);try{return await (0,Y.Ay)({...e})}catch(e){return await r.invalidateQueries({queryKey:n}),Promise.reject(e)}}},a[2]=i,a[3]=r,a[4]=n,a[5]=t):t=a[5],t};function q(e){return e.widgetID}var Z=a(130083),ee=a(254071),et=a(768910),ea=a(812652),ei=a(633028),er=a(699805),es=a(265514),en=a(460352);let eo=({email:e,profileImage:t,userName:a,onComplete:i,onLogin:r})=>{let{strictLocalize:s}=(0,k.useStrictLocalization)(),[n,l]=(0,A.useState)(""),[d,c]=(0,A.useState)(),[u,g]=(0,A.useState)(""),{ssoToken:h}=(0,ee.m)(),{setShowConfirmPasswordView:f}=(0,Z.l)(),[p,_]=(0,A.useState)(!1),{hCaptchaLogin:b}=X(),E=async()=>{if(n.length<N.A)return void c(s({id:"LS2IIS",defaultMessage:"Password too short"}));try{let e=ei.m.build({sso_token:h,password:n,enable_mfa_method_selection:!0}
1);_(!0);let{user:t,mfa_description:a,mfa_title:o,mfa_options:l,login_state:d}=await b(e);if(d===er.f.MFA_METHOD_SELECTION_REQUIRED){(0,et.J)("CONFIRM_PASSWORD"),i({nextView:V.SELECT_MFA_OPTION,password:n,mfaOptions:l,mfaTitle:o,mfaDescription:a});return}if(d===er.f.MFA_REQUIRED){(0,et.J)("CONFIRM_PASSWORD"),i({nextView:V.ENTER_MFA,password:n,mfaDescription:a,mfaTitle:o});return}if(!t)return void g(s({id:"bw8Bnw",defaultMessage:"Invalid credentials",description:{text:"Email or password that was entered is incorrect"}}));f(!1),r(t),i({nextView:V.LOADING})}catch(t){let e=m(t,s);429===e.httpStatusCode?g(s({id:"wzldCA",defaultMessage:"Exceeded maximum allowed number of login attempts",description:{text:"Error that shows when a user has attempted to log in too many times"}})):g(e.message??s({id:"8GvVWZ",defaultMessage:"Something went wrong, please try again."}))}finally{_(!1)}},v=(0,A.useCallback)(e=>(0,o.jsx)(en.L,{onClick:()=>i({nextView:V.RESET_PASSWORD}),children:e}),[i]);return(0,o.jsxs)(O.n,{children:[t?.url||a?(0,o.jsx)(es.VP,{align:"flex-start",children:(0,o.jsx)(B.p,{image:t,size:"medium",userName:a})}):null,(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{id:M,variant:"pageHeaderSerifRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"nl2qUm",defaultMessage:"Confirm Faire password",description:{img:"https://cdn.faire.com/fastly/f8319f8a846f05863cef7324f31b26efa0a8c9761a2383ed7860fa56bb21566b.png"}})}),(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"SaQ8Se",defaultMessage:"Continue as {retailerEmailAddress}",description:{img:"https://cdn.faire.com/fastly/f8319f8a846f05863cef7324f31b26efa0a8c9761a2383ed7860fa56bb21566b.png"},values:{retailerEmailAddress:e}})}),u?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{color:S.QB.text.critical,children:u})]}):null,(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(ea.y,{label:s({id:"A3LsA2",defaultMessage:"Enter Password",description:{img:"https://cdn.faire.com/fastly/f8319f8a846f05863cef7324f31b26efa0a8c9761a2383ed7860fa56bb21566b.png"}}),value:n,name:"enter_password",error:d,onChange:e=>{l(e.currentTarget?.value??""),c(void 0)},autoComplete:"current-password"}),(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"sSUqKx",defaultMessage:"Forgot your password? <LinkFormatting>Reset It</LinkFormatting>",description:{img:"https://cdn.faire.com/fastly/f8319f8a846f05863cef7324f31b26efa0a8c9761a2383ed7860fa56bb21566b.png"},values:{LinkFormatting:v}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)($,{onClick:E,isLoading:p,fullWidth:!0})]})};var el=a(442462),ed=a(858655);let ec=e=>{let t,a,i,r,s=(0,l.c)(10);s[0]!==e?(t=()=>{(0,el.x)({eventKey:"signin-login_modal-view",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{View:e}})},s[0]=e,s[1]=t):t=s[1];let n=t;s[2]!==e?(a=(t,a)=>{(0,el.x)({eventKey:"signin-field_change-keyboard_input",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{field_name_string:t,value_string2:a,sign_in_viewstring3:e}})},s[2]=e,s[3]=a):a=s[3];let o=a;s[4]!==e?(i=()=>{(0,el.x)({eventKey:"signin-login_page-submit",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{sign_in_view_string:e}})},s[4]=e,s[5]=i):i=s[5];let d=i;return s[6]!==o||s[7]!==d||s[8]!==n?(r={trackView:n,trackSubmit:d,trackFieldValue:o},s[6]=o,s[7]=d,s[8]=n,s[9]=r):r=s[9],r};var eu=a(883741);let eg="password",em=e=>{let t,a,i,r,s,n,d,c,u,g,h,f,p,_=(0,l.c)(30),{loggedInUser:b,onComplete:S,onLogin:E}=e,{strictLocalize:v}=(0,k.useStrictLocalization)(),[j,C]=(0,A.useState)(""),[I,N]=(0,A.useState)(),{trackFieldValue:L}=ec("CREATE_PASSWORD");_[0]!==b||_[1]!==S||_[2]!==E||_[3]!==j||_[4]!==v?(t=async()=>{(0,U.s)("/login-modal/set-password"),N(void 0);try{await (0,eu.Ay)({token:b.token,password:j}),(0,U.s)("/login-modal/logged-in-after-setting-password"),E(b),S({nextView:V.LOADING})}catch(e){N(m(e,v))}},_[0]=b,_[1]=S,_[2]=E,_[3]=j,_[4]=v,_[5]=t):t=_[5];let F=t;return _[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(y.o5,{id:M,variant:"pageHeaderSerifRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"ARjKpf",defaultMessage:"Create a password",description:{text:"Let users set a password for a new account"}})}),i=(0,o.jsx)(w.hK,{height:"2x"}),_[6]=a,_[7]=i):(a=_[6],i=_[7]),_[8]===Symbol.for("react.memo_cache_sentinel")?(r=(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"xwVYsP",defaultMessage:"This will make it easy for you to log into your account in the future"})}),s=(0,o.jsx)(w.hK,{height:"6x"}),_[8]=r,_[9]=s):(r=_[8],s=_[9]),_[10]!==v?(n=v({id:"CvZkU7",defaultMessage:"Create Password",description:{text:"Placeholder text for user to input a new password"}}),_[10]=v,_[11]=n):n=_[11],_[12]!==L?(d=e=>{C(e.currentTarget.value),L(eg,"")},_[12]=L,_[13]=d):d=_[13],_[14]!==F?(c=(0,R.E)(F),_[14]=F,_[15]=c):c=_[15],_[16]!==j||_[17]!==n||_[18]!==d||_[19]!==c?(u=(0,o.jsx)(K.Qv,{autoFocus:!0,autoComplete:"new-password",placeholder:n,name:eg,type:eg,role:eg,value:j,onChange:d,onKeyDown:c}),_[16]=j,_[17]=n,_[18]=d,_[19]=c,_[20]=u):u=_[20],_[21]===Symbol.for("react.memo_cache_sentinel")?(g=(0,o.jsx)(w.hK,{height:"8x"}),_[21]=g):g=_[21],_[22]!==F?(h=(0,o.jsx)($,{onClick:F}),_[22]=F,_[23]=h):h=_[23],_[24]!==I?(f=(0,o.jsx)(T,{error:I}
1),_[24]=I,_[25]=f):f=_[25],_[26]!==h||_[27]!==f||_[28]!==u?(p=(0,o.jsxs)(O.n,{children:[a,i,r,s,u,g,h,f]}),_[26]=h,_[27]=f,_[28]=u,_[29]=p):p=_[29],p};var eh=a(508924),ef=a(368038);let ep=e=>{let t,a,i,r,s,n=(0,l.c)(10),{onComplete:d,email:c,scenario:u,password:g}=e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(eh.c,{}),a=(0,o.jsx)(w.hK,{size:"6x"}),n[0]=t,n[1]=a):(t=n[0],a=n[1]),n[2]===Symbol.for("react.memo_cache_sentinel")?(i={text:"Prompt for the user to enter a code if they are using another device to sign in"},n[2]=i):i=n[2],n[3]!==c||n[4]!==d||n[5]!==g||n[6]!==u?(r=ex(()=>{(0,el.x)({eventKey:"signin-check_email_enter_code-click",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{Screen_type_string:u}}),d(u===eb.AUTO?{nextView:V.ENTER_CODE,email:c}:{nextView:V.ENTER_MFA_CODE,email:c,mfaMethod:ef.i.EMAIL_ADDRESS,mfaTitle:"",mfaDescription:"",password:g})}),n[3]=c,n[4]=d,n[5]=g,n[6]=u,n[7]=r):r=n[7],n[8]!==r?(s=(0,o.jsxs)(o.Fragment,{children:[t,a,(0,o.jsx)(y.o5,{color:S.iJ.text.subdued,children:(0,o.jsx)(x.StrictLocalMsg,{id:"qfDMlv",defaultMessage:"Using another device to sign in? <LinkFormatting>Enter code</LinkFormatting>",description:i,values:{LinkFormatting:r}})})]}),n[8]=r,n[9]=s):s=n[9],s},ex=e=>function(t){return(0,o.jsx)(b.N,{as:"button",onClick:e,children:t})};function e_(e){return(0,el.x)({eventKey:"signin-check_email-view",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{Screen_type_string:e}})}var eb=((r={}).AUTO="AUTO",r.MFA="MFA",r.MFA_OPTIONS="MFA_OPTIONS",r.MFA_OPTIONS_EMAIL_SENT="MFA_OPTIONS_EMAIL_SENT",r);let eS=e=>{let t,a,i,r,s,n,d,c,u,g=(0,l.c)(18),{title:m,subtitle:h,footer:f,image:p,scenario:x}=e;g[0]!==x?(t=()=>{e_(x.toLowerCase())},a=[x],g[0]=x,g[1]=t,g[2]=a):(t=g[1],a=g[2]),(0,A.useEffect)(t,a);let _=`email-sent-waiting-img-${x}`;return g[3]!==p||g[4]!==_?(i=(0,o.jsx)("img",{src:p,width:"100%","data-test-id":_}),g[3]=p,g[4]=_,g[5]=i):i=g[5],g[6]!==m?(r=(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",children:m}),g[6]=m,g[7]=r):r=g[7],g[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(w.hK,{size:"2x"}),g[8]=s):s=g[8],g[9]!==h?(n=(0,o.jsx)(y.o5,{children:h}),g[9]=h,g[10]=n):n=g[10],g[11]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(w.hK,{size:"6x"}),g[11]=d):d=g[11],g[12]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(w.hK,{size:{mobileAndAbove:"6x",tabletAndAbove:0}}),g[12]=c):c=g[12],g[13]!==f||g[14]!==i||g[15]!==r||g[16]!==n?(u=(0,o.jsxs)(O.n,{noSpacing:!0,children:[i,r,s,n,d,f,c]}),g[13]=f,g[14]=i,g[15]=r,g[16]=n,g[17]=u):u=g[17],u},ew=e=>{let t,a,i,r,s,n,d=(0,l.c)(16),{onComplete:c,scenario:u,email:g}=e,m=void 0===u?"MFA":u,{strictLocalize:h}=(0,k.useStrictLocalization)();return(d[0]!==m?(t=()=>{e_(m.toLowerCase())},a=[m],d[0]=m,d[1]=t,d[2]=a):(t=d[1],a=d[2]),(0,A.useEffect)(t,a),"AUTO"!==m)?null:(d[3]!==h?(i=h({id:"OijGOJ",defaultMessage:"Check your email to sign in",description:{text:"Title for telling the user to check their emails, without confirming that an account exists for the address they entered",img:"https://cdn.faire.com/fastly/662920f995541979615646df5b8accbbb555fe27e567e84001666ec59ac69877.png"}}),d[3]=h,d[4]=i):i=d[4],d[5]!==g||d[6]!==h?(r=h({id:"qA7pWf",defaultMessage:"If an account exists for {EmailFullyTranslatedSentence}, we sent a link to sign in without a password.",description:{text:"Description telling the user that a magic link has been sent to their email if an account exists for it. Deliberately conditional so it does not reveal whether the address has a Faire account",img:"https://cdn.faire.com/fastly/662920f995541979615646df5b8accbbb555fe27e567e84001666ec59ac69877.png"}},{EmailFullyTranslatedSentence:g}),d[5]=g,d[6]=h,d[7]=r):r=d[7],d[8]!==g||d[9]!==c||d[10]!==m?(s=(0,o.jsx)(ep,{onComplete:c,email:g,scenario:m}),d[8]=g,d[9]=c,d[10]=m,d[11]=s):s=d[11],d[12]!==i||d[13]!==r||d[14]!==s?(n=(0,o.jsx)(eS,{title:i,subtitle:r,image:"https://cdn.faire.com/fastly/156f191b1cee0a924570a6b23d7d8c7c35d78bfa643d72f9a007fb030757cb32.png",scenario:"AUTO",footer:s}),d[12]=i,d[13]=r,d[14]=s,d[15]=n):n=d[15],n)},ey=e=>{let t,a,i=(0,l.c)(8),{onComplete:r,email:s,mfaTitle:n,mfaDescription:d,password:c}=e,u=s??"";return i[0]!==r||i[1]!==c||i[2]!==u?(t=(0,o.jsx)(ep,{onComplete:r,email:u,scenario:"MFA_OPTIONS_EMAIL_SENT",password:c}),i[0]=r,i[1]=c,i[2]=u,i[3]=t):t=i[3],i[4]!==d||i[5]!==n||i[6]!==t?(a=(0,o.jsx)(eS,{title:n,subtitle:d,image:"https://cdn.faire.com/fastly/156f191b1cee0a924570a6b23d7d8c7c35d78bfa643d72f9a007fb030757cb32.png",scenario:"MFA_OPTIONS_EMAIL_SENT",footer:t}
1),i[4]=d,i[5]=n,i[6]=t,i[7]=a):a=i[7],a};var eE=a(268979);let ev=e=>{let t,a,i=(0,l.c)(8),{error:r,onResend:s,showResend:n,mfaMethod:d}=e,{strictLocalize:c}=(0,k.useStrictLocalization)();if(r){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"xgik6d",defaultMessage:"Sorry! We encountered an unexpected error, please <LoggedOutContactFormLinkFormatting>Contact Us</LoggedOutContactFormLinkFormatting>",description:{text:"This is displayed if there are error sending the recovery code to the user",img:"https://cdn.faire.com/fastly/1646246e95e555c20bd5350ce71cbda26bc9997cadc706a2894f15e51bd62f5d.png"},values:{LoggedOutContactFormLinkFormatting:eE.w}})}),i[0]=e):e=i[0],e}i[1]!==d||i[2]!==c?(t=c(d===ef.i.SMS?{id:"G5ujgH",defaultMessage:"Resend code",description:{text:"Resend MFA code",img:"https://cdn.faire.com/fastly/6bdaf15ce8bfff39f756a9cab119c7fe403cd3c3f2203b01353d24df664dd7dd.png"}}:{id:"vHIkKA",defaultMessage:"Resend email",description:{text:"Resend MFA code by email",img:"https://cdn.faire.com/fastly/09045ea736d0613118b3ae8638b5f3340aef05a47665ed55eb09c20f2fa45282.png"}}),i[1]=d,i[2]=c,i[3]=t):t=i[3];let u=t;return i[4]!==s||i[5]!==u||i[6]!==n?(a=(0,o.jsx)(es.fI,{children:(0,o.jsx)(es.VP,{align:"center",children:n?(0,o.jsx)(_.$,{variant:"plain",onClick:s,children:u}):(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"lbvnwk",defaultMessage:"Code resent. Still didn't receive it? <LoggedOutContactFormLinkWithPETEFormatting>Contact Us</LoggedOutContactFormLinkWithPETEFormatting>",description:{text:"This is displayed after we send a recovery code to users",img:"https://cdn.faire.com/fastly/ed31848f81c881c360af7cfd5634db226c16fe413b29ea4f3d4ab5c075473d4d.png"},values:{LoggedOutContactFormLinkWithPETEFormatting:eT}})})})}),i[4]=s,i[5]=u,i[6]=n,i[7]=a):a=i[7],a};function eA(){return(0,el.x)({eventKey:"signin-too_many_attempts_contact_us-click",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN})}function eT(e){return(0,eE.w)(e,eA)}let ej=e=>!isNaN(parseFloat(e))||""===e,eC=e=>Array.from(e).every(e=>ej(e));var eI=a(611336);let eO=e=>{let t,a,i,r,s,n,d,c,u,g,m,h,f,p,x=(0,l.c)(37),{value:_,numSlots:b,errorMessage:E,errorAll:v,isValidInput:T,validateFn:j,onChange:C,maxWidth:I,disableAutoFocus:O,label:M,ariaLabel:N,clearInput:R}=e,{strictLocalize:L}=(0,k.useStrictLocalization)(),F=b??6;x[0]!==F||x[1]!==_?(t=[..._.split(""),...Array(F).fill("")],x[0]=F,x[1]=_,x[2]=t):t=x[2],x[3]!==F||x[4]!==t?(a=t.slice(0,F),x[3]=F,x[4]=t,x[5]=a):a=x[5];let P=a,[D,K]=(0,A.useState)(P);x[6]!==F?(i=Array(F).fill(null).map(eR),x[6]=F,x[7]=i):i=x[7];let G=i;x[8]!==F||x[9]!==C?(r=(e,t)=>
1{if(0!==t)return;let a=e.clipboardData.getData("text").split("");if(!a.length)return;e.preventDefault();let i=[...a,...Array(F).fill("")].slice(0,F);K(i);let r=i.join("");C?.(r,a.join("")),e.target.value=""},x[8]=F,x[9]=C,x[10]=r):r=x[10];let W=r,U=e=>{G[e]?.current?.focus()};x[11]!==G?(s=e=>{G[e]?.current?.blur()},x[11]=G,x[12]=s):s=x[12];let $=s;x[13]!==$||x[14]!==R||x[15]!==F||x[16]!==_?(n=()=>{R&&""===_&&(K(Array(F).fill("")),$(F-1))},d=[R,F,$,_],x[13]=$,x[14]=R,x[15]=F,x[16]=_,x[17]=n,x[18]=d):(n=x[17],d=x[18]),A.useEffect(n,d),x[19]!==T||x[20]!==G?(c=()=>{T&&G.map(ek)},u=[T,G],x[19]=T,x[20]=G,x[21]=c,x[22]=u):(c=x[21],u=x[22]),A.useEffect(c,u);let V=es.VP;x[23]!==M?(g=M?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y.o5,{children:M}),(0,o.jsx)(w.hK,{height:4})]}):null,x[23]=M,x[24]=g):g=x[24];let B=D.map((e,t)=>(0,o.jsx)(eN,{type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:0===t?"one-time-code":"off",autoFocus:!O&&!D?.[0]?.length&&0===t,value:e,error:!j?.(e)||!0===v,onChange:e=>((e,t)=>{let a=e.target.value;if(a.length>1&&0!==t)return;if(a.length>1){let t=a.split(""),i=[...t,...Array(F).fill("")].slice(0,F);K(i);let r=i.join("");C?.(r,t.join("")),e.target.value="";return}let i=[...D];i[t]=a,K(i),C?.(i.join(""),a),a&&t!==F-1&&U(t+1)})(e,t),onPaste:e=>W(e,t),onClick:()=>U(t),onKeyDown:e=>{if(8===e.keyCode&&!D[t]){e.preventDefault();let a=[...D];a[t-1]="",K(a),C?.(a.join(""),""),U(t-1)}},"aria-label":N?`${N} ${t}`:L({id:"DoNYuH",defaultMessage:"Enter Slot Value {indexNumber}",description:{text:"Accessible name for user to enter slot value"}},{indexNumber:t}),"data-test-id":`input-slot-${t}`,ref:G[t]},t));return x[25]!==eM||x[26]!==I||x[27]!==B?(m=(0,o.jsx)(eM,{$maxWidth:I,children:B}),x[25]=eM,x[26]=I,x[27]=B,x[28]=m):m=x[28],x[29]===Symbol.for("react.memo_cache_sentinel")?(h=(0,o.jsx)(w.hK,{height:"2x"}),x[29]=h):h=x[29],x[30]!==E?(f=E?(0,o.jsx)(y.o5,{color:S.QB.text.critical,children:E}):null,x[30]=E,x[31]=f):f=x[31],x[32]!==V||x[33]!==g||x[34]!==m||x[35]!==f?(p=(0,o.jsxs)(V,{children:[g,m,h,f]}),x[32]=V,x[33]=g,x[34]=m,x[35]=f,x[36]=p):p=x[36],p},eM=(0,eI.Ay)(es.fI).attrs({gap:"4x"}).withConfig({componentId:"sc-edad5a29-0"})(["width:100%;max-width:",";"],e=>e.$maxWidth??"340px"),eN=(0,eI.Ay)(K.Qv).withConfig({componentId:"sc-edad5a29-1"})(["height:48px;padding:11px ",";input{"," text-align:center;}"],(0,w.GY)("2x"),(0,y.uT)({variant:"subheadingSansRegular"}));function eR(){return(0,A.createRef)()}function ek(e){return e.current?.blur()}function eL(){return(0,el.x)({eventKey:"retailer_portal-login_modal_logged_in_with_code-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER})}function eF(){return(0,el.x)({eventKey:"retailer_portal-login_modal_login_with_code-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER})}let eP=({email:e,userToken:t,onComplete:a,onLogin:i})=>{let{strictLocalize:r}=(0,k.useStrictLocalization)(),[s,n]=(0,A.useState)(!0),[l,d]=(0,A.useState)(!1),u=(0,A.useRef)(""),[g,h]=(0,A.useState)(),[f,p]=(0,A.useState)(!1),[_,b]=(0,A.useState)(),{trackFieldValue:S}=ec("ENTER_CODE"),{hCaptchaLogin:E}=X(),v=async()=>{eF(),h(void 0),d(!0);try{let{user:s}=await (0,Y.Ay)(ei.m.build({code:u.current,email_address:e,user_token:e?void 0:t}));if(!s)return void h(new c(r({id:"bw8Bnw",defaultMessage:"Invalid credentials",description:{text:"Email or password that was entered is incorrect"}})));let n=s.missing_password?V.CREATE_PASSWORD:V.LOADING;n===V.LOADING&&(eL(),i(s)),a({nextView:n,loggedInUser:s})}catch{p(!0),b(r({id:"2p8Fco",defaultMessage:"Incorrect code",description:{text:"Verifiction code that was entered is incorrect",img:"https://cdn.faire.com/fastly/500b65aba2a2d3e9acdba9fe58808512d08a58f024d8d9de361c75ec226f0d1a.png"}}))}finally{d(!1)}},T=()=>6===u.current.length&&!_&&!f,j=async()=>{try{await E(ei.m.build({email_address:e,user_token:e?void 0:t,resend:!0})),n(!1),h(void 0)}catch(t){let e=m(t,r);if(e.isAccountExistenceError){n(!1),h(void 0);return}h(e)}};return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"7wIj4L",defaultMessage:"Check your email",description:{text:"User is almost at the end of the log in process, enter the verification code send to their email",img:"https://cdn.faire.com/fastly/1646246e95e555c20bd5350ce71cbda26bc9997cadc706a2894f15e51bd62f5d.png"}})}),(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"a6gC3l",defaultMessage:"If an account exists for {userEmailAddress}, click the link we sent or enter the 6-digit code to sign in without a password.",description:{text:"This refers to the recovery code we send to users who lost/forgot their password. Deliberately conditional so it does not reveal whether the address has a Faire account",img:"https://cdn.faire.com/fastly/1646246e95e555c20bd5350ce71cbda26bc9997cadc706a2894f15e51bd62f5d.png"},values:{userEmailAddress:e}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(eO,{validateFn:ej,onChange:(e,t)=>
1{u.current=e,p(!1),S("verificationCode",e),eC(t)?eC(u.current)&&(b(void 0),T()&&v()):b(r({id:"Wy3Kfu",defaultMessage:"Enter numbers only.",description:{text:"Email or password that was entered is incorrect",img:"https://cdn.faire.com/fastly/52a1bf8c774d8b3fed237efa2a26b2870aeac3cf261e66a7694e6083f7a0398e.png"}}))},errorMessage:_??g?.message,errorAll:f,isValidInput:T(),value:u.current,ariaLabel:r({id:"tkYzhg",defaultMessage:"Enter Emailed Code",description:{text:"Accessible name for prompt for user to enter a code that was sent to their email"}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(ev,{error:g,onResend:j,showResend:s}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)($,{onClick:v,isLoading:l,disabled:!T()})]})};var eD=a(322731),eK=a(387865),eG=a(484544),eW=a(302625),eU=a(20604),e$=a(922349),eV=a(782267),eB=a(262229),ez=a(873326),eH=a(466555),eJ=a(280886);function eY(e=""){return(0,el.x)({eventKey:"retailer_portal-login_modal_enter_email-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER,parameters:{emailType:e}})}var eQ=a(225057),eX=a(592887),eq=a(584245),eZ=a(143803),e0=a(820613),e1=a(866676),e2=a(59745),e4=a(265323),e3=a(733531),e5=a(353113),e6=a(249941),e8=a(423221),e9=a(91976),e7=a(868651),te=a(367029);let tt=({onComplete:e,onLogin:t,defaultEmail:a,signInTitle:i,hideApple:r,isResetPasswordSuccess:s,appModalEnv:n})=>{let{strictLocalize:l}=(0,k.useStrictLocalization)(),{ref:d,focusFirstInvalidField:u}=(0,e0.N)(),[m,h]=(0,A.useState)(a||""),[x,_]=(0,A.useState)(),[b,E]=(0,A.useState)(!1),[v,T]=(0,A.useState)(!1),{fetchHCaptchaToken:C}=(0,z.Z)(),{trackFieldValue:I}=ec("ENTER_EMAIL"),M=(0,e9.useSearchParams)(),N=(0,e9.usePathname)(),L=(0,f.U)(M.toString()).get("error");(0,A.useEffect)(()=>{"USER_NOT_ASSIGNED"===L?_(new c(l({id:"w9vErm",defaultMessage:"User not assigned to okta app, please use AccessBot to request a role",description:{text:"user is not assign to okta app, they should use email and password combination"}}))):L&&_(new c(l({id:"/IyLIU",defaultMessage:"Failed to sign in with Okta, please try again using the okta button",description:{text:"user get error while signin with Okta, they can try again or use email and password combination"}})))},[L,l]);let{modalVariant:F,recordModalSignUpActivity:P}=(0,e7.I)(),{userClickedSSOButton:D,reset:K,isActive:W}=(0,ee.m)(),{setUserHasPassword:B}=(0,Z.l)(),{setProviders:H}=(0,e$.V)(),{errorMessage:J,resetErrorMessage:Y}=(0,eU.o)(),{faireDirectBrand:Q,faireDirectBrandToken:X,faireDirectBrandAlias:q}=(0,eB.h)(),et=e8.hV.parse(M.toString()),ea=(0,eV.k)(),ei=(0,A.useCallback)(async e=>{let t=e3.l.build({user:e5.T.build({email_address:e}),referral_code:ea??void 0});try{await (0,eJ.Ay)(t)}catch{}},[]),er=(0,A.useCallback)(async e=>{var t,a;P();let i=(0,te.J)(et,F,X,Q?.name,q),r={...et,email:e.trim(),source:(0,eD.aA)(N),storeOpeningDate:void 0,...i},s=(0,e8.Ay)(r);t=JSON.stringify(r),a=et.signUp??"",(0,el.x)({eventKey:"signup-direct_signup_on_signin-action_category_click",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_CLICK,parameters:{pathname:N,queryParam2:t,signUpType3:a}}),(0,U.s)("sign-up-page/modal/submit-email/success"),await ei(e),W&&eG.i.clear(),(0,p.Z)().href=s},[P,et,F,X,Q?.name,q,N,ei,W]),es=async e=>{K();try{await C(!0),T(!0);let{email_address_available:t}=await (0,e2.Ay)(e4.B.build({email_address:e.trim()}));if(!t)return void _(new c(l({id:"I4p1eb",defaultMessage:"Invalid email address",description:{text:"Error when user has entered an invalid email"}})));await er(e)}catch(e){eX.Vy.getLogger("SIGNIN").logger.error(e),e instanceof g.x&&(400===e.httpStatusCode||422===e.httpStatusCode)?_(new c(l({id:"I4p1eb",defaultMessage:"Invalid email address",description:{text:"Error when user has entered an invalid email"}}))):_(e)}finally{T(!1)}},en=async()=>{if(!b)try{let t=await ta(m,l,C,H,B,E);_(void 0),e(t)}catch(e){eX.Vy.getLogger("SIGNIN").logger.error(e),_(e),u(["email"])}},eo=A.useCallback(e=>{e&&h(e.value)},[h]),eu=(0,A.useMemo)(()=>(0,eZ.P)(d,eo),[d,eo]),eg=(0,e1.wR)();return(0,o.jsxs)(O.n,{children:[s?(0,o.jsx)(ts,{children:(0,o.jsx)(tn,{children:(0,o.jsx)(y.o5,{color:S.iJ.text.primaryInverse,children:l({
1id:"Z+q9tl",defaultMessage:"Your password has been changed.",description:{text:"Indicates to the user that they successfully reset their password."}})})})}):null,(0,o.jsx)(G,{children:i}),D&&J?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:4}),(0,o.jsx)(y.o5,{color:S.QB.text.critical,role:"alert",align:{mobileAndAbove:"center",desktopAndAbove:"start"},children:J}),(0,o.jsx)(w.hK,{height:"2x"})]}):(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)("form",{className:"contents","data-test-id":"email-form",onSubmit:e=>{e.preventDefault(),en()},children:(0,o.jsx)(eq.k,{type:"email",autoComplete:"email",label:l({id:"jXgcmC",defaultMessage:"Email address",description:{text:"Title for user's email address",img:"https://cdn.faire.com/fastly/0c15ccbd42cd5ef092908073ff6d97566178febed8721a520ad89b0bf9cd94ea.png"}}),"aria-label":l({id:"Y2JOAx",defaultMessage:"Email",description:{text:"Accessible name for user's email address"}}),name:"email",value:m,onChange:e=>{J&&Y(),x&&_(void 0),h(e.currentTarget.value)},onBlur:e=>{I("emailaddress",e.currentTarget.value)},onKeyDown:(0,R.E)(en),"data-test-id":"email",ref:eu})}),x?(0,o.jsxs)("div",{style:{marginTop:"-4px"},children:[(0,o.jsx)(j,{error:x,email:m,onSignUp:es,isSignUpLoading:v}),(0,o.jsx)(w.hK,{size:12})]}):(0,o.jsx)(w.hK,{size:"6x"}),(0,o.jsx)($,{onClick:en,disabled:eg,isLoading:b}),(0,eW.B9)()?(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(eK.H,{onSignIn:a=>{t(a),e({nextView:V.LOADING,user:a})},onSelectMFA:t=>e({nextView:V.SELECT_MFA_OPTION,email:m,mfaOptions:t}),onMFA:(t,a)=>e({nextView:V.ENTER_MFA,mfaDescription:t,mfaTitle:a}),onConfirmPassword:t=>e({...(0,eW.pr)(t),nextView:V.CONFIRM_PASSWORD}),hideApple:r,sourceId:"signin_modal_email_view",isOnSignIn:!0,appModalEnv:n})}):null]})},ta=async(e,t,a,i,r,s)=>{if(""===e.trim())throw new c(t({id:"TeRKOF",defaultMessage:"Please enter your email to continue.",description:{text:"The user did not enter an email address"}}));if(!(0,ez.B9)(e))throw eY("NOT_EMAIL"),new c(t({id:"oA2NHq",defaultMessage:"Enter a valid email to continue.",description:{text:"The email address is not valid, advice on use a valid email"}}));try{s(!0);let{available_social_providers:t,missing_password:n,partial_alias:o,user_token:l,mfa_title:d,mfa_description:c,mfa_options:u}=await a(!0).then(()=>(0,eH.Ay)(eQ.I.build({email_address:e,enable_mfa_method_selection:!0,trigger_m_f_a:!0}))),g=ti(d,c,u,e,l);if(g)return(0,et.J)("EMAIL"),g;let m=V.ENTER_PASSWORD;return(t?.length??0)>0&&(0,eW.B9)()?(t.includes(e6.$.OKTA)?(eY("ADMIN"),m=V.SSO):n?(eY("SSO"),m=V.SSO):m=V.ENTER_PASSWORD,i(t.map(e=>e6.$[e])),r(!n)):n&&(eY("CODE"),m=V.ENTER_CODE),m===V.ENTER_CODE&&await (0,Y.Ay)(ei.m.build({email_address:e})),{nextView:m,userToken:l,obfuscatedEmail:o,email:e}}catch(e){throw m(e,t)}finally{s(!1)}},ti=(e,t,a,i,r)=>{if(e&&t&&r)return a.length>1?{nextView:V.SELECT_MFA_OPTION,mfaTitle:e,mfaDescription:t,mfaOptions:a,email:i,isMFAFromEmail:!0}:{nextView:V.ENTER_MFA,mfaTitle:e,mfaDescription:t,userToken:r,email:i,isMFAFromEmail:!0}},tr=(0,eI.i7)(["0%{opacity:0;transform:translate(0px,-10px);}20%,90%{opacity:1;transform:translate(0px,-10px);}100%{opacity:0;transform:translate(0px,-20px);}"]),ts=eI.Ay.div.withConfig({componentId:"sc-6aaf69bc-0"})(["opacity:1;width:100%;transform:translate(0px,-10px);animation:"," 2200ms linear forwards;"],tr),tn=eI.Ay.div.withConfig({componentId:"sc-6aaf69bc-1"})(["background-color:",";padding:16px;border-radius:8px;max-width:315px;margin:0 auto;text-align:center;"],S.iJ.text.primary);var to=a(474072);let{logger:tl}=eX.Vy.getLogger("SIGNIN"),td=(e,t)=>tl.error(t?`${e} - ${t}`:`Error in SignInController for view: ${e}`);var tc=a(807832),tu=a(575611),tg=a(73049);(s||(s={})).build=e=>e;let{logger:tm}=eX.Vy.getLogger("SIGNIN"),th=e6.$.OKTA,tf=e=>{let{isOnSignIn:t,sourceId:a}=e,{userClickedSSOButton:i,recordSSOButtonClick:r}=(0,ee.m)(),{errorMessage:n,setErrorMessage:l}=(0,eU.o)(),{strictLocalize:d}=(0,k.useStrictLocalization)(),c=(0,e9.useSearchParams)().get("redirectTo"),u=async()=>{if(!i&&n)r();else try{let e,{location:t}=(0,tu.u)(),{hostname:a}=t,i="localhost"===a||/\.faire\.site\.sandboxes\.run$/.test(a)?"LOCALHOST":"BROWSER",n=c??`${t.host}/admin2`,o=s.build({loginType:i,clientRedirectURI:n});t.assign((e=o?`?${tg.stringify(o)}`:"",`/api/okta_sso/authorize${e}`)),r()}catch(e){tm.error(e,{tags:{signInType:"SSO",provider:th,code:"redirect_failed"}}),l(d({id:"eyz2Nq",defaultMessage:"Failed to redirect to Okta SSO.",description:{text:"Error message when failed to redirect to Okta SSO"}}))}};return(0,o.jsx)(tc.S,{onClick:u,socialProvider:th,loading:!1,isOnSignIn:t,sourceId:a})};
1function tp(){return(0,el.x)({eventKey:"retailer_portal-login_modal_logged_in_with_password-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER})}function tx(){return(0,el.x)({eventKey:"retailer_portal-login_modal_magic_link-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER})}function t_(e=""){return(0,el.x)({eventKey:"signin-magic_code-click",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{sign_in_view_string:e}})}function tb(e,t){return(0,el.x)({eventKey:"signin-sign_in_password_submit-click",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{Correctness:e,MFA2:t}})}function tS(e="",t=""){return(0,el.x)({eventKey:"signin-login_with_password-success",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{Sign_in_step_string:e,Login_State_string2:t}})}var tw=a(777633);let ty=async(e,t)=>{try{await t(!0);let{available_social_providers:a}=await (0,eH.Ay)(eQ.I.build({email_address:e}));return a?.includes(e6.$.OKTA)??!1}catch{return!1}},tE=({onComplete:e,onLogin:t,signInTitle:a,defaultEmail:i,hideApple:r,appModalEnv:s})=>{let{strictLocalize:n}=(0,k.useStrictLocalization)(),{ref:l,focusFirstInvalidField:d}=(0,e0.N)(),[u,g]=(0,A.useState)(i??""),[f,p]=(0,A.useState)(""),[b,E]=(0,A.useState)(),[v,j]=(0,A.useState)(!1),[C,I]=(0,A.useState)(),[M,N]=(0,A.useState)(),[L,F]=(0,A.useState)(!1),[P,D]=(0,A.useState)(!1),[K,G]=(0,A.useState)(!1),{hCaptchaLogin:W}=X(),{fetchHCaptchaToken:U}=(0,z.Z)(),{trackFieldValue:B}=ec("ENTER_LOGIN"),{errorMessage:H,resetErrorMessage:J}=(0,eU.o)(),{reset:Y}=(0,ee.m)(),Q=(0,e1.wR)(),q=(0,e9.usePathname)(),Z=(0,e9.useSearchParams)(),en=L||P,eo=n({id:"YRNOph",defaultMessage:"Some of your information is incorrect.",description:{text:"Generic sign-in error that does not reveal whether the email or password was wrong"}}),el=()=>{E(void 0),j(!1),I(void 0),N(void 0),H&&J()},ed=async()=>{if(!en){t_(V.ENTER_LOGIN),el(),D(!0);try{await W(ei.m.build({email_address:u})),tx()}catch(t){let e=m(t,n);if(td("ENTER_LOGIN",e.message),!e.isAccountExistenceError)return void E(e)}finally{D(!1)}e({nextView:V.ENTER_CODE,email:u})}},eu=async()=>{let a;if(en||K)return;if(el(),(0,ez.B9)(u)&&(0,eW.B9)()){F(!0);let e=await ty(u.trim(),U);if(F(!1),G(e),e)return}if(a=!0,""===u.trim()?(I(n({id:"TeRKOF",defaultMessage:"Please enter your email to continue.",description:{text:"The user did not enter an email address"}})),a=!1):(0,ez.B9)(u)||(I(n({id:"oA2NHq",defaultMessage:"Enter a valid email to continue.",description:{text:"The email address is not valid, advice on use a valid email"}})),a=!1),0===f.length&&(N(n({id:"MF++dd",defaultMessage:"Enter a password to continue",description:{text:"Prompt for user to enter password"}})),a=!1),!a){tb("INCORRECT","EMPTY_PASSWORD"),d(["email","password"]);return}let i=u.trim();try{let a=ei.m.build({password:f,email_address:i,enable_mfa_method_selection:!0}
1);F(!0);let{mfa_description:r,mfa_title:s,user:n,mfa_options:o,login_state:l}=await W(a);if(tS(V.ENTER_LOGIN,l),l===er.f.ISSUED_AUTOMATIC_LOGIN_CODE)return void e({nextView:V.AUTO_SIGN_IN_LINK_SENT,password:f,email:i,emailSentScenario:eb.AUTO});if(l===er.f.MFA_METHOD_SELECTION_REQUIRED){tb("MFA_TRIGGERED",l),(0,et.J)("ENTER_LOGIN"),e({nextView:V.SELECT_MFA_OPTION,password:f,email:i,mfaOptions:o,mfaTitle:s,mfaDescription:r});return}if(l===er.f.MFA_REQUIRED){tb("MFA_TRIGGERED",l),(0,et.J)("ENTER_LOGIN"),e({nextView:V.ENTER_MFA,password:f,email:i,mfaDescription:r,mfaTitle:s});return}if(!n){tb("INCORRECT","INVALID_USER"),j(!0);return}if("credentials"in(0,tu.u)().navigator&&"PasswordCredential"in(0,tu.u)()){let e=new PasswordCredential({id:i,password:f});(0,tu.u)().navigator.credentials.store(e).catch(()=>{})}tp(),t(n),tb("CORRECT","NO_MFA"),e({nextView:V.LOADING,user:n})}catch(a){let e,t=m(a,n);td("ENTER_LOGIN",t.message),void 0!==(e=t.httpStatusCode)&&e>=400&&e<500&&429!==e?(tb("INCORRECT","INVALID_PASSWORD"),j(!0)):429===t.httpStatusCode?E(new c(n({id:"wzldCA",defaultMessage:"Exceeded maximum allowed number of login attempts",description:{text:"Error that shows when a user has attempted to log in too many times"}}),t.httpStatusCode)):E(t)}finally{F(!1)}},eg=a=>{t(a),e({nextView:V.LOADING,user:a})},em=t=>e({nextView:V.SELECT_MFA_OPTION,mfaOptions:t}),ef=(t,a)=>e({nextView:V.ENTER_MFA,mfaDescription:t,mfaTitle:a}),ep=t=>e({...(0,eW.pr)(t),nextView:V.CONFIRM_PASSWORD}),ex=A.useCallback(e=>{e&&g(e.value)},[]),e_=(0,A.useMemo)(()=>(0,eZ.P)(l,ex),[l,ex]),eS=(0,A.useMemo)(()=>{let e=Z.get("signIn")??"1",t=e===to.bx?"1":e,a=u.trim(),i=new h.w({pathname:q,search:Z.toString()}).delete("signIn");return i.replace({signUp:t}),a?i.replace({email:a}):i.delete("email"),i.toString()},[u,q,Z]),ew=v||!!C||!!M,ey=(0,ez.B9)(u)&&!K;return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(y.o5,{variant:"displaySSerifRegular",children:a}),H?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:4}),(0,o.jsx)(y.o5,{color:S.QB.text.critical,role:"alert",align:{mobileAndAbove:"center",desktopAndAbove:"start"},children:H}),(0,o.jsx)(w.hK,{height:"2x"})]}):(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsxs)("form",{className:"contents","data-test-id":"login-form",onSubmit:e=>{e.preventDefault(),eu()}
1,children:[(0,o.jsx)(eq.k,{autoFocus:!0,type:"email",autoComplete:"email",label:n({id:"jSUsgB",defaultMessage:"Email address",description:{text:"Title for user's email address"}}),placeholder:n({id:"G2kl3/",defaultMessage:"[email protected]",description:{text:"Placeholder text for the email field on the single-view sign-in modal"}}),"aria-label":n({id:"Y2JOAx",defaultMessage:"Email",description:{text:"Accessible name for user's email address"}}),name:"email",value:u,onChange:e=>{el(),G(!1),g(e.currentTarget.value)},onBlur:e=>{B("emailaddress",e.currentTarget.value)},onKeyDown:(0,R.E)(()=>{eu()}),"data-test-id":"email",ref:e_,error:!!v||C,disabled:en}),C&&!v?(0,o.jsx)(w.hK,{height:"2x"}):(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(ea.y,{label:n({id:"k+WLt7",defaultMessage:"Password",description:{text:"Title for user's password field on the single-view sign-in modal"}}),placeholder:n({id:"Ak8sK7",defaultMessage:"Enter your password",description:{text:"Placeholder text for the password field on the single-view sign-in modal"}}),autoComplete:"current-password",name:"password","data-test-id":"password",value:f,onChange:e=>{el(),p(e.currentTarget.value)},onBlur:()=>{B("userpassword","")},onKeyDown:(0,R.E)(()=>{eu()}),error:v?eo:M,disabled:en})]}),ew?(0,o.jsx)(w.hK,{height:"2x"}):(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)("div",{className:(0,tw.A)("flex justify-center transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-none",ey?"visible translate-y-0 opacity-100":"invisible translate-y-1 opacity-0"),"aria-hidden":!ey,children:(0,o.jsx)(_.$,{variant:"plain",onClick:()=>{ed()},"data-test-id":"send-magic-link-bttn",disabled:Q||en||!ey,loading:P,children:(0,o.jsx)(x.StrictLocalMsg,{id:"WAROQa",defaultMessage:"Email me a code",description:{text:"An option for the user to send an email with a link to authenticate instead of entering password",img:"https://cdn.faire.com/fastly/2efbd879060457573534c5cd8cc91c76c0b8632a90b9e875ffa627fc555203b7.png"}})})}),(0,o.jsx)(w.hK,{height:"4x"}),K?(0,o.jsx)(tf,{onSignIn:eg,onSelectMFA:em,onMFA:ef,onConfirmPassword:ep,sourceId:"signin_modal_login_view",isOnSignIn:!0,appModalEnv:s,disabled:Q||en}):(0,o.jsx)($,{onClick:()=>{eu()},disabled:Q||P,isLoading:L,TextOverride:(0,o.jsx)(x.StrictLocalMsg,{id:"SUDnYw",defaultMessage:"Sign in",description:{text:"Submit email and password and sign in"}})}),(0,o.jsx)(T,{error:b,align:"left",small:!0}),b?null:(0,o.jsx)(w.hK,{height:"4x"}),(0,eW.B9)()?(0,o.jsx)(eK.H,{onSignIn:eg,onSelectMFA:em,onMFA:ef,onConfirmPassword:ep,hideApple:r,sourceId:"signin_modal_login_view",isOnSignIn:!0,separatorPosition:"below",appModalEnv:s,disabled:en}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsxs)(es.fI,{align:"center",children:[(0,o.jsx)(eh.c,{}),(0,o.jsx)(w.hK,{width:"4x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"XBzqWF",defaultMessage:"or",description:{text:"Use 'this' or 'that'"}})}),(0,o.jsx)(w.hK,{width:"4x"}),(0,o.jsx)(eh.c,{})]}),(0,o.jsx)(w.hK,{height:"4x"})]}),(0,o.jsx)(_.$,{variant:"secondary",linkTo:eS,"data-test-id":"sign-up-from-login",disabled:en,onClick:()=>{Y(),J(),eG.i.clear()},children:(0,o.jsx)(x.StrictLocalMsg,{id:"T+CtIj",defaultMessage:"Sign up",description:{text:"Button on the single-view sign-in modal that opens the sign-up flow"}})})]})},tv=({email:e,userToken:t,onComplete:a,onLogin:i,mfaTitle:r,mfaDescription:s,mfaMethod:n,password:l})=>{let{strictLocalize:d}=(0,k.useStrictLocalization)(),[u,g]=(0,A.useState)(!0),[h,f]=(0,A.useState)(!1),p=(0,A.useRef)(""),[_,b]=(0,A.useState)(),[S,E]=(0,A.useState)(!1),{isActive:v,ssoToken:T}=(0,ee.m)(),[j,C]=(0,A.useState)(),{trackFieldValue:I}=ec("ENTER_CODE"),N=async()=>{eF(),b(void 0),f(!0);try{let{user:r}=await (0,Y.Ay)(v?ei.m.build({mfa_code:p.current,sso_token:T,password:l,enable_mfa_method_selection:!0}
1):ei.m.build({mfa_code:p.current,email_address:e,user_token:e?void 0:t,password:l,enable_mfa_method_selection:!0}));if(!r)return void b(new c(d({id:"bw8Bnw",defaultMessage:"Invalid credentials",description:{text:"Email or password that was entered is incorrect"}})));let s=r.missing_password?V.CREATE_PASSWORD:V.LOADING;s===V.LOADING&&(eL(),i(r)),a({nextView:s,loggedInUser:r})}catch{E(!0),C(d({id:"RNH93U",defaultMessage:"Invalid code, please try again",description:{text:"Verifiction code that was entered is incorrect",img:"https://cdn.faire.com/fastly/cad265ff240f88e65f74b31ab9eb0fdf8c8c55bcdd39f08b4b79f423110d5ac1.png"}}))}finally{f(!1)}},R=()=>6===p.current.length&&!j&&!S,L=async()=>{try{await (0,Y.Ay)(ei.m.build({email_address:e,user_token:e?void 0:t,mfa_method:n,resend:!0})),g(!1),b(void 0)}catch(e){b(m(e,d))}};return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",children:r||(0,o.jsx)(x.StrictLocalMsg,{id:"k/hsBX",defaultMessage:"Enter code",description:{text:"title for enter code view",img:"https://cdn.faire.com/fastly/cad265ff240f88e65f74b31ab9eb0fdf8c8c55bcdd39f08b4b79f423110d5ac1.png"}})}),(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{children:s||(0,o.jsx)(x.StrictLocalMsg,{id:"cxpBFc",defaultMessage:"Copy and paste the code in the email we sent to {userTextMessageAddress}",description:{text:"description for enter code view",img:"https://cdn.faire.com/fastly/cad265ff240f88e65f74b31ab9eb0fdf8c8c55bcdd39f08b4b79f423110d5ac1.png"},values:{userTextMessageAddress:e}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(eO,{validateFn:ej,onChange:(e,t)=>
1{p.current=e,E(!1),I("verificationCode",e),eC(t)?eC(p.current)&&(C(void 0),R()&&N()):C(d({id:"Wy3Kfu",defaultMessage:"Enter numbers only.",description:{text:"Email or password that was entered is incorrect",img:"https://cdn.faire.com/fastly/52a1bf8c774d8b3fed237efa2a26b2870aeac3cf261e66a7694e6083f7a0398e.png"}}))},errorMessage:j??_?.message,errorAll:S,isValidInput:R(),value:p.current,ariaLabel:n===ef.i.SMS?d({id:"dB/6on",defaultMessage:"Enter SMS Code",description:{text:"Accessible name for prompt for user to enter a code that was sent to their phone number"}}):d({id:"e4w9ay",defaultMessage:"Enter Email Code",description:{text:"Accessible name for prompt for user to enter a code that was sent to their email address"}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)($,{onClick:N,isLoading:h,disabled:!R()}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(ev,{error:_,onResend:L,showResend:u,mfaMethod:n})]})};var tA=a(707306);let tT=({email:e,password:t,userToken:a,mfaTitle:i,mfaDescription:r,mfaMethod:s,onComplete:n,onLogin:l})=>{let{strictLocalize:d}=(0,k.useStrictLocalization)(),{trackFieldValue:u}=ec("ENTER_MFA"),[g,h]=(0,A.useState)(!1),[f,p]=(0,A.useState)(!0),_=(0,A.useRef)(""),[b,S]=(0,A.useState)(),[E,v]=(0,A.useState)(""),[T,j]=(0,A.useState)(!1),[C,I]=(0,A.useState)(),[N,R]=(0,A.useState)(!1),[L,F]=(0,A.useState)(!0),{isActive:P,ssoToken:D}=(0,ee.m)(),K=e=>{_.current=e},G=async()=>{let i=s??ef.i.EMAIL_ADDRESS;try{P?await (0,Y.Ay)(ei.m.build({sso_token:D,resend:!0,password:E||t,enable_mfa_method_selection:!0,mfa_method:i})):await (0,Y.Ay)(ei.m.build({email_address:e,user_token:e?void 0:a,resend:!0,password:E||t,enable_mfa_method_selection:!0,mfa_method:i})),p(!1)}catch(e){td("ENTER_MFA",m(e,d).message),S(m(e,d)),j(!1)}},W=async()=>{let i=P?ei.m.build({mfa_code:_.current,sso_token:D,password:E||t,enable_mfa_method_selection:!0,should_suppress_future_mfa:L}):ei.m.build({mfa_code:_.current,email_address:e,user_token:e?void 0:a,password:E||t,enable_mfa_method_selection:!0,should_suppress_future_mfa:L}),{user:r}=await (0,Y.Ay)(i);return r},U=async()=>{(0,el.x)({eventKey:"retailer_portal-login_modal_login_with_second_factor-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER}),S(void 0),h(!0);try{let e=await W();if(!e)return void S(new c(d({id:"bw8Bnw",defaultMessage:"Invalid credentials",description:{text:"Email or password that was entered is incorrect"}})));let t=e.missing_password&&!P?V.CREATE_PASSWORD:V.LOADING;t===V.LOADING&&((0,el.x)({eventKey:"retailer_portal-login_modal_logged_in_with_second_factor-action_unknown",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_OTHER}),l(e)),n({nextView:t,loggedInUser:e}),R(!1)}catch(t){let e=m(t,d);td("ENTER_MFA",e.message),v(""),K(""),400===e.httpStatusCode&&S(new c(d({id:"vaoEgc",defaultMessage:"Invalid code",description:{text:"Error message shown to user if they enter the wrong code on MFA"}}))),j(!1),h(!1),R(!0)}},B=()=>6===_.current.length&&!C&&!T;return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",align:"left",children:i||(0,o.jsx)(x.StrictLocalMsg,{id:"k/hsBX",defaultMessage:"Enter code",description:{text:"title for enter code view",img:"https://cdn.faire.com/fastly/cad265ff240f88e65f74b31ab9eb0fdf8c8c55bcdd39f08b4b79f423110d5ac1.png"}})}),(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{align:"left",children:r}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(eO,{validateFn:ej,onChange:(e,t)=>
1{K(e),j(!1),S(void 0),u("mfaCode",e),eC(t)?eC(_.current)&&(I(void 0),B()&&U()):I(d({id:"Wy3Kfu",defaultMessage:"Enter numbers only.",description:{text:"Email or password that was entered is incorrect",img:"https://cdn.faire.com/fastly/52a1bf8c774d8b3fed237efa2a26b2870aeac3cf261e66a7694e6083f7a0398e.png"}}))},errorMessage:C??b?.message,isValidInput:B(),errorAll:T,value:_.current,ariaLabel:d({id:"wR3iLI",defaultMessage:"Enter Verification Code",description:{text:"Verification input label to prompt user to enter the 6-digit code sent to their preferred MFA choice"}}),clearInput:N}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(ev,{onResend:G,showResend:f,mfaMethod:s}),(0,o.jsx)(tj,{checked:L,onChange:()=>F(!L),label:d({id:"+vXkNO",defaultMessage:"Don't ask again for 30 days",description:{text:"Checkbox that asks if users want to disable future MFA verification attempts on the device they're using for 30 days.",img:"https://cdn.faire.com/fastly/62094b94211d2afe8c2fe8d6bb370a1043e1920b39aa4fd585c61b098abb937e.png"}})}),(0,o.jsx)(w.hK,{height:"8x"}),(0,o.jsx)($,{onClick:U,isLoading:g,disabled:!B()})]})},tj=e=>{let t,a=(0,l.c)(2);return a[0]!==e?(t=(0,o.jsx)("div",{className:"mt-4",children:(0,o.jsx)(tA.S,{...e})}),a[0]=e,a[1]=t):t=a[1],t},tC=function(e,t){let a,i=((a=t?.headers??new Headers).has("content-type")||a.set("content-type","application/json"),{route:"/api/user/reset-password",service:"backend",url:"/api/user/reset-password",method:"POST",data:e,doNotLogRequest:!0,...t,headers:a});return(0,L.E)(i)},tI=function(e,t,a){let i,r=((i=a?.headers??new Headers).has("content-type")||i.set("content-type","application/json"),{route:"/api/user/reset-password/:user_token",service:"backend",url:`/api/user/reset-password/${e}`,method:"POST",data:t,...a,headers:i});return(0,L.E)(r)};function tO(e,t=""){return(0,el.x)({eventKey:"signin-reset_password-success",realTimeTracking:!1,priority:ed.T.Priority.EXTRA_LOW,actionCategory:ed.T.ActionCategory.ACTION_CATEGORY_UNKNOWN,parameters:{sign_in_step_string:e,Reset_Method_string2:t}})}(n||(n={})).build=e=>({...e??{}});let tM=({signInTitle:e,defaultEmail:t,userToken:a,withEmail:i,sendResetEmail:r,onComplete:s,onLogin:l,autoFocus:d=!0})=>{let{strictLocalize:u}=(0,k.useStrictLocalization)(),[g,h]=(0,A.useState)(""),[f,p]=(0,A.useState)(),[b,S]=(0,A.useState)(0),[E,v]=(0,A.useState)(void 0),[j,C]=(0,A.useState)(!1),{fetchHCaptchaToken:I}=(0,z.Z)(),{trackFieldValue:M}=ec("ENTER_PASSWORD"),{isActive:N}=(0,ee.m)(),{userHasPassword:L}=(0,Z.l)(),F=(0,A.useCallback)(async()=>0!==g.length||(v(u({id:"MF++dd",defaultMessage:"Enter a password to continue",description:{text:"Prompt for user to enter password"}})),!1),[g.length,u]),P=(0,A.useCallback)(async e=>{if(!(0,ez.B9)(e))return;let t=u({id:"RdPpZr",defaultMessage:"No associated retailer with email address",description:{text:"Error showing the user that no retailer exists for the entered email address"}});if(i)try{C(!0);let t=await I(!0).then(()=>(0,eH.Ay)(eQ.I.build({email_address:e}))),a=t.user_token;a?(await tI(a,n.build({})),tO(V.ENTER_LOGIN,"LOGIN_DATA_USER_TOKEN")):(await tC(eQ.I.build({email_address:e})),tO(V.ENTER_LOGIN,"LOGIN_DATA_EMAIL_ADDRESS")),s({nextView:V.RESET_PASSWORD,userToken:a,email:e,obfuscatedEmail:t.partial_alias})}catch(e){eX.Vy.getLogger("SIGNIN").logger.error(e),p(m(e,u))}finally{C(!1)}else if(a)try{C(!0),await tI(a,n.build({})),tO(V.ENTER_LOGIN,"USER_TOKEN"),s({nextView:V.RESET_PASSWORD})}catch(e){p(m(e,u))}finally{C(!1)}else if(e)try{C(!0),await tC(eQ.I.build({email_address:e})),tO(V.ENTER_LOGIN,"EMAIL_ADDRESS"),s({nextView:V.RESET_PASSWORD})}catch(e){p(m(e,u))}finally{C(!1)}else p(new c(t))},[u,i,a,I,s]);(0,A.useEffect)(()=>{i&&(eY("PASSWORD"),r&&P(t))},[i,t,r,P]),(0,A.useEffect)(()=>{N&&!L&&td("ENTER_PASSWORD","Wrong view for SSO user without password")},[N,L]);let D=async()=>{if(t_(V.ENTER_PASSWORD),(0,ez.B9)(t))try{C(!0),await (0,Y.Ay)(ei.m.build({email_address:t,user_token:t?void 0:a})),tx(),s({nextView:V.ENTER_CODE,email:t})}catch(e){p(m(e,u))}finally{C(!1)}},K=async()=>{let e=await F();if(!(0,ez.B9)(t)||!e)return void tb("INCORRECT","EMPTY_PASSWORD");try{let e=ei.m.build({password:g,email_address:t,user_token:t?void 0:a,enable_mfa_method_selection:!0}
1);C(!0);let{mfa_description:i,mfa_title:r,user:n,mfa_options:o,login_state:d}=await W(e);if(tS(V.ENTER_LOGIN,d),d===er.f.ISSUED_AUTOMATIC_LOGIN_CODE)return void s({nextView:V.AUTO_SIGN_IN_LINK_SENT,password:g,email:t,userToken:a,emailSentScenario:eb.AUTO});if(d===er.f.MFA_METHOD_SELECTION_REQUIRED){tb("MFA_TRIGGERED",d),(0,et.J)("ENTER_PASSWORD"),s({nextView:V.SELECT_MFA_OPTION,password:g,userToken:a,mfaOptions:o,mfaTitle:r,mfaDescription:i});return}if(d===er.f.MFA_REQUIRED){tb("MFA_TRIGGERED",d),(0,et.J)("ENTER_PASSWORD"),s({nextView:V.ENTER_MFA,password:g,mfaDescription:i,mfaTitle:r});return}if(!n){tb("INCORRECT","INVALID_USER"),p(new c(u({id:"bw8Bnw",defaultMessage:"Invalid credentials",description:{text:"Email or password that was entered is incorrect"}})));return}if("credentials"in(0,tu.u)().navigator&&"PasswordCredential"in(0,tu.u)()){let e=new PasswordCredential({id:t,password:g});(0,tu.u)().navigator.credentials.store(e).catch(()=>{})}tp(),l(n),tb("CORRECT","NO_MFA"),s({nextView:V.LOADING})}catch(a){let e=m(a,u);td("ENTER_PASSWORD",e.message);let t=400===e.httpStatusCode;t&&tb("INCORRECT","INVALID_PASSWORD"),429===e.httpStatusCode?p(new c(u({id:"wzldCA",defaultMessage:"Exceeded maximum allowed number of login attempts",description:{text:"Error that shows when a user has attempted to log in too many times"}}))):t&&b>0?v(u({id:"PHTcwX",defaultMessage:"Incorrect password",description:{text:"This error shows the password is not correct"}})):t?(S(e=>e+1),v(u({id:"NxodaO",defaultMessage:"Incorrect password, please try again",description:{text:"This error shows the password is not correct and advice user to try again"}}))):p(e)}finally{C(!1)}},{hCaptchaLogin:W}=X();return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(G,{children:e}),i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{truncate:!0,className:"w-full min-w-0",title:t,children:t}),(0,o.jsx)(w.hK,{height:"6x"})]}):null,(0,o.jsxs)("form",{className:"contents","data-test-id":"password-form",onSubmit:e=>{e.preventDefault(),K()},children:[(0,o.jsx)("input",{className:"pointer-events-none absolute h-0 w-0 opacity-0",type:"email",autoComplete:"username",value:t,readOnly:!0,tabIndex:-1,"aria-hidden":"true"}),(0,o.jsx)(ea.y,{label:u({id:"7teRwl",defaultMessage:"Password",description:{text:"Title for user's email address",img:"https://cdn.faire.com/fastly/9b74aae6cbf3213e23a54a9d0741c9cb9022c95658c97d9df588161c11b15a9c.png"}}),autoFocus:d,autoComplete:"current-password",name:"password","data-test-id":"password",value:g,onChange:e=>{v(void 0),p(void 0),h(e.currentTarget.value)},onBlur:()=>{M("userpassword","")},onKeyDown:(0,R.E)(K),error:E})]}),E?(0,o.jsx)(w.hK,{height:"2x"}):(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)($,{onClick:K,isLoading:j,TextOverride:(0,o.jsx)(x.StrictLocalMsg,{id:"MfO/qT",defaultMessage:"Sign in",description:{text:"Submit password and sign in"}})}),(0,o.jsx)(T,{error:f,align:"left",small:!0}),f?null:(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsxs)(es.fI,{align:"center",children:[(0,o.jsx)(eh.c,{}),(0,o.jsx)(w.hK,{width:"4x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"XBzqWF",defaultMessage:"or",description:{text:"Use 'this' or 'that'"}})}),(0,o.jsx)(w.hK,{width:"4x"}),(0,o.jsx)(eh.c,{})]}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(_.$,{variant:"secondary",onClick:D,"data-test-id":"send-magic-link-bttn",disabled:j,children:(0,o.jsx)(x.StrictLocalMsg,{id:"WAROQa",defaultMessage:"Email me a code",description:{text:"An option for the user to send an email with a link to authenticate instead of entering password",img:"https://cdn.faire.com/fastly/2efbd879060457573534c5cd8cc91c76c0b8632a90b9e875ffa627fc555203b7.png"}})})]})},tN=()=>{let e,t,a,i,r,s,n=(0,l.c)(7),{reset:d}=(0,ee.m)();return n[0]!==d?(e=()=>{d()},t=[d],n[0]=d,n[1]=e,n[2]=t):(e=n[1],t=n[2]),(0,A.useEffect)(e,t),n[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(w.w6,{}),n[3]=a):a=n[3],n[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)(y.o5,{id:M,variant:"pageHeaderSerifRegular",align:"center",children:(0,o.jsx)(x.StrictLocalMsg,{id:"J3h8rY",defaultMessage:"Setting up shop...",description:{text:"Text to indicating completing the registration process and loading the shop"}})}),r=(0,o.jsx)(w.hK,{height:"4x"}),n[4]=i,n[5]=r):(i=n[4],r=n[5]),n[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsxs)(O.n,{children:[a,i,r,(0,o.jsx)("div",{className:"self-center",children:(0,o.jsx)(D.k,{size:"xLarge"})}),(0,o.jsx)(w.w6,{})]}
1),n[6]=s):s=n[6],s};var tR=a(321411);let tk=e=>{let t,a,i,r,s,d,u,g,h=(0,l.c)(18),{userToken:f,emailAddress:p}=e,{strictLocalize:_}=(0,k.useStrictLocalization)(),[b,S]=(0,A.useState)(!0),[E,v]=(0,A.useState)();h[0]!==p||h[1]!==_||h[2]!==f?(t=async()=>{try{f?await tI(f,n.build({resend:!0})):p?await tC(eQ.I.build({email_address:p,resend:!0})):v(new c(_({id:"M3tiKi",defaultMessage:"Email address not available. Please contact support.",description:{text:"Error message if email address is not avaiable."}}))),S(!1)}catch(e){v(m(e,_))}},h[0]=p,h[1]=_,h[2]=f,h[3]=t):t=h[3];let j=t;return h[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsx)(w.w6,{}),h[4]=a):a=h[4],h[5]!==b?(i=(0,o.jsx)(y.o5,{id:M,variant:"pageHeaderSerifRegular","data-test-id":"check-email-prompt-header",children:b?(0,o.jsx)(x.StrictLocalMsg,{id:"M0KgNU",defaultMessage:"Check your email",description:{text:"An email has been sent to let users reset their password"}}):(0,o.jsx)(x.StrictLocalMsg,{id:"dr4/LJ",defaultMessage:"Sent!",description:{text:"Let the user know that an email containing instructions has been sent"}})}),h[5]=b,h[6]=i):i=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,o.jsx)(w.hK,{height:"2x"}),h[7]=r):r=h[7],h[8]!==j||h[9]!==b?(s=(0,o.jsx)(y.o5,{children:b?(0,o.jsx)(x.StrictLocalMsg,{id:"xVPevm",defaultMessage:"We just sent you instructions for resetting your password. Didn't get it? <Link>Resend Email</Link>",values:(0,tR.j)({Link:e=>(0,o.jsx)(en.L,{onClick:j,children:e})})}):(0,o.jsx)(x.StrictLocalMsg,{id:"4iObSF",defaultMessage:"Still not seeing the email? <ContactFormLinkFormatting>Let Us Know</ContactFormLinkFormatting>",values:{ContactFormLinkFormatting:eE.S}})}),h[8]=j,h[9]=b,h[10]=s):s=h[10],h[11]!==E?(d=(0,o.jsx)(T,{error:E}),h[11]=E,h[12]=d):d=h[12],h[13]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(w.w6,{}),h[13]=u):u=h[13],h[14]!==i||h[15]!==s||h[16]!==d?(g=(0,o.jsxs)(O.n,{children:[a,i,r,s,d,u]}),h[14]=i,h[15]=s,h[16]=d,h[17]=g):g=h[17],g};var tL=a(428839);let tF=e=>{let t,a,i,r,s=(0,l.c)(13),{onClick:n,title:d,value:c,label:u,active:g,ariaLabel:m}=e,h=u??d,f=m??d;return s[0]!==d?(t=(0,o.jsx)(y.o5,{children:d}),s[0]=d,s[1]=t):t=s[1],s[2]!==c?(a=(0,o.jsx)(y.o5,{color:S.iJ.text.subdued,className:"truncate whitespace-nowrap",children:c}),s[2]=c,s[3]=a):a=s[3],s[4]!==t||s[5]!==a?(i=(0,o.jsxs)(es.VP,{className:"w-[calc(100%-10px)] px-2 py-0",children:[t,a]}),s[4]=t,s[5]=a,s[6]=i):i=s[6],s[7]!==g||s[8]!==n||s[9]!==h||s[10]!==f||s[11]!==i?(r=(0,o.jsx)(tL.R,{label:h,align:"flex-start","aria-label":f,onClick:n,active:g,className:"w-full [&_label]:w-full",children:i}),s[7]=g,s[8]=n,s[9]=h,s[10]=f,s[11]=i,s[12]=r):r=s[12],r};var tP=a(548793);let tD=({email:e,mfaOptions:t,userToken:a,password:i,onComplete:r,onLogin:s,isMFAFromEmail:n})=>{let{strictLocalize:l}=(0,k.useStrictLocalization)(),{isMobile:d}=(0,tP.k)(),c=(0,A.useMemo)(()=>{if(d){let e=ef.i.SMS;if(!t.some(t=>t.method===e))return t;let a=t.findIndex(t=>t.method===e),i=t.slice(),[r]=i.splice(a,1);return r&&i.unshift(r),i}return t},[d,t]),[u,g]=(0,A.useState)(c?.[0]?.method),{isActive:h,ssoToken:f}=(0,ee.m)(),p=async()=>{try{let t=h?ei.m.build({mfa_method:u,sso_token:f,password:i,enable_mfa_method_selection:!0}
1):ei.m.build({password:i,email_address:e,user_token:e?void 0:a,mfa_method:u,enable_mfa_method_selection:!0}),{mfa_description:o,mfa_title:l,login_state:d,user:c}=await (0,Y.Ay)(t);if(d===er.f.MFA_REQUIRED)return void r({nextView:V.ENTER_MFA,mfaDescription:o,mfaTitle:l,mfaMethod:u,isMFAFromEmail:n});r({nextView:V.LOADING}),c&&s(c)}catch(e){throw m(e,l)}};return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(y.o5,{id:M,variant:"displaySSerifRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"INjXDu",defaultMessage:"Verify it’s you",description:{text:"MFA selection title above messaging around account safety and MFA reasoning",img:"https://cdn.faire.com/fastly/a4c66c67a9cc5976a311ca198ef39774593ac01e6579237d08a859071d3bf505.png"}})}),(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"f0BZyj",defaultMessage:"To keep your account safe, we want to make sure it’s really you. How would you like to receive your verification code?",description:{text:"MFA messaging around account safety and MFA reasoning below title",img:"https://cdn.faire.com/fastly/a4c66c67a9cc5976a311ca198ef39774593ac01e6579237d08a859071d3bf505.png"}})}),(0,o.jsx)(w.hK,{height:"6x"}),(0,o.jsx)(es.VP,{gap:"4x",children:c.map(({method:e,name:t,value:a})=>e!==ef.i.MFA_METHOD_UNKNOWN?(0,o.jsx)(es.fI,{children:(0,o.jsx)(tF,{active:u===e,title:t,value:a,onClick:()=>g(e)})},e):null)}),(0,o.jsx)(w.hK,{height:"8x"}),(0,o.jsx)($,{onClick:p,disabled:!u,fullWidth:!0})]})};var tK=a(663244),tG=a(123515),tW=a(897353),tU=a(906014);let t$=e=>{let t,a,i,r=(0,l.c)(33),{provider:s,onFinish:n,onLogin:d,onConfirmPassword:c,sourceId:u,appModalEnv:g}=e;(0,tW.r)(!0);let m=(0,tU.T)();r[0]!==n||r[1]!==d?(t=e=>{d(e),n({nextView:V.LOADING,user:e})},r[0]=n,r[1]=d,r[2]=t):t=r[2];let h=t;r[3]!==n?(a=e=>{n({nextView:V.SELECT_MFA_OPTION,mfaOptions:e})},r[3]=n,r[4]=a):a=r[4];let f=a;r[5]!==n?(i=(e,t)=>{n({nextView:V.ENTER_MFA,mfaTitle:t,mfaDescription:e})},r[5]=n,r[6]=i):i=r[6];let p=i;switch(s){case e6.$.GOOGLE:{let e,t;r[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"6x"}),r[7]=e):e=r[7];let a=m?tG.p.GIS:tG.p.OAUTH;return r[8]!==g||r[9]!==c||r[10]!==p||r[11]!==f||r[12]!==h||r[13]!==u||r[14]!==a?(t=(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(tG.l,{onSignIn:h,onMFA:p,onSelectMFA:f,onConfirmPassword:c,sourceId:u,isOnSignIn:!0,appModalEnv:g,variant:a})]}),r[8]=g,r[9]=c,r[10]=p,r[11]=f,r[12]=h,r[13]=u,r[14]=a,r[15]=t):t=r[15],t}case e6.$.APPLE:{let e,t;return r[16]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"6x"}),r[16]=e):e=r[16],r[17]!==g||r[18]!==m||r[19]!==c||r[20]!==p||r[21]!==f||r[22]!==h||r[23]!==u?(t=(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(tK.K,{onSignIn:h,onMFA:p,onSelectMFA:f,onConfirmPassword:c,matchGISButtonLayout:m,sourceId:u,isOnSignIn:!0,appModalEnv:g})]}),r[17]=g,r[18]=m,r[19]=c,r[20]=p,r[21]=f,r[22]=h,r[23]=u,r[24]=t):t=r[24],t}case e6.$.OKTA:{let e,t;return r[25]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(w.hK,{height:"6x"}
1),r[25]=e):e=r[25],r[26]!==g||r[27]!==c||r[28]!==p||r[29]!==f||r[30]!==h||r[31]!==u?(t=(0,o.jsxs)(o.Fragment,{children:[e,(0,o.jsx)(tf,{onSignIn:h,onMFA:p,onSelectMFA:f,onConfirmPassword:c,sourceId:u,isOnSignIn:!0,appModalEnv:g})]}),r[26]=g,r[27]=c,r[28]=p,r[29]=f,r[30]=h,r[31]=u,r[32]=t):t=r[32],t}default:return null}},tV=({email:e,userToken:t,onComplete:a,onLogin:i,appModalEnv:r})=>{let{strictLocalize:s}=(0,k.useStrictLocalization)(),[l,d]=(0,A.useState)(),{fetchHCaptchaToken:c}=(0,z.Z)(),{errorMessage:u}=(0,eU.o)(),{providers:g,resetProviders:h}=(0,e$.V)(),{userHasPassword:f}=(0,Z.l)(),{userClickedSSOButton:p,setPromptSSO:E}=(0,ee.m)();(0,A.useEffect)(()=>{f&&td("SSO","Wrong view for user with password")},[f]);let v=(0,A.useCallback)(e=>{a(e),h(),E(!1)},[a,h,E]),T=()=>{},j=async()=>{try{if(t)await tI(t,n.build({}));else{let t=(await c(!0).then(()=>(0,eH.Ay)(eQ.I.build({email_address:e})))).user_token;await tI(t??"",n.build({}))}}catch(t){let e=m(t,s);eX.Vy.getLogger("SIGNIN").logger.error(e),d(e)}v({nextView:V.RESET_PASSWORD})},C=p?u:l?.message;X();let I=(0,A.useCallback)(e=>(0,o.jsx)(b.N,{linkTo:"/?signIn=1",onClick:()=>{v({nextView:V.ENTER_EMAIL,email:""})},children:e}),[v]),N=(0,A.useCallback)(e=>(0,o.jsx)(b.N,{linkTo:"/?signIn=1",onClick:()=>{v({nextView:V.ENTER_PASSWORD})},children:e}),[v]),R=g.includes(e6.$.OKTA);return(0,o.jsxs)(O.n,{children:[(0,o.jsx)(w.w6,{}),(0,o.jsx)(y.o5,{id:M,variant:"pageHeaderSerifRegular",children:(0,o.jsx)(x.StrictLocalMsg,{id:"EGtxkH",defaultMessage:"Welcome back!",description:{text:"Welcoming a returning user"}})}),(0,o.jsx)(w.hK,{height:"2x"}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"ioYkeA",defaultMessage:"Continue as {email}",description:{text:"Continue to sign in as the person behind this email"},values:(0,tR.j)({email:e})})}),(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"6ptCJH",defaultMessage:"Not you? <Link>Choose a different account</Link>",values:(0,tR.j)({Link:I})})}),R&&(0,o.jsx)(y.o5,{children:(0,o.jsx)(x.StrictLocalMsg,{id:"uJ/GbX",defaultMessage:"Want to login with a password? <LinkUsePwdCallBackFormatting>Use password</LinkUsePwdCallBackFormatting>",values:{LinkUsePwdCallBackFormatting:N},description:{text:"On the login page when suggesting a single-sign-on option, ask the user if they would prefer to use a password instead."}})}),C?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w.hK,{height:"4x"}),(0,o.jsx)(y.o5,{color:S.QB.text.critical,role:"alert",align:"center",children:C}),(0,o.jsx)(w.hK,{height:"6x"})]}):null,g.map((e,t)=>(0,o.jsx)(t$,{provider:e,onFinish:v,onLogin:i,onConfirmPassword:T,sourceId:"sign_in_modal_sso_view",appModalEnv:r},t)),(0,o.jsx)(w.hK,{height:"4x"}),f?null:(0,o.jsx)(_.$,{variant:"plain",onClick:j,children:(0,o.jsx)(x.StrictLocalMsg,{id:"SkPsmn",defaultMessage:"Reset Password",description:{text:"Call to action to reset password to newly entered password"}})}),(0,o.jsx)(w.w6,{})]})};var tB=a(989496),tz=a(847807),tH=a(722944);let tJ=(0,a(771729).J)({name:"FE_HIDE_ACCOUNT_EXISTENCE_SIGN_IN_260717",identifier:"SessionToken",defaultValue:!1,client:["RETAILER","VISITOR_WEB"],productArea:"LOGGED_OUT_RETAILERS",notifyAfter:"2026-10-17"});var tY=a(5536),tQ=a(314992),tX=a(584094),tq=a(387435),tZ=a(659502),t0=a(432750),t1=a.n(t0);let t2=e=>{let t,a,i,r,s,n,d,c,g,m,h,f,p,x,_,b,S,w,y=(0,l.c)(141),{onLogin:E,sendResetEmail:v,signInTitle:T,hideApple:j,isResetPasswordSuccess:C,appModalEnv:I}=e,{strictLocalize:O}=(0,k.useStrictLocalization)(),M=(0,e9.useSearchParams)(),N=(0,e9.usePathname)(),R=(0,tX.r)(),L=(0,tY.k)(tJ),F=(0,tH.useAssignSetting)(tJ);y[0]!==L||y[1]!==C||y[2]!==M||y[3]!==v?(t=(({hideAccountExistenceSignIn:e,sendResetEmail:t,isResetPasswordSuccess:a,hasOktaError:i})=>({shouldUseEnterLoginView:e&&!t&&!a&&!i,shouldUseEnterEmailView:e&&(!!a||i)}))({hideAccountExistenceSignIn:L,sendResetEmail:v,isResetPasswordSuccess:C,hasOktaError:M.has("error")}),y[0]=L,y[1]=C,y[2]=M,y[3]=v,y[4]=t):t=y[4];let{shouldUseEnterLoginView:P,shouldUseEnterEmailView:D}=t;y[5]!==O?(a=O({id:"KtSe1Q",defaultMessage:"Sign in to Faire",description:{text:"Title for control sign in modal - variant 1: Sign in to Faire",img:"https://cdn.faire.com/fastly/0072fcb175c20e48165547f439b4aff79c07578eca4c057ce51e974b28ea9702.png"}}),y[5]=O,y[6]=a):a=y[6];let K=a;y[7]!==O?(i=O({id:"CAZpRL",defaultMessage:"Welcome back",description:{text:"Title that welcomes the user back to the site.",img:"https://cdn.faire.com/fastly/90182d874d2c3b5b3db7edf81e2f76daac27a669af9a1eecc44eb385627ccb50.png"}}),y[7]=O,y[8]=i):i=y[8];let G=i;y[9]!==e.email||y[10]!==D||y[11]!==P?(r=()=>({view:(({shouldUseEnterLoginView:e,shouldUseEnterEmailView:t,hasEmail:a})=>e?V.ENTER_LOGIN:t||!a?V.ENTER_EMAIL:V.ENTER_PASSWORD)({shouldUseEnterLoginView:P,shouldUseEnterEmailView:D,hasEmail:!!e.email}),email:e.email??"",password:"",loggedInUser:null,profileImage:tq.D.build()}
1),y[9]=e.email,y[10]=D,y[11]=P,y[12]=r):r=y[12];let[W,$]=(0,A.useState)(r);X(),y[13]!==F?(s=()=>{F()},n=[F],y[13]=F,y[14]=s,y[15]=n):(s=y[14],n=y[15]),(0,A.useEffect)(s,n),y[16]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{let t=t1()(e,t4);$(e=>({...e,...t}))},y[16]=d):d=y[16];let B=d;y[17]!==N||y[18]!==R||y[19]!==M?(c=e=>{let t=new URLSearchParams(M);t.has("error")&&t.delete("error");let a=t.toString(),i=a?`${N}?${a}`:N;return R.replace(i),B({...t1()({view:e.nextView,loggedInUser:e.user},t3),...e})},y[17]=N,y[18]=R,y[19]=M,y[20]=c):c=y[20];let z=c,{promptSSO:H,signUpSuggestions:J}=(0,ee.m)(),{showSelectMFA:Y,mfaOptions:Q,mfaTitle:q,mfaDescription:et,resetMFADescription:ea,resetMFATitle:ei,resetMFAOptions:er}=(0,tQ.u)(),{showConfirmPasswordView:es,userHasPassword:en}=(0,Z.l)(),{trackView:el}=ec(W.view);y[21]!==el?(g=()=>{(0,U.s)("/login-modal"),tz.J.get().mark(tB.A.firstMeaningfulPaint),el()},m=[el],y[21]=el,y[22]=g,y[23]=m):(g=y[22],m=y[23]),(0,A.useEffect)(g,m),y[24]!==L||y[25]!==H||y[26]!==e.email||y[27]!==P||y[28]!==W.email||y[29]!==W.view||y[30]!==en?(h=()=>{H?en?B({view:V.SSO,email:W.email||e.email||""}):(W.email||e.email)&&B({view:P?V.ENTER_LOGIN:V.ENTER_PASSWORD,email:W.email||e.email||""}):!L&&(W.email||e.email)&&W.view===V.ENTER_EMAIL&&B({view:V.ENTER_PASSWORD,email:W.email||e.email||""})},f=[H,en,W.email,e.email,W.view,L,P],y[24]=L,y[25]=H,y[26]=e.email,y[27]=P,y[28]=W.email,y[29]=W.view,y[30]=en,y[31]=h,y[32]=f):(h=y[31],f=y[32]),(0,A.useEffect)(h,f),y[33]!==Y||y[34]!==Q?(p=()=>{Y&&B({view:V.SELECT_MFA_OPTION,mfaOptions:Q})},x=[Y,Q],y[33]=Y,y[34]=Q,y[35]=p,y[36]=x):(p=y[35],x=y[36]),(0,A.useEffect)(p,x),y[37]!==et||y[38]!==q?(_=()=>{et&&B({view:V.ENTER_MFA,mfaDescription:et,mfaTitle:q})},b=[et,q],y[37]=et,y[38]=q,y[39]=_,y[40]=b):(_=y[39],b=y[40]),(0,A.useEffect)(_,b),y[41]!==es||y[42]!==J?(S=()=>{if(es){let{email:e,userName:t,profileImage:a}=(0,eW.pr)(J);B({view:V.CONFIRM_PASSWORD,email:e,userName:t,profileImage:a})}},w=[es,J],y[41]=es,y[42]=J,y[43]=S,y[44]=w):(S=y[43],w=y[44]),(0,A.useEffect)(S,w);let{view:ed,email:eu,password:eg,mfaDescription:eh,mfaOptions:ef,mfaTitle:ep,mfaMethod:ex,userToken:e_,loggedInUser:eb,profileImage:eS,userName:eE,isMFAFromEmail:ev,emailSentScenario:eA}=W;switch(ed){case V.ENTER_LOGIN:{let e,t=T??K;return y[45]!==I||y[46]!==eu||y[47]!==j||y[48]!==z||y[49]!==E||y[50]!==t?(e=(0,o.jsx)(tE,{defaultEmail:eu,onComplete:z,onLogin:E,signInTitle:t,hideApple:j,appModalEnv:I}),y[45]=I,y[46]=eu,y[47]=j,y[48]=z,y[49]=E,y[50]=t,y[51]=e):e=y[51],e}case V.ENTER_EMAIL:{let e,t=T??K;return y[52]!==I||y[53]!==eu||y[54]!==j||y[55]!==C||y[56]!==z||y[57]!==E||y[58]!==t?(e=(0,o.jsx)(tt,{defaultEmail:eu,onComplete:z,onLogin:E,signInTitle:t,hideApple:j,isResetPasswordSuccess:C,appModalEnv:I}),y[52]=I,y[53]=eu,y[54]=j,y[55]=C,y[56]=z,y[57]=E,y[58]=t,y[59]=e):e=y[59],e}case V.ENTER_PASSWORD:{let t,a,i=T??G;y[60]!==eu?(t=(0,u.EA)(eu),y[60]=eu,y[61]=t):t=y[61];let r=!e.email;return y[62]!==eu||y[63]!==z||y[64]!==E||y[65]!==v||y[66]!==i||y[67]!==t||y[68]!==r||y[69]!==e_?(a=(0,o.jsx)(tM,{signInTitle:i,defaultEmail:eu,userToken:e_,withEmail:t,sendResetEmail:v,onComplete:z,onLogin:E,autoFocus:r}),y[62]=eu,y[63]=z,y[64]=E,y[65]=v,y[66]=i,y[67]=t,y[68]=r,y[69]=e_,y[70]=a):a=y[70],a}case V.ENTER_CODE:{let e;return y[71]!==eu||y[72]!==z||y[73]!==E||y[74]!==e_?(e=(0,o.jsx)(eP,{email:eu,userToken:e_,onComplete:z,onLogin:E}),y[71]=eu,y[72]=z,y[73]=E,y[74]=e_,y[75]=e):e=y[75],e}case V.ENTER_MFA_CODE:{let e;return y[76]!==eu||y[77]!==eh||y[78]!==ex||y[79]!==ep||y[80]!==z||y[81]!==E||y[82]!==eg||y[83]!==e_?(e=(0,o.jsx)(tv,{email:eu,userToken:e_,onComplete:z,onLogin:E,mfaMethod:ex,mfaTitle:ep,password:eg,mfaDescription:eh}),y[76]=eu,y[77]=eh,y[78]=ex,y[79]=ep,y[80]=z,y[81]=E,y[82]=eg,y[83]=e_,y[84]=e):e=y[84],e}case V.ENTER_MFA:{let e,t;return y[85]!==z||y[86]!==ea||y[87]!==ei?(e=e=>{z(e),ea(),ei()},y[85]=z,y[86]=ea,y[87]=ei,y[88]=e):e=y[88],y[89]!==eu||y[90]!==eh||y[91]!==ex||y[92]!==ep||y[93]!==E||y[94]!==eg||y[95]!==e||y[96]!==e_?(t=(0,o.jsx)(tT,{email:eu,password:eg,userToken:e_,mfaDescription:eh,mfaTitle:ep,mfaMethod:ex,onComplete:e,onLogin:E}),y[89]=eu,y[90]=eh,y[91]=ex,y[92]=ep,y[93]=E,y[94]=eg,y[95]=e,y[96]=e_,y[97
1]=t):t=y[97],t}case V.CREATE_PASSWORD:{let e;return(0,tZ.FH)(!!eb,"User should never be null when trying to create a password during sign in flow"),y[98]!==eb||y[99]!==z||y[100]!==E?(e=(0,o.jsx)(em,{loggedInUser:eb,onComplete:z,onLogin:E}),y[98]=eb,y[99]=z,y[100]=E,y[101]=e):e=y[101],e}case V.RESET_PASSWORD:{let e;return(0,tZ.FH)(!!e_||!!eu,"User token or email should be defined when trying to reset a password during sign in flow"),y[102]!==eu||y[103]!==e_?(e=(0,o.jsx)(tk,{userToken:e_,emailAddress:eu}),y[102]=eu,y[103]=e_,y[104]=e):e=y[104],e}case V.SSO:{let e;return y[105]!==I||y[106]!==eu||y[107]!==z||y[108]!==E||y[109]!==e_?(e=(0,o.jsx)(tV,{email:eu,userToken:e_,onComplete:z,onLogin:E,appModalEnv:I}),y[105]=I,y[106]=eu,y[107]=z,y[108]=E,y[109]=e_,y[110]=e):e=y[110],e}case V.CONFIRM_PASSWORD:{let e;return y[111]!==eu||y[112]!==z||y[113]!==E||y[114]!==eS||y[115]!==eE?(e=(0,o.jsx)(eo,{email:eu,profileImage:eS,userName:eE,onComplete:z,onLogin:E}),y[111]=eu,y[112]=z,y[113]=E,y[114]=eS,y[115]=eE,y[116]=e):e=y[116],e}case V.SELECT_MFA_OPTION:{let e,t,a;return y[117]!==ef?(e=ef??[],y[117]=ef,y[118]=e):e=y[118],y[119]!==z||y[120]!==er?(t=e=>{z(e),er()},y[119]=z,y[120]=er,y[121]=t):t=y[121],y[122]!==eu||y[123]!==ev||y[124]!==E||y[125]!==eg||y[126]!==e||y[127]!==t||y[128]!==e_?(a=(0,o.jsx)(tD,{email:eu,userToken:e_,password:eg,mfaOptions:e,onComplete:t,onLogin:E,isMFAFromEmail:ev}),y[122]=eu,y[123]=ev,y[124]=E,y[125]=eg,y[126]=e,y[127]=t,y[128]=e_,y[129]=a):a=y[129],a}case V.LOADING:{let e;return y[130]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(tN,{}),y[130]=e):e=y[130],e}case V.AUTO_SIGN_IN_LINK_SENT:{let e;return y[131]!==eA||y[132]!==eu||y[133]!==z?(e=(0,o.jsx)(ew,{scenario:eA,onComplete:z,email:eu}),y[131]=eA,y[132]=eu,y[133]=z,y[134]=e):e=y[134],e}case V.MFA_OPTIONS_EMAIL_SENT:{let e;return y[135]!==eu||y[136]!==eh||y[137]!==ep||y[138]!==z||y[139]!==eg?(e=(0,o.jsx)(ey,{onComplete:z,email:eu,mfaTitle:ep,mfaDescription:eh,password:eg}),y[135]=eu,y[136]=eh,y[137]=ep,y[138]=z,y[139]=eg,y[140]=e):e=y[140],e}default:return null}};function t4(e){return!(0,u.uy)(e)}function t3(e){return!(0,u.uy)(e)}var t5=a(526189),t6=a(975094),t8=a(542281);let t9=[a(32480).wE,t8.wE];var t7=a(509088),ae=a(227298),at=a(616391),aa=a(993575),ai=a(562360);let ar=e=>{let t,a,i,r,s,n,c,u,g,m,h,f,p,x,_,b,S,w,y,E,v,T,j,C=(0,l.c)(66),{appModalEnv:I}=e,[O,N]=(0,A.useState)(!1),R=(0,e9.usePathname)(),k=(0,e9.useSearchParams)(),L=k.toString();C[0]!==k?(t=k.get("overwriteCopy")??void 0,C[0]=k,C[1]=t):t=C[1];let F=t;C[2]!==k?(a=k.get("quickLogin")??void 0,C[2]=k,C[3]=a):a=C[3];let P=a;C[4]!==k?(i=k.get("resetEmail")??void 0,C[4]=k,C[5]=i):i=C[5];let D=i;C[6]!==k?(r=k.get("signIn")??void 0,C[6]=k,C[7]=r):r=C[7];let K=r;C[8]!==k?(s=k.get("email")??void 0,C[8]=k,C[9]=s):s=C[9];let G=s;C[10]!==k?(n=k.get("ifrp")??void 0,C[10]=k,C[11]=n):n=C[11];let U=n;C[12]!==k?(c=k.get("livestream")??void 0,C[12]=k,C[13]=c):c=C[13];let $=c,V=k.get("redirectTo")??void 0,{resetErrorMessage:B}=(0,eU.o)();C[14]===Symbol.for("react.memo_cache_sentinel")?(u=(0,ae.w)(),C[14]=u):u=C[14];let z=u,{replace:H}=(0,tX.r)(),{setPromptSSO:J}=(0,ee.m)(),{setUserHasPassword:Y}=(0,Z.l)(),Q=(0,t5._)();C[15]!==R||C[16]!==H||C[17]!==B||C[18]!==L||C[19]!==J||C[20]!==Y?(g=()=>{J(!1),Y(!1);let e=tg.parse(L),t=tg.stringify({...e,[t7.u]:void 0,quickLogin:void 0,resetEmail:void 0,signIn:void 0,signUp:void 0,email:void 0,ifrp:void 0,livestream:void 0,redirectTo:void 0,error:void 0}),a=t?`?${t}`:"";B(),H(`${R}${a}`)},C[15]=R,C[16]=H,C[17]=B,C[18]=L,C[19]=J,C[20]=Y,C[21]=g):g=C[21];let X=g;C[22]!==R||C[23]!==Q||C[24]!==L?(m=e=>{Q({pathname:R,search:L?"?"+L:""},e)},C[22]=R,C[23]=Q,C[24]=L,C[25]=m):m=C[25];let q=m;C[26]!==q||C[27]!==z?(h=()=>z?q(z):N(!0),C[26]=q,C[27]=z,C[28]=h):h=C[28];let et=h;C[29]!==X||C[30]!==q||C[31]!==P||C[32]!==z?(f=()=>{P&&z&&(z?.is_employee?q(z):X())},p=[P,z,X,q],C[29]=X,C[30]=q,C[31]=P,C[32]=z,C[33]=f,C[34]=p):(f=C[33],p=C[34]),(0,A.useEffect)(f,p),C[35]!==$||C[36]!==R?(x=!$&&!(0,d.a)(R,aa.wE),C[35]=$,C[36]=R,C[37]=x):x=C[37];let ea=x,ei=V?.includes("email_verification_token")&&V?.includes("validation_token")&&V?.includes("brand-onboarding");C[38]!==ei||C[39]!==F||C[40]!==O?(_={resetSuccess:O,isBrandOnboardingEmailVerification:ei,overwriteCopy:F},C[38]=ei,C[39]=F,C[40]=O,C[41]=_):_=C[41];let er=as(_);if(z&&(P||!K))return null;let es=ea?X:void 0;if(C[42]===Symbol.for("react.memo_cache_sentinel")?(b={custom:["w-full","md:w-105"]},C[42]=b):b=C[42],C[43]===Symbol.for("react.memo_cache_sentinel")?(S=[],C[43]=S):S=C[43],C[44]!==ea?(w=ea?(0,o.jsx)("div",{className:"absolute top-(--slate-spacing-element-large) right-(--slate-spacing-element-large) z-[1]","data-test-id":"modalCloseButton",children:(0,o.jsx)(at.q,{})}):null,C[44]=ea,C[45]=w):w=C[45],C[46]!==R)y=t9.some(e=>(0,d.a)(R,e))?null:(0,o.jsx)(t6.$,{noindex:!0}),C[46]=R,C[47]=y;else y=C[47];return C[48]===Symbol.for("react.memo_cache_sentinel")?(E=(0,o.jsx)("div",{className:"border-fs-border-muted flex h-[54px] w-full items-center justify-start border-b px-6 py-0 md:hidden",children:(0,o.jsx)(ai.FaireLogo,{size:110})}),C[48]=E):E=C[48],C[49]!==I||C[50]!==G||C[51]!==q||C[52]!==et||C[53]!==U||C[54]!==D||C[55]!==O||C[56]!==K||C[57]!==er?(v="reset-password"!==K||O?(0,o.jsx)(t2,{onLogin:q,email:G,sendResetEmail:!!D,sign
1InTitle:er,isResetPasswordSuccess:O,appModalEnv:I}):(0,o.jsx)(W,{onReset:et,resetToken:U}),C[49]=I,C[50]=G,C[51]=q,C[52]=et,C[53]=U,C[54]=D,C[55]=O,C[56]=K,C[57]=er,C[58]=v):v=C[58],C[59]!==y||C[60]!==v?(T=(0,o.jsx)("div",{className:"flex min-h-0 w-full flex-auto flex-col overflow-y-auto",children:(0,o.jsxs)("div",{className:"h-full w-full md:flex md:flex-col lg:flex-row","data-test-id":"signInModal",children:[y,E,v]})}),C[59]=y,C[60]=v,C[61]=T):T=C[61],C[62]!==es||C[63]!==w||C[64]!==T?(j=(0,o.jsxs)(at.O,{open:!0,onClose:es,"aria-labelledby":M,width:b,height:"fullScreen",padding:S,children:[w,T]}),C[62]=es,C[63]=w,C[64]=T,C[65]=j):j=C[65],j},as=e=>{let t=(0,l.c)(2),{resetSuccess:a,isBrandOnboardingEmailVerification:i,overwriteCopy:r}=e,{strictLocalize:s}=(0,k.useStrictLocalization)();if(a||i||r===t7.y){let e;return t[0]!==s?(e=s({id:"xhCchx",defaultMessage:"Sign in",description:{text:"Title shown to users sigining"}}),t[0]=s,t[1]=e):e=t[1],e}}},460352:(e,t,a)=>{a.d(t,{L:()=>i.EmbeddedLink});var i=a(680571)},505356:(e,t,a)=>{a(294799),a(11241),a(834023),a(120818)},508765:(e,t,a)=>{a.d(t,{A:()=>i,O:()=>r});let i=8,r=e=>e({id:"6Fq8WW",defaultMessage:"Something went wrong, please try again or contact us.",description:{text:"Notifying users of an error"}})},509088:(e,t,a)=>{a.d(t,{u:()=>r,y:()=>i});let i="manageEmailPreferences",r="overwriteCopy"},511270:(e,t,a)=>{a.d(t,{J:()=>s});var i=a(442462),r=a(858655);function s(e){return(0,i.x)({eventKey:"cx_foundations-contact_form_link_retailer_web-click",realTimeTracking:!1,priority:r.T.Priority.EXTRA_LOW,actionCategory:r.T.ActionCategory.ACTION_CATEGORY_CLICK,parameters:{Url_string:e}})}},631115:(e,t,a)=>{a.d(t,{CS:()=>i.CS,Ov:()=>i.Ov,Qv:()=>i.Qv,U3:()=>i.U3,b8:()=>i.b8,yz:()=>i.yz,z4:()=>i.z4});var i=a(79551)},663244:(e,t,a)=>{a.d(t,{K:()=>E});var i=a(294799),r=a(807832),s=a(815995),n=a(924178),o=a(20715),l=a(129066),d=a(20604),c=a(254071),u=a(944246),g=a(575611),m=a(745274),h=a(874064),f=a(592887),p=a(249941),x=a(834023);let{logger:_}=f.Vy.getLogger("SIGNIN"),b=p.$.APPLE,S="AppleIDSignInOn",w="Success",y="Failure",E=e=>{let{strictLocalize:t}=(0,m.useStrictLocalization)(),{isScriptLoading:a,hasScriptError:f}=(0,o.L)({isScriptLoaded:l.tA,loadScript:l.pl,provider:b}),{isOnSignIn:p,sourceId:E}=e,v=!!(e.matchGISButtonLayout&&!e.disabled),A=(0,n.y)({...e,provider:b}),{errorMessage:T,setLocalizedErrorMessage:j,setErrorMessage:C,resetErrorMessage:I}=(0,d.o)(),{recordSSOButtonClick:O,userClickedSSOButton:M}=(0,c.m)(),N=(0,x.useCallback)(async e=>{let t=e.detail;A(t?.authorization.id_token??"",t?.user)},[A]),R=(0,x.useCallback)(e=>{let a=e.detail;_.error(a,{tags:{signInType:"SSO",provider:b,code:a?.error}});let i=a?.error??"";C((0,s.B)({provider:b,code:i},t)),(0,h.l)(b,E)},[C,E,t]);return((0,x.useEffect)(()=>{try{(0,u.Z)().addEventListener(`${S}${w}`,N),(0,u.Z)().addEventListener(`${S}${y}`,R)}catch(e){_.error(e,{tags:{signInType:"SSO",provider:b,code:"dom_function_injection_failed"}})}return()=>{try{(0,u.Z)().removeEventListener(`${S}${w}`,N),(0,u.Z)().removeEventListener(`${S}${y}`,R)}catch(e){_.error(e)}}},[R,N]),f)?(0,i.jsx)(r.S,{onClick:()=>C(t({id:"w+SvqJ",defaultMessage:"Apple script is blocked. Unblock and refresh to use Apple sign in.",description:{text:"Error message for unable to use Apple ID log in"}})),socialProvider:b,matchGISButtonLayout:v,isOnSignIn:p,sourceId:E}):!M&&T?(0,i.jsx)(r.S,{onClick:O,socialProvider:b,matchGISButtonLayout:v,isOnSignIn:p,sourceId:E}):(0,i.jsx)(r.S,{disabled:e.disabled,onClick:()=>{try{T&&I(),(0,l.iJ)(e.appModalEnv.appleSignInClientId,j);let t=(0,g.u)();!a&&t?.AppleID?.auth&&"function"==typeof t?.AppleID?.auth.signIn&&AppleID.auth.signIn()}catch(e){_.error(e,{tags:{signInType:"SSO",provider:b,code:"auth_signIn_failed"}})}},socialProvider:b,matchGISButtonLayout:v,loading:a,isOnSignIn:p,sourceId:E})}},680571:(e,t,a)=>{a.d(t,{EmbeddedLink:()=>f});var i=a(294799),r=a(11241),s=a(115723),n=a(344049);a(834023);var o=a(611336),l=a(169007),d=a(988875),c=a(201245),u=a(769009);let g=({theme:e,color:t})=>{let a,i=e?.embeddedLink??u.I,r=(0,c.EA)(t)?(a=e=>({...e,color:t,"text-decoration-color":t}),{...i,base:a(i.base),hover:{...a(i.hover),filter:"brightness(0.8)"}}):i;return(0,o.AH)(["display:inline;width:auto;cursor:pointer;"," &:hover,&:focus,&:focus-within{","}&:active{","}&:disabled{"," cursor:not-allowed;}"],(0,d.T)(r.base),(0,d.T)(r.hover),(0,d.T)(r.active),(0,d.T)(r.disabled))},m=(0,o.Ay)(s.Anchor).withConfig({componentId:"sc-99bb5304-0"})(["",""],g),h=(0,o.Ay)(s.Link).withConfig({componentId:"sc-99bb5304-1"})(["",""],g),f=e=>{let t,a,s,o,d=(0,r.c)(19);d[0]!==e?({linkTo:a,children:t,onClick:s,...o}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=s,d[4]=o):(t=d[1],a=d[2],s=d[3],o=d[4]);let{potentiallyRelativeLink:c}=(0,n.y)(a,o.target),u=void 0===c?a:c;if((0,l.hL)(u)){let e;return d[5]!==t||d[6]!==s||d[7]!==u||d[8]!==o?(e=(0,i.jsx)(m,{...o,href:u,onClick:s,children:t}),d[5]=t,d[6]=s,d[7]=u,d[8]=o,d[9]=e):e=d[9],e}if(u){let e;return d[14]!==t||d[15]!==s||d[16]!==u||d[17]!==o?(e=(0,i.jsx)(h,{...o,to:u,onClick:s,children:t}),d[14]=t,d[15]=s,d[16]=u,d[17]=o,d[18]=e):e=d[18],e}{let e;return d[10]!==t||d[11]!==s||d[12]!==o?(e=(0,i.jsx)(m,{...o,onClick:s,role:"button",children:t}),d[10]=t,d[11]=s,d[12]=o,d[13]=e):e=d[13],e}}},703693:(e,t,a)=>{a.d(t,{m:()=>l});var i=a(294799),r=a(11241),s=a(686509),n=a(638399),o=a(369321);a(834023);let l=e=>{let t,a,l,d,c=(0,r.c)(8);return c[0]!==e?({Icon:t,...a}=e,c[0]=e,c[1]=t,c[2]=a):(t=c[1],a=c[2]),c[3]!==t?(l=(0,i.jsx)(o.a,{Icon:t,titleAccess:"",className:"fs-icon-button__icon"}),c[3]=t,c[4]=l):l=c[4],c[5]!==a||c[6]!==l?(d=(0,i.jsx)(n.u,{className:"fs-icon-button fs-icon-button--plain fs-icon-button--x-small fs-form-field__icon-btn",touchTargetSizePx:s.E[6],type:"button",...a,children:l}),c[5]=a,c[6]=l,c[7]=d):d=c[7],d}},723321:(e,t,a)=>{a.d(t,{a:()=>m});var i=a(294799),r=a(579197),s=a(768271),n=a(344049);a(834023);var o=a(611336),l=a(130230),d=a(155582),c=a(724771),u=a(571178),g=a(917614);let m=({children:e,...t})=>{let a=(0,o.DP)(),{isDisabled:r,handleClick:l,shouldShowSpinner:c}=(0,d.H)(t.disabled||!1,t.loading||!1,t.onClick),{potentiallyRelativeLink:u=t.linkTo}=(0,n.y)(t.linkTo,"target"in t?t.target:void 0),m=c?(0,i.jsx)(h,{children:e}):e,{as:x,linkProps:_}=(0,g.h)({...t,linkTo:u}),{buttonRef:b,linkTo:S,tertiaryColor:w,destructive:y,loading:E,variant:v,small:A,width:T,minWidth:j,className:C,...I}=t;return(0,i.jsxs)(f,{...I,..._,className:(0,s.P4)(C),ref:b,disabled:r,"aria-disabled":r,as:x,onClick:l,$tertiaryColor:w,$small:A,theme:a,$loading:E,$destructive:y,$variant:v,$width:T,$minWidth:j,translate:"no",children:[m,c&&(0,i.jsx)(p,{size:"medium",destructive:y,variant:t.variant})]})};m.displayName="Button";let h=o.Ay.span.withConfig({componentId:"sc-f436e6b9-0"})(["visibility:hidden;cursor:inherit;color:inherit;display:inline-flex;align-items:center;justify-content:center;"]),f=o.Ay.button.withConfig({componentId:"sc-f436e6b9-1"})(["",""],c.tj),p=(0,o.Ay)(r.P).attrs(e=>{let{theme:t,variant:a="primary"}=e,i=((0,l.Y5)(t).buttons2??u.buttonTheme)[a].loading,{color:r}="function"==typeof i?i({$destructive:e.destructive,$variant:a}):i;return{color:r}}).withConfig({componentId:"sc-f436e6b9-2"})(["position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);"])},782267:(e,t,a)=>{a.d(t,{k:()=>s});var i=a(11241),r=a(91976);let s=()=>{let e,t=(0,i.c)(2),a=(0,r.useSearchParams)();return t[0]!==a?(e=a.get("referralCode"),t[0]=a,t[1]=e):e=t[1],e??void 0}},812652:(e,t,a)=>{a.d(t,{y:()=>f});var i=a(294799),r=a(11241),s=a(377258),n=a(201623),o=a(173217),l=a(123906),d=a(745274),c=a(300515),u=a(724371),g=a(703693),m=a(834023);let h=e=>{let t,a,s=(0,r.c)(7),{isPlainText:n,onClick:o}=e,{strictLocalize:l}=(0,d.useStrictLocalization)(),m=n?c.EyeClosed:u.EyeOpen;return s[0]!==n||s[1]!==l?(t=l(n?{id:"B0RCm/",defaultMessage:"Hide password",description:{text:"Label for button to conceal password in a password input"}}:{id:"Ut9/kn",defaultMessage:"Show password",description:{text:"Label for button to reveal password in a password input"}}),s[0]=n,s[1]=l,s[2]=t):t=s[2],s[3]!==o||s[4]!==m||s[5]!==t?(a=(0,i.jsx)(g.m,{Icon:m,onClick:o,"aria-label":t}),s[3]=o,s[4]=m,s[5]=t,s[6]=a):a=s[6],a},f=e=>{let t,a,d,c,u,g,f,x,_,b,S,w,y,E,v=(0,r.c)(33);if(v[0]!==e){let{disabled:i,error:r,helper:s,id:n,label:o,tooltipText:m,optional:h,autoComplete:p,...b}=e;a=i,d=r,c=s,u=o,_=m,f=b,g=void 0!==h&&h,t=void 0===p?"off":p,x=(0,l.l)({prefix:"fs-passwordinput",idProp:n,name:f.name,label:u,helper:c,error:d}),v[0]=e,v[1]=t,v[2]=a,v[3]=d,v[4]=c,v[5]=u,v[6]=g,v[7]=f,v[8]=x,v[9]=_}else t=v[1],a=v[2],d=v[3],c=v[4],u=v[5],g=v[6],f=v[7],x=v[8],_=v[9];let{id:A,helperId:T}=x,[j,C]=(0,m.useState)(!1);v[10]===Symbol.for("react.memo_cache_sentinel")?(b=e=>{e.preventDefault(),e.stopPropagation(),C(p)},v[10]=b):b=v[10];let I=b;v[11]===Symbol.for("react.memo_cache_sentinel")?(S=(0,s.I$)(),v[11]=S):S=v[11],v[12]!==j?(w=(0,i.jsx)(h,{isPlainText:j,onClick:I}),v[12]=j,v[13]=w):w=v[13];let O=j?"text":"password";return v[14]!==t||v[15]!==a||v[16]!==d||v[17]!==T||v[18]!==A||v[19]!==f||v[20]!==w||v[21]!==O?(y=(0,i.jsx)(n.O,{"aria-describedby":T,disabled:a,error:d,id:A,suffix:w,type:O,spellCheck:!1,autoComplete:t,"data-
1ph-no-capture":!0,...f}),v[14]=t,v[15]=a,v[16]=d,v[17]=T,v[18]=A,v[19]=f,v[20]=w,v[21]=O,v[22]=y):y=v[22],v[23]!==a||v[24]!==d||v[25]!==c||v[26]!==T||v[27]!==A||v[28]!==u||v[29]!==g||v[30]!==y||v[31]!==_?(E=(0,i.jsx)(o.k,{className:S,"data-component-name":"Slate/PasswordInput",disabled:a,error:d,label:u,inputId:A,helper:c,helperId:T,tooltipText:_,optional:g,children:y}),v[23]=a,v[24]=d,v[25]=c,v[26]=T,v[27]=A,v[28]=u,v[29]=g,v[30]=y,v[31]=_,v[32]=E):E=v[32],E};function p(e){return!e}},820613:(e,t,a)=>{a.d(t,{N:()=>n});var i=a(725372),r=a(143803),s=a(834023);function n(e){let t=(0,s.useRef)(null),[a,n]=(0,s.useState)(0),o=(0,s.useRef)(0),l=(0,s.useRef)([]);(0,s.useEffect)(()=>{if(0===a||a===o.current)return;o.current=a;let e=t.current,r=e?.closest("form")??e;(0,i.E)(r,l.current)},[a]);let d=(0,s.useCallback)((e=[])=>{l.current=e,n(e=>e+1)},[]);return{ref:(0,s.useMemo)(()=>(0,r.P)(t,e),[e]),focusFirstInvalidField:d}}},841120:(e,t,a)=>{a.d(t,{Et:()=>o});var i=a(123337),r=a(433592);let s=()=>({}),{useStore:n,useStoreOrUndefined:o,Provider:l}=(0,i.r)(e=>({...s(),setStore:(0,r.I)(e)}),()=>({...s(),setStore:()=>{}}))},874164:(e,t,a)=>{a.d(t,{N:()=>o});var i=a(294799);a(834023);var r=a(220770),s=a(64933),n=a(917759);let o=(0,s.w)((0,i.jsx)("path",{d:"M2 12H22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),"Subtract",e=>({viewBox:"0 0 24 24",titleAccess:e({id:"HF+pg9",defaultMessage:"Subtract",description:{text:"Message for screenreaders when only the icon is displayed"}}),fill:"none",color:r.d.primary,className:(0,n.W)()}))},883741:(e,t,a)=>{a.d(t,{Ay:()=>r});var i=a(987374);a(34268);let r=function(e,t){let a,r=((a=t?.headers??new Headers).has("content-type")||a.set("content-type","application/json"),{route:"/api/user",service:"backend",url:"/api/user",method:"PATCH",data:e,doNotLogRequest:!0,...t,headers:a});return(0,i.E)(r)}},924178:(e,t,a)=>{a.d(t,{y:()=>E});var i=a(884455),r=a(375173),s=a(364038),n=a(20604),o=a(254071),l=a(262229),d=a(745274),c=a(218675),u=a(157191),g=a(832391),m=a(874064),h=a(768910),f=a(519006),p=a(684293),x=a(633028),_=a(699805),b=a(249941),S=a(423221),w=a(138017),y=a(91976);let E=({onSignIn:e,onSelectMFA:t,onMFA:a,onConfirmPassword:E,provider:A,sourceId:T,trackRetailerSignupRequiredFromGoogleGisPath:j})=>{let{strictLocalize:C}=(0,d.useStrictLocalization)(),{setErrorMessage:I}=(0,n.o)(),{reset:O,set:M}=(0,o.m)(),N=(0,y.useSearchParams)(),R=S.hV.parse(N.toString()),{isFaireDirectActiveInLoggedOut:k,faireDirectBrand:L,faireDirectBrandToken:F,faireDirectBrandAlias:P}=(0,l.h)(),D=(0,r.k)();return async(r,n)=>{try{let{user:o,mfa_description:l,mfa_title:d,mfa_options:m,login_state:w,sign_up_suggestions:y}=await (0,p.Ay)(x.m.build({sso_token:{id_token:r,provider:A},enable_mfa_method_selection:!0}
1));O();let N=v(A,s.Jb,y,n);M(N,r,A);let K=k?{brand:F,brandName:L?.name,[i.d]:P}:{},G=async()=>{let e=(0,S.Ay)({...R,...K,signUp:k?c.J.FAIRE_DIRECT:R.signUp??c.J.GENERIC,email:N?.email_address});await D({redirectUrl:e})};switch((0,f.b)(A,T,w),w){case _.f.LOGIN_OK:o&&e(o);break;case _.f.SIGN_UP_REQUIRED:j&&A===b.$.GOOGLE&&(0,u.w)(),await G();break;case _.f.MFA_METHOD_SELECTION_REQUIRED:(0,h.J)("SSO"),t(m);break;case _.f.MFA_REQUIRED:(0,h.J)("SSO"),a(l??C({id:"H2iudf",defaultMessage:"Almost there! Please enter the code sent to your email",description:{text:"Message to inform user that they should check their email for a code to verify them"}}),d??C({id:"0dap3n",defaultMessage:"Enter verification code",description:{text:"User is almost at the end of the log in process"}}));break;case _.f.SOCIAL_LOGIN_PASSWORD_REQUIRED:(0,g.y)(),E(N);break;default:I(C({id:"EQShW8",defaultMessage:"Sorry, server was unable to process request.",description:{text:"Error message if server was unable to process request"}}))}}catch(t){let e=C({id:"67+pg9",defaultMessage:"Sorry, was unable to reach server",description:{text:"Error message if unable to connect to server"}});I((0,w.Sw)(t,C,e)),(0,m.l)(A,T)}}},v=(e,t,a,i)=>{let r;if(e!==b.$.APPLE)return a;let s=t;if(i){let{email:t,name:{firstName:n,lastName:o}}=i;s={email_address:r=a?.email_address??t,first_name:n,last_name:o,profile_image_url:"",provider:e}}else r=a?.email_address??"",s={...s,email_address:r,provider:e};return s}},975094:(e,t,a)=>{a.d(t,{$:()=>m});var i=a(294799),r=a(11241),s=a(841120),n=a(944246),o=a(426140),l=a(604922),d=a(834023),c=a(227356);let u=["link[rel=next]:not([data-react-helmet])","link[rel=prev]:not([data-react-helmet])"],g=["meta[name=description]:not([data-react-helmet])"],m=e=>{let t,a,m,x,_,b,S,w,y,E,v,A,T,j,C,I,O,M,N,R,k,L=(0,r.c)(54),{title:F,image:P,prev:D,next:K,noindex:G,description:W,selfCanonical:U,skipOpenGraphAlignment:$}=e,V=void 0!==$&&$,[B,z]=(0,d.useState)("");L[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],L[0]=t):t=L[0];let[H,J]=(0,d.useState)(t),Y=(0,s.Et)(h);L[1]!==W||L[2]!==V||L[3]!==F?(a=()=>{!V&&(F&&(0,n.Z)().querySelector('meta[property="og:title"]')?.setAttribute("content",F),W&&(0,n.Z)().querySelector('meta[property="og:description"]')?.setAttribute("content",W))},m=[W,F,V],L[1]=W,L[2]=V,L[3]=F,L[4]=a,L[5]=m):(a=L[4],m=L[5]),(0,d.useEffect)(a,m),L[6]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{z((0,n.Z)().title)},_=[],L[6]=x,L[7]=_):(x=L[6],_=L[7]),(0,d.useEffect)(x,_),L[8]!==B||L[9]!==Y||L[10]!==F?(b=()=>((0,n.Z)().title=`${F||B}.`,(0,n.Z)().title=F||B,Y?.({tabTitle:F??void 0}),()=>{(0,n.Z)().title=B,Y?.({tabTitle:void 0})}),L[8]=B,L[9]=Y,L[10]=F,L[11]=b):b=L[11],L[12]!==B||L[13]!==Y||L[14]!==H||L[15]!==F?(S=[F,Y,B,H],L[12]=B,L[13]=Y,L[14]=H,L[15]=F,L[16]=S):S=L[16],(0,d.useEffect)(b,S),L[17]===Symbol.for("react.memo_cache_sentinel")?(w=(e,t)=>{let a=(0,n.Z)().head.querySelectorAll(e.join(","));if(0===a.length)return;let i=()=>{J(e=>e.concat(Array.from(a))),a.forEach(f)};void 0===t||t?(0,l.E)(i,0):i()},L[17]=w):w=L[17];let Q=w;L[18]!==W||L[19]!==G||L[20]!==H?(y=()=>{if(!(H.length>0))return G&&Q(u),W&&Q(g,!1),()=>{H.length>0&&H.forEach(p)}},E=[W,G,Q,H],L[18]=W,L[19]=G,L[20]=H,L[21]=y,L[22]=E):(y=L[21],E=L[22]),(0,d.useEffect)(y,E);let X=((0,o.g)()?.origin||"")+((0,o.g)()?.pathname||"");return L[23]!==F?(v=F?(0,i.jsx)("title",{"data-faire-helmet":"true",children:F}):null,L[23]=F,L[24]=v):v=L[24],L[25]!==P?(A=P?.url?(0,i.jsx)("meta",{property:"og:image",content:P.url}):null,L[25]=P,L[26]=A):A=L[26],L[27]!==P?(T=P?.width?(0,i.jsx)("meta",{property:"og:image:width",content:P.width.toString()}):null,L[27]=P,L[28]=T):T=L[28],L[29]!==P?(j=P?.height?(0,i.jsx)("meta",{property:"og:image:height",content:P.height.toString()}):null,L[29]=P,L[30]=j):j=L[30],L[31]!==P?.url?(C=P?.url?.endsWith(".png")?(0,i.jsx)("meta",{property:"og:image:type",content:"image/png"}):null,L[31]=P?.url,L[32]=C):C=L[32],L[33]!==D?(I=D?(0,i.jsx)("link",{rel:"prev",href:`${((e="")=>e.replace(/\/retailer\/r_[0-9, a-z]+/g,""))(X)}${D>1?`?page=${D}`:""}`}):null,L[33]=D,L[34]=I):I=L[34],L[35]!==K?(O=K?(0,i.jsx)("link",{rel:"next",href:`${((e="")=>e.replace(/\/retailer\/r_[0-9, a-z]+/g,""))(X)}?page=${K}`}):null,L[35]=K,L[36]=O):O=L[36],L[37]!==G?(M=G?(0,i.jsx)("meta",{name:"robots",content:"noindex"}):null,L[37]=G,L[38]=M):M=L[38],L[39]!==W?(N=W?(0,i.jsx)("meta",{content:W,name:"description"}):null,L[39]=W,L[40]=N):N=L[40],L[41]!==U?(R=U?(0,i.jsx)("link",{href:X,rel:"canonical"}):null,L[41]=U,L[42]=R):R=L[42],L[43]!==v||L[44]!==A||L[45]!==T||L[46]!==j||L[47]!==C||L[48]!==I||L[49]!==O||L[50]!==M||L[51]!==N||L[52]!==R?(k=(0,i.jsxs)(c.mg,{children:[v,A,T,j,
1C,I,O,M,N,R]}),L[43]=v,L[44]=A,L[45]=T,L[46]=j,L[47]=C,L[48]=I,L[49]=O,L[50]=M,L[51]=N,L[52]=R,L[53]=k):k=L[53],k};function h(e){return e.setStore}function f(e){return e.remove()}function p(e){(0,n.Z)().head.appendChild(e)}}}]);
2//# sourceMappingURL=2248-43c90f3199bffc1f.js.map

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.