{"version":3,"sources":["webpack:///./src/services/fcm.service.ts","webpack:///./src/views/v2/Tab1.vue?8463","webpack:///./src/views/v2/Tab1.vue?17b4","webpack:///./src/views/v2/Tab1.vue","webpack:///./src/views/v2/Tab1.vue?ea91"],"names":["router","useRouter","FcmManager","gotoDetail","id","route","console","log","push","result","FirebaseMessaging","checkPermissions","receive","removeAllListeners","addListener","event","data","notification","obj","defuntoId","this","requestResult","requestPermissions","tokenResult","getToken","token","isSupported","length","events","DataService","getEventSubscriptions","postdata","subscriptions","editEventSubscriptions","_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","for","_hoisted_5","key","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","style","_hoisted_27","_hoisted_28","src","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_createElementVNode","_hoisted_36","_hoisted_37","_hoisted_38","render","_ctx","_cache","$props","$setup","$data","$options","_component_ion_menu_button","_resolveComponent","_component_ion_buttons","_component_ald_logo","_component_ion_title","_component_ion_toolbar","_component_ion_header","_component_Dropdown","_component_AutoComplete","_component_ion_button","_component_ion_label","_component_ion_toggle","_component_ion_item","_component_ion_list","_component_ion_card_content","_component_ion_card","_component_ion_avatar","_component_Carousel","_component_ion_toast","_component_ion_content","_component_ion_page","_openBlock","_createBlock","default","_withCtx","_createVNode","color","slot","_","_ctx$selectedCity2","_ctx$selectedCity","_toDisplayString","lang","Search","Title","SubTitle","Label0","modelValue","selectedCountry","$event","options","countries","optionLabel","filter","placeholder","showClear","onChange","onCountryChange","value","slotProps","_createElementBlock","code","width","name","option","Label1","ref","selectedCity","suggestions","filteredCity","onComplete","searchCity","onItemSelect","selectCity","inputStyle","field","forceSelection","autoHighlight","Info1","validFields","comune","filteredCemeteries","Label2","selectedCemetery","pt","input","searchCemetery","_createCommentVNode","innerHTML","NoResults","expand","size","shape","onClick","_createTextVNode","SearchInCountry","NotificaReq1","locationName","NotificaReq2","isAuth","lines","NotificaPushText","pushMode","onIonChange","togglePushMode","NotificaEmailText","emailMode","toggleEmailMode","CounterText","cityInterest","disabled","disableButton","SearchButton","featuredDefunti","_Fragment","_renderList","d","detail","imageUrl","fullname","birthDate","dieDate","calcEta","Date","currentPosition","cemeteryName","featuredContents","numVisible","numScroll","autoplayInterval","showIndicators","showNavigators","circular","orientation","header","item","text","author","isToastOpen","message","toastMessage","duration","toastColor","position","onDidDismiss","setIsToastOpen","defineComponent","components","IonHeader","IonToolbar","IonTitle","IonContent","IonPage","IonItem","IonLabel","IonInput","IonDatetime","IonButton","IonMenuButton","IonButtons","IonList","IonCard","IonCardContent","IonToast","IonAvatar","aldLogo","IonSelect","IonSelectOption","IonText","AutoComplete","Dropdown","InputText","Checkbox","IonToggle","Carousel","setup","store","useStore","autocomplete1","useIonRouter","dropCemetery","btnSearch","computed","state","user","auth","modes","Array","isAnonymous","refreshToken","mapActions","async","cities","cemeteries","reactive","cemetery","currentLocationInterest","locations","locationInterests","pushEnabled","emailEnabled","filterd","i","locationId","pushNotifyEnabled","emailNotifyEnabled","onMounted","getCitiesByCountry","allContets","getFeaturedContents","sort","Math","random","map","originLocationName","test","indexOf","err","Utils","PresentAlertError","retrieveToken","appUserId","dbUserId","pushToken","cityInterestIncrement","dispatch","subscribeToTopic","topic","addListners","cityInterestDecrement","unsubscribeFromTopic","email","isRequired","domDocument","document","setTimeout","query","normalized","toLowerCase","replace","trim","p","startsWith","activeElement","blur","nextTick","getCemeteriesByCity","$el","focus","getExtimatedUserInterstCount","defunti","getFeaturedDefunti","slice","c","diffInTime","getTime","floor","selectCemetery","province","city","surname","birthYear","dieYear","group","authetication","allCimiteri","cimiteri","searchSuccess","resultErr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F,kBACAH,iBACA4E,eACAtD,uB,oCCvmBN,MAAMmJ,GAA2B,KAAgB,GAAQ,CAAC,CAAC,SAAS9Q,GAAQ,CAAC,YAAY,qBAE1E,iB,kCCTf","file":"js/chunk-3b8285c8.07f7bf41.js","sourcesContent":["import { FirebaseMessaging } from '@capacitor-firebase/messaging';\r\nimport { isNavigationFailure, useRouter } from \"vue-router\";\r\nimport { DataService } from '@/services/data.service';\r\n\r\nconst router = useRouter();\r\n \r\nconst FcmManager = {\r\n\r\n gotoDetail(id: number) \r\n {\r\n const route = \"/tabs/tab1/detail/\" + id;\r\n console.log('Go to:', route);\r\n router.push(route);\r\n },\r\n\r\n async addListners(){\r\n const result = await FirebaseMessaging.checkPermissions();\r\n if( result.receive != \"denied\" ){\r\n await FirebaseMessaging.removeAllListeners();\r\n \r\n FirebaseMessaging.addListener('notificationActionPerformed', (event) => {\r\n console.log('notificationActiosnPerformed:', {event});\r\n const data = event.notification.data;\r\n if (data){\r\n //console.log('Payload Data: ', data);\r\n const obj: any = data as any;\r\n if (obj.defuntoId){\r\n this.gotoDetail(obj.defuntoId);\r\n }\r\n else\r\n {\r\n console.log('Payload senza defuntoId');\r\n }\r\n }\r\n });\r\n \r\n FirebaseMessaging.addListener('notificationReceived', (event) => {\r\n console.log('notificationReceived:', {event});\r\n });\r\n }\r\n },\r\n\r\n async retrieveToken(): Promise \r\n {\r\n const result = await FirebaseMessaging.checkPermissions();\r\n if( result.receive != \"granted\")\r\n {\r\n const requestResult = await FirebaseMessaging.requestPermissions();\r\n if (requestResult.receive == \"denied\")\r\n {\r\n console.log(\"Consenso attivazione notifiche negato\");\r\n //enableNotifications.value = false;\r\n return \"\";\r\n }\r\n else\r\n {\r\n console.log(\"Consenso attivazione notifiche consentito: \", requestResult.receive); \r\n }\r\n } \r\n\r\n const tokenResult = await FirebaseMessaging.getToken({});\r\n console.log(\"Token: \", tokenResult.token);\r\n return tokenResult.token;\r\n },\r\n\r\n\r\n async refreshToken() : Promise {\r\n\r\n if (await FirebaseMessaging.isSupported()){\r\n \r\n const result = await FirebaseMessaging.checkPermissions();\r\n if( result.receive == \"granted\"){\r\n const tokenResult = await FirebaseMessaging.getToken();\r\n if (tokenResult && tokenResult.token && tokenResult.token.length > 0)\r\n {\r\n const events = await DataService.getEventSubscriptions();\r\n const postdata = { token: tokenResult.token, subscriptions:events};\r\n await DataService.editEventSubscriptions(postdata);\r\n console.log(\"Refreshed FCM Token: \", tokenResult.token);\r\n } \r\n }\r\n }\r\n else\r\n {\r\n console.log(\"FCM not supported!\") \r\n }\r\n }\r\n\r\n}\r\n\r\nexport { FcmManager }","import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-dfc63cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"card-title\" }\nconst _hoisted_2 = { class: \"small\" }\nconst _hoisted_3 = { class: \"mt-3\" }\nconst _hoisted_4 = { for: \"dropCountry\" }\nconst _hoisted_5 = {\n key: 0,\n class: \"country-item country-item-value\"\n}\nconst _hoisted_6 = [\"src\"]\nconst _hoisted_7 = { key: 1 }\nconst _hoisted_8 = { class: \"country-item\" }\nconst _hoisted_9 = [\"src\"]\nconst _hoisted_10 = { class: \"mt-4\" }\nconst _hoisted_11 = { for: \"autocomplete\" }\nconst _hoisted_12 = {\n key: 0,\n class: \"mt-4 mb-2\"\n}\nconst _hoisted_13 = { for: \"dropCemeteryEl\" }\nconst _hoisted_14 = {\n key: 1,\n class: \"form-group mt-3\"\n}\nconst _hoisted_15 = { class: \"alert alert-danger text-center\" }\nconst _hoisted_16 = [\"innerHTML\"]\nconst _hoisted_17 = { class: \"mt-3\" }\nconst _hoisted_18 = { class: \"mt-5\" }\nconst _hoisted_19 = { key: 0 }\nconst _hoisted_20 = { id: \"email-help\" }\nconst _hoisted_21 = { class: \"mt-4\" }\nconst _hoisted_22 = {\n key: 0,\n class: \"mt-5\"\n}\nconst _hoisted_23 = { class: \"px-3 my-title\" }\nconst _hoisted_24 = { class: \"d-flex flex-wrap\" }\nconst _hoisted_25 = [\"onClick\"]\nconst _hoisted_26 = {\n class: \"defunto-container\",\n style: {\"position\":\"relative\",\"min-height\":\"190px\"}\n}\nconst _hoisted_27 = [\"src\"]\nconst _hoisted_28 = {\n key: 1,\n src: \"/assets/icon/avatar.png\"\n}\nconst _hoisted_29 = { class: \"text-center my-title mt-1 card-title text\" }\nconst _hoisted_30 = {\n class: \"bottom-info\",\n style: {\"position\":\"absolute\",\"bottom\":\"0px\",\"right\":\"0px\",\"width\":\"100%\"}\n}\nconst _hoisted_31 = {\n key: 0,\n class: \"text-center\"\n}\nconst _hoisted_32 = { class: \"graffitti-text\" }\nconst _hoisted_33 = { class: \"text-center\" }\nconst _hoisted_34 = { key: 0 }\nconst _hoisted_35 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", { class: \"card-title\" }, \"Dediche più visualizzate\", -1))\nconst _hoisted_36 = { style: {\"width\":\"100%\"} }\nconst _hoisted_37 = { class: \"blockquote\" }\nconst _hoisted_38 = { class: \"cite\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_ion_menu_button = _resolveComponent(\"ion-menu-button\")!\n const _component_ion_buttons = _resolveComponent(\"ion-buttons\")!\n const _component_ald_logo = _resolveComponent(\"ald-logo\")!\n const _component_ion_title = _resolveComponent(\"ion-title\")!\n const _component_ion_toolbar = _resolveComponent(\"ion-toolbar\")!\n const _component_ion_header = _resolveComponent(\"ion-header\")!\n const _component_Dropdown = _resolveComponent(\"Dropdown\")!\n const _component_AutoComplete = _resolveComponent(\"AutoComplete\")!\n const _component_ion_button = _resolveComponent(\"ion-button\")!\n const _component_ion_label = _resolveComponent(\"ion-label\")!\n const _component_ion_toggle = _resolveComponent(\"ion-toggle\")!\n const _component_ion_item = _resolveComponent(\"ion-item\")!\n const _component_ion_list = _resolveComponent(\"ion-list\")!\n const _component_ion_card_content = _resolveComponent(\"ion-card-content\")!\n const _component_ion_card = _resolveComponent(\"ion-card\")!\n const _component_ion_avatar = _resolveComponent(\"ion-avatar\")!\n const _component_Carousel = _resolveComponent(\"Carousel\")!\n const _component_ion_toast = _resolveComponent(\"ion-toast\")!\n const _component_ion_content = _resolveComponent(\"ion-content\")!\n const _component_ion_page = _resolveComponent(\"ion-page\")!\n\n return (_openBlock(), _createBlock(_component_ion_page, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_header, { class: \"ion-no-border\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_toolbar, { color: \"primary\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_buttons, { slot: \"end\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_menu_button)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_title, null, {\n default: _withCtx(() => [\n _createVNode(_component_ald_logo)\n ]),\n _: 1\n })\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_ion_content, { class: \"map-backgorund\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card, { class: \"mt-3\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card_content, null, {\n default: _withCtx(() => [\n _createElementVNode(\"p\", _hoisted_1, _toDisplayString(_ctx.lang.Search.Title), 1),\n _createElementVNode(\"p\", _hoisted_2, _toDisplayString(_ctx.lang.Search.SubTitle), 1),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"label\", _hoisted_4, _toDisplayString(_ctx.lang.Search.Label0), 1),\n _createVNode(_component_Dropdown, {\n id: \"dropCountry\",\n modelValue: _ctx.selectedCountry,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.selectedCountry) = $event)),\n options: _ctx.countries,\n optionLabel: \"name\",\n filter: false,\n placeholder: \"Seleziona nazione\",\n showClear: false,\n onChange: _cache[1] || (_cache[1] = ($event: any) => (_ctx.onCountryChange()))\n }, {\n value: _withCtx((slotProps) => [\n (slotProps.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createElementVNode(\"img\", {\n src: '/assets/img/flags/'+slotProps.value.code+'.png',\n width: \"32\"\n }, null, 8, _hoisted_6),\n _createElementVNode(\"span\", null, _toDisplayString(slotProps.value.name), 1)\n ]))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_7, _toDisplayString(slotProps.placeholder), 1))\n ]),\n option: _withCtx((slotProps) => [\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"img\", {\n src: '/assets/img/flags/'+slotProps.option.code+'.png',\n width: \"32\"\n }, null, 8, _hoisted_9),\n _createElementVNode(\"span\", null, _toDisplayString(slotProps.option.name), 1)\n ])\n ]),\n _: 1\n }, 8, [\"modelValue\", \"options\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"label\", _hoisted_11, _toDisplayString(_ctx.lang.Search.Label1), 1),\n _createVNode(_component_AutoComplete, {\n ref: \"autocomplete1\",\n modelValue: _ctx.selectedCity,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((_ctx.selectedCity) = $event)),\n suggestions: _ctx.filteredCity,\n onComplete: _cache[3] || (_cache[3] = ($event: any) => (_ctx.searchCity($event))),\n onItemSelect: _cache[4] || (_cache[4] = ($event: any) => (_ctx.selectCity($event))),\n inputStyle: {width:'100%'},\n field: \"originLocationName\",\n forceSelection: \"\",\n autoHighlight: true\n }, null, 8, [\"modelValue\", \"suggestions\"]),\n _createElementVNode(\"small\", null, _toDisplayString(_ctx.lang.Search.Info1), 1)\n ]),\n (_ctx.validFields.comune && _ctx.filteredCemeteries && _ctx.filteredCemeteries.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"label\", _hoisted_13, _toDisplayString(_ctx.lang.Search.Label2), 1),\n _createVNode(_component_Dropdown, {\n id: \"dropCemeteryEl\",\n modelValue: _ctx.selectedCemetery,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((_ctx.selectedCemetery) = $event)),\n options: _ctx.filteredCemeteries,\n optionLabel: \"name\",\n filter: false,\n placeholder: \"Seleziona cimitero\",\n showClear: false,\n pt: {input: {ref:'dropCemetery'}},\n onChange: _cache[6] || (_cache[6] = ($event: any) => (_ctx.searchCemetery($event)))\n }, null, 8, [\"modelValue\", \"options\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.validFields.comune && _ctx.filteredCemeteries && _ctx.filteredCemeteries.length == 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"small\", {\n innerHTML: _ctx.lang.Search.NoResults\n }, null, 8, _hoisted_16)\n ]),\n _createElementVNode(\"div\", _hoisted_17, [\n _createVNode(_component_ion_button, {\n color: \"secondary\",\n expand: \"block\",\n size: \"default\",\n shape: \"round\",\n onClick: _cache[7] || (_cache[7] = ($event: any) => (_ctx.onClick()))\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.SearchInCountry) + \" \" + _toDisplayString(_ctx.selectedCountry.name), 1)\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"p\", _hoisted_18, [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.NotificaReq1) + \" \", 1),\n _createElementVNode(\"b\", null, _toDisplayString(_ctx.selectedCity?.locationName), 1),\n _createTextVNode(\" \" + _toDisplayString(_ctx.lang.Search.NotificaReq2), 1)\n ]),\n (_ctx.isAuth)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createVNode(_component_ion_list, { lines: \"none\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_item, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_label, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.NotificaPushText), 1)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_toggle, {\n slot: \"start\",\n modelValue: _ctx.pushMode,\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event: any) => ((_ctx.pushMode) = $event)),\n onIonChange: _ctx.togglePushMode,\n color: \"success\"\n }, null, 8, [\"modelValue\", \"onIonChange\"])\n ]),\n _: 1\n }),\n _createVNode(_component_ion_item, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_label, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.NotificaEmailText), 1)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_toggle, {\n slot: \"start\",\n modelValue: _ctx.emailMode,\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = ($event: any) => ((_ctx.emailMode) = $event)),\n onIonChange: _ctx.toggleEmailMode,\n color: \"success\"\n }, null, 8, [\"modelValue\", \"onIonChange\"])\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createElementVNode(\"small\", _hoisted_20, [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.CounterText) + \" \", 1),\n _createElementVNode(\"b\", null, _toDisplayString(_ctx.cityInterest), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_21, [\n (_ctx.selectedCemetery)\n ? (_openBlock(), _createBlock(_component_ion_button, {\n key: 0,\n color: \"secondary\",\n expand: \"block\",\n size: \"default\",\n shape: \"round\",\n disabled: _ctx.disableButton,\n onClick: _cache[10] || (_cache[10] = ($event: any) => (_ctx.onClick())),\n ref: \"btnSearch\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Search.SearchButton), 1)\n ]),\n _: 1\n }, 8, [\"disabled\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n (_ctx.featuredDefunti && _ctx.featuredDefunti.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n _createElementVNode(\"h6\", _hoisted_23, \"Defunti in evidenza a \" + _toDisplayString(_ctx.selectedCity?.locationName), 1),\n _createElementVNode(\"div\", _hoisted_24, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.featuredDefunti, (d) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"col-6 col-lg-3 m-0 p-0\",\n key: d.id,\n detail: \"true\",\n onClick: ($event: any) => (_ctx.gotoDetail(d.id))\n }, [\n _createVNode(_component_ion_card, { class: \"defunto-card\" }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card_content, null, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"div\", null, [\n _createVNode(_component_ion_avatar, { class: \"mx-auto\" }, {\n default: _withCtx(() => [\n (d.imageUrl)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: d.imageUrl\n }, null, 8, _hoisted_27))\n : (_openBlock(), _createElementBlock(\"img\", _hoisted_28))\n ]),\n _: 2\n }, 1024)\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"small\", null, _toDisplayString(d.fullname), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_30, [\n (d.birthDate && d.dieDate)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_31, [\n _createElementVNode(\"small\", _hoisted_32, \"- \" + _toDisplayString(_ctx.calcEta(new Date(d.birthDate), new Date(d.dieDate))) + \" anni -\", 1)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"p\", _hoisted_33, [\n (d.currentPosition && d.currentPosition.cemeteryName)\n ? (_openBlock(), _createElementBlock(\"small\", _hoisted_34, _toDisplayString(d.currentPosition.cemeteryName), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n _: 2\n }, 1024)\n ]),\n _: 2\n }, 1024)\n ], 8, _hoisted_25))\n }), 128))\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.featuredContents && _ctx.featuredContents.length > 0)\n ? (_openBlock(), _createBlock(_component_ion_card, {\n key: 1,\n class: \"mt-5\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card_content, null, {\n default: _withCtx(() => [\n _createVNode(_component_Carousel, {\n value: _ctx.featuredContents,\n numVisible: 1,\n numScroll: 1,\n autoplayInterval: 6000,\n showIndicators: false,\n showNavigators: false,\n circular: true,\n orientation: \"horizontal\"\n }, {\n header: _withCtx(() => [\n _hoisted_35\n ]),\n item: _withCtx((slotProps) => [\n _createElementVNode(\"div\", _hoisted_36, [\n _createElementVNode(\"p\", _hoisted_37, _toDisplayString(slotProps.data.text), 1),\n _createElementVNode(\"p\", _hoisted_38, \"- \" + _toDisplayString(slotProps.data.author), 1)\n ])\n ]),\n _: 1\n }, 8, [\"value\"])\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_ion_toast, {\n \"is-open\": _ctx.isToastOpen,\n message: _ctx.toastMessage,\n duration: 4000,\n color: _ctx.toastColor,\n position: \"top\",\n onDidDismiss: _cache[11] || (_cache[11] = ($event: any) => (_ctx.setIsToastOpen(false)))\n }, null, 8, [\"is-open\", \"message\", \"color\"])\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n}","\r\nimport {\r\n IonPage,\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n IonContent,\r\n IonLabel,\r\n IonItem,\r\n IonSelect,\r\n IonSelectOption,\r\n IonInput,\r\n IonDatetime,\r\n IonButton,\r\n IonMenuButton,\r\n IonButtons,\r\n IonList,\r\n IonText,\r\n IonAvatar,\r\n IonCard,\r\n IonToggle,\r\n IonCardContent,\r\n IonToast,\r\n IonicSlides,\r\n //alertController,\r\n useBackButton,\r\n useIonRouter,\r\n} from \"@ionic/vue\";\r\nimport { ref, onMounted, computed, defineComponent, reactive, DefineComponent, nextTick } from \"vue\";\r\nimport aldLogo from \"@/components/aldilapp/shared/ald-logo.vue\";\r\nimport Dropdown from 'primevue/dropdown';\r\nimport { useStore, mapActions } from \"vuex\";\r\nimport { key, SearchFilter } from \"../../store\";\r\nimport { useRouter } from \"vue-router\";\r\nimport { Plugins } from \"@capacitor/core\";\r\nimport AutoComplete from \"primevue/autocomplete\";\r\nimport InputText from 'primevue/inputtext';\r\nimport Checkbox from 'primevue/checkbox';\r\n\r\n//import {FilterService,FilterMatchMode} from 'primevue/api';\r\nimport { DataService } from \"@/services/data.service\";\r\nimport { CemeteryDTO, LocationDTO, SearchResultItemDTO, AppUserLocationInterestDTO, FeaturedContetDTO } from \"@/models\";\r\nimport Utils from \"@/services/utils.service\";\r\nimport { FirebaseMessaging } from '@capacitor-firebase/messaging';\r\nimport { FcmManager } from '@/services/fcm.service';\r\nimport Carousel from 'primevue/carousel';\r\n//import { Swiper, SwiperSlide } from 'swiper/vue/swiper-vue';\r\n//import { Autoplay, SwiperOptions } from 'swiper';\r\n//import 'swiper/swiper-bundle.css';\r\n//import '@ionic/vue/css/ionic-swiper.css';\r\n\r\n\r\nexport default defineComponent({\r\n name: \"Tab1\",\r\n components: {\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n IonContent,\r\n IonPage,\r\n IonItem,\r\n IonLabel,\r\n IonInput,\r\n IonDatetime,\r\n IonButton,\r\n IonMenuButton,\r\n IonButtons,\r\n IonList,\r\n IonCard,\r\n IonCardContent,\r\n IonToast,\r\n //IonSegment, IonSegmentButton,IonLabel,\r\n //IonText,\r\n IonAvatar,\r\n aldLogo,\r\n IonSelect,\r\n IonSelectOption,\r\n IonText,\r\n AutoComplete,\r\n Dropdown,\r\n InputText,\r\n Checkbox,\r\n IonToggle,\r\n //Swiper,\r\n //SwiperSlide \r\n Carousel\r\n },\r\n setup() {\r\n const store = useStore(key);\r\n const router = useRouter();\r\n const ionRouter = useIonRouter();\r\n const autocomplete1 = ref();\r\n const dropCemetery = ref();\r\n const btnSearch = ref();\r\n const disableButton = ref(false);\r\n const lang = computed(() => store.state.lang);\r\n const user = computed(() => store.state.auth);\r\n const selectedCountry = ref({name: 'Italia', code: 'it'});\r\n const modes = ref(new Array());\r\n const emailMode = ref(false);\r\n const pushMode = ref(false);\r\n const isToastOpen = ref(false);\r\n const setIsToastOpen = (state: boolean) => (isToastOpen.value = state);\r\n const toastMessage = ref(\"\");\r\n const toastColor = ref(\"\");\r\n const cityInterest = ref(0);\r\n const featuredContents = ref([]);\r\n const countries = ref([\r\n {name: 'Italia', code: 'it'},\r\n //{name: 'Francia', code: 'fr'},\r\n //{name: 'Germania', code: 'de'},\r\n //{name: 'Spgna', code: 'es'},\r\n ]);\r\n\r\n\r\n //const swiperModules = [Autoplay, IonicSlides ];\r\n /*const swiperOptions: SwiperOptions = {\r\n grabCursor: true,\r\n loop: true,\r\n centeredSlides: true,\r\n slidesPerView: 1,\r\n autoplay: {\r\n delay: 4000,\r\n disableOnInteraction: false\r\n },\r\n effect: 'cube',\r\n speed: 500\r\n };*/\r\n\r\n const isAuth = computed(() => {\r\n return (\r\n store.state.auth &&\r\n store.state.auth.user &&\r\n !store.state.auth.user.isAnonymous\r\n );\r\n });\r\n \r\n \r\n\r\n const actions = {\r\n ...mapActions([\"setFilter\"])\r\n }\r\n \r\n const refreshToken = async () => {\r\n console.log('Refresh FCM Token');\r\n const result = await FirebaseMessaging.isSupported();\r\n console.log('FCM isSupported: ', result);\r\n \r\n if (result && result.isSupported){\r\n const result = await FirebaseMessaging.checkPermissions();\r\n console.log('FCM checkPermissions: ', result);\r\n if( result.receive !== \"denied\" ){\r\n \r\n const tokenResult = await FirebaseMessaging.getToken({});\r\n console.log('Token result: ', tokenResult);\r\n if (tokenResult && tokenResult.token && tokenResult.token.length > 0)\r\n {\r\n const events = await DataService.getEventSubscriptions();\r\n const postdata = { token: tokenResult.token, subscriptions:events};\r\n await DataService.editEventSubscriptions(postdata);\r\n console.log(\"Refreshed FCM Token: \", tokenResult.token);\r\n } \r\n }\r\n }\r\n else\r\n {\r\n console.log(\"FCM not supported!\") \r\n }\r\n }\r\n\r\n const cities = ref>(new Array());\r\n const selectedCity = ref();\r\n const filteredCity = ref();\r\n\r\n let cemeteries = new Array();\r\n const selectedCemetery = ref();\r\n const filteredCemeteries = ref();\r\n\r\n const featuredDefunti = ref();\r\n\r\n const validFields = reactive({\r\n comune: false,\r\n cemetery: false,\r\n name: false,\r\n });\r\n\r\n const currentLocationInterest = computed(() => {\r\n const locations = store.state.locationInterests;\r\n if (!selectedCity.value)\r\n return {pushEnabled: false, emailEnabled: false};\r\n const filterd = locations.filter( (i: AppUserLocationInterestDTO) => { return i.locationId == selectedCity.value!.id });\r\n if (!filterd || filterd.length == 0)\r\n return {pushEnabled: false, emailEnabled: false};\r\n else\r\n return {pushEnabled: filterd[0].pushNotifyEnabled, emailEnabled: filterd[0].emailNotifyEnabled};\r\n });\r\n\r\n /*useBackButton(-1, () => {\r\n if (!ionRouter.canGoBack()) {\r\n App.exitApp();\r\n }\r\n });*/\r\n\r\n \r\n\r\n onMounted(async () => {\r\n try{\r\n console.log('Tab1.OnMounted()...');\r\n cities.value = await DataService.getCitiesByCountry(\"it\");\r\n console.log('Caricati comuni:', cities.value.length);\r\n pushMode.value = currentLocationInterest.value.pushEnabled;\r\n emailMode.value = currentLocationInterest.value.emailEnabled;\r\n\r\n const allContets = await DataService.getFeaturedContents();\r\n if (allContets && allContets.length)\r\n featuredContents.value = (await DataService.getFeaturedContents()).sort(() => {return 0.5 - Math.random();});\r\n console.log('Featured contents:',featuredContents.value);\r\n cities.value = cities.value.map((i)=> { return {id: i.id, locationName: i.locationName, originLocationName: i.locationName}} );\r\n const test = cities.value.filter(i=> i.locationName.indexOf(\"'\") > 0);\r\n console.log('Città con -', test);\r\n try\r\n {\r\n await refreshToken();\r\n }\r\n catch(err: any){\r\n console.log('Errore recuper FCM token', err.message);\r\n }\r\n //f (autocomplete1.value) autocomplete1.value.focus();\r\n }\r\n catch(err: any){\r\n Utils.PresentAlertError('Errore nel caricamento comuni', err.message, ['Ok']);\r\n }\r\n });\r\n\r\n const togglePushMode = async () => {\r\n if (pushMode.value && selectedCity.value)\r\n {\r\n console.log(\"attivazione notifica\");\r\n const token = await FcmManager.retrieveToken();\r\n if (token && token.length > 0){\r\n const postdata: AppUserLocationInterestDTO = { \r\n appUserId: user.value!.dbUserId!, \r\n locationId: selectedCity.value.id, \r\n pushNotifyEnabled: pushMode.value, \r\n emailNotifyEnabled: emailMode.value, \r\n pushToken: token \r\n }\r\n \r\n \r\n\r\n cityInterestIncrement();\r\n await store.dispatch('editUserLocationInterest', postdata);\r\n\r\n toastMessage.value = \"Impostazioni di notifica salvate!\";\r\n toastColor.value = \"success\";\r\n setIsToastOpen(true);\r\n\r\n try{\r\n await FirebaseMessaging.subscribeToTopic({topic: 'Attiv'+ selectedCity.value.locationName});\r\n await FcmManager.addListners();\r\n }\r\n catch (err: any){\r\n console.log('Errore FirebaseMessaging:', err);\r\n }\r\n }\r\n else\r\n {\r\n toastMessage.value = \"Attiva i permessi di notifica per Aldilapp sul tuo smartphone da Impostazioni > Notifiche\";\r\n toastColor.value = \"danger\";\r\n setIsToastOpen(true);\r\n }\r\n }\r\n else if (!pushMode.value && selectedCity.value)\r\n {\r\n console.log(\"disattivazione notifiche\");\r\n\r\n const postdata: AppUserLocationInterestDTO = { \r\n appUserId: user.value!.dbUserId!, \r\n locationId: selectedCity.value.id, \r\n pushNotifyEnabled: pushMode.value, \r\n emailNotifyEnabled: emailMode.value, \r\n pushToken: '' \r\n }\r\n cityInterestDecrement();\r\n await store.dispatch('editUserLocationInterest', postdata);\r\n \r\n toastMessage.value = \"Impostazioni di notifica salvate!\";\r\n toastColor.value = \"success\";\r\n setIsToastOpen(true);\r\n\r\n try{\r\n await FirebaseMessaging.unsubscribeFromTopic({topic: 'Attiv'+ selectedCity.value.locationName});\r\n }\r\n catch (err: any){\r\n console.log('Errore FirebaseMessaging.unsubscribeFromTopic:', err);\r\n }\r\n }\r\n };\r\n\r\n const toggleEmailMode = async () => {\r\n if (emailMode.value && selectedCity.value)\r\n {\r\n console.log(\"attivazione notifica email\");\r\n const email = user.value && user.value.email ? user.value.email : '';\r\n \r\n if (!email)\r\n {\r\n toastMessage.value = \"Imposta il tuo indirizzo email dal menu Account\";\r\n toastColor.value = \"danger\";\r\n setIsToastOpen(true);\r\n return;\r\n }\r\n \r\n const postdata: AppUserLocationInterestDTO = { \r\n appUserId: user.value!.dbUserId!, \r\n locationId: selectedCity.value.id, \r\n pushNotifyEnabled: pushMode.value, \r\n emailNotifyEnabled: emailMode.value, \r\n pushToken: '' \r\n }\r\n await store.dispatch('editUserLocationInterest', postdata);\r\n cityInterestIncrement();\r\n \r\n toastMessage.value = \"Impostazioni di notifica salvate!
Scriveremo all'indirizzo \"+ email + \"
Se vuoi riceverle su altro indirizzo email, cambialo dal menu Account\";\r\n toastColor.value = \"success\";\r\n setIsToastOpen(true);\r\n \r\n }\r\n else if (!emailMode.value && selectedCity.value)\r\n {\r\n console.log(\"disattivazione notifiche\");\r\n\r\n const postdata: AppUserLocationInterestDTO = { \r\n appUserId: user.value!.dbUserId!, \r\n locationId: selectedCity.value.id, \r\n pushNotifyEnabled: pushMode.value, \r\n emailNotifyEnabled: emailMode.value, \r\n pushToken: '' \r\n }\r\n await store.dispatch('editUserLocationInterest', postdata);\r\n cityInterestDecrement();\r\n\r\n toastMessage.value = \"Impostazioni di notifica salvate!\";\r\n toastColor.value = \"success\";\r\n setIsToastOpen(true);\r\n }\r\n };\r\n\r\n const cityInterestIncrement = function()\r\n {\r\n if ((emailMode.value && !pushMode.value) || (!emailMode.value && pushMode.value))\r\n cityInterest.value = cityInterest.value + 1;\r\n }\r\n const cityInterestDecrement = function()\r\n {\r\n if (!emailMode.value && !pushMode.value)\r\n cityInterest.value = cityInterest.value - 1;\r\n }\r\n\r\n const onCountryChange = async () => {\r\n cities.value = await DataService.getCitiesByCountry(selectedCountry.value.code);\r\n cities.value = cities.value.map((i)=> { return {id: i.id, locationName: i.locationName, originLocationName: i.locationName}} );\r\n console.log('Caricati comuni per ',selectedCountry.value.code, cities.value.length);\r\n selectedCity.value = null;\r\n filteredCity.value = [];\r\n cemeteries = [];\r\n filteredCemeteries.value = [];\r\n selectedCemetery.value = null;\r\n validFields.comune = false;\r\n validFields.cemetery = false;\r\n }; \r\n\r\n const isRequired = (value: any) => {\r\n if (!value) {\r\n return \"Questo è un dato necessario!\";\r\n }\r\n return true;\r\n };\r\n\r\n const domDocument = document;\r\n const searchCity = (event: any) => {\r\n setTimeout(async () => {\r\n console.log(\"Comune digitato\", event.query);\r\n const normalized = event.query.toLowerCase().replace(\"’\",\"'\");\r\n console.log(\"Comune digitato normalizzato\", normalized);\r\n\r\n if (cities.value.length > 0 && selectedCity.value) {\r\n if (!event.query.trim().length) {\r\n filteredCity.value = cities.value;\r\n validFields.comune = false;\r\n } else {\r\n filteredCity.value = cities.value.filter((p: any) => {\r\n return p.locationName\r\n .toLowerCase()\r\n .startsWith(normalized);\r\n });\r\n console.log(\"Comuni filtrati:\", filteredCity.value.length);\r\n if (\r\n filteredCity.value.length === 1 &&\r\n normalized === filteredCity.value[0].locationName.toLowerCase()\r\n ) {\r\n \r\n console.log(\r\n \"Corrispondenza unica con Location per: \",\r\n event.query\r\n );\r\n if (domDocument.activeElement) \r\n (domDocument.activeElement as HTMLElement).blur();\r\n nextTick(() => {\r\n console.log('DOM updated!');\r\n \r\n });\r\n \r\n //btnSearch.value.focus(); \r\n /*cemeteries = await DataService.getCemeteriesByCity(\r\n event.query.toLowerCase()\r\n );\r\n filteredCemeteries.value = cemeteries;\r\n validFields.comune = true;\r\n if (autocomplete2.value) \r\n autocomplete2.value.focus();*/\r\n \r\n } else {\r\n validFields.comune = false;\r\n cemeteries = [];\r\n filteredCemeteries.value = [];\r\n selectedCemetery.value = null;\r\n featuredDefunti.value = [];\r\n }\r\n }\r\n }\r\n }, 250);\r\n };\r\n\r\n const selectCity = (event: any) => {\r\n setTimeout(async () => {\r\n if (cities.value.length > 0 && selectedCity.value) {\r\n console.log(\"Caricamento dei cimiteri presenti nel comune \",selectedCity.value.locationName);\r\n cemeteries = await DataService.getCemeteriesByCity(\r\n selectedCity.value.locationName.toLowerCase()\r\n );\r\n\r\n filteredCemeteries.value = cemeteries;\r\n if (filteredCemeteries.value.length > 0){\r\n selectedCemetery.value = filteredCemeteries.value[0];\r\n cityInterest.value = 0;\r\n\r\n console.log('dropCemetery.value:', dropCemetery.value);\r\n if (dropCemetery.value)\r\n dropCemetery.value.$el.focus();\r\n }\r\n else\r\n {\r\n cityInterest.value = await DataService.getExtimatedUserInterstCount(selectedCity.value.locationName.toLowerCase());\r\n console.log('currentLocationInterest',currentLocationInterest.value);\r\n pushMode.value = currentLocationInterest.value.pushEnabled;\r\n emailMode.value = currentLocationInterest.value.emailEnabled;\r\n }\r\n validFields.comune = true;\r\n disableButton.value = false;\r\n\r\n const defunti: SearchResultItemDTO[] = await DataService.getFeaturedDefunti(selectedCity.value.id);\r\n featuredDefunti.value = defunti.slice(0,8);\r\n } \r\n else \r\n {\r\n validFields.comune = false;\r\n cemeteries = [];\r\n filteredCemeteries.value = [];\r\n featuredDefunti.value = [];\r\n }\r\n }, 50);\r\n };\r\n\r\n const searchCemetery = (event: any) => {\r\n setTimeout(() => {\r\n if (!event.query.trim().length) {\r\n filteredCemeteries.value = [...cemeteries];\r\n }\r\n else {\r\n filteredCemeteries.value = cemeteries.filter((c) => {\r\n return c.name.toLowerCase().startsWith(event.query.toLowerCase());\r\n });\r\n }\r\n }, 250);\r\n };\r\n\r\n const calcEta = (birthDate: Date, dieDate: Date) => {\r\n const diffInTime = dieDate.getTime() - birthDate.getTime();\r\n return Math.floor(diffInTime / (1000 * 3600 * 24 * 365));\r\n }\r\n\r\n const selectCemetery = (event: any) => {\r\n \r\n setTimeout(async () => {\r\n if (cemeteries.length > 0 && selectedCemetery.value && selectedCity.value) {\r\n disableButton.value = false;\r\n console.log(\"Cimitero selezionato: \", selectedCemetery.value.name);\r\n if (selectedCemetery.value.id == 0)\r\n {\r\n console.log(\"Caricamento nomi defunti presenti in TUTTI i cimiteri del comune \", selectedCity.value.locationName);\r\n //...\r\n }\r\n else{\r\n console.log(\"Caricamento nomi defunti presenti nel cimitero \", selectedCemetery.value.name ,\" del comune\", selectedCity.value.locationName);\r\n ///...\r\n }\r\n validFields.cemetery = true;\r\n } else {\r\n validFields.cemetery = false;\r\n //names.value = [];\r\n }\r\n }, 50);\r\n };\r\n\r\n const onClick = async () => {\r\n console.log('Click on CERCA');\r\n if (selectedCity.value && selectedCemetery.value){\r\n disableButton.value = true;\r\n const filter: SearchFilter = { \r\n province: null,\r\n city: selectedCity.value,\r\n cemetery: selectedCemetery.value,\r\n surname: null,\r\n name: null,\r\n fullname: null,\r\n birthDate: null,\r\n dieDate: null,\r\n birthYear: null,\r\n dieYear: null,\r\n group: null\r\n };\r\n //actions.setFilter(filter);\r\n store.dispatch('setFilter', filter);\r\n await store.dispatch('loadFeaturedDefunti');\r\n disableButton.value = false;\r\n router.push(\"/tabs/tab1/results\");\r\n console.log(\"GoTo Result\", \"/tabs/tab1/results\");\r\n \r\n }\r\n else{\r\n disableButton.value = true;\r\n const filter: SearchFilter = { \r\n province: null,\r\n city: null,\r\n cemetery: null,\r\n surname: null,\r\n name: null,\r\n fullname: null,\r\n birthDate: null,\r\n dieDate: null,\r\n birthYear: null,\r\n dieYear: null,\r\n group: null\r\n };\r\n //actions.setFilter(filter);\r\n store.dispatch('setFilter', filter);\r\n await store.dispatch('loadFeaturedDefunti');\r\n disableButton.value = false;\r\n router.push(\"tab1/results\");\r\n console.log(\"GoTo Result\", \"tab1/results\");\r\n }\r\n }; \r\n\r\n const gotoDetail = (id: number) => {\r\n const route = \"/tabs/tab1/detail/\" + id;\r\n router.push(route);\r\n };\r\n\r\n /*\r\n const onSwiper = (swiper: any) => {\r\n console.log(swiper);\r\n };\r\n\r\n const onSlideChange = () => {\r\n console.log('slide change');\r\n };*/\r\n \r\n\r\n return {\r\n router,\r\n isRequired,\r\n authetication: computed(() => store.state.auth),\r\n allCimiteri: computed(() => store.state.cimiteri),\r\n searchSuccess: computed(() => store.state.searchSuccess),\r\n resultErrorMessage: computed(() => store.state.searchResultMessage),\r\n resultsCount: computed(() => store.state.searchResultsCount),\r\n results: computed(() => store.state.results),\r\n lang,\r\n searchCity,\r\n selectCity,\r\n selectedCity,\r\n filteredCity,\r\n\r\n searchCemetery,\r\n selectCemetery,\r\n selectedCemetery,\r\n filteredCemeteries,\r\n \r\n validFields,\r\n disableButton,\r\n autocomplete1,\r\n btnSearch,\r\n onClick,\r\n selectedCountry,\r\n countries,\r\n onCountryChange,\r\n featuredDefunti,\r\n gotoDetail,\r\n calcEta,\r\n modes,\r\n emailMode,\r\n pushMode,\r\n isToastOpen,\r\n setIsToastOpen,\r\n toastMessage,\r\n toastColor,\r\n isAuth,\r\n cityInterest,\r\n toggleEmailMode,\r\n togglePushMode,\r\n dropCemetery,\r\n featuredContents,\r\n //onSwiper,\r\n //onSlideChange,\r\n //swiperModules,\r\n //swiperOptions\r\n //...mapGetters([\r\n //\"allCimiteri\",\r\n //'anotherGetter',\r\n // ...\r\n //])\r\n };\r\n },\r\n});\r\n","import { render } from \"./Tab1.vue?vue&type=template&id=dfc63cc8&scoped=true&ts=true\"\nimport script from \"./Tab1.vue?vue&type=script&lang=ts\"\nexport * from \"./Tab1.vue?vue&type=script&lang=ts\"\n\nimport \"./Tab1.vue?vue&type=style&index=0&id=dfc63cc8&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\Projects\\\\Aldilapp\\\\ionic-capacitor-v3\\\\ionic\\\\aldilapp\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-dfc63cc8\"]])\n\nexport default __exports__","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Tab1.vue?vue&type=style&index=0&id=dfc63cc8&scoped=true&lang=css\""],"sourceRoot":""}