\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=4e6a484c&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Login.vue?vue&type=style&index=0&id=4e6a484c&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{attrs:{\"viewBox\":\"0 0 139 95\",\"version\":\"1.1\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\",\"height\":\"24\"}},[_c('defs',[_c('linearGradient',{attrs:{\"id\":\"linearGradient-1\",\"x1\":\"100%\",\"y1\":\"10.5120544%\",\"x2\":\"50%\",\"y2\":\"89.4879456%\"}},[_c('stop',{attrs:{\"stop-color\":\"#000000\",\"offset\":\"0%\"}}),_c('stop',{attrs:{\"stop-color\":\"#FFFFFF\",\"offset\":\"100%\"}})],1),_c('linearGradient',{attrs:{\"id\":\"linearGradient-2\",\"x1\":\"64.0437835%\",\"y1\":\"46.3276743%\",\"x2\":\"37.373316%\",\"y2\":\"100%\"}},[_c('stop',{attrs:{\"stop-color\":\"#EEEEEE\",\"stop-opacity\":\"0\",\"offset\":\"0%\"}}),_c('stop',{attrs:{\"stop-color\":\"#FFFFFF\",\"offset\":\"100%\"}})],1)],1),_c('g',{attrs:{\"id\":\"Page-1\",\"stroke\":\"none\",\"stroke-width\":\"1\",\"fill\":\"none\",\"fill-rule\":\"evenodd\"}},[_c('g',{attrs:{\"id\":\"Artboard\",\"transform\":\"translate(-400.000000, -178.000000)\"}},[_c('g',{attrs:{\"id\":\"Group\",\"transform\":\"translate(400.000000, 178.000000)\"}},[_c('path',{staticClass:\"text-primary\",staticStyle:{\"fill\":\"currentColor\"},attrs:{\"id\":\"Path\",\"d\":\"M-5.68434189e-14,2.84217094e-14 L39.1816085,2.84217094e-14 L69.3453773,32.2519224 L101.428699,2.84217094e-14 L138.784583,2.84217094e-14 L138.784199,29.8015838 C137.958931,37.3510206 135.784352,42.5567762 132.260463,45.4188507 C128.736573,48.2809251 112.33867,64.5239941 83.0667527,94.1480575 L56.2750821,94.1480575 L6.71554594,44.4188507 C2.46876683,39.9813776 0.345377275,35.1089553 0.345377275,29.8015838 C0.345377275,24.4942122 0.230251516,14.560351 -5.68434189e-14,2.84217094e-14 Z\"}}),_c('path',{attrs:{\"id\":\"Path1\",\"d\":\"M69.3453773,32.2519224 L101.428699,1.42108547e-14 L138.784583,1.42108547e-14 L138.784199,29.8015838 C137.958931,37.3510206 135.784352,42.5567762 132.260463,45.4188507 C128.736573,48.2809251 112.33867,64.5239941 83.0667527,94.1480575 L56.2750821,94.1480575 L32.8435758,70.5039241 L69.3453773,32.2519224 Z\",\"fill\":\"url(#linearGradient-1)\",\"opacity\":\"0.2\"}}),_c('polygon',{attrs:{\"id\":\"Path-2\",\"fill\":\"#000000\",\"opacity\":\"0.049999997\",\"points\":\"69.3922914 32.4202615 32.8435758 70.5039241 54.0490008 16.1851325\"}}),_c('polygon',{attrs:{\"id\":\"Path-21\",\"fill\":\"#000000\",\"opacity\":\"0.099999994\",\"points\":\"69.3922914 32.4202615 32.8435758 70.5039241 58.3683556 20.7402338\"}}),_c('polygon',{attrs:{\"id\":\"Path-3\",\"fill\":\"url(#linearGradient-2)\",\"opacity\":\"0.099999994\",\"points\":\"101.428699 0 83.0667527 94.1480575 130.378721 47.0740288\"}})])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Logo.vue?vue&type=template&id=61705788&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/login-v2.99da7e4e.svg\";","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default {\r\n // Endpoints\r\n loginEndpoint: '/jwt/login',\r\n registerEndpoint: '/jwt/register',\r\n refreshEndpoint: '/jwt/refresh-token',\r\n logoutEndpoint: '/jwt/logout',\r\n\r\n // This will be prefixed in authorization header with token\r\n // e.g. Authorization: Bearer \r\n tokenType: 'Bearer',\r\n\r\n // Value of this property will be used as key to store JWT token in storage\r\n storageTokenKeyName: 'accessToken',\r\n storageRefreshTokenKeyName: 'refreshToken',\r\n}\r\n","import jwtDefaultConfig from './jwtDefaultConfig'\r\n\r\nexport default class JwtService {\r\n // Will be used by this service for making API calls\r\n axiosIns = null\r\n\r\n // jwtConfig <= Will be used by this service\r\n jwtConfig = { ...jwtDefaultConfig }\r\n\r\n // For Refreshing Token\r\n isAlreadyFetchingAccessToken = false\r\n\r\n // For Refreshing Token\r\n subscribers = []\r\n\r\n constructor(axiosIns, jwtOverrideConfig) {\r\n this.axiosIns = axiosIns\r\n this.jwtConfig = { ...this.jwtConfig, ...jwtOverrideConfig }\r\n\r\n // Request Interceptor\r\n this.axiosIns.interceptors.request.use(\r\n config => {\r\n // Get token from localStorage\r\n const accessToken = this.getToken()\r\n\r\n // If token is present add it to request's Authorization Header\r\n if (accessToken) {\r\n // eslint-disable-next-line no-param-reassign\r\n config.headers.Authorization = `${this.jwtConfig.tokenType} ${accessToken}`\r\n }\r\n return config\r\n },\r\n error => Promise.reject(error),\r\n )\r\n\r\n // Add request/response interceptor\r\n this.axiosIns.interceptors.response.use(\r\n response => response,\r\n error => {\r\n // const { config, response: { status } } = error\r\n const { config, response } = error\r\n const originalRequest = config\r\n\r\n // if (status === 401) {\r\n if (response && response.status === 401) {\r\n if (!this.isAlreadyFetchingAccessToken) {\r\n this.isAlreadyFetchingAccessToken = true\r\n this.refreshToken().then(r => {\r\n this.isAlreadyFetchingAccessToken = false\r\n\r\n // Update accessToken in localStorage\r\n this.setToken(r.data.accessToken)\r\n this.setRefreshToken(r.data.refreshToken)\r\n\r\n this.onAccessTokenFetched(r.data.accessToken)\r\n })\r\n }\r\n const retryOriginalRequest = new Promise(resolve => {\r\n this.addSubscriber(accessToken => {\r\n // Make sure to assign accessToken according to your response.\r\n // Check: https://pixinvent.ticksy.com/ticket/2413870\r\n // Change Authorization header\r\n originalRequest.headers.Authorization = `${this.jwtConfig.tokenType} ${accessToken}`\r\n resolve(this.axiosIns(originalRequest))\r\n })\r\n })\r\n return retryOriginalRequest\r\n }\r\n return Promise.reject(error)\r\n },\r\n )\r\n }\r\n\r\n onAccessTokenFetched(accessToken) {\r\n this.subscribers = this.subscribers.filter(callback => callback(accessToken))\r\n }\r\n\r\n addSubscriber(callback) {\r\n this.subscribers.push(callback)\r\n }\r\n\r\n getToken() {\r\n return localStorage.getItem(this.jwtConfig.storageTokenKeyName)\r\n }\r\n\r\n getRefreshToken() {\r\n return localStorage.getItem(this.jwtConfig.storageRefreshTokenKeyName)\r\n }\r\n\r\n setToken(value) {\r\n localStorage.setItem(this.jwtConfig.storageTokenKeyName, value)\r\n }\r\n\r\n setRefreshToken(value) {\r\n localStorage.setItem(this.jwtConfig.storageRefreshTokenKeyName, value)\r\n }\r\n\r\n login(...args) {\r\n return this.axiosIns.post(this.jwtConfig.loginEndpoint, ...args)\r\n }\r\n\r\n register(...args) {\r\n return this.axiosIns.post(this.jwtConfig.registerEndpoint, ...args)\r\n }\r\n\r\n refreshToken() {\r\n return this.axiosIns.post(this.jwtConfig.refreshEndpoint, {\r\n refreshToken: this.getRefreshToken(),\r\n })\r\n }\r\n}\r\n","import JwtService from './jwtService'\r\n\r\nexport default function useJwt(axiosIns, jwtOverrideConfig) {\r\n const jwt = new JwtService(axiosIns, jwtOverrideConfig)\r\n\r\n return {\r\n jwt,\r\n }\r\n}\r\n","import useJwt from '@core/auth/jwt/useJwt'\r\nimport axios from '@axios'\r\n\r\nconst { jwt } = useJwt(axios, {})\r\nexport default jwt\r\n","import useJwt from '@/auth/jwt/useJwt'\r\n\r\n/**\r\n * Return if user is logged in\r\n * This is completely up to you and how you want to store the token in your frontend application\r\n * e.g. If you are using cookies to store the application please update this function\r\n */\r\n// eslint-disable-next-line arrow-body-style\r\nexport const isUserLoggedIn = () => {\r\n return localStorage.getItem('userData') && localStorage.getItem(useJwt.jwtConfig.storageTokenKeyName)\r\n}\r\n\r\nexport const getUserData = () => JSON.parse(localStorage.getItem('userData'))\r\n\r\n/**\r\n * This function is used for demo purpose route navigation\r\n * In real app you won't need this function because your app will navigate to same route for each users regardless of ability\r\n * Please note role field is just for showing purpose it's not used by anything in frontend\r\n * We are checking role just for ease\r\n * NOTE: If you have different pages to navigate based on user ability then this function can be useful. However, you need to update it.\r\n * @param {String} userRole Role of user\r\n */\r\nexport const getHomeRouteForLoggedInUser = userRole => {\r\n if (userRole === 'admin') return '/'\r\n if (userRole === 'client') return { name: 'access-control' }\r\n return { name: 'auth-login' }\r\n}\r\n","// We haven't added icon's computed property because it makes this mixin coupled with UI\r\nexport const togglePasswordVisibility = {\r\n data() {\r\n return {\r\n passwordFieldType: 'password',\r\n }\r\n },\r\n methods: {\r\n togglePasswordVisibility() {\r\n this.passwordFieldType = this.passwordFieldType === 'password' ? 'text' : 'password'\r\n },\r\n },\r\n}\r\n\r\nexport const _ = null\r\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=style&index=0&id=4e6a484c&prod&lang=scss&\"","module.exports = __webpack_public_path__ + \"img/login-v2-dark.684bd68d.svg\";"],"sourceRoot":""}