//>>built
require({cache:{"JBrowse/Plugin":function(){define(["dojo/_base/declare","JBrowse/Component"],function(h,l){return h(l,{constructor:function(g){this.name=g.name;this.cssLoaded=g.cssLoaded;this._finalizeConfig(g.config)},_defaultConfig:function(){return{baseUrl:"/plugins/"+this.name}}})})}}});
define("NeatHTMLFeatures/main","dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/dom-construct dojo/query JBrowse/Plugin".split(" "),function(h,l,g,m,k,p){return h(p,{constructor:function(a){var f=this,c=this.browser;this.gradient=this.neat=1;"undefined"!=typeof a.linearGradient&&0==a.linearGradient&&(this.gradient=0);"undefined"!=typeof a.neatFeatures&&0==a.neatFeatures&&(this.neat=0);dojo.subscribe("/jbrowse/v1/n/tracks/redraw",function(b){setTimeout(function(){f.updateFeatures()},100)});c.afterMilestone("initView",
function(){c.view.oldRenderTrack=c.view.renderTrack;c.view.renderTrack=function(b){var a=c.view.oldRenderTrack(b);"undefined"!==typeof b.neatFeatures&&1===b.neatFeatures&&dojo.addClass(a,"neat-track");return a}})},updateFeatures:function(a){var f=this;a="div.feature";k(a).forEach(function(a,b,d){f.insertIntrons(a)});0==this.neat&&(a="div.neat-track div.feature");k(a).forEach(function(a,b,d){f.paintNeatFeatures(a)})},insertIntrons:function(a){var f=0;if(!dojo.hasClass(a,"has-neat-introns")){for(var c=
k("\x3e .subfeature",a),b=[],d=0;d<c.length;d++)-1===dojo.attr(c[d],"class").indexOf("splice-site")&&b.push(c[d]);if(2>b.length){if((b=k("div.feature-render",a))&&1==b.length&&0>b[0].className.indexOf("annot-apollo")&&0>b[0].className.indexOf("annot-render")){var c=a.style.left,g=a.style.width,h,e;e="\x3csvg class\x3d'jb-intron' viewBox\x3d'0 0 100 100' preserveAspectRatio\x3d'none' xmlns\x3d'http://www.w3.org/2000/svg' xmlns:xlink\x3d'http://www.w3.org/1999/xlink' style\x3d'position:absolute;z-index: 15;";
e+="left: "+c+";width: "+g+";height: 100%'\x3e";e+="\x3cpolyline points\x3d'0,50 100,50' style\x3d'fill:none;stroke:black;stroke-width:5' shape-rendering\x3d'optimizeQuality' /\x3e";e+="\x3c/svg\x3e";m.place(e,a);++f}}else if(2<=b.length){var l=1;-1<dojo.attr(a,"class").indexOf("minus")&&(l=-1);for(d=0;d<b.length;d++)b[d].left=dojo.getStyle(b[d],"left"),b[d].width=dojo.getStyle(b[d],"width");2<=b.length&&b.sort(function(a,b){return a.left-b.left});for(d=0;d<b.length-1;++d)if(0.02<b[d+1].left-(b[d].left+
b[d].width)){g=b[d+1].left-(b[d].left+b[d].width);c=b[d].left+b[d].width;h="100%";var n="50,5";-1==l&&(n="50,95");e="";e+="\x3csvg class\x3d'jb-intron' viewBox\x3d'0 0 100 100' preserveAspectRatio\x3d'none' xmlns\x3d'http://www.w3.org/2000/svg' xmlns:xlink\x3d'http://www.w3.org/1999/xlink' ";e+="style\x3d'position:absolute;z-index: 15;";e+="left: "+c+"px;width: "+g+"px;height: "+h+"'\x3e";e+="\x3cpolyline class\x3d'neat-intron' points\x3d'0,50 "+n+" 100,50' shape-rendering\x3d'optimizeQuality' /\x3e";
e+="\x3c/svg\x3e";m.place(e,a);f++}f&&dojo.addClass(a,"has-neat-introns")}}},paintNeatFeatures:function(a){for(var f=k("\x3e .subfeature",a),c=[],b=0;b<f.length;b++)-1===dojo.attr(f[b],"class").indexOf("splice-site")&&c.push(f[b]);if(c.length){dojo.setStyle(a,{"background-color":"transparent","border-width":"0px"});for(b=0;b<c.length;b++)if(c[b].childElementCount){a=k("\x3e .subfeature",c[b]);for(f=0;f<a.length;f++)this.paintSubNode(a[f])}else this.paintSubNode(c[b])}else dojo.hasClass(a,"neat-feature")||
(dojo.attr(a,"class"),c=dojo.getStyle(a,"background-color"),1==this.gradient&&dojo.setStyle(a,{background:"linear-gradient(to bottom,  "+c+" 0%,#e5e5e5 50%,"+c+" 100%)"}),dojo.addClass(a,"neat-feature"))},paintSubNode:function(a){var f=dojo.attr(a,"class"),c=dojo.getStyle(a,"background-color");dojo.hasClass(a,"neat-subfeature")||(-1<f.indexOf("UTR")?(dojo.setStyle(a,{top:"0px",border:"1px solid "+c}),dojo.addClass(a,"neat-UTR")):1==this.gradient&&dojo.setStyle(a,{top:"0px",background:"linear-gradient(to bottom,  "+
c+" 0%,#e5e5e5 50%,"+c+" 100%)"}),dojo.addClass(a,"neat-subfeature"))}})});
//# sourceMappingURL=main.js.map