@galaxyproject/locuszoom 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/dist/index.js +1 -1
package/package.json
CHANGED
package/static/dist/index.js
CHANGED
|
@@ -2017,4 +2017,4 @@ ${t}
|
|
|
2017
2017
|
{{#if phewas:beta|is_numeric}}<br><strong>β:</strong> {{phewas:beta|scinotation|htmlescape}}<br>{{/if}}
|
|
2018
2018
|
{{#if phewas:se|is_numeric}}<strong>SE (β):</strong> {{phewas:se|scinotation|htmlescape}}{{/if}}`},behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},label:{text:"{{phewas:trait_label}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"phewas:log_pvalue",operator:">=",value:20}],style:{"font-size":"14px","font-weight":"bold",fill:"#333333"}}},a4={namespace:{gene:"gene",constraint:"constraint"},data_operations:[{type:"fetch",from:["gene","constraint(gene)"]},{name:"gene_constraint",type:"genes_to_gnomad_constraint",requires:["gene","constraint"]}],id:"genes",type:"genes",tag:"genes",id_field:"gene_id",behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(e4)},s4=qt({filters:[{field:"gene_type",operator:"in",value:["protein_coding","IG_C_gene","IG_D_gene","IG_J_gene","IG_V_gene","TR_C_gene","TR_D_gene","TR_J_gene","TR_V_gene","rRNA","Mt_rRNA","Mt_tRNA"]}]},at(a4)),l4={namespace:{assoc:"assoc",catalog:"catalog"},data_operations:[{type:"fetch",from:["assoc","catalog"]},{type:"assoc_to_gwas_catalog",name:"assoc_plus_ld",requires:["assoc","catalog"],params:["assoc:position","catalog:pos","catalog:log_pvalue"]}],id:"annotation_catalog",type:"annotation_track",tag:"gwascatalog",id_field:"assoc:variant",x_axis:{field:"assoc:position"},color:"#0000CC",filters:[{field:"catalog:rsid",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb}],behaviors:{onmouseover:[{action:"set",status:"highlighted"}],onmouseout:[{action:"unset",status:"highlighted"}],onclick:[{action:"toggle",status:"selected",exclusive:!0}]},tooltip:at(t4),tooltip_positioning:"top"},u4={type:"set_state",tag:"ld_population",position:"right",color:"blue",button_html:"LD Population: ",show_selected:!0,button_title:"Select LD Population: ",custom_event_name:"widget_set_ldpop",state_field:"ld_pop",options:[{display_name:"ALL (default)",value:"ALL"},{display_name:"AFR",value:"AFR"},{display_name:"AMR",value:"AMR"},{display_name:"EAS",value:"EAS"},{display_name:"EUR",value:"EUR"},{display_name:"SAS",value:"SAS"}]},c4={type:"display_options",tag:"gene_filter",custom_event_name:"widget_gene_filter_choice",position:"right",color:"blue",button_html:"Filter...",button_title:"Choose which genes to show",layer_name:"genes",default_config_display_name:"Coding genes & rRNA",options:[{display_name:"All features",display:{filters:null}}]},Ru={widgets:[{type:"remove_panel",position:"right",color:"red",group_position:"end"},{type:"move_panel_up",position:"right",group_position:"middle"},{type:"move_panel_down",position:"right",group_position:"start",style:{"margin-left":"0.75em"}}]},zu={widgets:[{type:"title",title:"LocusZoom",subtitle:`<a href="https://statgen.github.io/locuszoom/" target="_blank" rel="noopener">v${z5}</a>`,position:"left"},{type:"download",position:"right",group_position:"end"},{type:"download_png",position:"right",group_position:"start"}]},Qb=function(){const e=at(zu);return e.widgets.push(at(u4)),e}(),PK=function(){const e=at(zu);return e.widgets.push({type:"shift_region",step:5e5,button_html:">>",position:"right",group_position:"end"},{type:"shift_region",step:5e4,button_html:">",position:"right",group_position:"middle"},{type:"zoom_region",step:.2,position:"right",group_position:"middle"},{type:"zoom_region",step:-.2,position:"right",group_position:"middle"},{type:"shift_region",step:-5e4,button_html:"<",position:"right",group_position:"middle"},{type:"shift_region",step:-5e5,button_html:"<<",position:"right",group_position:"start"}),e}(),em={id:"association",tag:"association",min_height:200,height:300,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:function(){const e=at(Ru);return e.widgets.push({type:"toggle_legend",position:"right"}),e}(),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"-log10 p-value",label_offset:50},y2:{label:"Recombination Rate (cM/Mb)",label_offset:46}},legend:{orientation:"vertical",origin:{x:75,y:40},hidden:!0},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,drag_y2_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(dh),at(Zb),at(Jb)]},d4={id:"coaccessibility",tag:"coaccessibility",min_height:150,height:180,margin:{top:35,right:55,bottom:40,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"},y1:{label:"Score",label_offset:40,render:!1}},interaction:{drag_background_to_pan:!0,drag_x_ticks_to_scale:!0,drag_y1_ticks_to_scale:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(r4)]},f4=function(){let e=at(em);return e=qt({id:"associationcatalog"},e),e.toolbar.widgets.push({type:"display_options",position:"right",color:"blue",button_html:"Display options...",button_title:"Control how plot items are displayed",layer_name:"associationpvaluescatalog",default_config_display_name:"No catalog labels (default)",options:[{display_name:"Label catalog traits",display:{label:{text:"{{catalog:trait}}",spacing:6,lines:{style:{"stroke-width":"2px",stroke:"#333333","stroke-dasharray":"2px 2px"}},filters:[{field:"catalog:trait",operator:"!=",value:null},{field:"catalog:log_pvalue",operator:">",value:Xb},{field:"ld:correlation",operator:">",value:.4}],style:{"font-size":"12px","font-weight":"bold",fill:"#333333"}}}}]}),e.data_layers=[at(dh),at(Zb),at(i4)],e}(),Fu={id:"genes",tag:"genes",min_height:150,height:225,margin:{top:20,right:55,bottom:20,left:70},axes:{},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},toolbar:function(){const e=at(Ru);return e.widgets.push({type:"resize_to_data",position:"right",button_html:"Resize"},at(c4)),e}(),data_layers:[at(s4)]},h4={id:"phewas",tag:"phewas",min_height:300,height:300,margin:{top:20,right:55,bottom:120,left:70},inner_border:"rgb(210, 210, 210)",axes:{x:{ticks:{style:{"font-weight":"bold","font-size":"11px","text-anchor":"start"},transform:"rotate(50)",position:"left"}},y1:{label:"-log10 p-value",label_offset:50}},data_layers:[at(dh),at(o4)]},p4={id:"annotationcatalog",tag:"gwascatalog",min_height:50,height:50,margin:{top:25,right:55,bottom:10,left:70},inner_border:"rgb(210, 210, 210)",toolbar:at(Ru),axes:{x:{extent:"state",render:!1}},interaction:{drag_background_to_pan:!0,scroll_to_zoom:!0,x_linked:!0},data_layers:[at(l4)]},RK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[at(em),at(Fu)]},zK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:Qb,panels:[p4,f4,Fu]},FK={width:800,responsive_resize:!0,toolbar:zu,panels:[at(h4),qt({height:300,margin:{bottom:40},axes:{x:{label:"Chromosome {{chr}} (Mb)",label_offset:38,tick_format:"region",extent:"state"}}},at(Fu))],mouse_guide:!1},IK={state:{},width:800,responsive_resize:!0,min_region_scale:2e4,max_region_scale:1e6,toolbar:at(zu),panels:[at(d4),function(){const e=Object.assign({height:270},at(Fu)),t=e.data_layers[0];t.match={send:"gene_name",receive:"gene_name"};const n=[{field:"lz_is_match",scale_function:"if",parameters:{field_value:!0,then:"#4285f4"}},{field:"lz_is_match",scale_function:"if",parameters:{field_value:!1,then:"#EAE6E6"}},"#363696"];return t.color=n,t.stroke=n,e}()]},BK={standard_association:Kb,standard_association_with_label:AK,standard_genes:e4,catalog_variant:t4,coaccessibility:n4},OK={ldlz2_pop_selector:u4,gene_selector_menu:c4},NK={standard_panel:Ru,standard_plot:zu,standard_association:Qb,region_nav_plot:PK},LK={significance:dh,recomb_rate:Zb,association_pvalues:Jb,coaccessibility:r4,association_pvalues_catalog:i4,phewas_pvalues:o4,genes:a4,genes_filtered:s4,annotation_catalog:l4},DK={association:em,coaccessibility:d4,association_catalog:f4,genes:Fu,phewas:h4,annotation_catalog:p4},HK={standard_association:RK,association_catalog:zK,standard_phewas:FK,coaccessibility:IK},UK=Object.freeze(Object.defineProperty({__proto__:null,data_layer:LK,panel:DK,plot:HK,toolbar:NK,toolbar_widgets:OK,tooltip:BK},Symbol.toStringTag,{value:"Module"}));class jK extends Zi{get(t,n,r={}){if(!(t&&n))throw new Error("Must specify both the type and name for the layout desired. See .list() for available options");let i=super.get(t).get(n);const o=r.namespace;i.namespace||delete r.namespace;let a=qt(r,i);return o&&(a=q6(a,o)),at(a)}add(t,n,r,i=!1){if(!(t&&n&&r))throw new Error("To add a layout, type, name, and item must all be specified");if(typeof r!="object")throw new Error("The configuration to be added must be an object");this.has(t)||super.add(t,new Zi);const o=at(r);return t==="data_layer"&&o.namespace&&(o._auto_fields=[...Vb(o,Object.keys(o.namespace))].sort()),super.get(t).add(n,o,i)}list(t){if(!t){let n={};for(let[r,i]of this._items)n[r]=i.list();return n}return super.get(t).list()}merge(t,n){return qt(t,n)}renameField(){return kg(...arguments)}mutate_attrs(){return PX(...arguments)}query_attrs(){return RX(...arguments)}}const g4=new jK;for(let[e,t]of Object.entries(UK))for(let[n,r]of Object.entries(t))g4.add(e,n,r);const _a=new Zi;function Iu(e){return(t,n,...r)=>{if(n.length!==2)throw new Error("Join functions must receive exactly two recordsets");return e(...n,...r)}}function WK(e,t,n,r,i){if(!e.length)return e;const o=M0(t,r),a=[];for(let s of o.values()){let l=0,u;for(let c of s){const f=c[i];f>=l&&(u=c,l=f)}u.n_catalog_matches=s.length,a.push(u)}return F5(e,a,n,r)}function VK(e,t){return e.forEach(function(n){const r=`_${n.gene_name.replace(/[^A-Za-z0-9_]/g,"_")}`,i=t[r]&&t[r].gnomad_constraint;i&&Object.keys(i).forEach(function(o){let a=i[o];typeof n[o]>"u"&&(typeof a=="number"&&a.toString().includes(".")&&(a=parseFloat(a.toFixed(2))),n[o]=a)})}),e}_a.add("left_match",Iu(F5));_a.add("inner_match",Iu(fB));_a.add("full_outer_match",Iu(hB));_a.add("assoc_to_gwas_catalog",Iu(WK));_a.add("genes_to_gnomad_constraint",Iu(VK));class qK extends Zi{constructor(t){super(),this._registry=t||ns}add(t,n,r=!1){if(this._registry.has(t))throw new Error(`The namespace ${t} is already in use by another source`);if(t.match(/[^A-Za-z0-9_]/))throw new Error(`Data source namespace names can only contain alphanumeric characters or underscores. Invalid name: ${t}`);if(Array.isArray(n)){const[i,o]=n;n=this._registry.create(i,o)}return n.source_id=t,super.add(t,n,r),this}}const Fi={version:z5,populate:iK,DataSources:qK,Adapters:ns,DataLayers:Yb,DataFunctions:_a,Layouts:g4,MatchFunctions:pr,ScaleFunctions:ch,TransformationFunctions:Wb,Widgets:qb,get KnownDataSources(){return console.warn('Deprecation warning: KnownDataSources has been renamed to "Adapters"'),ns}},$x=[];Fi.use=function(e,...t){if(!$x.includes(e)){if(t.unshift(Fi),typeof e.install=="function")e.install.apply(e,t);else if(typeof e=="function")e.apply(null,t);else throw new Error("Plugin must export a function that receives the LocusZoom object as an argument");$x.push(e)}};var GK="";function v4(e){return XK(YK(KK(e)))}function YK(e){return JK(QK(ZK(e),e.length*8))}function XK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)i*8+a*6>e.length*8?n+=GK:n+=t.charAt(o>>>6*(3-a)&63);return n}function KK(e){for(var t="",n=-1,r,i;++n<e.length;)r=e.charCodeAt(n),i=n+1<e.length?e.charCodeAt(n+1):0,55296<=r&&r<=56319&&56320<=i&&i<=57343&&(r=65536+((r&1023)<<10)+(i&1023),n++),r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(192|r>>>6&31,128|r&63):r<=65535?t+=String.fromCharCode(224|r>>>12&15,128|r>>>6&63,128|r&63):r<=2097151&&(t+=String.fromCharCode(240|r>>>18&7,128|r>>>12&63,128|r>>>6&63,128|r&63));return t}function ZK(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32;return t}function JK(e){for(var t="",n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}function QK(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,f=o,d=a,h=s,p=0;p<80;p++){p<16?n[p]=e[l+p]:n[p]=Vp(n[p-3]^n[p-8]^n[p-14]^n[p-16],1);var g=ri(ri(Vp(r,5),eZ(p,i,o,a)),ri(ri(s,n[p]),tZ(p)));s=a,a=o,o=Vp(i,30),i=r,r=g}r=ri(r,u),i=ri(i,c),o=ri(o,f),a=ri(a,d),s=ri(s,h)}return Array(r,i,o,a,s)}function eZ(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function tZ(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function ri(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function Vp(e,t){return e<<t|e>>>32-t}function nZ(e){var t={};for(var n in e)t[n]=e[n];return t}"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")});function bi(e,t,n,r){r||(typeof t=="object"?(r=t,t=void 0):r={}),this.url=e,this.start=t||0,n&&(this.end=n),this.opts=r}bi.prototype.slice=function(e,t){if(e<0)throw"Bad slice "+e;var n=this.start,r=this.end;return n&&e?n=n+e:n=e||n,t&&n?r=n+t-1:r=r||t-1,new bi(this.url,n,r,this.opts)};var b4=0,m4=typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>=0&&navigator.userAgent.indexOf("Chrome")<0;bi.prototype.fetchAsText=function(e){var t=this;this.getURL().then(function(n){try{var r=new XMLHttpRequest,i;if((m4||t.opts.salt)&&n.indexOf("?")<0&&(n=n+"?salt="+v4(""+Date.now()+","+ ++b4)),r.open("GET",n,!0),t.end){if(t.end-t.start>1e8)throw"Monster fetch!";r.setRequestHeader("Range","bytes="+t.start+"-"+t.end),i=t.end-t.start+1}r.onreadystatechange=function(){if(r.readyState==4)return r.status==200||r.status==206?e(r.responseText):e(null)},t.opts.credentials&&(r.withCredentials=!0),r.send()}catch{return e(null)}}).catch(function(n){return console.log(n),e(null,n)})};bi.prototype.salted=function(){var e=nZ(this.opts);return e.salt=!0,new bi(this.url,this.start,this.end,e)};bi.prototype.getURL=function(){return this.opts.resolver?this.opts.resolver(this.url).then(function(e){return typeof e=="string"?e:e.url}):Promise.resolve(this.url)};bi.prototype.fetch=function(e,t){var n=this;t=t||{};var r=t.attempt||1,i=t.truncatedLength;if(r>3)return e(null);this.getURL().then(function(o){try{var a;t.timeout&&!n.opts.credentials&&(a=setTimeout(function(){return console.log("timing out "+o),s.abort(),e(null,"Timeout")},t.timeout));var s=new XMLHttpRequest,l;if((m4||n.opts.salt)&&o.indexOf("?")<0&&(o=o+"?salt="+v4(""+Date.now()+","+ ++b4)),s.open("GET",o,!0),s.overrideMimeType("text/plain; charset=x-user-defined"),n.end){if(n.end-n.start>1e8)throw"Monster fetch!";s.setRequestHeader("Range","bytes="+n.start+"-"+n.end),l=n.end-n.start+1}s.responseType="arraybuffer",s.onreadystatechange=function(){if(s.readyState==4)if(a&&clearTimeout(a),s.status==200||s.status==206)if(s.response){var u=s.response.byteLength;return l&&l!=u&&(!i||u!=i)?n.fetch(e,{attempt:r+1,truncatedLength:u}):e(s.response)}else{if(s.mozResponseArrayBuffer)return e(s.mozResponseArrayBuffer);var c=s.responseText;return l&&l!=c.length&&(!i||c.length!=i)?n.fetch(e,{attempt:r+1,truncatedLength:c.length}):e(rZ(s.responseText))}else return n.fetch(e,{attempt:r+1})},n.opts.credentials&&(s.withCredentials=!0),s.send()}catch{return e(null)}}).catch(function(o){return console.log(o),e(null,o)})};function rZ(e){if(!e)return null;for(var t=new Uint8Array(e.length),n=0;n<t.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function an(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}var qp={exports:{}},kx;function iZ(){return kx||(kx=1,function(e){var t=15,n=t,r=1440,i=15,o=32,a=0,s=4,l=8,u=0,c=1,f=2,d=-2,h=-3,p=-4,g=-5,b=0,v=1,x=2,y=3,_=4,S=5,$=6,w=7,T=8,M=9,P=10,R=11,C=12,E=13,F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],z=0,j=1,Z=2,J=3,ie=4,he=5,_e=6,oe=7,ve=8,we=9,Oe=9,xe=5,Xe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ve=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],de=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ee=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function H(){}H.prototype.inflateInit=function(m,I){return m||(m=n),I&&(I=!1),this.istate=new Y,this.istate.inflateInit(this,I?-m:m)},H.prototype.inflate=function(m){return this.istate==null?d:this.istate.inflate(this,m)},H.prototype.inflateEnd=function(){if(this.istate==null)return d;var m=istate.inflateEnd(this);return this.istate=null,m},H.prototype.inflateSync=function(){return istate.inflateSync(this)},H.prototype.inflateSetDictionary=function(m,I){return istate.inflateSetDictionary(this,m,I)};function Y(){this.was=[0]}Y.prototype.inflateReset=function(m){return m==null||m.istate==null?d:(m.total_in=m.total_out=0,m.msg=null,m.istate.mode=m.istate.nowrap!=0?w:b,m.istate.blocks.reset(m,null),u)},Y.prototype.inflateEnd=function(m){return this.blocks!=null&&this.blocks.free(m),this.blocks=null,u},Y.prototype.inflateInit=function(m,I){return m.msg=null,this.blocks=null,nowrap=0,I<0&&(I=-I,nowrap=1),I<8||I>15?(this.inflateEnd(m),d):(this.wbits=I,m.istate.blocks=new q(m,m.istate.nowrap!=0?null:this,1<<I),this.inflateReset(m),u)},Y.prototype.inflate=function(m,I){var D,te;if(m==null||m.istate==null||m.next_in==null)return d;for(I=I==s?g:u,D=g;;)switch(m.istate.mode){case b:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,((m.istate.method=m.next_in[m.next_in_index++])&15)!=l){m.istate.mode=E,m.msg="unknown compression method",m.istate.marker=5;break}if((m.istate.method>>4)+8>m.istate.wbits){m.istate.mode=E,m.msg="invalid window size",m.istate.marker=5;break}m.istate.mode=v;case v:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,te=m.next_in[m.next_in_index++]&255,((m.istate.method<<8)+te)%31!=0){m.istate.mode=E,m.msg="incorrect header check",m.istate.marker=5;break}if((te&o)==0){m.istate.mode=w;break}m.istate.mode=x;case x:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=y;case y:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=_;case _:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=S;case S:return m.avail_in==0?D:(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.adler=m.istate.need,m.istate.mode=$,f);case $:return m.istate.mode=E,m.msg="need dictionary",m.istate.marker=0,d;case w:if(D=m.istate.blocks.proc(m,D),D==h){m.istate.mode=E,m.istate.marker=0;break}if(D==u&&(D=I),D!=c)return D;if(D=I,m.istate.blocks.reset(m,m.istate.was),m.istate.nowrap!=0){m.istate.mode=C;break}m.istate.mode=T;case T:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need=(m.next_in[m.next_in_index++]&255)<<24&4278190080,m.istate.mode=M;case M:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<16&16711680,m.istate.mode=P;case P:if(m.avail_in==0)return D;D=I,m.avail_in--,m.total_in++,m.istate.need+=(m.next_in[m.next_in_index++]&255)<<8&65280,m.istate.mode=R;case R:if(m.avail_in==0)return D;if(D=I,m.avail_in--,m.total_in++,m.istate.need+=m.next_in[m.next_in_index++]&255,m.istate.was[0]!=m.istate.need){m.istate.mode=E,m.msg="incorrect data check",m.istate.marker=5;break}m.istate.mode=C;case C:return c;case E:return h;default:return d}},Y.prototype.inflateSetDictionary=function(m,I,D){var te=0,K=D;return m==null||m.istate==null||m.istate.mode!=$?d:m._adler.adler32(1,I,0,D)!=m.adler?h:(m.adler=m._adler.adler32(0,null,0,0),K>=1<<m.istate.wbits&&(K=(1<<m.istate.wbits)-1,te=D-K),m.istate.blocks.set_dictionary(I,te,K),m.istate.mode=w,u)};var fe=[0,0,255,255];Y.prototype.inflateSync=function(m){var I,D,te,K,se;if(m==null||m.istate==null)return d;if(m.istate.mode!=E&&(m.istate.mode=E,m.istate.marker=0),(I=m.avail_in)==0)return g;for(D=m.next_in_index,te=m.istate.marker;I!=0&&te<4;)m.next_in[D]==fe[te]?te++:m.next_in[D]!=0?te=0:te=4-te,D++,I--;return m.total_in+=D-m.next_in_index,m.next_in_index=D,m.avail_in=I,m.istate.marker=te,te!=4?h:(K=m.total_in,se=m.total_out,this.inflateReset(m),m.total_in=K,m.total_out=se,m.istate.mode=w,u)},Y.prototype.inflateSyncPoint=function(m){return m==null||m.istate==null||m.istate.blocks==null?d:m.istate.blocks.sync_point()};var le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function q(m,I,D){this.hufts=new Int32Array(r*3),this.window=new Uint8Array(D),this.end=D,this.checkfn=I,this.mode=z,this.reset(m,null),this.left=0,this.table=0,this.index=0,this.blens=null,this.bb=new Int32Array(1),this.tb=new Int32Array(1),this.codes=new Re,this.last=0,this.bitk=0,this.bitb=0,this.read=0,this.write=0,this.check=0,this.inftree=new rt}q.prototype.reset=function(m,I){I&&(I[0]=this.check),this.mode==_e&&this.codes.free(m),this.mode=z,this.bitk=0,this.bitb=0,this.read=this.write=0,this.checkfn&&(m.adler=this.check=m._adler.adler32(0,null,0,0))},q.prototype.proc=function(m,I){var D,te,K,se,ue,ae,ke;for(se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae;;)switch(this.mode){case z:for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}switch(D=te&7,this.last=D&1,D>>>1){case 0:te>>>=3,K-=3,D=K&7,te>>>=D,K-=D,this.mode=j;break;case 1:{var Me=new Int32Array(1),$e=new Int32Array(1),ze=[],Je=[];lt(Me,$e,ze,Je),this.codes.init(Me[0],$e[0],ze[0],0,Je[0],0,m)}te>>>=3,K-=3,this.mode=_e;break;case 2:te>>>=3,K-=3,this.mode=J;break;case 3:return te>>>=3,K-=3,this.mode=E,m.msg="invalid block type",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}break;case j:for(;K<32;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if((~te>>>16&65535)!=(te&65535))return this.mode=E,m.msg="invalid stored block lengths",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.left=te&65535,te=K=0,this.mode=this.left!=0?Z:this.last!=0?oe:z;break;case Z:if(ue==0)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);if(ke==0&&(ae==end&&read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0&&(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,ae==this.end&&this.read!=0&&(ae=0,ke=ae<this.read?this.read-ae-1:this.end-ae),ke==0)))return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(I=u,D=this.left,D>ue&&(D=ue),D>ke&&(D=ke),yt(m.next_in,se,this.window,ae,D),se+=D,ue-=D,ae+=D,ke-=D,(this.left-=D)!=0)break;this.mode=this.last!=0?oe:z;break;case J:for(;K<14;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(this.table=D=te&16383,(D&31)>29||(D>>5&31)>29)return this.mode=we,m.msg="too many length or distance symbols",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);if(D=258+(D&31)+(D>>5&31),this.blens==null||this.blens.length<D)this.blens=new Int32Array(D);else for(var Ne=0;Ne<D;Ne++)this.blens[Ne]=0;te>>>=14,K-=14,this.index=0,mode=ie;case ie:for(;this.index<4+(this.table>>>10);){for(;K<3;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}this.blens[le[this.index++]]=te&7,te>>>=3,K-=3}for(;this.index<19;)this.blens[le[this.index++]]=0;if(this.bb[0]=7,D=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,m),D!=u)return I=D,I==h&&(this.blens=null,this.mode=we),this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,write=ae,this.inflate_flush(m,I);this.index=0,this.mode=he;case he:for(;D=this.table,this.index<258+(D&31)+(D>>5&31);){var Ne,ht,Le;for(D=this.bb[0];K<D;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(D=this.hufts[(this.tb[0]+(te&F[D]))*3+1],Le=this.hufts[(this.tb[0]+(te&F[D]))*3+2],Le<16)te>>>=D,K-=D,this.blens[this.index++]=Le;else{for(Ne=Le==18?7:Le-14,ht=Le==18?11:3;K<D+Ne;){if(ue!=0)I=u;else return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);ue--,te|=(m.next_in[se++]&255)<<K,K+=8}if(te>>>=D,K-=D,ht+=te&F[Ne],te>>>=Ne,K-=Ne,Ne=this.index,D=this.table,Ne+ht>258+(D&31)+(D>>5&31)||Le==16&&Ne<1)return this.blens=null,this.mode=we,m.msg="invalid bit length repeat",I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);Le=Le==16?this.blens[Ne-1]:0;do this.blens[Ne++]=Le;while(--ht!=0);this.index=Ne}}this.tb[0]=-1;{var Me=new Int32Array(1),$e=new Int32Array(1),ze=new Int32Array(1),Je=new Int32Array(1);if(Me[0]=9,$e[0]=6,D=this.table,D=this.inftree.inflate_trees_dynamic(257+(D&31),1+(D>>5&31),this.blens,Me,$e,ze,Je,this.hufts,m),D!=u)return D==h&&(this.blens=null,this.mode=E),I=D,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);this.codes.init(Me[0],$e[0],this.hufts,ze[0],this.hufts,Je[0],m)}this.mode=_e;case _e:if(this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,(I=this.codes.proc(this,m,I))!=c)return this.inflate_flush(m,I);if(I=u,this.codes.free(m),se=m.next_in_index,ue=m.avail_in,te=this.bitb,K=this.bitk,ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.last==0){this.mode=z;break}this.mode=oe;case oe:if(this.write=ae,I=this.inflate_flush(m,I),ae=this.write,ke=ae<this.read?this.read-ae-1:this.end-ae,this.read!=this.write)return this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);mode=C;case ve:return I=c,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);case we:return I=h,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I);default:return I=d,this.bitb=te,this.bitk=K,m.avail_in=ue,m.total_in+=se-m.next_in_index,m.next_in_index=se,this.write=ae,this.inflate_flush(m,I)}},q.prototype.free=function(m){this.reset(m,null),this.window=null,this.hufts=null},q.prototype.set_dictionary=function(m,I,D){yt(m,I,window,0,D),this.read=this.write=D},q.prototype.sync_point=function(){return this.mode==j},q.prototype.inflate_flush=function(m,I){var D,te,K;return te=m.next_out_index,K=this.read,D=(K<=this.write?this.write:this.end)-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D,K==this.end&&(K=0,this.write==this.end&&(this.write=0),D=this.write-K,D>m.avail_out&&(D=m.avail_out),D!=0&&I==g&&(I=u),m.avail_out-=D,m.total_out+=D,this.checkfn!=null&&(m.adler=this.check=m._adler.adler32(this.check,this.window,K,D)),yt(this.window,K,m.next_out,te,D),te+=D,K+=D),m.next_out_index=te,this.read=K,I};var N=0,re=1,L=2,O=3,ee=4,U=5,B=6,V=7,me=8,Ae=9;function Re(){}Re.prototype.init=function(m,I,D,te,K,se,ue){this.mode=N,this.lbits=m,this.dbits=I,this.ltree=D,this.ltree_index=te,this.dtree=K,this.dtree_index=se,this.tree=null},Re.prototype.proc=function(m,I,D){var te,K,se,ue=0,ae=0,ke=0,Me,$e,ze,Je;for(ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e;;)switch(this.mode){case N:if(ze>=258&&Me>=10&&(m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,D=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,m,I),ke=I.next_in_index,Me=I.avail_in,ue=m.bitb,ae=m.bitk,$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,D!=u)){this.mode=D==c?V:Ae;break}this.need=this.lbits,this.tree=this.ltree,this.tree_index=this.ltree_index,this.mode=re;case re:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],se==0){this.lit=this.tree[K+2],this.mode=B;break}if((se&16)!=0){this.get=se&15,this.len=this.tree[K+2],this.mode=L;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}if((se&32)!=0){this.mode=V;break}return this.mode=Ae,I.msg="invalid literal/length code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case L:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.len+=ue&F[te],ue>>=te,ae-=te,this.need=this.dbits,this.tree=this.dtree,this.tree_index=this.dtree_index,this.mode=O;case O:for(te=this.need;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}if(K=(this.tree_index+(ue&F[te]))*3,ue>>=this.tree[K+1],ae-=this.tree[K+1],se=this.tree[K],(se&16)!=0){this.get=se&15,this.dist=this.tree[K+2],this.mode=ee;break}if((se&64)==0){this.need=se,this.tree_index=K/3+this.tree[K+2];break}return this.mode=Ae,I.msg="invalid distance code",D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case ee:for(te=this.get;ae<te;){if(Me!=0)D=u;else return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);Me--,ue|=(I.next_in[ke++]&255)<<ae,ae+=8}this.dist+=ue&F[te],ue>>=te,ae-=te,this.mode=U;case U:for(Je=$e-this.dist;Je<0;)Je+=m.end;for(;this.len!=0;){if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);m.window[$e++]=m.window[Je++],ze--,Je==m.end&&(Je=0),this.len--}this.mode=N;break;case B:if(ze==0&&($e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0&&(m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,$e==m.end&&m.read!=0&&($e=0,ze=$e<m.read?m.read-$e-1:m.end-$e),ze==0)))return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);D=u,m.window[$e++]=this.lit,ze--,this.mode=N;break;case V:if(ae>7&&(ae-=8,Me++,ke--),m.write=$e,D=m.inflate_flush(I,D),$e=m.write,ze=$e<m.read?m.read-$e-1:m.end-$e,m.read!=m.write)return m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);this.mode=me;case me:return D=c,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);case Ae:return D=h,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D);default:return D=d,m.bitb=ue,m.bitk=ae,I.avail_in=Me,I.total_in+=ke-I.next_in_index,I.next_in_index=ke,m.write=$e,m.inflate_flush(I,D)}},Re.prototype.free=function(m){},Re.prototype.inflate_fast=function(m,I,D,te,K,se,ue,ae){var ke,Me,$e,ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut;ht=ae.next_in_index,Le=ae.avail_in,Je=ue.bitb,Ne=ue.bitk,Be=ue.write,X=Be<ue.read?ue.read-Be-1:ue.end-Be,be=F[m],He=F[I];do{for(;Ne<20;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(ke=Je&be,Me=D,$e=te,ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;continue}do{if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15,Te=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze;Ne<15;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;ke=Je&He,Me=K,$e=se,ut=($e+ke)*3,ze=Me[ut];do if(Je>>=Me[ut+1],Ne-=Me[ut+1],(ze&16)!=0){for(ze&=15;Ne<ze;)Le--,Je|=(ae.next_in[ht++]&255)<<Ne,Ne+=8;if(gt=Me[ut+2]+(Je&F[ze]),Je>>=ze,Ne-=ze,X-=Te,Be>=gt)De=Be-gt,Be-De>0&&2>Be-De,ue.window[Be++]=ue.window[De++],ue.window[Be++]=ue.window[De++],Te-=2;else{De=Be-gt;do De+=ue.end;while(De<0);if(ze=ue.end-De,Te>ze){if(Te-=ze,Be-De>0&&ze>Be-De)do ue.window[Be++]=ue.window[De++];while(--ze!=0);else yt(ue.window,De,ue.window,Be,ze),Be+=ze,De+=ze,ze=0;De=0}}do ue.window[Be++]=ue.window[De++];while(--Te!=0);break}else if((ze&64)==0)ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,ze=Me[ut];else return ae.msg="invalid distance code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h;while(!0);break}if((ze&64)==0){if(ke+=Me[ut+2],ke+=Je&F[ze],ut=($e+ke)*3,(ze=Me[ut])==0){Je>>=Me[ut+1],Ne-=Me[ut+1],ue.window[Be++]=Me[ut+2],X--;break}}else return(ze&32)!=0?(Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,c):(ae.msg="invalid literal/length code",Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,h)}while(!0)}while(X>=258&&Le>=10);return Te=ae.avail_in-Le,Te=Ne>>3<Te?Ne>>3:Te,Le+=Te,ht-=Te,Ne-=Te<<3,ue.bitb=Je,ue.bitk=Ne,ae.avail_in=Le,ae.total_in+=ht-ae.next_in_index,ae.next_in_index=ht,ue.write=Be,u};function rt(){}rt.prototype.huft_build=function(m,I,D,te,K,se,ue,ae,ke,Me,$e){var ze,Je,Ne,ht,Le,Be,X,be,He,Te,gt,De,ut,pn,Wt;Te=0,Le=D;do this.c[m[I+Te]]++,Te++,Le--;while(Le!=0);if(this.c[0]==D)return ue[0]=-1,ae[0]=0,u;for(be=ae[0],Be=1;Be<=i&&this.c[Be]==0;Be++);for(X=Be,be<Be&&(be=Be),Le=i;Le!=0&&this.c[Le]==0;Le--);for(Ne=Le,be>Le&&(be=Le),ae[0]=be,pn=1<<Be;Be<Le;Be++,pn<<=1)if((pn-=this.c[Be])<0)return h;if((pn-=this.c[Le])<0)return h;for(this.c[Le]+=pn,this.x[1]=Be=0,Te=1,ut=2;--Le!=0;)this.x[ut]=Be+=this.c[Te],ut++,Te++;Le=0,Te=0;do(Be=m[I+Te])!=0&&(this.v[this.x[Be]++]=Le),Te++;while(++Le<D);for(D=this.x[Ne],this.x[0]=Le=0,Te=0,ht=-1,De=-be,this.u[0]=0,gt=0,Wt=0;X<=Ne;X++)for(ze=this.c[X];ze--!=0;){for(;X>De+be;){if(ht++,De+=be,Wt=Ne-De,Wt=Wt>be?be:Wt,(Je=1<<(Be=X-De))>ze+1&&(Je-=ze+1,ut=X,Be<Wt))for(;++Be<Wt&&!((Je<<=1)<=this.c[++ut]);)Je-=this.c[ut];if(Wt=1<<Be,this.hn[0]+Wt>r)return h;this.u[ht]=gt=this.hn[0],this.hn[0]+=Wt,ht!=0?(this.x[ht]=Le,this.r[0]=Be,this.r[1]=be,Be=Le>>>De-be,this.r[2]=gt-this.u[ht-1]-Be,yt(this.r,0,ke,(this.u[ht-1]+Be)*3,3)):ue[0]=gt}for(this.r[1]=X-De,Te>=D?this.r[0]=192:$e[Te]<te?(this.r[0]=this.v[Te]<256?0:96,this.r[2]=this.v[Te++]):(this.r[0]=se[this.v[Te]-te]+16+64,this.r[2]=K[this.v[Te++]-te]),Je=1<<X-De,Be=Le>>>De;Be<Wt;Be+=Je)yt(this.r,0,ke,(gt+Be)*3,3);for(Be=1<<X-1;(Le&Be)!=0;Be>>>=1)Le^=Be;for(Le^=Be,He=(1<<De)-1;(Le&He)!=this.x[ht];)ht--,De-=be,He=(1<<De)-1}return pn!=0&&Ne!=1?g:u},rt.prototype.inflate_trees_bits=function(m,I,D,te,K){var se;return this.initWorkArea(19),this.hn[0]=0,se=this.huft_build(m,0,19,19,null,null,D,I,te,this.hn,this.v),se==h?K.msg="oversubscribed dynamic bit lengths tree":(se==g||I[0]==0)&&(K.msg="incomplete dynamic bit lengths tree",se=h),se},rt.prototype.inflate_trees_dynamic=function(m,I,D,te,K,se,ue,ae,ke){var Me;return this.initWorkArea(288),this.hn[0]=0,Me=this.huft_build(D,0,m,257,de,Ee,se,te,ae,this.hn,this.v),Me!=u||te[0]==0?(Me==h?ke.msg="oversubscribed literal/length tree":Me!=p&&(ke.msg="incomplete literal/length tree",Me=h),Me):(this.initWorkArea(288),Me=this.huft_build(D,m,I,0,Pe,A,ue,K,ae,this.hn,this.v),Me!=u||K[0]==0&&m>257?(Me==h?ke.msg="oversubscribed distance tree":Me==g?(ke.msg="incomplete distance tree",Me=h):Me!=p&&(ke.msg="empty distance tree with lengths",Me=h),Me):u)};function lt(m,I,D,te,K){return m[0]=Oe,I[0]=xe,D[0]=Xe,te[0]=Ve,u}rt.prototype.initWorkArea=function(m){this.hn==null&&(this.hn=new Int32Array(1),this.v=new Int32Array(m),this.c=new Int32Array(i+1),this.r=new Int32Array(3),this.u=new Int32Array(i),this.x=new Int32Array(i+1)),this.v.length<m&&(this.v=new Int32Array(m));for(var I=0;I<m;I++)this.v[I]=0;for(var I=0;I<i+1;I++)this.c[I]=0;for(var I=0;I<3;I++)this.r[I]=0;yt(this.c,0,this.u,0,i),yt(this.c,0,this.x,0,i+1)};var dt=new Uint8Array(1),zt=typeof dt.subarray=="function";function yt(m,I,D,te,K){if(K!=0){if(m){if(!D)throw"Undef dest"}else throw"Undef src";I==0&&K==m.length?ye(m,D,te):zt?ye(m.subarray(I,I+K),D,te):m.BYTES_PER_ELEMENT==1&&K>100?ye(new Uint8Array(m.buffer,m.byteOffset+I,K),D,te):Lt(m,I,D,te,K)}}function Lt(m,I,D,te,K){for(var se=0;se<K;++se)D[te+se]=m[I+se]}function ye(m,I,D){I.set(m,D)}function G(m,I,D,te){I?D?m=new Uint8Array(m,I,D):m=new Uint8Array(m,I,m.byteLength-I):m=new Uint8Array(m);var K=new H;K.inflateInit(n,!0),K.next_in=m,K.next_in_index=0,K.avail_in=m.length;for(var se=[],ue=0;;){var ae=new Uint8Array(32e3);K.next_out=ae,K.next_out_index=0,K.avail_out=ae.length;var ke=K.inflate(a);if(ke!=u&&ke!=c&&ke!=g)throw K.msg;if(K.avail_out!=0){var Me=new Uint8Array(ae.length-K.avail_out);yt(ae,0,Me,0,ae.length-K.avail_out),ae=Me}if(se.push(ae),ue+=ae.length,ke==c||ke==g)break}if(te&&(te[0]=(I||0)+K.next_in_index),se.length==1)return se[0].buffer;for(var $e=new Uint8Array(ue),ze=0,Je=0;Je<se.length;++Je){var Ne=se[Je];yt(Ne,0,$e,ze,Ne.length),ze+=Ne.length}return $e.buffer}e.exports={inflateBuffer:G,arrayCopy:yt}}(qp)),qp.exports}var Mx=iZ();function y4(e,t){this.block=e,this.offset=t}y4.prototype.toString=function(){return""+this.block+":"+this.offset};function Wc(e,t,n){var r=(e[t+6]&255)*4294967296+(e[t+5]&255)*16777216+(e[t+4]&255)*65536+(e[t+3]&255)*256+(e[t+2]&255),i=e[t+1]<<8|e[t];return r==0&&i==0&&!n?null:new y4(r,i)}function tm(e,t){t=Math.min(t||1,e.byteLength-50);for(var n=[],r=[0],i=0;r[0]<t;){var o=new Uint8Array(e,r[0],12),a=o[11]<<8|o[10],s=Mx.inflateBuffer(e,12+a+r[0],Math.min(65536,e.byteLength-12-a-r[0]),r);r[0]+=8,i+=s.byteLength,n.push(s)}if(n.length==1)return n[0];for(var l=new Uint8Array(i),u=0,c=0;c<n.length;++c){var f=new Uint8Array(n[c]);Mx.arrayCopy(f,0,l,u,f.length),u+=f.length}return l.buffer}function Tx(e,t){this.minv=e,this.maxv=t}function oZ(e,t){var n,r=[];for(--t,r.push(0),n=1+(e>>26);n<=1+(t>>26);++n)r.push(n);for(n=9+(e>>23);n<=9+(t>>23);++n)r.push(n);for(n=73+(e>>20);n<=73+(t>>20);++n)r.push(n);for(n=585+(e>>17);n<=585+(t>>17);++n)r.push(n);for(n=4681+(e>>14);n<=4681+(t>>14);++n)r.push(n);return r}var aZ=21578324;function Bu(){}function sZ(e,t,n){var r=new Bu;r.data=e,r.tbi=t,r.tbi.fetch(function(i){if(!i)return n(null,"Couldn't access Tabix");var o=tm(i,i.byteLength),a=new Uint8Array(o),s=an(a,0);if(s!=aZ)return n(null,"Not a tabix index");var l=an(a,4);r.format=an(a,8),r.colSeq=an(a,12),r.colStart=an(a,16),r.colEnd=an(a,20),r.meta=an(a,24),r.skip=an(a,28),an(a,32),r.indices=[];var u=36;r.chrToIndex={},r.indexToChr=[];for(var c=0;c<l;++c){for(var f="";;){var d=a[u++];if(d==0)break;f+=String.fromCharCode(d)}r.chrToIndex[f]=c,f.indexOf("chr")==0?r.chrToIndex[f.substring(3)]=c:r.chrToIndex["chr"+f]=c,r.indexToChr.push(f)}for(var h=1e9,p=0;p<l;++p){var g=u,b=an(a,u);u+=4;for(var v=0;v<b;++v){an(a,u);var x=an(a,u+4);u+=8+x*16}var y=an(a,u);u+=4;for(var _=u,c=0;c<y;++c){var S=Wc(a,_);if(_+=8,S){var $=S.block;S.offset>0&&($+=65536),$<h&&(h=$);break}}u+=y*8,b>0&&(r.indices[p]=new Uint8Array(o,g,u-g))}r.headerMax=h,n(r)},{timeout:5e4})}Bu.prototype.blocksForRange=function(e,t,n){var r=this.indices[e];if(!r)return[];for(var i=oZ(t,n),o=[],a=0;a<i.length;++a)o[i[a]]=!0;for(var s=[],l=[],u=an(r,0),c=4,f=0;f<u;++f){var d=an(r,c),h=an(r,c+4);if(c+=8,o[d])for(var p=0;p<h;++p){var g=Wc(r,c,!0),b=Wc(r,c+8,!0);(d<4681?l:s).push(new Tx(g,b)),c+=16}else c+=h*16}for(var v=an(r,c),x=null,y=Math.min(t>>14,v-1),_=Math.min(n>>14,v-1),a=y;a<=_;++a){var S=Wc(r,c+4+a*8);S&&(!x||S.block<x.block||S.offset<x.offset)&&(x=S)}var $=[];if(x!=null)for(var a=0;a<l.length;++a){var w=l[a];w.maxv.block>=x.block&&w.maxv.offset>=x.offset&&$.push(w)}l=$;for(var T=[],a=0;a<l.length;++a)T.push(l[a]);for(var a=0;a<s.length;++a)T.push(s[a]);T.sort(function(C,E){var F=C.minv.block-E.minv.block;return F!=0?F:C.minv.offset-E.minv.offset});var M=[];if(T.length>0){for(var P=T[0],a=1;a<T.length;++a){var R=T[a];R.minv.block==P.maxv.block?P=new Tx(P.minv,R.maxv):(M.push(P),P=R)}M.push(P)}return M};Bu.prototype.fetch=function(e,t,n,r){var i=this,o=this.chrToIndex[e];if(o==null)return r([]);var a=this.indexToChr[o],s;o===void 0?s=[]:(s=this.blocksForRange(o,t,n),s||r(null,"Error in index fetch"));var l=[],u=0,c;function f(){if(u>=s.length)return r(l);if(c){var g=new Uint8Array(c);return i.readRecords(g,s[u].minv.offset,l,t,n,a),c=null,++u,f()}else{var d=s[u],h=d.minv.block,p=d.maxv.block+65536;i.data.slice(h,p-h).fetch(function(b){try{return c=tm(b,d.maxv.block-d.minv.block+1),f()}catch(v){return r(null,v)}})}}try{f()}catch(d){r(null,d)}};Bu.prototype.readRecords=function(e,t,n,r,i,o){e:for(;;){for(var a="";t<e.length;){var s=e[t++];if(s==10){var l=a.split(" ");if(l[this.colSeq-1]==o){var u=parseInt(l[this.colStart-1]),c=u;this.colEnd>0&&(c=parseInt(l[this.colEnd-1])),this.format&65536&&++u,u<=i&&c>=r&&n.push(a)}continue e}else a+=String.fromCharCode(s)}return}};Bu.prototype.fetchHeader=function(e,t){var n={metaOnly:!0,skipped:!1,nLines:0};t=t||n,Object.keys(n).forEach(function(i){t.hasOwnProperty(i)||(t[i]=n[i])});var r=this;r.data.slice(0,r.headerMax).fetch(function(i){if(!i)return e(null,"Fetch failed");for(var o=new Uint8Array(tm(i,i.byteLength)),a=0,s="",l=[];a<o.length;){var u=o[a++];if(u==10)if(t.metaOnly&&s.charCodeAt(0)==r.meta||t.skipped&&l.length<r.skip||t.nLines&&l.length<t.nLines)l.push(s),s="";else return e(l);else s+=String.fromCharCode(u)}e(l)})};function lZ(e,t){return new Promise(function(n,r){sZ(new bi(e),new bi(t),function(i,o){o?r(o):n(i)})})}function _4(e){const t=e.Adapters.get("BaseLZAdapter");class n extends t{constructor(i){if(super(i),!i.parser_func||!(i.url_data||i.reader))throw new Error("Tabix source is missing required configuration options");if(this.parser=i.parser_func,this.url_data=i.url_data,this.url_tbi=i.url_tbi||`${this.url_data}.tbi`,this._overfetch=i.overfetch||0,this._overfetch<0||this._overfetch>1)throw new Error("Overfetch must be specified as a fraction (0-1) of the requested region size");this.url_data?this._reader_promise=lZ(this.url_data,this.url_tbi).catch(function(){throw new Error("Failed to create a tabix reader from the provided URL")}):this._reader_promise=Promise.resolve(i.reader)}_performRequest(i){return new Promise((o,a)=>{const s=i.start,l=i.end,u=this._overfetch*(l-s),c=i.start-u,f=i.end+u;this._reader_promise.then(d=>{d.fetch(i.chr,c,f,function(h,p){p&&a(new Error("Could not read requested region. This may indicate an error with the .tbi index.")),o(h)})})})}_normalizeResponse(i){return i.map(this.parser)}}e.Adapters.add("TabixUrlSource",n)}typeof LocusZoom<"u"&&LocusZoom.use(_4);const Oi=new Set(["",".","NA","N/A","n/a","nan","-nan","NaN","-NaN","null","NULL","None",null]),uZ=/([\d.-]+)([\sxeE]*)([0-9-]*)/;function Yt(e){return Number.isInteger(e)}function cZ(e){return e.replace(/^chr/g,"").toUpperCase()}function dZ(e,t=!1){if(e===null)return e;const n=+e;if(t)return n;if(n<0||n>1)throw new Error("p value is not in the allowed range");if(n===0){if(e==="0")return 1/0;let[,r,,i]=e.match(uZ);return r=+r,i!==""?i=+i:i=0,r===0?1/0:-(Math.log10(+r)+ +i)}return-Math.log10(n)}function fZ({freq:e,allele_count:t,n_samples:n,is_alt_effect:r=!0}){if(e!==void 0&&t!==void 0)throw new Error("Frequency and allele count options are mutually exclusive");let i;if(e===void 0&&(Oi.has(t)||Oi.has(n)))return null;if(e===void 0&&t!==void 0)i=+t/+n/2;else{if(Oi.has(e))return null;i=+e}if(i<0||i>1)throw new Error("Allele frequency is not in the allowed range");return r?i:1-i}function hZ({marker_col:e,chrom_col:t,pos_col:n,ref_col:r,alt_col:i,pvalue_col:o,is_neg_log_pvalue:a=!1,rsid_col:s,beta_col:l,stderr_beta_col:u,allele_freq_col:c,allele_count_col:f,n_samples_col:d,is_alt_effect:h=!0,delimiter:p=" "}){if(Yt(e)&&Yt(t)&&Yt(n))throw new Error("Must specify either marker OR chr + pos");if(!(Yt(e)||Yt(t)&&Yt(n)))throw new Error("Must specify how to locate marker");if(Yt(f)&&Yt(c))throw new Error("Allele count and frequency options are mutually exclusive");if(Yt(f)&&!Yt(d))throw new Error("To calculate allele frequency from counts, you must also provide n_samples");return g=>{const b=g.split(p);let v,x,y,_,S=null,$,w=null,T=null,M=null,P,R;if(Yt(e))[v,x,y,_]=I5(b[e-1],!1);else if(Yt(t)&&Yt(n))v=b[t-1],x=b[n-1];else throw new Error("Must specify all fields required to identify the variant");if(v=cZ(v),v.startsWith("RS"))throw new Error(`Invalid chromosome specified: value "${v}" is an rsID`);Yt(r)&&(y=b[r-1]),Yt(i)&&(_=b[i-1]),Yt(s)&&(S=b[s-1]),Oi.has(y)&&(y=null),Oi.has(_)&&(_=null),Oi.has(S)?S=null:S&&(S=S.toLowerCase(),S.startsWith("rs")||(S=`rs${S}`));const C=dZ(b[o-1],a);y=y||null,_=_||null,Yt(c)&&($=b[c-1]),Yt(f)&&(P=b[f-1],R=b[d-1]),Yt(l)&&(w=b[l-1],w=Oi.has(w)?null:+w),Yt(u)&&(T=b[u-1],T=Oi.has(T)?null:+T),(c||f)&&(M=fZ({freq:$,allele_count:P,n_samples:R,is_alt_effect:h}));const E=y&&_?`_${y}/${_}`:"";return{chromosome:v,position:+x,ref_allele:y?y.toUpperCase():null,alt_allele:_?_.toUpperCase():null,variant:`${v}:${x}${E}`,rsid:S,log_pvalue:C,beta:w,stderr_beta:T,alt_allele_freq:M}}}function pZ(e){if(e.Adapters.has("TabixUrlSource")){const t=e.Adapters.get("TabixUrlSource"),n=e.Adapters.get("LDServer");class r extends t{constructor(o){o.limit_fields||(o.limit_fields=["variant2","position2","correlation"]),super(o)}_buildRequestOptions(o,a){if(!a)throw new Error("LD request must depend on association data");const s=super._buildRequestOptions(...arguments);return a.length?(s.ld_refvar=n.prototype.__find_ld_refvar(o,a),s):(s._skip_request=!0,s)}_performRequest(o){return o._skip_request?Promise.resolve([]):super._performRequest(o)}_annotateRecords(o,a){return o.filter(s=>s.variant1===a.ld_refvar)}}e.Adapters.add("UserTabixLD",r)}}typeof LocusZoom<"u"&&LocusZoom.use(pZ);function gZ(e){return`?${Object.keys(e).map(function(t){return`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`}).join("&")}`}function x4(e){const t={};if(e){const n=(e[0]==="?"?e.substr(1):e).split("&");for(let r=0;r<n.length;r++){const i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}}return t}function w4(e,t,n){n=n||!1;const r={};let i=t;return n&&(i={},Object.keys(t).forEach(function(o){i[t[o]]=o})),Object.keys(i).forEach(function(o){const a=i[o];Object.prototype.hasOwnProperty.call(e,o)&&(r[a]=e[o])}),r}function vZ(e,t){e.applyState(t)}function bZ(e,t){return w4(e.state,t)}function mZ(e,t){t=t||window.location.search;const n=x4(t);return w4(n,e,!0)}function yZ(e,t,n){n=n||vZ;const r=function(i){const o=mZ(t);n(e,o)};return window.addEventListener("popstate",r),e.trackExternalListener(window,"popstate",r),r}function _Z(e,t,n){n=n||bZ;const r=function(i){const o=x4(window.location.search),a=n(e,t,i),s=Object.assign({},o,a);if(Object.keys(s).some(function(u){return o[u]!=s[u]})){const u=gZ(s);Object.keys(o).length?history.pushState({},document.title,u):history.replaceState({},document.title,u)}};return e.on("state_changed",r),r}const xZ=ot("div",{id:"lz-plot",class:"h-100"},null,-1),wZ={key:0,class:"mt-4 p-3 border bg-red-100 text-red-700 text-sm text-center rounded"},Ex="#E30A17",CZ=1e7,Ax=40,SZ={__name:"Plugin",props:{datasetId:String,datasetUrl:String,root:String,settings:Object,specs:Object,tracks:Array},setup(e){Fi.use(_4);const t=e,n=ne("");function r(){var w;const i=(w=t.settings.tabix)==null?void 0:w.id,o=t.settings.chromosome,a=t.settings.start,s=t.settings.end,l=t.settings.chrom_col,u=t.settings.pos_col,c=t.settings.ref_col,f=t.settings.alt_col,d=t.settings.pvalue_col,h=t.settings.is_neg_log_pvalue,p=t.settings.beta_col,g=t.settings.stderr_beta_col;if(s-a>CZ){n.value="We cannot output more than 10Mb at a time!";return}if(s<=a){n.value="Invalid input: End position must be bigger than start position!";return}n.value="";const b=hZ({chrom_col:l,pos_col:u,ref_col:c,alt_col:f,pvalue_col:d,is_neg_log_pvalue:h,beta_col:p,stderr_beta_col:g});let v=new Fi.DataSources().add("assoc",["TabixUrlSource",{url_data:`${t.root}api/datasets/${t.datasetId}/display`,url_tbi:`${t.root}api/datasets/${i}/display`,parser_func:b,overfetch:0}]),x={chr:"chrom",start:"start",end:"end",ldrefvar:"ld_variant"},y={id:"associationpvalues_",name:"association",point_shape:"circle",point_size:Ax,color:Ex,legend:[{shape:"circle",color:Ex,size:Ax,label:"phen",class:"lz-data_layer-scatter"}],tooltip:{closable:!0,show:{or:["highlighted","selected"]},hide:{and:["unhighlighted","unselected"]},html:`<strong>phen</strong><br><strong>{{assoc:variant|htmlescape}}</strong><br>
|
|
2019
2019
|
P Value: <strong>{{assoc:log_pvalue|logtoscinotation|htmlescape}}</strong><br>
|
|
2020
|
-
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const _={...Fi.Layouts.get("data_layer","association_pvalues",y),namespace:{assoc:"assoc"},data_operations:[]},S=Fi.Layouts.get("panel","association",{data_layers:[_]});let $=Fi.populate("#lz-plot",v,{state:{chr:o,start:a,end:s},responsive_resize:!0,panels:[S],toolbar:Fi.Layouts.get("toolbar","standard_plot")});_Z($,x),yZ($,x),document.querySelector("#lz-plot_svg").style.height="calc(100vh - 50px)"}return fn(()=>{r()}),vt(()=>t,()=>{r()},{deep:!0}),(i,o)=>(We(),wt(kt,null,[xZ,n.value?(We(),wt("div",wZ,fi(n.value),1)):Xn("",!0)],64))}},$Z=Fe({__name:"App",props:{container:{},credentials:{},incoming:{}},setup(e){return(t,n)=>(We(),It(qe(KI),{container:t.container,credentials:t.credentials,incoming:t.incoming},{default:mt(({datasetId:r,datasetUrl:i,root:o,settings:a,specs:s,tracks:l})=>[Ge(SZ,{"dataset-id":r,"dataset-url":i,root:o,settings:a,specs:s,tracks:l},null,8,["dataset-id","dataset-url","root","settings","specs","tracks"])]),_:1},8,["container","credentials","incoming"]))}});async function kZ(){const t=new URL(import.meta.url).searchParams.get("container")||"app";M7({render:()=>k($Z,{container:t,credentials:"
|
|
2020
|
+
Ref. Allele: <strong>{{assoc:ref_allele|htmlescape}}</strong><br>`}};const _={...Fi.Layouts.get("data_layer","association_pvalues",y),namespace:{assoc:"assoc"},data_operations:[]},S=Fi.Layouts.get("panel","association",{data_layers:[_]});let $=Fi.populate("#lz-plot",v,{state:{chr:o,start:a,end:s},responsive_resize:!0,panels:[S],toolbar:Fi.Layouts.get("toolbar","standard_plot")});_Z($,x),yZ($,x),document.querySelector("#lz-plot_svg").style.height="calc(100vh - 50px)"}return fn(()=>{r()}),vt(()=>t,()=>{r()},{deep:!0}),(i,o)=>(We(),wt(kt,null,[xZ,n.value?(We(),wt("div",wZ,fi(n.value),1)):Xn("",!0)],64))}},$Z=Fe({__name:"App",props:{container:{},credentials:{},incoming:{}},setup(e){return(t,n)=>(We(),It(qe(KI),{container:t.container,credentials:t.credentials,incoming:t.incoming},{default:mt(({datasetId:r,datasetUrl:i,root:o,settings:a,specs:s,tracks:l})=>[Ge(SZ,{"dataset-id":r,"dataset-url":i,root:o,settings:a,specs:s,tracks:l},null,8,["dataset-id","dataset-url","root","settings","specs","tracks"])]),_:1},8,["container","credentials","incoming"]))}});async function kZ(){const t=new URL(import.meta.url).searchParams.get("container")||"app";M7({render:()=>k($Z,{container:t,credentials:"include"})}).mount(`#${t}`)}kZ();
|