text: /**
   * First we will load all of this project's JavaScript dependencies which
   * includes Vue and other libraries. It is a great starting point when
   * building robust, powerful web applications using Vue and Laravel.
   */
  require('./bootstrap');
  
  window.Vue = require('vue').default;
  import Vue from 'vue'
  import VueRouter from 'vue-router'
  
  Vue.use(VueRouter)
  
  import App from './views/App'
  import Home from './views/Home'
  import Login from './views/Login'
  import Register from './views/Register'
  import SingleActivity from './views/SingleActivity'
  import Checkout from './views/Checkout'
  import Experiance from './views/Experiance'
  import Confirmation from './views/Confirmation'
  import UserBoard from './views/UserBoard'
  import Admin from './views/Admin'
  
  const router = new VueRouter({
      mode: 'history',
      routes: [
          {
              path: '/',
              name: 'home',
              component: Home
          },
          {
              path: '/login',
              name: 'login',
              component: Login
          },
          {
              path: '/register',
              name: 'register',
              component: Register
          },
          {
              path: '/activities/:id',
              name: 'single-activities',
              component: SingleActivity
          },
          {
              path: '/confirmation',
              name: 'confirmation',
              component: Confirmation
          },
          {
              path: '/experiance',
              name: 'experiance',
              component: Experiance
          },
          {
              path: '/checkout',
              name: 'checkout',
              component: Checkout,
              props: (route) => ({ pid: route.query.pid })
          },
          {
              path: '/dashboard',
              name: 'userboard',
              component: UserBoard,
              meta: {
                  requiresAuth: true,
                  is_user: true
              }
          },
          {
              path: '/admin/:page',
              name: 'admin-pages',
              component: Admin,
              meta: {
                  requiresAuth: true,
                  is_admin: true
              }
          },
          {
              path: '/admin',
              name: 'admin',
              component: Admin,
              meta: {
                  requiresAuth: true,
                  is_admin: true
              }
          },
      ],
  })
  
  router.beforeEach((to, from, next) => {
      if (to.matched.some(record => record.meta.requiresAuth)) {
          if (localStorage.getItem('activityStore.jwt') == null) {
              next({
                  path: '/login',
                  params: { nextUrl: to.fullPath }
              })
          } else {
              let user = JSON.parse(localStorage.getItem('activityStore.user'))
              if (to.matched.some(record => record.meta.is_admin)) {
                  if (user.is_admin == 1) {
                      next()
                  }
                  else {
                      next({ name: 'userboard' })
                  }
              }
              else if (to.matched.some(record => record.meta.is_user)) {
                  if (user.is_admin == 0) {
                      next()
                  }
                  else {
                      next({ name: 'admin' })
                  }
              }
              next()
          }
      } else {
          next()
      }
  })
  const app = new Vue({
      el: '#app',
      components: { App },
      router,
  });
  