{"version":3,"sources":["webpack:///./src/services/JourneySetService.ts","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/core-js/internals/string-trim.js","webpack:///./src/views/JourneySets/SelectJourneySetCategory.vue","webpack:///./src/views/JourneySets/SelectJourneySetCategory.vue?7899","webpack:///./src/views/JourneySets/SelectJourneySetCategory.vue?6f38","webpack:///./src/services/TemplateService.ts","webpack:///./src/components/TemplateSelection.vue","webpack:///./src/components/TemplateSelection.vue?2f38","webpack:///./src/components/TemplateSelection.vue?01d9","webpack:///./node_modules/core-js/internals/string-trim-forced.js","webpack:///./src/mixins/LoadingMixin.ts"],"names":["getJourneySetGroups","appInstanceId","published","getJourneySets","typeId","getJourneySet","id","deleteJourneySet","duplicateJourneySet","data","createJourneySet","updateJourneySet","updateJourneySetDefaults","updateJourneySetOrder","journeySets","publish","unpublish","download","$","$trim","trim","forcedStringTrimMethod","target","proto","forced","this","module","exports","requireObjectCoercible","whitespaces","whitespace","ltrim","RegExp","rtrim","createMethod","TYPE","$this","string","String","replace","start","end","class","fullscreen","templateName","journeySet","editTemplate","language","categorySelection","Object","keys","quadrants","quadrant","lines","mode","key","selectCategory","slot","src","icon","color","journeySetTypes","get","is-ltr-forward","name","components","IonContent","IonPage","IonItem","IonLabel","IonIcon","DirectionIndicator","TemplateSelection","props","journeySetId","type","required","default","templateId","ionViewWillEnter","store","dispatch","journeySetCreation","editingExisting","template","errors","gettingJourneySet","setup","getters","toLowerCase","categoryId","value","journeySetTypeId","router","push","params","savingJourneySet","createOutline","ellipseOutline","render","__scopeId","getTemplate","createTemplate","updateTemplate","getTemplates","getCompleteTemplates","deleteTemplate","duplicateTemplate","templateSelection","$emit","fails","non","METHOD_NAME","execute","run","defaultMessage","create","spinner","present","cssClass","header","error","message","buttons","ok","toUpperCase","dismiss","executeWithoutSpinner","saveProgress","savingProgress","loading"],"mappings":"oiBAGM,SAAUA,EAAoBC,EAAuBC,GACvD,OAAO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,gBAExB,SAAeyB,EAAtB,kC,8DAAO,WAAuBC,GAAvB,4GAAgDC,EAAhD,+BAAiE,GAAjE,SACmB,OAAkBC,OAAO,IAD5C,cACGC,EADH,yBAGOA,EAAQC,UAHf,uBAIOJ,IAJP,4DAMK,MAAKC,GACL,eAAmB,CACfI,SAAU,eACVC,OAAQzE,EAAS0E,MACjBC,QAASP,EACTQ,QAAS,CAAC5E,EAAS6E,GAAGC,iBAX/B,mCAeOR,EAAQS,UAff,4F,wBAmBA,SAAeC,EAAtB,kC,8DAAO,WAAqCb,GAArC,0GAA8DC,EAA9D,+BAA+E,GAA/E,kBAEOD,IAFP,yDAIK,MAAKC,GACL,eAAmB,CACfI,SAAU,eACVC,OAAQzE,EAAS0E,MACjBC,QAASP,EACTQ,QAAS,CAAC5E,EAAS6E,GAAGC,iBAT/B,wD,wBAeA,SAAeG,EAAtB,kC,8DAAO,WAA4Bd,GAA5B,uGACmB,OAAkBE,OAAO,CAC3CM,QAAS3E,EAASkF,iBAFnB,cACGC,EADH,yBAMOA,EAAQZ,UANf,uBAOOJ,IAPP,iCAUOgB,EAAQJ,UAVf,wF","file":"js/chunk-4937ca4e.1b6d0606.js","sourcesContent":["import {DELETE, GET, POST, PUT} from './HTTP';\nimport { JourneySet } from \"@/models/JourneySetModel\";\n\nexport function getJourneySetGroups(appInstanceId: string, published: boolean): Promise{\n return GET(`/journey-set-groups?appInstanceId=${appInstanceId}&published=${published}`);\n}\n\nexport function getJourneySets(typeId: string, appInstanceId: string, published: boolean): Promise{\n return GET(`/journey-sets?typeId=${typeId}&appInstanceId=${appInstanceId}&published=${published}`);\n}\n\nexport function getJourneySet(id: string): Promise{\n return GET(`/journey-sets/${id}`);\n}\n\nexport function deleteJourneySet(id: string): Promise{\n return DELETE(`/journey-sets/${id}`);\n}\n\nexport function duplicateJourneySet(data: any): Promise{\n return POST(`/journey-sets/${data.id}`, data);\n}\n\nexport function createJourneySet(data: JourneySet): Promise {\n return POST('/journey-sets', data);\n}\n\nexport function updateJourneySet(data: JourneySet): Promise {\n return PUT(`/journey-sets/${data.id}`, data);\n}\n\nexport function updateJourneySetDefaults(data: JourneySet): Promise {\n return PUT(`/journey-sets/${data.id}/defaults`, data);\n}\n\nexport function updateJourneySetOrder(journeySets: JourneySet[]): Promise {\n return PUT(`/journey-sets/ordering`, journeySets);\n}\n\nexport function publish(id: string): Promise {\n return POST(`/journey-sets/${id}/publish`);\n}\n\nexport function unpublish(id: string): Promise {\n return DELETE(`/journey-sets/${id}/publish`);\n}\n\nexport function download(id: string): Promise {\n return GET(`/journey-sets/${id}/download`, true);\n}","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","\n\n\n\n","\n\nimport {IonContent, IonIcon, IonItem, IonLabel, IonPage} from '@ionic/vue';\nimport {execute} from \"@/mixins/LoadingMixin\";\nimport {computed, defineComponent, ref} from \"vue\";\nimport { createOutline, ellipseOutline } from 'ionicons/icons';\nimport {getJourneySet, updateJourneySet} from \"@/services/JourneySetService\";\nimport {JourneySet} from \"@/models/JourneySetModel\";\nimport {JOURNEY_SET_TYPES, JourneySetTypeId} from \"@/models/JourneySetTypes\";\nimport router from \"@/router\";\nimport {getTemplate} from \"@/services/TemplateService\";\nimport DirectionIndicator from \"@/components/DirectionIndicator.vue\"\nimport TemplateSelection from \"@/components/TemplateSelection.vue\";\nimport {useStore} from \"vuex\";\n\nexport default defineComponent({\n name: 'SelectJourneySetCategory',\n components: {\n IonContent,\n IonPage,\n IonItem,\n IonLabel,\n IonIcon,\n DirectionIndicator,\n TemplateSelection\n },\n props: {\n journeySetId: {\n type: String,\n required: true,\n default: ''\n },\n templateId: {\n type: String,\n required: false,\n default: ''\n }\n },\n async ionViewWillEnter() {\n this.journeySet = {} as JourneySet;\n await this.store.dispatch('app/setPageTitle', this.language.journeySetCreation);\n await execute(async () => {\n if (this.editingExisting) {\n this.journeySet = await getJourneySet(this.journeySetId);\n } else {\n const template = await getTemplate(this.templateId);\n this.journeySet.templateId = template.id;\n this.journeySet.templateName = template.name;\n }\n }, this.language.errors.gettingJourneySet);\n },\n setup(props) {\n const store = useStore();\n const language = computed(() => store.getters['app/language']);\n const journeySet = ref({} as JourneySet);\n const editingExisting = computed(() => props.journeySetId.trim().toLowerCase() !== 'create');\n\n const selectCategory = async (categoryId: string) => {\n if (editingExisting.value) {\n await execute(async () => {\n journeySet.value.journeySetTypeId = categoryId;\n await updateJourneySet(journeySet.value);\n await router.push({name: 'journeySetInfo', params: { journeySetId: props.journeySetId }});\n }, language.value.errors.savingJourneySet);\n } else {\n await router.push({name: 'journeySetInfo', params: { journeySetId: 'create', templateId: props.templateId, categoryId: categoryId }});\n }\n }\n \n const editTemplate = () => {\n if (editingExisting.value) {\n router.push({ name: 'journeySetTemplate', params: { journeySetId: props.journeySetId }});\n } else {\n router.push({ name: 'journeySetTemplate', params: { journeySetId: 'create' } });\n }\n }\n \n return {\n store,\n language,\n journeySet,\n journeySetTypes: JOURNEY_SET_TYPES,\n quadrants: JourneySetTypeId,\n createOutline,\n ellipseOutline,\n editTemplate,\n selectCategory,\n editingExisting\n }\n }\n});\n","import { render } from \"./SelectJourneySetCategory.vue?vue&type=template&id=678210fa&scoped=true\"\nimport script from \"./SelectJourneySetCategory.vue?vue&type=script&lang=ts\"\nexport * from \"./SelectJourneySetCategory.vue?vue&type=script&lang=ts\"\nscript.render = render\nscript.__scopeId = \"data-v-678210fa\"\n\nexport default script","import {DELETE, GET, POST, PUT} from './HTTP';\nimport {JourneyTemplate} from \"@/models/JourneyTemplateModel\";\n\nexport function getTemplate(templateId: string): Promise{\n return GET('/templates/' + templateId);\n}\n\nexport function createTemplate(data: any): Promise {\n return POST('/templates', data);\n}\n\nexport function updateTemplate(data: any): Promise {\n return PUT(`/templates/${data.id}`, data);\n}\n\nexport function getTemplates(appInstanceId: string): Promise{\n return GET(`/templates?appInstanceId=${appInstanceId}`);\n}\n\nexport function getCompleteTemplates(appInstanceId: string): Promise{\n return GET(`/templates?appInstanceId=${appInstanceId}&status=complete`);\n}\n\nexport function deleteTemplate(templateId: string): Promise {\n return DELETE('/templates/'+ templateId);\n}\n\nexport function duplicateTemplate(data: any): Promise {\n return POST(`/templates/${data.id}`, data);\n}","\n\n\n\n","\n\nimport { createOutline } from 'ionicons/icons';\nimport { IonIcon, IonItem, IonLabel } from \"@ionic/vue\";\nimport {computed} from \"vue\";\nimport {useStore} from \"vuex\";\n\nexport default {\n name: 'TemplateSelection',\n components: {\n IonItem,\n IonLabel,\n IonIcon \n },\n props: {\n templateName: { \n type: String,\n required: true\n }\n },\n setup() {\n const store = useStore();\n \n return {\n language: computed(() => store.getters['app/language']),\n createOutline\n }\n }\n}\n","import { render } from \"./TemplateSelection.vue?vue&type=template&id=f08094fe&scoped=true\"\nimport script from \"./TemplateSelection.vue?vue&type=script&lang=ts\"\nexport * from \"./TemplateSelection.vue?vue&type=script&lang=ts\"\nscript.render = render\nscript.__scopeId = \"data-v-f08094fe\"\n\nexport default script","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","import { presentNativeAlert } from '@/services/Notify';\nimport { loadingController } from \"@ionic/vue\";\nimport {store} from \"@/store/Store\";\n\nconst language = store.getters['app/language'];\n\nexport async function execute(run: () => Promise, defaultMessage = '') {\n const spinner = await loadingController.create({});\n try {\n await spinner.present();\n await run();\n } catch (e) {\n if (e && defaultMessage) {\n presentNativeAlert({\n cssClass: 'custom-alert',\n header: language.error,\n message: defaultMessage,\n buttons: [language.ok.toUpperCase()],\n });\n }\n } finally {\n await spinner.dismiss();\n }\n}\n\nexport async function executeWithoutSpinner(run: () => Promise, defaultMessage = '') {\n try {\n await run();\n } catch (e) {\n if (e && defaultMessage) {\n presentNativeAlert({\n cssClass: 'custom-alert',\n header: language.error,\n message: defaultMessage,\n buttons: [language.ok.toUpperCase()],\n });\n }\n }\n}\n\nexport async function saveProgress(run: Function) {\n const loading = await loadingController.create({\n message: language.savingProgress,\n });\n \n try {\n await loading.present();\n await run();\n }\n finally {\n await loading.dismiss();\n }\n}"],"sourceRoot":""}