(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6,15],{548:function(e,s,t){"use strict";t.r(s);t(0),t(522);var c=t(516),a=(t(515),t(11));s.default=function(){return Object(a.jsx)("div",{className:"c-app c-default-layout flex-row align-items-center",children:Object(a.jsx)(c.l,{children:Object(a.jsx)(c.K,{className:"justify-content-center",children:Object(a.jsx)(c.k,{md:"8",children:Object(a.jsxs)(c.i,{children:[Object(a.jsx)(c.f,{className:"p-4",children:Object(a.jsx)(c.g,{children:Object(a.jsxs)(c.s,{children:[Object(a.jsx)("h1",{children:"\u30ed\u30b0\u30a4\u30f3"}),Object(a.jsx)("p",{className:"text-muted",children:"SSO\u3067\u30b5\u30a4\u30f3\u30a4\u30f3\u3059\u308b\u306b\u306f\u3001\u3053\u3053\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044"}),Object(a.jsx)(c.K,{children:Object(a.jsx)(c.k,{children:Object(a.jsx)(c.e,{color:"primary",className:"px-4",onClick:function(){console.log("launch sso"),window.open("https://fbssso.bizside.biz/Shibboleth.sso/Login","_self")},children:"SSO\u3067\u30ed\u30b0\u30a4\u30f3"})})})]})})}),Object(a.jsx)(c.f,{className:"text-white bg-primary py-5 d-md-down-none",style:{width:"44%"},children:Object(a.jsx)(c.g,{className:"text-center",children:Object(a.jsxs)("div",{children:[Object(a.jsx)("h2",{children:"\u30ed\u30b0\u30a4\u30f3\u65b9\u6cd5"}),Object(a.jsx)("p",{children:"\u3053\u308c\u306fSSO\u30ed\u30b0\u30a4\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001SSO\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u308c\u307e\u3059\u3002"})]})})})]})})})})})}},657:function(e,s,t){"use strict";t.r(s);var c=t(0),a=t.n(c),n=t(522),i=t.n(n),o=t(14),l=t(516);const r=a.a.lazy((()=>t.e(9).then(t.bind(null,652)))),d=a.a.lazy((()=>Promise.all([t.e(5),t.e(7)]).then(t.bind(null,653)))),j=a.a.lazy((()=>t.e(8).then(t.bind(null,654)))),b=a.a.lazy((()=>t.e(14).then(t.bind(null,655))));var h=[{path:"/",exact:!0,name:"Home"},{path:"/dashboard",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",component:r},{path:"/reports",exact:!0,name:"\u30ec\u30dd\u30fc\u30c8",component:d},{path:"/uploader",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:j},{path:"/secret",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:b}],m=(t(548),t(11));const O=Object(m.jsx)("div",{className:"pt-3 text-center",children:Object(m.jsx)("div",{className:"sk-spinner sk-spinner-pulse",children:" "})}),x=()=>{const[e,s]=Object(c.useState)(""),[t,a]=Object(c.useState)(""),[n,r]=Object(c.useState)(""),[d,j]=Object(c.useState)(!1),[b,x]=Object(c.useState)(!1),[p,u]=Object(c.useState)(!1);async function f(){const t=await i()("https://fbssso.bizside.biz/Shibboleth.sso/Session");JSON.stringify(e)!==JSON.stringify(t.data)&&s(t.data)}function N(){const s=function(e){const s="; ".concat(document.cookie).split("; ".concat(e,"="));if(2===s.length)return s.pop().split(";").shift()}("_shibsession_64656661756c7468747470733a2f2f66627373736f2e62697a736964652e62697a2f73686962626f6c657468");if(console.log(s),void 0===s)return j(!0),null;f().then((()=>{null!==e&&async function(){if(null==e.attributes||void 0===e.attributes[0])return!1;const s=e.attributes[0].values[0],c=await i.a.get("https://fbssso.bizside.biz/users?email="+s,{auth:{username:"api",password:"ae4d70740e7549bda4c118d66e845e450da1af7e918e440eaac16497a9f75292"}}).catch((e=>(console.log(e),!1)));return JSON.stringify(t)!==JSON.stringify(c.data[0])&&a(c.data[0]),!0}().then((()=>{if(""===n){let e=Math.floor(1e5+9e5*Math.random());r(e)}j(!0);const e=t.firstname,c=t.lastname,a=t.email,o=t.employee_code,l='[\n {\n "mailadress": "'.concat(a,'",\n "name": "').concat(c," ").concat(e,'",\n "jsessionid": ').concat(n,',\n "_idp_session": "",\n "_opensaml_key": "_shibsession_64656661756c7468747470733a2f2f66627373736f2e62697a736964652e62697a2f73686962626f6c657468",\n "_opensaml_value": "').concat(s,'"\n }\n ]');return null!==o&&void 0!==o&&window.location.href.includes("dashboard")&&0==b&&async function(e){x(!0);const s=await i.a.post("https://fbssso.bizside.biz/csv",e,{headers:{"Content-Type":"application/json;charset=UTF-8","Access-Control-Allow-Origin":"*"}}).catch((e=>{console.log("AXIOS ERROR: ",e),x(!1)}));console.log("--- res ----",s),"OK"===s||(console.log("res id ",s.data.id),e.jsessionid!==s.data.id&&(r(s.data.id),u(!0))),console.log("user data posted")}(l),!0}))}))}return Object(c.useEffect)((()=>{f(),N()}),[]),Object(m.jsx)("main",{className:"c-main",children:Object(m.jsx)(l.l,{fluid:!0,children:Object(m.jsx)(c.Suspense,{fallback:O,children:Object(m.jsxs)(o.d,{children:[h.map(((e,s)=>e.component&&Object(m.jsx)(o.b,{path:e.path,exact:e.exact,name:e.name,render:s=>d?null!==N()?Object(m.jsx)(e.component,{...s,userid:n,email:t.email,gotuserid:p}):Object(m.jsx)(o.a,{to:{pathname:"/sso"}}):null},s))),Object(m.jsx)(o.a,{from:"/",to:"/dashboard"})]})})})})};var p=a.a.memo(x);const u=()=>Object(m.jsxs)(l.r,{fixed:!1,children:[Object(m.jsxs)("div",{children:[Object(m.jsx)("a",{href:"sumasen.net",target:"_blank",rel:"noopener noreferrer",children:"FBS"}),Object(m.jsx)("span",{className:"ml-1",children:"\xa9 2021 DigitalVox."})]}),Object(m.jsxs)("div",{className:"mfs-auto",children:[Object(m.jsx)("span",{className:"mr-1",children:"\u642d\u8f09"}),Object(m.jsx)("a",{href:"#",target:"_blank",rel:"noopener noreferrer",children:"DigitalVox"})]})]});var f=a.a.memo(u),N=t(124),v=t(515);var S=()=>{const e=Object(N.b)(),s=Object(N.c)((e=>e.sidebarShow));return Object(m.jsxs)(l.u,{withSubheader:!0,children:[Object(m.jsx)(l.V,{inHeader:!0,className:"ml-md-3 d-lg-none",onClick:()=>{const t=!![!1,"responsive"].includes(s)||"responsive";e({type:"set",sidebarShow:t})}}),Object(m.jsx)(l.V,{inHeader:!0,className:"ml-3 d-md-down-none",onClick:()=>{const t=![!0,"responsive"].includes(s)&&"responsive";e({type:"set",sidebarShow:t})}}),Object(m.jsx)(l.v,{className:"mx-auto d-lg-none",to:"/",children:Object(m.jsx)("h2",{children:"\u30c6\u30b9\u30c8"})}),Object(m.jsx)(l.w,{className:"d-md-down-none mr-auto",children:Object(m.jsx)(l.x,{className:"px-3",children:Object(m.jsx)(l.y,{to:"/dashboard",children:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9"})})}),Object(m.jsx)(l.w,{className:"px-3",children:Object(m.jsx)(g,{})}),Object(m.jsx)(l.U,{className:"px-3 justify-content-between",children:Object(m.jsx)(l.d,{className:"border-0 c-subheader-nav m-0 px-0 px-md-3",routes:h})})]})};var g=()=>Object(m.jsxs)(l.n,{inNav:!0,className:"c-header-nav-items mx-2",direction:"down",children:[Object(m.jsx)(l.q,{className:"c-header-nav-link",caret:!1,children:"\u30a2\u30ab\u30a6\u30f3\u30c8"}),Object(m.jsxs)(l.p,{className:"pt-0",placement:"bottom-end",children:[Object(m.jsx)(l.o,{header:!0,tag:"div",color:"light",className:"text-center",children:Object(m.jsx)("strong",{children:"\u30a2\u30ab\u30a6\u30f3\u30c8"})}),Object(m.jsxs)(l.o,{onClick:function(){console.log("launch sso"),window.open("https://fbssso.bizside.biz/Shibboleth.sso/Login","_self")},children:[Object(m.jsx)(v.a,{name:"cil-bell",className:"mfe-2"}),"SSO \u30ed\u30b0\u30a4\u30f3"]})]})]});var w=[{_tag:"CSidebarNavItem",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",to:"/dashboard",icon:Object(m.jsx)(v.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"}];const y=()=>{const e=Object(N.b)(),s=Object(N.c)((e=>e.sidebarShow));return Object(m.jsxs)(l.M,{show:s,onShowChange:s=>e({type:"set",sidebarShow:s}),children:[Object(m.jsxs)(l.N,{className:"d-md-down-none",to:"/",children:[Object(m.jsx)("h2",{children:"\u30c6\u30b9\u30c8"}),Object(m.jsx)(v.a,{className:"c-sidebar-brand-minimized",name:"sygnet",height:35})]}),Object(m.jsx)(l.P,{children:Object(m.jsx)(l.m,{items:w,components:{CSidebarNavDivider:l.Q,CSidebarNavDropdown:l.R,CSidebarNavItem:l.S,CSidebarNavTitle:l.T}})}),Object(m.jsx)(l.O,{className:"c-d-md-down-none"})]})};var _=a.a.memo(y);s.default=()=>Object(m.jsxs)("div",{className:"c-app c-default-layout",children:[Object(m.jsx)(_,{}),Object(m.jsxs)("div",{className:"c-wrapper",children:[Object(m.jsx)(S,{}),Object(m.jsx)("div",{className:"c-body",children:Object(m.jsx)(p,{})}),Object(m.jsx)(f,{})]})]})}}]); //# sourceMappingURL=6.94d5951b.chunk.js.map