1"use strict";(self["webpackChunksympifyfuture"]=self["webpackChunksympifyfuture"]||[]).push([[351],{8969:function(e,s,t){t.r(s),t.d(s,{default:function(){return _}});var i=function(){var e=this,s=e._self._c;return s("div",{staticClass:"disease_page"},[e.requestError?s("RequestErrorCard",{staticClass:"page_error",attrs:{error:e.requestError},on:{retry:e.retryLastRequest}}):e._e(),s("div",{staticClass:"disease_page_header"},[s("div",{staticClass:"disease_page_header_left"},[s("img",{attrs:{src:t(6510),alt:""}}),s("div",[e._v(e._s(e.$t("mobile.sympifyAi")))])]),s("div",{staticClass:"disease_page_header_right",on:{click:function(s){e.show=!0}}},[s("img",{attrs:{src:t(5816),alt:""}})])]),e.currentDiseaseName?s("ViewedDiseaseHistory",{staticClass:"mobile_history",attrs:{diseases:e.viewedDiseases,"current-disease":e.currentDiseaseName,"seed-disease":e.seedDiseaseName},on:{select:e.reopenViewedDisease}}):e._e(),s("div",{ref:"diseaseScroll",staticClass:"disease_page_content"},[s("div",{staticClass:"disease_card",class:{"slide-in":"enter"===e.cardState,"slide-out":"leave"===e.cardState,show:"show"===e.cardState}},[s("div",{staticClass:"disease_summary"},[s("div",{staticClass:"disease_name"},[s("div",{staticClass:"disease_name_left"},[s("van-icon",{attrs:{name:"arrow-left",size:"25"},on:{click:function(s){return e.goBack()}}}),s("span",[e._v(e._s(e.currentDiseaseName||e.$t("mobile.noDiseaseAdded")))])],1),e.currentDiseaseName?s("div",{staticClass:"disease_name_right",on:{click:function(s){e.showDiseaseDetail=!0}}},[s("img",{attrs:{src:t(9414),alt:""}})]):e._e()]),e.currentDiseaseName?s("div",{staticClass:"disease_pic"},[e.imageUrl?s("img",{attrs:{src:e.imageUrl,alt:"Image"}}):s("img",{attrs:{src:t(9977),alt:""}})]):e._e(),e.currentDiseaseName?s("div",{staticClass:"disease_desc"},[e._v(" "+e._s(e.$t("mobile.symptomSelectionTip"))+" ")]):e._e(),e.currentDiseaseName?s("van-divider"):e._e()],1),e.currentDiseaseName&&e.diseaseDetails.Symptoms?.length?s("div",{ref:"symptomList",staticClass:"disease_symptoms"},e._l(e.diseaseDetails.Symptoms,(function(t){return s("div",{key:t.SymptomName,staticClass:"disease_symptom_item"},[s("div",{staticClass:"disease_symptom_name"},[s("InfoTooltip",{attrs:{content:e.getSymptomDescription(t),"image-url":e.getSymptomImage(t),fallback:e.$t("ui.shell.symptomNoInfo")}},[e._v(" "+e._s(t.SymptomName)+" ")])],1),s("div",{staticClass:"disease_symptom_selections"},[s("div",{staticClass:"radio_container"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedSymptoms[t.SymptomName],expression:"selectedSymptoms[symptom.SymptomName]"}],attrs:{type:"radio",id:t.SymptomName+"_yes",name:t.SymptomName,value:"yes"},domProps:{checked:e._q(e.selectedSymptoms[t.SymptomName],"yes")},on:{change:function(s){return e.$set(e.selectedSymptoms,t.SymptomName,"yes")}}}),s("label",{attrs:{for:t.SymptomName+"_yes"}},[e._v(e._s(e.$t("mobile.yes")))])]),s("div",{staticClass:"radio_container"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedSymptoms[t.SymptomName],expression:"selectedSymptoms[symptom.SymptomName]"}],attrs:{type:"radio",id:t.SymptomName+"_no",name:t.SymptomName,value:"no"},domProps:{checked:e._q(e.selectedSymptoms[t.SymptomName],"no")},on:{change:function(s){return e.$set(e.selectedSymptoms,t.SymptomName,"no")}}}),s("label",{attrs:{for:t.SymptomName+"_no"}},[e._v(e._s(e.$t("mobile.no")))])]),s("div",{staticClass:"radio_container"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedSymptoms[t.SymptomName],expression:"selectedSymptoms[symptom.SymptomName]"}],attrs:{type:"radio",id:t.SymptomName+"_maybe",name:t.SymptomName,value:"maybe"},domProps:{checked:e._q(e.selectedSymptoms[t.SymptomName],"maybe")},on:{change:function(s){return e.$set(e.selectedSymptoms,t.SymptomName,"maybe")}}}),s("label",{attrs:{for:t.SymptomName+"_maybe"}},[e._v(e._s(e.$t("mobile.maybe")))])])])])})),0):e.currentDiseaseName?e._e():s("div",{staticClass:"no-disease-message"},[s("p",[e._v(e._s(e.$t("mobile.pleaseSelectDisease")))]),s("div",{staticClass:"go-back-button",on:{click:function(s){return e.goBack()}}},[e._v(" "+e._s(e.$t("mobile.goBackToSelect"))+" ")])])])]),e.currentDiseaseName?s("div",{staticClass:"disease_bottom"},[s("div",{staticClass:"disease_bottom_button",on:{click:function(s){e.
1showSymptomProfile=!0}}},[e._v(" "+e._s(e.$t("mobile.viewSummary"))+" ")]),s("div",{staticClass:"disease_bottom_button",on:{click:function(s){return e.processDiseaseScoring()}}},[e._v(" "+e._s(e.$t("mobile.scrollDown"))+" ")])]):e._e(),s("van-popup",{style:{height:"100%",width:"100%"},attrs:{position:"bottom"},model:{value:e.showSymptomProfile,callback:function(s){e.showSymptomProfile=s},expression:"showSymptomProfile"}},[s("div",{staticClass:"symptom_profile"},[s("div",{staticClass:"symptom_profile_header"},[s("div",{staticClass:"symptom_profile_left",on:{click:function(s){e.showSymptomProfile=!1}}},[s("van-icon",{attrs:{name:"arrow-left"}}),s("div",[e._v(e._s(e.$t("mobile.symptomProfile")))])],1),s("div",{staticClass:"symptom_profile_right",on:{click:function(s){e.show=!0}}},[s("img",{attrs:{src:t(5816),alt:""}})])]),s("div",{staticClass:"symptom_profile_content"},[e._l(e.allSymptomSelections,(function(t){return s("div",{key:t.SymptomName,staticClass:"symptom_profile_item"},[s("div",{staticClass:"symptom_profile_item_left"},[s("div",{staticClass:"dot",class:{yes:"yes"===t.UserChoice,no:"no"===t.UserChoice,maybe:"maybe"===t.UserChoice}}),e._v(" "+e._s(t.SymptomName)+" ")]),s("div",{staticClass:"symptom_profile_item_actions"},[s("select",{staticClass:"symptom_choice_select",attrs:{"aria-label":e.$t("mobile.changeSymptom",{symptom:t.SymptomName})},domProps:{value:t.UserChoice},on:{change:function(s){return e.changeSymptomChoice({symptom:t,userChoice:s.target.value})}}},[s("option",{attrs:{value:"yes"}},[e._v(e._s(e.$t("mobile.selected")))]),s("option",{attrs:{value:"no"}},[e._v(e._s(e.$t("mobile.notExperienced")))]),s("option",{attrs:{value:"maybe"}},[e._v(e._s(e.$t("mobile.unsure")))])]),s("div",{staticClass:"symptom_profile_item_right",on:{click:function(s){return e.removeSymptom(t.SymptomName)}}},[s("van-icon",{attrs:{name:"cross"}})],1)])])})),e.allSymptomSelections.length?e._e():s("div",{staticClass:"no-symptoms"},[e._v(" "+e._s(e.$t("mobile.noSymptomsAdded"))+" ")])],2),s("div",{staticClass:"symptom_profile_bottom"},[s("div",{staticClass:"generate_buttop",on:{click:function(s){return e.showDialog()}}},[e._v(" "+e._s(e.$t("mobile.generateReport"))+" ")])])])]),s("van-popup",{style:{height:"100%",width:"100%"},attrs:{position:"right"},model:{value:e.showDiseaseDetail,callback:function(s){e.showDiseaseDetail=s},expression:"showDiseaseDetail"}},[s("div",{staticClass:"disease_detail"},[s("div",{staticClass:"disease_detail_header"},[s("div",[e._v(e._s(e.currentDiseaseName||e.$t("mobile.noDiseaseAdded")))]),s("div",{on:{click:function(s){e.showDiseaseDetail=!1}}},[s("van-icon",{attrs:{name:"cross"}})],1)]),s("div",{staticClass:"disease_detail_content"},[s("van-collapse",{attrs:{accordion:""},model:{value:e.activeNames,callback:function(s){e.activeNames=s},expression:"activeNames"}},[s("van-collapse-item",{attrs:{title:e.$t("mobile.overview"),name:"1"}},[e._v(" "+e._s(e.diseaseDetails.Overview||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.causes"),name:"2"}},[e._v(" "+e._s(e.diseaseDetails.Causes||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.symptoms"),name:"3"}},[e._l(e.diseaseDetails.Symptoms,(function(t){return s("div",{key:t.SymptomName},[e._v(" "+e._s(t.SymptomName)+" ")])})),e.diseaseDetails.Symptoms?.length?e._e():s("div",[e._v(" "+e._s(e.$t("mobile.noDataAvailable"))+" ")])],2),s("van-collapse-item",{attrs:{title:e.$t("mobile.departmentsThatTreat"),name:"4"}},[e._v(" "+e._s(e.diseaseDetails.departmentsThatTreatThisCondition||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.riskFactors"),name:"5"}},[e._v(" "+e._s(e.diseaseDetails.riskFactors||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.prevention"),name:"6"}},[e._v(" "+e._s(e.diseaseDetails.Prevention||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.diagnosis"),name:"7"}},[e._v(" "+e._s(e.diseaseDetails.Diagnosis||e.$t("mobile.noDataAvailable"))+" ")]),s("van-collapse-item",{attrs:{title:e.$t("mobile.treatments"),name:"8"}},[e._v(" "+e._s(e.diseaseDetails.Treatments||e.$t("mobile.noDataAvailable"))+" ")])],1)],1)])]),s("van-dialog",{attrs:{"show-confirm-button":!1}
1,model:{value:e.showDialogInfo,callback:function(s){e.showDialogInfo=s},expression:"showDialogInfo"}},[s("div",{staticClass:"dialog_info"},[s("div",{staticClass:"dialog_info_title"},[e._v(e._s(e.$t("mobile.memberId")))]),s("div",{staticClass:"dialog_info_desc"},[e._v(" "+e._s(e.$t("mobile.memberIdDescription"))+" ")]),s("input",{directives:[{name:"model",rawName:"v-model",value:e.userId,expression:"userId"}],attrs:{type:"text"},domProps:{value:e.userId},on:{input:function(s){s.target.composing||(e.userId=s.target.value)}}}),s("div",{staticClass:"button_done"},[s("div",{staticClass:"button_inner",on:{click:function(s){return e.generateReport()}}},[e._v(" "+e._s(e.$t("mobile.done"))+" ")])])])]),s("van-popup",{style:{height:"100%",width:"100%"},attrs:{position:"right"},model:{value:e.show,callback:function(s){e.show=s},expression:"show"}},[s("van-nav-bar",{attrs:{title:e.$t("mobile.symptomProfile"),"left-arrow":""},on:{"click-left":function(s){e.show=!1}}}),s("div",{staticClass:"more_menu"},[s("div",{staticClass:"more_menu_item",on:{click:function(s){return e.goHome()}}},[s("van-icon",{attrs:{name:"wap-home-o"}}
1),s("div",[e._v(e._s(e.$t("mobile.home")))])],1),s("div",{staticClass:"more_menu_item",on:{click:function(s){return e.goImaging()}}},[s("van-icon",{attrs:{name:"photo-o"}}),s("div",[e._v(e._s(e.$t("mobile.imagingUpload")))])],1),s("div",{staticClass:"more_menu_item",on:{click:function(s){return e.confirmClearSession()}}},[s("van-icon",{attrs:{name:"delete-o"}}),s("div",[e._v(e._s(e.$t("mobile.clearSession")))])],1),e.currentDiseaseName?s("div",{staticClass:"more_menu_item",on:{click:function(s){e.showDiseaseDetail=!0,e.show=!1}}},[s("van-icon",{attrs:{name:"description"}}),s("div",[e._v(e._s(e.$t("mobile.overview")))])],1):e._e()])],1)],1)},a=[],o=(t(4114),t(7412)),r=t(139),m=t(4169),n=t(2455),l=t(2328),c=t(4290),d=t(4116),p=t(5710),h=t(1660),y=t(8919),u=t(1173),S=t(2476),v={components:{RequestErrorCard:p.A,InfoTooltip:h.A,ViewedDiseaseHistory:y.A},data(){return{show:!1,showSymptomProfile:!1,showDiseaseDetail:!1,activeNames:["1"],currentDiseaseName:"",selectedSymptoms:{},userSelections:[],diseaseDetails:{Symptoms:[]},allSymptomSelections:[],inferredSymptomProfile:[],predictionCount:0,maxPredictions:30,cardState:"show",predictedDiseases:[],seenDiseases:[],showDialogInfo:!1,userId:"",requestError:null,retryAction:null,journeyId:"",originalSearchTerm:"",seedDiseaseName:"",viewedDiseases:[],diseaseFeedback:{},diseaseSearchIndex:{},isRestoringSession:!1}},computed:{imageUrl(){const e=this.diseaseDetails.imageLink;if(e){const s=e.match(/\/d\/([a-zA-Z0-9_-]+)/);if(s&&s[1])return`https://drive.google.com/thumbnail?id=${s[1]}&export=view&authuser=0`}return""}},watch:{"$i18n.locale"(){this.currentDiseaseName&&(this.diseaseSearchIndex={},this.displayDiseaseDetails(this.currentDiseaseName))},"$route.query"(e){const s=e.diseaseName;s&&this.currentDiseaseName!==s&&this.displayDiseaseDetails(s)},selectedSymptoms:{deep:!0,handler(){this.currentDiseaseName&&this.$set(this.diseaseFeedback,this.currentDiseaseName,{...this.selectedSymptoms}),this.persistCurrentSession()}},allSymptomSelections:{deep:!0,handler(){this.persistCurrentSession()}},inferredSymptomProfile:{deep:!0,handler(){this.persistCurrentSession()}},predictedDiseases:{deep:!0,handler(){this.persistCurrentSession()}},seenDiseases:{deep:!0,handler(){this.persistCurrentSession()}},viewedDiseases:{deep:!0,handler(){this.persistCurrentSession()}}}
1,methods:{getSymptomDescription(e){return e?.shortDescription||e?.description||e?.Description||""},getSymptomImage(e){return e?.imageUrl||e?.ImageUrl||e?.imageURL||""},persistCurrentSession(){if(!this.isRestoringSession&&this.currentDiseaseName&&this.journeyId)try{(0,S.iS)({lang:this.$i18n.locale,journeyId:this.journeyId,originalSearchTerm:this.originalSearchTerm,seedDiseaseName:this.seedDiseaseName,currentDiseaseName:this.currentDiseaseName,viewedDiseases:this.viewedDiseases,diseaseFeedback:this.diseaseFeedback,selectedSymptoms:this.selectedSymptoms,allSymptomSelections:this.allSymptomSelections,inferredSymptomProfile:this.inferredSymptomProfile,predictedDiseases:this.predictedDiseases,seenDiseases:this.seenDiseases,predictionCount:this.predictionCount})}catch(e){console.warn("Session snapshot could not be saved.",e)}},restoreJourneyFromSnapshot(){const e=(0,S.Jf)();return e?(this.journeyId=e.journeyId,this.originalSearchTerm=e.originalSearchTerm,this.seedDiseaseName=e.seedDiseaseName,this.viewedDiseases=e.viewedDiseases||[],this.diseaseFeedback=e.diseaseFeedback||{},this.allSymptomSelections=e.symptomSelections||[],this.inferredSymptomProfile=e.inferredSymptoms||[],this.predictedDiseases=e.predictedDiseases||[],this.seenDiseases=e.seenDiseases||[],this.predictionCount=e.predictionCount||0,e):null},retryLastRequest(){const e=this.retryAction;this.requestError=null,this.retryAction=null,e&&e()},showRequestError(e,s,t){console.error(`[Sympify] Failed to complete ${s}:`,e),this.requestError=(0,u.hh)(e,s),this.retryAction=t||null},goBack(){if(window.history.length>1)window.history.back();else{const e=this.$i18n.locale;this.$router.push(`/mobile/${e}`)}},goHome(){this.show=!1,this.$router.push(`/mobile/${this.$i18n.locale}`).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation error:",e)}))},goImaging(){this.show=!1,this.$router.push(`/mobile/${this.$i18n.locale}/imaging`).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation error:",e)}))},confirmClearSession(){this.show=!1,m.A.confirm({message:this.$t("mobile.clearSessionConfirm"),confirmButtonText:this.$t("mobile.clearSession"),cancelButtonText:this.$t("mobile.close")}).then((()=>this.clearJourney())).catch((()=>{}))},clearJourney(){(0,S.yj)(),["predictedDiseases","allSymptomSelections","inferredSymptomProfile","seenDiseases","doctorDiagnosedDisease"].forEach((e=>localStorage.removeItem(e))),this.$store.commit("resetCaseSession"),this.journeyId="",this.originalSearchTerm="",this.seedDiseaseName="",this.viewedDiseases=[],this.diseaseFeedback={},this.currentDiseaseName="",this.diseaseDetails={Symptoms:[]},this.selectedSymptoms={},this.userSelections=[],this.allSymptomSelections=[],this.inferredSymptomProfile=[],this.predictedDiseases=[],this.seenDiseases=[],this.predictionCount=0,(0,n.A)(this.$t("mobile.sessionCleared")),this.$router.push(`/mobile/${this.$i18n.locale}`).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation error:",e)}))},showDialog(){this.allSymptomSelections.length?this.showDialogInfo=!0:(0,n.A)(this.$t("mobile.noSymptomsAdded"))},saveReportData(){this.$store.commit("setCaseSymptoms",this.allSymptomSelections),this.$store.commit("setCasePredictions",this.predictedDiseases),localStorage.setItem("predictedDiseases",JSON.stringify(this.predictedDiseases)),localStorage.setItem("allSymptomSelections",JSON.stringify(this.allSymptomSelections)),localStorage.setItem("inferredSymptomProfile",JSON.stringify(this.inferredSymptomProfile)),localStorage.setItem("seenDiseases",JSON.stringify(this.seenDiseases))},openReport(){this.saveReportData(),this.$router.push({name:"Report",params:{lang:this.$i18n.locale},query:{userId:this.userId}})},markDiseaseSeen(e){e&&!this.seenDiseases.includes(e)&&this.seenDiseases.push(e)},async generateReport(){this.requestError=null,this.diseaseDetails?.Symptoms&&this.getSelectedSymptomsWithProbability();try{const e=await(0,d.mL)(this.allSymptomSelections,this.$i18n.locale);this.inferredSymptomProfile=e.symptomProfile?.inferred||[],this.predictedDiseases=(e.results||[]).map((e=>({diseaseName:e.diseaseName,score:e.score})))}catch(e){return void this.showRequestError(e,"generating your report",(()=>this.generateReport()))}if(this.saveReportData(),!this.userId.trim()||!o.Gg||!o.db)return this.showDialogInfo=!1,void this.openReport();try{const e=await(0,u.Pt)((()=>(0,r.GG)((0,r.P)((0,r.rJ)(o.db,"diseaseInfo"),(0,r._M)("userId","==",this.userId)))));if(!e.empty)return(0,l.A)({type:"warning",message:this.$t("mobile.idExistsWarning")}),void(this.userId="");await(0,u.Pt)((()=>(0,r.gS)((0,r.rJ)(o.db,"diseaseInfo"),{userId:this.userId,doctorDiagnosedDisease
1:localStorage.getItem("doctorDiagnosedDisease"),predictedDiseases:this.predictedDiseases,allSymptomSelections:this.allSymptomSelections,inferredSymptomProfile:this.inferredSymptomProfile,seenDiseases:this.seenDiseases}))),(0,l.A)({type:"success",message:this.$t("mobile.storeSuccess")}),this.showDialogInfo=!1,this.openReport()}catch(e){console.error("Error storing results: ",e),(0,l.A)({type:"warning",message:this.$t("mobile.storeUnavailable")}),this.showDialogInfo=!1,this.openReport()}},getSelectedSymptomsWithProbability(){for(let e of this.diseaseDetails.Symptoms){const s=this.selectedSymptoms[e.SymptomName];if(void 0!==s){const t=(0,c.a3)(this.userSelections,e),i=(0,c.cm)(e,s);t?(t.UserChoice=s,t.Possibility=e.Possibility):this.userSelections.push(i)}}this.allSymptomSelections=[...this.allSymptomSelections,...this.userSelections],this.allSymptomSelections=(0,c.Ru)(this.allSymptomSelections)},removeSymptom(e){this.allSymptomSelections=(0,c.eP)(this.allSymptomSelections,e)},getApiSymptomSelections(){return this.allSymptomSelections.map((e=>({symptomId:e.SymptomId,symptomIds:e.SymptomIds,symptomName:e.SymptomName,userChoice:e.UserChoice})))},async getMostLikelyDiseaseFromApi(){const e=await(0,d.X3)((0,d.ri)({selections:this.getApiSymptomSelections(),seenDiseases:this.seenDiseases,seedDiseaseName:this.seedDiseaseName,currentDiseaseName:this.currentDiseaseName,viewedDiseases:this.viewedDiseases}),this.$i18n.locale),s=e.results||[];return s[0]?{diseaseName:s[0].diseaseName,score:s[0].score,description:s[0].disease?.overview||""}:null},processDiseaseScoring(){if(!this.currentDiseaseName)return void(0,n.A)(this.$t("mobile.pleaseSelectDisease"));const e=this.diseaseDetails.Symptoms.every((e=>void 0!==this.selectedSymptoms[e.SymptomName]));if(e){if(this.predictionCount>=this.maxPredictions)return(0,n.A)(this.$t("mobile.maxPredictionsReached")),void(this.showSymptomProfile=!0);this.cardState="leave",setTimeout((async()=>{this.getSelectedSymptomsWithProbability();let e=null;try{e=await this.getMostLikelyDiseaseFromApi()}catch(s){return this.cardState="show",void this.showRequestError(s,"finding the next relevant condition",(()=>this.processDiseaseScoring()))}e?(this.predictedDiseases.push({diseaseName:e.diseaseName,score:e.score,description:e.description}),await this.displayDiseaseDetails(e.diseaseName),this.scrollDiseaseCardToTop(),this.cardState="enter",setTimeout((()=>{this.cardState="show"}),500),this.predictionCount++):((0,n.A)(this.$t("mobile.noMoreUnseenDiseases")),await this.generateReport())}),500)}else(0,n.A)(this.$t("mobile.selectAllSymptomsWarning"))},async configureRegistry(){try{const e=await(0,d.Dp)(this.$i18n.locale);(0,c.Nc)(e.results||[])}catch(e){console.warn("Relational symptom catalog unavailable; using raw-text fallback IDs.",e)}},async displayDiseaseDetails(e){if(!e)return;let s;try{let t=this.diseaseSearchIndex[e];if(!t){const s=await(0,d.EY)(e,this.$i18n.locale,20);(s.results||[]).forEach((e=>{this.diseaseSearchIndex[e.name]=e})),t=(s.results||[]).find((s=>s.name===e))||this.diseaseSearchIndex[e]}if(!t?.id)throw new Error("Disease details were not found.");s=await(0,d.C_)(t.id,this.$i18n.locale)}catch(a){return void this.showRequestError(a,"loading condition details",(()=>this.displayDiseaseDetails(e)))}const t=this.diseaseDetails?.Symptoms||[],i={...this.selectedSymptoms};this.diseaseDetails=s,this.currentDiseaseName=e,this.markDiseaseSeen(e),this.viewedDiseases.includes(e)||this.viewedDiseases.push(e),this.selectedSymptoms={},this.diseaseDetails.Symptoms.forEach((e=>{const s=e.SymptomName,a=t.find((s=>void 0!==i[s.SymptomName]&&(0,c.R1)(s,e))),o=(0,c.a3)(this.allSymptomSelections,e);void 0!==i[s]?this.selectedSymptoms[s]=i[s]:a?this.selectedSymptoms[s]=i[a.SymptomName]:o&&(this.selectedSymptoms[s]=o.UserChoice)})),this.selectedSymptoms={...this.selectedSymptoms,...this.diseaseFeedback[e]||{}},this.userSelections=[]},async reopenViewedDisease(e){e&&e!==this.currentDiseaseName&&(this.showSymptomProfile=!1,this.diseaseDetails?.Symptoms?.length&&this.getSelectedSymptomsWithProbability(),await this.displayDiseaseDetails(e),this.scrollDiseaseCardToTop())},scrollDiseaseCardToTop(){this.$nextTick((()=>{const e=this.$refs.diseaseScroll;e&&"function"===typeof e.scrollTo?e.scrollTo({top:0}):e&&(e.scrollTop=0)}))},changeSymptomChoice({symptom:e,userChoice:s}
1){if(!e||!["yes","no","maybe"].includes(s))return;const t=(0,c.a3)(this.allSymptomSelections,e);if(!t)return;t.UserChoice=s,this.allSymptomSelections=[...this.allSymptomSelections];const i={};Object.entries(this.diseaseFeedback).forEach((([t,a])=>{i[t]={...a},Object.keys(i[t]).forEach((a=>{(0,c.R1)({SymptomName:a},e)&&(i[t][a]=s)}))})),this.diseaseFeedback=i;const a=(this.diseaseDetails.Symptoms||[]).find((s=>(0,c.R1)(s,e)));a&&(this.selectedSymptoms={...this.selectedSymptoms,[a.SymptomName]:s});const o=(0,c.a3)(this.userSelections,e);o&&(o.UserChoice=s),this.persistCurrentSession()},async initJourney(){const e=this.$route.query.diseaseName;if(e){this.isRestoringSession=!0;try{const s=this.restoreJourneyFromSnapshot();await this.configureRegistry(),await this.displayDiseaseDetails(e),s?.currentDiseaseName===e&&(this.selectedSymptoms={...this.selectedSymptoms,...s.diseaseFeedback?.[e]||s.currentSelections||{}})}catch(s){console.warn("The saved mobile journey could not be fully restored.",s)}finally{this.isRestoringSession=!1,this.persistCurrentSession()}}else this.$router.replace(`/mobile/${this.$i18n.locale}`).catch((e=>{"NavigationDuplicated"!==e.name&&console.error("Navigation error:",e)}))}},created(){this.predictedDiseases=[],this.initJourney()}},D=v,f=t(1656),g=(0,f.A)(D,i,a,!1,null,"4d8d8890",null),_=g.exports},9977:function(e,s,t){e.exports=t.p+"img/disease.961de049.png"},9414:function(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJSSURBVHgBpVVdbtpAEJ7xWqGPuUHNDcwNzGMVkZbntiGWqjYoD+kNSm7QPFSkVSWHpO+goqiPwAlCToB7gzw2tdfTmWVDaGIbIj4J2N3Z+XY0Px8IBYii/vat67Z4GQCBz7+eNcW8j1HhWZYkk3bYjPP8MY/wj+N+ZMsRG7dhBUjDcTtsdEqJu9EvD1U6WkRHMJbIFOD43Zud33L0Jer7Diifz1/y9pWlj0nr+nL0mEtKFDsI++/3didQAuPjsA9KIP+TO4sXLCkSTCuZrq0iFbTDF3ElS2viwwwcmBpJKhfE3d6wcxfpVpbWw7B5A2tC7oqPFFTI/zrukQnUpmAmG9JptajKp+fDmST9YG+3mmfvXgwDjnxEADfPmIfrkATWNigiNSD7KUD7bWPMuR5LJ0mbuojYEgckHEAJDlqNKqwAEfUQUPo+cPjLk8M0S65hU2g9tk/4UjxPlodhc1rmIzk+Pf85K7tzn0r0XFgfXs6gFkIijmXx/cflc9gQ36JLf74yAwYmBRoogA2hlZ4TE8YOcYuYtaZ92BAOGP3ghOGZU0nTnjQ174JuNAwKvWSyeDKLzDJoZEUpy5KJqcbXi+EnIuhIbipa154y0gKj3cq9grnWdD60GsdGK7bS9GRp1hdCsi6p+IDVGiGVc0MsEVLmGiHhnPu3Sl11o763ilT0QSIVHyGlTNfvbI+FfqGvxjrgkR+kiNeHr3em8zv8oFKBlYLA3LOkuUK/jPucl0OK7hB8Ztk8eViXwlGS6AGSAF0TGa+X/kyl97lNpaOKCv0P7+8pDPocKikAAAAASUVORK5CYII="}}]); 2//# sourceMappingURL=disease.170f9f06.js.map
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.