1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"5ca8a1b1efcc5b3a726c344b106a830e13abf521"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:ifixitFirstParty":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="752853cc-2e3e-4cdd-bc39-0be055a2e452",e._sentryDebugIdIdentifier="sentry-dbid-752853cc-2e3e-4cdd-bc39-0be055a2e452")}catch(e){}}(),(globalThis.webpackChunkcarpenter_frontend=globalThis.webpackChunkcarpenter_frontend||[]).push([[1148,5519],{1032(e,t,n){function o(e){return("login"===e?App.recaptchaEnabledForLogin:App.recaptchaEnabledForRegister)&&App.recaptchaSiteKey||null}n.d(t,{j:()=>o})},5519(e,t,n){n.d(t,{LogIn:()=>k,u:()=>_});var o=n(50061),i=n(97145),r=n(78967),a=n(54251),l=n(25223),s=n(58161),c=n(76926),d=n(41148),u=n(1032),p=n(18891),g=n(55552),m=n(67523),f=n(3030),h=n(32906),b=n(35599),v=n(4079),x=n(30247),w=n(2305),j=n(40711),y=n(69772),O=n(6134);const E=({children:e,...t})=>(0,o.jsx)("div",{className:"mx-auto max-md:hidden",...t,children:e}),A={OAuth2_GOOGLE:{name:"Google",isAvailable:()=>Boolean(App.googleLoginEnabled)},facebook:{name:"Facebook",isAvailable:()=>Boolean(App.facebookLoginEnabled)},apple:{name:"Apple",isAvailable:()=>Boolean(App.appleLoginEnabled)&&!(0,b.R)()}};function S(e){const[t,n]=(0,i.useState)(!1);return(0,o.jsxs)("div",{className:"flex items-center gap-2 relative",children:[(0,o.jsx)("input",{id:"password",autoComplete:"current-password",className:"w-full min-h-10 rounded-lg",type:t?"text":"password",...e}),(0,o.jsx)("button",{type:"button",className:"button-link size-10 absolute right-0 top-0 z-2 flex items-center justify-center",onClick:()=>n(!t),children:(0,o.jsx)(r.hw,{name:t?"eye-slash":"eye",className:"size-4 text-gray-400"})})]})}const _=(e,t)=>{switch(e.reason){case"email":return App.loginMessages.invalid_email;case"password":return App.loginMessages.invalid_password;case"invalid_code":return App.loginMessages.invalid_code;case"banned":return App.loginMessages.banned;case"captcha":return App.loginMessages.captcha;case"tooManyFailures":{const n=Number.parseInt(e.lockedOut,10),o=t(1==n?"waitOneMinuteToTryAgain":"waitALittleWhileBeforeTryingAgain");return(App.loginMessages.tooManyFailures+" "+o).replace("%1",n.toString())}case"tooManyCodeAttempts":return App.loginMessages.tooManyCodeAttempts;case"tooManyCodeGenerations":return App.loginMessages.tooManyCodeGenerations;case"tooManySuccesses":{const n=Number.parseInt(e.lockedOut,10),o=t(1==n?"waitOneMinuteToTryAgain":"waitMinutesToTryAgain");return(App.loginMessages.tooManySuccesses+" "+o).replace("%1",n.toString())}case"disabledUser":return App.loginMessages.disabledUser;case"insecurePassword":return App.loginMessages.insecurePassword;case"facebook":return t("pleaseLoginUsingFacebook");case"OAuth2_GOOGLE":return t("pleaseLoginUsingGoogle");case"apple":return t("pleaseLoginUsingApple");case"adminOnlyEntrypoint":return App.loginMessages.adminOnlyEntrypoint;default:return e.reason}},k=({initialEmail:e,onLoginComplete:t,handleGoToJoin:n})=>{const r=(0,a.c3)("Login"),[b,j]=(0,i.useState)("email"),[k,L]=(0,i.useState)(e??""),C=t??m.h,[N,M]=(0,i.useState)(!1),[P,I]=(0,i.useState)(!1),[F,T]=(0,i.useState)(null),[R,U]=(0,i.useState)(null),D=(0,y.n)(),B="email"===D||"loginWithCode"===D,W="text-base min-md:w-[384px] max-w-full",z="text-2xl font-medium text-center mt-0",H=(0,u.j)("login"),G=(0,i.useRef)(null),V=(0,i.useRef)(null),$=(0,i.useRef)(null),q=(0,i.useRef)(null),K=(0,l.dv)("md");(0,i.useEffect)((()=>{K&&"email"===b?V.current?.focus():"sso"===b&&q.current?.focus()}),[K,b]);const J=async e=>{U(null);const t={login:e,captchaResult:null},n=e=>{e.emailSent?(M(!0),j("code")):U(_(e,r))};if(H){const e=await d.Recaptcha.executeInvisible(G.current,H,"login_code");t.captchaResult=e}try{await p.Auth.sendGetLoginCode(t,n)}finally{I(!1)}},Y=async()=>{I(!0),await J(k)},[Q,X]=(0,i.useState)(null),Z=e=>{if(p.Auth.clearCookies(),f.j.deactivate(!0),e.loggedIn){const t=e.from;t&&(0,y.t)(t),(0,g.q)("login.success",e),C()}else X(_(e,r)),(0,g.q)("login.failure",e)};return"email"===b?(0,o.jsxs)("div",{className:W,children:[(0,o.jsxs)("div",{className:"flex flex-col gap-6 mb-8",children:[(0,o.jsx)(E,{children:(0,o.jsx)(s.A,{})}),(0,o.jsx)("h2",{className:(0,w.cn)(z,{hidden:!App.showJoinLink}),children:r("signInToYourAccount")}
1)]}),App.showJoinLink&&(0,o.jsxs)("div",{className:"flex justify-center mb-4",children:[(0,o.jsx)("span",{children:r("new")}),"Â ",n?(0,o.jsx)("button",{onClick:n,className:"text-brand-500 font-medium",children:r("joinUs")}):(0,o.jsx)("a",{href:"/Join",className:"text-brand-500 font-medium",children:r("joinUs")}),(0,o.jsx)("span",{children:"."})]}),(0,o.jsxs)("div",{className:"sign-up-wrapper flex flex-col gap-6 p-8 bg-white border-1 border-base rounded-base",children:[(0,o.jsx)(h.U,{loginHandler:Z,error:Q,setError:X}),(0,o.jsxs)("div",{className:"sign-up-form w-full",children:[R&&(0,o.jsx)("div",{className:"mb-4 text-red-500 text-center",id:"api-error","data-testid":"api-error",children:R}),(0,o.jsx)(c.l1,{initialValues:{email:k},onSubmit:async(e,{setSubmitting:t})=>{L(e.email),U(null),await p.Auth.validateLogin(e.email,(async t=>{if(t.hasAccount){const n=A[t.ssoAssociation];n?.isAvailable()?(T(n.name),j("sso")):t.ssoAssociation?await J(e.email):j("password")}else U(_({reason:"email"},r))})),t(!1)},children:({isSubmitting:e})=>(0,o.jsx)(c.lV,{children:(0,o.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,o.jsx)(c.D0,{name:"email",children:({field:e})=>(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{htmlFor:"email",className:"text-sm font-medium",children:r("email")}),(0,o.jsx)("input",{id:"email",ref:V,"aria-label":r("email"),className:"w-full min-h-10 rounded-lg mt-1",type:"email",placeholder:"[email protected]",autoComplete:"username",required:!0,...e,value:e.value||""})]})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{id:"continueBtn","aria-label":r("signInWithEmail"),className:"w-full button-primary button-lg z-1",type:"submit",disabled:e,children:r("signInWithEmail")}),B&&(0,o.jsx)(O.F,{})]})]})})})]})]})]}):"sso"===b?(0,o.jsxs)("div",{className:W,children:[(0,o.jsxs)("div",{className:"flex flex-col gap-6 mb-8",children:[(0,o.jsx)(E,{children:(0,o.jsx)(s.A,{})}),(0,o.jsx)("h2",{ref:q,tabIndex:-1,className:z,children:r("signInToYourAccount")}),(0,o.jsxs)("div",{className:"text-center text-gray-600",children:[k,(0,o.jsxs)("button",{className:"button-link text-brand-500 font-medium ml-2",onClick:()=>j("email"),children:["(",r("change"),")"]})]})]}),(0,o.jsxs)("div",{className:"sign-up-wrapper flex flex-col gap-6 p-8 bg-white border-1 border-base rounded-base",children:[R&&(0,o.jsx)("div",{className:"mb-4 text-red-500 text-center",id:"api-error","data-testid":"api-error",children:R}),(0,o.jsx)("p",{className:"m-0 text-center text-gray-600","data-testid":"sso-association",children:r("accountConnectedToProvider",{provider:F??""})}),(0,o.jsx)(h.U,{loginHandler:Z,error:Q,setError:X}),H&&(0,o.jsx)("div",{ref:G,className:"showLogin js-captcha-container captcha-container"}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("button",{id:"requestCodeLink",className:"button-link text-brand-500 font-medium",onClick:Y,disabled:P,children:r("emailMeOneTimeLoginCode")}),"loginWithCode"==D&&(0,o.jsx)(O.c,{})]})]})]}):"code"===b?(0,o.jsxs)("div",{className:W,children:[(0,o.jsxs)("div",{className:"flex flex-col gap-6 mb-8",children:[(0,o.jsx)(E,{children:(0,o.jsx)(s.A,{})}),(0,o.jsx)("h2",{className:z,children:r("enterVerificationCode")}),(0,o.jsxs)("div",{className:"text-center text-gray-600",children:[k,(0,o.jsxs)("button",{className:"button-link text-brand-500 font-medium ml-2",onClick:()=>j("email"),children:["(",r("change"),")"]})]}),N&&(0,o.jsx)("div",{className:"text-center text-gray-600",children:r("weSentVerificationCode")})]}),(0,o.jsx)("div",{className:"sign-up-wrapper flex flex-col gap-6 p-8 bg-white border-1 border-base rounded-base",children:(0,o.jsxs)("div",{className:"sign-up-form w-full",children:[R&&(0,o.jsx)("div",{className:"mb-4 text-red-500 text-center",id:"api-error","data-testid":"api-error",children:R}),(0,o.jsx)(c.l1,{initialValues:{code:""},onSubmit:(e,{setSubmitting:t,resetForm:n})=>{U(null);const o=p.Auth.sendLoginWithCode({login:k,code:e.code},(e=>{p.Auth.clearCookies(),f.j.deactivate(!0),e.loggedIn?((0,y.t)("loginWithCode"),(0,g.q)("login.success",e)):("password"===e.reason&&(e.reason="invalid_code"),U(_(e,r)),n({values:{code:""}}),setTimeout((()=>{$.current?.focus()}),0),(0,g.q)("login.failure",e))})).then((e=>{if(t(!1),!e?.loggedIn)throw new v.Uj("Login failed");C()}));LoadingIndicator.withPromise(o,{pendingMessage:r("verifyingCode"),successMessage:r("loginSuccessful"),failureMessage:r("codeVerificationFailed")})},children:(0,o.jsx)(c.lV,{children:(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsx)(c.D0,{name:"code",children:({field:e,form:t})=>(0,o.jsx)(x.E,{ref:$,value:e.value||"",onChange:async e=>{const n=e.replace(/[^0-9]/g,"");await t.setFieldValue("code",n)},inputId:"login-code",autoFocus:!0})}),H&&(0,o.jsx)("div",{ref:G,className:"showLogin js-captcha-container captcha-container"}),(0,o.jsx)("button",{id:"verifyBtn",className:"w-full button-primary button-lg",type:"submit",children:r("signIn")}),(0,o.jsx)("div",{className:"text-center",children:(0,o.jsx)("button",{className:"button-link text-brand-500 font-medium",onClick:Y,disabled:!N,children:r("sendNewCode")})})]})})})]})})]}):(0,o.jsxs)("div",{className:W,children:[(0,o.jsxs)("div",{className:"flex flex-col gap-6 mb-8",children:[(0,o.jsx)(E,{children:(0,o.jsx)(s.A,{})}),(0,o.jsx)("h2",{className:z,children:r("signInToYourAccount")}
1),(0,o.jsxs)("div",{className:"text-center text-gray-600",children:[k,(0,o.jsxs)("button",{className:"button-link text-brand-500 font-medium ml-2",onClick:()=>j("email"),children:["(",r("change"),")"]})]})]}),(0,o.jsx)("div",{className:"sign-up-wrapper flex flex-col gap-6 p-8 bg-white border-1 border-base rounded-base",children:(0,o.jsxs)("div",{className:"sign-up-form w-full",children:[R&&(0,o.jsx)("div",{className:"mb-4 text-red-500 text-center",id:"api-error","data-testid":"api-error",children:R}),(0,o.jsx)(c.l1,{initialValues:{password:""},onSubmit:(e,{setSubmitting:t})=>{U(null);const n=e=>{p.Auth.clearCookies(),f.j.deactivate(!0),e.loggedIn?((0,y.t)("email"),(0,g.q)("login.success",e)):(U(_(e,r)),(0,g.q)("login.failure",e))},o=d.Recaptcha.executeInvisible(G.current,H,"login").then((t=>p.Auth.sendLogin({login:k,password:e.password,captchaResult:t,ajax:!0,handler:n}))).then((e=>{if(t(!1),!e.loggedIn)throw void 0;C()}));LoadingIndicator.withPromise(o,{pendingMessage:r("checkingYourEmailAndPassword"),successMessage:r("loginSuccessful"),failureMessage:r("loginUnsuccessful")})},children:({isSubmitting:e})=>(0,o.jsx)(c.lV,{children:(0,o.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,o.jsx)("div",{className:"hidden",children:(0,o.jsx)("input",{className:"w-full min-h-10 rounded-lg",readOnly:!0,value:k,autoComplete:"username"})}),(0,o.jsx)(c.D0,{name:"password",children:({field:e})=>(0,o.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,o.jsx)("label",{htmlFor:"password",className:"text-sm font-medium",children:r("password")}),(0,o.jsx)(S,{"aria-label":r("password"),autoFocus:!0,...e,value:e.value||""})]})}),H&&(0,o.jsx)("div",{ref:G,className:"showLogin js-captcha-container captcha-container"}),(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{id:"loginBtn","aria-label":r("signInWithPassword"),className:"w-full button-primary button-lg z-1",type:"submit",disabled:e,children:r("signInWithPassword")}),"email"==D&&(0,o.jsx)(O.F,{})]}),(0,o.jsx)("div",{className:"text-center text-gray-500 my-4",children:r("or")}),(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("button",{id:"requestCodeLink",className:"button-link text-brand-500 font-medium",onClick:Y,disabled:e||P,children:r("emailMeOneTimeLoginCode")}),"loginWithCode"==D&&(0,o.jsx)(O.c,{})]})]})})})]})})]})};(0,j.A)("LogIn",k)},6134(e,t,n){n.d(t,{F:()=>r,c:()=>a});var o=n(50061),i=n(54251);function r(){const e=(0,i.c3)("Login");return(0,o.jsx)("div",{className:"text-xs font-medium bg-blue-50 border-blue-200 border-1 text-blue-500 px-2 rounded-b-lg -mt-2 pt-2 pb-0.5 text-center",children:e("recentlyUsed")})}function a(){const e=(0,i.c3)("Login");return(0,o.jsx)("div",{className:"text-xs font-medium bg-blue-50 border-blue-200 border-1 text-blue-500 px-2 py-0 m-auto rounded-lg content-center",children:e("recentlyUsed")})}},7378(e,t,n){n.d(t,{j:()=>r});var o=n(50061),i=n(78967);function r(e){return e.children?(0,o.jsxs)("div",{className:"flex items-center gap-2 text-red-500 text-sm font-normal my-2 text-left",children:[(0,o.jsx)(i.hw,{name:"circle-exclamation",className:"size-4"}),e.children]}):null}},17139(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(95477),t),i(n(66263),t),i(n(46931),t)},24554(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.paramsToObject=t.objectToParams=t.isObject=void 0,t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.objectToParams=e=>(0,t.isObject)(e)&&0!==Object.keys(e).length?"?"+Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join("&"):"",t.paramsToObject=e=>(null==e?void 0:e.replace(/^\?/,"").split("&").reduce(((e,t)=>{if(!t)return e;const[n,o]=t.split("=");return Object.assign(Object.assign({},e),{[n]:decodeURIComponent(o)})}),{}))||{}},25223(e,t,n){n.d(t,{AD:()=>l,Ub:()=>r,dv:()=>a});var o=n(97145);
1const i={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function r(e){const[t,n]=(0,o.useState)();return(0,o.useEffect)((()=>{const t=window.matchMedia(e);n(t.matches);const o=e=>{n(e.matches)};return t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}}),[e]),t}function a(e){return r(`(min-width: ${i[e]}px)`)}function l(e,t){const n=a("sm"),o=a("md"),i=a("lg"),r=a("xl"),l=a("2xl");if(void 0===n)return t;let s=t;return"base"in e&&(s=e.base),n&&"sm"in e&&(s=e.sm),o&&"md"in e&&(s=e.md),i&&"lg"in e&&(s=e.lg),r&&"xl"in e&&(s=e.xl),l&&"2xl"in e&&(s=e["2xl"]),s}},30247(e,t,n){n.d(t,{E:()=>y});var o=n(50061),i=n(54251),r=n(97145),a=Object.defineProperty,l=Object.defineProperties,s=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(","),m=r.createContext({}),f=r.forwardRef(((e,t)=>{var n,o,i,a,f,v=e,{value:x,onChange:w,maxLength:j,textAlign:y="left",pattern:O,placeholder:E,inputMode:A="numeric",onComplete:S,pushPasswordManagerStrategy:_="increase-width",pasteTransformer:k,containerClassName:L,noScriptCSSFallback:C=b,render:N,children:M}=v,P=((e,t)=>{var n={};for(var o in e)d.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&c)for(var o of c(e))t.indexOf(o)<0&&u.call(e,o)&&(n[o]=e[o]);return n})(v,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]);let[I,F]=r.useState("string"==typeof P.defaultValue?P.defaultValue:""),T=null!=x?x:I,R=function(e){let t=r.useRef();return r.useEffect((()=>{t.current=e})),t.current}(T),U=r.useCallback((e=>{null==w||w(e),F(e)}),[w]),D=r.useMemo((()=>O?"string"==typeof O?new RegExp(O):O:null),[O]),B=r.useRef(null),W=r.useRef(null),z=r.useRef({value:T,onChange:U,isIOS:"undefined"!=typeof window&&(null==(o=null==(n=null==window?void 0:window.CSS)?void 0:n.supports)?void 0:o.call(n,"-webkit-touch-callout","none"))}),H=r.useRef({prev:[null==(i=B.current)?void 0:i.selectionStart,null==(a=B.current)?void 0:a.selectionEnd,null==(f=B.current)?void 0:f.selectionDirection]});r.useImperativeHandle(t,(()=>B.current),[]),r.useEffect((()=>{let e=B.current,t=W.current;if(!e||!t)return;function n(){if(document.activeElement!==e)return J(null),void Q(null);let t,n=e.selectionStart,o=e.selectionEnd,i=e.selectionDirection,r=e.maxLength,a=e.value,l=H.current.prev,s=-1,c=-1;if(0!==a.length&&null!==n&&null!==o){let e=n===o,i=n===a.length&&a.length<r;if(e&&!i){let e=n;if(0===e)s=0,c=1,t="forward";else if(e===r)s=e-1,c=e,t="backward";else if(r>1&&a.length>1){let n=0;if(null!==l[0]&&null!==l[1]){t=e<l[1]?"backward":"forward";let o=l[0]===l[1]&&l[0]<r;"backward"===t&&!o&&(n=-1)}s=n+e,c=n+e+1}}-1!==s&&-1!==c&&s!==c&&B.current.setSelectionRange(s,c,t)}let d=-1!==s?s:n,u=-1!==c?c:o,p=null!=t?t:i;J(d),Q(u),H.current.prev=[d,u,p]}if(z.current.value!==e.value&&z.current.onChange(e.value),H.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection],document.addEventListener("selectionchange",n,{capture:!0}),n(),document.activeElement===e&&q(!0),!document.getElementById("input-otp-style")){let e=document.createElement("style");if(e.id="input-otp-style",document.head.appendChild(e),e.sheet){let t="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";h(e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),h(e.sheet,`[data-input-otp]:autofill { ${t} }`),h(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),h(e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed;
1 font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),h(e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let o=()=>{t&&t.style.setProperty("--root-height",`${e.clientHeight}px`)};o();let i=new ResizeObserver(o);return i.observe(e),()=>{document.removeEventListener("selectionchange",n,{capture:!0}),i.disconnect()}}),[]);let[G,V]=r.useState(!1),[$,q]=r.useState(!1),[K,J]=r.useState(null),[Y,Q]=r.useState(null);r.useEffect((()=>{!function(e){setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)}((()=>{var e,t,n,o;null==(e=B.current)||e.dispatchEvent(new Event("input"));let i=null==(t=B.current)?void 0:t.selectionStart,r=null==(n=B.current)?void 0:n.selectionEnd,a=null==(o=B.current)?void 0:o.selectionDirection;null!==i&&null!==r&&(J(i),Q(r),H.current.prev=[i,r,a])}))}),[T,$]),r.useEffect((()=>{void 0!==R&&T!==R&&R.length<j&&T.length===j&&(null==S||S(T))}),[j,S,R,T]);let X=function({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=r.useState(!1),[l,s]=r.useState(!1),[c,d]=r.useState(!1),u=r.useMemo((()=>"none"!==n&&("increase-width"===n||"experimental-no-flickering"===n)&&i&&l),[i,l,n]),p=r.useCallback((()=>{let o=e.current,i=t.current;if(!o||!i||c||"none"===n)return;let r=o,l=r.getBoundingClientRect().left+r.offsetWidth-18,s=r.getBoundingClientRect().top+r.offsetHeight/2;0===document.querySelectorAll(g).length&&document.elementFromPoint(l,s)===o||(a(!0),d(!0))}),[e,t,c,n]);return r.useEffect((()=>{let t=e.current;if(!t||"none"===n)return;function o(){let e=window.innerWidth-t.getBoundingClientRect().right;s(e>=40)}o();let i=setInterval(o,1e3);return()=>{clearInterval(i)}}),[e,n]),r.useEffect((()=>{let e=o||document.activeElement===t.current;if("none"===n||!e)return;let i=setTimeout(p,0),r=setTimeout(p,2e3),a=setTimeout(p,5e3),l=setTimeout((()=>{d(!0)}),6e3);return()=>{clearTimeout(i),clearTimeout(r),clearTimeout(a),clearTimeout(l)}}),[t,o,n,p]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:"40px"}}({containerRef:W,inputRef:B,pushPasswordManagerStrategy:_,isFocused:$}),Z=r.useCallback((e=>{let t=e.currentTarget.value.slice(0,j);t.length>0&&D&&!D.test(t)?e.preventDefault():("string"==typeof R&&t.length<R.length&&document.dispatchEvent(new Event("selectionchange")),U(t))}
1),[j,U,R,D]),ee=r.useCallback((()=>{var e;if(B.current){let t=Math.min(B.current.value.length,j-1),n=B.current.value.length;null==(e=B.current)||e.setSelectionRange(t,n),J(t),Q(n)}q(!0)}),[j]),te=r.useCallback((e=>{var t,n;let o=B.current;if(!(k||z.current.isIOS&&e.clipboardData&&o))return;let i=e.clipboardData.getData("text/plain"),r=k?k(i):i;e.preventDefault();let a=null==(t=B.current)?void 0:t.selectionStart,l=null==(n=B.current)?void 0:n.selectionEnd,s=(a!==l?T.slice(0,a)+r+T.slice(l):T.slice(0,a)+r+T.slice(a)).slice(0,j);if(s.length>0&&D&&!D.test(s))return;o.value=s,U(s);let c=Math.min(s.length,j-1),d=s.length;o.setSelectionRange(c,d),J(c),Q(d)}),[j,U,D,T]),ne=r.useMemo((()=>({position:"relative",cursor:P.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"})),[P.disabled]),oe=r.useMemo((()=>({position:"absolute",inset:0,width:X.willPushPWMBadge?`calc(100% + ${X.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:X.willPushPWMBadge?`inset(0 ${X.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:y,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"})),[X.PWM_BADGE_SPACE_WIDTH,X.willPushPWMBadge,y]),ie=r.useMemo((()=>r.createElement("input",((e,t)=>l(e,s(t)))(((e,t)=>{for(var n in t||(t={}))d.call(t,n)&&p(e,n,t[n]);if(c)for(var n of c(t))u.call(t,n)&&p(e,n,t[n]);return e})({autoComplete:P.autoComplete||"one-time-code"},P),{"data-input-otp":!0,"data-input-otp-placeholder-shown":0===T.length||void 0,"data-input-otp-mss":K,"data-input-otp-mse":Y,inputMode:A,pattern:null==D?void 0:D.source,"aria-placeholder":E,style:oe,maxLength:j,value:T,ref:B,onPaste:e=>{var t;te(e),null==(t=P.onPaste)||t.call(P,e)},onChange:Z,onMouseOver:e=>{var t;V(!0),null==(t=P.onMouseOver)||t.call(P,e)},onMouseLeave:e=>{var t;V(!1),null==(t=P.onMouseLeave)||t.call(P,e)},onFocus:e=>{var t;ee(),null==(t=P.onFocus)||t.call(P,e)},onBlur:e=>{var t;q(!1),null==(t=P.onBlur)||t.call(P,e)}}))),[Z,ee,te,A,oe,j,Y,K,P,null==D?void 0:D.source,T]),re=r.useMemo((()=>({slots:Array.from({length:j}).map(((e,t)=>{var n;let o=$&&null!==K&&null!==Y&&(K===Y&&t===K||t>=K&&t<Y),i=void 0!==T[t]?T[t]:null;return{char:i,placeholderChar:void 0!==T[0]?null:null!=(n=null==E?void 0:E[t])?n:null,isActive:o,hasFakeCaret:o&&null===i}})),isFocused:$,isHovering:!P.disabled&&G})),[$,G,j,Y,K,P.disabled,T]),ae=r.useMemo((()=>N?N(re):r.createElement(m.Provider,{value:re},M)),[M,re,N]);return r.createElement(r.Fragment,null,null!==C&&r.createElement("noscript",null,r.createElement("style",null,C)),r.createElement("div",{ref:W,"data-input-otp-container":!0,style:ne,className:L},ae,r.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ie)))}));function h(e,t){try{e.insertRule(t)}catch(e){console.error("input-otp could not insert CSS rule:",t)}}f.displayName="Input";var b="\n[data-input-otp] {\n --nojs-bg: white !important;\n --nojs-fg: black !important;\n\n background-color: var(--nojs-bg) !important;\n color: var(--nojs-fg) !important;\n caret-color: var(--nojs-fg) !important;\n letter-spacing: .25em !important;\n text-align: center !important;\n border: 1px solid var(--nojs-fg) !important;\n border-radius: 4px !important;\n width: 100% !important;\n}\n@media (prefers-color-scheme: dark) {\n [data-input-otp] {\n --nojs-bg: black !important;\n --nojs-fg: white !important;\n }\n}",v=n(2305);function x({className:e,containerClassName:t,...n}){return(0,o.jsx)(f,{"data-slot":"input-otp",containerClassName:(0,v.cn)("flex items-center gap-2 has-disabled:opacity-50",t),className:(0,v.cn)("disabled:cursor-not-allowed",e),...n})}function w({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"input-otp-group",className:(0,v.cn)("flex items-center",e),...t})}function j({index:e,className:t,...n}){const i=(0,r.useContext)(m),{char:a,hasFakeCaret:l,isActive:s}=i?.slots?.[e]??{};return(0,o.jsxs)("div",{"data-slot":"input-otp-slot","data-active":s,className:(0,v.cn)("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[a,l&&(0,o.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,o.jsx)("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}
1const y=({value:e,onChange:t,inputId:n="code-input",autoFocus:r=!1,ref:a})=>{const l=(0,i.c3)("Login"),s=`${n}-description`,c=`${n}-label`;return(0,o.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,o.jsxs)("div",{role:"group","aria-labelledby":c,"aria-describedby":s,children:[(0,o.jsx)("label",{id:c,className:"text-sm font-medium block text-start mb-2",children:l("sixDigitCode")}),(0,o.jsx)(x,{ref:a,id:n,maxLength:6,value:e,onChange:t,pattern:"^\\d+$",autoComplete:"one-time-code",autoFocus:r,children:(0,o.jsxs)(w,{children:[(0,o.jsx)(j,{index:0}),(0,o.jsx)(j,{index:1}),(0,o.jsx)(j,{index:2}),(0,o.jsx)(j,{index:3}),(0,o.jsx)(j,{index:4}),(0,o.jsx)(j,{index:5})]})})]}),(0,o.jsx)("p",{id:s,className:"text-sm text-gray-500",children:l("enterSixDigitCodeReceived")})]})}},30517(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(54629));i(n(38807),t),i(n(17139),t),i(n(54629),t),i(n(73432),t),t.default=a.default},32906(e,t,n){n.d(t,{U:()=>B});var o=n(50061),i=n(54251),r=n(78967),a=n(69772),l=n(6134);function s({text:e,href:t,recentlyUsed:n}){return(0,o.jsxs)("a",{href:t,className:"w-full z-1 cursor-pointer",id:"ssoLogin",onClick:()=>(0,a.t)("sso"),children:[(0,o.jsxs)("button",{type:"button",className:"button-outline button-lg w-full px-0 font-medium min-h-10",children:[(0,o.jsx)(r.hw,{name:"right-to-bracket",className:"size-5 text-brand-500"}),(0,o.jsx)("span",{className:"ml-2",children:e})]}),n&&(0,o.jsx)(l.F,{})]})}var c=n(97145),d=n(18891);const u=(0,c.createContext)(null);function p({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:o,children:i}){const r=function(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:o}=e,[i,r]=(0,c.useState)(!1),a=(0,c.useRef)(n);a.current=n;const l=(0,c.useRef)(o);return l.current=o,(0,c.useEffect)((()=>{const e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.nonce=t,e.onload=()=>{var e;r(!0),null===(e=a.current)||void 0===e||e.call(a)},e.onerror=()=>{var e;r(!1),null===(e=l.current)||void 0===e||e.call(l)},document.body.appendChild(e),()=>{document.body.removeChild(e)}}),[t]),i}({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:o}),a=(0,c.useMemo)((()=>({clientId:e,scriptLoadedSuccessfully:r})),[e,r]);return c.createElement(u.Provider,{value:a},i)}function g(e){var t;return null!==(t=null==e?void 0:e.clientId)&&void 0!==t?t:null==e?void 0:e.client_id}const m={large:40,medium:32,small:20};function f({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:o,type:i="standard",theme:r="outline",size:a="large",text:l,shape:s,logo_alignment:d,width:p,locale:f,click_listener:h,containerProps:b,...v}){const x=(0,c.useRef)(null),{clientId:w,scriptLoadedSuccessfully:j}=function(){const e=(0,c.useContext)(u);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}(),y=(0,c.useRef)(e);y.current=e;const O=(0,c.useRef)(t);O.current=t;const E=(0,c.useRef)(o);return E.current=o,(0,c.useEffect)((()=>{var e,t,o,c,u,m,b,A,S;if(j)return null===(o=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.accounts)||void 0===t?void 0:t.id)||void 0===o||o.initialize({client_id:w,callback:e=>{var t;if(!(null==e?void 0:e.credential))return null===(t=O.current)||void 0===t?void 0:t.call(O);const{credential:n,select_by:o}=e;y.current({credential:n,clientId:g(e),select_by:o})},...v}),null===(m=null===(u=null===(c=null===window||void 0===window?void 0:window.google)||void 0===c?void 0:c.accounts)||void 0===u?void 0:u.id)||void 0===m||m.renderButton(x.current,{type:i,theme:r,size:a,text:l,shape:s,logo_alignment:d,width:p,locale:f,click_listener:h}),n&&(null===(S=null===(A=null===(b=null===window||void 0===window?void 0:window.google)||void 0===b?void 0:b.accounts)||void 0===A?void 0:A.id)||void 0===S||S.prompt(E.current)),()=>{var e,t,o;n&&(null===(o=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.accounts)||void 0===t?void 0:t.id)||void 0===o||o.cancel())}}),[w,j,n,i,r,a,l,s,d,p,f]),c.createElement("div",{...b,ref:x,style:{height:m[a],...null==b?void 0:b.style}})}var h,b,v,x,w=n(46958);function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},j.apply(null,arguments)}const y=function(e){return c.createElement("svg",j({xmlns:"http://www.w3.org/2000/svg",width:25,height:26,fill:"none"},e),h||(h=c.createElement("path",{fill:"#4280EF",d:"M24.5 13.294c0-.827-.08-1.68-.213-2.481h-11.55v4.721h6.615a5.57 5.57 0 0 1-2.454 3.708l3.948 3.067c2.32-2.16 3.654-5.308 3.654-9.015"})),b||(b=c.createElement("path",{fill:"#34A353",d:"M12.737 25.244c3.307 0 6.081-1.094 8.109-2.961l-3.948-3.041c-1.094.747-2.508 1.174-4.161 1.174-3.201 0-5.895-2.161-6.882-5.042L1.8 18.495a12.23 12.23 0 0 0 10.937 6.749"})),v||(v=c.createElement("path",{fill:"#F6B704",d:"M5.855 15.348a7.44 7.44 0 0 1 0-4.695L1.8 7.505a12.26 12.26 0 0 0 0 10.99z"})),x||(x=c.createElement("path",{fill:"#E54335",d:"M12.737 5.611a6.68 6.68 0 0 1 4.694 1.841l3.495-3.521c-2.214-2.08-5.148-3.2-8.19-3.174A12.23 12.23 0 0 0 1.8 7.505l4.055 3.148c.987-2.908 3.68-5.042 6.882-5.042"})))};function O({appId:e,Logo:t,logoViewBox:n="0 0 24 24",label:i,onClick:r,disabled:a,recentlyUsed:s}){return(0,o.jsxs)("div",{id:e,"data-mobile-appid":e,onClick:r,"aria-disabled":a,className:a?"pointer-events-none":"cursor-pointer",children:[(0,o.jsxs)("button",{type:"button",className:"button-sso-provider z
1-1 w-full gap-2",disabled:a,children:[(0,o.jsx)(t,{className:"size-6",viewBox:n}),(0,o.jsx)("span",{className:"min-w-0 truncate",children:i})]}),s&&(0,o.jsx)(l.F,{})]})}function E({loginHandler:e,setError:t,text:n,recentlyUsed:r}){const a=(0,i.c3)("Login"),s=(0,c.useRef)(null),[u,g]=(0,c.useState)();return(0,c.useEffect)((()=>{const e=s.current;if(!e)return;const t=()=>{const t=Math.min(e.clientWidth,400);t>0&&g(t)};let n;t();const o=new ResizeObserver((()=>{void 0!==n&&window.clearTimeout(n),n=window.setTimeout(t,100)}));return o.observe(e),()=>{o.disconnect(),void 0!==n&&window.clearTimeout(n)}}),[]),App.isOnMobileApp?(0,o.jsx)(O,{appId:"googleLogin",Logo:y,logoViewBox:"0 0 25 26",label:a("signup_with"===n?"signUpWithGoogle":"signInWithGoogle"),recentlyUsed:r}):(0,o.jsx)(p,{clientId:App.googleOAuth2Clientid,children:(0,o.jsxs)("div",{id:"googleLogin",ref:s,className:"w-full","data-mobile-appid":"googleLogin",children:[(0,o.jsx)(f,{onSuccess:n=>{n.credential?d.Auth.sendLogin({googleOAuthData:n,ajax:!0,handler:e}):t(App.loginMessages.OAuth2_ACCESS_TOKEN)},onError:()=>{t(App.loginMessages.OAuth2_ERROR)},containerProps:{className:"relative z-1"},locale:(0,w.y1)(App.lang),text:n,theme:"outline",size:"large",shape:"rectangular",logo_alignment:"center",width:u?.toString()}),r&&(0,o.jsx)(l.F,{})]})})}var A;function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},S.apply(null,arguments)}const _=function(e){return c.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),A||(A=c.createElement("path",{fill:"#1877F2",d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073"})))};var k,L=n(30517),C=n.n(L);function N({loginHandler:e,setError:t,text:n,recentlyUsed:r}){const a=(0,i.c3)("Login");return App.facebookLoginEnabled?(0,o.jsx)(C(),{appId:App.facebookAppId,initParams:{version:"v25.0",cookie:!0},onSuccess:()=>{d.Auth.clearCookies(),d.Auth.sendFacebookLogin(e)},onFail:e=>{t(a("unableToCompleteFacebookLogin"))},render:e=>(0,o.jsx)(O,{appId:"facebookLogin",Logo:_,label:n,onClick:e.onClick,recentlyUsed:r})}):null}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},M.apply(null,arguments)}const P=function(e){return c.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),k||(k=c.createElement("path",{fill:"currentColor",d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.58 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25"})))};let I=!1,F=!1,T=[];var R=n(35599);function U({loginHandler:e,setError:t,text:n,recentlyUsed:r}){const a=(0,i.c3)("Login"),[l,s]=(0,c.useState)(!1),[u,p]=(0,c.useState)(!1),g=(0,c.useMemo)((()=>(0,R.R)()),[]);(0,c.useEffect)((()=>{App.appleLoginEnabled&&App.appleClientId&&!App.isOnMobileApp&&function(e){if(I)return void e();if(T.push(e),F)return;F=!0;const t=document.createElement("script");t.src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",t.async=!0,t.onload=()=>{window.AppleID.auth.init({clientId:App.appleClientId,scope:"name email",redirectURI:window.location.origin+"/Guide/User/remote_login",usePopup:!0}),I=!0,F=!1,T.forEach((e=>e())),T=[]},t.onerror=()=>{F=!1,console.error("Failed to load Apple Sign In SDK")},document.body.append(t)}((()=>p(!0)))}),[]);const m=(0,c.useCallback)((async()=>{if(u&&!l){s(!0);try{const n=await window.AppleID.auth.signIn(),o=await fetch("/api/2.0/user/login/appleLogin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identityToken:n.authorization.id_token,user:n.user})}),i=await o.json();i.loggedIn?(i.from="apple",d.Auth.loggedIn(i),e(i)):t(i.reason||a("unableToCompleteAppleLogin"))}catch(e){"popup_closed_by_user"!==e?.error&&t(a("unableToCompleteAppleLogin"))}finally{s(!1)}}}),[u,l,e,t,a]);if(!App.appleLoginEnabled||g)return null;if(App.isOnMobileApp)return(0,o.jsx)(O,{appId:"appleLogin",Logo:P,label:n,recentlyUsed:r});const f=!u||l;return(0,o.jsx)(O,{appId:"appleLogin",Logo:P,label:n,onClick:m,disabled:f,recentlyUsed:r})}var D=n(7378);
1function B({loginHandler:e,error:t,setError:n,register:r}){const l=(0,i.c3)("Login");if(!(App.ssoLoginUrl||App.googleLoginEnabled||App.facebookLoginEnabled||App.appleLoginEnabled))return null;const c=t=>n=>(n.loggedIn&&(n.from=t),e(n)),d=(0,a.n)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[App.ssoLoginUrl&&(0,o.jsx)(s,{href:App.ssoLoginUrl,text:l(r?"signUpWithSSO":"signInWithSSO"),recentlyUsed:"sso"===d}),App.googleLoginEnabled&&(0,o.jsx)(E,{setError:n,loginHandler:c("google"),text:r?"signup_with":"signin_with",recentlyUsed:"google"===d}),(0,o.jsx)(U,{setError:n,loginHandler:c("apple"),text:l(r?"signUpWithApple":"signInWithApple"),recentlyUsed:"apple"===d}),(0,o.jsx)(N,{setError:n,loginHandler:c("facebook"),text:l(r?"signUpWithFacebook":"signInWithFacebook"),recentlyUsed:"facebook"===d}),(0,o.jsx)(D.j,{children:t})]}),(0,o.jsx)("div",{className:"flex items-center justify-center h-5 relative w-full before:content-[''] before:absolute before:top-1/2 before:-translate-y-1/2 before:w-full before:h-px before:bg-gray-300 before:border-b before:border-gray-300 before:z-0",children:(0,o.jsx)("span",{className:"bg-white inline-flex mx-auto text-sm px-6 relative uppercase",children:l("or")})})]})}},35599(e,t,n){function o(){return/iFixitMobileApp/i.test(navigator.userAgent)}function i(){return App.isOnMobileApp&&/iFixitMobileApp\/android/i.test(navigator.userAgent)}n.d(t,{K:()=>o,R:()=>i})},38807(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(46105),t),i(n(24554),t),i(n(94015),t)},40711(e,t,n){n.d(t,{A:()=>g,M:()=>r.M_});var o=n(50061),i=n(5041),r=n(66005),a=n(81778),l=n(32348),s=n(84185),c=n(15961),d=n(37277),u=n(42554),p=n(81218);n(30708);const g=(e,t,n)=>{var g;g=()=>{const g=`.react-component[data-name="${e}"]`,m=document.querySelectorAll(g);Array.from(m).forEach((g=>{console.time(e);const m={...n,...JSON.parse(g.dataset.props)};(0,l.T)((()=>(0,s.renderTrackedAsync)(g,(async()=>{const e=await(0,u.N)();return(0,c.initializeReactQuery)((0,o.jsx)(p.A,{children:(0,o.jsx)(d.iX,{growthbook:e,children:(0,o.jsx)(a.Kq,{store:r.M_,children:(0,o.jsx)(i.Dv,{ifixitOrigin:window.origin,isLoggedIn:App.isLoggedIn,priceTiers:App.priceTiers,isOnMobileApp:App.isOnMobileApp,storeLocale:App.userPreferredStoreLocale,language:App.lang,children:(0,o.jsx)(t,{...m})})})})}))}))),["Error occurred while rendering",t,"with props",m]),console.timeEnd(e)}))},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",g):g()}},41148(e,t,n){n.d(t,{Recaptcha:()=>a});let o,i={},r=null;const a={executeInvisible:function(e,t,n){if(!e)return Promise.resolve();if(!t)throw"sitekey is "+t;if(!n)throw"area is "+n;return(r||(r=new Promise((e=>{window.recaptchaOnload=function(){e()};const t=document.createElement("script");t.src="https://www.google.com/recaptcha/api.js?onload=recaptchaOnload&render=explicit",document.head.append(t)})))).then((()=>new Promise((r=>{if(o=r,i[n]?.element===e)grecaptcha.reset(i[n].id);else{const r={sitekey:t,size:"invisible",callback:e=>o(e)};i[n]={element:e,id:grecaptcha.render(e,r,!1)}}grecaptcha.execute(i[n].id)}))))}}},46105(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createScriptEle=void 0,t.createScriptEle=(e,t)=>new Promise((n=>{var o;const i=document.getElementsByTagName("script")[0];if(document.getElementById(e))return void n(void 0);const r=document.createElement("script");if(r.id=e,r.src=t,r.onload=n,i)null===(o=i.parentNode)||void 0===o||o.insertBefore(r,i);else{const e=document.body.childNodes;document.body.insertBefore(r,e.item(e.length-1))}}))},46931(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LoginStatus=void 0,(n=t.LoginStatus||(t.LoginStatus={})).Connected="connected",n.NotAuthorized="not_authorized",n.Unknown="unknown"},46958(e,t,n){n.d(t,{Nl:()=>i,y1:()=>s,$h:()=>a});const o=JSON.parse('{"en":{"defaultUserLocale":"en-US"},"fr":{"defaultUserLocale":"fr-FR"},"de":{"defaultUserLocale":"de-DE"},"it":{"defaultUserLocale":"it-IT"},"es":{"defaultUserLocale":"es-ES"},"jp":{"defaultUserLocale":"ja-JP"},"ko":{"defaultUserLocale":"ko-KR"},"nl":{"defaultUserLocale":"nl-NL"},"pt":{"defaultUserLocale":"pt-PT"},"ru":{"defaultUserLocale":"ru-RU"},"tr":{"defaultUserLocale":"tr-TR"},"zh":{"defaultUserLocale":"zh-CN"}}'),i=Object.fromEntries(Object.entries(o).map((([e,{defaultUserLocale:t}])=>[e,t]))),r={ja:"jp"};function a(e){return r[e]??e}const l=Object.fromEntries(Object.entries(r).map((([e,t])=>[t,e])));function s(e){return Object.prototype.hasOwnProperty.call(l,e)?l[e]:e}},54629(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);
1i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},a=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function l(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(97145)),s=n(73432),c=n(38807);t.default=function(e){var t,n;const{appId:o,language:i="en_US",scope:r="public_profile, email",fields:d="name,email,picture",onSuccess:u,onFail:p,onProfileSuccess:g,className:m,style:f,children:h="Login with Facebook",render:b,autoLoad:v=!1,useRedirect:x=!1,useCustomerChat:w=!1}=e,j=Object.assign(Object.assign({version:"v16.0",xfbml:!1,cookie:!1,localStorage:!0},e.initParams),{appId:o}),y=Object.assign(Object.assign({redirect_uri:"undefined"!=typeof window?location.origin+location.pathname:"/",state:"facebookdirect",response_type:"code"},e.dialogParams),{client_id:o}),O=Object.assign(Object.assign({return_scopes:!1,ignoreSdkError:!1},e.loginOptions),{auth_nonce:"function"==typeof(null===(t=e.loginOptions)||void 0===t?void 0:t.auth_nonce)?e.loginOptions.auth_nonce():null===(n=e.loginOptions)||void 0===n?void 0:n.auth_nonce,scope:r});(0,l.useEffect)((()=>{E()}),[]);const E=()=>a(this,void 0,void 0,(function*(){yield s.FacebookLoginClient.loadSdk(i,w),window.fbAsyncInit=()=>{s.FacebookLoginClient.init(j);const e=s.FacebookLoginClient.isRedirected(y);!1===e&&v?S():!0===e&&x&&A()}})),A=()=>{s.FacebookLoginClient.login((e=>{e.authResponse?(u&&u(e.authResponse),g&&s.FacebookLoginClient.getProfile(g,{fields:d})):p&&p({status:"loginCancelled"})}),Object.assign(Object.assign({},O),{scope:r}))},S=()=>{(0,c.isFacebookApp)()||x?s.FacebookLoginClient.redirectToDialog(y,O):window.FB?A():p&&p({status:"facebookNotLoaded"})};return b?b({onClick:S,logout:s.FacebookLoginClient.logout}):l.default.createElement("button",{type:"button",onClick:S,className:m,style:f},h)}},66263(e,t){Object.defineProperty(t,"__esModule",{value:!0})},69772(e,t,n){n.d(t,{n:()=>r,t:()=>a});var o=n(43023);const i="last-login-method";function r(){return o.A.getItem(i)}function a(e){o.A.setItem(i,e)}},73432(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function l(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.FacebookLoginClient=t.SDK_SCRIPT_ELE_ID=void 0;const r=n(38807);t.SDK_SCRIPT_ELE_ID="facebook-jssdk",t.FacebookLoginClient={getFB:()=>window.FB?window.FB:(console.warn("FB not found"),null),getLoginStatus(e,t=!1){const n=this.getFB();n?n.getLoginStatus(e,t):e({status:"unknown"})},getProfile(e,t){var n;null===(n=this.getFB())||void 0===n||n.api("me",t,e)},init(e){var t;null===(t=this.getFB())||void 0===t||t.init(e)},clear(){window.FB=null;const e=document.getElementById(t.SDK_SCRIPT_ELE_ID);e&&e.remove()},isRedirected(e){var t,n;const o=(0,r.paramsToObject)(window.location.search);return(null!==(t=o.state===(null==e?void 0:e.state))&&void 0!==t?t:"facebookdirect")&&void 0!==o[null!==(n=null==e?void 0:e.response_type)&&void 0!==n?n:""]},loadSdk(e,n){return o(this,void 0,void 0,(function*(){yield(0,r.createScriptEle)(t.SDK_SCRIPT_ELE_ID,`https://connect.facebook.net/${e}/sdk${n?"/xfbml.customerchat":""}.js`)}))},redirectToDialog(e,t){var{ignoreSdkError:n}=t,o=i(t,["ignoreSdkError"]);window.location.href=`https://www.facebook.com/dialog/oauth${(0,r.objectToParams)(Object.assign(Object.assign({},e),o))}`},login(e,t){var n,{ignoreSdkError:o}=t,r=i(t,["ignoreSdkError"]);try{null===(n=this.getFB())||void 0===n||n.login(e,r)}catch(e){if(o)return;throw e}},logout(e){this.getLoginStatus((t=>{var n;"connected"===t.status?null===(n=this.getFB())||void 0===n||n.logout(e):e()}))}}}
1,94015(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFacebookApp=void 0,t.isFacebookApp=()=>{if("undefined"==typeof window)return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1||e.indexOf("Instagram")>-1}},95477(e,t){Object.defineProperty(t,"__esModule",{value:!0})}}]); 2//# sourceMappingURL=5519.4eae3407b78f573f6ff8.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.