1"use strict";(self["webpackChunkcustomer_portal"]=self["webpackChunkcustomer_portal"]||[]).push([[296],{43317:function(e,t,a){a.r(t),a.d(t,{default:function(){return oe}});var l=a(56768),s=a(24232),r=a(45130),i=a.p+"img/warbottondetail.082757fb.png";const n=e=>((0,l.Qi)("data-v-0efcb5c8"),e=e(),(0,l.jt)(),e),o={class:"related-to-page baker-nav"},c=["onClick"],u={key:1,class:"contain-section taste-detail"},h={class:"row"},Y={class:"col-sm-12 col-md-3"},k={class:"left-bar"},p={class:"population-group"},g={class:"population-tabs"},d=["onClick"],B={class:"label"},G={class:"col-sm-12 col-md-9"},v={class:"inner-box"},m={class:"trait-heading"},E=n((()=>(0,l.Lk)("span",{class:"abouttrait text-left"}," Category Score ",-1))),Q={class:"domain-scorepercentage text-left"},F={class:"about-header"},W=n((()=>(0,l.Lk)("div",{class:"abouttrait fw-bold"},"About This Category",-1))),b={class:"about-toggle-btn"},A={class:"snp-description result-card mt-3"},Z={class:"row"},C={class:"col-sm-12 col-lg-6 col-xl-7 text-left"},f=n((()=>(0,l.Lk)("div",{class:"text-center"},[(0,l.Lk)("img",{src:i,alt:"warwatson",class:"warwatsonimage"})],-1))),L=n((()=>(0,l.Lk)("div",{class:"abouttrait fw-bold"},"About This Trait",-1))),V={class:"sub-title fs-18"},y=["innerHTML"],_={class:"sub-title"},w={class:"col-sm-12 col-lg-6 col-xl-5 text-center"},R={class:"inner-content"},I=["src"],S={class:"snp-description result-card mt-3"},x=n((()=>(0,l.Lk)("div",{class:"result-header fw-bold"},"Your Result",-1))),K={class:"result-content"},X={key:0,class:"result-text"},T={key:1,class:"result-text"},O={class:"snp-description result-card mt-3"},P=n((()=>(0,l.Lk)("div",{class:"result-header fw-bold"}," Genetic Markers ",-1))),j={class:"table-responsive"},M={class:"table my_table"},U=n((()=>(0,l.Lk)("thead",null,[(0,l.Lk)("tr",null,[(0,l.Lk)("th",null,"SNP"),(0,l.Lk)("th",null,"Gene"),(0,l.Lk)("th",null,"Locus"),(0,l.Lk)("th",null,"Genotype"),(0,l.Lk)("th",null,"Result")])],-1))),N={class:"genotype"},z={class:"snp-description result-card mt-3"},D={class:"row"},H={class:"col-sm-12 col-md-12 col-lg-12 text-start"},J=n((()=>(0,l.Lk)("div",{class:"result-header fw-bold"},"References ",-1))),q={key:0,class:"text-start"},$=["href"];function ee(e,t,i,n,ee,te){const ae=(0,l.g2)("router-link"),le=(0,l.g2)("page-loader");return(0,l.uX)(),(0,l.CE)(l.FK,null,[(0,l.Lk)("div",o,[(0,l.Lk)("ul",null,[(0,l.Lk)("li",null,[(0,l.bF)(ae,{to:"/bakers/overview",class:"sub-header-link"},{default:(0,l.k6)((()=>[(0,l.eW)("Overview")])),_:1})]),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(n.traits,((e,t)=>((0,l.uX)(),(0,l.CE)("li",{key:e,class:(0,s.C4)({active:n.activeTrait===t}),onClick:e=>n.selectTrait(t)},[(0,l.bF)(ae,{to:{name:"bakers-detail",params:{category:e}},class:"sub-header-link"},{default:(0,l.k6)((()=>[(0,l.eW)((0,s.v_)(e),1)])),_:2},1032,["to"])],10,c)))),128))])]),"loading"===n.loadingStatus?((0,l.uX)(),(0,l.Wv)(le,{key:0})):n.traits.length?((0,l.uX)(),(0,l.CE)("div",u,[(0,l.Lk)("div",h,[(0,l.Lk)("aside",Y,[(0,l.Lk)("div",k,[(0,l.Lk)("div",p,[(0,l.Lk)("h4",null,(0,s.v_)(n.currentTrait),1),(0,l.Lk)("ul",g,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(n.subtraits,((e,t)=>((0,l.uX)(),(0,l.CE)("li",{key:e[0],class:(0,s.C4)({active:n.activeSubtrait===t}),onClick:e=>n.activeSubtrait=t},[(0,l.Lk)("span",B,(0,s.v_)(e[0]),1),(0,l.Lk)("span",{class:"dot",style:(0,s.Tr)({backgroundColor:n.getColor(e[1].total.total_phenotype_slug)})},null,4)],10,d)))),128))])])])]),(0,l.Lk)("section",G,[(0,l.Lk)("div",v,[(0,l.Lk)("h3",m,[(0,l.Lk)("span",null,(0,s.v_)(n.currentTrait),1),E,(0,l.eW)(),(0,l.Lk)("span",Q,(0,s.v_)(n.traitPercentages[n.currentTrait]||0)+"% ",1)]),(0,l.Lk)("div",{class:(0,s.C4)(["about-domain-card",{collapsed:n.isCollapsed}]),onClick:t[0]||(t[0]=(...e)=>n.toggle&&n.toggle(...e))},[(0,l.Lk)("div",F,[W,(0,l.Lk)("div",b,(0,s.v_)(n.isCollapsed?"+ More":"â Less"),1)]),(0,l.bo)((0,l.Lk)("div",{class:"result-text"},(0,s.v_)(n.traitIntroductions[n.currentTrait]),513),[[r.aG,!n.isCollapsed]])],2),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(Object.values(n.currentSnps).slice(0,1),((e,t)=>((0,l.uX)(),(0,l.CE)("div",{key:t},[(0,l.Lk)("div",A,[(0,l.Lk)("div",Z,[(0,l.Lk)("div",C,[f,L,(0,l.Lk)("h4",V,(0,s.v_)(e.bakertraittitle),1),(0,l.Lk)("p",{class:"result-text",innerHTML:n.nl2br(e.bakertraitdesc)},null,8,y),(0,l.Lk)("p",null,(0,s.v_)(e.bakertraitlimitations),1),(0,l.Lk)("p",null,(0,s.v_)(e.bakertraitexpertadvice),1),(0,l.Lk)("h4",_,(0,s.v_)(e.bakertraitscienceofheading),
11),(0,l.Lk)("p",null,(0,s.v_)(e.bakertraitscienceofintroduction),1),(0,l.Lk)("p",null,(0,s.v_)(e.bakertraitrefrences),1)]),(0,l.Lk)("div",w,[(0,l.Lk)("figure",R,[(0,l.Lk)("img",{src:e.bakertraitimage?.url?e.bakertraitimage?.url:a(5475),alt:"warwatson"},null,8,I)])])])]),(0,l.Lk)("div",S,[x,(0,l.Lk)("div",K,[(0,l.Lk)("div",{class:(0,s.C4)("Untested"===n.totalphenoslugScore?"result-untested":n.getResultClass(n.totalphenoslugScore))},(0,s.v_)(n.totalphenoslugScore),3),"Untested"!==n.totalphenoslugScore?((0,l.uX)(),(0,l.CE)("div",X,(0,s.v_)(n.phenotyperesultdesc?.advice_definition),1)):((0,l.uX)(),(0,l.CE)("div",T," We were unable to generate a result for this trait, as the relevant genetic markers were not captured in your DNA data. This is a technical limitation of the testing process, not a reflection of your genetics. It does not mean you lack this ability; simply that we cannot make an assessment for this particular trait. Your other results are unaffected. "))])])])))),128)),(0,l.Lk)("div",O,[P,(0,l.Lk)("div",j,[(0,l.Lk)("table",M,[U,(0,l.Lk)("tbody",null,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(n.snpsWithAdviceFlag,((e,t)=>((0,l.uX)(),(0,l.CE)("tr",{key:t},[(0,l.Lk)("td",null,(0,s.v_)(t),1),(0,l.Lk)("td",null,(0,s.v_)(e.gene),1),(0,l.Lk)("td",null,(0,s.v_)(e.locus),1),(0,l.Lk)("td",null,[(0,l.Lk)("span",N,(0,s.v_)(e.genotype),1)]),(0,l.Lk)("td",null,[(0,l.Lk)("span",{class:(0,s.C4)(n.phenotypeClass(e.phenotype))},(0,s.v_)(e.phenotype),3)])])))),128))])])])]),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(Object.values(n.currentSnps).slice(0,1),((e,t)=>((0,l.uX)(),(0,l.CE)("div",{key:t},[(0,l.Lk)("div",z,[(0,l.Lk)("div",D,[(0,l.Lk)("div",H,[J,e?.bakerrefrences?.length?((0,l.uX)(),(0,l.CE)("ul",q,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(e.bakerrefrences,(e=>((0,l.uX)(),(0,l.CE)("li",{class:"text-decoration-none mb-1",key:e.id},[(0,l.Lk)("a",{href:e.external_url,target:"_blank"},(0,s.v_)(e.title),9,$)])))),128))])):(0,l.Q3)("",!0)])])])])))),128))])])])])):(0,l.Q3)("",!0)],64)}a(44114),a(43375),a(39225),a(13972),a(99209),a(25714),a(17561),a(66197);var te=a(90144),ae=a(4249),le=a(50973),se=a(16884),re={name:"TraitViewer",setup(){const e=(0,ae.Pj)(),t=(0,le.lq)(),a=(0,le.rd)(),s=(0,te.KR)(new Set),r=(0,te.KR)("loading"),i=(0,te.KR)(null),n=(0,te.KR)(0),o=(0,te.KR)(0),c=10,u=(0,te.KR)({}),h=(0,te.KR)({}),Y=(0,te.KR)(!0),k=()=>{Y.value=!Y.value},p=(0,l.EW)((()=>{const e=A.value||{},t=Object.entries(e),a=new Set,l=[];for(let s=t.length-1;s>=0;s--){const[e,r]=t[s];let i=!1;r?.phenotype&&!a.has(r.phenotype)&&(a.add(r.phenotype),i=!0),l.push([e,{...r,showAdvice:i}])}return Object.fromEntries(l.reverse())})),g=e=>e?.toLowerCase().replace(/\s+/g,"-"),d=(0,l.EW)((()=>e.getters.profile?.profile?.barcode||null));(0,l.wB)(d,(async e=>{if(e){r.value="loading";try{const t=await(0,se.hs)(e);i.value=t,r.value="loaded"}catch(t){r.value="loadingFailed"}}}),{immediate:!0});const B=(0,l.EW)((()=>{if(!i.value?.results)return null;try{return JSON.parse(i.value.results)}catch{return null}})),G=(0,l.EW)((()=>B.value?.traits?Object.keys(B.value.traits):[])),v=(0,l.EW)((()=>{const e={};return B.value?.traits?(Object.entries(B.value.traits).forEach((([t,a])=>{const l=a.subtraits||{};let s=0,r=0;Object.values(l).forEach((e=>{const t=e?.total?.total_score;void 0!==t&&null!==t&&(s+=Number(t),r++)})),e[t]=r?Math.round(s/r*100):0})),e):e}));console.log("Percentages:",B.value);const m=(0,l.EW)((()=>G.value[n.value]||"")),E=(0,te.KR)({});(0,l.wB)(m,(async e=>{if(e)try{const t=await(0,se.Qe)(e);if(E.value[e]=t?.description||"","Smell sensitivity"===e){const t=await(0,se.zP)("smell-sensitivity-group");E.value[e]=t.description}else if("Metabolism"===e){const t=await(0,se.zP)("metabolism-group");E.value[e]=t.description}else if("Handling"==e){const t=await(0,se.zP)("handling-group");E.value[e]=t.description}else if("Taste sensitivity"==e){const t=await(0,se.zP)("taste-sensitivity-group");E.value[e]=t.description}}catch(t){E.value[e]=""}}),{immediate:!0});const Q=(0,l.EW)((()=>m.value?Object.entries(B.value.traits[m.value].subtraits):[])),F=(0,l.EW)((()=>
1Q.value[o.value]||null)),W=(0,l.EW)((()=>F.value?.[0]||""));(0,l.wB)((()=>F.value),(async e=>{if(!e)return;s.value=new Set,u.value={},h.value={};const t=e[1]?.snps||{},a=F.value?.[1]?.total?.total_phenotype_slug,l={},r={};await Promise.all(Object.entries(t).map((async([e,t])=>{try{const[s,i]=await Promise.all([(0,se.y5)(a,t.phenotype),(0,se.F8)(a)]);l[e]=s,r[e]=i}catch{l[e]=null,r[e]=null}}))),u.value=l,h.value=r}),{immediate:!0});const b=e=>!!e&&(!s.value.has(e)&&(s.value.add(e),!0)),A=(0,l.EW)((()=>{const e=F.value?.[1]?.snps||{},t={};return Object.entries(e).forEach((([e,a])=>{const l=u.value[e],s=h.value[e];console.log("bivekdata",s),t[e]={...a,bakerprepertitle:l?.related_to_trait||"",bakerpreperadvicedefination:l?.advice_definition||"",bakerprepertakeawayimage:l?.take_away_image||"",bakertraittitle:s?.title||a.title||"",bakertraitdesc:s?.definition||a.definition||"",bakertraitlimitations:s?.limitations||a.limitations||"",bakertraitexpertadvice:s?.expert_advice||a.expert_advice||"",bakertraitimage:s?.main_image||a.main_image||"",bakertraitscienceofheading:s?.science_of_heading||a.science_of_heading||"",bakertraitscienceofintroduction:s?.science_of_introduction||a.science_of_introduction||"",bakertraitrefrences:s?.population_distribution||a.population_distribution||"",bakerrefrences:s?.references||a.references||""}})),t})),Z=(0,l.EW)((()=>{if(!L.value)return null;const e=L.value.split(":"),t=e[1]||"";return t.charAt(0).toUpperCase()+t.slice(1)})),C=(0,l.EW)((()=>F.value?.[1]?.total?.total_score??null)),f=(0,l.EW)((()=>{if(!L.value)return null;const e=L.value.split(":"),t=e[1]||"";return t.charAt(0).toUpperCase()+t.slice(1)})),L=(0,l.EW)((()=>F.value?.[1]?.total?.total_phenotype_slug??null));(0,l.wB)((()=>[t.params.category,t.params.subcat,G.value]),(()=>{if(!G.value.length)return;const e=t.params.category,a=t.params.subcat;if(e){const t=G.value.findIndex((t=>g(t)===e));-1!==t&&(n.value=t)}if(a&&Q.value.length){const e=Q.value.findIndex((e=>g(e[0])===a));-1!==e&&(o.value=e)}}),{immediate:!0});const V=(0,te.KR)(null);(0,l.wB)((()=>L.value),(async e=>{if(e)try{const t=L.value.split(":"),a=t[1]||"",l=a.charAt(0).toUpperCase()+a.slice(1);V.value=await(0,se.y5)(e,l)}catch(t){V.value=null}}),{immediate:!0}),(0,l.wB)([n,o],(()=>{const e=g(m.value),t=g(W.value);e&&a.replace({name:"bakers-detail",params:{category:e,subcat:t}})}));const y=e=>{n.value=e,o.value=0},_=e=>{let t;t=(null!==C.value&&C.value,C.value);const a=Math.ceil(t*c);return e>a?{backgroundColor:"#EFEFEF"}:e===a?{backgroundColor:"#F37021"}:{backgroundColor:"#FFE2CF"}},w=e=>e?"positive"===e?"result-positive":"negative"===e?"result-negative":"untested"===e||"Untested"===e?"result-untested":"intermediate"===e?"result-intermediate":"":"",R=e=>e[1]?.total?.total_score?100*e[1].total.total_score:0,I=e=>{if("number"===typeof e)return e>=60?"green":e>=40?"orange":"red";if("string"===typeof e){const t=e.split(":")[1];switch(t){case"positive":return"green";case"negative":return"red";case"intermediate":return"orange";case"untested":return"gray";default:return"gray"}}return"gray"},S=e=>{if(!e)return"";const t=e.toLowerCase();return t.includes("positive")?"result-positive":t.includes("intermediate")?"result-intermediate":t.includes("negative")?"result-negative":""},x=e=>e?e.replace(/\n/g,"<br>"):"";return{score:R,getColor:I,getResultClass:S,nl2br:x,slugify:g,loadingStatus:r,traits:G,subtraits:Q,activeTrait:n,activeSubtrait:o,currentTrait:m,isCollapsed:Y,toggle:k,currentSubtraitName:W,currentSnps:A,totalScore:C,totalphenoslugScore:f,totalphenoslug:L,segments:c,selectTrait:y,segmentStyle:_,traitPercentages:v,phenotypeClass:w,shouldShowAdvice:b,snpsWithAdviceFlag:p,phenotyperesult:Z,traitIntroductions:E,phenotyperesultdesc:V}}},ie=a(71241);const ne=(0,ie.A)(re,[["render",ee],["__scopeId","data-v-0efcb5c8"]]);var oe=ne},5475:function(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAFMklEQVR4nO3UQQ0AIBDAMMC/58MCP7KkVbDX9swsgILzOwDglWEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZBgWkGFYQIZhARmGBWQYFpBhWECGYQEZhgVkGBaQYVhAhmEBGYYFZFwW0QYdRnYtDgAAAABJRU5ErkJggg=="}}]); 2//# sourceMappingURL=296.e3464873.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.