{"version":3,"sources":["webpack:///static-appopensalud/js/26.e6f12d698fa7b659e421.js","webpack:///./src/components/views/healthy-community/forum/ForumThread.vue","webpack:///src/components/views/healthy-community/forum/ForumThread.vue","webpack:///./src/components/views/healthy-community/forum/ForumThread.vue?5d64","webpack:///./src/components/views/healthy-community/forum/ForumThread.vue?8bdc","webpack:///./src/components/views/healthy-community/forum/ForumThread.vue?4290"],"names":["webpackJsonp","1291","module","__webpack_exports__","__webpack_require__","injectStyle","ssrContext","disposed","normalizeComponent","__vue_styles__","Component","options","__file","3544","__WEBPACK_IMPORTED_MODULE_0__mixins_forum_mixin__","__WEBPACK_IMPORTED_MODULE_1_vue2_editor__","name","components","VueEditor","props","mixins","data","entryId","numReplies","viewRestricted","created","this","$store","getters","state","forum","editingEntry","showMainAnswerBlock","$route","params","id","getForumEntry","computed","methods","updatePostData","messagesPageNumber","getForumMessages","article","totalMessages","sendMessage","wysiwygEntryAnswer","dispatch","$t","$api","put","description","then","response","post","goBack","4305","exports","content","i","locals","4306","push","4307","render","_vm","_h","$createElement","_c","_self","staticStyle","attrs","hideFooter","showImage","disableClick","showAnswerBtn","showFullWhoInDescription","_v","staticClass","useCustomImageHandler","on","handleImageAdded","model","value","callback","$$v","$set","expression","margin","click","_s","gray","outline","_e","$event","logIn","src","color","numPrincipalReplies","entryReferenceId","staticRenderFns","_withStripped","esExports"],"mappings":"AAAAA,cAAc,KAERC,KACA,SAAUC,EAAQC,EAAqBC,GAE7C,YCJA,SAASC,GAAaC,GAChBC,GACJ,EAAQ,MAHV,yEAAIA,GAAW,EAKXC,EAAqB,EAAQ,GAS7BC,EAAiBJ,EAKjBK,EAAYF,EACd,IACA,KATgC,EAWhCC,EAPoB,KAEU,KAShCC,GAAUC,QAAQC,OAAS,+DAkBZ,UAAAF,EAAiB,SDe1BG,KACA,SAAUX,EAAQC,EAAqBC,GAE7C,YACqB,IAAIU,GAAoDV,EAAoB,KACxEW,EAA4CX,EAAoB,KEvCzF,MACEY,KAAM,eACNC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jB,GAAG,YAExBiB,EAAIY,GAAG,KACPT,EACE,eAEEE,aAAekB,OAAQ,QACvBjB,OAASoB,KAAM,GAAIC,QAAS,IAC5BZ,IAAMS,MAAOxB,EAAIV,UAElBU,EAAIY,GAAGZ,EAAIyB,GAAGzB,EAAIjB,GAAG,eAG1B,GAEFiB,EAAI4B,KACR5B,EAAIY,GAAG,KACPZ,EAAIxC,eACA2C,EAAG,OAASU,YAAa,mBACvBV,EACE,OAEEU,YAAa,eACbR,aAAe,gBAAiB,QAGhCF,EACE,KACEE,aAAekB,OAAQ,YAEvBvB,EAAIY,GAAGZ,EAAIyB,GAAGzB,EAAIjB,GAAG,qBAAuB,cAC5CoB,EACE,eAEEU,YAAa,0CACbE,IACES,MAAO,SAASK,GACd,MAAO7B,GAAI8B,MAAM,iBAAmB9B,EAAI1C,aAK5C6C,EAAG,QAASH,EAAIY,GAAGZ,EAAIyB,GAAGzB,EAAIjB,GAAG,iBACjCiB,EAAIY,GAAG,KACPT,EAAG,aACDG,OACEyB,IACE,sEACFC,MAAO,YAIb,IAGJ,OAKR7B,EAAG,uBACDG,OACE2B,oBAAqBjC,EAAIzC,WACzB2E,iBAAkBlC,EAAI1C,YAIhC,IAGA6E,IACJpC,GAAOqC,eAAgB,CACvB,IAAIC,IAActC,OAAQA,EAAQoC,gBAAiBA,EACpC","file":"static-appopensalud/js/26.e6f12d698fa7b659e421.js","sourcesContent":["webpackJsonp([26],{\n\n/***/ 1291:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ForumThread_vue__ = __webpack_require__(3544);\n/* empty harmony namespace reexport */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_08b6bfa6_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ForumThread_vue__ = __webpack_require__(4307);\nvar disposed = false\nfunction injectStyle (ssrContext) {\n if (disposed) return\n __webpack_require__(4305)\n}\nvar normalizeComponent = __webpack_require__(6)\n/* script */\n\n\n/* template */\n\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ForumThread_vue__[\"a\" /* default */],\n __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_08b6bfa6_hasScoped_false_transformToRequire_video_src_poster_source_src_img_src_image_xlink_href_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ForumThread_vue__[\"a\" /* default */],\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/components/views/healthy-community/forum/ForumThread.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-08b6bfa6\", Component.options)\n } else {\n hotAPI.reload(\"data-v-08b6bfa6\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Component.exports);\n\n\n/***/ }),\n\n/***/ 3544:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_forum_mixin__ = __webpack_require__(157);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue2_editor__ = __webpack_require__(1269);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n// import _ from 'lodash'\n\n/* harmony default export */ __webpack_exports__[\"a\"] = ({\n name: 'forum-thread',\n components: {\n 'base-button': function baseButton() {\n return new Promise(function(resolve) { resolve(); }).then(__webpack_require__.bind(null, 124)).then(function (m) {\n return m.default;\n });\n },\n 'forum-article-block': function forumArticleBlock() {\n return new Promise(function(resolve) { resolve(); }).then(__webpack_require__.bind(null, 1268)).then(function (m) {\n return m.default;\n });\n },\n 'forum-message-block': function forumMessageBlock() {\n return new Promise(function(resolve) { resolve(); }).then(__webpack_require__.bind(null, 1290)).then(function (m) {\n return m.default;\n });\n },\n VueEditor: __WEBPACK_IMPORTED_MODULE_1_vue2_editor__[\"a\" /* VueEditor */]\n },\n props: {},\n mixins: [__WEBPACK_IMPORTED_MODULE_0__mixins_forum_mixin__[\"a\" /* default */]],\n data: function data() {\n return {\n entryId: null,\n numReplies: null,\n viewRestricted: false\n };\n },\n created: function created() {\n if (!this.$store.getters['session/isLogged']) {\n this.viewRestricted = true;\n }\n if (!this.$store.state.forum.editingEntry) {\n this.$store.state.forum.showMainAnswerBlock = false;\n }\n this.entryId = this.$route.params.id;\n this.getForumEntry();\n },\n\n computed: {},\n methods: {\n getForumEntry: function getForumEntry() {\n var _this = this;\n\n this.$api.get('/Forum/GetEntry', { params: { entryId: this.entryId, sectionId: this.$store.state.forum.sectionId } }).then(function (response) {\n if (response.data) {\n _this.$store.state.forum.entriesCreatedByUser = response.data.entriesCreatedByUser;\n _this.$store.state.forum.numEntries = response.data.numEntries;\n _this.$store.state.forum.articleData = response.data.entryData;\n _this.numReplies = response.data.entryData[0].numReplies;\n _this.$store.state.forum.messagesPageNumber = [];\n if (!_this.viewRestricted) {\n _this.getForumMessages(_this.entryId);\n }\n } else {\n _this.$store.dispatch('showDangerAlert', _this.$t('defaultErrorMessage'));\n }\n });\n },\n updatePostData: function updatePostData() {\n var _this2 = this;\n\n this.$store.state.forum.messagesPageNumber = [];\n this.getForumMessages(this.entryId);\n var article = this.$store.state.forum.articleData.find(function (item) {\n return item.id === _this2.entryId;\n });\n article.totalMessages = !article.totalMessages ? 1 : ++article.totalMessages;\n },\n sendMessage: function sendMessage() {\n var _this3 = this;\n\n if (!this.$store.state.forum.wysiwygEntryAnswer) {\n this.$store.dispatch('showDangerAlert', this.$t('emptyMessageError'));\n return;\n }\n\n if (this.$store.state.forum.editingEntry) {\n this.$api.put('/Forum/EditEntry', null, { params: { entryId: this.entryId, description: this.$store.state.forum.wysiwygEntryAnswer } }).then(function (response) {\n if (response.data) {\n _this3.$store.state.forum.wysiwygEntryAnswer = null;\n _this3.$store.state.forum.editingEntry = false;\n _this3.$store.state.forum.showMainAnswerBlock = false;\n _this3.$store.dispatch('showSuccessAlert', _this3.$t('changesPerformedCorrectly'));\n _this3.getForumEntry();\n _this3.updateLastInteractionDate(_this3.entryId);\n } else {\n _this3.$store.dispatch('showDangerAlert', _this3.$t('defaultErrorMessage'));\n }\n });\n } else {\n this.$api.post('/Forum/SendEntryMessage', { entryReferenceId: this.entryId, message: this.$store.state.forum.wysiwygEntryAnswer, sectionId: this.$store.state.forum.sectionId }).then(function (response) {\n if (response.data) {\n _this3.updatePostData();\n _this3.$store.state.forum.wysiwygEntryAnswer = null;\n _this3.$store.state.forum.showMainAnswerBlock = false;\n if (_this3.$store.getters['forum/forumMessageWithoutValidation']) {\n _this3.updateLastInteractionDate(_this3.entryId);\n _this3.$store.dispatch('showSuccessAlert', _this3.$t('messagePublishedSuccessfully'));\n } else {\n _this3.$store.dispatch('showSuccessAlert', _this3.$t('messagePendingValidation'));\n }\n } else {\n _this3.$store.dispatch('showDangerAlert', _this3.$t('defaultErrorMessage'));\n }\n });\n }\n },\n goBack: function goBack() {\n this.$store.state.forum.wysiwygEntryAnswer = null;\n this.$store.state.forum.editingEntry = false;\n this.$store.state.forum.showMainAnswerBlock = false;\n }\n }\n});\n\n/***/ }),\n\n/***/ 4305:\n/***/ (function(module, exports, __webpack_require__) {\n\n// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// src/components/views/healthy-community/forum/ForumThread.vue","// style-loader: Adds some css to the DOM by adding a