2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
|
|
/*! For license information please see 811.8f231000.chunk.js.LICENSE.txt */
|
||
|
|
"use strict";(self.webpackChunkmaingate_console=self.webpackChunkmaingate_console||[]).push([[811],{32811:function(t,e,r){r.r(e),r.d(e,{default:function(){return v}});var n=r(1413),o=r(74165),i=r(15861),a=r(47313),c=r(58467),u=r(85554),s=r(86480),l=r(27998),h=r(30657),f=r(62721),p=r(34491),d=(r(88282),r(46417));function v(){var t=(0,h.Fp)(),e=t.instance,r=t.accounts,v=(0,h.kq)(),y=(0,c.s0)(),g=(0,u.I0)();function m(){return(m=(0,i.Z)((0,o.Z)().mark((function t(){return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loginRedirect(f.Q).catch((function(t){p.Am.error("\ub85c\uadf8\uc778\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(t))}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=(0,i.Z)((0,o.Z)().mark((function t(){return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.acquireTokenSilent((0,n.Z)((0,n.Z)({},f.Q),{},{account:r[0]})).then((function(t){g({type:"set",accessToken:t.accessToken}),x(t.accessToken)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return A.apply(this,arguments)}function A(){return(A=(0,i.Z)((0,o.Z)().mark((function t(e){var r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.ZP.get("https://graph.microsoft.com/v1.0/me/photo/$value",{headers:{Authorization:"Bearer ".concat(e)},responseType:"blob"});case 3:200===(r=t.sent).status?(g({type:"set",picture:URL.createObjectURL(r.data)}),y("/services")):p.Am.error("\ud504\ub85c\ud544 \uc774\ubbf8\uc9c0 \uc870\ud68c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(r.statusText)),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),p.Am.error("\ud504\ub85c\ud544 \uc774\ubbf8\uc9c0 \uc870\ud68c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}return(0,a.useEffect)((function(){v&&function(){w.apply(this,arguments)}()}),[v]),(0,d.jsx)("div",{className:"bg-light min-vh-100 d-flex flex-row align-items-center",children:(0,d.jsxs)(l.KB,{children:[(0,d.jsx)(l.rb,{className:"justify-content-center",children:(0,d.jsx)(l.b7,{md:8,children:(0,d.jsx)(l.xH,{className:"p-4",children:(0,d.jsx)(l.sl,{children:(0,d.jsx)(l.rb,{className:"justify-content-center",children:(0,d.jsx)(l.b7,{md:6,children:(0,d.jsx)("div",{className:"d-grid gap-2",children:(0,d.jsxs)(l.u5,{color:"secondary",size:"lg",variant:"outline",shape:"rounded-0",onClick:function(){return m.apply(this,arguments)},disabled:v,children:[v&&(0,d.jsx)(l.LQ,{component:"span",size:"sm","aria-hidden":"true",className:"me-2"}),!v&&(0,d.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsSAAALEgHS3X78AAAAVElEQVQ4jWP8//8/A7UBC8i8z4HKBE3mXX+XsWE3I0F1Da7/GZmo7kwGBoZRQ0cNpTKgXY5iXPqBoMn/owUYGXYRzlEMbqM5atTQoWEo9XMUAwMDAGSOGCOVddy/AAAAAElFTkSuQmCC",alt:"Microsoft Logo",className:"me-2"}),"\ub85c\uadf8\uc778\ud558\uae30"]})})})})})})})}),(0,d.jsx)(p.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0})]})})}},15861:function(t,e,r){function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}r.d(e,{Z:function(){return o}})},74165:function(t,e,r){r.d(e,{Z:function(){return o}});var n=r(71002);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(_){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype inst
|