{"version":3,"sources":["webpack:///./src/views/Derivacion.vue?d16d","webpack:///./src/views/Derivacion.vue?6fb2","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/views/Derivacion.vue?63dd","webpack:///./src/views/Derivacion.vue?0f1c"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","model","value","callback","$$v","modal","expression","staticRenderFns","Vue","extend","name","components","Header","data","claroOscuro","String","localStorage","getItem","originBot","urlRedirigir","dataurl","urlLarga","requestDerivacion","id","caseOfUse","appType","created","cargaEstilos","console","log","url","window","location","includes","document","body","innerHTML","urlsegments","split","pop","getUrlLong","indice","indexOf","href","urlCaseOfUse","CaseOfUse","$route","query","cu","undefined","params","cargaInicial","methods","chatService","derivacion","then","resp","code","UrlPortalWeb","clientEncode","host","$router","push","pathError","catch","error","HomeService","CargaInicial","setItem","pais","response","component","VCard","VDialog","VOverlay"],"mappings":"kHAAA,W,kECAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,WAAW,CAACG,MAAM,CAAC,eAAe,GAAG,WAAa,GAAG,MAAQ,OAAOC,MAAM,CAACC,MAAOT,EAAS,MAAEU,SAAS,SAAUC,GAAMX,EAAIY,MAAMD,GAAKE,WAAW,UAAU,CAACT,EAAG,SAAS,CAACG,MAAM,CAAC,MAAQ,YAAY,CAACH,EAAG,MAAM,CAACE,YAAY,SAASC,MAAM,CAAC,GAAK,aAAa,CAACH,EAAG,OAAO,CAACE,YAAY,YAAYF,EAAG,OAAO,CAACE,YAAY,YAAYF,EAAG,OAAO,CAACE,YAAY,YAAYF,EAAG,OAAO,CAACE,YAAY,iBAAiB,GAAGF,EAAG,YAAY,CAACG,MAAM,CAAC,UAAU,EAAE,MAAQP,EAAIY,MAAM,QAAU,SAAS,IAC9lBE,EAAkB,G,4DCmBPC,eAAIC,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,KAAK2B,SAAWiD,EAASzD,KACzB,MAAOoD,GACPrC,QAAQqC,MAAM,iCAAkCA,QCvI6U,I,iFCQjYM,EAAY,eACd,EACA/E,EACAe,GACA,EACA,KACA,WACA,MAIa,aAAAgE,EAAiB,QAOhC,IAAkBA,EAAW,CAACC,QAAA,KAAMC,UAAA,KAAQC,WAAA","file":"js/chunk-776fc974.afabe71c.js","sourcesContent":["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/lib/loaders/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/lib/index.js??vue-loader-options!./Derivacion.vue?vue&type=style&index=0&id=696e4628&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"text-center\"},[_c('v-dialog',{attrs:{\"hide-overlay\":\"\",\"persistent\":\"\",\"width\":\"300\"},model:{value:(_vm.modal),callback:function ($$v) {_vm.modal=$$v},expression:\"modal\"}},[_c('v-card',{attrs:{\"color\":\"primary\"}},[_c('div',{staticClass:\"loader\",attrs:{\"id\":\"loader-5\"}},[_c('span',{staticClass:\"loader1\"}),_c('span',{staticClass:\"loader2\"}),_c('span',{staticClass:\"loader3\"}),_c('span',{staticClass:\"loader4\"})])])],1),_c('v-overlay',{attrs:{\"z-index\":5,\"value\":_vm.modal,\"opacity\":\".8\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Vue from \"vue\";\r\nimport Header from \"@/components/Header.vue\";\r\nimport chatService from \"@/services/chat.service\";\r\nimport HomeService from \"@/services/home.service\";\r\nexport default Vue.extend({\r\n name: \"Short\",\r\n components: {\r\n 'Header': Header,\r\n },\r\n data() {\r\n return {\r\n modal:true,\r\n claroOscuro:String(localStorage.getItem('claroOscuro')),\r\n originBot:String(localStorage.getItem('originBot')),\r\n urlRedirigir:\"\",\r\n dataurl:\"\",\r\n urlLarga:\"\",\r\n requestDerivacion:{\r\n id:\"\",\r\n caseOfUse:\"\",\r\n appType:\"\",\r\n }\r\n };\r\n },\r\n created() {\r\n this.cargaEstilos();\r\n },\r\n async mounted() {\r\n console.log(\"Derivacion\");\r\n var url:string = window.location+\"\";\r\n\r\n if(url.includes(\"/wa/\") || url.includes(\"/ac/\")){\r\n document.body.innerHTML = \"\";\r\n var urlsegments = url.split('/');\r\n var id = urlsegments.pop();\r\n await this.getUrlLong(id);\r\n url = this.urlLarga;\r\n console.log(url);\r\n const indice = this.urlLarga.indexOf('cu=');\r\n if (indice == -1 )\r\n {\r\n window.location.href = url;\r\n }\r\n else\r\n {\r\n var urlCaseOfUse = this.urlLarga.split('cu=');\r\n var CaseOfUse = urlCaseOfUse.pop(); \r\n this.$route.query.cu = CaseOfUse ? CaseOfUse : \"cu_does_not_exist\";\r\n }\r\n }\r\n\r\n if(url.includes(\"ChatWab\")){\r\n this.requestDerivacion.appType=\"WhatsApp\"\r\n this.requestDerivacion.caseOfUse = this.$route.query.cu+\"\";\r\n } else if (url.includes(\"ChatFB\")){\r\n this.requestDerivacion.appType=\"Facebook\"\r\n this.requestDerivacion.caseOfUse = this.$route.query.cu+\"\";\r\n } else if (url.includes(\"ChatAbc\")){\r\n this.requestDerivacion.appType=\"Apple2Web\"\r\n this.requestDerivacion.caseOfUse = this.$route.query.cu+\"\";\r\n } else if (url.includes(\"Apple2Web\")){\r\n console.log(\"DerivaciĆ³n Apple2Web\");\r\n this.requestDerivacion.appType=\"Apple2Web\"\r\n } else {\r\n this.requestDerivacion.appType=\"Derivacion\";\r\n this.requestDerivacion.id = this.$route.params.id!=undefined ? this.$route.params.id:\"\";\r\n }\r\n\r\n //setTimeout(()=>{\r\n this.cargaInicial();\r\n //},5000);\r\n },\r\n\r\n methods: {\r\n cargaInicial: function () {\r\n\r\n chatService.derivacion(this.requestDerivacion).then((resp) => {\r\n console.log(resp.data.code);\r\n if(resp.data.code==200){\r\n this.dataurl = resp.data.UrlPortalWeb + \"/Chat/Chat?id=\" + resp.data.clientEncode;\r\n var url=window.location.host+\"\";\r\n \r\n if(url.includes(\"localhost\")){\r\n console.log(\"78\"+ \"/Chat/Chat?id=\" + resp.data.clientEncode );\r\n this.$router.push(\"/Chat/Chat?id=\" + resp.data.clientEncode);\r\n\r\n }else{\r\n console.log(\"81\"+ this.dataurl );\r\n location.href = this.dataurl;\r\n \r\n }\r\n }else{\r\n console.log(\"ErrorDerivacionDir\"+ resp.data.pathError ); \r\n this.$router.push(resp.data.pathError);\r\n }\r\n }).catch(error=>{\r\n console.log(error);\r\n this.$router.push(\"/Error\");\r\n });\r\n },\r\n cargaEstilos(){\r\n HomeService.CargaInicial().then((resp) => {\r\n this.claroOscuro = resp.data.claroOscuro;\r\n this.originBot = resp.data.originBot;\r\n localStorage.setItem(\"claroOscuro\", resp.data.claroOscuro);\r\n localStorage.setItem(\"originBot\", resp.data.originBot);\r\n localStorage.setItem(\"pais\", resp.data.pais);\r\n localStorage.setItem(\"urlRedirigir\", resp.data.urlRedirigir);\r\n this.urlRedirigir = resp.data.urlRedirigir;\r\n }).catch((error) =>{\r\n console.error(\"Error al realizar la carga inicial DerivaciĆ³n \",error);\r\n });\r\n },\r\n async getUrlLong(id: any)\r\n {\r\n try {\r\n const response = await chatService.getUrlLong(id);\r\n this.urlLarga = response.data;\r\n } catch (error){\r\n console.error(\"Error obteniendo la URL Larga:\", error)\r\n }\r\n }\r\n },\r\n});\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Derivacion.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Derivacion.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Derivacion.vue?vue&type=template&id=696e4628&scoped=true&\"\nimport script from \"./Derivacion.vue?vue&type=script&lang=ts&\"\nexport * from \"./Derivacion.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Derivacion.vue?vue&type=style&index=0&id=696e4628&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"696e4628\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VOverlay } from 'vuetify/lib/components/VOverlay';\ninstallComponents(component, {VCard,VDialog,VOverlay})\n"],"sourceRoot":""}