1"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[5648],{97508(e,t,a){a.d(t,{V2:()=>m,V3:()=>d,gk:()=>u,iD:()=>c});var n=a(77798),l=a(23877),r=a(1418),o=a(28676),s=a(40693);async function i(e,t){e({type:l.zO.LOGIN_REQUEST,data:null});try{const a=await t();await async function(e,t){e((0,n.OJ)([{type:l.zO.LOGIN_SUCCESS},{type:l.zO.RECEIVED_ME,data:t}])),e((0,o.cF)(t.roles.split(" ")))}(e,a)}catch(t){return e({type:l.zO.LOGIN_FAILURE,error:t}),e((0,r.vV)(t)),{error:t}}return{data:!0}}function c(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return async n=>i(n,(()=>s.mT.login(e,t,a)))}function d(e){return async t=>i(t,(()=>s.mT.loginWithDesktopToken(e)))}function u(e,t){return async a=>i(a,(()=>s.mT.loginById(e,t,"")))}function m(e){return async t=>{try{const t=await s.mT.getUserLoginType(e);return{data:{auth_service:t.auth_service??"",is_deactivated:t.is_deactivated??!1}}}catch(e){return t((0,r.vV)(e)),{error:e}}}}},93692(e,t,a){a.d(t,{A:()=>w}),a(15724),a(5673),a(30164),a(21279);var n=a(71633),l=a.n(n),r=a(9241),o=a(36418),s=a(14778),i=a(37270),c=a(81911),d=a(7430),u=a(91767),m=a(97508),g=a(51881),p=a(4715);const h="desktop_auth_client_token";var f=function(e){return e[e.None=0]="None",e[e.WaitingForBrowser=1]="WaitingForBrowser",e[e.LoggedIn=2]="LoggedIn",e[e.Authenticating=3]="Authenticating",e[e.Error=4]="Error",e}(f||{});const w=e=>{let{href:t,onLogin:a}=e;const n=(0,i.useDispatch)(),w=(0,c.useHistory)(),{search:E}=(0,c.useLocation)(),v=new URLSearchParams(E),L=v.get("server_token"),k=v.get("client_token"),C=v.get("redirect_to"),M=(0,i.useSelector)(d.HW),_=sessionStorage.getItem(h),[y,b]=(0,o.useState)(L?f.LoggedIn:f.None),[R,I]=(0,o.useState)(),N=()=>{const e=new URL(window.location.href);let t="mattermost";e.searchParams.get("isDesktopDev")&&(t="mattermost-dev"),window.location.href=e.toString().replace(e.protocol,`${t}:`)};let A,F,S;return(0,o.useEffect)((()=>{if(M){if(C&&C.match(/^\/([^/]|$)/))return void w.push(C);(0,u.tc)()}}),[]),(0,o.useEffect)((()=>{I(!1);const e=setTimeout((()=>{I(!0)}),1e4);return()=>{clearTimeout(e)}}),[y]),(0,o.useEffect)((()=>{L?_?(async()=>{if(!L||k!==_)return void b(f.Error);sessionStorage.removeItem(h);const{error:e}=await n((0,m.V3)(L));e&&e.server_error_id&&0!==e.server_error_id.length?b(f.Error):(b(f.LoggedIn),await a())})():(0,p.y3)()||N():(async()=>{const e=`${g.h.isDev()?"dev-":""}${r.randomBytes(32).toString("hex")}`.slice(0,64);sessionStorage.setItem(h,e);const a=new URL(t),n=new URLSearchParams(a.searchParams);n.set("desktop_token",e),window.open(`${a.origin}${a.pathname}?${n.toString()}`),b(f.WaitingForBrowser)})()}),[L]),y===f.WaitingForBrowser&&(A=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.polling.redirectingToBrowser",defaultMessage:"Redirecting to browser..."}),F=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.polling.awaitingToken",defaultMessage:"Authenticating in the browser, awaiting valid token."}),S=null),y===f.LoggedIn&&(A=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.complete.youAreNowLoggedIn",defaultMessage:"You are now logged in"}),F=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.complete.openMattermost",defaultMessage:"Click on <b>Open Mattermost</b> in the browser prompt to <a>launch the desktop app</a>",values:{a:e=>o.createElement("a",{onClick:N},e),b:e=>o.createElement("b",null,e)}}),S=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.complete.havingTrouble",defaultMessage:"Having trouble logging in? <a>Open Mattermost in your browser</a>",values:{a:e=>o.createElement("a",{onClick:()=>w.push("/")},e)}})),y===f.Error&&(A=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.error.somethingWentWrong",defaultMessage:"Something went wrong"}),F=o.createElement(s.FormattedMessage,{id:"desktop_auth_token.error.restartFlow",defaultMessage:"Click <a>here</a> to try again.",values:{a:e=>o.createElement("a",{onClick:()=>w.push("/")},e)}}),S=null),o.createElement("div",{className:"DesktopAuthToken"},o.createElement("h1",{className:"DesktopAuthToken__main"},A),o.createElement("p",{className:l()("DesktopAuthToken__sub",{complete:y===f.LoggedIn})},F),o.createElement("div",{className:"DesktopAuthToken__bottom"},R?S:null))}},11610(e,t,a){a.d(t,{A:()=>
1o});var n=a(71633),l=a.n(n),r=a(36418);const o=e=>{let{id:t,url:a,icon:n,label:o,style:s,direction:i="row",onClick:c}=e;return r.createElement("a",{id:t,className:l()("external-login-button",{"direction-column":"column"===i},t),href:a,style:s,onClick:c},n,r.createElement("span",{className:"external-login-button-label"},o))}},60824(e,t,a){a.d(t,{A:()=>s});var n=a(71633),l=a.n(n),r=a(36418),o=a(81911);const s=e=>{let{className:t,alternateMessage:a,alternateLinkPath:n,alternateLinkLabel:s}=e;return a||n||s?r.createElement("div",{className:l()("alternate-link",t),"data-testid":"alternate-link"},a&&r.createElement("span",{className:"alternate-link__message"},a),n&&s&&r.createElement(o.Link,{className:"alternate-link__link",to:{pathname:n,search:location.search}},s)):null}},65844(e,t,a){a.d(t,{A:()=>r});var n=a(36418),l=a(81444);const r=e=>{let{title:t,message:a,SVGElement:r,extraContent:o,onEnterKeyDown:s}=e;return n.createElement("div",{className:"content-layout-column",onKeyDown:e=>{s&&e.key===l.Ay.KeyCodes.ENTER[0]&&s(e)},tabIndex:0},n.createElement("div",{className:"content-layout-column-svg"},r),n.createElement("h1",{className:"content-layout-column-title"},t),n.createElement("p",{className:"content-layout-column-message"},a),o&&n.createElement("div",{className:"content-layout-column-extra-content"},o))}},42970(e,t,a){a.d(t,{A:()=>l});var n=a(36418);function l(e){return n.createElement("span",e,n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M3.38 12.473c0.345 0.215 0.918 0.454 1.524 0.454 0.552 0 1.065 -0.16 1.49 -0.433l0.002 -0.001L8 11.491V15.111a1.387 1.387 0 0 1 -0.732 -0.208z",fill:"#225086"}),n.createElement("path",{d:"m6.98 1.34 -6.667 7.52c-0.515 0.581 -0.38 1.46 0.287 1.876l2.779 1.737c0.345 0.215 0.918 0.454 1.524 0.454 0.552 0 1.065 -0.16 1.49 -0.433l0.002 -0.001L8 11.491l-3.879 -2.425 3.88 -4.377V0.889c-0.377 0 -0.753 0.15 -1.02 0.451Z",fill:"#6df"}),n.createElement("path",{points:"4.636 10.199 4.688 10.231 9 12.927 9.001 12.927 9.001 12.927 9.001 5.276 9 5.275 4.636 10.199",fill:"#cbf8ff",d:"M4.121 9.066L4.167 9.094L8 11.491L8.001 11.491L8.001 11.491L8.001 4.69L8 4.689L4.121 9.066Z"}),n.createElement("path",{d:"M15.399 10.736c0.668 -0.417 0.802 -1.295 0.287 -1.876l-4.374 -4.934a2.756 2.756 0 0 0 -1.167 -0.259c-0.822 0 -1.557 0.355 -2.046 0.912l-0.097 0.109 3.879 4.377 -3.88 2.425v3.62c0.255 0 0.509 -0.069 0.732 -0.208l6.667 -4.167Z",fill:"#074793"}),n.createElement("path",{d:"M8.001 0.889v3.8l0.097 -0.109a2.711 2.711 0 0 1 2.046 -0.912c0.42 0 0.814 0.095 1.167 0.259l-2.292 -2.586A1.351 1.351 0 0 0 8 0.89Z",fill:"#0294e4"}),n.createElement("path",{points:"13.365 10.199 13.365 10.199 13.365 10.199 9.001 5.276 9.001 12.926 13.365 10.199",fill:"#96bcc2",d:"M11.88 9.066L11.88 9.066L11.88 9.066L8.001 4.69L8.001 11.49L11.88 9.066Z"})))}},74381(e,t,a){a.d(t,{A:()=>r});var n=a(36418),l=a(14778);function r(e){const{formatMessage:t}=(0,l.useIntl)();return n.createElement("span",e,n.createElement("svg",{width:"12px",height:"13px",viewBox:"0 0 13 15",role:"presentation","aria-label":t({id:"generic_icons.channel.private",defaultMessage:"Private Channel Icon"})},n.createElement("g",{stroke:"none",strokeWidth:"1",fill:"inherit",fillRule:"evenodd"},n.createElement("g",{transform:"translate(-116.000000, -175.000000)",fillRule:"nonzero",fill:"inherit"},n.createElement("g",{transform:"translate(95.000000, 0.000000)"},n.createElement("g",{transform:"translate(20.000000, 113.000000)"},n.createElement("g",{transform:"translate(1.000000, 62.000000)"},n.createElement("path",{d:"M12.0714286,6.5 L11.1428571,6.5 L11.1428571,4.64285714 C11.1428571,2.07814286 9.06471429,0 6.5,0 C3.93528571,0 1.85714286,2.07814286 1.85714286,4.64285714 L1.85714286,6.5 L0.928571429,6.5 C0.415071429,6.5 0,7.00792857 0,7.52142857 L0,13.9285714 C0,14.4420714 0.415071429,14.8571429 0.928571429,14.8571429 L12.0714286,14.8571429 C12.5849286,14.8571429 13,14.4420714 13,13.9285714 L13,7.52142857 C13,7.00792857 12.5849286,6.5 12.0714286,6.5 Z M6.5,1.85714286 C8.03585714,1.85714286 9.28571429,3.107 9.28571429,4.64285714 L9.28571429,6.5 L8.3571428
16,6.5 L4.64285714,6.5 L3.71428571,6.5 L3.71428571,4.64285714 C3.71428571,3.107 4.96414286,1.85714286 6.5,1.85714286 Z"}))))))))}},24767(e,t,a){a.d(t,{A:()=>r});var n=a(36418),l=a(14778);function r(e){const{formatMessage:t}=(0,l.useIntl)();return n.createElement("span",e,n.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.gitlab",defaultMessage:"Gitlab Icon"})},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83325 15.4909L11.7793 6.45337H5.88745L8.83334 15.4909H8.83325Z",fill:"#E24329"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83339 15.4909L5.88737 6.45337H1.75854L8.83347 15.4908L8.83339 15.4909Z",fill:"#FC6D26"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75846 6.45329L0.863125 9.19966C0.781518 9.45021 0.870921 9.72467 1.08477 9.87941L8.83325 15.4908L1.75846 6.45325V6.45329Z",fill:"#FCA326"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75859 6.45333H5.88742L4.11296 1.01011C4.02169 0.73003 3.62418 0.73003 3.53296 1.01011L1.75854 6.45333H1.75859Z",fill:"#E24329"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83325 15.4909L11.7793 6.45337H15.9081L8.83334 15.4908L8.83325 15.4909Z",fill:"#FC6D26"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.908 6.45329L16.8034 9.19966C16.885 9.45021 16.7956 9.72467 16.5817 9.87941L8.83325 15.4908L15.908 6.45325V6.45329Z",fill:"#FCA326"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9081 6.45333H11.7793L13.5538 1.01011C13.6451 0.73003 14.0426 0.73003 14.1338 1.01011L15.9082 6.45333H15.9081Z",fill:"#E24329"})))}},44995(e,t,a){a.d(t,{A:()=>r});var n=a(36418),l=a(14778);function r(e){const{formatMessage:t}=(0,l.useIntl)();return n.createElement("span",e,n.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.google",defaultMessage:"Google Icon"})},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5787 8.16364C15.5787 7.6531 15.5329 7.16219 15.4478 6.69092H8.66675V9.47601H12.5417C12.3747 10.376 11.8675 11.1386 11.1049 11.6491V13.4556H13.4318C14.7933 12.2022 15.5787 10.3564 15.5787 8.16364Z",fill:"#4285F4"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66685 15.2C10.6108 15.2 12.2407 14.5553 13.4319 13.4557L11.105 11.6491C10.4603 12.0811 9.63558 12.3364 8.66685 12.3364C6.79158 12.3364 5.2043 11.0699 4.63812 9.36804H2.23267V11.2335C3.41739 13.5866 5.8523 15.2 8.66685 15.2Z",fill:"#34A853"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.63807 9.36806C4.49407 8.93606 4.41225 8.4746 4.41225 8.00006C4.41225 7.52551 4.49407 7.06406 4.63807 6.63206V4.7666H2.23261C1.74498 5.7386 1.4668 6.83824 1.4668 8.00006C1.4668 9.16187 1.74498 10.2615 2.23261 11.2335L4.63807 9.36806Z",fill:"#FBBC05"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66685 3.66369C9.72394 3.66369 10.673 4.02696 11.4192 4.74041L13.4843 2.67532C12.2374 1.5135 10.6076 0.800049 8.66685 0.800049C5.8523 0.800049 3.41739 2.4135 2.23267 4.76659L4.63812 6.63205C5.2043 4.93023 6.79158 3.66369 8.66685 3.66369Z",fill:"#EA4335"})))}},33081(e,t,a){a.d(t,{A:()=>r});var n=a(36418),l=a(14778);function r(e){const{formatMessage:t}=(0,l.useIntl)();return n.createElement("span",e,n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.openid",defaultMessage:"OpenID Icon"})},n.createElement("path",{d:"M7.19995 1.2V15.2L9.59995 14V0L7.19995 1.2Z",fill:"#F48018"}),n.createElement("path",{d:"M15.6652 5.3302L16.0001 8.80002L11.313 7.85391",fill:"#AEB0B3"}),n.createElement("path",{d:"M10 4.61206V6.19484C11.015 6.37555 12.0439 6.71905 12.768 7.17939L14.4821 6.09046C13.3141 5.34815 11.686 4.82159 10 4.61206ZM2.42378 9.90251C2.42378 8.13669 4.2954 6.64895 6.84567 6.19484V4.61206C2.94414 5.09733 0 7.28065 0 9.90251C0 12.5244 3.08942 14.8262 7.2 15.2V13.6001C4.43386 13.2433 2.42378 11.7657 2.42378 9.90251Z",fill:"#AEB0B3"})))}},42392(e,t,a){a.d(t,{A:()=>c});var n=a(71633),l=a.n(n),r=a(36418),o=a(14778),s=a(81444),i=a(98566);const c=r.forwardRef(((e,t)=>{let{className:a,value:n,onChange:c,onBlur:d,onFocus:u,hasError:m,info:g,error:p,createMode:h,disabled:f,inputSize:w,...E}=e;const{formatMessage:v}=(0,o.useIntl)(),[L,k]=(0,r.useState)(!1),C=p?{type:s.Kw.ERROR,value:p}:null,M=g?{type:s.Kw.INFO,value:g}:null,_=p?C:M,y=v(h?{id:"widget.passwordInput.createPassword",defaultMessage:"Choose a Password"}:{id:"widget.passwordInput.password",defaultMessage:"Password"});return r.createElement(i.A,Object.assign({className:l()("password-input",a),wrapperClassName:"password-input-with-toggle",name:"password-input",type:L&&!f?"text":"password",inputSize:w,addon:r.createElement("button",{id:"password_toggle",type:"button","aria-label":v({id:L?"widget.passwordInput.hidePassword":"widget.passwordInput.showPassword",defaultMessage:L?"Hide password":"Show password"}),className:"password-input-toggle",onClick:()=>k(!L),disabled:f},r.createElement("i",{className:L&&!f?"icon-eye-off-outline":"icon-eye-outline","aria-hidden":"true"})),value:n,onChange:c,onBlur:d,onFocus:u,placeholder:y,hasError:m,customMessage:p||g?_:void 0,disabled:f,ref:t},E))}))}}]); 2//# sourceMappingURL=5648.54bc42b89fe07da19318.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.