1(window.webpackJsonp=window.webpackJsonp||[]).push([[16,9,22,27,44],{364:function(t,e,s){var i=s(382);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(13).default)("91443172",i,!0,{sourceMap:!1})},370:function(t,e,s){"use strict";s.r(e);var i={name:"LoadingSpinner",props:{fontSize:{type:String,required:!0}}},o=(s(381),s(5)),a=Object(o.a)(i,function(){return(0,this._self._c)("div",{staticClass:"spinner-circle",style:{fontSize:this.fontSize}})},[],!1,null,null,null);e.default=a.exports},381:function(t,e,s){"use strict";s(364)},382:function(t,e,s){var i=s(12)(function(t){return t[1]});i.push([t.i,".spinner-circle,.spinner-circle:after{border-radius:50%;height:10em;width:10em}.spinner-circle{animation:load8 1.1s linear infinite;border:1.1em solid #00adef80;border-left-color:#fff;display:inline-block;position:relative;text-indent:-9999em;transform:translateZ(0)}@keyframes load8{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}",""]),i.locals={},t.exports=i},383:function(t,e,s){var i=s(403);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(13).default)("31dac363",i,!0,{sourceMap:!1})},387:function(t,e,s){var i=s(411);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(13).default)("11f83c4a",i,!0,{sourceMap:!1})},397:function(t,e,s){"use strict";s.r(e);var i={name:"DiseaseDetailModal",props:{diseaseDetail:{type:Object,required:!0},show:{type:Boolean,required:!0}},data(){return{showModal:this.show}},methods:{toggleModal(){this.$emit("modal-closed"),this.showModal=!this.showModal}}},o=s(5),a=Object(o.a)(i,function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex"},[e("modal",{attrs:{tabindex:"-1","show-modal":t.show,title:t.diseaseDetail.title,"max-width":"47.5rem",components:[{id:1,name:"disease-detail",props:{"disease-detail":t.diseaseDetail}}]},on:{"modal-closed":t.toggleModal}})],1)},[],!1,null,null,null);e.default=a.exports;installComponents(a,{Modal:s(53).default})},402:function(t,e,s){"use strict";s(383)},403:function(t,e,s){var i=s(12)(function(t){return t[1]});i.push([t.i,".autocomplete{padding-bottom:.25rem}.autocomplete.expanded{display:grid;grid-template-rows:max-content max-content auto;height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:10;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.autocomplete ul{list-style-type:none}.autocomplete:not(.expanded) ul{margin:0;overflow-x:auto;padding:.5rem;-webkit-user-select:none;user-select:none;white-space:pre}.autocomplete.expanded ul{padding:0;white-space:normal}.autocomplete li{cursor:pointer}.autocomplete:not(.expanded) li{border-radius:1rem;border-width:2px;display:inline;-webkit-user-select:none;user-select:none;--tw-border-opacity:1;border-color:rgb(32 193 255/var(--tw-border-opacity,1));padding:.25rem .75rem;--tw-text-opacity:1;color:rgb(32 193 255/var(--tw-text-opacity,1));margin-inline-end:.25rem}.autocomplete.expanded li{padding-bottom:.5rem;padding-top:.5rem;padding-inline-start:1.5rem}.autocomplete.expanded li:hover span{font-weight:700}.expand{display:flex;justify-content:flex-end;text-align:right}.autocomplete.expanded .expand{bottom:0;padding-bottom:4rem;padding-inline-end:1rem;position:absolute;right:0}.expand small{cursor:pointer;--tw-text-opacity:1;color:rgb(147 154 160/var(--tw-text-opacity,1))}.expand small:hover{color:unset}.current-term{font-size:2rem;font-weight:800}.title-grid{align-items:center;display:grid;grid-template-columns:auto 4rem}.autocomplete:not(.expanded) ul::-webkit-scrollbar{background-color:initial;width:0}",""]),i.locals={},t.exports=i},410:function(t,e,s){"use strict";s(387)},411:function(t,e,s){var i=s(12)(function(t){return t[1]});i.push([t.i,".typing-dot{--tw-bg-opacity:1;animation:wave 1.5s infinite;background-color:rgb(180 185 189/var(--tw-bg-opacity,1))}@keyframes wave{10%{transform:translateY(-6px);--tw-bg-opacity:1;background-color:rgb(116 124 132/var(--tw-bg-opacity,1))}50%{transform:translateY(0);--tw-bg-opacity:1;background-color:rgb(180 185 189/var(--tw-bg-opacity,1))}}.typing-dot:nth-child(2){animation-delay:.15s}.typing-dot:nth-child(3){animation-delay:.3s}",""]),i.locals={}
1,t.exports=i},423:function(t,e,s){"use strict";s.r(e);var i=s(9),o={name:"Autocomplete",components:{LoadingSpinnerCircular:s(370).default},computed:{...Object(i.b)("chatbot/symptoms-input",["query"]),...Object(i.b)("chatbot/autocomplete",["suggestions","expanded","loading"]),...Object(i.b)("chatbot",["chatResponse"]),...Object(i.b)("shared",["language","urlString"]),currentTerm(){return this.query?this.query.split(",").slice(-1)[0].trim():null},quotedCurrentTerm(){return'"'+this.currentTerm+'"'}},watch:{async query(t){if(!t)return void(this.suggestions.length>0&&this.$store.commit("chatbot/autocomplete/setSuggestions",[]));if(!this.currentTerm)return;this.$store.commit("chatbot/autocomplete/setLoading",!0);const e=await this.$repositories.suggestion.suggest({language:this.language,domain:this.urlString,q:this.currentTerm,conceptTypes:"SYMPTOM"},this.chatResponse.session);if(!this.currentTerm)return;const s=[{conceptId:0,title:this.quotedCurrentTerm},...e.results];this.$store.commit("chatbot/autocomplete/setSuggestions",s),this.$store.commit("chatbot/autocomplete/setLoading",!1)}},methods:{onClickSuggestion(t){const e=this.query.split(",").slice(0,-1).join(","),s=0===t.conceptId?t.title.slice(1,-1):t.title;this.$store.commit("chatbot/symptoms-input/setQuery",e),this.$store.commit("chatbot/symptoms-input/appendTermToQuery",s),this.$store.commit("chatbot/autocomplete/removeSuggestion",t)},expand(){this.$store.commit("chatbot/autocomplete/setExpanded",!this.expanded)}}},a=(s(402),s(5)),n=Object(a.a)(o,function(){var t=this,e=t._self._c;return e("div",{class:["autocomplete",t.expanded?"expanded":""]},[t.expanded?e("div",{staticClass:"px-6"},[e("div",{staticClass:"title-grid"},[e("h1",{staticClass:"mb-2 pt-6 text-xl inline-block"},[t._v(t._s(t.$t("chatbot.autocomplete.title")))]),t._v(" "),t.loading?e("loading-spinner-circular",{attrs:{"font-size":"3px"}}):t._e()],1),t._v(" "),t.currentTerm?e("p",{staticClass:"current-term"},[t._v("\n "+t._s(t.quotedCurrentTerm)+"\n ")]):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"overflow-auto"},[t.query&&t.currentTerm&&t.suggestions.length>0?e("ul",t._l(t.suggestions,function(s){return e("li",{key:s.conceptId,on:{click:function(e){return t.onClickSuggestion(s)}}},[t.expanded?e("div",{staticClass:"inline-block w-5 h-5 me-1 inline-flex items-center justify-center rounded-full text-white bg-symptoma-blue"},[t._v("\n +\n ")]):t._e(),t._v(" "),e("span",{domProps:{textContent:t._s(s.title)}})])}),0):t.expanded?e("div",{staticClass:"px-6 mt-6"},[t.currentTerm?e("em",[t._v(t._s(t.$t("chatbot.autocomplete.none")))]):e("em",{domProps:{innerHTML:t._s(t.$t("chatbot.autocomplete.hint"))}})]):t._e()]),t._v(" "),e("div",{staticClass:"expand"},[t.loading&&!t.expanded?e("loading-spinner-circular",{attrs:{"font-size":"2px"}}):t._e(),t._v(" "),e("small",{staticClass:"ps-2",on:{click:t.expand}},[t._v(t._s(t.expanded?t.$t("chatbot.autocomplete.close"):t.$t("chatbot.autocomplete.title")))])],1)])},[],!1,null,null,null);e.default=n.exports;installComponents(n,{LoadingSpinnerCircular:s(370).default})},433:function(t,e,s){var i=s(470);i.__esModule&&(i=i.default),"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,s(13).default)("1fc19ae1",i,!0,{sourceMap:!1})},451:function(t,e,s){"use strict";s.r(e);var i=s(9),o={name:"Typing",computed:{...Object(i.b)("chatbot",["isBreak"])}},a=(s(410),s(5)),n=Object(a.a)(o,function(){var t=this,e=t._self._c;return e("div",{style:"opacity: "+(t.isBreak?0:1)},[e("span",{staticClass:"typing-dot w-2 h-2 rounded-full inline-block"}),t._v(" "),e("span",{staticClass:"typing-dot w-2 h-2 rounded-full inline-block"}),t._v(" "),e("span",{staticClass:"typing-dot w-2 h-2 rounded-full inline-block"})])},[],!1,null,null,null);e.default=n.exports},469:function(t,e,s){"use strict";s(433)},470:function(t,e,s){var i=s(12)(function(t){return t[1]});i.push([t.i,".chatbot-answer-muted{font-size:.875rem;margin-left:0;margin-right:auto;--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1));text-decoration-line:underline}",""]),i.locals={}
1,t.exports=i},553:function(t,e,s){"use strict";s.r(e);var i=s(9),o=s(423),a=s(56),n=s(2),r=s(8),l=s(3);const c=t=>!(t.symptoms.length>0||t.sex||t.age);var d={name:"Chatbot",components:{Autocomplete:o.default},props:{chatbotMode:{type:String,required:!1,default:()=>"SYMPTOM_DRIVEN"}},data:()=>({showDiseaseDetail:!1}),computed:{...Object(i.b)("chatbot",["mode","messages","chatResponse","question","typing","isBreak","diseaseId","origin","campaignId","messageQuestionType","questionsAnswered","chatbotModes","showAnswers","reportNode","muteAnswers","pathwayId","progress"]),...Object(i.b)("shared",["urlObject","language"]),...Object(i.b)("shared/details/disease",["diseaseDetail"]),...Object(i.b)("display-logic/card-selector",["applicationCards"]),...Object(i.b)("patient-file",["plainQuery"]),...Object(i.b)("causes",["causes"]),...Object(i.b)("chatbot/symptoms-input",["hideSymptomsInput","freetextQuestionId"]),...Object(i.b)("chatbot/autocomplete",["showAutocomplete","suggestions"])},watch:{typing(){this.scrollChat()},reportNode(){this.scrollChat()},messages(){this.scrollChat()},suggestions(){this.scrollChat()},hideSymptomsInput(t){!1===t&&this.freetextQuestionId&&this.$nextTick(()=>this.$eventBus.$emit("focusSymptomsInput"))},diseaseDetail(t){this.mode===l.a.PATHWAY&&this.pathwayId!==l.b.DISEASE_TARGETED||this.mode!==l.a.DISEASE_TARGETED||t&&this.initChat()}},created(){const{query:t}=this.$route,e=this.$store.state["patient-file"],s={symptoms:[],sex:null,age:null};t.sex&&(s.sex=t.sex),t.age&&(s.age=t.age),t.query&&(s.symptoms=t.query.split(",").map(r.d).map(r.a));const i=c(s),o=c(e);i&&!o?a.b.push(a.a,{query:{query:e.symptoms.map(r.b).map(r.d).join(","),sex:e.sex,age:e.age}}):i||(this.$store.commit("patient-file/injectUrlSymptoms",s),this.$store.dispatch("causes/searchCauses",{query:s.symptoms.map(r.b).join(","),language:this.language,age:s.age,sex:s.sex,hierarchy:this.$config.causesHierarchy}))},mounted(){this.initChat(),this.appendCustomStyle(),this.$eventBus.$on("scrollChat",this.scrollChat),window.addEventListener("resize",()=>{"DISEASE_TARGETED"===this.mode&&this.diseaseDetail.title&&"xl"!==this.$screen.breakpoint&&this.scrollChat()}),this.$nextTick(()=>this.$refs.messageStream.addEventListener("click",t=>{t.target&&"A"===t.target.nodeName&&this.handleLinkClick(t.target.href)}))},methods:{initChat(){if("DISEASE_TARGETED"===this.mode){const t=new URLSearchParams(this.urlObject.search).has("mode");if("/"===this.urlObject.pathname&&!t)return this.$store.dispatch("chatbot/reset"),this.$store.commit("chatbot/setMode",this.$store.getters["chatbot/chatbotModes"].SYMPTOM_DRIVEN),void this.initChat();if(!this.diseaseDetail||!this.diseaseDetail.conceptId)return void this.$store.commit("chatbot/setTyping",!0);this.$store.commit("chatbot/setDiseaseId",this.diseaseDetail.conceptId)}"SYMPTOM_DRIVEN"===this.mode&&void 0!==this.diseaseId&&this.$store.commit("chatbot/setDiseaseId",void 0),this.$store.dispatch("display-logic/card-selector/setSelectedCard",this.applicationCards.CHAT),this.$chatbot.initConversation(this.$config.isRoutedView),a.b.push(a.a,{query:{...this.$route.query},hash:this.$route.hash,...a.b.activeState,path:this.$route.path}),this.initPing()},async answerQuestion(t,e){var s,i;let o;if(e&&e.answer){let t=n.c.ANSWER_UNKNOWN,s=`question_${this.chatResponse&&this.chatResponse.question&&this.chatResponse.question.id?this.chatResponse.question.id:"unknown"}`;switch(e.answer){case"YES":t=n.c.ANSWER_YES,o=r.e.REPORTED;break;case"NO":t=n.c.ANSWER_NO,o=r.e.NEGATED;break;case"IDK":t=n.c.ANSWER_IDK,o=r.e.UNSURE;break;case"TEST":t=n.c.DISEASE_TARGET_TEST_START,s=`cause_${this.diseaseId}`}this.$eventBus.$emit(n.b.TRACK_EVENT,{category:n.d.CHAT,action:t,name:s})}const a=null===(s=this.chatResponse)||void 0===s?void 0:s.conceptId,l=null===(i=this.chatResponse)||void 0===i?void 0:i.conceptTitle;a&&l&&this.$store.commit("patient-file/addSymptom",{title:l,conceptId:a,type:o},{root:!0}),await this.$chatbot.selectAnswer(e),"Enter"!==t.key&&" "!==t.key||this.$refs.answerButton[0].focus()},handleClickDownload(){this.$chatbot.downloadReport()},handleClickRestart(){this.$chatbot.restart()},handleLinkClick(t){this.$chatbot.handleLinkClick(t)},appendCustomStyle(){if(this.$route.query.fontSize){const t=document.createElement("style");t.innerHTML=`.bubble { font-size: ${this.$route.query.fontSize}; }`,document.head.appendChild(t)}},scrollChat(){const t=this.$refs.messageStream;this.$nextTick(()=>{this.doScroll(t),setTimeout(()=>this.doScroll(t),200)})},doScroll(t){t&&(t.scrollTop=t.scrollHeight)},initPing(){const t=this;setInterval(function(){t.$chatbot.sendPing()},1e4)}}},u=(s(469),s(5)),p=Object(u.a)(d,function(){var t=this,e=t._self._c;return e("client-only",[e("div",{ref:"messageStream",staticClass:"overflow-y-auto relative",staticStyle:{height:"inherit"}},[e("div",{staticClass:"content-wrapper absolute bottom-0 px-5 pt-2 max-h-full w-full",class:[t.$route.query.fullscreenCard?"max-w-2xl left-0 right-0 m-auto":""]},[e("div",{staticClass:"bubble-container",class:[t.showAnswers?"":"pb-6","flex flex-col items-start pt-5"]},t._l(t.messages,function(t){return e("bubble",{key:t.id,attrs:{content:t}})}),1),t._v(" "),t.showAnswers?e("div",{staticClass:"answer-container pt-4"},[e("div",{staticClass:"w-full"},["DISEASE_TARGETED"===t.mode&&t.diseaseDetail.title?e("a",{staticClass:"answer-detail-link lg:hidden m-2 text-xs text-gra
1phite cursor-pointer underline flex me-auto",on:{click:function(e){t.showDiseaseDetail=!0}}},[t._v("\n "+t._s(t.$t("detail.disease.info.more"))+" "+t._s(t.diseaseDetail.title)+"\n ")]):t._e()]),t._v(" "),t.$chatbot.answers.length>0&&!t.reportNode?e("div",{staticClass:"default-answer-container w-full flex flex-wrap justify-end pb-5"},t._l(t.$chatbot.answers,function(s){var i;return e("button",{key:s.id,ref:"answerButton",refInFor:!0,staticClass:"inline-block mx-1 my-1 select-none",class:[{"prevent-hover":t.$device.isMobileOrTablet,"chatbot-answer-muted":t.muteAnswers,"btn btn-md btn-primary":!t.muteAnswers},null==s||null===(i=s.payload)||void 0===i?void 0:i.cssClass],attrs:{role:"button","aria-label":"Answer Button",tabindex:"200"},on:{click:function(e){return t.answerQuestion(e,s)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.answerQuestion(e,s)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.answerQuestion(e,s)}]}},[t._v("\n "+t._s(s.localizedAnswer)+"\n ")])}),0):t.reportNode?e("div",{staticClass:"report-answer-container flex flex-row flex-wrap justify-end"},[e("button",{ref:"answerButtonDownload",staticClass:"flex btn btn-md btn-primary mx-1 my-1",on:{click:t.handleClickDownload}},[t._v("\n "+t._s(t.$t("chatbot.answers.test_finished.download"))+"\n ")]),t._v(" "),e("button",{ref:"answerButtonRestart",staticClass:"answer-button-restart flex btn btn-md btn-primary mx-1 my-1",on:{click:t.handleClickRestart}},[t._v("\n "+t._s(t.$t("chatbot.answers.test_finished.restart"))+"\n ")])]):t._e()]):t._e(),t._v(" "),t.typing?e("typing",{staticClass:"pb-6 pt-1 select-none"}):t._e(),t._v(" "),"PATHWAY"!==t.mode||!t.showAutocomplete||t.hideSymptomsInput||t.freetextQuestionId?t._e():e("autocomplete"),t._v(" "),e("disease-detail-modal",{attrs:{show:t.showDiseaseDetail,"disease-detail":t.diseaseDetail},on:{"modal-closed":function(e){t.showDiseaseDetail=!1}}})],1)])])},[],!1,null,null,null);e.default=p.exports;installComponents(p,{Bubble:s(495).default,Typing:s(451).default,Autocomplete:s(423).default,DiseaseDetailModal:s(397).default})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.