{"version":3,"sources":["webpack:///./src/components/live-chat/LiveChatIndex.vue?511a","webpack:///./src/components/live-chat/LiveChatIndex.vue","webpack:///./src/components/live-chat/LiveChatIndex.vue?a0e5","webpack:///./src/core/helpers/breadcrumb.ts"],"names":["_hoisted_1","class","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_component_ChatHistory","_component_ChatWindow","ref","onChangeSelectedChat","handleSelectChat","onNewChatCreated","handleNewChatCreated","onUpdateLatestChat","handleUpdateLatestChat","data","selectedChat","key","chatWindowKey","onBackToHistory","$event","name","components","ChatHistory","ChatWindow","setup","store","event","value","userId","chatId","id","chatName","participants","is_group","dispatch","__exports__","setCurrentPageBreadcrumbs","pageTitle","breadcrumbs","SET_BREADCRUMB_ACTION","title","pageBreadcrumbPath","setCurrentPageTitle"],"mappings":"uIAEMA,EAAa,CAAEC,MAAO,qDACtBC,EAAa,CAAED,MAAO,qDAErB,SAASE,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAyB,8BAAkB,eAC3CC,EAAwB,8BAAkB,cAEhD,OAAQ,yBAAc,gCAAoB,cAAW,KAAM,CACzD,gCAAoB,MAAOX,EAAY,CACrC,yBAAaU,EAAwB,CACnCE,IAAK,oBACLC,qBAAsBT,EAAKU,kBAC1B,KAAM,EAAG,CAAC,0BACZ,yBAAc,yBAAaH,EAAuB,CACjDI,iBAAkBX,EAAKY,qBACvBC,mBAAoBb,EAAKc,uBACzBC,KAAMf,EAAKgB,aACXC,IAAKjB,EAAKkB,eACT,KAAM,EAAG,CAAC,mBAAoB,qBAAsB,YAEzD,gCAAoB,MAAOpB,EAAY,CACf,MAArBE,EAAKgB,cACD,yBAAc,yBAAaV,EAAwB,CAClDW,IAAK,EACLT,IAAK,oBACLC,qBAAsBT,EAAKU,kBAC1B,KAAM,EAAG,CAAC,2BACZ,yBAAc,yBAAaH,EAAuB,CACjDY,gBAAiBlB,EAAO,KAAOA,EAAO,GAAK,SAACmB,GAAgB,OAACpB,EAAKU,iBAAiB,QACnFC,iBAAkBX,EAAKY,qBACvBC,mBAAoBb,EAAKc,uBACzBC,KAAMf,EAAKgB,aACXC,IAAKjB,EAAKkB,eACT,KAAM,EAAG,CAAC,mBAAoB,qBAAsB,aAE5D,I,oDC3BU,+BAAgB,CAC7BG,KAAM,kBACNC,WAAY,CACVC,YAAaA,EAAA,KACbC,WAAU,QAEZC,MAAA,WACE,IAAMC,EAAQ,iBACRR,EAAgB,iBAAY,GAC5BF,EAAe,iBAA4B,MAKjD,SAASN,EAAiBiB,GACxBX,EAAaY,MAAQD,EACrBT,EAAcU,QAEhB,SAAShB,EAAqBe,GAC5BX,EAAaY,MAAQ,CACnBC,OAAQ,KACRC,OAAQH,EAAMI,GACdC,SAAUhB,EAAaY,MAAQZ,EAAaY,MAAMI,SAAW,OAC7DC,aAAgC,GAAlBN,EAAMO,SAAgBP,EAAMM,aAAe,MAE3Df,EAAcU,QACdF,EAAMS,SAAS,wCAAyCR,GAE1D,SAASb,EAAuBa,GAC9BD,EAAMS,SAAS,kCAAmCR,GAEpD,OArBA,wBAAU,WACR,eAAoB,QACpBX,EAAaY,MAAQ,QAmBhB,CACLd,uBAAsB,EACtBF,qBAAoB,EACpBF,iBAAgB,EAChBQ,cAAa,EACbF,aAAY,M,qBCzClB,MAAMoB,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASrC,KAErD,gB,kCCPf,gGAQasC,EAA4B,SACvCC,EACAC,GAEA,OAAMJ,SAAS,OAAQK,sBAAuB,CAC5CC,MAAOH,EACPI,mBAAoBH,KAQXI,EAAsB,SAACF,GAClC,OAAMN,SAAS,OAAQK,sBAAuB,CAC5CC,MAAOA","file":"js/chunk-0fbacdc8.9e04b082.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"d-none d-md-flex clearfix flex-column flex-lg-row\" }\nconst _hoisted_2 = { class: \"d-flex d-md-none clearfix flex-column flex-lg-row\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_ChatHistory = _resolveComponent(\"ChatHistory\")!\n const _component_ChatWindow = _resolveComponent(\"ChatWindow\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_ChatHistory, {\n ref: \"chatHistoryWindow\",\n onChangeSelectedChat: _ctx.handleSelectChat\n }, null, 8, [\"onChangeSelectedChat\"]),\n (_openBlock(), _createBlock(_component_ChatWindow, {\n onNewChatCreated: _ctx.handleNewChatCreated,\n onUpdateLatestChat: _ctx.handleUpdateLatestChat,\n data: _ctx.selectedChat,\n key: _ctx.chatWindowKey\n }, null, 8, [\"onNewChatCreated\", \"onUpdateLatestChat\", \"data\"]))\n ]),\n _createElementVNode(\"div\", _hoisted_2, [\n (_ctx.selectedChat == null)\n ? (_openBlock(), _createBlock(_component_ChatHistory, {\n key: 0,\n ref: \"chatHistoryWindow\",\n onChangeSelectedChat: _ctx.handleSelectChat\n }, null, 8, [\"onChangeSelectedChat\"]))\n : (_openBlock(), _createBlock(_component_ChatWindow, {\n onBackToHistory: _cache[0] || (_cache[0] = ($event: any) => (_ctx.handleSelectChat(null))),\n onNewChatCreated: _ctx.handleNewChatCreated,\n onUpdateLatestChat: _ctx.handleUpdateLatestChat,\n data: _ctx.selectedChat,\n key: _ctx.chatWindowKey\n }, null, 8, [\"onNewChatCreated\", \"onUpdateLatestChat\", \"data\"]))\n ])\n ], 64))\n}","\nimport { useStore } from \"vuex\";\nimport { useRouter } from \"vue-router\";\nimport { useAbility } from \"@casl/vue\";\nimport { defineComponent, ref, onMounted } from \"vue\";\nimport { setCurrentPageTitle } from \"@/core/helpers/breadcrumb\";\nimport ChatHistoryComponent from \"@/components/live-chat/ChatHistory.vue\";\nimport ChatWindow from \"@/components/live-chat/ui-fragments/ChatWindow.vue\";\nimport { ChatHistoryEntryObject, SelectChatEvent } from \"@/components/live-chat/ts/types\";\n\nexport default defineComponent({\n name: \"live-chat-index\",\n components: {\n ChatHistory: ChatHistoryComponent,\n ChatWindow\n },\n setup() {\n const store = useStore();\n const chatWindowKey = ref(0);\n const selectedChat = ref(null);\n onMounted(() => {\n setCurrentPageTitle(\"Chat\");\n selectedChat.value = null;\n });\n function handleSelectChat(event: SelectChatEvent): void {\n selectedChat.value = event;\n chatWindowKey.value++;\n }\n function handleNewChatCreated(event: ChatHistoryEntryObject): void {\n selectedChat.value = {\n userId: null,\n chatId: event.id,\n chatName: selectedChat.value ? selectedChat.value.chatName : \"Chat\",\n participants: event.is_group == 1 ? event.participants : null\n };\n chatWindowKey.value++;\n store.dispatch(\"LiveChatModule/addSingleItemToHistory\", event);\n }\n function handleUpdateLatestChat(event: ChatHistoryEntryObject): void {\n store.dispatch(\"LiveChatModule/updateLatestChat\", event);\n }\n return {\n handleUpdateLatestChat,\n handleNewChatCreated,\n handleSelectChat,\n chatWindowKey,\n selectedChat\n };\n }\n});\n","import { render } from \"./LiveChatIndex.vue?vue&type=template&id=e4d05d74&ts=true\"\nimport script from \"./LiveChatIndex.vue?vue&type=script&lang=ts\"\nexport * from \"./LiveChatIndex.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import store from \"@/store\";\r\nimport { Actions } from \"@/store/enums/StoreEnums\";\r\n\r\n/**\r\n * Sets current page breadcrumbs\r\n * @param {string} pageTitle Current page title\r\n * @param {Array} breadcrumbs Current page breadcrumbs\r\n */\r\nexport const setCurrentPageBreadcrumbs = (\r\n pageTitle: string,\r\n breadcrumbs: Array\r\n): void => {\r\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\r\n title: pageTitle,\r\n pageBreadcrumbPath: breadcrumbs\r\n });\r\n};\r\n\r\n/**\r\n * Sets current page breadcrumbs\r\n * @param {string} title Current page title name\r\n */\r\nexport const setCurrentPageTitle = (title: string): void => {\r\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\r\n title: title\r\n });\r\n};\r\n"],"sourceRoot":""}