/*! For license information please see 6.7af119ca.chunk.js.LICENSE.txt */ (this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6,15],{651:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&this.changeListeners.splice(t,1)},e}(),b=n(20),j=n(633),O=s.a.lazy((function(){return n.e(9).then(n.bind(null,767))})),x=s.a.lazy((function(){return Promise.all([n.e(5),n.e(7)]).then(n.bind(null,768))})),v=s.a.lazy((function(){return n.e(8).then(n.bind(null,769))})),y=s.a.lazy((function(){return n.e(14).then(n.bind(null,770))})),S=[{path:"/",exact:!0,name:"Home"},{path:"/dashboard",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",component:O},{path:"/reports",exact:!0,name:"\u30ec\u30dd\u30fc\u30c8",component:x},{path:"/uploader",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:v},{path:"/secret",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:y}],g=(n(666),n(17)),w=Object(g.jsx)("div",{className:"pt-3 text-center",children:Object(g.jsx)("div",{className:"sk-spinner sk-spinner-pulse",children:" "})}),N=function(){var e={expiration:479,client_address:"123.231.121.140",protocol:"urn:oasis:names:tc:SAML:2.0:protocol",identity_provider:"https://sso.ts.bizside.biz/idp/shibboleth",authn_instant:"2021-08-16T11:29:41.254Z",authncontext_class:"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport",attributes:[{name:"mail",values:["akira.miyata@mobilous.com"]}]};Object(r.useEffect)((function(){a(e)}),[]);var t=Object(r.useState)(""),n=Object(l.a)(t,2),s=n[0],a=n[1],u=Object(r.useState)(""),h=Object(l.a)(u,2),p=h[0],m=h[1],O=Object(r.useState)(""),x=Object(l.a)(O,2),v=x[0],y=x[1];function N(){return(N=Object(c.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d()("https://fsbsso.sumasen.net/Shibboleth.sso/Session");case 2:t=e.sent,JSON.stringify(s)!==JSON.stringify(t.data)&&a(t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(){return(_=Object(c.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:{"Content-Type":"application/json;charset=UTF-8","Access-Control-Allow-Origin":"*"}},e.next=3,d.a.post("https://fsbsso.sumasen.net/csv",t,n).catch((function(e){console.log("AXIOS ERROR: ",e)}));case 3:e.sent,console.log("user data posted");case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=Object(c.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.attributes[0].values[0],"FBS","api","c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8",e.next=6,d.a.get("https://fsbsso.sumasen.net/users?email=akira.miyata@mobilous.com",{auth:{username:"api",password:"c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8"}}).catch((function(e){return console.log(e),!1}));case 6:return t=e.sent,JSON.stringify(p)!==JSON.stringify(t.data[0])&&m(t.data[0]),e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){var e=(new f).get("_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468");if(void 0===e)return null;(function(){return N.apply(this,arguments)})().then((function(){null!==s&&function(){return k.apply(this,arguments)}().then((function(){var t=Math.floor(1e5+9e5*Math.random());""===v&&y(t);var n=p.firstname,r=p.lastname,s=p.email,a=p.employee_code,i='[\n {\n "mailadress": "[email]",\n "name": "[last_name] [first_name]",\n "jsessionid": "[id]",\n "_idp_session": "",\n "_opensaml_key": "[sso_key]",\n "_opensaml_value": "[sso_value]"\n },\n {\n "mailadress": "'.concat(s,'",\n "name": "').concat(r," ").concat(n,'",\n "jsessionid": ').concat(t,',\n "_idp_session": "",\n "_opensaml_key": "_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468",\n "_opensaml_value": "').concat(e,'"\n }\n ]');return null!==a&&void 0!==a&&window.location.href.includes("dashboard")&&function(e){_.apply(this,arguments)}(i),!0}))}))}return Object(g.jsxs)("main",{className:"c-main",children:[Object(g.jsx)(j.l,{fluid:!0,children:Object(g.jsxs)(r.Suspense,{fallback:w,children:[Object(g.jsxs)(b.d,{children:[" ",S.map((function(e,t){return e.component&&Object(g.jsx)(b.b,{path:e.path,exact:e.exact,name:e.name,render:function(t){return null!==C()?Object(g.jsx)(e.component,Object(o.a)(Object(o.a)({},t),{},{userid:v})):Object(g.jsx)(b.a,{to:{pathname:"/sso"}})}},t)})),Object(g.jsx)(b.a,{from:"/",to:"/dashboard"})]})," "]})})," "]})},_=s.a.memo(N),k=function(){return Object(g.jsxs)(j.r,{fixed:!1,children:[Object(g.jsxs)("div",{children:[Object(g.jsx)("a",{href:"sumasen.net",target:"_blank",rel:"noopener noreferrer",children:"FBS"}),Object(g.jsx)("span",{className:"ml-1",children:"\xa9 2021 DigitalVox."})]}),Object(g.jsxs)("div",{className:"mfs-auto",children:[Object(g.jsx)("span",{className:"mr-1",children:"\u642d\u8f09"}),Object(g.jsx)("a",{href:"#",target:"_blank",rel:"noopener noreferrer",children:"DigitalVox"})]})]})},C=s.a.memo(k),E=n(159),T=n(632),A=function(){var e=Object(E.b)(),t=Object(E.c)((function(e){return e.sidebarShow}));return Object(g.jsxs)(j.u,{withSubheader:!0,children:[Object(g.jsx)(j.V,{inHeader:!0,className:"ml-md-3 d-lg-none",onClick:function(){var n=!![!1,"responsive"].includes(t)||"responsive";e({type:"set",sidebarShow:n})}}),Object(g.jsx)(j.V,{inHeader:!0,className:"ml-3 d-md-down-none",onClick:function(){var n=![!0,"responsive"].includes(t)&&"responsive";e({type:"set",sidebarShow:n})}}),Object(g.jsx)(j.v,{className:"mx-auto d-lg-none",to:"/",children:Object(g.jsx)("h2",{children:"FBS"})}),Object(g.jsx)(j.w,{className:"d-md-down-none mr-auto",children:Object(g.jsx)(j.x,{className:"px-3",children:Object(g.jsx)(j.y,{to:"/dashboard",children:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9"})})}),Object(g.jsx)(j.w,{className:"px-3",children:Object(g.jsx)(I,{})}),Object(g.jsx)(j.U,{className:"px-3 justify-content-between",children:Object(g.jsx)(j.d,{className:"border-0 c-subheader-nav m-0 px-0 px-md-3",routes:S})})]})},I=function(){return Object(g.jsxs)(j.n,{inNav:!0,className:"c-header-nav-items mx-2",direction:"down",children:[Object(g.jsx)(j.q,{className:"c-header-nav-link",caret:!1,children:"\u30a2\u30ab\u30a6\u30f3\u30c8"}),Object(g.jsxs)(j.p,{className:"pt-0",placement:"bottom-end",children:[Object(g.jsx)(j.o,{header:!0,tag:"div",color:"light",className:"text-center",children:Object(g.jsx)("strong",{children:"\u30a2\u30ab\u30a6\u30f3\u30c8"})}),Object(g.jsxs)(j.o,{onClick:function(){console.log("launch sso"),window.open("https://fsbsso.sumasen.net/Shibboleth.sso/Login","_self")},children:[Object(g.jsx)(T.a,{name:"cil-bell",className:"mfe-2"}),"SSO \u30ed\u30b0\u30a4\u30f3"]})]})]})},L=[{_tag:"CSidebarNavItem",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",to:"/dashboard",icon:Object(g.jsx)(T.a,{name:"cil-speedometer",customClasses:"c-sidebar-nav-icon"})},{_tag:"CSidebarNavTitle",_children:["\u30ec\u30dd\u30fc\u30c8"]},{_tag:"CSidebarNavItem",name:"\u5831\u544a\u66f8",to:"/reports",icon:"cil-drop"},{_tag:"CSidebarNavItem",name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",to:"/uploader",icon:"cil-drop"}],M=function(){var e=Object(E.b)(),t=Object(E.c)((function(e){return e.sidebarShow}));return Object(g.jsxs)(j.M,{show:t,onShowChange:function(t){return e({type:"set",sidebarShow:t})},children:[Object(g.jsxs)(j.N,{className:"d-md-down-none",to:"/",children:[Object(g.jsx)("h2",{children:"FBS"}),Object(g.jsx)(T.a,{className:"c-sidebar-brand-minimized",name:"sygnet",height:35})]}),Object(g.jsx)(j.P,{children:Object(g.jsx)(j.m,{items:L,components:{CSidebarNavDivider:j.Q,CSidebarNavDropdown:j.R,CSidebarNavItem:j.S,CSidebarNavTitle:j.T}})}),Object(g.jsx)(j.O,{className:"c-d-md-down-none"})]})},U=s.a.memo(M);t.default=function(){return Object(g.jsxs)("div",{className:"c-app c-default-layout",children:[Object(g.jsx)(U,{}),Object(g.jsxs)("div",{className:"c-wrapper",children:[Object(g.jsx)(A,{}),Object(g.jsx)("div",{className:"c-body",children:Object(g.jsx)(_,{})}),Object(g.jsx)(C,{})]})]})}}}]); //# sourceMappingURL=6.7af119ca.chunk.js.map