{"version":3,"sources":["i18n.js","utils/auth.js","utils/swal.js","gql/token.js","polyfill.js","App.js","serviceWorker.js","assets/icons/sygnet.js","assets/icons/index.js","assets/icons/logo.js","assets/icons/logo-negative.js","store.js","index.js"],"names":["resources","en","translation","enLocalization","id","idLocalization","i18n","use","initReactI18next","init","lng","keySeparator","interpolation","escapeValue","localStorage","window","getUserLogin","hasOwnProperty","jwt","decode","token","getUserAccesses","accesses","checkAuth","exp","Date","now","checkAccess","access","includes","Alert","Swal","mixin","showConfirmButton","timer","Toast","toast","DeleteConfirmation","text","t","icon","showCancelButton","confirmButtonColor","cancelButtonColor","confirmButtonText","cancelButtonText","reverseButtons","focusConfirm","LoadingAlert","allowOutsideClick","onOpen","showLoading","CancelConfirmation","title","input","inputLabel","inputPlaceholder","inputValidator","value","gql","MUTATION_SET_TOKEN","MUTATION_REMOVE_TOKEN","MUTATION_SET_COMPANY","CustomEvent","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","prototype","Event","loading","className","TheLayout","React","lazy","Login","Page404","ResetPassword","authLink","setContext","_","headers","getItem","authorization","client","ApolloClient","cache","InMemoryCache","link","concat","createUploadLink","fetch","uri","options","resolvers","Query","getToken","Mutation","setToken","setItem","removeToken","clear","setCompany","code","company","toLowerCase","defaultOptions","watchQuery","fetchPolicy","query","App","useState","isLoggedIn","setIsLoggedIn","useEffect","login","history","isResetPassword","mutate","mutation","variables","then","fire","push","catch","e","console","log","message","logout","Suspense","fallback","exact","path","name","render","props","to","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","cil3d","cilAccountLogout","cilAddressBook","cilBuilding","cilCart","cilChartLine","cilGift","cilStorage","cilTruck","cilWallet","cilAppsSettings","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","initialState","sidebarShow","store","createStore","state","type","rest","ReactDOM","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"4KAAA,wCAKMA,EAAY,CAChBC,GAAI,CACFC,YAAaC,GAEfC,GAAI,CACFF,YAAaG,IAIjBC,IACGC,IAAIC,KACJC,KAAK,CACJT,YACAU,IAAK,KAELC,cAAc,EAEdC,cAAe,CACbC,aAAa,KAIFP,MAAf,G,iCC3BF,8JAEMQ,EAAeC,OAAOD,aAEfE,EAAe,kBAC1BF,EAAaG,eAAe,UAAYC,IAAIC,OAAOL,EAAaM,QAErDC,E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IgB,CAAC,UAAD,owND6IhBC,aE7IwB,CAAC,UAAD,2wNF+I1B,CACEC,oBACAC,kBACAC,mBACAC,6BACAC,mBACAC,iBACAC,iBACAC,YACAC,eACAC,aACAC,aACAC,iBACAC,mBACAC,iBACAC,sBACAC,iBACAC,cACAC,sBACAC,oBACAC,qBACAC,mBACAC,eACAC,oBACAC,aACAC,sBACAC,mBACAC,eACAC,mBACAC,aACAC,eACAC,uBACAC,uBACAC,qBACAC,aACAC,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,WACAC,sBACAC,oBACAC,iBACAC,aACAC,kBACAC,aACAC,gBACAC,cACAC,eACAC,sBAEF,CACEC,UACAC,UACAC,UACAC,UACAC,WACAC,YAEF,CACEC,aACAC,gBACAC,eACAC,gBACAC,cACAC,cACAC,YACAC,cACAC,qBACAC,eACAC,gBACAC,iBACAC,iBACAC,UACAC,aACAC,eACAC,cACAC,aACAC,oBACAC,cACAC,cACAC,cACAC,iBACAC,gB,8BGrREC,GAAe,CACnBC,YAAa,cAaAC,GADDC,cATM,WAA8C,IAA7CC,EAA4C,uDAApCJ,GAAoC,yCAApBK,EAAoB,EAApBA,KAASC,EAAW,yBAC/D,OAAQD,GACN,IAAK,MACH,OAAO,2BAAID,GAAUE,GACvB,QACE,OAAOF,MCGbnN,IAAMqE,MAAQA,GAEdiJ,IAASxJ,OACP,kBAAC,KAAD,CAAUmJ,MAAOA,IACf,kBAAC,EAAD,OAEFzN,SAAS+N,eAAe,SNqGpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM1K,MAAK,SAAA2K,GACjCA,EAAaC,kB","file":"static/js/main.e6ebacb4.chunk.js","sourcesContent":["import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport enLocalization from \"./locales/en.json\"\nimport idLocalization from \"./locales/id.json\"\n\nconst resources = {\n en: {\n translation: enLocalization\n },\n id: {\n translation: idLocalization\n }\n};\n\ni18n\n .use(initReactI18next)\n .init({\n resources,\n lng: \"id\",\n\n keySeparator: false,\n\n interpolation: {\n escapeValue: false\n }\n });\n\n export default i18n;\n","import jwt from 'jsonwebtoken';\n\nconst localStorage = window.localStorage;\n\nexport const getUserLogin = () =>\n localStorage.hasOwnProperty('token') && jwt.decode(localStorage.token);\n\nexport const getUserAccesses = () =>\n getUserLogin() && (getUserLogin().accesses || []);\n\nexport const checkAuth = () =>\n getUserLogin() && getUserLogin().exp * 1000 > Date.now();\n\nexport const checkAccess = access =>\n getUserLogin() && getUserAccesses().includes(access);\n","import Swal from 'sweetalert2';\nimport i18n from '../i18n';\n\nconst Alert = Swal.mixin({\n showConfirmButton: false,\n timer: 1500\n});\n\nconst Toast = Swal.mixin({\n showConfirmButton: false,\n timer: 1500,\n toast: true\n});\n\nconst DeleteConfirmation = Swal.mixin({\n text: i18n.t('alert.delete.description'),\n icon: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#2a1ab9',\n cancelButtonColor: '#d33',\n confirmButtonText: i18n.t('alert.confirm'),\n cancelButtonText: i18n.t('alert.cancel'),\n reverseButtons: true,\n focusConfirm: false\n});\n\nconst LoadingAlert = Swal.mixin({\n allowOutsideClick: false,\n onOpen: () => {\n Swal.showLoading();\n }\n});\n\nconst CancelConfirmation = Swal.mixin({\n title: 'Reason for cancellation',\n input: 'textarea',\n inputLabel: 'Reason',\n inputPlaceholder: 'Enter your reason',\n showCancelButton: true,\n inputValidator: value => {\n if (!value) {\n return 'You need to write something!';\n }\n }\n});\n\nexport { Alert, Toast, DeleteConfirmation, LoadingAlert, CancelConfirmation };\n","import gql from 'graphql-tag';\n\nconst QUERY_GET_TOKEN = gql`\n query getToken {\n getToken @client\n }\n`;\n\nconst MUTATION_SET_TOKEN = gql`\n mutation setToken($token: String) {\n setToken(token: $token) @client\n }\n`;\n\nconst MUTATION_REMOVE_TOKEN = gql`\n mutation removeToken {\n removeToken @client\n }\n`;\n\nconst MUTATION_SET_COMPANY = gql`\n mutation setCompany($code: String, $company: String) {\n setCompany(code: $code, company: $company) @client\n }\n`;\n\nexport {\n QUERY_GET_TOKEN,\n MUTATION_SET_TOKEN,\n MUTATION_REMOVE_TOKEN,\n MUTATION_SET_COMPANY\n};\n","/*\n* required polyfills\n*/\nimport \"core-js\";\nimport 'core-js/features/set/map';\nimport 'core-js/features/map';\n\n/** IE9, IE10 and IE11 requires all of the following polyfills. **/\n// import 'core-js/es6/symbol'\n// import 'core-js/es6/object'\n// import 'core-js/es6/function'\n// import 'core-js/es6/parse-int'\n// import 'core-js/es6/parse-float'\n// import 'core-js/es6/number'\n// import 'core-js/es6/math'\n// import 'core-js/es6/string'\n// import 'core-js/es6/date'\n// import 'core-js/es6/array'\n// import 'core-js/es6/regexp'\n// import 'core-js/es6/map'\n// import 'core-js/es6/weak-map'\n// import 'core-js/es6/set'\n// import 'core-js/es7/object'\n\n/** IE10 and IE11 requires the following for the Reflect API. */\n// import 'core-js/es6/reflect'\n\n/** Evergreen browsers require these. **/\n// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.\n// import 'core-js/es7/reflect'\n\n// CustomEvent() constructor functionality in IE9, IE10, IE11\n(function () {\n\n if ( typeof window.CustomEvent === \"function\" ) return false\n\n function CustomEvent ( event, params ) {\n params = params || { bubbles: false, cancelable: false, detail: undefined }\n var evt = document.createEvent( 'CustomEvent' )\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail )\n return evt\n }\n\n CustomEvent.prototype = window.Event.prototype\n\n window.CustomEvent = CustomEvent\n})()\n","import React, { useState, useEffect } from 'react';\nimport { HashRouter, Route, Switch, Redirect } from 'react-router-dom';\nimport {\n ApolloClient,\n // createHttpLink,\n InMemoryCache,\n ApolloProvider\n} from '@apollo/client';\nimport { setContext } from '@apollo/client/link/context';\nimport { createUploadLink } from 'apollo-upload-client';\nimport { MUTATION_SET_TOKEN, MUTATION_REMOVE_TOKEN } from './gql/token';\nimport { Alert } from './utils/swal';\nimport { checkAuth } from './utils/auth';\n\nimport './scss/style.scss';\n\nconst loading = (\n
\n
\n
\n);\n\n// Containers\nconst TheLayout = React.lazy(() => import('./containers/TheLayout'));\n\n// Pages\nconst Login = React.lazy(() => import('./views/pages/login/Login'));\nconst Page404 = React.lazy(() => import('./views/pages/page404/Page404'));\n// const Page500 = React.lazy(() => import('./views/pages/page500/Page500'));\nconst ResetPassword = React.lazy(() => import('./views/pages/ResetPassword'));\n\nlet localStorage = window.localStorage;\nconst authLink = setContext((_, { headers }) => {\n const token = localStorage.getItem('token');\n return {\n headers: {\n ...headers,\n authorization: token ? `Bearer ${token}` : ''\n }\n };\n});\nconst customFetch = (uri, options) => {\n return fetch(localStorage.getItem('uri') || 'http://localhost:4000', options);\n};\nconst client = new ApolloClient({\n cache: new InMemoryCache(),\n link: authLink.concat(\n // createUploadLink({\n // uri: 'http://localhost:4000'\n // })\n createUploadLink({\n fetch: customFetch\n })\n ),\n resolvers: {\n Query: {\n getToken: () => {\n return localStorage.getItem('token');\n }\n },\n Mutation: {\n setToken: (_, { token }) => {\n return localStorage.setItem('token', token);\n },\n removeToken: () => {\n return localStorage.clear();\n },\n setCompany: (_, { code, company }) => {\n localStorage.setItem(\n 'uri',\n `https://${code.toLowerCase()}.trinusatextile.com`\n );\n localStorage.setItem('code', code);\n return localStorage.setItem('company', company);\n }\n }\n }\n});\nclient.defaultOptions = {\n watchQuery: {\n fetchPolicy: 'no-cache'\n },\n query: {\n fetchPolicy: 'no-cache'\n }\n};\n\nconst App = () => {\n const [isLoggedIn, setIsLoggedIn] = useState(checkAuth());\n useEffect(() => {\n if (isLoggedIn !== checkAuth()) setIsLoggedIn(checkAuth());\n }, [isLoggedIn]);\n\n const login = (history, { isResetPassword, token }) => {\n client\n .mutate({\n mutation: MUTATION_SET_TOKEN,\n variables: {\n token\n }\n })\n .then(() => {\n Alert.fire({\n icon: 'success',\n title: 'Log in successfully'\n });\n setIsLoggedIn(true);\n if (isResetPassword) history.push('/reset-password');\n else history.push('/');\n })\n .catch(e => console.log(e.message || e));\n };\n\n const logout = () => {\n client\n .mutate({\n mutation: MUTATION_REMOVE_TOKEN\n })\n .then(() => {\n Alert.fire({\n icon: 'success',\n title: 'Log out successfully'\n });\n setIsLoggedIn(false);\n })\n .catch(e => console.log(e.message || e));\n };\n\n return (\n \n \n \n \n }\n />\n {!isLoggedIn && }\n }\n />\n }\n />\n {/* }\n /> */}\n }\n />\n \n \n \n \n );\n};\n\nexport default App;\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.');\n\n // Execute callback\n if (config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","export const sygnet = ['160 160', `\n coreui logo\n \n \n \n \n \n \n`]\n","import { sygnet } from './sygnet';\nimport { logo } from './logo';\nimport { logoNegative } from './logo-negative';\n\nimport {\n cibSkype,\n cibFacebook,\n cibTwitter,\n cibLinkedin,\n cibFlickr,\n cibTumblr,\n cibXing,\n cibGithub,\n cibStackoverflow,\n cibYoutube,\n cibDribbble,\n cibInstagram,\n cibPinterest,\n cibVk,\n cibYahoo,\n cibBehance,\n cibReddit,\n cibVimeo,\n cibCcMastercard,\n cibCcVisa,\n cibStripe,\n cibPaypal,\n cibGooglePay,\n cibCcAmex\n} from '@coreui/icons';\nimport { cifUs, cifBr, cifIn, cifFr, cifEs, cifPl } from '@coreui/icons';\nimport {\n cilAlignCenter,\n cilAlignLeft,\n cilAlignRight,\n cilApplicationsSettings,\n cilArrowRight,\n cilArrowTop,\n cilAsterisk,\n cilBan,\n cilBasket,\n cilBell,\n cilBold,\n cilBookmark,\n cilCalculator,\n cilCalendar,\n cilCloudDownload,\n cilChartPie,\n cilCheck,\n cilChevronBottom,\n cilChevronLeft,\n cilChevronRight,\n cilChevronTop,\n cilCircle,\n cilCheckCircle,\n cilCode,\n cilCommentSquare,\n cilCreditCard,\n cilCursor,\n cilCursorMove,\n cilDrop,\n cilDollar,\n cilEnvelopeClosed,\n cilEnvelopeLetter,\n cilEnvelopeOpen,\n cilEuro,\n cilGlobeAlt,\n cilGrid,\n cilFile,\n cilFullscreen,\n cilFullscreenExit,\n cilGraph,\n cilHome,\n cilInbox,\n cilIndentDecrease,\n cilIndentIncrease,\n cilInputPower,\n cilItalic,\n cilJustifyCenter,\n cilJustifyLeft,\n cilLaptop,\n cilLayers,\n cilLightbulb,\n cilList,\n cilListNumbered,\n cilListRich,\n cilLocationPin,\n cilLockLocked,\n cilMagnifyingGlass,\n cilMap,\n cilMoon,\n cilNotes,\n cilOptions,\n cilPaperclip,\n cilPaperPlane,\n cilPencil,\n cilPeople,\n cilPhone,\n cilPrint,\n cilPuzzle,\n cilSave,\n cilScrubber,\n cilSettings,\n cilShare,\n cilShareAll,\n cilShareBoxed,\n cilShieldAlt,\n cilSpeech,\n cilSpeedometer,\n cilSpreadsheet,\n cilStar,\n cilSun,\n cilTags,\n cilTask,\n cilTrash,\n cilUnderline,\n cilUser,\n cilUserFemale,\n cilUserFollow,\n cilUserUnfollow,\n cilX,\n cilXCircle,\n cilWarning,\n cil3d,\n cilAccountLogout,\n cilAddressBook,\n cilBuilding,\n cilCart,\n cilChartLine,\n cilGift,\n cilStorage,\n cilTruck,\n cilWallet,\n cilAppsSettings\n} from '@coreui/icons';\n\nexport const icons = Object.assign(\n {},\n {\n sygnet,\n logo,\n logoNegative\n },\n {\n cilAlignCenter,\n cilAlignLeft,\n cilAlignRight,\n cilApplicationsSettings,\n cilArrowRight,\n cilArrowTop,\n cilAsterisk,\n cilBan,\n cilBasket,\n cilBell,\n cilBold,\n cilBookmark,\n cilCalculator,\n cilCalendar,\n cilCloudDownload,\n cilChartPie,\n cilCheck,\n cilChevronBottom,\n cilChevronLeft,\n cilChevronRight,\n cilChevronTop,\n cilCircle,\n cilCheckCircle,\n cilCode,\n cilCommentSquare,\n cilCreditCard,\n cilCursor,\n cilCursorMove,\n cilDrop,\n cilDollar,\n cilEnvelopeClosed,\n cilEnvelopeLetter,\n cilEnvelopeOpen,\n cilEuro,\n cilGlobeAlt,\n cilGrid,\n cilFile,\n cilFullscreen,\n cilFullscreenExit,\n cilGraph,\n cilHome,\n cilInbox,\n cilIndentDecrease,\n cilIndentIncrease,\n cilInputPower,\n cilItalic,\n cilJustifyCenter,\n cilJustifyLeft,\n cilLaptop,\n cilLayers,\n cilLightbulb,\n cilList,\n cilListNumbered,\n cilListRich,\n cilLocationPin,\n cilLockLocked,\n cilMagnifyingGlass,\n cilMap,\n cilMoon,\n cilNotes,\n cilOptions,\n cilPaperclip,\n cilPaperPlane,\n cilPencil,\n cilPeople,\n cilPhone,\n cilPrint,\n cilPuzzle,\n cilSave,\n cilScrubber,\n cilSettings,\n cilShare,\n cilShareAll,\n cilShareBoxed,\n cilShieldAlt,\n cilSpeech,\n cilSpeedometer,\n cilSpreadsheet,\n cilStar,\n cilSun,\n cilTags,\n cilTask,\n cilTrash,\n cilUnderline,\n cilUser,\n cilUserFemale,\n cilUserFollow,\n cilUserUnfollow,\n cilX,\n cilXCircle,\n cilWarning,\n cil3d,\n cilAccountLogout,\n cilAddressBook,\n cilBuilding,\n cilCart,\n cilChartLine,\n cilGift,\n cilStorage,\n cilTruck,\n cilWallet,\n cilAppsSettings\n },\n {\n cifUs,\n cifBr,\n cifIn,\n cifFr,\n cifEs,\n cifPl\n },\n {\n cibSkype,\n cibFacebook,\n cibTwitter,\n cibLinkedin,\n cibFlickr,\n cibTumblr,\n cibXing,\n cibGithub,\n cibStackoverflow,\n cibYoutube,\n cibDribbble,\n cibInstagram,\n cibPinterest,\n cibVk,\n cibYahoo,\n cibBehance,\n cibReddit,\n cibVimeo,\n cibCcMastercard,\n cibCcVisa,\n cibStripe,\n cibPaypal,\n cibGooglePay,\n cibCcAmex\n }\n);\n","export const logo = ['608 134', `\n coreui react pro\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`]\n","export const logoNegative = ['608 134', `\n coreui react pro logo\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`]\n","import { createStore } from 'redux'\n\nconst initialState = {\n sidebarShow: 'responsive'\n}\n\nconst changeState = (state = initialState, { type, ...rest }) => {\n switch (type) {\n case 'set':\n return {...state, ...rest }\n default:\n return state\n }\n}\n\nconst store = createStore(changeState)\nexport default store","import 'react-app-polyfill/ie11'; // For IE 11 support\nimport 'react-app-polyfill/stable';\nimport './polyfill';\nimport './i18n';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nimport { icons } from './assets/icons';\n\nimport { Provider } from 'react-redux';\nimport store from './store';\n\nReact.icons = icons;\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: http://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}