PageSourceSearch

https://heartbioportal.com/assets/user_api-CBEvKeRL.js

js heartbioportal.com collected 2026-10-04 16:25:27 UTC 3,831 bytes, 1 lines download raw bytes

1import{_ as e,e as s,N as t,A as a,S as i,l as o,T as n,j as r}from"./index-DxR1C7Xs.js";import{e as l}from"./recaptcha-DF3y2pks.js";import{F as c,J as d,H as p,R as u,S as h,K as m,N as g,a5 as f,G as _,B as y,C as v,P as b}from"./charts-hTM29QIp.js";const k={class:"container"},A={key:0},S={style:{color:"red"}},E={class:"column is-half"},C={style:{position:"relative"},class:"field"},w={class:"field"},x={class:"control"},N={class:"select"},P={class:"field"},B={class:"control"},T={class:"select"};const j=e({setup:()=>({mainStore:s()}),components:{Navbar:t,AutoComplete:a},async fetch(e){e.store.state.gene_names||await e.store.dispatch("get_genes")},data(){return{errors:[],gene:null,disease:"arrhythmia",data_type:"Association",submit_clicked:!1,disease_names:this.config.DISEASE_NAMES}},methods:{async checkForm(e){if(e.preventDefault(),this.errors=[],this.gene)if(this.mainStore.gene_names.includes(this.gene)){if(this.gene){this.submit_clicked=!0;var s=this.getCookie("csrftoken");const e={responseType:"arraybuffer",headers:{"Content-Type":"application/json"}};i.mixin({toast:!0,showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({title:"Preparing the data, please wait ...",icon:"info"});try{const t="Expression"===this.data_type?"expression_download":"association_download",a=await l(t),i=await o.post(this.config.API_BASE_URL+"/api_page",{gene:this.gene,disease:this.disease,recaptcha:a,recaptcha_action:t,data_type:this.data_type,csrfmiddlewaretoken:s,token:n()},e);r(new Blob([i.data],{type:"application/octet-stream"}),this.disease,this.gene,"Expression"===this.data_type?"transcriptomic_signal":"association_variant_index")}catch(t){this.errors.push("Captcha Error!")}finally{this.submit_clicked=!1}}}else this.errors.push("Gene doesn't exist in database!");else this.errors.push("gene required.")},getCookie:function(e){var s=null;if(document.cookie&&""!=document.cookie)for(var t=document.cookie.split(";"),a=0;a<t.length;a++){var i=t[a].trim();if(i.substring(0,e.length+1)==e+"="){s=decodeURIComponent(i.substring(e.length+1));break}}return s},csrfSafeMethod:function(e){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(e)}}},[["render",function(e,s,t,a,i,o){const n=y("Navbar"),r=y("AutoComplete");return v(),c("section",null,[d(n),s[13]||(s[13]=p("br",null,null,-1)),p("div",k,[i.errors.length?(v(),c("p",A,[s[4]||(s[4]=p("b",null,"Please correct the following error(s):",-1)),p("ul",null,[(v(!0),c(u,null,h(i.errors,(e=>(v(),c("li",S,b(e),1)))),256))])])):m("",!0),p("div",E,[p("form",{onSubmit:s[3]||(s[3]=(...e)=>o.checkForm&&o.checkForm(...e)),method:"post"},[s[8]||(s[8]=p("p",{class:"title is-4"},"HeartBioPortal's Advanced Search ",-1)),s[9]||(s[9]=p("i",{style:{color:"grey"},class:"title is-6"},"Provide a gene and disease name and receive the respective data.",-1)),s[10]||(s[10]=p("br",null,null,-1)),s[11]||(s[11]=p("p",{class:"title is-5"}
1," Gene: ",-1)),p("div",C,[d(r,{id:"searchinputid",class:"input",type:"text",placeholder:"e.g. ANK2, NEBL, NPC2",options:e.$store.state.gene_names,modelValue:i.gene,"onUpdate:modelValue":s[0]||(s[0]=e=>i.gene=e)},null,8,["options","modelValue"])]),p("div",w,[s[5]||(s[5]=p("p",{class:"title is-5"}," Disease: ",-1)),p("div",x,[p("div",N,[g(p("select",{"onUpdate:modelValue":s[1]||(s[1]=e=>i.disease=e)},[(v(!0),c(u,null,h(i.disease_names,(e=>(v(),c("option",null,b(e),1)))),256))],512),[[f,i.disease]])])])]),p("div",P,[s[7]||(s[7]=p("p",{class:"title is-5"}," Data type: ",-1)),p("div",B,[p("div",T,[g(p("select",{"onUpdate:modelValue":s[2]||(s[2]=e=>i.data_type=e)},s[6]||(s[6]=[p("option",null,"Association",-1),p("option",null,"Expression",-1)]),512),[[f,i.data_type]])])])]),s[12]||(s[12]=p("br",null,null,-1)),p("button",{class:_(["button",{"is-loading":i.submit_clicked}]),type:"submit",value:"Submit"},"submit",2)],32)])])])}]]);export{j as 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.