"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2511],{9180:function(e,o,n){n.d(o,{X:function(){return apiCheckOrgForSaml}});var t=n(1448);function apiCheckOrgForSaml(e){return(0,t.A_)("/api/fe/v3/login/check",e).then(e=>e.ok?e.json().then(e=>({success:!0,data:e})):404===e.status?{success:!1,error_type:"org_not_found"}:(0,t.xo)())}},1448:function(e,o,n){n.d(o,{A_:function(){return getRequest},GH:function(){return putRequest},Jl:function(){return deleteRequest},Nr:function(){return createBadResponse},aK:function(){return t},j0:function(){return postRequest},xo:function(){return createUnexpectedErrorResponse}});let getStandardHeaders=e=>{let o={"Content-Type":"application/json","X-CSRF-Token":"-.-"};return e&&(o["X-SAML-Code"]=e),o},getGetRequestHeaders=e=>{let o={"Content-Type":"application/json"};return e&&(o["X-SAML-Code"]=e),o},t="An unexpected error has occurred, please try again",postRequest=(e,o,n)=>fetch(e,{method:"POST",headers:getStandardHeaders(n),body:JSON.stringify(o)}),deleteRequest=(e,o,n)=>fetch(e,{method:"DELETE",headers:getStandardHeaders(n),body:JSON.stringify(o)}),getRequest=(e,o,n)=>{let t=new URLSearchParams(o);return fetch("".concat(e,"?").concat(t.toString()),{method:"GET",headers:getGetRequestHeaders(n)})},putRequest=(e,o,n)=>fetch(e,{method:"PUT",headers:getStandardHeaders(n),body:JSON.stringify(o)}),createBadResponse=(e,o)=>({success:!1,error_type:"bad_request",field_to_errors:e,overall_errors:o}),createUnexpectedErrorResponse=()=>({success:!1,error_type:"unexpected_error"})},3658:function(e,o,n){var t=n(5893),r=n(6817),i=n(4761),s=n(6137),a=n(7789),l=n(5117),c=n(7564),d=n(4530),g=n(7294),u=n(3200),h=n(4070);let p=(0,r.k)(e=>({badge:{padding:"".concat(e.spacing.md," ").concat(e.spacing.lg),borderRadius:e.radius.md,height:"100%",pointerEvents:"auto",cursor:"pointer"},poweredBy:{backgroundColor:e.colors.propelAuthGreen[6],color:e.colors.propelAuthWhite[6]}}));o.Z=e=>{let{isDesktop:o,showNavbar:n}=e,{cx:r,classes:x}=p(),m=(0,i.rZ)(),[f,w]=(0,g.useState)("");(0,g.useEffect)(()=>{w(window.location.hostname||"")},[]);let j=n?"calc(100vw - ".concat(o?"300px":"0px"," - (2 * ").concat(m.spacing.md,"))"):"calc(100vw - (2 * ".concat(m.spacing.md,"))");return(0,t.jsx)(s.Z,{style:{width:j,height:"auto",zIndex:10,pointerEvents:"none"},px:{base:"sm",sm:"xl"},py:{base:"xs",sm:"lg"},pos:"fixed",align:"end",position:"right",bottom:m.spacing.md,children:(0,t.jsx)(a.C,{tabIndex:10,component:"a",href:"https://www.propelauth.com?utm_campaign=poweredby&utm_source=".concat(f),target:"_blank",rel:"noopener noreferrer",className:r(x.badge,x.poweredBy),children:o?(0,t.jsxs)(s.Z,{children:[(0,t.jsx)(d.Z,{size:m.other.iconSizes.md}),(0,t.jsx)(l.x,{size:"md",ff:h.dn[u.bt.Inter].style.fontFamily,children:"Powered by PropelAuth"})]}):(0,t.jsxs)(c.K,{align:"center",spacing:0,p:0,m:0,children:[(0,t.jsx)(l.x,{size:"xs",ff:h.dn[u.bt.Inter].style.fontFamily,children:"Powered by"}),(0,t.jsx)(l.x,{size:"sm",ff:h.dn[u.bt.Inter].style.fontFamily,children:"PropelAuth"})]})})})}},1908:function(e,o,n){n.d(o,{yS:function(){return Z},H1:function(){return z},ZP:function(){return LoginPageShell_LoginPageShell}});var t,r,i=n(5893),s=n(8664),a=n(353),l=n(4065),c=n(3395),d=n(4761),g=n(1298),u=n(8540),h=n(6137),p=n(3723),x=n(2445),m=n(7564),f=n(9876),w=n(9236),j=n(3523),L=n(7294),_=n(3200),customer_DagworksPageTitle=()=>(0,i.jsxs)("div",{style:{maxWidth:"500px",margin:"0px"},children:[(0,i.jsx)("h3",{style:{textAlign:"center",fontWeight:700,fontSize:"38px",letterSpacing:"-2px",marginBottom:"5px"},children:"Welcome to DAGWorks!"}),(0,i.jsxs)("p",{style:{textAlign:"center",fontSize:"14px",lineHeight:"22px",marginBottom:"25px"},children:["Sign up to get started with a 14-day trial of the team plan. After that, select a"," ",(0,i.jsx)("a",{style:{color:"black"},href:"https://www.dagworks.io/pricing",children:"plan"}),", or continue to use the community plan for free."]})]}),S=n(2623),v=n(5117),y=n(4070),b=n(2916),customer_GovEagleLoginWarning=e=>{let{maxContentWidth:o,minContentWidth:n,isFrameless:t,isSplit:r,isMobile:s=!1}=e,a=(0,d.rZ)(),l=r||t?"xl":"0px",c=t?o:"calc(".concat(o," + 2 * ").concat(a.spacing.xl,")"),g=(0,b.wX)(a,r?y.xR.LoginForegroundColor:y.xR.LoginBackgroundColor),u=(0,b._T)(g)?a.fn.lighten(g,.1):a.fn.darken(g,.1),h=(0,b.wX)(a,r?y.xR.LoginForegroundTextColor:y.xR.LoginBackgroundTextColor),p=(0,b.e5)(h,u);return(0,i.jsx)(S.X,{w:"100%",maw:s?"min(100%, ".concat(c,")"):c,miw:s?"min(100%, ".concat(n,")"):n,p:t?"0px":"xl",mt:"lg",bg:u,style:{border:"none"},children:(0,i.jsxs)(m.K,{p:l,children:[(0,i.jsx)(j.M,{children:(0,i.jsx)(w.D,{color:p,order:4,children:"WARNING"})}),(0,i.jsx)(v.x,{color:p,children:"You are accessing a U.S. Government system that may contain Controlled Unclassified Information (CUI). Unauthorized use is prohibited and may result in penalties. By logging in, you consent to monitoring and agree to comply with security and privacy policies."})]})})},C=n(9432),k=n(2569),hooks_useLogoOffset=e=>{let{showHeader:o,showLogo:n,logoRef:t,contentRef:r,spacing:i}=e,s=(0,d.rZ)(),[a,l]=(0,L.useState)("0px"),[c,u]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let e=o?k.x:0,a=n&&t.current&&r.current&&r.current.offsetTop-t.current.offsetHeight>(0,g.px)(i)+e;if(a){var c;l("calc(-".concat(null!==(c=t.current.offsetHeight)&&void 0!==c?c:"0","px - ").concat(s.spacing.lg,")"))}u(!0)},[s.spacing.lg,n,c,i,o,t,r]),{yOffset:a,showContent:c}},R=n(3682);let getBackgroundStyles=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.other.loginUITheme===_.gq.SplitScreen,t=(0,b.wX)(e,y.xR.LoginForegroundColor),r=e.other.backgroundType===_.ez.Solid,i=e.other.backgroundType===_.ez.Image,s=e.other.backgroundType===_.ez.ImageSvg,a=(0,b.wX)(e,y.xR.LoginBackgroundColor),l=(0,b.wX)(e,y.xR.LoginSecondaryBackgroundColor),c=e.fn.linearGradient(e.other.gradientAngle,a,l);i?c="url(".concat("/api/v1/bg.png",")"):s&&(c="url(".concat("/api/v1/bg.svg",")"));let d=o&&n,g={backgroundPosition:"center",backgroundColor:d?t:void 0,backgroundImage:r||d?void 0:c,backgroundSize:"cover"};return g};var ContentWrappers_LoginPageContentWrapperDesktop=e=>{let{children:o,maxContentWidth:n,minContentWidth:t,isFrameless:r}=e,s=(0,d.rZ)(),a=r?x.W:S.X,l=r?n:"calc(".concat(n," + 2 * ").concat(s.spacing.xl," + 2px)");return(0,i.jsx)(a,{variant:y.kI.LoginFrameless,w:"100%",maw:l,miw:t,p:r?"0px":"xl",m:0,children:o})},Deprecated_DeprecatedLoginPageShellResponsiveLg=e=>{let{maxContentWidth:o,showLogo:n,logoUrl:t,title:r,children:s,bottomChild:a,pageType:l}=e,g=(0,d.rZ)(),h=l===c.$Q.DAGWORKS,p="calc(100vh - 2 * ".concat(g.spacing.xxl," - ").concat(n?z:"0","px)");return(0,i.jsx)(u.z,{smallerThan:"lg",styles:{display:"none"},children:(0,i.jsx)(x.W,{p:"xxl",size:"xl",mih:"100vh",children:(0,i.jsxs)(m.K,{align:"center",justify:"center",mih:p,spacing:"xl",children:[h&&(0,i.jsx)(customer_DagworksPageTitle,{}),!h&&n&&t&&(0,i.jsx)(C.Z,{logoUrl:t}),(0,i.jsxs)(S.X,{variant:y.kI.Login,maw:o,miw:Z,p:"20px",children:[!!r&&(0,i.jsx)(j.M,{mt:"lg",mb:"xl",children:(0,i.jsx)(w.D,{order:1,fz:"22px",fw:600,children:r})}),s,a&&(0,i.jsx)(j.M,{mt:"lg",children:a})]})]})})})},Deprecated_DeprecatedLoginPageShellResponsiveMd=e=>{let{maxContentWidth:o,showLogo:n,logoUrl:t,title:r,children:s,bottomChild:a,pageType:l}=e,g=(0,d.rZ)(),h=l===c.$Q.DAGWORKS,p="calc(100vh - 2 * ".concat(g.spacing.xl," - ").concat(n?z:"0","px)");return(0,i.jsx)(u.z,{smallerThan:"sm",styles:{display:"none"},children:(0,i.jsx)(u.z,{largerThan:"lg",styles:{display:"none"},children:(0,i.jsx)(x.W,{p:"xl",size:"md",mih:"100vh",children:(0,i.jsxs)(m.K,{align:"center",justify:"center",mih:p,spacing:"xl",children:[h&&(0,i.jsx)(customer_DagworksPageTitle,{}),!h&&n&&t&&(0,i.jsx)(C.Z,{logoUrl:t}),(0,i.jsxs)(S.X,{variant:y.kI.Login,maw:o,miw:Z,p:"20px",children:[!!r&&(0,i.jsx)(j.M,{mt:"lg",mb:"xl",children:(0,i.jsx)(w.D,{order:1,fz:"22px",fw:600,children:r})}),s,a&&(0,i.jsx)(j.M,{mt:"lg",children:a})]})]})})})})},T=n(4523),Responsive_SplitscreenBackground=e=>{let{isSplit:o,splitscreenContent:n}=e,t=(0,d.rZ)(),s=getBackgroundStyles(t),a=(null==n?void 0:n.direction)===_.d8.Right,l=(null==n?void 0:n.content_type)===_.rG.Text,c=!!n&&n.content_type===_.rG.Embed&&!!n.embed_url;return(0,i.jsxs)(T.x,{hidden:!o,w:r.Large,h:"100%",style:{order:a?1:2,...s},children:[l&&(0,i.jsx)(x.W,{p:"xxl",h:"100%",children:(0,i.jsx)(j.M,{h:"100%",w:"100%",children:(0,i.jsxs)(m.K,{h:"100%",w:"100%",justify:"center",children:[(0,i.jsx)(w.D,{order:2,color:y.xR.LoginBackgroundTextColor,style:{fontSize:t.fontSizes.xxxl,whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:null==n?void 0:n.header}),(0,i.jsx)(v.x,{size:"xl",color:y.xR.LoginSecondaryBackgroundTextColor,style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:null==n?void 0:n.subheader})]})})}),c&&(0,i.jsx)("iframe",{width:"100%",height:"100%",title:"split-iframe-content",id:"signup-readonly-frame",src:null==n?void 0:n.embed_url})]})};(t=r||(r={})).Large="61.8%",t.Small="38.2%",t.Half="50%";let getConditionalRenderStyles=e=>({opacity:e?"100%":"0%",transition:"100ms ease-in-out opacity"});var Responsive_LoginPageShellResponsiveDesktop=e=>{let o=(0,d.rZ)(),{disableLogoOffset:n,useDeprecatedPage:t,maxContentWidth:r,showLogo:s,showHeader:a,showFooter:l,logoUrl:S,title:v,pageTitle:b,children:T,bottomChild:I,pageType:E}=e,P=(0,L.useRef)(null),D=(0,L.useRef)(null),{yOffset:F,showContent:z}=hooks_useLogoOffset({showHeader:a,showLogo:s,logoRef:P,contentRef:D,spacing:o.spacing.xxl}),q=b===R.LOGIN_PAGE_TITLE&&E===c.KZ.GOVEAGLE,B=E===c.$Q.DAGWORKS,W=o.other.loginUITheme===_.gq.Frame,A=o.other.loginUITheme===_.gq.SplitScreen,O=o.other.splitscreen,U=(null==O?void 0:O.direction)===_.d8.Right,G="calc(100vh - ".concat(a?k.x:0,"px)"),M="calc(".concat(Z," + 2 * ").concat(o.spacing.xxl,")"),K="1px solid ".concat(o.colors[y.xR.LoginBorderColor][6]),N=getConditionalRenderStyles(z),H=getBackgroundStyles(o);if(t)return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Deprecated_DeprecatedLoginPageShellResponsiveLg,{...e}),(0,i.jsx)(Deprecated_DeprecatedLoginPageShellResponsiveMd,{...e})]});let X=l&&D.current&&D.current.clientHeight>=window.innerHeight-2*(0,g.px)(o.spacing.xxl)-(a?k.x:0);return(0,i.jsx)(u.z,{smallerThan:"md",styles:{display:"none"},children:(0,i.jsxs)(h.Z,{spacing:0,p:0,h:"100%",w:"100%",noWrap:!0,style:H,children:[(0,i.jsx)(Responsive_SplitscreenBackground,{isSplit:A,splitscreenContent:O}),(0,i.jsx)(p.x,{h:G,mih:"100%",style:{order:U?2:1},w:A?"38.2%":"100%",miw:M,maw:A?"50%":"100%",children:(0,i.jsx)(x.W,{p:"xl",size:"xl",h:"100%",mih:G,bg:A?y.xR.LoginForegroundColor:"transparent",style:{borderLeft:A&&U?K:"none",borderRight:A&&!U?K:"none",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,i.jsxs)(m.K,{ref:D,style:{marginTop:n?void 0:F,...N},h:"100%",w:"100%",align:"center",justify:"center",spacing:"lg",mb:X?"xxl":0,children:[B&&(0,i.jsx)(customer_DagworksPageTitle,{}),!B&&s&&S&&(0,i.jsx)(C.Z,{logoUrl:S,logoRef:P}),!!v&&(0,i.jsx)(f.k,{align:"center",justify:"center",children:(0,i.jsx)(w.D,{color:A?y.xR.LoginForegroundTextColor:y.xR.LoginBackgroundTextColor,order:1,fz:"xl",fw:600,children:v})}),(0,i.jsx)(ContentWrappers_LoginPageContentWrapperDesktop,{maxContentWidth:r,minContentWidth:Z,isFrameless:!W,children:T}),I&&(0,i.jsx)(j.M,{w:"100%",maw:r,miw:Z,children:I}),q&&(0,i.jsx)(customer_GovEagleLoginWarning,{maxContentWidth:r,minContentWidth:Z,isSplit:A,isFrameless:!W})]})})})]})})},ContentWrappers_LoginPageContentWrapperMobile=e=>{let{children:o,maxContentWidth:n,minContentWidth:t,isFrameless:r}=e,s=(0,d.rZ)(),a=r?x.W:S.X,l=r?n:"calc(".concat(n," + 2 * ").concat(s.spacing.xl," + 2px)");return(0,i.jsx)(a,{variant:y.kI.LoginFrameless,w:"100%",maw:"min(100%, ".concat(l,")"),miw:"min(100%, ".concat(t,")"),p:r?"0px":"xl",children:o})},Deprecated_DeprecatedLoginPageShellResponsiveSm=e=>{let{showLogo:o,logoUrl:n,title:t,children:r,bottomChild:s,pageType:a}=e,l=(0,d.rZ)(),g=a===c.$Q.DAGWORKS,h="calc(100vh - 2 * ".concat(l.spacing.lg," - ").concat(o?z:"0","px)");return(0,i.jsx)(u.z,{largerThan:"sm",styles:{display:"none"},children:(0,i.jsx)(x.W,{p:"lg",size:"md",mih:"100vh",children:(0,i.jsxs)(m.K,{align:"center",justify:"center",mih:h,spacing:"lg",children:[g&&(0,i.jsx)(customer_DagworksPageTitle,{}),!g&&o&&n&&(0,i.jsx)(C.Z,{logoUrl:n}),(0,i.jsxs)(S.X,{variant:y.kI.Login,maw:"100%",miw:"100%",p:"lg",children:[!!t&&(0,i.jsx)(j.M,{mt:"lg",mb:"xl",children:(0,i.jsx)(w.D,{order:1,fz:"22px",fw:600,children:t})}),r,s&&(0,i.jsx)(j.M,{mt:"lg",children:s})]})]})})})},Responsive_LoginPageShellResponsiveMobile=e=>{let o=(0,d.rZ)(),{useDeprecatedPage:n,maxContentWidth:t,showFooter:r,showHeader:s,showLogo:a,logoUrl:l,pageTitle:g,title:h,children:S,bottomChild:v,pageType:b}=e,I=(0,L.useRef)(null),E=(0,L.useRef)(null),{showContent:P}=hooks_useLogoOffset({showHeader:s,showLogo:a,logoRef:I,contentRef:E,spacing:o.spacing.lg}),D=g===R.LOGIN_PAGE_TITLE&&b===c.KZ.GOVEAGLE,F=b===c.$Q.DAGWORKS,z=o.other.loginUITheme===_.gq.Frame,q=o.other.loginUITheme===_.gq.SplitScreen,B="calc(100vh - ".concat(s?k.x:0,"px)"),W=getConditionalRenderStyles(P),A=getBackgroundStyles(o,!0);return n?(0,i.jsx)(Deprecated_DeprecatedLoginPageShellResponsiveSm,{...e}):(0,i.jsx)(u.z,{largerThan:"md",styles:{display:"none"},children:(0,i.jsx)(T.x,{p:0,h:"100%",w:"100%",style:A,children:(0,i.jsx)(p.x,{h:B,mih:"100%",w:"100%",maw:"100vw",children:(0,i.jsx)(x.W,{p:"lg",h:"100%",mih:B,bg:q?y.xR.LoginForegroundColor:"transparent",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,i.jsxs)(m.K,{style:W,ref:E,align:"center",justify:"center",spacing:"lg",w:"100%",mb:r?"xxl":0,children:[F&&(0,i.jsx)(customer_DagworksPageTitle,{}),!F&&a&&l&&(0,i.jsx)(C.Z,{logoUrl:l,logoRef:I}),!!h&&(0,i.jsx)(f.k,{align:"center",justify:"center",my:"sm",children:(0,i.jsx)(w.D,{color:q?y.xR.LoginForegroundTextColor:y.xR.LoginBackgroundTextColor,order:1,fz:"24px",fw:600,children:h})}),(0,i.jsx)(ContentWrappers_LoginPageContentWrapperMobile,{maxContentWidth:null!=t?t:Z,minContentWidth:Z,isFrameless:!z,children:S}),v&&(0,i.jsx)(j.M,{w:"100%",maw:t,children:v}),D&&(0,i.jsx)(customer_GovEagleLoginWarning,{maxContentWidth:t,minContentWidth:Z,isSplit:q,isFrameless:!z,isMobile:!0})]})})})})})},I=n(6817),E=n(7010);let P=(0,I.k)(e=>({badge:{backgroundColor:"#12141D",padding:"".concat(e.spacing.xs," ").concat(e.spacing.sm),borderRadius:e.radius.sm,height:"100%",pointerEvents:"auto",cursor:"pointer"},poweredBy:{color:e.colors.propelAuthGreen[6],textDecoration:"none"},testEnv:{color:"#bbbbbb"}}));var layout_DeprecatedFooter=e=>{let{showPoweredBy:o,isTestEnv:n}=e,{cx:t,classes:r}=P(),s=(0,d.rZ)(),[a,l]=(0,L.useState)("");return(0,L.useEffect)(()=>{l(window.location.hostname||"")},[]),(0,i.jsxs)(h.Z,{style:{width:"100vw",height:"auto",zIndex:10,pointerEvents:"none"},px:"lg",pb:"md",pos:"fixed",position:"apart",bottom:s.spacing.md,noWrap:!0,children:[n&&(0,i.jsx)(T.x,{className:t(r.badge,r.testEnv),children:(0,i.jsxs)(j.M,{inline:!0,p:"xs",children:[(0,i.jsx)(E.Z,{size:s.other.iconSizes.xs}),(0,i.jsx)(v.x,{size:"sm",fw:800,ml:"sm",children:"Test Environment"})]})}),o&&(0,i.jsx)(T.x,{component:"a",href:"https://www.propelauth.com?utm_campaign=poweredby&utm_source=".concat(a),target:"_blank",rel:"noopener noreferrer",className:t(r.badge,r.poweredBy),children:(0,i.jsxs)(v.x,{size:"sm",fw:800,p:"xs",children:[(0,i.jsxs)(v.x,{span:!0,style:{color:"#bbbbbb"},children:["Powered by"," "]}),"PropelAuth"]})})]})},D=n(3658),F=n(4055);let Z="400px",z=125;var LoginPageShell_LoginPageShell=e=>{let{pageConfig:o,pageTitle:n,title:t,bottomChild:r,disableLogoOffset:d,showLogo:g=!0,pageType:u=c.$Q.DEFAULT,maxContentWidth:h,children:p}=e,x=(0,l.a)("(min-width: 70em)",!0),m=o.use_deprecated_login_ui,f=!m&&o.is_test_env,w=o.show_powered_by,j=m&&(w||o.is_test_env),L=null;return j?L=(0,i.jsx)(layout_DeprecatedFooter,{showPoweredBy:o.show_powered_by,isTestEnv:o.is_test_env}):w&&(L=(0,i.jsx)(D.Z,{isDesktop:x,showNavbar:!1})),(0,i.jsxs)(s.V,{styles:{main:{paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:f?k.x:0}},header:f?(0,i.jsx)(a.h,{height:k.x,children:(0,i.jsx)(k.Z,{})}):void 0,children:[(0,i.jsx)(F.Z,{pageTitle:n,siteDisplayName:o.site_display_name}),(0,i.jsx)(Responsive_LoginPageShellResponsiveDesktop,{useDeprecatedPage:m,pageTitle:n,title:t,maxContentWidth:null!=h?h:Z,showLogo:g,showFooter:w,showHeader:f,logoUrl:o.logo_url,bottomChild:r,pageType:u,disableLogoOffset:d,children:p}),(0,i.jsx)(Responsive_LoginPageShellResponsiveMobile,{useDeprecatedPage:m,pageTitle:n,title:t,maxContentWidth:null!=h?h:Z,showLogo:g,showFooter:w,showHeader:f,logoUrl:o.logo_url,bottomChild:r,pageType:u,children:p}),L]})}},4055:function(e,o,n){var t=n(5893),r=n(4761),i=n(9008),s=n.n(i);o.Z=e=>{let{pageTitle:o,siteDisplayName:n}=e,i=(0,r.rZ)();return(0,t.jsxs)(s(),{children:[(0,t.jsx)("title",{children:"".concat(o," - ").concat(n)}),(0,t.jsx)("meta",{name:"description",content:"".concat(o," - ").concat(n)}),(0,t.jsx)("meta",{name:"og:title",content:"".concat(o," - ").concat(n)}),(0,t.jsx)("meta",{name:"og:description",content:"".concat(o," - ").concat(n)}),(0,t.jsx)("meta",{name:"og:locale",content:"en_US"}),(0,t.jsx)("meta",{name:"og:type",content:"website"}),(0,t.jsx)("meta",{name:"theme-color",content:i.colors.mainBackgroundColor[6]}),(0,t.jsx)("link",{rel:"icon",href:"/api/fe/v1/favicon.ico"})]})}},2569:function(e,o,n){n.d(o,{x:function(){return c}});var t=n(5893),r=n(6137),i=n(6768),s=n(5117),a=n(3200),l=n(4070);let c=50;o.Z=()=>(0,t.jsx)(r.Z,{position:"center",sx:e=>({backgroundColor:e.colors.propelAuthGreen[6],color:e.colors.propelAuthWhite[6]}),h:(0,i.h)(c),children:(0,t.jsx)(s.x,{size:"xl",fw:700,ff:l.dn[a.bt.Inter].style.fontFamily,children:"Test Environment"})})},4806:function(e,o,n){var t=n(5893),r=n(4761),i=n(8036),s=n(4523),a=n(4777),l=n(5117),c=n(4070),d=n(5427);o.Z=e=>{let{isFrameless:o=!1,showDivider:n=!0,useDeprecatedStyle:g=!1}=e,u=(0,r.rZ)();return(0,t.jsx)(i.u,{mounted:n||g,transition:"fade",duration:0,children:e=>(0,t.jsx)(s.x,{styles:e,children:(0,t.jsx)(a.i,{my:"xl",color:(0,d.tv)(u,o?c.kI.LoginFrameless:c.kI.Login),label:(0,t.jsx)(l.x,{size:"lg",mx:"md",color:g?(0,d.tv)(u,o?c.kI.LoginFrameless:c.kI.Login):u.fn.rgba(u.colors[o?c.xR.LoginBackgroundTextColor:c.xR.LoginForegroundTextColor][6],.5),children:"OR"}),labelPosition:"center"})})})}},9432:function(e,o,n){var t=n(5893);o.Z=e=>{let{logoUrl:o,logoRef:n,maxHeight:r,maxWidth:i}=e;return(0,t.jsx)("img",{ref:n,src:o,alt:"Logo",crossOrigin:"anonymous",style:{width:"auto",maxWidth:null!=i?i:"350px",height:"auto",maxHeight:null!=r?r:"125px"}})}},3614:function(e,o,n){var t,r,i=n(5893),s=n(4761),a=n(8036),l=n(7564),c=n(4528),d=n(4827),g=n(5336),u=n(1163),h=n(3200),p=n(4070),x=n(3395),m=n(5695);(t=r||(r={})).Google="/google/login",t.Github="/github/login",t.Slack="/slack/login",t.Microsoft="/microsoft/login",t.LinkedIn="/linkedin/login",t.Outreach="/outreach/login",t.Xero="/xero/login",t.QuickBooks="/quickbooks/login",t.Salesforce="/salesforce/login",t.Salesloft="/salesloft/login",t.Atlassian="/atlassian/login",t.Apple="/apple/login",o.Z=e=>{let{pageConfig:o,pageType:n,useDeprecatedPage:t=!1,signup:r=!1,showSignInOptions:f=!0}=e,w=(0,u.useRouter)(),j=(0,s.rZ)(),handleSocialLogin=async e=>{await w.push(e)},handlePasswordlessLogin=async()=>{o.has_passwordless_login&&await w.push({pathname:"/login_passwordless",query:{...w.query}})},handlePhoneLogin=async()=>{y&&await w.push("/login_phone")},handleSsoLogin=async()=>{o.has_sso_login&&await w.push({pathname:"/login_sso",query:{...w.query}})},L=r?"Sign up":"Sign in",_=o.has_otp_login?"code":"Magic Link",S=o.theme.login_ui_theme===h.gq.Frameless,v=!t&&S?p.Bq.LoginFramelessOutline:p.Bq.LoginOutline,y=n===x.KZ.BUILDWITT,{has_github_login:b,has_linkedin_login:C,has_google_login:k,has_microsoft_login:R,has_slack_login:T,has_outreach_login:I,has_xero_login:E,has_quickbooks_login:P,has_salesforce_login:D,has_salesloft_login:F,has_atlassian_login:Z,has_apple_login:z,has_passwordless_login:q,has_otp_login:B,has_sso_login:W,default_to_saml_login:A,use_org_name_for_saml:O}=o,U=W&&(!A||O||r||t),G=q&&(!r||!B);return(0,i.jsx)(a.u,{mounted:f||t,transition:"fade",duration:0,children:e=>(0,i.jsxs)(l.K,{styles:e,spacing:"md",children:[k&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/g-logo.svg",pos:"relative",variant:v,onClick:()=>handleSocialLogin("/google/login"),children:"".concat(L," with Google")}),b&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/github-logo.svg",variant:v,onClick:()=>handleSocialLogin("/github/login"),children:"".concat(L," with GitHub")}),T&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/slack-logo.svg",variant:v,onClick:()=>handleSocialLogin("/slack/login"),children:"".concat(L," with Slack")}),R&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/microsoft-logo.svg",variant:v,onClick:()=>handleSocialLogin("/microsoft/login"),children:"".concat(L," with Microsoft")}),C&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/linkedin-logo.svg",variant:v,onClick:()=>handleSocialLogin("/linkedin/login"),children:"".concat(L," with LinkedIn")}),I&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/outreach-logo.svg",variant:v,onClick:()=>handleSocialLogin("/outreach/login"),children:"".concat(L," with Outreach")}),E&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/xero-logo.svg",variant:v,onClick:()=>handleSocialLogin("/xero/login"),children:"".concat(L," with Xero")}),P&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/quickbooks-logo.svg",variant:v,onClick:()=>handleSocialLogin("/quickbooks/login"),children:"".concat(L," with QuickBooks")}),D&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/salesforce-logo.svg",variant:v,onClick:()=>handleSocialLogin("/salesforce/login"),children:"".concat(L," with Salesforce")}),F&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/salesloft-logo.svg",variant:v,onClick:()=>handleSocialLogin("/salesloft/login"),children:"".concat(L," with Salesloft")}),Z&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/atlassian-logo.svg",variant:v,onClick:()=>handleSocialLogin("/atlassian/login"),children:"".concat(L," with Atlassian Cloud")}),z&&(0,i.jsx)(m.Z,{farLeftIcon:"/img/apple-logo.svg",variant:v,onClick:()=>handleSocialLogin("/apple/login"),children:"".concat(L," with Apple")}),G&&(0,i.jsx)(m.Z,{farLeftIcon:(0,i.jsx)(c.Z,{size:j.other.iconSizes.lg}),variant:v,onClick:handlePasswordlessLogin,children:"".concat(L," with ").concat(_)}),y&&(0,i.jsx)(m.Z,{farLeftIcon:(0,i.jsx)(d.Z,{size:j.other.iconSizes.lg}),variant:v,onClick:handlePhoneLogin,children:"".concat(L," with Phone Number")}),U&&(0,i.jsx)(m.Z,{farLeftIcon:(0,i.jsx)(g.Z,{size:j.other.iconSizes.lg}),variant:v,onClick:handleSsoLogin,children:"".concat(L," with SSO")})]})})}},5695:function(e,o,n){var t=n(5893),r=n(4761),i=n(3997),s=n(6137);o.Z=e=>{let{farLeftIcon:o,children:n,...a}=e,l=(0,r.rZ)();return(0,t.jsxs)(i.z,{pos:"relative",...a,children:[(0,t.jsx)(s.Z,{pos:"absolute",left:16,children:"string"==typeof o?(0,t.jsx)("img",{src:o,alt:"Identity Provider logo",style:{height:l.other.iconSizes.lg,width:l.other.iconSizes.lg}}):o}),n]})}},3682:function(e,o,n){n.r(o),n.d(o,{LOGIN_PAGE_TITLE:function(){return O},LoginComponentVisibility:function(){return s},LoginState:function(){return i},__N_SSP:function(){return A},default:function(){return login}});var t,r,i,s,a=n(5893),l=n(5117),c=n(4065),d=n(7294),g=n(3200),u=n(1908),h=n(4070),p=n(3395),x=n(6137),m=n(3997),f=n(1163),Deprecated_DeprecatedDefaultLoginShellFooter=e=>{let{showSignupButton:o,renderPasswordLogin:n,isSmallMobile:t}=e,r=(0,f.useRouter)();return(0,a.jsxs)(x.Z,{noWrap:!0,position:o&&n?"apart":"center",w:"100%",children:[o&&(0,a.jsx)(m.z,{onClick:()=>r.push("/signup"),variant:h.Bq.TextOld,p:0,children:(0,a.jsx)(l.x,{size:t?"md":"lg",children:"No account? Sign up"})}),n&&(0,a.jsx)(m.z,{onClick:()=>r.push("/forgot_password"),variant:h.Bq.TextOld,p:0,children:(0,a.jsx)(l.x,{size:t?"md":"lg",children:"Forgot password?"})})]})},w=n(7564),DeprecatedLetterLoginShellFooter=e=>{let{isSmallMobile:o}=e,n=(0,f.useRouter)();return(0,a.jsxs)(w.K,{w:"100%",spacing:"xs",children:[(0,a.jsx)(m.z,{onClick:()=>n.push("/forgot_password"),variant:h.Bq.TextOld,p:0,children:(0,a.jsx)(l.x,{size:o?"md":"lg",children:"Forgot password?"})}),(0,a.jsxs)(x.Z,{noWrap:!0,position:"center",w:"100%",children:[(0,a.jsx)(l.x,{size:o?"md":"lg",children:"Not a user?"}),(0,a.jsx)(m.z,{onClick:()=>{window.location.href="https://www.letter.ai/request-a-demo"},variant:h.Bq.TextOld,p:0,children:(0,a.jsx)(l.x,{size:o?"md":"lg",children:"Request access"})})]})]})},j=n(8036),L=n(61),_=n(4685),S=n(1003),v=n(3193),y=n(966),b=n(7248),C=n(9417),k=n(3575),R=n(1664),T=n.n(R),I=n(9180),E=n(1448);function apiLogin(e){let o,n,t,{emailOrUsername:r,password:i,useUsernameOverEmail:s}=e;return((!r||r.length<1)&&(o=s?["Username required"]:["Email required"]),i||(n=["Password required"]),o||n)?s?Promise.resolve((0,E.Nr)({username:o,password:n})):Promise.resolve((0,E.Nr)({email:o,password:n})):(t=s?{username:r,password:i}:{email:r,password:i},(0,E.j0)("/api/fe/v1/login",t).then(e=>e.ok?e.json().then(e=>({success:!0,data:{user_id:e.user_id}})):400===e.status?e.json().then(e=>(0,E.Nr)({email:e.email,password:e.password,username:e.username},e.error)):404===e.status?e.text().then(e=>({success:!1,error_type:"login_not_found",message:e})):(0,E.xo)()))}var P=n(781),D=n(1584),F=n.n(D);let useFocus=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],[t,r]=(0,d.useState)(e),i={autoFocus:t,key:"".concat(o).concat(n?t:""),onFocus:()=>r(!0),onBlur:()=>r(!1)};return{focus:t,setFocus:e=>r(!F()(e)||e),focusProps:i}};var Z=n(5427),Deprecated_DeprecatedPasswordLogin=e=>{let{form:o,globalError:n,areButtonsDisabled:t,isLoading:r,handleSubmit:i}=e;return(0,a.jsx)("form",{onSubmit:o.onSubmit(i),children:(0,a.jsxs)(w.K,{mt:"lg",children:[(0,a.jsx)(L.o,{variant:h.kI.Login,placeholder:"Email",autoComplete:"email",...o.getInputProps("email")}),(0,a.jsx)(L.o,{autoComplete:"current-password",variant:h.kI.Login,placeholder:"Password",type:"password",...o.getInputProps("password")}),n&&(0,a.jsx)(l.x,{color:h.xR.ErrorButtonColor,children:n}),(0,a.jsx)(m.z,{variant:h.Bq.LoginPrimary,mt:"lg",type:"submit",fullWidth:!0,disabled:t,children:r?(0,a.jsx)(y.a,{color:h.xR.LoginSuccessButtonColor,size:"sm"}):"Log In"})]})})},login_EmailLogin=e=>{let{orgsMetaname:o,isFrameless:n,useDeprecatedPage:t=!1,defaultToSamlLogin:r,hasPasswordLogin:i,showPasswordLogin:c,gatePasswordLogin:g,setLoginComponentVisibility:u,providedEmail:p,loginButtonTextOverride:R}=e,{classes:D}=(0,Z.fc)(),F=(0,f.useRouter)(),{setFocus:z,focusProps:q}=useFocus(!1,"passwordInput",!0),{posthogClient:B}=(0,P.r)(),[W,A]=(0,d.useState)(!1),[O,U]=(0,d.useState)(!1),[G,M]=(0,d.useState)(""),[K,N]=(0,C.G)("",500),[H,X]=(0,d.useState)(""),V=(0,b.c)({initialValues:{email:null!=p?p:"",password:""},validate:{email:e=>{if(r){if(!e)return"Email is required";if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return"Email is invalid"}return null}}}),Q=n?h.kI.LoginFrameless:h.kI.Login,$=c&&g,J=!r||O,handleSubmit=async e=>{let o=!c&&g&&!t;if(o){u(s.Password);return}let n=!O&&r&&!t;if(n){A(!0);let o=await (0,I.X)({email:e.email});if(o.success)await F.push(o.data.login_url);else{A(!1),i?U(!0):V.setFieldError("email",Y);return}}A(!0),V.resetTouched();let a=await apiLogin({emailOrUsername:e.email,password:e.password,useUsernameOverEmail:!1});if(a.success){let{user_id:e}=a.data;B&&B.identify(e),await F.push("/post_login")}else"bad_request"===a.error_type?(V.setErrors(a.field_to_errors),a.overall_errors&&X(a.overall_errors[0])):"login_not_found"===a.error_type?(V.setFieldError("email",!0),V.setFieldError("password",!0),X(a.message)):k.N9.show({title:"Error",message:E.aK,color:h.xR.ErrorButtonColor,classNames:D}),A(!1)};(0,d.useEffect)(()=>{V.isTouched()&&H&&(X(""),V.clearErrors())},[V,H]),(0,d.useEffect)(()=>{let e=K&&r&&O&&i,checkForSaml=async()=>{let e=await (0,I.X)({email:K});e.success?M(e.data.login_url):M("")};e&&checkForSaml()},[K,r,i,O]);let Y="No ".concat(o.toLowerCase()," found for that domain"),onEmailChange=e=>{V.getInputProps("email").onChange(e),O&&(M(""),N(e.target.value))};return t?(0,a.jsx)(Deprecated_DeprecatedPasswordLogin,{form:V,globalError:H,areButtonsDisabled:W,isLoading:W,handleSubmit:handleSubmit}):(0,a.jsx)("form",{onSubmit:V.onSubmit(handleSubmit),children:(0,a.jsxs)(w.K,{children:[(0,a.jsx)(j.u,{mounted:c,transition:"fade",duration:0,children:e=>(0,a.jsxs)(w.K,{styles:e,spacing:"lg",children:[(0,a.jsx)(L.o,{variant:Q,label:(0,a.jsxs)(x.Z,{position:"apart",noWrap:!0,children:[(0,a.jsx)(l.x,{children:"Email"}),(0,a.jsx)(_.e,{tabIndex:G?2:-1,component:T(),href:G,variant:Q,style:{transition:"opacity 0.1s ease-in-out",opacity:G?1:0,pointerEvents:G?"auto":"none"},onMouseDown:e=>e.preventDefault(),children:"Sign in with SSO"})]}),autoComplete:"email",...V.getInputProps("email"),onChange:onEmailChange}),(0,a.jsx)(S.U,{in:J&&i,transitionTimingFunction:"ease-in-out",onTransitionEnd:()=>z(!0),children:(0,a.jsx)(v.W,{autoComplete:"current-password",variant:Q,label:(0,a.jsxs)(x.Z,{noWrap:!0,position:"apart",w:"100%",p:0,children:[(0,a.jsx)(l.x,{children:"Password"}),(0,a.jsx)(_.e,{tabIndex:3,component:T(),href:{pathname:"/forgot_password",query:{...F.query}},variant:Q,onMouseDown:e=>e.preventDefault(),children:"Forgot password?"})]}),...V.getInputProps("password"),...r?q:{}})}),H&&(0,a.jsx)(l.x,{color:h.xR.ErrorButtonColor,children:H})]})}),(0,a.jsxs)(w.K,{mt:c?"lg":"sm",children:[(0,a.jsx)(m.z,{variant:h.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:W,children:W?(0,a.jsx)(y.a,{color:h.xR.LoginSuccessButtonColor,size:"sm"}):J&&R?R:J?"Log in with email":"Continue"}),$&&(0,a.jsx)(m.z,{onClick:()=>u(s.SignIn),variant:h.Bq.LoginSubtlePrimary,fullWidth:!0,disabled:W,children:"Other login methods"})]})]})})},z=n(4806),q=n(9236),login_RedirectsWarning=e=>{let{setStopRedirecting:o}=e,n=(0,f.useRouter)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(q.D,{fz:"lg",order:2,color:"".concat(h.xR.ErrorButtonColor,".6"),children:"You appear to be using a browser that does not support third-party cookies."}),(0,a.jsx)(l.x,{mt:"lg",children:"Google Chrome is currently the only browser that supports third-party cookies by default. If you are using your application in a test environment, you will need to use Google Chrome while not in Incognito Mode, or otherwise enable third-party cookies in your browser. This only affects the test environment, not production. We apologize for the inconvenience, and are working on a fix for this issue."}),(0,a.jsxs)(w.K,{mt:"lg",children:[(0,a.jsx)(m.z,{variant:h.Bq.LoginPrimary,fullWidth:!0,onClick:()=>n.push("https://docs.propelauth.com/overview/faq"),children:"Learn More"}),(0,a.jsx)(m.z,{fullWidth:!0,variant:h.Bq.LoginOutline,onClick:()=>{localStorage.setItem("redirectTimerStart","0"),localStorage.setItem("redirectAttempts","0"),o(!1)},children:"Retry"})]})]})},B=n(3614),Deprecated_DeprecatedLoginPage=e=>{let{pageConfig:o,pageType:n,isSmallMobile:t,stopRedirecting:r,setStopRedirecting:i}=e,s=r&&o.is_test_env,c=(o.has_any_social_login||o.has_passwordless_login||o.has_sso_login)&&!s,d=o.has_password_login&&!s,g=!s&&!c&&!d,x=!s&&!g,m=o.allow_public_signups;return(0,a.jsxs)(u.ZP,{pageConfig:o,pageTitle:"Login",title:x?"Welcome":"",showLogo:x,bottomChild:x&&(m||d)?n===p.KZ.LETTER?(0,a.jsx)(DeprecatedLetterLoginShellFooter,{isSmallMobile:t}):(0,a.jsx)(Deprecated_DeprecatedDefaultLoginShellFooter,{renderPasswordLogin:d,showSignupButton:m,isSmallMobile:t}):void 0,children:[g&&(0,a.jsx)(l.x,{color:h.xR.ErrorButtonColor,align:"center",children:"There are no login options enabled. Contact your administrator to set one up."}),s&&(0,a.jsx)(login_RedirectsWarning,{setStopRedirecting:i}),c&&(0,a.jsx)(B.Z,{useDeprecatedPage:!0,pageConfig:o}),c&&d&&!s&&(0,a.jsx)(z.Z,{useDeprecatedStyle:!0}),d&&(0,a.jsx)(login_EmailLogin,{hasPasswordLogin:!0,defaultToSamlLogin:!1,orgsMetaname:"",showPasswordLogin:!0,gatePasswordLogin:!1,setLoginComponentVisibility:e=>{},isFrameless:!1,useDeprecatedPage:!0})]})},LoginFooters_DefaultLoginShellFooter=e=>{let{showSignupButton:o,loginUITheme:n}=e,t=n===g.gq.SplitScreen,r=t?h.kI.Login:h.kI.LoginFrameless,i=t?h.xR.LoginForegroundTextColor:h.xR.LoginBackgroundTextColor,s=(0,f.useRouter)();return o?(0,a.jsxs)(x.Z,{noWrap:!0,position:"center",w:"100%",children:[(0,a.jsx)(l.x,{color:i,size:"lg",children:"Don't have an account? "}),(0,a.jsx)(_.e,{tabIndex:-1,component:T(),href:{pathname:"/signup",query:{...s.query}},fw:500,size:"lg",variant:r,children:"Sign up"})]}):null},LoginFooters_LetterLoginShellFooter=e=>{let{loginUITheme:o}=e,n=o===g.gq.SplitScreen,t=n?h.kI.Login:h.kI.LoginFrameless,r=n?h.xR.LoginForegroundTextColor:h.xR.LoginBackgroundTextColor;return(0,a.jsxs)(x.Z,{noWrap:!0,position:"center",w:"100%",children:[(0,a.jsx)(l.x,{color:r,size:"lg",children:"Not a user?"}),(0,a.jsx)(_.e,{tabIndex:2,component:T(),href:"https://www.letter.ai/request-a-demo",variant:t,fw:500,size:"lg",children:(0,a.jsx)(l.x,{color:r,size:"lg",children:"Request access"})})]})},login_UsernameLogin=e=>{let{isFrameless:o,useDeprecatedPage:n=!1,defaultToSamlLogin:t,hasPasswordLogin:r,showPasswordLogin:i,gatePasswordLogin:c,setLoginComponentVisibility:g,loginButtonTextOverride:u}=e,{classes:p}=(0,Z.fc)(),C=(0,f.useRouter)(),{setFocus:R,focusProps:I}=useFocus(!1,"passwordInput",!0),{posthogClient:D}=(0,P.r)(),[F,z]=(0,d.useState)(!1),[q,B]=(0,d.useState)(""),W=(0,b.c)({initialValues:{username:"",password:""},validate:{username:e=>{if(t){if(!e)return"Username is required";if(e.length>32)return"Username cannot be longer than 32 characters"}return null}}}),A=o?h.kI.LoginFrameless:h.kI.Login,O=i&&c,handleSubmit=async e=>{let o=!i&&c&&!n;if(o){g(s.Password);return}z(!0),W.resetTouched();let t=await apiLogin({emailOrUsername:e.username,password:e.password,useUsernameOverEmail:!0});if(t.success){let{user_id:e}=t.data;D&&D.identify(e),await C.push("/post_login")}else"bad_request"===t.error_type?(W.setErrors(t.field_to_errors),t.overall_errors&&B(t.overall_errors[0])):"login_not_found"===t.error_type?(W.setFieldError("username",!0),W.setFieldError("password",!0),B(t.message)):k.N9.show({title:"Error",message:E.aK,color:h.xR.ErrorButtonColor,classNames:p}),z(!1)};return(0,d.useEffect)(()=>{W.isTouched()&&q&&(B(""),W.clearErrors())},[W,q]),(0,a.jsx)("form",{onSubmit:W.onSubmit(handleSubmit),children:(0,a.jsxs)(w.K,{children:[(0,a.jsx)(j.u,{mounted:i,transition:"fade",duration:0,children:e=>(0,a.jsxs)(w.K,{styles:e,spacing:"lg",children:[(0,a.jsx)(L.o,{variant:A,label:(0,a.jsx)(x.Z,{position:"apart",noWrap:!0,children:(0,a.jsx)(l.x,{children:"Username"})}),autoComplete:"username",autoCapitalize:"off",...W.getInputProps("username")}),(0,a.jsx)(S.U,{in:r,transitionTimingFunction:"ease-in-out",onTransitionEnd:()=>R(!0),children:(0,a.jsx)(v.W,{autoComplete:"current-password",variant:A,label:(0,a.jsxs)(x.Z,{noWrap:!0,position:"apart",w:"100%",p:0,children:[(0,a.jsx)(l.x,{children:"Password"}),(0,a.jsx)(_.e,{tabIndex:3,component:T(),href:{pathname:"/forgot_password",query:{...C.query}},variant:A,onMouseDown:e=>e.preventDefault(),children:"Forgot password?"})]}),...W.getInputProps("password"),...t?I:{}})}),q&&(0,a.jsx)(l.x,{color:h.xR.ErrorButtonColor,children:q})]})}),(0,a.jsxs)(w.K,{mt:i?"lg":"sm",children:[(0,a.jsx)(m.z,{variant:h.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:F,children:F?(0,a.jsx)(y.a,{color:h.xR.LoginSuccessButtonColor,size:"sm"}):u||"Log in with username"}),O&&(0,a.jsx)(m.z,{onClick:()=>g(s.SignIn),variant:h.Bq.LoginSubtlePrimary,fullWidth:!0,disabled:F,children:"Other login methods"})]})]})})},W=n(3758),A=!0;let O="Login";(t=i||(i={})).LoginRequired="LoginRequired",t.TwoFactorRequired="TwoFactorRequired",t.ConfirmEmailRequired="ConfirmEmailRequired",t.UserMetadataRequired="UserMetadataRequired",t.OrgCreationRequired="OrgCreationRequired",t.UpdatePasswordRequired="UpdatePasswordRequired",t.TwoFactorEnablementRequired="TwoFactorEnablementRequired",t.SamlLoginRequired="SamlLoginRequired",t.Finished="Finished",(r=s||(s={})).Full="full",r.SignIn="sign_in",r.Password="password";var login=e=>{var o;let n;let{pageConfig:t,pageType:r,base64Email:i}=e,s=(0,c.a)("(max-width: 24em)",!1),[x,m]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=parseInt(localStorage.getItem("redirectAttempts")||"0"),o=parseInt(localStorage.getItem("redirectTimerStart")||"0");(0===e||0===o)&&(o=Date.now(),localStorage.setItem("redirectTimerStart",o.toString())),e>=10&&Date.now()-o<=3e3?m(!0):Date.now()-o>3e3?(m(!1),localStorage.setItem("redirectAttempts","0")):localStorage.setItem("redirectAttempts",(e+1).toString())},[]);let f=r===p.KZ.BUILDWITT,w=t.use_deprecated_login_ui,j=t.theme.login_ui_theme===g.gq.Frameless,L=t.theme.display_project_name,_=x&&t.is_test_env,S=t.has_sso_login&&(!t.default_to_saml_login||t.use_org_name_for_saml),v=(f||t.has_any_social_login||t.has_passwordless_login||S)&&!_,y=t.has_sso_login&&t.default_to_saml_login&&!t.use_org_name_for_saml&&!_,b=t.has_password_login&&!_,C=(null===(o=t.customer_overrides)||void 0===o?void 0:o.use_username_login_over_email)||!1,k=(b||y)&&!C,R=b&&C,T=!_&&!v&&!b,I=!_&&!T,E=t.allow_public_signups&&r!==p.KZ.DREAMDATA,P=r===p.KZ.SCRIBBLEVET?"Sign in":"Log in",D=r===p.KZ.LETTER?(0,a.jsx)(LoginFooters_LetterLoginShellFooter,{loginUITheme:t.theme.login_ui_theme}):(0,a.jsx)(LoginFooters_DefaultLoginShellFooter,{loginUITheme:t.theme.login_ui_theme,showSignupButton:E}),{has_github_login:F,has_linkedin_login:Z,has_google_login:q,has_microsoft_login:A,has_slack_login:U,has_quickbooks_login:G,has_xero_login:M,has_salesforce_login:K,has_atlassian_login:N,has_apple_login:H}=t,X=[F,Z,q,A,U,G,M,K,N,H].filter(e=>e).length,V=X>2&&!y,[Q,$]=(0,d.useState)(V?"sign_in":"full"),J="password"!==Q,Y="sign_in"!==Q,ee=i?(0,W.TI)(i):void 0;r===p.KZ.SCRIBBLEVET&&(n="Sign in with password");let eo=v&&(0,a.jsx)(B.Z,{pageType:r,showSignInOptions:J,pageConfig:t}),en=k?(0,a.jsx)(login_EmailLogin,{orgsMetaname:t.orgs_metaname,hasPasswordLogin:b,gatePasswordLogin:V,showPasswordLogin:Y,defaultToSamlLogin:y,setLoginComponentVisibility:$,isFrameless:j,providedEmail:ee,loginButtonTextOverride:n}):R&&(0,a.jsx)(login_UsernameLogin,{orgsMetaname:t.orgs_metaname,hasPasswordLogin:b,gatePasswordLogin:V,showPasswordLogin:Y,defaultToSamlLogin:y,setLoginComponentVisibility:$,isFrameless:j,loginButtonTextOverride:n});if(y){let e=en;en=eo,eo=e}return w?(0,a.jsx)(Deprecated_DeprecatedLoginPage,{isSmallMobile:s,pageConfig:t,pageType:r,stopRedirecting:x,setStopRedirecting:m}):(0,a.jsxs)(u.ZP,{pageConfig:t,pageTitle:O,title:I?"".concat(P).concat(L?" to ".concat(t.site_display_name):""):"",showLogo:I,bottomChild:I&&(E||b)?D:void 0,pageType:r,children:[T&&(0,a.jsx)(l.x,{color:h.xR.ErrorButtonColor,align:"center",children:"There are no login options enabled. Contact your administrator to set one up."}),_&&(0,a.jsx)(login_RedirectsWarning,{setStopRedirecting:m}),eo,v&&(k||R)&&!_&&(0,a.jsx)(z.Z,{showDivider:J,isFrameless:j}),en]})}},3395:function(e,o,n){var t,r,i,s,a,l;n.d(o,{$Q:function(){return t},KZ:function(){return r},x5:function(){return i}}),(s=t||(t={})).DEFAULT="default",s.DAGWORKS="dagworks",(a=r||(r={})).DEFAULT="default",a.LETTER="letter",a.DREAMDATA="dreamdata",a.SCRIBBLEVET="scribblevet",a.BUILDWITT="buildwitt",a.GOVEAGLE="goveagle",(l=i||(i={})).DEFAULT="default",l.PRECISION_IT="precisionit"},3758:function(e,o,n){n.d(o,{PH:function(){return getIndefiniteArticle},TI:function(){return getDecodedBase64String},rT:function(){return getCapitalizedIndefiniteArticle}});let getIndefiniteArticle=e=>e.match(/^[aeiou]/i)?"an":"a",getCapitalizedIndefiniteArticle=e=>{let o=getIndefiniteArticle(e);return o.charAt(0).toUpperCase()+o.slice(1)},getDecodedBase64String=e=>{try{return atob(e)}catch(e){return}}}}]);