{"version":3,"sources":["webpack:///./src/views/Auth.vue?569a","webpack:///./src/components/aldilapp/shared/ald-login-oauth.vue?35c7","webpack:///./src/components/aldilapp/shared/ald-login-oauth.vue?1b1e","webpack:///./src/components/aldilapp/shared/ald-login-oauth.vue","webpack:///./src/views/Auth.vue?86bb","webpack:///./src/views/Auth.vue","webpack:///./src/components/aldilapp/shared/ald-login-oauth.vue?d6b2","webpack:///./src/views/Auth.vue?aee9"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","_createElementVNode","id","_hoisted_2","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_ion_card_subtitle","_component_ion_card_title","_component_ion_card_header","_component_ald_login_oauth","_component_ion_card","_component_ion_loading","_component_ion_content","_component_ion_page","_openBlock","_createBlock","default","_withCtx","_createVNode","class","color","slot","_","fullscreen","_createTextVNode","_toDisplayString","lang","Auth","WelcomeText","Title","goToRoute","anonymousEnabled","innerHTML","PresentationText","initAppCompleted","cssClass","message","key","_component_ion_icon","_component_ion_button","_component_ion_card_content","authState","mode","AuthMode","SignIn","showGoogleSignIn","inProcessingGoogle","expand","type","onClick","signInWithGoogleLogin","icon","logoGoogle","AccediConGoogle","_createCommentVNode","AccediAnonimoCaricamento","showAppleSignIn","inProcessingApple","signInWithAppleLogin","logoApple","AccediConApple","errorMsg","_createElementBlock","defineComponent","name","props","String","googleSingInEnabled","passwordSingInEnabled","components","IonCardContent","IonButton","IonIcon","setup","store","useStore","router","useIonRouter","isPlatform","computed","state","inProcessing","ref","dispatch","onMounted","async","FirebaseAuthentication","setLanguageCode","languageCode","PresentAlertError","title","msg","buttons","alert","alertController","create","header","subHeader","present","role","onDidDismiss","console","log","generateNonce","Math","random","toString","substr","signInAsAnonymus","value","push","error","code","App","AuthFallitaTitle","result","signInWithGoogle","JSON","stringify","user","Error","accountView","StorageService","getAccountView","err","startsWith","signInOptions","customParameters","signInWithApple","getCurrentUser","auth","__exports__","IonHeader","IonToolbar","IonTitle","IonContent","IonPage","IonCard","IonCardSubtitle","IonCardTitle","IonCardHeader","aldLogo","aldLoginOauth","IonButtons","IonMenuButton","IonLoading","methods","mapActions","created","this","selectLang"],"mappings":"yIAEA,MAAMA,EAAeC,IAAMC,eAAa,mBAAmBD,EAAEA,IAAIE,iBAAcF,GACzEG,EAA2BJ,EAAa,IAAmBK,eAAoB,MAAO,CAAEC,GAAI,aAAe,MAAO,IAClHC,EAAa,CAAC,aAEd,SAAUC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,MAAMC,EAA6BC,eAAkB,mBAC/CC,EAAyBD,eAAkB,eAC3CE,EAAsBF,eAAkB,YACxCG,EAAuBH,eAAkB,aACzCI,EAAyBJ,eAAkB,eAC3CK,EAAwBL,eAAkB,cAC1CM,EAA+BN,eAAkB,qBACjDO,EAA4BP,eAAkB,kBAC9CQ,EAA6BR,eAAkB,mBAC/CS,EAA6BT,eAAkB,mBAC/CU,EAAsBV,eAAkB,YACxCW,EAAyBX,eAAkB,eAC3CY,EAAyBZ,eAAkB,eAC3Ca,EAAsBb,eAAkB,YAE9C,OAAQc,iBAAcC,eAAaF,EAAqB,KAAM,CAC5DG,QAASC,eAAS,IAAM,CACtBC,eAAab,EAAuB,CAAEc,MAAO,iBAAmB,CAC9DH,QAASC,eAAS,IAAM,CACtBC,eAAad,EAAwB,CAAEgB,MAAO,WAAa,CACzDJ,QAASC,eAAS,IAAM,CACtBC,eAAajB,EAAwB,CAAEoB,KAAM,OAAS,CACpDL,QAASC,eAAS,IAAM,CACtBC,eAAanB,KAEfuB,EAAG,IAELJ,eAAaf,EAAsB,KAAM,CACvCa,QAASC,eAAS,IAAM,CACtBC,eAAahB,KAEfoB,EAAG,MAGPA,EAAG,MAGPA,EAAG,IAELJ,eAAaN,EAAwB,CACnCW,YAAY,EACZJ,MAAO,kBACN,CACDH,QAASC,eAAS,IAAM,CACt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,EAAQC,eAAStC,QAEvB,MAAO,CACLX,KAAMqD,eAAS,IAAML,EAAMM,MAAMtD,MACjCQ,iBAAkB6C,eAAS,IAAML,EAAMM,MAAM9C,sB,UClDnD,MAAM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS1C,GAAQ,CAAC,YAAY,qBAE1E,gB,2DCTf,W,yDCAA","file":"js/chunk-34549569.99c6aefc.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-3ce332fc\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"container\" }, null, -1))\nconst _hoisted_2 = [\"innerHTML\"]\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_ion_card_subtitle = _resolveComponent(\"ion-card-subtitle\")!\n const _component_ion_card_title = _resolveComponent(\"ion-card-title\")!\n const _component_ion_card_header = _resolveComponent(\"ion-card-header\")!\n const _component_ald_login_oauth = _resolveComponent(\"ald-login-oauth\")!\n const _component_ion_card = _resolveComponent(\"ion-card\")!\n const _component_ion_loading = _resolveComponent(\"ion-loading\")!\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, {\n fullscreen: true,\n class: \"map-backgorund\"\n }, {\n default: _withCtx(() => [\n _hoisted_1,\n _createVNode(_component_ion_card, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card_header, null, {\n default: _withCtx(() => [\n _createVNode(_component_ion_card_subtitle, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Auth.WelcomeText), 1)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_card_title, null, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.lang.Auth.Title), 1)\n ]),\n _: 1\n })\n ]),\n _: 1\n }),\n _createVNode(_component_ald_login_oauth, {\n goToRoute: \"/tabs/tab1\",\n anonymousEnabled: \"true\"\n }),\n _createElementVNode(\"div\", {\n class: \"p-3\",\n innerHTML: _ctx.lang.Auth.PresentationText\n }, null, 8, _hoisted_2)\n ]),\n _: 1\n }),\n _createVNode(_component_ion_loading, {\n \"is-open\": _ctx.initAppCompleted != null && !_ctx.initAppCompleted,\n cssClass: \"my-custom-class\",\n message: \"Indentificazione in corso\"\n }, null, 8, [\"is-open\"])\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n}","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4cd94b3e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 4,\n class: \"alert alert-danger error-message my-3\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_ion_icon = _resolveComponent(\"ion-icon\")!\n const _component_ion_button = _resolveComponent(\"ion-button\")!\n const _component_ion_card_content = _resolveComponent(\"ion-card-content\")!\n\n return (_openBlock(), _createBlock(_component_ion_card_content, null, {\n default: _withCtx(() => [\n (_ctx.authState && _ctx.authState.mode === _ctx.AuthMode.SignIn && _ctx.showGoogleSignIn && !_ctx.inProcessingGoogle)\n ? (_openBlock(), _createBlock(_component_ion_button, {\n key: 0,\n expand: \"block\",\n color: \"danger\",\n class: \"ion-margin-top\",\n type: \"button\",\n onClick: _ctx.signInWithGoogleLogin\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_icon, {\n icon: _ctx.logoGoogle,\n class: \"absolute-icon\"\n }, null, 8, [\"icon\"]),\n _createTextVNode(\" \" + _toDisplayString(_ctx.lang.Auth.AccediConGoogle), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.authState && _ctx.authState.mode === _ctx.AuthMode.SignIn && _ctx.showGoogleSignIn && _ctx.inProcessingGoogle)\n ? (_openBlock(), _createBlock(_component_ion_button, {\n key: 1,\n expand: \"block\",\n color: \"medium\",\n class: \"ion-margin-top\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_icon, {\n icon: _ctx.logoGoogle,\n class: \"absolute-icon\"\n }, null, 8, [\"icon\"]),\n _createTextVNode(\" \" + _toDisplayString(_ctx.lang.Auth.AccediAnonimoCaricamento), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.authState && _ctx.authState.mode === _ctx.AuthMode.SignIn && _ctx.showAppleSignIn && !_ctx.inProcessingApple)\n ? (_openBlock(), _createBlock(_component_ion_button, {\n key: 2,\n expand: \"block\",\n color: \"dark\",\n class: \"ion-margin-top\",\n type: \"button\",\n onClick: _ctx.signInWithAppleLogin\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_icon, {\n icon: _ctx.logoApple,\n class: \"absolute-icon\"\n }, null, 8, [\"icon\"]),\n _createTextVNode(\" \" + _toDisplayString(_ctx.lang.Auth.AccediConApple), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.authState && _ctx.authState.mode === _ctx.AuthMode.SignIn && _ctx.showAppleSignIn && _ctx.inProcessingApple)\n ? (_openBlock(), _createBlock(_component_ion_button, {\n key: 3,\n expand: \"block\",\n color: \"medium\",\n class: \"ion-margin-top\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ion_icon, {\n icon: _ctx.logoApple,\n class: \"absolute-icon\"\n }, null, 8, [\"icon\"]),\n _createTextVNode(\" \" + _toDisplayString(_ctx.lang.Auth.AccediAnonimoCaricamento), 1)\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n (_ctx.authState && _ctx.authState.errorMsg)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, _toDisplayString(_ctx.authState.errorMsg), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }))\n}","\r\nimport { IonCardContent, IonButton, IonIcon, isPlatform, alertController } from \"@ionic/vue\";\r\nimport { computed, defineComponent, onMounted, ref } from \"vue\";\r\nimport { StorageService } from \"@/services/storage.service\";\r\n//import { auth } from \"../../../main\";\r\nimport { useIonRouter } from '@ionic/vue';\r\nimport { useStore } from \"vuex\";\r\nimport { key, AuthMode } from \"../../../store\";\r\n//import firebase from 'firebase/compat/app';\r\n//import 'firebase/compat/auth';\r\nimport { logoGoogle, logoApple } from \"ionicons/icons\";\r\n//import { FirebaseAuthentication } from '@robingenz/capacitor-firebase-authentication';\r\n//import { signInAnonymously, OAuthProvider, signInWithCredential } from \"firebase/auth\";\r\nimport { FirebaseAuthentication, GetCurrentUserResult } from '@capacitor-firebase/authentication';\r\n//import { FirebaseAuthentication } from '@robingenz/capacitor-firebase-authentication';\r\n\r\nexport default defineComponent({\r\n name: \"aldLoginOauth\",\r\n props: {\r\n goToRoute: {\r\n type: String,\r\n default: \"/tabs/tab1\",\r\n },\r\n anonymousEnabled: {\r\n type: String,\r\n default: \"true\",\r\n },\r\n googleSingInEnabled: {\r\n type: String,\r\n default: \"true\",\r\n },\r\n passwordSingInEnabled: {\r\n type: String,\r\n default: \"false\",\r\n },\r\n },\r\n components: {\r\n IonCardContent,\r\n IonButton,\r\n IonIcon,\r\n },\r\n setup(props) {\r\n\r\n //registerWebPlugin(SignInWithApple);\r\n const store = useStore(key);\r\n const router = useIonRouter();\r\n const showAppleSignIn = isPlatform(\"ios\") || isPlatform(\"iphone\") || isPlatform(\"ipad\");\r\n const showGoogleSignIn = !showAppleSignIn;\r\n const lang = computed(() => store.state.lang);\r\n const inProcessing = ref(false);\r\n const inProcessingGoogle = ref(false);\r\n const inProcessingApple = ref(false);\r\n\r\n store.dispatch(\"setRouteAfterSignIn\", props.goToRoute);\r\n\r\n onMounted(async () => {\r\n await FirebaseAuthentication.setLanguageCode({ languageCode: 'it-IT' });\r\n });\r\n\r\n const PresentAlertError = async (\r\n title: string,\r\n msg: string,\r\n buttons: Array\r\n ) => {\r\n const alert = await alertController.create({\r\n cssClass: \"my-alert-class\",\r\n header: title,\r\n subHeader: \"\",\r\n message: msg,\r\n buttons,\r\n });\r\n await alert.present();\r\n const { role } = await alert.onDidDismiss();\r\n console.log(\"onDidDismiss resolved with role\", role);\r\n };\r\n\r\n const generateNonce = () => {\r\n // Math.random should be unique because of its seeding algorithm.\r\n // Convert it to base 36 (numbers + letters), and grab the first 9 characters\r\n // after the decimal.\r\n return '_' + Math.random().toString(36).substr(2, 9);\r\n };\r\n\r\n const signInAsAnonymus = async (): Promise => {\r\n console.log(\"Anonymous access...\");\r\n inProcessing.value = true;\r\n\r\n try {\r\n await store.dispatch(\"executeAnonymousLogin\");\r\n console.log(\"Go to page: \" + props.goToRoute);\r\n await router.push(props.goToRoute);\r\n\r\n inProcessing.value = false;\r\n }\r\n catch (error: any) {\r\n const errorMsg = error.code + \" - \" + error.message;\r\n await PresentAlertError(\r\n lang.value.App.AuthFallitaTitle,\r\n errorMsg,\r\n ['Ok']\r\n );\r\n store.dispatch(\"setFailAuth\", errorMsg);\r\n inProcessing.value = false;\r\n }\r\n };\r\n\r\n const signInWithGoogleLogin = async (): Promise => {\r\n try {\r\n console.log('Avvio GoogleSignin');\r\n inProcessingGoogle.value = true;\r\n const result = await FirebaseAuthentication.signInWithGoogle();\r\n console.log(\"Google signin result: \", JSON.stringify(result));\r\n if (!result || !result.user)\r\n throw new Error('Identificazione via Google fallita');\r\n\r\n await store.dispatch('executeLogin', result.user);\r\n\r\n const accountView = StorageService.getAccountView();\r\n console.log('AccountViw value:', accountView);\r\n\r\n if (accountView) {\r\n console.log(\"Go to page: \" + props.goToRoute);\r\n await router.push(props.goToRoute);\r\n }\r\n else {\r\n console.log(\"Go to page: Account\");\r\n await router.push(\"/tabs/tabAccount\");\r\n }\r\n inProcessingGoogle.value = false;\r\n }\r\n catch (err: any) {\r\n inProcessingGoogle.value = false;\r\n console.log('err.code:', err.code);\r\n if (err.code != 'auth/popup-closed-by-user' && err.code.startsWith(\"auth/\")) {\r\n await PresentAlertError(\r\n lang.value.App.AuthFallitaTitle,\r\n err.message,\r\n ['Ok']\r\n );\r\n store.dispatch(\"setFailAuth\", '');\r\n }\r\n }\r\n };\r\n\r\n const signInWithAppleLogin = async (): Promise => {\r\n try {\r\n //await FirebaseAuthentication.signOut();\r\n inProcessingApple.value = true;\r\n const signInOptions = {\r\n customParameters: [\r\n { key: 'clientId', value: 'com.stup1.aldilapp' },\r\n { key: 'redirectURI', value: 'http://localhost:8100/login' },\r\n { key: 'scopes', value: 'fullName email' },\r\n { key: 'nonce', value: generateNonce() },\r\n ]\r\n };\r\n const resultSignin = await FirebaseAuthentication.signInWithApple(signInOptions);\r\n\r\n const result: GetCurrentUserResult = await FirebaseAuthentication.getCurrentUser();\r\n\r\n if (!result || !result.user)\r\n throw new Error('Identificazione via AppleID fallita');\r\n\r\n console.log('AppleSignin user: ', result.user);\r\n\r\n // 2. Sign in on the web layer using the id token and nonce\r\n /*const provider = new OAuthProvider('apple.com');\r\n const credential = provider.credential({\r\n idToken: result.credential?.idToken,\r\n rawNonce: result.credential?.accessToken,\r\n });\r\n\r\n await signInWithCredential(auth, credential);*/\r\n await store.dispatch('executeLogin', result.user);\r\n\r\n const accountView = StorageService.getAccountView();\r\n console.log('AccountViw value:', accountView);\r\n if (accountView) {\r\n console.log(\"Go to page: \" + props.goToRoute);\r\n await router.push(props.goToRoute);\r\n }\r\n else {\r\n console.log(\"Go to page: Account\");\r\n await router.push(\"/tabs/tabAccount\");\r\n }\r\n\r\n inProcessingApple.value = false;\r\n }\r\n catch (err: any) {\r\n inProcessingApple.value = false;\r\n console.log('err.code:', err.code);\r\n if (err.code != 'auth/popup-closed-by-user' && err.code.startsWith(\"auth/\")) {\r\n await PresentAlertError(\r\n lang.value.App.AuthFallitaTitle,\r\n err.message,\r\n ['Ok']\r\n );\r\n store.dispatch(\"setFailAuth\", '');\r\n }\r\n }\r\n };\r\n\r\n return {\r\n //...toRefs(u),\r\n signInWithGoogleLogin,\r\n signInWithAppleLogin,\r\n signInAsAnonymus,\r\n AuthMode,\r\n lang,\r\n authState: computed(() => store.state.auth),\r\n props,\r\n router,\r\n logoGoogle,\r\n logoApple,\r\n showAppleSignIn,\r\n showGoogleSignIn,\r\n inProcessing,\r\n inProcessingApple,\r\n inProcessingGoogle\r\n //logIn,\r\n //personAdd,\r\n };\r\n },\r\n});\r\n","import { render } from \"./ald-login-oauth.vue?vue&type=template&id=4cd94b3e&scoped=true&ts=true\"\nimport script from \"./ald-login-oauth.vue?vue&type=script&lang=ts\"\nexport * from \"./ald-login-oauth.vue?vue&type=script&lang=ts\"\n\nimport \"./ald-login-oauth.vue?vue&type=style&index=0&id=4cd94b3e&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-4cd94b3e\"]])\n\nexport default __exports__","\r\nimport {\r\n IonPage,\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n IonContent,\r\n IonCard,\r\n IonCardSubtitle,\r\n IonCardTitle,\r\n IonCardHeader,\r\n IonButtons,\r\n IonMenuButton,\r\n IonLoading\r\n} from \"@ionic/vue\";\r\n\r\nimport aldLogo from \"../components/aldilapp/shared/ald-logo.vue\";\r\n//import aldLoginBase from \"@/components/aldilapp/shared/ald-login-base.vue\";\r\nimport aldLoginOauth from \"../components/aldilapp/shared/ald-login-oauth.vue\";\r\nimport { useStore, mapActions } from \"vuex\";\r\nimport { key } from \"../store\";\r\nimport { computed, defineComponent } from \"vue\";\r\n\r\nexport default defineComponent({\r\n name: \"Authentication\",\r\n components: {\r\n IonHeader,\r\n IonToolbar,\r\n IonTitle,\r\n IonContent,\r\n IonPage,\r\n IonCard,\r\n IonCardSubtitle,\r\n IonCardTitle,\r\n IonCardHeader,\r\n aldLogo,\r\n aldLoginOauth,\r\n IonButtons,\r\n IonMenuButton,\r\n IonLoading\r\n },\r\n methods: {\r\n ...mapActions([\"selectLang\"]),\r\n },\r\n created() {\r\n const store = useStore(key);\r\n\r\n if (!store.state.lang) {\r\n this.selectLang(\"it\");\r\n console.log(\"Caricamento lingua\");\r\n }\r\n },\r\n setup() {\r\n const store = useStore(key);\r\n\r\n return {\r\n lang: computed(() => store.state.lang),\r\n initAppCompleted: computed(() => store.state.initAppCompleted)\r\n };\r\n },\r\n});\r\n","import { render } from \"./Auth.vue?vue&type=template&id=3ce332fc&scoped=true&ts=true\"\nimport script from \"./Auth.vue?vue&type=script&lang=ts\"\nexport * from \"./Auth.vue?vue&type=script&lang=ts\"\n\nimport \"./Auth.vue?vue&type=style&index=0&id=3ce332fc&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-3ce332fc\"]])\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!./ald-login-oauth.vue?vue&type=style&index=0&id=4cd94b3e&scoped=true&lang=css\"","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!./Auth.vue?vue&type=style&index=0&id=3ce332fc&scoped=true&lang=css\""],"sourceRoot":""}