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hG,IAGhD,GAAGiG,EAAS,IAAI9R,EAAS8R,EAAQvG,EAClC,CAEA,IADGqG,GAA4BA,EAA2BhmB,GACrD8G,EAAIyZ,EAASnjB,OAAQ0J,IACzBwa,EAAUf,EAASzZ,GAChB6Y,EAAoBC,EAAE6F,EAAiBnE,IAAYmE,EAAgBnE,IACrEmE,EAAgBnE,GAAS,KAE1BmE,EAAgBnE,GAAW,EAE5B,OAAO3B,EAAoBW,EAAElM,EAC9B,EAEIgS,EAAqBC,KAAK,+BAAiCA,KAAK,gCAAkC,GACtGD,EAAmBppB,QAAQ+oB,EAAqBrC,KAAK,KAAM,IAC3D0C,EAAmBhgB,KAAO2f,EAAqBrC,KAAK,KAAM0C,EAAmBhgB,KAAKsd,KAAK0C,G,ICpFvF,IAAIE,EAAsB3G,EAAoBW,OAAE9iB,EAAW,CAAC,MAAM,WAAa,OAAOmiB,EAAoB,KAAO,IACjH2G,EAAsB3G,EAAoBW,EAAEgG,E","sources":["webpack://travelviewer-ui/./src/env.ts","webpack://travelviewer-ui/./src/flavor/utils.ts","webpack://travelviewer-ui/./src/flavor/index.ts","webpack://travelviewer-ui/./src/flavor/types.ts","webpack://travelviewer-ui/./src/i18n.ts","webpack://travelviewer-ui/./src/App.vue","webpack://travelviewer-ui/./src/App.vue?38a5","webpack://travelviewer-ui/./src/App.vue?892f","webpack://travelviewer-ui/./src/App.vue?0e40","webpack://travelviewer-ui/./src/api/auth_utils.ts","webpack://travelviewer-ui/./src/api/mode.ts","webpack://travelviewer-ui/./src/api/activity.ts","webpack://travelviewer-ui/./src/api/sample.ts","webpack://travelviewer-ui/./src/api/query.ts","webpack://travelviewer-ui/./src/api/index.ts","webpack://travelviewer-ui/./src/store/modules/user/index.ts","webpack://travelviewer-ui/./src/store/modules/survey/index.ts","webpack://travelviewer-ui/./src/store/modules/sample/index.ts","webpack://travelviewer-ui/./src/store/modules/mode-activity/index.ts","webpack://travelviewer-ui/./src/store/modules/questionnaire/index.ts","webpack://travelviewer-ui/./src/store/modules/home-area/index.ts","webpack://travelviewer-ui/./src/store/modules/filter/index.ts","webpack://travelviewer-ui/./src/store/modules/result-board/index.ts","webpack://travelviewer-ui/./src/store/modules/query/index.ts","webpack://travelviewer-ui/./src/store/modules/query-settings/index.ts","webpack://travelviewer-ui/./src/store/actions.ts","webpack://travelviewer-ui/./src/store/index.ts","webpack://travelviewer-ui/./src/router/index.ts","webpack://travelviewer-ui/./src/main.ts","webpack://travelviewer-ui/./src/store/modules/query/types.ts","webpack://travelviewer-ui/./src/store/modules/result-board/types.ts","webpack://travelviewer-ui/./src/store/modules/survey/types.ts","webpack://travelviewer-ui/./src/utils/I18nLabel.ts","webpack://travelviewer-ui/./src/utils/dateHelpers.ts","webpack://travelviewer-ui/./src/utils/feature.ts","webpack://travelviewer-ui/./src/utils/log.ts","webpack://travelviewer-ui/./src/utils/maAggregate.ts","webpack://travelviewer-ui/./src/utils/palette.ts","webpack://travelviewer-ui/./node_modules/moment/locale/ sync ^\\.\\/.*$","webpack://travelviewer-ui/./src/locales/ sync [A-Za-z0-9-_,\\s]+\\.json$/","webpack://travelviewer-ui/webpack/bootstrap","webpack://travelviewer-ui/webpack/runtime/chunk loaded","webpack://travelviewer-ui/webpack/runtime/compat get default export","webpack://travelviewer-ui/webpack/runtime/define property getters","webpack://travelviewer-ui/webpack/runtime/ensure chunk","webpack://travelviewer-ui/webpack/runtime/get javascript chunk filename","webpack://travelviewer-ui/webpack/runtime/get mini-css chunk filename","webpack://travelviewer-ui/webpack/runtime/global","webpack://travelviewer-ui/webpack/runtime/hasOwnProperty shorthand","webpack://travelviewer-ui/webpack/runtime/load script","webpack://travelviewer-ui/webpack/runtime/make namespace object","webpack://travelviewer-ui/webpack/runtime/node module decorator","webpack://travelviewer-ui/webpack/runtime/publicPath","webpack://travelviewer-ui/webpack/runtime/css loading","webpack://travelviewer-ui/webpack/runtime/jsonp chunk loading","webpack://travelviewer-ui/webpack/startup"],"sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const apiUrl = `${process.env.VUE_APP_API}`;\n","import { AppFlavor } from '@/store/modules/survey/types';\nimport { Flavor, FlavorData } from './types';\n\n/**\n * Parses viewer flavor string to Flavor enum. Returns null if no\n * match is found.\n * @param str The string to parse\n * @returns Flavor or null\n */\nexport function parseFlavorStr(str : string): Flavor|null {\n if (str.toLocaleLowerCase() === Flavor.travelViewer.toLocaleLowerCase()) {\n return Flavor.travelViewer;\n } else if (str.toLocaleLowerCase() === Flavor.activeViewer.toLocaleLowerCase()) {\n return Flavor.activeViewer;\n } else {\n return null;\n }\n}\n\n/**\n * Factory function that builds the flavor data for\n * a given Flavor.\n * @param flavor\n */\nexport function getFlavorData(flavor : Flavor): FlavorData|null {\n switch (flavor) {\n case Flavor.travelViewer:\n return {\n id: Flavor.travelViewer,\n name: 'TravelViewer',\n appFlavor: AppFlavor.travelvu,\n supportUrl: 'mailto:travelviewer-support@travelvu.app',\n appSupportUrl: 'https://support.travelvu.app',\n } as FlavorData;\n case Flavor.activeViewer:\n return {\n id: Flavor.activeViewer,\n name: 'ActiveViewer',\n appFlavor: AppFlavor.activeTravel,\n supportUrl: 'mailto:travelviewer-support@travelvu.app',\n appSupportUrl: 'https://support.travelvu.app',\n } as FlavorData;\n default:\n return null;\n }\n}\n","import { Flavor, FlavorData } from './types';\nimport { getFlavorData, parseFlavorStr } from './utils';\n\n// Get flavor from VUE_APP_FLAVOR,\n// parse it and throw exception if invalid.\nconst vueAppFlavor = process.env.VUE_APP_FLAVOR;\nconst flavorOrNull = parseFlavorStr(vueAppFlavor ?? '');\n\nif (flavorOrNull === null) {\n throw Error('Invalid VUE_APP_FLAVOR env parameter. Only \"travelviewer\" or \"activeviewer\" is accepted');\n}\nconst flavorDataOrNull = getFlavorData(flavorOrNull);\nif (flavorDataOrNull === null) {\n throw Error('Invalid flavor');\n}\n\n// Then expose non-null Flavor and FlavorData\n\n/** Flavor of this build of travelviewer-ui */\nexport const flavor:Flavor = flavorOrNull!;\n\n/** Describes the runtime viewer flavor. */\nexport const flavorData:FlavorData = flavorDataOrNull!;\n","import { AppFlavor } from '@/store/modules/survey/types';\n\n/**\n * flavor of travelviewer-ui instance\n */\nexport enum Flavor {\n travelViewer = 'travelviewer',\n activeViewer = 'activeviewer',\n}\n\nexport interface FlavorData {\n id: Flavor;\n name: string;\n appFlavor: AppFlavor;\n supportUrl: string;\n appSupportUrl: string;\n}\n","import Vue from 'vue';\nimport VueI18n, { LocaleMessages } from 'vue-i18n';\nimport { flavor } from './flavor';\nimport { Flavor } from './flavor/types';\n\nVue.use(VueI18n);\n\nfunction loadLocaleMessages(): LocaleMessages {\n if (typeof jest !== 'undefined') {\n // Testing environment\n return {};\n }\n\n const locales = require.context('./locales', true, /[A-Za-z0-9-_,\\s]+\\.json$/i);\n const messages: LocaleMessages = {};\n locales.keys().forEach((key) => {\n const matched = key.match(/([A-Za-z0-9-_]+)\\./i);\n if (matched && matched.length > 1) {\n const locale = matched[1];\n const localeMessages = locales(key);\n\n // There is no point of maintaining duplicate translations that only differ on appName or viewerName.\n // Until we need to inform about the other flavor, we can str-replace brand names.\n //\n // It would be better if this could be done at build-time, but for now the string count is not\n // very high.\n if (flavor === Flavor.activeViewer) {\n Object.keys(localeMessages).forEach((key: string) => {\n if (localeMessages[key] !== null && localeMessages[key] !== undefined) {\n localeMessages[key] = localeMessages[key].replaceAll('TravelViewer', 'ActiveViewer');\n localeMessages[key] = localeMessages[key].replaceAll('TravelVu', 'ActiveTravel');\n }\n });\n }\n\n messages[locale] = localeMessages;\n }\n });\n return messages;\n}\n\nfunction getDefaultLanguage(messages : any) : string {\n // Default language => try to detect user language but fallback to english if unknown\n let defaultLang = navigator.language || (navigator as any).userLanguage;\n if (typeof defaultLang === 'string') {\n defaultLang = defaultLang.substring(0, 2); // eg. sv-SE, en-US. => 'sv', 'en'\n }\n // Norway have two languages Nynorsk and Bokmål with codes nn-NO and nb-NO.\n // Change both to 'no' which is what we use in TravelVu for our single Norwegian\n // language.\n if (['nn', 'nb'].indexOf(defaultLang) !== -1) {\n defaultLang = 'no';\n }\n\n if (messages[defaultLang] === undefined) {\n // Fallback to English if user have a non-supported language on their phone\n defaultLang = 'en';\n }\n\n return defaultLang;\n}\n\nconst messages = loadLocaleMessages();\n\nexport default new VueI18n({\n locale: process.env.VUE_APP_I18N_LOCALE || getDefaultLanguage(messages) || 'en',\n fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',\n messages,\n});\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{attrs:{\"id\":\"app\"}},[_c('router-view')],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue';\nimport Component from 'vue-class-component';\nimport Chart from 'chart.js';\nimport ChartDataLabels from 'chartjs-plugin-datalabels';\n\n@Component({\n components: {},\n})\nexport default class App extends Vue {\n /* eslint class-methods-use-this: [\"off\"] */\n mounted() {\n // Register ChartDataLabels. Documentation of it says\n // that it is enough to import it and it will auto register,\n // but in practice, it seems we need to register it like this:\n Chart.plugins.register(ChartDataLabels);\n Chart.defaults.global.defaultFontFamily = '\"Work Sans\"';\n }\n}\n","import mod from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=68c0348d&\"\nimport script from \"./App.vue?vue&type=script&lang=ts&\"\nexport * from \"./App.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=68c0348d&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/@vue/vue-loader-v15/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","import { AxiosRequestConfig } from 'axios';\n\nexport const foo = 'bar';\nexport function authHeaders(token: string = '') : AxiosRequestConfig {\n return {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n };\n}\n","import axios from 'axios';\nimport { Mode, AggregatedModeConfig } from '@/store/modules/mode-activity/types';\nimport { apiUrl } from '@/env';\nimport { authHeaders } from './auth_utils';\n\nexport default {\n async getModes(surveyId : number|null, token : string) {\n const config = authHeaders(token);\n if (surveyId !== null) {\n config.params = new URLSearchParams({\n surveyId: surveyId.toString(),\n });\n }\n return axios.get>(`${apiUrl}/v1/modes/list`, config);\n },\n// async setAggregatedModes(surveyId : number, aggregatedModes : AggregatedModeConfig) {\n// return axios.post(`${apiUrl}/v1/aggregated-mode`, {\n// surveyId,\n// aggregatedModes,\n// });\n// },\n// async getAggregatedModes(surveyId : number) {\n// const params = new URLSearchParams({\n// surveyId: surveyId.toString(),\n// });\n// return axios.get(`${apiUrl}/v1/aggregated-mode`, { params });\n// },\n};\n","import axios from 'axios';\nimport { Activity, AggregatedActivityConfig } from '@/store/modules/mode-activity/types';\nimport { apiUrl } from '@/env';\nimport { authHeaders } from './auth_utils';\n\nexport default {\n async getActivities(surveyId : number|null, token : string) {\n const config = authHeaders(token);\n if (surveyId !== null) {\n config.params = new URLSearchParams({\n surveyId: surveyId.toString(),\n });\n }\n return axios.get>(`${apiUrl}/v1/activities/list`, config);\n },\n// async setAggregatedActivities(\n// surveyId : number, aggregatedActivities : AggregatedActivityConfig,\n// ) {\n// return axios.post(`${apiUrl}/v1/aggregated-activitiy`, {\n// surveyId,\n// aggregatedActivities,\n// });\n// },\n// async getAggregatedActivities(surveyId : number) {\n// const params = new URLSearchParams({\n// surveyId: surveyId.toString(),\n// });\n// return axios.get(`${apiUrl}/v1/aggregated-activity`, { params });\n// },\n};\n","import axios, { AxiosResponse, AxiosRequestConfig } from 'axios';\nimport { SampleVariable, SampleClass } from '@/store/modules/sample/types';\nimport { apiUrl } from '@/env';\nimport { HomeArea } from '@/store/modules/home-area/types';\nimport { authHeaders } from './auth_utils';\n\n/* eslint arrow-body-style: \"off\" */\n\nexport default {\n async getSampleVariables(\n surveyId : number,\n token : string,\n ) : Promise>> {\n const config : AxiosRequestConfig = authHeaders(token);\n config.params = new URLSearchParams({\n surveyId: surveyId.toString(),\n });\n return axios.get>(`${apiUrl}/v1/sample/sample-variables`, config);\n // return axios.get>('sample-api-mock-data.json', config);\n },\n async setTargetPopulation(surveyId : number, variables : Array, token : string) {\n const data = {\n surveyId,\n variables: variables.map((variable : SampleVariable) => {\n return {\n id: variable.id,\n classes: variable.classes.map((cls : SampleClass) => {\n return {\n id: cls.id,\n targetPopulation: cls.targetPopulation,\n };\n }),\n };\n }),\n };\n\n return axios.put(`${apiUrl}/v1/sample/set-target-population`, data, authHeaders(token));\n },\n async setWeightOn(surveyId : number, variables : Array, token : string) {\n const data = {\n surveyId,\n variables: variables.map((variable : SampleVariable) => {\n return {\n id: variable.id,\n weightOn: variable.weightOn,\n };\n }),\n };\n\n return axios.put(`${apiUrl}/v1/sample/set-weight-on`, data, authHeaders(token));\n },\n async createVariables(surveyId : number, variables : Array, token : string) {\n const data = {\n surveyId,\n variables,\n };\n return axios.put(`${apiUrl}/v1/sample/create-variables`, data, authHeaders(token));\n },\n async updateVariables(surveyId : number, variables : Array, token : string) {\n const data = {\n surveyId,\n variables,\n };\n return axios.put(`${apiUrl}/v1/sample/update-variables`, data, authHeaders(token));\n },\n async deleteVariables(surveyId : number, variableIds : Array, token : string) {\n const data = {\n surveyId,\n variables: variableIds.map((variableId : number) => {\n return {\n id: variableId,\n };\n }),\n };\n return axios.put(`${apiUrl}/v1/sample/delete-variables`, data, authHeaders(token));\n },\n async getHomeAreas(surveyId : number, token : string) {\n const config : AxiosRequestConfig = authHeaders(token);\n config.params = new URLSearchParams({\n surveyId: surveyId.toString(),\n });\n return axios.get>(`${apiUrl}/v1/sample/home-areas`, config);\n },\n};\n","import axios, { AxiosResponse, CancelToken, AxiosRequestConfig } from 'axios';\nimport { Query, QueryResult, ResultQueryPromise } from '@/store/modules/query/types';\nimport { apiUrl } from '@/env';\nimport { authHeaders } from './auth_utils';\n\nexport default {\n async resultQuery(\n query: Query,\n token: string,\n cancelToken: CancelToken|undefined = undefined,\n ) : ResultQueryPromise {\n const config : AxiosRequestConfig = authHeaders(token);\n config.cancelToken = cancelToken;\n return axios.post(`${apiUrl}/v1/result-query`, query, config);\n },\n};\n","import axios, { AxiosPromise, AxiosResponse, AxiosRequestConfig } from 'axios';\nimport { User } from '@/store/modules/user/types';\nimport { Survey } from '@/store/modules/survey/types';\nimport { Questionnaire } from '@/store/modules/questionnaire/types';\nimport { apiUrl } from '@/env';\nimport modeApi from './mode';\nimport activityApi from './activity';\nimport sampleApi from './sample';\nimport queryApi from './query';\nimport { authHeaders } from './auth_utils';\n\nexport const foo = 'bar';\nexport const api = {\n async login(username: string, password: string) {\n const params = new URLSearchParams({\n username,\n password,\n });\n return axios.post(`${apiUrl}/v1/login`, params);\n },\n async getMe(token: string) {\n return axios.get(`${apiUrl}/v1/users/me`, authHeaders(token));\n },\n async getSurveyList(token: string) : Promise>> {\n return axios.get>(`${apiUrl}/v1/surveys/list`, authHeaders(token));\n },\n async getSurveyDetails(surveyId : number, token: string) : Promise> {\n const config : AxiosRequestConfig = authHeaders(token);\n config.params = { surveyId };\n return axios.get(`${apiUrl}/v1/surveys/details`, config);\n },\n async getQuestionnaires(surveyId : number, token: string) : Promise>> {\n const config : AxiosRequestConfig = authHeaders(token);\n config.params = { surveyId };\n return axios.get>(`${apiUrl}/v1/questionnaires/list/`, config);\n },\n ...modeApi,\n ...activityApi,\n ...sampleApi,\n ...queryApi,\n};\n","import { ActionContext } from 'vuex';\nimport { api } from '@/api';\nimport timeout from '@/utils/timeout';\nimport { RootState } from '../../root-state';\nimport { User, UserStateInterface } from './types';\n\ninterface LoginParams {\n username: string;\n password: string;\n}\n\ntype Context = ActionContext;\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: {\n user: null,\n token: '',\n isLoggedIn: false,\n },\n mutations: {\n /** Private. Set user data in store */\n setUser(state: UserStateInterface, user: User) {\n state.user = user;\n },\n /** Private. Set token in store */\n setToken(state: UserStateInterface, token: string) {\n state.token = token;\n },\n /** Private. Set isLoggedIn in store */\n setLoggedIn(state: UserStateInterface, loggedIn: boolean) {\n state.isLoggedIn = loggedIn;\n },\n },\n getters: {\n /** Check if user is logged in */\n isLoggedIn: (state: UserStateInterface) : boolean => state.isLoggedIn,\n },\n actions: {\n /** Try to login user using provided username and password. */\n async login(\n context: Context,\n { username, password }: LoginParams,\n ) {\n if (process.env.VUE_APP_NO_SERVER === '1') {\n console.log('Skip server login');\n console.log('Simulate waiting on server');\n await timeout(900);\n context.commit('setLoggedIn', true);\n context.commit('setUser', {\n username,\n });\n return;\n }\n\n try {\n const response = await api.login(username, password);\n const token = response.data.access_token;\n if (token) {\n localStorage.setItem('token', token);\n context.commit('setToken', token);\n // Server should respond with username in getProfile, but a bug in the server\n // causes it to respond with null. (see issue #8 of API server)\n context.commit('setUser', {\n username,\n });\n await context.dispatch('getProfile');\n } else {\n // Log.log('No token');\n context.dispatch('logout');\n }\n } catch (error) {\n // Log.log(error);\n context.dispatch('logout');\n throw error;\n }\n },\n /** Logout user */\n async logout(context: Context) {\n // Log.log('logout');\n await context.dispatch('removeLogin');\n context.commit('setUser', null);\n },\n /** private helper action that remove the login data */\n async removeLogin(context: Context) {\n // Log.log('removeLogin', context);\n context.commit('setToken', '');\n context.commit('setLoggedIn', false);\n localStorage.removeItem('token');\n localStorage.removeItem('selectedSurveyId');\n localStorage.removeItem('filter');\n localStorage.removeItem('querySettings');\n },\n /** Fetches user data and update user state. */\n async getProfile(context: Context) {\n /* eslint no-useless-catch: [\"off\"] */\n try {\n const response = await api.getMe(context.state.token);\n // Log.log(response);\n if (response.data) {\n // Server should respond with username, but a bug in the server\n // causes it to respond with null. (see issue #8 of API server)\n if (response.data.username === null && context.state.user !== null) {\n response.data.username = context.state.user.username;\n }\n context.commit('setUser', response.data);\n }\n } catch (error) {\n throw error;\n }\n },\n async checkLoggedIn(context: Context) {\n // Log.log('checkLoggedIn');\n if (!context.state.isLoggedIn) {\n let { token } = context.state;\n if (!token) {\n const localToken = localStorage.getItem('token');\n if (localToken) {\n context.commit('setToken', localToken);\n token = localToken;\n }\n }\n if (token) {\n try {\n const response = await api.getMe(token);\n context.commit('setLoggedIn', true);\n // Server should respond with username, but a bug in the server\n // causes it to respond with null. (see issue #8 of API server)\n if (response.data.username === null && context.state.user !== null) {\n response.data.username = context.state.user.username;\n }\n context.commit('setUser', response.data);\n } catch (error) {\n await context.dispatch('removeLogin');\n }\n } else {\n await context.dispatch('removeLogin');\n }\n }\n },\n },\n};\n","/**\n * Contains a list of surveys that the user has access to and\n * selection of one of the surveys to use for analysis.\n */\n\n// import store from '.';\nimport { ActionContext } from 'vuex';\nimport { api } from '@/api';\nimport { flavor, flavorData } from '@/flavor';\nimport { Flavor } from '@/flavor/types';\nimport { RootState } from '../../root-state';\nimport { AppFlavor, Survey, SurveyStateInterface } from './types';\n\ninterface LoadDetailsParams {\n surveyId: number;\n}\n\nexport default {\n namespaced: true,\n state: {\n surveyList: [],\n selectedSurvey: -1,\n },\n mutations: {\n clear(state:SurveyStateInterface) {\n state.surveyList = [];\n state.selectedSurvey = -1;\n },\n // Pass id: -1 to unset\n selectSurvey(state:SurveyStateInterface, id:number) {\n const index = state.surveyList.findIndex((s) => s.id === id);\n state.selectedSurvey = index;\n },\n // Private. Use load action\n setSurveyList(state:SurveyStateInterface, surveyList : Array) {\n // TODO: perserve selectedSurvey\n state.surveyList = surveyList;\n state.selectedSurvey = -1;\n },\n },\n actions: {\n load(context:ActionContext) {\n return new Promise(async (resolve, reject) => {\n if (process.env.VUE_APP_NO_SERVER === '1') {\n if (flavor === Flavor.travelViewer) {\n context.commit('setSurveyList', [\n {\n id: 1,\n appFlavor: AppFlavor.travelvu,\n label: 'RVU Sundsvall',\n description: 'Undersökning bland dagbefolkningen i Sundsvalls tätort',\n startDate: '2019-05-01',\n endDate: '2019-05-15',\n participateCountAllTime: 578,\n correctedDayInSurveyCount: 1481,\n },\n {\n id: 2,\n appFlavor: AppFlavor.travelvu,\n label: 'RVU Östersund',\n description: 'Undersökning bland invånare i Östersunds kommun',\n startDate: '2019-05-08',\n endDate: '2019-05-22',\n participateCountAllTime: 323,\n correctedDayInSurveyCount: 702,\n },\n {\n id: 13,\n appFlavor: AppFlavor.travelvu,\n label: 'Donate Data',\n description: 'Donate your data to TravelVu',\n startDate: null,\n endDate: null,\n participateCountAllTime: 2050,\n correctedDayInSurveyCount: 1481,\n },\n ]);\n } else {\n context.commit('setSurveyList', [\n {\n id: 3,\n appFlavor: AppFlavor.activeTravel,\n label: 'Bolaget',\n description: 'Kampanj för Bolaget',\n startDate: '2019-05-01',\n endDate: '2019-05-15',\n participateCountAllTime: 73,\n correctedDayInSurveyCount: 148,\n },\n {\n id: 97,\n appFlavor: AppFlavor.activeTravel,\n label: 'Test ActiveTravel',\n description: 'Use this survey to test ActiveTravel',\n startDate: null,\n endDate: null,\n participateCountAllTime: 250,\n correctedDayInSurveyCount: 181,\n },\n ]);\n }\n } else {\n try {\n const response = await api.getSurveyList(context.rootState.user.token);\n let surveys = response.data;\n\n // Only show ActiveTravel surveys in ActiveViewer, but show surveys from\n // both apps in TravelViewer.\n surveys = surveys.filter(\n (s: Survey) => flavor === Flavor.travelViewer || s.appFlavor === flavorData.appFlavor,\n );\n\n surveys.sort((a: Survey, b : Survey) => {\n if (a.id === b.id) return 0;\n // 1. by start date\n if (a.startDate !== null && b.startDate !== null) {\n if (a.startDate < b.startDate) return 1;\n if (a.startDate > b.startDate) return -1;\n }\n if ((a.startDate === null) !== (b.startDate === null)) {\n if (a.startDate === null) return -1;\n if (b.startDate === null) return 1;\n }\n // 2. by name\n if (a.label < b.label) return -1;\n if (a.label > b.label) return 1;\n return 0;\n });\n context.commit('setSurveyList', surveys);\n } catch (error) {\n const e: any = error;\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n reject();\n }\n }\n resolve();\n });\n },\n /**\n * loads details for one surevyId\n *\n * Store is updated with details and details is also returned.\n */\n loadDetails(\n context:ActionContext,\n payload : LoadDetailsParams,\n ) {\n return new Promise(async (resolve, reject) => {\n try {\n const response = await api.getSurveyDetails(\n payload.surveyId, context.rootState.user.token,\n );\n const survey = context.state.surveyList.find((s : Survey) => s.id === payload.surveyId);\n if (survey !== undefined) {\n survey.correctedDayInSurveyCount = response.data.correctedDayInSurveyCount;\n survey.participateCountAllTime = response.data.participateCountAllTime;\n }\n resolve( response.data);\n } catch (e) {\n reject();\n }\n });\n },\n clear(context:ActionContext) {\n },\n },\n getters: {\n getAll(state:SurveyStateInterface) : Array {\n return state.surveyList;\n },\n getSelected(state:SurveyStateInterface) : Survey|null {\n return state.surveyList[state.selectedSurvey] !== undefined\n ? state.surveyList[state.selectedSurvey] : null;\n },\n },\n};\n","import { ActionContext } from 'vuex';\nimport resolveLabel from '@/utils/I18nLabel';\nimport { api } from '@/api';\nimport { loadOfflineSampleVariables } from '@/store/offline-data/load';\nimport timeout from '@/utils/timeout';\nimport { SampleClass, SampleVariable, SampleStateInterface } from './types';\nimport { RootState } from '../../root-state';\n\nfunction getVariableExpandedStorageKey(variable : SampleVariable) : string {\n return `sample.variable[${variable.id}].isExpanded`;\n}\n\nexport interface SetTargetPopulationParams {\n variableId: number;\n classId: number;\n targetPopulation: number|null;\n}\n\nexport default {\n namespaced: true,\n state: {\n variables: [],\n loadError: false,\n },\n mutations: {\n clear(state:SampleStateInterface) {\n state.variables = [];\n state.loadError = false;\n },\n // Private. Use load, setWeightOn, setTargetPopulation action\n setVariables(state:SampleStateInterface, rows : Array) {\n state.variables = rows;\n },\n // Private. Use load\n setLoadError(state:SampleStateInterface, loadError : boolean) {\n state.loadError = loadError;\n },\n setIsExpanded(state:SampleStateInterface,\n payload: {variableId : number, isExpanded : boolean}) {\n // ---\n const row = state.variables.find((r : SampleVariable) => r.id === payload.variableId);\n if (row !== undefined) {\n row.isExpanded = payload.isExpanded;\n // Persist in localStorage too\n const storeKey = getVariableExpandedStorageKey(row);\n window.localStorage.setItem(storeKey, JSON.stringify(payload.isExpanded !== false));\n }\n },\n },\n actions: {\n setWeightOn(context:ActionContext,\n payload: {variableId : number, weightOn : boolean}) {\n return new Promise(async (resolve, reject) => {\n // ---\n const variables = [...context.state.variables];\n const row = variables.find((r : SampleVariable) => r.id === payload.variableId);\n if (row !== undefined) {\n const oldValue = row.weightOn;\n row.weightOn = payload.weightOn;\n context.commit('setVariables', variables);\n // When there is no server => assign random weights\n if (process.env.VUE_APP_NO_SERVER === '1') {\n await context.dispatch('randomWeigthedSample');\n }\n // Store to server\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n await api.setWeightOn(survey.id, variables, context.rootState.user.token);\n } catch (e: any) {\n // Restore to old value - hopefully there are not multiple failing toggle requests.\n row.weightOn = oldValue;\n context.commit('setVariables', variables);\n\n if (e.response !== undefined) {\n reject(e.response.status);\n } else {\n reject();\n }\n return;\n }\n }\n }\n resolve();\n });\n },\n /**\n * Set target population of one or more variable classes.\n * @param context\n * @param payload List of variable+class to set target poplation for\n */\n setTargetPopulation(context:ActionContext,\n payload: SetTargetPopulationParams[]) {\n return new Promise(async (resolve, reject) => {\n // ---\n let rejected = false;\n payload.forEach(async (clsParams : SetTargetPopulationParams) => {\n const variables = [...context.state.variables];\n const row = variables.find((r : SampleVariable) => r.id === clsParams.variableId);\n if (row !== undefined) {\n const cls = row.classes.find((c : SampleClass) => c.id === clsParams.classId);\n if (cls !== undefined) {\n const oldValue = cls.targetPopulation;\n cls.targetPopulation = clsParams.targetPopulation;\n context.commit('setVariables', variables);\n // When there is no server => assign random weights\n if (process.env.VUE_APP_NO_SERVER === '1') {\n await context.dispatch('randomWeigthedSample');\n }\n // Store to server\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n await api.setTargetPopulation(survey.id, variables, context.rootState.user.token);\n } catch (e: any) {\n // Restore to old value - hopefully there are not multiple failing requests\n cls.targetPopulation = oldValue;\n context.commit('setVariables', variables);\n\n if (e.response !== undefined) {\n reject(e.response.status);\n } else {\n reject();\n }\n rejected = true;\n }\n }\n }\n }\n });\n if (!rejected) {\n resolve();\n }\n });\n },\n addVariable(context:ActionContext,\n payload: SampleVariable) {\n return new Promise(async (resolve, reject) => {\n let rejected = false;\n const oldVariables = [...context.state.variables];\n const variables = [...context.state.variables];\n variables.push(payload);\n context.commit('setVariables', variables);\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n await api.createVariables(survey.id, [\n payload,\n ], context.rootState.user.token);\n await context.dispatch('load'); // obtain id\n } catch (e: any) {\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n // Restore to old value - hopefully there are not multiple failing requests\n context.commit('setVariables', oldVariables);\n\n if (e.response !== undefined) {\n reject(e.response.status);\n } else {\n reject();\n }\n rejected = true;\n }\n }\n if (!rejected) {\n resolve();\n }\n });\n },\n updateVariable(context:ActionContext,\n payload: SampleVariable) {\n return new Promise(async (resolve, reject) => {\n let rejected = false;\n const oldVariables = [...context.state.variables];\n const variables = [...context.state.variables];\n const rowIndex = variables.findIndex((r : SampleVariable) => r.id === payload.id);\n if (rowIndex === -1) {\n reject();\n return;\n }\n variables[rowIndex] = payload;\n context.commit('setVariables', variables);\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n await api.updateVariables(survey.id, [\n payload,\n ], context.rootState.user.token);\n await context.dispatch('load'); // obtain ids in case classes was added\n } catch (e: any) {\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n // Restore to old value - hopefully there are not multiple failing requests\n context.commit('setVariables', oldVariables);\n\n if (e.response !== undefined) {\n reject(e.response.status);\n } else {\n reject();\n }\n rejected = true;\n }\n }\n if (!rejected) {\n resolve();\n }\n });\n },\n deleteVariable(context:ActionContext,\n variableId: number) {\n return new Promise(async (resolve, reject) => {\n let rejected = false;\n const oldVariables = [...context.state.variables];\n const variables = [...context.state.variables];\n const rowIndex = variables.findIndex((r : SampleVariable) => r.id === variableId);\n if (rowIndex === -1) {\n reject();\n return;\n }\n variables.splice(rowIndex, 1);\n context.commit('setVariables', variables);\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n await api.deleteVariables(survey.id, [\n variableId,\n ], context.rootState.user.token);\n } catch (e: any) {\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n // Restore to old value - hopefully there are not multiple failing requests\n context.commit('setVariables', oldVariables);\n\n if (e.response !== undefined) {\n reject(e.response.status);\n } else {\n reject();\n }\n rejected = true;\n }\n }\n if (!rejected) {\n resolve();\n }\n });\n },\n /* eslint-disable */\n load(context:ActionContext) {\n return new Promise(async (resolve, reject) => {\n // Don't clear before load because Weighting view will\n // perform load to update the weighted sample column.\n\n // but if we did load with an error but there is no data,\n // reset loadError => show spinner when trying again to load.\n if (context.state.variables.length === 0) {\n context.commit('setLoadError', false);\n }\n\n let variables : Array = [];\n\n if (process.env.VUE_APP_NO_SERVER === '1') {\n console.log('Simulate waiting on server');\n await timeout(1000);\n variables = loadOfflineSampleVariables();\n } else {\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n const response = await api.getSampleVariables(\n survey.id, context.rootState.user.token,\n );\n const s2 = context.rootGetters['survey/getSelected'];\n if (s2 === null || s2.id !== survey.id) {\n console.log('User changed survey while loading sample data => abort')\n reject();\n return;\n }\n variables = response.data;\n } catch (e: any) {\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n context.commit('setLoadError', true);\n reject();\n return;\n }\n } else {\n console.error('sampleVariable/load: survey/getSelected is null');\n context.commit('setLoadError', true);\n reject();\n return;\n }\n }\n\n // Resolve label strings\n for (let i = 0; i < variables.length; i += 1) {\n variables[i].label = resolveLabel(variables[i].label, variables[i].labelTranslations);\n for (let c = 0; c < variables[i].classes.length; c += 1) {\n variables[i].classes[c].label = resolveLabel(\n variables[i].classes[c].label, variables[i].classes[c].labelTranslations,\n );\n }\n }\n\n // Get expanded from localStorage\n for (let i = 0; i < variables.length; i += 1) {\n const storeKey = getVariableExpandedStorageKey(variables[i]);\n const storedValue = window.localStorage.getItem(storeKey);\n if (storedValue === null) {\n variables[i].isExpanded = true;\n window.localStorage.setItem(storeKey, JSON.stringify(true));\n } else {\n // bias towards expanded in case of type error\n variables[i].isExpanded = JSON.parse(storedValue) !== false;\n }\n }\n\n context.commit('setVariables', variables);\n if (process.env.VUE_APP_NO_SERVER === '1') {\n await context.dispatch('randomWeigthedSample');\n }\n resolve();\n });\n },\n // When there is no server, this method can be used to assign\n // some random weightedSample values.\n randomWeigthedSample(context:ActionContext) {\n const variables = [...context.state.variables];\n let allOk = true;\n for (let i = 0; i < variables.length; i += 1) {\n allOk = allOk && (!variables[i].weightOn\n || context.getters.isTargetPopulationSum1(variables[i].id));\n }\n for (let i = 0; i < variables.length; i += 1) {\n const variable = variables[i];\n const assignWeight = variable.weightOn && allOk;\n for (let c = 0; c < variable.classes.length; c += 1) {\n const cls = variable.classes[c];\n cls.weightedSample = assignWeight ? Math.random() : null;\n }\n }\n\n context.commit('setVariables', variables);\n },\n },\n getters: {\n /**\n * Checks if targetPopulation sums to 100% for given variable.\n * @param variableId Id of variable to check */\n isTargetPopulationSum1: (state:SampleStateInterface) => (variableId : number) : boolean => {\n const variable = state.variables.find((r : SampleVariable) => r.id === variableId);\n if (variable === undefined) {\n return false; // variable not found\n }\n\n let sum = 0;\n for (let i = 0; i < variable.classes.length; i += 1) {\n const c = variable.classes[i];\n if (c.targetPopulation !== null) {\n sum += c.targetPopulation;\n }\n }\n\n const sum1 = Math.abs(1.0 - sum) < 0.001;\n if (!sum1 && variable.isShare && variable.weightOn) {\n console.log(\n `total poplation sum for variable ${resolveLabel(variable.label, variable.labelTranslations)} is not 1. It is ${sum}`\n );\n }\n return sum1;\n },\n /**\n * Checks if variables have been loaded.\n *\n * It makes an assumption that any loaded state have at\n * least one variable. This is safe as there is one variable\n * that count number of participants and should exist for\n * all surveys.\n */\n isLoaded: (state:SampleStateInterface) => state.variables.length > 0,\n isLoadError: (state:SampleStateInterface) => state.loadError,\n },\n};\n","import { ActionContext } from 'vuex';\nimport { loadOfflineModes, loadOfflineActivities } from '@/store/offline-data/load';\nimport { api } from '@/api';\nimport palette from '@/utils/palette';\nimport i18n from '@/i18n';\nimport {\n getMainAggregateActivities,\n getMainAggregateModes,\n getNoAggregateActivities,\n getNoAggregateModes,\n} from '@/utils/maAggregate';\nimport {\n Mode, Activity, AggregatedMode, AggregatedActivity, ModeActivityStateInterface, AggregatedModeConfig,\n} from './types';\nimport { RootState } from '../../root-state';\n\ntype Context = ActionContext;\n\nfunction flatLabelsToMap(maData : any) : any {\n const labelTranslations : any = {};\n\n Object.keys(maData).forEach((key) => {\n if (key.startsWith('label')) {\n const langKey : string = key.substring(5).toLowerCase();\n labelTranslations[langKey] = maData[key];\n }\n });\n\n return labelTranslations;\n}\n\nconst getters = {\n /**\n * Get mode by id\n * @param id Mode id\n * @return Mode or null if mode was not found\n */\n getMode: (state:ModeActivityStateInterface) => (id : string) : Mode|null => {\n const mode = state.modes.find((m : Mode) => m.id === id);\n if (mode === undefined) return null;\n return mode;\n },\n /**\n * Get activity by id\n * @param id Activity id\n * @return Activity or null if activity was not found\n */\n getActivity: (state:ModeActivityStateInterface) => (id : string) : Activity|null => {\n const activity = state.activities.find((a : Activity) => a.id === id);\n if (activity === undefined) return null;\n return activity;\n },\n\n /**\n * Get a map from mode id to color string using colors\n * from current aggregated modes.\n * @param\n * @returns object mapping from string to string\n */\n getModeColorMap: (state:ModeActivityStateInterface) : any => {\n const r: any = {};\n state.aggregatedModes.forEach((am: AggregatedMode) => {\n am.modeList.forEach((modeId) => {\n r[modeId] = {\n bgColor: am.bgColor,\n textColor: am.textColor,\n borderColor: am.borderColor,\n };\n });\n });\n return r;\n },\n\n /**\n * Get modes in current survey\n */\n /* eslint implicit-arrow-linebreak: [\"off\", {}}] */\n getSurveyModes: (state:ModeActivityStateInterface) => () : Array =>\n state.modes.filter((mode : Mode) => mode.inSurvey),\n\n /**\n * Get activities in current survey\n */\n /* eslint implicit-arrow-linebreak: [\"off\", {}}] */\n getSurveyActivities: (state:ModeActivityStateInterface) => () : Array =>\n state.activities.filter((activity : Activity) => activity.inSurvey),\n\n /**\n * Get aggregated modes exculding Exercice\n * @return array of aggregated modes\n */\n getAggregatedModesExcludingExercice: (state:ModeActivityStateInterface) : AggregatedModeConfig =>\n state.aggregatedModes.filter(\n (m) => m.modeList.length !== 1 || m.modeList[0] !== 'EXRC',\n ),\n\n aggregatedState: (state:ModeActivityStateInterface) => {\n let s = state.aggregatedModes.map((am) => {\n let amStr = `id:${am.id};`;\n amStr += `l:${JSON.stringify(am.labelTranslations)};`;\n amStr += `c:${am.bgColor},${am.textColor},${am.borderColor};`;\n amStr += `c:${am.order};`;\n amStr += `m:${am.modeList.join(',')};`;\n return amStr;\n }).join(',');\n s += state.aggregatedActivities.map((aa) => {\n let aaStr = `id:${aa.id};`;\n aaStr += `l:${JSON.stringify(aa.labelTranslations)};`;\n aaStr += `c:${aa.order};`;\n aaStr += `m:${aa.activityList.join(',')};`;\n return aaStr;\n }).join(',');\n return s;\n },\n};\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: {\n modes: [],\n activities: [],\n aggregatedModes: [],\n aggregatedActivities: [],\n },\n mutations: {\n clear(state:ModeActivityStateInterface) {\n state.modes = [];\n state.activities = [];\n state.aggregatedModes = [];\n state.aggregatedActivities = [];\n },\n /** Private. Set mode data in store */\n setModes(state: ModeActivityStateInterface, modes: Array) {\n state.modes = modes;\n },\n /** Private. Set activities data in store */\n setActivities(state: ModeActivityStateInterface, activities: Array) {\n state.activities = activities;\n },\n /** Set aggregated mode data in store */\n setAggregatedModes(state: ModeActivityStateInterface, am: Array) {\n state.aggregatedModes = am;\n },\n /** Set aggregated activity data in store */\n setAggregatedActivities(state: ModeActivityStateInterface, aa: Array) {\n state.aggregatedActivities = aa;\n },\n\n /** Creates a aggregate setup that just 1:1 mirrors available modes */\n noAggregateModes(state: ModeActivityStateInterface) {\n state.aggregatedModes = getNoAggregateModes(state.modes);\n },\n /** Creates a aggregate setup that just 1:1 mirrors available activities */\n noAggregateActivities(state: ModeActivityStateInterface) {\n state.aggregatedActivities = getNoAggregateActivities(state.activities);\n },\n /** A aggregate with a few main modes */\n mainAggregateModes(state: ModeActivityStateInterface) {\n state.aggregatedModes = getMainAggregateModes(state.modes);\n },\n /** A aggregate with a few main activities */\n mainAggregateActivities(state: ModeActivityStateInterface) {\n state.aggregatedActivities = getMainAggregateActivities(state.activities);\n },\n },\n actions: {\n /**\n * Load mode and activity data. Depends on current survey\n *\n * Rejects upon server error or no current selected survey.\n */\n load(context:Context) {\n return new Promise(async (resolve, reject) => {\n // Get modes + activities from remote/offline\n let remoteModes = [];\n let remoteActivities = [];\n let remoteSurveyModes : Array = [];\n let remoteSurveyActivities : Array = [];\n if (process.env.VUE_APP_NO_SERVER === '1') {\n remoteModes = loadOfflineModes();\n remoteActivities = loadOfflineActivities();\n remoteSurveyModes = remoteModes;\n remoteSurveyActivities = remoteActivities;\n } else {\n const survey = context.rootGetters['survey/getSelected'];\n if (survey === null) {\n reject(); // no survey\n return;\n }\n try {\n const sm = api.getModes(survey.id, context.rootState.user.token);\n const sa = api.getActivities(survey.id, context.rootState.user.token);\n const m = api.getModes(null, context.rootState.user.token);\n const a = api.getActivities(null, context.rootState.user.token);\n await Promise.all([\n sm,\n sa,\n m,\n a,\n ]).then(([sm, sa, m, a]) => {\n remoteSurveyModes = sm.data;\n remoteSurveyActivities = sa.data;\n remoteModes = m.data;\n remoteActivities = a.data;\n });\n } catch (e) {\n reject();\n return;\n }\n }\n\n // Transform data to local Mode/Activity def\n const modes = remoteModes.map((m : any) : Mode => {\n const mode = {\n id: m.id,\n order: m.order,\n labelTranslations: flatLabelsToMap(m),\n bgColor: m.bgColor,\n textColor: m.textColor,\n borderColor: m.borderColor,\n svgIconBgColor: '',\n svgIconBlack: '',\n inSurvey: remoteSurveyModes.find((value : any) => value.id === m.id) !== undefined,\n };\n return mode;\n }).filter((m : Mode) => ['NSET', 'NMOV'].indexOf(m.id) === -1);\n context.commit('setModes', modes);\n\n const activities = remoteActivities.map((a : any) : Activity => {\n const activity = {\n id: a.id,\n order: a.order,\n labelTranslations: flatLabelsToMap(a),\n svgIconBgColor: '',\n svgIconBlack: '',\n inSurvey: remoteSurveyActivities.find((value : any) => value.id === a.id) !== undefined,\n };\n return activity;\n }).filter((a : Activity) => ['NSET', 'NACT'].indexOf(a.id) === -1);\n context.commit('setActivities', activities);\n\n // Create aggeragate data that does not actually aggregate\n context.commit('noAggregateModes');\n context.commit('noAggregateActivities');\n\n resolve();\n });\n },\n },\n getters: {\n ...getters,\n },\n};\n","import { ActionContext } from 'vuex';\nimport { api } from '@/api';\nimport { RootState } from '../../root-state';\nimport {\n Question, AnswerOption,\n Questionnaire, QuestionnaireStateInterface,\n} from './types';\n\ntype Context = ActionContext;\n\n/**\n * For fetching questionnaires from server\n *\n * @note The data model here is an aggregated one where language-variants\n * are merged into one question/answerOption via keys.\n */\nexport default {\n namespaced: true,\n state: {\n questionnaires: [],\n loaded: false,\n },\n mutations: {\n setQuestionnaires(state : QuestionnaireStateInterface, questionnaires : Array) {\n state.questionnaires = questionnaires;\n state.loaded = true;\n },\n /**\n * Remove all questionnaires.\n */\n clear(state : QuestionnaireStateInterface, params : void) {\n state.questionnaires = [];\n state.loaded = false;\n },\n },\n actions: {\n load(context:ActionContext) {\n return new Promise(async (resolve, reject) => {\n context.commit('clear');\n\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n const response = await api.getQuestionnaires(survey.id, context.rootState.user.token);\n const s2 = context.rootGetters['survey/getSelected'];\n if (s2 === null || s2.id !== survey.id) {\n reject();\n return;\n }\n\n // Loaded\n context.commit('setQuestionnaires', response.data);\n resolve();\n } catch (e) {\n console.log('Failed to load questionnaires');\n reject();\n }\n } else {\n console.log('Cannot load questionnaires when no survey is selected');\n reject();\n }\n });\n },\n },\n getters: {\n },\n};\n","import { ActionContext } from 'vuex';\nimport { api } from '@/api';\nimport { RootState } from '../../root-state';\nimport { HomeArea, HomeAreaStateInterface } from './types';\n\ntype Context = ActionContext;\n\n/**\n * Home areas\n */\nexport default {\n namespaced: true,\n state: {\n homeAreas: [],\n loaded: false,\n },\n mutations: {\n setHomeAreas(state : HomeAreaStateInterface, homeAreas : Array) {\n state.homeAreas = homeAreas;\n state.loaded = true;\n },\n /**\n * Removes all home areas.\n */\n clear(state : HomeAreaStateInterface, params : void) {\n state.homeAreas = [];\n state.loaded = false;\n },\n },\n actions: {\n load(context:ActionContext) {\n return new Promise(async (resolve, reject) => {\n context.commit('clear');\n\n const survey = context.rootGetters['survey/getSelected'];\n if (survey !== null) {\n try {\n const response = await api.getHomeAreas(survey.id, context.rootState.user.token);\n const s2 = context.rootGetters['survey/getSelected'];\n if (s2 === null || s2.id !== survey.id) {\n reject();\n return;\n }\n\n // Loaded\n context.commit('setHomeAreas', response.data);\n resolve();\n } catch (e) {\n console.log('Failed to load home areas');\n reject();\n }\n } else {\n console.log('Cannot load home areas when no survey is selected');\n reject();\n }\n });\n },\n },\n getters: {\n },\n};\n","import { ActionContext } from 'vuex';\nimport { stringGetDayAfter } from '@/utils/dateHelpers';\nimport Log from '@/utils/log';\nimport { RootState } from '../../root-state';\nimport { FilterStateInterface } from './types';\nimport { AggregatedMode, AggregatedActivity } from '../mode-activity/types';\nimport { SampleVariable, SampleClass } from '../sample/types';\nimport { Survey } from '../survey/types';\n\nexport interface EnableAllParams {\n aggregatedModes: Array;\n aggregatedActivities: Array;\n sampleVariables : Array;\n surveyStartDate: string;\n surveyEndDate: string;\n}\n\nexport interface SetByIdParams {\n id: number;\n enabled: boolean;\n}\n\nexport interface SetSampleClassParams {\n variableId: number;\n classId: number;\n enabled: boolean;\n}\n\ntype Context = ActionContext;\n\nconst enabledClassesStateGetter = (state:FilterStateInterface) => {\n let s = '';\n Object.keys(state.sampleClassIds).forEach((k : string) => {\n const svId = parseInt(k, 10);\n s += `v${svId}:`;\n state.sampleClassIds[svId].forEach((cId : number) => {\n s += `${cId},`;\n });\n });\n return s;\n};\n\nfunction persist(state: FilterStateInterface) {\n localStorage.setItem('filter', JSON.stringify(state));\n}\n\n/* eslint no-underscore-dangle: [\"off\", {}}] */\n/* eslint prefer-template: [\"off\", {}}] */\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: {\n aggregatedModes: [],\n aggregatedActivities: [],\n sampleClassIds: {},\n startDate: '1990-01-01', // YYYY-MM-DD start date\n endDate: '1990-01-01', // YYYY-MM-DD end date\n startTime: 0, // seconds since 00:00. [0, 24*3600]\n endTime: 0, // seconds since 00:00. [0, 24*3600]\n dayOfWeek: [false, false, false, false, false, false, false],\n minDistanceM: null,\n maxDistanceM: null,\n minDurationS: null,\n maxDurationS: null,\n isCommuteToWork: null,\n _enabledClassesStr: '',\n },\n mutations: {\n /**\n * Unsafe setter (no typechecking or data validation)\n * @param filter Object with same names as state as keys.\n */\n setFilter(state: FilterStateInterface, filter: any) {\n Object.keys(state).forEach((key : string) => {\n if (filter[key] !== undefined\n && (state)[key] !== undefined\n && !key.startsWith('_')\n ) {\n const oldValue = (state)[key];\n (state)[key] = (filter)[key];\n\n if (key === 'aggregatedModes') {\n state.aggregatedModes.sort();\n } else if (key === 'aggregatedActivities') {\n state.aggregatedActivities.sort();\n } else if (key === 'sampleClassIds') {\n Object.keys(state.sampleClassIds).forEach((k : string) => {\n const svId = parseInt(k, 10);\n state.sampleClassIds[svId].sort();\n });\n // For variables that exist only in the old filter state, but\n // not in the new sampleClassIds assignment, retain the old\n // filter state. Purpose: so restore can default to enabled\n Object.keys(oldValue).forEach((k : string) => {\n const oldSvId = parseInt(k, 10);\n if (state.sampleClassIds[oldSvId] === undefined) {\n Log.log(`setFilter restore old sv class state for ${oldSvId}`);\n state.sampleClassIds[oldSvId] = oldValue[oldSvId];\n }\n });\n state._enabledClassesStr = enabledClassesStateGetter(state);\n }\n }\n });\n persist(state);\n },\n /**\n * Enable/disable one aggregated mode specified by id.\n * @param state\n * @param params\n */\n setAggregatedMode(state: FilterStateInterface, params: SetByIdParams) {\n if (params.enabled) {\n if (state.aggregatedModes.find((mId) => mId === params.id) !== undefined) {\n return;\n }\n state.aggregatedModes.push(params.id);\n // Sort is important to not create multiple filter/query states with different mode order\n state.aggregatedModes.sort();\n } else {\n const index = state.aggregatedModes.findIndex((mId) => mId === params.id);\n if (index !== -1) {\n state.aggregatedModes.splice(index, 1);\n }\n }\n persist(state);\n },\n /**\n * Enable/disable one aggregated activity specified by id.\n * @param state\n * @param params\n */\n setAggregatedActivity(state: FilterStateInterface, params: SetByIdParams) {\n if (params.enabled) {\n if (state.aggregatedActivities.find((aId) => aId === params.id) !== undefined) {\n return;\n }\n state.aggregatedActivities.push(params.id);\n state.aggregatedActivities.sort();\n } else {\n const index = state.aggregatedActivities.findIndex((aId) => aId === params.id);\n if (index !== -1) {\n state.aggregatedActivities.splice(index, 1);\n }\n }\n persist(state);\n },\n /**\n * Enable/disable one sample class specified by class and variable id\n * @param state\n * @param params\n */\n setAnswerOptionKeyId(state: FilterStateInterface, params: SetSampleClassParams) {\n if (params.enabled) {\n if (state.sampleClassIds[params.variableId] === undefined) {\n state.sampleClassIds[params.variableId] = {};\n }\n\n if (state.sampleClassIds[params.variableId].find(\n (classId : number) => classId === params.classId,\n ) === undefined) {\n // add class if it is missing\n state.sampleClassIds[params.variableId].push(params.classId);\n state.sampleClassIds[params.variableId].sort();\n }\n } else {\n if (state.sampleClassIds[params.variableId] === undefined) {\n return; // variable is complely missing - should maybe not happen\n }\n const index = state.sampleClassIds[params.variableId].findIndex(\n (classId : number) => classId === params.classId,\n );\n if (index !== -1) {\n state.sampleClassIds[params.variableId].splice(index, 1);\n state.sampleClassIds[params.variableId].sort();\n }\n // Don't remove the variable if all classes have been removed.\n // An omitted variable causes statistics engine to not filter\n // on the variable at all.\n }\n\n // Update _enabledClassesStr as filter state in object doesn't trigger\n // Vue change detection\n state._enabledClassesStr = enabledClassesStateGetter(state);\n\n persist(state);\n },\n /**\n * Enable all filters\n * @param state\n * @param params Lists of all modes, activities etc.\n */\n enableAll(state: FilterStateInterface, params : EnableAllParams) {\n state.aggregatedModes = params.aggregatedModes.map((m) => m.id).sort();\n state.aggregatedActivities = params.aggregatedActivities.map((a) => a.id).sort();\n\n state.sampleClassIds = {};\n params.sampleVariables.forEach((sv : SampleVariable) => {\n if (!sv.isShare || sv.id === null) {\n return;\n }\n\n const svClasses : Array = [];\n sv.classes.forEach((c : SampleClass) => {\n svClasses.push(c.id);\n });\n svClasses.push(null);\n svClasses.sort();\n state.sampleClassIds[sv.id] = svClasses;\n });\n state._enabledClassesStr = enabledClassesStateGetter(state);\n\n state.startDate = params.surveyStartDate;\n state.endDate = params.surveyEndDate;\n state.startTime = 0;\n state.endTime = 24 * 3600 - 1;\n state.dayOfWeek = [true, true, true, true, true, true, true];\n state.minDistanceM = null;\n state.maxDistanceM = null;\n state.minDurationS = null;\n state.maxDurationS = null;\n state.isCommuteToWork = null;\n\n persist(state);\n },\n /**\n * Disable all filters that depends on external data (modes etc.)\n * - all array filters is set to []\n * - sets time filter to [0, 23:59:59]\n * - sets date filter to no date range\n * - sets min/max distance/duration to null\n * @param state\n * @param params\n */\n clear(state: FilterStateInterface) {\n state.aggregatedModes = [];\n state.aggregatedActivities = [];\n state.sampleClassIds = [];\n state.startDate = null;\n state.endDate = null;\n state.startTime = 0;\n state.endTime = 24 * 3600 - 1;\n state.dayOfWeek = [true, true, true, true, true, true, true];\n state.minDistanceM = null;\n state.maxDistanceM = null;\n state.minDurationS = null;\n state.maxDurationS = null;\n state.isCommuteToWork = null;\n },\n },\n actions: {\n restore(context:ActionContext) {\n const filterString = localStorage.getItem('filter');\n const selectedSurvey : Survey|null = context.rootGetters['survey/getSelected'];\n context.commit('enableAll', {\n aggregatedModes: context.rootGetters['modeActivity/getAggregatedModesExcludingExercice'],\n aggregatedActivities: context.rootState.modeActivity.aggregatedActivities,\n sampleVariables: context.rootState.sample.variables,\n surveyStartDate: selectedSurvey?.startDate,\n surveyEndDate: selectedSurvey?.endDate,\n } as EnableAllParams); // default for filters not in store\n if (filterString !== null) {\n const filter = JSON.parse(filterString);\n if (filter !== null) {\n context.commit('setFilter', filter);\n }\n }\n },\n },\n getters: {\n // allow having the reducer on multiple lines for\n // better readability what they do\n /* eslint implicit-arrow-linebreak: [\"off\", {}}] */\n /* eslint function-paren-newline: [\"off\", {}}] */\n\n /**\n * Provides a unique string that represent the current filter\n * state. It can be used to react to changes to the filter\n * state but is not ment to be used for data transfer and\n * being decoded later on.\n */\n filterState: (state:FilterStateInterface) => {\n let s = '';\n\n s += 'am:';\n s += state.aggregatedModes.map((am : number) => am.toString())\n .reduce((reducer, val, index) =>\n `${reducer}${val},`, '',\n );\n s += 'aa:';\n s += state.aggregatedActivities.map((aa : number) => aa.toString())\n .reduce((reducer, val, index) =>\n `${reducer}${val},`, '',\n );\n\n s += 'ao:' + state._enabledClassesStr;\n\n s += `fd:${state.startDate}`;\n s += `ed:${state.endDate}`;\n s += `ft:${state.startTime}`;\n s += `et:${state.endTime}`;\n s += 'dow:';\n s += state.dayOfWeek.map((dow : boolean) => dow.toString())\n .reduce((reducer, val, index) =>\n `${reducer}${val},`, '',\n );\n\n s += `di:${state.minDistanceM}-${state.maxDistanceM}`;\n s += `du:${state.minDurationS}-${state.maxDurationS}`;\n\n return s;\n },\n /** Internal getter to compute _enabledAOsStr */\n _enabledClassesStateStr: enabledClassesStateGetter,\n /**\n * Check if given answer option is enabled in the filter\n * @param variableId SampleVariable id\n * @param classId SampleClass id or null for the psuedo answer 'missing answer'.\n */\n isSampleClassEnabled: (state:FilterStateInterface) => (\n variableId : number, classId : number|null,\n ) => {\n if (state.sampleClassIds[variableId] === undefined) return false;\n return state.sampleClassIds[variableId].indexOf(classId) !== -1;\n },\n },\n};\n","import { ActionContext } from 'vuex';\nimport resolveLabel from '@/utils/I18nLabel';\nimport { date2YMDString } from '@/utils/dateHelpers';\nimport i18n from '@/i18n';\nimport hasFeature from '@/utils/feature';\nimport palette from '@/utils/palette';\nimport { Flavor } from '@/flavor/types';\nimport { flavor, flavorData } from '@/flavor';\nimport Log from '@/utils/log';\nimport { getActiveTransportAggregatedModes, getEmissionAggregatedModes } from '@/utils/maAggregate';\nimport { RootState } from '../../root-state';\nimport {\n ResultBox, ResultBoardStateInterface, ResultBoard, ResultVisual, ResultFormatter, FilterOverride, ResultUnit,\n} from './types';\nimport {\n Numerator, Denominator, StatMethod, TravelType, Attachment, PartialQuery, Query, Axis,\n} from '../query/types';\nimport { SampleVariable, SampleClass } from '../sample/types';\nimport { AggregatedMode } from '../mode-activity/types';\n\ntype Context = ActionContext;\n\nconst noFilterOverride : FilterOverride = {\n aggregatedModes: undefined,\n};\n\nexport interface ResultBoardLoadParams {\n sampleVariables : Array;\n surveyStartDate: string|null;\n surveyEndDate: string|null;\n aggregatedModes: Array;\n}\n\nexport interface SetVisualParams {\n resultBoardId : string;\n boxId : number;\n type: ResultVisual;\n}\n\nexport interface SetZoneFileParams {\n resultBoardId : string;\n boxId : number;\n zoneFile: Attachment|null; // null => remove file\n}\n\nexport interface SetStartEndDateParams {\n startDate : string|null;\n endDate : string|null;\n}\n\n/**\n * Lookup box or return undefined if not found\n */\nfunction findBox(state : ResultBoardStateInterface, resultBoardId: String, boxId: number): ResultBox|undefined {\n const resultBoard = state.resultBoards.find((board) => board.id === resultBoardId);\n if (resultBoard !== undefined) {\n return resultBoard.resultBoxes.find((b) => b.id === boxId);\n }\n return undefined;\n}\n\nfunction attachmentState(file : Attachment|null): string {\n if (file === null) {\n return 'null';\n }\n // Naively use filename and content length as state signature\n return `${file.fileName}:${file.content.length}`;\n}\n\n/**\n * Resolve dates() axis string with given parameters.\n *\n * If either startDate or endDate is null, a days axis for the last 30 days\n * is returned.\n *\n * @param startDate Date string on YYYY-MM-DD format or null\n * @param endDate Date string on YYYY-MM-DD format or null\n * @returns string\n */\nfunction resolveDatesAxis(startDate : string|null, endDate : string|null): string {\n if (startDate == null || endDate == null) {\n const today = new Date();\n const prior = new Date();\n prior.setDate(today.getDate() - 30);\n const end = date2YMDString(today);\n const start = date2YMDString(prior);\n return `dates(${start},${end})`;\n }\n return `dates(${startDate},${endDate})`;\n}\n\n/**\n * Resolve weeks() axis string with given parameters.\n *\n * If either startDate or endDate is null, a weeks axis for the last 30 days\n * is returned.\n *\n * @param startDate Date string on YYYY-MM-DD format or null\n * @param endDate Date string on YYYY-MM-DD format or null\n * @returns string\n */\nfunction resolveWeeksAxis(startDate : string|null, endDate : string|null): string {\n if (startDate == null || endDate == null) {\n const today = new Date();\n const prior = new Date();\n prior.setDate(today.getDate() - 30);\n const end = date2YMDString(today);\n const start = date2YMDString(prior);\n return `weeks(${start},${end})`;\n }\n return `weeks(${startDate},${endDate})`;\n}\n\n/**\n * Build a ResultBox of type ResultVisual.sectionHeading.\n * @param id The id to use\n * @param label The label (translated text)\n * @returns ResultBox\n */\nfunction buildSectionHeadingBox(id: number, label: string) : ResultBox {\n return {\n id,\n type: ResultVisual.sectionHeading,\n label,\n partialQuery: null,\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 12,\n };\n}\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: {\n resultBoards: [],\n },\n mutations: {\n /**\n * Store a query as sent\n * @param state\n * @param query\n */\n addBoard(state : ResultBoardStateInterface, resultBoard : ResultBoard) {\n state.resultBoards.push(resultBoard);\n },\n clear(state : ResultBoardStateInterface) {\n state.resultBoards = [];\n },\n /**\n * Set visual type of Result Box\n * @param state\n * @param payload\n */\n setBoxVisual(state : ResultBoardStateInterface, payload : SetVisualParams) {\n const box = findBox(state, payload.resultBoardId, payload.boxId);\n if (box !== undefined) {\n box.type = payload.type;\n }\n },\n /**\n * Set partialQuery.zoneFile of Result Box\n * @param state\n * @param payload\n */\n setBoxZoneFile(state : ResultBoardStateInterface, payload : SetZoneFileParams) {\n const box = findBox(state, payload.resultBoardId, payload.boxId);\n Log.log('setBoxZoneFile');\n if (box !== undefined && box.partialQuery !== null) {\n box.partialQuery.zoneFile = payload.zoneFile;\n }\n },\n /* eslint no-param-reassign: [\"error\", { \"props\": false }] */\n /**\n * Set Start and end date of all result boxes of axis dates() and weeks().\n *\n * If either the start or end date is null, then today's date is used as end date and the\n * day 30 day prior used as start date\n * @param state\n * @param payload\n */\n setStartEndDate(state : ResultBoardStateInterface, payload : SetStartEndDateParams) {\n state.resultBoards.forEach((resultBoard) => {\n resultBoard.resultBoxes.forEach((box) => {\n if (box.partialQuery !== null) {\n if (box.partialQuery.axisX.startsWith('dates(')) {\n box.partialQuery.axisX = resolveDatesAxis(payload.startDate, payload.endDate);\n }\n if (box.partialQuery.axisX.startsWith('weeks(')) {\n box.partialQuery.axisX = resolveWeeksAxis(payload.startDate, payload.endDate);\n }\n }\n });\n });\n },\n },\n actions: {\n load(context : Context, payload: ResultBoardLoadParams) {\n return new Promise(async (resolve, reject) => {\n context.commit('clear');\n let nextId = 0;\n const getNextId = () => {\n const id = nextId;\n nextId += 1;\n return id;\n };\n\n const modalSplitNTrips: ResultBox = {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.modal-split-n-trips').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n };\n\n // Compensate for that people working full time are working 5 out of 7 days.\n const workFullTimeFactor = 7 / 5;\n\n if (flavor === Flavor.travelViewer) {\n // Build result boards for travelViewer\n const overviewBoard : ResultBoard = {\n id: 'overview',\n labelStr: 'resultboard.overview',\n info: null,\n resultBoxes: [\n // modalSplitNTrips, // commented out to avoid slow graph on overview during development\n // N Trips per person and day\n {\n id: getNextId(),\n type: ResultVisual.factText,\n label: i18n.t('resultbox.n-trips-per-person-day').toString(),\n partialQuery: {\n axisX: '',\n axisY: '',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: 'resultbox.fact-text.n-trips-per-person-day',\n valueFormatter: null,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: null,\n colspan: 4,\n },\n // Distance per person and day\n {\n id: getNextId(),\n type: ResultVisual.factText,\n label: i18n.t('resultbox.distance-per-person-day').toString(),\n partialQuery: {\n axisX: '',\n axisY: '',\n numerator: Numerator.delresaDistanceM,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: 'resultbox.fact-text.distance-per-person-day',\n valueFormatter: ResultFormatter.mToKm,\n valueDecimals: 0,\n valueUnit: ResultUnit.km,\n customPalette: null,\n colspan: 4,\n },\n // Distance per person and day\n {\n id: getNextId(),\n type: ResultVisual.factText,\n label: i18n.t('resultbox.duration-per-person-day').toString(),\n partialQuery: {\n axisX: '',\n axisY: '',\n numerator: Numerator.delresaDurationS,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: 'resultbox.fact-text.duration-per-person-day',\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 0,\n valueUnit: ResultUnit.minutes,\n customPalette: null,\n colspan: 4,\n },\n ],\n };\n context.commit('addBoard', overviewBoard);\n const tripsBoard : ResultBoard = {\n id: 'trips',\n labelStr: 'resultboard.trips',\n info: null,\n resultBoxes: [\n modalSplitNTrips,\n // Modal split\n {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.modal-split-trip-distance').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '',\n numerator: Numerator.delresaDistanceM,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.mToKm,\n valueDecimals: 0,\n valueUnit: ResultUnit.km,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.modal-split-trip-duration').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '',\n numerator: Numerator.delresaDurationS,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 0,\n valueUnit: ResultUnit.minutes,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.n-trips-per-week-day').toString(),\n partialQuery: {\n axisX: '\"week days\"',\n axisY: '',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n // Activity split\n {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.activity-split-n-trips').toString(),\n partialQuery: {\n axisX: '\"aggregated activity\"',\n // axisX: '',\n axisY: '',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.activity-split-trip-distance').toString(),\n partialQuery: {\n axisX: '\"aggregated activity\"',\n axisY: '',\n numerator: Numerator.delresaDistanceM,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.mToKm,\n valueDecimals: 0,\n valueUnit: ResultUnit.km,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.pieChart,\n label: i18n.t('resultbox.activity-split-trip-duration').toString(),\n partialQuery: {\n axisX: '\"aggregated activity\"',\n axisY: '',\n numerator: Numerator.delresaDurationS,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 0,\n valueUnit: ResultUnit.minutes,\n customPalette: null,\n colspan: 6,\n },\n // average Distance per trip\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.distance-per-trip').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '',\n numerator: Numerator.delresaDistanceM,\n denominator: Denominator.nDelresaWithDistanceDivN,\n scaleFactor: null,\n statMethod: StatMethod.weightedTrips,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.mToKm,\n valueDecimals: 0,\n valueUnit: ResultUnit.km,\n customPalette: null,\n colspan: 6,\n },\n // average Duration per trip\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.duration-per-trip').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '',\n numerator: Numerator.delresaDurationS,\n denominator: Denominator.nDelresaWithDurationDivN,\n scaleFactor: null,\n statMethod: StatMethod.weightedTrips,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 0,\n valueUnit: ResultUnit.minutes,\n customPalette: null,\n colspan: 6,\n },\n // OD matrix\n {\n id: getNextId(),\n type: ResultVisual.odMatrix,\n label: i18n.t('resultbox.od-matrix').toString(),\n partialQuery: {\n axisX: '\"to zone\"',\n axisY: '\"from zone\"',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: true,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 12,\n },\n ],\n };\n if (hasFeature('tripsPerSampleClass')) {\n payload.sampleVariables.forEach((sv : SampleVariable) => {\n if (sv.isShare) { // Ignore total row\n tripsBoard.resultBoxes.push({\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.n-trips-per-sample-variable', {\n sampleVariable: resolveLabel(sv.label, sv.labelTranslations),\n }).toString(),\n partialQuery: {\n axisX: `sampleVariable(${sv.id})`,\n axisY: '',\n numerator: Numerator.nDelresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n });\n }\n });\n }\n context.commit('addBoard', tripsBoard);\n } else if (flavor === Flavor.activeViewer) {\n // Build result boards for ActiveViewer\n const tripsBoard : ResultBoard = {\n id: 'trips',\n labelStr: 'resultboard.trips',\n info: null,\n resultBoxes: [\n buildSectionHeadingBox(getNextId(), i18n.t('resultboard.section.commuter-trips').toString()),\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.commuter-travel-days-per-person-day'),\n partialQuery: {\n axisX: '',\n axisY: '\"before/during/after\"',\n numerator: Numerator.nReselementDays,\n denominator: Denominator.anyDayDivN,\n scaleFactor: workFullTimeFactor,\n statMethod: StatMethod.estimatingProportion, // ?\n travelType: TravelType.reselement,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 12,\n },\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.modal-split-commuter-trips-n-trips'),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '\"before/during/after\"',\n numerator: Numerator.nHuvudresa,\n denominator: Denominator.anyDayDivN,\n scaleFactor: 2 * workFullTimeFactor,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.huvudresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: Axis.x,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 12,\n },\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.modal-split-commuter-trips-distance'),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '\"before/during/after\"',\n numerator: Numerator.reselementDistanceM,\n denominator: Denominator.anyDayDivN,\n scaleFactor: 2 * workFullTimeFactor,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.reselement,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.mToKm,\n valueDecimals: 1,\n valueUnit: ResultUnit.km,\n customPalette: null,\n colspan: 12,\n },\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.modal-split-commuter-trips-duration'),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '\"before/during/after\"',\n numerator: Numerator.reselementDurationS,\n denominator: Denominator.anyDayDivN,\n scaleFactor: 2 * workFullTimeFactor,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.reselement,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 1,\n valueUnit: ResultUnit.minutes,\n customPalette: null,\n colspan: 12,\n },\n ],\n };\n context.commit('addBoard', tripsBoard);\n\n const healthBoard : ResultBoard = {\n id: 'health',\n labelStr: 'resultboard.health',\n info: {\n image: 'dumbbell',\n imageLabel: i18n.tc('resultboard.health'),\n palette: '5',\n label: i18n.tc('resultboard.health.board-info.title'),\n textCol1: i18n.tc('resultboard.health.board-info.col1.text'),\n textCol2: i18n.tc('resultboard.health.board-info.col2.text'),\n },\n resultBoxes: [\n buildSectionHeadingBox(getNextId(), i18n.t('resultboard.section.commuter-trips').toString()),\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.t('resultbox.commuter-minutes-per-person-and-week').toString(),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '\"before/during/after\"',\n axisXFilter: {\n includeIds: getActiveTransportAggregatedModes(payload.aggregatedModes),\n },\n numerator: Numerator.reselementDurationS,\n denominator: Denominator.anyDayDivN,\n scaleFactor: 2 * 7,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.reselement,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.sToMinutes,\n valueDecimals: 0,\n valueUnit: ResultUnit.minutes,\n customPalette: [\n {\n bgColor: palette['5'],\n textColor: palette['5d'],\n },\n {\n bgColor: palette['5c'],\n textColor: palette['5b'],\n },\n ],\n colspan: 12,\n },\n\n ],\n };\n context.commit('addBoard', healthBoard);\n\n // CO2 BOARD\n const CO2Board : ResultBoard = {\n id: 'CO2',\n labelStr: 'resultboard.CO2',\n info: {\n image: 'tree',\n imageLabel: i18n.tc('resultboard.CO2'),\n palette: '4',\n label: i18n.tc('resultboard.CO2.board-info.title'),\n textCol1: i18n.tc('resultboard.CO2.board-info.col1.text'),\n textCol2: i18n.tc('resultboard.CO2.board-info.col2.text'),\n },\n resultBoxes: [\n buildSectionHeadingBox(getNextId(), i18n.t('resultboard.section.commuter-trips').toString()),\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.emissions-co2-per-participant-and-day'),\n partialQuery: {\n axisX: '\"aggregated mode\"',\n axisY: '\"before/during/after\"',\n axisXFilter: {\n includeIds: getEmissionAggregatedModes(payload.aggregatedModes),\n },\n numerator: Numerator.reselementCo2Kg,\n denominator: Denominator.anyDayDivN,\n scaleFactor: 2,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.reselement,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 2,\n valueUnit: ResultUnit.kg,\n customPalette: [\n {\n bgColor: palette['4b'],\n textColor: palette['4d'],\n },\n {\n bgColor: palette['4c'],\n textColor: palette['4b'],\n },\n {\n bgColor: palette['4'],\n textColor: palette['4b'],\n },\n ],\n colspan: 12,\n },\n ],\n };\n context.commit('addBoard', CO2Board);\n\n const ParkingBoard : ResultBoard = {\n id: 'Parking',\n labelStr: 'resultboard.parking',\n info: {\n image: 'parking',\n imageLabel: null,\n palette: '1',\n label: i18n.tc('resultboard.parking.board-info.title'),\n textCol1: i18n.tc('resultboard.parking.board-info.col1.text'),\n textCol2: i18n.tc('resultboard.parking.board-info.col2.text'),\n },\n resultBoxes: [\n buildSectionHeadingBox(getNextId(), i18n.t('resultboard.section.commuter-trips').toString()),\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.car-parking-demand-per-participant'),\n partialQuery: {\n axisX: '',\n axisY: '\"before/during/after\"',\n numerator: Numerator.nHuvudresaCar,\n denominator: Denominator.nHuvudresaDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.huvudresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: [\n {\n bgColor: palette['1'],\n textColor: palette['1d'],\n },\n ],\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.horizontalBarChart,\n label: i18n.tc('resultbox.bike-parking-demand-per-participant'),\n partialQuery: {\n axisX: '',\n axisY: '\"before/during/after\"',\n numerator: Numerator.nHuvudresaBike,\n denominator: Denominator.nHuvudresaDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: TravelType.huvudresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 1,\n valueUnit: null,\n customPalette: [\n {\n bgColor: palette['1'],\n textColor: palette['1d'],\n },\n ],\n colspan: 6,\n },\n ],\n };\n context.commit('addBoard', ParkingBoard);\n } else {\n Log.error('Invalid flavor');\n }\n\n // Questionnaire - using sample variables\n // TODO: exclude home area sample variables. (put them in a separate result board)\n const questionnaireBoard : ResultBoard = {\n id: 'questionnaire',\n labelStr: 'resultboard.questionnaire',\n info: null,\n resultBoxes: [\n ],\n };\n payload.sampleVariables.forEach((sv : SampleVariable) => {\n if (sv.isShare) { // Ignore total row\n questionnaireBoard.resultBoxes.push({\n id: getNextId(),\n type: sv.multiMembership ? ResultVisual.barChart : ResultVisual.pieChart,\n label: resolveLabel(sv.label, sv.labelTranslations).toString(),\n partialQuery: {\n axisX: `sampleVariable(${sv.id})`,\n axisY: '',\n numerator: Numerator.nAxisX,\n denominator: Denominator.n,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion,\n travelType: flavor === Flavor.travelViewer\n ? TravelType.delresa\n : TravelType.reselement,\n enableWeighting: flavor === Flavor.travelViewer,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n });\n }\n });\n context.commit('addBoard', questionnaireBoard);\n\n if (flavor === Flavor.travelViewer) {\n const metaBoard : ResultBoard = {\n id: 'meta',\n labelStr: 'resultboard.meta',\n info: null,\n resultBoxes: [\n // No-travel days per person and day\n {\n id: getNextId(),\n type: ResultVisual.factText,\n label: i18n.t('resultbox.travel-days-per-person-day').toString(),\n partialQuery: {\n axisX: '',\n axisY: '',\n numerator: Numerator.nDelresaDays,\n denominator: Denominator.anyDayDivN,\n scaleFactor: null,\n statMethod: StatMethod.estimatingProportion, // ?\n travelType: TravelType.delresa,\n enableWeighting: true,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: 'resultbox.fact-text.travel-days-per-person-day',\n valueFormatter: ResultFormatter.decToPercent,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n /*\n // Number of corrected days in total\n {\n id: getNextId(),\n type: ResultVisual.factText,\n label: i18n.t('resultbox.number-of-corrected-days-per-weekday').toString(),\n partialQuery: {\n axisX: '',\n axisY: '',\n numerator: Numerator.nCorrectedDay,\n denominator: Denominator.one,\n scaleFactor: null,\n statMethod: StatMethod.estimatingMean,\n travelType: TravelType.delresa,\n enableWeighting: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: 'resultbox.fact-text.travel-days-per-person-day',\n valueFormatter: null,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n */\n // Number of corrected days per weekday\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.number-of-corrected-days-per-weekday').toString(),\n partialQuery: {\n axisX: '\"week days\"',\n axisY: '',\n numerator: Numerator.nCorrectedDay,\n denominator: Denominator.one,\n scaleFactor: null,\n statMethod: StatMethod.estimatingMean,\n travelType: TravelType.delresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.number-of-corrected-days-per-date').toString(),\n partialQuery: {\n axisX: resolveDatesAxis(payload.surveyStartDate, payload.surveyEndDate),\n axisY: '',\n numerator: Numerator.nCorrectedDay,\n denominator: Denominator.one,\n scaleFactor: null,\n statMethod: StatMethod.estimatingMean,\n travelType: TravelType.delresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n {\n id: getNextId(),\n type: ResultVisual.barChart,\n label: i18n.t('resultbox.number-of-corrected-days-per-week').toString(),\n partialQuery: {\n axisX: resolveWeeksAxis(payload.surveyStartDate, payload.surveyEndDate),\n axisY: '',\n numerator: Numerator.nCorrectedDay,\n denominator: Denominator.one,\n scaleFactor: null,\n statMethod: StatMethod.estimatingMean,\n travelType: TravelType.delresa,\n enableWeighting: false,\n zoneFile: null,\n shareOutput: false,\n calculateMapFilter: false,\n },\n filterOverride: noFilterOverride,\n factTextStr: null,\n valueFormatter: null,\n valueDecimals: 0,\n valueUnit: null,\n customPalette: null,\n colspan: 6,\n },\n ],\n };\n context.commit('addBoard', metaBoard);\n }\n resolve();\n });\n },\n },\n getters: {\n /**\n * Provides a map from ':' to a string that\n * represent the current box state of a result box. It is\n * meant only for reacting on changes. Not to be parsed.\n */\n boxState: (state:ResultBoardStateInterface) => {\n const map : any = {};\n state.resultBoards.forEach((board) => {\n board.resultBoxes.forEach((box) => {\n const key = `${board.id}:${box.id}`;\n let s = '';\n s += `t:${box.type}`;\n if (box.partialQuery !== null) {\n const i = attachmentState(box.partialQuery.zoneFile);\n s += `x:${box.partialQuery.axisX}`;\n s += `y:${box.partialQuery.axisY}`;\n s += `n:${box.partialQuery.numerator}`;\n s += `d:${box.partialQuery.denominator}`;\n s += `s:${box.partialQuery.scaleFactor}`;\n s += `w:${box.partialQuery.enableWeighting}`;\n s += `s:${box.partialQuery.statMethod}`;\n s += `t:${box.partialQuery.travelType}`;\n s += `z:${box.partialQuery.zoneFile}`;\n s += `i:${i}`;\n s += `s:${box.partialQuery.shareOutput}`;\n }\n map[key] = s;\n });\n });\n return map;\n },\n },\n};\n","import { ActionContext } from 'vuex';\nimport axios, { CancelTokenSource } from 'axios';\nimport { api } from '@/api';\nimport Log from '@/utils/log';\nimport { RootState } from '../../root-state';\nimport {\n Query, QueryResult,\n SentQuery, QueryStateInterface,\n ResultQueryPromise,\n} from './types';\n\ntype Context = ActionContext;\n\ninterface AddSentQueryParams {\n query: Query;\n apiPromise : ResultQueryPromise;\n cancelTokenSource: CancelTokenSource;\n}\n\ninterface SetQueryResultParams {\n sendId: number;\n result : QueryResult;\n}\n\ninterface RemoveSentQueryParams {\n sendId: number;\n}\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: {\n sentQueries: [],\n lastSendId: -1,\n },\n mutations: {\n /**\n * Store a query as sent\n * @param state\n * @param query\n */\n addSentQuery(state : QueryStateInterface, payload: AddSentQueryParams) {\n state.lastSendId += 1;\n const data : SentQuery = {\n id: state.lastSendId,\n sentTimestamp: (new Date()).getTime() / 1000,\n // Serialize query to make sure we store a copy of filter state etc. for this query\n serializedQuery: JSON.stringify(payload.query),\n result: null,\n apiPromise: payload.apiPromise,\n cancelTokenSource: payload.cancelTokenSource,\n };\n\n state.sentQueries.push(data);\n },\n setQueryResult(state : QueryStateInterface, payload : SetQueryResultParams) {\n const sentQuery = state.sentQueries.find((sq : SentQuery) => sq.id === payload.sendId);\n if (sentQuery !== undefined) {\n sentQuery.result = payload.result;\n sentQuery.cancelTokenSource = null; // not possible to cancel anymore\n }\n },\n /**\n * Removes sent query info for this query\n */\n removeSentQuery(state : QueryStateInterface, payload: RemoveSentQueryParams) {\n const index = state.sentQueries.findIndex((sq : SentQuery) => sq.id === payload.sendId);\n if (index !== -1) {\n state.sentQueries.splice(index, 1);\n }\n },\n /**\n * Removes all queries. Any ongoing query is canceled.\n */\n clear(state : QueryStateInterface, params : void) {\n // Cancel ongoing queries upon clear\n state.sentQueries.forEach((sq : SentQuery) => {\n if (sq.cancelTokenSource !== null) {\n sq.cancelTokenSource.cancel();\n }\n });\n\n state.sentQueries = [];\n state.lastSendId = -1;\n },\n },\n actions: {\n /**\n * Sends query to server and stores the query and later on the response\n * in store.\n * This function will resolve after the query has been sent with an id\n * that can be used with action waitOnQuery(sentId) to wait for server\n * response.\n *\n * @param context\n * @param payload\n */\n sendQuery(context : Context,\n payload: { query: Query }) : Promise {\n return new Promise(async (resolve, reject) => {\n const cancel = axios.CancelToken.source();\n const apiPromise = api.resultQuery(\n payload.query, context.rootState.user.token, cancel.token,\n );\n context.commit('addSentQuery', {\n query: payload.query,\n apiPromise,\n cancelTokenSource: cancel,\n });\n const sendId = context.state.lastSendId;\n resolve(sendId); // Resolve with Id\n\n try {\n const response = await apiPromise;\n context.commit('setQueryResult', {\n sendId,\n result: response.data,\n });\n } catch (e: any) {\n if (e.response !== undefined && e.response.status === 401) {\n console.log('401 in response => logout');\n context.dispatch('user/logout', {}, { root: true });\n }\n context.commit('removeSentQuery', {\n sendId,\n });\n reject();\n }\n });\n },\n /**\n * Waits until the server request triggered by sendQuery has responded and then\n * resolves with the query result.\n * Rejects on server error or invalid sendId\n * @param sendId Id received from sendQuery\n */\n waitOnQuery(context : Context,\n payload: { sendId: number }) : Promise {\n return new Promise(async (resolve, reject) => {\n // --\n Log.log('waitOnQuery', payload.sendId);\n const sentQuery = context.state.sentQueries.find(\n (sq : SentQuery) => sq.id === payload.sendId,\n );\n if (sentQuery !== undefined && sentQuery.apiPromise !== null) {\n try {\n const response = await sentQuery.apiPromise;\n resolve(response.data);\n } catch (e) {\n console.log('network error');\n reject();\n }\n } else {\n console.log('sendId not found', payload.sendId);\n reject();\n }\n });\n },\n },\n getters: {\n /**\n * Get result from query. If query has not yet responded or there\n * is an error, null is returned.\n * @param sendId id of query received from calling sendQuery\n */\n getResult: (state:QueryStateInterface) => (sendId : number) : QueryResult|null => {\n const sentQuery = state.sentQueries.find((sq : SentQuery) => sq.id === sendId);\n\n if (sentQuery !== undefined) {\n return sentQuery.result;\n }\n\n return null;\n },\n /**\n * Look for an identical query that has already been sent and return its sendId.\n *\n * Queries that have responded with an error are not regarded.\n * @param query The query to look for\n * @return SendId of found sent query or null\n */\n findSameQuery: (state:QueryStateInterface) => (query : Query) : number|null => {\n const s = JSON.stringify(query);\n\n // console.log('query', s);\n // state.sentQueries.forEach((sq : SentQuery) => console.log('sq', sq.serializedQuery));\n\n const sentQuery = state.sentQueries.find((sq : SentQuery) => sq.serializedQuery === s);\n\n return sentQuery !== undefined ? sentQuery.id : null;\n },\n },\n};\n","import { ActionContext } from 'vuex';\nimport { RootState } from '../../root-state';\nimport { QuerySettingsStateInterface } from './types';\n\ntype Context = ActionContext;\n\n/* eslint key-spacing: [\"off\"] */\nfunction _initialState() : QuerySettingsStateInterface {\n return {\n includeJoinDateInSurvey: true,\n limits: {\n minDistanceM: {},\n maxDistanceM: {\n // Limits values from RVU manual, but extended to have all modes\n WALK: 25 * 1000,\n CAR_: 1500 * 1000,\n CARD: 1500 * 1000,\n CARP: 1500 * 1000,\n ECAR: 1500 * 1000,\n ECRD: 1500 * 1000,\n ECRP: 1500 * 1000,\n NCAR: 1500 * 1000,\n NCRD: 1500 * 1000,\n NCRP: 1500 * 1000,\n PCAR: 1500 * 1000,\n BCAR: 1500 * 1000,\n SCAR: 1500 * 1000,\n RCAR: 1500 * 1000,\n BUS_: 1500 * 1000,\n SBUS: 1500 * 1000,\n CBUS: 1500 * 1000,\n LORY: 1500 * 1000,\n VAN_: 1500 * 1000,\n FERY: 1000 * 1000,\n TRAM: 250 * 1000,\n METR: 250 * 1000,\n CTRN: 250 * 1000,\n TRN_: 2000 * 1000,\n CABE: 100 * 1000,\n BIKE: 100 * 1000,\n EBKE: 100 * 1000,\n CBKE: 100 * 1000,\n SBIK: 100 * 1000,\n SCOT: 500 * 1000,\n SCOM: 500 * 1000,\n MOPD: 500 * 1000,\n MC__: 1500 * 1000,\n TAXI: 500 * 1000,\n TAXR: 500 * 1000,\n TUKT: 500 * 1000,\n MBSR: 500 * 1000,\n EXRC: 500 * 1000,\n AIR_: 25000 * 1000,\n OTHR: 10000 * 1000,\n UKNW: 10000 * 1000,\n },\n minDurationS: {},\n maxDurationS: {\n WALK: 5 * 3600,\n CAR_: 24 * 3600,\n CARD: 24 * 3600,\n CARP: 24 * 3600,\n ECAR: 24 * 3600,\n ECRD: 24 * 3600,\n ECRP: 24 * 3600,\n NCAR: 24 * 3600,\n NCRD: 24 * 3600,\n NCRP: 24 * 3600,\n PCAR: 24 * 3600,\n BCAR: 24 * 3600,\n SCAR: 24 * 3600,\n RCAR: 24 * 3600,\n BUS_: 24 * 3600,\n SBUS: 24 * 3600,\n CBUS: 24 * 3600,\n LORY: 24 * 3600,\n VAN_: 24 * 3600,\n FERY: 36 * 3600,\n TRAM: 5 * 3600,\n METR: 5 * 3600,\n CTRN: 5 * 3600,\n TRN_: 36 * 3600,\n CABE: 5 * 3600,\n BIKE: 10 * 3600,\n EBKE: 10 * 3600,\n CBKE: 10 * 3600,\n SBIK: 10 * 3600,\n SCOT: 10 * 3600,\n SCOM: 10 * 3600,\n MOPD: 10 * 3600,\n MC__: 24 * 3600,\n TAXI: 10 * 3600,\n TAXR: 10 * 3600,\n TUKT: 10 * 3600,\n MBSR: 10 * 3600,\n EXRC: 15 * 3600,\n AIR_: 36 * 3600,\n OTHR: 36 * 3600,\n UKNW: 36 * 3600,\n },\n },\n minCellN: 5,\n weightLimits: {\n minClassN: 0, // TODO: should default to 5\n minVariableN: 0, // TODO: should default to 100\n warnVariableN: 100, // TODO: should default to 100\n },\n activityMethod: 'end-activity',\n nRequiresTrips: false,\n vtiReselementMerge: false,\n };\n}\n\nfunction persist(state: QuerySettingsStateInterface) {\n localStorage.setItem('querySettings', JSON.stringify(state));\n}\n\n/* eslint no-underscore-dangle: [\"off\", {}}] */\n/* eslint prefer-template: [\"off\", {}}] */\n\n/**\n * (current) User state management\n */\nexport default {\n namespaced: true,\n state: _initialState(),\n mutations: {\n /**\n * Unsafe setter (no typechecking or data validation)\n * @param querySettings Object with same names as state as keys.\n */\n set(state: QuerySettingsStateInterface, querySettings: any) {\n Object.keys(state).forEach((key : string) => {\n if (querySettings[key] !== undefined\n && (state)[key] !== undefined\n ) {\n (state)[key] = (querySettings)[key];\n }\n });\n persist(state);\n },\n /**\n * Reset to deafult state\n * @param state\n * @param params\n */\n clear(state: QuerySettingsStateInterface) {\n const initialState = _initialState();\n Object.keys(state).forEach((key : string) => {\n (state)[key] = (initialState)[key];\n });\n persist(state);\n },\n },\n actions: {\n restore(context:ActionContext) {\n const querySettingsString = localStorage.getItem('querySettings');\n if (querySettingsString !== null) {\n const querySettings = JSON.parse(querySettingsString);\n if (querySettings !== null) {\n context.commit('set', querySettings);\n }\n }\n },\n },\n getters: {\n /**\n * Provides a unique string that represent the current query settings\n * state. It can be used to react to changes to the query settings\n * state but is not ment to be used for data transfer and\n * being decoded later on.\n */\n querySettingsState: (state:QuerySettingsStateInterface) => {\n let s = '';\n\n s += `i:${state.includeJoinDateInSurvey ? '0' : '1'}`;\n s += 'lim:';\n Object.keys(state.limits).forEach((limit : string) => {\n let sm = '';\n const limitObj = (state.limits)[limit];\n Object.keys(limitObj).forEach((mode : string) => {\n if (sm !== '') sm += ',';\n sm += `${mode}:${limitObj[mode]}`;\n });\n s += sm;\n });\n s += `mcn:${state.minCellN}`;\n s += `wl:${state.weightLimits.minClassN},${state.weightLimits.minVariableN},${state.weightLimits.warnVariableN}`;\n s += `am:${state.activityMethod}`;\n s += `nrt:${state.nRequiresTrips ? '0' : '1'}`;\n s += `vrm:${state.vtiReselementMerge ? '0' : '1'}`;\n\n return s;\n },\n },\n};\n","import { flavor } from '@/flavor';\nimport { Flavor } from '@/flavor/types';\nimport Log from '@/utils/log';\nimport { ActionContext } from 'vuex';\nimport { EnableAllParams } from './modules/filter';\nimport { ResultBoardLoadParams } from './modules/result-board';\nimport { Survey } from './modules/survey/types';\nimport { RootState } from './root-state';\n\nexport interface SelectSurveyParams {\n surveyId : number;\n startDate : string;\n endDate : string;\n restore : boolean; // true to restore filter/querySettings\n}\n\n/**\n * Set given surveyId as selected survey and load filters etc.\n * for that survey.\n * @param context\n * @param payload\n * @returns\n */\nexport async function selectSurvey(\n context : ActionContext,\n payload : SelectSurveyParams,\n) {\n return new Promise((resolve, reject) => {\n context.commit('survey/selectSurvey', payload.surveyId);\n try {\n Log.log(`select survey - restore: ${payload.restore}`);\n Log.log('clear');\n if (!payload.restore) {\n context.commit('filter/clear');\n context.commit('querySettings/clear');\n }\n context.commit('sample/clear');\n context.commit('modeActivity/clear');\n context.commit('questionnaire/clear');\n context.commit('resultBoard/clear');\n context.commit('questionnaire/clear');\n Log.log('load');\n const waitOn :Array> = [];\n if (flavor === Flavor.activeViewer) {\n waitOn.push(context.dispatch('questionnaire/load'));\n }\n Promise.all([\n context.dispatch('modeActivity/load'),\n context.dispatch('sample/load'),\n ]).then(async () => {\n if (flavor === Flavor.activeViewer) {\n context.commit('modeActivity/mainAggregateModes');\n context.commit('modeActivity/mainAggregateActivities');\n context.commit('querySettings/set', {\n includeJoinDateInSurvey: false,\n nRequiresTrips: true,\n });\n }\n Log.log('enable filters');\n if (!payload.restore) {\n context.commit('filter/enableAll', {\n aggregatedModes: context.getters['modeActivity/getAggregatedModesExcludingExercice'],\n aggregatedActivities: context.state.modeActivity.aggregatedActivities,\n sampleVariables: context.state.sample.variables,\n surveyStartDate: payload.startDate,\n surveyEndDate: payload.endDate,\n } as EnableAllParams);\n if (flavor === Flavor.activeViewer) {\n context.commit('filter/setFilter', {\n isCommuteToWork: true,\n });\n }\n } else {\n await context.dispatch('filter/restore');\n await context.dispatch('querySettings/restore');\n }\n // load result board last.\n Log.log('load result boards');\n waitOn.push(context.dispatch('resultBoard/load', {\n sampleVariables: context.state.sample.variables,\n surveyStartDate: payload.startDate,\n surveyEndDate: payload.endDate,\n aggregatedModes: context.state.modeActivity.aggregatedModes,\n } as ResultBoardLoadParams));\n await Promise.all(waitOn);\n window.localStorage.setItem('selectedSurveyId', `${payload.surveyId}`);\n resolve();\n });\n } catch (e) {\n // Error => unselect\n context.commit('survey/selectSurvey', -1);\n reject();\n }\n });\n}\n\n/**\n * Restore selected survey from persisted selection in localStorage\n *\n * Perform survey/load and then root selectSurvey if a surveyId is\n * persisted in selectedSurveyId in local storage.\n * @param context\n * @returns\n */\nexport async function restoreSelectedSurvey(\n context : ActionContext,\n) {\n const surveyIdString = window.localStorage.getItem('selectedSurveyId');\n if (surveyIdString === null) {\n Log.log('restoreSelectedSurvey no stored selection => abort');\n return;\n }\n const surveyId = parseInt(surveyIdString, 10);\n\n // If there is a selection already, don't restore.\n if (context.getters['survey/getSelected'] !== null) {\n Log.log('restoreSelectedSurvey has selection => abort');\n return;\n }\n if (context.getters['survey/getAll'].length === 0) {\n await context.dispatch('survey/load');\n }\n\n const surveyList : Array = context.getters['survey/getAll'];\n const survey = surveyList.find((survey) => survey.id === surveyId);\n if (survey === null) {\n Log.log(`selectedSurveyId ${surveyId} in storage is no longer available`);\n return;\n }\n await context.dispatch('selectSurvey', {\n surveyId,\n startDate: survey!.startDate,\n endDate: survey!.endDate,\n restore: true,\n } as SelectSurveyParams);\n}\n","import Vue from 'vue';\nimport Vuex from 'vuex';\nimport UserModule from './modules/user/index';\nimport SurveyModule from './modules/survey/index';\nimport SampleModule from './modules/sample/index';\nimport ModeActivityModule from './modules/mode-activity/index';\nimport Questionnaire from './modules/questionnaire/index';\nimport HomeArea from './modules/home-area/index';\nimport FilterModule from './modules/filter/index';\nimport ResultBoardModule from './modules/result-board/index';\nimport QueryModule from './modules/query/index';\nimport QuerySettingsModule from './modules/query-settings/index';\nimport { RootState } from './root-state';\nimport { QuestionType } from './modules/questionnaire/types';\nimport { selectSurvey, restoreSelectedSurvey } from './actions';\n\nVue.use(Vuex);\n\n/*\n * Principle:\n * No module mutation or action may write to\n * another module.\n *\n * Any orchestrated mutation or action that affect\n * multiple modules are placed at root level.\n */\n\nexport default new Vuex.Store({\n mutations: {\n },\n actions: {\n selectSurvey,\n restoreSelectedSurvey,\n },\n modules: {\n user: UserModule,\n survey: SurveyModule,\n sample: SampleModule,\n modeActivity: ModeActivityModule,\n filter: FilterModule,\n resultBoard: ResultBoardModule,\n query: QueryModule,\n querySettings: QuerySettingsModule,\n questionnaire: Questionnaire,\n homeArea: HomeArea,\n },\n});\n","import Vue from 'vue';\nimport VueRouter, { Route } from 'vue-router';\nimport store from '@/store';\nimport Log from '@/utils/log';\n\nVue.use(VueRouter);\n\nconst routes = [\n {\n path: '/login',\n // route level code-splitting\n // this generates a separate chunk (about.[hash].js) for this route\n // which is lazy-loaded when the route is visited.\n component: () => import(/* webpackChunkName: \"login\" */ '@/views/Login.vue'),\n },\n {\n path: '/',\n name: 'menu',\n component: () => import(/* webpackChunkName: \"home\" */ '@/views/Menu.vue'),\n children: [\n {\n path: 'survey',\n // route level code-splitting\n // this generates a separate chunk (about.[hash].js) for this route\n // which is lazy-loaded when the route is visited.\n component: () => import(/* webpackChunkName: \"survey\" */ '@/views/Survey.vue'),\n },\n {\n path: 'sample',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"sample\" */ '@/views/Sample.vue'),\n },\n {\n path: 'weighting',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"weighting\" */ '@/views/Weighting.vue'),\n },\n {\n path: 'analysis',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"analysis\" */ '@/views/Analysis.vue'),\n },\n {\n path: 'user-profile',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"user-profile\" */ '@/views/UserProfile.vue'),\n },\n {\n path: 'support',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"support\" */ '@/views/Support.vue'),\n },\n {\n path: 'edit-sample-variables/:from',\n name: 'edit-sample-variables',\n // route level code-splitting\n component: () => import(/* webpackChunkName: \"edit-sample-variables\" */ '@/views/EditSampleVariables.vue'),\n },\n ],\n },\n {\n path: '/*',\n redirect: '/',\n },\n];\n\n/* Copied from vue-router that have note eported these types at the time of writing this */\ntype Position = { x: number; y: number }\n\n// Actual vue-router scrollBehaviour doesn't work. Probably because our child routes serve\n// a dom node that doesn't scroll and then further down in the three we have our
that\n// does scroll. So instead we use some custom code. The general picture when I read up on\n// the issue is that the Vue scrolling have multiple problems and it is common that people\n// have to roll their own code for this. :-( /Leif, 2020-04-22\nlet scrollPosition: any = {};\n\nconst router = new VueRouter({\n routes,\n});\n\n// Only allow non-home views if user is logged in.\nrouter.beforeEach(async (to: Route, from: Route, next: Function) => {\n await store.dispatch('user/checkLoggedIn');\n if (store.state.user.isLoggedIn) {\n if (store.state.survey.surveyList.length === 0) {\n await store.dispatch('survey/load');\n }\n store.dispatch('restoreSelectedSurvey');\n }\n\n // Save scroll position of
\n if (from !== null) {\n const main = document.querySelector('main');\n if (main !== null) {\n scrollPosition[from.path] = { x: main.scrollLeft, y: main.scrollTop } as Position;\n Log.log('Saved position', from.path, scrollPosition[from.path]);\n }\n }\n\n if (['/', '/login'].includes(to.path) && store.state.user.isLoggedIn) {\n next('/survey');\n } else if (to.path !== '/login' && !store.state.user.isLoggedIn) {\n scrollPosition = {}; // throw away saved scroll positions.\n next('/login');\n } else {\n if (to.path === '/login') {\n scrollPosition = {}; // throw away saved scroll positions.\n }\n next();\n }\n});\n\nrouter.afterEach(async (to: Route, from: Route) => {\n // Restore saved scroll position\n Log.log('Restore Saved position', to.path, scrollPosition[to.path]);\n if ([\n '/survey', '/sample', '/weighting', '/analysis', '/support',\n ].includes(to.path) && scrollPosition[to.path] !== undefined) {\n // We need to let the new route load into DOM before we can access\n // the right
element.\n setTimeout(() => {\n const main = document.querySelector('main');\n if (main !== null) {\n main.scrollLeft = scrollPosition[to.path].x;\n main.scrollTop = scrollPosition[to.path].y;\n }\n }, 1);\n }\n});\n\nexport default router;\n","import Vue from 'vue';\nimport Buefy from 'buefy';\nimport App from './App.vue';\nimport router from './router';\nimport store from './store';\nimport i18n from './i18n';\nimport '@mdi/font/css/materialdesignicons.css';\n\nVue.config.productionTip = false;\nVue.use(Buefy);\n\nnew Vue({\n router,\n store,\n i18n,\n render: (h) => h(App),\n}).$mount('#app');\n","import { AxiosResponse, CancelTokenSource } from 'axios';\nimport { FilterStateInterface } from '../filter/types';\nimport { AggregatedModeConfig, AggregatedActivityConfig } from '../mode-activity/types';\n\nexport enum TravelType {\n reselement = 'reselement',\n delresa = 'delresa',\n huvudresa = 'huvudresa',\n}\n\nexport enum Numerator {\n nCorrectedDay = 'nCorrectedDay',\n nHuvudresa = 'nHuvudresa',\n nHuvudresaCar = 'nHuvudresaCar',\n nHuvudresaBike = 'nHuvudresaBike',\n nDelresa = 'nDelresa',\n nReselement = 'nReselement',\n delresaDistanceM = 'delresaDistanceM',\n delresaDurationS = 'delresaDurationS',\n reselementDistanceM = 'reselementDistanceM',\n reselementDurationS = 'reselementDurationS',\n reselementCo2Kg = 'reselementCo2Kg',\n nDelresaDays = 'nDelresaDays',\n nReselementDays = 'nReselementDays',\n one = 'one', // 1\n nAxisX = 'nAxisX',\n}\n\nexport enum Denominator {\n anyDayDivN = 'anyDayDivN',\n travelDayDivN = 'travelDayDivN',\n n = 'n',\n nDelresaDivN = 'nDelresaDivN',\n nReselementDivN = 'nReselementDivN',\n nHuvudresaDivN = 'nHuvudresaDivN',\n one = 'one',\n nDelresaWithDurationDivN = 'nDelresaWithDurationDivN', // Used with StatMethod.weightedTrips\n nDelresaWithDistanceDivN = 'nDelresaWithDistanceDivN', // Used with StatMethod.weightedTrips\n}\n\nexport enum StatMethod {\n estimatingMean = 'estimatingMean',\n estimatingProportion = 'estimatingProportion',\n weightedTrips = 'weightedTrips', // Used to calculate average distance or duration per trip\n}\n\nexport enum ActivityMethod {\n endActivity = 'end-activity',\n notHomeSleep = 'not-home-sleep',\n}\n\nexport enum Axis {\n x = 'x',\n y = 'y',\n}\n\nexport interface AxisFilter {\n includeIds: Array; // int|string|null - list of ids in returned axis to include\n}\n\nexport interface Limits {\n minDistanceM: any; // object map from string to number\n maxDistanceM: any; // object map from string to number\n minDurationS: any; // object map from string to number\n maxDurationS: any; // object map from string to number\n}\n\nexport interface WeightLimits {\n // mininmum number of respondents in a class to weight on corresponding variable.\n // Recommended default: 5\n minClassN : number;\n // minimum number of respondents in total in a variable to weight on it.\n // Recommended default: 50\n minVariableN : number;\n // if exceeding minVariableN, but less than warnVariableN respondents a warning\n // will be issued.\n // Recommended default: 100\n warnVariableN : number;\n}\n\nexport interface Attachment {\n fileName: string;\n content: string;\n}\n\n/* Contains properties defined in a ResultBox */\nexport interface PartialQuery {\n axisX : string;\n axisY : string;\n axisXFilter? : AxisFilter\n axisYFilter? : AxisFilter\n statMethod: StatMethod;\n travelType: TravelType;\n numerator: Numerator;\n denominator : Denominator;\n scaleFactor : number|null; // Scale the result by this value or null to not scale\n enableWeighting : boolean;\n zoneFile : Attachment|null; // [user input]\n shareOutput : boolean|Axis; // should result be post processed so each cell report its ratio of the table total value? [0, 1]\n // If enabled, mapFilterId is calculated by the query (which is then used to fetch result as map tiles) and no\n // further results are calculated. Should be set to false for all normal calculations.\n calculateMapFilter : boolean;\n}\n\n/* Contains all query porperties joining both each ResultBox settings\n * with global filter state and limits and other misc settings\n */\nexport interface Query extends PartialQuery {\n surveyId: number;\n // If this is set to false, corrected days that occur on the join date of each respondent are ignored.\n includeJoinDateInSurvey: boolean;\n filter : FilterStateInterface;\n // (resonable) Limits does not remove the actual trips, but set distanceM := null or\n // durationS := null when trips do not meet the criteria.\n limits : Limits;\n minCellN : number;\n weightLimits : WeightLimits;\n aggregatedModeConfig : AggregatedModeConfig;\n aggregatedActivityConfig : AggregatedActivityConfig;\n\n activityMethod : ActivityMethod; // \"end-activity\" or \"not-home-sleep\"\n nRequiresTrips : boolean; // require trips (that passes filter) to include individual in n (and x)\n vtiReselementMerge : boolean;\n}\n\nexport interface QueryResultCell {\n value : number; // Value in the cell - double\n n : number; // N individuals - integer\n\n // For future use:\n // median : number; - median value - dobule\n // confidenceInterval : Array; // [lower : double, upper : double]\n}\nexport interface QueryResultAxisItem {\n id: number|string;\n label : string|null\n labelTranslations: any|null; // Object map langKey => translated label :string\n}\n\nexport interface MapFilter {\n id: string;\n centroid: Array; // array of length 2\n envelope: Array; // array of length 4\n // eslint-disable-next-line camelcase\n created_at: string; // datetime string\n // eslint-disable-next-line camelcase\n updated_at: string; // datetime string\n}\n\nexport interface QueryResult {\n axisX : Array;\n axisY : Array;\n\n cells : Array>;\n\n mapFilter: MapFilter|null;\n}\n// Located here and not in API to avoid cyclinc dependency\nexport type ResultQueryPromise = Promise>;\n\nexport interface SentQuery {\n id: number; // sendId set locally to find the query again when result is received\n sentTimestamp : number; // unix timestamp in seconds when query was sent\n serializedQuery: string; // query serialized to string\n result: null|QueryResult; // null => not received response yet\n apiPromise : ResultQueryPromise;\n cancelTokenSource: null|CancelTokenSource; // can be used to cancel the request.\n\n // put any id/ticket received from server here\n}\n\nexport interface QueryStateInterface {\n sentQueries: Array\n lastSendId : number; // id of last added query\n}\n","import { PartialQuery, QueryResult } from '../query/types';\n\nexport enum ResultVisual {\n pieChart = 'pie',\n lineChart = 'line',\n barChart = 'bar',\n horizontalBarChart = 'horizontalBar',\n table = 'table',\n factText = 'fact',\n odMatrix = 'od-matrix',\n // Non-computational types:\n sectionHeading = 'heading',\n}\n\n/** Scales displayed result value */\nexport enum ResultFormatter {\n sToMinutes = 'sToMinutes',\n sToHours = 'sToHours',\n mToKm = 'mToKm',\n decToPercent = 'decToPercent'\n}\n\n/** What unit is the result in */\nexport enum ResultUnit {\n minutes = 'minutes',\n hours = 'hours',\n km = 'km',\n kg = 'kg',\n}\n\nexport interface DataColor {\n bgColor: string;\n textColor: string;\n}\n\n// Optional filter overrides that a result box can specify. This allows\n// a ResultBox to override these filters that otherwise usually is set\n// via Filter store\n//\n// The types should be the same as in FilterStateInterface except for\n// an additional undefined type. When an override is non-undefined\n// it is applied.\n//\n// See FilterStateInterface for documentation of these properties.\nexport interface FilterOverride {\n aggregatedModes: undefined|Array;\n // isCommuteToWork: undefined|boolean|null;\n}\n\nexport interface ResultBox {\n id: number; // unique id of box across result boards\n type: ResultVisual;\n colspan: number; // number of columns that the ResultBox spans. If it is more than remaining columns on current\n // row it will cause a row break.\n label: string; // heading/label of result box\n factTextStr: null|string; // name of string in en.json for text\n // based result with placeholder {value}\n\n // Describes how to format/transform ie. cells[0][0] to the value to include\n // in a fact text or use as y value in a graph.\n valueFormatter : null|ResultFormatter;\n valueDecimals : number;\n valueUnit: null|ResultUnit;\n // null: use getAxisXColor and getAxisYColor default\n // array: an array of colors that is cycled.\n // map: a map from axis id to DataColor\n customPalette: null|Array|any;\n\n // May be null for non-computational ResultVisuals like heading.\n partialQuery : null|PartialQuery;\n filterOverride: FilterOverride;\n\n // todo: size/layout props\n}\n\n/**\n * Represent the result board info.\n */\nexport interface ResultBoardInfo {\n image: string;\n imageLabel: string | null;\n palette: string;\n label: string;\n textCol1: string;\n textCol2: string;\n}\n\n/**\n * Represent the result boxes visible on one result board.\n */\nexport interface ResultBoard {\n id: string;\n labelStr: string; // name of string in en.json\n resultBoxes : Array;\n info: ResultBoardInfo | null; // Add a headerbox to the ResultBoard\n}\n\nexport interface ResultBoardStateInterface {\n resultBoards : Array;\n}\n","/**\n * App flavor for data collection app.\n */\nexport enum AppFlavor {\n travelvu = 'travelvu',\n activeTravel = 'activetravel',\n}\n\n/**\n * Corresponds to Survey model in Yii-server\n */\nexport interface Survey {\n readonly id : number;\n readonly appFlavor : AppFlavor;\n readonly label : string;\n readonly description: string;\n readonly startDate : string|null; // YYYY-MM-DD date\n readonly endDate : string|null; // YYYY-MM-DD date\n readonly hasMapData : boolean; // true => map data is available to this survey.\n participateCountAllTime : number|undefined;\n participateCountAllTimeMinOneCorrDay : number|undefined;\n correctedDayInSurveyCount : number|undefined;\n}\n\n/* Declares the state types */\nexport interface SurveyStateInterface {\n surveyList: Array; // list of data sets available to currently logged in user\n selectedSurvey : number; // index to selected data set in surveyList or -1 for no selection\n}\n","import { Axis } from '@/store/modules/query/types';\nimport i18n from '../i18n';\n\n/**\n * Helper to resolveLabel that reduces the type\n * complexity of i18n.fallbackLocale.\n */\nfunction getFallbackLocale() : string|false {\n const fallbackLocale = i18n.fallbackLocale;\n if (typeof fallbackLocale === 'string') {\n return fallbackLocale;\n } else {\n // We only use string config in our app.\n console.assert(false, 'String i18n fallback config');\n return false;\n }\n}\n\n/**\n * Resolves label text for mixed label from server.\n * The label can either have texts in one or more languages\n * or be a string starting with 'i18n:' following with a local\n * string id for i18n or be a raw text.\n * It is also possible that there exist a map with translations\n * for one or more langKeys.\n * Priority: if both label and labelTranslations is non-null, then\n * label has higher priority.\n * @param label string 'i18n:' or plain text label or null\n * @param labelTranslations map { langKey => translated label } or null.\n */\nexport default function resolveLabel(label : string|null, labelTranslations: any|null) : string {\n // Use plain text label if it is non-null\n if (label !== null) {\n if (label === '') return '';\n\n if (label.startsWith('i18n:')) {\n return i18n.tc(label.substr('i18n:'.length));\n }\n\n return label;\n }\n\n // Else use translations map (if it is non-null)\n if (labelTranslations === null) {\n return '';\n }\n if (labelTranslations[i18n.locale] !== undefined) {\n return labelTranslations[i18n.locale];\n }\n const fallbackLocale = getFallbackLocale();\n if (fallbackLocale !== false && labelTranslations[fallbackLocale] !== undefined) {\n return labelTranslations[fallbackLocale];\n }\n\n // For now beyond selected locale and fallbackLocale there is\n // no hard coded prio order of languages in TravelViewer the\n // same way as in yii-server and the app.\n for (let i = 0; i < i18n.availableLocales.length; i += 1) {\n const langKey = i18n.availableLocales[i];\n if (labelTranslations[langKey] !== undefined) {\n return labelTranslations[langKey];\n }\n }\n\n return '';\n}\n\n/** copy labelTranslations to new JS object */\nexport function copyLabelTranslations(labelTranslations : any|null) : any|null {\n const r : any = {};\n for (let i = 0; i < i18n.availableLocales.length; i += 1) {\n const langKey = i18n.availableLocales[i];\n r[langKey] = labelTranslations[langKey];\n }\n return r;\n}\n\n/**\n * Translate axis (query.axisX or query.axisY)\n *\n * Not all axises have translations and in that case the\n * raw axis is returned.\n *\n * Uses current language\n * @param axis\n * @returns translated string\n */\nexport function axisTranslation(axis : string) {\n if (axis === '\"from zone\"') {\n return i18n.t('axis.from-zone');\n } else if (axis === '\"to zone\"') {\n return i18n.t('axis.to-zone');\n }\n return axis;\n}\n\n/**\n * Get translated label for Query.shareOutput\n * @param shareOutput Query.shareOutput value\n * @returns translated string\n */\nexport function shareOutputLabel(shareOutput : boolean|Axis): string {\n if (shareOutput === Axis.x) {\n return 'x';\n } else if (shareOutput === Axis.y) {\n return 'y';\n } else {\n return shareOutput === true ? i18n.tc('state.on') : i18n.tc('state.off');\n }\n}\n","/**\n * Output date string in format 'YYYY-MM-DD' from a Date object\n * @param dateObj JavaScript Date object\n */\nexport function date2YMDString(dateObj : Date) : string {\n const z = (val : number) => {\n let s = val.toString();\n if (s.length === 1) s = `0${s}`;\n return s;\n };\n if (dateObj == null) return '';\n return `${dateObj.getFullYear()}-${z(dateObj.getMonth() + 1)}-${z(dateObj.getDate())}`; // Months are zero-based in JS\n}\n\n/**\n * Convert date string in format 'YYYY-MM-DD' to a Date object\n * @param dateStr string on format 'YYYY-MM-DD'.\n * @return Date object\n */\nexport function ymdString2date(dateStr : string) : Date|null {\n return new Date(dateStr);\n}\n\n/**\n * Formats given YYYY-MM-DD date string to local date string if\n * date is non-null. If date is null, then nullString is returned\n * instead.\n * @param dateStr date on YYYY-MM-DD format or null\n * @param nullString localized text to display if dateStr is null\n * @param locale this.$i18n.locale\n */\nexport function formatYmdString(dateStr : string|null, nullString : string, locale : string) {\n const dateFormatter = new Intl.DateTimeFormat(locale);\n if (dateStr !== null) {\n const date = ymdString2date(dateStr);\n if (date !== null) {\n return dateFormatter.format(date);\n }\n }\n return nullString;\n}\n\n/**\n * Convert time in seconds since 00:00 to a date object\n * @param time seconds since 00:00\n */\nexport function seconds2date(time : number) : Date {\n const date = new Date();\n date.setHours(0);\n date.setMinutes(0);\n date.setSeconds(time);\n return date;\n}\n\n/**\n * Convert a date from eg. time2date back to seconds since 00:00\n * @param dateObj Date object with hours, minutes and seconds set.\n */\nexport function date2seconds(dateObj : Date) : number {\n return dateObj.getHours() * 3600 + dateObj.getMinutes() * 60 + dateObj.getSeconds();\n}\n\n/**\n * Output time string in format 'HH:MM' from a Date object\n * @param dateObj JavaScript Date object\n * @return string\n */\nexport function date2HMString(dateObj : Date) : string {\n let h = dateObj.getHours().toString();\n let m = dateObj.getMinutes().toString();\n if (h.length < 2) h = `0${h}`;\n if (m.length < 2) m = `0${m}`;\n return `${h}:${m}`;\n}\n\n/**\n * Returns a new date object of the day after dateObj\n * @param dateObj JavaScript Date object\n * @return JavaScript Date object\n */\nexport function dateGetDayAfter(dateObj : Date) : Date {\n const dateCopy = new Date(dateObj);\n dateCopy.setDate(dateCopy.getDate() + 1);\n return dateCopy;\n}\n\n/**\n * Returns a new date object of the day before dateObj\n * @param dateObj JavaScript Date object\n * @return JavaScript Date object\n */\nexport function dateGetDayBefore(dateObj : Date) : Date {\n const dateCopy = new Date(dateObj);\n dateCopy.setDate(dateCopy.getDate() - 1);\n return dateCopy;\n}\n\n/**\n * Returns a new date object of the first day in the\n * current ISO-8601 week (mon-sun) of given date object.\n * @param dateObj JavaScript Date object\n * @return JavaScript Date object of a Monday\n */\nexport function dateGetFirstDayOfWeek(dateObj : Date) : Date {\n const dateCopy = new Date(dateObj);\n let i = 0;\n while (dateCopy.getDay() !== 1) {\n dateCopy.setDate(dateCopy.getDate() - 1);\n\n i += 1;\n if (i > 1000) break;\n }\n return dateCopy;\n}\n\n/**\n * Returns a new date object of the last day in the\n * current ISO-8601 week (mon-sun) of given date object.\n * @param dateObj JavaScript Date object\n * @return JavaScript Date object of a Sunday\n */\nexport function dateGetLastDayOfWeek(dateObj : Date) : Date {\n const dateCopy = new Date(dateObj);\n let i = 0;\n while (dateCopy.getDay() !== 0) {\n dateCopy.setDate(dateCopy.getDate() + 1);\n\n i += 1;\n if (i > 1000) break;\n }\n return dateCopy;\n}\n\n/**\n * Returns date 'YYYY-MM-DD' of the day before for given 'YYYY-MM-DD' date string\n * @param dateStr string on format 'YYYY-MM-DD'.\n * @return string|null\n */\nexport function stringGetDayAfter(dateStr : string) : string|null {\n const d = ymdString2date(dateStr);\n if (d !== null) {\n return date2YMDString(dateGetDayAfter(d));\n }\n\n return null;\n}\n\n/**\n * Returns a new date object of the day before date_obj\n * @param dateStr string on format 'YYYY-MM-DD'.\n * @return string|null\n */\nexport function stringGetDayBefore(dateStr : string) : string|null {\n const d = ymdString2date(dateStr);\n if (d !== null) {\n return date2YMDString(dateGetDayBefore(d));\n }\n\n return null;\n}\n\n/**\n * Returns 'HH:MM (YYYY-MM-DD)' string\n * @param timestamp Unix timestamp in seconds\n */\nexport function timestamp2timeDateStr(timestamp : number) : string {\n const dateObj = new Date(timestamp * 1000);\n return `${date2HMString(dateObj)} (${date2YMDString(dateObj)})`;\n}\n\n/**\n * Returns the current time as unix timestamp in seconds.\n */\nexport function currentTimestamp() : number {\n return Math.floor(((new Date()).getTime()) / 1000);\n}\n\n/**\n * Return the delta time in seconds to add to UTC time in order to get\n * what the clock was in local time according to the timezone of the browser.\n */\nexport function currentTzDeltaMin() : number {\n // value (in seconds) to add to UTC time to get local time\n return -(new Date()).getTimezoneOffset();\n}\n","/**\n * Checks if user has access to given feature\n * @param feature Feature id\n * @returns true if user has access\n */\nexport default function hasFeature(feature: string): boolean {\n const params = new URLSearchParams(window.location.search.toLowerCase());\n return params.get(`unlock${feature.toLowerCase()}`) !== null;\n}\n","/**\n * Drop in replacement to console class\n * that only enable log if VUE_APP_ENABLE_LOG\n * is set to 1 in .env\n */\nexport default class Log {\n /* eslint no-console: [\"off\", {}}] */\n\n /** Check if log is enabled */\n public static isLogEnabled() : boolean {\n return process.env.VUE_APP_ENABLE_LOG === '1';\n }\n\n public static log(...args: any[]) : void {\n if (Log.isLogEnabled()) {\n console.log(...args);\n }\n }\n\n public static warn(...args: any[]) : void {\n if (Log.isLogEnabled()) {\n console.warn(...args);\n }\n }\n\n public static error(...args: any[]) : void {\n if (Log.isLogEnabled()) {\n console.error(...args);\n }\n }\n\n public static time(...args: any[]) : void {\n if (Log.isLogEnabled()) {\n console.time(...args);\n }\n }\n\n public static timeEnd(...args: any[]) : void {\n if (Log.isLogEnabled()) {\n console.timeEnd(...args);\n }\n }\n}\n","import i18n from '@/i18n';\nimport {\n Activity, AggregatedActivity, AggregatedMode, Mode,\n} from '@/store/modules/mode-activity/types';\nimport { copyLabelTranslations } from './I18nLabel';\nimport palette from './palette';\n\n/**\n * Get mode by id\n * @param id Mode id\n * @return Mode or null if mode was not found\n */\nfunction getMode(id : string, modes:Array) : Mode|null {\n const mode = modes.find((m : Mode) => m.id === id);\n if (mode === undefined) return null;\n return mode;\n}\n\n/**\n * Get activity by id\n * @param id Activity id\n * @return Activity or null if activity was not found\n */\nfunction getActivity(id : string, activities:Array) : Activity|null {\n const activity = activities.find((a : Activity) => a.id === id);\n if (activity === undefined) return null;\n return activity;\n}\n\n/**\n * Get labelTranslations object by looking up\n * given string in app locale strings.\n * @param strId\n * @return object that maps from locale to translation\n */\nfunction getTranslations(strId : string) : any {\n const r : any = {};\n i18n.availableLocales.forEach((locale: string) => {\n r[locale] = i18n.t(strId, locale);\n });\n return r;\n}\n\n/** Creates a aggregate setup that just 1:1 mirrors available modes */\nexport function getNoAggregateModes(modes : Array) : Array {\n const aggregatedModes = modes\n .filter((m : Mode) => m.inSurvey)\n .map((m : Mode) : AggregatedMode => {\n const mode = {\n id: 0,\n order: m.order,\n labelTranslations: copyLabelTranslations(m.labelTranslations),\n bgColor: m.bgColor,\n textColor: m.textColor,\n borderColor: m.borderColor,\n svgIconBgColor: m.svgIconBgColor,\n svgIconBlack: m.svgIconBlack,\n modeList: [m.id],\n };\n if (m.id === 'OTHR') {\n mode.modeList.push(\n ...modes.filter((m2 : Mode) => !m2.inSurvey).map((m2 : Mode) => m2.id),\n );\n }\n return mode;\n });\n\n // assign some ids\n for (let i = 0; i < aggregatedModes.length; i += 1) {\n aggregatedModes[i].id = i;\n }\n\n // sort by order\n aggregatedModes.sort((a, b) => a.order - b.order);\n\n return aggregatedModes;\n}\n\n/** Creates a aggregate setup that just 1:1 mirrors available activities */\nexport function getNoAggregateActivities(activities : Array) : Array {\n const aggregatedActivities = activities\n .filter((a : Activity) => a.inSurvey)\n .map((a : Activity) : AggregatedActivity => {\n const activity = {\n id: 0,\n order: a.order,\n labelTranslations: copyLabelTranslations(a.labelTranslations),\n svgIconBgColor: a.svgIconBgColor,\n svgIconBlack: a.svgIconBlack,\n activityList: [a.id],\n };\n if (a.id === 'OTHR') {\n activity.activityList.push(\n ...activities.filter((a2 : Activity) => !a2.inSurvey)\n .map((a2 : Activity) => a2.id),\n );\n }\n return activity;\n });\n\n // assign some ids\n for (let i = 0; i < aggregatedActivities.length; i += 1) {\n aggregatedActivities[i].id = i;\n }\n\n // sort by order\n aggregatedActivities.sort((a, b) => a.order - b.order);\n\n return aggregatedActivities;\n}\n\n/** A aggregate with a few main modes */\nexport function getMainAggregateModes(modes: Array) : Array {\n const car = getMode('CAR_', modes);\n const walk = getMode('WALK', modes);\n const bike = getMode('BIKE', modes);\n const exercice = getMode('EXRC', modes);\n const air = getMode('AIR_', modes);\n const other = getMode('OTHR', modes);\n\n /* eslint quote-props: \"off\" */\n const aggregatedModes = [\n {\n id: 0,\n order: 0,\n labelTranslations: walk !== null\n ? copyLabelTranslations(walk.labelTranslations)\n : { 'en': 'Walk' },\n bgColor: palette[3], // walk green\n textColor: palette['3a'],\n borderColor: palette['3c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: ['WALK'],\n },\n {\n id: 1,\n order: 1,\n labelTranslations: exercice !== null\n ? copyLabelTranslations(exercice.labelTranslations)\n : { 'en': 'Exercise and recreation' },\n bgColor: exercice !== null ? exercice.bgColor : palette[4],\n textColor: exercice !== null ? exercice.textColor : palette['4a'],\n borderColor: exercice !== null ? exercice.borderColor : palette['4c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: ['EXRC'],\n },\n {\n id: 2,\n order: 2,\n labelTranslations: bike !== null\n ? copyLabelTranslations(bike.labelTranslations)\n : { 'en': 'Bicycle' },\n bgColor: palette[5], // yellow-orange\n textColor: palette['5a'],\n borderColor: palette['5c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: ['BIKE', 'EBKE', 'CBKE', 'SBIK'],\n },\n {\n id: 3,\n order: 3,\n labelTranslations: getTranslations('aggregated-mode.public-transport'),\n bgColor: palette[1], // blue (same as metro/tram)\n textColor: palette['1a'],\n borderColor: palette['1c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: ['BUS_', 'METR', 'TRAM', 'TRN_', 'CTRN', 'CABE', 'CBUS'],\n },\n {\n id: 4,\n order: 4,\n labelTranslations: car !== null\n ? copyLabelTranslations(car.labelTranslations)\n : { 'en': 'Car' },\n bgColor: palette[4], // magenta\n textColor: palette['4a'],\n borderColor: palette['4c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: [\n 'CAR_', 'ECAR', 'NCAR', 'PCAR', 'BCAR', 'SCAR', 'CARD', 'CARP', 'ECRD', 'ECRP', 'NCRD', 'NCRP', 'RCAR',\n ],\n },\n {\n id: 5,\n order: 5,\n labelTranslations: air !== null\n ? copyLabelTranslations(air.labelTranslations)\n : { 'en': 'Airplane' },\n bgColor: palette['2b'],\n textColor: palette['2c'],\n borderColor: palette['2a'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: ['AIR_'],\n },\n // This need to be last in order to have all remaining modes added to modeList\n {\n id: 6,\n order: 6,\n labelTranslations: other !== null\n ? copyLabelTranslations(other.labelTranslations)\n : { 'en': 'Other' },\n bgColor: palette[2], // purple\n textColor: palette['2a'],\n borderColor: palette['2c'],\n svgIconBgColor: '',\n svgIconBlack: '',\n modeList: [],\n },\n ];\n // Add all unused modes to Other aggregated mode\n let usedModes : Array = [];\n aggregatedModes.forEach((am : AggregatedMode) => {\n usedModes = usedModes.concat(am.modeList);\n });\n modes.forEach((m : Mode) => {\n if (usedModes.indexOf(m.id) === -1) {\n aggregatedModes[aggregatedModes.length - 1].modeList.push(m.id);\n }\n });\n\n return aggregatedModes;\n}\n\n/** A aggregate with a few main activities */\nexport function getMainAggregateActivities(activities: Array) : Array {\n const work = getActivity('WORK', activities);\n const shop = getActivity('SHOP', activities);\n const edu = getActivity('EDU_', activities);\n const home = getActivity('HOME', activities);\n const other = getActivity('OTHR', activities);\n\n /* eslint quote-props: \"off\" */\n const aggregatedActivities = [\n {\n id: 0,\n order: 0,\n labelTranslations: work !== null\n ? copyLabelTranslations(work.labelTranslations)\n : { 'en': 'Work' },\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['WORK', 'BSTR'],\n },\n {\n id: 1,\n order: 1,\n labelTranslations: edu !== null\n ? copyLabelTranslations(edu.labelTranslations)\n : { 'en': 'Education' },\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['EDU_'],\n },\n {\n id: 2,\n order: 2,\n labelTranslations: shop !== null\n ? copyLabelTranslations(shop.labelTranslations)\n : { 'en': 'Shopping' },\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['SHOP', 'SHOG', 'SHOO'],\n },\n {\n id: 3,\n order: 3,\n labelTranslations: getTranslations('aggregated-activity.service'),\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['OSRV', 'HEAL', 'CHIL', 'PICC', 'PICO', 'PICG', 'PICD', 'RECY'],\n },\n {\n id: 4,\n order: 4,\n labelTranslations: getTranslations('aggregated-activity.leisure'),\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['ENTE', 'HOBY', 'REST', 'RUN_', 'VIST'],\n },\n {\n id: 5,\n order: 5,\n labelTranslations: home !== null\n ? copyLabelTranslations(home.labelTranslations)\n : { 'en': 'Home' },\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: ['HOME', 'SLEP'],\n },\n // This need to be last in order to have all remaining activities added to modeList\n {\n id: 6,\n order: 6,\n labelTranslations: other !== null\n ? copyLabelTranslations(other.labelTranslations)\n : { 'en': 'Other' },\n svgIconBgColor: '',\n svgIconBlack: '',\n activityList: [],\n },\n ];\n // Add all unused modes to Other aggregated activity\n let usedActivities : Array = [];\n aggregatedActivities.forEach((aa : AggregatedActivity) => {\n usedActivities = usedActivities.concat(aa.activityList);\n });\n activities.forEach((a : Activity) => {\n if (usedActivities.indexOf(a.id) === -1) {\n aggregatedActivities[aggregatedActivities.length - 1].activityList.push(a.id);\n }\n });\n\n return aggregatedActivities;\n}\n\n/**\n * Return list of aggregated mode ids that represent the given list of modes.\n *\n * @param aggregatedModes aggregated modes config\n * @param searchList array of mode ids to search for\n * @param requireFullMatch If true, the found aggregated modes must only\n * contain modes in searchList. If there are an aggregated mode which mixed\n * content, this method will fail and return an empty list.\n */\nexport function getAggregatesForModes(\n aggregatedModes: Array,\n searchList: Array,\n requireFullMatch: boolean,\n) : Array {\n const result: Array = [];\n let fullMatch = true;\n aggregatedModes.forEach((am) => {\n const nActive = am.modeList.reduce(\n (n, curr) => n + (searchList.includes(curr) ? 1 : 0),\n 0,\n );\n if (requireFullMatch\n ? nActive === am.modeList.length\n : nActive > 0) {\n result.push(am.id);\n } else if (nActive !== 0) {\n fullMatch = false;\n }\n });\n if (requireFullMatch && !fullMatch) {\n return [];\n }\n return result;\n}\n\n/**\n * Return list of aggregated mode ids that represent active modes of transport.\n *\n * If it is the case that there are aggregarted modes that contain a mix of active\n * and non-active modes of transport, then this method will fail and return an empty list.\n */\nexport function getActiveTransportAggregatedModes(aggregatedModes: Array) : Array {\n const activeModes = ['WALK', 'EXRC', 'BIKE', 'EBKE', 'CBKE', 'SBIK'];\n return getAggregatesForModes(aggregatedModes, activeModes, true);\n}\n\n/**\n * Return list of aggregated mode ids that consist of modes that emit emissions\n */\nexport function getEmissionAggregatedModes(aggregatedModes: Array) : Array {\n const emisisonModes = ['CAR_', 'BUS_', 'AIR_'];\n return getAggregatesForModes(aggregatedModes, emisisonModes, false);\n}\n","/* eslint quote-props: [\"off\", {}}] */\n/* eslint key-spacing: [\"off\", {}}] */\n/* eslint object-property-newline: [\"off\", {}}] */\n/* eslint max-len: [\"off\", {}}] */\n\n/**\n * The graph needs colors in JS. this palette should have same colors as the\n * palette in _variables.scss\n */\nexport default {\n '1': '#3961FF', '1a': '#071756', '1b': '#203EB3', '1c': '#93A9FD', '1d': '#D3DCFF',\n '2': '#BB7DDD', '2a': '#49076E', '2b': '#7A2DA4', '2c': '#E3AFFF', '2d': '#F0D5FF',\n '3': '#63C8A0', '3a': '#004027', '3b': '#229567', '3c': '#8AEEC6', '3d': '#C2FFE7',\n '4': '#F56B92', '4a': '#850328', '4b': '#C72E59', '4c': '#FFA4BE', '4d': '#FFD7E2',\n '5': '#F6914E', '5a': '#A74402', '5b': '#D96C23', '5c': '#FFB27F', '5d': '#FFD7BC',\n 'grey': '#C3C8D6', 'grey-a': '#18191E', 'grey-b': '#545B6F', 'grey-c': '#A0A4B0', 'grey-d': '#E9EAEE',\n\n 'black': '#18191E',\n 'white': '#ffffff',\n};\n","var map = {\n\t\"./af\": 2496,\n\t\"./af.js\": 2496,\n\t\"./ar\": 186,\n\t\"./ar-dz\": 6881,\n\t\"./ar-dz.js\": 6881,\n\t\"./ar-kw\": 6265,\n\t\"./ar-kw.js\": 6265,\n\t\"./ar-ly\": 451,\n\t\"./ar-ly.js\": 451,\n\t\"./ar-ma\": 8625,\n\t\"./ar-ma.js\": 8625,\n\t\"./ar-sa\": 8819,\n\t\"./ar-sa.js\": 8819,\n\t\"./ar-tn\": 7092,\n\t\"./ar-tn.js\": 7092,\n\t\"./ar.js\": 186,\n\t\"./az\": 4421,\n\t\"./az.js\": 4421,\n\t\"./be\": 7067,\n\t\"./be.js\": 7067,\n\t\"./bg\": 3871,\n\t\"./bg.js\": 3871,\n\t\"./bm\": 4242,\n\t\"./bm.js\": 4242,\n\t\"./bn\": 8189,\n\t\"./bn-bd\": 2507,\n\t\"./bn-bd.js\": 2507,\n\t\"./bn.js\": 8189,\n\t\"./bo\": 5799,\n\t\"./bo.js\": 5799,\n\t\"./br\": 7803,\n\t\"./br.js\": 7803,\n\t\"./bs\": 8434,\n\t\"./bs.js\": 8434,\n\t\"./ca\": 4581,\n\t\"./ca.js\": 4581,\n\t\"./cs\": 8004,\n\t\"./cs.js\": 8004,\n\t\"./cv\": 4464,\n\t\"./cv.js\": 4464,\n\t\"./cy\": 163,\n\t\"./cy.js\": 163,\n\t\"./da\": 803,\n\t\"./da.js\": 803,\n\t\"./de\": 233,\n\t\"./de-at\": 7607,\n\t\"./de-at.js\": 7607,\n\t\"./de-ch\": 6777,\n\t\"./de-ch.js\": 6777,\n\t\"./de.js\": 233,\n\t\"./dv\": 6969,\n\t\"./dv.js\": 6969,\n\t\"./el\": 9618,\n\t\"./el.js\": 9618,\n\t\"./en-au\": 9245,\n\t\"./en-au.js\": 9245,\n\t\"./en-ca\": 5036,\n\t\"./en-ca.js\": 5036,\n\t\"./en-gb\": 1438,\n\t\"./en-gb.js\": 1438,\n\t\"./en-ie\": 6053,\n\t\"./en-ie.js\": 6053,\n\t\"./en-il\": 134,\n\t\"./en-il.js\": 134,\n\t\"./en-in\": 847,\n\t\"./en-in.js\": 847,\n\t\"./en-nz\": 1363,\n\t\"./en-nz.js\": 1363,\n\t\"./en-sg\": 9022,\n\t\"./en-sg.js\": 9022,\n\t\"./eo\": 8990,\n\t\"./eo.js\": 8990,\n\t\"./es\": 9817,\n\t\"./es-do\": 8155,\n\t\"./es-do.js\": 8155,\n\t\"./es-mx\": 952,\n\t\"./es-mx.js\": 952,\n\t\"./es-us\": 9358,\n\t\"./es-us.js\": 9358,\n\t\"./es.js\": 9817,\n\t\"./et\": 5396,\n\t\"./et.js\": 5396,\n\t\"./eu\": 4338,\n\t\"./eu.js\": 4338,\n\t\"./fa\": 7030,\n\t\"./fa.js\": 7030,\n\t\"./fi\": 2292,\n\t\"./fi.js\": 2292,\n\t\"./fil\": 3578,\n\t\"./fil.js\": 3578,\n\t\"./fo\": 8900,\n\t\"./fo.js\": 8900,\n\t\"./fr\": 6067,\n\t\"./fr-ca\": 8362,\n\t\"./fr-ca.js\": 8362,\n\t\"./fr-ch\": 9404,\n\t\"./fr-ch.js\": 9404,\n\t\"./fr.js\": 6067,\n\t\"./fy\": 6742,\n\t\"./fy.js\": 6742,\n\t\"./ga\": 8152,\n\t\"./ga.js\": 8152,\n\t\"./gd\": 6920,\n\t\"./gd.js\": 6920,\n\t\"./gl\": 7234,\n\t\"./gl.js\": 7234,\n\t\"./gom-deva\": 2759,\n\t\"./gom-deva.js\": 2759,\n\t\"./gom-latn\": 7054,\n\t\"./gom-latn.js\": 7054,\n\t\"./gu\": 8166,\n\t\"./gu.js\": 8166,\n\t\"./he\": 8927,\n\t\"./he.js\": 8927,\n\t\"./hi\": 2153,\n\t\"./hi.js\": 2153,\n\t\"./hr\": 9329,\n\t\"./hr.js\": 9329,\n\t\"./hu\": 2782,\n\t\"./hu.js\": 2782,\n\t\"./hy-am\": 5023,\n\t\"./hy-am.js\": 5023,\n\t\"./id\": 6655,\n\t\"./id.js\": 6655,\n\t\"./is\": 0,\n\t\"./is.js\": 0,\n\t\"./it\": 5107,\n\t\"./it-ch\": 3045,\n\t\"./it-ch.js\": 3045,\n\t\"./it.js\": 5107,\n\t\"./ja\": 9175,\n\t\"./ja.js\": 9175,\n\t\"./jv\": 4853,\n\t\"./jv.js\": 4853,\n\t\"./ka\": 8684,\n\t\"./ka.js\": 8684,\n\t\"./kk\": 312,\n\t\"./kk.js\": 312,\n\t\"./km\": 1271,\n\t\"./km.js\": 1271,\n\t\"./kn\": 7256,\n\t\"./kn.js\": 7256,\n\t\"./ko\": 4833,\n\t\"./ko.js\": 4833,\n\t\"./ku\": 5258,\n\t\"./ku.js\": 5258,\n\t\"./ky\": 3430,\n\t\"./ky.js\": 3430,\n\t\"./lb\": 7665,\n\t\"./lb.js\": 7665,\n\t\"./lo\": 2238,\n\t\"./lo.js\": 2238,\n\t\"./lt\": 920,\n\t\"./lt.js\": 920,\n\t\"./lv\": 8769,\n\t\"./lv.js\": 8769,\n\t\"./me\": 818,\n\t\"./me.js\": 818,\n\t\"./mi\": 5722,\n\t\"./mi.js\": 5722,\n\t\"./mk\": 7117,\n\t\"./mk.js\": 7117,\n\t\"./ml\": 9904,\n\t\"./ml.js\": 9904,\n\t\"./mn\": 8590,\n\t\"./mn.js\": 8590,\n\t\"./mr\": 9544,\n\t\"./mr.js\": 9544,\n\t\"./ms\": 176,\n\t\"./ms-my\": 8850,\n\t\"./ms-my.js\": 8850,\n\t\"./ms.js\": 176,\n\t\"./mt\": 291,\n\t\"./mt.js\": 291,\n\t\"./my\": 4830,\n\t\"./my.js\": 4830,\n\t\"./nb\": 4893,\n\t\"./nb.js\": 4893,\n\t\"./ne\": 8782,\n\t\"./ne.js\": 8782,\n\t\"./nl\": 8337,\n\t\"./nl-be\": 2297,\n\t\"./nl-be.js\": 2297,\n\t\"./nl.js\": 8337,\n\t\"./nn\": 8272,\n\t\"./nn.js\": 8272,\n\t\"./oc-lnc\": 277,\n\t\"./oc-lnc.js\": 277,\n\t\"./pa-in\": 6198,\n\t\"./pa-in.js\": 6198,\n\t\"./pl\": 5231,\n\t\"./pl.js\": 5231,\n\t\"./pt\": 3141,\n\t\"./pt-br\": 9626,\n\t\"./pt-br.js\": 9626,\n\t\"./pt.js\": 3141,\n\t\"./ro\": 2797,\n\t\"./ro.js\": 2797,\n\t\"./ru\": 48,\n\t\"./ru.js\": 48,\n\t\"./sd\": 23,\n\t\"./sd.js\": 23,\n\t\"./se\": 7339,\n\t\"./se.js\": 7339,\n\t\"./si\": 2851,\n\t\"./si.js\": 2851,\n\t\"./sk\": 9764,\n\t\"./sk.js\": 9764,\n\t\"./sl\": 646,\n\t\"./sl.js\": 646,\n\t\"./sq\": 1751,\n\t\"./sq.js\": 1751,\n\t\"./sr\": 9016,\n\t\"./sr-cyrl\": 1368,\n\t\"./sr-cyrl.js\": 1368,\n\t\"./sr.js\": 9016,\n\t\"./ss\": 1943,\n\t\"./ss.js\": 1943,\n\t\"./sv\": 5095,\n\t\"./sv.js\": 5095,\n\t\"./sw\": 6014,\n\t\"./sw.js\": 6014,\n\t\"./ta\": 1571,\n\t\"./ta.js\": 1571,\n\t\"./te\": 4819,\n\t\"./te.js\": 4819,\n\t\"./tet\": 8646,\n\t\"./tet.js\": 8646,\n\t\"./tg\": 8641,\n\t\"./tg.js\": 8641,\n\t\"./th\": 5714,\n\t\"./th.js\": 5714,\n\t\"./tk\": 7082,\n\t\"./tk.js\": 7082,\n\t\"./tl-ph\": 9830,\n\t\"./tl-ph.js\": 9830,\n\t\"./tlh\": 8757,\n\t\"./tlh.js\": 8757,\n\t\"./tr\": 3571,\n\t\"./tr.js\": 3571,\n\t\"./tzl\": 6785,\n\t\"./tzl.js\": 6785,\n\t\"./tzm\": 4924,\n\t\"./tzm-latn\": 9126,\n\t\"./tzm-latn.js\": 9126,\n\t\"./tzm.js\": 4924,\n\t\"./ug-cn\": 2134,\n\t\"./ug-cn.js\": 2134,\n\t\"./uk\": 3350,\n\t\"./uk.js\": 3350,\n\t\"./ur\": 3397,\n\t\"./ur.js\": 3397,\n\t\"./uz\": 8556,\n\t\"./uz-latn\": 3562,\n\t\"./uz-latn.js\": 3562,\n\t\"./uz.js\": 8556,\n\t\"./vi\": 7751,\n\t\"./vi.js\": 7751,\n\t\"./x-pseudo\": 1505,\n\t\"./x-pseudo.js\": 1505,\n\t\"./yo\": 5943,\n\t\"./yo.js\": 5943,\n\t\"./zh-cn\": 4186,\n\t\"./zh-cn.js\": 4186,\n\t\"./zh-hk\": 2243,\n\t\"./zh-hk.js\": 2243,\n\t\"./zh-mo\": 5437,\n\t\"./zh-mo.js\": 5437,\n\t\"./zh-tw\": 3843,\n\t\"./zh-tw.js\": 3843\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 6700;","var map = {\n\t\"./da.json\": 5638,\n\t\"./de.json\": 9929,\n\t\"./en.json\": 790,\n\t\"./fr.json\": 844,\n\t\"./it.json\": 504,\n\t\"./no.json\": 438,\n\t\"./sv.json\": 3244\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 3251;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + ({\"148\":\"sample\",\"177\":\"home\",\"237\":\"analysis\",\"273\":\"user-profile\",\"504\":\"edit-sample-variables\",\"535\":\"login\",\"551\":\"support\",\"587\":\"weighting\",\"999\":\"survey\"}[chunkId] || chunkId) + \".\" + {\"42\":\"e0371fa8\",\"148\":\"574600f8\",\"177\":\"bcd09176\",\"237\":\"0d2cf1cd\",\"273\":\"1ae3077c\",\"387\":\"f489903f\",\"504\":\"2f57b1b5\",\"535\":\"305ea22d\",\"551\":\"f078cdec\",\"587\":\"105ec76c\",\"999\":\"3b356ac0\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"css/\" + {\"148\":\"sample\",\"177\":\"home\",\"237\":\"analysis\",\"273\":\"user-profile\",\"504\":\"edit-sample-variables\",\"535\":\"login\",\"551\":\"support\",\"587\":\"weighting\",\"999\":\"survey\"}[chunkId] + \".\" + {\"148\":\"8b6c5f63\",\"177\":\"4d5a3e27\",\"237\":\"f7378101\",\"273\":\"e078261e\",\"504\":\"15e7030b\",\"535\":\"7dd455bf\",\"551\":\"6d5650b3\",\"587\":\"8b6c5f63\",\"999\":\"69775b4f\"}[chunkId] + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var inProgress = {};\nvar dataWebpackPrefix = \"travelviewer-ui:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = function(chunkId, fullhref, oldTag, resolve, reject) {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tvar onLinkComplete = function(event) {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + realHref + \")\");\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = function(href, fullhref) {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = function(chunkId) {\n\treturn new Promise(function(resolve, reject) {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t143: 0\n};\n\n__webpack_require__.f.miniCss = function(chunkId, promises) {\n\tvar cssChunks = {\"148\":1,\"177\":1,\"237\":1,\"273\":1,\"504\":1,\"535\":1,\"551\":1,\"587\":1,\"999\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(function() {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, function(e) {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunktravelviewer_ui\"] = self[\"webpackChunktravelviewer_ui\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(9786); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["apiUrl","parseFlavorStr","str","toLocaleLowerCase","Flavor","getFlavorData","flavor","id","name","appFlavor","AppFlavor","supportUrl","appSupportUrl","vueAppFlavor","process","flavorOrNull","Error","flavorDataOrNull","flavorData","loadLocaleMessages","jest","locales","require","messages","keys","forEach","key","matched","match","length","locale","localeMessages","Object","undefined","replaceAll","getDefaultLanguage","defaultLang","navigator","language","userLanguage","substring","indexOf","Vue","VueI18n","fallbackLocale","render","_vm","this","_c","_self","_setupProxy","attrs","staticRenderFns","App","mounted","Chart","ChartDataLabels","__decorate","Component","components","component","authHeaders","token","headers","Authorization","async","surveyId","config","params","URLSearchParams","toString","axios","variables","data","map","variable","classes","cls","targetPopulation","weightOn","variableIds","variableId","query","cancelToken","api","username","password","modeApi","activityApi","sampleApi","queryApi","namespaced","state","user","isLoggedIn","mutations","setUser","setToken","setLoggedIn","loggedIn","getters","actions","context","response","login","access_token","localStorage","setItem","commit","dispatch","error","removeItem","getMe","localToken","getItem","surveyList","selectedSurvey","clear","selectSurvey","index","findIndex","s","setSurveyList","load","Promise","resolve","reject","getSurveyList","rootState","surveys","filter","sort","a","b","startDate","label","e","status","console","log","root","loadDetails","payload","getSurveyDetails","survey","find","correctedDayInSurveyCount","participateCountAllTime","getAll","getSelected","getVariableExpandedStorageKey","loadError","setVariables","rows","setLoadError","setIsExpanded","row","r","isExpanded","storeKey","window","JSON","stringify","setWeightOn","oldValue","rootGetters","setTargetPopulation","rejected","clsParams","c","classId","addVariable","oldVariables","push","createVariables","updateVariable","rowIndex","updateVariables","deleteVariable","splice","deleteVariables","getSampleVariables","s2","i","resolveLabel","labelTranslations","storedValue","parse","randomWeigthedSample","allOk","isTargetPopulationSum1","assignWeight","weightedSample","Math","random","sum","sum1","abs","isShare","isLoaded","isLoadError","flatLabelsToMap","maData","startsWith","langKey","toLowerCase","getMode","mode","modes","m","getActivity","activity","activities","getModeColorMap","aggregatedModes","am","modeList","modeId","bgColor","textColor","borderColor","getSurveyModes","inSurvey","getSurveyActivities","getAggregatedModesExcludingExercice","aggregatedState","amStr","order","join","aggregatedActivities","aa","aaStr","activityList","setModes","setActivities","setAggregatedModes","setAggregatedActivities","noAggregateModes","getNoAggregateModes","noAggregateActivities","getNoAggregateActivities","mainAggregateModes","getMainAggregateModes","mainAggregateActivities","getMainAggregateActivities","remoteModes","remoteActivities","remoteSurveyModes","remoteSurveyActivities","sm","getModes","sa","getActivities","all","then","svgIconBgColor","svgIconBlack","value","questionnaires","loaded","setQuestionnaires","getQuestionnaires","homeAreas","setHomeAreas","getHomeAreas","enabledClassesStateGetter","sampleClassIds","k","svId","parseInt","cId","persist","endDate","startTime","endTime","dayOfWeek","minDistanceM","maxDistanceM","minDurationS","maxDurationS","isCommuteToWork","_enabledClassesStr","setFilter","oldSvId","Log","setAggregatedMode","enabled","mId","setAggregatedActivity","aId","setAnswerOptionKeyId","enableAll","sampleVariables","sv","svClasses","surveyStartDate","surveyEndDate","restore","filterString","modeActivity","sample","filterState","reduce","reducer","val","dow","_enabledClassesStateStr","isSampleClassEnabled","noFilterOverride","findBox","resultBoardId","boxId","resultBoard","resultBoards","board","resultBoxes","attachmentState","file","fileName","content","resolveDatesAxis","today","Date","prior","setDate","getDate","end","date2YMDString","start","resolveWeeksAxis","buildSectionHeadingBox","type","ResultVisual","partialQuery","filterOverride","factTextStr","valueFormatter","valueDecimals","valueUnit","customPalette","colspan","addBoard","setBoxVisual","box","setBoxZoneFile","zoneFile","setStartEndDate","axisX","nextId","getNextId","modalSplitNTrips","i18n","axisY","numerator","Numerator","denominator","Denominator","scaleFactor","statMethod","StatMethod","travelType","TravelType","enableWeighting","shareOutput","calculateMapFilter","workFullTimeFactor","overviewBoard","labelStr","info","ResultFormatter","ResultUnit","tripsBoard","hasFeature","sampleVariable","Axis","healthBoard","image","imageLabel","palette","textCol1","textCol2","axisXFilter","includeIds","getActiveTransportAggregatedModes","CO2Board","getEmissionAggregatedModes","ParkingBoard","questionnaireBoard","multiMembership","metaBoard","boxState","sentQueries","lastSendId","addSentQuery","sentTimestamp","getTime","serializedQuery","result","apiPromise","cancelTokenSource","setQueryResult","sentQuery","sq","sendId","removeSentQuery","cancel","sendQuery","resultQuery","waitOnQuery","getResult","findSameQuery","_initialState","includeJoinDateInSurvey","limits","WALK","CAR_","CARD","CARP","ECAR","ECRD","ECRP","NCAR","NCRD","NCRP","PCAR","BCAR","SCAR","RCAR","BUS_","SBUS","CBUS","LORY","VAN_","FERY","TRAM","METR","CTRN","TRN_","CABE","BIKE","EBKE","CBKE","SBIK","SCOT","SCOM","MOPD","MC__","TAXI","TAXR","TUKT","MBSR","EXRC","AIR_","OTHR","UKNW","minCellN","weightLimits","minClassN","minVariableN","warnVariableN","activityMethod","nRequiresTrips","vtiReselementMerge","set","querySettings","initialState","querySettingsString","querySettingsState","limit","limitObj","waitOn","restoreSelectedSurvey","surveyIdString","Vuex","modules","UserModule","SurveyModule","SampleModule","ModeActivityModule","FilterModule","ResultBoardModule","QueryModule","QuerySettingsModule","questionnaire","Questionnaire","homeArea","HomeArea","VueRouter","routes","path","children","redirect","scrollPosition","router","beforeEach","to","from","next","store","main","document","querySelector","x","scrollLeft","y","scrollTop","includes","afterEach","setTimeout","Buefy","h","$mount","ActivityMethod","getFallbackLocale","assert","substr","copyLabelTranslations","axisTranslation","axis","shareOutputLabel","dateObj","z","getFullYear","getMonth","ymdString2date","dateStr","formatYmdString","nullString","dateFormatter","Intl","DateTimeFormat","date","format","seconds2date","time","setHours","setMinutes","setSeconds","date2seconds","getHours","getMinutes","getSeconds","feature","location","search","get","static","args","isLogEnabled","warn","timeEnd","getTranslations","strId","m2","a2","car","walk","bike","exercice","air","other","usedModes","concat","work","shop","edu","home","usedActivities","getAggregatesForModes","searchList","requireFullMatch","fullMatch","nActive","n","curr","activeModes","emisisonModes","webpackContext","req","webpackContextResolve","__webpack_require__","o","code","module","exports","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","call","deferred","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","every","getter","__esModule","d","definition","defineProperty","enumerable","f","chunkId","promises","u","miniCssF","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","inProgress","dataWebpackPrefix","l","url","done","script","needAttach","scripts","getElementsByTagName","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","p","createStylesheet","fullhref","oldTag","linkTag","rel","onLinkComplete","errorType","realHref","href","err","request","insertBefore","nextSibling","findStylesheet","existingLinkTags","tag","dataHref","existingStyleTags","loadStylesheet","installedCssChunks","miniCss","cssChunks","installedChunks","installedChunkData","promise","loadingEnded","realSrc","message","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}