{"version":3,"sources":["config.js","views/Auth/utils/axiosHeaders.js","views/Auth/UserService.js","views/Auth/actions/types.js","polyfill.js","views/Auth/reducers/authReducer.js","views/Auth/reducers/index.js","store.js","views/Auth/utils/authProvider.js","App.js","serviceWorker.js","assets/icons/sygnet.js","assets/icons/index.js","assets/icons/logo.js","assets/icons/logo-negative.js","index.js","views/Auth/actions/authActions.js"],"names":["apiHostName","host","authority","setAuthHeader","token","axios","defaults","headers","common","config","client_id","redirect_uri","response_type","scope","post_logout_redirect_uri","userManager","UserManager","loadUserFromStorage","store","getUser","user","dispatch","storeUserError","storeUser","console","error","signinRedirectCallback","signoutRedirectCallback","clearStaleState","removeUser","STORE_USER","USER_SIGNED_OUT","USER_EXPIRED","STORE_USER_ERROR","LOADING_USER","window","CustomEvent","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","prototype","Event","initialState","isLoadingUser","combineReducers","auth","state","action","type","payload","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStore","rootReducer","AuthProvider","manager","children","useRef","useEffect","current","onUserLoaded","log","onUserUnloaded","onAccessTokenExpiring","onAccessTokenExpired","onUserSignedOut","events","addUserLoaded","addUserUnloaded","addAccessTokenExpiring","addAccessTokenExpired","addUserSignedOut","removeUserLoaded","removeUserUnloaded","removeAccessTokenExpiring","removeAccessTokenExpired","removeUserSignedOut","React","Children","only","loading","className","Login","lazy","SigninOidc","SignoutOidc","Page404","Page500","TheLayout","App","Suspense","fallback","exact","path","name","render","props","Boolean","location","hostname","match","icons","Object","assign","sygnet","logo","logoNegative","cilAlignCenter","cilAlignLeft","cilAlignRight","cilApplicationsSettings","cilArrowRight","cilArrowTop","cilAsterisk","cilBan","cilBasket","cilBell","cilBold","cilBookmark","cilCalculator","cilCalendar","cilCloudDownload","cilChartPie","cilCheck","cilChevronBottom","cilChevronLeft","cilChevronRight","cilChevronTop","cilCircle","cilCheckCircle","cilCode","cilCommentSquare","cilCreditCard","cilCursor","cilCursorMove","cilDrop","cilDollar","cilEnvelopeClosed","cilEnvelopeLetter","cilEnvelopeOpen","cilEuro","cilGlobeAlt","cilGrid","cilFile","cilFullscreen","cilFullscreenExit","cilGraph","cilHome","cilInbox","cilIndentDecrease","cilIndentIncrease","cilInputPower","cilItalic","cilJustifyCenter","cilJustifyLeft","cilLaptop","cilLayers","cilLightbulb","cilList","cilListNumbered","cilListRich","cilLocationPin","cilLockLocked","cilMagnifyingGlass","cilMap","cilMoon","cilNotes","cilOptions","cilPaperclip","cilPaperPlane","cilPencil","cilPeople","cilPhone","cilPrint","cilPuzzle","cilSave","cilScrubber","cilSettings","cilShare","cilShareAll","cilShareBoxed","cilShieldAlt","cilSpeech","cilSpeedometer","cilSpreadsheet","cilStar","cilSun","cilTags","cilTask","cilTrash","cilUnderline","cilUser","cilUserFemale","cilUserFollow","cilUserUnfollow","cilX","cilXCircle","cilWarning","cilStorage","cilFolderOpen","cilBlind","cilBuilding","cifUs","cifBr","cifIn","cifFr","cifEs","cifPl","cibSkype","cibFacebook","cibTwitter","cibLinkedin","cibFlickr","cibTumblr","cibXing","cibGithub","cibStackoverflow","cibYoutube","cibDribbble","cibInstagram","cibPinterest","cibVk","cibYahoo","cibBehance","cibReddit","cibVimeo","cibCcMastercard","cibCcVisa","cibStripe","cibPaypal","cibGooglePay","cibCcAmex","ReactDOM","getElementById","navigator","serviceWorker","ready","then","registration","unregister","id_token"],"mappings":";0HAAA,sGAGO,IAAMA,EAAc,gCAEdC,EAAO,wBAEPC,EAAY,iC,iCCPzB,wDAEO,SAASC,EAAcC,GAC5BC,IAAMC,SAASC,QAAQC,OAAvB,cAAiDJ,EAAQ,UAAYA,EAAQ,K,u9MCC/E,IAAMK,EAAS,CACXP,UAAWA,IACXQ,UAAW,yBACXC,aAAcV,IAAO,eACrBW,cAAe,OACfC,MAAO,yEACPC,yBAA0Bb,IAAO,iBAG/Bc,EAAc,IAAIC,cAAYP,GAE7B,SAAeQ,EAAtB,kC,4CAAO,WAAmCC,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ACAC,iBACAC,aACAC,aACAC,mBACAC,uBACAC,cACAC,aACAC,cACAC,uBACAC,uBACAC,mBACAC,eACAC,sBACAC,oBACAC,eACAC,eACAC,kBACAC,aACAC,qBACAC,iBACAC,oBACAC,mBACAC,wBACAC,YACAC,aACAC,cACAC,gBACAC,kBACAC,mBACAC,eACAC,eACAC,cACAC,cACAC,eACAC,aACAC,iBACAC,iBACAC,cACAC,iBACAC,mBACAC,kBACAC,eACAC,oBACAC,oBACAC,aACAC,YACAC,aACAC,aACAC,cACAC,kBACAC,aACAC,mBACAC,mBACAC,qBACAC,UACAC,gBACAC,gBACAC,gBACAC,mBACAC,cACAC,kBACC,CACDC,WACAC,WACAC,WACAC,WACAC,WACAC,YACC,CACDC,aACAC,gBACAC,eACAC,gBACAC,cACAC,cACAC,YACAC,cACAC,qBACAC,eACAC,gBACAC,iBACAC,iBACAC,UACAC,aACAC,eACAC,cACAC,aACAC,oBACAC,cACAC,cACAC,cACAC,iBACAC,gBG9PF1J,IAAMwB,MAAQA,GAEdmI,IAASzI,OACP,kBAAC,IAAD,CAAUrF,MAAOA,GACf,kBAAC,EAAD,OAEF0B,SAASqM,eAAe,SLsGpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,iB,gCM3HnB,yFASO,SAAShO,EAAUH,GAGxB,OADAjB,YAAciB,EAAKoO,UACZ,CACLjM,KAAMzB,IACN0B,QAASpC,GAUN,SAASE,IACd,MAAO,CACLiC,KAAMtB,Q","file":"static/js/main.fda17cf0.chunk.js","sourcesContent":["// export const apiHostName = 'http://192.168.0.102:5001';\r\n// export const apiHostName = `${window.location.protocol}//${window.location.hostname}:5001`;\r\n// export const apiHostName = 'https://localhost:44347';\r\nexport const apiHostName = 'http://api.mansurtraders.info';\r\n\r\nexport const host = 'http://localhost:3008'\r\nexport const adminApiUrl = \"http://localhost:8083\";\r\nexport const authority = \"http://api.mansurtraders.info\";\r\n\r\nexport const incidentsFolder = \"incidents\"\r\n","import axios from 'axios'\r\n\r\nexport function setAuthHeader(token) {\r\n axios.defaults.headers.common['Authorization'] = token ? 'Bearer ' + token : ''\r\n // let userFromStorage = JSON.parse(localStorage.getItem(\"user\"));\r\n // axios.defaults.headers.common['Authorization'] = userFromStorage.access_token\r\n}","import { UserManager } from 'oidc-client';\r\nimport { host, authority } from '../../config';\r\nimport { storeUser, storeUserError } from './actions/authActions';\r\n\r\nconst config = {\r\n authority: authority,\r\n client_id: \"ThreatLibraryWebClient\",\r\n redirect_uri: host + \"/signin-oidc\",\r\n response_type: \"code\",\r\n scope: \"openid profile IDMSCoreApi IDMSClaims roles skoruba_identity_admin_api\",\r\n post_logout_redirect_uri: host + \"/signout-oidc\",\r\n};\r\n\r\nconst userManager = new UserManager(config)\r\n\r\nexport async function loadUserFromStorage(store) {\r\n try {\r\n let user = await userManager.getUser()\r\n if (!user) { return store.dispatch(storeUserError()) }\r\n store.dispatch(storeUser(user))\r\n } catch (e) {\r\n console.error(`User not found: ${e}`)\r\n store.dispatch(storeUserError())\r\n }\r\n}\r\n\r\nexport function setUser() {\r\n userManager.getUser().then(function (user) {\r\n localStorage.setItem(\"user\", JSON.stringify(user));\r\n // storeUser(user);\r\n })\r\n}\r\n\r\nexport function getUserFromStorage() {\r\n return JSON.parse(localStorage.getItem(\"user\"));\r\n}\r\n\r\nexport function signinRedirect() {\r\n return userManager.signinRedirect()\r\n}\r\n\r\nexport function signinRedirectCallback() {\r\n return userManager.signinRedirectCallback()\r\n}\r\n\r\nexport async function signoutRedirect(id_token) {\r\n userManager.clearStaleState()\r\n userManager.removeUser()\r\n return window.location = config.authority + \"/connect/endsession?id_token_hint=\" + id_token + \"&post_logout_redirect_uri\" + config.post_logout_redirect_uri;\r\n // return userManager.signoutRedirect()\r\n}\r\n\r\nexport function signoutRedirectCallback() {\r\n // localStorage.clear();\r\n userManager.clearStaleState()\r\n userManager.removeUser()\r\n return userManager.signoutRedirectCallback()\r\n}\r\n\r\nexport default userManager\r\n","export const STORE_USER = 'STORE_USER'\r\nexport const USER_SIGNED_OUT = 'USER_SIGNED_OUT'\r\nexport const USER_EXPIRED = 'USER_EXPIRED'\r\nexport const STORE_USER_ERROR = 'STORE_USER_ERROR'\r\nexport const LOADING_USER = 'LOADING_USER'\r\n","/*\r\n* required polyfills\r\n*/\r\nimport \"core-js\";\r\nimport 'core-js/features/set/map';\r\nimport 'core-js/features/map';\r\n\r\n/** IE9, IE10 and IE11 requires all of the following polyfills. **/\r\n// import 'core-js/es6/symbol'\r\n// import 'core-js/es6/object'\r\n// import 'core-js/es6/function'\r\n// import 'core-js/es6/parse-int'\r\n// import 'core-js/es6/parse-float'\r\n// import 'core-js/es6/number'\r\n// import 'core-js/es6/math'\r\n// import 'core-js/es6/string'\r\n// import 'core-js/es6/date'\r\n// import 'core-js/es6/array'\r\n// import 'core-js/es6/regexp'\r\n// import 'core-js/es6/map'\r\n// import 'core-js/es6/weak-map'\r\n// import 'core-js/es6/set'\r\n// import 'core-js/es7/object'\r\n\r\n/** IE10 and IE11 requires the following for the Reflect API. */\r\n// import 'core-js/es6/reflect'\r\n\r\n/** Evergreen browsers require these. **/\r\n// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.\r\n// import 'core-js/es7/reflect'\r\n\r\n// CustomEvent() constructor functionality in IE9, IE10, IE11\r\n(function () {\r\n\r\n if ( typeof window.CustomEvent === \"function\" ) return false\r\n\r\n function CustomEvent ( event, params ) {\r\n params = params || { bubbles: false, cancelable: false, detail: undefined }\r\n var evt = document.createEvent( 'CustomEvent' )\r\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail )\r\n return evt\r\n }\r\n\r\n CustomEvent.prototype = window.Event.prototype\r\n\r\n window.CustomEvent = CustomEvent\r\n})()\r\n","import {\r\n USER_SIGNED_OUT,\r\n STORE_USER_ERROR,\r\n USER_EXPIRED,\r\n STORE_USER,\r\n LOADING_USER\r\n} from '../actions/types'\r\n\r\nconst initialState = {\r\n user: null,\r\n isLoadingUser: false\r\n};\r\n\r\nexport default function (state = initialState, action) {\r\n switch (action.type) {\r\n case STORE_USER:\r\n return {\r\n ...state,\r\n isLoadingUser: false,\r\n user: action.payload\r\n }\r\n case LOADING_USER:\r\n return {\r\n ...state,\r\n isLoadingUser: true\r\n }\r\n case USER_EXPIRED:\r\n case STORE_USER_ERROR:\r\n case USER_SIGNED_OUT:\r\n return {\r\n ...state,\r\n user: null,\r\n isLoadingUser: false\r\n }\r\n default:\r\n return state\r\n }\r\n}","import { combineReducers } from 'redux';\r\nimport authReducer from './authReducer';\r\n\r\nexport default combineReducers({\r\n auth: authReducer\r\n})\r\n","// import { createStore } from 'redux'\r\n\r\n// const initialState = {\r\n// sidebarShow: 'responsive'\r\n// }\r\n\r\n// const changeState = (state = initialState, { type, ...rest }) => {\r\n// switch (type) {\r\n// case 'set':\r\n// return {...state, ...rest }\r\n// default:\r\n// return state\r\n// }\r\n// }\r\n\r\n// const store = createStore(changeState)\r\n// export default store\r\n\r\nimport { createStore, compose } from 'redux';\r\nimport rootReducer from './views/Auth/reducers'\r\n\r\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\r\nconst initialState = {}\r\n\r\nconst store = createStore(\r\n rootReducer,\r\n initialState,\r\n composeEnhancers()\r\n)\r\n\r\nexport default store;","import React, { useEffect, useRef } from 'react';\r\nimport { storeUser } from '../actions/authActions'\r\nimport { setAuthHeader } from './axiosHeaders';\r\n\r\nexport default function AuthProvider({ userManager: manager, store, children }) {\r\n\r\n let userManager = useRef();\r\n\r\n useEffect(() => {\r\n userManager.current = manager\r\n\r\n const onUserLoaded = (user) => {\r\n console.log(`user loaded: ${user}`)\r\n store.dispatch(storeUser(user))\r\n }\r\n\r\n const onUserUnloaded = () => {\r\n setAuthHeader(null)\r\n console.log(`user unloaded`)\r\n }\r\n\r\n const onAccessTokenExpiring = () => {\r\n console.log(`user token expiring`)\r\n }\r\n\r\n const onAccessTokenExpired = () => {\r\n console.log(`user token expired`)\r\n }\r\n\r\n const onUserSignedOut = () => {\r\n console.log(`user signed out`)\r\n }\r\n\r\n // events for user\r\n userManager.current.events.addUserLoaded(onUserLoaded)\r\n userManager.current.events.addUserUnloaded(onUserUnloaded)\r\n userManager.current.events.addAccessTokenExpiring(onAccessTokenExpiring)\r\n userManager.current.events.addAccessTokenExpired(onAccessTokenExpired)\r\n userManager.current.events.addUserSignedOut(onUserSignedOut)\r\n\r\n // Specify how to clean up after this effect:\r\n return function cleanup() {\r\n userManager.current.events.removeUserLoaded(onUserLoaded);\r\n userManager.current.events.removeUserUnloaded(onUserUnloaded);\r\n userManager.current.events.removeAccessTokenExpiring(onAccessTokenExpiring)\r\n userManager.current.events.removeAccessTokenExpired(onAccessTokenExpired)\r\n userManager.current.events.removeUserSignedOut(onUserSignedOut)\r\n };\r\n }, [manager, store]);\r\n\r\n return (\r\n React.Children.only(children)\r\n )\r\n}","import React, { useEffect } from 'react';\r\nimport { HashRouter as Router, Route, Switch } from 'react-router-dom';\r\nimport './scss/style.scss';\r\n\r\nimport { Provider } from 'react-redux';\r\nimport store from './store';\r\nimport userManager, { loadUserFromStorage } from './views/Auth/UserService';\r\nimport AuthProvider from './views/Auth/utils/authProvider'\r\n// import PrivateRoute from './views/Auth/utils/protectedRoute'\r\n\r\n// React Notification\r\nimport 'react-notifications/lib/notifications.css';\r\nimport { NotificationContainer } from 'react-notifications';\r\n\r\n\r\nconst loading = (\r\n
\r\n
\r\n
\r\n)\r\n\r\n// Pages\r\nconst Login = React.lazy(() => import('./views/Auth/Login'));\r\nconst SigninOidc = React.lazy(() => import('./views/Auth/signin-oidc'));\r\nconst SignoutOidc = React.lazy(() => import('./views/Auth/signout-oidc'));\r\nconst Page404 = React.lazy(() => import('./views/pages/page404/Page404'));\r\nconst Page500 = React.lazy(() => import('./views/pages/page500/Page500'));\r\nconst TheLayout = React.lazy(() => import('../src/containers/TheLayout'));\r\n\r\nconst App = () => {\r\n\r\n useEffect(() => {\r\n // fetch current user from cookies\r\n loadUserFromStorage(store)\r\n }, [])\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n {/* } /> */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\nexport default App;\r\n","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\r\n );\r\n });\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n\r\n // Execute callback\r\n if (config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","export const sygnet = ['160 160', `\r\n coreui logo\r\n \r\n \r\n \r\n \r\n \r\n \r\n`]\r\n","import { sygnet } from './sygnet'\r\nimport { logo } from './logo'\r\nimport { logoNegative } from './logo-negative'\r\n\r\nimport {\r\n cibSkype,\r\n cibFacebook,\r\n cibTwitter,\r\n cibLinkedin,\r\n cibFlickr,\r\n cibTumblr,\r\n cibXing,\r\n cibGithub,\r\n cibStackoverflow,\r\n cibYoutube,\r\n cibDribbble,\r\n cibInstagram,\r\n cibPinterest,\r\n cibVk,\r\n cibYahoo,\r\n cibBehance,\r\n cibReddit,\r\n cibVimeo,\r\n cibCcMastercard,\r\n cibCcVisa,\r\n cibStripe,\r\n cibPaypal,\r\n cibGooglePay,\r\n cibCcAmex\r\n} from '@coreui/icons'\r\nimport {\r\n cifUs,\r\n cifBr,\r\n cifIn,\r\n cifFr,\r\n cifEs,\r\n cifPl\r\n} from '@coreui/icons'\r\nimport {\r\n cilAlignCenter,\r\n cilAlignLeft,\r\n cilAlignRight,\r\n cilApplicationsSettings,\r\n cilArrowRight,\r\n cilArrowTop,\r\n cilAsterisk,\r\n cilBan,\r\n cilBasket,\r\n cilBell,\r\n cilBold,\r\n cilBookmark,\r\n cilCalculator,\r\n cilCalendar,\r\n cilCloudDownload,\r\n cilChartPie,\r\n cilCheck,\r\n cilChevronBottom,\r\n cilChevronLeft,\r\n cilChevronRight,\r\n cilChevronTop,\r\n cilCircle,\r\n cilCheckCircle,\r\n cilCode,\r\n cilCommentSquare,\r\n cilCreditCard,\r\n cilCursor,\r\n cilCursorMove,\r\n cilDrop,\r\n cilDollar,\r\n cilEnvelopeClosed,\r\n cilEnvelopeLetter,\r\n cilEnvelopeOpen,\r\n cilEuro,\r\n cilGlobeAlt,\r\n cilGrid,\r\n cilFile,\r\n cilFullscreen,\r\n cilFullscreenExit,\r\n cilGraph,\r\n cilHome,\r\n cilInbox,\r\n cilIndentDecrease,\r\n cilIndentIncrease,\r\n cilInputPower,\r\n cilItalic,\r\n cilJustifyCenter,\r\n cilJustifyLeft,\r\n cilLaptop,\r\n cilLayers,\r\n cilLightbulb,\r\n cilList,\r\n cilListNumbered,\r\n cilListRich,\r\n cilLocationPin,\r\n cilLockLocked,\r\n cilMagnifyingGlass,\r\n cilMap,\r\n cilMoon,\r\n cilNotes,\r\n cilOptions,\r\n cilPaperclip,\r\n cilPaperPlane,\r\n cilPencil,\r\n cilPeople,\r\n cilPhone,\r\n cilPrint,\r\n cilPuzzle,\r\n cilSave,\r\n cilScrubber,\r\n cilSettings,\r\n cilShare,\r\n cilShareAll,\r\n cilShareBoxed,\r\n cilShieldAlt,\r\n cilSpeech,\r\n cilSpeedometer,\r\n cilSpreadsheet,\r\n cilStar,\r\n cilSun,\r\n cilTags,\r\n cilTask,\r\n cilTrash,\r\n cilUnderline,\r\n cilUser,\r\n cilUserFemale,\r\n cilUserFollow,\r\n cilUserUnfollow,\r\n cilX,\r\n cilXCircle,\r\n cilWarning,\r\n cilStorage,\r\n cilFolderOpen,\r\n cilBlind,\r\n cilBuilding\r\n} from '@coreui/icons'\r\n\r\nexport const icons = Object.assign({}, {\r\n sygnet,\r\n logo,\r\n logoNegative\r\n}, {\r\n cilAlignCenter,\r\n cilAlignLeft,\r\n cilAlignRight,\r\n cilApplicationsSettings,\r\n cilArrowRight,\r\n cilArrowTop,\r\n cilAsterisk,\r\n cilBan,\r\n cilBasket,\r\n cilBell,\r\n cilBold,\r\n cilBookmark,\r\n cilCalculator,\r\n cilCalendar,\r\n cilCloudDownload,\r\n cilChartPie,\r\n cilCheck,\r\n cilChevronBottom,\r\n cilChevronLeft,\r\n cilChevronRight,\r\n cilChevronTop,\r\n cilCircle,\r\n cilCheckCircle,\r\n cilCode,\r\n cilCommentSquare,\r\n cilCreditCard,\r\n cilCursor,\r\n cilCursorMove,\r\n cilDrop,\r\n cilDollar,\r\n cilEnvelopeClosed,\r\n cilEnvelopeLetter,\r\n cilEnvelopeOpen,\r\n cilEuro,\r\n cilGlobeAlt,\r\n cilGrid,\r\n cilFile,\r\n cilFullscreen,\r\n cilFullscreenExit,\r\n cilGraph,\r\n cilHome,\r\n cilInbox,\r\n cilIndentDecrease,\r\n cilIndentIncrease,\r\n cilInputPower,\r\n cilItalic,\r\n cilJustifyCenter,\r\n cilJustifyLeft,\r\n cilLaptop,\r\n cilLayers,\r\n cilLightbulb,\r\n cilList,\r\n cilListNumbered,\r\n cilListRich,\r\n cilLocationPin,\r\n cilLockLocked,\r\n cilMagnifyingGlass,\r\n cilMap,\r\n cilMoon,\r\n cilNotes,\r\n cilOptions,\r\n cilPaperclip,\r\n cilPaperPlane,\r\n cilPencil,\r\n cilPeople,\r\n cilPhone,\r\n cilPrint,\r\n cilPuzzle,\r\n cilSave,\r\n cilScrubber,\r\n cilSettings,\r\n cilShare,\r\n cilShareAll,\r\n cilShareBoxed,\r\n cilShieldAlt,\r\n cilSpeech,\r\n cilSpeedometer,\r\n cilSpreadsheet,\r\n cilStar,\r\n cilSun,\r\n cilTags,\r\n cilTask,\r\n cilTrash,\r\n cilUnderline,\r\n cilUser,\r\n cilUserFemale,\r\n cilUserFollow,\r\n cilUserUnfollow,\r\n cilX,\r\n cilXCircle,\r\n cilWarning,\r\n cilStorage,\r\n cilFolderOpen,\r\n cilBlind,\r\n cilBuilding\r\n}, {\r\n cifUs,\r\n cifBr,\r\n cifIn,\r\n cifFr,\r\n cifEs,\r\n cifPl\r\n}, {\r\n cibSkype,\r\n cibFacebook,\r\n cibTwitter,\r\n cibLinkedin,\r\n cibFlickr,\r\n cibTumblr,\r\n cibXing,\r\n cibGithub,\r\n cibStackoverflow,\r\n cibYoutube,\r\n cibDribbble,\r\n cibInstagram,\r\n cibPinterest,\r\n cibVk,\r\n cibYahoo,\r\n cibBehance,\r\n cibReddit,\r\n cibVimeo,\r\n cibCcMastercard,\r\n cibCcVisa,\r\n cibStripe,\r\n cibPaypal,\r\n cibGooglePay,\r\n cibCcAmex\r\n})\r\n","export const logo = ['608 134', `\r\n coreui react pro\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`]\r\n","export const logoNegative = ['608 134', `\r\n coreui react pro logo\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n`]\r\n","import 'react-app-polyfill/ie11'; // For IE 11 support\r\nimport 'react-app-polyfill/stable';\r\nimport './polyfill'\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nimport { icons } from './assets/icons'\r\n\r\nimport { Provider } from 'react-redux'\r\nimport store from './store'\r\n\r\nReact.icons = icons\r\n\r\nReactDOM.render(\r\n \r\n \r\n , \r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","import {\r\n STORE_USER,\r\n USER_SIGNED_OUT,\r\n USER_EXPIRED,\r\n STORE_USER_ERROR,\r\n LOADING_USER\r\n} from './types'\r\nimport { setAuthHeader } from '../utils/axiosHeaders'\r\n\r\nexport function storeUser(user) {\r\n // setAuthHeader(user.access_token)\r\n setAuthHeader(user.id_token)\r\n return {\r\n type: STORE_USER,\r\n payload: user\r\n }\r\n}\r\n\r\nexport function loadingUser() {\r\n return {\r\n type: LOADING_USER\r\n }\r\n}\r\n\r\nexport function storeUserError() {\r\n return {\r\n type: STORE_USER_ERROR\r\n }\r\n}\r\n\r\nexport function userExpired() {\r\n return {\r\n type: USER_EXPIRED\r\n }\r\n}\r\n\r\nexport function userSignedOut() {\r\n return {\r\n type: USER_SIGNED_OUT\r\n }\r\n}\r\n\r\n"],"sourceRoot":""}