/*! For license information please see netwas.848ac32c.chunk.js.LICENSE.txt */
(globalThis.webpackChunkweb=globalThis.webpackChunkweb||[]).push([[719],{21978:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>se});var n,o,i,a,s,l,u,c,f,h,d,p,v,y,m,b,g,w,x,S,_,j,E=r(96540),A=r(14838),O=r(42110),C=r(98164),P=r(34302),k=r(90641),L=r(9475),T=r(3100),N=r.n(T),G=r(54198),I=r(23374),F=r.n(I),J=r(9567),W=r(47709),D=r(6047),R=r(32675),M=r(13355),$=r(52878),B=r(40961),Y=r(34131),V=r(34831),q=r.n(V);function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function H(t,e,r,n){j||(j="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=t&&t.defaultProps,i=arguments.length-3;if(e||0===i||(e={children:void 0}),1===i)e.children=n;else if(i>1){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+3];e.children=a}if(e&&o)for(var l in o)void 0===e[l]&&(e[l]=o[l]);else e||(e=o||{});return{$$typeof:j,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function K(){K=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=g.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,s){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==U(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(U(e)+" is not iterable")}return b.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(E.prototype),u(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(_),u(_,l,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Q(t,e,r,n,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,o)}function z(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Q(i,n,o,a,s,"next",t)}function s(t){Q(i,n,o,a,s,"throw",t)}a(void 0)}))}}function X(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rt(n.key),n)}}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}function tt(t){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tt(t)}function et(t,e){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},et(t,e)}function rt(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=U(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}var nt,ot,it,at=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=tt(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Z()?Reflect.construct(e,r||[],tt(t).constructor):e.apply(t,r))}(this,e,[t])).state={tissues:[],gwasFile:"",gwasType:"vegas",tissue:"adipose_tissue",pValue:"0.01",email:"",title:"",showGwasWarning:!1,signup:!1,showOptIn:!1},r.handleGwasFileChange=r.handleGwasFileChange.bind(r),r.handleGwasTypeChange=r.handleGwasTypeChange.bind(r),r.handleTissueChange=r.handleTissueChange.bind(r),r.handlePValueChange=r.handlePValueChange.bind(r),r.handleEmailChange=r.handleEmailChange.bind(r),r.handleSignupChange=r.handleSignupChange.bind(r),r.handleTitleChange=r.handleTitleChange.bind(r),r.handleSubmit=r.handleSubmit.bind(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&et(t,e)}(e,t),r=e,j=[{key:"componentDidMount",value:function(){this.queryTissues(),setInterval(this.updateStatus,2e3)}},{key:"queryTissues",value:(C=z(K().mark((function t(){var e,r,n,o;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="".concat(G.Jo,"integrations/?database=brenda-ontology"),t.next=3,this.context.fetch(e);case 3:return r=t.sent,t.next=6,r.json();case 6:n=t.sent,(o=n.map((function(t){return t.context.title}))).push("────────────────","global (i.e., not tissue specific)","demo (a short NetWAS simulation)"),this.setState({tissues:o});case 10:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"handleGwasFileChange",value:function(t){""!==t.target.value.trim()&&this.setState({showGwasWarning:!1}),this.setState({gwasFile:t.target.value})}},{key:"handleGwasTypeChange",value:function(t){this.setState({gwasType:t.target.value})}},{key:"handleTissueChange",value:function(t){this.setState({tissue:t.target.value})}},{key:"handlePValueChange",value:function(t){this.setState({pValue:t.target.value})}},{key:"handleEmailChange",value:function(t){this.setState({email:t.target.value}),""!==t.target.value&&this.setState({showOptIn:!0})}},{key:"handleSignupChange",value:function(){this.setState({signup:!this.state.signup})}},{key:"handleTitleChange",value:function(t){this.setState({title:t.target.value})}},{key:"handleSubmit",value:(O=z(K().mark((function t(e){var r,n,o,i;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),""!==this.state.gwasFile.trim()){t.next=4;break}return this.setState({showGwasWarning:!0}),t.abrupt("return");case 4:return r=new FormData(B.findDOMNode(this.refs.netwasForm)),t.next=7,fetch("".concat(G.Jo,"netwas/"),{method:"POST",body:r});case 7:if(!(n=t.sent).ok){t.next=17;break}return t.next=11,n.json();case 11:i=t.sent,o=(o=i.gwas_file).substr(o.lastIndexOf("/")+1),this.props.onSubmit(i.id,i.title,o,i.tissue),t.next=18;break;case 17:this.props.onSubmit(null,null,o,null,!0);case 18:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"render",value:function(){var t,e,r,j="";this.state.showGwasWarning&&(j=n||(n=H(A.A,{bsStyle:"warning"},void 0,"Please select a ",H("strong",{},void 0,"GWAS file")," as input.")));var O=[];return this.state.tissues.forEach((function(n,o){t=n.replace(/ /g,"_"),e=n,r=!1,n.startsWith("global (")?t="global":n.startsWith("demo (")?t="api-demo":n.startsWith("─")&&(r=!0),O.push(H("option",{value:t,disabled:r},o,e))})),H("div",{},void 0,o||(o=H("h3",{},void 0,"Submit a NetWAS Analysis",H(Y.A,{text:"Help with NetWAS",url:"http://humanbase.readthedocs.io/en/latest/netwas.html"}))),E.createElement("form",{ref:"netwasForm",onSubmit:this.handleSubmit},H("table",{},void 0,H("tbody",{},void 0,H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsFile"},void 0,i||(i=H(D.A,{},void 0,"Select a GWAS file for analysis"))," (sample file:",a||(a=H("a",{href:"https://github.com/FunctionLab/giant-api/raw/master/resources/netwas/bmi-2012.txt",target:"_blank",rel:"noopener noreferrer"},void 0,"bmi-2012.txt")),")",s||(s=H(Y.A,{text:"GWAS file of gene p-values. File must be less than 3 MB and have an extension of .txt, .csv or .tsv"})),H(R.A,{name:"gwas_file",type:"file",value:this.state.gwasFile,onChange:this.handleGwasFileChange})),j)),H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsFileType"},void 0,l||(l=H(D.A,{},void 0,"Select GWAS file type"))," ",u||(u=H(Y.A,{text:"GWAS result file format of gene p-values."})),c||(c=H(Y.A,{text:"Help with GWAS files",url:"http://humanbase.readthedocs.io/en/latest/netwas.html#gwas-file"})),H(R.A,{name:"gwas_format",componentClass:"select",value:this.state.gwasType,onChange:this.handleGwasTypeChange},void 0,f||(f=H("option",{value:"vegas"},void 0,"vegas")),h||(h=H("option",{value:"forge"},void 0,"forge")),d||(d=H("option",{value:"pseq"},void 0,"pseq")))))),H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsTissue"},void 0,p||(p=H(D.A,{},void 0,"Select tissue context"))," ",v||(v=H(Y.A,{text:"The tissue network to be used in the analysis."})),y||(y=H(Y.A,{text:"Help with tissue networks",url:"http://humanbase.readthedocs.io/en/latest/tissue-networks.html"})),H(R.A,{name:"tissue",componentClass:"select",value:this.state.tissue,onChange:this.handleTissueChange},void 0,O)))),H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsPvalue"},void 0,m||(m=H(D.A,{},void 0,"Enter ",H("i",{},void 0,"p"),"-value threshold"))," ",b||(b=H(Y.A,{text:"All genes with p-values below this cutoff are treated as positive examples in the NetWAS analysis. Note: a minimum of 10 genes below the cutoff is required."})),H(R.A,{name:"p_value",type:"text",value:this.state.pValue,onChange:this.handlePValueChange})))),H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsEmail"},void 0,g||(g=H(D.A,{},void 0,"Enter email for receiving NetWAS results upon completion"))," ",w||(w=H("i",{},void 0,"(optional)")),H(R.A,{name:"email",type:"email",placeholder:"Enter email",value:this.state.email,onChange:this.handleEmailChange})),H(W.A,{controlId:"formControlsEmailSignup",style:{display:this.state.showOptIn?"block":"none"}},void 0,H(M.A,{inline:!0,name:"signup",onChange:this.handleSignupChange,value:this.state.signup},void 0,"Opt-in to stay up to date with our newsletter")))),H("tr",{},void 0,H("td",{},void 0,H(W.A,{controlId:"formControlsTitle"},void 0,x||(x=H(D.A,{},void 0,"Enter a title to identify this NetWAS job"))," ",S||(S=H("i",{},void 0,"(optional)")),H(R.A,{name:"title",type:"text",placeholder:"Enter title",value:this.state.title,onChange:this.handleTitleChange})))),_||(_=H("tr",{},void 0,H("td",{colSpan:2},void 0,H($.A,{bsStyle:"primary",type:"submit",block:!0},void 0,"Submit"))))))))}}],j&&X(r.prototype,j),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,j,O,C}(E.Component);nt=at,ot="contextType",it=J.A,(ot=rt(ot))in nt?Object.defineProperty(nt,ot,{value:it,enumerable:!0,configurable:!0,writable:!0}):nt[ot]=it;const st=N()(q())(at);var lt,ut,ct=r(60018),ft=r.n(ct);function ht(t){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function dt(t,e,r,n){ut||(ut="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=t&&t.defaultProps,i=arguments.length-3;if(e||0===i||(e={children:void 0}),1===i)e.children=n;else if(i>1){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+3];e.children=a}if(e&&o)for(var l in o)void 0===e[l]&&(e[l]=o[l]);else e||(e=o||{});return{$$typeof:ut,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function pt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vt(n.key),n)}}function vt(t){var e=function(t){if("object"!=ht(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ht(e)?e:e+""}function yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yt=function(){return!!t})()}function mt(t){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mt(t)}function bt(t,e){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bt(t,e)}var gt=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=mt(e),function(t,e){if(e&&("object"==ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yt()?Reflect.construct(e,r||[],mt(t).constructor):e.apply(t,r))}(this,e,[t])).handleChange=r.handleChange.bind(r),r.handleClear=r.handleClear.bind(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e)}(e,t),function(t,e){return e&&pt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"handleChange",value:function(t){this.props.onChange(t.target.value)}},{key:"handleClear",value:function(t){this.props.onClear()}},{key:"render",value:function(){var t=[];for(var e in this.props.jobs){var r="Untitled";this.props.jobs[e].title&&(r=this.props.jobs[e].title),t.push(dt("option",{value:this.props.jobs[e].id},e,"".concat(r," (").concat(this.props.jobs[e].id,")")))}return dt("div",{className:ft().root},void 0,dt("form",{},void 0,dt(W.A,{controlId:"formControlsJobId"},void 0,dt("div",{},void 0,dt("div",{className:ft().floatleft},void 0,lt||(lt=dt("h3",{},void 0,"Recent NetWAS jobs"))),dt("div",{className:ft().floatright},void 0,"[",dt($.A,{bsStyle:"link",bsSize:"small",className:ft().nopadding,onClick:this.handleClear},void 0,"Clear job history"),"]"),dt("div",{className:ft().clearleft})),dt(R.A,{componentClass:"select",value:this.props.id,onChange:this.handleChange},void 0,t))))}}])}(E.Component);const wt=N()(ft())(gt);var xt,St,_t,jt,Et,At,Ot,Ct,Pt,kt,Lt,Tt=r(1120),Nt=r(7926),Gt=r.n(Nt);function It(t){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},It(t)}function Ft(t,e,r,n){Lt||(Lt="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=t&&t.defaultProps,i=arguments.length-3;if(e||0===i||(e={children:void 0}),1===i)e.children=n;else if(i>1){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+3];e.children=a}if(e&&o)for(var l in o)void 0===e[l]&&(e[l]=o[l]);else e||(e=o||{});return{$$typeof:Lt,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function Jt(){Jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=g.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,s){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==It(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(It(e)+" is not iterable")}return b.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(E.prototype),u(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(_),u(_,l,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Wt(t,e,r,n,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,o)}function Dt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Wt(i,n,o,a,s,"next",t)}function s(t){Wt(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Rt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}const $t=N()(Gt())((function(t){var e=t.id,r=Rt((0,E.useState)(e),2),n=r[0],o=r[1],i=Rt((0,E.useState)({}),2),a=i[0],s=i[1],l=(0,E.useContext)(J.A).fetch,u=(0,E.useCallback)(Dt(Jt().mark((function t(){var e,r,o;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=9;break}return e="".concat(G.Jo,"netwas/").concat(n),t.next=4,l(e);case 4:return r=t.sent,t.next=7,r.json();case 7:o=t.sent,s(o);case 9:case"end":return t.stop()}}),t)}))),[n,l]);(0,E.useEffect)((function(){u();var t=setInterval(u,1e4);return function(){return clearInterval(t)}}),[u]),(0,E.useEffect)((function(){o(e)}),[e]);var c=null;if(n){var f=Ft("a",{href:"".concat(G.Jo,"netwas/").concat(n),target:"_blank",rel:"noopener noreferrer"},void 0,n),h="N/A";a.gwas_file&&(h=Ft("a",{href:a.gwas_file},void 0,a.gwas_file.substring(a.gwas_file.lastIndexOf("/")+1)));var d="N/A";a.log_file&&(d=Ft("a",{href:a.log_file},void 0,a.log_file.substring(a.log_file.lastIndexOf("/")+1)));var p="N/A";a.results_file&&(p=Ft("a",{href:a.results_file},void 0,a.results_file.substring(a.results_file.lastIndexOf("/")+1))),c=Ft(Tt.A,{striped:!0,bordered:!0,condensed:!0,hover:!0},void 0,Ft("tbody",{},void 0,Ft("tr",{},void 0,xt||(xt=Ft("td",{},void 0,"Job id")),Ft("td",{},void 0,f)),Ft("tr",{},void 0,St||(St=Ft("td",{},void 0,"Created")),Ft("td",{},void 0,a.created)),Ft("tr",{},void 0,_t||(_t=Ft("td",{},void 0,"Title")),Ft("td",{},void 0,a.title)),Ft("tr",{},void 0,jt||(jt=Ft("td",{},void 0,"Email")),Ft("td",{},void 0,a.email)),Ft("tr",{},void 0,Et||(Et=Ft("td",{},void 0,"GWAS file")),Ft("td",{},void 0,h)),Ft("tr",{},void 0,At||(At=Ft("td",{},void 0,"GWAS format")),Ft("td",{},void 0,a.gwas_format)),Ft("tr",{},void 0,Ot||(Ot=Ft("td",{},void 0,"Tissue context")),Ft("td",{},void 0,a.tissue)),Ft("tr",{},void 0,Ct||(Ct=Ft("td",{},void 0,Ft("i",{},void 0,"P"),"-value")),Ft("td",{},void 0,a.p_value)),Ft("tr",{},void 0,Pt||(Pt=Ft("td",{},void 0,"Log file")),Ft("td",{},void 0,d)),Ft("tr",{},void 0,kt||(kt=Ft("td",{},void 0,"Results file")),Ft("td",{},void 0,p))))}return Ft("div",{},void 0,Ft(A.A,{bsStyle:a.status&&a.status.startsWith("error")?"danger":"info"},void 0,Ft("h4",{},void 0,a.status," ","running"===a.status&&"(estimated total time: 1 hour)")),c)}));var Bt,Yt,Vt;function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Ut(t,e,r,n){Vt||(Vt="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=t&&t.defaultProps,i=arguments.length-3;if(e||0===i||(e={children:void 0}),1===i)e.children=n;else if(i>1){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+3];e.children=a}if(e&&o)for(var l in o)void 0===e[l]&&(e[l]=o[l]);else e||(e=o||{});return{$$typeof:Vt,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function Ht(){Ht=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new k(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=g.prototype=m.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,s){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==qt(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var o=h;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?v:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(qt(e)+" is not iterable")}return b.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(E.prototype),u(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(_),u(_,l,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Kt(t,e,r,n,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,o)}function Qt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ee(n.key),n)}}function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}function Xt(t){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xt(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}function te(t,e,r){return(e=ee(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ee(t){var e=function(t){if("object"!=qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qt(e)?e:e+""}var re=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Xt(e),function(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zt()?Reflect.construct(e,r||[],Xt(t).constructor):e.apply(t,r))}(this,e,[t])).state={jobs:[],id:"",showJobAlert:!1,showJobError:!1,job:null,gwas:"",tissue:""},r.handleChange=r.handleChange.bind(r),r.handleSubmit=r.handleSubmit.bind(r),r.handleClear=r.handleClear.bind(r),r.handleDismiss=r.handleDismiss.bind(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),function(t,e){return e&&Qt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.cookies,r=e.get("savedNetwasJobs");if(void 0===r&&(r=[]),this.props.id){var n=r.map((function(t){return t.id})).indexOf(this.props.id.trim());n>=0?this.setState({jobs:r,id:r[n].id}):this.addJob(this.props.id,r).then((function(r){void 0!==r&&r.length>0&&(e.set("savedNetwasJobs",r,{path:"/"}),t.setState({jobs:r,id:r[0].id}))}))}else void 0!==r&&r.length>0&&this.setState({jobs:r,id:r[0].id})}},{key:"addJob",value:(r=Ht().mark((function t(e,r){var n,o,i;return Ht().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="".concat(G.Jo,"netwas/").concat(e),t.next=3,this.context.fetch(n);case 3:if(!(o=t.sent).ok){t.next=9;break}return t.next=7,o.json();case 7:i=t.sent,r.unshift({id:e,title:i.title});case 9:return t.abrupt("return",r);case 10:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){Kt(i,n,o,a,s,"next",t)}function s(t){Kt(i,n,o,a,s,"throw",t)}a(void 0)}))},function(t,e){return n.apply(this,arguments)})},{key:"handleChange",value:function(t){this.setState({id:t,showJobAlert:!1,showJobError:!1,job:null})}},{key:"handleSubmit",value:function(t,e,r,n,o){if(o)this.setState({showJobError:!0});else{var i=this.state.jobs,a={id:t,title:e,gwas:r,tissue:n};i.unshift(a),this.setState({jobs:i,id:t,showJobAlert:!0,showJobError:!1,job:a}),this.props.cookies.set("savedNetwasJobs",i,{path:"/"}),this.setState({showJobError:!1})}}},{key:"handleClear",value:function(){this.setState({jobs:[],id:"",showJobAlert:!1,job:null}),this.props.cookies.set("savedNetwasJobs",[],{path:"/"})}},{key:"handleDismiss",value:function(){this.setState({showJobAlert:!1,showJobError:!1,job:null})}},{key:"render",value:function(){var t="";this.state.showJobAlert&&this.state.job?t=Ut(A.A,{bsStyle:"warning",onDismiss:this.handleDismiss,className:F().alert},void 0,"NetWAS job created with ID ",Ut("strong",{},void 0,this.state.job.id)," for"," ",Ut("strong",{},void 0,this.state.job.gwas)," GWAS and"," ",Ut("strong",{},void 0,this.state.job.tissue)," context."):this.state.showJobError&&(t=Ut(A.A,{bsStyle:"warning",onDismiss:this.handleDismiss,className:F().alert},void 0,Bt||(Bt=Ut("i",{className:"fa fa-exclamation-circle"}))," Invalid NetWAS job. Please check that the GWAS file is in the supported text file format and that the p-value threshold is between 0 and 1."));var e="";return this.state.id&&(e=Ut("div",{},void 0,Ut(wt,{jobs:this.state.jobs,id:this.state.id,onChange:this.handleChange,onClear:this.handleClear}),Ut($t,{id:this.state.id}))),Ut("div",{className:F().root},void 0,Ut(O.A,{},void 0,Yt||(Yt=Ut(C.A,{},void 0,Ut(P.A,{md:12},void 0,Ut("h2",{},void 0,"NetWAS analysis",Ut("br",{}),Ut("small",{},void 0,"Integrate tissue-specific networks and genome-wide association results to identify relevant disease-gene associations.")),Ut("hr",{})))),t,Ut(C.A,{},void 0,Ut(P.A,{md:6,xs:12,sm:6},void 0,Ut(st,{onSubmit:this.handleSubmit})),Ut(P.A,{md:6,xs:12,sm:6},void 0,e||Ut(k.A,{responsive:!0,src:"/netwas-schematic.png",width:"100%",style:{marginTop:"50px",paddingRight:"10px"}})))))}}]);var r,n}(E.Component);te(re,"defaultProps",{id:null}),te(re,"contextType",J.A);const ne=N()(F())((0,L.iO)(re));var oe,ie=r(54758);function ae(t,e,r,n){oe||(oe="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=t&&t.defaultProps,i=arguments.length-3;if(e||0===i||(e={children:void 0}),1===i)e.children=n;else if(i>1){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+3];e.children=a}if(e&&o)for(var l in o)void 0===e[l]&&(e[l]=o[l]);else e||(e=o||{});return{$$typeof:oe,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}const se=function(t){var e=t.params;return{chunks:["netwas"],title:"".concat(G.ly,": NetWAS"),component:ae(ie.Ay,{},void 0,ae(ne,{id:e.id}))}}},98558:(t,e,r)=>{(e=r(76314)(!1)).push([t.id,"h4{display:table-cell}table{margin-top:35px;width:90%}td{padding-bottom:15px}td._1GETu{padding-top:3px;width:100px;vertical-align:top;visibility:hidden;width:0}",""]),e.locals={step:"_1GETu"},t.exports=e},32308:(t,e,r)=>{(e=r(76314)(!1)).push([t.id,"._21AYB{float:left}._1Ow_O{float:right}._3JJ6I{padding:0}.KTFre{clear:left;height:3px}",""]),e.locals={floatleft:"_21AYB",floatright:"_1Ow_O",nopadding:"_3JJ6I",clearleft:"KTFre"},t.exports=e},50432:(t,e,r)=>{(e=r(76314)(!1)).push([t.id,"",""]),t.exports=e},94680:(t,e,r)=>{(e=r(76314)(!1)).push([t.id,"._3jgMQ{padding-top:50px;margin:auto}._23Mli{margin-top:25px;margin-bottom:5px}",""]),e.locals={root:"_3jgMQ",alert:"_23Mli"},t.exports=e},34831:(t,e,r)=>{var n=r(98558),o=r(61352),i="string"==typeof n?[[t.id,n,""]]:n;(e=t.exports=n.locals||{})._getContent=function(){return i},e._getCss=function(){return""+n},e._insertCss=function(t){return o(i,t)}},60018:(t,e,r)=>{var n=r(32308),o=r(61352),i="string"==typeof n?[[t.id,n,""]]:n;(e=t.exports=n.locals||{})._getContent=function(){return i},e._getCss=function(){return""+n},e._insertCss=function(t){return o(i,t)}},7926:(t,e,r)=>{var n=r(50432),o=r(61352),i="string"==typeof n?[[t.id,n,""]]:n;(e=t.exports=n.locals||{})._getContent=function(){return i},e._getCss=function(){return""+n},e._insertCss=function(t){return o(i,t)}},23374:(t,e,r)=>{var n=r(94680),o=r(61352),i="string"==typeof n?[[t.id,n,""]]:n;(e=t.exports=n.locals||{})._getContent=function(){return i},e._getCss=function(){return""+n},e._insertCss=function(t){return o(i,t)}},13355:(t,e,r)=>{"use strict";r.d(e,{A:()=>p});var n=r(3363),o=r(34266),i=r(75673),a=r(46942),s=r.n(a),l=r(96540),u=r(5556),c=r.n(u),f=(r(30583),r(90699)),h={inline:c().bool,disabled:c().bool,title:c().string,validationState:c().oneOf(["success","warning","error",null]),inputRef:c().func},d=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.A)(e,t),e.prototype.render=function(){var t=this.props,e=t.inline,r=t.disabled,i=t.validationState,a=t.inputRef,u=t.className,c=t.style,h=t.title,d=t.children,p=(0,o.A)(t,["inline","disabled","validationState","inputRef","className","style","title","children"]),v=(0,f.UM)(p),y=v[0],m=v[1],b=l.createElement("input",(0,n.A)({},m,{ref:a,type:"checkbox",disabled:r}));if(e){var g,w=((g={})[(0,f.Pl)(y,"inline")]=!0,g.disabled=r,g);return l.createElement("label",{className:s()(u,w),style:c,title:h},b,d)}var x=(0,n.A)({},(0,f.nG)(y),{disabled:r});return i&&(x["has-"+i]=!0),l.createElement("div",{className:s()(u,x),style:c},l.createElement("label",{title:h},b,d))},e}(l.Component);d.propTypes=h,d.defaultProps={inline:!1,disabled:!1,title:""};const p=(0,f.in)("checkbox",d)},90641:(t,e,r)=>{"use strict";r.d(e,{A:()=>p});var n=r(3363),o=r(34266),i=r(75673),a=r(46942),s=r.n(a),l=r(96540),u=r(5556),c=r.n(u),f=r(90699),h={responsive:c().bool,rounded:c().bool,circle:c().bool,thumbnail:c().bool},d=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.A)(e,t),e.prototype.render=function(){var t,e=this.props,r=e.responsive,i=e.rounded,a=e.circle,u=e.thumbnail,c=e.className,h=(0,o.A)(e,["responsive","rounded","circle","thumbnail","className"]),d=(0,f.UM)(h),p=d[0],v=d[1],y=((t={})[(0,f.Pl)(p,"responsive")]=r,t[(0,f.Pl)(p,"rounded")]=i,t[(0,f.Pl)(p,"circle")]=a,t[(0,f.Pl)(p,"thumbnail")]=u,t);return l.createElement("img",(0,n.A)({},v,{className:s()(c,y)}))},e}(l.Component);d.propTypes=h,d.defaultProps={responsive:!1,rounded:!1,circle:!1,thumbnail:!1};const p=(0,f.in)("img",d)},1120:(t,e,r)=>{"use strict";r.d(e,{A:()=>p});var n=r(3363),o=r(34266),i=r(75673),a=r(46942),s=r.n(a),l=r(96540),u=r(5556),c=r.n(u),f=r(90699),h={striped:c().bool,bordered:c().bool,condensed:c().bool,hover:c().bool,responsive:c().bool},d=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.A)(e,t),e.prototype.render=function(){var t,e=this.props,r=e.striped,i=e.bordered,a=e.condensed,u=e.hover,c=e.responsive,h=e.className,d=(0,o.A)(e,["striped","bordered","condensed","hover","responsive","className"]),p=(0,f.UM)(d),v=p[0],y=p[1],m=(0,n.A)({},(0,f.nG)(v),((t={})[(0,f.Pl)(v,"striped")]=r,t[(0,f.Pl)(v,"bordered")]=i,t[(0,f.Pl)(v,"condensed")]=a,t[(0,f.Pl)(v,"hover")]=u,t)),b=l.createElement("table",(0,n.A)({},y,{className:s()(h,m)}));return c?l.createElement("div",{className:(0,f.Pl)(v,"responsive")},b):b},e}(l.Component);d.propTypes=h,d.defaultProps={bordered:!1,condensed:!1,hover:!1,responsive:!1,striped:!1};const p=(0,f.in)("table",d)}}]);
//# sourceMappingURL=netwas.848ac32c.chunk.js.map