text: //>>built
  (function(i,j){var h,g,e=function(){},d=function(a){for(var b in a)return 0;return 1},c={}.toString,b=function(a){return"[object Function]"==c.call(a)},f=function(a){return"[object String]"==c.call(a)},a=function(a){return"[object Array]"==c.call(a)},k=function(a,b){if(a)for(var c=0;c<a.length;)b(a[c++])},n=function(a,b){for(var c in b)a[c]=b[c];return a},r=function(a,b){return n(Error(a),{src:"dojoLoader",info:b})},m=1,l=function(){return"_"+m++},p=function(a,b,c){return Y(a,b,c,0,p)},q=this,s=q.document,
  u=s&&s.createElement("DiV"),v=p.has=function(a){return b(w[a])?w[a]=w[a](q,s,u):w[a]},w=v.cache=j.hasCache;v.add=function(a,b,c,f){(void 0===w[a]||f)&&(w[a]=b);return c&&v(a)};for(var t in i.has)v.add(t,i.has[t],0,1);p.async=1;var y=new Function("return eval(arguments[0]);");p.eval=function(a,b){return y(a+"\r\n////@ sourceURL="+b)};var x={},B=p.signal=function(b,c){var f=x[b];k(f&&f.slice(0),function(b){b.apply(null,a(c)?c:[c])})},C=p.on=function(a,b){var c=x[a]||(x[a]=[]);c.push(b);return{remove:function(){for(var a=
  0;a<c.length;a++)if(c[a]===b){c.splice(a,1);break}}}},A=[],E={},N=[],L={},I=p.map={},D=[],z={},F="",H={},M={},K={},O=function(a){var b,c,f,d;for(b in M)c=M[b],(f=b.match(/^url\:(.+)/))?H["url:"+za(f[1],a)]=c:"*now"==b?d=c:"*noref"!=b&&(f=fa(b,a),H[f.mid]=H["url:"+f.url]=c);d&&d(Z(a));M={}},T=function(a){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(a){return"\\"+a})},J=function(a,b){b.splice(0,b.length);for(var c in a)b.push([c,a[c],RegExp("^"+T(c)+"(/|$)"),c.length]);b.sort(function(a,
  b){return b[3]-a[3]});return b},G=function(a){var b=a.name;b||(b=a,a={name:b});a=n({main:"main"},a);a.location=a.location?a.location:b;if(a.packageMap)I[b]=a.packageMap;if(!a.main.indexOf("./"))a.main=a.main.substring(2);L[b]=a},U=[],P=function(a,b,c){for(var d in a){if("waitSeconds"==d)p.waitms=1E3*(a[d]||0);"cacheBust"==d&&(F=a[d]?f(a[d])?a[d]:(new Date).getTime()+"":"");if("baseUrl"==d||"combo"==d)p[d]=a[d];a[d]!==w&&(p.rawConfig[d]=a[d],"has"!=d&&v.add("config-"+d,a[d],0,b))}if(!p.baseUrl)p.baseUrl=
  "./";/\/$/.test(p.baseUrl)||(p.baseUrl+="/");for(d in a.has)v.add(d,a.has[d],0,b);k(a.packages,G);for(g in a.packagePaths)k(a.packagePaths[g],function(a){var b=g+"/"+a;f(a)&&(a={name:a});a.location=b;G(a)});J(n(I,a.map),D);k(D,function(a){a[1]=J(a[1],[]);if("*"==a[0])D.star=a});J(n(E,a.paths),N);k(a.aliases,function(a){f(a[0])&&(a[0]=RegExp("^"+T(a[0])+"$"));A.push(a)});if(b)U.push({config:a.config});else for(d in a.config)b=ca(d,c),b.config=n(b.config||{},a.config[d]);if(a.cache)O(),M=a.cache,a.cache["*noref"]&&
  O();B("config",[a,p.rawConfig])};v("dojo-cdn");var R=s.getElementsByTagName("script");h=0;for(var Q,S,$,W;h<R.length;)if(Q=R[h++],($=Q.getAttribute("src"))&&(W=$.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))){S=W[3]||"";j.baseUrl=j.baseUrl||S;($=Q.getAttribute("data-dojo-config")||Q.getAttribute("djConfig"))&&(K=p.eval("({ "+$+" })","data-dojo-config"));break}p.rawConfig={};P(j,1);if(v("dojo-cdn"))(L.dojo.location=S)&&(S+="/"),L.dijit.location=S+"../dijit/",L.dojox.location=S+"../dojox/";P(i,1);P(K,1);var aa=
  function(a){na(function(){k(a.deps,Aa)})},Y=function(b,c,d,k,s){var m;if(f(b)){if((m=ca(b,k,!0))&&m.executed)return m.result;throw r("undefinedModule",b);}a(b)||(P(b,0,k),b=c,c=d);if(a(b))if(b.length){for(var d="require*"+l(),t,g=[],h=0;h<b.length;)t=b[h++],g.push(ca(t,k));m=n(ga("",d,0,""),{injected:2,deps:g,def:c||e,require:k?k.require:p,gc:1});z[m.mid]=m;aa(m);var q=ea&&0!="sync";na(function(){oa(m,q)});m.executed||V.push(m);ha()}else c&&c();return s},Z=function(a){if(!a)return p;var b=a.require;
  if(!b)b=function(c,f,d){return Y(c,f,d,a,b)},a.require=n(b,p),b.module=a,b.toUrl=function(b){return za(b,a)},b.toAbsMid=function(b){return pa(b,a)};return b},V=[],ba=[],X={},ia=function(a){a.injected=1;X[a.mid]=1;a.url&&(X[a.url]=a.pack||1);Ba()},ka=function(a){a.injected=2;delete X[a.mid];a.url&&delete X[a.url];d(X)&&ja()},Na=p.idle=function(){return!ba.length&&d(X)&&!V.length&&!ea},qa=function(a,b){if(b)for(var c=0;c<b.length;c++)if(b[c][2].test(a))return b[c];return 0},Ca=function(a){for(var b=
  [],c,f,a=a.replace(/\\/g,"/").split("/");a.length;)c=a.shift(),".."==c&&b.length&&".."!=f?(b.pop(),f=b[b.length-1]):"."!=c&&b.push(f=c);return b.join("/")},ga=function(a,b,c,f){return{pid:a,mid:b,pack:c,url:f,executed:0,def:0}},Da=function(a,c,f,d,e,n,l,s){var m,t,g,p;p=/^\./.test(a);if(/(^\/)|(\:)|(\.js$)/.test(a)||p&&!c)return ga(0,a,0,a);a=Ca(p?c.mid+"/../"+a:a);if(/^\./.test(a))throw r("irrationalPath",a);c&&(g=qa(c.mid,n));(g=(g=g||n.star)&&qa(a,g[1]))&&(a=g[1]+a.substring(g[3]));c=(W=a.match(/^([^\/]+)(\/(.+))?$/))?
  W[1]:"";(m=f[c])?a=c+"/"+(t=W[3]||m.main):c="";var h=0;k(A,function(c){var f=a.match(c[0]);f&&0<f.length&&(h=b(c[1])?a.replace(c[0],c[1]):c[1])});if(h)return Da(h,0,f,d,e,n,l,s);if(f=d[a])return s?ga(f.pid,f.mid,f.pack,f.url):d[a];d=(g=qa(a,l))?g[1]+a.substring(g[3]):c?m.location+"/"+t:v("config-tlmSiblingOfDojo")?"../"+a:a;/(^\/)|(\:)/.test(d)||(d=e+d);return ga(c,a,m,Ca(d+".js"))},fa=function(a,b){return Da(a,b,L,z,p.baseUrl,D,N)},Ea=function(a,b,c){return a.normalize?a.normalize(b,function(a){return pa(a,
  c)}):pa(b,c)},Fa=0,ca=function(a,b,c){var f,d;(f=a.match(/^(.+?)\!(.*)$/))?(d=ca(f[1],b,c),5===d.executed&&!d.load&&ra(d),d.load?(f=Ea(d,f[2],b),a=d.mid+"!"+(d.dynamic?++Fa+"!":"")+f):(f=f[2],a=d.mid+"!"+ ++Fa+"!waitingForPlugin"),a={plugin:d,mid:a,req:Z(b),prid:f}):a=fa(a,b);return z[a.mid]||!c&&(z[a.mid]=a)},pa=p.toAbsMid=function(a,b){return fa(a,b).mid},za=p.toUrl=function(a,b){var c=fa(a+"/x",b),f=c.url;return Ga(0===c.pid?a:f.substring(0,f.length-5))},Ha={injected:2,executed:5,def:3,result:3},
  sa=function(a){return z[a]=n({mid:a},Ha)},Oa=sa("require"),Pa=sa("exports"),Qa=sa("module"),la={},ta=0,ra=function(a){var b=a.result;a.dynamic=b.dynamic;a.normalize=b.normalize;a.load=b.load;return a},Ra=function(a){var b={};k(a.loadQ,function(c){var f=Ea(a,c.prid,c.req.module),d=a.dynamic?c.mid.replace(/waitingForPlugin$/,f):a.mid+"!"+f,f=n(n({},c),{mid:d,prid:f,injected:0});z[d]||Ia(z[d]=f);b[c.mid]=z[d];ka(c);delete z[c.mid]});a.loadQ=0;var c=function(a){for(var c=a.deps||[],f=0;f<c.length;f++)(a=
  b[c[f].mid])&&(c[f]=a)},f;for(f in z)c(z[f]);k(V,c)},ua=function(a){p.trace("loader-finish-exec",[a.mid]);a.executed=5;a.defOrder=ta++;a.loadQ&&(ra(a),Ra(a));for(h=0;h<V.length;)V[h]===a?V.splice(h,1):h++;/^require\*/.test(a.mid)&&delete z[a.mid]},Sa=[],oa=function(a,c){if(4===a.executed)return p.trace("loader-circular-dependency",[Sa.concat(a.mid).join("->")]),!a.def||c?la:a.cjs&&a.cjs.exports;if(!a.executed){if(!a.def)return la;var f=a.mid,d=a.deps||[],e,k=[],n=0;for(a.executed=4;n<d.length;){e=
  d[n++];e=e===Oa?Z(a):e===Pa?a.cjs.exports:e===Qa?a.cjs:oa(e,c);if(e===la)return a.executed=0,p.trace("loader-exec-module",["abort",f]),la;k.push(e)}p.trace("loader-run-factory",[a.mid]);var f=a.def,l;if(v("config-dojo-loader-catches"))try{l=b(f)?f.apply(null,k):f}catch(m){B("error",a.result=r("factoryThrew",[a,m]))}else l=b(f)?f.apply(null,k):f;a.result=void 0===l&&a.cjs?a.cjs.exports:l;ua(a)}return a.result},ea=0,na=function(a){try{ea++,a()}finally{ea--}Na()&&B("idle",[])},ha=function(){ea||na(function(){for(var a,
  b,c=0;c<V.length;)a=ta,b=V[c],oa(b),a!=ta?c=0:c++})};void 0===v("dojo-loader-eval-hint-url")&&v.add("dojo-loader-eval-hint-url",1);var Ga=function(a){a+="";return a+(F?(/\?/.test(a)?"&":"?")+F:"")},Ia=function(a){var b=a.plugin;5===b.executed&&!b.load&&ra(b);var c=function(b){a.result=b;ka(a);ua(a);ha()};b.load?b.load(a.prid,a.req,c):b.loadQ?b.loadQ.push(a):(b.loadQ=[a],V.unshift(b),Aa(b))},da=0,va=0,wa=0,Ta=function(a,b){v("config-stripStrict")&&(a=a.replace(/"use strict"/g,""));wa=1;if(v("config-dojo-loader-catches"))try{a===
  da?da.call(null):p.eval(a,v("dojo-loader-eval-hint-url")?b.url:b.mid)}catch(c){B("error",r("evalModuleThrew",b))}else a===da?da.call(null):p.eval(a,v("dojo-loader-eval-hint-url")?b.url:b.mid);wa=0},Aa=function(a){var b=a.mid,c=a.url;if(!a.executed&&!a.injected&&!(X[b]||a.url&&(a.pack&&X[a.url]===a.pack||1==X[a.url])))if(ia(a),a.plugin)Ia(a);else{var f=function(){Ua(a);2!==a.injected&&(ka(a),n(a,Ha),p.trace("loader-define-nonmodule",[a.url]));ha()};(da=H[b]||H["url:"+a.url])?(p.trace("loader-inject",
  ["cache",a.mid,c]),Ta(da,a),f()):(p.trace("loader-inject",["script",a.mid,c]),va=a,p.injectUrl(Ga(c),f,a),va=0)}},xa=function(a,c,f){p.trace("loader-define-module",[a.mid,c]);if(2===a.injected)return B("error",r("multipleDefine",a)),a;n(a,{deps:c,def:f,cjs:{id:a.mid,uri:a.url,exports:a.result={},setExports:function(b){a.cjs.exports=b},config:function(){return a.config}}});for(var d=0;d<c.length;d++)c[d]=ca(c[d],a);ka(a);if(!b(f)&&!c.length)a.result=f,ua(a);return a},Ua=function(a,b){for(var c=[],
  f,d;ba.length;)d=ba.shift(),b&&(d[0]=b.shift()),f=d[0]&&ca(d[0])||a,c.push([f,d[1],d[2]]);O(a);k(c,function(a){aa(xa.apply(null,a))})},ma=0,ja=e,Ba=e;ja=function(){ma&&clearTimeout(ma);ma=0};Ba=function(){ja();p.waitms&&(ma=window.setTimeout(function(){ja();B("error",r("timeout",X))},p.waitms))};v.add("ie-event-behavior",!!s.attachEvent&&("undefined"===typeof opera||"[object Opera]"!=opera.toString()));var ya=function(a,b,c,f){if(v("ie-event-behavior"))return a.attachEvent(c,f),function(){a.detachEvent(c,
  f)};a.addEventListener(b,f,!1);return function(){a.removeEventListener(b,f,!1)}},Va=ya(window,"load","onload",function(){p.pageLoaded=1;"complete"!=s.readyState&&(s.readyState="complete");Va()}),Ja=s.getElementsByTagName("script")[0],Wa=Ja.parentNode;p.injectUrl=function(a,b,c){var c=c.node=s.createElement("script"),f=ya(c,"load","onreadystatechange",function(a){var a=a||window.event,c=a.target||a.srcElement;if("load"===a.type||/complete|loaded/.test(c.readyState))f(),d(),b&&b()}),d=ya(c,"error",
  "onerror",function(b){f();d();B("error",r("scriptError",[a,b]))});c.type="text/javascript";c.charset="utf-8";c.src=a;Wa.insertBefore(c,Ja);return c};p.log=e;p.trace=e;var Ka=function(a,c,d){var e=arguments.length,k=["require","exports","module"],n=[0,a,c];1==e?n=[0,b(a)?k:[],a]:2==e&&f(a)?n=[a,b(c)?k:[],c]:3==e&&(n=[a,c,d]);p.trace("loader-define",n.slice(0,2));if((e=n[0]&&ca(n[0]))&&!X[e.mid])aa(xa(e,n[1],n[2]));else if(!v("ie-event-behavior")||wa)ba.push(n);else{e=e||va;if(!e)for(a in X)if((k=z[a])&&
  k.node&&"interactive"===k.node.readyState){e=k;break}e?(O(e),aa(xa(e,n[1],n[2]))):B("error",r("ieDefineFailed",n[0]));ha()}};Ka.amd={vendor:"dojotoolkit.org"};n(n(p,j.loaderPatch),i.loaderPatch);C("error",function(a){try{if(console.error(a),a instanceof Error)for(var b in a);}catch(c){}});n(p,{uid:l,cache:H,packs:L});if(!q.define){q.define=Ka;q.require=p;k(U,function(a){P(a)});var La=K.deps||i.deps||j.deps,Ma=K.callback||i.callback||j.callback;p.boot=La||Ma?[La||[],Ma]:0}})(this.dojoConfig||this.djConfig||
  this.require||{},{async:0,hasCache:{"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},packages:[{location:"../../../src/dbind",name:"dbind"},{location:"../../../src/dgrid",main:"OnDemandGrid",name:"dgrid"},{location:".",name:"dojo"},{location:"../../../src/dijit",name:"dijit"},{location:"../../../src/dojox",name:"dojox"},{location:"../../../src/json-schema",main:"lib/validate.js",name:"json-schema"},{location:"../../../src/jszlib",name:"jszlib"},
  {location:"../../../src/lazyload",main:"lazyload",name:"lazyload"},{location:"../../../src/xstyle",main:"css",name:"xstyle"},{location:"../../../src/put-selector",main:"put",name:"put-selector"},{location:"../../../src/jDataView",main:"jdataview",name:"jDataView"},{location:"../../../src/FileSaver",name:"FileSaver"},{location:"../../../src/JBrowse",name:"JBrowse"}]});
  require({cache:{"JBrowse/main":function(){require("JBrowse/Browser,JBrowse/ConfigAdaptor/JB_json_v1,JBrowse/View/TrackList/Hierarchical,JBrowse/Store/Sequence/StaticChunked,JBrowse/Store/SeqFeature/NCList,JBrowse/Store/TiledImage/Fixed,JBrowse/Store/Names/Hash,JBrowse/Store/Names/REST,JBrowse/View/Track/Sequence,JBrowse/View/Track/HTMLFeatures,JBrowse/View/Track/FixedImage/Wiggle,JBrowse/View/Track/Wiggle,JBrowse/View/Track/Wiggle/XYPlot,JBrowse/View/Track/Wiggle/Density,JBrowse/View/Track/Alignments,JBrowse/View/Track/Alignments2,JBrowse/View/Track/FeatureCoverage,JBrowse/View/Track/SNPCoverage,JBrowse/Store/TrackMetaData,xstyle/load-css,dojox/gfx/svg".split(","))},"JBrowse/Browser":function(){var i=
  i||[];define("dojo/_base/declare,dojo/_base/lang,dojo/on,dojo/keys,dojo/Deferred,dojo/DeferredList,dojo/topic,dojo/aspect,dojo/request,JBrowse/has,dojo/_base/array,dijit/layout/ContentPane,dijit/layout/BorderContainer,dijit/Dialog,dijit/form/ComboBox,dijit/form/Button,dijit/form/Select,dijit/form/ToggleButton,dijit/form/DropDownButton,dijit/DropDownMenu,dijit/MenuItem,dojox/form/TriStateCheckBox,JBrowse/Util,JBrowse/Store/LazyTrie,JBrowse/Store/Names/LazyTrieDojoData,dojo/store/DataStore,JBrowse/FeatureFiltererMixin,JBrowse/GenomeView,JBrowse/TouchScreenSupport,JBrowse/ConfigManager,JBrowse/View/InfoDialog,JBrowse/View/FileDialog,JBrowse/Model/Location,JBrowse/View/LocationChoiceDialog,JBrowse/View/Dialog/SetHighlight,JBrowse/View/Dialog/SetTrackHeight,JBrowse/View/Dialog/QuickHelp,JBrowse/View/StandaloneDatasetList,dijit/focus,lazyload,dojo/domReady!".split(","),
  function(j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u,v,w,t,y,x,B,C,A,E,N,L,I,D,z,F,H,M,K,O,T,J,G){var U=x.dojof;return j(E,{constructor:function(a){this.globalKeyboardShortcuts={};this.config=a||{};if(!this.config.unitTestMode){this.startTime=new Date;var b=this;dojo.addOnLoad(function(){b.loadConfig().then(function(){b.container=dojo.byId(b.config.containerID);b.container.onselectstart=function(){return!1};b.config.initialHighlight&&"/"!=b.config.initialHighlight&&b.setHighlight(new F(b.config.initialHighlight));
  b.loadNames();b.initPlugins().then(function(){b.loadUserCSS().then(function(){b.initTrackMetadata();b.loadRefSeqs().then(function(){var a=b._initialLocation(),c=x.parseLocString(a);if(c&&c.ref&&b.allRefs[c.ref])b.refSeq=b.allRefs[c.ref];b.initView().then(function(){L.loadTouch();a&&b.navigateTo(a);var c=[];b.config.alwaysOnTracks&&(c=c.concat(b.config.alwaysOnTracks.split(",")));b.config.forceTracks?c=c.concat(b.config.forceTracks.split(",")):b.cookie("tracks")?c=c.concat(b.cookie("tracks").split(",")):
  b.config.defaultTracks&&(c=c.concat(b.config.defaultTracks.split(",")));0==c.length&&c.push("DNA");c=x.uniq(c);b.showTracks(c);b.passMilestone("completely initialized",{success:!0})});b.reportUsageStats()})})})})})}},_initialLocation:function(){var a=dojo.fromJson(this.cookie("location"))||{};return this.config.location?this.config.location:a[this.refSeq.name]?a[this.refSeq.name].l||a[this.refSeq.name]:this.config.defaultLocation?this.config.defaultLocation:x.assembleLocString({ref:this.refSeq.name,
  start:0.4*(this.refSeq.start+this.refSeq.end),end:0.6*(this.refSeq.start+this.refSeq.end)})},version:function(){return"1.11.6"}.call(),getPlugin:function(a,b){this.afterMilestone("initPlugins",dojo.hitch(this,function(){b(this.plugins[a])}))},_corePlugins:function(){return["RegexSequenceSearch"]},initPlugins:function(){return this._milestoneFunction("initPlugins",function(a){this.plugins={};var b=this.config.plugins||this.config.Plugins||{};!h.isArray(b)&&!b.name&&(b=function(){var a=[],c;for(c in b){if(!("name"in
  b[c]))b[c].name=c;a.push(b[c])}return a}.call(this));h.isArray(b)||(b=[b]);b.unshift.apply(b,this._corePlugins());if(b=n.map(b,function(a){return"object"==typeof a?a:{name:a}})){n.forEach(b,function(a){if(!("location"in a))a.location="plugins/"+a.name;var b=this.resolveUrl(a.location);if(!("js"in a))a.js=a.location+"/js";if("/"!=a.js.charAt(0)&&!/^https?:/i.test(a.js))a.js="../"+a.js;if(!("css"in a))a.css="plugins/jbrowse/"+b+"/css"},this);var f=n.map(b,function(){return new d});(new c(f)).then(function(){a.resolve({success:!0})});
  require({packages:n.map(b,function(a){return{name:a.name,location:a.js}},this)},n.map(b,function(a){return a.name}),dojo.hitch(this,function(){n.forEach(arguments,function(a,c){var d=b[c],e=f[c];if("string"==typeof a)console.error("could not load plugin "+d.name+": "+a);else{var k=dojo.mixin(dojo.clone(b[c]),{config:this.config[d.name]||{}});k.browser=this;var k=dojo.mixin(k,{browser:this}),n=this._loadCSS({url:d.css+"/main.css"});n.then(function(){e.resolve({success:!0})});k.cssLoaded=n;this.plugins[d.name]=
  new a(k)}},this)}))}else a.resolve({success:!0})})},resolveUrl:function(a){var b=this.config.browserRoot||"";b&&"/"!=b.charAt(b.length-1)&&(b+="/");return x.resolveUrl(b,a)},fatalError:function(b){function c(a){a&&(console.error(a.stack||""+a),a+="",/\.$/.exec(a)||(a+="."));return a}if(this.renderedFatalErrors){var f=dojo.byId("fatal_error_list")||document.body;dojo.create("div",{className:"error",innerHTML:c(b)+""},f)}else/^Could not load reference sequence/.test(b)&&this.config.datasets&&!this.config.datasets._DEFAULT_EXAMPLES?
  (new T({datasets:this.config.datasets})).placeAt(this.container):((this.container||document.body).innerHTML='<div class="fatal_error">  <h1>Congratulations, JBrowse is on the web!</h1>  <p>However, JBrowse could not start, either because it has not yet been configured     and loaded with data, or because of an error.</p>  <p style="font-size: 110%; font-weight: bold">If this is your first time running JBrowse, <a title="View the tutorial" href="docs/tutorial/" target="_blank">click here to follow the Quick-start Tutorial to show your data in JBrowse.</a></p>  <p id="volvox_data_placeholder"></p>  <p>Otherwise, please refer to the following resources for help in setting up JBrowse to show your data.</p>  <ul><li><a target="_blank" href="docs/tutorial/">Quick-start tutorial</a> - get your data visible quickly with minimum fuss</li>      <li><a target="_blank" href="http://gmod.org/wiki/JBrowse_Configuration_Guide">JBrowse Configuration Guide</a> - a comprehensive reference</li>      <li><a target="_blank" href="http://gmod.org/wiki/JBrowse">JBrowse wiki main page</a></li>      <li><a target="_blank" href="docs/config.html"><code>biodb-to-json.pl</code> configuration reference</a></li>      <li><a target="_blank" href="docs/featureglyphs.html">HTMLFeatures CSS class reference</a> - prepackaged styles (CSS classes) for HTMLFeatures tracks</li>  </ul>  <div id="fatal_error_list" class="errors"> <h2>Error message(s):</h2>'+
  (b?'<div class="error"> '+c(b)+"</div>":"")+"  </div></div>",a("sample_data/json/volvox/successfully_run").then(function(){try{document.getElementById("volvox_data_placeholder").innerHTML='However, it appears you have successfully run <code>./setup.sh</code>, so you can see the <a href="?data=sample_data/json/volvox" target="_blank">Volvox test data here</a>.'}catch(a){}}),this.renderedFatalErrors=!0)},loadRefSeqs:function(){return this._milestoneFunction("loadRefSeqs",function(b){if("string"==typeof this.config.refSeqs)this.config.refSeqs=
  {url:this.config.refSeqs};var c=this;a(this.config.refSeqs.url,{handleAs:"text"}).then(function(a){c.addRefseqs(dojo.fromJson(a));b.resolve({success:!0})},function(a){b.reject("Could not load reference sequence definitions. "+a)})})},loadUserCSS:function(){return this._milestoneFunction("loadUserCSS",function(a){if(this.config.css&&!h.isArray(this.config.css))this.config.css=[this.config.css];var b=this.config.css||[];if(b.length){var f=this,b=n.map(b,function(a){return f._loadCSS(a)});(new c(b)).then(function(){a.resolve({success:!0})})}else a.resolve({success:!0})})},
  _loadCSS:function(a){var b=new d;"string"==typeof a&&(-1<a.indexOf("{")?(dojo.create("style",{"data-from":"JBrowse Config",type:"text/css",innerHTML:a},document.head),b.resolve(!0)):a={url:a});"object"==typeof a&&G.css(a.url,function(){b.resolve(!0)});return b},loadNames:function(){return this._milestoneFunction("loadNames",function(a){var b=dojo.mixin(dojo.clone(this.config.names||{}),this.config.autocomplete||{});if(!b.url)b.url=this.config.nameUrl||"data/names/";if(b.baseUrl)b.url=x.resolveUrl(b.baseUrl,
  b.url);var c;if(c=b.type){var f=this;-1==c.indexOf("/")&&(c="JBrowse/Store/Names/"+c);require([c],function(c){f.nameStore=new c(dojo.mixin({browser:f},b));a.resolve({success:!0})})}else this.nameStore=new A({store:new C({browser:this,namesTrie:new B(b.url,"lazy-{Chunk}.json"),stopPrefixes:b.stopPrefixes,resultLimit:b.resultLimit||15,tooManyMatchesMessage:b.tooManyMatchesMessage})}),a.resolve({success:!0})})},compareReferenceNames:function(a,b){return this.regularizeReferenceName(a).localeCompare(this.regularizeReferenceName(b))},
  regularizeLocation:function(a){var b=this.findReferenceSequence(a.ref||a.objectName);if(b)a.ref=b.name;return a},regularizeReferenceName:function(a){return this.config.exactReferenceSequenceNames?a:a=a.toLowerCase().replace(/^chro?m?(osome)?/,"chr").replace(/^co?n?ti?g/,"ctg").replace(/^scaff?o?l?d?/,"scaffold").replace(/^([a-z]*)0+/,"$1").replace(/^(\d+)$/,"chr$1")},initView:function(){var a=this;return this._milestoneFunction("initView",function(b){function c(){var b=a.makeCurrentViewURL();a.config.updateBrowserURL&&
  window.history&&window.history.replaceState&&window.history.replaceState({},"",b);document.title=a.browserMeta().title+" "+a.view.visibleRegionLocString()}dojo.addClass(this.container,"jbrowse");dojo.addClass(document.body,this.config.theme||"tundra");var f=dojo.create("div",{style:{overflow:"hidden"}},this.container),d=this.browserMeta(),e=new D({title:"About "+d.title,content:d.description,className:"about-dialog"}),d=dojo.create("div",{className:this.config.show_nav?"menuBar":"topLink"});a.menuBar=
  d;this.config.show_menu&&(this.config.show_nav?f:this.container).appendChild(d);var k=dojo.create("div",{className:"overview",id:"overview"},f);this.overviewDiv=k;if(!this.config.show_overview)k.style.cssText="display: none";if(this.config.show_nav)this.navbox=this.createNavBox(f),this.config.datasets&&!this.config.dataset_id&&console.warn("In JBrowse configuration, datasets specified, but dataset_id not set.  Dataset selector will not be shown."),this.config.datasets&&this.config.dataset_id?this.renderDatasetSelect(d):
  (this.poweredByLink=dojo.create("a",{className:"powered_by",innerHTML:this.browserMeta().title,title:"powered by JBrowse"},d),a.poweredBy_clickHandle=dojo.connect(this.poweredByLink,"onclick",dojo.hitch(e,"show"))),this.addGlobalMenuItem("file",new t({id:"menubar_fileopen",label:"Open",iconClass:"dijitIconFolderOpen",onClick:dojo.hitch(this,"openFileDialog")})),this.fileDialog=new z({browser:this}),this.addGlobalMenuItem("file",new t({id:"menubar_combotrack",label:"Add combination track",iconClass:"dijitIconSample",
  onClick:dojo.hitch(this,"createCombinationTrack")})),this.renderGlobalMenu("file",{text:"File"},d),this.addGlobalMenuItem("view",new t({id:"menubar_sethighlight",label:"Set highlight",iconClass:"dijitIconFilter",onClick:function(){(new M({browser:a,setCallback:dojo.hitch(a,"setHighlightAndRedraw")})).show()}})),this._highlightClearButton=new t({id:"menubar_clearhighlight",label:"Clear highlight",iconClass:"dijitIconFilter",onClick:dojo.hitch(this,function(){var a=this.getHighlight();a&&(this.clearHighlight(),
  this.view.redrawRegion(a))})}),this._updateHighlightClearButton(),this.subscribe("/jbrowse/v1/n/globalHighlightChanged",dojo.hitch(this,"_updateHighlightClearButton")),this.addGlobalMenuItem("view",this._highlightClearButton),this.addGlobalMenuItem("view",new t({label:"Resize quant. tracks",id:"menubar_settrackheight",title:"Set all visible quantitative tracks to a new height",iconClass:"jbrowseIconVerticalResize",onClick:function(){(new K({setCallback:function(b){var c=a.view.visibleTracks();n.forEach(c,
  function(a){if(/\b(XYPlot|Density)/.test(a.config.type))a.trackHeightChanged=!0,a.updateUserStyles({height:b})})}})).show()}})),this.renderGlobalMenu("view",{text:"View"},d),this.renderGlobalMenu("options",{text:"Options",title:"configure JBrowse"},d);this.config.show_nav&&(this.addGlobalMenuItem("help",new t({id:"menubar_about",label:"About",onClick:dojo.hitch(e,"show")})),e=function(){(new O(h.mixin(a.config.quickHelp||{},{browser:a}))).show()},this.setGlobalKeyboardShortcut("?",e),this.addGlobalMenuItem("help",
  new t({id:"menubar_generalhelp",label:"General",iconClass:"jbrowseIconHelp",onClick:e})),this.renderGlobalMenu("help",{},d));this.config.show_nav&&this.config.show_tracklist&&this.config.show_overview?(e=this.makeShareLink())&&d.appendChild(e):d.appendChild(this.makeFullViewLink());this.viewElem=document.createElement("div");this.viewElem.className="dragWindow";this.container.appendChild(this.viewElem);this.containerWidget=new m({liveSplitters:!1,design:"sidebar",gutters:!1},this.container);new r({region:"top"},
  f);this.view=this.viewElem.view=new N({browser:this,elem:this.viewElem,config:this.config.view,stripeWidth:250,refSeq:this.refSeq,zoomLevel:0.005});dojo.connect(this.view,"onFineMove",this,"onFineMove");dojo.connect(this.view,"onCoarseMove",this,"onCoarseMove");this.browserWidget=new r({region:"center"},this.viewElem);dojo.connect(this.browserWidget,"resize",this,"onResize");dojo.connect(this.browserWidget,"resize",this.view,"onResize");dojo.connect(this,"onCoarseMove",c);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",
  c);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",c);this.afterMilestone("loadRefSeqs",dojo.hitch(this,function(){this.afterMilestone("initTrackMetadata",dojo.hitch(this,function(){this.createTrackList().then(dojo.hitch(this,function(){this.containerWidget.startup();this.onResize();g(document.body,"keypress",dojo.hitch(this,"globalKeyHandler"));this._initEventRouting();b.resolve({success:!0})}))}))}))})},createCombinationTrack:function(){if(void 0===this._combinationTrackCount)this._combinationTrackCount=
  0;var a=new d,b={browser:this,refSeq:this.refSeq,type:"JBrowse/Store/SeqFeature/Combination"},c=this.addStoreConfig(void 0,b);b.name=c;this.getStore(c,function(){a.resolve(!0)});var f=this;a.promise.then(function(){var a={type:"JBrowse/View/Track/Combination",label:"combination_track"+f._combinationTrackCount++,key:"Combination Track "+f._combinationTrackCount,metadata:{Description:"Drag-and-drop interface that creates a track out of combinations of other tracks."},store:c};f.publish("/jbrowse/v1/v/tracks/new",
  [a]);f.publish("/jbrowse/v1/v/tracks/show",[a])})},renderDatasetSelect:function(a){var b=this.config.datasets||{},c=[],f;for(f in b)/^_/.test(f)||c.push(dojo.mixin({id:f},b[f]));(new s({name:"dataset",className:"dataset_select",value:this.config.dataset_id,options:n.map(c,function(a){return{label:a.name,value:a.id}}),onChange:dojo.hitch(this,function(a){if(a=(this.config.datasets||{})[a])window.location=a.url;return!1})})).placeAt(a)},browserMeta:function(){var a=this.config.aboutThisBrowser||{};
  a.title=a.title||"JBrowse";var b=this.version&&this.version.match(/^\d/)?this.version:"(development version)";a.description=a.description?a.description+('<div class="powered_by">Powered by <a target="_blank" href="http://jbrowse.org">JBrowse '+b+"</a>.</div>"):'<div class="default_about">  <img class="logo" src="'+this.resolveUrl("img/JBrowseLogo_small.png")+'">  <h1>JBrowse '+b+'</h1>  <div class="tagline">A next-generation genome browser<br> built with JavaScript and HTML5.</div>  <a class="mainsite" target="_blank" href="http://jbrowse.org">JBrowse website</a>  <div class="gmod">JBrowse is a <a target="_blank" href="http://gmod.org">GMOD</a> project.</div>  <div class="copyright">&copy; 2013 The Evolutionary Software Foundation</div></div>';
  return a},registerTrackType:function(a){var b=this.getTrackTypes(),c=a.type,f=a.defaultForStoreTypes||[];b.knownTrackTypes.push(c);if(a.label)b.trackTypeLabels[c]=a.label;var d={};b.knownTrackTypes=n.filter(b.knownTrackTypes,function(a){var b=d[a];d[a]=!0;return!b});n.forEach(f,function(a){b.trackTypeDefaults[a]=c});this._knownTrackTypes=b},getTrackTypes:function(){if(!this._knownTrackTypes)this._knownTrackTypes={trackTypeDefaults:{"JBrowse/Store/SeqFeature/BAM":"JBrowse/View/Track/Alignments2","JBrowse/Store/SeqFeature/NCList":"JBrowse/View/Track/CanvasFeatures",
  "JBrowse/Store/SeqFeature/BigWig":"JBrowse/View/Track/Wiggle/XYPlot","JBrowse/Store/Sequence/StaticChunked":"JBrowse/View/Track/Sequence","JBrowse/Store/SeqFeature/VCFTabix":"JBrowse/View/Track/CanvasVariants","JBrowse/Store/SeqFeature/GFF3":"JBrowse/View/Track/CanvasFeatures","JBrowse/Store/SeqFeature/GTF":"JBrowse/View/Track/CanvasFeatures"},knownTrackTypes:"JBrowse/View/Track/Alignments,JBrowse/View/Track/Alignments2,JBrowse/View/Track/FeatureCoverage,JBrowse/View/Track/SNPCoverage,JBrowse/View/Track/HTMLFeatures,JBrowse/View/Track/CanvasFeatures,JBrowse/View/Track/HTMLVariants,JBrowse/View/Track/CanvasVariants,JBrowse/View/Track/Wiggle/XYPlot,JBrowse/View/Track/Wiggle/Density,JBrowse/View/Track/Sequence".split(","),
  trackTypeLabels:{}};return this._knownTrackTypes},openFileDialog:function(){this.fileDialog.show({openCallback:dojo.hitch(this,function(a){var b=a.trackConfs||[];b.length&&(n.forEach(b,function(a){var b=a.store;if(b&&"object"==typeof b)delete a.store,b=this.addStoreConfig(b.name,b),a.store=b;if((b=a.histograms&&a.histograms.store)&&"object"==typeof b)delete a.histograms.store,b=this.addStoreConfig(b.name,b),a.histograms.store=b},this),this.publish("/jbrowse/v1/v/tracks/new",b),"openImmediately"==
  a.trackDisposition&&this.publish("/jbrowse/v1/v/tracks/show",b))})})},addTracks:function(a){this._addTrackConfigs(a)},replaceTracks:function(a){this._replaceTrackConfigs(a)},deleteTracks:function(a){this._deleteTrackConfigs(a)},renderGlobalMenu:function(a,b,c){this.afterMilestone("initView",function(){var f=this.makeGlobalMenu(a);f&&(b=dojo.mixin({className:a,innerHTML:'<span class="icon"></span> '+(b.text||x.ucFirst(a)),dropDown:f,id:"dropdownbutton_"+a},b||{}),f=new v(b),dojo.addClass(f.domNode,
  "menu"),c.appendChild(f.domNode))},this)},makeGlobalMenu:function(a){var b=(this._globalMenuItems||{})[a]||[];if(!b.length)return null;var c=new w({id:"dropdownmenu_"+a,leftClickToOpen:!0});dojo.forEach(b,function(a){c.addChild(a)});dojo.addClass(c.domNode,"globalMenu");dojo.addClass(c.domNode,a);c.startup();return c},addGlobalMenuItem:function(a,b){if(!this._globalMenuItems)this._globalMenuItems={};this._globalMenuItems[a]||(this._globalMenuItems[a]=[]);this._globalMenuItems[a].push(b)},_initEventRouting:function(){var a=
  this;a.subscribe("/jbrowse/v1/v/store/new",function(b){n.forEach(b,function(b){var b=h.mixin({},b),c=b.name;delete b.name;a.addStoreConfig(c,b)})});a.subscribe("/jbrowse/v1/v/tracks/hide",function(b){a.publish("/jbrowse/v1/c/tracks/hide",b)});a.subscribe("/jbrowse/v1/v/tracks/show",function(b){a.addRecentlyUsedTracks(dojo.map(b,function(a){return a.label}));a.publish("/jbrowse/v1/c/tracks/show",b)});a.subscribe("/jbrowse/v1/v/tracks/new",function(b){a.addTracks(b);a.publish("/jbrowse/v1/c/tracks/new",
  b);a.publish("/jbrowse/v1/n/tracks/new",b)});a.subscribe("/jbrowse/v1/v/tracks/replace",function(b){a.replaceTracks(b);a.publish("/jbrowse/v1/c/tracks/replace",b);a.publish("/jbrowse/v1/n/tracks/replace",b)});a.subscribe("/jbrowse/v1/v/tracks/delete",function(b){a.deleteTracks(b);a.publish("/jbrowse/v1/c/tracks/delete",b);a.publish("/jbrowse/v1/n/tracks/delete",b)});a.subscribe("/jbrowse/v1/v/tracks/pin",function(b){a.publish("/jbrowse/v1/c/tracks/pin",b);a.publish("/jbrowse/v1/n/tracks/pin",b)});
  a.subscribe("/jbrowse/v1/v/tracks/unpin",function(b){a.publish("/jbrowse/v1/c/tracks/unpin",b);a.publish("/jbrowse/v1/n/tracks/unpin",b)})},reportUsageStats:function(){if(!this.config.suppressUsageStatistics){var a=this._calculateClientStats();this._reportGoogleUsageStats(a);this._reportCustomUsageStats(a)}},_reportGoogleUsageStats:function(a){i.push.apply(i,[["_setAccount","UA-7115575-2"],["_setDomainName","none"],["_setAllowLinker",!0],["_setCustomVar",1,"tracks-count",a["tracks-count"],3],["_setCustomVar",
  2,"refSeqs-count",a["refSeqs-count"],3],["_setCustomVar",3,"refSeqs-avgLen",a["refSeqs-avgLen"],3],["_setCustomVar",4,"jbrowse-version",a.ver,3],["_setCustomVar",5,"loadTime",a.loadTime,3],["_trackPageview"]]);a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)},_reportCustomUsageStats:function(a){dojo.create("img",
  {style:{display:"none"},src:"http://jbrowse.org/analytics/clientReport?"+dojo.objectToQuery(a)},document.body)},getStore:function(a,b){if(!b)throw"invalid arguments";var c=this._storeCache||{};this._storeCache=c;if(c=c[a])c.refCount++,b(c.store);else{var f=this.config.stores[a];f?(c=f.type)?require([c],dojo.hitch(this,function(c){var d={};dojo.mixin(d,f);dojo.mixin(d,{config:f,browser:this,refSeq:this.refSeq});c=new c(d);this._storeCache[a]={refCount:1,store:c};b(c);b=void 0})):(console.warn("store "+
  a+" has no type defined"),b(null)):(console.warn("store '"+a+"' not found"),b(null))}},uniqCounter:0,addStoreConfig:function(a,b){a=a||"addStore"+this.uniqCounter++;if(!this.config.stores)this.config.stores={};if(!this._storeCache)this._storeCache={};if(this.config.stores[a]||this._storeCache[a])throw"store "+a+" already exists!";this.config.stores[a]=b;return a},clearStores:function(){this._storeCache={}},releaseStore:function(a){var b=this._storeCache[a];b&&!--b.refCount&&delete this._storeCache[a]},
  _calculateClientStats:function(){var a=screen||window.screen,b=new Date,c={ver:this.version||"dev","refSeqs-count":this.refSeqOrder.length,"refSeqs-avgLen":!this.refSeqOrder.length?null:U.reduce(dojo.map(this.refSeqOrder,function(a){a=this.allRefs[a];return!a?0:a.end-a.start},this),"+"),"tracks-count":this.config.tracks.length,plugins:U.keys(this.plugins).sort().join(","),"scn-h":a?a.height:null,"scn-w":a?a.width:null,"win-h":document.body.offsetHeight,"win-w":document.body.offsetWidth,"el-h":this.container.offsetHeight,
  "el-w":this.container.offsetWidth,t:b.getTime()/1E3,tzoffset:b.getTimezoneOffset(),loadTime:(b.getTime()-this.startTime)/1E3};dojo.forEach(this.config.tracks,function(a){a="track-types-"+a.type||"null";c[a]=(c[a]||0)+1});return c},publish:function(){return b.publish.apply(b,arguments)},subscribe:function(){return b.subscribe.apply(b,arguments)},onResize:function(){if(this.navbox)this.view.locationTrapHeight=dojo.marginBox(this.navbox).h},getRecentlyUsedTracks:function(){return dojo.fromJson(this.cookie("recentTracks")||
  "[]")},addRecentlyUsedTracks:function(a){a=x.uniq(dojo.map(a,function(a){return{label:a,time:Math.round(new Date/1E3)}},this).concat(dojo.fromJson(this.cookie("recentTracks"))||[]),function(a){return a.label}).slice(0,this.config.maxRecentTracks||10);this.cookie("recentTracks",a,{expires:365});return a},_milestoneFunction:function(a,b){var c=Array.prototype.slice.call(arguments,2),f=this._getDeferred(a);c.unshift(f);try{b.apply(this,c)}catch(d){console.error(d,d.stack),f.reject(d)}return f},_getDeferred:function(a){if(!this._deferred)this._deferred=
  {};var b;if(!(b=this._deferred[a])){b=this._deferred;var c=new d;c.then(null,h.hitch(this,"fatalError"));b=b[a]=c}return b},afterMilestone:function(a,b,c){return this._getDeferred(a).then(function(){try{b.call(c||this)}catch(a){console.error(""+a,a.stack,a)}})},passMilestone:function(a,b){return this._getDeferred(a).resolve(b)},reachedMilestone:function(a){return this._getDeferred(a).isResolved()},loadConfig:function(){return this._milestoneFunction("loadConfig",function(a){(new I({bootConfig:this.config,
  defaults:this._configDefaults(),browser:this})).getFinalConfig().then(dojo.hitch(this,function(b){this.config=b;if(this.config.documentDomain)document.domain=this.config.documentDomain;var c=b.tracks||[];delete b.tracks;this._addTrackConfigs(c);dojo.forEach(["show_tracklist","show_nav","show_overview","show_menu"],function(a){this.config[a]=this._coerceBoolean(this.config[a])},this);if(!this.config.tracks)this.config.tracks=[];a.resolve({success:!0})}),a.reject)})},_addTrackConfigs:function(a){if(!this.config.tracks)this.config.tracks=
  [];if(!this.trackConfigsByName)this.trackConfigsByName={};n.forEach(a,function(a){this.trackConfigsByName[a.label]=a;this.config.tracks.push(a)},this);return a},_replaceTrackConfigs:function(a){if(!this.trackConfigsByName)this.trackConfigsByName={};n.forEach(a,function(a){this.trackConfigsByName[a.label]||console.warn("track with label "+a.label+" does not exist yet.  creating a new one.");this.trackConfigsByName[a.label]=dojo.mixin(this.trackConfigsByName[a.label]||{},a)},this)},_deleteTrackConfigs:function(a){this.config.tracks=
  n.filter(this.config.tracks||[],function(b){return!n.some(a,function(a){return a.label==b.label})});n.forEach(a,function(a){this.trackConfigsByName[a.label]?delete this.trackConfigsByName[a.label]:console.warn("track "+a.label+" does not exist, cannot delete")},this)},_configDefaults:function(){return{tracks:[],containerID:"GenomeBrowser",dataRoot:"data",show_tracklist:!0,show_nav:!0,show_menu:!0,show_overview:!0,refSeqs:"plugins/jbrowse/{dataRoot}/seq/refSeqs.json",include:["plugins/jbrowse/jbrowse.conf","plugins/jbrowse/jbrowse_conf.json"],nameUrl:"{dataRoot}/names/root.json",
  datasets:{_DEFAULT_EXAMPLES:!0,volvox:{url:"?data=sample_data/json/volvox",name:"Volvox Example"},modencode:{url:"?data=sample_data/json/modencode",name:"MODEncode Example"},yeast:{url:"?data=sample_data/json/yeast",name:"Yeast Example"}},highlightSearchedRegions:!1,highResolutionMode:"disabled"}},_coerceBoolean:function(a){return"string"==typeof a?(a=a.toLowerCase(),"true"==a?!0:"false"==a?!1:parseInt(a)):"boolean"==typeof a?a:"number"==typeof a?!!a:!0},addRefseqs:function(a){this.allRefs=this.allRefs||
  {};dojo.forEach(a,function(a){this.allRefs[a.name]=a},this);this.refSeqOrder=function(){var b;this.config.refSeqOrder?(b=a.slice(0),b.sort("length"==this.config.refSeqOrder||"length ascending"==this.config.refSeqOrder?function(a,b){return a.length-b.length}:"length descending"==this.config.refSeqOrder?function(a,b){return b.length-a.length}:"name descending"==this.config.refSeqOrder?function(a,b){return b.name.localeCompare(a.name)}:function(a,b){return a.name.localeCompare(b.name)})):b=a;return n.map(b,
  function(a){return a.name})}.call(this);var b=this.cookie("refseq");this.refSeq=this.refSeq||this.allRefs[b]||this.allRefs[this.refSeqOrder[0]]},getRefSeq:function(a){return"string"!=typeof a?this.refSeq||void 0:this.allRefs[a]},onFineMove:function(a,b){if(this.locationTrap){var c=this.view.ref.end-this.view.ref.start,f=Math.round((a-this.view.ref.start)/c*this.view.overviewBox.w+this.view.overviewBox.l),c=Math.round((b-this.view.ref.start)/c*this.view.overviewBox.w+this.view.overviewBox.l);dojo.style(this.locationTrap,
  {width:c-f+"px",borderBottomWidth:this.view.locationTrapHeight+"px",borderLeftWidth:f+"px",borderRightWidth:this.view.overviewBox.w-c+"px"})}},initTrackMetadata:function(){return this._milestoneFunction("initTrackMetadata",function(a){var b=dojo.map((this.config.trackMetadata||{}).sources||[],function(a){var b=a.url||"trackMeta.csv",c=a.type||(/\.csv$/i.test(b)?"csv":/\.js(on)?$/i.test(b)?"json":"csv"),a=a["class"]||{csv:"dojox/data/CsvStore",json:"dojox/data/JsonRestStore"}[c];return!a?(console.error("No store class found for type '"+
  c+"', cannot load track metadata from URL "+b),null):{class_:a,url:b}});require(Array.prototype.concat.apply(["JBrowse/Store/TrackMetaData"],dojo.map(b,function(a){return a.class_})),dojo.hitch(this,function(c){for(var f=[],d=1;d<arguments.length;d++)f.push(new arguments[d]({url:b[d-1].url}));this.trackMetaDataStore=new c(dojo.mixin(dojo.clone(this.config.trackMetadata||{}),{trackConfigs:this.config.tracks,browser:this,metadataStores:f}));a.resolve({success:!0})}))})},createTrackList:function(){return this._milestoneFunction("createTrack",
  function(a){var b=!this.config.show_tracklist?"Null":(this.config.trackSelector||{}).type?this.config.trackSelector.type:"Hierarchical";/\//.test(b)||(b="JBrowse/View/TrackList/"+b);require([b],dojo.hitch(this,function(b){this.trackListView=new b(dojo.mixin(dojo.clone(this.config.trackSelector)||{},{trackConfigs:this.config.tracks,browser:this,trackMetaData:this.trackMetaDataStore}));this.setGlobalKeyboardShortcut("t",this.trackListView,"toggle");this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",
  dojo.hitch(this,function(){this.cookie("tracks",this.view.visibleTrackNames().join(","),{expires:60})}));a.resolve({success:!0})}))})},onVisibleTracksChanged:function(){},showRegion:function(a){var b=Math.round(0.2*(a.end-a.start));this.navigateToLocation({ref:a.ref,start:a.start-b,end:a.end+b});a.tracks&&this.showTracks(n.map(a.tracks,function(a){return a&&(a.label||a.name)||a}))},navigateTo:function(a){var b=this;this.afterMilestone("initView",function(){b.searchNames(a).then(function(c){!c&&b.callLocation(a)&&
  (new D({title:"Not found",content:'Not found: <span class="locString">'+a+"</span>",className:"notfound-dialog"})).show()},b.callLocation(a))})},callLocation:function(a){var b="string"==typeof a?x.parseLocString(a):a;if(b&&"start"in b&&"end"in b)return this.navigateToLocation(b),!1;if("string"!=typeof a)a=a.ref;if(a=this.findReferenceSequence(a))return this.navigateToLocation({ref:a.name}),!1},findReferenceSequence:function(a){for(var b in this.allRefs)if(!this.compareReferenceNames(b,a))return this.allRefs[b];
  return null},navigateToLocation:function(a){this.afterMilestone("initView",dojo.hitch(this,function(){var b=a.ref?this.findReferenceSequence(a.ref.name||a.ref):this.refSeq;if(b){a.ref=b.name;if("ref"in a&&!("start"in a&&"end"in a)){var c;try{c=x.parseLocString(dojo.fromJson(this.cookie("location"))[a.ref].l),c.ref=a.ref}catch(f){}c?a=c:(c=b.end-b.start,a.start=b.start+0.1*c,a.end=b.start+0.9*c)}a.start=Math.max(0,a.start||0);a.end=Math.max(a.start,Math.min(b.end,a.end||b.end));a.ref==this.refSeq.name?
  (this.view.setLocation(this.refSeq,a.start,a.end),this._updateLocationCookies(a)):(b=this.view.visibleTrackNames(),this.refSeq=this.allRefs[a.ref],this.clearStores(),this.view.setLocation(this.refSeq,a.start,a.end),this._updateLocationCookies(a),this.showTracks(b))}}))},searchNames:function(a){var b=this;return this.nameStore.query({name:a}).then(function(c){if(!c.length)return!1;for(var f,d=0;d<c.length;d++)c[d].name==a&&(f=c[d]);if(!f)for(d=0;d<c.length;d++)c[d].name.toLowerCase()==a.toLowerCase()&&
  (f=c[d]);f||(f=c[0]);f.location?b.showRegionAfterSearch(f.location):f.multipleLocations&&(new H({browser:b,locationChoices:f.multipleLocations,title:"Choose "+f.name+" location",prompt:'"'+f.name+'" is found in multiple locations.  Please choose a location to view.'})).show();return!0},function(a){console.error(a);(new D({title:"Error",content:"Error reading from name store."})).show();return!1})},showTracks:function(a){this.afterMilestone("initView",dojo.hitch(this,function(){"string"==typeof a&&
  (a=a.split(","));a&&(this.publish("/jbrowse/v1/c/tracks/show",dojo.filter(dojo.map(a,function(a){return this.trackConfigsByName[a]},this),function(a){return a})),this.publish("/jbrowse/v1/n/tracks/visibleChanged"))}))},setGlobalKeyboardShortcut:function(a){this.globalKeyboardShortcuts[a]&&console.warn("WARNING: JBrowse global keyboard shortcut '"+a+"' redefined");var b=dojo.hitch.apply(dojo,Array.prototype.slice.call(arguments,1));this.globalKeyboardShortcuts[a]=b},globalKeyHandler:function(a){if(!J.curNode){var b=
  this.globalKeyboardShortcuts[a.keyChar||String.fromCharCode(a.charCode||a.keyCode)];b&&(b.call(this),a.stopPropagation())}},makeShareLink:function(){if("share_link"in this.config&&!this.config.share_link)return null;var a=this,b="#",c=new q({className:"share",innerHTML:'<span class="icon"></span> Share',title:"share this view",onClick:function(){e.value=b;k.href=b;n.show();var a=dojo.position(c.domNode);dojo.style(n.domNode,{top:a.y+a.h+"px",right:0,left:""});e.focus();e.select();d.style.display=
  "block";return!1}}),f=dojo.create("div",{innerHTML:"Paste this link in <b>email</b> or <b>IM</b>"}),d=dojo.create("div",{className:"copyReminder",innerHTML:"Press CTRL-C to copy"}),e=dojo.create("input",{type:"text",value:b,size:50,readonly:"readonly",onclick:function(){this.select();d.style.display="block"},onblur:function(){d.style.display="none"}}),k=dojo.create("a",{innerHTML:"Preview",target:"_blank",href:b,style:{display:"block","float":"right"}},f),n=new l({className:"sharePane",title:"Share this view",
  draggable:!1,content:[f,e,d],autofocus:!1}),f=function(){b=a.makeCurrentViewURL()};dojo.connect(this,"onCoarseMove",f);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",f);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",f);return c.domNode},makeCurrentViewURL:function(a){var b=typeof this.config.shareURL;return"function"==b?this.config.shareURL.call(this,this):"string"==b?this.config.shareURL:"".concat(window.location.protocol,"//",window.location.host,window.location.pathname,"?",dojo.objectToQuery(dojo.mixin(dojo.mixin({},
  this.config.queryParams||{}),dojo.mixin({loc:this.view.visibleRegionLocString(),tracks:this.view.visibleTrackNames().join(","),highlight:(this.getHighlight()||"").toString()},a||{}))))},makeFullViewLink:function(){var a=this,b=dojo.create("a",{className:"topLink",href:window.location.href,target:"_blank",title:"View in full-screen browser",innerHTML:"Full-screen view"}),c=this.config.makeFullViewURL||this.makeCurrentViewURL,f=function(){b.href=c.call(a,a)};dojo.connect(this,"onCoarseMove",f);this.subscribe("/jbrowse/v1/n/tracks/visibleChanged",
  f);this.subscribe("/jbrowse/v1/n/globalHighlightChanged",f);return b},onCoarseMove:function(a,b){var c={start:a,end:b,ref:this.refSeq.name};this.locationBox&&(this.locationBox.set("value",x.assembleLocStringWithLength(c),!1),this.goButton.set("disabled",!0));this._updateRefSeqSelectBox();this.reachedMilestone("completely initialized")&&this._updateLocationCookies(c);this.publish("/jbrowse/v1/n/navigate",c)},_updateRefSeqSelectBox:function(){this.refSeqSelectBox&&(n.some(this.refSeqSelectBox.getOptions(),
  function(a){return a.value==this.refSeq.name},this)||this.refSeqSelectBox.set("options",this.refSeqSelectBox.getOptions().concat({label:this.refSeq.name,value:this.refSeq.name})),this.refSeqSelectBox.set("value",this.refSeq.name,!1))},_updateLocationCookies:function(a){var a="string"==typeof a?a:x.assembleLocString(a),b=dojo.fromJson(this.cookie("location"))||{_version:1};b._version||(b=this._migrateLocMap(b));b[this.refSeq.name]={l:a,t:Math.round((new Date).getTime()/1E3)-1340211510};b=this._limitLocMap(b,
  this.config.maxSavedLocations||10);this.cookie("location",dojo.toJson(b),{expires:60});this.cookie("refseq",this.refSeq.name)},_migrateLocMap:function(a){var b={_version:1},c;for(c in a)b[c]={l:a[c],t:0};return b},_limitLocMap:function(a,b){var c=U.keys(a);if(c.length<=b)return a;a=dojo.clone(a);c=c.sort(function(b,c){return a[c].t-a[b].t}).slice(b-1);dojo.forEach(c,function(b){delete a[b]});return a},cookie:function(a,b){var a=this.config.containerID+"-"+a,c=a+"-"+(this.config.dataset_id||"");"object"==
  typeof b&&(b=dojo.toJson(b));var f=this.config.cookieSizeLimit||1200;if(b&&b.length>f)return console.warn("not setting cookie '"+c+"', value too big ("+b.length+" > "+f+")"),localStorage.getItem(c);if(b)try{return localStorage.setItem(c,b)}catch(d){}return localStorage.getItem(c)||dojo.cookie(a)},createNavBox:function(a){var b=this,a=dojo.create("div",{id:"navbox",style:{"text-align":"center"}},a),c=dojo.create("div",{className:"locationTrapContainer"},a);this.locationTrap=dojo.create("div",{className:"locationTrap"},
  c);c=String.fromCharCode(160);c=c+c+c+c;a.appendChild(document.createTextNode(c));var f=document.createElement("img");f.src=this.resolveUrl("img/Empty.png");f.id="moveLeft";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.slide(0.9)});f=document.createElement("img");f.src=this.resolveUrl("img/Empty.png");f.id="moveRight";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.slide(-0.9)});
  a.appendChild(document.createTextNode(c));f=document.createElement("img");f.src=this.resolveUrl("img/Empty.png");f.id="bigZoomOut";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.zoomOut(void 0,void 0,2)});f=document.createElement("img");f.src=this.resolveUrl("img/Empty.png");f.id="zoomOut";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.zoomOut()});f=document.createElement("img");
  f.src=this.resolveUrl("img/Empty.png");f.id="zoomIn";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.zoomIn()});f=document.createElement("img");f.src=this.resolveUrl("img/Empty.png");f.id="bigZoomIn";f.className="icon nav";a.appendChild(f);dojo.connect(f,"click",this,function(a){dojo.stopEvent(a);this.view.zoomIn(void 0,void 0,2)});a.appendChild(document.createTextNode(c));var d=dojo.create("span",{},a);this.locationBox=new p({id:"location",
  name:"location",style:{width:"25ex"},maxLength:400,searchAttr:"name"},dojo.create("input",{},a));this.afterMilestone("loadNames",dojo.hitch(this,function(){this.nameStore&&this.locationBox.set("store",this.nameStore)}));this.locationBox.focusNode.spellcheck=!1;dojo.query("div.dijitArrowButton",this.locationBox.domNode).orphan();dojo.connect(this.locationBox.focusNode,"keydown",this,function(a){a.keyCode==e.ESCAPE?this.locationBox.set("value",""):a.keyCode==e.ENTER?(this.locationBox.closeDropDown(!1),
  this.navigateTo(this.locationBox.get("value")),this.goButton.set("disabled",!0),dojo.stopEvent(a)):this.goButton.set("disabled",!1)});dojo.connect(a,"onselectstart",function(a){a.stopPropagation();return!0});(function(){var a=eval(this.locationBox.dropDownClass).prototype,b=a._createOption;a._createOption=function(a){var c=b.apply(this,arguments);a.hitLimit&&dojo.addClass(c,"moreMatches");return c};var c=a.onClick;a.onClick=function(a){return dojo.hasClass(a,"moreMatches")?null:c.apply(this,arguments)}}).call(this);
  this.goButton=new q({label:"Go",onClick:dojo.hitch(this,function(a){this.navigateTo(this.locationBox.get("value"));this.goButton.set("disabled",!0);dojo.stopEvent(a)})},dojo.create("button",{},a));this.highlightButtonPreviousState=!1;this.highlightButton=new y({title:"highlight a region",states:[!1,!0,"mixed"],onChange:function(){if(!0==this.get("checked"))b.view._rubberStop(),b.view.behaviorManager.swapBehaviors("normalMouse","highlightingMouse");else if(!1==this.get("checked")){var a=b.getHighlight();
  a&&(b.clearHighlight(),b.view.redrawRegion(a))}else!0!=b.highlightButtonPreviousState?b.highlightButton.set("checked",!1):b.highlightButtonPreviousState=!1,b.view._rubberStop(),b.view.behaviorManager.swapBehaviors("highlightingMouse","normalMouse")}},dojo.create("button",{},a));this.subscribe("/jbrowse/v1/n/globalHighlightChanged",function(){b.highlightButton.set("checked",!1)});this.afterMilestone("loadRefSeqs",dojo.hitch(this,function(){if(this.refSeqOrder&&this.refSeqOrder.length){for(var a=this.config.refSeqSelectorMaxSize||
  30,b=Math.min(a,this.refSeqOrder.length),c=[],f=0;f<b;f++)c.push({label:this.refSeqOrder[f],value:this.refSeqOrder[f]});var e="(first "+b+" ref seqs)";this.refSeqOrder.length>a&&c.push({label:e,value:e,disabled:!0});this.refSeqSelectBox=(new s({name:"refseq",value:this.refSeq?this.refSeq.name:null,options:c,onChange:dojo.hitch(this,function(a){a==e?this.refSeqSelectBox.set("value",this.refSeq.name):a!=this.refSeq.name&&this.navigateToLocation({ref:a})})})).placeAt(d)}this.locationBox.domNode.style.width=
  (this.config.locationBoxLength||function(){if(!this.refSeqOrder.length)return 20;var a=1E3>this.refSeqOrder.length&&function(){var a;n.forEach(this.refSeqOrder,function(b){b=this.allRefs[b];if(!b.length)b.length=b.end-b.start+1;if(!a||a.length<b.length)a=b},this);return a}.call(this)||this.refSeqOrder.length&&this.allRefs[this.refSeqOrder[this.refSeqOrder.length-1]]||20;return x.assembleLocStringWithLength({ref:a.name,start:a.end-1,end:a.end,length:a.length}).length}.call(this)||20)+"ex"}));return a},
  getHighlight:function(){return this._highlight||null},setHighlight:function(a){if(a&&a instanceof F)this._highlight=a;else if(a)this._highlight=new F(a);this.publish("/jbrowse/v1/n/globalHighlightChanged",[this._highlight]);return this.getHighlight()},_updateHighlightClearButton:function(){var a=!!this._highlight;this._highlightClearButton&&this._highlightClearButton.set("disabled",!a);if(this.highlightButton)this.highlightButton.set("checked",a?"mixed":!1),this.highlightButtonPreviousState=a},clearHighlight:function(){this._highlight&&
  (delete this._highlight,this.publish("/jbrowse/v1/n/globalHighlightChanged",[]))},setHighlightAndRedraw:function(a){var a=this.regularizeLocation(a),b=this.getHighlight();b&&this.view.hideRegion(b);this.view.hideRegion(a);this.setHighlight(a);this.view.showVisibleBlocks(!1)},showRegionAfterSearch:function(a){a=this.regularizeLocation(a);if(this.config.highlightSearchedRegions){var b=this.getHighlight();b&&this.view.hideRegion(b);this.view.hideRegion(a);this.setHighlight(a)}this.showRegion(a)},showRegionWithHighlight:function(){return this.showRegionAfterSearch.apply(this,
  arguments)}})})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(i,j,h){function g(a,b){throw Error("declare"+(b?" "+b:"")+": "+a);}function e(a,b,c){var f,d,e,k,n,l,m,s=this._inherited=this._inherited||{};"string"==typeof a&&(f=a,a=b,b=c);c=0;k=a.callee;(f=f||k.nom)||g("can't deduce a name to call inherited()",this.declaredClass);n=this.constructor._meta;e=n.bases;m=s.p;if(f!=x){if(s.c!==k&&(m=0,l=e[0],n=l._meta,n.hidden[f]!==k)){(d=n.chains)&&"string"==typeof d[f]&&
  g("calling chained method with inherited: "+f,this.declaredClass);do if(n=l._meta,d=l.prototype,n&&(d[f]===k&&d.hasOwnProperty(f)||n.hidden[f]===k))break;while(l=e[++m]);m=l?m:-1}if(l=e[++m])if(d=l.prototype,l._meta&&d.hasOwnProperty(f))c=d[f];else{k=v[f];do if(d=l.prototype,(c=d[f])&&(l._meta?d.hasOwnProperty(f):c!==k))break;while(l=e[++m])}c=l&&c||v[f]}else{if(s.c!==k&&(m=0,(n=e[0]._meta)&&n.ctor!==k)){d=n.chains;for((!d||"manual"!==d.constructor)&&g("calling chained constructor with inherited",
  this.declaredClass);(l=e[++m])&&!((n=l._meta)&&n.ctor===k););m=l?m:-1}for(;(l=e[++m])&&!(c=(n=l._meta)?n.ctor:l););c=l&&c}s.c=c;s.p=m;if(c)return!0===b?c:c.apply(this,b||a)}function d(a,b){return"string"==typeof a?this.__inherited(a,b,!0):this.__inherited(a,!0)}function c(a,b,c){var f=this.getInherited(a,b);if(f)return f.apply(this,c||b||a)}function b(a){for(var b=this.constructor._meta.bases,c=0,f=b.length;c<f;++c)if(b[c]===a)return!0;return this instanceof a}function f(a,b){for(var c in b)c!=x&&
  b.hasOwnProperty(c)&&(a[c]=b[c]);if(j("bug-for-in-skips-shadowed"))for(var f=h._extraNames,d=f.length;d;)c=f[--d],c!=x&&b.hasOwnProperty(c)&&(a[c]=b[c])}function a(a){s.safeMixin(this.prototype,a);return this}function k(a){return s([this].concat(a))}function n(a,b){return function(){var z;var c=arguments,f=c,d=c[0],e,k;k=a.length;var n;if(!(this instanceof c.callee))return q(c);if(b&&(d&&d.preamble||this.preamble)){n=Array(a.length);n[0]=c;for(e=0;;){if(d=c[0])(d=d.preamble)&&(c=d.apply(this,c)||
  c);d=a[e].prototype;(d=d.hasOwnProperty("preamble")&&d.preamble)&&(c=d.apply(this,c)||c);if(++e==k)break;n[e]=c}}for(e=k-1;0<=e;--e)d=a[e],(z=(k=d._meta)?k.ctor:d,d=z)&&d.apply(this,n?n[e]:c);(d=this.postscript)&&d.apply(this,f)}}function r(a,b){return function(){var c=arguments,f=c,d=c[0];if(!(this instanceof c.callee))return q(c);if(b){if(d)(d=d.preamble)&&(f=d.apply(this,f)||f);(d=this.preamble)&&d.apply(this,f)}a&&a.apply(this,c);(d=this.postscript)&&d.apply(this,c)}}function m(a){return function(){var z;
  var b=arguments,c=0,f,d;if(!(this instanceof b.callee))return q(b);for(;f=a[c];++c)if(z=(d=f._meta)?d.ctor:f,f=z){f.apply(this,b);break}(f=this.postscript)&&f.apply(this,b)}}function l(a,b,c){return function(){var f,d,e=0,k=1;c&&(e=b.length-1,k=-1);for(;f=b[e];e+=k)d=f._meta,(f=(d?d.hidden:f.prototype)[a])&&f.apply(this,arguments)}}function p(a){t.prototype=a.prototype;a=new t;t.prototype=null;return a}function q(a){var b=a.callee,c=p(b);b.apply(c,a);return c}function s(c,t,q){"string"!=typeof c&&
  (q=t,t=c,c="");var q=q||{},i,j,I,D,z,F,H,M=1,K=t;if("[object Array]"==w.call(t)){M=c;I=[];D=[{cls:0,refs:[]}];F={};for(var O=1,T=t.length,J=0,G,U,P,R;J<T;++J){(G=t[J])?"[object Function]"!=w.call(G)&&g("mixin #"+J+" is not a callable constructor.",M):g("mixin #"+J+" is unknown. Did you use dojo.require to pull it in?",M);U=G._meta?G._meta.bases:[G];P=0;for(G=U.length-1;0<=G;--G){R=U[G].prototype;if(!R.hasOwnProperty("declaredClass"))R.declaredClass="uniqName_"+y++;R=R.declaredClass;F.hasOwnProperty(R)||
  (F[R]={count:0,refs:[],cls:U[G]},++O);R=F[R];P&&P!==R&&(R.refs.push(P),++P.count);P=R}++P.count;D[0].refs.push(P)}for(;D.length;){P=D.pop();I.push(P.cls);for(--O;j=P.refs,1==j.length;){P=j[0];if(!P||--P.count){P=0;break}I.push(P.cls);--O}if(P)for(J=0,T=j.length;J<T;++J)P=j[J],--P.count||D.push(P)}O&&g("can't build consistent linearization",M);G=t[0];I[0]=G?G._meta&&G===I[I.length-G._meta.bases.length]?G._meta.bases.length:1:0;F=I;I=F[0];M=F.length-I;t=F[M]}else F=[0],t?"[object Function]"==w.call(t)?
  (I=t._meta,F=F.concat(I?I.bases:t)):g("base class is not a callable constructor.",c):null!==t&&g("unknown base class. Did you use dojo.require to pull it in?",c);if(t)for(j=M-1;;--j){i=p(t);if(!j)break;I=F[j];(I._meta?f:u)(i,I.prototype);D=new Function;D.superclass=t;D.prototype=i;t=i.constructor=D}else i={};s.safeMixin(i,q);I=q.constructor;if(I!==v.constructor)I.nom=x,i.constructor=I;for(j=M-1;j;--j)(I=F[j]._meta)&&I.chains&&(H=u(H||{},I.chains));i["-chains-"]&&(H=u(H||{},i["-chains-"]));I=!H||!H.hasOwnProperty(x);
  F[0]=D=H&&"manual"===H.constructor?m(F):1==F.length?r(q.constructor,I):n(F,I);D._meta={bases:F,hidden:q,chains:H,parents:K,ctor:q.constructor};D.superclass=t&&t.prototype;D.extend=a;D.createSubclass=k;D.prototype=i;i.constructor=D;i.getInherited=d;i.isInstanceOf=b;i.inherited=B;i.__inherited=e;if(c)i.declaredClass=c,h.setObject(c,D);if(H)for(z in H)if(i[z]&&"string"==typeof H[z]&&z!=x)I=i[z]=l(z,F,"after"===H[z]),I.nom=z;return D}var u=h.mixin,v=Object.prototype,w=v.toString,t=new Function,y=0,x=
  "constructor",B=i.config.isDebug?c:e;i.safeMixin=s.safeMixin=function(a,b){var c,f;for(c in b)if(f=b[c],(f!==v[c]||!(c in v))&&c!=x){if("[object Function]"==w.call(f))f.nom=c;a[c]=f}if(j("bug-for-in-skips-shadowed"))for(var d=h._extraNames,e=d.length;e;)if(c=d[--e],f=b[c],(f!==v[c]||!(c in v))&&c!=x){if("[object Function]"==w.call(f))f.nom=c;a[c]=f}return a};return i.declare=s})},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(i,j,h,g){var e,d={},c={},b={config:j,
  global:this,dijit:d,dojox:c},d={dojo:["dojo",b],dijit:["dijit",d],dojox:["dojox",c]},g=h.map&&h.map[g.id.match(/[^\/]+/)[0]];for(e in g)d[e]?d[e][0]=g[e]:d[e]=[g[e],{}];for(e in d)g=d[e],g[1]._scopeName=g[0],j.noGlobals||(this[g[0]]=g[1]);b.scopeMap=d;b.baseUrl=b.config.baseUrl=h.baseUrl;b.isAsync=h.async;b.locale=j.locale;g="$Rev$".match(/\d+/);b.version={major:1,minor:8,patch:3,flag:"",revision:g?+g[0]:NaN,toString:function(){var a=b.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+
  ")"}};Function("d","d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(b);b.exit=function(){};"undefined"!=typeof console||(console={});for(var d="assert,count,debug,dir,dirxml,error,group,groupEnd,info,profile,profileEnd,time,timeEnd,trace,warn,log".split(","),f,g=0;f=d[g++];)console[f]||function(){var a=f+"";console[a]="log"in console?function(){var b=Array.apply({},arguments);b.unshift(a+":");console.log(b.join(" "))}:function(){};console[a]._fake=!0}();
  i.add("dojo-debug-messages",!!j.isDebug);b.deprecated=b.experimental=function(){};if(i("dojo-debug-messages"))b.deprecated=function(a,b,c){a="DEPRECATED: "+a;b&&(a+=" "+b);c&&(a+=" -- will be removed in version: "+c);console.warn(a)},b.experimental=function(a,b){var c="EXPERIMENTAL: "+a+" -- APIs subject to change without notice.";b&&(c+=" "+b);console.warn(c)};if(j.modulePaths){b.deprecated("dojo.modulePaths","use paths configuration");i={};for(e in j.modulePaths)i[e.replace(/\./g,"/")]=j.modulePaths[e];
  h({paths:i})}b.moduleUrl=function(a,c){b.deprecated("dojo.moduleUrl()","use require.toUrl","2.0");var f=null;a&&(f=h.toUrl(a.replace(/\./g,"/")+(c?"/"+c:"")+"/*.*").replace(/\/\*\.\*/,"")+(c?"":"/"));return f};b._hasResource={};return b})},"dojo/has":function(){define(["require","module"],function(i){var j=i.has||function(){};j.add("dom-addeventlistener",!!document.addEventListener);j.add("touch","ontouchstart"in document);j.add("device-width",screen.availWidth||innerWidth);i=document.createElement("form");
  j.add("dom-attributes-explicit",0==i.attributes.length);j.add("dom-attributes-specified-flag",0<i.attributes.length&&40>i.attributes.length);j.clearElement=function(h){h.innerHTML="";return h};j.normalize=function(h,g){var e=h.match(/[\?:]|[^:\?]*/g),d=0,c=function(b){var f=e[d++];if(":"==f)return 0;if("?"==e[d++]){if(!b&&j(f))return c();c(!0);return c(b)}return f||0};return(h=c())&&g(h)};j.load=function(h,g,e){h?g([h],e):e()};return j})},"dojo/_base/config":function(){define(["../has","require"],
  function(i,j){var h={},g=j.rawConfig,e;for(e in g)h[e]=g[e];return h})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(i,j){j.add("bug-for-in-skips-shadowed",function(){for(var a in{toString:1})return 0;return 1});var h=j("bug-for-in-skips-shadowed")?"hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split("."):[],g=h.length,e=function(a,b,c){var f,d=0,e=i.global;if(!c)if(a.length){f=a[d++];try{c=i.scopeMap[f]&&i.scopeMap[f][1]}catch(g){}c=
  c||(f in e?e[f]:b?e[f]={}:void 0)}else return e;for(;c&&(f=a[d++]);)c=f in c?c[f]:b?c[f]={}:void 0;return c},d=Object.prototype.toString,c=function(a,b,c){return(c||[]).concat(Array.prototype.slice.call(a,b||0))},b=/\{([^\}]+)\}/g,f={_extraNames:h,_mixin:function(a,b,c){var f,d,e,p={};for(f in b)if(d=b[f],!(f in a)||a[f]!==d&&(!(f in p)||p[f]!==d))a[f]=c?c(d):d;if(j("bug-for-in-skips-shadowed")&&b)for(e=0;e<g;++e)if(f=h[e],d=b[f],!(f in a)||a[f]!==d&&(!(f in p)||p[f]!==d))a[f]=c?c(d):d;return a},
  mixin:function(a,b){a||(a={});for(var c=1,d=arguments.length;c<d;c++)f._mixin(a,arguments[c]);return a},setObject:function(a,b,c){var f=a.split("."),a=f.pop();return(c=e(f,!0,c))&&a?c[a]=b:void 0},getObject:function(a,b,c){return e(a.split("."),b,c)},exists:function(a,b){return void 0!==f.getObject(a,!1,b)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(a){return a&&(a instanceof Array||"array"==typeof a)},isFunction:function(a){return"[object Function]"===d.call(a)},
  isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||f.isArray(a)||f.isFunction(a))},isArrayLike:function(a){return a&&void 0!==a&&!f.isString(a)&&!f.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(f.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!f.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(""+a)},extend:function(a,b){for(var c=1,d=arguments.length;c<d;c++)f._mixin(a.prototype,arguments[c]);return a},_hitchArgs:function(a,b){var c=f._toArray(arguments,
  2),d=f.isString(b);return function(){var e=f._toArray(arguments),l=d?(a||i.global)[b]:b;return l&&l.apply(a||this,c.concat(e))}},hitch:function(a,b){if(2<arguments.length)return f._hitchArgs.apply(i,arguments);b||(b=a,a=null);if(f.isString(b)){a=a||i.global;if(!a[b])throw['lang.hitch: scope["',b,'"] is null (scope="',a,'")'].join("");return function(){return a[b].apply(a,arguments||[])}}return!a?b:function(){return b.apply(a,arguments||[])}},delegate:function(){function a(){}return function(b,c){a.prototype=
  b;var d=new a;a.prototype=null;c&&f._mixin(d,c);return d}}(),_toArray:j("ie")?function(){function a(a,b,c){c=c||[];for(b=b||0;b<a.length;b++)c.push(a[b]);return c}return function(b){return(b.item?a:c).apply(this,arguments)}}():c,partial:function(a){return f.hitch.apply(i,[null].concat(f._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||f.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);
  var b,c,d;if(f.isArray(a)){b=[];for(c=0,d=a.length;c<d;++c)c in a&&b.push(f.clone(a[c]))}else b=a.constructor?new a.constructor:{};return f._mixin(b,a,f.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,c,d){return a.replace(d||b,f.isFunction(c)?c:function(a,b){return f.getObject(b,!1,c)})}};f.mixin(i,f);return f})},"dojo/sniff":function(){define(["./has"],function(i){var j=navigator,h=j.userAgent,j=j.appVersion,
  g=parseFloat(j);i.add("air",0<=h.indexOf("AdobeAIR"));i.add("khtml",0<=j.indexOf("Konqueror")?g:void 0);i.add("webkit",parseFloat(h.split("WebKit/")[1])||void 0);i.add("chrome",parseFloat(h.split("Chrome/")[1])||void 0);i.add("safari",0<=j.indexOf("Safari")&&!i("chrome")?parseFloat(j.split("Version/")[1]):void 0);i.add("mac",0<=j.indexOf("Macintosh"));i.add("quirks","BackCompat"==document.compatMode);i.add("ios",/iPhone|iPod|iPad/.test(h));i.add("android",parseFloat(h.split("Android ")[1])||void 0);
  if(!i("webkit")){0<=h.indexOf("Opera")&&i.add("opera",9.8<=g?parseFloat(h.split("Version/")[1])||g:g);0<=h.indexOf("Gecko")&&!i("khtml")&&!i("webkit")&&i.add("mozilla",g);i("mozilla")&&i.add("ff",parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0);if(document.all&&!i("opera"))h=parseFloat(j.split("MSIE ")[1])||void 0,(j=document.documentMode)&&5!=j&&Math.floor(h)!=j&&(h=j),i.add("ie",h);i.add("wii","undefined"!=typeof opera&&opera.wiiremote)}return i})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect",
  "./_base/kernel","./has"],function(i,j,h){function g(a,c,d,e,k){if(e=c.match(/(.*):(.*)/))return c=e[2],e=e[1],b.selector(e,c).call(k,a,d);h("touch")&&(f.test(c)&&(d=y(d)),!h("event-orientationchange")&&"orientationchange"==c&&(c="resize",a=window,d=y(d)));m&&(d=m(d));if(a.addEventListener){var l=c in n,t=l?n[c]:c;a.addEventListener(t,d,l);return{remove:function(){a.removeEventListener(t,d,l)}}}if(s&&a.attachEvent)return s(a,"on"+c,d);throw Error("Target must be an event emitter");}function e(){this.cancelable=
  !1}function d(){this.bubbles=!1}var c=window.ScriptEngineMajorVersion;h.add("jscript",c&&c()+ScriptEngineMinorVersion()/10);h.add("event-orientationchange",h("touch")&&!h("android"));h.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&!!window.Event.prototype.stopImmediatePropagation);var b=function(a,c,f,d){return"function"==typeof a.on&&"function"!=typeof c?a.on(c,f):b.parse(a,c,f,g,d,this)};b.pausable=function(a,c,f,d){var e,a=b(a,c,function(){if(!e)return f.apply(this,
  arguments)},d);a.pause=function(){e=!0};a.resume=function(){e=!1};return a};b.once=function(a,c,f){var d=b(a,c,function(){d.remove();return f.apply(this,arguments)});return d};b.parse=function(a,b,c,f,d,e){if(b.call)return b.call(e,a,c);if(-1<b.indexOf(",")){for(var b=b.split(/\s*,\s*/),k=[],n=0,l;l=b[n++];)k.push(f(a,l,c,d,e));k.remove=function(){for(var a=0;a<k.length;a++)k[a].remove()};return k}return f(a,b,c,d,e)};var f=/^touch/;b.selector=function(a,c,f){return function(d,e){function k(b){for(n=
  n&&n.matches?n:j.query;!n.matches(b,a,d);)if(b==d||!1===f||!(b=b.parentNode)||1!=b.nodeType)return;return b}var n="function"==typeof a?{matches:a}:this,l=c.bubble;return l?b(d,l(k),e):b(d,c,function(a){var b=k(a.target);return b&&e.call(b,a)})}};var a=[].slice,k=b.emit=function(b,c,f){var k=a.call(arguments,2),n="on"+c;if("parentNode"in b){var l=k[0]={},s;for(s in f)l[s]=f[s];l.preventDefault=e;l.stopPropagation=d;l.target=b;l.type=c;f=l}do b[n]&&b[n].apply(b,k);while(f&&f.bubbles&&(b=b.parentNode));
  return f&&f.cancelable&&f},n={};if(!h("event-stopimmediatepropagation"))var r=function(){this.modified=this.immediatelyStopped=!0},m=function(a){return function(b){if(!b.immediatelyStopped)return b.stopImmediatePropagation=r,a.apply(this,arguments)}};if(h("dom-addeventlistener"))n={focusin:"focus",focusout:"blur"},b.emit=function(a,c,f){if(a.dispatchEvent&&document.createEvent){var d=a.ownerDocument.createEvent("HTMLEvents");d.initEvent(c,!!f.bubbles,!!f.cancelable);for(var e in f)e in d||(d[e]=f[e]);
  return a.dispatchEvent(d)&&d}return k.apply(b,arguments)};else{b._fixEvent=function(a,b){if(!a)a=(b&&(b.ownerDocument||b.document||b).parentWindow||window).event;if(!a)return a;l&&a.type==l.type&&(a=l);if(!a.target){a.target=a.srcElement;a.currentTarget=b||a.srcElement;if("mouseover"==a.type)a.relatedTarget=a.fromElement;if("mouseout"==a.type)a.relatedTarget=a.toElement;if(!a.stopPropagation)a.stopPropagation=u,a.preventDefault=v;switch(a.type){case "keypress":var c="charCode"in a?a.charCode:a.keyCode;
  10==c?(c=0,a.keyCode=13):13==c||27==c?c=0:3==c&&(c=99);a.charCode=c;c=a;c.keyChar=c.charCode?String.fromCharCode(c.charCode):"";c.charOrCode=c.keyChar||c.keyCode}}return a};var l,p=function(a){this.handle=a};p.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};var q=function(a){return function(c){var c=b._fixEvent(c,this),f=a.call(this,c);c.modified&&(l||setTimeout(function(){l=null}),l=c);return f}},s=function(a,b,c){c=q(c);if(((a.ownerDocument?a.ownerDocument.parentWindow:a.parentWindow||
  a.window||window)!=top||5.8>h("jscript"))&&!h("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var f=a[b];if(!f||!f.listeners){var d=f,f=Function("event","var callee = arguments.callee; for(var i = 0; i<callee.listeners.length; i++){var listener = _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");f.listeners=[];a[b]=f;f.global=this;d&&f.listeners.push(_dojoIEListeners_.push(d)-1)}f.listeners.push(a=f.global._dojoIEListeners_.push(c)-
  1);return new p(a)}return i.after(a,b,c,!0)},u=function(){this.cancelBubble=!0},v=b._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0;this.returnValue=!1}}if(h("touch"))var w=function(){},t=window.orientation,y=function(a){return function(b){var c=b.corrected;if(!c){var f=b.type;try{delete b.type}catch(d){}b.type?(w.prototype=b,c=new w,c.preventDefault=function(){b.preventDefault()},c.stopPropagation=function(){b.stopPropagation()}):
  (c=b,c.type=f);b.corrected=c;if("resize"==f){if(t==window.orientation)return null;t=window.orientation;c.type="orientationchange";return a.call(this,c)}if(!("rotation"in c))c.rotation=0,c.scale=1;var f=c.changedTouches[0],e;for(e in f)delete c[e],c[e]=f[e]}return a.call(this,c)}};return b})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(i,j){return i.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:j("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,
  PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,
  NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:j("mac")&&!j("air")?j("safari")?91:224:17}})},"dojo/Deferred":function(){define("dojo/Deferred",["./has","./_base/lang","./errors/CancelError","./promise/Promise","./promise/instrumentation"],function(i,j,h,g,e){var d=Object.freeze||function(){},c=function(a,c,f,d,e){2===c&&k.instrumentRejected&&0===a.length&&k.instrumentRejected(f,!1,d,e);for(e=0;e<a.length;e++)b(a[e],c,f,d)},b=function(b,c,d,e){var g=b[c],
  h=b.deferred;if(g)try{var s=g(d);if(0===c)"undefined"!==typeof s&&a(h,c,s);else{if(s&&"function"===typeof s.then){b.cancel=s.cancel;s.then(f(h,1),f(h,2),f(h,0));return}a(h,1,s)}}catch(u){a(h,2,u)}else a(h,c,d);2===c&&k.instrumentRejected&&k.instrumentRejected(d,!!g,e,h.promise)},f=function(b,c){return function(f){a(b,c,f)}},a=function(a,b,c){if(!a.isCanceled())switch(b){case 0:a.progress(c);break;case 1:a.resolve(c);break;case 2:a.reject(c)}},k=function(a){var f=this.promise=new g,e=this,l,p,q,s=
  !1,u=[];Error.captureStackTrace&&(Error.captureStackTrace(e,k),Error.captureStackTrace(f,k));this.isResolved=f.isResolved=function(){return 1===l};this.isRejected=f.isRejected=function(){return 2===l};this.isFulfilled=f.isFulfilled=function(){return!!l};this.isCanceled=f.isCanceled=function(){return s};this.progress=function(a,b){if(l){if(!0===b)throw Error("This deferred has already been fulfilled.");return f}c(u,0,a,null,e);return f};this.resolve=function(a,b){if(l){if(!0===b)throw Error("This deferred has already been fulfilled.");
  return f}c(u,l=1,p=a,null,e);u=null;return f};var i=this.reject=function(a,b){if(l){if(!0===b)throw Error("This deferred has already been fulfilled.");return f}Error.captureStackTrace&&Error.captureStackTrace(q={},i);c(u,l=2,p=a,q,e);u=null;return f};this.then=f.then=function(a,c,d){var e=[d,a,c];e.cancel=f.cancel;e.deferred=new k(function(a){return e.cancel&&e.cancel(a)});l&&!u?b(e,l,p,q):u.push(e);return e.deferred.promise};this.cancel=f.cancel=function(b,c){if(l){if(!0===c)throw Error("This deferred has already been fulfilled.");
  }else{if(a)var f=a(b),b="undefined"===typeof f?b:f;s=!0;if(l){if(2===l&&p===b)return b}else return"undefined"===typeof b&&(b=new h),i(b),b}};d(f)};k.prototype.toString=function(){return"[object Deferred]"};e&&e(k);return k})},"dojo/errors/CancelError":function(){define(["./create"],function(i){return i("CancelError",null,null,{dojoType:"cancel"})})},"dojo/errors/create":function(){define(["../_base/lang"],function(i){return function(j,h,g,e){var g=g||Error,d=function(c){if(g===Error){Error.captureStackTrace&&
  Error.captureStackTrace(this,d);var b=Error.call(this,c),f;for(f in b)b.hasOwnProperty(f)&&(this[f]=b[f]);this.message=c;this.stack=b.stack}else g.apply(this,arguments);h&&h.apply(this,arguments)};d.prototype=i.delegate(g.prototype,e);d.prototype.name=j;return d.prototype.constructor=d}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(i){function j(){throw new TypeError("abstract");}return i.extend(function(){},{then:function(){j()},cancel:function(){j()},isResolved:function(){j()},
  isRejected:function(){j()},isFulfilled:function(){j()},isCanceled:function(){j()},always:function(h){return this.then(h,h)},otherwise:function(h){return this.then(null,h)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/promise/instrumentation":function(){define(["./tracer","../has","../_base/lang","../_base/array"],function(i,j,h,g){function e(a,b,c){var f="";a&&a.stack&&(f+=a.stack);b&&b.stack&&(f+="\n    ----------------------------------------\n    rejected"+
  b.stack.split("\n").slice(1).join("\n").replace(/^\s+/," "));c&&c.stack&&(f+="\n    ----------------------------------------\n"+c.stack);console.error(a,f)}function d(a,b,c,f){b||e(a,c,f)}function c(c,d,e,l){d?g.some(f,function(a,b){if(a.error===c)return f.splice(b,1),!0}):g.some(f,function(a){return a.error===c})||f.push({error:c,rejection:e,deferred:l,timestamp:(new Date).getTime()});a||(a=setTimeout(b,k))}function b(){var c=(new Date).getTime(),d=c-k;f=g.filter(f,function(a){return a.timestamp<
  d?(e(a.error,a.rejection,a.deferred),!1):!0});a=f.length?setTimeout(b,f[0].timestamp+k-c):!1}var f=[],a=!1,k=1E3;return function(a){var b=j("config-useDeferredInstrumentation");if(b){i.on("resolved",h.hitch(console,"log","resolved"));i.on("rejected",h.hitch(console,"log","rejected"));i.on("progress",h.hitch(console,"log","progress"));var f=[];"string"===typeof b&&(f=b.split(","),b=f.shift());if("report-rejections"===b)a.instrumentRejected=d;else if("report-unhandled-rejections"===b||!0===b||1===b)a.instrumentRejected=
  c,k=parseInt(f[0],10)||k;else throw Error("Unsupported instrumentation usage <"+b+">");}}})},"dojo/promise/tracer":function(){define(["../_base/lang","./Promise","../Evented"],function(i,j,h){function g(c){setTimeout(function(){d.apply(e,c)},0)}var e=new h,d=e.emit;e.emit=null;j.prototype.trace=function(){var c=i._toArray(arguments);this.then(function(b){g(["resolved",b].concat(c))},function(b){g(["rejected",b].concat(c))},function(b){g(["progress",b].concat(c))});return this};j.prototype.traceRejected=
  function(){var c=i._toArray(arguments);this.otherwise(function(b){g(["rejected",b].concat(c))});return this};return e})},"dojo/Evented":function(){define("dojo/Evented",["./aspect","./on"],function(i,j){function h(){}var g=i.after;h.prototype={on:function(e,d){return j.parse(this,e,d,function(c,b){return g(c,"on"+b,d,!0)})},emit:function(e,d){var c=[this];c.push.apply(c,arguments);return j.emit.apply(j,c)}};return h})},"dojo/aspect":function(){define("dojo/aspect",[],function(){function i(b,c,a,d){var e=
  b[c],h="around"==c,m;if(h){var l=a(function(){return e.advice(this,arguments)});m={remove:function(){m.cancelled=!0},advice:function(a,b){return m.cancelled?e.advice(a,b):l.apply(a,b)}}}else m={remove:function(){var a=m.previous,d=m.next;if(!d&&!a)delete b[c];else if(a?a.next=d:b[c]=d,d)d.previous=a},id:g++,advice:a,receiveArguments:d};if(e&&!h)if("after"==c){for(;e.next&&(e=e.next););e.next=m;m.previous=e}else{if("before"==c)b[c]=m,m.next=e,e.previous=m}else b[c]=m;return m}function j(b){return function(c,
  a,d,e){var r=c[a],m;if(!r||r.target!=c){c[a]=m=function(){for(var a=g,b=arguments,c=m.before;c;)b=c.advice.apply(this,b)||b,c=c.next;if(m.around)var f=m.around.advice(this,b);for(c=m.after;c&&c.id<a;){if(c.receiveArguments)var d=c.advice.apply(this,b),f=d===h?f:d;else f=c.advice.call(this,f,b);c=c.next}return f};if(r)m.around={advice:function(a,b){return r.apply(a,b)}};m.target=c}c=i(m||r,b,d,e);d=null;return c}}var h,g=0,e=j("after"),d=j("before"),c=j("around");return{before:d,around:c,after:e}})},
  "dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(i,j,h){function g(a){return c[a]=new Function("item","index","array",a)}function e(a){var b=!a;return function(f,d,e){var l=0,h=f&&f.length||0,q;h&&"string"==typeof f&&(f=f.split(""));"string"==typeof d&&(d=c[d]||g(d));if(e)for(;l<h;++l){if(q=!d.call(e,f[l],l,f),a^q)return!q}else for(;l<h;++l)if(q=!d(f[l],l,f),a^q)return!q;return b}}function d(a){var c=1,d=0,e=0;a||(c=d=e=-1);return function(m,l,g,h){if(h&&0<c)return f.lastIndexOf(m,
  l,g);var h=m&&m.length||0,s=a?h+e:d;g===b?g=a?d:h+e:0>g?(g=h+g,0>g&&(g=d)):g=g>=h?h+e:g;for(h&&"string"==typeof m&&(m=m.split(""));g!=s;g+=c)if(m[g]==l)return g;return-1}}var c={},b,f={every:e(!1),some:e(!0),indexOf:d(!0),lastIndexOf:d(!1),forEach:function(a,b,f){var d=0,e=a&&a.length||0;e&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=c[b]||g(b));if(f)for(;d<e;++d)b.call(f,a[d],d,a);else for(;d<e;++d)b(a[d],d,a)},map:function(a,b,f,d){var e=0,l=a&&a.length||0,d=new (d||Array)(l);l&&
  "string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=c[b]||g(b));if(f)for(;e<l;++e)d[e]=b.call(f,a[e],e,a);else for(;e<l;++e)d[e]=b(a[e],e,a);return d},filter:function(a,b,f){var d=0,e=a&&a.length||0,l=[],h;e&&"string"==typeof a&&(a=a.split(""));"string"==typeof b&&(b=c[b]||g(b));if(f)for(;d<e;++d)h=a[d],b.call(f,h,d,a)&&l.push(h);else for(;d<e;++d)h=a[d],b(h,d,a)&&l.push(h);return l},clearCache:function(){c={}}};h.mixin(i,f);return f})},"dojo/DeferredList":function(){define("dojo/DeferredList",
  ["./_base/kernel","./_base/Deferred","./_base/array"],function(i,j,h){i.DeferredList=function(g,e,d,c){var b=[];j.call(this);var f=this;0===g.length&&!e&&this.resolve([0,[]]);var a=0;h.forEach(g,function(k,n){function h(c,d){b[n]=[c,d];a++;a===g.length&&f.resolve(b)}k.then(function(a){e?f.resolve([n,a]):h(!0,a)},function(a){d?f.reject(a):h(!1,a);if(c)return null;throw a;})})};i.DeferredList.prototype=new j;i.DeferredList.prototype.gatherResults=function(g){g=new i.DeferredList(g,!1,!0,!1);g.addCallback(function(e){var d=
  [];h.forEach(e,function(c){d.push(c[1])});return d});return g};return i.DeferredList})},"dojo/_base/Deferred":function(){define("./kernel,../Deferred,../promise/Promise,../errors/CancelError,../has,./lang,../when".split(","),function(i,j,h,g,e,d,c){var b=function(){},f=Object.freeze||function(){},a=i.Deferred=function(c){function n(a){if(l)throw Error("This deferred has already been resolved");m=a;l=!0;r()}function r(){for(var a;!a&&s;){var c=s;s=s.next;if(a=c.progress==b)l=!1;var f=p?c.error:c.resolved;
  e("config-useDeferredInstrumentation")&&p&&j.instrumentRejected&&j.instrumentRejected(m,!!f);if(f)try{var k=f(m);k&&"function"===typeof k.then?k.then(d.hitch(c.deferred,"resolve"),d.hitch(c.deferred,"reject"),d.hitch(c.deferred,"progress")):(f=a&&void 0===k,a&&!f&&(p=k instanceof Error),c.deferred[f&&p?"reject":"resolve"](f?m:k))}catch(n){c.deferred.reject(n)}else p?c.deferred.reject(m):c.deferred.resolve(m)}}var m,l,p,q,s,u=this.promise=new h;this.resolve=this.callback=function(a){this.fired=0;this.results=
  [a,null];n(a)};this.reject=this.errback=function(a){p=!0;this.fired=1;e("config-useDeferredInstrumentation")&&j.instrumentRejected&&j.instrumentRejected(a,!!s);n(a);this.results=[null,a]};this.progress=function(a){for(var b=s;b;){var c=b.progress;c&&c(a);b=b.next}};this.addCallbacks=function(a,c){this.then(a,c,b);return this};u.then=this.then=function(c,f,d){var e=d==b?this:new a(u.cancel),c={resolved:c,error:f,progress:d,deferred:e};s?q=q.next=c:s=q=c;l&&r();return e.promise};var i=this;u.cancel=
  this.cancel=function(){if(!l){var a=c&&c(i);if(!l)a instanceof Error||(a=new g(a)),a.log=!1,i.reject(a)}};f(u)};d.extend(a,{addCallback:function(a){return this.addCallbacks(d.hitch.apply(i,arguments))},addErrback:function(a){return this.addCallbacks(null,d.hitch.apply(i,arguments))},addBoth:function(a){var b=d.hitch.apply(i,arguments);return this.addCallbacks(b,b)},fired:-1});a.when=i.when=c;return a})},"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(i,j){return function(h,
  g,e,d){var c=h&&"function"===typeof h.then,b=c&&h instanceof j;if(c){if(!b)c=new i(h.cancel),h.then(c.resolve,c.reject,c.progress),h=c.promise}else return g?g(h):(new i).resolve(h);return g||e||d?h.then(g,e,d):h}})},"dojo/topic":function(){define(["./Evented"],function(i){var j=new i;return{publish:function(h,g){return j.emit.apply(j,arguments)},subscribe:function(h,g){return j.on.apply(j,arguments)}}})},"dojo/request":function(){define(["./request/default!"],function(i){return i})},"dojo/request/default":function(){define(["exports",
  "require","../has"],function(i,j,h){var g=h("config-requestProvider");g||(g="./xhr");i.getPlatformDefaultId=function(){return"./xhr"};i.load=function(e,d,c){j(["platform"==e?"./xhr":g],function(b){c(b)})}})},"JBrowse/has":function(){define(["dojo/has","dojo/sniff"],function(i){i.add("typed-arrays",function(){try{return!!new Uint8Array(1)}catch(i){}return!1});i.add("canvas",function(){try{return!!document.createElement("canvas").getContext("2d")}catch(i){}return!1});i.add("inaccurate-html-layout",
  function(){return i("safari")||9>i("ie")},!0);i.add("save-generated-files",function(){var j=!1;try{j=Blob&&!(10>i("ie"))&&!i("safari")}catch(h){}return j},!0);i.add("inaccurate-html-width",function(){return i("safari")||i("chrome")},!0);return i})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel,dojo/_base/lang,../_Widget,../_Container,./_ContentPaneResizeMixin,dojo/string,dojo/html,dojo/i18n!../nls/loading,dojo/_base/array,dojo/_base/declare,dojo/_base/Deferred,dojo/dom,dojo/dom-attr,dojo/dom-construct,dojo/_base/xhr,dojo/i18n,dojo/when".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){return a("dijit.layout.ContentPane",[h,g,e],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:i._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"<span class='dijitContentPaneLoading'><span class='dijitInline dijitIconLoading'></span>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'><span class='dijitInline dijitIconError'></span>${errorState}</span>",isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},
  onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,create:function(a,b){if((!a||!a.template)&&b&&!("href"in a)&&!("content"in a)){for(var b=n.byId(b),c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);a=j.delegate(a,{content:c})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=p.getLocalization("dijit","loading",this.lang);this.loadingMessage=d.substitute(this.loadingMessage,a);this.errorMessage=d.substitute(this.errorMessage,
  a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";r.get(this.domNode,"role")||this.domNode.setAttribute("role","group")},startup:function(){this.inherited(arguments);this._contentSetter&&f.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&j.isFunction(a.startup))a.startup(),a._started=!0},this)},_startChildren:function(){f.forEach(this.getChildren(),function(a){if(!a._started&&!a._destroyed&&
  j.isFunction(a.startup))a.startup(),a._started=!0});this._contentSetter&&f.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&j.isFunction(a.startup))a.startup(),a._started=!0},this)},setHref:function(a){i.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new k(j.hitch(this,"cancel"));this.onLoadDeferred.then(j.hitch(this,"onLoad"));
  this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){i.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new k(j.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(j.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=
  !1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},
  refresh:function(){this.cancel();this.onLoadDeferred=new k(j.hitch(this,"cancel"));this.onLoadDeferred.then(j.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};j.isObject(this.ioArgs)&&j.mixin(b,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||l.get)(b),f;c.then(function(b){f=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(c){a._onError("Content",
  c)}},function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return f});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(b){console.error("Error "+this.widgetId+" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+
  a.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;f.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(f.forEach(b.parseResults,function(b){if(!b._destroyed)b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0}),delete b.parseResults);a||m.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){this.destroyDescendants();
  var f=this._contentSetter;if(!(f&&f instanceof c._ContentSetter))f=this._contentSetter=new c._ContentSetter({node:this.containerNode,_onError:j.hitch(this,this._onError),onContentError:j.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(b){console.error("Fatal "+this.id+" could not change content due to "+b.message,b)}})});var d=j.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad,parserScope:this.parserScope,
  startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),d=f.set(j.isObject(a)&&a.domNode?a.domNode:a,d),e=this;return q(d&&d.then?d:f.parseDeferred,function(){delete e._contentSetterParams;b||(e._started&&(e._startChildren(),e._scheduleLayout()),e._onLoadHandler(a))})},_onError:function(a,b,c){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},
  onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Widget":function(){define("dojo/aspect,dojo/_base/config,dojo/_base/connect,dojo/_base/declare,dojo/has,dojo/_base/kernel,dojo/_base/lang,dojo/query,dojo/ready,./registry,./_WidgetBase,./_OnDijitClickMixin,./_FocusMixin,dojo/uacss,./hccss".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r){function m(){}function l(a){return function(b,f,d,e){return b&&"string"==typeof f&&b[f]==m?b.on(f.substring(2).toLowerCase(),
  c.hitch(d,e)):a.apply(h,arguments)}}i.around(h,"connect",l);d.connect&&i.around(d,"connect",l);i=g("dijit._Widget",[k,n,r],{onClick:m,onDblClick:m,onKeyDown:m,onKeyPress:m,onKeyUp:m,onMouseDown:m,onMouseMove:m,onMouseOut:m,onMouseOver:m,onMouseLeave:m,onMouseEnter:m,onMouseUp:m,constructor:function(a){this._toConnect={};for(var b in a)this[b]===m&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,
  this._toConnect[a]);delete this._toConnect},on:function(a,b){return this[this._onMap(a)]===m?h.connect(this.domNode,a.toLowerCase(),this,b):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){d.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,b)},attr:function(a,b){if(j.isDebug){var c=arguments.callee._ach||(arguments.callee._ach={}),f=(arguments.callee.caller||"unknown caller").toString();
  c[f]||(d.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+f,"","2.0"),c[f]=!0)}return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){d.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?b("[widgetId]",this.containerNode).map(a.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},
  onClose:function(){return!0}});e("dijit-legacy-requires")&&f(0,function(){require(["dijit/_base"])});return i})},"dojo/_base/connect":function(){define("./kernel,../on,../topic,../aspect,./event,../mouse,./sniff,./lang,../keys".split(","),function(i,j,h,g,e,d,c,b){function f(a,c,f,e,k){e=b.hitch(f,e);if(!a||!a.addEventListener&&!a.attachEvent)return g.after(a||i.global,c,e,!0);"string"==typeof c&&"on"==c.substring(0,2)&&(c=c.substring(2));if(!a)a=i.global;if(!k)switch(c){case "keypress":c=m;break;
  case "mouseenter":c=d.enter;break;case "mouseleave":c=d.leave}return j(a,c,e,k)}function a(a){a.keyChar=a.charCode?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode}c.add("events-keypress-typed",function(){var a={charCode:0};try{a=document.createEvent("KeyboardEvent"),(a.initKeyboardEvent||a.initKeyEvent).call(a,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(b){}return 0==a.charCode&&!c("opera")});var k={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,
  221:93,222:39,229:113},n=c("mac")?"metaKey":"ctrlKey",r=function(c,f){var d=b.mixin({},c,f);a(d);d.preventDefault=function(){c.preventDefault()};d.stopPropagation=function(){c.stopPropagation()};return d},m;m=c("events-keypress-typed")?function(a,b){var f=j(a,"keydown",function(a){var f=a.keyCode,d=13!=f&&32!=f&&(27!=f||!c("ie"))&&(48>f||90<f)&&(96>f||111<f)&&(186>f||192<f)&&(219>f||222<f)&&229!=f;if(d||a.ctrlKey){d=d?0:f;if(a.ctrlKey){if(3==f||13==f)return b.call(a.currentTarget,a);d=95<d&&106>d?
  d-48:!a.shiftKey&&65<=d&&90>=d?d+32:k[d]||d}f=r(a,{type:"keypress",faux:!0,charCode:d});b.call(a.currentTarget,f);if(c("ie"))try{a.keyCode=f.keyCode}catch(e){}}}),d=j(a,"keypress",function(a){var c=a.charCode,a=r(a,{charCode:32<=c?c:0,faux:!0});return b.call(this,a)});return{remove:function(){f.remove();d.remove()}}}:c("opera")?function(a,b){return j(a,"keypress",function(a){var c=a.which;3==c&&(c=99);c=32>c&&!a.shiftKey?0:c;a.ctrlKey&&!a.shiftKey&&65<=c&&90>=c&&(c+=32);return b.call(this,r(a,{charCode:c}))})}:
  function(b,c){return j(b,"keypress",function(b){a(b);return c.call(this,b)})};var l={_keypress:m,connect:function(a,b,c,d,e){var k=arguments,n=[],l=0;n.push("string"==typeof k[0]?null:k[l++],k[l++]);var m=k[l+1];n.push("string"==typeof m||"function"==typeof m?k[l++]:null,k[l++]);for(m=k.length;l<m;l++)n.push(k[l]);return f.apply(this,n)},disconnect:function(a){a&&a.remove()},subscribe:function(a,c,f){return h.subscribe(a,b.hitch(c,f))},publish:function(a,b){return h.publish.apply(h,[a].concat(b))},
  connectPublisher:function(a,b,c){var f=function(){l.publish(a,arguments)};return c?l.connect(b,c,f):l.connect(b,f)},isCopyKey:function(a){return a[n]}};l.unsubscribe=l.disconnect;b.mixin(i,l);return l})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(i,j,h,g){if(j._fixEvent){var e=j._fixEvent;j._fixEvent=function(c,b){(c=e(c,b))&&g.normalizeEvent(c);return c}}var d={fix:function(c,b){return j._fixEvent?j._fixEvent(c,b):c},stop:function(c){h("dom-addeventlistener")||
  c&&c.preventDefault?(c.preventDefault(),c.stopPropagation()):(c=c||window.event,c.cancelBubble=!0,j._preventDefault.call(c))}};i.fixEvent=d.fix;i.stopEvent=d.stop;return d})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(i,j,h,g){function e(a,b,c,f,d,e){e=e||"px";a=a.style;if(!isNaN(b))a.left=b+e;if(!isNaN(c))a.top=c+e;if(0<=f)a.width=f+e;if(0<=d)a.height=d+e}function d(a){return"button"==a.tagName.toLowerCase()||"input"==a.tagName.toLowerCase()&&
  "button"==(a.getAttribute("type")||"").toLowerCase()}function c(a){return"border-box"==b.boxModel||"table"==a.tagName.toLowerCase()||d(a)}var b={boxModel:"content-box"};if(i("ie"))b.boxModel="BackCompat"==document.compatMode?"border-box":"content-box";b.getPadExtents=function(a,b){var a=h.byId(a),c=b||g.getComputedStyle(a),f=g.toPixelValue,d=f(a,c.paddingLeft),e=f(a,c.paddingTop),p=f(a,c.paddingRight),c=f(a,c.paddingBottom);return{l:d,t:e,r:p,b:c,w:d+p,h:e+c}};b.getBorderExtents=function(a,b){var a=
  h.byId(a),c=g.toPixelValue,f=b||g.getComputedStyle(a),d="none"!=f.borderLeftStyle?c(a,f.borderLeftWidth):0,e="none"!=f.borderTopStyle?c(a,f.borderTopWidth):0,p="none"!=f.borderRightStyle?c(a,f.borderRightWidth):0,c="none"!=f.borderBottomStyle?c(a,f.borderBottomWidth):0;return{l:d,t:e,r:p,b:c,w:d+p,h:e+c}};b.getPadBorderExtents=function(a,c){var a=h.byId(a),f=c||g.getComputedStyle(a),d=b.getPadExtents(a,f),f=b.getBorderExtents(a,f);return{l:d.l+f.l,t:d.t+f.t,r:d.r+f.r,b:d.b+f.b,w:d.w+f.w,h:d.h+f.h}};
  b.getMarginExtents=function(a,b){var a=h.byId(a),c=b||g.getComputedStyle(a),f=g.toPixelValue,d=f(a,c.marginLeft),e=f(a,c.marginTop),p=f(a,c.marginRight),c=f(a,c.marginBottom);return{l:d,t:e,r:p,b:c,w:d+p,h:e+c}};b.getMarginBox=function(a,c){var a=h.byId(a),f=c||g.getComputedStyle(a),d=b.getMarginExtents(a,f),e=a.offsetLeft-d.l,l=a.offsetTop-d.t,p=a.parentNode,q=g.toPixelValue;if(i("mozilla")){var s=parseFloat(f.left),f=parseFloat(f.top);!isNaN(s)&&!isNaN(f)?(e=s,l=f):p&&p.style&&(p=g.getComputedStyle(p),
  "visible"!=p.overflow&&(e+="none"!=p.borderLeftStyle?q(a,p.borderLeftWidth):0,l+="none"!=p.borderTopStyle?q(a,p.borderTopWidth):0))}else if((i("opera")||8==i("ie")&&!i("quirks"))&&p)p=g.getComputedStyle(p),e-="none"!=p.borderLeftStyle?q(a,p.borderLeftWidth):0,l-="none"!=p.borderTopStyle?q(a,p.borderTopWidth):0;return{l:e,t:l,w:a.offsetWidth+d.w,h:a.offsetHeight+d.h}};b.getContentBox=function(a,c){var a=h.byId(a),f=c||g.getComputedStyle(a),d=a.clientWidth,e=b.getPadExtents(a,f),l=b.getBorderExtents(a,
  f);d?(f=a.clientHeight,l.w=l.h=0):(d=a.offsetWidth,f=a.offsetHeight);i("opera")&&(e.l+=l.l,e.t+=l.t);return{l:e.l,t:e.t,w:d-e.w-l.w,h:f-e.h-l.h}};b.setContentSize=function(a,f,d){var a=h.byId(a),g=f.w,f=f.h;c(a)&&(d=b.getPadBorderExtents(a,d),0<=g&&(g+=d.w),0<=f&&(f+=d.h));e(a,NaN,NaN,g,f)};var f={l:0,t:0,w:0,h:0};b.setMarginBox=function(a,k,n){var a=h.byId(a),r=n||g.getComputedStyle(a),n=k.w,m=k.h,l=c(a)?f:b.getPadBorderExtents(a,r),r=b.getMarginExtents(a,r);if(i("webkit")&&d(a)){var p=a.style;if(0<=
  n&&!p.width)p.width="4px";if(0<=m&&!p.height)p.height="4px"}0<=n&&(n=Math.max(n-l.w-r.w,0));0<=m&&(m=Math.max(m-l.h-r.h,0));e(a,k.l,k.t,n,m)};b.isBodyLtr=function(a){a=a||j.doc;return"ltr"==(j.body(a).dir||a.documentElement.dir||"ltr").toLowerCase()};b.docScroll=function(a){var a=a||j.doc,c=j.doc.parentWindow||j.doc.defaultView;return"pageXOffset"in c?{x:c.pageXOffset,y:c.pageYOffset}:(c=i("quirks")?j.body(a):a.documentElement)&&{x:b.fixIeBiDiScrollLeft(c.scrollLeft||0,a),y:c.scrollTop||0}};if(i("ie"))b.getIeDocumentElementOffset=
  function(a){a=a||j.doc;a=a.documentElement;if(8>i("ie")){var b=a.getBoundingClientRect(),c=b.left,b=b.top;7>i("ie")&&(c+=a.clientLeft,b+=a.clientTop);return{x:0>c?0:c,y:0>b?0:b}}return{x:0,y:0}};b.fixIeBiDiScrollLeft=function(a,c){var c=c||j.doc,f=i("ie");if(f&&!b.isBodyLtr(c)){var d=i("quirks"),e=d?j.body(c):c.documentElement,l=j.global;6==f&&!d&&l.frameElement&&e.scrollHeight>e.clientHeight&&(a+=e.clientLeft);return 8>f||d?a+e.clientWidth-e.scrollWidth:-a}return a};b.position=function(a,c){var a=
  h.byId(a),f=j.body(a.ownerDocument),d=a.getBoundingClientRect(),d={x:d.left,y:d.top,w:d.right-d.left,h:d.bottom-d.top};if(9>i("ie")){var e=b.getIeDocumentElementOffset(a.ownerDocument);d.x-=e.x+(i("quirks")?f.clientLeft+f.offsetLeft:0);d.y-=e.y+(i("quirks")?f.clientTop+f.offsetTop:0)}c&&(f=b.docScroll(a.ownerDocument),d.x+=f.x,d.y+=f.y);return d};b.getMarginSize=function(a,c){var a=h.byId(a),f=b.getMarginExtents(a,c||g.getComputedStyle(a)),d=a.getBoundingClientRect();return{w:d.right-d.left+f.w,h:d.bottom-
  d.top+f.h}};b.normalizeEvent=function(a){if(!("layerX"in a))a.layerX=a.offsetX,a.layerY=a.offsetY;if(!i("dom-addeventlistener")){var c=a.target,c=c&&c.ownerDocument||document,f=i("quirks")?c.body:c.documentElement,d=b.getIeDocumentElementOffset(c);a.pageX=a.clientX+b.fixIeBiDiScrollLeft(f.scrollLeft||0,c)-d.x;a.pageY=a.clientY+(f.scrollTop||0)-d.y}};return b})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(i,j,h){var g={global:i.global,doc:this.document||null,body:function(e){e=
  e||i.doc;return e.body||e.getElementsByTagName("body")[0]},setContext:function(e,d){i.global=g.global=e;i.doc=g.doc=d},withGlobal:function(e,d,c,b){var f=i.global;try{return i.global=g.global=e,g.withDoc.call(null,e.document,d,c,b)}finally{i.global=g.global=f}},withDoc:function(e,d,c,b){var f=g.doc,a=h("quirks"),k=h("ie"),n,r,m;try{i.doc=g.doc=e;i.isQuirks=h.add("quirks","BackCompat"==i.doc.compatMode,!0,!0);if(h("ie")&&(m=e.parentWindow)&&m.navigator)n=parseFloat(m.navigator.appVersion.split("MSIE ")[1])||
  void 0,(r=e.documentMode)&&5!=r&&Math.floor(n)!=r&&(n=r),i.isIE=h.add("ie",n,!0,!0);c&&"string"==typeof d&&(d=c[d]);return d.apply(c,b||[])}finally{i.doc=g.doc=f,i.isQuirks=h.add("quirks",a,!0,!0),i.isIE=h.add("ie",k,!0,!0)}}};j.mixin(i,g);return g})},"dojo/dom":function(){define(["./sniff","./_base/window"],function(i,j){if(7>=i("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(h){}var g={};g.byId=i("ie")?function(d,c){if("string"!=typeof d)return d;var b=c||j.doc,f=d&&b.getElementById(d);
  if(f&&(f.attributes.id.value==d||f.id==d))return f;b=b.all[d];if(!b||b.nodeName)b=[b];for(var a=0;f=b[a++];)if(f.attributes&&f.attributes.id&&f.attributes.id.value==d||f.id==d)return f}:function(d,c){return("string"==typeof d?(c||j.doc).getElementById(d):d)||null};g.isDescendant=function(d,c){try{d=g.byId(d);for(c=g.byId(c);d;){if(d==c)return!0;d=d.parentNode}}catch(b){}return!1};i.add("css-user-select",function(d,c,b){if(!b)return!1;var d=b.style,c=["Khtml","O","ms","Moz","Webkit"],b=c.length,f=
  "userSelect";do if("undefined"!==typeof d[f])return f;while(b--&&(f=c[b]+"UserSelect"));return!1});var e=i("css-user-select");g.setSelectable=e?function(d,c){g.byId(d).style[e]=c?"":"none"}:function(d,c){var d=g.byId(d),b=d.getElementsByTagName("*"),f=b.length;if(c)for(d.removeAttribute("unselectable");f--;)b[f].removeAttribute("unselectable");else for(d.setAttribute("unselectable","on");f--;)b[f].setAttribute("unselectable","on")};return g})},"dojo/dom-style":function(){define(["./sniff","./dom"],
  function(i,j){function h(b,c,f){c=c.toLowerCase();if(i("ie")){if("auto"==f){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(f){case 700:return"bold";default:return"normal"}}c in a||(a[c]=k.test(c));return a[c]?d(b,f):f}var g,e={};g=i("webkit")?function(a){var b;if(1==a.nodeType){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null);if(!b&&a.style)a.style.display="",b=c.getComputedStyle(a,null)}return b||{}}:i("ie")&&(9>i("ie")||i("quirks"))?
  function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){return 1==a.nodeType?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};e.getComputedStyle=g;var d;d=i("ie")?function(a,b){if(!b)return 0;if("medium"==b)return 4;if(b.slice&&"px"==b.slice(-2))return parseFloat(b);var c=a.style,f=a.runtimeStyle,d=c.left,e=f.left;f.left=a.currentStyle.left;try{c.left=b,b=c.pixelLeft}catch(k){b=0}c.left=d;f.left=e;return b}:function(a,b){return parseFloat(b)||0};e.toPixelValue=d;var c=
  function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return b?{}:null}},b=9>i("ie")||10>i("ie")&&i("quirks")?function(a){try{return c(a).Opacity/100}catch(b){return 1}}:function(a){return g(a).opacity},f=9>i("ie")||10>i("ie")&&i("quirks")?function(a,b){var d=100*b,e=1==b;a.style.zoom=e?"":1;if(c(a))c(a,1).Opacity=d;else{if(e)return b;a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+d+")"}c(a,1).Enabled=!e;if("tr"==a.tagName.toLowerCase())for(d=a.firstChild;d;d=
  d.nextSibling)"td"==d.tagName.toLowerCase()&&f(d,b);return b}:function(a,b){return a.style.opacity=b},a={left:!0,top:!0},k=/margin|padding|width|height|max|min|offset/,n=i("ie")?"styleFloat":"cssFloat",r={cssFloat:n,styleFloat:n,"float":n};e.get=function(a,c){var f=j.byId(a),d=arguments.length;if(2==d&&"opacity"==c)return b(f);var c=r[c]||c,k=e.getComputedStyle(f);return 1==d?k:h(f,c,k[c]||f.style[c])};e.set=function(a,b,c){var d=j.byId(a),k=arguments.length,n="opacity"==b,b=r[b]||b;if(3==k)return n?
  f(d,c):d.style[b]=c;for(var g in b)e.set(a,g,b[g]);return e.getComputedStyle(d)};return e})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(i,j,h,g,e){function d(c,b){var f=function(a,f){return j(a,c,function(c){if(b)return b(c,f);if(!g.isDescendant(c.relatedTarget,a))return f.call(this,c)})};f.bubble=function(a){return d(c,function(b,c){var f=a(b.target),d=b.relatedTarget;if(f&&f!=(d&&1==d.nodeType&&a(d)))return c.call(f,b)})};return f}h.add("dom-quirks",
  e.doc&&"BackCompat"==e.doc.compatMode);h.add("events-mouseenter",e.doc&&"onmouseenter"in e.doc.createElement("div"));h.add("events-mousewheel",e.doc&&"onmousewheel"in e.doc);e=h("dom-quirks")&&h("ie")||!h("dom-addeventlistener")?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(c,b){return c.button&b},isLeft:function(c){return c.button&1},isMiddle:function(c){return c.button&4},isRight:function(c){return c.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(c,b){return c.button==b},isLeft:function(c){return 0==
  c.button},isMiddle:function(c){return 1==c.button},isRight:function(c){return 2==c.button}};i.mouseButtons=e;i=h("events-mousewheel")?"mousewheel":function(c,b){return j(c,"DOMMouseScroll",function(c){c.wheelDelta=-c.detail;b.call(this,c)})};return{_eventHandler:d,enter:d("mouseover"),leave:d("mouseout"),wheel:i,isLeft:e.isLeft,isMiddle:e.isMiddle,isRight:e.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(i,j,h){i._name="browser";j.mixin(i,{isBrowser:!0,isFF:h("ff"),
  isIE:h("ie"),isKhtml:h("khtml"),isWebKit:h("webkit"),isMozilla:h("mozilla"),isMoz:h("mozilla"),isOpera:h("opera"),isSafari:h("safari"),isChrome:h("chrome"),isMac:h("mac"),isIos:h("ios"),isAndroid:h("android"),isWii:h("wii"),isQuirks:h("quirks"),isAir:h("air")});i.locale=i.locale||(h("ie")?navigator.userLanguage:navigator.language).toLowerCase();return h})},"dojo/query":function(){define("./_base/kernel,./has,./dom,./on,./_base/array,./_base/lang,./selector/_loader,./selector/_loader!default".split(","),
  function(i,j,h,g,e,d,c,b){function f(a,b){var c=function(c,f){if("string"==typeof f&&(f=h.byId(f),!f))return new b([]);var d="string"==typeof c?a(c,f):c?c.orphan?c:[c]:[];return d.orphan?d:new b(d)};c.matches=a.match||function(a,b,f){return 0<c.filter([a],b,f).length};c.filter=a.filter||function(a,b,f){return c(b,f).filter(function(b){return-1<e.indexOf(a,b)})};if("function"!=typeof a)var f=a.search,a=function(a,b){return f(b||document,a)};return c}j.add("array-extensible",function(){return 1==d.delegate([],
  {length:1}).length&&!j("bug-for-in-skips-shadowed")});var a=Array.prototype,k=a.slice,n=a.concat,r=e.forEach,m=function(a,b,c){b=[0].concat(k.call(b,0));c=c||i.global;return function(f){b[0]=f;return a.apply(c,b)}},l=function(a){var b=this instanceof p&&j("array-extensible");"number"==typeof a&&(a=Array(a));var c=a&&"length"in a?a:arguments;if(b||!c.sort){for(var f=b?this:[],e=f.length=c.length,k=0;k<e;k++)f[k]=c[k];if(b)return f;c=f}d._mixin(c,q);c._NodeListCtor=function(a){return p(a)};return c},
  p=l,q=p.prototype=j("array-extensible")?[]:{};p._wrap=q._wrap=function(a,b,c){a=new (c||this._NodeListCtor||p)(a);return b?a._stash(b):a};p._adaptAsMap=function(a,b){return function(){return this.map(m(a,arguments,b))}};p._adaptAsForEach=function(a,b){return function(){this.forEach(m(a,arguments,b));return this}};p._adaptAsFilter=function(a,b){return function(){return this.filter(m(a,arguments,b))}};p._adaptWithCondition=function(a,b,c){return function(){var f=arguments,d=m(a,f,c);if(b.call(c||i.global,
  f))return this.map(d);this.forEach(d);return this}};r(["slice","splice"],function(b){var c=a[b];q[b]=function(){return this._wrap(c.apply(this,arguments),"slice"==b?this:null)}});r(["indexOf","lastIndexOf","every","some"],function(a){var b=e[a];q[a]=function(){return b.apply(i,[this].concat(k.call(arguments,0)))}});d.extend(l,{constructor:p,_NodeListCtor:p,toString:function(){return this.join(",")},_stash:function(a){this._parent=a;return this},on:function(a,b){var c=this.map(function(c){return g(c,
  a,b)});c.remove=function(){for(var a=0;a<c.length;a++)c[a].remove()};return c},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(a){var b=k.call(this,0),c=e.map(arguments,function(a){return k.call(a,0)});return this._wrap(n.apply(b,c),this)},map:function(a,b){return this._wrap(e.map(this,a,b),this)},forEach:function(a,b){r(this,a,b);return this},filter:function(a){var b=arguments,c=this,f=0;if("string"==typeof a){c=s._filterResult(this,b[0]);if(1==b.length)return c._stash(this);
  f=1}return this._wrap(e.filter(c,b[f],b[f+1]),this)},instantiate:function(a,b){var c=d.isFunction(a)?a:d.getObject(a),b=b||{};return this.forEach(function(a){new c(b,a)})},at:function(){var a=new this._NodeListCtor(0);r(arguments,function(b){0>b&&(b=this.length+b);this[b]&&a.push(this[b])},this);return a._stash(this)}});var s=f(b,l);i.query=f(b,function(a){return l(a)});s.load=function(a,b,d){c.load(a,b,function(a){d(f(a,l))})};i._filterQueryResult=s._filterResult=function(a,b,c){return new l(s.filter(a,
  b,c))};i.NodeList=s.NodeList=l;return s})},"dojo/selector/_loader":function(){define(["../has","require"],function(i,j){var h=document.createElement("div");i.add("dom-qsa2.1",!!h.querySelectorAll);i.add("dom-qsa3",function(){try{return h.innerHTML="<p class='TEST'></p>",1==h.querySelectorAll(".TEST:empty").length}catch(e){}});var g;return{load:function(e,d,c){var b=j,e="default"==e?i("config-selectorEngine")||"css3":e,e="css2"==e||"lite"==e?"./lite":"css2.1"==e?i("dom-qsa2.1")?"./lite":"./acme":"css3"==
  e?i("dom-qsa3")?"./lite":"./acme":"acme"==e?"./acme":(b=d)&&e;if("?"==e.charAt(e.length-1))var e=e.substring(0,e.length-1),f=!0;if(f&&(i("dom-compliant-qsa")||g))return c(g);b([e],function(a){"./lite"!=e&&(g=a);c(a)})}}})},"dojo/selector/acme":function(){define(["../dom","../sniff","../_base/array","../_base/lang","../_base/window"],function(i,j,h,g,e){var d=g.trim,c=h.forEach,b="BackCompat"==e.doc.compatMode,f=!1,a=function(){return!0},k=function(a){for(var a=0<=">~+".indexOf(a.slice(-1))?a+" * ":
  a+" ",b=function(b,c){return d(a.slice(b,c))},c=[],e=-1,k=-1,n=-1,l=-1,s=-1,g=-1,m=-1,h,t="",p="",r,q=0,y=a.length,i=null,j=null,w=function(){if(0<=g)i.id=b(g,q).replace(/\\/g,""),g=-1;if(0<=m){var a=m==q?null:b(m,q);i[0>">~+".indexOf(a)?"tag":"oper"]=a;m=-1}0<=s&&(i.classes.push(b(s+1,q).replace(/\\/g,"")),s=-1)};t=p,p=a.charAt(q),q<y;q++)if("\\"!=t)if(i||(r=q,i={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return f?this.otag:this.tag}},m=q),h)p==h&&(h=null);
  else if("'"==p||'"'==p)h=p;else if(0<=e)if("]"==p){j.attr?j.matchFor=b(n||e+1,q):j.attr=b(e+1,q);if((e=j.matchFor)&&('"'==e.charAt(0)||"'"==e.charAt(0)))j.matchFor=e.slice(1,-1);if(j.matchFor)j.matchFor=j.matchFor.replace(/\\/g,"");i.attrs.push(j);j=null;e=n=-1}else{if("="==p)n=0<="|~^$*".indexOf(t)?t:"",j.type=n+p,j.attr=b(e+1,q-n.length),n=q+1}else if(0<=k){if(")"==p){if(0<=l)j.value=b(k+1,q);l=k=-1}}else if("#"==p)w(),g=q+1;else if("."==p)w(),s=q;else if(":"==p)w(),l=q;else if("["==p)w(),e=q,j=
  {};else if("("==p)0<=l&&(j={name:b(l+1,q),value:null},i.pseudos.push(j)),k=q;else if(" "==p&&t!=p){w();0<=l&&i.pseudos.push({name:b(l+1,q)});i.loops=i.pseudos.length||i.attrs.length||i.classes.length;i.oquery=i.query=b(r,q);i.otag=i.tag=i.oper?null:i.tag||"*";if(i.tag)i.tag=i.tag.toUpperCase();if(c.length&&c[c.length-1].oper)i.infixOper=c.pop(),i.query=i.infixOper.query+" "+i.query;c.push(i);i=null}return c},n=function(a,b){return!a?b:!b?a:function(){return a.apply(window,arguments)&&b.apply(window,
  arguments)}},r=function(a,b){var c=b||[];a&&c.push(a);return c},m=function(a){return 1==a.nodeType},l=function(a,b){return!a?"":"class"==b?a.className||"":"for"==b?a.htmlFor||"":"style"==b?a.style.cssText||"":(f?a.getAttribute(b):a.getAttribute(b,2))||""},p={"*=":function(a,b){return function(c){return 0<=l(c,a).indexOf(b)}},"^=":function(a,b){return function(c){return 0==l(c,a).indexOf(b)}},"$=":function(a,b){return function(c){var c=" "+l(c,a),f=c.lastIndexOf(b);return-1<f&&f==c.length-b.length}},
  "~=":function(a,b){var c=" "+b+" ";return function(b){return 0<=(" "+l(b,a)+" ").indexOf(c)}},"|=":function(a,b){var c=b+"-";return function(f){f=l(f,a);return f==b||0==f.indexOf(c)}},"=":function(a,b){return function(c){return l(c,a)==b}}},q="undefined"==typeof e.doc.firstChild.nextElementSibling,s=!q?"nextElementSibling":"nextSibling",u=!q?"previousElementSibling":"previousSibling",v=q?m:a,w=function(a){for(;a=a[u];)if(v(a))return!1;return!0},t=function(a){for(;a=a[s];)if(v(a))return!1;return!0},
  y=function(a){var b=a.parentNode,b=7!=b.nodeType?b:b.nextSibling,c=0,f=b.children||b.childNodes,d=a._i||a.getAttribute("_i")||-1,e=b._l||("undefined"!==typeof b.getAttribute?b.getAttribute("_l"):-1);if(!f)return-1;f=f.length;if(e==f&&0<=d&&0<=e)return d;j("ie")&&"undefined"!==typeof b.setAttribute?b.setAttribute("_l",f):b._l=f;d=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[s])if(v(b))j("ie")?b.setAttribute("_i",++c):b._i=++c,a===b&&(d=c);return d},x=function(a){return!(y(a)%2)},B=function(a){return y(a)%
  2},C={checked:function(){return function(a){return!!("checked"in a?a.checked:a.selected)}},disabled:function(){return function(a){return a.disabled}},enabled:function(){return function(a){return!a.disabled}},"first-child":function(){return w},"last-child":function(){return t},"only-child":function(){return function(a){return w(a)&&t(a)}},empty:function(){return function(a){for(var b=a.childNodes,a=a.childNodes.length-1;0<=a;a--){var c=b[a].nodeType;if(1===c||3==c)return!1}return!0}},contains:function(a,
  b){var c=b.charAt(0);if('"'==c||"'"==c)b=b.slice(1,-1);return function(a){return 0<=a.innerHTML.indexOf(b)}},not:function(a,b){var c=k(b)[0],f={el:1};if("*"!=c.tag)f.tag=1;if(!c.classes.length)f.classes=1;var d=E(c,f);return function(a){return!d(a)}},"nth-child":function(a,b){var c=parseInt;if("odd"==b)return B;if("even"==b)return x;if(-1!=b.indexOf("n")){var f=b.split("n",2),d=f[0]?"-"==f[0]?-1:c(f[0]):1,e=f[1]?c(f[1]):0,k=0,n=-1;0<d?0>e?e=e%d&&d+e%d:0<e&&(e>=d&&(k=e-e%d),e%=d):0>d&&(d*=-1,0<e&&
  (n=e,e%=d));if(0<d)return function(a){a=y(a);return a>=k&&(0>n||a<=n)&&a%d==e};b=e}var l=c(b);return function(a){return y(a)==l}}},A=9>j("ie")||9==j("ie")&&j("quirks")?function(a){var b=a.toLowerCase();"class"==b&&(a="className");return function(c){return f?c.getAttribute(a):c[a]||c[b]}}:function(a){return function(b){return b&&b.getAttribute&&b.hasAttribute(a)}},E=function(b,d){if(!b)return a;var d=d||{},e=null;"el"in d||(e=n(e,m));"tag"in d||"*"!=b.tag&&(e=n(e,function(a){return a&&(f?a.tagName:
  a.tagName.toUpperCase())==b.getTag()}));"classes"in d||c(b.classes,function(a,b){var c=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");e=n(e,function(a){return c.test(a.className)});e.count=b});"pseudos"in d||c(b.pseudos,function(a){var b=a.name;C[b]&&(e=n(e,C[b](b,a.value)))});"attrs"in d||c(b.attrs,function(a){var b,c=a.attr;a.type&&p[a.type]?b=p[a.type](c,a.matchFor):c.length&&(b=A(c));b&&(e=n(e,b))});"id"in d||b.id&&(e=n(e,function(a){return!!a&&a.id==b.id}));e||"default"in d||(e=a);return e},N=function(a){return function(b,
  c,f){for(;b=b[s];)if(!q||m(b)){(!f||S(b,f))&&a(b)&&c.push(b);break}return c}},L=function(a){return function(b,c,f){for(b=b[s];b;){if(v(b)){if(f&&!S(b,f))break;a(b)&&c.push(b)}b=b[s]}return c}},I=function(b){b=b||a;return function(a,c,f){for(var d=0,e=a.children||a.childNodes;a=e[d++];)v(a)&&(!f||S(a,f))&&b(a,d)&&c.push(a);return c}},D={},z=function(c){var f=D[c.query];if(f)return f;var d=c.infixOper,d=d?d.oper:"",k=E(c,{el:1}),n="*"==c.tag,l=e.doc.getElementsByClassName;if(d){l={el:1};if(n)l.tag=
  1;k=E(c,l);"+"==d?f=N(k):"~"==d?f=L(k):">"==d&&(f=I(k))}else if(c.id)k=!c.loops&&n?a:E(c,{el:1,id:1}),f=function(a,b){var f=i.byId(c.id,a.ownerDocument||a);if(f&&k(f)){if(9==a.nodeType)return r(f,b);for(var d=f.parentNode;d&&!(d==a);)d=d.parentNode;if(d)return r(f,b)}};else if(l&&/\{\s*\[native code\]\s*\}/.test(""+l)&&c.classes.length&&!b)var k=E(c,{el:1,classes:1,id:1}),s=c.classes.join(" "),f=function(a,b,c){for(var b=r(0,b),f,d=0,e=a.getElementsByClassName(s);f=e[d++];)k(f,a)&&S(f,c)&&b.push(f);
  return b};else!n&&!c.loops?f=function(a,b,f){for(var b=r(0,b),d=0,e=c.getTag(),e=e?a.getElementsByTagName(e):[];a=e[d++];)S(a,f)&&b.push(a);return b}:(k=E(c,{el:1,tag:1,id:1}),f=function(a,b,f){for(var b=r(0,b),d,e=0,n=(d=c.getTag())?a.getElementsByTagName(d):[];d=n[e++];)k(d,a)&&S(d,f)&&b.push(d);return b});return D[c.query]=f},F={},H={},M=function(a){var b=k(d(a));if(1==b.length){var c=z(b[0]);return function(a){if(a=c(a,[]))a.nozip=!0;return a}}return function(a){for(var a=r(a),c,f,d=b.length,
  e,k,n=0;n<d;n++){k=[];c=b[n];f=a.length-1;if(0<f)e={},k.nozip=!0;f=z(c);for(var l=0;c=a[l];l++)f(c,k,e);if(!k.length)break;a=k}return k}},K=j("ie")?"commentStrip":"nozip",O=!!e.doc.querySelectorAll,T=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,J=function(a,b,c,f){return c?(b?b+" ":"")+c+(f?" "+f:""):a},G=/([^[]*)([^\]]*])?/g,U=function(a,b,c){return b.replace(T,J)+(c||"")},P=function(a,c){a=a.replace(G,U);if(O){var f=H[a];if(f&&!c)return f}if(f=F[a])return f;var f=a.charAt(0),d=-1==a.indexOf(" ");0<=
  a.indexOf("#")&&d&&(c=!0);if(O&&!c&&-1==">~+".indexOf(f)&&(!j("ie")||-1==a.indexOf(":"))&&!(b&&0<=a.indexOf("."))&&-1==a.indexOf(":contains")&&-1==a.indexOf(":checked")&&-1==a.indexOf("|=")){var e=0<=">~+".indexOf(a.charAt(a.length-1))?a+" *":a;return H[a]=function(b){try{if(!(9==b.nodeType||d))throw"";var c=b.querySelectorAll(e);c[K]=!0;return c}catch(f){return P(a,!0)(b)}}}var k=a.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);return F[a]=2>k.length?M(a):function(a){for(var b=0,c=[],
  f;f=k[b++];)c=c.concat(M(f)(a));return c}},R=0,Q=j("ie")?function(a){return f?a.getAttribute("_uid")||a.setAttribute("_uid",++R)||R:a.uniqueID}:function(a){return a._uid||(a._uid=++R)},S=function(a,b){if(!b)return 1;var c=Q(a);return!b[c]?b[c]=1:0},$=function(a){if(a&&a.nozip)return a;var b=[];if(!a||!a.length)return b;a[0]&&b.push(a[0]);if(2>a.length)return b;R++;var c,d;if(j("ie")&&f){var e=R+"";a[0].setAttribute("_zipIdx",e);for(c=1;d=a[c];c++)a[c].getAttribute("_zipIdx")!=e&&b.push(d),d.setAttribute("_zipIdx",
  e)}else if(j("ie")&&a.commentStrip)try{for(c=1;d=a[c];c++)m(d)&&b.push(d)}catch(k){}else{a[0]&&(a[0]._zipIdx=R);for(c=1;d=a[c];c++)a[c]._zipIdx!=R&&b.push(d),d._zipIdx=R}return b},W=function(a,b){b=b||e.doc;f="div"===(b.ownerDocument||b).createElement("div").tagName;var c=P(a)(b);return c&&c.nozip?c:$(c)};W.filter=function(a,b,c){for(var f=[],d=k(b),d=1==d.length&&!/[^\w#\.]/.test(b)?E(d[0]):function(a){return-1!=h.indexOf(W(b,i.byId(c)),a)},e=0,n;n=a[e];e++)d(n)&&f.push(n);return f};return W})},
  "dojo/ready":function(){define(["./_base/kernel","./has","require","./domReady","./_base/lang"],function(i,j,h,g,e){var d=0,c,b=[],f=0,a=function(){if(d&&!f&&b.length){f=1;var e=b.shift();try{e()}finally{f=0}f=0;b.length&&c(a)}};h.on("idle",a);c=function(){h.idle()&&a()};var j=i.ready=i.addOnLoad=function(a,f,d){var k=e._toArray(arguments);"number"!=typeof a?(d=f,f=a,a=1E3):k.shift();d=d?e.hitch.apply(i,k):function(){f()};d.priority=a;for(k=0;k<b.length&&a>=b[k].priority;k++);b.splice(k,0,d);c()},
  k=i.config.addOnLoad;if(k)j[e.isArray(k)?"apply":"call"](i,k);g(function(){d=1;i._postLoad=i.config.afterOnLoad=!0;b.length&&c(a)});return j})},"dojo/domReady":function(){define(["./has"],function(i){function j(a){c?a(g):b.push(a)}var h=this,g=document,e={loaded:1,complete:1},d="string"!=typeof g.readyState,c=!!e[g.readyState];if(d)g.readyState="loading";if(!c){var b=[],f=[],a=function(a){a=a||h.event;if(!(c||"readystatechange"==a.type&&!e[g.readyState])){c=1;if(d)g.readyState="complete";for(;b.length;)b.shift()(g)}},
  k=function(c,f){c.addEventListener(f,a,!1);b.push(function(){c.removeEventListener(f,a,!1)})};if(!i("dom-addeventlistener")){var k=function(c,f){f="on"+f;c.attachEvent(f,a);b.push(function(){c.detachEvent(f,a)})},n=g.createElement("div");try{n.doScroll&&null===h.frameElement&&f.push(function(){try{return n.doScroll("left"),1}catch(a){}})}catch(r){}}k(g,"DOMContentLoaded");k(h,"load");"onreadystatechange"in g?k(g,"readystatechange"):d||f.push(function(){return e[g.readyState]});if(f.length){var m=
  function(){if(!c){for(var b=f.length;b--;)if(f[b]()){a("poller");return}setTimeout(m,30)}};m()}}j.load=function(a,b,c){j(c)};return j})},"dijit/registry":function(){define(["dojo/_base/array","dojo/sniff","dojo/_base/unload","dojo/_base/window","./main"],function(i,j,h,g,e){var d={},c={},b={length:0,add:function(b){if(c[b.id])throw Error("Tried to register widget with id=="+b.id+" but that id is already registered");c[b.id]=b;this.length++},remove:function(b){c[b]&&(delete c[b],this.length--)},byId:function(b){return"string"==
  typeof b?c[b]:b},byNode:function(b){return c[b.getAttribute("widgetId")]},toArray:function(){var b=[],a;for(a in c)b.push(c[a]);return b},getUniqueId:function(b){var a;do a=b+"_"+(b in d?++d[b]:d[b]=0);while(c[a]);return"dijit"==e._scopeName?a:e._scopeName+"_"+a},findWidgets:function(b,a){function d(b){for(b=b.firstChild;b;b=b.nextSibling)if(1==b.nodeType){var f=b.getAttribute("widgetId");f?(f=c[f])&&e.push(f):b!==a&&d(b)}}var e=[];d(b);return e},_destroyAll:function(){e._curFocus=null;e._prevFocus=
  null;e._activeStack=[];i.forEach(b.findWidgets(g.body()),function(b){b._destroyed||(b.destroyRecursive?b.destroyRecursive():b.destroy&&b.destroy())})},getEnclosingWidget:function(b){for(;b;){var a=1==b.nodeType&&b.getAttribute("widgetId");if(a)return c[a];b=b.parentNode}return null},_hash:c};return e.registry=b})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(i,j,h){var g=window,e={addOnWindowUnload:function(d,c){if(!i.windowUnloaded)h(g,"unload",i.windowUnloaded=function(){});
  h(g,"unload",j.hitch(d,c))},addOnUnload:function(d,c){h(g,"beforeunload",j.hitch(d,c))}};i.addOnWindowUnload=e.addOnWindowUnload;i.addOnUnload=e.addOnUnload;return e})},"dijit/main":function(){define(["dojo/_base/kernel"],function(i){return i.dijit})},"dijit/_WidgetBase":function(){define("require,dojo/_base/array,dojo/aspect,dojo/_base/config,dojo/_base/connect,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-class,dojo/dom-construct,dojo/dom-geometry,dojo/dom-style,dojo/has,dojo/_base/kernel,dojo/_base/lang,dojo/on,dojo/ready,dojo/Stateful,dojo/topic,dojo/_base/window,./Destroyable,./registry".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u,v,w,t){function y(a){return function(c){b[c?"set":"remove"](this.domNode,a,c);this._set(a,c)}}r.add("dijit-legacy-requires",!m.isAsync);r("dijit-legacy-requires")&&q(0,function(){i(["dijit/_base/manager"])});var x={};return d("dijit._WidgetBase",[s,w],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:y("lang"),dir:"",_setDirAttr:y("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,
  domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:g.blankGif||i.toUrl("dojo/resources/blank.gif"),postscript:function(a,b){this.create(a,b)},create:function(a,b){this.srcNodeRef=c.byId(b);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&"string"==typeof this.srcNodeRef.id)this.id=this.srcNodeRef.id;if(a)this.params=a,l.mixin(this,a);this.postMixInProperties();if(!this.id)this.id=t.getUniqueId(this.declaredClass.replace(/\./g,
  "_")),this.params&&delete this.params.id;this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:v.doc);this.ownerDocumentBody=v.body(this.ownerDocument);t.add(this);this.buildRendering();var f;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&d.parentNode&&this.domNode!==d&&(d.parentNode.replaceChild(this.domNode,d),f=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();f&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a=
  this.constructor,b=a._setterAttrs;if(!b){var b=a._setterAttrs=[],c;for(c in this.attributeMap)b.push(c);var a=a.prototype,f;for(f in a)f in this.attributeMap||"_set"+f.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()})+"Attr"in a&&b.push(f)}var d={},e;for(e in this.params||{})d[e]=this[e];j.forEach(b,function(a){a in d||this[a]&&this.set(a,this[a])},this);for(e in d)this.set(e,d[e])},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=
  this.srcNodeRef||this.ownerDocument.createElement("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(j.map(a,function(a){return a+"Rtl"})));f.add(this.domNode,a)}},postCreate:function(){},startup:function(){if(!this._started)this._started=!0,j.forEach(this.getChildren(),function(a){if(!a._started&&!a._destroyed&&l.isFunction(a.startup))a.startup(),a._started=!0})},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},
  destroy:function(a){function b(c){c.destroyRecursive?c.destroyRecursive(a):c.destroy&&c.destroy(a)}this._beingDestroyed=!0;this.uninitialize();j.forEach(this._connects,l.hitch(this,"disconnect"));j.forEach(this._supportingWidgets,b);this.domNode&&j.forEach(t.findWidgets(this.domNode,this.containerNode),b);this.destroyRendering(a);t.remove(this.id);this._destroyed=!0},destroyRendering:function(c){this.bgIframe&&(this.bgIframe.destroy(c),delete this.bgIframe);this.domNode&&(c?b.remove(this.domNode,
  "widgetId"):a.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(c||a.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){j.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var b=this.domNode;l.isObject(a)?n.set(b,a):b.style.cssText=b.style.cssText?b.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,c,d){d=3<=arguments.length?d:this.attributeMap[a];
  j.forEach(l.isArray(d)?d:[d],function(d){var e=this[d.node||d||"domNode"];switch(d.type||"attribute"){case "attribute":l.isFunction(c)&&(c=l.hitch(this,c));d=d.attribute?d.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;e.tagName?b.set(e,d,c):e.set(d,c);break;case "innerText":e.innerHTML="";e.appendChild(this.ownerDocument.createTextNode(c));break;case "innerHTML":e.innerHTML=c;break;case "class":f.replace(e,c,this[a])}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?
  this[b.g]():this[a]},set:function(a,b){if("object"===typeof a){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);var f=this[c.s];if(l.isFunction(f))var d=f.apply(this,Array.prototype.slice.call(arguments,1));else{var f=this.focusNode&&!l.isFunction(this.focusNode)?"focusNode":"domNode",e=this[f].tagName,k;if(!(k=x[e])){k=this[f];var n={},s;for(s in k)n[s.toLowerCase()]=!0;k=x[e]=n}s=a in this.attributeMap?this.attributeMap[a]:c.s in this?this[c.s]:c.l in k&&"function"!=typeof b||
  /^aria-|^data-|^role$/.test(a)?f:null;null!=s&&this._attrToDom(a,b,s);this._set(a,b)}return d||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});return b[a]={n:a+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,b){var c=this[a];this[a]=b;this._created&&b!==c&&(this._watchCallbacks&&this._watchCallbacks(a,c,b),this.emit("attrmodified-"+
  a,{detail:{prevValue:c,newValue:b}}))},emit:function(a,b,c){b=b||{};if(void 0===b.bubbles)b.bubbles=!0;if(void 0===b.cancelable)b.cancelable=!0;if(!b.detail)b.detail={};b.detail.widget=this;var f,d=this["on"+a];d&&(f=d.apply(this,c?c:[b]));this._started&&!this._beingDestroyed&&p.emit(this.domNode,a.toLowerCase(),b);return f},on:function(a,b){var c=this._onMap(a);return c?h.after(this,c,b,!0):this.own(p(this.domNode,a,b))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap=
  {},f;for(f in b.prototype)/^on/.test(f)&&(c[f.replace(/^on/,"").toLowerCase()]=f)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?t.findWidgets(this.containerNode):[]},getParent:function(){return t.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,b,c){return this.own(e.connect(a,b,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(u.subscribe(a,
  l.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir:k.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=n.get(this.domNode,"display")},placeAt:function(b,f){var d=!b.tagName&&t.byId(b);d&&d.addChild&&(!f||"number"===typeof f)?d.addChild(this,f):(d=d?d.containerNode&&!/after|before|replace/.test(f||"")?d.containerNode:d.domNode:c.byId(b,this.ownerDocument),a.place(this.domNode,d,f),!this._started&&(this.getParent()||
  {})._started&&this.startup());return this},getTextDir:function(a,b){return b},applyTextDir:function(){},defer:function(a,b){var c=setTimeout(l.hitch(this,function(){c=null;this._destroyed||l.hitch(this,a)()}),b||0);return{remove:function(){c&&(clearTimeout(c),c=null);return null}}}})})},"dojo/dom-attr":function(){define("exports,./sniff,./_base/lang,./dom,./dom-style,./dom-prop".split(","),function(i,j,h,g,e,d){function c(a,b){var c=a.getAttributeNode&&a.getAttributeNode(b);return c&&c.specified}
  var b={innerHTML:1,className:1,htmlFor:j("ie"),value:1},f={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};i.has=function(a,e){var n=e.toLowerCase();return b[d.names[n]||e]||c(g.byId(a),f[n]||e)};i.get=function(a,e){var a=g.byId(a),n=e.toLowerCase(),r=d.names[n]||e,m=a[r];if(b[r]&&"undefined"!=typeof m||"href"!=r&&("boolean"==typeof m||h.isFunction(m)))return m;n=f[n]||e;return c(a,n)?a.getAttribute(n):null};i.set=function(a,c,n){a=g.byId(a);if(2==arguments.length){for(var r in c)i.set(a,
  r,c[r]);return a}r=c.toLowerCase();var m=d.names[r]||c,l=b[m];if("style"==m&&"string"!=typeof n)return e.set(a,n),a;if(l||"boolean"==typeof n||h.isFunction(n))return d.set(a,c,n);a.setAttribute(f[r]||c,n);return a};i.remove=function(a,b){g.byId(a).removeAttribute(f[b.toLowerCase()]||b)};i.getNodeProp=function(a,b){var a=g.byId(a),e=b.toLowerCase(),h=d.names[e]||b;if(h in a&&"href"!=h)return a[h];e=f[e]||b;return c(a,e)?a.getAttribute(e):null}})},"dojo/dom-prop":function(){define("exports,./_base/kernel,./sniff,./_base/lang,./dom,./dom-style,./dom-construct,./_base/connect".split(","),
  function(i,j,h,g,e,d,c,b){var f={},a=0,k=j._scopeName+"attrid";i.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"};i.get=function(a,b){var a=e.byId(a),c=b.toLowerCase();return a[i.names[c]||b]};i.set=function(n,r,m){n=e.byId(n);if(2==arguments.length&&"string"!=typeof r){for(var l in r)i.set(n,l,r[l]);return n}l=r.toLowerCase();l=i.names[l]||r;if("style"==l&&"string"!=typeof m)return d.set(n,
  m),n;if("innerHTML"==l)return h("ie")&&n.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(c.empty(n),n.appendChild(c.toDom(m,n.ownerDocument))):n[l]=m,n;if(g.isFunction(m)){var p=n[k];p||(p=a++,n[k]=p);f[p]||(f[p]={});var q=f[p][l];if(q)b.disconnect(q);else try{delete n[l]}catch(s){}m?f[p][l]=b.connect(n,l,m):n[l]=null;return n}n[l]=m;return n}})},"dojo/dom-construct":function(){define("exports,./_base/kernel,./sniff,./_base/window,./dom,./dom-attr,./on".split(","),
  function(i,j,h,g,e,d){function c(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)}var b={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},f=/<\s*([\w\:]+)/,a={},k=0,n="__"+j._scopeName+"ToDomId",r;for(r in b)if(b.hasOwnProperty(r))j=b[r],j.pre="option"==r?'<select multiple="multiple">':"<"+j.join("><")+">",j.post="</"+
  j.reverse().join("></")+">";i.toDom=function(c,d){var d=d||g.doc,e=d[n];e||(d[n]=e=++k+"",a[e]=d.createElement("div"));var c=c+"",s=c.match(f),m=s?s[1].toLowerCase():"",e=a[e];if(s&&b[m]){s=b[m];e.innerHTML=s.pre+c+s.post;for(s=s.length;s;--s)e=e.firstChild}else e.innerHTML=c;if(1==e.childNodes.length)return e.removeChild(e.firstChild);for(m=d.createDocumentFragment();s=e.firstChild;)m.appendChild(s);return m};i.place=function(a,b,f){b=e.byId(b);"string"==typeof a&&(a=/^\s*</.test(a)?i.toDom(a,b.ownerDocument):
  e.byId(a));if("number"==typeof f){var d=b.childNodes;!d.length||d.length<=f?b.appendChild(a):c(a,d[0>f?0:f])}else switch(f){case "before":c(a,b);break;case "after":f=a;(d=b.parentNode)&&(d.lastChild==b?d.appendChild(f):d.insertBefore(f,b.nextSibling));break;case "replace":b.parentNode.replaceChild(a,b);break;case "only":i.empty(b);b.appendChild(a);break;case "first":if(b.firstChild){c(a,b.firstChild);break}default:b.appendChild(a)}return a};i.create=function(a,b,c,f){var k=g.doc;if(c)c=e.byId(c),
  k=c.ownerDocument;"string"==typeof a&&(a=k.createElement(a));b&&d.set(a,b);c&&i.place(a,c,f);return a};var m=h("ie")?function(a){try{a.innerHTML=""}catch(b){for(var c;c=a.lastChild;){var f=a;c.firstChild&&m(c);f&&f.removeChild(c)}}}:function(a){a.innerHTML=""};i.empty=function(a){m(e.byId(a))};i.destroy=function(a){if(a=e.byId(a)){var b=a,a=a.parentNode;b.firstChild&&m(b);a&&a.removeChild(b)}}})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(i,j,h){function g(b){if("string"==
  typeof b||b instanceof String){if(b&&!d.test(b))return c[0]=b,c;b=b.split(d);b.length&&!b[0]&&b.shift();b.length&&!b[b.length-1]&&b.pop();return b}return!b?[]:j.filter(b,function(a){return a})}var e,d=/\s+/,c=[""],b={};return e={contains:function(b,a){return 0<=(" "+h.byId(b).className+" ").indexOf(" "+a+" ")},add:function(b,a){var b=h.byId(b),a=g(a),c=b.className,d,c=c?" "+c+" ":" ";d=c.length;for(var e=0,m=a.length,l;e<m;++e)(l=a[e])&&0>c.indexOf(" "+l+" ")&&(c+=l+" ");d<c.length&&(b.className=
  c.substr(1,c.length-2))},remove:function(b,a){var b=h.byId(b),c;if(void 0!==a){a=g(a);c=" "+b.className+" ";for(var d=0,e=a.length;d<e;++d)c=c.replace(" "+a[d]+" "," ");c=i.trim(c)}else c="";b.className!=c&&(b.className=c)},replace:function(c,a,d){c=h.byId(c);b.className=c.className;e.remove(b,d);e.add(b,a);c.className!==b.className&&(c.className=b.className)},toggle:function(b,a,c){b=h.byId(b);if(void 0===c)for(var a=g(a),d=0,r=a.length,m;d<r;++d)m=a[d],e[e.contains(b,m)?"remove":"add"](b,m);else e[c?
  "add":"remove"](b,a);return c}}})},"dojo/Stateful":function(){define("dojo/Stateful",["./_base/declare","./_base/lang","./_base/array","dojo/when"],function(i,j,h,g){return i("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(e){var d=this._attrPairNames;return d[e]?d[e]:d[e]={s:"_"+e+"Setter",g:"_"+e+"Getter"}},postscript:function(e){e&&this.set(e)},_get:function(e,d){return"function"===typeof this[d.g]?this[d.g]():this[e]},get:function(e){return this._get(e,this._getAttrNames(e))},set:function(e,
  d){if("object"===typeof e){for(var c in e)e.hasOwnProperty(c)&&"_watchCallbacks"!=c&&this.set(c,e[c]);return this}c=this._getAttrNames(e);var b=this._get(e,c);c=this[c.s];var f;"function"===typeof c?f=c.apply(this,Array.prototype.slice.call(arguments,1)):this[e]=d;if(this._watchCallbacks){var a=this;g(f,function(){a._watchCallbacks(e,b,d)})}return this},_changeAttrValue:function(e,d){var c=this.get(e);this[e]=d;this._watchCallbacks&&this._watchCallbacks(e,c,d);return this},watch:function(e,d){var c=
  this._watchCallbacks;if(!c)var b=this,c=this._watchCallbacks=function(a,f,d,e){var l=function(c){if(c)for(var c=c.slice(),e=0,l=c.length;e<l;e++)c[e].call(b,a,f,d)};l(c["_"+a]);e||l(c["*"])};!d&&"function"===typeof e?(d=e,e="*"):e="_"+e;var f=c[e];"object"!==typeof f&&(f=c[e]=[]);f.push(d);var a={};a.unwatch=a.remove=function(){var a=h.indexOf(f,d);-1<a&&f.splice(a,1)};return a}})})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(i,j,h){return h("dijit.Destroyable",
  null,{destroy:function(){this._destroyed=!0},own:function(){i.forEach(arguments,function(g){var e="destroyRecursive"in g?"destroyRecursive":"destroy"in g?"destroy":"remove",d=j.before(this,"destroy",function(b){g[e](b)}),c=j.after(g,e,function(){d.remove();c.remove()},!0)},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on,dojo/_base/array,dojo/keys,dojo/_base/declare,dojo/has,dojo/_base/unload,dojo/_base/window,./a11yclick".split(","),function(i,j,h,g,e,d,c,b){i=g("dijit._OnDijitClickMixin",
  null,{connect:function(c,a,d){return this.inherited(arguments,[c,"ondijitclick"==a?b:a,d])}});i.a11yclick=b;return i})},"dijit/a11yclick":function(){define("dojo/on,dojo/_base/array,dojo/keys,dojo/_base/declare,dojo/has,dojo/_base/unload,dojo/_base/window".split(","),function(i,j,h,g,e,d,c){function b(a){return(a.keyCode===h.ENTER||a.keyCode===h.SPACE)&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey}var f=null;e("dom-addeventlistener")?c.doc.addEventListener("keydown",function(a){f=a.target},!0):
  function(){var a=function(a){f=a.srcElement};c.doc.attachEvent("onkeydown",a);d.addOnWindowUnload(function(){c.doc.detachEvent("onkeydown",a)})}();return function(a,c){if(/input|button/i.test(a.nodeName))return i(a,"click",c);var d=[i(a,"keydown",function(a){if(b(a))f=a.target,a.preventDefault()}),i(a,"keyup",function(a){b(a)&&a.target==f&&(f=null,i.emit(a.target,"click",{cancelable:!0,bubbles:!0}))}),i(a,"click",function(a){c.call(this,a)})];if(e("touch")){var g;d.push(i(a,"touchend",function(a){var b=
  a.target;g=setTimeout(function(){g=null;i.emit(b,"click",{cancelable:!0,bubbles:!0})},600)}),i(a,"click",function(){g&&clearTimeout(g)}))}return{remove:function(){j.forEach(d,function(a){a.remove()});g&&(clearTimeout(g),g=null)}}}})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(i,j,h,g){g.extend(j,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return h("dijit._FocusMixin",
  null,{_focusManager:i})})},"dijit/focus":function(){define("dojo/aspect,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-construct,dojo/Evented,dojo/_base/lang,dojo/on,dojo/ready,dojo/sniff,dojo/Stateful,dojo/_base/unload,dojo/_base/window,dojo/window,./a11y,./registry,./main".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){var s=new (j([k,d],{curNode:null,activeStack:[],constructor:function(){var a=c.hitch(this,function(a){h.isDescendant(this.curNode,a)&&this.set("curNode",null);h.isDescendant(this.prevNode,
  a)&&this.set("prevNode",null)});i.before(e,"empty",a);i.before(e,"destroy",a)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(b,c){var f=this,d=function(b){f._justMouseDowned=!0;setTimeout(function(){f._justMouseDowned=!1},0);if(!a("ie")||!b||!(b.srcElement&&null==b.srcElement.parentNode))f._onTouchNode(c||b.target||b.srcElement,"mouse")},e=a("ie")?b.document.documentElement:b.document;if(e){if(a("ie")){b.document.body.attachEvent("onmousedown",d);var k=
  function(a){var b=a.srcElement.tagName.toLowerCase();"#document"==b||"body"==b||(l.isTabNavigable(a.srcElement)?f._onFocusNode(c||a.srcElement):f._onTouchNode(c||a.srcElement))};e.attachEvent("onfocusin",k);var n=function(a){f._onBlurNode(c||a.srcElement)};e.attachEvent("onfocusout",n);return{remove:function(){b.document.detachEvent("onmousedown",d);e.detachEvent("onfocusin",k);e.detachEvent("onfocusout",n);e=null}}}e.body.addEventListener("mousedown",d,!0);e.body.addEventListener("touchstart",d,
  !0);var s=function(a){f._onFocusNode(c||a.target)};e.addEventListener("focus",s,!0);var g=function(a){f._onBlurNode(c||a.target)};e.addEventListener("blur",g,!0);return{remove:function(){e.body.removeEventListener("mousedown",d,!0);e.body.removeEventListener("touchstart",d,!0);e.removeEventListener("focus",s,!0);e.removeEventListener("blur",g,!0);e=null}}}},_onBlurNode:function(){this._clearFocusTimer&&clearTimeout(this._clearFocusTimer);this._clearFocusTimer=setTimeout(c.hitch(this,function(){this.set("prevNode",
  this.curNode);this.set("curNode",null)}),0);if(!this._justMouseDowned)this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),this._clearActiveWidgetsTimer=setTimeout(c.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)},_onTouchNode:function(a,b){this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);var c=[];try{for(;a;){var f=g.get(a,"dijitPopupParent");if(f)a=p.byId(f).domNode;else if(a.tagName&&
  "body"==a.tagName.toLowerCase()){if(a===r.body())break;a=m.get(a.ownerDocument).frameElement}else{var d=a.getAttribute&&a.getAttribute("widgetId"),e=d&&p.byId(d);e&&!("mouse"==b&&e.get("disabled"))&&c.unshift(d);a=a.parentNode}}}catch(k){}this._setStack(c,b)},_onFocusNode:function(a){a&&9!=a.nodeType&&(this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),delete this._clearFocusTimer),this._onTouchNode(a),a!=this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",a)))},_setStack:function(a,
  b){var c=this.activeStack;this.set("activeStack",a);for(var f=0;f<Math.min(c.length,a.length)&&!(c[f]!=a[f]);f++);for(var d,e=c.length-1;e>=f;e--)if(d=p.byId(c[e]))d._hasBeenBlurred=!0,d.set("focused",!1),d._focusManager==this&&d._onBlur(b),this.emit("widget-blur",d,b);for(e=f;e<a.length;e++)if(d=p.byId(a[e]))d.set("focused",!0),d._focusManager==this&&d._onFocus(b),this.emit("widget-focus",d,b)},focus:function(a){if(a)try{a.focus()}catch(b){}}}));f(function(){var b=s.registerWin(m.get(r.doc));a("ie")&&
  n.addOnWindowUnload(function(){b&&(b.remove(),b=null)})});q.focus=function(a){s.focus(a)};for(var u in s)/^_/.test(u)||(q.focus[u]="function"==typeof s[u]?c.hitch(s,u):s[u]);s.watch(function(a,b,c){q.focus[a]=c});return s})},"dojo/window":function(){define("./_base/lang,./sniff,./_base/window,./dom,./dom-geometry,./dom-style".split(","),function(i,j,h,g,e,d){var c={getBox:function(b){var b=b||h.doc,f="BackCompat"==b.compatMode?h.body(b):b.documentElement,a=e.docScroll(b);if(j("touch"))var d=c.get(b),
  b=d.innerWidth||f.clientWidth,f=d.innerHeight||f.clientHeight;else b=f.clientWidth,f=f.clientHeight;return{l:a.x,t:a.y,w:b,h:f}},get:function(b){if(j("ie")&&c!==document.parentWindow){b.parentWindow.execScript("document._parentWindow = window;","Javascript");var f=b._parentWindow;b._parentWindow=null;return f}return b.parentWindow||b.defaultView},scrollIntoView:function(b,c){try{var b=g.byId(b),a=b.ownerDocument||h.doc,k=h.body(a),n=a.documentElement||k.parentNode,r=j("ie"),m=j("webkit");if((!j("mozilla")&&
  !r&&!m&&!j("opera")||b==k||b==n)&&"undefined"!=typeof b.scrollIntoView)b.scrollIntoView(!1);else{var l="BackCompat"==a.compatMode,p=9<=r&&"frameElement"in b.ownerDocument.parentWindow?0<n.clientHeight&&0<n.clientWidth&&(0==k.clientHeight||0==k.clientWidth||k.clientHeight>n.clientHeight||k.clientWidth>n.clientWidth)?n:k:l?k:n,m=m?k:p,i=p.clientWidth,s=p.clientHeight,u=!e.isBodyLtr(a),v=c||e.position(b),w=b.parentNode,a=function(a){return 6>=r||r&&l?!1:"fixed"==d.get(a,"position").toLowerCase()};if(!a(b))for(;w;){w==
  k&&(w=m);var t=e.position(w),y=a(w);if(w==m){t.w=i;t.h=s;m==n&&r&&u&&(t.x+=m.offsetWidth-t.w);if(0>t.x||!r)t.x=0;if(0>t.y||!r)t.y=0}else{var x=e.getPadBorderExtents(w);t.w-=x.w;t.h-=x.h;t.x+=x.l;t.y+=x.t;var B=w.clientWidth,C=t.w-B;if(0<B&&0<C)t.w=B,t.x+=u&&(r||w.clientLeft>x.l)?C:0;B=w.clientHeight;C=t.h-B;if(0<B&&0<C)t.h=B}if(y){if(0>t.y)t.h+=t.y,t.y=0;if(0>t.x)t.w+=t.x,t.x=0;if(t.y+t.h>s)t.h=s-t.y;if(t.x+t.w>i)t.w=i-t.x}var A=v.x-t.x,E=v.y-Math.max(t.y,0),N=A+v.w-t.w,L=E+v.h-t.h;if(0<N*A){var I=
  Math[0>A?"max":"min"](A,N);if(u&&(8==r&&!l||9<=r))I=-I;v.x+=w.scrollLeft;w.scrollLeft+=I;v.x-=w.scrollLeft}0<L*E&&(v.y+=w.scrollTop,w.scrollTop+=Math[0>E?"max":"min"](E,L),v.y-=w.scrollTop);w=w!=m&&!y&&w.parentNode}}}catch(D){console.error("scrollIntoView: "+D),b.scrollIntoView(!1)}}};i.setObject("dojo.window",c);return c})},"dijit/a11y":function(){define("dojo/_base/array,dojo/_base/config,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-style,dojo/sniff,./main".split(","),function(i,j,h,g,e,d,
  c,b){var f=b._isElementShown=function(a){var b=d.get(a);return"hidden"!=b.visibility&&"collapsed"!=b.visibility&&"none"!=b.display&&"hidden"!=e.get(a,"type")};b.hasDefaultTabStop=function(a){switch(a.nodeName.toLowerCase()){case "a":return e.has(a,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var b;try{var c=a.contentDocument;if("designMode"in c&&"on"==c.designMode)return!0;b=c.body}catch(f){try{b=a.contentWindow.document.body}catch(d){return!1}}return b&&
  ("true"==b.contentEditable||b.firstChild&&"true"==b.firstChild.contentEditable);default:return"true"==a.contentEditable}};var a=b.isTabNavigable=function(a){return e.get(a,"disabled")?!1:e.has(a,"tabIndex")?0<=e.get(a,"tabIndex"):b.hasDefaultTabStop(a)};b._getTabNavigable=function(b){function d(a){return a&&"input"==a.tagName.toLowerCase()&&a.type&&"radio"==a.type.toLowerCase()&&a.name&&a.name.toLowerCase()}var g,m,l,h,i,s,j={},v=function(b){for(b=b.firstChild;b;b=b.nextSibling)if(!(1!=b.nodeType||
  9>=c("ie")&&"HTML"!==b.scopeName||!f(b))){if(a(b)){var k=+e.get(b,"tabIndex");if(!e.has(b,"tabIndex")||0==k)g||(g=b),m=b;else if(0<k){if(!l||k<h)h=k,l=b;if(!i||k>=s)s=k,i=b}k=d(b);e.get(b,"checked")&&k&&(j[k]=b)}"SELECT"!=b.nodeName.toUpperCase()&&v(b)}};f(b)&&v(b);return{first:j[d(g)]||g,last:j[d(m)]||m,lowest:j[d(l)]||l,highest:j[d(i)]||i}};b.getFirstInTabbingOrder=function(a,c){var f=b._getTabNavigable(g.byId(a,c));return f.lowest?f.lowest:f.first};b.getLastInTabbingOrder=function(a,c){var f=b._getTabNavigable(g.byId(a,
  c));return f.last?f.last:f.highest};return{hasDefaultTabStop:b.hasDefaultTabStop,isTabNavigable:b.isTabNavigable,_getTabNavigable:b._getTabNavigable,getFirstInTabbingOrder:b.getFirstInTabbingOrder,getLastInTabbingOrder:b.getLastInTabbingOrder}})},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./ready","./sniff","./_base/window"],function(i,j,h,g,e){var d=e.doc.documentElement,e=g("ie"),c=g("opera"),b=Math.floor,f=g("ff"),a=i.boxModel.replace(/-/,""),c={dj_quirks:g("quirks"),dj_opera:c,
  dj_khtml:g("khtml"),dj_webkit:g("webkit"),dj_safari:g("safari"),dj_chrome:g("chrome"),dj_gecko:g("mozilla")};if(e)c.dj_ie=!0,c["dj_ie"+b(e)]=!0,c.dj_iequirks=g("quirks");f&&(c["dj_ff"+b(f)]=!0);c["dj_"+a]=!0;var k="",n;for(n in c)c[n]&&(k+=n+" ");d.className=j.trim(d.className+" "+k);h(90,function(){if(!i.isBodyLtr()){var a="dj_rtl dijitRtl "+k.replace(/ /g,"-rtl ");d.className=j.trim(d.className+" "+a+"dj_rtl dijitRtl "+k.replace(/ /g,"-rtl "))}});return g})},"dijit/hccss":function(){define(["dojo/dom-class",
  "dojo/hccss","dojo/ready","dojo/_base/window"],function(i,j,h,g){h(90,function(){j("highcontrast")&&i.add(g.body(),"dijit_a11y")});return j})},"dojo/hccss":function(){define("require,./_base/config,./dom-class,./dom-style,./has,./ready,./_base/window".split(","),function(i,j,h,g,e,d,c){e.add("highcontrast",function(){var b=c.doc.createElement("div");b.style.cssText="border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("+(j.blankGif||i.toUrl("./resources/blank.gif"))+
  ");";c.body().appendChild(b);var f=g.getComputedStyle(b),a=f.backgroundImage,f=f.borderTopColor==f.borderRightColor||a&&("none"==a||"url(invalid-url:)"==a);8>=e("ie")?b.outerHTML="":c.body().removeChild(b);return f});d(90,function(){e("highcontrast")&&h.add(c.body(),"dj_a11y")});return e})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct"],function(i,j,h){return j("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=
  this.domNode},addChild:function(g,e){var d=this.containerNode;if(e&&"number"==typeof e){var c=this.getChildren();if(c&&c.length>=e)d=c[e-1].domNode,e="after"}h.place(g.domNode,d,e);this._started&&!g._started&&g.startup()},removeChild:function(g){"number"==typeof g&&(g=this.getChildren()[g]);if(g)(g=g.domNode)&&g.parentNode&&g.parentNode.removeChild(g)},hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(g,e){var d=this.getChildren(),c=i.indexOf(this.getChildren(),
  g);return d[c+e]},getIndexOfChild:function(g){return i.indexOf(this.getChildren(),g)}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom-class,dojo/dom-geometry,dojo/dom-style,dojo/_base/lang,dojo/query,dojo/sniff,../registry,../Viewport,./utils".split(","),function(i,j,h,g,e,d,c,b,f,a,k){return j("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var b=this.getParent();this._childOfLayoutWidget=
  b&&b.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(a.on("resize",d.hitch(this,"resize")))}},_checkIfSingleChild:function(){var a=[],b=!1;c("> *",this.containerNode).some(function(c){var d=f.byNode(c);d&&d.resize?a.push(d):c.offsetHeight&&(b=!0)});this._singleChild=1==a.length&&!b?a[0]:null;h.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,b){this._resizeCalled=
  !0;this._scheduleLayout(a,b)},_scheduleLayout:function(a,b){this._isShown()?this._layout(a,b):(this._needLayout=!0,this._changeSize=a,this._resultSize=b)},_layout:function(a,b){delete this._needLayout;!this._wasShown&&!1!==this.open&&this._onShow();a&&g.setMarginBox(this.domNode,a);var c=this.containerNode;if(c===this.domNode){var f=b||{};d.mixin(f,a||{});if(!("h"in f)||!("w"in f))f=d.mixin(g.getMarginBox(c),f);this._contentBox=k.marginBox2contentBox(c,f)}else this._contentBox=g.getContentBox(c);
  this._layoutChildren()},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||g.getContentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else i.forEach(this.getChildren(),function(a){a.resize&&a.resize()})},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var a=this.domNode,b=this.domNode.parentNode;
  return"none"!=a.style.display&&"hidden"!=a.style.visibility&&!h.contains(a,"dijitHidden")&&b&&b.style&&"none"!=b.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/Viewport":function(){define("dojo/Evented,dojo/on,dojo/ready,dojo/sniff,dojo/_base/window,dojo/window".split(","),function(i,j,h,g,e,d){var c=new i;h(200,function(){var b=d.getBox();c._rlh=j(e.global,"resize",function(){var a=d.getBox();
  b.h==a.h&&b.w==a.w||(b=a,c.emit("resize"))});if(8==g("ie")){var f=screen.deviceXDPI;setInterval(function(){if(screen.deviceXDPI!=f)f=screen.deviceXDPI,c.emit("resize")},500)}});return c})},"dijit/layout/utils":function(){define("dojo/_base/array,dojo/dom-class,dojo/dom-geometry,dojo/dom-style,dojo/_base/lang,../main".split(","),function(i,j,h,g,e,d){function c(b,c){var a=b.resize?b.resize(c):h.setMarginBox(b.domNode,c);a?e.mixin(b,a):(e.mixin(b,h.getMarginBox(b.domNode)),e.mixin(b,c))}d=e.getObject("layout",
  !0,d);d.marginBox2contentBox=function(b,c){var a=g.getComputedStyle(b),d=h.getMarginExtents(b,a),e=h.getPadBorderExtents(b,a);return{l:g.toPixelValue(b,a.paddingLeft),t:g.toPixelValue(b,a.paddingTop),w:c.w-(d.w+e.w),h:c.h-(d.h+e.h)}};d.layoutChildren=function(b,f,a,d,n){f=e.mixin({},f);j.add(b,"dijitLayoutContainer");a=i.filter(a,function(a){return"center"!=a.region&&"client"!=a.layoutAlign}).concat(i.filter(a,function(a){return"center"==a.region||"client"==a.layoutAlign}));i.forEach(a,function(a){var b=
  a.domNode,e=a.region||a.layoutAlign;if(!e)throw Error("No region setting for "+a.id);var g=b.style;g.left=f.l+"px";g.top=f.t+"px";g.position="absolute";j.add(b,"dijitAlign"+(e.substring(0,1).toUpperCase()+e.substring(1)));b={};d&&d==a.id&&(b["top"==a.region||"bottom"==a.region?"h":"w"]=n);"top"==e||"bottom"==e?(b.w=f.w,c(a,b),f.h-=a.h,"top"==e?f.t+=a.h:g.top=f.t+f.h+"px"):"left"==e||"right"==e?(b.h=f.h,c(a,b),f.w-=a.w,"left"==e?f.l+=a.w:g.left=f.l+f.w+"px"):("client"==e||"center"==e)&&c(a,f)})};return{marginBox2contentBox:d.marginBox2contentBox,
  layoutChildren:d.layoutChildren}})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(i,j){var h={};j.setObject("dojo.string",h);h.rep=function(g,e){if(0>=e||!g)return"";for(var d=[];;){e&1&&d.push(g);if(!(e>>=1))break;g+=g}return d.join("")};h.pad=function(g,e,d,c){d||(d="0");g=""+g;e=h.rep(d,Math.ceil((e-g.length)/d.length));return c?g+e:e+g};h.substitute=function(g,e,d,c){c=c||i.global;d=d?j.hitch(c,d):function(b){return b};return g.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,
  function(b,f,a){b=j.getObject(f,!1,e);a&&(b=j.getObject(a,!1,c).call(c,b,f));return d(b,f).toString()})};h.trim=String.prototype.trim?j.trim:function(g){for(var g=g.replace(/^\s+/,""),e=g.length-1;0<=e;e--)if(/\S/.test(g.charAt(e))){g=g.substring(0,e+1);break}return g};return h})},"dojo/html":function(){define("./_base/kernel,./_base/lang,./_base/array,./_base/declare,./dom,./dom-construct,./parser".split(","),function(i,j,h,g,e,d,c){var b={};j.setObject("dojo.html",b);var f=0;b._secureForInnerHtml=
  function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b._emptyNode=d.empty;b._setNodeContent=function(a,b){d.empty(a);if(b)if("string"==typeof b&&(b=d.toDom(b,a.ownerDocument)),!b.nodeType&&j.isArrayLike(b))for(var c=b.length,f=0;f<b.length;f=c==b.length?f+1:0)d.place(b[f],a,"last");else d.place(b,a,"last");return a};b._ContentSetter=g("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:i._scopeName,
  startup:!0,constructor:function(a,b){j.mixin(this,a||{});b=this.node=e.byId(this.node||b);if(!this.id)this.id=["Setter",b?b.id||b.tagName:"",f++].join("_")},set:function(a,b){if(void 0!==a)this.content=a;b&&this._mixin(b);this.onBegin();this.setContent();var c=this.onEnd();return c&&c.then?c:this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=b._setNodeContent(a,this.content)}catch(c){var f=this.onContentError(c);try{a.innerHTML=
  f}catch(d){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+d.message,d)}}this.node=a},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(h.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);d.empty(this.node)},onBegin:function(){var a=this.content;if(j.isString(a)&&(this.cleanContent&&(a=b._secureForInnerHtml(a)),
  this.extractContent)){var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||
  (this[c]=a[c])},_parse:function(){var a=this.node;try{var b={};h.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var f=this;this.parseDeferred=c.parse({rootNode:a,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return f.parseResults=a})}catch(d){this._onError("Content",d,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,f){a=this["on"+a+"Error"].call(this,c);f?console.error(f,c):a&&b._setNodeContent(this.node,a,!0)}});b.set=
  function(a,c,f){void 0==c&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),c="");return f?(new b._ContentSetter(j.mixin(f,{content:c,node:a}))).set():b._setNodeContent(a,c,!0)};return b})},"dojo/parser":function(){define("require,./_base/kernel,./_base/lang,./_base/array,./_base/config,./_base/html,./_base/window,./_base/url,./_base/json,./aspect,./date/stamp,./Deferred,./has,./query,./on,./ready".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p){function q(a){var b=
  a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<u){var b=a._nameCaseMap={},f;for(f in c)"_"!==f.charAt(0)&&(b[f.toLowerCase()]=f);b._extendCnt=u}return b}function s(a){var b=a.join();if(!v[b]){for(var c=[],f=0,d=a.length;f<d;f++){var e=a[f];c[c.length]=v[e]=v[e]||h.getObject(e)||~e.indexOf("/")&&i(e)}a=c.shift();v[b]=c.length?a.createSubclass?a.createSubclass(c):a.extend.apply(a,c):a}return v[b]}var u=0;a.after(h,"extend",function(){u++},!0);var v={},w={_clearCache:function(){u++;v={}},_functionFromScript:function(a,
  b){var c="",f="",d=a.getAttribute(b+"args")||a.getAttribute("args"),e=a.getAttribute("with"),d=(d||"").split(/\s*,\s*/);e&&e.length&&g.forEach(e.split(/\s*,\s*/),function(a){c+="with("+a+"){";f+="}"});return new Function(d,c+a.innerHTML+f)},instantiate:function(a,b,c){var b=b||{},c=c||{},f=(c.scope||j._scopeName)+"Type",d="data-"+(c.scope||j._scopeName)+"-",e=d+"type",k=d+"mixins",n=[];g.forEach(a,function(a){var c=f in b?b[f]:a.getAttribute(e)||a.getAttribute(f);if(c){var d=a.getAttribute(k),c=d?
  [c].concat(d.split(/\s*,\s*/)):[c];n.push({node:a,types:c})}});return this._instantiate(n,b,c)},_instantiate:function(a,b,c){a=g.map(a,function(a){var f=a.ctor||s(a.types);if(!f)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(f,a.node,b,c,a.scripts,a.inherited)},this);!b._started&&!c.noStart&&g.forEach(a,function(a){"function"===typeof a.startup&&!a._started&&a.startup()});return a},construct:function(c,d,e,n,s,p){var t;var i=c&&c.prototype,n=n||{},w={};
  n.defaults&&h.mixin(w,n.defaults);p&&h.mixin(w,p);var u;r("dom-attributes-explicit")?u=d.attributes:r("dom-attributes-specified-flag")?u=g.filter(d.attributes,function(a){return a.specified}):(p=(/^input$|^img$/i.test(d.nodeName)?d:d.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),u=g.map(p.split(/\s+/),function(a){var b=a.toLowerCase();return{name:a,value:"LI"==d.nodeName&&"value"==a||"enctype"==b?d.getAttribute(b):d.getAttributeNode(b).value}}));
  var v=n.scope||j._scopeName,p="data-"+v+"-",D={};"dojo"!==v&&(D[p+"props"]="data-dojo-props",D[p+"type"]="data-dojo-type",D[p+"mixins"]="data-dojo-mixins",D[v+"type"]="dojoType",D[p+"id"]="data-dojo-id");for(var v=0,z,F=[],H,M;z=u[v++];){var K=z.name,O=K.toLowerCase();z=z.value;switch(D[O]||O){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":M=z;break;case "data-dojo-id":case "jsid":H=z;break;case "data-dojo-attach-point":case "dojoattachpoint":w.dojoAttachPoint=
  z;break;case "data-dojo-attach-event":case "dojoattachevent":w.dojoAttachEvent=z;break;case "class":w["class"]=d.className;break;case "style":w.style=d.style&&d.style.cssText;break;default:if(K in i||(K=q(c)[O]||K),K in i)switch(typeof i[K]){case "string":w[K]=z;break;case "number":w[K]=z.length?Number(z):NaN;break;case "boolean":w[K]="false"!=z.toLowerCase();break;case "function":w[K]=""===z||-1!=z.search(/[^\w\.]+/i)?new Function(z):h.getObject(z,!1)||new Function(z);F.push(K);break;default:O=i[K],
  w[K]=O&&"length"in O?z?z.split(/\s*,\s*/):[]:O instanceof Date?""==z?new Date(""):"now"==z?new Date:k.fromISOString(z):O instanceof b?j.baseUrl+z:f.fromJson(z)}else w[K]=z}}for(v=0;v<F.length;v++)u=F[v].toLowerCase(),d.removeAttribute(u),d[u]=null;if(M)try{M=f.fromJson.call(n.propsThis,"{"+M+"}"),h.mixin(w,M)}catch(T){throw Error(T.toString()+" in data-dojo-props='"+M+"'");}h.mixin(w,e);s||(s=c&&(c._noScript||i._noScript)?[]:m("> script[type^='dojo/']",d));e=[];n=[];M=[];F=[];if(s)for(v=0;v<s.length;v++){var J=
  s[v];d.removeChild(J);u=J.getAttribute(p+"event")||J.getAttribute("event");D=J.getAttribute(p+"prop");K=J.getAttribute(p+"method");O=J.getAttribute(p+"advice");z=J.getAttribute("type");J=this._functionFromScript(J,p);u?"dojo/connect"==z?e.push({method:u,func:J}):"dojo/on"==z?F.push({event:u,func:J}):w[u]=J:"dojo/aspect"==z?e.push({method:K,advice:O,func:J}):"dojo/watch"==z?M.push({prop:D,func:J}):n.push(J)}t=(s=c.markupFactory||i.markupFactory)?s(w,d,c):new c(w,d),c=t;H&&h.setObject(H,c);for(v=0;v<
  e.length;v++)a[e[v].advice||"after"](c,e[v].method,h.hitch(c,e[v].func),!0);for(v=0;v<n.length;v++)n[v].call(c);for(v=0;v<M.length;v++)c.watch(M[v].prop,M[v].func);for(v=0;v<F.length;v++)l(c,F[v].event,F[v].func);return c},scan:function(a,b){function c(a){if(!a.inherited){a.inherited={};var b=a.node,f=c(a.parent),b={dir:b.getAttribute("dir")||f.dir,lang:b.getAttribute("lang")||f.lang,textDir:b.getAttribute(m)||f.textDir},d;for(d in b)b[d]&&(a.inherited[d]=b[d])}return a.inherited}var f=[],d=[],e=
  {},k=(b.scope||j._scopeName)+"Type",l="data-"+(b.scope||j._scopeName)+"-",h=l+"type",m=l+"textdir",l=l+"mixins",p=a.firstChild,q=b.inherited;if(!q){var w=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&w(a.parentNode,b)},q={dir:w(a,"dir"),lang:w(a,"lang"),textDir:w(a,m)},u;for(u in q)q[u]||delete q[u]}for(var q={inherited:q},v,K;;)if(p)if(1!=p.nodeType)p=p.nextSibling;else if(v&&"script"==p.nodeName.toLowerCase())(O=p.getAttribute("type"))&&/^dojo\/\w/i.test(O)&&v.push(p),p=
  p.nextSibling;else if(K)p=p.nextSibling;else{var O=p.getAttribute(h)||p.getAttribute(k);u=p.firstChild;if(!O&&(!u||3==u.nodeType&&!u.nextSibling))p=p.nextSibling;else{K=null;if(O){var T=p.getAttribute(l);v=T?[O].concat(T.split(/\s*,\s*/)):[O];try{K=s(v)}catch(J){}K||g.forEach(v,function(a){~a.indexOf("/")&&!e[a]&&(e[a]=!0,d[d.length]=a)});T=K&&!K.prototype._noScript?[]:null;q={types:v,ctor:K,parent:q,node:p,scripts:T};q.inherited=c(q);f.push(q)}else q={node:p,scripts:v,parent:q};p=u;v=T;K=K&&K.prototype.stopParser&&
  !b.template}}else{if(!q||!q.node)break;p=q.node.nextSibling;K=!1;q=q.parent;v=q.scripts}var G=new n;d.length?(r("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+d.join(", ")),i(d,function(){G.resolve(g.filter(f,function(a){if(!a.ctor)try{a.ctor=s(a.types)}catch(c){}for(var f=a.parent;f&&!f.types;)f=f.parent;var d=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(d&&d.stopParser&&!b.template);a.instantiate=!f||f.instantiate&&f.instantiateChildren;return a.instantiate}))})):
  G.resolve(f);return G.promise},_require:function(a){var a=f.fromJson("{"+a.innerHTML+"}"),b=[],c=[],d=new n,e;for(e in a)b.push(e),c.push(a[e]);i(c,function(){for(var a=0;a<b.length;a++)h.setObject(b[a],arguments[a]);d.resolve(arguments)});return d.promise},_scanAmd:function(a){var b=new n,c=b.promise;b.resolve(!0);var f=this;m("script[type='dojo/require']",a).forEach(function(a){c=c.then(function(){return f._require(a)});a.parentNode.removeChild(a)});return c},parse:function(a,b){var f;!b&&a&&a.rootNode?
  (b=a,f=b.rootNode):a&&h.isObject(a)&&!("nodeType"in a)?b=a:f=a;f=f?d.byId(f):c.body();var b=b||{},e=b.template?{template:!0}:{},k=[],n=this,s=this._scanAmd(f,b).then(function(){return n.scan(f,b)}).then(function(a){return k=k.concat(n._instantiate(a,e,b))}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});h.mixin(k,s);return k}};j.parser=w;e.parseOnLoad&&p(100,w,"parse");return w})},"dojo/_base/html":function(){define("./kernel,../dom,../dom-style,../dom-attr,../dom-prop,../dom-class,../dom-construct,../dom-geometry".split(","),
  function(i,j,h,g,e,d,c,b){i.byId=j.byId;i.isDescendant=j.isDescendant;i.setSelectable=j.setSelectable;i.getAttr=g.get;i.setAttr=g.set;i.hasAttr=g.has;i.removeAttr=g.remove;i.getNodeProp=g.getNodeProp;i.attr=function(b,a,c){return 2==arguments.length?g["string"==typeof a?"get":"set"](b,a):g.set(b,a,c)};i.hasClass=d.contains;i.addClass=d.add;i.removeClass=d.remove;i.toggleClass=d.toggle;i.replaceClass=d.replace;i._toDom=i.toDom=c.toDom;i.place=c.place;i.create=c.create;i.empty=function(b){c.empty(b)};
  i._destroyElement=i.destroy=function(b){c.destroy(b)};i._getPadExtents=i.getPadExtents=b.getPadExtents;i._getBorderExtents=i.getBorderExtents=b.getBorderExtents;i._getPadBorderExtents=i.getPadBorderExtents=b.getPadBorderExtents;i._getMarginExtents=i.getMarginExtents=b.getMarginExtents;i._getMarginSize=i.getMarginSize=b.getMarginSize;i._getMarginBox=i.getMarginBox=b.getMarginBox;i.setMarginBox=b.setMarginBox;i._getContentBox=i.getContentBox=b.getContentBox;i.setContentSize=b.setContentSize;i._isBodyLtr=
  i.isBodyLtr=b.isBodyLtr;i._docScroll=i.docScroll=b.docScroll;i._getIeDocumentElementOffset=i.getIeDocumentElementOffset=b.getIeDocumentElementOffset;i._fixIeBiDiScrollLeft=i.fixIeBiDiScrollLeft=b.fixIeBiDiScrollLeft;i.position=b.position;i.marginBox=function(c,a){return a?b.setMarginBox(c,a):b.getMarginBox(c)};i.contentBox=function(c,a){return a?b.setContentSize(c,a):b.getContentBox(c)};i.coords=function(c,a){i.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");var c=j.byId(c),
  d=h.getComputedStyle(c),d=b.getMarginBox(c,d),e=b.position(c,a);d.x=e.x;d.y=e.y;return d};i.getProp=e.get;i.setProp=e.set;i.prop=function(b,a,c){return 2==arguments.length?e["string"==typeof a?"get":"set"](b,a):e.set(b,a,c)};i.getStyle=h.get;i.setStyle=h.set;i.getComputedStyle=h.getComputedStyle;i.__toPixelValue=i.toPixelValue=h.toPixelValue;i.style=function(b,a,c){switch(arguments.length){case 1:return h.get(b);case 2:return h["string"==typeof a?"get":"set"](b,a)}return h.set(b,a,c)};return i})},
  "dojo/_base/url":function(){define(["./kernel"],function(i){var j=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,h=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,g=function(){for(var e=arguments,d=[e[0]],c=1;c<e.length;c++)if(e[c]){var b=new g(e[c]+""),d=new g(d[0]+"");if(""==b.path&&!b.scheme&&!b.authority&&!b.query){if(null!=b.fragment)d.fragment=b.fragment;b=d}else if(!b.scheme&&(b.scheme=d.scheme,!b.authority&&(b.authority=d.authority,"/"!=b.path.charAt(0)))){for(var d=
  (d.path.substring(0,d.path.lastIndexOf("/")+1)+b.path).split("/"),f=0;f<d.length;f++)"."==d[f]?f==d.length-1?d[f]="":(d.splice(f,1),f--):0<f&&!(1==f&&""==d[0])&&".."==d[f]&&".."!=d[f-1]&&(f==d.length-1?(d.splice(f,1),d[f-1]=""):(d.splice(f-1,2),f-=2));b.path=d.join("/")}d=[];b.scheme&&d.push(b.scheme,":");b.authority&&d.push("//",b.authority);d.push(b.path);b.query&&d.push("?",b.query);b.fragment&&d.push("#",b.fragment)}this.uri=d.join("");e=this.uri.match(j);this.scheme=e[2]||(e[1]?"":null);this.authority=
  e[4]||(e[3]?"":null);this.path=e[5];this.query=e[7]||(e[6]?"":null);this.fragment=e[9]||(e[8]?"":null);if(null!=this.authority)e=this.authority.match(h),this.user=e[3]||null,this.password=e[4]||null,this.host=e[6]||e[7],this.port=e[9]||null};g.prototype.toString=function(){return this.uri};return i._Url=g})},"dojo/_base/json":function(){define(["./kernel","../json"],function(i,j){i.fromJson=function(h){return eval("("+h+")")};i._escapeString=j.stringify;i.toJsonIndentStr="\t";i.toJson=function(h,
  g){return j.stringify(h,function(e,d){if(d){var c=d.__json__||d.json;if("function"==typeof c)return c.call(d)}return d},g&&i.toJsonIndentStr)};return i})},"dojo/json":function(){define(["./has"],function(i){var j="undefined"!=typeof JSON;i.add("json-parse",j);i.add("json-stringify",j&&'{"a":1}'==JSON.stringify({a:0},function(g,e){return e||1}));if(i("json-stringify"))return JSON;var h=function(g){return('"'+g.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,
  "\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:i("json-parse")?JSON.parse:function(g,e){if(e&&!/^([\s\[\{]*(?:"(?:\\.|[^"])+"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(g))throw new SyntaxError("Invalid characters in JSON");return eval("("+g+")")},stringify:function(g,e,d){function c(f,a,k){e&&(f=e(k,f));var n;n=typeof f;if("number"==n)return isFinite(f)?f+"":"null";if("boolean"==n)return f+"";if(null===f)return"null";if("string"==typeof f)return h(f);
  if("function"==n||"undefined"==n)return b;if("function"==typeof f.toJSON)return c(f.toJSON(k),a,k);if(f instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(a,b,c){a=f["getUTC"+b]()+(c?1:0);return 10>a?"0"+a:a});if(f.valueOf()!==f)return c(f.valueOf(),a,k);var g=d?a+d:"",m=d?" ":"",l=d?"\n":"";if(f instanceof Array){for(var m=f.length,p=[],k=0;k<m;k++)n=c(f[k],g,k),"string"!=typeof n&&(n="null"),p.push(l+g+n);return"["+p.join(",")+l+
  a+"]"}p=[];for(k in f){var i;if(f.hasOwnProperty(k)){if("number"==typeof k)i='"'+k+'"';else if("string"==typeof k)i=h(k);else continue;n=c(f[k],g,k);"string"==typeof n&&p.push(l+g+i+":"+m+n)}}return"{"+p.join(",")+l+a+"}"}var b;"string"==typeof e&&(d=e,e=null);return c(g,"","")}}})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(i,j){var h={};i.setObject("dojo.date.stamp",h);h.fromISOString=function(g,e){if(!h._isoRegExp)h._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;
  var d=h._isoRegExp.exec(g),c=null;if(d){d.shift();d[1]&&d[1]--;d[6]&&(d[6]*=1E3);e&&(e=new Date(e),j.forEach(j.map("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds".split(","),function(a){return e["get"+a]()}),function(a,b){d[b]=d[b]||a}));c=new Date(d[0]||1970,d[1]||0,d[2]||1,d[3]||0,d[4]||0,d[5]||0,d[6]||0);100>d[0]&&c.setFullYear(d[0]||1970);var b=0,f=d[7]&&d[7].charAt(0);"Z"!=f&&(b=60*(d[8]||0)+(Number(d[9])||0),"-"!=f&&(b*=-1));f&&(b-=c.getTimezoneOffset());b&&c.setTime(c.getTime()+6E4*
  b)}return c};h.toISOString=function(g,e){var d=function(a){return 10>a?"0"+a:a},e=e||{},c=[],b=e.zulu?"getUTC":"get",f="";"time"!=e.selector&&(f=g[b+"FullYear"](),f=["0000".substr((f+"").length)+f,d(g[b+"Month"]()+1),d(g[b+"Date"]())].join("-"));c.push(f);if("date"!=e.selector){f=[d(g[b+"Hours"]()),d(g[b+"Minutes"]()),d(g[b+"Seconds"]())].join(":");b=g[b+"Milliseconds"]();e.milliseconds&&(f+="."+(100>b?"0":"")+d(b));if(e.zulu)f+="Z";else if("time"!=e.selector)var b=g.getTimezoneOffset(),a=Math.abs(b),
  f=f+((0<b?"-":"+")+d(Math.floor(a/60))+":"+d(a%60));c.push(f)}return c.join("T")};return h})},"dojo/i18n":function(){define("./_base/kernel,require,./has,./_base/array,./_base/config,./_base/lang,./_base/xhr,./json,module".split(","),function(i,j,h,g,e,d,c,b,f){h.add("dojo-preload-i18n-Api",1);var c=i.i18n={},a=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,k=function(a,b,c,f){for(var d=[c+f],b=b.split("-"),e="",k=0;k<b.length;k++)e+=(e?"-":"")+b[k],(!a||a[e])&&d.push(c+e+"/"+f);return d},n={},r=function(a,
  b,c){c=c?c.toLowerCase():i.locale;a=a.replace(/\./g,"/");b=b.replace(/\./g,"/");return/root/i.test(c)?a+"/nls/"+b:a+"/nls/"+c+"/"+b};i.getL10nName=function(a,b,c){return f.id+"!"+r(a,b,c)};var m=function(a,b,c,f,e,s){a([b],function(l){var g=d.clone(l.root),h=k(!l._v1x&&l,e,c,f);a(h,function(){for(var a=1;a<h.length;a++)g=d.mixin(d.clone(g),arguments[a]);n[b+"/"+e]=g;s()})})},l=function(a){var b=e.extraLocale||[],b=d.isArray(b)?b:[b];b.push(a);return b},p=function(c,f,e){if(h("dojo-preload-i18n-Api")){var k=
  c.split("*"),s="preload"==k[1];s&&(n[c]||(n[c]=1,w(k[2],b.parse(k[3]),1,f)),e(1));if(!(k=s))u&&v.push([c,f,e]),k=u;if(k)return}var c=a.exec(c),p=c[1]+"/",q=c[5]||c[4],j=p+q,k=(c=c[5]&&c[4])||i.locale,r=j+"/"+k,c=c?[k]:l(k),y=c.length,x=function(){--y||e(d.delegate(n[r]))};g.forEach(c,function(a){var b=j+"/"+a;h("dojo-preload-i18n-Api")&&t(b);n[b]?x():m(f,j,p,q,a,x)})};if(h("dojo-unit-tests"))var q=c.unitTests=[];h("dojo-preload-i18n-Api");var s=c.normalizeLocale=function(a){a=a?a.toLowerCase():i.locale;
  return"root"==a?"ROOT":a},u=0,v=[],w=c._preloadLocalizations=function(a,b,c,f){function d(a,b){f([a],b)}function e(a,b){for(var c=a.split("-");c.length;){if(b(c.join("-")))return;c.pop()}b("ROOT")}function k(c){c=s(c);e(c,function(c){if(0<=g.indexOf(b,c)){var f=a.replace(/\./g,"/")+"_"+c;u++;d(f,function(a){for(var b in a)n[j.toAbsMid(b)+"/"+c]=a[b];for(--u;!u&&v.length;)p.apply(null,v.shift())});return!0}return!1})}f=f||j;k();g.forEach(i.config.extraLocale,k)},t=function(){},y={},x=new Function("__bundle",
  "__checkForLegacyModules","__mid","__amdValue","var define = function(mid, factory){define.called = 1; __amdValue.result = factory || mid;},\t   require = function(){define.called = 1;};try{define.called = 0;eval(__bundle);if(define.called==1)return __amdValue;if((__checkForLegacyModules = __checkForLegacyModules(__mid)))return __checkForLegacyModules;}catch(e){}try{return eval('('+__bundle+')');}catch(e){return e;}"),t=function(a){for(var b,c=a.split("/"),f=i.global[c[0]],d=1;f&&d<c.length-1;f=f[c[d++]]);
  f&&((b=f[c[d]])||(b=f[c[d].replace(/-/g,"_")]),b&&(n[a]=b));return b};c.getLocalization=function(a,b,c){var f,a=r(a,b,c);p(a,j,function(a){f=a});return f};h("dojo-unit-tests")&&q.push(function(a){a.register("tests.i18n.unit",function(a){var b;b=x("{prop:1}",t,"nonsense",y);a.is({prop:1},b);a.is(void 0,b[1]);b=x("({prop:1})",t,"nonsense",y);a.is({prop:1},b);a.is(void 0,b[1]);b=x("{'prop-x':1}",t,"nonsense",y);a.is({"prop-x":1},b);a.is(void 0,b[1]);b=x("({'prop-x':1})",t,"nonsense",y);a.is({"prop-x":1},
  b);a.is(void 0,b[1]);b=x("define({'prop-x':1})",t,"nonsense",y);a.is(y,b);a.is({"prop-x":1},y.result);b=x("define('some/module', {'prop-x':1})",t,"nonsense",y);a.is(y,b);a.is({"prop-x":1},y.result);b=x("this is total nonsense and should throw an error",t,"nonsense",y);a.is(b instanceof Error,!0)})});return d.mixin(c,{dynamic:!0,normalize:function(a,b){return/^\./.test(a)?b(a):a},load:p,cache:n})})},"dojo/_base/xhr":function(){define("./kernel,./sniff,require,../io-query,../dom,../dom-form,./Deferred,./config,./json,./lang,./array,../on,../aspect,../request/watch,../request/xhr,../request/util".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p){i._xhrObj=l._create;var q=i.config;i.objectToQuery=g.objectToQuery;i.queryToObject=g.queryToObject;i.fieldToObject=d.fieldToObject;i.formToObject=d.toObject;i.formToQuery=d.toQuery;i.formToJson=d.toJson;i._blockAsync=!1;var s=i._contentHandlers=i.contentHandlers={text:function(a){return a.responseText},json:function(a){return f.fromJson(a.responseText||null)},"json-comment-filtered":function(a){b.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");
  var a=a.responseText,c=a.indexOf("/*"),d=a.lastIndexOf("*/");if(-1==c||-1==d)throw Error("JSON was not comment filtered");return f.fromJson(a.substring(c+2,d))},javascript:function(a){return i.eval(a.responseText)},xml:function(a){var b=a.responseXML;if(j("ie")&&(!b||!b.documentElement)){var c=function(a){return"MSXML"+a+".DOMDocument"},c=["Microsoft.XMLDOM",c(6),c(4),c(3),c(2)];k.some(c,function(c){try{var f=new ActiveXObject(c);f.async=!1;f.loadXML(a.responseText);b=f}catch(d){return!1}return!0})}return b},
  "json-comment-optional":function(a){return a.responseText&&/^[^{\[]*\/\*/.test(a.responseText)?s["json-comment-filtered"](a):s.json(a)}};i._ioSetArgs=function(b,f,k,n){var s={args:b,url:b.url},l=null;if(b.form){var l=e.byId(b.form),h=l.getAttributeNode("action");s.url=s.url||(h?h.value:null);l=d.toObject(l)}h=[{}];l&&h.push(l);b.content&&h.push(b.content);b.preventCache&&h.push({"dojo.preventCache":(new Date).valueOf()});s.query=g.objectToQuery(a.mixin.apply(null,h));s.handleAs=b.handleAs||"text";
  var m=new c(function(a){a.canceled=!0;f&&f(a);var b=a.ioArgs.error;if(!b)b=Error("request cancelled"),b.dojoType="cancel",a.ioArgs.error=b;return b});m.addCallback(k);var t=b.load;t&&a.isFunction(t)&&m.addCallback(function(a){return t.call(b,a,s)});var p=b.error;p&&a.isFunction(p)&&m.addErrback(function(a){return p.call(b,a,s)});var j=b.handle;j&&a.isFunction(j)&&m.addBoth(function(a){return j.call(b,a,s)});m.addErrback(function(a){return n(a,m)});q.ioPublish&&i.publish&&!1!==s.args.ioPublish&&(m.addCallbacks(function(a){i.publish("/dojo/io/load",
  [m,a]);return a},function(a){i.publish("/dojo/io/error",[m,a]);return a}),m.addBoth(function(a){i.publish("/dojo/io/done",[m,a]);return a}));m.ioArgs=s;return m};var u=function(a){a=s[a.ioArgs.handleAs](a.ioArgs.xhr);return void 0===a?null:a},v=function(a,b){b.ioArgs.args.failOk||console.error(a);return a},w=function(a){0>=t&&(t=0,q.ioPublish&&i.publish&&(!a||a&&!1!==a.ioArgs.args.ioPublish)&&i.publish("/dojo/io/stop"))},t=0;r.after(m,"_onAction",function(){t-=1});r.after(m,"_onInFlight",w);i._ioCancelAll=
  m.cancelAll;i._ioNotifyStart=function(a){q.ioPublish&&i.publish&&!1!==a.ioArgs.args.ioPublish&&(t||i.publish("/dojo/io/start"),t+=1,i.publish("/dojo/io/send",[a]))};i._ioWatch=function(b,c,f,d){b.ioArgs.options=b.ioArgs.args;a.mixin(b,{response:b.ioArgs,isValid:function(){return c(b)},isReady:function(){return f(b)},handleResponse:function(){return d(b)}});m(b);w(b)};i._ioAddQueryToUrl=function(a){if(a.query.length)a.url+=(-1==a.url.indexOf("?")?"?":"&")+a.query,a.query=null};i.xhr=function(a,b,c){var f,
  d=i._ioSetArgs(b,function(){f&&f.cancel()},u,v),e=d.ioArgs;"postData"in b?e.query=b.postData:"putData"in b?e.query=b.putData:"rawBody"in b?e.query=b.rawBody:(2<arguments.length&&!c||-1==="POST|PUT".indexOf(a.toUpperCase()))&&i._ioAddQueryToUrl(e);var k={method:a,handleAs:"text",timeout:b.timeout,withCredentials:b.withCredentials,ioArgs:e};if("undefined"!==typeof b.headers)k.headers=b.headers;if("undefined"!==typeof b.contentType){if(!k.headers)k.headers={};k.headers["Content-Type"]=b.contentType}if("undefined"!==
  typeof e.query)k.data=e.query;if("undefined"!==typeof b.sync)k.sync=b.sync;i._ioNotifyStart(d);try{f=l(e.url,k,!0)}catch(s){return d.cancel(),d}d.ioArgs.xhr=f.response.xhr;f.then(function(){d.resolve(d)}).otherwise(function(a){e.error=a;if(a.response)a.status=a.response.status,a.responseText=a.response.text,a.xhr=a.response.xhr;d.reject(a)});return d};i.xhrGet=function(a){return i.xhr("GET",a)};i.rawXhrPost=i.xhrPost=function(a){return i.xhr("POST",a,!0)};i.rawXhrPut=i.xhrPut=function(a){return i.xhr("PUT",
  a,!0)};i.xhrDelete=function(a){return i.xhr("DELETE",a)};i._isDocumentOk=function(a){return p.checkStatus(a.status)};i._getText=function(a){var b;i.xhrGet({url:a,sync:!0,load:function(a){b=a}});return b};a.mixin(i.xhr,{_xhrObj:i._xhrObj,fieldToObject:d.fieldToObject,formToObject:d.toObject,objectToQuery:g.objectToQuery,formToQuery:d.toQuery,formToJson:d.toJson,queryToObject:g.queryToObject,contentHandlers:s,_ioSetArgs:i._ioSetArgs,_ioCancelAll:i._ioCancelAll,_ioNotifyStart:i._ioNotifyStart,_ioWatch:i._ioWatch,
  _ioAddQueryToUrl:i._ioAddQueryToUrl,_isDocumentOk:i._isDocumentOk,_getText:i._getText,get:i.xhrGet,post:i.xhrPost,put:i.xhrPut,del:i.xhrDelete});return i.xhr})},"dojo/io-query":function(){define(["./_base/lang"],function(i){var j={};return{objectToQuery:function(h){var g=encodeURIComponent,e=[],d;for(d in h){var c=h[d];if(c!=j[d]){var b=g(d)+"=";if(i.isArray(c))for(var f=0,a=c.length;f<a;++f)e.push(b+g(c[f]));else e.push(b+g(c))}}return e.join("&")},queryToObject:function(h){for(var g=decodeURIComponent,
  h=h.split("&"),e={},d,c,b=0,f=h.length;b<f;++b)if(c=h[b],c.length){var a=c.indexOf("=");0>a?(d=g(c),c=""):(d=g(c.slice(0,a)),c=g(c.slice(a+1)));"string"==typeof e[d]&&(e[d]=[e[d]]);i.isArray(e[d])?e[d].push(c):e[d]=c}return e}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(i,j,h,g){var e={fieldToObject:function(d){var c=null;if(d=j.byId(d)){var b=d.name,f=(d.type||"").toLowerCase();if(b&&f&&!d.disabled)if("radio"==f||"checkbox"==f){if(d.checked)c=d.value}else if(d.multiple){c=
  [];for(d=[d.firstChild];d.length;)for(b=d.pop();b;b=b.nextSibling)if(1==b.nodeType&&"option"==b.tagName.toLowerCase())b.selected&&c.push(b.value);else{b.nextSibling&&d.push(b.nextSibling);b.firstChild&&d.push(b.firstChild);break}}else c=d.value}return c},toObject:function(d){for(var c={},d=j.byId(d).elements,b=0,f=d.length;b<f;++b){var a=d[b],k=a.name,n=(a.type||"").toLowerCase();if(k&&n&&0>"file|submit|image|reset|button".indexOf(n)&&!a.disabled){var g=c,h=k,a=e.fieldToObject(a);if(null!==a){var l=
  g[h];"string"==typeof l?g[h]=[l,a]:i.isArray(l)?l.push(a):g[h]=a}if("image"==n)c[k+".x"]=c[k+".y"]=c[k].x=c[k].y=0}}return c},toQuery:function(d){return h.objectToQuery(e.toObject(d))},toJson:function(d,c){return g.stringify(e.toObject(d),null,c?4:0)}};return e})},"dojo/request/watch":function(){define("./util,../errors/RequestTimeoutError,../errors/CancelError,../_base/array,../_base/window,../has!host-browser?dom-addeventlistener?:../on:".split(","),function(i,j,h,g,e,d){function c(){for(var c=
  +new Date,d=0,e;d<a.length&&(e=a[d]);d++){var g=e.response,l=g.options;if(e.isCanceled&&e.isCanceled()||e.isValid&&!e.isValid(g))a.splice(d--,1),b._onAction&&b._onAction();else if(e.isReady&&e.isReady(g))a.splice(d--,1),e.handleResponse(g),b._onAction&&b._onAction();else if(e.startTime&&e.startTime+(l.timeout||0)<c)a.splice(d--,1),e.cancel(new j("Timeout exceeded",g)),b._onAction&&b._onAction()}b._onInFlight&&b._onInFlight(e);a.length||(clearInterval(f),f=null)}function b(b){if(b.response.options.timeout)b.startTime=
  +new Date;b.isFulfilled()||(a.push(b),f||(f=setInterval(c,50)),b.response.options.sync&&c())}var f=null,a=[];b.cancelAll=function(){try{g.forEach(a,function(a){try{a.cancel(new h("All requests canceled."))}catch(b){}})}catch(b){}};e&&d&&e.doc.attachEvent&&d(e.global,"unload",function(){b.cancelAll()});return b})},"dojo/request/util":function(){define("exports,../errors/RequestError,../errors/CancelError,../Deferred,../io-query,../_base/array,../_base/lang".split(","),function(i,j,h,g,e,d,c){function b(a){return f(a)}
  i.deepCopy=function(a,b){for(var c in b){var f=a[c],d=b[c];f!==d&&(f&&"object"===typeof f&&d&&"object"===typeof d?i.deepCopy(f,d):a[c]=d)}return a};i.deepCreate=function(a,b){var b=b||{},f=c.delegate(a),d,e;for(d in a)(e=a[d])&&"object"===typeof e&&(f[d]=i.deepCreate(e,b[d]));return i.deepCopy(f,b)};var f=Object.freeze||function(a){return a};i.deferred=function(a,d,e,r,m,l){var p=new g(function(b){d&&d(p,a);return!b||!(b instanceof j)&&!(b instanceof h)?new h("Request canceled",a):b});p.response=
  a;p.isValid=e;p.isReady=r;p.handleResponse=m;e=p.then(b).otherwise(function(b){b.response=a;throw b;});i.notify&&e.then(c.hitch(i.notify,"emit","load"),c.hitch(i.notify,"emit","error"));r=e.then(function(a){return a.data||a.text});e=f(c.delegate(r,{response:e}));l&&p.then(function(a){l.call(p,a)},function(b){l.call(p,a,b)});p.promise=e;p.then=e.then;return p};i.addCommonMethods=function(a,b){d.forEach(b||["GET","POST","PUT","DELETE"],function(b){a[("DELETE"===b?"DEL":b).toLowerCase()]=function(f,
  d){d=c.delegate(d||{});d.method=b;return a(f,d)}})};i.parseArgs=function(a,b,c){var f=b.data,d=b.query;if(f&&!c&&"object"===typeof f)b.data=e.objectToQuery(f);d?("object"===typeof d&&(d=e.objectToQuery(d)),b.preventCache&&(d+=(d?"&":"")+"request.preventCache="+ +new Date)):b.preventCache&&(d="request.preventCache="+ +new Date);a&&d&&(a+=(~a.indexOf("?")?"&":"?")+d);return{url:a,options:b,getHeader:function(){return null}}};i.checkStatus=function(a){a=a||0;return 200<=a&&300>a||304===a||1223===a||
  !a}})},"dojo/errors/RequestError":function(){define(["./create"],function(i){return i("RequestError",function(i,h){this.response=h})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(i,j){return i("RequestTimeoutError",null,j,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(i,j,h,g,e){function d(a,b){var c=a.xhr;a.status=a.xhr.status;a.text=c.responseText;if("xml"===
  a.options.handleAs)a.data=c.responseXML;if(!b)try{h(a)}catch(f){b=f}b?this.reject(b):g.checkStatus(c.status)?this.resolve(a):(b=new i("Unable to load "+a.url+" status: "+c.status,a),this.reject(b))}function c(l,h,s){var m=g.parseArgs(l,g.deepCreate(r,h),e("native-formdata")&&h&&h.data&&h.data instanceof FormData),l=m.url,h=m.options,v,w=g.deferred(m,k,b,f,d,function(){v&&v()}),t=m.xhr=c._create();if(!t)return w.cancel(new i("XHR was not created")),s?w:w.promise;m.getHeader=function(a){return this.xhr.getResponseHeader(a)};
  a&&(v=a(t,w,m));var y=h.data,x=!h.sync,B=h.method;try{t.open(B,l,x,h.user||n,h.password||n);if(h.withCredentials)t.withCredentials=h.withCredentials;var C=h.headers,A;if(C)for(var E in C)"content-type"===E.toLowerCase()?A=C[E]:C[E]&&t.setRequestHeader(E,C[E]);A&&!1!==A&&t.setRequestHeader("Content-Type",A);(!C||!("X-Requested-With"in C))&&t.setRequestHeader("X-Requested-With","XMLHttpRequest");g.notify&&g.notify.emit("send",m,w.promise.cancel);t.send(y)}catch(N){w.reject(N)}j(w);t=null;return s?w:
  w.promise}e.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});e.add("dojo-force-activex-xhr",function(){return e("activex")&&!document.addEventListener&&"file:"===window.location.protocol});e.add("native-xhr2",function(){if(e("native-xhr")){var a=new XMLHttpRequest;return"undefined"!==typeof a.addEventListener&&("undefined"===typeof opera||"undefined"!==typeof a.upload)}});e.add("native-formdata",function(){return"function"===typeof FormData});var b,f,a,k;e("native-xhr2")?(b=
  function(){return!this.isFulfilled()},k=function(a,b){b.xhr.abort()},a=function(a,b,c){function f(){b.handleResponse(c)}function d(a){a=new i("Unable to load "+c.url+" status: "+a.target.status,c);b.handleResponse(c,a)}function e(a){if(a.lengthComputable)c.loaded=a.loaded,c.total=a.total,b.progress(c)}a.addEventListener("load",f,!1);a.addEventListener("error",d,!1);a.addEventListener("progress",e,!1);return function(){a.removeEventListener("load",f,!1);a.removeEventListener("error",d,!1);a.removeEventListener("progress",
  e,!1)}}):(b=function(a){return a.xhr.readyState},f=function(a){return 4===a.xhr.readyState},k=function(a,b){var c=b.xhr,f=typeof c.abort;("function"===f||"object"===f||"unknown"===f)&&c.abort()});var n,r={data:null,query:null,sync:!1,method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded"}};c._create=function(){throw Error("XMLHTTP not available");};if(e("native-xhr")&&!e("dojo-force-activex-xhr"))c._create=function(){return new XMLHttpRequest};else if(e("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),
  c._create=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(m){try{new ActiveXObject("Microsoft.XMLHTTP"),c._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(l){}}g.addCommonMethods(c);return c})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has"],function(i,j,h,g){function e(c){var a=b[c.options.handleAs];c.data=a?a(c):c.data||c.text;return c}g.add("activex","undefined"!==typeof ActiveXObject);var d;if(g("activex")){var c=
  ["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"];d=function(b){var a=b.data;if(!a||!a.documentElement){var d=b.text;h.some(c,function(b){try{var c=new ActiveXObject(b);c.async=!1;c.loadXML(d);a=c}catch(f){return!1}return!0})}return a}}var b={javascript:function(b){return j.eval(b.text||"")},json:function(b){return i.parse(b.text||null)},xml:d};e.register=function(c,a){b[c]=a};return e})},"dijit/layout/BorderContainer":function(){define("dojo/_base/array,dojo/cookie,dojo/_base/declare,dojo/dom-class,dojo/dom-construct,dojo/dom-geometry,dojo/dom-style,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/on,dojo/touch,../_WidgetBase,../_Widget,../_TemplatedMixin,./_LayoutWidget,./utils".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){var s=h("dijit.layout._Splitter",[m,l],{live:!0,templateString:'<div class="dijitSplitter" data-dojo-attach-event="onkeypress:_onKeyPress,press:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',constructor:function(){this._handlers=[]},postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?
  1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);g.add(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=j(this._cookieName);a&&(this.child.domNode.style[this.horizontal?"height":"width"]=a)}},_computeMaxSize:function(){var a=this.horizontal?"h":"w",b=d.getMarginBox(this.child.domNode)[a],c=i.filter(this.container.getChildren(),function(a){return"center"==a.region})[0],a=d.getMarginBox(c.domNode)[a];
  return Math.min(this.child.maxSize,b+a)},_startDrag:function(c){if(!this.cover)this.cover=e.place("<div class=dijitSplitterCover></div>",this.child.domNode,"after");g.add(this.cover,"dijitSplitterCoverActive");this.fake&&e.destroy(this.fake);if(!(this._resize=this.live))(this.fake=this.domNode.cloneNode(!0)).removeAttribute("id"),g.add(this.domNode,"dijitSplitterShadow"),e.place(this.fake,this.domNode,"after");g.add(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");
  this.fake&&g.remove(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var f=this._factor,l=this.horizontal,s=l?"pageY":"pageX",h=c[s],m=this.domNode.style,p=d.getMarginBox(this.child.domNode)[l?"h":"w"],i=this._computeMaxSize(),j=this.child.minSize||20,l=this.region,q="top"==l||"bottom"==l?"top":"left",r=parseInt(m[q],10),u=this._resize,D=a.hitch(this.container,"_layoutChildren",this.child.id),l=this.ownerDocument;this._handlers=this._handlers.concat([k(l,n.move,this._drag=
  function(a,b){var c=a[s]-h,d=f*c+p,e=Math.max(Math.min(d,i),j);(u||b)&&D(e);m[q]=c+r+f*(e-d)+"px"}),k(l,"dragstart",b.stop),k(this.ownerDocumentBody,"selectstart",b.stop),k(l,n.release,a.hitch(this,"_stopDrag"))]);b.stop(c)},_onMouse:function(a){a="mouseover"==a.type||"mouseenter"==a.type;g.toggle(this.domNode,"dijitSplitterHover",a);g.toggle(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&g.remove(this.cover,"dijitSplitterCoverActive"),this.fake&&
  e.destroy(this.fake),g.remove(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow"),this._drag(a),this._drag(a,!0)}finally{this._cleanupHandlers(),delete this._drag}this.container.persist&&j(this._cookieName,this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){for(var a;a=this._handlers.pop();)a.remove()},_onKeyPress:function(a){this._resize=!0;var c=this.horizontal,e=1;switch(a.charOrCode){case c?
  f.UP_ARROW:f.LEFT_ARROW:e*=-1;case c?f.DOWN_ARROW:f.RIGHT_ARROW:break;default:return}c=d.getMarginSize(this.child.domNode)[c?"h":"w"]+this._factor*e;this.container._layoutChildren(this.child.id,Math.max(Math.min(c,this._computeMaxSize()),this.child.minSize));b.stop(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}}),u=h("dijit.layout._Gutter",[m,l],{templateString:'<div class="dijitGutter" role="presentation"></div>',
  postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);g.add(this.domNode,"dijitGutter"+(this.horizontal?"H":"V"))}}),h=h("dijit.layout.BorderContainer",p,{design:"headline",gutters:!0,liveSplitters:!0,persist:!1,baseClass:"dijitBorderContainer",_splitterClass:s,postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){this._started||(i.forEach(this.getChildren(),
  this._setupChild,this),this.inherited(arguments))},_setupChild:function(b){var c=b.region;if(c){this.inherited(arguments);g.add(b.domNode,this.baseClass+"Pane");var f=this.isLeftToRight();"leading"==c&&(c=f?"left":"right");"trailing"==c&&(c=f?"right":"left");if("center"!=c&&(b.splitter||this.gutters)&&!b._splitterWidget)f=b.splitter?this._splitterClass:u,a.isString(f)&&(f=a.getObject(f)),f=new f({id:b.id+"_splitter",container:this,child:b,region:c,live:this.liveSplitters}),f.isSplitter=!0,b._splitterWidget=
  f,e.place(f.domNode,b.domNode,"after"),f.startup();b.region=c}},layout:function(){this._layoutChildren()},addChild:function(a,b){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var b=a.region,f=a._splitterWidget;f&&(f.destroy(),delete a._splitterWidget);this.inherited(arguments);this._started&&this._layoutChildren();g.remove(a.domNode,this.baseClass+"Pane");c.set(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});c.set(a.domNode,"top"==
  b||"bottom"==b?"width":"height","auto")},getChildren:function(){return i.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return i.filter(this.getChildren(),function(b){return b.region==a})[0]._splitterWidget},resize:function(a,b){if(!this.cs||!this.pe){var f=this.domNode;this.cs=c.getComputedStyle(f);this.pe=d.getPadExtents(f,this.cs);this.pe.r=c.toPixelValue(f,this.cs.paddingRight);this.pe.b=c.toPixelValue(f,this.cs.paddingBottom);c.set(f,"padding","0px")}this.inherited(arguments)},
  _layoutChildren:function(a,b){if(this._borderBox&&this._borderBox.h){var c=i.map(this.getChildren(),function(a,b){return{pane:a,weight:["center"==a.region?Infinity:0,a.layoutPriority,("sidebar"==this.design?1:-1)*(/top|bottom/.test(a.region)?1:-1),b]}},this);c.sort(function(a,b){for(var c=a.weight,f=b.weight,d=0;d<c.length;d++)if(c[d]!=f[d])return c[d]-f[d];return 0});var f=[];i.forEach(c,function(a){a=a.pane;f.push(a);a._splitterWidget&&f.push(a._splitterWidget)});q.layoutChildren(this.domNode,{l:this.pe.l,
  t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},f,a,b)}},destroyRecursive:function(){i.forEach(this.getChildren(),function(a){var b=a._splitterWidget;b&&b.destroy();delete a._splitterWidget});this.inherited(arguments)}});h.ChildWidgetProperties={region:"",layoutPriority:0,splitter:!1,minSize:0,maxSize:Infinity};a.extend(r,h.ChildWidgetProperties);h._Splitter=s;h._Gutter=u;return h})},"dojo/cookie":function(){define("dojo/cookie",["./_base/kernel","./regexp"],function(i,j){i.cookie=
  function(h,g,e){var d=document.cookie,c;if(1==arguments.length)c=(c=d.match(RegExp("(?:^|; )"+j.escapeString(h)+"=([^;]*)")))?decodeURIComponent(c[1]):void 0;else{e=e||{};d=e.expires;if("number"==typeof d){var b=new Date;b.setTime(b.getTime()+864E5*d);d=e.expires=b}if(d&&d.toUTCString)e.expires=d.toUTCString();var g=encodeURIComponent(g),d=h+"="+g,f;for(f in e)d+="; "+f,b=e[f],!0!==b&&(d+="="+b);document.cookie=d}return c};i.cookie.isSupported=function(){if(!("cookieEnabled"in navigator))this("__djCookieTest__",
  "CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1});return navigator.cookieEnabled};return i.cookie})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(i,j){var h={};j.setObject("dojo.regexp",h);h.escapeString=function(g,e){return g.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return e&&-1!=e.indexOf(d)?d:"\\"+d})};h.buildGroupRE=function(g,e,d){if(!(g instanceof Array))return e(g);
  for(var c=[],b=0;b<g.length;b++)c.push(e(g[b]));return h.group(c.join("|"),d)};h.group=function(g,e){return"("+(e?"?:":"")+g+")"};return h})},"dojo/touch":function(){define("./_base/kernel,./aspect,./dom,./on,./has,./mouse,./ready,./_base/window".split(","),function(i,j,h,g,e,d,c,b){function f(a){return function(b,c){return g(b,a,c)}}var j=e("touch"),a=!1;e("ios")&&(e=navigator.userAgent.match(/OS ([\d_]+)/)?RegExp.$1:"1",a=5>parseFloat(e.replace(/_/,".").replace(/_/g,"")));var k,n;j&&(c(function(){n=
  b.body();b.doc.addEventListener("touchstart",function(a){var b=n;n=a.target;g.emit(b,"dojotouchout",{target:b,relatedTarget:n,bubbles:!0});g.emit(n,"dojotouchover",{target:n,relatedTarget:b,bubbles:!0})},!0);g(b.doc,"touchmove",function(c){if((c=b.doc.elementFromPoint(c.pageX-(a?0:b.global.pageXOffset),c.pageY-(a?0:b.global.pageYOffset)))&&n!==c)g.emit(n,"dojotouchout",{target:n,relatedTarget:c,bubbles:!0}),g.emit(c,"dojotouchover",{target:c,relatedTarget:n,bubbles:!0}),n=c})}),k=function(a,c){return g(b.doc,
  "touchmove",function(f){if(a===b.doc||h.isDescendant(n,a))f.target=n,c.call(this,f)})});d={press:f(j?"touchstart":"mousedown"),move:j?k:f("mousemove"),release:f(j?"touchend":"mouseup"),cancel:j?f("touchcancel"):d.leave,over:f(j?"dojotouchover":"mouseover"),out:f(j?"dojotouchout":"mouseout"),enter:d._eventHandler(j?"dojotouchover":"mouseover"),leave:d._eventHandler(j?"dojotouchout":"mouseout")};return i.touch=d})},"dijit/_TemplatedMixin":function(){define("dojo/_base/lang,dojo/touch,./_WidgetBase,dojo/string,dojo/cache,dojo/_base/array,dojo/_base/declare,dojo/dom-construct,dojo/sniff,dojo/_base/unload".split(","),
  function(i,j,h,g,e,d,c,b,f,a){var k=c("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:!1,_earlyTemplatedStartup:!1,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var b=this.declaredClass,c=this;return g.substitute(a,this,function(a,f){"!"==f.charAt(0)&&(a=i.getObject(f.substr(1),!1,c));if("undefined"==typeof a)throw Error(b+" template:"+f);return null==a?"":"!"==f.charAt(0)?a:a.toString().replace(/"/g,"&quot;")},this)},
  buildRendering:function(){if(!this.templateString)this.templateString=e(this.templatePath,{sanitize:!0});var a=k.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),c;if(i.isString(a)){if(c=b.toDom(this._stringRepl(a),this.ownerDocument),1!=c.nodeType)throw Error("Invalid template: "+a);}else c=a.cloneNode(!0);this.domNode=c;this.inherited(arguments);this._attachTemplateNodes(c,function(a,b){return a.getAttribute(b)});this._beforeFillContent();this._fillContent(this.srcNodeRef)},
  _beforeFillContent:function(){},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)},_attachTemplateNodes:function(a,b){for(var c=i.isArray(a)?a:a.all||a.getElementsByTagName("*"),f=i.isArray(a)?0:-1;0>f||c[f];f++){var d=-1==f?a:c[f];if(!this.widgetsInTemplate||!b(d,"dojoType")&&!b(d,"data-dojo-type")){var e=b(d,"dojoAttachPoint")||b(d,"data-dojo-attach-point");if(e)for(var k=e.split(/\s*,\s*/);e=k.shift();)i.isArray(this[e])?this[e].push(d):
  this[e]=d,this._attachPoints.push(e);if(e=b(d,"dojoAttachEvent")||b(d,"data-dojo-attach-event"))for(var k=e.split(/\s*,\s*/),g=i.trim;e=k.shift();)if(e){var h=null;-1!=e.indexOf(":")?(h=e.split(":"),e=g(h[0]),h=g(h[1])):e=g(e);h||(h=e);this._attachEvents.push(this.connect(d,j[e]||e,h))}}}},destroyRendering:function(){d.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];d.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});
  k._templateCache={};k.getCachedTemplate=function(a,c,f){var d=k._templateCache,e=a,h=d[e];if(h){try{if(!h.ownerDocument||h.ownerDocument==(f||document))return h}catch(s){}b.destroy(h)}a=g.trim(a);if(c||a.match(/\$\{([^\}]+)\}/g))return d[e]=a;c=b.toDom(a,f);if(1!=c.nodeType)throw Error("Invalid template: "+a);return d[e]=c};f("ie")&&a.addOnWindowUnload(function(){var a=k._templateCache,c;for(c in a){var f=a[c];"object"==typeof f&&b.destroy(f);delete a[c]}});i.extend(h,{dojoAttachEvent:"",dojoAttachPoint:""});
  return k})},"dojo/cache":function(){define("dojo/cache",["./_base/kernel","./text"],function(i){return i.cache})},"dojo/text":function(){define(["./_base/kernel","require","./has","./_base/xhr"],function(i,j,h,g){var e;e=function(a,b,c){g("GET",{url:a,sync:!!b,load:c,headers:i.config.textPluginHeaders||{}})};var d={},c=function(a){if(a){var a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""),b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}else a="";return a},b=
  {},f={};i.cache=function(a,b,f){var g;"string"==typeof a?/\//.test(a)?(g=a,f=b):g=j.toUrl(a.replace(/\./g,"/")+(b?"/"+b:"")):(g=a+"",f=b);a=void 0!=f&&"string"!=typeof f?f.value:f;f=f&&f.sanitize;if("string"==typeof a)return d[g]=a,f?c(a):a;if(null===a)return delete d[g],null;g in d||e(g,!0,function(a){d[g]=a});return f?c(d[g]):d[g]};return{dynamic:!0,normalize:function(a,b){var c=a.split("!"),f=c[0];return(/^\./.test(f)?b(f):f)+(c[1]?"!"+c[1]:"")},load:function(a,k,g){var a=a.split("!"),h=1<a.length,
  m=a[0],l=k.toUrl(a[0]),a="url:"+l,p=b,i=function(a){g(h?c(a):a)};m in d?p=d[m]:a in k.cache?p=k.cache[a]:l in d&&(p=d[l]);if(p===b)if(f[l])f[l].push(i);else{var s=f[l]=[i];e(l,!k.async,function(a){d[m]=d[l]=a;for(var b=0;b<s.length;)s[b++](a);delete f[l]})}else i(p)}}})},"dijit/layout/_LayoutWidget":function(){define("dojo/_base/lang,../_Widget,../_Container,../_Contained,../Viewport,dojo/_base/declare,dojo/dom-class,dojo/dom-geometry,dojo/dom-style".split(","),function(i,j,h,g,e,d,c,b,f){return d("dijit.layout._LayoutWidget",
  [j,h,g],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,buildRendering:function(){this.inherited(arguments);c.add(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!a||!a.isLayoutContainer)this.resize(),this.own(e.on("resize",i.hitch(this,"resize")))}},resize:function(a,c){var d=this.domNode;a&&b.setMarginBox(d,a);var e=c||{};i.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=i.mixin(b.getMarginBox(d),e);var g=
  f.getComputedStyle(d),l=b.getMarginExtents(d,g),h=b.getBorderExtents(d,g),e=this._borderBox={w:e.w-(l.w+h.w),h:e.h-(l.h+h.h)},l=b.getPadExtents(d,g);this._contentBox={l:f.toPixelValue(d,g.paddingLeft),t:f.toPixelValue(d,g.paddingTop),w:e.w-l.w,h:e.h-l.h};this.layout()},layout:function(){},_setupChild:function(a){c.add(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,b){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){c.remove(a.domNode,
  this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}})})},"dijit/_Contained":function(){define(["dojo/_base/declare","./registry"],function(i,j){return i("dijit._Contained",null,{_getSibling:function(h){var g=this.domNode;do g=g[h+"Sibling"];while(g&&1!=g.nodeType);return g&&j.byNode(g)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var h=this.getParent();
  return!h||!h.getIndexOfChild?-1:h.getIndexOfChild(this)}})})},"dijit/Dialog":function(){define("require,dojo/_base/array,dojo/_base/connect,dojo/_base/declare,dojo/_base/Deferred,dojo/dom,dojo/dom-class,dojo/dom-geometry,dojo/dom-style,dojo/_base/event,dojo/_base/fx,dojo/i18n,dojo/keys,dojo/_base/lang,dojo/on,dojo/ready,dojo/sniff,dojo/window,dojo/dnd/Moveable,dojo/dnd/TimedMoveable,./focus,./_base/manager,./_Widget,./_TemplatedMixin,./_CssStateMixin,./form/_FormMixin,./_DialogMixin,./DialogUnderlay,./layout/ContentPane,dojo/text!./templates/Dialog.html,./main,dojo/i18n!./nls/common".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u,v,w,t,y,x,B,C,A,E,N,L,I){var t=g("dijit._DialogBase",[x,C,A,B],{templateString:L,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],open:!1,duration:t.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,doLayout:!1,draggable:!0,_setDraggableAttr:function(a){this._set("draggable",a)},"aria-describedby":"",maxRatio:0.9,
  postMixInProperties:function(){var a=n.getLocalization("dijit","common");m.mixin(this,a);this.inherited(arguments)},postCreate:function(){f.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();this.autofocus&&z.isTop(this)&&(this._getFocusItems(this.domNode),w.focus(this._firstFocusItem));
  this.inherited(arguments)},_onBlur:function(a){this.inherited(arguments);var b=m.hitch(this,function(){this.open&&!this._destroyed&&z.isTop(this)&&(this._getFocusItems(this.domNode),w.focus(this._firstFocusItem))});if("mouse"==a)l.once(this.ownerDocument,"mouseup",b);else b()},_endDrag:function(){var a=b.position(this.domNode),c=s.getBox(this.ownerDocument);a.y=Math.min(Math.max(a.y,0),c.h-a.h);a.x=Math.min(Math.max(a.x,0),c.w-a.w);this._relativePosition=a;this._position()},_setup:function(){var a=
  this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==q("ie")?v:u)(a,{handle:this.titleBar}),this.connect(this._moveable,"onMoveStop","_endDrag")):c.add(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":j.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" "),ownerDocument:this.ownerDocument}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if("undefined"!=typeof this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
  this._singleChildOriginalStyle,delete this._singleChildOriginalStyle}else f.set(this.containerNode,{width:"auto",height:"auto"});var a=b.position(this.domNode),c=s.getBox(this.ownerDocument);c.w*=this.maxRatio;c.h*=this.maxRatio;if(a.w>=c.w||a.h>=c.h){var d=b.position(this.containerNode),e=Math.min(a.w,c.w)-(a.w-d.w),a=Math.min(a.h,c.h)-(a.h-d.h);if(this._singleChild&&this._singleChild.resize){if("undefined"==typeof this._singleChildOriginalStyle)this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;
  this._singleChild.resize({w:e,h:a})}else f.set(this.containerNode,{width:e+"px",height:a+"px",overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!c.contains(this.ownerDocumentBody,"dojoMove")){var a=this.domNode,d=s.getBox(this.ownerDocument),e=this._relativePosition,k=e?null:b.position(a);f.set(a,{left:Math.floor(d.l+(e?e.x:(d.w-k.w)/2))+"px",top:Math.floor(d.t+(e?e.y:(d.h-k.h)/2))+"px"})}},_onKey:function(b){if(b.charOrCode){var f=
  b.target;b.charOrCode===r.TAB&&this._getFocusItems(this.domNode);var d=this._firstFocusItem==this._lastFocusItem;if(f==this._firstFocusItem&&b.shiftKey&&b.charOrCode===r.TAB)d||w.focus(this._lastFocusItem),a.stop(b);else if(f==this._lastFocusItem&&b.charOrCode===r.TAB&&!b.shiftKey)d||w.focus(this._firstFocusItem),a.stop(b);else{for(;f;){if(f==this.domNode||c.contains(f,"dijitPopup"))if(b.charOrCode==r.ESCAPE)this.onCancel();else return;f=f.parentNode}if(b.charOrCode!==r.TAB)a.stop(b);else if(!q("opera"))try{this._firstFocusItem.focus()}catch(e){}}}},
  show:function(){if(!this.open){this._started||this.startup();if(!this._alreadyInitialized)this._setup(),this._alreadyInitialized=!0;this._fadeOutDeferred&&this._fadeOutDeferred.cancel();var a=s.get(this.ownerDocument);this._modalconnects.push(l(a,"scroll",m.hitch(this,"resize")));this._modalconnects.push(l(this.domNode,h._keypress,m.hitch(this,"_onKey")));f.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this._size();this._position();var b;this._fadeInDeferred=new e(m.hitch(this,
  function(){b.stop();delete this._fadeInDeferred}));b=k.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:m.hitch(this,function(){z.show(this,this.underlayAttrs)}),onEnd:m.hitch(this,function(){this.autofocus&&z.isTop(this)&&(this._getFocusItems(this.domNode),w.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized&&this.open){this._fadeInDeferred&&this._fadeInDeferred.cancel();
  var a;this._fadeOutDeferred=new e(m.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(m.hitch(this,"onHide"));a=k.fadeOut({node:this.domNode,duration:this.duration,onEnd:m.hitch(this,function(){this.domNode.style.display="none";z.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=!1;for(var b;b=this._modalconnects.pop();)b.remove();this._relativePosition&&delete this._relativePosition;
  this._set("open",!1);return this._fadeOutDeferred}},resize:function(){"none"!=this.domNode.style.display&&(E._singleton&&E._singleton.layout(),this._position(),this._size())},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var a;a=this._modalconnects.pop();)a.remove();z.hide(this);this.inherited(arguments)}}),D=g("dijit.Dialog",[N,t],{});D._DialogBase=t;var z=D._DialogLevelManager=
  {_beginZIndex:950,show:function(a,b){F[F.length-1].focus=w.curNode;var c=E._singleton;!c||c._destroyed?c=I._underlay=E._singleton=new E(b):c.set(a.underlayAttrs);var d=F[F.length-1].dialog?F[F.length-1].zIndex+2:D._DialogLevelManager._beginZIndex;1==F.length&&c.show();f.set(E._singleton.domNode,"zIndex",d-1);f.set(a.domNode,"zIndex",d);F.push({dialog:a,underlayAttrs:b,zIndex:d})},hide:function(a){if(F[F.length-1].dialog==a){F.pop();var b=F[F.length-1];E._singleton._destroyed||(1==F.length?E._singleton.hide():
  (f.set(E._singleton.domNode,"zIndex",b.zIndex-1),E._singleton.set(b.underlayAttrs)));if(a.refocus){a=b.focus;if(b.dialog&&(!a||!d.isDescendant(a,b.dialog.domNode)))b.dialog._getFocusItems(b.dialog.domNode),a=b.dialog._firstFocusItem;if(a)try{a.focus()}catch(c){}}}else b=j.indexOf(j.map(F,function(a){return a.dialog}),a),-1!=b&&F.splice(b,1)},isTop:function(a){return F[F.length-1].dialog==a}},F=D._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];q("dijit-legacy-requires")&&p(0,function(){i(["dijit/TooltipDialog"])});
  return D})},"dojo/_base/fx":function(){define("./kernel,./config,./lang,../Evented,./Color,./connect,./sniff,../dom,../dom-style".split(","),function(i,j,h,g,e,d,c,b,f){var a=h.mixin,k={},n=k._Line=function(a,b){this.start=a;this.end=b};n.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var r=k.Animation=function(b){a(this,b);if(h.isArray(this.curve))this.curve=new n(this.curve[0],this.curve[1])};r.prototype=new g;h.extend(r,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
  _getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,b){var c=b||[];if(this[a])if(j.debugAtAllCosts)this[a].apply(this,c);else try{this[a].apply(this,c)}catch(f){console.error("exception in animation handler for:",a),console.error(f)}return this},play:function(a,b){this._delayTimer&&this._clearTimer();if(b)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var c=a||
  this.delay,f=h.hitch(this,"_play",b);if(0<c)return this._delayTimer=setTimeout(f,c),this;f();return this},_play:function(){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;var a=this.curve.getValue(this._getStep());if(!this._percent){if(!this._startRepeatCount)this._startRepeatCount=this.repeat;this._fire("onBegin",[a])}this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&
  this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,b){this._stopTimer();this._active=this._paused=!0;this._percent=a;b&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();if(a)this._percent=1;this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},status:function(){return this._active?
  this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=(new Date).valueOf(),a=0===this.duration?1:(a-this._startTime)/this.duration;1<=a&&(a=1);this._percent=a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);if(1>this._percent)this._startTimer();else{this._active=!1;if(0<this.repeat)this.repeat--,this.play(null,!0);else if(-1==this.repeat)this.play(null,!0);else if(this._startRepeatCount)this.repeat=this._startRepeatCount,this._startRepeatCount=
  0;this._percent=0;this._fire("onEnd",[this.node]);!this.repeat&&this._stopTimer()}}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var m=0,l=null,p={run:function(){}};h.extend(r,{_startTimer:function(){if(!this._timer)this._timer=d.connect(p,"run",this,"_cycle"),m++;l||(l=setInterval(h.hitch(p,"run"),this.rate))},_stopTimer:function(){if(this._timer)d.disconnect(this._timer),this._timer=null,m--;0>=m&&(clearInterval(l),l=null,m=0)}});var q=c("ie")?function(a){var b=
  a.style;if(!b.width.length&&"auto"==f.get(a,"width"))b.width="auto"}:function(){};k._fade=function(c){c.node=b.byId(c.node);var e=a({properties:{}},c),c=e.properties.opacity={};c.start=!("start"in e)?function(){return+f.get(e.node,"opacity")||0}:e.start;c.end=e.end;c=k.animateProperty(e);d.connect(c,"beforeBegin",h.partial(q,e.node));return c};k.fadeIn=function(b){return k._fade(a({end:1},b))};k.fadeOut=function(b){return k._fade(a({end:0},b))};k._defaultEasing=function(a){return 0.5+Math.sin((a+
  1.5)*Math.PI)/2};var s=function(a){this._properties=a;for(var b in a){var c=a[b];if(c.start instanceof e)c.tempColor=new e}};s.prototype.getValue=function(a){var b={},c;for(c in this._properties){var f=this._properties[c],d=f.start;d instanceof e?b[c]=e.blendColors(d,f.end,a,f.tempColor).toCss():h.isArray(d)||(b[c]=(f.end-d)*a+d+("opacity"!=c?f.units||"px":0))}return b};k.animateProperty=function(c){var k=c.node=b.byId(c.node);if(!c.easing)c.easing=i._defaultEasing;c=new r(c);d.connect(c,"beforeBegin",
  c,function(){var b={},c;for(c in this.properties){if("width"==c||"height"==c)this.node.display="block";var d=this.properties[c];h.isFunction(d)&&(d=d(k));d=b[c]=a({},h.isObject(d)?d:{end:d});if(h.isFunction(d.start))d.start=d.start(k);if(h.isFunction(d.end))d.end=d.end(k);var g=0<=c.toLowerCase().indexOf("color"),l=function(a,b){var c={height:a.offsetHeight,width:a.offsetWidth}[b];if(void 0!==c)return c;c=f.get(a,b);return"opacity"==b?+c:g?c:parseFloat(c)};if("end"in d){if(!("start"in d))d.start=
  l(k,c)}else d.end=l(k,c);g?(d.start=new e(d.start),d.end=new e(d.end)):d.start="opacity"==c?+d.start:parseFloat(d.start)}this.curve=new s(b)});d.connect(c,"onAnimate",h.hitch(f,"set",c.node));return c};k.anim=function(a,b,c,f,d,e){return k.animateProperty({node:a,duration:c||r.prototype.duration,properties:b,easing:f,onEnd:d}).play(e||0)};a(i,k);i._Animation=r;return k})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(i,j,h,g){var e=i.Color=function(d){d&&
  this.setColor(d)};e.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:g.transparentColor||[0,0,0,0]};j.extend(e,{r:255,g:255,b:255,a:1,_set:function(d,c,b,f){this.r=d;this.g=c;this.b=b;this.a=f},setColor:function(d){j.isString(d)?e.fromString(d,this):j.isArray(d)?
  e.fromArray(d,this):(this._set(d.r,d.g,d.b,d.a),d instanceof e||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+h.map(["r","g","b"],function(d){d=this[d].toString(16);return 2>d.length?"0"+d:d},this).join("")},toCss:function(d){var c=this.r+", "+this.g+", "+this.b;return(d?"rgba("+c+", "+this.a:"rgb("+c)+")"},toString:function(){return this.toCss(!0)}});e.blendColors=
  i.blendColors=function(d,c,b,f){var a=f||new e;h.forEach(["r","g","b","a"],function(f){a[f]=d[f]+(c[f]-d[f])*b;"a"!=f&&(a[f]=Math.round(a[f]))});return a.sanitize()};e.fromRgb=i.colorFromRgb=function(d,c){var b=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return b&&e.fromArray(b[1].split(/\s*,\s*/),c)};e.fromHex=i.colorFromHex=function(d,c){var b=c||new e,f=4==d.length?4:8,a=(1<<f)-1,d=Number("0x"+d.substr(1));if(isNaN(d))return null;h.forEach(["b","g","r"],function(c){var e=d&a;d>>=f;b[c]=4==
  f?17*e:e});b.a=1;return b};e.fromArray=i.colorFromArray=function(d,c){var b=c||new e;b._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));if(isNaN(b.a))b.a=1;return b.sanitize()};e.fromString=i.colorFromString=function(d,c){var b=e.named[d];return b&&e.fromArray(b,c)||e.fromRgb(d,c)||e.fromHex(d,c)};return e})},"dojo/dnd/Moveable":function(){define("../_base/array,../_base/declare,../_base/event,../_base/lang,../dom,../dom-class,../Evented,../on,../topic,../touch,./common,./Mover,../_base/window".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r){return j("dojo.dnd.Moveable",[c],{handle:"",delay:0,skip:!1,constructor:function(c,f){this.node=e.byId(c);f||(f={});this.handle=f.handle?e.byId(f.handle):null;if(!this.handle)this.handle=this.node;this.delay=0<f.delay?f.delay:0;this.skip=f.skip;this.mover=f.mover?f.mover:n;this.events=[b(this.handle,a.press,g.hitch(this,"onMouseDown")),b(this.handle,"dragstart",g.hitch(this,"onSelectStart")),b(this.handle,"selectstart",g.hitch(this,"onSelectStart"))]},markupFactory:function(a,
  b,c){return new c(b,a)},destroy:function(){i.forEach(this.events,function(a){a.remove()});this.events=this.node=this.handle=null},onMouseDown:function(c){if(!this.skip||!k.isFormElement(c)){if(this.delay)this.events.push(b(this.handle,a.move,g.hitch(this,"onMouseMove")),b(this.handle,a.release,g.hitch(this,"onMouseUp"))),this._lastX=c.pageX,this._lastY=c.pageY;else this.onDragDetected(c);h.stop(c)}},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>
  this.delay)this.onMouseUp(a),this.onDragDetected(a);h.stop(a)},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();h.stop(a)},onSelectStart:function(a){(!this.skip||!k.isFormElement(a))&&h.stop(a)},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){f.publish("/dnd/move/start",a);d.add(r.body(),"dojoMove");d.add(this.node,"dojoMoveItem")},onMoveStop:function(a){f.publish("/dnd/move/stop",a);d.remove(r.body(),"dojoMove");d.remove(this.node,"dojoMoveItem")},
  onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"dojo/dnd/common":function(){define(["../_base/connect","../_base/kernel","../_base/lang","../dom"],function(i,j,h,g){var e=h.getObject("dojo.dnd",!0);e.getCopyKeyState=i.isCopyKey;e._uniqueId=0;e.getUniqueId=function(){var d;do d=j._scopeName+"Unique"+ ++e._uniqueId;while(g.byId(d));return d};e._empty={};e.isFormElement=
  function(d){d=d.target;if(3==d.nodeType)d=d.parentNode;return 0<=" button textarea input select option ".indexOf(" "+d.tagName.toLowerCase()+" ")};return e})},"dojo/dnd/Mover":function(){define("../_base/array,../_base/declare,../_base/event,../_base/lang,../sniff,../_base/window,../dom,../dom-geometry,../dom-style,../Evented,../on,../touch,./common,./autoscroll".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m){return j("dojo.dnd.Mover",[a],{constructor:function(a,b,f){this.node=c.byId(a);this.marginBox=
  {l:b.pageX,t:b.pageY};this.mouseButton=b.button;b=this.host=f;a=a.ownerDocument;this.events=[k(a,n.move,g.hitch(this,"onFirstMove")),k(a,n.move,g.hitch(this,"onMouseMove")),k(a,n.release,g.hitch(this,"onMouseUp")),k(a,"dragstart",h.stop),k(a.body,"selectstart",h.stop)];m.autoScrollStart(a);if(b&&b.onMoveStart)b.onMoveStart(this)},onMouseMove:function(a){m.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);h.stop(a)},onMouseUp:function(a){(e("webkit")&&e("mac")&&
  2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();h.stop(a)},onFirstMove:function(a){var c=this.node.style,e,k=this.host;switch(c.position){case "relative":case "absolute":e=Math.round(parseFloat(c.left))||0;c=Math.round(parseFloat(c.top))||0;break;default:c.position="absolute";c=b.getMarginBox(this.node);e=d.doc.body;var g=f.getComputedStyle(e),h=b.getMarginBox(e,g),g=b.getContentBox(e,g);e=c.l-(g.l-h.l);c=c.t-(g.t-h.t)}this.marginBox.l=e-this.marginBox.l;this.marginBox.t=
  c-this.marginBox.t;if(k&&k.onFirstMove)k.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){i.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang,../sniff,../_base/window,../dom-geometry,../dom-style,../window".split(","),function(i,j,h,g,e,d){var c={};i.setObject("dojo.dnd.autoscroll",c);c.getViewport=d.getBox;c.V_TRIGGER_AUTOSCROLL=32;
  c.H_TRIGGER_AUTOSCROLL=32;c.V_AUTOSCROLL_VALUE=16;c.H_AUTOSCROLL_VALUE=16;var b,f=h.doc,a=Infinity,k=Infinity;c.autoScrollStart=function(c){f=c;b=d.getBox(f);c=h.body(f).parentNode;a=Math.max(c.scrollHeight-b.h,0);k=Math.max(c.scrollWidth-b.w,0)};c.autoScroll=function(e){var g=b||d.getBox(f),m=h.body(f).parentNode,l=0,p=0;e.clientX<c.H_TRIGGER_AUTOSCROLL?l=-c.H_AUTOSCROLL_VALUE:e.clientX>g.w-c.H_TRIGGER_AUTOSCROLL&&(l=Math.min(c.H_AUTOSCROLL_VALUE,k-m.scrollLeft));e.clientY<c.V_TRIGGER_AUTOSCROLL?
  p=-c.V_AUTOSCROLL_VALUE:e.clientY>g.h-c.V_TRIGGER_AUTOSCROLL&&(p=Math.min(c.V_AUTOSCROLL_VALUE,a-m.scrollTop));window.scrollBy(l,p)};c._validNodes={div:1,p:1,td:1};c._validOverflow={auto:1,scroll:1};c.autoScrollNodes=function(a){for(var b,f,d,k,i,s,u=0,v=0,w=a.target;w;){if(1==w.nodeType&&w.tagName.toLowerCase()in c._validNodes){d=e.getComputedStyle(w);k=d.overflow.toLowerCase()in c._validOverflow;i=d.overflowX.toLowerCase()in c._validOverflow;s=d.overflowY.toLowerCase()in c._validOverflow;if(k||
  i||s)b=g.getContentBox(w,d),f=g.position(w,!0);if(k||i){d=Math.min(c.H_TRIGGER_AUTOSCROLL,b.w/2);i=a.pageX-f.x;if(j("webkit")||j("opera"))i+=h.body().scrollLeft;u=0;0<i&&i<b.w&&(i<d?u=-d:i>b.w-d&&(u=d),w.scrollLeft+=u)}if(k||s){k=Math.min(c.V_TRIGGER_AUTOSCROLL,b.h/2);s=a.pageY-f.y;if(j("webkit")||j("opera"))s+=h.body().scrollTop;v=0;0<s&&s<b.h&&(s<k?v=-k:s>b.h-k&&(v=k),w.scrollTop+=v)}if(u||v)return}try{w=w.parentNode}catch(t){w=null}}c.autoScroll(a)};return c})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare",
  "./Moveable"],function(i,j){var h=j.prototype.onMove;return i("dojo.dnd.TimedMoveable",j,{timeout:40,constructor:function(g,e){e||(e={});if(e.timeout&&"number"==typeof e.timeout&&0<=e.timeout)this.timeout=e.timeout},onMoveStop:function(g){g._timer&&(clearTimeout(g._timer),h.call(this,g,g._leftTop));j.prototype.onMoveStop.apply(this,arguments)},onMove:function(g,e){g._leftTop=e;if(!g._timer){var d=this;g._timer=setTimeout(function(){g._timer=null;h.call(d,g,g._leftTop)},this.timeout)}}})})},"dijit/_base/manager":function(){define(["dojo/_base/array",
  "dojo/_base/config","dojo/_base/lang","../registry","../main"],function(i,j,h,g,e){var d={};i.forEach("byId,getUniqueId,findWidgets,_destroyAll,byNode,getEnclosingWidget".split(","),function(c){d[c]=g[c]});h.mixin(d,{defaultDuration:j.defaultDuration||200});h.mixin(e,d);return e})},"dijit/_CssStateMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom,dojo/dom-class,dojo/has,dojo/_base/lang,dojo/on,dojo/ready,dojo/_base/window,./registry".split(","),function(i,j,h,g,e,d,c,b,f,a){j=
  j("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);i.forEach("disabled,readOnly,checked,selected,focused,state,hovering,active,_opened".split(","),function(a){this.watch(a,d.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":this._set("hovering",
  !0);this._set("active",this._mouseDown);break;case "mouseout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":this._set("active",!0);break;case "mouseup":case "touchend":this._set("active",!1)}},_setStateClass:function(){function a(c){b=b.concat(i.map(b,function(a){return a+c}),"dijit"+c)}var b=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var c="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);
  this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,f={};i.forEach(c.className.split(" "),function(a){f[a]=!0});"_stateClasses"in this&&i.forEach(this._stateClasses,function(a){delete f[a]});i.forEach(b,function(a){f[a]=!0});var d=[],e;for(e in f)d.push(e);c.className=d.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,
  b,c){function f(c){g.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":g.toggle(a,b+"Hover",!0);break;case "mouseout":g.toggle(a,b+"Hover",!1);f(!1);break;case "mousedown":case "touchstart":f(!0);break;case "mouseup":case "touchend":f(!1);break;case "focus":case "focusin":g.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":g.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});b(function(){function b(c){if(!h.isDescendant(c.relatedTarget,
  c.target))for(var f=c.target;f&&f!=c.relatedTarget;f=f.parentNode)if(f._cssState){var d=a.getEnclosingWidget(f);d&&(f==d.domNode?d._cssMouseEvent(c):d._subnodeCssMouseEvent(f,f._cssState,c))}}function d(a){a.target=a.srcElement;b(a)}var g=f.body(),m=(e("touch")?[]:["mouseover","mouseout"]).concat(["mousedown","touchstart","mouseup","touchend"]);i.forEach(m,function(a){g.addEventListener?g.addEventListener(a,b,!0):g.attachEvent("on"+a,d)});c(g,"focusin, focusout",function(b){var c=b.target;c._cssState&&
  !c.getAttribute("widgetId")&&a.getEnclosingWidget(c)._subnodeCssMouseEvent(c,c._cssState,b)})});return j})},"dijit/form/_FormMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/_base/kernel,dojo/_base/lang,dojo/on,dojo/window".split(","),function(i,j,h,g,e,d){return j("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(c){var b=[];i.forEach(c||this.getChildren(),function(c){"value"in c?b.push(c):b=b.concat(this._getDescendantFormWidgets(c.getChildren()))},this);
  return b},reset:function(){i.forEach(this._getDescendantFormWidgets(),function(c){c.reset&&c.reset()})},validate:function(){var c=!1;return i.every(i.map(this._getDescendantFormWidgets(),function(b){b._hasBeenBlurred=!0;var f=b.disabled||!b.validate||b.validate();!f&&!c&&(d.scrollIntoView(b.containerNode||b.domNode),b.focus(),c=!0);return f}),function(b){return b})},setValues:function(c){h.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",
  c)},_setValueAttr:function(c){var b={};i.forEach(this._getDescendantFormWidgets(),function(a){a.name&&(b[a.name]||(b[a.name]=[])).push(a)});for(var f in b)if(b.hasOwnProperty(f)){var a=b[f],d=g.getObject(f,!1,c);void 0!==d&&(g.isArray(d)||(d=[d]),"boolean"==typeof a[0].checked?i.forEach(a,function(a){a.set("value",-1!=i.indexOf(d,a.value))}):a[0].multiple?a[0].set("value",d):i.forEach(a,function(a,b){a.set("value",d[b])}))}},getValues:function(){h.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.",
  "","2.0");return this.get("value")},_getValueAttr:function(){var c={};i.forEach(this._getDescendantFormWidgets(),function(b){var f=b.name;if(f&&!b.disabled){var a=b.get("value");"boolean"==typeof b.checked?/Radio/.test(b.declaredClass)?!1!==a?g.setObject(f,a,c):(a=g.getObject(f,!1,c),void 0===a&&g.setObject(f,null,c)):(b=g.getObject(f,!1,c),b||(b=[],g.setObject(f,b,c)),!1!==a&&b.push(a)):(b=g.getObject(f,!1,c),"undefined"!=typeof b?g.isArray(b)?b.push(a):g.setObject(f,[b,a],c):g.setObject(f,a,c))}});
  return c},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var c=i.map(this._descendants,function(b){return b.get("state")||""});return 0<=i.indexOf(c,"Error")?"Error":0<=i.indexOf(c,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(c){this._descendants=this._getDescendantFormWidgets();i.forEach(this._descendants,function(b){b._started||b.startup()});c||this._onChildChange()},_onChildChange:function(c){(!c||"state"==
  c||"disabled"==c)&&this._set("state",this._getState());if(!c||"value"==c||"disabled"==c||"checked"==c)this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;this._set("value",this.get("value"))},10)},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var c=this;this.own(e(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",
  function(b){b.target!=c.domNode&&c._onChildChange(b.type.replace("attrmodified-",""))}));this.watch("state",function(b,c,a){this.onValidStateChange(""==a)})},destroy:function(){this.inherited(arguments)}})})},"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(i,j){return i("dijit._DialogMixin",null,{execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var h=j._getTabNavigable(this.containerNode);
  this._firstFocusItem=h.lowest||h.first||this.closeButtonNode||this.domNode;this._lastFocusItem=h.last||h.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare,dojo/dom-attr,dojo/window,./_Widget,./_TemplatedMixin,./BackgroundIframe".split(","),function(i,j,h,g,e,d){return i("dijit.DialogUnderlay",[g,e],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' data-dojo-attach-point='node'></div></div>",dialogId:"","class":"",
  _setDialogIdAttr:function(c){j.set(this.node,"id",c+"_underlay");this._set("dialogId",c)},_setClassAttr:function(c){this.node.className="dijitDialogUnderlay "+c;this._set("class",c)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode)},layout:function(){var c=this.node.style,b=this.domNode.style;b.display="none";var f=h.getBox(this.ownerDocument);b.top=f.t+"px";b.left=f.l+"px";c.width=f.w+"px";c.height=f.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";
  this.layout();this.bgIframe=new d(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}})})},"dijit/BackgroundIframe":function(){define("require,./main,dojo/_base/config,dojo/dom-construct,dojo/dom-style,dojo/_base/lang,dojo/on,dojo/sniff,dojo/_base/window".split(","),function(i,j,h,g,e,d,c,b,f){var a=new function(){var a=[];this.pop=function(){var c;a.length?(c=a.pop(),c.style.display=""):(9>b("ie")?(c="<iframe src='"+(h.dojoBlankHtmlUrl||
  i.toUrl("dojo/resources/blank.html")||'javascript:""')+"' role='presentation' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>",c=f.doc.createElement(c)):(c=g.create("iframe"),c.src='javascript:""',c.className="dijitBackgroundIframe",c.setAttribute("role","presentation"),e.set(c,"opacity",0.1)),c.tabIndex=-1);return c};this.push=function(b){b.style.display="none";a.push(b)}};j.BackgroundIframe=function(f){if(!f.id)throw Error("no id");if(b("ie")||b("mozilla")){var g=
  this.iframe=a.pop();f.appendChild(g);7>b("ie")||b("quirks")?(this.resize(f),this._conn=c(f,"resize",d.hitch(this,function(){this.resize(f)}))):e.set(g,{width:"100%",height:"100%"})}};d.extend(j.BackgroundIframe,{resize:function(a){this.iframe&&e.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){if(this._conn)this._conn.remove(),this._conn=null;this.iframe&&(a.push(this.iframe),delete this.iframe)}});return j.BackgroundIframe})},"url:dijit/templates/Dialog.html":'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar">\n\t\t<span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title"\n\t\t\t\trole="heading" level="1"></span>\n\t\t<span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t\t<span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div data-dojo-attach-point="containerNode" class="dijitDialogPaneContent"></div>\n</div>\n',
  "dijit/form/ComboBox":function(){define(["dojo/_base/declare","./ValidationTextBox","./ComboBoxMixin"],function(i,j,h){return i("dijit.form.ComboBox",[j,h],{})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare,dojo/_base/kernel,dojo/i18n,./TextBox,../Tooltip,dojo/text!./templates/ValidationTextBox.html,dojo/i18n!./nls/validate".split(","),function(i,j,h,g,e,d){var c;return c=i("dijit.form.ValidationTextBox",g,{templateString:d,required:!1,promptMessage:"",invalidMessage:"$_unset_$",
  missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(b,f){f!=c.prototype[b]&&(j.deprecated("ValidationTextBox id="+this.id+", set('"+b+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",f))},_setRegExpGenAttr:function(b){this._deprecateRegExp("regExpGen",b);this.regExpGen=this._getPatternAttr},_setRegExpAttr:function(b){this._deprecateRegExp("regExp",b)},_setValueAttr:function(){this.inherited(arguments);
  this.validate(this.focused)},validator:function(b,c){return RegExp("^(?:"+this._getPatternAttr(c)+")"+(this.required?"":"?")+"$").test(b)&&(!this.required||!this._isEmpty(b))&&(this._isEmpty(b)||void 0!==this.parse(b,c))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.constraints)},_isEmpty:function(b){return(this.trim?/^\s*$/:/^$/).test(b)},getErrorMessage:function(){var b="$_unset_$"==this.invalidMessage?
  this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:this.invalidMessage,c="$_unset_$"==this.missingMessage?this.messages.missingMessage:!this.missingMessage?b:this.missingMessage;return this.required&&this._isEmpty(this.textbox.value)?c:b},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(b){var c="",a=this.disabled||this.isValid(b);if(a)this._maskValidSubsetError=!0;var d=this._isEmpty(this.textbox.value),e=!a&&b&&this._isValidSubset();
  this._set("state",a?"":((!this._hasBeenBlurred||b)&&d||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&b)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid",a?"false":"true");"Error"==this.state?(this._maskValidSubsetError=b&&e,c=this.getErrorMessage(b)):"Incomplete"==this.state?(c=this.getPromptMessage(b),this._maskValidSubsetError=!this._hasBeenBlurred||b):d&&(c=this.getPromptMessage(b));this.set("message",c);return a},displayMessage:function(b){b&&this.focused?e.show(b,
  this.domNode,this.tooltipPosition,!this.isLeftToRight()):e.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(){this.constraints={};this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(b){if(!b.locale&&this.lang)b.locale=this.lang;this._set("constraints",b);this._refreshState()},_setPatternAttr:function(b){this._set("pattern",b)},
  _getPatternAttr:function(b){var c=this.pattern;"function"==(typeof c).toLowerCase()&&(c=this.pattern(b||this.constraints));if(c!=this._lastRegExp){var a="";this._lastRegExp=c;".*"!=c&&c.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(b){switch(b.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":a+=b;break;case ")":a+="|$)";break;default:a+="(?:"+b+"|$)"}});try{"".search(a)}catch(d){a=this.pattern,console.warn("RegExp error in "+this.declaredClass+
  ": "+this.pattern)}this._partialre="^(?:"+a+")$"}return c},postMixInProperties:function(){this.inherited(arguments);this.messages=h.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(b){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(b){this._set("required",b);this.focusNode.setAttribute("aria-required",b);this._refreshState()},_setMessageAttr:function(b){this._set("message",b);this.displayMessage(b)},
  reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)}})})},"dijit/form/TextBox":function(){define("dojo/_base/declare,dojo/dom-construct,dojo/dom-style,dojo/_base/kernel,dojo/_base/lang,dojo/sniff,./_FormValueWidget,./_TextBoxMixin,dojo/text!./templates/TextBox.html,../main".split(","),function(i,j,h,g,e,d,c,b,f,a){i=i("dijit.form.TextBox",[c,b],{templateString:f,_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
  _buttonInputDisabled:d("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>d("ie")&&this.defer(function(){try{var a=h.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;
  if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;a<c.length;a++)c[a].style.fontFamily=b}}}catch(f){}})},_onInput:function(a){this.inherited(arguments);this.intermediateChanges&&this.defer(function(){this._handleOnChange(this.get("value"),!1)})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);if(!this._phspan)this._attachPoints.push("_phspan"),this._phspan=j.create("span",{onmousedown:function(a){a.preventDefault()},className:"dijitPlaceHolder dijitInputField"},this.textbox,
  "after");this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this.focused&&!this.textbox.value?"":"none"},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){g.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},
  setDisplayedValue:function(a){g.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_onBlur:function(a){if(!this.disabled&&(this.inherited(arguments),this._updatePlaceHolder(),d("mozilla")&&this.selectOnClick))this.textbox.selectionStart=this.textbox.selectionEnd=void 0},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.inherited(arguments),this._updatePlaceHolder())}});if(d("ie"))i.prototype._isTextSelected=
  function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},a._setSelectionRange=b._setSelectionRange=function(a,b,c){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())};return i})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(i,j,h,g){return i("dijit.form._FormValueWidget",
  [h,g],{_layoutHackIE7:function(){if(7==j("ie"))for(var e=this.domNode,d=e.parentNode,c=e.firstChild||e,b=c.style.filter,f=this;d&&0==d.clientHeight;)(function(){var a=f.connect(d,"onscroll",function(){f.disconnect(a);c.style.filter=(new Date).getMilliseconds();f.defer(function(){c.style.filter=b})})})(),d=d.parentNode}})})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare,dojo/has,dojo/_base/kernel,dojo/ready,../_Widget,../_CssStateMixin,../_TemplatedMixin,./_FormWidgetMixin".split(","),
  function(i,j,h,g,e,d,c,b){j("dijit-legacy-requires")&&g(0,function(){require(["dijit/form/_FormValueWidget"])});return i("dijit.form._FormWidget",[e,c,d,b],{setDisabled:function(b){h.deprecated("setDisabled("+b+") is deprecated. Use set('disabled',"+b+") instead.","","2.0");this.set("disabled",b)},setValue:function(b){h.deprecated("dijit.form._FormWidget:setValue("+b+") is deprecated.  Use set('value',"+b+") instead.","","2.0");this.set("value",b)},getValue:function(){h.deprecated(this.declaredClass+
  "::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name?'name="'+this.name.replace(/"/g,"&quot;")+'"':"";this.inherited(arguments)},_setTypeAttr:null})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom-attr,dojo/dom-style,dojo/_base/lang,dojo/mouse,dojo/sniff,dojo/window,../a11y".split(","),function(i,j,h,g,e,d,c,b,f){return j("dijit.form._FormWidgetMixin",
  null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(a){this._set("disabled",a);h.set(this.focusNode,"disabled",a);this.valueNode&&h.set(this.valueNode,"disabled",a);this.focusNode.setAttribute("aria-disabled",a?"true":"false");a?(this._set("hovering",!1),this._set("active",!1),a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in
  this?this._setTabIndexAttr:"focusNode",i.forEach(e.isArray(a)?a:[a],function(a){a=this[a];c("webkit")||f.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var c=this.connect(this.focusNode,"onfocus",function(){this.disconnect(f);this.disconnect(c)}),f=this.connect(this.ownerDocumentBody,"onmouseup",function(){this.disconnect(f);this.disconnect(c);this.focused&&
  this.focus()});this.scrollOnFocus&&this.defer(function(){b.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=g.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},compare:function(a,b){return"number"==typeof a&&"number"==typeof b?isNaN(a)&&isNaN(b)?0:a-b:a>b?1:a<b?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,b){if(void 0==
  this._lastValueReported&&(null===b||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||0!=this.compare(a,this._lastValueReported);if((this.intermediateChanges||b||void 0===b)&&this._pendingOnChange)if(this._lastValueReported=a,this._pendingOnChange=!1,this._onChangeActive)this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(a)})},
  create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_FormValueMixin":function(){define(["dojo/_base/declare","dojo/dom-attr","dojo/keys","dojo/sniff","./_FormWidgetMixin"],function(i,j,h,g,e){return i("dijit.form._FormValueMixin",e,{readOnly:!1,_setReadOnlyAttr:function(d){j.set(this.focusNode,"readOnly",d);this._set("readOnly",
  d)},postCreate:function(){this.inherited(arguments);g("ie")&&this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(void 0===this._resetValue)this._lastValueReported=this._resetValue=this.value},_setValueAttr:function(d,c){this._handleOnChange(d,c)},_handleOnChange:function(d,c){this._set("value",d);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)},_onKeyDown:function(d){if(d.keyCode==
  h.ESCAPE&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&(9>g("ie")||g("ie")&&g("quirks"))){d.preventDefault();var c=d.srcElement,b=c.ownerDocument.createEventObject();b.keyCode=h.ESCAPE;b.shiftKey=d.shiftKey;c.fireEvent("onkeypress",b)}}})})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/on,../main".split(","),function(i,j,h,g,e,d,c,b){var f=j("dijit.form._TextBoxMixin",null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,
  maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,b,c){var f;void 0!==a&&(f=this.filter(a),"string"!=typeof c&&(c=null!==f&&("number"!=typeof f||!isNaN(f))?this.filter(this.format(f,this.constraints)):""));if(null!=c&&("number"!=typeof c||!isNaN(c))&&this.textbox.value!=c)this.textbox.value=c,this._set("displayedValue",this.get("displayedValue"));"auto"==this.textDir&&this.applyTextDir(this.focusNode,
  c);this.inherited(arguments,[f,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=typeof a&&(a=""+a);this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"));"auto"==this.textDir&&this.applyTextDir(this.focusNode,a)},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},
  onInput:function(){},__skipInputEvent:!1,_onInput:function(a){"auto"==this.textDir&&this.applyTextDir(this.focusNode,this.focusNode.value);this._processInput(a)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(c(this.textbox,"keydown, keypress, paste, cut, input, compositionend",d.hitch(this,function(a){var b;if("keydown"==a.type){b=a.keyCode;
  switch(b){case e.SHIFT:case e.ALT:case e.CTRL:case e.META:case e.CAPS_LOCK:case e.NUM_LOCK:case e.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&!a.altKey){switch(b){case e.NUMPAD_0:case e.NUMPAD_1:case e.NUMPAD_2:case e.NUMPAD_3:case e.NUMPAD_4:case e.NUMPAD_5:case e.NUMPAD_6:case e.NUMPAD_7:case e.NUMPAD_8:case e.NUMPAD_9:case e.NUMPAD_MULTIPLY:case e.NUMPAD_PLUS:case e.NUMPAD_ENTER:case e.NUMPAD_MINUS:case e.NUMPAD_PERIOD:case e.NUMPAD_DIVIDE:return}if(65<=b&&90>=b||48<=b&&57>=b||b==e.SPACE)return;
  b=!1;for(var c in e)if(e[c]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==e.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}if("input"==a.type){if(this.__skipInputEvent){this.__skipInputEvent=!1;return}}else this.__skipInputEvent=
  !0;var f={faux:!0},g;for(g in a)"layerX"!=g&&"layerY"!=g&&(c=a[g],"function"!=typeof c&&"undefined"!=typeof c&&(f[g]=c));d.mixin(f,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){f._wasConsumed=!0;a.preventDefault()},stopPropagation:function(){a.stopPropagation()}});!1===this.onInput(f)&&(f.preventDefault(),f.stopPropagation());f._wasConsumed||this.defer(function(){this._onInput(f)})})))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;
  this.trim&&(a=d.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){if(!this.disabled&&!this.readOnly){if(this.selectOnClick&&
  "mouse"==a)this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);this._selectOnClickHandle=null;this._isTextSelected()||f.selectInputText(this.textbox)}),this.defer(function(){if(this._selectOnClickHandle)this.disconnect(this._selectOnClickHandle),this._selectOnClickHandle=null},500);this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)},_setTextDirAttr:function(a){if(!this._created||
  this.textDir!=a)this._set("textDir",a),this.applyTextDir(this.focusNode,this.focusNode.value)}});f._setSelectionRange=b._setSelectionRange=function(a,b,c){a.setSelectionRange&&a.setSelectionRange(b,c)};f.selectInputText=b.selectInputText=function(a,b,c){a=h.byId(a);isNaN(b)&&(b=0);isNaN(c)&&(c=a.value?a.value.length:0);try{a.focus(),f._setSelectionRange(a,b,c)}catch(d){}};return f})},"url:dijit/form/templates/TextBox.html":'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" data-dojo-attach-point=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>\n',
  "dijit/Tooltip":function(){define("dojo/_base/array,dojo/_base/declare,dojo/_base/fx,dojo/dom,dojo/dom-class,dojo/dom-geometry,dojo/dom-style,dojo/_base/lang,dojo/mouse,dojo/on,dojo/sniff,./_base/manager,./place,./_Widget,./_TemplatedMixin,./BackgroundIframe,dojo/text!./templates/Tooltip.html,./main".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s){var u=j("dijit._MasterTooltip",[m,l],{duration:n.defaultDuration,templateString:q,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
  this.bgIframe=new p(this.domNode);this.fadeIn=h.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=h.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,f,d,e,k){if(!this.aroundNode||!(this.aroundNode===f&&this.containerNode.innerHTML==a))if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;k&&this.set("textDir",k);this.containerNode.align=e?"right":"left";var g=r.around(this.domNode,
  f,d&&d.length?d:v.defaultPosition,!e,b.hitch(this,"orient")),s=g.aroundNodePos;"M"==g.corner.charAt(0)&&"M"==g.aroundCorner.charAt(0)?(this.connectorNode.style.top=s.y+(s.h-this.connectorNode.offsetHeight>>1)-g.y+"px",this.connectorNode.style.left=""):"M"==g.corner.charAt(1)&&"M"==g.aroundCorner.charAt(1)?this.connectorNode.style.left=s.x+(s.w-this.connectorNode.offsetWidth>>1)-g.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");c.set(this.domNode,"opacity",0);this.fadeIn.play();
  this.isShowingNow=!0;this.aroundNode=f}},orient:function(a,b,c,f,e){this.connectorNode.style.top="";var g=f.h,f=f.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+
  "-"+c];this.domNode.style.width="auto";var s=d.position(this.domNode);9==k("ie")&&(s.w+=2);var h=Math.min(Math.max(f,1),s.w);d.setMarginBox(this.domNode,{w:h});"B"==c.charAt(0)&&"B"==b.charAt(0)?(a=d.position(a),b=this.connectorNode.offsetHeight,a.h>g?(this.connectorNode.style.top=g-(e.h+b>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(e.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom=
  "");return Math.max(0,s.w-f)},_onShow:function(){if(k("ie"))this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a)this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=null,this.fadeOut.play()},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck)this.show.apply(this,this._onDeck),this._onDeck=null},_setAutoTextDir:function(a){this.applyTextDir(a,k("ie")?a.outerText:a.textContent);
  i.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});s.showTooltip=function(a,b,c,f,d){c&&(c=i.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));if(!v._masterTT)s._masterTT=v._masterTT=new u;return v._masterTT.show(a,b,c,f,d)};s.hideTooltip=function(a){return v._masterTT&&v._masterTT.hide(a)};var v=j("dijit.Tooltip",
  m,{label:"",showDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(c){i.forEach(this._connections||[],function(a){i.forEach(a,function(a){a.remove()})},this);this._connectIds=i.filter(b.isArrayLike(c)?c:c?[c]:[],function(a){return g.byId(a,this.ownerDocument)},this);this._connections=i.map(this._connectIds,function(c){var c=g.byId(c,this.ownerDocument),d=this.selector,e=d?function(b){return a.selector(d,b)}:function(a){return a},k=this;return[a(c,e(f.enter),function(){k._onHover(this)}),
  a(c,e("focusin"),function(){k._onHover(this)}),a(c,e(f.leave),b.hitch(k,"_onUnHover")),a(c,e("focusout"),b.hitch(k,"_onUnHover"))]},this);this._set("connectId",c)},addTarget:function(a){a=a.id||a;-1==i.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=i.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);e.add(this.domNode,"dijitTooltipData")},
  startup:function(){this.inherited(arguments);var a=this.connectId;i.forEach(b.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(){return this.label||this.domNode.innerHTML},_onHover:function(a){if(!this._showTimer)this._showTimer=this.defer(function(){this.open(a)},this.showDelay)},_onUnHover:function(){this._showTimer&&(this._showTimer.remove(),delete this._showTimer);this.close()},open:function(a){this._showTimer&&(this._showTimer.remove(),delete this._showTimer);var b=this.getContent(a);
  if(b)v.show(b,a,this.position,!this.isLeftToRight(),this.textDir),this._connectNode=a,this.onShow(a,this.position)},close:function(){this._connectNode&&(v.hide(this._connectNode),delete this._connectNode,this.onHide());this._showTimer&&(this._showTimer.remove(),delete this._showTimer)},onShow:function(){},onHide:function(){},destroy:function(){this.close();i.forEach(this._connections||[],function(a){i.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});v._MasterTooltip=u;v.show=
  s.showTooltip;v.hide=s.hideTooltip;v.defaultPosition=["after-centered","before-centered"];return v})},"dijit/place":function(){define("dojo/_base/array,dojo/dom-geometry,dojo/dom-style,dojo/_base/kernel,dojo/_base/window,dojo/window,./main".split(","),function(i,j,h,g,e,d,c){function b(b,a,c,g){var h=d.getBox(b.ownerDocument);(!b.parentNode||"body"!=(""+b.parentNode.tagName).toLowerCase())&&e.body(b.ownerDocument).appendChild(b);var m=null;i.some(a,function(a){var d=a.corner,e=a.pos,l=0,i={w:{L:h.l+
  h.w-e.x,R:e.x-h.l,M:h.w}[d.charAt(1)],h:{T:h.t+h.h-e.y,B:e.y-h.t,M:h.h}[d.charAt(0)]},w=b.style;w.left=w.right="auto";c&&(l=c(b,a.aroundCorner,d,i,g),l="undefined"==typeof l?0:l);var t=b.style,y=t.display,x=t.visibility;if("none"==t.display)t.visibility="hidden",t.display="";w=j.position(b);t.display=y;t.visibility=x;y={L:e.x,R:e.x-w.w,M:Math.max(h.l,Math.min(h.l+h.w,e.x+(w.w>>1))-w.w)}[d.charAt(1)];x={T:e.y,B:e.y-w.h,M:Math.max(h.t,Math.min(h.t+h.h,e.y+(w.h>>1))-w.h)}[d.charAt(0)];e=Math.max(h.l,
  y);t=Math.max(h.t,x);y=Math.min(h.l+h.w,y+w.w);x=Math.min(h.t+h.h,x+w.h);y-=e;x-=t;l+=w.w-y+(w.h-x);if(null==m||l<m.overflow)m={corner:d,aroundCorner:a.aroundCorner,x:e,y:t,w:y,h:x,overflow:l,spaceAvailable:i};return!l});m.overflow&&c&&c(b,m.aroundCorner,m.corner,m.spaceAvailable,g);var a=j.isBodyLtr(b.ownerDocument),l=b.style;l.top=m.y+"px";l[a?"left":"right"]=(a?m.x:h.w-m.x-m.w)+"px";l[a?"right":"left"]="auto";return m}return c.place={at:function(c,a,d,e){d=i.map(d,function(b){var c={corner:b,pos:{x:a.x,
  y:a.y}};e&&(c.pos.x+="L"==b.charAt(1)?e.x:-e.x,c.pos.y+="T"==b.charAt(0)?e.y:-e.y);return c});return b(c,d)},around:function(c,a,d,e,r){function m(a,b){B.push({aroundCorner:a,corner:b,pos:{x:{L:w,R:w+y,M:w+(y>>1)}[a.charAt(1)],y:{T:t,B:t+x,M:t+(x>>1)}[a.charAt(0)]}})}var l="string"==typeof a||"offsetWidth"in a?j.position(a,!0):a;if(a.parentNode)for(var p="absolute"==h.getComputedStyle(a).position,a=a.parentNode;a&&1==a.nodeType&&"BODY"!=a.nodeName;){var q=j.position(a,!0),s=h.getComputedStyle(a);
  /relative|absolute/.test(s.position)&&(p=!1);if(!p&&/hidden|auto|scroll/.test(s.overflow)){var u=Math.min(l.y+l.h,q.y+q.h),v=Math.min(l.x+l.w,q.x+q.w);l.x=Math.max(l.x,q.x);l.y=Math.max(l.y,q.y);l.h=u-l.y;l.w=v-l.x}"absolute"==s.position&&(p=!0);a=a.parentNode}var w=l.x,t=l.y,y="w"in l?l.w:l.w=l.width,x="h"in l?l.h:(g.deprecated("place.around: dijit/place.__Rectangle: { x:"+w+", y:"+t+", height:"+l.height+", width:"+y+" } has been deprecated.  Please use { x:"+w+", y:"+t+", h:"+l.height+", w:"+y+
  " }","","2.0"),l.h=l.height),B=[];i.forEach(d,function(a){var b=e;switch(a){case "above-centered":m("TM","BM");break;case "below-centered":m("BM","TM");break;case "after-centered":b=!b;case "before-centered":m(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":m(b?"TL":"TR",b?"TR":"TL");m(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":m(b?"BL":"BR",b?"TL":"TR");m(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":m(b?"TL":"TR",b?"BL":"BR");m(b?"TR":"TL",
  b?"BR":"BL");break;default:m(a.aroundCorner,a.corner)}});c=b(c,B,r,{w:y,h:x});c.aroundNodePos=l;return c}}})},"url:dijit/templates/Tooltip.html":'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" data-dojo-attach-point="connectorNode"></div\n></div>\n',"url:dijit/form/templates/ValidationTextBox.html":'<div class="dijit dijitReset dijitInline dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" data-dojo-attach-point=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>\n',
  "dijit/form/ComboBoxMixin":function(){define("dojo/_base/declare,dojo/_base/Deferred,dojo/_base/kernel,dojo/_base/lang,dojo/store/util/QueryResults,./_AutoCompleterMixin,./_ComboBoxMenu,../_HasDropDown,dojo/text!./templates/DropDownBox.html".split(","),function(i,j,h,g,e,d,c,b,f){return i("dijit.form.ComboBoxMixin",[b,d],{dropDownClass:c,hasDownArrow:!0,templateString:f,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},_setHasDownArrowAttr:function(a){this._set("hasDownArrow",
  a);this._buttonNode.style.display=a?"":"none"},_showResultList:function(){this.displayMessage("");this.inherited(arguments)},_setStoreAttr:function(a){a.get||g.mixin(a,{_oldAPI:!0,get:function(a){var b=new j;this.fetchItemByIdentity({identity:a,onItem:function(a){b.resolve(a)},onError:function(a){b.reject(a)}});return b.promise},query:function(a,b){var c=new j(function(){d.abort&&d.abort()});c.total=new j;var d=this.fetch(g.mixin({query:a,onBegin:function(a){c.total.resolve(a)},onComplete:function(a){c.resolve(a)},
  onError:function(a){c.reject(a)}},b));return e(c)}});this._set("store",a)},postMixInProperties:function(){var a=this.params.store||this.store;a&&this._setStoreAttr(a);this.inherited(arguments);if(!this.params.store&&!this.store._oldAPI){var b=this.declaredClass;g.mixin(this.store,{getValue:function(a,c){h.deprecated(b+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return a[c]},getLabel:function(a){h.deprecated(b+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly",
  "","2.0");return a.name},fetch:function(a){h.deprecated(b+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");require(["dojo/data/ObjectStore"],g.hitch(this,function(b){(new b({objectStore:this})).fetch(a)}))}})}}})})},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../_base/Deferred"],function(i,j,h){var g=function(e){function d(c){e[c]||(e[c]=function(){var b=arguments;return h.when(e,function(d){Array.prototype.unshift.call(b,
  d);return g(i[c].apply(i,b))})})}if(!e)return e;e.then&&(e=j.delegate(e));d("forEach");d("filter");d("map");if(!e.total)e.total=h.when(e,function(c){return c.length});return e};j.setObject("dojo.store.util.QueryResults",g);return g})},"dijit/form/_AutoCompleterMixin":function(){define("dojo/data/util/filter,dojo/_base/declare,dojo/dom-attr,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/query,dojo/regexp,dojo/sniff,dojo/string,./DataList,../registry,./_TextBoxMixin,./_SearchMixin".split(","),function(i,
  j,h,g,e,d,c,b,f,a,k,n,r,m){return j("dijit.form._AutoCompleterMixin",m,{item:null,autoComplete:!0,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var b=0;if("number"==typeof a.selectionStart)b=a.selectionStart;else if(f("ie")){var c=a.ownerDocument.selection.createRange().duplicate(),a=a.createTextRange();c.move("character",0);a.move("character",0);try{a.setEndPoint("EndToEnd",c),b=(""+a.text).replace(/\r/g,"").length}catch(d){}}return b},
  _setCaretPos:function(a,b){b=parseInt(b);r.selectInputText(a,b,b)},_setDisabledAttr:function(a){this.inherited(arguments);this.domNode.setAttribute("aria-disabled",a?"true":"false")},_onKey:function(a){if(!(32<=a.charCode)){var b=a.charCode||a.keyCode;if(!(b==e.ALT||b==e.CTRL||b==e.META||b==e.SHIFT)){var c=this.dropDown,d=null;this._abortQuery();this.inherited(arguments);if(!a.altKey&&!a.ctrlKey&&!a.metaKey)switch(this._opened&&(d=c.getHighlightedOption()),b){case e.PAGE_DOWN:case e.DOWN_ARROW:case e.PAGE_UP:case e.UP_ARROW:this._opened&&
  this._announceOption(d);g.stop(a);break;case e.ENTER:if(d){if(d==c.nextButton){this._nextSearch(1);g.stop(a);break}else if(d==c.previousButton){this._nextSearch(-1);g.stop(a);break}g.stop(a)}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);case e.TAB:b=this.get("displayedValue");if(c&&(b==c._messages.previousMessage||b==c._messages.nextMessage))break;d&&this._selectOption(d);case e.ESCAPE:if(this._opened)this._lastQuery=null,this.closeDropDown()}}}},_autoCompleteText:function(a){var b=
  this.focusNode;r.selectInputText(b,b.value.length);var c=this.ignoreCase?"toLowerCase":"substr";if(0==a[c](0).indexOf(this.focusNode.value[c](0))){if(c=this.autoComplete?this._getCaretPos(b):b.value.length,c+1>b.value.length)b.value=a,r.selectInputText(b,c)}else b.value=a,r.selectInputText(b)},_openResultList:function(a,b,c){var f=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();!a.length&&0==c.start?this.closeDropDown():(this._nextSearch=this.dropDown.onPage=d.hitch(this,function(b){a.nextPage(-1!==
  b);this.focus()}),this.dropDown.createOptions(a,c,d.hitch(this,"_getMenuLabelFromItem")),this._showResultList(),"direction"in c?(c.direction?this.dropDown.highlightFirstOption():c.direction||this.dropDown.highlightLastOption(),f&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(b[this.searchAttr].toString())&&this._announceOption(this.dropDown.containerNode.firstChild.nextSibling))},_showResultList:function(){this.closeDropDown(!0);
  this.openDropDown();this.domNode.setAttribute("aria-expanded","true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),this.domNode.setAttribute("aria-expanded","false"),this.focusNode.removeAttribute("aria-activedescendant"))},_setBlurValue:function(){var a=this.get("displayedValue"),b=this.dropDown;b&&(a==b._messages.previousMessage||a==b._messages.nextMessage)?this._setValueAttr(this._lastValueReported,
  !0):"undefined"==typeof this.item?(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0),this._refreshState())},_setItemAttr:function(a,b,c){var d="";a&&(c||(c=this.store._oldAPI?this.store.getValue(a,this.searchAttr):a[this.searchAttr]),d=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):c);this.set("value",d,b,c,a)},_announceOption:function(a){if(a){var b;if(a==this.dropDown.nextButton||a==this.dropDown.previousButton)b=
  a.innerHTML,this.item=void 0,this.value="";else{var c=this.dropDown.items[a.getAttribute("item")];b=(this.store._oldAPI?this.store.getValue(c,this.searchAttr):c[this.searchAttr]).toString();this.set("item",c,!1,b)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",h.get(a,"id"));this._autoCompleteText(b)}},_selectOption:function(a){this.closeDropDown();a&&this._announceOption(a);this._setCaretPos(this.focusNode,this.focusNode.value.length);
  this._handleOnChange(this.value,!0)},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this.item=void 0;this.inherited(arguments)},_startSearch:function(a){if(!this.dropDown){var b=this.id+"_popup";this.dropDown=new (d.isString(this.dropDownClass)?d.getObject(this.dropDownClass,!1):this.dropDownClass)({onChange:d.hitch(this,this._selectOption),id:b,dir:this.dir,textDir:this.textDir});this.focusNode.removeAttribute("aria-activedescendant");this.textbox.setAttribute("aria-owns",
  b)}this._lastInput=a;this.inherited(arguments)},_getValueField:function(){return this.searchAttr},postMixInProperties:function(){this.inherited(arguments);if(!this.store&&(this.store=new k({},this.srcNodeRef),!("value"in this.params))){var a=this.item=this.store.fetchSelectedItem();if(a){var b=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(a,b):a[b]}}},postCreate:function(){var a=c('label[for="'+this.id+'"]');if(a.length){if(!a[0].id)a[0].id=this.id+"_label";this.domNode.setAttribute("aria-labelledby",
  a[0].id)}this.inherited(arguments);this.connect(this,"onSearch","_openResultList")},_getMenuLabelFromItem:function(a){var a=this.labelFunc(a,this.store),b=this.labelType;"none"!=this.highlightMatch&&"text"==this.labelType&&this._lastInput&&(a=this.doHighlight(a,this._lastInput),b="html");return{html:"html"==b,label:a}},doHighlight:function(a,c){var d=(this.ignoreCase?"i":"")+("all"==this.highlightMatch?"g":""),f=this.queryExpr.indexOf("${0}"),c=b.escapeString(c);return this._escapeHtml(a.replace(RegExp((0==
  f?"^":"")+"("+c+")"+(f==this.queryExpr.length-4?"$":""),d),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,'<span class="dijitComboBoxHighlightMatch">$1</span>')},_escapeHtml:function(a){return a=(""+a).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,b){return(b._oldAPI?b.getValue(a,this.labelAttr||this.searchAttr):a[this.labelAttr||this.searchAttr]).toString()},_setValueAttr:function(a,
  b,c,d){this._set("item",d||null);null==a&&(a="");this.inherited(arguments)},_setTextDirAttr:function(a){this.inherited(arguments);this.dropDown&&this.dropDown._set("textDir",a)}})})},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(i){var j={};i.setObject("dojo.data.util.filter",j);j.patternToRegExp=function(h,g){for(var e="^",d=null,c=0;c<h.length;c++)switch(d=h.charAt(c),d){case "\\":e+=d;c++;e+=h.charAt(c);break;case "*":e+=".*";break;case "?":e+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":e+=
  "\\";default:e+=d}e+="$";return g?RegExp(e,"mi"):RegExp(e,"m")};return j})},"dijit/form/DataList":function(){define("dojo/_base/declare,dojo/dom,dojo/_base/lang,dojo/query,dojo/store/Memory,../registry".split(","),function(i,j,h,g,e,d){function c(b){return{id:b.value,value:b.value,name:h.trim(b.innerText||b.textContent||"")}}return i("dijit.form.DataList",e,{constructor:function(b,f){this.domNode=j.byId(f);h.mixin(this,b);this.id&&d.add(this);this.domNode.style.display="none";this.inherited(arguments,
  [{data:g("option",this.domNode).map(c)}])},destroy:function(){d.remove(this.id)},fetchSelectedItem:function(){var b=g("> option[selected]",this.domNode)[0]||g("> option",this.domNode)[0];return b&&c(b)}})})},"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(i,j,h){return i("dojo.store.Memory",null,{constructor:function(g){for(var e in g)this[e]=g[e];this.setData(this.data||[])},data:null,idProperty:"id",index:null,queryEngine:h,get:function(g){return this.data[this.index[g]]},
  getIdentity:function(g){return g[this.idProperty]},put:function(g,e){var d=this.data,c=this.index,b=this.idProperty,b=g[b]=e&&"id"in e?e.id:b in g?g[b]:Math.random();if(b in c){if(e&&!1===e.overwrite)throw Error("Object already exists");d[c[b]]=g}else c[b]=d.push(g)-1;return b},add:function(g,e){(e=e||{}).overwrite=!1;return this.put(g,e)},remove:function(g){var e=this.index,d=this.data;if(g in e)return d.splice(e[g],1),this.setData(d),!0},query:function(g,e){return j(this.queryEngine(g,e)(this.data))},
  setData:function(g){var a;g.items?(this.idProperty=g.identifier,a=this.data=g.items,g=a):this.data=g;this.index={};for(var e=0,d=g.length;e<d;e++)this.index[g[e][this.idProperty]]=e}})})},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(i){return function(j,h){function g(d){var d=i.filter(d,j),c=h&&h.sort;c&&d.sort("function"==typeof c?c:function(b,a){for(var d,e=0;d=c[e];e++){var g=b[d.attribute],h=a[d.attribute];if(g!=h)return!!d.descending==(null==g||g>h)?-1:
  1}return 0});if(h&&(h.start||h.count)){var b=d.length,d=d.slice(h.start||0,(h.start||0)+(h.count||Infinity));d.total=b}return d}switch(typeof j){default:throw Error("Can not query with a "+typeof j);case "object":case "undefined":var e=j,j=function(d){for(var c in e){var b=e[c];if(b&&b.test){if(!b.test(d[c],d))return!1}else if(b!=d[c])return!1}return!0};break;case "string":if(!this[j])throw Error("No filter function "+j+" was found in store");j=this[j];case "function":}g.matches=j;return g}})},"dijit/form/_SearchMixin":function(){define("dojo/data/util/filter,dojo/_base/declare,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/query,dojo/sniff,dojo/string,dojo/when,../registry".split(","),
  function(i,j,h,g,e,d,c,b,f,a){return j("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:!0,_abortQuery:function(){if(this.searchTimer)this.searchTimer=this.searchTimer.remove();if(this._queryDeferHandle)this._queryDeferHandle=this._queryDeferHandle.remove();if(this._fetchHandle){if(this._fetchHandle.abort)this._cancelingQuery=!0,this._fetchHandle.abort(),this._cancelingQuery=!1;if(this._fetchHandle.cancel)this._cancelingQuery=
  !0,this._fetchHandle.cancel(),this._cancelingQuery=!1;this._fetchHandle=null}},_processInput:function(a){if(!this.disabled&&!this.readOnly){var b=a.charOrCode;if(!a.altKey&&!((a.ctrlKey||a.metaKey)&&"x"!=b&&"v"!=b||b==g.SHIFT)){this._prev_key_backspace=a=!1;switch(b){case g.DELETE:case g.BACKSPACE:a=this._maskValidSubsetError=this._prev_key_backspace=!0;break;default:a="string"==typeof b||229==b}if(a)if(this.store)this.searchTimer=this.defer("_startSearchFromInput",1);else this.onSearch()}}},onSearch:function(){},
  _startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"))},_startSearch:function(a){this._abortQuery();var c=this,d=e.clone(this.query),g={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:!0}},h=b.substitute(this.queryExpr,[a]),j,q=function(){var a=c._fetchHandle=c.store.query(d,g);!c.disabled&&!(c.readOnly||j!==c._lastQuery)&&f(a,function(b){c._fetchHandle=null;!c.disabled&&!c.readOnly&&j===c._lastQuery&&f(a.total,function(a){b.total=
  a;var f=c.pageSize;if(isNaN(f)||f>b.total)f=b.total;b.nextPage=function(a){g.direction=a=!1!==a;g.count=f;if(a){if(g.start+=b.length,g.start>=b.total)g.count=0}else if(g.start-=f,0>g.start)g.count=Math.max(f+g.start,0),g.start=0;0>=g.count?(b.length=0,c.onSearch(b,d,g)):q()};c.onSearch(b,d,g)})},function(a){c._fetchHandle=null;c._cancelingQuery||console.error(c.declaredClass+" "+a.toString())})};e.mixin(g,this.fetchProperties);this.store._oldAPI?j=h:(j=i.patternToRegExp(h,this.ignoreCase),j.toString=
  function(){return h});this._lastQuery=d[this.searchAttr]=j;this._queryDeferHandle=this.defer(q,this.searchDelay)},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){var b=this.list;if(b)this.store=a.byId(b)}this.inherited(arguments)}})})},"dijit/form/_ComboBoxMenu":function(){define("dojo/_base/declare,dojo/dom-class,dojo/dom-style,dojo/keys,../_WidgetBase,../_TemplatedMixin,./_ComboBoxMenuMixin,./_ListMouseMixin".split(","),function(i,j,h,
  g,e,d,c,b){return i("dijit.form._ComboBoxMenu",[e,d,b,c],{templateString:"<div class='dijitReset dijitMenu' data-dojo-attach-point='containerNode' style='overflow: auto; overflow-x: hidden;' role='listbox'><div class='dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point='previousButton' role='option'></div><div class='dijitMenuItem dijitMenuNextButton' data-dojo-attach-point='nextButton' role='option'></div></div>",baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);
  this.isLeftToRight()||(j.add(this.previousButton,"dijitMenuItemRtl"),j.add(this.nextButton,"dijitMenuItemRtl"))},_createMenuItem:function(){var b=this.ownerDocument.createElement("div");b.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");b.setAttribute("role","option");return b},onHover:function(b){j.add(b,"dijitMenuItemHover")},onUnhover:function(b){j.remove(b,"dijitMenuItemHover")},onSelect:function(b){j.add(b,"dijitMenuItemSelected")},onDeselect:function(b){j.remove(b,
  "dijitMenuItemSelected")},_page:function(b){var a=0,c=this.domNode.scrollTop,d=h.get(this.domNode,"height");for(this.getHighlightedOption()||this.selectNextNode();a<d;){var e=this.getHighlightedOption();if(b){if(!e.previousSibling||"none"==e.previousSibling.style.display)break;this.selectPreviousNode()}else{if(!e.nextSibling||"none"==e.nextSibling.style.display)break;this.selectNextNode()}e=this.domNode.scrollTop;a+=(e-c)*(b?-1:1);c=e}},handleKey:function(b){switch(b.keyCode){case g.DOWN_ARROW:return this.selectNextNode(),
  !1;case g.PAGE_DOWN:return this._page(!1),!1;case g.UP_ARROW:return this.selectPreviousNode(),!1;case g.PAGE_UP:return this._page(!0),!1;default:return!0}}})})},"dijit/form/_ComboBoxMenuMixin":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/i18n","dojo/i18n!./nls/ComboBox"],function(i,j,h,g){return j("dijit.form._ComboBoxMenuMixin",null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=g.getLocalization("dijit.form","ComboBox",
  this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(e){this.value=e;this.onChange(e)},onClick:function(e){if(e==this.previousButton)this._setSelectedAttr(null),this.onPage(-1);else if(e==this.nextButton)this._setSelectedAttr(null),this.onPage(1);else this.onChange(e)},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null)},
  _createOption:function(e,d){var c=this._createMenuItem(),b=d(e);b.html?c.innerHTML=b.label:c.appendChild(c.ownerDocument.createTextNode(b.label));if(""==c.innerHTML)c.innerHTML="&#160;";this.applyTextDir(c,c.innerText||c.textContent||"");return c},createOptions:function(e,d,c){this.items=e;this.previousButton.style.display=0==d.start?"none":"";h.set(this.previousButton,"id",this.id+"_prev");i.forEach(e,function(b,a){var d=this._createOption(b,c);d.setAttribute("item",a);h.set(d,"id",this.id+a);this.nextButton.parentNode.insertBefore(d,
  this.nextButton)},this);var b=!1;e.total&&!e.total.then&&-1!=e.total?d.start+d.count<e.total?b=!0:d.start+d.count>e.total&&d.count==e.length&&(b=!0):d.count==e.length&&(b=!0);this.nextButton.style.display=b?"":"none";h.set(this.nextButton,"id",this.id+"_next")},clearResultList:function(){for(var e=this.containerNode;2<e.childNodes.length;)e.removeChild(e.childNodes[e.childNodes.length-2]);this._setSelectedAttr(null)},highlightFirstOption:function(){this.selectFirstNode()},highlightLastOption:function(){this.selectLastNode()},
  selectFirstNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.previousButton&&this.selectNextNode()},selectLastNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.nextButton&&this.selectPreviousNode()},getHighlightedOption:function(){return this.selected}})})},"dijit/form/_ListMouseMixin":function(){define(["dojo/_base/declare","dojo/mouse","dojo/on","dojo/touch","./_ListBase"],function(i,j,h,g,e){return i("dijit.form._ListMouseMixin",e,{postCreate:function(){this.inherited(arguments);
  this.own(h(this.domNode,g.press,function(d){d.preventDefault()}));this._listConnect(g.press,"_onMouseDown");this._listConnect(g.release,"_onMouseUp");this._listConnect(j.enter,"_onMouseOver");this._listConnect(j.leave,"_onMouseOut")},_onMouseDown:function(d,c){if(this._hoveredNode)this.onUnhover(this._hoveredNode),this._hoveredNode=null;this._isDragging=!0;this._setSelectedAttr(c)},_onMouseUp:function(d,c){this._isDragging=!1;var b=this.selected,f=this._hoveredNode;if(b&&c==b)this.onClick(b);else f&&
  c==f&&(this._setSelectedAttr(f),this.onClick(f))},_onMouseOut:function(){if(this._hoveredNode)this.onUnhover(this._hoveredNode),this._hoveredNode=null;if(this._isDragging)this._cancelDrag=(new Date).getTime()+1E3},_onMouseOver:function(d,c){if(this._cancelDrag){if((new Date).getTime()>this._cancelDrag)this._isDragging=!1;this._cancelDrag=null}this._hoveredNode=c;this.onHover(c);this._isDragging&&this._setSelectedAttr(c)}})})},"dijit/form/_ListBase":function(){define(["dojo/_base/declare","dojo/on",
  "dojo/window"],function(i,j,h){return i("dijit.form._ListBase",null,{selected:null,_listConnect:function(g,e){var d=this;return d.own(j(d.containerNode,j.selector(function(c,b,d){return c.parentNode==d},g),function(c){c.preventDefault();d[e](c,this)}))},selectFirstNode:function(){for(var g=this.containerNode.firstChild;g&&"none"==g.style.display;)g=g.nextSibling;this._setSelectedAttr(g)},selectLastNode:function(){for(var g=this.containerNode.lastChild;g&&"none"==g.style.display;)g=g.previousSibling;
  this._setSelectedAttr(g)},selectNextNode:function(){var g=this.selected;if(g){for(g=g.nextSibling;g&&"none"==g.style.display;)g=g.nextSibling;g?this._setSelectedAttr(g):this.selectFirstNode()}else this.selectFirstNode()},selectPreviousNode:function(){var g=this.selected;if(g){for(g=g.previousSibling;g&&"none"==g.style.display;)g=g.previousSibling;g?this._setSelectedAttr(g):this.selectLastNode()}else this.selectLastNode()},_setSelectedAttr:function(g){if(this.selected!=g){var e=this.selected;if(e)this.onDeselect(e),
  this.selected=null;if(g)this.selected=g,h.scrollIntoView(g),this.onSelect(g)}else if(g)this.onSelect(g)}})})},"dijit/_HasDropDown":function(){define("dojo/_base/declare,dojo/_base/Deferred,dojo/_base/event,dojo/dom,dojo/dom-attr,dojo/dom-class,dojo/dom-geometry,dojo/dom-style,dojo/has,dojo/keys,dojo/_base/lang,dojo/on,dojo/window,./registry,./focus,./popup,./_FocusMixin".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){return i("dijit._HasDropDown",q,{_buttonNode:null,_arrowWrapperNode:null,
  _popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(a){if(!this.disabled&&!this.readOnly)a.preventDefault(),this._docHandler=this.connect(this.ownerDocument,"mouseup","_onDropDownMouseUp"),this.toggleDropDown()},_onDropDownMouseUp:function(a){a&&this._docHandler&&this.disconnect(this._docHandler);var b=this.dropDown,e=!1;if(a&&this._opened){var k=c.position(this._buttonNode,
  !0);if(!(a.pageX>=k.x&&a.pageX<=k.x+k.w)||!(a.pageY>=k.y&&a.pageY<=k.y+k.h)){for(k=a.target;k&&!e;)d.contains(k,"dijitPopup")?e=!0:k=k.parentNode;if(e){k=a.target;if(b.onItemClick){for(var g;k&&!(g=m.byNode(k));)k=k.parentNode;if(g&&g.onClick&&g.getParent)g.getParent().onItemClick(g,a)}return}}}if(this._opened){if(b.focus&&!1!==b.autoFocus)this._focusDropDownTimer=this.defer(function(){b.focus();delete this._focusDropDownTimer})}else this.defer("focus");if(f("touch"))this._justGotMouseUp=!0,this.defer(function(){this._justGotMouseUp=
  !1})},_onDropDownClick:function(a){f("touch")&&!this._justGotMouseUp&&(this._onDropDownMouseDown(a),this._onDropDownMouseUp(a));this._stopClickEvents&&h.stop(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||
  this.dropDownPosition[0]||"Down";d.add(this._arrowWrapperNode||this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);var a=this.focusNode||this.domNode;this.own(n(this._buttonNode,"mousedown",k.hitch(this,"_onDropDownMouseDown")),n(this._buttonNode,"click",k.hitch(this,"_onDropDownClick")),n(a,"keydown",k.hitch(this,"_onKey")),n(a,"keyup",k.hitch(this,"_onKeyUp")))},destroy:function(){this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);
  this.inherited(arguments)},_onKey:function(b){if(!this.disabled&&!this.readOnly){var c=this.dropDown,d=b.target;if(c&&this._opened&&c.handleKey&&!1===c.handleKey(b))h.stop(b);else if(c&&this._opened&&b.keyCode==a.ESCAPE)this.closeDropDown(),h.stop(b);else if(!this._opened&&(b.keyCode==a.DOWN_ARROW||(b.keyCode==a.ENTER||b.keyCode==a.SPACE)&&("input"!==(d.tagName||"").toLowerCase()||d.type&&"text"!==d.type.toLowerCase())))this._toggleOnKeyUp=!0,h.stop(b)}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
  this.toggleDropDown();var a=this.dropDown;a&&a.focus&&this.defer(k.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(l.curNode&&this.dropDown&&g.isDescendant(l.curNode,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var a=new j,b=k.hitch(this,function(){this.openDropDown();a.resolve(this.dropDown)});this.isLoaded()?b():this.loadDropDown(b);return a},toggleDropDown:function(){!this.disabled&&!this.readOnly&&
  (this._opened?this.closeDropDown():this.loadAndOpenDropDown())},openDropDown:function(){var a=this.dropDown,f=a.domNode,g=this._aroundNode||this.domNode,h=this;if(!this._preparedNode){this._preparedNode=!0;if(f.style.width)this._explicitDDWidth=!0;if(f.style.height)this._explicitDDHeight=!0}if(this.maxHeight||this.forceWidth||this.autoWidth){var l={display:"",visibility:"hidden"};if(!this._explicitDDWidth)l.width="";if(!this._explicitDDHeight)l.height="";b.set(f,l);l=this.maxHeight;if(-1==l)var l=
  r.getBox(this.ownerDocument),m=c.position(g,!1),l=Math.floor(Math.max(m.y,l.h-(m.y+m.h)));p.moveOffScreen(a);a.startup&&!a._started&&a.startup();var m=c.getMarginSize(f),n=l&&m.h>l;b.set(f,{overflowX:"visible",overflowY:n?"auto":"visible"});n?(m.h=l,"w"in m&&(m.w+=16)):delete m.h;this.forceWidth?m.w=g.offsetWidth:this.autoWidth?m.w=Math.max(m.w,g.offsetWidth):delete m.w;k.isFunction(a.resize)?a.resize(m):c.setMarginBox(f,m)}a=p.open({parent:this,popup:a,around:g,orient:this.dropDownPosition,onExecute:function(){h.closeDropDown(!0)},
  onCancel:function(){h.closeDropDown(!0)},onClose:function(){e.set(h._popupStateNode,"popupActive",!1);d.remove(h._popupStateNode,"dijitHasDropDownOpen");h._set("_opened",!1)}});e.set(this._popupStateNode,"popupActive","true");d.add(this._popupStateNode,"dijitHasDropDownOpen");this._set("_opened",!0);this.domNode.setAttribute("aria-expanded","true");return a},closeDropDown:function(a){this._focusDropDownTimer&&(this._focusDropDownTimer.remove(),delete this._focusDropDownTimer);if(this._opened)this.domNode.setAttribute("aria-expanded",
  "false"),a&&this.focus(),p.close(this.dropDown),this._opened=!1}})})},"dijit/popup":function(){define("dojo/_base/array,dojo/aspect,dojo/_base/connect,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-construct,dojo/dom-geometry,dojo/dom-style,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/on,dojo/sniff,./place,./BackgroundIframe,./main".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){function s(){this._popupWrapper&&(c.destroy(this._popupWrapper),delete this._popupWrapper)}g=g(null,{_stack:[],
  _beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var b=a._popupWrapper,d=a.domNode;if(!b)b=c.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},a.ownerDocumentBody),b.appendChild(d),d=d.style,d.display="",d.visibility="",d.position="",d.top="0px",a._popupWrapper=b,j.after(a,"destroy",s,!0);return b},moveOffScreen:function(a){a=this._createWrapper(a);f.set(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);f.set(a,"display",
  "none")},getTopPopup:function(){for(var a=this._stack,b=a.length-1;0<b&&a[b].parent===a[b-1].widget;b--);return a[b]},open:function(c){for(var f=this._stack,g=c.popup,s=c.orient||["below","below-alt","above","above-alt"],i=c.parent?c.parent.isLeftToRight():b.isBodyLtr(g.ownerDocument),j=c.around,q=c.around&&c.around.id?c.around.id+"_dropdown":"popup_"+this._idGen++;f.length&&(!c.parent||!e.isDescendant(c.parent.domNode,f[f.length-1].widget.domNode));)this.close(f[f.length-1].widget);var C=this._createWrapper(g);
  d.set(C,{id:q,style:{zIndex:this._beginZIndex+f.length},"class":"dijitPopup "+(g.baseClass||g["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:c.parent?c.parent.id:""});if((m("ie")||m("mozilla"))&&!g.bgIframe)g.bgIframe=new p(C);s=j?l.around(C,j,s,i,g.orient?n.hitch(g,"orient"):null):l.at(C,c,"R"==s?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],c.padding);C.style.display="";C.style.visibility="visible";g.domNode.style.visibility="visible";i=[];i.push(r(C,h._keypress,n.hitch(this,function(b){if(b.charOrCode==
  k.ESCAPE&&c.onCancel)a.stop(b),c.onCancel();else if(b.charOrCode===k.TAB&&(a.stop(b),(b=this.getTopPopup())&&b.onCancel))b.onCancel()})));g.onCancel&&c.onCancel&&i.push(g.on("cancel",c.onCancel));i.push(g.on(g.onExecute?"execute":"change",n.hitch(this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()})));f.push({widget:g,parent:c.parent,onExecute:c.onExecute,onCancel:c.onCancel,onClose:c.onClose,handlers:i});if(g.onOpen)g.onOpen(s);return s},close:function(a){for(var b=this._stack;a&&
  i.some(b,function(b){return b.widget==a})||!a&&b.length;){var c=b.pop(),d=c.widget,f=c.onClose;if(d.onClose)d.onClose();for(var e;e=c.handlers.pop();)e.remove();d&&d.domNode&&this.hide(d);f&&f()}}});return q.popup=new g})},"url:dijit/form/templates/DropDownBox.html":'<div class="dijit dijitReset dijitInline dijitLeft"\n\tid="widget_${id}"\n\trole="combobox"\n\t><div class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdata-dojo-attach-point="_buttonNode, _popupStateNode" role="presentation"\n\t\t><input class="dijitReset dijitInputField dijitArrowButtonInner" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="button presentation" aria-hidden="true"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class=\'dijitReset dijitInputInner\' ${!nameAttrSetting} type="text" autocomplete="off"\n\t\t\tdata-dojo-attach-point="textbox,focusNode" role="textbox" aria-haspopup="true"\n\t/></div\n></div>\n',
  "dijit/form/Button":function(){define("require,dojo/_base/declare,dojo/dom-class,dojo/has,dojo/_base/kernel,dojo/_base/lang,dojo/ready,./_FormWidget,./_ButtonMixin,dojo/text!./templates/Button.html".split(","),function(i,j,h,g,e,d,c,b,f,a){g("dijit-legacy-requires")&&c(0,function(){i(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});return j("dijit.form.Button",[b,f],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",
  templateString:a,_setValueAttr:"valueNode",_onClick:function(a){var b=this.inherited(arguments);b&&this.valueNode&&(this.valueNode.click(),a.preventDefault(),a.stopPropagation());return b},_fillContent:function(a){if(a&&(!this.params||!("label"in this.params)))if(a=d.trim(a.innerHTML))this.label=a},_setShowLabelAttr:function(a){this.containerNode&&h.toggle(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},setLabel:function(a){e.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.",
  "","2.0");this.set("label",a)},_setLabelAttr:function(a){this.inherited(arguments);if(!this.showLabel&&!("title"in this.params))this.titleNode.title=d.trim(this.containerNode.innerText||this.containerNode.textContent||"")}})})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/_base/event","../registry"],function(i,j,h,g){return i("dijit.form._ButtonMixin",null,{label:"",type:"button",_onClick:function(e){if(this.disabled)return h.stop(e),!1;var d=!1===this.onClick(e);
  if(!d&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var c=this.domNode;c.parentNode;c=c.parentNode){var b=g.byNode(c);if(b&&"function"==typeof b._onSubmit){b._onSubmit(e);d=!0;break}}d&&e.preventDefault();return!d},postCreate:function(){this.inherited(arguments);j.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(e){this._set("label",e);(this.containerNode||this.focusNode).innerHTML=e}})})},"url:dijit/form/templates/Button.html":'<span class="dijit dijitReset dijitInline" role="presentation"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdata-dojo-attach-event="ondijitclick:_onClick" role="presentation"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" data-dojo-attach-point="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdata-dojo-attach-point="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen"\n\t\ttabIndex="-1" role="presentation" data-dojo-attach-point="valueNode"\n/></span>\n',
  "dijit/form/Select":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom-attr,dojo/dom-class,dojo/dom-geometry,dojo/_base/event,dojo/i18n,dojo/_base/lang,dojo/sniff,./_FormSelectWidget,../_HasDropDown,../Menu,../MenuItem,../MenuSeparator,../Tooltip,dojo/text!./templates/Select.html,dojo/i18n!./nls/validate".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p){var q=j("dijit.form._SelectMenu",n,{autoFocus:!0,buildRendering:function(){this.inherited(arguments);var a=this.menuTableNode=this.domNode,
  b=this.domNode=this.ownerDocument.createElement("div");b.style.cssText="overflow-x: hidden; overflow-y: scroll";a.parentNode&&a.parentNode.replaceChild(b,a);g.remove(a,"dijitMenuTable");b.className=a.className+" dijitSelectMenu";a.className="dijitReset dijitMenuTable";a.setAttribute("role","listbox");b.setAttribute("role","presentation");b.appendChild(a)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onselectstart",d.stop)},focus:function(){var a=!1,c=this.parentWidget.value;
  b.isArray(c)&&(c=c[c.length-1]);c&&i.forEach(this.parentWidget._getChildren(),function(b){b.option&&c===b.option.value&&(a=!0,this.focusChild(b,!1))},this);a||this.inherited(arguments)},resize:function(a){if(a&&(e.setMarginBox(this.domNode,a),"w"in a))this.menuTableNode.style.width="100%"}}),j=j("dijit.form.Select",[a,k],{baseClass:"dijitSelect dijitValidationTextBox",templateString:p,_buttonInputDisabled:f("ie")?"disabled":"",required:!1,state:"",message:"",tooltipPosition:[],emptyLabel:"&#160;",
  _isLoaded:!1,_childrenLoaded:!1,_fillContent:function(){this.inherited(arguments);if(this.options.length&&!this.value&&this.srcNodeRef){var a=this.srcNodeRef.selectedIndex||0;this.value=this.options[0<=a?a:0].value}this.dropDown=new q({id:this.id+"_menu",parentWidget:this});g.add(this.dropDown.domNode,this.baseClass.replace(/\s+|$/g,"Menu "))},_getMenuItemForOption:function(a){if(!a.value&&!a.label)return new m({ownerDocument:this.ownerDocument});var c=b.hitch(this,"_setValueAttr",a),a=new r({option:a,
  label:a.label||this.emptyLabel,onClick:c,ownerDocument:this.ownerDocument,dir:this.dir,disabled:a.disabled||!1});a.focusNode.setAttribute("role","option");return a},_addOptionItem:function(a){this.dropDown&&this.dropDown.addChild(this._getMenuItemForOption(a))},_getChildren:function(){return!this.dropDown?[]:this.dropDown.getChildren()},_loadChildren:function(a){!0===a?(this.dropDown&&delete this.dropDown.focusedChild,this.options.length?this.inherited(arguments):(i.forEach(this._getChildren(),function(a){a.destroyRecursive()}),
  this.dropDown.addChild(new r({ownerDocument:this.ownerDocument,label:this.emptyLabel})))):this._updateSelection();this._isLoaded=!1;this._childrenLoaded=!0;this._loadingStore||this._setValueAttr(this.value,!1)},_refreshState:function(){this._started&&this.validate(this.focused)},startup:function(){this.inherited(arguments);this._refreshState()},_setValueAttr:function(a){this.inherited(arguments);h.set(this.valueNode,"value",this.get("value"));this._refreshState()},_setDisabledAttr:function(a){this.inherited(arguments);
  this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setOptionsAttr:function(a){this._isLoaded=!1;this._set("options",a)},_setDisplay:function(a){a=a||this.emptyLabel;this.containerNode.innerHTML='<span role="option" class="dijitReset dijitInline '+this.baseClass.replace(/\s+|$/g,"Label ")+'">'+a+"</span>"},validate:function(a){a=this.disabled||this.isValid(a);this._set("state",a?"":this._hasBeenBlurred?"Error":
  "Incomplete");this.focusNode.setAttribute("aria-invalid",a?"false":"true");var b=a?"":this._missingMsg;b&&this.focused&&this._hasBeenBlurred?l.show(b,this.domNode,this.tooltipPosition,!this.isLeftToRight()):l.hide(this.domNode);this._set("message",b);return a},isValid:function(){return!this.required||0===this.value||!/^\s*$/.test(this.value||"")},reset:function(){this.inherited(arguments);l.hide(this.domNode);this._refreshState()},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=
  c.getLocalization("dijit.form","validate",this.lang).missingMessage},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onselectstart",d.stop);this.domNode.setAttribute("aria-expanded","false");9>f("ie")&&this.defer(function(){try{var a=domStyle.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;a<c.length;a++)c[a].style.fontFamily=b}}}catch(d){}})},_setStyleAttr:function(a){this.inherited(arguments);
  g.toggle(this.domNode,this.baseClass.replace(/\s+|$/g,"FixedWidth "),!!this.domNode.style.width)},isLoaded:function(){return this._isLoaded},loadDropDown:function(a){this._loadChildren(!0);this._isLoaded=!0;a()},closeDropDown:function(){this.inherited(arguments);if(this.dropDown&&this.dropDown.menuTableNode)this.dropDown.menuTableNode.style.width=""},destroy:function(a){this.dropDown&&!this.dropDown._destroyed&&(this.dropDown.destroyRecursive(a),delete this.dropDown);this.inherited(arguments)},_onFocus:function(){this.validate(!0);
  this.inherited(arguments)},_onBlur:function(){l.hide(this.domNode);this.inherited(arguments);this.validate(!1)}});j._Menu=q;return j})},"dijit/form/_FormSelectWidget":function(){define("dojo/_base/array,dojo/_base/Deferred,dojo/aspect,dojo/data/util/sorter,dojo/_base/declare,dojo/dom,dojo/dom-class,dojo/_base/kernel,dojo/_base/lang,dojo/query,dojo/when,dojo/store/util/QueryResults,./_FormValueWidget".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r){return e("dijit.form._FormSelectWidget",r,{multiple:!1,
  options:null,store:null,query:null,queryOptions:null,labelAttr:"",onFetch:null,sortByLabel:!0,loadChildrenOnOpen:!1,onLoadDeferred:null,getOptions:function(a){var b=a,c=this.options||[],d=c.length;if(void 0===b)return c;if(f.isArray(b))return i.map(b,"return this.getOptions(item);",this);f.isObject(a)&&(i.some(this.options,function(a,c){return a===b||a.value&&a.value===b.value?(b=c,!0):!1})||(b=-1));if("string"==typeof b)for(a=0;a<d;a++)if(c[a].value===b){b=a;break}return"number"==typeof b&&0<=b&&
  b<d?this.options[b]:null},addOption:function(a){f.isArray(a)||(a=[a]);i.forEach(a,function(a){a&&f.isObject(a)&&this.options.push(a)},this);this._loadChildren()},removeOption:function(a){f.isArray(a)||(a=[a]);a=this.getOptions(a);i.forEach(a,function(a){if(a)this.options=i.filter(this.options,function(b){return b.value!==a.value||b.label!==a.label}),this._removeOptionItem(a)},this);this._loadChildren()},updateOption:function(a){f.isArray(a)||(a=[a]);i.forEach(a,function(a){var b=this.getOptions(a),
  c;if(b)for(c in a)b[c]=a[c]},this);this._loadChildren()},setStore:function(a,b,c){var d=this.store,c=c||{};if(d!==a){for(var e;e=this._notifyConnections.pop();)e.remove();if(!a.get&&(f.mixin(a,{_oldAPI:!0,get:function(a){var b=new j;this.fetchItemByIdentity({identity:a,onItem:function(a){b.resolve(a)},onError:function(a){b.reject(a)}});return b.promise},query:function(a,b){var c=new j(function(){d.abort&&d.abort()});c.total=new j;var d=this.fetch(f.mixin({query:a,onBegin:function(a){c.total.resolve(a)},
  onComplete:function(a){c.resolve(a)},onError:function(a){c.reject(a)}},b));return new n(c)}}),a.getFeatures()["dojo.data.api.Notification"]))this._notifyConnections=[h.after(a,"onNew",f.hitch(this,"_onNewItem"),!0),h.after(a,"onDelete",f.hitch(this,"_onDeleteItem"),!0),h.after(a,"onSet",f.hitch(this,"_onSetItem"),!0)];this._set("store",a)}this.options&&this.options.length&&this.removeOption(this.options);this._queryRes&&this._queryRes.close&&this._queryRes.close();c.query&&(this._set("query",c.query),
  this._set("queryOptions",c.queryOptions));if(a)this._loadingStore=!0,this.onLoadDeferred=new j,this._queryRes=a.query(this.query,this.queryOptions),k(this._queryRes,f.hitch(this,function(d){if(this.sortByLabel&&!c.sort&&d.length)if(d[0].getValue)d.sort(g.createSortFunction([{attribute:a.getLabelAttributes(d[0])[0]}],a));else{var e=this.labelAttr;d.sort(function(a,b){return a[e]>b[e]?1:b[e]>a[e]?-1:0})}c.onFetch&&(d=c.onFetch.call(this,d,c));i.forEach(d,function(a){this._addOptionForItem(a)},this);
  this._queryRes.observe&&this._queryRes.observe(f.hitch(this,function(a,b,c){b==c?this._onSetItem(a):(-1!=b&&this._onDeleteItem(a),-1!=c&&this._onNewItem(a))}),!0);this._loadingStore=!1;this.set("value","_pendingValue"in this?this._pendingValue:b);delete this._pendingValue;this.loadChildrenOnOpen?this._pseudoLoadChildren(d):this._loadChildren();this.onLoadDeferred.resolve(!0);this.onSetStore()}),function(a){console.error("dijit.form.Select: "+a.toString());this.onLoadDeferred.reject(a)});return d},
  _setValueAttr:function(a,b){this._onChangeActive||(b=null);if(this._loadingStore)this._pendingValue=a;else{var c=this.getOptions()||[];f.isArray(a)||(a=[a]);i.forEach(a,function(b,d){f.isObject(b)||(b+="");"string"===typeof b&&(a[d]=i.filter(c,function(a){return a.value===b})[0]||{value:"",label:""})},this);a=i.filter(a,function(a){return a&&a.value});if(!this.multiple&&(!a[0]||!a[0].value)&&c.length)a[0]=c[0];i.forEach(c,function(b){b.selected=i.some(a,function(a){return a.value===b.value})});var d=
  i.map(a,function(a){return a.value}),e=i.map(a,function(a){return a.label});"undefined"==typeof d||"undefined"==typeof d[0]||(this._setDisplay(this.multiple?e:e[0]),this.inherited(arguments,[this.multiple?d:d[0],b]),this._updateSelection())}},_getDisplayedValueAttr:function(){var a=this.get("value");f.isArray(a)||(a=[a]);a=i.map(this.getOptions(a),function(a){return a&&"label"in a?a.label:a?a.value:null},this);return this.multiple?a:a[0]},_loadChildren:function(){this._loadingStore||(i.forEach(this._getChildren(),
  function(a){a.destroyRecursive()}),i.forEach(this.options,this._addOptionItem,this),this._updateSelection())},_updateSelection:function(){this._set("value",this._getValueFromOpts());var a=this.value;f.isArray(a)||(a=[a]);a&&a[0]&&i.forEach(this._getChildren(),function(b){var d=i.some(a,function(a){return b.option&&a===b.option.value});c.toggle(b.domNode,this.baseClass.replace(/\s+|$/g,"SelectedOption "),d);b.domNode.setAttribute("aria-selected",d?"true":"false")},this)},_getValueFromOpts:function(){var a=
  this.getOptions()||[];if(!this.multiple&&a.length){var b=i.filter(a,function(a){return a.selected})[0];if(b&&b.value)return b.value;a[0].selected=!0;return a[0].value}return this.multiple?i.map(i.filter(a,function(a){return a.selected}),function(a){return a.value})||[]:""},_onNewItem:function(a,b){(!b||!b.parent)&&this._addOptionForItem(a)},_onDeleteItem:function(a){this.removeOption(this.store.getIdentity(a))},_onSetItem:function(a){this.updateOption(this._getOptionObjForItem(a))},_getOptionObjForItem:function(a){var b=
  this.store,c=this.labelAttr&&this.labelAttr in a?a[this.labelAttr]:b.getLabel(a);return{value:c?b.getIdentity(a):null,label:c,item:a}},_addOptionForItem:function(a){var b=this.store;b.isItemLoaded&&!b.isItemLoaded(a)?b.loadItem({item:a,onItem:function(a){this._addOptionForItem(a)},scope:this}):this.addOption(this._getOptionObjForItem(a))},constructor:function(a){this._oValue=(a||{}).value||null;this._notifyConnections=[]},buildRendering:function(){this.inherited(arguments);d.setSelectable(this.focusNode,
  !1)},_fillContent:function(){if(!this.options)this.options=this.srcNodeRef?a("> *",this.srcNodeRef).map(function(a){return"separator"===a.getAttribute("type")?{value:"",label:"",selected:!1,disabled:!1}:{value:a.getAttribute("data-"+b._scopeName+"-value")||a.getAttribute("value"),label:""+a.innerHTML,selected:a.getAttribute("selected")||!1,disabled:a.getAttribute("disabled")||!1}},this):[];this.value?this.multiple&&"string"==typeof this.value&&this._set("value",this.value.split(",")):this._set("value",
  this._getValueFromOpts())},postCreate:function(){this.inherited(arguments);this.connect(this,"onChange","_updateSelection");var a=this.store;if(a&&(a.getIdentity||a.getFeatures()["dojo.data.api.Identity"]))this.store=null,this.setStore(a,this._oValue)},startup:function(){this._loadChildren();this.inherited(arguments)},destroy:function(){for(var a;a=this._notifyConnections.pop();)a.remove();this._queryRes&&this._queryRes.close&&this._queryRes.close();this.inherited(arguments)},_addOptionItem:function(){},
  _removeOptionItem:function(){},_setDisplay:function(){},_getChildren:function(){return[]},_getSelectedOptionsAttr:function(){return this.getOptions(this.get("value"))},_pseudoLoadChildren:function(){},onSetStore:function(){}})})},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(i){var j={};i.setObject("dojo.data.util.sorter",j);j.basicComparator=function(h,g){var e=-1;null===h&&(h=void 0);null===g&&(g=void 0);if(h==g)e=0;else if(h>g||null==h)e=1;return e};j.createSortFunction=
  function(h,g){function e(a,b,c,d){return function(f,e){var k=d.getValue(f,a),g=d.getValue(e,a);return b*c(k,g)}}for(var d=[],c,b=g.comparatorMap,f=j.basicComparator,a=0;a<h.length;a++){c=h[a];var k=c.attribute;if(k){c=c.descending?-1:1;var n=f;b&&("string"!==typeof k&&"toString"in k&&(k=k.toString()),n=b[k]||f);d.push(e(k,c,n,g))}}return function(a,b){for(var c=0;c<d.length;){var f=d[c++](a,b);if(0!==f)return f}return 0}};return j})},"dijit/Menu":function(){define("require,dojo/_base/array,dojo/_base/declare,dojo/_base/event,dojo/dom,dojo/dom-attr,dojo/dom-geometry,dojo/dom-style,dojo/keys,dojo/_base/lang,dojo/on,dojo/sniff,dojo/_base/window,dojo/window,./popup,./DropDownMenu,dojo/ready".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){n("dijit-legacy-requires")&&q(0,function(){i(["dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"])});return h("dijit.Menu",p,{constructor:function(){this._bindings=[]},targetNodeIds:[],selector:"",contextMenuForWindow:!1,leftClickToOpen:!1,refocus:!0,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(this.ownerDocumentBody):j.forEach(this.targetNodeIds,this.bindDomNode,this);this.inherited(arguments)},_iframeContentWindow:function(a){return m.get(this._iframeContentDocument(a))||
  this._iframeContentDocument(a).__parent__||a.name&&r.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&r.doc.frames[a.name]&&r.doc.frames[a.name].document||null},bindDomNode:function(b){var b=e.byId(b,this.ownerDocument),c;if("iframe"==b.tagName.toLowerCase()){var h=b,l=this._iframeContentWindow(h);c=r.body(l.document)}else c=b==r.body(this.ownerDocument)?this.ownerDocument.documentElement:b;var n={node:b,iframe:h};
  d.set(b,"_dijitMenu"+this.id,this._bindings.push(n));var m=a.hitch(this,function(a){var b=this.selector,c=b?function(a){return k.selector(b,a)}:function(a){return a},d=this;return[k(a,c(this.leftClickToOpen?"click":"contextmenu"),function(a){g.stop(a);d._scheduleOpen(this,h,{x:a.pageX,y:a.pageY})}),k(a,c("keydown"),function(a){a.shiftKey&&a.keyCode==f.F10&&(g.stop(a),d._scheduleOpen(this,h))})]});n.connects=c?m(c):[];if(h)n.onloadHandler=a.hitch(this,function(){var a=this._iframeContentWindow(h);
  c=r.body(a.document);n.connects=m(c)}),h.addEventListener?h.addEventListener("load",n.onloadHandler,!1):h.attachEvent("onload",n.onloadHandler)},unBindDomNode:function(a){var b;try{b=e.byId(a,this.ownerDocument)}catch(c){return}a="_dijitMenu"+this.id;if(b&&d.has(b,a)){for(var f=d.get(b,a)-1,k=this._bindings[f],g;g=k.connects.pop();)g.remove();(g=k.iframe)&&(g.removeEventListener?g.removeEventListener("load",k.onloadHandler,!1):g.detachEvent("onload",k.onloadHandler));d.remove(b,a);delete this._bindings[f]}},
  _scheduleOpen:function(a,b,c){if(!this._openTimer)this._openTimer=this.defer(function(){delete this._openTimer;this._openMyself({target:a,iframe:b,coords:c})},1)},_openMyself:function(a){function d(){j.refocus&&p&&p.focus();l.close(j)}var f=a.target,k=a.iframe,a=a.coords;this.currentTarget=f;if(a){if(k){var f=c.position(k,!0),g=this._iframeContentWindow(k),g=c.docScroll(g.document),h=b.getComputedStyle(k),m=b.toPixelValue,i=(n("ie")&&n("quirks")?0:m(k,h.paddingLeft))+(n("ie")&&n("quirks")?m(k,h.borderLeftWidth):
  0),k=(n("ie")&&n("quirks")?0:m(k,h.paddingTop))+(n("ie")&&n("quirks")?m(k,h.borderTopWidth):0);a.x+=f.x+i-g.x;a.y+=f.y+k-g.y}}else a=c.position(f,!0),a.x+=10,a.y+=10;var j=this,k=this._focusManager.get("prevNode"),f=this._focusManager.get("curNode"),p=!f||e.isDescendant(f,this.domNode)?k:f;l.open({popup:this,x:a.x,y:a.y,onExecute:d,onCancel:d,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);l.close(this)}},destroy:function(){j.forEach(this._bindings,
  function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}})})},"dijit/DropDownMenu":function(){define("dojo/_base/declare,dojo/_base/event,dojo/keys,dojo/text!./templates/Menu.html,./_OnDijitClickMixin,./_MenuBase".split(","),function(i,j,h,g,e,d){return i("dijit.DropDownMenu",[d,e],{templateString:g,baseClass:"dijitMenu",postCreate:function(){this.inherited(arguments);var c=this.isLeftToRight();this._openSubMenuKey=c?h.RIGHT_ARROW:h.LEFT_ARROW;this._closeSubMenuKey=c?h.LEFT_ARROW:
  h.RIGHT_ARROW;this.connectKeyNavHandlers([h.UP_ARROW],[h.DOWN_ARROW])},_onKeyPress:function(c){if(!c.ctrlKey&&!c.altKey)switch(c.charOrCode){case this._openSubMenuKey:this._moveToPopup(c);j.stop(c);break;case this._closeSubMenuKey:if(this.parentMenu)if(this.parentMenu._isMenuBar)this.parentMenu.focusPrev();else this.onCancel(!1);else j.stop(c)}}})})},"url:dijit/templates/Menu.html":'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}"\n\t   data-dojo-attach-event="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" data-dojo-attach-point="containerNode"></tbody>\n</table>\n',
  "dijit/_MenuBase":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-class,dojo/_base/lang,dojo/mouse,dojo/on,dojo/window,./a11yclick,./popup,./registry,./_Widget,./_KeyNavContainer,./_TemplatedMixin".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l){return j("dijit._MenuBase",[r,l,m],{parentMenu:null,popupDelay:500,autoFocus:!1,childSelector:function(a){var b=n.byNode(a);return a.parentNode==this.containerNode&&b&&b.focus},postCreate:function(){var f=this,e="string"==
  typeof this.childSelector?this.childSelector:d.hitch(this,"childSelector");this.own(b(this.containerNode,b.selector(e,c.enter),function(){f.onItemHover(n.byNode(this))}),b(this.containerNode,b.selector(e,c.leave),function(){f.onItemUnhover(n.byNode(this))}),b(this.containerNode,b.selector(e,a),function(a){f.onItemClick(n.byNode(this),a);a.stopPropagation();a.preventDefault()}));this.inherited(arguments)},onExecute:function(){},onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&
  !this.focusedChild.disabled)this.onItemClick(this.focusedChild,a);else(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(!1);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(!0);this._stopPendingCloseTimer(this.currentPopup)}},onItemHover:function(a){if(this.isActive&&(this.focusChild(a),this.focusedChild.popup&&
  !this.focusedChild.disabled&&!this.hover_timer))this.hover_timer=this.defer("_openPopup",this.popupDelay);this.focusedChild&&this.focusChild(a);this._hoveredChild=a;a._set("hovering",!0)},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(!1);var b=a.popup;if(b)this._stopPendingCloseTimer(b),b._pendingClose_timer=this.defer(function(){b._pendingClose_timer=null;if(b.parentMenu)b.parentMenu.currentPopup=null;k.close(b)},this.popupDelay)},onItemUnhover:function(a){this.isActive&&this._stopPopupTimer();
  if(this._hoveredChild==a)this._hoveredChild=null;a._set("hovering",!1)},_stopPopupTimer:function(){if(this.hover_timer)this.hover_timer=this.hover_timer.remove()},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer)a._pendingClose_timer=a._pendingClose_timer.remove()},_stopFocusTimer:function(){if(this._focus_timer)this._focus_timer=this._focus_timer.remove()},_getTopMenu:function(){for(var a=this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,b){"undefined"==typeof this.isShowingNow&&
  this._markActive();this.focusChild(a);if(a.disabled)return!1;a.popup?this._openPopup("keypress"==b.type):(this.onExecute(),a._onClick?a._onClick(b):a.onClick(b))},_openPopup:function(a){this._stopPopupTimer();var b=this.focusedChild;if(b){var c=b.popup;if(!c.isShowingNow){this.currentPopup&&(this._stopPendingCloseTimer(this.currentPopup),k.close(this.currentPopup));c.parentMenu=this;c.from_item=b;var f=this;k.open({parent:this,popup:c,around:b.domNode,orient:this._orient||["after","before"],onCancel:function(){f.focusChild(b);
  f._cleanUp();b._setSelected(!0);f.focusedChild=b},onExecute:d.hitch(this,"_cleanUp")});this.currentPopup=c;c.connect(c.domNode,"onmouseenter",d.hitch(f,"_onPopupHover"))}if(a&&c.focus)c._focus_timer=this.defer(d.hitch(c,function(){this._focus_timer=null;this.focus()}))}},_markActive:function(){this.isActive=!0;e.replace(this.domNode,"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=!0;this._markActive()},_markInactive:function(){this.isActive=!1;e.replace(this.domNode,"dijitMenuPassive",
  "dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=!1;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup)0<=i.indexOf(this._focusManager.activeStack,this.id)&&(g.set(this.focusedChild.focusNode,"tabIndex",this.tabIndex),this.focusedChild.focusNode.focus()),k.close(this.currentPopup),this.currentPopup=null;if(this.focusedChild)this.focusedChild._setSelected(!1),this.onItemUnhover(this.focusedChild),this.focusedChild=
  null},_onItemFocus:function(a){if(this._hoveredChild&&this._hoveredChild!=a)this.onItemUnhover(this._hoveredChild)},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();"undefined"==typeof this.isShowingNow&&this._markInactive()}})})},"dijit/_KeyNavContainer":function(){define("dojo/_base/kernel,./_Container,./_FocusMixin,dojo/_base/array,dojo/keys,dojo/_base/declare,dojo/_base/event,dojo/dom-attr,dojo/_base/lang".split(","),function(i,j,h,g,e,d,c,b,
  f){return d("dijit._KeyNavContainer",[h,j],{tabIndex:"0",connectKeyNavHandlers:function(a,b){var c=this._keyNavCodes={},d=f.hitch(this,"focusPrev"),h=f.hitch(this,"focusNext");g.forEach(a,function(a){c[a]=d});g.forEach(b,function(a){c[a]=h});c[e.HOME]=f.hitch(this,"focusFirstChild");c[e.END]=f.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){i.deprecated("startupKeyNavChildren() call no longer needed",
  "","2.0")},startup:function(){this.inherited(arguments);g.forEach(this.getChildren(),f.hitch(this,"_startupChild"))},addChild:function(a,b){this.inherited(arguments);this._startupChild(a)},focus:function(){this.focusFirstChild()},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild())},focusLastChild:function(){this.focusChild(this._getLastFocusableChild())},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,
  -1),!0)},focusChild:function(a,b){a&&(this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild),a.set("tabIndex",this.tabIndex),a.focus(b?"end":"start"),this._set("focusedChild",a))},_startupChild:function(a){a.set("tabIndex","-1");this.connect(a,"_onFocus",function(){a.set("tabIndex",this.tabIndex)});this.connect(a,"_onBlur",function(){a.set("tabIndex","-1")})},_onContainerFocus:function(a){a.target!==this.domNode||this.focusedChild||(this.focusFirstChild(),b.set(this.domNode,
  "tabIndex","-1"))},_onBlur:function(a){this.tabIndex&&b.set(this.domNode,"tabIndex",this.tabIndex);this.focusedChild=null;this.inherited(arguments)},_onContainerKeypress:function(a){if(!a.ctrlKey&&!a.altKey){var b=this._keyNavCodes[a.charOrCode];b&&(b(),c.stop(a))}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,b){a&&(a=this._getSiblingOfChild(a,
  b));for(var c=this.getChildren(),d=0;d<c.length;d++){a||(a=c[0<b?0:c.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,b)}return null}})})},"dijit/MenuItem":function(){define("dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-class,dojo/_base/kernel,dojo/sniff,./_Widget,./_TemplatedMixin,./_Contained,./_CssStateMixin,dojo/text!./templates/MenuItem.html".split(","),function(i,j,h,g,e,d,c,b,f,a,k){return i("dijit.MenuItem",[c,b,f,a],{templateString:k,baseClass:"dijitMenuItem",label:"",
  _setLabelAttr:function(a){this.containerNode.innerHTML=a;this._set("label",a);"auto"===this.textDir&&this.applyTextDir(this.focusNode,this.label)},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:!1,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";h.set(this.containerNode,"id",a);this.accelKeyNode&&(h.set(this.accelKeyNode,"id",this.id+"_accel"),
  a+=" "+this.id+"_accel");this.domNode.setAttribute("aria-labelledby",a);j.setSelectable(this.domNode,!1)},onClick:function(){},focus:function(){try{8==d("ie")&&this.containerNode.focus(),this.focusNode.focus()}catch(a){}},_onFocus:function(){this._setSelected(!0);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){g.toggle(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){e.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
  "","2.0");this.set("label",a)},setDisabled:function(a){e.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){this.focusNode.setAttribute("aria-disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;h.set(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)},_setTextDirAttr:function(a){if(!this._created||
  this.textDir!=a)this._set("textDir",a),this.applyTextDir(this.focusNode,this.label)}})})},"url:dijit/templates/MenuItem.html":'<tr class="dijitReset dijitMenuItem" data-dojo-attach-point="focusNode" role="menuitem" tabIndex="-1">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" data-dojo-attach-point="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" data-dojo-attach-point="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" data-dojo-attach-point="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div data-dojo-attach-point="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>\n',
  "dijit/MenuSeparator":function(){define("dojo/_base/declare,dojo/dom,./_WidgetBase,./_TemplatedMixin,./_Contained,dojo/text!./templates/MenuSeparator.html".split(","),function(i,j,h,g,e,d){return i("dijit.MenuSeparator",[h,g,e],{templateString:d,buildRendering:function(){this.inherited(arguments);j.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"url:dijit/templates/MenuSeparator.html":'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>',
  "url:dijit/form/templates/Select.html":'<table class="dijit dijitReset dijitInline dijitLeft"\n\tdata-dojo-attach-point="_buttonNode,tableNode,focusNode" cellspacing=\'0\' cellpadding=\'0\'\n\trole="listbox" aria-haspopup="true"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonContents" role="presentation"\n\t\t\t><div class="dijitReset dijitInputField dijitButtonText"  data-dojo-attach-point="containerNode,_popupStateNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitValidationContainer"\n\t\t\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t/></div\n\t\t\t><input type="hidden" ${!nameAttrSetting} data-dojo-attach-point="valueNode" value="${value}" aria-hidden="true"\n\t\t/></td\n\t\t><td class="dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer"\n\t\t\tdata-dojo-attach-point="titleNode" role="presentation"\n\t\t\t><input class="dijitReset dijitInputField dijitArrowButtonInner" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t\t${_buttonInputDisabled}\n\t\t/></td\n\t></tr></tbody\n></table>\n',
  "dijit/form/ToggleButton":function(){define(["dojo/_base/declare","dojo/_base/kernel","./Button","./_ToggleButtonMixin"],function(i,j,h,g){return i("dijit.form.ToggleButton",[h,g],{baseClass:"dijitToggleButton",setChecked:function(e){j.deprecated("setChecked("+e+") is deprecated. Use set('checked',"+e+") instead.","","2.0");this.set("checked",e)}})})},"dijit/form/_ToggleButtonMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(i,j){return i("dijit.form._ToggleButtonMixin",null,
  {checked:!1,_aria_attr:"aria-pressed",_onClick:function(h){var g=this.checked;this._set("checked",!g);var e=this.inherited(arguments);this.set("checked",e?this.checked:g);return e},_setCheckedAttr:function(h,g){this._set("checked",h);var e=this.focusNode||this.domNode;j.set(e,"checked",!!h);h?e.setAttribute("checked",""):e.removeAttribute("checked");e.setAttribute(this._aria_attr,""+h);this._handleOnChange(h,g)},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1)}})})},
  "dijit/form/DropDownButton":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/query,../registry,../popup,./Button,../_Container,../_HasDropDown,dojo/text!./templates/DropDownButton.html".split(","),function(i,j,h,g,e,d,c,b,f){return i("dijit.form.DropDownButton",[d,c,b],{baseClass:"dijitDropDownButton",templateString:f,_fillContent:function(){if(this.srcNodeRef){var a=h("*",this.srcNodeRef);this.inherited(arguments,[a[0]]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&
  this.dropDownContainer){var a=h("[widgetId]",this.dropDownContainer)[0];this.dropDown=g.byNode(a);delete this.dropDownContainer}this.dropDown&&e.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(a){var b=this.dropDown,c=b.on("load",j.hitch(this,function(){c.remove();a()}));b.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"url:dijit/form/templates/DropDownButton.html":'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdata-dojo-attach-event="ondijitclick:_onClick" data-dojo-attach-point="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdata-dojo-attach-point="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdata-dojo-attach-point="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdata-dojo-attach-point="valueNode" role="presentation"\n/></span>\n',
  "dojox/form/TriStateCheckBox":function(){define("dojo/_base/kernel,dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/_base/event,dojo/query,dojo/dom-attr,dojo/text!./resources/TriStateCheckBox.html,dijit/form/Button,dijit/form/_ToggleButtonMixin,dojo/NodeList-dom".split(","),function(i,j,h,g,e,d,c,b,f,a){return j("dojox.form.TriStateCheckBox",[f,a],{templateString:b,baseClass:"dojoxTriStateCheckBox",type:"checkbox",states:"",_stateLabels:null,stateValue:null,_currentState:0,_stateType:"False",
  readOnly:!1,checked:"",_aria_attr:"aria-checked",constructor:function(){this.states=[!1,"mixed",!0];this.checked=!1;this._stateLabels={False:"&#9633;",True:"&#8730;",Mixed:"&#9632;"};this.stateValues={False:!1,True:"on",Mixed:"mixed"}},_fillContent:function(){},postCreate:function(){c.set(this.stateLabelNode,"innerHTML",this._stateLabels[this._stateType]);this.inherited(arguments)},startup:function(){this.set("checked",this.params.checked||this.states[this._currentState]);c.set(this.stateLabelNode,
  "innerHTML",this._stateLabels[this._stateType]);this.inherited(arguments)},_setIconClassAttr:null,_setCheckedAttr:function(a,b){var d=h.indexOf(this.states,a);0<=d?(this._currentState=d,this._stateType=this._getStateType(a),c.set(this.focusNode,"value",this.stateValues[this._stateType]),c.set(this.stateLabelNode,"innerHTML",this._stateLabels[this._stateType]),this.inherited(arguments)):console.warn("Invalid state!")},setChecked:function(a){i.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
  a+") instead.","","2.0");this.set("checked",a)},_setStatesAttr:function(a){if(g.isArray(a))this._set("states",a);else if(g.isString(a)){for(var b={"true":!0,"false":!1,mixed:"mixed"},a=a.split(/\s*,\s*/),c=0;c<a.length;c++)a[c]=void 0!==b[a[c]]?b[a[c]]:!1;this._set("states",a)}},_setReadOnlyAttr:function(a){this._set("readOnly",a);c.set(this.focusNode,"readOnly",a)},_setValueAttr:function(a,b){if("string"==typeof a&&0>h.indexOf(this.states,a))""==a&&(a="on"),this.stateValues.True=a,a=!0;if(this._created)this._currentState=
  h.indexOf(this.states,a),this.set("checked",a,b),c.set(this.focusNode,"value",this.stateValues[this._stateType])},_setValuesAttr:function(a){this.stateValues.True=a[0]?a[0]:this.stateValues.True;this.stateValues.Mixed=a[1]?a[1]:this.stateValues.Mixed},_getValueAttr:function(){return this.stateValues[this._stateType]},reset:function(){this._hasBeenBlurred=!1;this.set("states",this.params.states||[!1,"mixed",!0]);this.stateValues=this.params.stateValues||{False:!1,True:"on",Mixed:"mixed"};this.set("values",
  this.params.values||[]);this.set("checked",this.params.checked||this.states[0])},_onFocus:function(){this.id&&d("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&d("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.mouseFocus=!1;this.inherited(arguments)},_onClick:function(a){if(this.readOnly||this.disabled)return e.stop(a),!1;this.click();return this.onClick(a)},click:function(){this._currentState>=this.states.length-1?
  this._currentState=0:-1==this._currentState?this.fixState():this._currentState++;var a=this._currentState;this.set("checked",this.states[this._currentState]);this._currentState=a;c.set(this.stateLabelNode,"innerHTML",this._stateLabels[this._stateType])},fixState:function(){this._currentState=this.states.length-1},_getStateType:function(a){return a?"mixed"==a?"Mixed":"True":"False"},_onMouseDown:function(){this.mouseFocus=!0}})})},"url:dojox/form/resources/TriStateCheckBox.html":'<div class="dijit dijitReset dijitInline" role="presentation"\n\t><div class="dojoxTriStateCheckBoxInner" dojoAttachPoint="stateLabelNode"></div\n\t><input ${!nameAttrSetting} type="${type}" role="${type}" dojoAttachPoint="focusNode"\n\tclass="dijitReset dojoxTriStateCheckBoxInput" dojoAttachEvent="onclick:_onClick"\n/></div>\n',
  "dojo/NodeList-dom":function(){define("dojo/NodeList-dom","./_base/kernel,./query,./_base/array,./_base/lang,./dom-class,./dom-construct,./dom-geometry,./dom-attr,./dom-style".split(","),function(i,j,h,g,e,d,c,b,f){function a(a){return function(b,c,d){return 2==arguments.length?a["string"==typeof c?"get":"set"](b,c):a.set(b,c,d)}}var k=function(a){return 1==a.length&&"string"==typeof a[0]},n=function(a){var b=a.parentNode;b&&b.removeChild(a)},r=j.NodeList,m=r._adaptWithCondition,l=r._adaptAsForEach,
  p=r._adaptAsMap;g.extend(r,{_normalize:function(a,b){var c=!0===a.parse;if("string"==typeof a.template)var f=a.templateFunc||i.string&&i.string.substitute,a=f?f(a.template,a):a;f=typeof a;"string"==f||"number"==f?(a=d.toDom(a,b&&b.ownerDocument),a=11==a.nodeType?g._toArray(a.childNodes):[a]):g.isArrayLike(a)?g.isArray(a)||(a=g._toArray(a)):a=[a];if(c)a._runParse=!0;return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,b,c,f){if(!(1!=b.nodeType&&"only"==c))for(var e,g=a.length,
  k=g-1;0<=k;k--){var h=f?this._cloneNode(a[k]):a[k];if(a._runParse&&i.parser&&i.parser.parse){e||(e=b.ownerDocument.createElement("div"));e.appendChild(h);i.parser.parse(e);for(h=e.firstChild;e.firstChild;)e.removeChild(e.firstChild)}k==g-1?d.place(h,b,c):b.parentNode.insertBefore(h,b);b=h}},position:p(c.position),attr:m(a(b),k),style:m(a(f),k),addClass:l(e.add),removeClass:l(e.remove),toggleClass:l(e.toggle),replaceClass:l(e.replace),empty:l(d.empty),removeAttr:l(b.remove),marginBox:p(c.getMarginBox),
  place:function(a,b){var c=j(a)[0];return this.forEach(function(a){d.place(a,c,b)})},orphan:function(a){return(a?j._filterResult(this,a):this).forEach(n)},adopt:function(a,b){return j(a).place(this[0],b)._stash(this)},query:function(a){if(!a)return this;var b=new r;this.map(function(c){j(a,c).forEach(function(a){void 0!==a&&b.push(a)})});return b._stash(this)},filter:function(a){var b=arguments,c=this,d=0;if("string"==typeof a){c=j._filterResult(this,b[0]);if(1==b.length)return c._stash(this);d=1}return this._wrap(h.filter(c,
  b[d],b[d+1]),this)},addContent:function(a,b){for(var a=this._normalize(a,this[0]),c=0,d;d=this[c];c++)this._place(a,d,b,0<c);return this}});return r})},"JBrowse/Util":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/Deferred","dojox/lang/functional/object","dojox/lang/functional/fold"],function(i,j,h){var g;return g={dojof:dojox.lang.functional,is_ie:0<=navigator.appVersion.indexOf("MSIE"),is_ie6:0<=navigator.appVersion.indexOf("MSIE 6"),addCommas:function(e){for(var d=(e+"").split("."),
  e=d[0],d=1<d.length?"."+d[1]:"",c=/(\d+)(\d{3})/;c.test(e);)e=e.replace(c,"$1,$2");return e+d},commifyNumber:function(){return this.addCommas.apply(this,arguments)},escapeHTML:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},fastDeclare:function(e){var d=e.constructor,c=function(){d.apply(this,arguments)};dojo.mixin(c.prototype,e);return c},isRightButton:function(e){if(!e)e=window.event;return e.which?3==e.which:e.button?2==e.button:!1},getViewportWidth:function(){var e=
  0;document.documentElement&&document.documentElement.clientWidth?e=document.documentElement.clientWidth:document.body&&document.body.clientWidth?e=document.body.clientWidth:window.innerWidth&&(e=window.innerWidth-18);return e},getViewportHeight:function(){var e=0;document.documentElement&&document.documentElement.clientHeight?e=document.documentElement.clientHeight:document.body&&document.body.clientHeight?e=document.body.clientHeight:window.innerHeight&&(e=window.innerHeight-18);return e},findNearest:function(e,
  d){for(var c=0,b=Math.abs(d-e[0]),f=1;f<e.length;f++)Math.abs(d-e[f])<b&&(c=f,b=Math.abs(d-e[f]));return c},fillTemplate:function(e,d){return e.replace(/\{([\w\s\.]+)\}/g,function(c,b){var f=j.getObject(b,!1,d);if(void 0!==(f=d[b]))return"function"==typeof f?f(b):f;return d.callback&&(f=d.callback.call(this,b),void 0!==f)?f:c})},maybeLoad:function(e,d,c,b){d.state?"loaded"==d.state?c(d.data):"error"==d.state?b():"loading"==d.state&&(d.successCallbacks.push(c),b&&d.errorCallbacks.push(b)):(d.state=
  "loading",d.successCallbacks=[c],d.errorCallbacks=[b],e=dojo.clone(e),e.load=function(b){d.state="loaded";d.data=b;for(var a=d.successCallbacks,c=0;c<a.length;c++)a[c](b)},e.error=function(b){console.error(""+b);d.state="error";for(var b=d.errorCallbacks,a=0;a<b.length;a++)b[a]()},dojo.xhrGet(e))},deepUpdate:function(e,d){for(var c in d)if(c in e&&"object"==typeof d[c]&&"object"==typeof e[c])g.deepUpdate(e[c],d[c]);else if("undefined"==typeof e[c]||"undefined"!=typeof d[c])e[c]=d[c];return e},humanReadableNumber:function(e){var e=
  parseInt(e),d="";1E12<=e?(e/=1E12,d="T"):1E9<=e?(e/=1E9,d="G"):1E6<=e?(e/=1E6,d="M"):1E3<=e&&(e/=1E3,d="K");return(e.toFixed(2)+" "+d).replace(/0+ /," ").replace(/\. /," ")},resolved:function(e){var d=new h;d.resolve(e);return d},resolveUrl:function(e,d){if(d.match(/\w+:\/\//))return d;if("/"==d.charAt(0))return e=e.match(/.*\/\/[^\/]*/),(e?e[0]:"")+d;e=e.replace(/\?.*$/,"");e=e.substring(0,e.length-e.match(/[^\/]*$/)[0].length);if("."==d)return e;for(;e&&"../"==d.substring(0,3);)e=e.substring(0,
  e.length-e.match(/[^\/]*\/$/)[0].length),d=d.substring(3);return e+d},loadJS:function(e){var d=new h;require(e,function(){for(var c=Array.prototype.slice.call(arguments),b=0;b<c.length;b++)if(!{object:!0,"function":!0}[typeof c[b]]){d.reject("could not load "+e[b]+": "+c[b]);return}d.resolve(c)});return d},parseLocString:function(e){if("string"!=typeof e)return null;var e=dojo.trim(e),d=(e.match(/\(([^\)]+)\)$/)||[])[1],c=function(a){a=(a+"").replace(/\D/g,"");a=parseInt(a,10);return"number"==typeof a&&
  !isNaN(a)?a:null},b={},f;if(-1!=e.indexOf(":"))f=e.split(":",2),b.ref=dojo.trim(f[0]),e=f[1];if(f=e.match(/^\s*([\d,]+)\s*\.\.+\s*([\d,]+)/)){if(b.start=c(f[1])-1,b.end=c(f[2]),b.start>b.end)e=b.start+1,b.start=b.end-1,b.end=e}else if(f=e.match(/^\s*([\d,]+)\b/))b.end=b.start=c(f[1])-1;else return null;if(d)b.extra=d;return b},basename:function(e,d){if(e&&e.match){var c=e.match(/[\/\\]([^\/\\]+)[\/\/\/]*$/);if((c=c?c[1]||void 0:e)&&d)d instanceof Array||(d=[d]),d=i.map(d,function(b){return b.replace(/([\.\?\+])/g,
  "\\$1")}),c=c.replace(RegExp(d.join("|")+"$","i"),"");return c}},assembleLocString:function(e){var d="",c={start:"number",end:"number",ref:"string",strand:"number"},b={},f;for(f in c)if(c[f]==typeof e[f]&&("number"!=c[f]||!isNaN(e[f])))b[f]=e[f];if("ref"in b&&(d+=b.ref,b.start||b.end))d+=":";"start"in b&&(d+=(Math.round(b.start)+1).toFixed(0).toLocaleString(),"end"in b&&(d+=".."));"end"in b&&(d+=Math.round(b.end).toFixed(0).toLocaleString());"strand"in b&&(d+={1:" (+ strand)","-1":" (- strand)","0":" (no strand)"}[b.strand||
  ""]||"");"extra"in e&&(d+=e.extra);return d},complement:function(){var e=/[ACGT]/gi,d={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"},c=String.fromCharCode(160),b=function(b){return d[b]||c};return function(c){return c.replace(e,b)}}(),revcom:function(e){return g.complement(e).split("").reverse().join("")},assembleLocStringWithLength:function(e){return g.assembleLocString(e)+
  " ("+g.humanReadableNumber(e.length||e.end-e.start+1)+"b)"},matchRefSeqName:function(e,d){for(var c in d)if(d.hasOwnProperty(c)){var b=e.toUpperCase(),f=c.toUpperCase();if(b==f||"CHR"+b==f||b=="CHR"+f)return d[c]}return null},debugHandler:function(e,d){return function(){var c=arguments;window.setTimeout(function(){var b=d;"string"==typeof b&&(b=e[b]);b.apply(e,c)},1)}},ucFirst:function(e){return"string"!=typeof e?void 0:e.charAt(0).toUpperCase()+e.slice(1)},uniq:function(e,d){var d=d||function(b){return""+
  b},c=[],b={};dojo.forEach(e,function(f){var a=d(f);b[d(f)]||c.push(f);b[a]=!0});return c},removeAttribute:function(e,d){try{delete e[d]}catch(c){e.removeAttribute&&e.removeAttribute(d)}},getResolution:function(e,d){var c;c="auto"==d?(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1):"disabled"==d?1:d;return 1<=c?c:1}}});if(!Array.prototype.map)Array.prototype.map=function(i,
  j){if(void 0===this||null===this)throw new TypeError;var h=Object(this),g=h.length>>>0;if("function"!==typeof i)throw new TypeError;for(var e=Array(g),d=0;d<g;d++)d in h&&(e[d]=i.call(j,h[d],d,h));return e};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(i){if(void 0===this||null===this)throw new TypeError;var j=Object(this),h=j.length>>>0;if(0===h)return-1;var g=0;0<arguments.length&&(g=Number(arguments[1]),g!==g?g=0:0!==g&&g!==1/0&&g!==-(1/0)&&(g=(0<g||-1)*Math.floor(Math.abs(g))));
  if(g>=h)return-1;for(g=0<=g?g:Math.max(h-Math.abs(g),0);g<h;g++)if(g in j&&j[g]===i)return g;return-1}},"dojox/lang/functional/object":function(){define(["dojo/_base/kernel","dojo/_base/lang","./lambda"],function(i,j,h){var g={};j.mixin(h,{keys:function(e){var d=[],c;for(c in e)c in g||d.push(c);return d},values:function(e){var d=[],c;for(c in e)c in g||d.push(e[c]);return d},filterIn:function(e,d,c){var c=c||i.global,d=h.lambda(d),b={},f,a;for(a in e)a in g||(f=e[a],d.call(c,f,a,e)&&(b[a]=f));return b},
  forIn:function(e,d,c){var c=c||i.global,d=h.lambda(d),b;for(b in e)b in g||d.call(c,e[b],b,e);return c},mapIn:function(e,d,c){var c=c||i.global,d=h.lambda(d),b={},f;for(f in e)f in g||(b[f]=d.call(c,e[f],f,e));return b}});return h})},"dojox/lang/functional/lambda":function(){define(["../..","dojo/_base/kernel","dojo/_base/lang","dojo/_base/array"],function(i,j,h,g){var e=h.getObject("lang.functional",!0,i),d={},c=1<"ab".split(/a*/).length?String.prototype.split:function(a){var b=this.split.call(this,
  a);(a=a.exec(this))&&0==a.index&&b.unshift("");return b},b=function(a){var b=[],d=c.call(a,/\s*->\s*/m);if(1<d.length)for(;d.length;)a=d.pop(),b=d.pop().split(/\s*,\s*|\s+/m),d.length&&d.push("(function("+b+"){return ("+a+")})");else if(a.match(/\b_\b/))b=["_"];else{var d=a.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),f=a.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(d||f)d&&(b.push("$1"),a="$1"+a),f&&(b.push("$2"),a+="$2");else{var d=a.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,
  "").match(/([a-z_$][a-z_$\d]*)/gi)||[],e={};g.forEach(d,function(a){a in e||(b.push(a),e[a]=1)})}}return{args:b,body:a}},f=function(a){return a.length?function(){var b=a.length-1,c=e.lambda(a[b]).apply(this,arguments);for(--b;0<=b;--b)c=e.lambda(a[b]).call(this,c);return c}:function(a){return a}};h.mixin(e,{rawLambda:function(a){return b(a)},buildLambda:function(a){a=b(a);return"function("+a.args.join(",")+"){return ("+a.body+");}"},lambda:function(a){if("function"==typeof a)return a;if(a instanceof
  Array)return f(a);if(a in d)return d[a];a=b(a);return d[a]=new Function(a.args,"return ("+a.body+");")},clearLambdaCache:function(){d={}}});return e})},"dojox/main":function(){define(["dojo/_base/kernel"],function(i){return i.dojox})},"dojox/lang/functional/fold":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/kernel","./lambda"],function(i,j,h,g){var e={};i.mixin(g,{foldl:function(d,c,b,f){"string"==typeof d&&(d=d.split(""));var f=f||h.global,c=g.lambda(c),a,k;if(i.isArray(d))for(a=
  0,k=d.length;a<k;b=c.call(f,b,d[a],a,d),++a);else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(a=0;d.hasNext();b=c.call(f,b,d.next(),a++,d));else for(a in d)a in e||(b=c.call(f,b,d[a],a,d));return b},foldl1:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||h.global,c=g.lambda(c),f,a,k;if(i.isArray(d)){f=d[0];for(a=1,k=d.length;a<k;f=c.call(b,f,d[a],a,d),++a);}else if("function"==typeof d.hasNext&&"function"==typeof d.next){if(d.hasNext()){f=d.next();for(a=1;d.hasNext();f=
  c.call(b,f,d.next(),a++,d));}}else for(a in k=!0,d)a in e||(k?(f=d[a],k=!1):f=c.call(b,f,d[a],a,d));return f},foldr:function(d,c,b,f){"string"==typeof d&&(d=d.split(""));for(var f=f||h.global,c=g.lambda(c),a=d.length;0<a;--a,b=c.call(f,b,d[a],a,d));return b},foldr1:function(d,c,b){"string"==typeof d&&(d=d.split(""));for(var b=b||h.global,c=g.lambda(c),f=d.length,a=d[f-1],f=f-1;0<f;--f,a=c.call(b,a,d[f],f,d));return a},reduce:function(d,c,b){return 3>arguments.length?g.foldl1(d,c):g.foldl(d,c,b)},
  reduceRight:function(d,c,b){return 3>arguments.length?g.foldr1(d,c):g.foldr(d,c,b)},unfold:function(d,c,b,f,a){for(var a=a||h.global,c=g.lambda(c),b=g.lambda(b),d=g.lambda(d),e=[];!d.call(a,f);e.push(c.call(a,f)),f=b.call(a,f));return e}})})},"JBrowse/Store/LazyTrie":function(){define(["dojo/_base/declare","JBrowse/Util"],function(i,j){return i("JBrowse.Store.LazyTrie",null,{constructor:function(h,g){this.rootURL=h;this.chunkTempl=g;var e=this;dojo.xhrGet({url:h,handleAs:"json",load:function(d){if(d)e.root=
  d,e.extra=d[0],e.deferred&&(e.deferred.callee.apply(e,e.deferred),delete e.deferred)}})},chunkUrl:function(h){h=this.chunkTempl.replace("{Chunk}",h);return j.resolveUrl(this.rootURL,h)},pathToPrefix:function(h){var g=this.root,e="",d=0;a:for(;d<h.length;d++){switch(typeof g[h[d]][0]){case "string":e+=g[h[d]][0];break;case "number":e+=g[h[d]][1];break a}g=g[h[d]]}return e},valuesFromPrefix:function(h,g){var e=this;this.findNode(h,function(d,c){g(e.valuesFromNode(c))},function(){g([])})},mappingsFromPrefix:function(h,
  g){var e=this;this.findNode(h,function(d,c){g(e.mappingsFromNode(d,c))},function(){g([])})},mappingsFromNode:function(h,g){var e=[];null!==g[1]&&e.push([h,g[1]]);for(var d=2;d<g.length;d++)"string"==typeof g[d][0]&&(e=e.concat(this.mappingsFromNode(h+g[d][0],g[d])));return e},valuesFromNode:function(h){var g=[];null!==h[1]&&g.push(h[1]);for(var e=2;e<h.length;e++)g=g.concat(this.valuesFromNode(h[e]));return g},exactMatch:function(h,g,e){this.findNode(h,function(d,c){d.toLowerCase()==h.toLowerCase()&&
  c[1]&&g(c[1])},e||function(){})},findNode:function(h,g,e){var d=this;this.findPath(h,function(c){for(var b=d.root,f=0;f<c.length;f++)b=b[c[f]];c=d.pathToPrefix(c);g(c,b)},e||function(){})},findPath:function(h,g,e){e=e||function(){};if(this.root)for(var h=h.toLowerCase(),d=this.root,c=0,b,f=[];;){b=this.binarySearch(d,h.charAt(c));if(0>b){e();break}f.push(b);if("number"==typeof d[b][0]){var a=this;dojo.xhrGet({url:this.chunkUrl(this.pathToPrefix(f)),handleAs:"json",load:function(c){d[b]=c;a.findPath(h,
  g)}});break}d=d[b];if(h.substr(c,d[0].length)!=d[0].substr(0,Math.min(d[0].length,h.length-c))){e();break}c+=d[0].length;if(c>=h.length){g(f);break}}else this.deferred=arguments},binarySearch:function(h,g){for(var e=2,d=h.length-1,c,b;e<=d;){c=e+d>>>1;switch(typeof h[c][0]){case "string":b=h[c][0].charAt(0);break;case "number":b=h[c][1].charAt(0)}if(b<g)e=c+1;else if(b>g)d=c-1;else return c}return-(e+1)}})})},"JBrowse/Store/Names/LazyTrieDojoData":function(){define(["dojo/_base/declare","dojo/_base/array",
  "JBrowse/Util","JBrowse/Model/Location"],function(i,j,h,g){return i(null,{constructor:function(e){if(!e.namesTrie)throw"must provide a namesTrie argument";this.namesTrie=e.namesTrie;this.resultLimit=e.resultLimit||15;this.tooManyMatchesMessage=e.tooManyMatchesMessage||"(too many matches to display)";var d=this.stopPrefixes={};e.stopPrefixes&&dojo.forEach("string"==typeof e.stopPrefixes?[e.stopPrefixes]:e.stopPrefixes,function(c){for(;c.length;)d[c]=!0,c=c.substr(0,c.length-1)});this.nodeText=function(c){this.nodeText=
  "number"==typeof c[1][0][0]?function(b){return b[0]}:function(b){return b[1][0][0]};return this.nodeText(c)}},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0}},getIdentity:function(){},fetch:function(e){var d=Math.min(this.resultLimit,Math.max(0,e.count||Infinity)),c=e.scope||dojo.global,b=!1;e.abort=function(){var a=e.abort||function(){};return function(){b=!0;a.call(c,e)}}.call(this);if(!e.store)e.store=this;e.onBegin&&e.onBegin.call(c,0,e);var f=(e.query.name||
  "").toString().replace(/\*$/,"");this.stopPrefixes[f]?e.onComplete&&e.onComplete.call(c,[],e):this.namesTrie.mappingsFromPrefix(f,dojo.hitch(this,function(a){var f=[];if(!b){var h=a[0]&&a[0][1]&&a[0][1][0]&&"string"==typeof a[0][1][0][0];dojo.some(a,function(a){if(d--){var b=this.nodeText(a);j.forEach(a[1],function(a){a=new g({ref:a[h?3:2],start:parseInt(a[h?4:3]),end:parseInt(a[h?5:4]),tracks:[this.namesTrie.extra[a[h?1:0]]],objectName:b});f.push({name:b,location:a})},this)}return 0>d},this);0>d&&
  f.push({name:this.tooManyMatchesMessage,hitLimit:!0});e.sort&&f.sort(dojo.data.util.sorter.createSortFunction(e.sort,this));!b&&e.onItem&&dojo.forEach(f,function(a){b||e.onItem.call(c,a,e)});!b&&e.onComplete&&e.onComplete.call(c,f,e)}}));return e},getValue:function(e,d,c){e=e[d];return"undefined"==typeof e?c:e},getValues:function(e,d){var c=[e[d]];return"undefined"==typeof c[0]?[]:c},getAttributes:function(e){return h.dojof.keys(e)},hasAttribute:function(e,d){return e.hasOwnProperty(d)},containsValue:function(e,
  d,c){return e[d]==c},isItem:function(e){return"object"==typeof e&&"string"==typeof e.label},isItemLoaded:function(){return!0},loadItem:function(){},close:function(){},getLabel:function(e){return this.getValue(e,"name",void 0)},getLabelAttributes:function(){return["name"]},getIdentity:function(e){return this.getLabel(e)}})})},"JBrowse/Model/Location":function(){define(["dojo/_base/array","JBrowse/Util"],function(i,j){return j.fastDeclare({constructor:function(h){if(h){"string"==typeof h&&(h=j.parseLocString(h));
  h.location&&this._populate(h.location);if(h.feature){var g=h.feature;this._populate({start:g.get("start"),end:g.get("end"),ref:g.get("seq_id")||(h.tracks?h.tracks[0].browser.refSeq.name:void 0),strand:g.get("strand"),objectName:g.get("name")||g.get("id")})}this._populate(h)}},_populate:function(h){i.forEach("ref,start,end,strand,tracks,objectName".split(","),function(g){g in h&&(this[g]=h[g])},this)},toString:function(){var h=j.assembleLocString(this);return this.objectName?h+" ("+this.objectName+
  ")":h},fromString:function(h){h=j.parseLocString(h);h.objectName=h.extra;delete h.extra;this._populate(h)},localeCompare:function(h){return this.toString().localeCompare(h.toString())}})})},"dojo/store/DataStore":function(){define("../_base/lang,../_base/declare,../_base/Deferred,../_base/array,./util/QueryResults,./util/SimpleQueryEngine".split(","),function(i,j,h,g,e,d){return j("dojo.store.DataStore",null,{target:"",constructor:function(c){i.mixin(this,c);if(!1 in c){var b;try{b=this.store.getIdentityAttributes()}catch(d){}this.idProperty=
  !b||!idAttributes[0]||this.idProperty}c=this.store.getFeatures();if(!c["dojo.data.api.Read"])this.get=null;if(!c["dojo.data.api.Identity"])this.getIdentity=null;if(!c["dojo.data.api.Write"])this.put=this.add=null},idProperty:"id",store:null,queryEngine:d,_objectConverter:function(c){function b(c){for(var e={},g=d.getAttributes(c),h=0;h<g.length;h++){var l=g[h],i=d.getValues(c,l);if(1<i.length){for(l=0;l<i.length;l++){var j=i[l];"object"==typeof j&&d.isItem(j)&&(i[l]=b(j))}j=i}else j=d.getValue(c,
  l),"object"==typeof j&&d.isItem(j)&&(j=b(j));e[g[h]]=j}!(a in e)&&d.getIdentity&&(e[a]=d.getIdentity(c));return e}var d=this.store,a=this.idProperty;return function(a){return c(b(a))}},get:function(c){var b,d,a=new h;this.store.fetchItemByIdentity({identity:c,onItem:this._objectConverter(function(c){a.resolve(b=c)}),onError:function(b){a.reject(d=b)}});if(b)return b;if(d)throw d;return a.promise},put:function(c,b){var d=b&&"undefined"!=typeof b.id||this.getIdentity(c),a=this.store,e=this.idProperty;
  "undefined"==typeof d?(a.newItem(c),a.save()):a.fetchItemByIdentity({identity:d,onItem:function(b){if(b)for(var d in c)d!=e&&a.getValue(b,d)!=c[d]&&a.setValue(b,d,c[d]);else a.newItem(c);a.save()}})},remove:function(c){var b=this.store;this.store.fetchItemByIdentity({identity:c,onItem:function(c){b.deleteItem(c);b.save()}})},query:function(c,b){var d,a=new h(function(){d.abort&&d.abort()});a.total=new h;var k=this._objectConverter(function(a){return a});d=this.store.fetch(i.mixin({query:c,onBegin:function(b){a.total.resolve(b)},
  onComplete:function(b){a.resolve(g.map(b,k))},onError:function(b){a.reject(b)}},b));return e(a)},getIdentity:function(c){return c[this.idProperty]}})})},"JBrowse/FeatureFiltererMixin":function(){define(["dojo/_base/declare","dojo/_base/array"],function(i){var j=0;return i(null,{filterFeature:function(){return!0},_featureFilterChain:[],addFeatureFilter:function(h,g){g=this._getFeatureFilterName(g);this._featureFilterChain.push({name:g,filter:h});this._buildFeatureFilter();return g},_getFeatureFilterName:function(h){return void 0===
  h?"featureFilter_"+ ++j:h},removeFeatureFilter:function(h){for(var g=[],e=0;e<this._featureFilterChain.length;e++)this._featureFilterChain[e].name!==h&&g.push(this._featureFilterChain[e]);this._featureFilterChain=g;this._buildFeatureFilter()},_buildFeatureFilter:function(){var h=this._featureFilterChain.slice();if(h.length)if(1==h.length){var g=h[0].filter;this.filterFeature=function(e){return g.call(this,e)&&this.featureFilterParentComponent.filterFeature(e)}}else this.filterFeature=function(e){for(var d=
  0;d<h.length;d++)if(!h[d].filter.call(this,e))return!1;return!this.featureFilterParentComponent.filterFeature(e)?!1:!0};else this.filterFeature=function(e){return this.featureFilterParentComponent.filterFeature(e)}},featureFilterParentComponent:{filterFeature:function(){return!0}},setFeatureFilter:function(h,g){this._featureFilterChain=[];this.addFeatureFilter(h,g)},clearFeatureFilter:function(){this._featureFilterChain=[];this._buildFeatureFilter()},setFeatureFilterParentComponent:function(h){this.featureFilterParentComponent=
  h;this._buildFeatureFilter()}})})},"JBrowse/GenomeView":function(){define("dojo/_base/declare,dojo/_base/array,dojo/dom-construct,JBrowse/Util,JBrowse/has,dojo/dnd/move,dojo/dnd/Source,dijit/focus,JBrowse/Component,JBrowse/FeatureFiltererMixin,JBrowse/View/Track/LocationScale,JBrowse/View/Track/GridLines,JBrowse/BehaviorManager,JBrowse/View/Animation/Zoomer,JBrowse/View/Animation/Slider,JBrowse/View/InfoDialog".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l){var p=g.dojof,q=i(d.constrainedMoveable,
  {constructor:function(){this.constraints=function(){var a=dojo.marginBox(this.node.parentNode);a.t=0;return a}}});return i([f,a],{constructor:function(a){var b=a.elem,d=a.stripeWidth,f=a.refSeq,e=a.zoomLevel;this.browser=a.browser;this.setFeatureFilterParentComponent(this.browser);this.elem=b;this.posHeight=this.calculatePositionLabelHeight(b);this.topSpace=1.5*this.posHeight;this.maxPxPerBp=this.config.maxPxPerBp;this.ref=f;this.pxPerBp=e;this.stripeWidth=d;this.scrollContainer=dojo.create("div",
  {id:"container",style:{position:"absolute",left:"0px",top:"0px"}},b);this._renderVerticalScrollBar();this.zoomContainer=document.createElement("div");this.zoomContainer.id="zoomContainer";this.zoomContainer.style.cssText="position: absolute; left: 0px; top: 0px; height: 100%;";this.scrollContainer.appendChild(this.zoomContainer);this.outerTrackContainer=document.createElement("div");this.outerTrackContainer.className="trackContainer outerTrackContainer";this.outerTrackContainer.style.cssText="height: 100%;";
  this.zoomContainer.appendChild(this.outerTrackContainer);this.trackContainer=document.createElement("div");this.trackContainer.className="trackContainer innerTrackContainer draggable";this.trackContainer.style.cssText="height: 100%;";this.outerTrackContainer.appendChild(this.trackContainer);this.regularStripe=d;this.overview=this.browser.overviewDiv;this.overviewBox=dojo.marginBox(this.overview);this.tracks=[];this.uiTracks=[];this.trackIndices={};this.sizeInit();this.offset=0;this.maxLeft=this.bpToPx(this.ref.end+
  1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start);this.drawMargin=0.2;this.slideTimeMultiple=0.8;this.trackHeights=[];this.trackTops=[];this.waitElems=dojo.filter([dojo.byId("moveLeft"),dojo.byId("moveRight"),dojo.byId("zoomIn"),dojo.byId("zoomOut"),dojo.byId("bigZoomIn"),dojo.byId("bigZoomOut"),document.body,b],function(a){return a});this.prevCursors=[];this.locationThumb=document.createElement("div");this.locationThumb.className="locationThumb";this.overview.appendChild(this.locationThumb);
  this.locationThumbMover=new q(this.locationThumb,{area:"content",within:!0});this.x=this.elem.scrollLeft;this.y=0;a=document.createElement("div");a.className="track static_track rubberBandAvailable";a.style.height=this.posHeight+"px";a.id="static_track";this.scaleTrackDiv=a;this.staticTrack=new k({label:"static_track",labelClass:"pos-label",posHeight:this.posHeight,browser:this.browser,refSeq:this.ref});this.staticTrack.setViewInfo(this,function(){},this.stripeCount,this.scaleTrackDiv,this.stripePercent,
  this.stripeWidth,this.pxPerBp,this.config.trackPadding);this.zoomContainer.appendChild(this.scaleTrackDiv);this.waitElems.push(this.scaleTrackDiv);a=document.createElement("div");a.className="track";a.style.cssText="top: 0px; height: 100%;";a.id="gridtrack";b=new n({browser:this.browser,refSeq:this.ref});b.setViewInfo(this,function(){},this.stripeCount,a,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding);this.trackContainer.appendChild(a);this.uiTracks=[this.staticTrack,b];
  this.trackDndWidget=new c(this.trackContainer,{accept:["track"],withHandles:!0,creator:dojo.hitch(this,function(a,b){return{data:a,type:["track"],node:"avatar"==b?dojo.create("div",{innerHTML:a.key||a.label,className:"track-label dragging"}):this.renderTrack(a)}})});this.browser.subscribe("/dnd/drop",dojo.hitch(this,function(a,b,c,d){this.updateTrackList();d.node===this.trackContainer&&this.browser.publish("/jbrowse/v1/v/tracks/show",dojo.filter(dojo.map(b,function(a){return a.track&&a.track.config}),
  function(a){return a}))}));this.browser.subscribe("/jbrowse/v1/c/tracks/show",dojo.hitch(this,"showTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/hide",dojo.hitch(this,"hideTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/replace",dojo.hitch(this,"replaceTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/delete",dojo.hitch(this,"hideTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/pin",dojo.hitch(this,"pinTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/unpin",dojo.hitch(this,
  "unpinTracks"));dojo.forEach(this.uiTracks,function(a){a.showRange(0,this.stripeCount-1,Math.round(this.pxToBp(this.offset)),Math.round(this.stripeWidth/this.pxPerBp),this.pxPerBp)},this);this.addOverviewTrack(new k({label:"overview_loc_track",labelClass:"overview-pos",posHeight:this.overviewPosHeight,browser:this.browser,refSeq:this.ref}));this.showFine();this.showCoarse();this.behaviorManager=new r({context:this,behaviors:this._behaviors()});this.behaviorManager.initialize()},_defaultConfig:function(){return{maxPxPerBp:20,
  trackPadding:20}},visibleRegion:function(){return{ref:this.ref.name,start:this.minVisible(),end:this.maxVisible()}},visibleRegionLocString:function(){return g.assembleLocString(this.visibleRegion())},_renderVerticalScrollBar:function(){var a=dojo.create("div",{className:"vertical_scrollbar",style:{position:"fixed",right:"0px",bottom:"0px",height:"100%",width:"10px",zIndex:1E3}},this.elem),b=dojo.create("div",{className:"vertical_position_marker",style:{position:"absolute",height:"100%"}},a);this.verticalScrollBar=
  {container:a,positionMarker:b,width:a.offsetWidth}},_updateVerticalScrollBar:function(a){if("number"==typeof a.height){var b=this.staticTrack?-this.staticTrack.div.offsetHeight:0;this.verticalScrollBar.container.style.height=a.height+b-(this.pinUnderlay?this.pinUnderlay.offsetHeight+b:0)+"px";b=100*(a.height/(this.containerHeight||1));this.verticalScrollBar.positionMarker.style.height=0.5<b?b+"%":"1px";0.98<a.height/(this.containerHeight||1)?(this.verticalScrollBar.container.style.display="none",
  this.verticalScrollBar.visible=!1):(this.verticalScrollBar.container.style.display="block",this.verticalScrollBar.visible=!0)}if("number"==typeof a.y||"number"==typeof a.height)this.verticalScrollBar.positionMarker.style.top=(100*((a.y||this.getY()||0)/(this.containerHeight||1))||0)+"%"},verticalScrollBarVisibleWidth:function(){return this.verticalScrollBar.visible&&this.verticalScrollBar.width||0},visibleTracks:function(){return this.tracks},visibleTrackNames:function(){return dojo.map(this.visibleTracks(),
  function(a){return a.name})},keySlideX:function(a){this.setX(this.getX()+a);var b=this;if(!this._keySlideTimeout)this._keySlideTimeout=window.setTimeout(function(){b.afterSlide();delete b._keySlideTimeout},300)},_behaviors:function(){return{always:{apply_on_init:!0,apply:function(){var a=[];a.push(dojo.connect(this.overview,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"overview_absXtoBp"),this.overview,this.overview)));var c="onwheel"in document.createElement("div")?"wheel":void 0!==
  document.onmousewheel?"mousewheel":"DOMMouseScroll";a.push(dojo.connect(this.scrollContainer,c,this,"wheelScroll",!1),dojo.connect(this.scaleTrackDiv,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"dblclick",this,"doubleClickZoom"),dojo.connect(this.locationThumbMover,"onMoveStop",this,"thumbMoved"),dojo.connect(this.overview,"onclick",this,"overviewClicked"),dojo.connect(this.scaleTrackDiv,
  "onclick",this,"scaleClicked"),dojo.connect(this.scaleTrackDiv,"mouseover",this,"scaleMouseOver"),dojo.connect(this.scaleTrackDiv,"mouseout",this,"scaleMouseOut"),dojo.connect(this.scaleTrackDiv,"mousemove",this,"scaleMouseMove"),dojo.connect(document.body,"onkeyup",this,function(a){a.keyCode==dojo.keys.SHIFT&&this.behaviorManager.swapBehaviors("shiftMouse","normalMouse")}),dojo.connect(document.body,"onkeydown",this,function(a){a.keyCode==dojo.keys.SHIFT&&this.behaviorManager.swapBehaviors("normalMouse",
  "shiftMouse")}),dojo.connect(document.body,"onkeypress",this,function(a){if(!b.curNode)if(a.keyCode==dojo.keys.LEFT_ARROW||a.keyCode==dojo.keys.RIGHT_ARROW){var c=a.keyCode==dojo.keys.LEFT_ARROW?-40:40;a.shiftKey&&(c*=5);this.keySlideX(c)}else if(a.keyCode==dojo.keys.DOWN_ARROW||a.keyCode==dojo.keys.UP_ARROW)if(a.shiftKey)this[a.keyCode==dojo.keys.UP_ARROW?"zoomIn":"zoomOut"](a,0.5,a.altKey?2:1);else c=a.keyCode==dojo.keys.UP_ARROW?-40:40,this.setY(this.getY()+c)}),dojo.connect(this.scrollContainer,
  "onclick",this,function(){b.curNode&&b.curNode.blur()}));return a}},normalMouse:{apply_on_init:!0,apply:function(){return[dojo.connect(this.outerTrackContainer,"mousedown",this,"startMouseDragScroll"),dojo.connect(this.verticalScrollBar.container,"mousedown",this,"startVerticalMouseDragScroll")]}},highlightingMouse:{apply:function(){dojo.removeClass(this.trackContainer,"draggable");dojo.addClass(this.trackContainer,"highlightingAvailable");return[dojo.connect(this.outerTrackContainer,"mousedown",
  dojo.hitch(this,"startMouseHighlight",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"mouseover",this,"maybeDrawVerticalPositionLine"),dojo.connect(this.outerTrackContainer,"mousemove",this,"maybeDrawVerticalPositionLine")]},remove:function(a,b){dojo.forEach(b,dojo.disconnect,dojo);dojo.removeClass(this.trackContainer,"highlightingAvailable");dojo.addClass(this.trackContainer,"draggable")}},shiftMouse:{apply:function(){if(!dojo.hasClass(this.trackContainer,
  "highlightingAvailable"))return dojo.removeClass(this.trackContainer,"draggable"),dojo.addClass(this.trackContainer,"rubberBandAvailable"),[dojo.connect(this.outerTrackContainer,"mousedown",dojo.hitch(this,"startRubberZoom",dojo.hitch(this,"absXtoBp"),this.scrollContainer,this.scaleTrackDiv)),dojo.connect(this.outerTrackContainer,"onclick",this,"scaleClicked"),dojo.connect(this.outerTrackContainer,"mouseover",this,"maybeDrawVerticalPositionLine"),dojo.connect(this.outerTrackContainer,"mousemove",
  this,"maybeDrawVerticalPositionLine")]},remove:function(a,b){this.clearBasePairLabels();this.clearVerticalPositionLine();dojo.forEach(b,dojo.disconnect,dojo);dojo.removeClass(this.trackContainer,"rubberBandAvailable");dojo.addClass(this.trackContainer,"draggable")}},mouseDragScrolling:{apply:function(){return[dojo.connect(document.body,"mouseup",this,"dragEnd"),dojo.connect(document.body,"mousemove",this,"dragMove"),dojo.connect(document.body,"mouseout",this,"checkDragOut")]}},verticalMouseDragScrolling:{apply:function(){return[dojo.connect(document.body,
  "mouseup",this,"dragEnd"),dojo.connect(document.body,"mousemove",this,"verticalDragMove"),dojo.connect(document.body,"mouseout",this,"checkDragOut")]}},mouseRubberBanding:{apply:function(){return[dojo.connect(document.body,"mouseup",this,"rubberExecute"),dojo.connect(document.body,"mousemove",this,"rubberMove"),dojo.connect(document.body,"mouseout",this,"rubberCancel"),dojo.connect(window,"onkeydown",this,function(a){a.keyCode!==dojo.keys.SHIFT&&this.rubberCancel(a)})]}}}},calculatePositionLabelHeight:function(a){var b=
  document.createElement("div");b.className="pos-label";b.style.visibility="hidden";b.appendChild(document.createTextNode("42"));a.appendChild(b);var c=b.clientHeight;a.removeChild(b);return c},wheelScroll:function(a){if(!a)a=window.event;var b=0,c=0;"wheelDeltaX"in a?(b=a.wheelDeltaX/2,c=a.wheelDeltaY/2):"deltaX"in a?(b=-1!==navigator.userAgent.indexOf("OS X 10.9")?-5:-40,b=Math.abs(a.deltaY)>Math.abs(2*a.deltaX)?0:a.deltaX*b,c=-10*a.deltaY):a.wheelDelta?(c=a.wheelDelta/2,window.opera&&(c=-c)):a.detail&&
  (c=100*-a.detail);b=Math.round(2*b);c=Math.round(c);b&&this.keySlideX(-b);c&&this.setY(this.getY()-c);this.wheelScrollTimeout&&window.clearTimeout(this.wheelScrollTimeout);this.wheelScrollTimeout=window.setTimeout(dojo.hitch(this,function(){this.showVisibleBlocks(!0);this.wheelScrollTimeout=null},100));dojo.stopEvent(a)},getX:function(){return this.x||0},getY:function(){return this.y||0},getHeight:function(){return this.elemBox.h},getWidth:function(){return this.elemBox.w},clampX:function(a){return Math.round(Math.max(Math.min(this.maxLeft-
  this.offset,a||0),this.minLeft-this.offset))},clampY:function(a){return Math.round(Math.min(Math.max(0,a||0),this.containerHeight-this.getHeight()))},rawSetX:function(a){this.x=this.elem.scrollLeft=a},setX:function(a){a=this.clampX(a);this.rawSetX(a);this.updateStaticElements({x:a});this.showFine();return a},rawSetY:function(a){this.y=a;this.layoutTracks()},setY:function(a){a=this.clampY(a);this.rawSetY(a);this.updateStaticElements({y:a});return a},rawSetPosition:function(a){this.rawSetX(a.x);this.rawSetY(a.y);
  return a},setPosition:function(a){var b=this.clampX(a.x),a=this.clampY(a.y);this.updateStaticElements({x:b,y:a});this.rawSetX(b);this.rawSetY(a);this.showFine()},getPosition:function(){return{x:this.x,y:this.y}},zoomCallback:function(){this.zoomUpdate()},afterSlide:function(){this.showCoarse();this.scrollUpdate();this.showVisibleBlocks(!0)},suppressDoubleClick:function(a){this._noDoubleClick&&window.clearTimeout(this._noDoubleClick);var b=this;this._noDoubleClick=window.setTimeout(function(){delete b._noDoubleClick},
  a||100)},doubleClickZoom:function(a){if(!this._noDoubleClick&&!this.dragging&&!("animation"in this)){this.scaleClickedTimeout&&window.clearTimeout(this.scaleClickedTimeout);var b=(a.pageX-dojo.position(this.elem,!0).x)/this.getWidth();a.shiftKey?this.zoomOut(a,b,2):this.zoomIn(a,b,2);dojo.stopEvent(a)}},_beforeMouseDrag:function(a){if(this.animation){if(this.animation instanceof m)return dojo.stopEvent(a),0;this.animation.stop()}if(g.isRightButton(a))return 0;dojo.stopEvent(a);return 1},startMouseDragScroll:function(a){if(this._beforeMouseDrag(a))this.behaviorManager.applyBehaviors("mouseDragScrolling"),
  this.dragStartPos={x:a.clientX,y:a.clientY},this.winStartPos=this.getPosition()},startVerticalMouseDragScroll:function(a){if(this._beforeMouseDrag(a))this.behaviorManager.applyBehaviors("verticalMouseDragScrolling"),this.dragStartPos={x:a.clientX,y:a.clientY},this.winStartPos=this.getPosition()},startMouseHighlight:function(a,b,c,d){if(this._beforeMouseDrag(d))this.behaviorManager.applyBehaviors("mouseRubberBanding"),this.rubberbanding={absFunc:a,container:b,scaleDiv:c,message:"Highlight region",
  start:{x:d.clientX,y:d.clientY},execute:function(a,b){this.browser.setHighlightAndRedraw({ref:this.ref.name,start:a,end:b})}},this.winStartPos=this.getPosition()},startRubberZoom:function(a,b,c,d){if(this._beforeMouseDrag(d))this.behaviorManager.applyBehaviors("mouseRubberBanding"),this.rubberbanding={absFunc:a,container:b,scaleDiv:c,message:"Zoom to region",start:{x:d.clientX,y:d.clientY},execute:function(a,b){this.setLocation(this.ref,a,b)}},this.winStartPos=this.getPosition(),this.clearVerticalPositionLine(),
  this.clearBasePairLabels()},_rubberStop:function(a){this.behaviorManager.removeBehaviors("mouseRubberBanding");this.hideRubberHighlight();this.clearBasePairLabels();a&&dojo.stopEvent(a);delete this.rubberbanding},rubberCancel:function(a){var b=document.body.parentNode,c=document.body;(!a||!a.relatedTarget&&!a.toElement||b===(a.relatedTarget||a.toElement)||c===(a.relatedTarget||a.toElement))&&this._rubberStop(a)},rubberMove:function(a){this.setRubberHighlight(this.rubberbanding.start,{x:a.clientX,
  y:a.clientY})},rubberExecute:function(a){var b=this.rubberbanding.start,c=a.clientX,d=Math.floor(this.rubberbanding.absFunc(Math.min(b.x,c))),f=Math.ceil(this.rubberbanding.absFunc(Math.max(b.x,c))),e=this.rubberbanding.execute;this._rubberStop(a);3>Math.abs(b.x-c)||e.call(this,d,f)},setRubberHighlight:function(a,b){var c=this.rubberbanding.container,d=dojo.position(c,!0),f;if(!(f=this.rubberHighlight)){f=this.rubberHighlight=document.createElement("div");f.className="rubber-highlight";f.style.position=
  "absolute";f.style.zIndex=20;var e=document.createElement("div");e.appendChild(document.createTextNode(this.rubberbanding.message));f.appendChild(e);e.style.position="relative";e.style.top=50-d.y+"px";c.appendChild(f)}f.style.visibility="visible";f.style.left=Math.min(a.x,b.x)-d.x+"px";f.style.width=Math.abs(b.x-a.x)+"px";this.drawBasePairLabel({name:"rubberLeft",xToBp:this.rubberbanding.absFunc,scaleDiv:this.rubberbanding.scaleDiv,offset:0,x:Math.min(a.x,b.x),parent:c,className:"rubber"});this.drawBasePairLabel({name:"rubberRight",
  xToBp:this.rubberbanding.absFunc,scaleDiv:this.rubberbanding.scaleDiv,offset:0,x:Math.max(a.x,b.x)+1,parent:c,className:"rubber"});this.clearVerticalPositionLine()},dragEnd:function(a){this.behaviorManager.removeBehaviors("mouseDragScrolling","verticalMouseDragScrolling");dojo.stopEvent(a);this.showCoarse();this.scrollUpdate();this.showVisibleBlocks(!0);window.setTimeout(dojo.hitch(this,function(){this.dragging=!1}),100)},checkDragOut:function(a){var b=document.body.parentNode,c=document.body;(!a.relatedTarget&&
  !a.toElement||b===(a.relatedTarget||a.toElement)||c===(a.relatedTarget||a.toElement))&&this.dragEnd(a)},dragMove:function(a){this.dragging=!0;this.setPosition({x:this.winStartPos.x-(a.clientX-this.dragStartPos.x),y:this.winStartPos.y-(a.clientY-this.dragStartPos.y)});dojo.stopEvent(a)},verticalDragMove:function(a){this.dragging=!0;var b=parseInt(this.verticalScrollBar.container.style.height,10);this.setPosition({x:this.winStartPos.x,y:this.winStartPos.y+(a.clientY-this.dragStartPos.y)*(this.trackContainer.clientHeight/
  b)});dojo.stopEvent(a)},hideRubberHighlight:function(){this.rubberHighlight&&(this.rubberHighlight.parentNode.removeChild(this.rubberHighlight),delete this.rubberHighlight)},slide:function(a){this.animation&&this.animation.stop();this.trimVertical();new l(this,this.afterSlide,Math.abs(a)*this.getWidth()*this.slideTimeMultiple+200,a*this.getWidth())},setLocation:function(a,b,c){void 0===b&&(b=this.minVisible());void 0===c&&(c=this.maxVisible());"string"==typeof a&&(a=this.browser.getRefSeq(a));if(!a)a=
  this.ref;if(b<a.start||b>a.end)b=a.start;if(c<a.start||c>a.end)c=a.end;if(this.ref!==a){var d=this;this.ref=a;this._unsetPosBeforeZoom();a=function(a){a.div&&a.div.parentNode&&a.div.parentNode.removeChild(a.div)};j.forEach(this.tracks,a);this.tracks=[];this.trackIndices={};this.trackHeights=[];this.trackTops=[];j.forEach(this.uiTracks,function(a){a.refSeq=d.ref;a.clear()});this.overviewTrackIterate(a);this.addOverviewTrack(new k({label:"overview_loc_track",labelClass:"overview-pos",posHeight:this.overviewPosHeight,
  browser:this.browser,refSeq:this.ref}));this.sizeInit();this.setY(0);this.behaviorManager.initialize()}this.pxPerBp=Math.min(this.getWidth()/(c-b),this.maxPxPerBp);this.curZoom=g.findNearest(this.zoomLevels,this.pxPerBp);if(0.2>Math.abs(this.pxPerBp-this.zoomLevels[this.zoomLevels.length-1]))this.pxPerBp=this.zoomLevels[this.zoomLevels.length-1];this.stripeWidth=this.stripeWidthForZoom(this.curZoom)/this.zoomLevels[this.curZoom]*this.pxPerBp;this.instantZoomUpdate();this.centerAtBase((b+c)/2,!0)},
  stripeWidthForZoom:function(a){return this.zoomLevels.length-1==a?this.regularStripe/10*this.maxPxPerBp:0==a?this.minZoomStripe:this.regularStripe},instantZoomUpdate:function(){this.scrollContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.maxOffset=this.bpToPx(this.ref.end)-this.stripeCount*this.stripeWidth;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start)},centerAtBase:function(a,
  b){a=Math.min(Math.max(a,this.ref.start),this.ref.end);if(b){var c=this.bpToPx(a);this.offset=Math.floor((c-this.stripeCount*this.stripeWidth/2)/this.stripeWidth)*this.stripeWidth;this.setX(c-this.offset-this.getWidth()/2);this.trackIterate(function(a){a.clear()});this.showVisibleBlocks(!0);this.showCoarse()}else{var c=this.pxToBp(this.x+this.offset),d=this.getWidth()/this.pxPerBp/2,f=c+d;a>=c-d&&a<=c+d+d+d?(this.animation&&this.animation.stop(),c=(f-a)*this.pxPerBp,this.trimVertical(),new l(this,
  this.afterSlide,Math.abs(c)*this.slideTimeMultiple+200,c)):this.centerAtBase(a,!0)}},minVisible:function(){var a=this.pxToBp(this.x+this.offset);return a<this.pxToBp(1)?0:Math.round(a)},maxVisible:function(){var a=this.pxToBp(this.x+this.offset+this.getWidth()),b=this.pxToBp(this.verticalScrollBarVisibleWidth());return a>this.ref.end-this.pxToBp(1)?this.ref.end-b:Math.round(a)-b},showFine:function(){this.onFineMove(this.minVisible(),this.maxVisible())},showCoarse:function(){this.onCoarseMove(this.minVisible(),
  this.maxVisible())},onFineMove:function(){this.updateLocationThumb()},onCoarseMove:function(){this.updateLocationThumb()},onResize:function(){this.sizeInit();this.showVisibleBlocks();this.showFine();this.showCoarse()},overviewClicked:function(a){this.centerAtBase(this.overview_absXtoBp(a.clientX))},scaleMouseOver:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},scaleMouseMove:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},scaleMouseOut:function(){this.clearVerticalPositionLine();
  this.clearBasePairLabels()},maybeDrawVerticalPositionLine:function(a){this.rubberbanding||this.drawVerticalPositionLine(this.scaleTrackDiv,a)},drawVerticalPositionLine:function(a,b){var c=b.pageX+2;if(!this.verticalPositionLine)this.verticalPositionLine=dojo.create("div",{className:"trackVerticalPositionIndicatorMain"},this.staticTrack.div);var d=this.verticalPositionLine;d.style.display="block";d.style.left=c+"px";var f=dojo.position(this.scaleTrackDiv);d.style.top=f.y+"px";this.drawBasePairLabel({name:"single",
  offset:0,x:c,parent:a,scaleDiv:a})},drawBasePairLabel:function(a){var b=a.name||0,c=a.offset||0,d=a.x;this.basePairLabels=this.basePairLabels||{};if(!this.basePairLabels[b]){var f=dojo.position(a.scaleDiv||this.scaleTrackDiv);this.basePairLabels[b]=dojo.create("div",{className:"basePairLabel"+(a.className?" "+a.className:""),style:{top:f.y+f.h-3+"px"}},document.body)}b=this.basePairLabels[b];if("object"==typeof d)d=d.clientX;b.style.display="block";a=a.xToBp||dojo.hitch(this,"absXtoBp");b.innerHTML=
  g.addCommas(Math.floor(a(d))+1);b.style.left=window.innerWidth-d>8+b.offsetWidth?d+c+"px":d+1-c-b.offsetWidth+"px"},clearVerticalPositionLine:function(){if(this.verticalPositionLine)this.verticalPositionLine.style.display="none"},clearBasePairLabels:function(){for(var a in this.basePairLabels){var b=this.basePairLabels[a];b.parentNode&&b.parentNode.removeChild(b)}this.basePairLabels={}},overview_absXtoBp:function(a){var b=dojo.position(this.overview);return(a-b.x)/b.w*(this.ref.end-this.ref.start)+
  this.ref.start},scaleClicked:function(a){var b=this.absXtoBp(a.clientX);this.scaleClickedTimeout=window.setTimeout(dojo.hitch(this,function(){this.centerAtBase(b)},100))},thumbMoved:function(){var a=parseInt(this.locationThumb.style.left),b=parseInt(this.locationThumb.style.width);this.centerAtBase((a+b/2)/this.overviewBox.w*(this.ref.end-this.ref.start)+this.ref.start)},updateLocationThumb:function(){var a=this.minVisible(),b=this.maxVisible(),c=this.ref.end-this.ref.start,a=Math.round((a-this.ref.start)/
  c*this.overviewBox.w+this.overviewBox.l),b=Math.round((b-this.ref.start)/c*this.overviewBox.w+this.overviewBox.l);this.locationThumb.style.cssText="height: "+(this.overviewBox.h-4)+"px; left: "+a+"px; width: "+(b-a)+"px;z-index: 20"},checkY:function(a){return Math.min(0>a?0:a,this.containerHeight-this.getHeight())},updateStaticElements:function(a){this.trackIterate(function(b){b.updateStaticElements(a)},this);this._updateVerticalScrollBar(a)},showWait:function(){for(var a=[],b=0;b<this.waitElems.length;b++)a[b]=
  this.waitElems[b].style.cursor,this.waitElems[b].style.cursor="wait";this.prevCursors.push(a)},showDone:function(){for(var a=this.prevCursors.pop(),b=0;b<this.waitElems.length;b++)this.waitElems[b].style.cursor=a[b]},pxToBp:function(a){return a/this.pxPerBp},absXtoBp:function(a){return this.pxToBp(this.getPosition().x+this.offset-dojo.position(this.elem,!0).x+a)-1},bpToPx:function(a){return a*this.pxPerBp},sizeInit:function(){this.overviewBox=dojo.marginBox(this.overview);this.elemBox={h:this.elem.offsetHeight,
  w:this.elem.offsetWidth};var a=[2.0E-6,5.0E-6,1.0E-5,2.0E-5,5.0E-5,1.0E-4,2.0E-4,5.0E-4,0.001,0.002,0.005,0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20];this.zoomLevels=[];for(var b=0;b<a.length;b++){var c=a[b];if(c<this.maxPxPerBp)this.zoomLevels.push(c);else break}for(this.zoomLevels.push(this.maxPxPerBp);(this.ref.end-this.ref.start)*this.zoomLevels[0]<this.getWidth();)this.zoomLevels.shift();this.zoomLevels.unshift(this.getWidth()/(this.ref.end-this.ref.start));this.minZoomStripe=this.regularStripe*
  (this.zoomLevels[0]/this.zoomLevels[1]);for(this.curZoom=0;this.pxPerBp>this.zoomLevels[this.curZoom];)this.curZoom++;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();delete this.stripePercent;a=[20,10,5,4,2,1];for(b=0;b<a.length;b++)if(100/a[b]*0.7*this.regularStripe>3*this.getWidth()+this.regularStripe){this.stripePercent=a[b];break}if(!this.stripePercent)console.warn("stripeWidth too small: "+this.stripeWidth+", "+this.getWidth()),this.stripePercent=1;(b=this.stripeCount)&&this.getX();
  this.stripeCount=Math.round(100/this.stripePercent);this.scrollContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";var d=void 0;b&&b!=this.stripeCount&&(d=Math.floor((b-this.stripeCount)/2),b=d*this.stripeWidth,a=this.getX()-b,this.offset+=b,this.updateStaticElements({x:a}),this.rawSetX(a));this.trackIterate(function(a,b){a.sizeInit(b.stripeCount,b.stripePercent,d)});b=this.trackHeights&&this.trackHeights.length?Math.max(p.reduce(this.trackHeights,
  "+")+this.config.trackPadding*this.trackHeights.length,this.getHeight()):this.getHeight();this.scrollContainer.style.height=b+"px";this.containerHeight=b;b=this.ref.end-this.ref.start;if(0>b)throw Error("reference sequence "+this.ref.name+" has an invalid start coordinate, it is greater than its end coordinate.");c=document.createElement("div");c.className="overview-pos";c.appendChild(document.createTextNode(g.addCommas(this.ref.end)));c.style.visibility="hidden";this.overview.appendChild(c);a=1.2*
  c.clientWidth;this.overviewPosHeight=1.2*c.clientHeight;this.overview.removeChild(c);for(c=1;30>c;c++){this.overviewStripeBases=(Math.pow(c%3,2)+1)*Math.pow(10,Math.floor(c/3));this.overviewStripes=Math.ceil(b/this.overviewStripeBases);if(this.overviewBox.w/this.overviewStripes>a)break;if(2>this.overviewStripes)break}var f=100/(b/this.overviewStripeBases);this.overviewTrackIterate(function(a,b){a.clear();a.sizeInit(b.overviewStripes,f);a.showRange(0,b.overviewStripes-1,b.ref.start-1,b.overviewStripeBases,
  b.overviewBox.w/(b.ref.end-b.ref.start))});this.updateOverviewHeight();this.updateScroll()},updateScroll:function(){var a={height:this.getHeight()};if(0<this.getY()&&this.containerHeight-this.getY()<a.height)a.y=this.setY(Math.max(0,this.containerHeight-a.height));this.updateStaticElements(a)},overviewTrackIterate:function(a){var b=this.overview.firstChild;do b&&b.track&&a.call(this,b.track,this);while(b&&(b=b.nextSibling))},updateOverviewHeight:function(){var a=0;this.overviewTrackIterate(function(b){a+=
  b.height;b.div.style.height=b.height+"px"});this.overview.style.height=a+"px";this.overviewBox=dojo.marginBox(this.overview)},addOverviewTrack:function(a){var b=100/((this.ref.end-this.ref.start)/this.overviewStripeBases),c=document.createElement("div");c.className="track";c.style.height=this.overviewBox.h+"px";c.id="overviewtrack_"+a.name;c.track=a;var d=this;a.setViewInfo(this,function(){d.updateOverviewHeight()},this.overviewStripes,c,b,this.overviewStripeBases,this.pxPerBp,this.config.trackPadding);
  this.overview.appendChild(c);this.updateOverviewHeight();return c},trimVertical:function(a){void 0===a&&(a=this.getY());for(var b,c=this.topSpace,d=a+this.getHeight(),f=0;f<this.tracks.length;f++)this.tracks[f].shown&&(b=c+this.trackHeights[f],b>a&&c<d||this.tracks[f].hideAll(),c=b+this.config.trackPadding)},redrawTracks:function(){this.trackIterate(function(a){a.hideAll()});this.showVisibleBlocks(!1)},hideRegion:function(a){this.overviewTrackIterate(function(b){b.hideRegion(a)});this.trackIterate(function(b){b.hideRegion(a)})},
  redrawRegion:function(a){this.hideRegion(a);this.showVisibleBlocks(!1)},zoomIn:function(a,b,c){if(!this.animation&&(this._unsetPosBeforeZoom(),void 0===b&&(b=0.5),void 0===c&&(c=1),c=Math.min(c,this.zoomLevels.length-1-this.curZoom),!(0==c&&this.pxPerBp==this.zoomLevels[this.curZoom]))){this.showWait();var d=this.getPosition();this.trimVertical(d.y);var a=this.zoomLevels[this.curZoom+c]/this.pxPerBp,f=this.pxToBp(d.x+this.offset+b*this.getWidth());this.curZoom+=c;this.pxPerBp=this.zoomLevels[this.curZoom];
  this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,f-b*this.getWidth()/this.pxPerBp,f+(1-b)*this.getWidth()/this.pxPerBp);new m(a,this,function(){this.zoomUpdate(b,f)},700,b)}},zoomToBaseLevel:function(a,b){if(!this.animation){var c=this.zoomLevels.length-1;if(this.curZoom!==c){this._setPosBeforeZoom(this.minVisible(),this.maxVisible(),this.curZoom);this.showWait();this.trimVertical();var d=this.zoomLevels[c]/this.pxPerBp;
  this.curZoom=c;this.pxPerBp=this.zoomLevels[c];this.maxLeft=this.pxPerBp*this.ref.end-this.getWidth();for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,b-0.5*this.getWidth()/this.pxPerBp,b+0.5*this.getWidth()/this.pxPerBp);new m(d,this,function(){this.zoomUpdate(0.5,b)},700,0.5)}}},zoomOut:function(a,b,c){if(!this.animation&&(this._unsetPosBeforeZoom(),void 0===c&&(c=1),c=Math.min(c,this.curZoom),0!=c)){this.showWait();var d=this.getPosition();this.trimVertical(d.y);void 0===
  b&&(b=0.5);var a=this.zoomLevels[this.curZoom-c]/this.pxPerBp,f=this.bpToPx(this.ref.end)-(this.offset+d.x+this.getWidth()),b=Math.max(b,1-f*a/(1-a)/this.getWidth()),f=d.x+this.offset-this.bpToPx(this.ref.start),b=Math.min(b,f*a/(1-a)/this.getWidth()),e=this.pxToBp(d.x+this.offset+b*this.getWidth());this.curZoom-=c;this.pxPerBp=this.zoomLevels[this.curZoom];for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,e-b*this.getWidth()/this.pxPerBp,e+(1-b)*this.getWidth()/this.pxPerBp);
  this.minLeft=this.pxPerBp*this.ref.start;new m(a,this,function(){this.zoomUpdate(b,e)},700,b)}},zoomBackOut:function(){if(!this.animation&&this.isZoomedToBase()){var a=this.posBeforeZoom.min,b=this.posBeforeZoom.max,c=this.posBeforeZoom.zoomIndex;this.posBeforeZoom=void 0;this.showWait();var d=this.zoomLevels[c]/this.pxPerBp,f=(a+b)/2;this.curZoom=c;this.pxPerBp=this.zoomLevels[c];for(c=0;c<this.tracks.length;c++)this.tracks[c].startZoom(this.pxPerBp,f-0.5*this.getWidth()/this.pxPerBp,f+0.5*this.getWidth()/
  this.pxPerBp);this.minLeft=this.pxPerBp*this.ref.start;var e=this;new m(d,this,function(){e.setLocation(e.ref,a,b);e.zoomUpdate(0.5,f)},700,0.5)}},isZoomedToBase:function(){return void 0!==this.posBeforeZoom},_setPosBeforeZoom:function(a,b,c){this.posBeforeZoom={min:a,max:b,zoomIndex:c}},_unsetPosBeforeZoom:function(){this.posBeforeZoom=void 0},zoomUpdate:function(a,b){var c=this.elem.clientWidth,d=this.bpToPx(b)-a*c+c/2;this.stripeWidth=this.stripeWidthForZoom(this.curZoom);this.scrollContainer.style.width=
  this.stripeCount*this.stripeWidth+"px";this.zoomContainer.style.width=this.stripeCount*this.stripeWidth+"px";this.offset=(Math.round(d/this.stripeWidth)-this.stripeCount/2|0)*this.stripeWidth;this.maxOffset=this.bpToPx(this.ref.end+1)-this.stripeCount*this.stripeWidth;this.maxLeft=this.bpToPx(this.ref.end+1)-this.getWidth();this.minLeft=this.bpToPx(this.ref.start);this.zoomContainer.style.left="0px";this.setX(d-this.offset-c/2);dojo.forEach(this.uiTracks,function(a){a.clear()});this.trackIterate(function(a){a.endZoom(this.pxPerBp,
  Math.round(this.stripeWidth/this.pxPerBp))});this.showVisibleBlocks(!0);this.showDone();this.showCoarse()},scrollUpdate:function(){var a=this.getX(),b=this.stripeCount*this.stripeWidth,c=this.getWidth(),d=(b/2-(c/2+a))/this.stripeWidth|0;if(0!=d&&(Math.abs(d),b=this.offset-d*this.stripeWidth,this.offset!=b))this.offset=b,this.trackIterate(function(a){a.moveBlocks(d)}),a+=d*this.stripeWidth,this.updateStaticElements({x:a}),this.rawSetX(a)},trackHeightUpdate:function(a,b){var c=this.getY();if(a in this.trackIndices){var d=
  this.trackIndices[a];if(!(1>Math.abs(b-this.trackHeights[d])))this.trackTops[d]+this.trackHeights[d]-c<this.getHeight()/2&&0<c&&this.setY(c+(b-this.trackHeights[d])),this.trackHeights[d]=b,this.tracks[d].div.style.height=b+this.config.trackPadding+"px",this.layoutTracks(),this.setY(this.getY()),this.updateStaticElements({height:this.getHeight()})}},showVisibleBlocks:function(a,b,c,d){void 0===b&&(b=this.getPosition());void 0===c&&(c=b.x-this.drawMargin*this.getWidth());void 0===d&&(d=b.x+(1+this.drawMargin)*
  this.getWidth());var f=Math.max(0,c/this.stripeWidth|0),e=Math.min(this.stripeCount-1,d/this.stripeWidth|0),g=Math.round(this.stripeWidth/this.pxPerBp),k=Math.round(this.pxToBp(f*this.stripeWidth+this.offset)),k=k-1,h=Math.round(this.pxToBp(this.offset)),l=Math.round(this.pxToBp(this.offset+this.stripeCount*this.stripeWidth));this.overviewTrackIterate(function(a,b){a.showRange(0,b.overviewStripes-1,b.ref.start-1,b.overviewStripeBases,b.overviewBox.w/(b.ref.end-b.ref.start))});this.trackIterate(function(a,
  b){a.showRange(f,e,k,g,b.pxPerBp,h,l)});this.updateStaticElements({height:this.getHeight(),width:this.getWidth(),x:this.getX(),y:this.getY()});this.browser.publish("/jbrowse/v1/n/tracks/redraw")},showTracks:function(a){a=dojo.filter(a,function(a){return 0==this._getTracks([a.label]).length},this);if(a.length){this.trackDndWidget.insertNodes(!1,a);this.updateTrackList();var b=this;window.setTimeout(function(){b.setY(Infinity)},300)}},replaceTracks:function(a){j.forEach(a,function(a){var b,c;j.forEach(this.trackDndWidget.parent.children,
  function(d){if(!c){var f=d.track;f&&f.config.label==a.label?(c=1,this.trackDndWidget.delItem(d.id),d&&d.parentNode&&d.parentNode.removeChild(d)):b=d}},this);this.updateTrackList();this.trackDndWidget.insertNodes(!1,[a],!1,b)},this);a.length&&this.updateTrackList()},hideTracks:function(a){a=dojo.filter(a,function(a){return 0!=this._getTracks([a.label]).length},this);a.length&&(dojo.forEach(a,function(a){this.trackDndWidget.forInItems(function(b,c){if(a.label===b.data.label){this.trackDndWidget.delItem(c);
  var d=dojo.byId(c);d&&d.parentNode&&d.parentNode.removeChild(d)}},this)},this),this.updateTrackList())},pinTracks:function(a){a=this._getTracks(a);j.forEach(a,function(a){a.setPinned(!0)});this.updateTrackList();return j.map(a,function(a){return a.name})},unpinTracks:function(a){a=this._getTracks(a);j.forEach(a,function(a){a.setPinned(!1)});this.updateTrackList();return j.map(a,function(a){return a.name})},_getTracks:function(a){var b=[],c={count:a.length};dojo.forEach(a,function(a){c[a]=1});dojo.some(this.tracks,
  function(a){c[a.name]&&(b.push(a),c.count--);return!c.count},this);return b},renderTrack:function(a){if(!a)return null;var b;if(dojo.some(this.tracks,function(c){return c.name==a.label?(b=c,!0):!1}))return b.div;var c=a.label,d=dojo.create("div",{className:["track",("track_"+a.type).replace(/[^A-Za-z_0-9]/g,"_").toLowerCase(),("track_"+c).replace(/[^A-Za-z_0-9]/g,"_").toLowerCase()].join(" "),id:"track_"+c});d.trackName=c;var f,e,g=dojo.hitch(this,function(){var b=new f({refSeq:this.ref,config:a,
  changeCallback:dojo.hitch(this,"showVisibleBlocks",!0),trackPadding:this.config.trackPadding,store:e,browser:this.browser});"function"==typeof e.setTrack&&e.setTrack(b);d.track=b;var g=dojo.hitch(this,"trackHeightUpdate",c);b.setViewInfo(this,g,this.stripeCount,d,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding);b.updateStaticElements({x:this.getX(),y:this.getY(),height:this.getHeight(),width:this.getWidth()});this.updateTrackList()});a.store||console.warn("configuration for track "+
  a.label+" has no store set",a);this.browser.getStore(a.store,function(a){e=a;f&&e&&g()});require([a.type],function(a){(f=a)&&e&&g()});return d},trackIterate:function(a){var b;for(b=0;b<this.uiTracks.length;b++)a.call(this,this.uiTracks[b],this);for(b=0;b<this.tracks.length;b++)a.call(this,this.tracks[b],this)},updateTrackList:function(){var a=[],b=dojo.toJson(this.trackIndices||{}),c=this.trackContainer.firstChild;do c.track&&a.push(c.track);while(c=c.nextSibling);a=j.map(a,function(a,b){return[a,
  b]});a=a.sort(function(a,b){var c=a[0].isPinned()?1:0;return(b[0].isPinned()?1:0)-c||a[1]-b[1]});a=j.map(a,function(a){return a[0]});if(a[0]&&a[0].isPinned()){if(!this.pinUnderlay)this.pinUnderlay=h.create("div",{className:"pin_underlay",style:"top: "+this.topSpace},this.trackContainer);if(!this.pinGridlinesTrack)c=h.create("div",{className:"track",style:"top: 0px; height: 100%"},this.pinUnderlay),this.pinGridlinesTrack=new n({browser:this.browser,refSeq:this.ref}),this.pinGridlinesTrack.setViewInfo(this,
  function(){},this.stripeCount,c,this.stripePercent,this.stripeWidth,this.pxPerBp,this.config.trackPadding),this.uiTracks.push(this.pinGridlinesTrack)}else if(this.pinUnderlay)h.destroy(this.pinUnderlay),delete this.pinUnderlay,this.uiTracks=j.filter(this.uiTracks,function(a){return a!==this.pinGridlinesTrack},this),delete this.pinGridlinesTrack;c=this.tracks;this.tracks=a;for(var d={},f=Array(this.tracks.length),e=0;e<a.length;e++)d[a[e].name]=e,f[e]=a[e].name in this.trackIndices?this.trackHeights[this.trackIndices[a[e].name]]:
  0,this.trackIndices[a[e].name]=e;this.trackIndices=d;this.trackHeights=f;j.forEach(c||[],function(a){a.name in d||(g.removeAttribute(a.div,"track"),a.destroy())},this);this.layoutTracks();this.updateScroll();if(b!=dojo.toJson(this.trackIndices||{}))this.browser.publish("/jbrowse/v1/n/tracks/visibleChanged",[this.visibleTrackNames()]),this.showVisibleBlocks()},layoutTracks:function(){var a=this.topSpace,b=0,c=0,d=!1;j.forEach(this.tracks,function(f,e){b=this.trackTops[e]=a;f.isPinned()?(f.div.style.top=
  a+"px",d=!0):(f.div.style.top=a-this.y+(d?15:0)+"px",d=!1);f.shown&&(a+=this.trackHeights[e]+this.config.trackPadding,f.isPinned()&&(c=a))},this);if(c&&this.pinUnderlay)this.pinUnderlay.style.height=c+"px";this.containerHeight=Math.max(a||0,Math.min(this.getY(),b)+this.getHeight());this.scrollContainer.style.height=this.containerHeight+"px"}})})},"dojo/dnd/move":function(){define("../_base/declare,../dom-geometry,../dom-style,./common,./Mover,./Moveable".split(","),function(i,j,h,g,e,d){g=i("dojo.dnd.move.constrainedMoveable",
  d,{constraints:function(){},within:!1,constructor:function(c,b){b||(b={});this.constraints=b.constraints;this.within=b.within},onFirstMove:function(c){var b=this.constraintBox=this.constraints.call(this,c);b.r=b.l+b.w;b.b=b.t+b.h;this.within&&(c=j.getMarginSize(c.node),b.r-=c.w,b.b-=c.h)},onMove:function(c,b){var d=this.constraintBox,a=c.node.style;this.onMoving(c,b);b.l=b.l<d.l?d.l:d.r<b.l?d.r:b.l;b.t=b.t<d.t?d.t:d.b<b.t?d.b:b.t;a.left=b.l+"px";a.top=b.t+"px";this.onMoved(c,b)}});e=i("dojo.dnd.move.boxConstrainedMoveable",
  g,{box:{},constructor:function(c,b){var d=b&&b.box;this.constraints=function(){return d}}});i=i("dojo.dnd.move.parentConstrainedMoveable",g,{area:"content",constructor:function(c,b){var d=b&&b.area;this.constraints=function(){var a=this.node.parentNode,b=h.getComputedStyle(a),c=j.getMarginBox(a,b);if("margin"==d)return c;var e=j.getMarginExtents(a,b);c.l+=e.l;c.t+=e.t;c.w-=e.w;c.h-=e.h;if("border"==d)return c;e=j.getBorderExtents(a,b);c.l+=e.l;c.t+=e.t;c.w-=e.w;c.h-=e.h;if("padding"==d)return c;e=
  j.getPadExtents(a,b);c.l+=e.l;c.t+=e.t;c.w-=e.w;c.h-=e.h;return c}}});return{constrainedMoveable:g,boxConstrainedMoveable:e,parentConstrainedMoveable:i}})},"dojo/dnd/Source":function(){define("../_base/array,../_base/connect,../_base/declare,../_base/kernel,../_base/lang,../dom-class,../dom-geometry,../mouse,../ready,../topic,./common,./Selector,./Manager".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r){g.isAsync||f(0,function(){require(["dojo/dnd/AutoSource","dojo/dnd/Target"])});var m=h("dojo.dnd.Source",
  n,{isSource:!0,horizontal:!1,copyOnly:!1,selfCopy:!1,selfAccept:!0,skipForm:!1,withHandles:!1,autoSync:!1,delay:0,accept:["text"],generateText:!0,constructor:function(b,c){e.mixin(this,e.mixin({},c));var f=this.accept;if(f.length){this.accept={};for(var g=0;g<f.length;++g)this.accept[f[g]]=1}this.mouseDown=this.isDragging=!1;this.targetBox=this.targetAnchor=null;this.before=!0;this._lastY=this._lastX=0;this.sourceState="";this.isSource&&d.add(this.node,"dojoDndSource");this.targetState="";this.accept&&
  d.add(this.node,"dojoDndTarget");this.horizontal&&d.add(this.node,"dojoDndHorizontal");this.topics=[a.subscribe("/dnd/source/over",e.hitch(this,"onDndSourceOver")),a.subscribe("/dnd/start",e.hitch(this,"onDndStart")),a.subscribe("/dnd/drop",e.hitch(this,"onDndDrop")),a.subscribe("/dnd/cancel",e.hitch(this,"onDndCancel"))]},checkAcceptance:function(a,b){if(this==a)return!this.copyOnly||this.selfAccept;for(var c=0;c<b.length;++c){for(var d=a.getItem(b[c].id).type,f=!1,e=0;e<d.length;++e)if(d[e]in this.accept){f=
  !0;break}if(!f)return!1}return!0},copyState:function(a,b){if(a)return!0;2>arguments.length&&(b=this==r.manager().target);if(b){if(this.copyOnly)return this.selfCopy}else return this.copyOnly;return!1},destroy:function(){m.superclass.destroy.call(this);i.forEach(this.topics,function(a){a.remove()});this.targetAnchor=null},onMouseMove:function(a){if(!(this.isDragging&&"Disabled"==this.targetState)){m.superclass.onMouseMove.call(this,a);var b=r.manager();if(!this.isDragging&&this.mouseDown&&this.isSource&&
  (Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)){var d=this.getSelectedNodes();d.length&&b.startDrag(this,d,this.copyState(k.getCopyKeyState(a),!0))}if(this.isDragging){d=!1;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current)this.targetBox=c.position(this.current,!0);d=this.horizontal?a.pageX-this.targetBox.x<this.targetBox.w/2==c.isBodyLtr(this.current.ownerDocument):a.pageY-this.targetBox.y<this.targetBox.h/2}if(this.current!=this.targetAnchor||
  d!=this.before)this._markTargetAnchor(d),b.canDrop(!this.current||b.source!=this||!(this.current.id in this.selection))}}},onMouseDown:function(a){if(!this.mouseDown&&this._legalMouseDown(a)&&(!this.skipForm||!k.isFormElement(a)))this.mouseDown=!0,this._lastX=a.pageX,this._lastY=a.pageY,m.superclass.onMouseDown.call(this,a)},onMouseUp:function(a){if(this.mouseDown)this.mouseDown=!1,m.superclass.onMouseUp.call(this,a)},onDndSourceOver:function(a){this!==a?(this.mouseDown=!1,this.targetAnchor&&this._unmarkTargetAnchor()):
  this.isDragging&&(a=r.manager(),a.canDrop("Disabled"!=this.targetState&&(!this.current||a.source!=this||!(this.current.id in this.selection))))},onDndStart:function(a,b,c){this.autoSync&&this.sync();this.isSource&&this._changeState("Source",this==a?c?"Copied":"Moved":"");this._changeState("Target",this.accept&&this.checkAcceptance(a,b)?"":"Disabled");this==a&&r.manager().overSource(this);this.isDragging=!0},onDndDrop:function(a,b,c,d){if(this==d)this.onDrop(a,b,c);this.onDndCancel()},onDndCancel:function(){if(this.targetAnchor)this._unmarkTargetAnchor(),
  this.targetAnchor=null;this.before=!0;this.mouseDown=this.isDragging=!1;this._changeState("Source","");this._changeState("Target","")},onDrop:function(a,b,c){if(this!=a)this.onDropExternal(a,b,c);else this.onDropInternal(b,c)},onDropExternal:function(a,b,c){var d=this._normalizedCreator;this._normalizedCreator=this.creator?function(b,c){return d.call(this,a.getItem(b.id).data,c)}:c?function(b){var c=a.getItem(b.id),b=b.cloneNode(!0);b.id=k.getUniqueId();return{node:b,data:c.data,type:c.type}}:function(b){var c=
  a.getItem(b.id);a.delItem(b.id);return{node:b,data:c.data,type:c.type}};this.selectNone();!c&&!this.creator&&a.selectNone();this.insertNodes(!0,b,this.before,this.current);!c&&this.creator&&a.deleteSelectedNodes();this._normalizedCreator=d},onDropInternal:function(a,b){var c=this._normalizedCreator;if(!(this.current&&this.current.id in this.selection)){if(b)this._normalizedCreator=this.creator?function(a,b){return c.call(this,this.getItem(a.id).data,b)}:function(a){var b=this.getItem(a.id),a=a.cloneNode(!0);
  a.id=k.getUniqueId();return{node:a,data:b.data,type:b.type}};else{if(!this.current)return;this._normalizedCreator=function(a){var b=this.getItem(a.id);return{node:a,data:b.data,type:b.type}}}this._removeSelection();this.insertNodes(!0,a,this.before,this.current);this._normalizedCreator=c}},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){m.superclass.onOverEvent.call(this);r.manager().overSource(this);if(this.isDragging&&"Disabled"!=this.targetState)this.onDraggingOver()},
  onOutEvent:function(){m.superclass.onOutEvent.call(this);r.manager().outSource(this);if(this.isDragging&&"Disabled"!=this.targetState)this.onDraggingOut()},_markTargetAnchor:function(a){if(!(this.current==this.targetAnchor&&this.before==a))this.targetAnchor&&this._removeItemClass(this.targetAnchor,this.before?"Before":"After"),this.targetAnchor=this.current,this.targetBox=null,this.before=a,this.targetAnchor&&this._addItemClass(this.targetAnchor,this.before?"Before":"After")},_unmarkTargetAnchor:function(){if(this.targetAnchor)this._removeItemClass(this.targetAnchor,
  this.before?"Before":"After"),this.targetBox=this.targetAnchor=null,this.before=!0},_markDndStatus:function(a){this._changeState("Source",a?"Copied":"Moved")},_legalMouseDown:function(a){if("touchstart"!=a.type&&!b.isLeft(a))return!1;if(!this.withHandles)return!0;for(a=a.target;a&&a!==this.node;a=a.parentNode){if(d.contains(a,"dojoDndHandle"))return!0;if(d.contains(a,"dojoDndItem")||d.contains(a,"dojoDndIgnore"))break}return!1}});return m})},"dojo/dnd/Selector":function(){define("../_base/array,../_base/declare,../_base/event,../_base/kernel,../_base/lang,../dom,../dom-construct,../mouse,../_base/NodeList,../on,../touch,./common,./Container".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r){var m=j("dojo.dnd.Selector",r,{constructor:function(b,c){c||(c={});this.singular=c.singular;this.autoSync=c.autoSync;this.selection={};this.anchor=null;this.simpleSelection=!1;this.events.push(a(this.node,k.press,e.hitch(this,"onMouseDown")),a(this.node,k.release,e.hitch(this,"onMouseUp")))},singular:!1,getSelectedNodes:function(){var a=new f,b=n._empty,c;for(c in this.selection)c in b||a.push(d.byId(c));return a},selectNone:function(){return this._removeSelection()._removeAnchor()},
  selectAll:function(){this.forInItems(function(a,b){this._addItemClass(d.byId(b),"Selected");this.selection[b]=1},this);return this._removeAnchor()},deleteSelectedNodes:function(){var a=n._empty,b;for(b in this.selection)if(!(b in a)){var f=d.byId(b);this.delItem(b);c.destroy(f)}this.anchor=null;this.selection={};return this},forInSelectedItems:function(a,b){var b=b||g.global,c=this.selection,d=n._empty,f;for(f in c)f in d||a.call(b,this.getItem(f),f,this)},sync:function(){m.superclass.sync.call(this);
  if(this.anchor&&!this.getItem(this.anchor.id))this.anchor=null;var a=[],b=n._empty,c;for(c in this.selection)c in b||this.getItem(c)||a.push(c);i.forEach(a,function(a){delete this.selection[a]},this);return this},insertNodes:function(a,b,c,d){var f=this._normalizedCreator;this._normalizedCreator=function(b,c){var d=f.call(this,b,c);a?(this.anchor?this.anchor!=d.node&&(this._removeItemClass(d.node,"Anchor"),this._addItemClass(d.node,"Selected")):(this.anchor=d.node,this._removeItemClass(d.node,"Selected"),
  this._addItemClass(this.anchor,"Anchor")),this.selection[d.node.id]=1):(this._removeItemClass(d.node,"Selected"),this._removeItemClass(d.node,"Anchor"));return d};m.superclass.insertNodes.call(this,b,c,d);this._normalizedCreator=f;return this},destroy:function(){m.superclass.destroy.call(this);this.selection=this.anchor=null},onMouseDown:function(a){this.autoSync&&this.sync();if(this.current)if(!this.singular&&!n.getCopyKeyState(a)&&!a.shiftKey&&this.current.id in this.selection)this.simpleSelection=
  !0,b.isLeft(a)&&h.stop(a);else{if(!this.singular&&a.shiftKey){n.getCopyKeyState(a)||this._removeSelection();var c=this.getAllNodes();if(c.length){if(!this.anchor)this.anchor=c[0],this._addItemClass(this.anchor,"Anchor");this.selection[this.anchor.id]=1;if(this.anchor!=this.current){for(var d=0,f;d<c.length&&!(f=c[d],f==this.anchor||f==this.current);++d);for(++d;d<c.length;++d){f=c[d];if(f==this.anchor||f==this.current)break;this._addItemClass(f,"Selected");this.selection[f.id]=1}this._addItemClass(this.current,
  "Selected");this.selection[this.current.id]=1}}}else if(this.singular)this.anchor==this.current?n.getCopyKeyState(a)&&this.selectNone():(this.selectNone(),this.anchor=this.current,this._addItemClass(this.anchor,"Anchor"),this.selection[this.current.id]=1);else if(n.getCopyKeyState(a))this.anchor==this.current?(delete this.selection[this.anchor.id],this._removeAnchor()):this.current.id in this.selection?(this._removeItemClass(this.current,"Selected"),delete this.selection[this.current.id]):(this.anchor&&
  (this._removeItemClass(this.anchor,"Anchor"),this._addItemClass(this.anchor,"Selected")),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=1);else if(!(this.current.id in this.selection))this.selectNone(),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=1;h.stop(a)}},onMouseUp:function(){if(this.simpleSelection&&(this.simpleSelection=!1,this.selectNone(),this.current))this.anchor=this.current,this._addItemClass(this.anchor,
  "Anchor"),this.selection[this.current.id]=1},onMouseMove:function(){this.simpleSelection=!1},onOverEvent:function(){this.onmousemoveEvent=a(this.node,k.move,e.hitch(this,"onMouseMove"))},onOutEvent:function(){this.onmousemoveEvent&&(this.onmousemoveEvent.remove(),delete this.onmousemoveEvent)},_removeSelection:function(){var a=n._empty,b;for(b in this.selection)if(!(b in a)){var c=d.byId(b);c&&this._removeItemClass(c,"Selected")}this.selection={};return this},_removeAnchor:function(){if(this.anchor)this._removeItemClass(this.anchor,
  "Anchor"),this.anchor=null;return this}});return m})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(i,j,h){var j=j.NodeList,g=j.prototype;g.connect=j._adaptAsForEach(function(){return i.connect.apply(this,arguments)});g.coords=j._adaptAsMap(i.coords);j.events="blur,focus,change,click,error,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,submit".split(",");h.forEach(j.events,function(e){var d=
  "on"+e;g[d]=function(c,b){return this.connect(d,c,b)}});return i.NodeList=j})},"dojo/dnd/Container":function(){define("../_base/array,../_base/declare,../_base/event,../_base/kernel,../_base/lang,../_base/window,../dom,../dom-class,../dom-construct,../Evented,../has,../on,../query,../ready,../touch,./common".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p){j=j("dojo.dnd.Container",a,{skipForm:!1,allowNested:!1,constructor:function(a,d){this.node=c.byId(a);d||(d={});this.creator=d.creator||null;
  this.skipForm=d.skipForm;this.parent=d.dropParent&&c.byId(d.dropParent);this.map={};this.current=null;this.containerState="";b.add(this.node,"dojoDndContainer");(!d||!d._skipStartup)&&this.startup();this.events=[n(this.node,l.over,e.hitch(this,"onMouseOver")),n(this.node,l.out,e.hitch(this,"onMouseOut")),n(this.node,"dragstart",e.hitch(this,"onSelectStart")),n(this.node,"selectstart",e.hitch(this,"onSelectStart"))]},creator:function(){},getItem:function(a){return this.map[a]},setItem:function(a,b){this.map[a]=
  b},delItem:function(a){delete this.map[a]},forInItems:function(a,b){var b=b||g.global,c=this.map,d=p._empty,f;for(f in c)f in d||a.call(b,c[f],f,this);return b},clearItems:function(){this.map={}},getAllNodes:function(){return r((this.allowNested?"":"> ")+".dojoDndItem",this.parent)},sync:function(){var a={};this.getAllNodes().forEach(function(b){if(b.id){var c=this.getItem(b.id);if(c){a[b.id]=c;return}}else b.id=p.getUniqueId();var c=b.getAttribute("dndType"),d=b.getAttribute("dndData");a[b.id]={data:d||
  b.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=a;return this},insertNodes:function(a,b,c){if(this.parent.firstChild)if(b){if(!c)c=this.parent.firstChild}else{if(c)c=c.nextSibling}else c=null;var d;if(c)for(b=0;b<a.length;++b)d=this._normalizedCreator(a[b]),this.setItem(d.node.id,{data:d.data,type:d.type}),c.parentNode.insertBefore(d.node,c);else for(b=0;b<a.length;++b)d=this._normalizedCreator(a[b]),this.setItem(d.node.id,{data:d.data,type:d.type}),this.parent.appendChild(d.node);
  return this},destroy:function(){i.forEach(this.events,function(a){a.remove()});this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(a,b,c){a._skipStartup=!0;return new c(b,a)},startup:function(){if(!this.parent&&(this.parent=this.node,"table"==this.parent.tagName.toLowerCase())){var a=this.parent.getElementsByTagName("tbody");if(a&&a.length)this.parent=a[0]}this.defaultCreator=p._defaultCreator(this.parent);this.sync()},onMouseOver:function(a){for(var b=a.relatedTarget;b&&
  !(b==this.node);)try{b=b.parentNode}catch(c){b=null}b||(this._changeState("Container","Over"),this.onOverEvent());b=this._getChildByEvent(a);if(this.current!=b)this.current&&this._removeItemClass(this.current,"Over"),b&&this._addItemClass(b,"Over"),this.current=b},onMouseOut:function(a){for(a=a.relatedTarget;a;){if(a==this.node)return;try{a=a.parentNode}catch(b){a=null}}if(this.current)this._removeItemClass(this.current,"Over"),this.current=null;this._changeState("Container","");this.onOutEvent()},
  onSelectStart:function(a){(!this.skipForm||!p.isFormElement(a))&&h.stop(a)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(a,c){var d="dojoDnd"+a,f=a.toLowerCase()+"State";b.replace(this.node,d+c,d+this[f]);this[f]=c},_addItemClass:function(a,c){b.add(a,"dojoDndItem"+c)},_removeItemClass:function(a,c){b.remove(a,"dojoDndItem"+c)},_getChildByEvent:function(a){if(a=a.target)for(var c=a.parentNode;c;a=c,c=a.parentNode)if((c==this.parent||this.allowNested)&&b.contains(a,"dojoDndItem"))return a;
  return null},_normalizedCreator:function(a,c){var d=(this.creator||this.defaultCreator).call(this,a,c);if(!e.isArray(d.type))d.type=["text"];if(!d.node.id)d.node.id=p.getUniqueId();b.add(d.node,"dojoDndItem");return d}});p._createNode=function(a){return!a?p._createSpan:function(b){return f.create(a,{innerHTML:b})}};p._createTrTd=function(a){var b=f.create("tr");f.create("td",{innerHTML:a},b);return b};p._createSpan=function(a){return f.create("span",{innerHTML:a})};p._defaultCreatorNodes={ul:"li",
  ol:"li",div:"div",p:"div"};p._defaultCreator=function(a){var a=a.tagName.toLowerCase(),b="tbody"==a||"thead"==a?p._createTrTd:p._createNode(p._defaultCreatorNodes[a]);return function(a,c){var d=a&&e.isObject(a),f,g;d&&a.tagName&&a.nodeType&&a.getAttribute?(f=a.getAttribute("dndData")||a.innerHTML,d=(d=a.getAttribute("dndType"))?d.split(/\s*,\s*/):["text"],g=a):(f=d&&a.data?a.data:a,d=d&&a.type?a.type:["text"],g=("avatar"==c?p._createSpan:b)(""+f));if(!g.id)g.id=p.getUniqueId();return{node:g,data:f,
  type:d}}};return j})},"dojo/dnd/Manager":function(){define("../_base/array,../_base/declare,../_base/event,../_base/lang,../_base/window,../dom-class,../Evented,../has,../keys,../on,../topic,../touch,./common,./autoscroll,./Avatar".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l){var p=j("dojo.dnd.Manager",[c],{constructor:function(){this.source=this.avatar=null;this.nodes=[];this.copy=!0;this.target=null;this.canDropFlag=!1;this.events=[]},OFFSET_X:b("touch")?0:16,OFFSET_Y:b("touch")?-64:16,overSource:function(a){if(this.avatar)this.target=
  a&&"Disabled"!=a.targetState?a:null,this.canDropFlag=Boolean(this.target),this.avatar.update();k.publish("/dnd/source/over",a)},outSource:function(a){if(this.avatar){if(this.target==a)this.target=null,this.canDropFlag=!1,this.avatar.update(),k.publish("/dnd/source/over",null)}else k.publish("/dnd/source/over",null)},startDrag:function(b,c,f){m.autoScrollStart(e.doc);this.source=b;this.nodes=c;this.copy=Boolean(f);this.avatar=this.makeAvatar();e.body().appendChild(this.avatar.node);k.publish("/dnd/start",
  b,c,this.copy);this.events=[a(e.doc,n.move,g.hitch(this,"onMouseMove")),a(e.doc,n.release,g.hitch(this,"onMouseUp")),a(e.doc,"keydown",g.hitch(this,"onKeyDown")),a(e.doc,"keyup",g.hitch(this,"onKeyUp")),a(e.doc,"dragstart",h.stop),a(e.body(),"selectstart",h.stop)];d.add(e.body(),"dojoDnd"+(f?"Copy":"Move"))},canDrop:function(a){a=Boolean(this.target&&a);if(this.canDropFlag!=a)this.canDropFlag=a,this.avatar.update()},stopDrag:function(){d.remove(e.body(),["dojoDndCopy","dojoDndMove"]);i.forEach(this.events,
  function(a){a.remove()});this.events=[];this.avatar.destroy();this.source=this.target=this.avatar=null;this.nodes=[]},makeAvatar:function(){return new l(this)},updateAvatar:function(){this.avatar.update()},onMouseMove:function(a){var c=this.avatar;if(c)m.autoScrollNodes(a),c=c.node.style,c.left=a.pageX+this.OFFSET_X+"px",c.top=a.pageY+this.OFFSET_Y+"px",c=Boolean(this.source.copyState(r.getCopyKeyState(a))),this.copy!=c&&this._setCopyStatus(c);b("touch")&&a.preventDefault()},onMouseUp:function(a){if(this.avatar){if(this.target&&
  this.canDropFlag){var b=Boolean(this.source.copyState(r.getCopyKeyState(a)));k.publish("/dnd/drop/before",this.source,this.nodes,b,this.target,a);k.publish("/dnd/drop",this.source,this.nodes,b,this.target,a)}else k.publish("/dnd/cancel");this.stopDrag()}},onKeyDown:function(a){if(this.avatar)switch(a.keyCode){case f.CTRL:a=Boolean(this.source.copyState(!0));this.copy!=a&&this._setCopyStatus(a);break;case f.ESCAPE:k.publish("/dnd/cancel"),this.stopDrag()}},onKeyUp:function(a){this.avatar&&a.keyCode==
  f.CTRL&&(a=Boolean(this.source.copyState(!1)),this.copy!=a&&this._setCopyStatus(a))},_setCopyStatus:function(a){this.copy=a;this.source._markDndStatus(this.copy);this.updateAvatar();d.replace(e.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"))}});r._manager=null;p.manager=r.manager=function(){if(!r._manager)r._manager=new p;return r._manager};return p})},"dojo/dnd/Avatar":function(){define("../_base/declare,../_base/window,../dom,../dom-attr,../dom-class,../dom-construct,../hccss,../query".split(","),
  function(i,j,h,g,e,d,c,b){return i("dojo.dnd.Avatar",null,{constructor:function(b){this.manager=b;this.construct()},construct:function(){var b=d.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),a=this.manager.source,e,h=d.create("tbody",null,b),i=d.create("tr",null,h),m=d.create("td",null,i),l=Math.min(5,this.manager.nodes.length),j=0;c("highcontrast")&&d.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},m);d.create("span",{innerHTML:a.generateText?
  this._generateText():""},m);for(g.set(i,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});j<l;++j)a.creator?e=a._normalizedCreator(a.getItem(this.manager.nodes[j].id).data,"avatar").node:(e=this.manager.nodes[j].cloneNode(!0),"tr"==e.tagName.toLowerCase()&&(i=d.create("table"),d.create("tbody",null,i).appendChild(e),e=i)),e.id="",i=d.create("tr",null,h),m=d.create("td",null,i),m.appendChild(e),g.set(i,{"class":"dojoDndAvatarItem",style:{opacity:(9-j)/10}});this.node=b},destroy:function(){d.destroy(this.node);
  this.node=!1},update:function(){e.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(c("highcontrast")){var d=h.byId("a11yIcon"),a="+";this.manager.canDropFlag&&!this.manager.copy?a="< ":!this.manager.canDropFlag&&!this.manager.copy?a="o":this.manager.canDropFlag||(a="x");d.innerHTML=a}b("tr.dojoDndAvatarHeader td span"+(c("highcontrast")?" span":""),this.node).forEach(function(a){a.innerHTML=this.manager.source.generateText?this._generateText():""},this)},_generateText:function(){return this.manager.nodes.length.toString()}})})},
  "JBrowse/Component":function(){define(["dojo/_base/declare","dojo/_base/lang","JBrowse/Util"],function(i,j,h){return i(null,{constructor:function(g){g=g||{};this._finalizeConfig(g.config);this.browser=g.browser;if(!this.browser)throw"a reference to the main browser is required by this constructor";this.compiledConfig={}},_finalizeConfig:function(g){this.config=this._mergeConfigs(dojo.clone(this._defaultConfig()),g||{})},_defaultConfig:function(){return{baseUrl:"/"}},resolveUrl:function(g,e){e=e||
  {};return h.resolveUrl(this.getConf("baseUrl",[]),this.fillTemplate(g,e))},_mergeConfigs:function(g,e){if(null===e)return null;null===g&&(g={});for(var d in e)if(d in g&&"object"==typeof e[d]&&"object"==typeof g[d])g[d]=this._mergeConfigs(g[d],e[d]);else if("undefined"==typeof g[d]||"undefined"!=typeof e[d])g[d]=e[d];return g},_compileConfigurationPath:function(g){var e=this.config;for("string"==typeof g&&(g=g.split("."));g.length&&e;)e=e[g.shift()];return g.length?function(){return null}:"function"==
  typeof e?e:function(){return e}},getConf:function(g,e){var d=this.compiledConfig[g];d||(d=this.compiledConfig[g]=this._compileConfigurationPath(g));return e?d.apply(this,e):d.call(this)},fillTemplate:function(g,e){if("string"!=typeof g||-1==g.indexOf("{"))return g;var d={refseq:(this.refSeq||{}).name||(this.ref||{}).name||this.ref||""};d.refSeq=d.refseq;if(d.refSeq)d.refSeqNum=(/\d+/.exec(d.refSeq)||[])[0]||"";if(d.refSeqNum)d.refSeqNumNoLeadingZeroes=(/^0*(\d+)/.exec(d.refSeqNum)||[])[1]||"";e&&
  j.mixin(d,e);return h.fillTemplate(g,d)}})})},"JBrowse/View/Track/LocationScale":function(){define(["dojo/_base/declare","dojo/dom-construct","JBrowse/View/Track/BlockBased","JBrowse/Util"],function(i,j,h,g){return i(h,{constructor:function(e){this.loaded=!0;this.labelClass=e.labelClass;this.posHeight=e.posHeight;this.height=Math.round(1.2*e.posHeight)},makeTrackLabel:function(){},makeTrackMenu:function(){},fillBlock:function(e){var d=e.blockIndex,c=e.block,b=e.leftBase,f=e.scale,a=this.chooseLabel(e),
  b=(b+1-a)*f/10,f=document.createElement("div"),a=g.addCommas(a);f.className=this.labelClass;f.style.left="-"+Number(a.length)/1.7+b+"ex";f.appendChild(document.createTextNode(a));c.domNode.appendChild(f);(c=this.browser.getHighlight())&&c.ref==this.refSeq.name&&this.renderRegionHighlight(e,c);this.heightUpdate(Math.round(1.2*this.posHeight),d);e.finishCallback()},chooseLabel:function(e){for(var d=e.leftBase+1,e=e.scale,c=1E6;0<c;c/=10)if(3>=d%c*e)return d-d%c;return d}})})},"JBrowse/View/Track/BlockBased":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/json,dojo/aspect,dojo/dom-construct,dojo/dom-geometry,dojo/dom-class,dojo/dom-style,dojo/query,dojo/on,dojo/when,dijit/Destroyable,JBrowse/View/InfoDialog,dijit/Dialog,dijit/Menu,dijit/PopupMenuItem,dijit/MenuItem,dijit/CheckedMenuItem,dijit/MenuSeparator,JBrowse/Util,JBrowse/Component,JBrowse/FeatureFiltererMixin,JBrowse/Errors,JBrowse/View/TrackConfigEditor,JBrowse/View/ConfirmDialog,JBrowse/View/Track/BlockBased/Block,JBrowse/View/DetailsMixin".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u,v,w,t,y,x,B,C,A,E){return i([t,E,y,r],{constructor:function(a){a=a||{};this.refSeq=a.refSeq;this.name=a.label||this.config.label;this.key=a.key||this.config.key||this.name;this._changedCallback=a.changeCallback||function(){};this.height=0;this.shown=!0;this.empty=!1;this.browser=a.browser;this.setFeatureFilterParentComponent(this.browser.view);this.store=a.store;j.mixin(this.config.style,this.getUserStyles())},updateUserStyles:function(a){j.mixin(this.config.style,
  a);var b=g.parse(this.browser.cookie("track-style-"+this.name)||"{}");j.mixin(b,a);this.browser.cookie("track-style-"+this.name,b);this.redraw()},getUserStyles:function(){return g.parse(this.browser.cookie("track-style-"+this.name)||"{}")},_defaultConfig:function(){return{maxFeatureSizeForUnderlyingRefSeq:25E4}},heightUpdate:function(b,c){this.shown?(void 0!==c&&(this.blockHeights[c]=b),this.height=Math.max(this.height,b),this.inShowRange||(this.heightUpdateCallback(Math.max(this.labelHeight,this.height)),
  a(".height_overflow_message",this.div).style("top",this.height-16+"px"))):this.heightUpdateCallback(0)},setViewInfo:function(a,b,c,d,f,e){this.genomeView=a;this.heightUpdateCallback=b;this.div=d;this.widthPct=f;this.widthPx=e;this.leftBlank=document.createElement("div");this.leftBlank.className="blank-block";this.rightBlank=document.createElement("div");this.rightBlank.className="blank-block";this.div.appendChild(this.rightBlank);this.div.appendChild(this.leftBlank);this.sizeInit(c,f);this.labelHTML=
  "";this.labelHeight=0;this.config.pinned&&this.setPinned(!0);this.label||this.makeTrackLabel();this.setLabel(this.key)},makeTrackLabel:function(){var a=dojo.create("div",{className:"track-label dojoDndHandle",id:"label_"+this.name,style:{position:"absolute"}},this.div);this.label=a;if((this.config.style||{}).trackLabelCss)a.style.cssText+=";"+trackConfig.style.trackLabelCss;var b=dojo.create("div",{className:"track-close-button"},a);this.own(k(b,"click",dojo.hitch(this,function(a){this.browser.view.suppressDoubleClick(100);
  this.browser.publish("/jbrowse/v1/v/tracks/hide",[this.config]);a.stopPropagation()})));dojo.create("span",{className:"track-label-text"},a);a=dojo.create("div",{className:"track-menu-button"},a);dojo.create("div",{},a);this.labelMenuButton=a;this.makeTrackMenu()},hide:function(){if(this.shown)this.div.style.display="none",this.shown=!1},show:function(){if(!this.shown)this.div.style.display="block",this.shown=!0},initBlocks:function(){this.blocks=Array(this.numBlocks);this.blockHeights=Array(this.numBlocks);
  for(var a=0;a<this.numBlocks;a++)this.blockHeights[a]=0;this.lastAttached=this.firstAttached=null;this._adjustBlanks()},clear:function(){if(this.blocks)for(var a=0;a<this.numBlocks;a++)this._hideBlock(a);this.initBlocks();this.makeTrackMenu()},setLabel:function(b){if(!(void 0===this.label||this.labelHTML==b))this.labelHTML=b,a(".track-label-text",this.label).forEach(function(a){a.innerHTML=b}),this.labelHeight=this.label.offsetHeight},transfer:function(){},startZoom:function(){},endZoom:function(){},
  showRange:function(a,b,c,d,f,e,g){if(this.fatalError)this.showFatalError(this.fatalError);else if(void 0!==this.blocks&&this.blocks.length){if(0==this.labelHeight&&this.label)this.labelHeight=this.label.offsetHeight;this.inShowRange=!0;this.height=this.labelHeight;var k=null==this.firstAttached?b+1:this.firstAttached,h=null==this.lastAttached?a-1:this.lastAttached,l,m;for(l=h;l>=a;l--)m=c+d*(l-a),this._showBlock(l,m,m+d,f,e,g);for(l=h+1;l<=b;l++)m=c+d*(l-a),this._showBlock(l,m,m+d,f,e,g);c=this.blocks[a];
  for(l=k;l<a;l++)this.transfer(this.blocks[l],c,f,e,g),this.cleanupBlock(this.blocks[l]),this._hideBlock(l);c=this.blocks[b];for(l=h;l>b;l--)this.transfer(this.blocks[l],c,f,e,g),this.cleanupBlock(this.blocks[l]),this._hideBlock(l);this.firstAttached=a;this.lastAttached=b;this._adjustBlanks();this.inShowRange=!1;this.heightUpdate(this.height);this.updateStaticElements(this.genomeView.getPosition())}},cleanupBlock:function(a){a&&a.destroy()},destroy:function(){h.forEach(this.blocks||[],function(a){this.cleanupBlock(a)},
  this);delete this.blocks;delete this.div;this.inherited(arguments)},_hideBlock:function(a){this.blocks[a]&&(this.div.removeChild(this.blocks[a].domNode),this.cleanupBlock(this.blocks[a]),this.blocks[a]=void 0,this.blockHeights[a]=0)},_adjustBlanks:function(){null===this.firstAttached||null===this.lastAttached?(this.leftBlank.style.left="0px",this.leftBlank.style.width="50%",this.rightBlank.style.left="50%",this.rightBlank.style.width="50%"):(this.leftBlank.style.width=this.firstAttached*this.widthPct+
  "%",this.rightBlank.style.left=(this.lastAttached+1)*this.widthPct+"%",this.rightBlank.style.width=(this.numBlocks-this.lastAttached-1)*this.widthPct+"%")},hideAll:function(){if(null!=this.firstAttached){for(var a=this.firstAttached;a<=this.lastAttached;a++)this._hideBlock(a);this.lastAttached=this.firstAttached=null;this._adjustBlanks()}},hideRegion:function(a){if(null!=this.firstAttached){for(var b=this.firstAttached;b<=this.lastAttached;b++)this.blocks[b]&&a.ref==this.refSeq.name&&!(this.blocks[b].leftBase>
  a.end||this.blocks[b].rightBase<a.start)&&this._hideBlock(b);this._adjustBlanks()}},changed:function(){this.hideAll();this._changedCallback&&this._changedCallback()},_makeLoadingMessage:function(){var a=dojo.create("div",{className:"loading",innerHTML:'<div class="text">Loading</span>',title:"Loading data...",style:{visibility:"hidden"}});window.setTimeout(function(){a.style.visibility="visible"},200);return a},showFatalError:function(b){a(".block",this.div).concat(a(".blank-block",this.div)).concat(a(".error",
  this.div)).orphan();this.blocks=[];this.blockHeights=[];this.fatalErrorMessageElement=this._renderErrorMessage(b||this.fatalError,this.div);this.heightUpdate(c.position(this.fatalErrorMessageElement).h);this.updateStaticElements(this.genomeView.getPosition())},_handleError:function(a,b){var c=dojo.mixin({},a);dojo.mixin(c,b);var d="object"==typeof a;d&&a instanceof x.TimeOut&&c.block?this.fillBlockTimeout(c.blockIndex,c.block,a):d&&a instanceof x.DataOverflow?c.block?this.fillTooManyFeaturesMessage(c.blockIndex,
  c.block,b.scale,a):h.forEach(this.blocks,function(c,d){c&&this.fillTooManyFeaturesMessage(d,c,b.scale,a)},this):(console.error(a.stack||""+a,a),this.fatalError=a,this.showFatalError(a))},fillBlockError:function(a,b,c){c=c||this.fatalError||this.error;d.empty(b.domNode);b=this._renderErrorMessage(c,b.domNode);this.heightUpdate(dojo.position(b).h,a)},_renderErrorMessage:function(a,b){return d.create("div",{className:"error",innerHTML:'<h2>Error</h2><div class="text">An error was encountered when displaying this track.</div>'+
  (a?'<div class="codecaption">Diagnostic message</div><code>'+a+"</code>":""),title:"An error occurred"},b)},fillTooManyFeaturesMessage:function(a,b,c,d){d=(d&&d.message||"Too much data to show").replace(/\.$/,"");this.fillMessage(a,b,d+(c>=this.browser.view.maxPxPerBp?"":"; zoom in to see detail")+".")},redraw:function(){this.clear();this.genomeView.showVisibleBlocks(!0)},markBlockHeightOverflow:function(a){if(!a.heightOverflowed)a.heightOverflowed=!0,b.add(a.domNode,"height_overflow"),d.create("div",
  {className:"height_overflow_message",innerHTML:"Max height reached",style:{top:this.height-16+"px",height:"16px"}},a.domNode)},_showBlock:function(a,b,c,d,f,e){if(this.empty||this.fatalError)this.heightUpdate(this.labelHeight);else if(this.blocks[a])this.heightUpdate(this.blockHeights[a],a);else{var g=new A({startBase:b,endBase:c,scale:d,node:{className:"block",style:{left:a*this.widthPct+"%",width:this.widthPct+"%"}}});this.blocks[a]=g;this.div.appendChild(g.domNode);if(this.fatalError)this.fillBlockError(a,
  g);else{var k=this._makeLoadingMessage();g.domNode.appendChild(k);var h=function(){g&&k.parentNode&&g.domNode.removeChild(k)},a={blockIndex:a,block:g,leftBlock:this.blocks[a-1],rightBlock:this.blocks[a+1],leftBase:b,rightBase:c,scale:d,stripeWidth:this.widthPx,containerStart:f,containerEnd:e,finishCallback:h};try{this.fillBlock(a)}catch(l){this._handleError(l,a),h()}}}},moveBlocks:function(a){var b=Array(this.numBlocks),c=Array(this.numBlocks),d;for(d=0;d<this.numBlocks;d++)c[d]=0;var f;0>this.lastAttached+
  a||this.firstAttached+a>=this.numBlocks?this.lastAttached=this.firstAttached=null:(this.firstAttached=Math.max(0,Math.min(this.numBlocks-1,this.firstAttached+a)),this.lastAttached=Math.max(0,Math.min(this.numBlocks-1,this.lastAttached+a)),f=0>a?this.blocks[this.firstAttached-a]:this.blocks[this.lastAttached-a]);for(d=0;d<this.blocks.length;d++){var e=d+a;if(0>e||e>=this.numBlocks)f&&this.blocks[d]&&this.transfer(this.blocks[d],f),this._hideBlock(d);else{b[e]=this.blocks[d];if(b[e])b[e].domNode.style.left=
  e*this.widthPct+"%";c[e]=this.blockHeights[d]}}this.blocks=b;this.blockHeights=c;this._adjustBlanks()},sizeInit:function(a,b,c){this.numBlocks=a;this.widthPct=b;c&&this.moveBlocks(-c);if(this.blocks&&0<this.blocks.length){for(var d=this.blocks[a-1],c=a;c<this.blocks.length;c++)d&&this.blocks[c]&&this.transfer(this.blocks[c],d),this._hideBlock(c);c=this.blocks.length;this.blocks.length=a;for(this.blockHeights.length=a;c<a;c++)this.blocks[c]=void 0,this.blockHeights[c]=0;this.lastAttached=Math.min(this.lastAttached,
  a-1);if(this.firstAttached>this.lastAttached)this.lastAttached=this.firstAttached=null;if(this.blocks.length!=a)throw Error("block number mismatch: should be "+a+"; blocks.length: "+this.blocks.length);for(c=0;c<a;c++)if(this.blocks[c])this.blocks[c].domNode.style.left=c*b+"%",this.blocks[c].domNode.style.width=b+"%"}else this.initBlocks();this.makeTrackMenu()},fillMessage:function(a,b,e,g){d.empty(b.domNode);b=dojo.create("div",{className:g||"message",innerHTML:e},b.domNode);this.heightUpdate(c.getMarginBox(b,
  f.getComputedStyle(b)).h,a)},updateStaticElements:function(a){this.window_info=dojo.mixin(this.window_info||{},a);if(this.fatalErrorMessageElement&&(this.fatalErrorMessageElement.style.width=0.6*this.window_info.width+"px","x"in a))this.fatalErrorMessageElement.style.left=a.x+0.2*this.window_info.width+"px";if(this.label&&"x"in a)this.label.style.left=a.x+"px"},_renderContextMenu:function(a,b,c){c||(c=new p,this.own(c));for(key in a){var d=a[key];try{if(d.children){var f=new p;c.addChild(f);c.addChild(new q({popup:f,
  label:d.label}));this._renderContextMenu(d.children,b,f)}else{var e=dojo.clone(d);if(e.action||e.url||e.href)e.onClick=this._makeClickHandler(d,b);if(e.label&&!e.onClick)e.disabled=!0;c.addChild(new ({"dijit/MenuItem":s,"dijit/CheckedMenuItem":u,"dijit/MenuSeparator":v}[d.type]||s)(e))}}catch(g){console.error("failed to render menu item: "+g)}}return c},_makeClickHandler:function(a,b){var c=this;if("function"==typeof a)a={action:a};else{if("undefined"==typeof a)return console.error("Undefined click specification, cannot make click handler"),
  function(){};if("defaultDialog"==a.action)a.action="contentDialog",a.content=dojo.hitch(this,"defaultFeatureDetail")}var d=function(d){if(!c.genomeView.dragging){var f=b||this,e=c._processMenuSpec(dojo.clone(a),f),g=e.url||e.href;e.url=g;dojo.clone(e.style||{});e.action=e.action||(g?"iframeDialog":e.content?"contentDialog":!1);e.title=e.title||e.label;"string"==typeof e.action?(e.action={iframedialog:"iframeDialog",iframe:"iframeDialog",contentdialog:"contentDialog",content:"contentDialog",baredialog:"bareDialog",
  bare:"bareDialog",xhrdialog:"xhrDialog",xhr:"xhrDialog",newwindow:"newWindow",_blank:"newWindow",thiswindow:"navigateTo",navigateto:"navigateTo"}[(""+e.action).toLowerCase()],"newWindow"==e.action?window.open(g,"_blank"):"navigateTo"==e.action?window.location=g:e.action in{iframeDialog:1,contentDialog:1,xhrDialog:1,bareDialog:1}&&c._openDialog(e,d,f)):"function"==typeof e.action&&e.action.call(f,d)}};if(a.label)d.label=a.label;return d},_trackDetailsContent:function(a){var b=d.create("div",{className:"detail"}),
  c=j.hitch(this,"renderDetailField",b);c("Name",this.key||this.name);var f=j.clone(this.getMetadata());j.mixin(f,a);delete f.key;delete f.label;"object"==typeof f.conf&&delete f.conf;var a=[],e;for(e in f)a.push(e);h.forEach(a,function(a){c(w.ucFirst(a),f[a])});return b},getMetadata:function(){return(this.browser&&this.browser.trackMetaDataStore?this.browser.trackMetaDataStore.getItem(this.name):this.config.metadata?this.config.metadata:{})||{}},setPinned:function(a){this.config.pinned=!!a;this.config.pinned?
  b.add(this.div,"pinned"):b.remove(this.div,"pinned");return this.config.pinned},isPinned:function(){return!!this.config.pinned},_trackMenuOptions:function(){var a=this;return[{label:"About this track",title:"About track: "+(this.key||this.name),iconClass:"jbrowseIconHelp",action:"contentDialog",content:dojo.hitch(this,"_trackDetailsContent")},{label:"Pin to top",type:"dijit/CheckedMenuItem",title:"make this track always visible at the top of the view",checked:a.isPinned(),onClick:function(){a.browser.publish("/jbrowse/v1/v/tracks/"+
  (this.checked?"pin":"unpin"),[a.name])}},{label:"Edit config",title:"edit this track's configuration",iconClass:"dijitIconConfigure",action:function(){(new B(a.config)).show(function(b){a.browser.publish("/jbrowse/v1/v/tracks/replace",[b.conf])})}},{label:"Delete track",title:"delete this track",iconClass:"dijitIconDelete",action:function(){(new C({title:"Delete track?",message:"Really delete this track?"})).show(function(b){b&&a.browser.publish("/jbrowse/v1/v/tracks/delete",[a.config])})}}]},_processMenuSpec:function(a,
  b){for(var c in a)a.hasOwnProperty(c)&&(a[c]="object"==typeof a[c]?this._processMenuSpec(a[c],b):this.template(b.feature,this._evalConf(b,a[c],c)));return a},_evalConf:function(a,b,c){var d={action:1,click:1,content:1};return"function"==typeof b&&!d[c]?b.apply(a,a.callbackArgs||[]):b},getConfForFeature:function(a,b){return this.getConf(a,[b,a,null,null,this])},isFeatureHighlighted:function(a,b){var c=this.browser.getHighlight();return c&&c.objectName&&c.objectName==b&&c.ref==this.refSeq.name&&!(a.get("start")>
  c.end||a.get("end")<c.start)},_openDialog:function(a,b,d){function f(a,b){"function"==typeof b.then?b.then(function(b){a.set("content",b)}):a.set("content",b)}var d=d||{},b=a.action,b=b.replace(/Dialog/,""),g=d.feature&&(d.feature.get("name")||d.feature.get("id")),g={"class":"popup-dialog popup-dialog-"+b,title:a.title||a.label||(g?g+" details":"Details"),style:dojo.clone(a.style||{})};a.dialog&&i.safeMixin(g,a.dialog);var k;if("xhr"==b||"content"==b){if("xhr"==b)g.href=a.url;k=new m(g);d.dialog=
  k;"content"==b&&f(k,this._evalConf(d,a.content,null));w.removeAttribute(d,"dialog")}else if("bare"==b)k=new l(g),d.dialog=k,f(k,this._evalConf(d,a.content,null)),w.removeAttribute(d,"dialog");else if("iframe"==b){d=function(){var a=c.position(this.browser.container);return{h:Math.round(0.8*a.h),w:Math.round(0.8*a.w)}}.call(this);k=new l(g);var h=dojo.create("iframe",{tabindex:"0",width:d.w,height:d.h,style:{border:"none"},src:a.url});k.set("content",h);dojo.create("a",{href:a.url,target:"_blank",
  className:"dialog-new-window",title:"open in new window",onclick:dojo.hitch(k,"hide"),innerHTML:a.url},k.titleBar);a=function(){var a=c.position(k.containerNode),b=a.w,a=a.h-c.position(k.titleBar).h;h.width=b;h.height=a};e.after(k,"layout",a);e.after(k,"show",a)}e.after(k,"hide",function(){setTimeout(function(){k.destroyRecursive()},500)});k.show()},template:function(a,b){if("string"!=typeof b||!a)return b;if(b)return b.replace(/\{([^}]+)\}/g,function(b,c){var d=a?a.get(c.toLowerCase()):void 0;return void 0!==
  d?d:""})},makeTrackMenu:function(){var a=this;n(this._trackMenuOptions()).then(function(b){if(b&&b.length&&a.label&&a.labelMenuButton)a.trackMenu&&a.trackMenu.destroyRecursive(),b=a._renderContextMenu(b,{menuButton:a.labelMenuButton,track:a,browser:a.browser,refSeq:a.refSeq}),b.startup(),b.set("leftClickToOpen",!0),b.bindDomNode(a.labelMenuButton),b.set("leftClickToOpen",!1),b.bindDomNode(a.label),a.trackMenu=b,a.own(a.trackMenu)})},fillBlockTimeout:function(a,c){d.empty(c.domNode);b.add(c.domNode,
  "timed_out");this.fillMessage(a,c,"This region took too long to display, possibly because it contains too much data. Try zooming in to show a smaller region.")},renderRegionHighlight:function(a,b){if(!(b.start>a.rightBase||b.end<a.leftBase)){var c=a.rightBase-a.leftBase,f=b.start,e=b.end,g=a.leftBase-f;0<g&&(f+=g);var k=e-a.rightBase;0<k&&(e-=k);e=100*(e-f)/c;f=100*(f-a.leftBase)/c;d.create("div",{className:"global_highlight"+(0>=g?" left":"")+(0>=k?" right":""),style:{left:f+"%",width:e+"%",height:"100%"}},
  a.block.domNode)}}})})},"JBrowse/View/InfoDialog":function(){define("dojo/_base/declare,dojo/_base/array,dijit/focus,JBrowse/View/Dialog/WithActionBar,dojo/on,dijit/form/Button".split(","),function(i,j,h,g,e,d){return i(g,{refocus:!1,autofocus:!1,_fillActionBar:function(c){(new d({className:"OK",label:"OK",onClick:dojo.hitch(this,"hide")})).placeAt(c)},show:function(){this.inherited(arguments);var c=this;this._extraEvents=[];var b=((dijit||{})._underlay||{}).domNode;b&&this._extraEvents.push(e(b,
  "click",dojo.hitch(this,"hideIfVisible")));this._extraEvents.push(e(document.body,"keydown",function(b){0<=[dojo.keys.ESCAPE,dojo.keys.ENTER].indexOf(b.keyCode)&&c.hideIfVisible()}));h.focus(this.closeButtonNode)},hideIfVisible:function(){this.get("open")&&this.hide()},hide:function(){this.inherited(arguments);j.forEach(this._extraEvents,function(c){c.remove()})}})})},"JBrowse/View/Dialog/WithActionBar":function(){define(["dojo/_base/declare","dojo/dom-geometry","dijit/Dialog"],function(i,j,h){return i(h,
  {constructor:function(){dojo.connect(this,"onLoad",this,"_addActionBar")},_addActionBar:function(){if(this.containerNode&&!this.actionBar)this.actionBar=dojo.create("div",{className:"infoDialogActionBar dijitDialogPaneActionBar"}),this._fillActionBar(this.actionBar),this.containerNode.appendChild(this.actionBar)},_fillActionBar:function(){},show:function(g){this._addActionBar();this.inherited(arguments);this.domNode.style.width=j.position(this.titleBar).w+"px"}})})},"dijit/PopupMenuItem":function(){define("dojo/_base/declare,dojo/dom-style,dojo/query,./registry,./MenuItem,./hccss".split(","),
  function(i,j,h,g,e){return i("dijit.PopupMenuItem",e,{_fillContent:function(){if(this.srcNodeRef){var d=h("*",this.srcNodeRef);this.inherited(arguments,[d[0]]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var d=h("[widgetId]",this.dropDownContainer)[0];this.popup=g.byNode(d)}this.ownerDocumentBody.appendChild(this.popup.domNode);this.popup.startup();this.popup.domNode.style.display="none";this.arrowWrapper&&j.set(this.arrowWrapper,
  "visibility","");this.focusNode.setAttribute("aria-haspopup","true")}},destroyDescendants:function(d){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(d),delete this.popup);this.inherited(arguments)}})})},"dijit/CheckedMenuItem":function(){define(["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(i,j,h,g){return i("dijit.CheckedMenuItem",h,{templateString:g,checked:!1,_setCheckedAttr:function(e){j.toggle(this.domNode,
  "dijitCheckedMenuItemChecked",e);this.domNode.setAttribute("aria-checked",e?"true":"false");this._set("checked",e)},iconClass:"",onChange:function(){},_onClick:function(e){this.disabled||(this.set("checked",!this.checked),this.onChange(this.checked));this.onClick(e)}})})},"url:dijit/templates/CheckedMenuItem.html":'<tr class="dijitReset dijitMenuItem" data-dojo-attach-point="focusNode" role="menuitemcheckbox" tabIndex="-1">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" data-dojo-attach-point="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" data-dojo-attach-point="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" data-dojo-attach-point="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&#160;</td>\n</tr>\n',
  "JBrowse/Errors":function(){define(["dojo/_base/declare"],function(i){var j=i(Error,{constructor:function(g){if("object"==typeof g)g instanceof Error?(this._originalError=g,this.message=""+g,this.stack=g.stack):dojo.mixin(this,g);else if("string"==typeof g)this.message=g;if(!this.message)this.message=this._defaultMessage}}),h={};h.Fatal=i(j,{_defaultMessage:"Unknown fatal error."});h.TimeOut=i(j,{_defaultMessage:"Data took too long to fetch."});h.DataOverflow=i(j,{_defaultMessage:"Too much data to show."});
  return h})},"JBrowse/View/TrackConfigEditor":function(){define("dojo/_base/declare,dojo/aspect,dojo/json,dojo/on,dojo/dom-construct,dijit/Dialog,dijit/form/Button".split(","),function(i,j,h,g,e,d,c){return i(null,{constructor:function(b){this.trackConfig=b},_makeActionBar:function(b,d){var a=e.create("div",{className:"dijitDialogPaneActionBar"});(new c({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(this,function(){d&&d();this.dialog.hide()})})).placeAt(a);this.applyButton=new c({iconClass:"dijitIconEdit",
  label:"Apply",onClick:dojo.hitch(this,function(){this.newConfig?b&&b({conf:this.newConfig}):d&&d();this.dialog.hide()})});this.applyButton.placeAt(a);return{domNode:a}},show:function(b,c){var a=this.dialog=new d({title:"Edit track configuration",className:"trackConfigEditor"}),e=[this._makeEditControls().domNode,this._makeActionBar(b,c).domNode];a.set("content",e);a.show();j.after(a,"hide",dojo.hitch(this,function(){setTimeout(function(){a.destroyRecursive()},500)}))},_makeEditControls:function(){var b=
  dojo.hitch(this,function(){this.newConfig=this._parseNewConfig(d.value)}),c=e.create("div",{className:"editControls"}),a=this._stringifyConfig(this.trackConfig),d=e.create("textarea",{rows:Math.min((a||"").match(/\n/g).length+4,20),cols:70,value:a,spellcheck:!1,onchange:b},c),g="",h=this,m=function(){if(h.dialog.get("open")){if(d.value!=g)b(),g=d.value;window.setTimeout(m,700)}};window.setTimeout(m,700);this.errorReportArea=e.create("div",{className:"errors"},c);return{domNode:c}},_stringifyConfig:function(b){b=
  dojo.mixin({},b);delete b.store;if(!b.style)b.style={};if(!b.metadata)b.metadata={};return h.stringify(b,void 0,2)},_reportError:function(b){this.errorReportArea.innerHTML='<div class="error">'+b+"</div>";this.applyButton.set("disabled",!0)},_clearErrors:function(){e.empty(this.errorReportArea);this.applyButton.set("disabled",!1)},_parseNewConfig:function(b){var c;try{c=h.parse(b,!0),this._clearErrors()}catch(a){this._reportError(a)}if(c)c.store=this.trackConfig.store;return c}})})},"JBrowse/View/ConfirmDialog":function(){define(["dojo/_base/declare",
  "dijit/focus","JBrowse/View/Dialog/WithActionBar","dojo/on","dijit/form/Button"],function(i,j,h,g,e){return i(h,{autofocus:!1,constructor:function(d){this.message=d.message||"Do you really want to do this?";this.confirmLabel=d.confirmLabel||"Yes";this.denyLabel=d.denyLabel||"No"},_fillActionBar:function(d){var c=this;(new e({className:"yes",label:this.confirmLabel,onClick:function(){c.callback(!0);c.hide()}})).placeAt(d);(new e({className:"no",label:this.denyLabel,onClick:function(){c.callback(!1);
  c.hide()}})).placeAt(d)},show:function(d){this.callback=d||function(){};this.set("content",this.message);this.inherited(arguments);j.focus(this.closeButtonNode)}})})},"JBrowse/View/Track/BlockBased/Block":function(){define(["dojo/_base/declare","dijit/Destroyable","JBrowse/Util"],function(i,j,h){return i(j,{constructor:function(g){dojo.mixin(this,g);g=this.node||{};delete this.node;this.domNode=dojo.create("div",g);this.domNode.block=this},containsBp:function(g){return this.startBase<=g&&this.endBase>=
  g},bpToX:function(g){return(g-this.startBase)*this.scale},toString:function(){return this.startBase+".."+this.endBase},destroy:function(){this.domNode&&h.removeAttribute(this.domNode,"block");this.inherited(arguments)}})})},"JBrowse/View/DetailsMixin":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/query,dojo/dom-construct,dojo/dom-class,dojo/store/Memory,dgrid/OnDemandGrid,dgrid/extensions/DijitRegistry,JBrowse/Util".split(","),function(i,j,h,g,e,d,c,b,f,a){var k=i([b,
  f]);return i(null,{renderDetailField:function(b,c,d,f,k){if(null===d||void 0===d)return"";var h;if(h=this["fmtDetail"+a.ucFirst(c)+"Field"])return h.apply(this,arguments);var k=k||c.replace(/\W/g,"_").toLowerCase(),i=c;if((h=this.config["fmtDetailField_"+c])&&f){if(i=h(c,f),!i)return""}else if((h=this.config["fmtMetaField_"+c])&&!f)if(i=h(c),!i)return"";var u;if("object"==typeof d&&!j.isArray(d)&&"values"in d)u=(d.meta||{}).description,j.isArray(u)&&(u=u.join(", ")),d=d.values;if((h=this.config["fmtDetailDescription_"+
  c])&&f)u=h(u);else if((h=this.config["fmtMetaDescription_"+c])&&!f)u=h(u);h=e.create("div",{className:"field_container",innerHTML:'<h2 class="field '+k+'"'+(u?' title="'+u+'"':"")+">"+i+"</h2>"},b);u=this.renderDetailValue(e.create("div",{className:"value_container "+k},h),c,d,f,k);if("number"==typeof u&&4<u)g("h2",h)[0].innerHTML=i+" ("+u+")";return h},renderDetailValue:function(b,c,f,g,k){var i=this;if(!j.isArray(f)&&f.values)f=f.values;var s;if(s=this["fmtDetail"+a.ucFirst(c)+"Value"])return s.apply(this,
  arguments);if((s=this.config["fmtDetailValue_"+c])&&g)(f=s(f,g))||(f=""),1==f.length&&(f=f[0]);else if((s=this.config["fmtMetaValue_"+c])&&!g)f=s(f),1==f.length&&(f=f[0]);s=typeof f;"function"==typeof f.toHTML&&(f=f.toHTML());if("boolean"==s)f=f?"yes":"no";else{if("undefined"==s||null===f)return 0;if(j.isArray(f))return s=h.map(f,function(a){return this.renderDetailValue(b,c,a,g,k)},this),1<s.length&&d.add(b,"multi_value"),10<s.length&&d.add(b,"big"),s.length;if("object"==s){var u=a.dojof.keys(f).sort();
  s=u.length;if(5<s)return this.renderDetailValueGrid(b,c,g,function(){if(!u.length)return null;var a=u.shift(),b=f[a],a={id:a};if("object"==typeof b)for(var c in b)a[c]=i._valToString(b[c]);else a.value=b;return a},{descriptions:function(){if(!u.length)return{};var a=f[u[0]],b={},c;for(c in a)b[c]=a[c].meta&&a[c].meta.description||null;return b}()}),s;h.forEach(u,function(a){return this.renderDetailField(b,a,f[a],g,k)},this);return u.length}}e.create("div",{className:"value "+k,innerHTML:f},b);return 1},
  renderDetailValueGrid:function(b,d,f,e,g){function h(a,b,c){i.renderDetailValue(c,"",b,f,"")}for(var i=this,d=[],j=g.descriptions||{},v=g.renderCell||{};g=e();)d.push(g);if(!d.length)return document.createElement("span");var w=[],t;for(t in d[0])(function(b){var c={label:{id:"Name"}[b]||a.ucFirst(b),field:b,renderCell:v[b]||h,renderHeaderCell:function(a){if(j[b])a.title=j[b];a.appendChild(document.createTextNode(c.label||c.field))}};w.push(c)})(t);b.style.overflow="hidden";b.style.width="90%";new k({columns:w,
  store:new c({data:d})},b);return b},_valToString:function(a){return j.isArray(a)?h.map(a,j.hitch(this,"_valToString")).join(" "):"object"==typeof a?"values"in a?this._valToString(a.values):JSON.stringify(a):""+a}})})},"dgrid/OnDemandGrid":function(){define("dgrid/OnDemandGrid",["dojo/_base/declare","./Grid","./OnDemandList"],function(i,j,h){return i([j,h],{})})},"dgrid/Grid":function(){define("dgrid/Grid","dojo/_base/kernel,dojo/_base/declare,dojo/on,dojo/has,put-selector/put,./List,dojo/_base/sniff".split(","),
  function(i,j,h,g,e,d){function c(a,b){b&&b.nodeType&&a.appendChild(b)}var b=8>g("ie")&&!g("quirks"),f=/[^\._a-zA-Z0-9-]/g,j=j(d,{columns:null,cellNavigation:!0,tabableHeader:!0,showHeader:!0,column:function(a){return"string"==typeof a?this.columns[a]:this.cell(a).column},listType:"grid",cell:function(a,b){if(a.row&&a.row instanceof this._Row)return a;if(a.target&&a.target.nodeType)a=a.target;var c;if(a.nodeType){do{if(this._rowIdToObject[a.id])break;var d=a.columnId;if(d){b=d;c=a;break}a=a.parentNode}while(a&&
  a!=this.domNode)}if(!c&&"undefined"!=typeof b){var f=this.row(a);if(d=f.element)for(var d=d.getElementsByTagName("td"),e=0;e<d.length;e++)if(d[e].columnId==b){c=d[e];break}}if(null!=a)return{row:f||this.row(a),column:b&&this.column(b),element:c}},_columnsCss:function(a){a.fullSelector=function(){return this.parent.fullSelector()+" .dgrid-cell"};for(var b=0;b<a.children.length;b++){var c=a.children[b];c.field=c.className=c.selector.substring(1)}return a.children},createRowCells:function(a,c,d){var h=
  e("table.dgrid-row-table[role=presentation]"),i=9>g("ie")||g("quirks")?e(h,"tbody"):h,l,j,q,s,u,v,w,t,y,x,d=d||this.subRows;for(j=0,q=d.length;j<q;j++){v=d[j];l=1==q&&!g("ie")?i:e(i,"tr");v.className&&e(l,"."+v.className);for(s=0,u=v.length;s<u;s++){w=v[s];t=w.id;y=w.className||w.field&&"field-"+w.field;y=e(a+(".dgrid-cell.dgrid-cell-padding"+(t?".dgrid-column-"+t:"")+(y?"."+y:"")).replace(f,"-")+"[role="+("th"===a?"columnheader":"gridcell")+"]");y.columnId=t;b?(t=e(y,"!dgrid-cell-padding div.dgrid-cell-padding"),
  y.contents=t):t=y;if(x=w.colSpan)y.colSpan=x;if(x=w.rowSpan)y.rowSpan=x;c(t,w);l.appendChild(y)}}return h},left:function(a,b){return this.cell(this._move(a,-(b||1),"dgrid-cell"))},right:function(a,b){return this.cell(this._move(a,b||1,"dgrid-cell"))},renderRow:function(a,b){var d=this.createRowCells("td",function(d,f){var e=a;f.get?e=f.get(a):"field"in f&&"_item"!=f.field&&(e=e[f.field]);f.formatter?d.innerHTML=f.formatter(e):f.renderCell?c(d,f.renderCell(a,e,d,b)):null!=e&&d.appendChild(document.createTextNode(e))},
  b&&b.subRows);return e("div[role=row]>",d)},renderHeader:function(){var a=this,d=this.headerNode,f=d.childNodes.length;for(d.setAttribute("role","row");f--;)e(d.childNodes[f],"!");f=this.createRowCells("th",function(a,d){var f=d.headerNode=a;if(b)a=a.parentNode;var e=d.field;if(e)a.field=e;if(d.renderHeaderCell)c(f,d.renderHeaderCell(f));else if(d.label||d.field)f.appendChild(document.createTextNode(d.label||d.field));if(!1!==d.sortable&&e&&"_item"!=e)a.sortable=!0,a.className+=" dgrid-sortable"},
  this.subRows&&this.subRows.headerRows);this._rowIdToObject[f.id=this.id+"-header"]=this.columns;d.appendChild(f);h(f,"click,keydown",function(b){if("click"==b.type||32==b.keyCode||!g("opera")&&13==b.keyCode){var b=b.target,c,f;do if(b.sortable)return a._sortNode=b,b=b.field||b.columnId,c=(f=a._sort[0])&&f.attribute==b&&!f.descending,a.set("sort",b,c);while((b=b.parentNode)&&b!=d)}})},resize:function(){var a=this.headerNode.firstChild,b=this.contentNode,c;this.inherited(arguments);if(!g("ie")||7<g("ie")&&
  !g("quirks"))if(b.style.width="",b&&a&&(c=a.offsetWidth)!=b.offsetWidth)b.style.width=c+"px"},destroy:function(){this._destroyColumns();this.inherited(arguments)},_setSort:function(a,b){this.inherited(arguments);this._lastSortedArrow&&(e(this._lastSortedArrow,"<!dgrid-sort-up!dgrid-sort-down"),e(this._lastSortedArrow,"!"),delete this._lastSortedArrow);if(this._sort[0]){var c=this._sort[0].attribute,d=this._sort[0].descending,f=this._sortNode,g,h,i;delete this._sortNode;if(!f)for(i in g=this.columns,
  g)if(h=g[i],h.field==c){f=h.headerNode;break}if(f)f=f.contents||f,this._lastSortedArrow=e(f.firstChild,"-div.dgrid-sort-arrow.ui-icon[role=presentation]"),this._lastSortedArrow.innerHTML="&nbsp;",e(f,d?".dgrid-sort-down":".dgrid-sort-up"),this.resize()}},styleColumn:function(a,b){return this.addCssRule("#"+this.domNode.id+" .dgrid-column-"+a,b)},_configColumns:function(a,b){var c=[],d=b instanceof Array,f,e;for(f in b){e=b[f];"string"==typeof e&&(b[f]=e={label:e});if(!d&&!e.field)e.field=f;f=e.id=
  e.id||(isNaN(f)?f:a+f);a&&(this.columns[f]=e);this._configColumn&&this._configColumn(e,f,b,a);e.grid=this;"function"===typeof e.init&&e.init();c.push(e)}return d?b:c},_destroyColumns:function(){var a=this.subRows.length,b,c,d,f;this.cleanup();for(b=0;b<a;b++)for(c=0,f=this.subRows[b].length;c<f;c++)d=this.subRows[b][c],"function"===typeof d.destroy&&d.destroy()},configStructure:function(){var a=this.subRows;if(a){this.columns={};for(var b=0;b<a.length;b++)a[b]=this._configColumns(b+"-",a[b])}else this.subRows=
  [this._configColumns("",this.columns)]},_setColumns:function(a){this._destroyColumns();this.subRows=null;this.columns=a;this._updateColumns()},_setSubRows:function(a){this._destroyColumns();this.subRows=a;this._updateColumns()},setColumns:function(a){i.deprecated("setColumns(...)",'use set("columns", ...) instead',"dgrid 1.0");this.set("columns",a)},setSubRows:function(a){i.deprecated("setSubRows(...)",'use set("subRows", ...) instead',"dgrid 1.0");this.set("subRows",a)},_updateColumns:function(){this.configStructure();
  this.renderHeader();this.refresh();this._lastCollection&&this.renderArray(this._lastCollection);this.resize()}});j.appendIfNode=c;j.defaultRenderCell=function(a,b,c){null!=b&&c.appendChild(document.createTextNode(b))};return j})},"put-selector/put":function(){(function(i){var j,h=/[-+,> ]/;i([],j=function(g,e){function d(f){function a(){l&&m&&l!=m&&(m==f&&(e||(e=h.test(u)&&g.createDocumentFragment()))||m).insertBefore(l,j||null)}for(var e,i,j,m,l,p=arguments,q=p[0],s=0;s<p.length;s++){var u=p[s];
  if("object"==typeof u){i=!1;if(u instanceof Array){l=g.createDocumentFragment();for(var v=0;v<u.length;v++)l.appendChild(d(u[v]));u=l}if(u.nodeType)l=u,a(),m=u,j=0;else for(v in u)l[v]=u[v]}else if(i)i=!1,l.appendChild(g.createTextNode(u));else{1>s&&(f=null);i=!0;if(q=u.replace(c,function(c,e,h,k,i,n){if(e){a();if("-"==e||"+"==e){if(m=(j=l||m).parentNode,l=null,"+"==e)j=j.nextSibling}else"<"==e?m=l=(l||m).parentNode:(","==e?m=f:l&&(m=l),l=null),j=0;l&&(m=l)}if((c=!h&&k)||!l&&(h||i))"$"==c?(c=p[++s],
  m.appendChild(g.createTextNode(c))):(c=c||d.defaultTag,(e=b&&p[s+1]&&p[s+1].name)&&(c="<"+c+' name="'+e+'">'),l=g.createElement(c));if(h)if("$"==k&&(k=p[++s]),"#"==h)l.id=k;else if(e=(c=l.className)&&(" "+c+" ").replace(" "+k+" "," "),"."==h)l.className=c?(e+k).substring(1):k;else if("!"==u)d("div",l,"<").innerHTML="";else if(e=e.substring(1,e.length-1),e!=c)l.className=e;if(i)if("$"==n&&(n=p[++s]),"style"==i)l.style.cssText=n;else l["!"==i.charAt(0)?(i=i.substring(1))&&"removeAttribute":"setAttribute"](i,
  ""===n?i:n);return""}))throw new SyntaxError("Unexpected char "+q+" in "+u);a();m=q=l||m}}f&&e&&f.appendChild(e);return q}h=e||h;var c=/(?:\s*([-+ ,<>]))?\s*(\.|!\.?|#)?([-\w%$]+)?(?:\[([^\]=]+)=?['"]?([^\]'"]*)['"]?\])?/g,g=g||document,b="object"==typeof g.createElement;d.defaultTag="div";d.forDocument=j;return d})})("undefined"==typeof define?function(i,j){"undefined"==typeof window?require("./node-html")(module,j):put=j()}:define)},"dgrid/List":function(){define("dgrid/List","dojo/_base/array,dojo/_base/kernel,dojo/_base/declare,dojo/on,dojo/has,./util/misc,dojo/has!touch?./TouchScroll,xstyle/has-class,put-selector/put,dojo/_base/sniff,xstyle/css!./css/dgrid.css".split(","),
  function(i,j,h,g,e,d,c,b,f){function a(a){var b=a?"."+a.replace(p,"."):"";this._class&&(b="!"+this._class.replace(p,"!")+b);f(this.domNode,b);this._class=a}function k(){return this._class}b("mozilla","opera","webkit","ie","ie-6","ie-6-7","quirks","no-quirks","touch");var n,r=f(document.getElementsByTagName("head")[0],"style"),m=[],r=r.sheet||r.styleSheet,l=0,p=/ +/g,q=7>e("ie")&&!e("quirks")?function(){var a,b,c;if(this._started&&(a=document.documentElement,b=a.clientWidth,a=a.clientHeight,c=this._prevWinDims||
  [],c[0]!==b||c[1]!==a))this.resize(),this._prevWinDims=[b,a]}:function(){this._started&&this.resize()};return h(c?c:null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,postscript:function(a,b){var c=this;(this._Row=function(a,b,c){this.id=a;this.data=b;this.element=c}).prototype.remove=function(){c.removeRow(this.element)};if(b)this.srcNodeRef=b=b.nodeType?b:document.getElementById(b);this.create(a,b)},listType:"list",create:function(b,c){var d=this.domNode=c||f("div"),e;b?(this.params=
  b,h.safeMixin(this,b),e=b["class"]||b.className||d.className,this._sort=b.sort||[],delete this.sort):this._sort=[];this.observers=[];this._listeners=[];this._rowIdToObject={};this.postMixInProperties&&this.postMixInProperties();this.id=d.id=d.id||this.id||"dgrid_"+l++;this.buildRendering();e&&a.call(this,e);this.postCreate&&this.postCreate();delete this.srcNodeRef;this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var a=this.domNode,b=this,c,h,k,i;i=this.isRTL="rtl"==(document.body.dir||
  document.documentElement.dir||document.body.style.direction).toLowerCase();a.className="";f(a,"[role=grid].ui-widget.dgrid.dgrid-"+this.listType);c=this.headerNode=f(a,"div.dgrid-header.dgrid-header-row.ui-widget-header"+(this.showHeader?"":".dgrid-header-hidden"));(e("quirks")||8>e("ie"))&&f(a,"div.dgrid-spacer");h=this.bodyNode=f(a,"div.dgrid-scroller");h.tabIndex=-1;this.headerScrollNode=f(a,"div.dgrid-header-scroll.dgrid-scrollbar-width.ui-widget-header");k=this.footerNode=f("div.dgrid-footer"+
  (this.showFooter?"":".dgrid-footer-hidden"));f(a,k);i&&(a.className+=" dgrid-rtl"+(e("webkit")?"":" dgrid-rtl-nonwebkit"));g(h,"scroll",function(d){if(b.showHeader)c.scrollLeft=d.scrollLeft||h.scrollLeft;d.stopPropagation();g.emit(a,"scroll",{scrollTarget:h})});this.configStructure();this.renderHeader();this.contentNode=this.touchNode=f(this.bodyNode,"div.dgrid-content.ui-widget-content");this._listeners.push(this._resizeHandle=g(window,"resize",d.throttleDelayed(q,this)))},startup:function(){this.inherited(arguments);
  if(!this._started)this._started=!0,this.resize(),this.set("sort",this._sort)},configStructure:function(){},resize:function(){var a=this.bodyNode,b=this.headerNode,c=this.footerNode,d=b.offsetHeight,g=this.showFooter?c.offsetHeight:0,h=e("quirks")||7>e("ie");this.headerScrollNode.style.height=a.style.marginTop=d+"px";a.style.marginBottom=g+"px";if(h&&(a.style.height="",a.style.height=Math.max(this.domNode.offsetHeight-d-g,0)+"px",g))c.style.bottom="1px",setTimeout(function(){c.style.bottom=""},0);
  n||(d=f(document.body,"div.dgrid-scrollbar-measure"),n=d.offsetWidth-d.clientWidth,f(d,"!"),7===e("ie")&&n++,this.addCssRule(".dgrid-scrollbar-width","width: "+n+"px"),this.addCssRule(".dgrid-scrollbar-height","height: "+n+"px"),17!=n&&!h&&(this.addCssRule(".dgrid-header","right: "+n+"px"),this.addCssRule(".dgrid-rtl-nonwebkit .dgrid-header","left: "+n+"px")));if(h)b.style.width=a.clientWidth+"px",setTimeout(function(){b.scrollLeft=a.scrollLeft},0)},addCssRule:function(a,b){var c=m.length;m[c]=(r.cssRules||
  r.rules).length;r.addRule?r.addRule(a,b):r.insertRule(a+"{"+b+"}",m[c]);return{remove:function(){var a=m[c],b,d=m.length;if(void 0!==a){r.deleteRule?r.deleteRule(a):r.removeRule(a);m[c]=void 0;for(b=c;b<d;b++)m[b]>a&&m[b]--}}}},on:function(a,b){var c=g(this.domNode,a,b);e("dom-addeventlistener")||this._listeners.push(c);return c},cleanup:function(){var a=this.observers,b;for(b in this._rowIdToObject)if(this._rowIdToObject[b]!=this.columns){var c=document.getElementById(b);c&&this.removeRow(c,!0)}for(b=
  0;b<a.length;b++)(c=a[b])&&c.cancel();this.observers=[];this.preload=null},destroy:function(){if(this._listeners){for(var a=this._listeners.length;a--;)this._listeners[a].remove();delete this._listeners}this.cleanup();f(this.domNode,"!")},refresh:function(){this.cleanup();this._rowIdToObject={};this._autoId=0;this.contentNode.innerHTML="";this.scrollTo({x:0,y:0})},newRow:function(a,b,c,d){if(!b||b.parentNode){var e=this.insertRow(a,b?b.parentNode:this.contentNode,b,d.start+c,d);f(e,".ui-state-highlight");
  setTimeout(function(){f(e,"!ui-state-highlight")},250);return e}},adjustRowIndices:function(a){if(this.maintainOddEven){var b=a.rowIndex;if(-1<b){do if(-1<a.rowIndex)-1<(a.className+" ").indexOf("dgrid-row ")&&f(a,"."+(1==b%2?"dgrid-row-odd":"dgrid-row-even")+"!"+(0==b%2?"dgrid-row-odd":"dgrid-row-even")),a.rowIndex=b++;while((a=a.nextSibling)&&a.rowIndex!=b)}}},renderArray:function(a,b,c){function d(a){p=e.insertRow(a,j,null,g++,c);p.observerIndex=l;return p}function f(a){if(i=b?b.parentNode:e.contentNode)i.insertBefore(j,
  b||null),(p=a[a.length-1])&&e.adjustRowIndices(p);return k=a}var c=c||{},e=this,g=c.start||0,h,k,i;if(!b)this._lastCollection=a;if(a.observe)var l=this.observers.push(a.observe(function(a,b,d){var f,g;if(-1<b&&k[b]){h=k.splice(b,1)[0];if(h.parentNode==i)(f=h.nextSibling)&&b!=d&&f.rowIndex--,e.removeRow(h);e._processScroll&&e._processScroll()}if(-1<d){g=k[d];if(!g&&(g=k[d-1]))g=(g.connected||g).nextSibling;if(h=e.newRow(a,g,d,c))if(h.observerIndex=l,k.splice(d,0,h),!f||d<b)a=h.previousSibling,f=!a||
  a.rowIndex+1==h.rowIndex||0==h.rowIndex?h:a;c.count++}b!=d&&f&&e.adjustRowIndices(f)},!0))-1;var j=document.createDocumentFragment();if(a.map){if(k=a.map(d,console.error),k.then)return k.then(f)}else{k=[];for(var m=0,n=a.length;m<n;m++)k[m]=d(a[m])}var p;return f(k)},renderHeader:function(){},_autoId:0,insertRow:function(a,b,c,d,f){var e=f.parentId,e=this.id+"-row-"+(e?e+"-":"")+(this.store&&this.store.getIdentity?this.store.getIdentity(a):this._autoId++),g=document.getElementById(e),h=g&&g.previousSibling;
  if(!g||c&&g.parentNode!=c.parentNode)g&&this.removeRow(g),g=this.renderRow(a,f),g.className=(g.className||"")+" ui-state-default dgrid-row "+(1==d%2?"dgrid-row-odd":"dgrid-row-even"),this._rowIdToObject[g.id=e]=a;b.insertBefore(g,c||null);h&&this.adjustRowIndices(h);g.rowIndex=d;return g},renderRow:function(a){return f("div",""+a)},removeRow:function(a,b){a=a.element||a;delete this._rowIdToObject[a.id];b||f(a,"!")},row:function(a){var b;if(a instanceof this._Row)return a;if(a.target&&a.target.nodeType)a=
  a.target;if(a.nodeType){do{var c=a.id;if(b=this._rowIdToObject[c])return new this._Row(c.substring(this.id.length+5),b,a);a=a.parentNode}while(a&&a!=this.domNode)}else return"object"==typeof a?b=this.store.getIdentity(a):(b=a,a=this._rowIdToObject[this.id+"-row-"+b]),new this._Row(b,a,document.getElementById(this.id+"-row-"+b))},cell:function(a){return{row:this.row(a)}},_move:function(a,b,c,d){var f,e;e=f=a.element;b=b||1;do if(a=f[0>b?"previousSibling":"nextSibling"]){do if((f=a)&&-1<(f.className+
  " ").indexOf(c+" ")){e=f;b+=0>b?1:-1;break}while(a=(!d||!f.hidden)&&f[0>b?"lastChild":"firstChild"])}else if(f=f.parentNode,f===this.bodyNode||f===this.headerNode)break;while(b);return e},up:function(a,b,c){return this.row(this._move(a,-(b||1),"dgrid-row",c))},down:function(a,b,c){return this.row(this._move(a,b||1,"dgrid-row",c))},scrollTo:e("touch")?function(){return this.inherited(arguments)}:function(a){if("undefined"!==typeof a.x)this.bodyNode.scrollLeft=a.x;if("undefined"!==typeof a.y)this.bodyNode.scrollTop=
  a.y},getScrollPosition:e("touch")?function(){return this.inherited(arguments)}:function(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}},get:function(a){var b="_get"+a.charAt(0).toUpperCase()+a.slice(1);return"function"===typeof this[b]?this[b].apply(this,[].slice.call(arguments,1)):this[a]},set:function(a,b){if("object"===typeof a)for(var c in a)this.set(c,a[c]);else c="_set"+a.charAt(0).toUpperCase()+a.slice(1),"function"===typeof this[c]?this[c].apply(this,[].slice.call(arguments,
  1)):this[a]=b;return this},_getClass:k,_setClass:a,_getClassName:k,_setClassName:a,_setSort:function(a,b){this._sort="string"!=typeof a?a:[{attribute:a,descending:b}];this.refresh();if(this._lastCollection){if(a.length){if("string"!=typeof a)b=a[0].descending,a=a[0].attribute;this._lastCollection.sort(function(c,d){var f=c[a],e=d[a];void 0===f&&(f="");void 0===e&&(e="");return f==e?0:f>e==!b?1:-1})}this.renderArray(this._lastCollection)}},sort:function(a,b){j.deprecated("sort(...)",'use set("sort", ...) instead',
  "dgrid 1.0");this.set("sort",a,b)},_getSort:function(){return this._sort},_setShowHeader:function(a){var b=this.headerNode;this.showHeader=a;f(b,(a?"!":".")+"dgrid-header-hidden");this.renderHeader();this.resize();if(a)b.scrollLeft=this.getScrollPosition().x},setShowHeader:function(a){j.deprecated("setShowHeader(...)",'use set("showHeader", ...) instead',"dgrid 1.0");this.set("showHeader",a)},_setShowFooter:function(a){this.showFooter=a;f(this.footerNode,(a?"!":".")+"dgrid-footer-hidden");this.resize()}})})},
  "dgrid/util/misc":function(){define("dgrid/util/misc",[],function(){var i={defaultDelay:15,throttle:function(j,h,g){var e=!1,g=g||i.defaultDelay;return function(){e||(e=!0,j.apply(h,arguments),setTimeout(function(){e=!1},g))}},throttleDelayed:function(j,h,g){var e=!1,g=g||i.defaultDelay;return function(){if(!e){e=!0;var d=arguments;setTimeout(function(){e=!1;j.apply(h,d)},g)}}},debounce:function(j,h,g){var e,g=g||i.defaultDelay;return function(){e&&(clearTimeout(e),e=null);var d=arguments;e=setTimeout(function(){j.apply(h,
  d)},g)}}};return i})},"xstyle/has-class":function(){define(["dojo/has"],function(i){var j={};return function(){for(var h,g=arguments,e=0;e<g.length;e++)if(h=g[e],!j[h]){j[h]=!0;var d=h.match(/^(no-)?(.+?)((-[\d\.]+)(-[\d\.]+)?)?$/),c=i(d[2]),b=-d[4];if((0<b?b<=c&&(-d[5]||b)>=c:!!c)==!d[1])document.documentElement.className+=" has-"+h}}})},"xstyle/css":function(){define(["require"],function(i){var j=window.cssCache||(window.cssCache={});return{load:function(h,g,e){var d=g.toUrl(h);if(j[d])return createStyleSheet(j[d]);
  var c=document.documentElement,b=c.insertBefore(document.createElement("div"),c.firstChild);b.id=g.toAbsMid(h).replace(/\//g,"-").replace(/\..*/,"")+"-loaded";h=(b.currentStyle||getComputedStyle(b,null)).display;c.removeChild(b);if("none"==h)return e();i(["./load-css"],function(b){b(d,e)})},pluginBuilder:"xstyle/css-builder"}})},"dgrid/OnDemandList":function(){define("dgrid/OnDemandList","./List,./_StoreMixin,dojo/_base/declare,dojo/_base/lang,dojo/_base/Deferred,dojo/on,./util/misc,put-selector/put".split(","),
  function(i,j,h,g,e,d,c,b){return h([i,j],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:Infinity,bufferRows:10,farOffRemoval:2E3,rowHeight:22,queryRowsOverlap:1,pagingDelay:c.defaultDelay,postCreate:function(){this.inherited(arguments);var b=this;d(this.bodyNode,"scroll",c.throttleDelayed(function(a){b._processScroll(a)},null,this.pagingDelay))},renderQuery:function(c,a,d){var h={query:c,count:0,node:a,options:d};if(!a){var i={node:b(this.contentNode,"div.dgrid-preload",{rowIndex:0}),count:0,
  query:c,next:h,options:d};h.node=a=b(this.contentNode,"div.dgrid-preload");h.previous=i}a.rowIndex=this.minRowsPerPage;(i=this.preload)?((h.next=i.next)&&this.bodyNode.scrollTop>=i.node.offsetTop?h.previous=i:(h.next=i,h.previous=i.previous),h.previous.next=h,h.next.previous=h):this.preload=h;var j=b(a,"-div.dgrid-loading");b(j,"div.dgrid-below").innerHTML=this.loadingMessage;var d=g.mixin(this.get("queryOptions"),d,{start:0,count:this.minRowsPerPage,query:c}),l=c(d),p=this;e.when(this.renderArray(l,
  a,d),function(c){return e.when(l.total||l.length,function(d){b(j,"!");var f=c.length,d=d||f;if(!d)p.noDataNode=b(p.contentNode,"div.dgrid-no-data"),p.noDataNode.innerHTML=p.noDataMessage;for(var e=0,g=0;g<f;g++)e+=p._calcRowHeight(c[g]);if(f&&e)p.rowHeight=e/f;d-=f;h.count=d;a.rowIndex=f;d?a.style.height=Math.min(d*p.rowHeight,p.maxEmptySpace)+"px":a.style.display="none";p._processScroll();return c})});return l},refresh:function(){this.inherited(arguments);if(this.store){var b=this;this._trackError(function(){return b.renderQuery(function(a){return b.store.query(b.query,
  a)})})}},_calcRowHeight:function(b){var a=b.previousSibling;return a&&a.offsetTop!=b.offsetTop?b.offsetHeight:0},lastScrollTop:0,_processScroll:function(c){function a(a,c,f,e){var g=h.farOffRemoval,i=a.node;if(c>2*g){for(var l,j=i[f],m=0,t=0,p=[];l=j;){var y=h._calcRowHeight(l);if(m+y+g>c||0>j.className.indexOf("dgrid-row")&&0>j.className.indexOf("dgrid-loading"))break;var j=l[f],r,q=l.observerIndex;if(q!=r&&-1<r){var w=h.observers,s=w[r];s&&s.cancel();w[r]=0}m+=y;t+=l.count||1;r=q;h.removeRow(l,
  !0);p.push(l)}a.count+=t;e?(i.rowIndex-=t,d(a)):i.style.height=i.offsetHeight+m+"px";for(var x=b("div"),a=0;a<p.length;a++)b(x,p[a]);setTimeout(function(){b(x,"!")},1)}}function d(a,b){a.node.style.height=Math.min(a.count*h.rowHeight,b?Infinity:h.maxEmptySpace)+"px"}var h=this,i=h.bodyNode,c=c&&c.scrollTop||i.scrollTop,j=i.offsetHeight+c,l,p,q=h.preload,s=h.lastScrollTop,u=h.bufferRows*h.rowHeight,v=u-h.rowHeight;for(h.lastScrollTop=c;q&&!q.node.offsetWidth;)q=q.previous;for(;q&&q!=l;){l=h.preload;
  h.preload=q;p=q.node;var w=p.offsetTop;if(j+1+v<w){do q=q.previous;while(q&&!q.node.offsetWidth)}else if(c-1-v>w+p.offsetHeight){do q=q.next;while(q&&!q.node.offsetWidth)}else{var t=((p.rowIndex?c-u:j)-w)/h.rowHeight,w=(j-c+2*u)/h.rowHeight,y=Math.max(Math.min((c-s)*h.rowHeight,h.maxRowsPerPage/2),h.maxRowsPerPage/-2),w=w+Math.min(Math.abs(y),10);0==p.rowIndex&&(t-=w);t=Math.max(t,0);10>t&&0<t&&w+t<h.maxRowsPerPage&&(w+=Math.max(0,t),t=0);w=Math.min(Math.max(w,h.minRowsPerPage),h.maxRowsPerPage,q.count);
  if(0==w)break;var w=Math.ceil(w),t=Math.min(Math.floor(t),q.count-w),x=g.mixin(h.get("queryOptions"),q.options);q.count-=w;var B=p,C,A=h.queryRowsOverlap;if(y=0<p.rowIndex&&q){var E=q.previous;E&&(a(E,c-(E.node.offsetTop+E.node.offsetHeight),"nextSibling"),0<t&&E.node==p.previousSibling?(t=Math.min(q.count,t),q.previous.count+=t,d(q.previous,!0),q.count-=t,p.rowIndex+=t,A=0):w+=t);x.start=p.rowIndex-A;p.rowIndex+=w}else{if(q.next)a(q.next,q.next.node.offsetTop-j,"previousSibling",!0),B=p.nextSibling,
  B==q.next.node?(q.next.count+=q.count-t,q.next.node.rowIndex=t+w,d(q.next),q.count=t,A=0):C=!0;x.start=q.count}x.count=Math.min(w+A,h.maxRowsPerPage);if(C)C=B.offsetTop;d(q);p=b(B,"-div.dgrid-loading[style=height:"+w*h.rowHeight+"px]");b(p,"div.dgrid-"+(y?"below":"above")).innerHTML=h.loadingMessage;p.count=w;x.query=q.query;var N=q.query(x);if(void 0===h._trackError(function(){return N}))break;(function(a,c,f,g,i){e.when(h.renderArray(i,a,x),function(){B=a.nextSibling;b(a,"!");if(g&&B){var c=h.getScrollPosition();
  h.scrollTo({x:c.x,y:c.y+B.offsetTop-g,preserveMomentum:!0})}f&&e.when(i.total||i.length,function(a){f.count=a-f.node.rowIndex;d(f)});h._processScroll()})}).call(this,p,i,y,C,N);q=q.previous}}}})})},"dgrid/_StoreMixin":function(){define("dgrid/_StoreMixin","dojo/_base/kernel,dojo/_base/declare,dojo/_base/lang,dojo/_base/Deferred,dojo/on,put-selector/put".split(","),function(i,j,h,g,e,d){function c(b){"object"!==typeof b&&(b=Error(b));b.grid=this;e.emit(this.domNode,"dgrid-error",{grid:this,error:b,
  cancelable:!0,bubbles:!0})&&console.error(b)}return j(null,{store:null,query:null,queryOptions:null,getBeforePut:!0,noDataMessage:"",loadingMessage:"",constructor:function(){this.query={};this.queryOptions={};this.dirty={};this._updating={}},_configColumn:function(b){if(b.set){if(!this._columnsWithSet)this._columnsWithSet={};this._columnsWithSet[b.field]=b}},_configColumns:function(){this._columnsWithSet=null;return this.inherited(arguments)},_setStore:function(b,c,a){this.store=b;this.dirty={};this.set("query",
  c,a)},_setQuery:function(b,c){var a=c&&c.sort;this.query=void 0!==b?b:this.query;this.queryOptions=c||this.queryOptions;a?this.set("sort",a):this.refresh()},setStore:function(b,c,a){i.deprecated("setStore(...)",'use set("store", ...) instead',"dgrid 1.0");this.set("store",b,c,a)},setQuery:function(b,c){i.deprecated("setQuery(...)",'use set("query", ...) instead',"dgrid 1.0");this.set("query",b,c)},_getQueryOptions:function(){var b=h.delegate(this.queryOptions,{});if(this._sort.length)b.sort=this._sort;
  return b},_getQuery:function(){var b=this.query;return"object"==typeof b&&null!=b?h.delegate(b,{}):b},_setSort:function(b,c){if(this.store)this._lastCollection=null;this.inherited(arguments)},insertRow:function(b,c,a,d,e){var g=this.store,i=this.dirty,g=g&&g.getIdentity(b),l;g in i&&!(g in this._updating)&&(l=i[g]);l&&(b=h.delegate(b,l));return this.inherited(arguments)},updateDirty:function(b,c,a){var d=this.dirty,e=d[b];e||(e=d[b]={});e[c]=a},setDirty:function(b,c,a){i.deprecated("setDirty(...)",
  "use updateDirty() instead","dgrid 1.0");this.updateDirty(b,c,a)},save:function(){function b(b,e){return function(h){var i=c._columnsWithSet,l=c._updating,j,m;for(j in e)h[j]=e[j];if(i)for(j in i)m=i[j].set(h),void 0!==m&&(h[j]=m);l[b]=!0;return g.when(a.put(h),function(){delete d[b];delete l[b]})}}var c=this,a=this.store,d=this.dirty,e=new g,h=e.promise,i=function(b){var d;return c.getBeforePut||!(d=c.row(b).data)?function(){return a.get(b)}:function(){return d}},l;for(l in d)var j=b(l,d[l]),h=h.then(i(l)).then(j);
  e.resolve();return h},revert:function(){this.dirty={};this.refresh()},_trackError:function(b){var d;"string"==typeof b&&(b=h.hitch(this,b));try{d=b()}catch(a){c.call(this,a)}return g.when(d,null,h.hitch(this,c))},newRow:function(){this.noDataNode&&(d(this.noDataNode,"!"),delete this.noDataNode);return this.inherited(arguments)},removeRow:function(b,c){var a={element:b};if(!c&&this.noDataMessage&&this.up(a).element===b&&this.down(a).element===b)this.noDataNode=d(this.contentNode,"div.dgrid-no-data"),
  this.noDataNode.innerHTML=this.noDataMessage;return this.inherited(arguments)}})})},"dgrid/extensions/DijitRegistry":function(){define("dgrid/extensions/DijitRegistry",["dojo/_base/declare","dijit/registry"],function(i,j){return i(null,{buildRendering:function(){j.add(this);this.inherited(arguments);this.domNode.setAttribute("widgetId",this.id)},startup:function(){if(!this._started){this.inherited(arguments);var h=j.getEnclosingWidget(this.domNode.parentNode);h&&h.isLayoutContainer&&this._resizeHandle.remove()}},
  destroyRecursive:function(){this.destroy()},destroy:function(){this.inherited(arguments);j.remove(this.id)},getChildren:function(){return[]}})})},"JBrowse/View/Track/GridLines":function(){define(["dojo/_base/declare","dojo/dom-construct","JBrowse/View/Track/BlockBased"],function(i,j,h){return dojo.declare(h,{constructor:function(){this.loaded=!0;this.name="gridlines"},makeTrackLabel:function(){},makeTrackMenu:function(){},fillBlock:function(g){this.renderGridlines(g.block,g.leftBase,g.rightBase);
  var e=this.browser.getHighlight();e&&e.ref==this.refSeq.name&&this.renderRegionHighlight(g,e);g.finishCallback();this.heightUpdate(100,g.blockIndex)},renderGridlines:function(g,e,d){for(var e=d-e,e=!(e%20)?20:!(e%10)?10:!(e%5)?5:!(e%2)?2:0,d=function(b,a){var c=document.createElement("div");c.style.cssText="left: "+a+"%; width: 0px";c.className="gridline "+b;return c},c=0;c<e;c++){var b=100/e*c;g.domNode.appendChild(d(0==b||20==e&&10==c?"gridline_major":"gridline_minor",b))}}})})},"JBrowse/BehaviorManager":function(){define([],
  function(){function i(i){this.context=i.context;this.behaviors=i.behaviors}i.prototype.initialize=function(){this.removeAll();for(var i in this.behaviors)this.behaviors[i].apply_on_init&&this.applyBehaviors(i)};i.prototype.applyBehaviors=function(){dojo.forEach(arguments,function(i){i=this._get(i);if(!i.applied)i.handles=i.handles||[],i.handles=i.apply.call(this.context||this,this,i.handles),i.applied=!0},this)};i.prototype._get=function(i){i=this.behaviors[i];if(!i)throw"no behavior registed with name ''name";
  return i};i.prototype.swapBehaviors=function(i,h){this.removeBehaviors(i);this.applyBehaviors(h)};i.prototype.removeBehaviors=function(){dojo.forEach(arguments,function(i){i=this._get(i);if(i.applied)(i.remove||function(h,g){dojo.forEach(g,dojo.disconnect,dojo)}).call(this.context||this,this,i.handles),i.applied=!1},this)};i.prototype.removeAll=function(){for(var i in this.behaviors)this.removeBehaviors(i)};return i})},"JBrowse/View/Animation/Zoomer":function(){define(["JBrowse/View/Animation"],function(i){function j(h,
  g,e,d,c){i.call(this,g,e,d);this.toZoom=g.zoomContainer;this.initialWidth=e=this.toZoom.clientWidth;this.width0=e*Math.min(1,h);this.distance=e*Math.max(1,h)-this.width0;this.zoomingIn=1<h;this.center=(g.getX()+g.elem.clientWidth*c)/g.scrollContainer.clientWidth;this.initialX=this.subject.getX();this.initialLeft=parseInt(this.toZoom.style.left)}j.prototype=new i;j.prototype.step=function(h){var h=this.zoomingIn?h:1-h,h=h*h*this.distance+this.width0,g=this.center*this.initialWidth-this.center*h;this.toZoom.style.width=
  h+"px";this.toZoom.style.left=this.initialLeft+g+"px";this.subject.updateStaticElements&&this.subject.updateStaticElements({x:this.initialX-g})};return j})},"JBrowse/View/Animation":function(){define([],function(){function i(i,h,g){if(void 0!==i){"animation"in i&&i.animation.stop();this.index=0;this.time=g;this.subject=i;this.callback=h;var e=this;this.animFunction=function(){e.animate()};this.animID=setTimeout(this.animFunction,33);this.frames=0;i.animation=this}}i.prototype.animate=function(){if(this.finished)this.stop();
  else{var i=33,h=0;"startTime"in this?(h=(new Date).getTime()-this.startTime,i=Math.max(33,h/this.frames)):this.startTime=(new Date).getTime();h<this.time?(this.step(h/this.time),this.frames++):(this.step(1),this.finished=!0);this.animID=setTimeout(this.animFunction,i)}};i.prototype.stop=function(){clearTimeout(this.animID);delete this.subject.animation;this.callback.call(this.subject,this)};return i})},"JBrowse/View/Animation/Slider":function(){define(["JBrowse/View/Animation"],function(i){function j(h,
  g,e,d){i.call(this,h,g,e);this.slideStart=h.getX();this.slideDistance=d}j.prototype=new i;j.prototype.step=function(h){h=this.slideStart-this.slideDistance*(-0.5*Math.cos(h*Math.PI)+0.5)|0;h=Math.max(Math.min(this.subject.maxLeft-this.subject.offset,h),this.subject.minLeft-this.subject.offset);this.subject.setX(h)};return j})},"JBrowse/TouchScreenSupport":function(){define([],function(){var i,j,h;return h={CompareObjPos:function(g,e){for(var d=0,c=0,b=e.pageY,f=0;f<g.length&&!(d=c++,findPos(g[f]).top>
  b);f++);return d},checkAvatarPosition:function(g){var e=document.getElementById("tracksAvail"),d=document.getElementById("container");return g.pageX<e.offsetLeft+e.offsetWidth?e:d},removeTouchEvents:function(){i=null},touchSimulated:function(g){if(1>=g.touches.length){var e=g.changedTouches[0],d="",c=document.getElementsByClassName("dojoDndAvatar"),b={},f=h.checkAvatarPosition(e),a=f.getElementsByClassName("dojoDndItem"),d={},k=document.createEvent("MouseEvent"),n=document.createEvent("MouseEvent");
  switch(g.type){case "touchstart":i=e.pageX;d="mousedown";break;case "touchmove":g.preventDefault();d="mousemove";break;default:return}k.initMouseEvent(d,!0,!0,window,1,e.pageX,e.pageY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);n.initMouseEvent("mouseover",!0,!0,window,1,e.pageX,e.pageY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);switch(g.type){case "touchstart":e.target.dispatchEvent(k);e.target.dispatchEvent(n);j=f;break;case "touchmove":if(0<c.length){0<a.length&&(d=h.CompareObjPos(a,e),b=a[d]);try{if(j!=
  f){var r=document.createEvent("MouseEvent");r.initMouseEvent("mouseout",!0,!0,window,1,e.pageX,e.pageY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);j.dispatchEvent(r)}b.dispatchEvent(n);b.dispatchEvent(k)}catch(m){f.dispatchEvent(n),f.dispatchEvent(k)}}}}else h.removeTouchEvents()},touchEnd:function(g){var e=g.changedTouches[0],d=document.getElementsByClassName("dojoDndAvatar"),c={},b=h.checkAvatarPosition(e),f=b.getElementsByClassName("dojoDndItem"),a={},k=document.createEvent("MouseEvent"),j=document.createEvent("MouseEvent");
  i!==e.pageX&&g.preventDefault();h.findPos(e.target);k.initMouseEvent("mouseup",!0,!0,window,1,e.pageX,e.pageY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);j.initMouseEvent("mouseover",!0,!0,window,1,e.pageX,e.pageY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);if(0<d.length){0<f.length&&(a=CompareObjPos(f,e),c=f[a]);try{c.dispatchEvent(j),c.dispatchEvent(k)}catch(r){e.target.dispatchEvent(j),b.dispatchEvent(j)}}else e.target.dispatchEvent(k),e.target.dispatchEvent(j);h.removeTouchEvents()},touchHandle:function(g){dojo.query(".dojoDndItemAnchor").connect("touchstart",
  h.touchSimulated);dojo.query(".dojoDndItemAnchor").connect("touchmove",h.touchSimulated);dojo.query(".dojoDndItemAnchor").connect("touchend",h.touchEnd);dojo.query(".dojoDndItemAnchor").connect("click",function(){});if(1>=g.touches.length){var e=g.changedTouches[0],d="";switch(g.type){case "touchstart":i=e.pageX;d="mousedown";break;case "touchmove":g.preventDefault();d="mousemove";break;case "touchend":i!==e.pageX&&g.preventDefault();d="mouseup";break;default:return}g=document.createEvent("MouseEvent");
  g.initMouseEvent(d,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null);e.target.dispatchEvent(g)}else h.removeTouchEvents()},touchinit:function(){dojo.query(".dojoDndItem").connect("touchstart",h.touchSimulated);dojo.query(".dojoDndItem").connect("touchmove",h.touchSimulated);dojo.query(".dojoDndItem").connect("touchend",h.touchEnd);dojo.query(".locationThumb").connect("touchstart",h.touchHandle);dojo.query(".locationThumb").connect("touchmove",h.touchHandle);dojo.query(".locationThumb").connect("touchend",
  h.touchHandle);dojo.query(".dojoDndItem").connect("click",function(){});dojo.query(".dojoDndTarget").connect("touchstart",h.touchHandle);dojo.query(".dojoDndTarget").connect("touchmove",h.touchHandle);dojo.query(".dojoDndTarget").connect("touchend",h.touchHandle);dojo.query(".dijitSplitter").connect("touchstart",h.touchHandle);dojo.query(".dijitSplitter").connect("touchmove",h.touchHandle);dojo.query(".dijitSplitter").connect("touchend",h.touchHandle)},loadTouch:function(){h.touchinit();document.documentElement.style.webkitTouchCallout=
  "none"},findPos:function(g){var e=0,d={};if(g.offsetParent){do e+=g.offsetTop;while(g=g.offsetParent)}d.top=e;return d}}})},"JBrowse/ConfigManager":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/Deferred,dojo/promise/all,JBrowse/Util,JBrowse/ConfigAdaptor/AdaptorUtil".split(","),function(i,j,h,g,e,d,c){return i(null,{constructor:function(b){this.bootConfig=j.clone(b.bootConfig||{});this.defaults=j.clone(b.defaults||{});this.browser=b.browser;this.skipValidation=b.skipValidation},
  getFinalConfig:function(){return this.finalConfig||(this.finalConfig=function(){var b=this,d=this._applyDefaults(j.clone(this.bootConfig),this.defaults);return this._loadIncludes(this._fillTemplates(d,d)).then(function(a){a=b._mergeConfigs(a,b.bootConfig);b._fillTemplates(a,a);a=c.evalHooks(a);b.skipValidation||b._validateConfig(a);return a})}.call(this))},_getConfigAdaptor:function(b){var c="JBrowse/ConfigAdaptor/"+b.format;"version"in b&&(c+="_v"+b.version);c.replace(/\W/g,"");return d.loadJS([c]).then(function(a){return new a[0](b)})},
  _fillTemplates:function(b,c){var a={},e=typeof b;if(j.isArray(b))for(a=0;a<b.length;a++)b[a]=this._fillTemplates(b[a],c);else if("object"==e)for(var g in b)b.hasOwnProperty(g)&&!a[g]&&(b[g]=this._fillTemplates(b[g],c));else if("string"==e)return d.fillTemplate(b,c);return b},_loadIncludes:function(b){function c(b,d){var g=b.sourceUrl||b.baseUrl,i=a._mergeConfigs(j.clone(d),b),l=a._fillTemplates(a._regularizeIncludes(b.include||[]),i);delete b.include;l=h.map(l,function(b){return a._loadInclude(b,
  g).then(function(a){return c(a,i)})});return e(l).then(function(c){h.forEach(c,function(c){b=a._mergeConfigs(b,c)});return b})}var a=this,b=j.clone(b);return c(b,{})},_loadInclude:function(b,c){return this._getConfigAdaptor(b).then(function(a){if(!a)throw Error("Could not load config "+b.url+", no configuration adaptor found for config format "+b.format+" version "+b.version);return a.load({config:b,baseUrl:c})}).then(null,function(a){try{if(404==a.response.status)return{}}catch(b){}throw a;})},_regularizeIncludes:function(b){if(!b)return[];
  "object"!=typeof b&&(b=[b]);b=h.filter(b,function(b){return b});return h.map(b,function(b){"string"==typeof b&&(b={url:b});if(!("format"in b))b.format=/\.conf$/.test(b.url)?"conf":"JB_json";if("JB_json"==b.format&&!("version"in b))b.version=1;return b})},_applyDefaults:function(b,c){return d.deepUpdate(dojo.clone(c),b)},_validateConfig:function(b){if(!b.tracks)b.tracks=[];b.baseUrl||this._fatalError("Must provide a <code>baseUrl</code> in configuration");if(this.hasFatalErrors)throw"Errors in configuration, cannot start.";
  },_fatalError:function(b){this.hasFatalErrors=!0;this.browser.fatalError(b)},_noRecursiveMerge:function(b){return"datasets"==b},_mergeConfigs:function(b,c){if(null===c)return null;null===b&&(b={});for(var a in c)if("tracks"==a&&a in b)b[a]=this._mergeTrackConfigs(b[a]||[],c[a]||[]);else if(!this._noRecursiveMerge(a)&&a in b&&"object"==typeof c[a]&&"object"==typeof b[a])b[a]=d.deepUpdate(b[a],c[a]);else if("undefined"==typeof b[a]||"undefined"!=typeof c[a])b[a]=c[a];return b},_mergeTrackConfigs:function(b,
  c){if(!c.length)return b;var a={};h.forEach(b,function(b,c){b.index=c;a[b.label]=b});h.forEach(c,function(c){var d=a[c.label];d?this._mergeConfigs(d,c):b.push(c)},this);return b}})})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(i,j,h){var g=i.some;return function(e){var d,c;e instanceof Array?c=e:e&&"object"===typeof e&&(d=e);var b,f=[];if(d){c=[];for(var a in d)Object.hasOwnProperty.call(d,a)&&(f.push(a),c.push(d[a]));b={}}else c&&(b=[]);if(!c||!c.length)return(new j).resolve(b);
  var k=new j;k.promise.always(function(){b=f=null});var i=c.length;g(c,function(a,c){d||f.push(c);h(a,function(a){k.isFulfilled()||(b[f[c]]=a,0===--i&&k.resolve(b))},k.reject);return k.isFulfilled()});return k.promise}})},"JBrowse/ConfigAdaptor/AdaptorUtil":function(){define(["dojox/lang/functional/object","dojox/lang/functional/fold"],function(){return{evalHooks:function(i){for(var j in i)if("object"==typeof i[j])i[j]=this.evalHooks(i[j]);else if("string"==typeof i[j]){var h=i[j];/^\s*function\s*\(/.test(h)&&
  (i[j]=this.evalHook(h))}return i},evalHook:function(i){if("string"!=typeof i)return i;try{eval("arguments[0]="+i+";")}catch(j){console.error(j+" parsing config callback '"+i+"'")}return i}}})},"JBrowse/View/FileDialog":function(){define("dojo/_base/declare,dojo/_base/array,dojo/aspect,dijit/focus,dijit/form/Button,dijit/form/RadioButton,dojo/dom-construct,dijit/Dialog,dojox/form/Uploader,dojox/form/uploader/plugins/IFrame,./FileDialog/TrackList/BAMDriver,./FileDialog/TrackList/BigWigDriver,./FileDialog/TrackList/GFF3Driver,./FileDialog/TrackList/GTFDriver,./FileDialog/TrackList/VCFTabixDriver,./FileDialog/ResourceList,./FileDialog/TrackList".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){return i(null,{constructor:function(a){this.browser=a.browser;this.config=dojo.clone(a.config||{});this.browserSupports={dnd:"draggable"in document.createElement("span")};this._fileTypeDrivers=[new k,new n,new r,new m,new l]},addFileTypeDriver:function(a){this._fileTypeDrivers.unshift(a)},getFileTypeDrivers:function(){return this._fileTypeDrivers.slice()},_makeActionBar:function(a,b){var f=c.create("div",{className:"dijitDialogPaneActionBar"}),g=this.trackDispositionChoice=
  [new d({id:"openImmediately",value:"openImmediately",checked:!0}),new d({id:"addToTrackList",value:"addToTrackList"})],h=c.create("div",{className:"aux"},f);g[0].placeAt(h);c.create("label",{"for":"openImmediately",innerHTML:"Open immediately"},h);g[1].placeAt(h);c.create("label",{"for":"addToTrackList",innerHTML:"Add to tracks"},h);(new e({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(this,function(){b&&b();this.dialog.hide()})})).placeAt(f);(new e({iconClass:"dijitIconFolderOpen",
  label:"Open",onClick:dojo.hitch(this,function(){a&&a({trackConfs:this.trackList.getTrackConfigurations(),trackDisposition:this.trackDispositionChoice[0].checked?this.trackDispositionChoice[0].value:this.trackDispositionChoice[1].checked?this.trackDispositionChoice[1].value:void 0});this.dialog.hide()})})).placeAt(f);return{domNode:f}},show:function(a){var d=this.dialog=new b({title:"Open files",className:"fileDialog"}),f=this._makeLocalFilesControl(),e=this._makeRemoteURLsControl(),k=this._makeResourceListControl(),
  i=this._makeTrackListControl(),a=this._makeActionBar(a.openCallback,a.cancelCallback);dojo.connect(f.uploader,"onChange",function(){k.addLocalFiles(f.uploader._files)});dojo.connect(e,"onChange",function(a){k.clearURLs();k.addURLs(a)});dojo.connect(k,"onChange",function(a){i.update(a)});e=[c.create("div",{className:"intro",innerHTML:"Add any combination of data files and URLs, and JBrowse will automatically suggest tracks to display their contents."}),function(a,b){var d=c.create("div",a);j.forEach(b,
  dojo.hitch(d,"appendChild"));return d}({className:"resourceControls"},[f.domNode,e.domNode]),k.domNode,i.domNode,a.domNode];d.set("content",e);d.show();h.after(d,"hide",dojo.hitch(this,function(){g.curNode&&g.curNode.blur();setTimeout(function(){d.destroyRecursive()},500)}))},_makeLocalFilesControl:function(){var a=c.create("div",{className:"localFilesControl"});c.create("h3",{innerHTML:"Local files"},a);var b=c.create("div",{className:"dragArea"},a),d=new dojox.form.Uploader({multiple:!0});d.placeAt(b);
  this.browserSupports.dnd&&(d.addDropTarget(this.dialog.domNode),c.create("div",{className:"dragMessage",innerHTML:"Select or drag files here."},b));c.create("div",{className:"connector",innerHTML:"&nbsp;"},a);return{domNode:a,uploader:d}},_makeRemoteURLsControl:function(){var a=c.create("div",{className:"remoteURLsControl"});c.create("h3",{innerHTML:"Remote URLs - <smaller>one per line</smaller>"},a);var b={domNode:a,onChange:function(){}};b.input=c.create("textarea",{className:"urlInput",placeHolder:"http://paste.urls.here/example.bam",
  cols:25,rows:5,spellcheck:!1},a);var d="",f=function(){if(b.input.value.replace(/\s+/g,",")!=d){var a=dojo.trim(b.input.value),a=a.length?a.split(/\s+/):[];b.onChange(a);d=b.input.value.replace(/\s+/g,",")}window.setTimeout(f,900)};window.setTimeout(f,900);c.create("div",{className:"connector",innerHTML:"&nbsp;"},a);return b},_makeResourceListControl:function(){return new p({dialog:this})},_makeTrackListControl:function(){var a=new q({browser:this.browser,fileDialog:this});return this.trackList=a}})})},
  "dijit/form/RadioButton":function(){define(["dojo/_base/declare","./CheckBox","./_RadioButtonMixin"],function(i,j,h){return i("dijit.form.RadioButton",[j,h],{baseClass:"dijitRadio"})})},"dijit/form/CheckBox":function(){define("require,dojo/_base/declare,dojo/dom-attr,dojo/has,dojo/query,dojo/ready,./ToggleButton,./_CheckBoxMixin,dojo/text!./templates/CheckBox.html,dojo/NodeList-dom".split(","),function(i,j,h,g,e,d,c,b,f){g("dijit-legacy-requires")&&d(0,function(){i(["dijit/form/RadioButton"])});return j("dijit.form.CheckBox",
  [c,b],{templateString:f,baseClass:"dijitCheckBox",_setValueAttr:function(a,b){"string"==typeof a&&(this.inherited(arguments),a=!0);this._created&&this.set("checked",a,b)},_getValueAttr:function(){return this.checked?this.value:!1},_setIconClassAttr:null,postMixInProperties:function(){this.inherited(arguments);this.checkedAttrSetting=this.checked?"checked":""},_fillContent:function(){},_onFocus:function(){this.id&&e("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},
  _onBlur:function(){this.id&&e("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)}})})},"dijit/form/_CheckBoxMixin":function(){define(["dojo/_base/declare","dojo/dom-attr","dojo/_base/event"],function(i,j,h){return i("dijit.form._CheckBoxMixin",null,{type:"checkbox",value:"on",readOnly:!1,_aria_attr:"aria-checked",_setReadOnlyAttr:function(g){this._set("readOnly",g);j.set(this.focusNode,"readOnly",g)},_setLabelAttr:void 0,_getSubmitValue:function(g){return!g&&0!==
  g?"on":g},_setValueAttr:function(g){g=this._getSubmitValue(g);this._set("value",g);j.set(this.focusNode,"value",g)},reset:function(){this.inherited(arguments);this._set("value",this.params.value||"on");j.set(this.focusNode,"value",this.value)},_onClick:function(g){return this.readOnly?(h.stop(g),!1):this.inherited(arguments)}})})},"url:dijit/form/templates/CheckBox.html":'<div class="dijit dijitReset dijitInline" role="presentation"\n\t><input\n\t \t${!nameAttrSetting} type="${type}" role="${type}" aria-checked="false" ${checkedAttrSetting}\n\t\tclass="dijitReset dijitCheckBoxInput"\n\t\tdata-dojo-attach-point="focusNode"\n\t \tdata-dojo-attach-event="onclick:_onClick"\n/></div>\n',
  "dijit/form/_RadioButtonMixin":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom-attr,dojo/_base/event,dojo/_base/lang,dojo/query,../registry".split(","),function(i,j,h,g,e,d,c){return j("dijit.form._RadioButtonMixin",null,{type:"radio",_getRelatedWidgets:function(){var b=[];d("input[type=radio]",this.focusNode.form||this.ownerDocument).forEach(e.hitch(this,function(d){d.name==this.name&&d.form==this.focusNode.form&&(d=c.getEnclosingWidget(d))&&b.push(d)}));return b},_setCheckedAttr:function(b){this.inherited(arguments);
  this._created&&b&&i.forEach(this._getRelatedWidgets(),e.hitch(this,function(b){b!=this&&b.checked&&b.set("checked",!1)}))},_getSubmitValue:function(b){return null===b?"on":b},_onClick:function(b){if(this.checked||this.disabled)return g.stop(b),!1;return this.readOnly?(g.stop(b),i.forEach(this._getRelatedWidgets(),e.hitch(this,function(b){h.set(this.focusNode||this.domNode,"checked",b.checked)})),!1):this.inherited(arguments)}})})},"dojox/form/Uploader":function(){define("dojo/_base/kernel,dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/_base/connect,dojo/_base/window,dojo/dom-style,dojo/dom-geometry,dojo/dom-attr,dojo/dom-construct,dojo/dom-form,dijit,dijit/form/Button,dojox/form/uploader/Base,dojo/i18n!./nls/Uploader,dojo/text!./resources/Uploader.html".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p){i.experimental("dojox.form.Uploader");j("dojox.form.Uploader",[m,r],{uploadOnSelect:!1,tabIndex:0,multiple:!1,label:l.label,url:"",name:"uploadedfile",flashFieldName:"",uploadType:"form",showInput:"",_nameIndex:0,templateString:p,baseClass:"dijitUploader "+r.prototype.baseClass,postMixInProperties:function(){this._inputs=[];this._cons=[];this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);c.set(this.domNode,{overflow:"hidden",position:"relative"});
  this._buildDisplay();f.set(this.titleNode,"tabIndex",-1)},_buildDisplay:function(){if(this.showInput)this.displayInput=dojo.create("input",{"class":"dijitUploadDisplayInput",tabIndex:-1,autocomplete:"off"},this.containerNode,this.showInput),this._attachPoints.push("displayInput"),this.connect(this,"onChange",function(a){for(var b=0,c,d=[];c=a[b++];)c&&c.name&&d.push(c.name);this.displayInput.value=d.join(", ")}),this.connect(this,"reset",function(){this.displayInput.value=""})},startup:function(){if(!this._buildInitialized)this._buildInitialized=
  !0,this._getButtonStyle(this.domNode),this._setButtonStyle(),this.inherited(arguments)},onChange:function(){},onBegin:function(){},onProgress:function(){},onComplete:function(){this.reset()},onCancel:function(){},onAbort:function(){},onError:function(){},upload:function(){},submit:function(a){a=a?a.tagName?a:this.getForm():this.getForm();this.upload(k.toObject(a))},reset:function(){delete this._files;this._disconnectButton();g.forEach(this._inputs,a.destroy,dojo);this._inputs=[];this._nameIndex=0;
  this._createInput()},getFileList:function(){var a=[];this.supports("multiple")?g.forEach(this._files,function(b,c){a.push({index:c,name:b.name,size:b.size,type:b.type})},this):g.forEach(this._inputs,function(b,c){b.value&&a.push({index:c,name:b.value.substring(b.value.lastIndexOf("\\")+1),size:0,type:b.value.substring(b.value.lastIndexOf(".")+1)})},this);return a},_getValueAttr:function(){return this.getFileList()},_setValueAttr:function(){console.error("Uploader value is read only")},_setDisabledAttr:function(a){this.disabled!=
  a&&this.inputNode&&(this.inherited(arguments),c.set(this.inputNode,"display",a?"none":""))},_getButtonStyle:function(a){this.btnSize={w:c.get(a,"width"),h:c.get(a,"height")}},_setButtonStyle:function(){this.inputNodeFontSize=Math.max(2,Math.max(Math.ceil(this.btnSize.w/60),Math.ceil(this.btnSize.h/15)));this._createInput()},_getFileFieldName:function(){return this.multiple&&this.supports("multiple")?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"")},_createInput:function(){this._inputs.length&&
  (c.set(this.inputNode,{top:"500px"}),this._disconnectButton(),this._nameIndex++);var b=this._getFileFieldName();this.focusNode=this.inputNode=a.create("input",{type:"file",name:b},this.domNode,"first");this.supports("multiple")&&this.multiple&&f.set(this.inputNode,"multiple",!0);this._inputs.push(this.inputNode);c.set(this.inputNode,{position:"absolute",fontSize:this.inputNodeFontSize+"em",top:"-3px",right:"-3px",opacity:0});this._connectButton()},_connectButton:function(){this._cons.push(e.connect(this.inputNode,
  "change",this,function(a){this._files=this.inputNode.files;this.onChange(this.getFileList(a));!this.supports("multiple")&&this.multiple&&this._createInput()}));if(-1<this.tabIndex)this.inputNode.tabIndex=this.tabIndex,this._cons.push(e.connect(this.inputNode,"focus",this,function(){this.titleNode.style.outline="1px dashed #ccc"})),this._cons.push(e.connect(this.inputNode,"blur",this,function(){this.titleNode.style.outline=""}))},_disconnectButton:function(){g.forEach(this._cons,e.disconnect);this._cons.splice(0,
  this._cons.length)}});dojox.form.UploaderOrg=dojox.form.Uploader;var q=[dojox.form.UploaderOrg];dojox.form.addUploaderPlugin=function(a){q.push(a);j("dojox.form.Uploader",q,{})};return dojox.form.Uploader})},"dojox/form/uploader/Base":function(){define("dojo/dom-form,dojo/dom-style,dojo/dom-construct,dojo/dom-attr,dojo/has,dojo/_base/declare,dojo/_base/event,dijit/_Widget,dijit/_TemplatedMixin,dijit/_WidgetsInTemplateMixin".split(","),function(i,j,h,g,e,d,c,b,f,a){e.add("FormData",function(){return!!window.FormData});
  e.add("xhr-sendAsBinary",function(){var a=window.XMLHttpRequest&&new window.XMLHttpRequest;return a&&!!a.sendAsBinary});e.add("file-multiple",function(){return!!{"true":1,"false":1}[g.get(document.createElement("input",{type:"file"}),"multiple")]});return d("dojox.form.uploader.Base",[b,f,a],{getForm:function(){if(!this.form)for(var a=this.domNode;a&&a.tagName&&a!==document.body;){if("form"==a.tagName.toLowerCase()){this.form=a;break}a=a.parentNode}return this.form},getUrl:function(){if(this.uploadUrl)this.url=
  this.uploadUrl;if(this.url)return this.url;if(this.getForm())this.url=this.form.action;return this.url},connectForm:function(){this.url=this.getUrl();if(!this._fcon&&this.getForm())this._fcon=!0,this.connect(this.form,"onsubmit",function(a){c.stop(a);this.submit(this.form)})},supports:function(a){switch(a){case "multiple":if("flash"==this.force||"iframe"==this.force)break;return e("file-multiple");case "FormData":return e(a);case "sendAsBinary":return e("xhr-sendAsBinary")}return!1},getMimeType:function(){return"application/octet-stream"},
  getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var b=Math.round(1E5*(a/1024))/1E5,c=Math.round(1E5*(a/1048576))/1E5,d=Math.round(1E5*(a/1073741824))/1E5,f=a;1<b&&(f=b.toFixed(1)+" kb");1<c&&(f=c.toFixed(1)+" mb");1<d&&(f=d.toFixed(1)+" gb");return{kb:b,mb:c,gb:d,bytes:a,value:f}}})})},"dijit/_WidgetsInTemplateMixin":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/parser"],function(i,j,h){return j("dijit._WidgetsInTemplateMixin",
  null,{_earlyTemplatedStartup:!1,widgetsInTemplate:!0,_beforeFillContent:function(){if(this.widgetsInTemplate){var g=this._startupWidgets=h.parse(this.domNode,{noStart:!this._earlyTemplatedStartup,template:!0,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,scope:"dojo"});if(!g.isFulfilled())throw Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");
  this._attachTemplateNodes(g,function(e,d){return e[d]})}},startup:function(){i.forEach(this._startupWidgets,function(g){g&&!g._started&&g.startup&&g.startup()});this.inherited(arguments)}})})},"url:dojox/form/resources/Uploader.html":'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><\!--no need to have this for Uploader \n\t<input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/--\></span>\n',
  "dojox/form/uploader/plugins/IFrame":function(){define("dojo/dom-construct,dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/io/iframe,dojox/form/uploader/plugins/HTML5".split(","),function(i,j,h,g,e){j=j("dojox.form.uploader.plugins.IFrame",[],{force:"",postMixInProperties:function(){this.inherited(arguments);if(!this.supports("multiple")||"iframe"==this.force)this.uploadType="iframe",this.upload=this.uploadIFrame},uploadIFrame:function(d){var c,b=!1;this.getForm()?c=this.form:(c=i.place('<form enctype="multipart/form-data" method="post"></form>',
  this.domNode),g.forEach(this._inputs,function(a){a.value&&c.appendChild(a)},this),b=!0);var f=this.getUrl();e.send({url:f,form:c,handleAs:"json",content:d,method:"POST",error:h.hitch(this,function(a){b&&i.destroy(c);this.onError(a)}),load:h.hitch(this,function(a){b&&i.destroy(c);if(a.ERROR||a.error)this.onError(a);else this.onComplete(a)})})}});dojox.form.addUploaderPlugin(j);return j})},"dojo/io/iframe":function(){define("../_base/config,../_base/json,../_base/kernel,../_base/lang,../_base/xhr,../sniff,../_base/window,../dom,../dom-construct,../query,require,../aspect,../request/iframe".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r){h.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");var d=r._iframeName,d=d.substring(0,d.lastIndexOf("_")),m=g.delegate(r,{create:function(){return m._frame=r.create.apply(r,arguments)},get:null,post:null,send:function(a){var c,d=e._ioSetArgs(a,function(){c&&c.cancel()},function(a){var b=null,a=a.ioArgs;try{var d=a.handleAs;"xml"===d||"html"===d?b=c.response.data:(b=c.response.text,"json"===d?b=j.fromJson(b):"javascript"===d&&(b=h.eval(b)))}catch(f){b=
  f}return b},function(a,b){b.ioArgs._hasError=!0;return a}),f=d.ioArgs,g="GET",k=b.byId(a.form);a.method&&"POST"===a.method.toUpperCase()&&k&&(g="POST");a={method:g,handleAs:"json"===a.handleAs||"javascript"===a.handleAs?"text":a.handleAs,form:a.form,query:k?null:a.content,data:k?a.content:null,timeout:a.timeout,ioArgs:f};if(a.method)a.method=a.method.toUpperCase();if(i.ioPublish&&h.publish&&!1!==f.args.ioPublish)var m=n.after(r,"_notifyStart",function(a){a.options.ioArgs===f&&(m.remove(),e._ioNotifyStart(d))},
  !0);c=r(f.url,a,!0);f._callNext=c._callNext;c.then(function(){d.resolve(d)}).otherwise(function(a){d.ioArgs.error=a;d.reject(a)});return d},_iframeOnload:c.global[d+"_onload"]});g.setObject("dojo.io.iframe",m);return m})},"dojo/request/iframe":function(){define("module,require,./watch,./util,./handlers,../_base/lang,../io-query,../query,../has,../dom,../dom-construct,../_base/window".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n){function r(){return!this.isFulfilled()}function m(){return!!this._finished}
  function l(a,c){if(!c)try{var f=a.options,g=q.doc(q._frame),h=f.handleAs;if("html"!==h){if("xml"===h)if("html"===g.documentElement.tagName.toLowerCase()){b("a",g.documentElement).orphan();var k=g.documentElement.innerText,k=k.replace(/>\s+</g,"><");a.text=d.trim(k)}else a.data=g;else a.text=g.getElementsByTagName("textarea")[0].value;e(a)}else a.data=g}catch(i){c=i}c?this.reject(c):this._finished?this.resolve(a):this.reject(Error("Invalid dojo/request/iframe request state"))}function p(){this._callNext()}
  function q(a,b,c){var d=g.parseArgs(a,g.deepCreate(v,b),!0),a=d.url,b=d.options;if("GET"!==b.method&&"POST"!==b.method)throw Error(b.method+" not supported by dojo/request/iframe");if(!q._frame)q._frame=q.create(q._iframeName,u+"();");a=g.deferred(d,null,r,m,l,p);a._callNext=function(){if(!this._calledNext)this._calledNext=!0,q._currentDfd=null,q._fireNextRequest()};a._legacy=c;q._dfdQueue.push(a);q._fireNextRequest();h(a);return c?a:a.promise}var s=i.id.replace(/[\/\.\-]/g,"_"),u=s+"_onload";n.global[u]||
  (n.global[u]=function(){var b=q._currentDfd;if(b){var c=a.byId(b.response.options.form)||b._tmpForm;if(c){for(var d=b._contentToClean,f=0;f<d.length;f++)for(var e=d[f],g=0;g<c.childNodes.length;g++){var h=c.childNodes[g];if(h.name===e){k.destroy(h);break}}b._originalAction&&c.setAttribute("action",b._originalAction);if(b._originalMethod)c.setAttribute("method",b._originalMethod),c.method=b._originalMethod;if(b._originalTarget)c.setAttribute("target",b._originalTarget),c.target=b._originalTarget}b._tmpForm&&
  (k.destroy(b._tmpForm),delete b._tmpForm);b._finished=!0}else q._fireNextRequest()});var v={method:"POST"};q.create=function(a,b,c){if(n.global[a])return n.global[a];if(n.global.frames[a])return n.global.frames[a];c||(f("config-useXDomain")&&!f("config-dojoBlankHtmlUrl")&&console.warn("dojo/request/iframe: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set dojoConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),c=f("config-dojoBlankHtmlUrl")||
  j.toUrl("dojo/resources/blank.html"));b=k.place('<iframe id="'+a+'" name="'+a+'" src="'+c+'" onload="'+b+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',n.body());return n.global[a]=b};q.doc=function(a){if(a.contentDocument)return a.contentDocument;var b=a.name;if(b){var c=n.doc.getElementsByTagName("iframe");if(a.document&&c[b].contentWindow&&c[b].contentWindow.document)return c[b].contentWindow.document;if(n.doc.frames[b]&&n.doc.frames[b].document)return n.doc.frames[b].document}return null};
  q.setSrc=function(a,b,c){a=n.global.frames[a.name];if(a.contentWindow)a=a.contentWindow;try{c?a.location.replace(b):a.location=b}catch(d){}};q._iframeName=s+"_IoIframe";q._notifyStart=function(){};q._dfdQueue=[];q._currentDfd=null;q._fireNextRequest=function(){var b;try{if(!q._currentDfd&&q._dfdQueue.length){do b=q._currentDfd=q._dfdQueue.shift();while(b&&(b.canceled||b.isCanceled&&b.isCanceled())&&q._dfdQueue.length);if(!b||b.canceled||b.isCanceled&&b.isCanceled())q._currentDfd=null;else{var f=b.response,
  e=f.options,h=b._contentToClean=[],i=a.byId(e.form),l=g.notify,j=e.data||null,m;!b._legacy&&"POST"===e.method&&!i?i=b._tmpForm=k.create("form",{name:s+"_form",style:{position:"absolute",top:"-1000px",left:"-1000px"}},n.body()):"GET"===e.method&&i&&-1<f.url.indexOf("?")&&(m=f.url.slice(f.url.indexOf("?")+1),j=d.mixin(c.queryToObject(m),j));if(i){if(!b._legacy){var p=i;do p=p.parentNode;while(p!==n.doc.documentElement);if(!p)i.style.position="absolute",i.style.left="-1000px",i.style.top="-1000px",n.body().appendChild(i);
  if(!i.name)i.name=s+"_form"}if(j){var p=function(a,b){k.create("input",{type:"hidden",name:a,value:b},i);h.push(a)},r;for(r in j){var u=j[r];if(d.isArray(u)&&1<u.length)for(m=0;m<u.length;m++)p(r,u[m]);else i[r]?i[r].value=u:p(r,u)}}var v=i.getAttributeNode("action"),z=i.getAttributeNode("method"),F=i.getAttributeNode("target");if(f.url)b._originalAction=v?v.value:null,v?v.value=f.url:i.setAttribute("action",f.url);if(b._legacy){if(!z||!z.value)mthdNode?mthdNode.value=e.method:fn.setAttribute("method",
  e.method)}else b._originalMethod=z?z.value:null,z?z.value=e.method:i.setAttribute("method",e.method);b._originalTarget=F?F.value:null;F?F.value=q._iframeName:i.setAttribute("target",q._iframeName);i.target=q._iframeName;l&&l.emit("send",f,b.promise.cancel);q._notifyStart(f);i.submit()}else{e="";if(f.options.data)e=f.options.data,"string"!==typeof e&&(e=c.objectToQuery(e));p=f.url+(-1<f.url.indexOf("?")?"&":"?")+e;l&&l.emit("send",f,b.promise.cancel);q._notifyStart(f);q.setSrc(q._frame,p,!0)}}}}catch(H){b.reject(H)}};
  g.addCommonMethods(q,["GET","POST"]);return q})},"dojox/form/uploader/plugins/HTML5":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo"],function(i,j,h,g){i=i("dojox.form.uploader.plugins.HTML5",[],{errMsg:"Error uploading files. Try checking permissions",uploadType:"html5",postCreate:function(){this.connectForm();this.inherited(arguments);this.uploadOnSelect&&this.connect(this,"onChange",function(e){this.upload(e[0])})},_drop:function(e){g.stopEvent(e);this._files=
  e.dataTransfer.files;this.onChange(this.getFileList())},upload:function(e){this.onBegin(this.getFileList());this.supports("FormData")?this.uploadWithFormData(e):this.supports("sendAsBinary")&&this.sendAsBinary(e)},addDropTarget:function(e,d){d||(this.connect(e,"dragenter",g.stopEvent),this.connect(e,"dragover",g.stopEvent),this.connect(e,"dragleave",g.stopEvent));this.connect(e,"drop","_drop")},sendAsBinary:function(e){if(this.getUrl()){var d="---------------------------"+(new Date).getTime(),c=this.createXhr();
  c.setRequestHeader("Content-Type","multipart/form-data; boundary="+d);if(e=this._buildRequestBody(e,d))c.sendAsBinary(e);else this.onError(this.errMsg)}else console.error("No upload url found.",this)},uploadWithFormData:function(e){if(this.getUrl()){var d=new FormData,c=this._getFileFieldName();h.forEach(this._files,function(b){d.append(c,b)},this);if(e)for(var b in e)d.append(b,e[b]);this.createXhr().send(d)}else console.error("No upload url found.",this)},_xhrProgress:function(e){if(e.lengthComputable){var d=
  {bytesLoaded:e.loaded,bytesTotal:e.total,type:e.type,timeStamp:e.timeStamp};"load"==e.type?(d.percent="100%",d.decimal=1):(d.decimal=e.loaded/e.total,d.percent=Math.ceil(100*(e.loaded/e.total))+"%");this.onProgress(d)}},createXhr:function(){var e=new XMLHttpRequest,d;e.upload.addEventListener("progress",j.hitch(this,"_xhrProgress"),!1);e.addEventListener("load",j.hitch(this,"_xhrProgress"),!1);e.addEventListener("error",j.hitch(this,function(c){this.onError(c);clearInterval(d)}),!1);e.addEventListener("abort",
  j.hitch(this,function(c){this.onAbort(c);clearInterval(d)}),!1);e.onreadystatechange=j.hitch(this,function(){4===e.readyState&&(clearInterval(d),this.onComplete(JSON.parse(e.responseText.replace(/^\{\}&&/,""))))});e.open("POST",this.getUrl());d=setInterval(j.hitch(this,function(){}),250);return e},_buildRequestBody:function(e,d){var c="",d="--"+d,b=[],f=this._files,a=this._getFileFieldName();h.forEach(f,function(f,e){var g=f.fileName,h;try{h=f.getAsBinary()+"\r\n",c+=d+"\r\n",c+="Content-Disposition: form-data; ",
  c+='name="'+a+'"; ',c+='filename="'+g+'"\r\n',c+="Content-Type: "+this.getMimeType()+"\r\n\r\n",c+=h}catch(k){b.push({index:e,name:g})}},this);b.length&&b.length>=f.length&&(this.onError({message:this.errMsg,filesInError:b}),c=!1);if(!c)return!1;if(e)for(var g in e)c+=d+"\r\n",c+="Content-Disposition: form-data; ",c+='name="'+g+'"\r\n\r\n',c+=e[g]+"\r\n";return c+=d+"--\r\n"}});dojox.form.addUploaderPlugin(i);return i})},"dojo/main":function(){define("./_base/kernel,./has,require,./sniff,./_base/lang,./_base/array,./_base/config,./ready,./_base/declare,./_base/connect,./_base/Deferred,./_base/json,./_base/Color,./has!dojo-firebug?./_firebug/firebug,./_base/browser,require".split(","),
  function(i,j,h,g,e,d,c,b){c.isDebug&&h(["./_firebug/firebug"]);var f=c.require;f&&(f=d.map(e.isArray(f)?f:[f],function(a){return a.replace(/\./g,"/")}),i.isAsync?h(f):b(1,function(){h(f)}));return i})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready,./kernel,./connect,./unload,./window,./event,./html,./NodeList,../query,./xhr,./fx".split(","),function(i){return i})},"JBrowse/View/FileDialog/TrackList/BAMDriver":function(){define(["dojo/_base/declare",
  "./_IndexedFileDriver"],function(i,j){return i(j,{name:"BAM",storeType:"JBrowse/Store/SeqFeature/BAM",fileExtension:"bam",fileConfKey:"bam",fileUrlConfKey:"urlTemplate",indexExtension:"bai",indexConfKey:"bai",indexUrlConfKey:"baiUrlTemplate"})})},"JBrowse/View/FileDialog/TrackList/_IndexedFileDriver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(i,j,h,g){var e=0;return i(null,{tryResource:function(d,c){if(c.type==this.fileExtension){var b=
  j.basename(c.file?c.file.name:c.url?c.url:"");if(!b)return!1;for(var f in d){var a=d[f];if(j.basename(a[this.indexConfKey]?a[this.indexConfKey].url||a[this.indexConfKey].blob.name:a[this.indexUrlConfKey],"."+this.indexExtension)==b)return a[this.fileConfKey]=this._makeBlob(c),!0}b=j.basename(b,"."+this.fileExtension);for(f in d)if(a=d[f],j.basename(a[this.indexConfKey]?a[this.indexConfKey].url||a[this.indexConfKey].blob.name:a[this.indexUrlConfKey],"."+this.indexExtension)==b)return a[this.fileConfKey]=
  this._makeBlob(c),!0;f=this.name+"_"+b+"_"+e++;d[f]={type:this.storeType,name:f,fileBasename:b};d[f][this.fileConfKey]=this._makeBlob(c);return!0}if(c.type==this.indexExtension){b=j.basename(c.file?c.file.name:c.url?c.url:"","."+this.indexExtension);if(!b)return!1;for(f in d)if(a=d[f],j.basename(a[this.fileConfKey]?a[this.fileConfKey].url||a[this.fileConfKey].blob.name:a[this.fileUrlConfKey])==b)return a[this.indexConfKey]=this._makeBlob(c),!0;for(f in d)if(a=d[f],j.basename(a[this.fileConfKey]?a[this.fileConfKey].url||
  a[this.fileConfKey].blob.name:a[this.fileUrlConfKey],"."+this.fileExtension)==b)return a[this.indexConfKey]=this._makeBlob(c),!0;f=this.name+"_"+j.basename(b,"."+this.fileExtension)+"_"+e++;d[f]={name:f,type:this.storeType};d[f][this.indexConfKey]=this._makeBlob(c);return!0}return!1},finalizeConfiguration:function(d){var c={},b=0,f={},a=0,e;for(e in d){var g=d[e];if((g.bai||g[this.indexUrlConfKey])&&!g.bam&&!g[this.fileUrlConfKey])b++,c[e]=g;else if((g.bam||g[this.fileUrlConfKey])&&!g.bai&&!g[this.indexUrlConfKey])a++,
  f[e]=g}if(1==a&&1==b)for(var h in c)for(var i in f){c[h][this.indexUrlConfKey]&&(f[i][this.indexUrlConfKey]=c[h][this.indexUrlConfKey]);if(c[h].bai)f[i].bai=c[h].bai;delete d[h]}for(h in c)delete d[h];for(i in f)d[i][this.fileUrlConfKey]||delete d[i]},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return(d[this.fileConfKey]||d[this.fileUrlConfKey])&&(d[this.indexConfKey]||d[this.indexUrlConfKey]||d[this.fileUrlConfKey])}})})},
  "JBrowse/Model/FileBlob":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/has","JBrowse/Util/TextIterator"],function(i,j,h,g){var e=i(null,{constructor:function(d){this.blob=d;this.totalSize=this.size=d.size},slice:function(d,c){var b=this.blob.mozSlice||this.blob.slice||this.blob.webkitSlice;return new e(c?b.call(this.blob,d,d+c):b.call(this.blob,d))},fetchLines:function(d,c,b){this.fetch(function(b){for(var b=new Uint8Array(b),b=new g.FromBytes({bytes:b,returnPartialRecord:!this.end}),
  a;a=b.getline();)d(a);c()},b)},readLines:function(d,c,b,f,a){var e=0!=d;this.slice(d,c).fetchLines(function(){e||b();e=!1},f,a)},read:function(d,c,b,f){this.slice(d,c).fetch(b,f)},fetch:function(d){var c=this,b=new FileReader;b.onloadend=function(){d(c._stringToBuffer(b.result))};b.readAsBinaryString(this.blob)},_stringToBuffer:function(d){if(!d||!h("typed-arrays"))return null;for(var c=new Uint8Array(d.length),b=0;b<c.length;b++)c[b]=d.charCodeAt(b);return c.buffer}});return e})},"JBrowse/Util/TextIterator":function(){define([],
  function(){var i=function(i){this.bytes=i.bytes;this.offset=i.offset||0;this.length=i.length||this.bytes.length;this._recordSeparator=(i.inputRecordSeparator||"\n").charCodeAt(0);this.returnPartialRecord=i.returnPartialRecord};i.prototype.getOffset=function(){return this.offset};i.prototype.getline=function(){for(var i=this.bytes,h=this.offset,g=[];h<this.length;){var e=i[h],d,c;if(128>e){if(g.push(String.fromCharCode(e)),h++,e==this._recordSeparator)return this.offset=h,g.join("")}else 191<e&&224>
  e?(d=i[h+1],g.push(String.fromCharCode((e&31)<<6|d&63)),h+=2):(d=i[h+1],c=i[h+2],g.push(String.fromCharCode((e&15)<<12|(d&63)<<6|c&63)),h+=3)}this.offset=h;return this.returnPartialRecord?g.join(""):null};return{FromBytes:i}})},"JBrowse/Model/XHRBlob":function(){define(["dojo/_base/declare","JBrowse/Model/FileBlob","JBrowse/Store/RemoteBinaryFile"],function(i,j,h){var g=new h({name:"XHRBlob",maxSize:1E8}),e=i(j,{constructor:function(d,c,b,f){f||("object"===typeof c?(f=c,c=void 0):f={});this.url=d;
  this.start=c||0;if(b)this.end=b;this.opts=f},slice:function(d,c){var b=this.start,f=this.end,b=b&&d?b+d:d||b;return new e(this.url,b,c&&b?b+c-1:f||c-1,this.opts)},fetch:function(d,c){g.get({url:this.url,start:this.start,end:this.end,success:d,failure:c})},read:function(d,c,b,f){d=this.start+d;g.get({url:this.url,start:d,end:d+c,success:b,failure:f})}});return e})},"JBrowse/Store/RemoteBinaryFile":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,JBrowse/has,JBrowse/Util,JBrowse/Store/LRUCache,jszlib/arrayCopy".split(","),
  function(i,j,h,g,e,d,c){var b=e.fastDeclare({constructor:function(b){j.mixin(this,b)},toString:function(){return this.url+" (bytes "+this.start+".."+this.end+")"},toUniqueString:function(){return this.url+" (bytes "+this.start+".."+this.end+")"}});return i(null,{constructor:function(b){this.name=b.name;this._arrayCopyCount=this._fetchCount=0;this.minChunkSize="minChunkSize"in b?b.minChunkSize:32768;this.chunkCache=new d({name:b.name+" chunk cache",fillCallback:dojo.hitch(this,"_fetch"),maxSize:b.maxSize||
  1E7});this.totalSizes={}},_escapeRegExp:function(b){return b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},_relevantExistingChunks:function(b,a,c){if(!c)return[];a=a||0;b=this.chunkCache.query(RegExp("^"+this._escapeRegExp(b+" (bytes")));h.forEach(b,function(a){if(a.size){if(!a.key.start)a.key.start=0;if(!a.key.end)a.key.end=a.key.start+(a.size||a.value.byteLength)}});b=b.sort(function(a,b){return a.key.start-b.key.start||b.key.end-b.key.start-(a.key.end-a.key.start)});return h.filter(b,
  function(b){return!(b.key.start>c||b.key.end<a)},this)},_fetchChunks:function(c,a,d,e,g){a=a||0;"number"!=typeof d&&this.totalSizes[c]?d=this.totalSizes[c]-1:d>=this.totalSizes[c]&&(d=this.totalSizes[c]-1);var i=this._relevantExistingChunks(c,a,d);this._log("existing",i);var l=[];if("number"!=typeof d)l.push({key:new b({url:c,start:0,end:void 0})});else for(;a<=d;a=l[l.length-1].key.end+1)i[0]&&i[0].key.start<=a?l.push(i.shift()):l.push({key:new b({url:c,start:a,end:i[0]?i[0].key.start-1:d})});h.forEach(l,
  function(a){if(!a.value&&(a=a.key,a.start=Math.floor(a.start/this.minChunkSize)*this.minChunkSize,a.end))a.end=Math.ceil((a.end+1)/this.minChunkSize)*this.minChunkSize-1},this);var l=this._optimizeGoldenPath(l),j=h.filter(l,function(a){return!a.value});this._log("needed",j);if(j.length){var q=0;h.forEach(j,function(a){this.chunkCache.get(a.key,function(b,c){a.value=b;c?g(c):++q==j.length&&e(l)})},this)}else e(l)},_optimizeGoldenPath:function(b){for(var a=[b[0]],c=1;c<b.length;c++){var d=b[c],e=a[a.length-
  1];d.value?d.key.end>e.key.end&&a.push(d):e.value?a.push(d):e.key.end=d.key.end}return a},_fetch:function(b,a,c,d){this._log("fetch",b.url,b.start,b.end);this._fetchCount++;var c=c||1,e=new XMLHttpRequest,h,i=b.url;g("safari")&&b.end&&(i=i+(-1<i.indexOf("?")?"&":"?")+"safari_range="+b.start+"-"+b.end);e.open("GET",i,!0);e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined");b.end&&(e.setRequestHeader("Range","bytes="+b.start+"-"+b.end),h=b.end-b.start+1);e.responseType="arraybuffer";
  var j=function(c){if(c){if(!b.start)b.start=0;if(!b.end)b.end=b.start+c.byteLength}var d=/no-cache/.test(e.getResponseHeader("Cache-Control"))||/no-cache/.test(e.getResponseHeader("Pragma"));a(c,null,{nocache:d})};e.onreadystatechange=dojo.hitch(this,function(){if(4==e.readyState)if(200==e.status||206==e.status){this.totalSizes[b.url]=function(){var a=e.getResponseHeader("Content-Range");if(a)return(a=a.match(/\/(\d+)$/))?parseInt(a[1]):void 0}();var g=e.response||e.mozResponseArrayBuffer||function(){try{var g=
  e.responseText;h&&h!=g.length&&(!d||g.length!=d)?3==c?a(null,this._errorString(e,i)):this._fetch(b,a,c+1,g.length):j(this._stringToBuffer(e.responseText))}catch(q){console.error(""+q,q.stack,q),j(new ArrayBuffer)}}.call(this);g&&j(g)}else if(3==c)a(null,this._errorString(e,i));else return this._fetch(b,a,c+1);return null});e.send("")},_errorString:function(b,a){return b.status?b.status+" ("+b.statusText+") when attempting to fetch "+a:"Unable to fetch "+a},get:function(b){if(g("typed-arrays")){this._log("get",
  b.url,b.start,b.end);var a=b.start||0,c=b.end;if(a&&!c)throw"cannot specify a fetch start without a fetch end";if(0>a)throw"start cannot be negative!";if(0>c)throw"end cannot be negative!";if(!b.success)throw Error("success callback required");if(!b.failure)throw Error("failure callback required");this._fetchChunks(b.url,a,c,dojo.hitch(this,function(d){var e=this.totalSizes[b.url];this._assembleChunks(a,c,function(a){if("number"==typeof e)a.fileSize=e;try{b.success.call(this,a)}catch(c){console.error(""+
  c,c.stack,c),b.failure&&b.failure(c)}},b.failure,d)}),b.failure)}else(b.failure||function(a){console.error(a)})("This web browser lacks support for JavaScript typed arrays.")},_assembleChunks:function(b,a,d,e,i){this._log("golden path",i);var j;if(g("typed-arrays")){if(1==i.length&&i[0].key.start==b&&(!a||i[0].key.end==a))j=i[0].value;else{e=Math.max.apply(Math,h.map(i,function(a){return a.key.start+((a.value||{}).byteLength||0)-1}));a&&(e=Math.min(e,a));var l=e-b+1;j=new Uint8Array(l);var p=0;h.forEach(i,
  function(a){if(a.value&&a.value.byteLength){var d=new Uint8Array(a.value),a=b+p-a.key.start;0>a&&this._error("chunking error");var e=Math.min(d.byteLength-a,l-p);this._log("arrayCopy",d,a,j,p,e);c(d,a,j,p,e);this._arrayCopyCount++;p+=e}},this);j=j.buffer}d(j)}else e("Web browser does not support typed arrays")},_stringToBuffer:function(b){if(!b||"function"!=typeof Uint8Array)return null;for(var a=new Uint8Array(b.length),c=0;c<a.length;c++)a[c]=b.charCodeAt(c);return a.buffer},_log:function(){},_warn:function(){console.warn.apply(console,
  this._logf.apply(this,arguments))},_error:function(){console.error.apply(console,this._logf.apply(this,arguments));throw"file error";},_logf:function(){arguments[0]=this.name+" "+arguments[0];if("string"==typeof arguments[0])for(;15>arguments[0].length;)arguments[0]+=" ";return arguments}})})},"JBrowse/Store/LRUCache":function(){define(["dojo/_base/declare","dojo/_base/array","JBrowse/Util","JBrowse/Digest/Crc32"],function(i,j,h,g){return i(null,{constructor:function(e){this.fill=e.fillCallback;this.maxSize=
  e.maxSize||1E6;this.verbose=e.verbose;this.name=e.name||"LRUcache";this._size=e.sizeFunction||this._size;this._keyString=e.keyFunction||this._keyString;this.size=this.itemCount=0;this._cacheByKey={};this._cacheNewest=this._cacheOldest=null;this._inProgressFills={}},get:function(e,d){var c=this._keyString(e),b=this._cacheByKey[c];b?(this._log("hit",c),this.touchRecord(b),window.setTimeout(function(){d(b.value)},1)):(this._log("miss",c),this._attemptFill(e,c,d))},query:function(e){var d=[],c=this._cacheByKey,
  b;for(b in c)e.test(b)&&c.hasOwnProperty(b)&&d.push(c[b]);return d},forEach:function(e,d){d||(d=this);for(var c=0,b=this._cacheNewest;b;b=b.next)e.call(d,b,c++)},some:function(e,d){d||(d=this);for(var c=0,b=this._cacheNewest;b;b=b.next)if(e.call(d,b,c++))return!0;return!1},touch:function(e){this.touchRecord(this._cacheByKey[this._keyString(e)])},touchRecord:function(e){e&&this._cacheNewest!==e&&(this._llRemove(e),this._llPush(e))},_llRemove:function(e){if(e.prev)e.prev.next=e.next;if(e.next)e.next.prev=
  e.prev;if(this._cacheNewest===e)this._cacheNewest=e.prev;if(this._cacheOldest===e)this._cacheOldest=e.next;e.prev=null;e.next=null},_llPush:function(e){if(this._cacheNewest)this._cacheNewest.next=e,e.prev=this._cacheNewest;this._cacheNewest=e;if(!this._cacheOldest)this._cacheOldest=e},_attemptFill:function(e,d,c){if(this.fill){var b=this._inProgressFills[d]=this._inProgressFills[d]||{callbacks:[],running:!1};b.callbacks.push(c);if(!b.running)b.running=!0,this.fill(e,dojo.hitch(this,function(a,b,c,
  d,f,e){delete this._inProgressFills[a];c.running=!1;if(d&&(!e||!e.nocache))this._log("fill",a),this.set(b,d);j.forEach(c.callbacks,function(a){try{a.call(this,d,f)}catch(b){console.error(""+b,b.stack,b)}},this)},d,e,b))}else try{c(void 0)}catch(f){console.error(f)}},set:function(e,d){var c=this._keyString(e);if(!this._cacheByKey[c]){var b={value:d,key:e,keyString:c,size:this._size(d)};b.size>this.maxSize?this._warn("cannot fit",c,"("+h.addCommas(b.size)+" > "+h.addCommas(this.maxSize)+")"):(this._log("set",
  c,b,this.size),this._prune(b.size),this._cacheByKey[c]=b,this._llPush(b),this.size+=b.size,this.itemCount++)}},_keyString:function(e){return"object"==typeof e&&"function"==typeof e.toUniqueString?e.toUniqueString():g.objectFingerprint(e)},_size:function(e){var d=typeof e;if("object"==d&&null!==d){d=typeof e.size;if("number"==d)return d;if("function"==d)return e.size();if(e.byteLength)return e.byteLength;var d=0,c;for(c in e)e.hasOwnProperty(c)&&(d+=this._size(e[c]));return d}return"string"==d?e.length:
  1},_prune:function(e){for(;this.size+(e||0)>this.maxSize;){var d=this._cacheOldest;if(d)this._log("evict",d),this._llRemove(d),delete this._cacheByKey[d.keyString],delete d.next,delete d.prev,this.itemCount--,this.size-=d.size;else{this._error("eviction error",this.size,e,this);break}}},_log:function(){this.verbose&&console.log.apply(console,this._logf.apply(this,arguments))},_warn:function(){console.warn.apply(console,this._logf.apply(this,arguments))},_error:function(){console.error.apply(console,
  this._logf.apply(this,arguments))},_logf:function(){arguments[0]=this.name+" "+arguments[0];if("string"==typeof arguments[0])for(;15>arguments[0].length;)arguments[0]+=" ";return arguments}})})},"JBrowse/Digest/Crc32":function(){define([],function(){var i={crc32Table:"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D",
  stringToBytes:function(i){for(var h,g,e=[],d=0;d<i.length;d++){h=i.charCodeAt(d);g=[];do g.push(h&255),h>>=8;while(h);e=e.concat(g.reverse())}return e},crc32:function(j,h){var g=i.stringToBytes(j);h==window.undefined&&(h=0);for(var e=0,e=0,d=i.crc32Table,h=h^-1,c=0,b=g.length;c<b;c++)e=(h^g[c])&255,e="0x"+d.substr(9*e,8),h=h>>>8^e;h^=-1;0>h&&(h+=4294967296);return h},objectFingerprint:function(j){var h=0;if("object"==typeof j)for(var g in j)h=i.crc32(""+i.objectFingerprint(g),h),h=i.crc32(""+i.objectFingerprint(j[g]),
  h);else h=i.crc32(""+j,h);return h}};return i})},"jszlib/arrayCopy":function(){define([],function(){try{new Uint8Array(1)}catch(i){}return function(i,h,g,e,d){if(0!=d){if(i){if(!g)throw"Undef dest";}else throw"Undef src";if(0==h&&d==i.length)g.set(i,e);else if(i.subarray)i=i.subarray(h,h+d),g.set(i,e);else if(1==i.BYTES_PER_ELEMENT&&100<d)i=new Uint8Array(i.buffer,i.byteOffset+h,d),g.set(i,e);else for(var c=0;c<d;++c)g[e+c]=i[h+c]}}})},"JBrowse/View/FileDialog/TrackList/BigWigDriver":function(){define(["dojo/_base/declare",
  "JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(i,j,h,g){var e=0;return i(null,{storeType:"JBrowse/Store/SeqFeature/BigWig",tryResource:function(d,c){if("bigwig"==c.type){var b=j.basename(c.file?c.file.name:c.url?c.url:"",[".bw",".bigwig"]);if(!b)return!1;var f="BigWig_"+b+"_"+e++;d[f]={fileBasename:b,type:this.storeType,blob:this._makeBlob(c),name:f};return!0}return!1},finalizeConfiguration:function(){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;
  if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/GFF3Driver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(i,j,h,g){var e=0;return i(null,{storeType:"JBrowse/Store/SeqFeature/GFF3",tryResource:function(d,c){if("gff3"==c.type){var b=j.basename(c.file?c.file.name:c.url?c.url:"",[".gff3",".gff"]);if(!b)return!1;var f="GFF3_"+b+"_"+e++;d[f]={type:this.storeType,
  fileBasename:b,blob:this._makeBlob(c),name:f};return!0}return!1},finalizeConfiguration:function(){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/GTFDriver":function(){define(["dojo/_base/declare","JBrowse/Util","JBrowse/Model/FileBlob","JBrowse/Model/XHRBlob"],function(i,j,h,g){var e=0;return i(null,{storeType:"JBrowse/Store/SeqFeature/GTF",
  tryResource:function(d,c){if("gtf"==c.type){var b=j.basename(c.file?c.file.name:c.url?c.url:"");if(!b)return!1;b="GTF_"+b+"_"+e++;d[b]={type:this.storeType,blob:this._makeBlob(c),name:b};return!0}return!1},finalizeConfiguration:function(){},_makeBlob:function(d){d=d.file?new h(d.file):d.url?new g(d.url):null;if(!d)throw"unknown resource type";return d},confIsValid:function(d){return d.blob||d.urlTemplate}})})},"JBrowse/View/FileDialog/TrackList/VCFTabixDriver":function(){define(["dojo/_base/declare",
  "./_IndexedFileDriver"],function(i,j){return i(j,{name:"VCF+Tabix",storeType:"JBrowse/Store/SeqFeature/VCFTabix",fileExtension:"vcf.gz",fileConfKey:"file",fileUrlConfKey:"urlTemplate",indexExtension:"tbi",indexConfKey:"tbi",indexUrlConfKey:"tbiUrlTemplate"})})},"JBrowse/View/FileDialog/ResourceList":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/dom-construct","dijit/form/Select"],function(i,j,h,g){return i(null,{constructor:function(e){this.dialog=e.dialog;this.domNode=h.create("div",
  {className:"resourceList"});this._updateView()},clearLocalFiles:function(){this._resources=j.filter(this._resources||[],function(e){return!e.file});this._notifyChange()},_notifyChange:function(){this.onChange(j.map(this._resources||[],function(e){var d={};if(e.file)d.file=e.file;if(e.url)d.url=e.url;d.type=e.type.get("value");return d}))},_addResources:function(e){var d={},e=(this._resources||[]).concat(e);this._resources=j.filter(e.reverse(),function(c){c=c.file&&c.file.name||c.url;return d[c]?!1:
  d[c]=!0}).reverse();this._updateView();this._notifyChange()},addLocalFiles:function(e){this._addResources(j.map(e,function(d){return{file:d}}))},clearURLs:function(){this._resources=j.filter(this._resources||[],function(e){return!e.url});this._notifyChange()},addURLs:function(e){this._addResources(j.map(e,function(d){return{url:d}}))},onChange:function(){},_updateView:function(){var e=this.domNode;h.empty(e);h.create("h3",{innerHTML:"Files and URLs"},e);if((this._resources||[]).length){var d=h.create("table",
  {},e);j.forEach(this._resources,function(c){var b=this,f=h.create("tr",{},d),a=c.url||c.file.name,e=new g({options:[{label:'<span class="ghosted">file type?</span>',value:null},{label:"GFF3",value:"gff3"},{label:"GTF",value:"gtf"},{label:"BigWig",value:"bigwig"},{label:"BAM",value:"bam"},{label:"BAM index",value:"bai"},{label:"VCF+bgzip",value:"vcf.gz"},{label:"Tabix index",value:"tbi"}],value:this.guessType(a),onChange:function(){b._rememberedTypes=b._rememberedTypes||{};b._rememberedTypes[a]=this.get("value");
  b._notifyChange()}});e.placeAt(dojo.create("td",{width:"4%"},f));c.type=e;dojo.create("td",{width:"1%",innerHTML:'<div class="'+(c.file?"dijitIconFile":"jbrowseIconLink")+'"></div>'},f);dojo.create("td",{innerHTML:a},f);dojo.create("td",{width:"1%",innerHTML:'<div class="dijitIconDelete"></div>',onclick:function(a){a.preventDefault&&a.preventDefault();b.deleteResource(c)}},f)},this)}else h.create("div",{className:"emptyMessage",innerHTML:"Add files and URLs using the controls above."},e);h.create("div",
  {className:"connector",innerHTML:"&nbsp;"},e)},deleteResource:function(e){this._resources=j.filter(this._resources||[],function(d){return d!==e});this._updateView();this._notifyChange()},guessType:function(e){return(this._rememberedTypes||{})[e]||(/\.bam$/i.test(e)?"bam":/\.bai$/i.test(e)?"bai":/\.gff3?$/i.test(e)?"gff3":/\.gtf?$/i.test(e)?"gtf":/\.(bw|bigwig)$/i.test(e)?"bigwig":/\.vcf\.gz$/i.test(e)?"vcf.gz":/\.tbi$/i.test(e)?"tbi":null)}})})},"JBrowse/View/FileDialog/TrackList":function(){define("dojo/_base/declare,dojo/_base/array,dojo/dom-construct,JBrowse/Util,dijit/form/TextBox,dijit/form/Select,dijit/form/Button,JBrowse/View/TrackConfigEditor".split(","),
  function(i,j,h,g,e,d,c,b){return i(null,{constructor:function(b){this.browser=b.browser;this.fileDialog=b.fileDialog;this.domNode=h.create("div",{className:"trackList",innerHTML:"track list!"});this._updateDisplay()},getTrackConfigurations:function(){return g.dojof.values(this.trackConfs||{})},update:function(b){this.storeConfs={};this.trackConfs={};this._makeStoreConfs(b);this._makeTrackConfs();this._updateDisplay()},_makeStoreConfs:function(b){this.storeConfs=this.storeConfs||{};for(var a=this.fileDialog.getFileTypeDrivers(),
  c=0;b.length&&b.length!=c;)b=j.filter(b,function(b){return!j.some(a,function(a){return a.tryResource(this.storeConfs,b)},this)},this),c=b.length;j.forEach(a,function(a){a.finalizeConfiguration(this.storeConfs)},this);b.length&&console.warn("Not all resources could be assigned to tracks.  Unused resources:",b)},_makeTrackConfs:function(){var b=this.browser.getTrackTypes().trackTypeDefaults,a={},c;for(c in this.storeConfs)if(this.storeConfs[c].fileBasename){var d=this.storeConfs[c].fileBasename.replace(/\.(coverage|density|histograms?)$/,
  "");d!=this.storeConfs[c].fileBasename&&(a[d]={store:this.storeConfs[c],name:c,used:!1})}for(c in this.storeConfs){var d=this.storeConfs[c],e=b[d.type]||"JBrowse/View/Track/CanvasFeatures";this.trackConfs=this.trackConfs||{};this.trackConfs[c]={store:this.storeConfs[c],label:c,key:c.replace(/_\d+$/,"").replace(/_/g," "),type:e,category:"Local tracks",autoscale:"local"};if(d=a[d.fileBasename])this.trackConfs[c].histograms={store:d.store,description:d.store.fileBasename},d.used=!0}for(c in a)a[c].used&&
  delete this.trackConfs[a[c].name]},_delete:function(b){delete (this.trackConfs||{})[b];this._updateDisplay()},_updateDisplay:function(){var f=this;h.empty(this.domNode);h.create("h3",{innerHTML:"New Tracks"},this.domNode);if(g.dojof.keys(this.trackConfs||{}).length){var a=h.create("table",{innerHTML:'<tr class="head"><th>Name</th><th>Display</th><th></th></tr>'},this.domNode),k=this.browser.getTrackTypes(),i;for(i in this.trackConfs){var r=this.trackConfs[i],m=h.create("tr",{},a);(new e({value:r.key,
  onChange:function(){r.key=this.get("value")}})).placeAt(h.create("td",{className:"name"},m));(new d({options:j.map(k.knownTrackTypes,function(a){return{label:k.trackTypeLabels[a]||a.replace("JBrowse/View/Track/","").replace(/\//g," "),value:a}}),value:r.type,onChange:function(){r.type=this.get("value")}})).placeAt(h.create("td",{className:"type"},m));(new c({className:"edit",title:"edit configuration",innerHTML:"Edit Configuration",onClick:function(){(new b(r)).show(function(a){dojo.mixin(r,a.conf);
  f._updateDisplay()})}})).placeAt(h.create("td",{className:"edit"},m));dojo.create("td",{width:"1%",innerHTML:'<div class="dijitIconDelete"></div>',onclick:function(a){a.preventDefault&&a.preventDefault();f._delete(i)}},m);h.create("td",{className:"type"},m)}}else h.create("div",{className:"emptyMessage",innerHTML:"None"},this.domNode)}})})},"JBrowse/View/LocationChoiceDialog":function(){define("dojo/_base/declare,dojo/dom-construct,dojo/aspect,dijit/Dialog,dijit/form/Button,dijit/focus,JBrowse/View/LocationList".split(","),
  function(i,j,h,g,e,d,c){return i(null,{constructor:function(b){this.browser=b.browser;this.config=dojo.clone(b.config||{});this.locationChoices=b.locationChoices||[];this.title=b.title||"Choose location";this.prompt=b.prompt;this.goCallback=b.goCallback;this.showCallback=b.showCallback},show:function(){var b=this.dialog=new g({title:this.title,className:"locationChoiceDialog",style:{width:"70%"}}),f=j.create("div",{});this.prompt&&j.create("div",{className:"prompt",innerHTML:this.prompt},f);var a=
  this.browser;this.locationListView=new c({browser:a,locations:this.locationChoices,buttons:[{className:"show",innerHTML:"Show",onClick:this.showCallback||function(b){a.showRegionAfterSearch(b)}},{className:"go",innerHTML:"Go",onClick:this.goCallback||function(c){b.hide();a.showRegionAfterSearch(c)}}]},j.create("div",{className:"locationList",style:{maxHeight:0.5*this.browser.container.offsetHeight+"px"}},f));this.actionBar=dojo.create("div",{className:"infoDialogActionBar dijitDialogPaneActionBar"});
  (new e({iconClass:"dijitIconDelete",label:"Cancel",onClick:dojo.hitch(b,"hide")})).placeAt(this.actionBar);b.set("content",[f,this.actionBar]);b.show();h.after(b,"hide",dojo.hitch(this,function(){d.curNode&&d.curNode.blur();setTimeout(function(){b.destroyRecursive()},500)}))}})})},"JBrowse/View/LocationList":function(){define("dojo/_base/declare,dojo/_base/array,dojo/dom-construct,dijit/form/Button,JBrowse/Util,dojo/store/Memory,dgrid/OnDemandGrid,dgrid/extensions/DijitRegistry".split(","),function(i,
  j,h,g,e,d,c,b){var f=i([c,b]);return i(null,{constructor:function(a,b){this.browser=a.browser;var c=j.map(a.locations||[],function(a){return{locstring:e.assembleLocString(a),location:a,label:a.label||a.objectName,description:a.description,score:a.score,tracks:j.map(j.filter(a.tracks||[],function(a){return a}),function(a){return a.key||a.name||a.label||a}).join(", ")}}),i=[];j.some(c,function(a){return a.label})&&i.unshift({label:"Name",field:"label"});j.some(c,function(a){return a.description})&&
  i.unshift({label:"Description",field:"description"});j.some(c,function(a){return a.score})&&i.unshift({label:"Score",field:"score"});i.push({label:"Location",field:"locstring"});c.length&&c[0].tracks&&i.push({label:"Track",field:"tracks"});a.buttons&&i.push({label:"",className:"goButtonColumn",renderCell:function(b,c,d,f){var e=h.create("div");j.forEach(a.buttons,function(a){var h=dojo.mixin({},a);h.onClick=function(){a.onClick(b.location,c,d,f)};(new g(h)).placeAt(e)});return e}});this.grid=new f({columns:i,
  store:new d({data:c})},b)}})})},"JBrowse/View/Dialog/SetHighlight":function(){define("dojo/_base/declare,dojo/dom-construct,dijit/focus,dijit/form/TextBox,JBrowse/View/Dialog/WithActionBar,dojo/on,dijit/form/Button,JBrowse/Model/Location".split(","),function(i,j,h,g,e,d,c,b){return i(e,{autofocus:!1,title:"Set highlight",constructor:function(b){this.browser=b.browser;this.setCallback=b.setCallback||function(){};this.cancelCallback=b.cancelCallback||function(){}},_fillActionBar:function(b){var a=this;
  (new c({iconClass:"dijitIconDelete",label:"Cancel",onClick:function(){a.cancelCallback&&a.cancelCallback();a.hide()}})).placeAt(b);(new c({iconClass:"dijitIconFilter",label:"Highlight",onClick:function(){a.setCallback&&a.setCallback(a.getLocation());a.hide()}})).placeAt(b)},show:function(b){dojo.addClass(this.domNode,"setHighlightDialog");var a=this.browser.view.visibleRegionLocString();a&&(a+=" (current view)");this.highlightInput=new g({id:"newhighlight_locstring",value:(this.browser.getHighlight()||
  "").toString()||a||"",placeHolder:a||"ctgA:1234..5678"});this.set("content",[j.create("label",{"for":"newhighlight_locstring",innerHTML:"Location"}),this.highlightInput.domNode]);this.inherited(arguments)},getLocation:function(){return new b(this.highlightInput.get("value"))},hide:function(){this.inherited(arguments);window.setTimeout(dojo.hitch(this,"destroyRecursive"),500)}})})},"JBrowse/View/Dialog/SetTrackHeight":function(){define("dojo/_base/declare,dojo/dom-construct,dijit/focus,dijit/form/NumberSpinner,JBrowse/View/Dialog/WithActionBar,dojo/on,dijit/form/Button,JBrowse/Model/Location".split(","),
  function(i,j,h,g,e,d,c){return i(e,{title:"Set new track height",constructor:function(b){this.height=b.height||100;this.browser=b.browser;this.setCallback=b.setCallback||function(){};this.cancelCallback=b.cancelCallback||function(){};this.heightConstraints={min:10,max:750}},_fillActionBar:function(b){(new c({label:"OK",onClick:dojo.hitch(this,function(){var b=parseInt(this.heightSpinner.getValue());if(!isNaN(b)&&!(b<this.heightConstraints.min||b>this.heightConstraints.max))this.setCallback&&this.setCallback(b),
  this.hide()})})).placeAt(b);(new c({label:"Cancel",onClick:dojo.hitch(this,function(){this.cancelCallback&&this.cancelCallback();this.hide()})})).placeAt(b)},show:function(b){dojo.addClass(this.domNode,"setTrackHeightDialog");this.heightSpinner=new g({value:this.height,smallDelta:10,constraints:this.heightConstraints});this.set("content",[j.create("label",{"for":"newhighlight_locstring",innerHTML:""}),this.heightSpinner.domNode,j.create("span",{innerHTML:" pixels"})]);this.inherited(arguments)},hide:function(){this.inherited(arguments);
  window.setTimeout(dojo.hitch(this,"destroyRecursive"),500)}})})},"dijit/form/NumberSpinner":function(){define(["dojo/_base/declare","dojo/_base/event","dojo/keys","./_Spinner","./NumberTextBox"],function(i,j,h,g,e){return i("dijit.form.NumberSpinner",[g,e.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(d,c){var b=this.constraints,f=isNaN(d),a=!isNaN(b.max),e=!isNaN(b.min);f&&0!=c&&(d=0<c?e?b.min:a?b.max:0:a?this.constraints.max:e?b.min:0);var g=d+c;if(f||isNaN(g))return d;
  if(a&&g>b.max)g=b.max;if(e&&g<b.min)g=b.min;return g},_onKeyPress:function(d){if((d.charOrCode==h.HOME||d.charOrCode==h.END)&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&"undefined"!=typeof this.get("value")){var c=this.constraints[d.charOrCode==h.HOME?"min":"max"];"number"==typeof c&&this._setValueAttr(c,!1);j.stop(d)}}})})},"dijit/form/_Spinner":function(){define("dojo/_base/declare,dojo/_base/event,dojo/keys,dojo/_base/lang,dojo/sniff,dojo/mouse,../typematic,./RangeBoundTextBox,dojo/text!./templates/Spinner.html,./_TextBoxMixin".split(","),
  function(i,j,h,g,e,d,c,b,f,a){return i("dijit.form._Spinner",b,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:f,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{upArrowNode:"dijitUpArrowButton",downArrowNode:"dijitDownArrowButton"},adjust:function(a){return a},_arrowPressed:function(b,c,d){!this.disabled&&!this.readOnly&&(this._setValueAttr(this.adjust(this.get("value"),c*d),!1),a.selectInputText(this.textbox,this.textbox.value.length))},
  _arrowReleased:function(){this._wheelTimer=null},_typematicCallback:function(a,b,c){var d=this.smallDelta;if(b==this.textbox)b=c.charOrCode,d=b==h.PAGE_UP||b==h.PAGE_DOWN?this.largeDelta:this.smallDelta,b=b==h.UP_ARROW||b==h.PAGE_UP?this.upArrowNode:this.downArrowNode;-1==a?this._arrowReleased(b):this._arrowPressed(b,b==this.upArrowNode?1:-1,d)},_wheelTimer:null,_mouseWheeled:function(a){j.stop(a);var b=a.wheelDelta/120;Math.floor(b)!=b&&(b=0<a.wheelDelta?1:-1);a=a.detail?-1*a.detail:b;if(0!==a){var c=
  this[0<a?"upArrowNode":"downArrowNode"];this._arrowPressed(c,a,this.smallDelta);this._wheelTimer&&this._wheelTimer.remove();this._wheelTimer=this.defer(function(){this._arrowReleased(c)},50)}},_setConstraintsAttr:function(a){this.inherited(arguments);this.focusNode&&(void 0!==this.constraints.min?this.focusNode.setAttribute("aria-valuemin",this.constraints.min):this.focusNode.removeAttribute("aria-valuemin"),void 0!==this.constraints.max?this.focusNode.setAttribute("aria-valuemax",this.constraints.max):
  this.focusNode.removeAttribute("aria-valuemax"))},_setValueAttr:function(a,b){this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,d.wheel,"_mouseWheeled");this.own(c.addListener(this.upArrowNode,this.textbox,{charOrCode:h.UP_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.downArrowNode,this.textbox,
  {charOrCode:h.DOWN_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.upArrowNode,this.textbox,{charOrCode:h.PAGE_UP,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.downArrowNode,this.textbox,{charOrCode:h.PAGE_DOWN,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",
  this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout))}})})},"dijit/typematic":function(){define("dojo/_base/array,dojo/_base/connect,dojo/_base/event,dojo/_base/kernel,dojo/_base/lang,dojo/on,dojo/sniff,./main".split(","),function(i,j,h,g,e,d,c,b){var f=b.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(0>this._currentTimeout?this._initialDelay:1<this._subsequentDelay?this._subsequentDelay:Math.round(this._currentTimeout*
  this._subsequentDelay),this._minDelay);this._timer=setTimeout(e.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,b,c,d,f,g,h,i){if(f!=this._obj){this.stop();this._initialDelay=h||500;this._subsequentDelay=g||0.9;this._minDelay=i||10;this._obj=f;this._node=c;this._count=this._currentTimeout=-1;this._callback=e.hitch(b,d);this._evt={faux:!0};for(var j in a)"layerX"!=j&&"layerY"!=j&&(b=a[j],"function"!=typeof b&&"undefined"!=typeof b&&(this._evt[j]=b));this._fireEventAndReload()}},
  stop:function(){if(this._timer)clearTimeout(this._timer),this._timer=null;if(this._obj)this._callback(-1,this._node,this._evt),this._obj=null},addKeyListener:function(a,b,c,r,m,l,p){if(b.keyCode)b.charOrCode=b.keyCode,g.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");else if(b.charCode)b.charOrCode=String.fromCharCode(b.charCode),g.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
  "","2.0");var q=[d(a,j._keypress,e.hitch(this,function(d){d.charOrCode==b.charOrCode&&(void 0===b.ctrlKey||b.ctrlKey==d.ctrlKey)&&(void 0===b.altKey||b.altKey==d.altKey)&&(void 0===b.metaKey||b.metaKey==(d.metaKey||!1))&&(void 0===b.shiftKey||b.shiftKey==d.shiftKey)?(h.stop(d),f.trigger(d,c,a,r,b,m,l,p)):f._obj==b&&f.stop()})),d(a,"keyup",e.hitch(this,function(){f._obj==b&&f.stop()}))];return{remove:function(){i.forEach(q,function(a){a.remove()})}}},addMouseListener:function(a,b,g,h,j,l){var p=[d(a,
  "mousedown",e.hitch(this,function(c){c.preventDefault();f.trigger(c,b,a,g,a,h,j,l)})),d(a,"mouseup",e.hitch(this,function(a){this._obj&&a.preventDefault();f.stop()})),d(a,"mouseout",e.hitch(this,function(a){this._obj&&a.preventDefault();f.stop()})),d(a,"dblclick",e.hitch(this,function(d){d.preventDefault();9>c("ie")&&(f.trigger(d,b,a,g,a,h,j,l),setTimeout(e.hitch(this,f.stop),50))}))];return{remove:function(){i.forEach(p,function(a){a.remove()})}}},addListener:function(a,b,c,d,f,e,g,h){var j=[this.addKeyListener(b,
  c,d,f,e,g,h),this.addMouseListener(a,d,f,e,g,h)];return{remove:function(){i.forEach(j,function(a){a.remove()})}}}};return f})},"dijit/form/RangeBoundTextBox":function(){define(["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(i,j,h){return i("dijit.form.RangeBoundTextBox",h,{rangeMessage:"",rangeCheck:function(g,e){return("min"in e?0<=this.compare(g,e.min):!0)&&("max"in e?0>=this.compare(g,e.max):!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var g=
  this.get("value");if(null==g)return!1;var e=!1;if("min"in this.constraints)e=this.constraints.min,e=0>this.compare(g,"number"==typeof e&&0<=e&&0!=g?0:e);if(!e&&"max"in this.constraints)e=this.constraints.max,e=0<this.compare(g,"number"!=typeof e||0<e?e:0);return e},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(g){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(g))},getErrorMessage:function(g){var e=
  this.get("value");return null!=e&&""!==e&&("number"!=typeof e||!isNaN(e))&&!this.isInRange(g)?this.rangeMessage:this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage)this.messages=j.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage},applyTextDir:function(){}})})},"dijit/form/MappedTextBox":function(){define(["dojo/_base/declare","dojo/dom-construct","./ValidationTextBox"],function(i,j,h){return i("dijit.form.MappedTextBox",
  h,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},_setNameAttr:null,serialize:function(g){return g.toString?g.toString():""},toString:function(){var g=this.filter(this.get("value"));return null!=g?"string"==typeof g?g:this.serialize(g,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=j.place("<input type='hidden'"+(this.name?' name="'+
  this.name.replace(/"/g,"&quot;")+'"':"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}})})},"url:dijit/form/templates/Spinner.html":'<div class="dijit dijitReset dijitInline dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitButtonNode dijitSpinnerButtonContainer"\n\t\t><input class="dijitReset dijitInputField dijitSpinnerButtonInner" type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t/><div class="dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"\n\t\t\tdata-dojo-attach-point="upArrowNode"\n\t\t\t><div class="dijitArrowButtonInner"\n\t\t\t\t><input class="dijitReset dijitInputField" value="&#9650; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class="dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"\n\t\t\tdata-dojo-attach-point="downArrowNode"\n\t\t\t><div class="dijitArrowButtonInner"\n\t\t\t\t><input class="dijitReset dijitInputField" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class=\'dijitReset dijitInputInner\' data-dojo-attach-point="textbox,focusNode" type="${type}" data-dojo-attach-event="onkeypress:_onKeyPress"\n\t\t\trole="spinbutton" autocomplete="off" ${!nameAttrSetting}\n\t/></div\n></div>\n',
  "dijit/form/NumberTextBox":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/number","./RangeBoundTextBox"],function(i,j,h,g){var e=i("dijit.form.NumberTextBoxMixin",null,{pattern:h.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:h.format,postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},_setConstraintsAttr:function(d){var c="number"==typeof d.places?d.places:0;c&&c++;if("number"!=typeof d.max)d.max=9*Math.pow(10,15-c);if("number"!=typeof d.min)d.min=
  -9*Math.pow(10,15-c);this.inherited(arguments,[d]);this.focusNode&&this.focusNode.value&&!isNaN(this.value)&&this.set("value",this.value)},_onFocus:function(){if(!this.disabled){var d=this.get("value");if("number"==typeof d&&!isNaN(d)&&(d=this.format(d,this.constraints),void 0!==d))this.textbox.value=d;this.inherited(arguments)}},format:function(d,c){var b=""+d;if("number"!=typeof d)return b;if(isNaN(d))return"";if(!("rangeCheck"in this&&this.rangeCheck(d,c))&&!1!==c.exponent&&/\de[-+]?\d/i.test(b))return b;
  this.editOptions&&this.focused&&(c=j.mixin({},c,this.editOptions));return this._formatter(d,c)},_parser:h.parse,parse:function(d,c){var b=this._parser(d,j.mixin({},c,this.editOptions&&this.focused?this.editOptions:{}));this.editOptions&&this.focused&&isNaN(b)&&(b=this._parser(d,c));return b},_getDisplayedValueAttr:function(){var d=this.inherited(arguments);return isNaN(d)?this.textbox.value:d},filter:function(d){return null==d||""===d?NaN:this.inherited(arguments)},serialize:function(d,c){return"number"!=
  typeof d||isNaN(d)?"":this.inherited(arguments)},_setBlurValue:function(){this._setValueAttr(j.hitch(j.mixin({},this,{focused:!0}),"get")("value"),!0)},_setValueAttr:function(d,c,b){if(void 0!==d&&void 0===b)if(b=""+d,"number"==typeof d)if(isNaN(d))b="";else{if("rangeCheck"in this&&this.rangeCheck(d,this.constraints)||!1===this.constraints.exponent||!/\de[-+]?\d/i.test(b))b=void 0}else d?d=void 0:(b="",d=NaN);this.inherited(arguments,[d,c,b])},_getValueAttr:function(){var d=this.inherited(arguments);
  if(isNaN(d)&&""!==this.textbox.value){if(!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)&&RegExp("^"+h._realNumberRegexp(j.mixin({},this.constraints))+"$").test(this.textbox.value))return d=Number(this.textbox.value),isNaN(d)?void 0:d}else return d},isValid:function(d){if(!this.focused||this._isEmpty(this.textbox.value))return this.inherited(arguments);var c=this.get("value");return!isNaN(c)&&this.rangeCheck(c,this.constraints)?!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)?
  !0:this.inherited(arguments):!1}}),i=i("dijit.form.NumberTextBox",[g,e],{baseClass:"dijitTextBox dijitNumberTextBox"});i.Mixin=e;return i})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(i,j,h,g,e){var d={};i.setObject("dojo.number",d);d.format=function(b,c){var c=i.mixin({},c||{}),a=j.normalizeLocale(c.locale),a=j.getLocalization("dojo.cldr","number",a);c.customs=a;a=c.pattern||a[(c.type||"decimal")+"Format"];return isNaN(b)||
  Infinity==Math.abs(b)?null:d._applyPattern(b,a,c)};d._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;d._applyPattern=function(b,c,a){var a=a||{},e=a.customs.group,g=a.customs.decimal,c=c.split(";"),h=c[0],c=c[0>b?1:0]||"-"+h;if(-1!=c.indexOf("%"))b*=100;else if(-1!=c.indexOf("\u2030"))b*=1E3;else if(-1!=c.indexOf("\u00a4"))e=a.customs.currencyGroup||e,g=a.customs.currencyDecimal||g,c=c.replace(/\u00a4{1,3}/,function(b){return a[["symbol","currency","displayName"][b.length-1]]||a.currency||""});else if(-1!=
  c.indexOf("E"))throw Error("exponential notation not supported");var i=d._numberPatternRE,h=h.match(i);if(!h)throw Error("unable to find a number expression in pattern: "+c);if(!1===a.fractional)a.places=0;return c.replace(i,d._formatAbsolute(b,h[0],{decimal:g,group:e,places:a.places,round:a.round}))};d.round=function(b,c,a){a=10/(a||10);return(a*+b).toFixed(c)/a};if(0==(0.9).toFixed()){var c=d.round;d.round=function(b,d,a){var e=Math.pow(10,-d||0),g=Math.abs(b);if(!b||g>=e)e=0;else if(g/=e,0.5>g||
  0.95<=g)e=0;return c(b,d,a)+(0<b?e:-e)}}d._formatAbsolute=function(b,c,a){a=a||{};if(!0===a.places)a.places=0;if(Infinity===a.places)a.places=6;var c=c.split("."),e="string"==typeof a.places&&a.places.indexOf(","),h=a.places;if(e)h=a.places.substring(e+1);else if(!(0<=h))h=(c[1]||[]).length;0>a.round||(b=d.round(b,h,a.round));var b=(""+Math.abs(b)).split("."),i=b[1]||"";if(c[1]||a.places){if(e)a.places=a.places.substring(0,e);e=void 0!==a.places?a.places:c[1]&&c[1].lastIndexOf("0")+1;e>i.length&&
  (b[1]=g.pad(i,e,"0",!0));h<i.length&&(b[1]=i.substr(0,h))}else b[1]&&b.pop();h=c[0].replace(",","");e=h.indexOf("0");-1!=e&&(e=h.length-e,e>b[0].length&&(b[0]=g.pad(b[0],e)),-1==h.indexOf("#")&&(b[0]=b[0].substr(b[0].length-e)));var h=c[0].lastIndexOf(","),j,l;-1!=h&&(j=c[0].length-h-1,c=c[0].substr(0,h),h=c.lastIndexOf(","),-1!=h&&(l=c.length-h-1));c=[];for(h=b[0];h;)e=h.length-j,c.push(0<e?h.substr(e):h),h=0<e?h.slice(0,e):"",l&&(j=l,delete l);b[0]=c.reverse().join(a.group||",");return b.join(a.decimal||
  ".")};d.regexp=function(b){return d._parseInfo(b).regexp};d._parseInfo=function(b){var b=b||{},c=j.normalizeLocale(b.locale),c=j.getLocalization("dojo.cldr","number",c),a=b.pattern||c[(b.type||"decimal")+"Format"],g=c.group,h=c.decimal,i=1;if(-1!=a.indexOf("%"))i/=100;else if(-1!=a.indexOf("\u2030"))i/=1E3;else{var m=-1!=a.indexOf("\u00a4");m&&(g=c.currencyGroup||g,h=c.currencyDecimal||h)}c=a.split(";");1==c.length&&c.push("-"+c[0]);c=e.buildGroupRE(c,function(a){a="(?:"+e.escapeString(a,".")+")";
  return a.replace(d._numberPatternRE,function(a){var c={signed:!1,separator:b.strict?g:[g,""],fractional:b.fractional,decimal:h,exponent:!1},a=a.split("."),e=b.places;1==a.length&&1!=i&&(a[1]="###");if(1==a.length||0===e)c.fractional=!1;else{void 0===e&&(e=b.pattern?a[1].lastIndexOf("0")+1:Infinity);if(e&&void 0==b.fractional)c.fractional=!0;!b.places&&e<a[1].length&&(e+=","+a[1].length);c.places=e}a=a[0].split(",");if(1<a.length&&(c.groupSize=a.pop().length,1<a.length))c.groupSize2=a.pop().length;
  return"("+d._realNumberRegexp(c)+")"})},!0);m&&(c=c.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(a,c,d,f){a=e.escapeString(b[["symbol","currency","displayName"][d.length-1]]||b.currency||"");c=c?"[\\s\\xa0]":"";f=f?"[\\s\\xa0]":"";return!b.strict?(c&&(c+="*"),f&&(f+="*"),"(?:"+c+a+f+")?"):c+a+f}));return{regexp:c.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:g,decimal:h,factor:i}};d.parse=function(b,c){var a=d._parseInfo(c),e=RegExp("^"+a.regexp+"$").exec(b);if(!e)return NaN;var g=e[1];if(!e[1]){if(!e[2])return NaN;
  g=e[2];a.factor*=-1}g=g.replace(RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return g*a.factor};d._realNumberRegexp=function(b){b=b||{};if(!("places"in b))b.places=Infinity;if("string"!=typeof b.decimal)b.decimal=".";if(!("fractional"in b)||/^0/.test(b.places))b.fractional=[!0,!1];if(!("exponent"in b))b.exponent=[!0,!1];if(!("eSigned"in b))b.eSigned=[!0,!1];var c=d._integerRegexp(b),a=e.buildGroupRE(b.fractional,function(a){var c="";a&&0!==b.places&&(c="\\"+b.decimal,c=Infinity==
  b.places?"(?:"+c+"\\d+)?":c+("\\d{"+b.places+"}"));return c},!0),g=e.buildGroupRE(b.exponent,function(a){return a?"([eE]"+d._integerRegexp({signed:b.eSigned})+")":""}),c=c+a;a&&(c="(?:(?:"+c+")|(?:"+a+"))");return c+g};d._integerRegexp=function(b){b=b||{};if(!("signed"in b))b.signed=[!0,!1];if("separator"in b){if(!("groupSize"in b))b.groupSize=3}else b.separator="";var c=e.buildGroupRE(b.signed,function(a){return a?"[-+]":""},!0),a=e.buildGroupRE(b.separator,function(a){if(!a)return"(?:\\d+)";a=e.escapeString(a);
  " "==a?a="\\s":"\u00a0"==a&&(a="\\s\\xa0");var c=b.groupSize,d=b.groupSize2;return d?(a="(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+a+"]\\d{"+d+"})*["+a+"]\\d{"+c+"})",0<c-d?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":a):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+a+"]\\d{"+c+"})*)"},!0);return c+a};return d})},"JBrowse/View/Dialog/QuickHelp":function(){define(["dojo/_base/declare","JBrowse/View/InfoDialog"],function(i,j){return i(j,{title:"JBrowse Help",constructor:function(h){this.browser=h.browser;this.defaultContent=this._makeDefaultContent();
  if(!h.content&&!h.href)this.content=this.defaultContent},_makeDefaultContent:function(){return'<div class="help_dialog"><div class="main" style="float: left; width: 49%;"><dl><dt>Moving</dt><dd><ul>    <li>Move the view by clicking and dragging in the track area, or by clicking <img class="icon nav" id="moveLeftSmall" src="'+this.browser.resolveUrl("img/Empty.png")+'">  or <img class="icon nav" id="moveRightSmall" src="'+this.browser.resolveUrl("img/Empty.png")+'"> in the navigation bar, or by pressing the left and right arrow keys.</li>    <li>Center the view at a point by clicking on either the track scale bar or overview bar, or by shift-clicking in the track area.</li></ul></dd><dt>Zooming</dt><dd><ul>    <li>Zoom in and out by clicking <img class="icon nav" id="zoomInSmall" src="'+
  this.browser.resolveUrl("img/Empty.png")+'"> or <img class="icon nav" id="zoomOutSmall" src="'+this.browser.resolveUrl("img/Empty.png")+'"> in the navigation bar, or by pressing the up and down arrow keys while holding down "shift".</li>    <li>Select a region and zoom to it ("rubber-band" zoom) by clicking and dragging in the overview or track scale bar, or shift-clicking and dragging in the track area.</li>    </ul></dd><dt>Showing Tracks</dt><dd><ul><li>Turn a track on by dragging its track label from the "Available Tracks" area into the genome area, or double-clicking it.</li>        <li>Turn a track off by dragging its track label from the genome area back into the "Available Tracks" area.</li>    </ul></dd></dl></div><div class="main" style="float: right; width: 49%;"><dl><dt>Searching</dt><dd><ul>    <li>Jump to a feature or reference sequence by typing its name in the location box and pressing Enter.</li>    <li>Jump to a specific region by typing the region into the location box as: <span class="example">ref:start..end</span>.</li>    </ul></dd><dt>Example Searches</dt><dd>    <dl class="searchexample">        <dt>uc0031k.2</dt><dd>searches for the feature named <span class="example">uc0031k.2</span>.</dd>        <dt>chr4</dt><dd>jumps to chromosome 4</dd>        <dt>chr4:79,500,000..80,000,000</dt><dd>jumps the region on chromosome 4 between 79.5Mb and 80Mb.</dd>        <dt>5678</dt><dd>centers the display at base 5,678 on the current sequence</dd>    </dl></dd><dt>JBrowse Documentation</dt><dd><ul><li><a target="_blank" href="docs/tutorial/">Quick-start tutorial</a></li>        <li><a target="_blank" href="http://gmod.org/wiki/JBrowse">JBrowse Configuration Guide</a></li>        <li><a target="_blank" href="docs/config.html"><tt>biodb-to-json.pl</tt> reference</a></li>        <li><a target="_blank" href="docs/featureglyphs.html">HTMLFeatures class reference</a></li>    </ul></dd></dl></div></div>'}})})},
  "JBrowse/View/StandaloneDatasetList":function(){define(["dojo/_base/declare","dijit/_WidgetBase"],function(i,j){return i(j,{baseClass:"jbrowseStandaloneDatasetSelector",buildRendering:function(){this.inherited(arguments);var h=this.domNode;h.appendChild(document.createElement("h2")).innerHTML="Available Datasets";this.containerNode=h.appendChild(document.createElement("ul"));var g=this.get("datasets"),h=h.appendChild(document.createElement("ul")),e;for(e in g)if(!/^_/.test(e)){var d=g[e],c=document.createElement("li"),
  b=document.createElement("a");b.setAttribute("href",d.url);b.innerHTML=d.name;c.appendChild(b);h.appendChild(c)}}})})},"lazyload/lazyload":function(){define([],function(){return function(i){function j(a,b){var c=i.createElement(a),d;for(d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}function h(b){var c=a[b],d,f;if(c)d=c.callback,f=c.urls,f.shift(),k=0,f.length||(d&&d.call(c.context,c.obj),a[b]=null,n[b].length&&e(b))}function g(){var a=navigator.userAgent;b={async:!0===i.createElement("script").async};
  (b.webkit=/AppleWebKit\//.test(a))||(b.ie=/MSIE/.test(a))||(b.opera=/Opera/.test(a))||(b.gecko=/Gecko\//.test(a))||(b.unknown=!0)}function e(e,k,p,q,r){var u=function(){h(e)},v="css"===e,w=[],t,y,x,B;b||g();if(k)if(k="string"===typeof k?[k]:k.concat(),v||b.async||b.gecko||b.opera)n[e].push({urls:k,callback:p,obj:q,context:r});else for(t=0,y=k.length;t<y;++t)n[e].push({urls:[k[t]],callback:t===y-1?p:null,obj:q,context:r});if(!a[e]&&(B=a[e]=n[e].shift())){f||(f=i.head||i.getElementsByTagName("head")[0]);
  k=B.urls;for(t=0,y=k.length;t<y;++t)p=k[t],v?x=b.gecko?j("style"):j("link",{href:p,rel:"stylesheet"}):(x=j("script",{src:p}),x.async=!1),x.className="lazyload",x.setAttribute("charset","utf-8"),b.ie&&!v?x.onreadystatechange=function(){if(/loaded|complete/.test(x.readyState))x.onreadystatechange=null,u()}:v&&(b.gecko||b.webkit)?b.webkit?(B.urls[t]=x.href,c()):(x.innerHTML='@import "'+p+'";',d(x)):x.onload=x.onerror=u,w.push(x);for(t=0,y=w.length;t<y;++t)f.appendChild(w[t])}}function d(a){var b;try{b=
  !!a.sheet.cssRules}catch(c){k+=1;200>k?setTimeout(function(){d(a)},50):b&&h("css");return}h("css")}function c(){var b=a.css,d;if(b){for(d=r.length;0<=--d;)if(r[d].href===b.urls[0]){h("css");break}k+=1;b&&(200>k?setTimeout(c,50):h("css"))}}var b,f,a={},k=0,n={css:[],js:[]},r=i.styleSheets;return{css:function(a,b,c,d){e("css",a,b,c,d)},js:function(a,b,c,d){e("js",a,b,c,d)}}}(this.document)})},"JBrowse/ConfigAdaptor/JB_json_v1":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/_base/json,dojo/request,JBrowse/Util,JBrowse/Digest/Crc32".split(","),
  function(i,j,h,g,e,d,c){var b=d.dojof;return i("JBrowse.ConfigAdaptor.JB_json_v1",null,{constructor:function(){},load:function(b){var a=this;if(b.config.url){var c=d.resolveUrl(b.baseUrl||window.location.href,b.config.url);return e(c,{handleAs:"text"}).then(function(d){d=a.parse_conf(d,b)||{};d.sourceUrl=c;return d=a.regularize_conf(d,b)})}if(b.config.data)return d.resolved(this.regularize_conf(b.config.data,b))},parse_conf:function(b,a){try{return g.fromJson(b)}catch(c){throw c+" when parsing "+
  (a.config.url||"configuration")+".";}},regularize_conf:function(c,a){if(c.tracks&&!j.isArray(c.tracks))if(c.tracks.label)c.tracks=[c.tracks];else{var e=[],g;for(g in c.tracks){if(!("label"in c.tracks[g]))c.tracks[g].label=g;e.push(c.tracks[g])}c.tracks=e}var i=c.trackMetadata;if(i&&i.sources){if(i.sources.url||"string"==typeof i.sources)i.sources=[i.sources];if(!j.isArray(i.sources)){var e=[],m;for(m in i.sources){if(!("name"in i.sources))i.sources[m].name=m;e.push(i.sources[m])}i.sources=e}h.forEach(i.sources,
  function(a,b){if("string"==typeof a){i.sources[b]={url:a};var c=a.match(/\.(\w+)$/);if(c)i.sources[b].type=c[1].toLowerCase()}})}c.sourceUrl=c.sourceUrl||a.config.url;c.baseUrl=c.baseUrl||d.resolveUrl(c.sourceUrl,".");c.baseUrl.length&&!/\/$/.test(c.baseUrl)&&(c.baseUrl+="/");if(c.sourceUrl){m=[].concat(c.tracks||[]).concat(b.values(c.stores||{}));c.names&&m.push(c.names);h.forEach(m,function(a){if(!a.baseUrl)a.baseUrl=c.baseUrl||"/"},this);if(c.refSeqs)c.refSeqs=d.resolveUrl(c.sourceUrl,c.refSeqs);
  if(c.nameUrl)c.nameUrl=d.resolveUrl(c.sourceUrl,c.nameUrl)}return c=this._regularizeTrackConfigs(c)},_regularizeTrackConfigs:function(b){b.stores=b.stores||{};h.forEach(b.tracks||[],function(a){if(a.config){var c=a.config;delete a.config;for(var d in c)!(d in a)&&c.hasOwnProperty(d)&&(a[d]=c[d])}if(!a.store&&(c=this._regularizeClass("JBrowse/View/Track",{FeatureTrack:"JBrowse/View/Track/HTMLFeatures",ImageTrack:"JBrowse/View/Track/FixedImage","ImageTrack.Wiggle":"JBrowse/View/Track/FixedImage/Wiggle",
  SequenceTrack:"JBrowse/View/Track/Sequence"}[a.type]||a.type),a.type=c,this._synthesizeTrackStoreConfig(b,a),a.histograms)){if(!a.histograms.baseUrl)a.histograms.baseUrl=a.baseUrl;this._synthesizeTrackStoreConfig(b,a.histograms)}},this);return b},_synthesizeTrackStoreConfig:function(b,a){var d=a.urlTemplate;if(d=this._regularizeClass("JBrowse/Store",a.storeClass?a.storeClass:/\/FixedImage/.test(a.type)?"JBrowse/Store/TiledImage/Fixed"+(0==a.backendVersion?"_v0":""):/\.jsonz?$/i.test(d)?"JBrowse/Store/SeqFeature/NCList"+
  (0==a.backendVersion?"_v0":""):/\.bam$/i.test(d)?"JBrowse/Store/SeqFeature/BAM":/\.(bw|bigwig)$/i.test(d)?"JBrowse/Store/SeqFeature/BigWig":/\/Sequence$/.test(a.type)?"JBrowse/Store/Sequence/StaticChunked":null)){var e=j.mixin({},a);j.mixin(e,{type:d});e.name="JBrowse/Store/Sequence/StaticChunked"==d&&!b.stores.refseqs?"refseqs":"store"+c.objectFingerprint(e);b.stores[e.name]=e;a.store=e.name}else console.warn("Unable to determine an appropriate data store to use with track '"+a.label+"', please explicitly specify a storeClass in the configuration.")},
  _regularizeClass:function(b,a){if(!a)return null;/\//.test(a)||(a=b+"/"+a);return a=a.replace(/^\//)}})})},"JBrowse/View/TrackList/Hierarchical":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/dom-construct,dojo/query,dojo/on,dojo/json,dijit/TitlePane,dijit/layout/ContentPane,JBrowse/Util,./_TextFilterMixin".split(","),function(i,j,h,g,e,d,c,b,f,a,k){return i("JBrowse.View.TrackList.Hierarchical",[f,k],{region:"left",splitter:!0,style:"width: 25%",id:"hierarchicalTrackPane",
  baseClass:"jbrowseHierarchicalTrackSelector",categoryFacet:"category",constructor:function(a){this.categories={};this.config=h.mixin({sortHierarchical:!0},a);this._loadState()},postCreate:function(){this.placeAt(this.browser.container);this.browser.subscribe("/jbrowse/v1/c/tracks/show",h.hitch(this,"setTracksActive"));this.browser.subscribe("/jbrowse/v1/c/tracks/hide",h.hitch(this,"setTracksInactive"));this.browser.subscribe("/jbrowse/v1/c/tracks/new",h.hitch(this,"addTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/replace",
  h.hitch(this,"replaceTracks"));this.browser.subscribe("/jbrowse/v1/c/tracks/delete",h.hitch(this,"deleteTracks"))},buildRendering:function(){this.inherited(arguments);var a=new f({className:"header"});this.addChild(a);g.create("h2",{className:"title",innerHTML:"Available Tracks"},a.containerNode);this._makeTextFilterNodes(g.create("div",{className:"textfilterContainer"},a.containerNode));this._updateTextFilterControl()},startup:function(){this.inherited(arguments);var a=[],b=this,c=this.get("categoryFacet"),
  d;this.config.sortHierarchical&&(d=[{attribute:c.toLowerCase()},{attribute:"key"},{attribute:"label"}]);for(var c=(this.get("collapsedCategories")||"").split(","),e=0;e<c.length;e++)h.setObject("collapsed."+c[e],!0,this.state);this._saveState();this.get("trackMetaData").fetch({onItem:function(b){b.conf&&a.push(b)},onComplete:function(){b.categories.Uncategorized={pane:(new f({className:"uncategorized"})).placeAt(b.containerNode),tracks:{},categories:{}};b.addTracks(a,!0);if(!b.categories.Uncategorized.pane.containerNode.children.length)b.categories.Uncategorized.pane.domNode.style.display=
  "none"},sort:d})},addTracks:function(c,e){this.pane=this;var f=this;j.forEach(c,function(c){function i(a,c,d){var g=c.shift(),d=d.concat(g),k=d.join("/"),j=a.categories[g]||(a.categories[g]=function(){var c=h.getObject("collapsed."+k,!1,f.state),c=new b({title:'<span class="categoryName">'+g+'</span> <span class="trackCount">0</span>',open:!c});c.watch("open",function(a,b,c){h.setObject("collapsed."+k,!c,f.state);f._saveState()});a.pane.addChild(c,e?void 0:1);return{parent:a,pane:c,categories:{},
  tracks:{}}}.call(f));return c.length?i(j,c,d):j}var k=c.conf||c,j=this.get("categoryFacet"),j=(k.metadata&&k.metadata[j]||k[j]||c[j]||"Uncategorized").split(/\s*\/\s*/),j=i(this,j,[]);j.pane.domNode.style.display="block";var c=g.create("label",{className:"tracklist-label shown",title:a.escapeHTML(k.shortDescription||c.shortDescription||(1===k.description?void 0:k.description)||c.description||k.Description||c.Description||k.metadata&&(k.metadata.shortDescription||k.metadata.description||k.metadata.Description)||
  c.key||k.key||k.label)},j.pane.containerNode),n=g.create("input",{type:"checkbox",className:"check"},c),v=k.label,w;this.own(w=d(n,"click",function(){f.browser.publish("/jbrowse/v1/v/tracks/"+(this.checked?"show":"hide"),[k])}));g.create("span",{className:"key",innerHTML:k.key||k.label},c);j.tracks[v]={checkbox:n,checkListener:w,labelNode:c};this._updateTitles(j)},this)},_loadState:function(){this.state={};try{this.state=c.parse(localStorage.getItem("JBrowse-Hierarchical-Track-Selector")||"{}")}catch(a){}return this.state},
  _saveState:function(){try{localStorage.setItem("JBrowse-Hierarchical-Track-Selector",c.stringify(this.state))}catch(a){}},_updateAllTitles:function(a){var a=a||this,b;for(b in a.categories)this._updateTitle(a.categories[b]),this._updateAllTitles(a.categories[b])},_updateTitle:function(a){a.pane.set("title",a.pane.get("title").replace(/>\s*\d+\s*\</,">"+e("label.shown",a.pane.containerNode).length+"<"))},_updateTitles:function(a){this._updateTitle(a);a.parent&&this._updateTitles(a.parent)},_findTrack:function(a,
  b,c){var c=c||this,d;for(d in c.categories){var e=c.categories[d];if(e.tracks[a])return b(e.tracks[a],e),!0;if(this._findTrack(a,b,e))return!0}return!1},replaceTracks:function(){},setTracksActive:function(a){j.forEach(a,function(a){this._findTrack(a.label,function(a){a.checkbox.checked=!0})},this)},deleteTracks:function(a){j.forEach(a,function(a){this._findTrack(a.label,function(b,c){b.labelNode.parentNode.removeChild(b.labelNode);b.checkListener.remove();delete c.tracks[a.label]})},this)},setTracksInactive:function(a){j.forEach(a,
  function(a){this._findTrack(a.label,function(a){a.checkbox.checked=!1})},this)},_textFilter:function(){this.inherited(arguments);this._updateAllTitles()},show:function(){},hide:function(){},toggle:function(){}})})},"dijit/TitlePane":function(){define("dojo/_base/array,dojo/_base/declare,dojo/dom,dojo/dom-attr,dojo/dom-class,dojo/dom-geometry,dojo/_base/event,dojo/fx,dojo/_base/kernel,dojo/keys,./_CssStateMixin,./_TemplatedMixin,./layout/ContentPane,dojo/text!./templates/TitlePane.html,./_base/manager".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l){return j("dijit.TitlePane",[r,n,k],{title:"",_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!0,toggleable:!0,tabIndex:"0",duration:l.defaultDuration,baseClass:"dijitTitlePane",templateString:m,doLayout:!1,_setTooltipAttr:{node:"focusNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);h.setSelectable(this.titleNode,!1)},postCreate:function(){this.inherited(arguments);this.toggleable&&this._trackMouseState(this.titleBarNode,
  "dijitTitlePaneTitle");var a=this.hideNode,c=this.wipeNode;this._wipeIn=b.wipeIn({node:c,duration:this.duration,beforeBegin:function(){a.style.display=""}});this._wipeOut=b.wipeOut({node:c,duration:this.duration,onEnd:function(){a.style.display="none"}})},_setOpenAttr:function(a,b){i.forEach([this._wipeIn,this._wipeOut],function(a){a&&"playing"==a.status()&&a.stop()});b?this[a?"_wipeIn":"_wipeOut"].play():this.hideNode.style.display=this.wipeNode.style.display=a?"":"none";if(this._started)if(a)this._onShow();
  else this.onHide();this.containerNode.setAttribute("aria-hidden",a?"false":"true");this.focusNode.setAttribute("aria-pressed",a?"true":"false");this._set("open",a);this._setCss()},_setToggleableAttr:function(a){this.focusNode.setAttribute("role",a?"button":"heading");a?(this.focusNode.setAttribute("aria-controls",this.id+"_pane"),this.focusNode.setAttribute("tabIndex",this.tabIndex),this.focusNode.setAttribute("aria-pressed",this.open)):(g.remove(this.focusNode,"aria-controls"),g.remove(this.focusNode,
  "tabIndex"),g.remove(this.focusNode,"aria-pressed"));this._set("toggleable",a);this._setCss()},_setContentAttr:function(a){!this.open||!this._wipeOut||"playing"==this._wipeOut.status()?this.inherited(arguments):(this._wipeIn&&"playing"==this._wipeIn.status()&&this._wipeIn.stop(),d.setMarginBox(this.wipeNode,{h:d.getMarginBox(this.wipeNode).h}),this.inherited(arguments),this._wipeIn?this._wipeIn.play():this.hideNode.style.display="")},toggle:function(){this._setOpenAttr(!this.open,!0)},_setCss:function(){var a=
  this.titleBarNode||this.focusNode,b=this._titleBarClass;this._titleBarClass="dijit"+(this.toggleable?"":"Fixed")+(this.open?"Open":"Closed");e.replace(a,this._titleBarClass,b||"");this.arrowNodeInner.innerHTML=this.open?"-":"+"},_onTitleKey:function(b){b.keyCode==a.ENTER||b.keyCode==a.SPACE?this.toggleable&&(this.toggle(),c.stop(b)):b.keyCode==a.DOWN_ARROW&&this.open&&(this.containerNode.focus(),b.preventDefault())},_onTitleClick:function(){this.toggleable&&this.toggle()},setTitle:function(a){f.deprecated("dijit.TitlePane.setTitle() is deprecated.  Use set('title', ...) instead.",
  "","2.0");this.set("title",a)}})})},"dojo/fx":function(){define("./_base/lang,./Evented,./_base/kernel,./_base/array,./_base/connect,./_base/fx,./dom,./dom-style,./dom-geometry,./ready,require".split(","),function(i,j,h,g,e,d,c,b,f,a,k){h.isAsync||a(0,function(){k(["./fx/Toggler"])});var h=h.fx={},a={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}},n=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;g.forEach(this._animations,
  function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};n.prototype=new j;i.extend(n,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){e.disconnect(this._onAnimateCtx);e.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=e.connect(this._current,"onAnimate",this,"_onAnimate"),this._onEndCtx=e.connect(this._current,
  "onEnd",this,"_onEnd"),this._current.play(0,!0))},play:function(a,b){if(!this._current)this._current=this._animations[this._index=0];if(!b&&"playing"==this._current.status())return this;var c=e.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),d=e.connect(this._current,"onBegin",this,function(a){this._fire("onBegin",arguments)}),f=e.connect(this._current,"onPlay",this,function(a){this._fire("onPlay",arguments);e.disconnect(c);e.disconnect(d);e.disconnect(f)});this._onAnimateCtx&&
  e.disconnect(this._onAnimateCtx);this._onAnimateCtx=e.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&e.disconnect(this._onEndCtx);this._onEndCtx=e.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=e.connect(this._current,"onPause",this,function(b){this._fire("onPause",arguments);e.disconnect(a)});this._current.pause()}return this},gotoPercent:function(a,b){this.pause();var c=this.duration*
  a;this._current=null;g.some(this._animations,function(a){if(a.duration<=c)return this._current=a,!0;c-=a.duration;return!1});this._current&&this._current.gotoPercent(c/this._current.duration,b);return this},stop:function(a){if(this._current){if(a){for(;this._index+1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var b=e.connect(this._current,"onStop",this,function(a){this._fire("onStop",arguments);e.disconnect(b)});this._current.stop()}return this},
  status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&e.disconnect(this._onAnimateCtx);this._onEndCtx&&e.disconnect(this._onEndCtx)}});i.extend(n,a);h.chain=function(a){return new n(a)};var r=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;g.forEach(a,function(a){var b=a.duration;a.delay&&(b+=a.delay);if(this.duration<b)this.duration=b;this._connects.push(e.connect(a,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=
  new d.Animation({curve:[0,1],duration:this.duration});var b=this;g.forEach("beforeBegin,onBegin,onPlay,onAnimate,onPause,onStop,onEnd".split(","),function(a){b._connects.push(e.connect(b._pseudoAnimation,a,function(){b._fire(a,arguments)}))})};i.extend(r,{_doAction:function(a,b){g.forEach(this._animations,function(c){c[a].apply(c,b)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,
  b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;g.forEach(this._animations,function(a){a.gotoPercent(a.duration<c?1:c/a.duration,b)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},
  destroy:function(){g.forEach(this._connects,e.disconnect)}});i.extend(r,a);h.combine=function(a){return new r(a)};h.wipeIn=function(a){var f=a.node=c.byId(a.node),g=f.style,h,a=d.animateProperty(i.mixin({properties:{height:{start:function(){h=g.overflow;g.overflow="hidden";if("hidden"==g.visibility||"none"==g.display)return g.height="1px",g.display="",g.visibility="",1;var a=b.get(f,"height");return Math.max(a,1)},end:function(){return f.scrollHeight}}}},a)),k=function(){g.height="auto";g.overflow=
  h};e.connect(a,"onStop",k);e.connect(a,"onEnd",k);return a};h.wipeOut=function(a){var b=(a.node=c.byId(a.node)).style,f,a=d.animateProperty(i.mixin({properties:{height:{end:1}}},a));e.connect(a,"beforeBegin",function(){f=b.overflow;b.overflow="hidden";b.display=""});var g=function(){b.overflow=f;b.height="auto";b.display="none"};e.connect(a,"onStop",g);e.connect(a,"onEnd",g);return a};h.slideTo=function(a){var g=null,h=null,k=function(a){return function(){var c=b.getComputedStyle(a),d=c.position;
  g="absolute"==d?a.offsetTop:parseInt(c.top)||0;h="absolute"==d?a.offsetLeft:parseInt(c.left)||0;if("absolute"!=d&&"relative"!=d)c=f.position(a,!0),g=c.y,h=c.x,a.style.position="absolute",a.style.top=g+"px",a.style.left=h+"px"}}(a.node=c.byId(a.node));k();a=d.animateProperty(i.mixin({properties:{top:a.top||0,left:a.left||0}},a));e.connect(a,"beforeBegin",a,k);return a};return h})},"url:dijit/templates/TitlePane.html":'<div>\n\t<div data-dojo-attach-event="onclick:_onTitleClick, onkeydown:_onTitleKey"\n\t\t\tclass="dijitTitlePaneTitle" data-dojo-attach-point="titleBarNode" id="${id}_titleBarNode">\n\t\t<div class="dijitTitlePaneTitleFocus" data-dojo-attach-point="focusNode">\n\t\t\t<img src="${_blankGif}" alt="" data-dojo-attach-point="arrowNode" class="dijitArrowNode" role="presentation"\n\t\t\t/><span data-dojo-attach-point="arrowNodeInner" class="dijitArrowNodeInner"></span\n\t\t\t><span data-dojo-attach-point="titleNode" class="dijitTitlePaneTextNode"></span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTitlePaneContentOuter" data-dojo-attach-point="hideNode" role="presentation">\n\t\t<div class="dijitReset" data-dojo-attach-point="wipeNode" role="presentation">\n\t\t\t<div class="dijitTitlePaneContentInner" data-dojo-attach-point="containerNode" role="region" id="${id}_pane" aria-labelledby="${id}_titleBarNode">\n\t\t\t\t<\!-- nested divs because wipeIn()/wipeOut() doesn\'t work right on node w/padding etc.  Put padding on inner div. --\>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',
  "JBrowse/View/TrackList/_TextFilterMixin":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/dom-construct,dojo/dom-class,dojo/keys,dojo/query".split(","),function(i,j,h,g,e,d){return i(null,{_makeTextFilterNodes:function(c){this.textFilterDiv=h.create("div",{className:"textfilter",style:{position:"relative",overflow:"hidden"}},c);this.textFilterInput=h.create("input",{type:"text",placeholder:"filter by text",onkeypress:j.hitch(this,function(b){if(b.keyCode==e.ESCAPE)this.textFilterInput.value=
  "";this.textFilterTimeout&&window.clearTimeout(this.textFilterTimeout);this.textFilterTimeout=window.setTimeout(j.hitch(this,function(){this._updateTextFilterControl();this._textFilter(this.textFilterInput.value)}),500);this._updateTextFilterControl();b.stopPropagation()})},this.textFilterDiv);this.textFilterClearButton=h.create("div",{className:"jbrowseIconCancel",onclick:j.hitch(this,function(){this._clearTextFilterControl();this._textFilter(this.textFilterInput.value)})},this.textFilterDiv)},_clearTextFilterControl:function(){this.textFilterInput.value=
  "";this._updateTextFilterControl()},_updateTextFilterControl:function(){this.textFilterInput.value.length?g.remove(this.textFilterDiv,"dijitDisabled"):g.add(this.textFilterDiv,"dijitDisabled")},_textFilter:function(c){c&&/\S/.test(c)?(c=c.toLowerCase(),d(".tracklist-label",this.containerNode).forEach(function(b){-1!=b.innerHTML.toLowerCase().indexOf(c)?(g.remove(b,"collapsed"),g.add(b,"shown")):(g.add(b,"collapsed"),g.remove(b,"shown"))})):d(".tracklist-label",this.containerNode).removeClass("collapsed").addClass("shown")}})})},
  "JBrowse/Store/Sequence/StaticChunked":function(){define(["JBrowse/Store/SeqFeature/SequenceChunks"],function(i){return i})},"JBrowse/Store/SeqFeature/SequenceChunks":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/request,dojo/promise/all,dojo/Deferred,JBrowse/Store/SeqFeature,JBrowse/Util,JBrowse/Model/SimpleFeature,JBrowse/Digest/Crc32".split(","),function(i,j,h,g,e,d,c,b,f){return i(d,{constructor:function(a){this.chunkCache={};this.compress=a.compress;this.urlTemplate=a.urlTemplate;
  if(!this.urlTemplate)throw"no urlTemplate provided, cannot open sequence store";this.baseUrl=a.baseUrl;this.seqChunkSize=a.seqChunkSize},getFeatures:function(a,b,c,d){var d=d||function(a){console.error(a)},h=a.ref;if(!this.browser.compareReferenceNames(this.refSeq.name,h))h=this.refSeq.name;for(var i=a.seqChunkSize||h==this.refSeq.name&&this.refSeq.seqChunkSize||this.seqChunkSize||(this.compress?8E4:2E4),p=this.resolveUrl(this.urlTemplate,{refseq:h,refseq_dirpath:function(){for(var a=f.crc32(h).toString(16).toLowerCase().replace("-",
  "n");8>a.length;)a="0"+a;for(var b=[],c=0;c<a.length;c+=3)b.push(a.substring(c,c+3));return b.join("/")}}),q=Math.floor(Math.max(0,a.start)/i),a=Math.floor((a.end-1)/i),s,u=[];q<=a;q++)(function(a){var c=this,f=new e;this._fetchChunk(p,a).then(j.hitch(f,"resolve"),function(a){404==a.response.status?f.resolve(""):f.reject(a)});f.then(function(d){s||b(c._makeFeature(h,a,i,d))},function(a){s||d(s=a)});u.push(f)}).call(this,q);g(u).then(c)},_fetchChunk:function(a,b){return h.get(a+b+".txt"+(this.compress?
  "z":""),{handleAs:"text"})},_makeFeature:function(a,c,d,e){return new b({data:{start:c*d,end:c*d+e.length,residues:e,seq_id:a,name:a}})}})})},"JBrowse/Store/SeqFeature":function(){define(["dojo/_base/declare","dojo/_base/lang","JBrowse/Store","JBrowse/Store/LRUCache"],function(i,j,h,g){return i(h,{constructor:function(){this.globalStats={}},_evalConf:function(e){return"function"==typeof e?e.call(this,this):e},getGlobalStats:function(e){e(this.globalStats||{})},getRegionStats:function(e,d,c){return this._getRegionStats.apply(this,
  arguments)},_getRegionStats:function(e,d,c){var b=this;(b._regionStatsCache=b._regionStatsCache||new g({name:"regionStatsCache",maxSize:1E3,sizeFunction:function(){return 1},fillCallback:function(c,a){var d={scoreMax:-Infinity,scoreMin:Infinity,scoreSum:0,scoreSumSquares:0,basesCovered:c.end-c.start,featureCount:0};b.getFeatures(c,function(a){a=a.get("score")||0;d.scoreMax=Math.max(a,d.scoreMax);d.scoreMin=Math.min(a,d.scoreMin);d.scoreSum+=a;d.scoreSumSquares+=a*a;d.featureCount++},function(){d.scoreMean=
  d.featureCount?d.scoreSum/d.featureCount:0;d.scoreStdDev=b._calcStdFromSums(d.scoreSum,d.scoreSumSquares,d.featureCount);d.featureDensity=d.featureCount/d.basesCovered;a(d)},function(b){a(null,b)})}})).get(e,function(b,a){a?c(a):d(b)})},_calcStdFromSums:function(e,d,c){if(0==c)return 0;e=d-e*e/c;1<c&&(e/=c-1);return 0>e?0:Math.sqrt(e)},getFeatures:function(e,d,c){c()},getReferenceSequence:function(e,d,c){for(var b=e.end-e.start,f="";f.length<b;)f+=" ";this.getFeatures(j.mixin({reference_sequences_only:!0},
  e),function(a){var b=a.get("residues")||a.get("seq");if(b){var c=f,a=a.get("start")-e.start,d=0;0>a&&(d=-a,a=0);var g=Math.min(c.length-a,b.length-d);f=c.substr(0,a)+b.substr(d,g)+c.substr(a+g)}},function(){d(f)},c)}})})},"JBrowse/Store":function(){define(["dojo/_base/declare","JBrowse/Component"],function(i,j){var h=0;return i(j,{namePrefix:"store-",constructor:function(g){this.refSeq=dojo.clone(g.refSeq);this.name=g.name||this.namePrefix+ ++h;this.changeCallback=g.changeCallback||function(){}},
  notifyChanged:function(g){this.changeCallback&&this.changeCallback(g)},_failAllDeferred:function(g){var e=this._deferred||{},d;for(d in e)e.hasOwnProperty(d)&&e[d].reject(g)}})})},"JBrowse/Model/SimpleFeature":function(){define(["JBrowse/Util"],function(i){var j=0,h=i.fastDeclare({constructor:function(g){g=g||{};this.data=g.data||{};this._parent=g.parent;this._uniqueID=g.id||this.data.uniqueID||(this._parent?this._parent.id()+"_"+j++:"SimpleFeature_"+j++);if(g=this.data.subfeatures)for(var e=0;e<
  g.length;e++)"function"!=typeof g[e].get&&(g[e]=new h({data:g[e],parent:this}))},get:function(g){return this.data[g]},set:function(g,e){this.data[g]=e},tags:function(){var g=[],e=this.data,d;for(d in e)e.hasOwnProperty(d)&&g.push(d);return g},id:function(g){if(g)this._uniqueID=g;return this._uniqueID},parent:function(){return this._parent},children:function(){return this.get("subfeatures")}});return h})},"JBrowse/Store/SeqFeature/NCList":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/Deferred,dojo/request/xhr,JBrowse/Store/SeqFeature,JBrowse/Store/DeferredFeaturesMixin,JBrowse/Store/DeferredStatsMixin,JBrowse/Util,JBrowse/Model/ArrayRepr,JBrowse/Store/NCList,JBrowse/Store/LazyArray".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k){var n=function(){return this._uniqueID},r=function(){return this._parent},m=function(){return this.get("subfeatures")};return i(e,{constructor:function(a){this.args=a;this.baseUrl=a.baseUrl;this.urlTemplates={root:a.urlTemplate};this._deferred={}},makeNCList:function(){return new a},loadNCList:function(a,b,c){a.nclist.importExisting(b.intervals.nclist,a.attrs,c,b.intervals.urlTemplate,b.intervals.lazyClass)},getDataRoot:function(a){if(!this._deferred.root||this.curRefName!=
  a){this._deferred.root=new h;this.curRefName=a;var b={nclist:this.makeNCList()},c=this.resolveUrl(this._evalConf(this.urlTemplates.root),{refseq:a}),d=this;g.get(c,{handleAs:"json",failOk:!0}).then(function(a){d._handleTrackInfo(b,a,c)},function(a){404==a.response.status?d._handleTrackInfo(b,{},c):200!=a.response.status?d._failAllDeferred("Server returned an HTTP "+a.response.status+" error"):d._failAllDeferred(a)})}return this._deferred.root},_handleTrackInfo:function(a,b,c){a.stats={featureCount:b.featureCount||
  0,featureDensity:(b.featureCount||0)/this.refSeq.length};this.empty=!b.featureCount;if(b.intervals)a.attrs=new f(b.intervals.classes),this.loadNCList(a,b,c);if((b=b.histograms)&&b.meta){for(var d=0;d<b.meta.length;d++)b.meta[d].lazyArray=new k(b.meta[d].arrayParams,c);a._histograms=b}this._deferred.root.resolve(a)},getGlobalStats:function(a,b){return(this._deferred.root||this.getDataRoot(this.browser.refSeq.name)).then(function(b){a(b.stats)},b)},getRegionStats:function(a,b,c){this.getDataRoot(a.ref).then(function(a){b(a.stats)},
  c)},getRegionFeatureDensities:function(a,b,c){this.getDataRoot(a.ref).then(function(c){var d,e;if(a.numBins)d=a.numBins,e=(a.end-a.start)/d;else if(a.basesPerBin)e=a.basesPerBin,d=Math.ceil((a.end-a.start)/e);else throw Error("numBins or basesPerBin arg required for getRegionFeatureDensities");for(var f=function(a,b){for(var c=0;c<b.length;c++)if(b[c].basesPerBin>=a)return b[c]}(e,c._histograms.stats||[]),g=c._histograms.meta[0],h=0;h<c._histograms.meta.length;h++)e>=c._histograms.meta[h].basesPerBin&&
  (g=c._histograms.meta[h]);var i=e/g.basesPerBin;if(0.9<i&&1.0E-4>Math.abs(i-Math.round(i))){for(var k=Math.floor(a.start/g.basesPerBin),i=Math.round(i),j=[],c=0;c<d;c++)j[c]=0;g.lazyArray.range(k,k+i*d,function(a,b){j[Math.floor((a-k)/i)]+=b},function(){b({bins:j,stats:f})})}else c.nclist.histogram.call(c.nclist,a.start,a.end,d,function(a){b({bins:a,stats:f})})},c)},getFeatures:function(a,b,c,d){if(this.empty)c();else{var e=this;this.getDataRoot(a.ref).then(function(f){e._getFeatures(f,a,b,c,d)},
  d)}},_getFeatures:function(a,b,c,d,e){var f=this,g=b.start,b=b.end,h=a.attrs.accessors();a.nclist.iterate.call(a.nclist,g,b,function(a,b){if(!a.decorated){var d=b.join(",");f._decorate_feature(h,a,d)}return c(a)},d,e)},_decorate_feature:function(a,b,c,d){b.get=a.get;b.tags=a.tags;b._uniqueID=c;b.id=n;b._parent=d;b.parent=r;b.children=m;dojo.forEach(b.get("subfeatures"),function(d,e){this._decorate_feature(a,d,c+"-"+e,b)},this);b.decorated=!0}})})},"JBrowse/Store/DeferredFeaturesMixin":function(){define(["dojo/_base/declare",
  "dojo/Deferred"],function(i,j){return i(null,{constructor:function(){this._deferFeatures()},_deferFeatures:function(){if(!this._deferred)this._deferred={};this._deferred.features=new j},getFeatures:function(h,g,e,d){this._deferred.features.then(dojo.hitch(this,"_getFeatures",h,g,e,d),d)}})})},"JBrowse/Store/DeferredStatsMixin":function(){define(["dojo/_base/declare","dojo/Deferred","JBrowse/Util"],function(i,j){return i(null,{constructor:function(){this._deferGlobalStats()},_deferGlobalStats:function(){if(!this._deferred)this._deferred=
  {};this._deferred.stats=new j},getGlobalStats:function(h,g){this._deferred.stats.then(dojo.hitch(this,"_getGlobalStats",h,g),g)},_getGlobalStats:function(h){h(this.globalStats||{})},getRegionStats:function(h,g,e){this._deferred.stats.then(dojo.hitch(this,"_getRegionStats",h,g,e),e)}})})},"JBrowse/Model/ArrayRepr":function(){define([],function(){function i(i){this.classes=i;this.fields=[];for(var h=0;h<i.length;h++){this.fields[h]={};for(var g=0;g<i[h].attributes.length;g++)this.fields[h][i[h].attributes[g]]=
  g+1;if(void 0===i[h].proto)i[h].proto={};if(void 0===i[h].isArrayAttr)i[h].isArrayAttr={}}}i.prototype.attrIndices=function(i){return this.classes.map(function(h){return h.attributes.indexOf(i)+1||h.attributes.indexOf(i.toLowerCase())+1||void 0})};i.prototype.get=function(i,h){if(h in this.fields[i[0]])return i[this.fields[i[0]][h]];var g=h.toLowerCase();if(g in this.fields[i[0]])return i[this.fields[i[0]][g]];g=this.classes[i[0]].attributes.length+1;if(g>=i.length||!(h in i[g])){if(h in this.classes[i[0]].proto)return this.classes[i[0]].proto[h]}else return i[g][h]};
  i.prototype.set=function(i,h,g){if(h in this.fields[i[0]])i[this.fields[i[0]][h]]=g;else{var e=h.toLowerCase();e in this.fields[i[0]]?i[this.fields[i[0]][e]]=g:(e=this.classes[i[0]].attributes.length+1,e>=i.length&&(i[e]={}),i[e][h]=g)}};i.prototype.makeSetter=function(i){var h=this;return function(g,e){h.set(g,i,e)}};i.prototype.makeGetter=function(i){var h=this;return function(g){return h.get(g,i)}};i.prototype.makeFastSetter=function(i){var h=this.attrIndices(i);return function(g,e){void 0!==h[g[0]]&&
  (g[h[g[0]]]=e)}};i.prototype.makeFastGetter=function(i){var h=this.attrIndices(i);return function(g){if(void 0!==h[g[0]])return g[h[g[0]]]}};i.prototype.construct=function(i,h,g){var i=Array(i.classes[g].length),e;for(e in h)this.set(i,e,h[e]);return i};i.prototype.accessors=function(){return this._accessors=this._accessors||this._makeAccessors()};i.prototype._makeAccessors=function(){var i={},h,g={get:function(d){if(d=this.get.field_accessors[d])return d.call(this)},set:function(d,c){var b=this.set.field_accessors[d];
  if(b)return b.call(this,c)},tags:function(){return h[this[0]]||[]}};g.get.field_accessors={};g.set.field_accessors={};dojo.forEach(this.classes,function(d,c){dojo.forEach(d.attributes||[],function(b,d){i[b]=i[b]||[];i[b][c]=d+1;b=b.toLowerCase();i[b]=i[b]||[];i[b][c]=d+1})});h=dojo.map(this.classes,function(d){return d.attributes});for(var e in i)i.hasOwnProperty(e)&&(g.get.field_accessors[e]=function(){var d=i[e];return!d?function(){}:function(){return this[d[this[0]]]}}(),g.set.field_accessors[e]=
  function(){var d=i[e];return!d?function(){}:function(c){return this[d[this[0]]]=c}}());return g};return i})},"JBrowse/Store/NCList":function(){define(["dojo/request","dojo/promise/all","dojo/Deferred","JBrowse/Util"],function(i,j,h,g){function e(){this.topList=[]}e.prototype.importExisting=function(d,c,b,e,a){this.topList=d;this.attrs=c;this.start=c.makeFastGetter("Start");this.end=c.makeFastGetter("End");this.lazyClass=a;this.baseURL=b;this.lazyUrlTemplate=e;this.lazyChunks={}};e.prototype.fill=
  function(d,c){if(0==d.length)this.topList=[];else{this.attrs=c;this.start=c.makeFastGetter("Start");this.end=c.makeFastGetter("End");var b=c.makeSetter("Sublist"),e=this.start,a=this.end;d.sort(function(b,c){return e(b)!=e(c)?e(b)-e(c):a(c)-a(b)});var g=[],h=[];this.topList=h;h.push(d[0]);if(1!=d.length)for(var i,j,l=1,p=d.length;l<p;l++)if(i=d[l],a(i)<a(d[l-1]))g.push(h),h=Array(i),b(d[l-1],h);else for(;;)if(0==g.length){h.push(i);break}else if(j=g[g.length-1],a(j[j.length-1])>a(i)){h.push(i);break}else h=
  g.pop()}};e.prototype.binarySearch=function(d,c,b){for(var e=-1,a=d.length,g;1<a-e;)g=e+a>>>1,b(d[g])>=c?a=g:e=g;return b===this.end?a:e};e.prototype.iterHelper=function(d,c,b,e,a,k,n,r){for(var m=d.length,l=this.binarySearch(d,c,k),p=this.attrs.makeGetter("Chunk"),q=this.attrs.makeGetter("Sublist"),s=[];l<m&&0<=l&&a*n(d[l])<a*b;){d[l][0]==this.lazyClass?function(){var j=this,m=p(d[l]);m in this.lazyChunks||(this.lazyChunks[m]={});var t=new h;s.push(t.promise);i.get(g.resolveUrl(this.baseURL,this.lazyUrlTemplate.replace(/\{Chunk\}/ig,
  m)),{handleAs:"json"}).then(function(d){return j.iterHelper(d,c,b,e,a,k,n,[m]).then(function(){t.resolve()})},function(a){if(404!=a.response.status)throw Error(a);t.resolve()})}.call(this):e(d[l],r.concat(l));var u=q(d[l]);u&&s.push(this.iterHelper(u,c,b,e,a,k,n,r.concat(l)));l+=a}return j(s)};e.prototype.iterate=function(d,c,b,e){var a=d>c?this.start:this.end,g=d>c?this.end:this.start;0<this.topList.length&&this.iterHelper(this.topList,d,c,b,d>c?-1:1,a,g,[0]).then(e)};e.prototype.histogram=function(d,
  c,b,e){for(var a=Array(b),g=(c-d)/b,h=this.start,i=this.end,j=0;j<b;j++)a[j]=0;this.iterate(d,c,function(c){for(var e=Math.max(0,(h(c)-d)/g|0),c=Math.min(b,(i(c)-d)/g|0);e<=c;e++)a[e]++},function(){e(a)})};return e})},"JBrowse/Store/LazyArray":function(){define(["JBrowse/Util","JBrowse/Finisher","dojo/_base/xhr"],function(i,j){var h=function(g,e){this.urlTemplate=g.urlTemplate;this.chunkSize=g.chunkSize;this.length=g.length;this.baseUrl=void 0===e?"":e;this.chunks=[];this.toProcess={}};h.prototype.index=
  function(g,e,d){this.range(g,g,e,void 0,d)};h.prototype.range=function(g,e,d,c,b){var g=Math.max(0,g),e=Math.min(e,this.length-1),f=Math.floor(g/this.chunkSize),a=Math.floor(e/this.chunkSize);void 0===c&&(c=function(){});for(var h=new j(c),c=f;c<=a;c++)this.chunks[c]?this._processChunk(g,e,c,d,b):(f={start:g,end:e,callback:d,param:b,finish:h},h.inc(),this.toProcess[c]?this.toProcess[c].push(f):(this.toProcess[c]=[f],f=this.urlTemplate.replace(/\{Chunk\}/gi,c),dojo.xhrGet({url:this.baseUrl?i.resolveUrl(this.baseUrl,
  f):f,handleAs:"json",load:this._makeLoadFun(c),error:function(){h.dec()}})));h.finish()};h.prototype._makeLoadFun=function(g){var e=this;return function(d){e.chunks[g]=d;d=e.toProcess[g];delete e.toProcess[g];for(var c=0;c<d.length;c++)e._processChunk(d[c].start,d[c].end,g,d[c].callback,d[c].param),d[c].finish.dec()}};h.prototype._processChunk=function(g,e,d,c,b){for(var f=d*this.chunkSize,e=e-f,g=Math.max(0,g-f),e=Math.min(e,this.chunkSize-1);g<=e;g++)c(g+f,this.chunks[d][g],b)};return h})},"JBrowse/Finisher":function(){define(["dojo/_base/declare"],
  function(i){return i(null,{constructor:function(i){this.fun=i;this.count=0;this.finished=!1},inc:function(){this.count++},dec:function(){this.count--;this.finish()},finish:function(){if(0>=this.count&&!this.finished)this.fun(),this.finished=!0}})})},"JBrowse/Store/TiledImage/Fixed":function(){define(["dojo/_base/declare","dojo/_base/Deferred","JBrowse/Store","JBrowse/Store/DeferredStatsMixin","JBrowse/Util"],function(i,j,h,g,e){return i([h,g],{constructor:function(d){this.tileToImage={};this.zoomCache=
  {};this.baseUrl=d.baseUrl;this.url=this.resolveUrl(d.urlTemplate);this._deferred.images=new j;dojo.xhrGet({url:this.url,handleAs:"json",failOk:!0,load:dojo.hitch(this,function(c){this.loadSuccess(c)}),error:dojo.hitch(this,"_failAllDeferred")})},loadSuccess:function(d){this.globalStats=d.stats||{};if(!("scoreMin"in this.globalStats))this.globalStats.scoreMin=this.globalStats.global_min;if(!("scoreMax"in this.globalStats))this.globalStats.scoreMax=this.globalStats.global_max;this.tileWidth=d.tileWidth;
  this.align=d.align;this.zoomLevels=d.zoomLevels;this._deferred.stats.resolve({success:!0});this._deferred.images.resolve({success:!0})},_getZoom:function(d){var c=this.zoomCache[d];if(c)return c;for(var c=this.zoomLevels[0],b=this.tileWidth/d,e=1;e<this.zoomLevels.length;e++)Math.abs(this.zoomLevels[e].basesPerTile-b)<Math.abs(c.basesPerTile-b)&&(c=this.zoomLevels[e]);return this.zoomCache[d]=c},getImages:function(d,c,b){var e=this;this._deferred.images.then(function(a){a.success?e._getImages(d,c,
  b):(e.error=a.error,b(a.error||a))},b)},_getImages:function(d,c){for(var b=d.start,e=d.end,a=this._getZoom(d.scale||1),g=Math.max(b/a.basesPerTile,0)|0,e=e/a.basesPerTile|0,b=[],h=g;h<=e;h++)g=document.createElement("img"),dojo.connect(g,"onerror",this.handleImageError),g.src=this._imageSource(a,h),g.startBase=h*a.basesPerTile,g.baseWidth=a.basesPerTile,g.tileNum=h,b.push(g);c(b)},_imageSource:function(d,c){return e.resolveUrl(this.url,d.urlPrefix+c+".png")}})})},"JBrowse/Store/Names/Hash":function(){define("dojo/_base/declare,dojo/_base/array,dojo/store/util/QueryResults,JBrowse/Util,JBrowse/Store/Hash,JBrowse/Model/Location".split(","),
  function(i,j,h,g,e,d){return i(e,{constructor:function(c){this.tooManyMatchesMessage=c.tooManyMatchesMessage||"(too many matches to display)";var b=this.stopPrefixes={};c.stopPrefixes&&dojo.forEach("string"==typeof c.stopPrefixes?[c.stopPrefixes]:c.stopPrefixes,function(c){for(;c.length;)b[c]=!0,c=c.substr(0,c.length-1)})},_nameRecordToItem:function(c){if(c.hitLimit)return{name:this.tooManyMatchesMessage,hitLimit:!0};var b={};if("object"==typeof c){b.name=c[0];var e=this._findTrackConfig(((this.meta||
  {}).track_names||{})[c[1]]);b.location=new d({ref:c[3],start:parseInt(c[4]),end:parseInt(c[5]),tracks:[e],objectName:c[0]})}else b.name=c;return b},_findTrackConfig:function(c){if(!c)return null;var b=null;j.some(this.browser.config.tracks,function(d){return d.label==c?(b=d,!0):!1});return b},_makeResults:function(c){var c=j.map(c,dojo.hitch(this,"_nameRecordToItem")).sort(function(a,b){return a.name.localeCompare(b.name)||a.location.localeCompare(b.location)}),b,d,c=j.filter(c,function(a){if(a.hitLimit){d=
  a;if(!d.label)d.label=d.name||"too many matches";return!1}if(b&&b.name==a.name)return b.label=b.name+' <span class="multipleLocations">multiple locations</span>',b.multipleLocations?b.multipleLocations.push(a.location):(b.multipleLocations=[b.location,a.location],delete b.location),!1;b=a;b.label=b.name+(b.location?' <span class="locString">'+b.location+"</span>":"");return!0});d&&c.push(d);return h(c)},query:function(c){var b=this,c=(c.name||"").toString();this.meta.lowercase_keys&&(c=c.toLowerCase());
  var d=/\*$/;return d.test(c)?(c=c.replace(d,""),this._getEntry(c).then(function(a){a=a||{};return b._makeResults((a.exact||[]).concat(a.prefix||[]))})):this._getEntry(c).then(function(a){return b._makeResults((a||{}).exact||[])})},get:function(c){this.meta.lowercase_keys&&(c=c.toLowerCase());return this._getEntry(c).then(function(b){return(b=(b.exact||[])[0])?this._nameRecordToItem(b):null})},_getEntry:function(c){return this._getBucket(c).then(function(b){return b[c]})}})})},"JBrowse/Store/Hash":function(){define(["dojo/_base/declare",
  "dojo/_base/array","dojo/store/JsonRest","dojo/store/util/QueryResults","JBrowse/Digest/Crc32"],function(i,j,h,g,e){return i(null,{constructor:function(d){var c=/\/$/.test(d.url)?d.url:d.url+"/";this.bucketStore=new h({target:c});this.meta={};this.browser=d.browser;this.ready=this._readMeta()},_readMeta:function(){var d=this;return this.bucketStore.get("meta.json").then(function(c){dojo.mixin(d.meta,c||{});d.meta.hash_hex_characters=Math.ceil(d.meta.hash_bits/4)})},query:function(d){return this.get((d.name||
  "").toString()).then(function(c){return g((c||{}).exact||[])})},get:function(d){return this._getBucket(d).then(function(c){return c[d]})},_getBucket:function(d){var c=this;return this.ready.then(function(){var b=c._hash(d);return c.bucketStore.get(c._hexToDirPath(b))})},_hexToDirPath:function(d){for(;8>d.length;)d="0"+d;for(var d=d.substr(8-this.meta.hash_hex_characters),c=[],b=0;b<d.length;b+=3)c.push(d.substring(b,b+3));return c.join("/")+".json"+(this.meta.compress?"z":"")},_hash:function(d){return e.objectFingerprint(d).toString(16).toLowerCase().replace("-",
  "n")},getIdentity:function(d){return d.id}})})},"dojo/store/JsonRest":function(){define(["../_base/xhr","../_base/lang","../json","../_base/declare","./util/QueryResults"],function(i,j,h,g,e){return g("dojo.store.JsonRest",null,{constructor:function(d){this.headers={};g.safeMixin(this,d)},headers:{},target:"",idProperty:"id",get:function(d,c){var c=c||{},b=j.mixin({Accept:this.accepts},this.headers,c.headers||c);return i("GET",{url:this.target+d,handleAs:"json",headers:b})},accepts:"application/javascript, application/json",
  getIdentity:function(d){return d[this.idProperty]},put:function(d,c){var c=c||{},b="id"in c?c.id:this.getIdentity(d),e="undefined"!=typeof b;return i(e&&!c.incremental?"PUT":"POST",{url:e?this.target+b:this.target,postData:h.stringify(d),handleAs:"json",headers:j.mixin({"Content-Type":"application/json",Accept:this.accepts,"If-Match":!0===c.overwrite?"*":null,"If-None-Match":!1===c.overwrite?"*":null},this.headers,c.headers)})},add:function(d,c){c=c||{};c.overwrite=!1;return this.put(d,c)},remove:function(d,
  c){c=c||{};return i("DELETE",{url:this.target+d,headers:j.mixin({},this.headers,c.headers)})},query:function(d,c){var c=c||{},b=j.mixin({Accept:this.accepts},this.headers,c.headers);if(0<=c.start||0<=c.count)b.Range=b["X-Range"]="items="+(c.start||"0")+"-"+("count"in c&&Infinity!=c.count?c.count+(c.start||0)-1:"");var f=-1<this.target.indexOf("?");d&&"object"==typeof d&&(d=(d=i.objectToQuery(d))?(f?"&":"?")+d:"");if(c&&c.sort){for(var a=this.sortParam,d=d+((d||f?"&":"?")+(a?a+"=":"sort(")),f=0;f<
  c.sort.length;f++)var g=c.sort[f],d=d+((0<f?",":"")+(g.descending?"-":"+")+encodeURIComponent(g.attribute));a||(d+=")")}var h=i("GET",{url:this.target+(d||""),handleAs:"json",headers:b});h.total=h.then(function(){var a=h.ioArgs.xhr.getResponseHeader("Content-Range");return a&&(a=a.match(/\/(.*)/))&&+a[1]});return e(h)}})})},"JBrowse/Store/Names/REST":function(){define("dojo/_base/declare,dojo/_base/array,dojo/store/util/QueryResults,dojo/request/xhr,dojo/io-query,JBrowse/Store/Hash".split(","),function(i,
  j,h,g,e){return i(null,{constructor:function(d){this.url=d.url},query:function(d){var c="equals",d=""+d.name;/\*$/.test(d)&&(d=d.replace(/\*$/,""),c="startswith");var b={};b[c]=d;return g(this.url+"?"+e.objectToQuery(b),{handleAs:"json"}).then(function(b){for(var a=0;a<b.length;a++){var c=b[a];c.label=c.name+(c.location?'<span class="locString">'+c.location.ref+":"+c.location.start+".."+c.location.end+" ("+c.name+")</span>":"")}return h(b)},function(){return h([])})},get:function(d){return this.query(d,
  void 0)},getIdentity:function(d){return d.id}})})},"JBrowse/View/Track/Sequence":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/dom-construct,dojo/dom-class,dojo/query,JBrowse/View/Track/BlockBased,JBrowse/View/Track/_ExportMixin,JBrowse/CodonTable,JBrowse/Util".split(","),function(i,j,h,g,e,d,c,b,f,a){return i([c,b,f],{constructor:function(){this._charMeasurements={};this._codonTable=this.generateCodonTable(h.mixin(this.defaultCodonTable,this.config.codonTable))},_defaultConfig:function(){return{maxExportSpan:5E5,
  showForwardStrand:!0,showReverseStrand:!0,showTranslation:!0}},_exportFormats:function(){return[{name:"FASTA",label:"FASTA",fileExt:"fasta"}]},endZoom:function(){this.clear()},setViewInfo:function(a,b,c,d,e,f,g){this.inherited(arguments);this.show()},nbsp:String.fromCharCode(160),fillBlock:function(a){var b=a.blockIndex,c=a.block,d=a.scale,e=a.leftBase-2,f=a.rightBase+2,h=this,i=dojo.create("div",{className:"sequence_blur",innerHTML:'<span class="loading">Loading</span>'},c.domNode);this.heightUpdate(i.offsetHeight+
  2*i.offsetTop,b);1.3<=d?this.store.getReferenceSequence({ref:this.refSeq.name,seqChunkSize:this.refSeq.seqChunkSize,start:e,end:f},function(e){""==e.trim()?i.innerHTML='<span class="zoom">No sequence available</span>':(g.empty(c.domNode),h._fillSequenceBlock(c,b,d,e));a.finishCallback()},function(){a.finishCallback()}):(i.innerHTML='<span class="zoom">Zoom in to see sequence</span>',a.finishCallback())},_fillSequenceBlock:function(b,c,d,f){var f=f.replace(/\s/g,this.nbsp),h=b.startBase,i=b.endBase,
  q=f.substring(2,f.length-2),s=q.length,u=f.substring(0,f.length-2-(f.length-2)%3),f=f.substring(2);if(this.config.showForwardStrand&&this.config.showTranslation){for(var v=[],w=0;3>w;w++){var t=h+w,t=(t%3+3)%3,y=this._renderTranslation(f,w,h,i,s,d);v[t]=y;e.add(y,"frame"+t)}for(w=2;0<=w;w--)b.domNode.appendChild(v[w])}f=this.getCharacterMeasurements("sequence");f=d>f.w+4;if(this.config.showReverseStrand||this.config.showForwardStrand)var x=g.create("table",{className:"sequence"+(f?" big":""),style:{width:"100%"}},
  b.domNode);this.config.showForwardStrand&&x.appendChild(this._renderSeqTr(h,i,q,d));if(this.config.showReverseStrand&&(q=this._renderSeqTr(h,i,a.complement(q),d),q.className="revcom",x.appendChild(q),this.config.showTranslation)){v=[];for(w=0;3>w;w++)t=h+1-w,t=(t%3+3)%3,y=this._renderTranslation(u,w,h,i,s,d,!0),v[t]=y,e.add(y,"frame"+t);for(w=0;3>w;w++)b.domNode.appendChild(v[w])}var B=0;j.forEach(b.domNode.childNodes,function(a){B+=a.clientHeight||a.offsetHeight});this.heightUpdate(B,c)},_renderTranslation:function(b,
  c,d,e,f,h,i){b=i?a.revcom(b):b;e=b.slice(c,b.length-(b.length-c)%3);b="";for(d=0;d<e.length;d+=3)var j=this._codonTable[e.slice(d,d+3)]||this.nbsp,b=b+j;var b=i?b.split("").reverse().join(""):b,d=this.getCharacterMeasurements("aminoAcid"),j=h>d.w+4,f=100/(f/3),e=g.create("div",{className:"translatedSequence"}),u=g.create("table",{className:"translatedSequence offset"+c+(j?" big":""),style:{width:f*b.length+"%"}},e),j=g.create("tr",{},u);u.style.left=(i?100-f*(b.length+c/3):f*c/3)+"%";f=100/b.length+
  "%";if(c=h>=d.w)u.className+=" big";for(d=0;d<b.length;d++){h=document.createElement("td");h.className="aminoAcid aminoAcid_"+b.charAt(d).toLowerCase();h.style.width=f;if(c)h.innerHTML=b.charAt(d);j.appendChild(h)}return e},_renderSeqTr:function(a,b,c,d){for(var e=this.getCharacterMeasurements("sequence"),f=document.createElement("tr"),a=100/(b-a)+"%",d=d>=e.w,e=0;e<c.length;e++){b=document.createElement("td");b.className="base base_"+c.charAt(e).toLowerCase();b.style.width=a;if(d)b.innerHTML=c.charAt(e);
  f.appendChild(b)}return f},startZoom:function(){d(".base",this.div).empty()},getCharacterMeasurements:function(a){return this._charMeasurements[a]||(this._charMeasurements[a]=this._measureSequenceCharacterSize(this.div,a))},_measureSequenceCharacterSize:function(a,b){var c=document.createElement("td");c.className=b;c.style.visibility="hidden";c.appendChild(document.createTextNode("12345678901234567890123456789012345678901234567890"));a.appendChild(c);var d={w:c.clientWidth/50+1,h:c.clientHeight};
  a.removeChild(c);return d},_trackMenuOptions:function(){var a=this,b=this.inherited(arguments);b.push({type:"dijit/MenuSeparator"});b.push.apply(b,[{label:"Show forward strand",type:"dijit/CheckedMenuItem",checked:!!this.config.showForwardStrand,onClick:function(){a.config.showForwardStrand=this.checked;a.changed()}},{label:"Show reverse strand",type:"dijit/CheckedMenuItem",checked:!!this.config.showReverseStrand,onClick:function(){a.config.showReverseStrand=this.checked;a.changed()}},{label:"Show translation",
  type:"dijit/CheckedMenuItem",checked:!!this.config.showTranslation,onClick:function(){a.config.showTranslation=this.checked;a.changed()}}]);return b}})})},"JBrowse/View/Track/_ExportMixin":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/aspect,dojo/on,JBrowse/has,dojo/window,dojo/dom-construct,JBrowse/Util,dijit/form/TextBox,dijit/form/Button,dijit/form/RadioButton,dijit/Dialog,FileSaver/FileSaver".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m){return i(null,{_canSaveFiles:function(){return d("save-generated-files")&&
  !this.config.noExportFiles},_canExport:function(){if(this.config.noExport)return!1;var a=this.browser.getHighlight(),b=this.browser.view.visibleRegion(),c={ref:this.refSeq.name,start:this.refSeq.start,end:this.refSeq.end};this._canExportRegion(b);this._canExportRegion(c);return a&&this._canExportRegion(a)||this._canExportRegion(b)||this._canExportRegion(c)},_possibleExportRegions:function(){var a=dojo.clone(this.browser.view.visibleRegion());a.description="Visible region";a.name="visible";var a=[a,
  {ref:this.refSeq.name,start:this.refSeq.start,end:this.refSeq.end,description:"Whole reference sequence",name:"wholeref"}],b=this.browser.getHighlight();b&&a.unshift(h.mixin(h.clone(b),{description:"Highlighted region",name:"highlight"}));return a},_exportDialogContent:function(){var a=this.track._possibleExportRegions();j.forEach(a,function(a){a.length=Math.round(a.end-a.start+1);a.canExport=this._canExportRegion(a)},this.track);var c=dojo.hitch(this.track,function(){var a=this._readRadio(d.elements.region),
  b=w[this._readRadio(d.elements.format)];d.elements.filename.value=((this.key||this.label)+"-"+a).replace(/[^ .a-zA-Z0-9_-]/g,"-")+"."+b}),d=b.create("form",{onSubmit:function(){return!1}}),g=b.create("fieldset",{className:"region"},d);b.create("legend",{innerHTML:"Region to save"},g);var i=0;j.forEach(a,function(a){var d=f.assembleLocString(a),h=new n({name:"region",id:"region_"+a.name,value:d,checked:a.canExport&&!i++?"checked":""});g.appendChild(h.domNode);d=b.create("label",{"for":h.id,innerHTML:a.description+
  ' - <span class="locString">'+d+"</span> ("+f.humanReadableNumber(a.length)+(a.canExport?"b":"b, too large")+")"},g);if(!a.canExport)h.domNode.disabled="disabled",d.className="ghosted";e(h,"click",c);b.create("br",{},g)});var m=b.create("fieldset",{className:"format"},d);b.create("legend",{innerHTML:"Format"},m);var i=0,w={};j.forEach(this.track._exportFormats(),function(a){a.name||(a={name:a,label:a});if(!a.fileExt)a.fileExt=a.name||a;w[a.name]=a.fileExt;var d=new n({name:"format",id:"format"+a.name,
  value:a.name,checked:i++?"":"checked"});m.appendChild(d.domNode);b.create("label",{"for":d.id,innerHTML:a.label},m);e(d,"click",c);b.create("br",{},m)},this);var t=b.create("fieldset",{className:"filename"},d);b.create("legend",{innerHTML:"Filename"},t);b.create("input",{type:"text",name:"filename",style:{width:"100%"}},t);c();var t=b.create("div",{className:"dijitDialogPaneActionBar"}),y=this.dialog;(new k({iconClass:"dijitIconDelete",onClick:dojo.hitch(y,"hide"),label:"Cancel"})).placeAt(t);(new k({iconClass:"dijitIconTask",
  label:"View",disabled:!j.some(a,function(a){return a.canExport}),onClick:h.partial(this.track._exportViewButtonClicked,this.track,d,y)})).placeAt(t);if(this.track._canSaveFiles())var r=(new k({iconClass:"dijitIconSave",label:"Save",disabled:!j.some(a,function(a){return a.canExport}),onClick:dojo.hitch(this.track,function(){var a=this._readRadio(d.elements.format),b=this._readRadio(d.elements.region),c=d.elements.filename.value.replace(/[^ .a-zA-Z0-9_-]/g,"-");r.set("disabled",!0);r.set("iconClass",
  "jbrowseIconBusy");this.exportRegion(b,a,dojo.hitch(this,function(b){y.hide();this._fileDownload({format:a,data:b,filename:c})}))})})).placeAt(t);return[d,t]},_exportViewButtonClicked:function(d,e,h){this.set("disabled",!0);this.set("iconClass","jbrowseIconBusy");var i=d._readRadio(e.elements.region),j=d._readRadio(e.elements.format),m=e.elements.filename.value.replace(/[^ .a-zA-Z0-9_-]/g,"-");d.exportRegion(i,j,function(e){h.hide();var t=b.create("textarea",{rows:Math.round(0.5*(c.getBox().h/12)),
  wrap:"off",cols:80,style:"maxWidth: 90em; overflow: scroll; overflow-y: scroll; overflow-x: scroll; overflow:-moz-scrollbars-vertical;",readonly:!0});t.value=e;var n=b.create("div",{className:"dijitDialogPaneActionBar"}),p=new r({className:"export-view-dialog",title:j+' export - <span class="locString">'+i+"</span> ("+f.humanReadableNumber(e.length)+"bytes)",content:[t,n]});(new k({iconClass:"dijitIconDelete",label:"Close",onClick:dojo.hitch(p,"hide")})).placeAt(n);if(d._canSaveFiles()){n=b.create("div",
  {className:"save"},n);(new k({iconClass:"dijitIconSave",label:"Save",onClick:function(){var a=B.get("value").replace(/[^ .a-zA-Z0-9_-]/g,"-");p.hide();d._fileDownload({format:j,data:e,filename:a})}})).placeAt(n);var B=(new a({value:m,style:"width: 24em"})).placeAt(n)}g.after(p,"hide",function(){t.parentNode.removeChild(t);t=null;setTimeout(function(){p.destroyRecursive()},500)});p.show()})},_fileDownload:function(a){m(new Blob([a.data],{type:a.format?"application/x-"+a.format.toLowerCase():"text/plain"}),
  a.filename)},_readRadio:function(a){if(a.length)for(var b=0;b<a.length;b++)if(a[b].checked)return a[b].value;return a.value},exportRegion:function(a,b,c){"string"==typeof a&&(a=f.parseLocString(a));a.ref!=this.refSeq.name?console.error("cannot export data for ref seq "+a.ref+", exporting is currently only supported for the currently-visible reference sequence"):require(["JBrowse/View/Export/"+b],dojo.hitch(this,function(b){(new b({refSeq:this.refSeq,track:this,store:this.store})).exportRegion(a,c)}))},
  _trackMenuOptions:function(){var a=this.inherited(arguments);this.config.noExport||a.push({label:"Save track data",iconClass:"dijitIconSave",disabled:!this._canExport(),action:"bareDialog",content:this._exportDialogContent,dialog:{id:"exportDialog",className:"export-dialog"}});return a},_canExportRegion:function(a){if(!a)return!1;if("number"==typeof this.config.maxExportSpan||"string"==typeof this.config.maxExportSpan)return a.end-a.start+1<=this.config.maxExportSpan;var b={};this.store.getGlobalStats(function(a){b=
  a},function(){});return b.featureDensity?b.featureDensity*(a.end-a.start)<=(this.config.maxExportFeatures||5E4):!0}})})},"FileSaver/FileSaver":function(){define([],function(){var i=i||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(i){var h=i.document,g=i.URL||i.webkitURL||i,e;try{e=h.createElementNS("http://www.w3.org/1999/xhtml","a")}catch(d){e=h.createElement("a")}var c="download"in e,b=function(a){var b=h.createEvent("MouseEvents");b.initMouseEvent("click",!0,!1,i,0,0,0,0,
  0,!1,!1,!1,!1,0,null);a.dispatchEvent(b)},f=i.webkitRequestFileSystem,a=i.requestFileSystem||f||i.mozRequestFileSystem,k=function(a){(i.setImmediate||i.setTimeout)(function(){throw a;},0)},n=0,r=[],m,l=function(a,b,c){for(var b=[].concat(b),d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(f){k(f)}}},p=function(d,g){var h=this,k=d.type,m=!1,y,p,q=function(){var a=(i.URL||i.webkitURL||i).createObjectURL(d);r.push(a);return a},C=function(){l(h,"writestart progress write writeend".split(" "))},
  A=function(){if(m||!y)y=q(d);p?p.location.href=y:window.open(y,"_blank");h.readyState=h.DONE;C()},E=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},N={create:!0,exclusive:!1},L;h.readyState=h.INIT;g||(g="download");if(c)y=q(d),e.href=y,e.download=g,b(e),h.readyState=h.DONE,C();else{i.chrome&&k&&"application/octet-stream"!==k&&(L=d.slice||d.webkitSlice,d=L.call(d,0,d.size,"application/octet-stream"),m=!0);f&&"download"!==g&&(g+=".download");if("application/octet-stream"===
  k||f)p=i;a?(n+=d.size,a(i.TEMPORARY,n,E(function(a){a.root.getDirectory("saved",N,E(function(a){var b=function(){a.getFile(g,N,E(function(a){a.createWriter(E(function(b){b.onwriteend=function(b){p.location.href=a.toURL();r.push(a);h.readyState=h.DONE;l(h,"writeend",b)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&A()};"writestart progress write abort".split(" ").forEach(function(a){b["on"+a]=h["on"+a]});b.write(d);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),
  A)}),A)};a.getFile(g,{create:!1},E(function(a){a.remove();b()}),E(function(a){a.code===a.NOT_FOUND_ERR?b():A()}))}),A)}),A)):A()}};m=p.prototype;m.abort=function(){this.readyState=this.DONE;l(this,"abort")};m.readyState=m.INIT=0;m.WRITING=1;m.DONE=2;m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null;try{i.addEventListener("unload",function(){for(var a=r.length;a--;){var b=r[a];"string"===typeof b?g.revokeObjectURL(b):b.remove()}r.length=0},!1)}catch(q){console.warn("FileSaver.js probably will not work")}return function(a,
  b){return new p(a,b)}}(self);return i})},"JBrowse/CodonTable":function(){define(["dojo/_base/declare"],function(i){return i(null,{defaultCodonTable:{TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",AAT:"N",AAA:"K",AAG:"K",
  AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"},generateCodonTable:function(i){var h={},g;for(g in i)if(i.hasOwnProperty(g)){for(var e=i[g],d=[],c=0;3>c;c++){var b=g.charAt(c);d[c]=[];d[c][0]=b.toUpperCase();d[c][1]=b.toLowerCase()}for(c=0;2>c;c++)for(var b=d[0][c],f=0;2>f;f++)for(var a=d[1][f],k=0;2>k;k++)h[b+a+d[2][k]]=e}return h}})})},"JBrowse/View/Track/HTMLFeatures":function(){define("dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/dom-construct,dojo/dom-geometry,dojo/on,dojo/query,JBrowse/has,dijit/Dialog,dijit/form/Select,dijit/form/RadioButton,dijit/form/Button,JBrowse/View/Track/BlockBased,JBrowse/View/Track/_YScaleMixin,JBrowse/View/Track/_ExportMixin,JBrowse/View/Track/_FeatureDetailMixin,JBrowse/View/Track/_TrackDetailsStatsMixin,JBrowse/Util,JBrowse/View/GranularRectLayout,JBrowse/Model/Location".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u,v){return i([r,m,l,p,q],{constructor:function(a){this.numBins=j.getObject("histogram.binsPerBlock",!1,this.config)||25;this.padding=this.defaultPadding=5;this.glyphHeightPad=1;this.levelHeightPad=2;this.minFeatWidth=this.labelPad=1;this.trackPadding=a.trackPadding;this.heightCache={};this.showLabels=this.config.style.showLabels;this._setupEventHandlers()},_defaultConfig:function(){return s.deepUpdate(j.clone(this.inherited(arguments)),{maxFeatureScreenDensity:0.5,
  maxHeight:1E3,style:{arrowheadClass:"arrowhead",className:"feature2",_defaultHistScale:4,_defaultLabelScale:30,_defaultDescriptionScale:120,minSubfeatureWidth:6,maxDescriptionLength:70,showLabels:!0,label:"name,id",description:"note, description",centerChildrenVertically:!0},hooks:{create:function(){return document.createElement("div")}},events:{},menuTemplate:[{label:"View details",title:"{type} {name}",action:"contentDialog",iconClass:"dijitIconTask",content:dojo.hitch(this,"defaultFeatureDetail")},
  {label:function(){return"Highlight this "+(this.feature&&this.feature.get("type")?this.feature.get("type"):"feature")},action:function(){this.track.browser.setHighlightAndRedraw(new v({feature:this.feature,tracks:[this.track]}))},iconClass:"dijitIconFilter"}]})},wrapHandler:function(a){var b=this;return function(c){c=c||window.event;if(!c.shiftKey){var d=c.currentTarget||c.srcElement;if(!d.feature)d=d.parentElement;d.feature&&a(b,d,d.feature,c)}}},fillHistograms:function(a){var b=a.blockIndex,c=a.block,
  d=a.stripeWidth,e=Math.abs(a.rightBase-a.leftBase),f=e/this.numBins,g=this;this.store.getRegionFeatureDensities({ref:this.refSeq.name,start:a.leftBase,end:a.rightBase,basesPerBin:f},function(a){if("histograms"==g._fillType){for(var h=a.bins,i=0,k=0;k<g.numBins;k++)"number"==typeof h[k]&&isFinite(h[k])&&(i=Math.max(i,h[k]));for(var k=a.stats?0.01>a.stats.mean/a.stats.max:!1,j=a.stats?100/(k?Math.log(a.stats.max):a.stats.max):2,j={basesPerBin:f,pxPerCount:j,logScale:k,stats:a.stats},m,k=0;k<g.numBins;k++)if("number"==
  typeof h[k]&&isFinite(h[k]))m=document.createElement("div"),m.className="hist feature-hist "+g.config.style.className+"-hist",m.style.cssText="left: "+100*(k/g.numBins)+"%; height: "+j.pxPerCount*(j.logScale?Math.log(h[k]):h[k])+"px;bottom: "+g.trackPadding+"px;width: "+(100/g.numBins-100/d)+"%;"+(g.config.style.histCss?g.config.style.histCss:""),m.setAttribute("value",h[k]),s.is_ie6&&m.appendChild(document.createComment()),c.domNode.appendChild(m);g.heightUpdate(j.pxPerCount*(j.logScale?Math.log(i):
  i),b);g.makeHistogramYScale(e,j,a)}},dojo.hitch(this,"fillBlockError",b,c));a.finishCallback()},endZoom:function(){this.clear()},updateStaticElements:function(a){this.inherited(arguments);this.updateYScaleFromViewDimensions(a);this.updateFeatureLabelPositions(a);this.updateFeatureArrowPositions(a)},updateFeatureArrowPositions:function(a){if(!(!1 in a))for(var a=this.browser.view.minVisible(),b=this.browser.view.maxVisible(),c=this.blocks,d=0;d<c.length;d++){var e=c[d];if(e)for(var f=e.domNode.childNodes,
  g=0;g<f.length;g++){var h=f[g];if(h.feature){var i=h.feature,k=h._containerStart,j=h._containerEnd,m=i.get("strand");if(m){var l=i.get("start"),i=i.get("end"),k=Math.max(l,k),j=Math.min(i,j);if(0>m&&i>a)for(var i="minus-"+this.config.style.arrowheadClass,m=h.childNodes,n=0;n<m.length;n++){if((h=m[n])&&h.className&&0<=h.className.indexOf(i))h.style.left=(l<a?e.bpToX(a)-e.bpToX(k):-this.minusArrowWidth)+"px"}else if(0<m&&l<b){l="plus-"+this.config.style.arrowheadClass;m=h.childNodes;for(n=0;n<m.length;n++)if((h=
  m[n])&&h.className&&0<=h.className.indexOf(l))h.style.right=(i>b?e.bpToX(j)-e.bpToX(b-2):-this.plusArrowWidth)+"px"}}}}}},updateFeatureLabelPositions:function(a){!1 in a||h.forEach(this.blocks,function(a){if(a&&this.label){var b=100*(this.label.offsetLeft+this.label.offsetWidth-a.domNode.offsetLeft)/a.domNode.offsetWidth+2;if(b){var c=a.endBase-a.startBase;h.forEach(a.domNode.childNodes,function(d){if(d.label){var e=d.label,f=d.feature,d=parseInt(f.get("start")),d=100*(d-a.startBase)/c,f=parseInt(f.get("end")),
  f=100*((f-a.startBase)/c-e.offsetWidth/a.domNode.offsetWidth);e.style.left=Math.max(d,Math.min(b,f))+"%"}},this)}}},this)},fillBlock:function(a){var b=a.blockIndex,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale;this.store.getGlobalStats(dojo.hitch(this,function(g){var h=g.featureDensity,i=this.config.style.histScale||h*this.config.style._defaultHistScale,h=this.config.style.featureScale||h/this.config.maxFeatureScreenDensity,k=Math.abs(d-e);if(this._updatedLabelForBlockSize!=k)this.store.getRegionFeatureDensities&&
  f<i?this.setLabel(this.key+' <span class="feature-density">per '+s.addCommas(Math.round(k/this.numBins))+" bp</span>"):this.setLabel(this.key),this._updatedLabelForBlockSize=k;this.store.getRegionFeatureDensities&&f<i?(this._fillType="histograms",this.fillHistograms(a)):f<h?(this.fillTooManyFeaturesMessage(b,c,f),a.finishCallback()):(this.removeYScale(),this._fillType="features",this.fillFeatures(dojo.mixin({stats:g},a)))}),dojo.hitch(this,"fillBlockError",b,c))},makeHistogramYScale:function(a,b){if(b.logScale)console.error("Log histogram scale axis labels not yet implemented.");
  else{var c=this.height/b.pxPerCount,c=b.logScale?log(c):c;if(!this.yscale||!this.yscale_params||!(this.yscale_params.maxval==c&&this.yscale_params.height==this.height&&this.yscale_params.blockbp==a))this.removeYScale(),this.makeYScale({min:0,max:c}),this.yscale_params={height:this.height,blockbp:a,maxval:c}}},destroy:function(){this._clearLayout();this.inherited(arguments)},cleanupBlock:function(a){if(a&&(this.layout&&this.layout.discardRange(a.startBase,a.endBase),a.featureNodes))for(var b in a.featureNodes){var c=
  a.featureNodes[b];h.forEach("track,feature,callbackArgs,_labelScale,_descriptionScale".split(","),function(a){s.removeAttribute(c,a)});"label"in c&&(h.forEach("track,feature,callbackArgs".split(","),function(a){s.removeAttribute(c.label,a)}),s.removeAttribute(c,"label"))}this.inherited(arguments)},transfer:function(a,b,c,d,e){if(a&&b)for(var f=b.startBase,g=b.endBase,h,i=a.startBase<b.startBase?a.rightOverlaps:a.leftOverlaps,i=i||[],k=0;k<i.length;k++)if((h=a.featureNodes[i[k]])&&h.label&&h.label.parentNode&&
  h.label.parentNode.removeChild(h.label),h&&h.feature&&h.layoutEnd>f&&h.feature.get("start")<g){h.parentNode.removeChild(h);delete a.featureNodes[i[k]];var j=this.addFeatureToBlock(h.feature,i[k],b,c,h._labelScale,h._descriptionScale,d,e);h.booleanCovs&&this._maskTransfer(j,h,d,e)}},_maskTransfer:function(a,b,d,e){for(var f=[];a.firstChild;)f.push(a.firstChild),a.removeChild(a.firstChild);var g=a.featureEdges.s,h=a.featureEdges.e,i;for(i in b.booleanCovs)if(b.booleanCovs.hasOwnProperty(i)){var f=b.booleanCovs[i].span.s,
  k=b.booleanCovs[i].span.e;if(!(k<d||f>e))b.booleanCovs[i].style.left=100*(f-g)/(h-g)+"%",b.booleanCovs[i].style.width=100*(k-f)/(h-g)+"%",a.appendChild(b.booleanCovs[i])}c(".basicSubfeature",b).forEach(function(b){var c=b.subfeatureEdges.s,f=b.subfeatureEdges.e;if(!(f<d||c>e))b.style.left=100*(c-g)/(h-g)+"%",b.style.width=100*(f-c)/(h-g)+"%",a.appendChild(b)});if(this.config.style.arrowheadClass)i=this.config.style.arrowheadClass,c(".minus-"+i+", .plus-"+i,b).forEach(function(b){a.appendChild(b)});
  a.className="basic";a.oldClassName=b.oldClassName;a.booleanCovs=b.booleanCovs},fillFeatures:function(a){var b=a.blockIndex,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale,g=a.stats,h=a.containerStart,i=a.containerEnd,k=a.finishCallback;this.scale=f;c.featureNodes={};if(!this.haveMeasurements)this.measureStyles(),this.haveMeasurements=!0;var j=this.config.style.labelScale||g.featureDensity*this.config.style._defaultLabelScale,m=this.config.style.descriptionScale||g.featureDensity*this.config.style._defaultDescriptionScale,
  l=this,a=dojo.hitch(this,function(a){var b=a.id();this._featureIsRendered(b)||this.filterFeature(a)&&this.addFeatureToBlock(a,b,c,f,j,m,h,i)});this.store.getFeatures({ref:this.refSeq.name,start:d,end:e},a,function(a){l.heightUpdate(l._getLayout(f).getTotalHeight(),b);if(a&&a.maskingSpans){var c=[];c[0]={start:d};var g=0,h;for(h in a.maskingSpans)if(a.maskingSpans.hasOwnProperty(h))h=a.maskingSpans[h],c[g].end=h.start,g++,c[g]={start:h.end};c[g].end=e;c[g].end<=c[g].start&&c.splice(g,1);c[0].end<=
  c[0].start&&c.splice(0,1);l.maskBySpans(c,a.maskingSpans)}k()},function(a){console.error(a,a.stack);l.fillBlockError(b,c,a);k()})},addFeatureToBlock:function(a,b,c,d,e,f,g,h){a=this.renderFeature(a,b,c,d,e,f,g,h);if(!a)return null;c.domNode.appendChild(a);this.config.style.centerChildrenVertically&&this._centerChildrenVertically(a);return a},fillBlockTimeout:function(a,b){this.inherited(arguments);b.featureNodes={}},_featureIsRendered:function(a){for(var b=this.blocks,c=0;c<b.length;c++)if(b[c]&&
  b[c].featureNodes&&b[c].featureNodes[a])return!0;return!1},maskBySpans:function(a,b){var c=this.blocks,d;for(d in c)if(c.hasOwnProperty(d)&&c[d]){var e=c[d],f=function(a,b,c,d){a=Math.max(a,c);b=Math.min(b,d);return a<b?{s:a,e:b}:!1},g=function(a,b,c,d,e){var f=dojo.create("div"),g=c.featureEdges?c.featureEdges.s:c.subfeatureEdges.s,c=c.featureEdges?c.featureEdges.e:c.subfeatureEdges.e;f.span={s:a,e:b};f.className=d?j.className==e?j.oldClassName+" Boolean-transparent":j.className+" Boolean-transparent":
  j.className==e?j.oldClassName:j.className;f.booleanDiv=!0;f.style.left=100*(a-g)/(c-g)+"%";f.style.top="0px";f.style.width=100*(b-a)/(c-g)+"%";return f},h=function(a,b,c,d,e,i){var i=i||!1,k;for(k in c.childNodes)if(c.childNodes[k]&&c.childNodes[k].booleanDiv){var j=c.childNodes[k].span.s,m=c.childNodes[k].span.e;if(j<=a&&m>=b){i=!0;break}if(j=f(a,b,j,m)?{s:Math.min(a,j),e:Math.max(b,m)}:!1){i=g(j.s,j.e,c,d,e);m=c.booleanCovs.indexOf(c.childNodes[k]);c.removeChild(c.childNodes[k]);c.booleanCovs.splice(m,
  1);c.appendChild(i);c.booleanCovs.push(i);i=!0;h(j.s,j.e,c,d,e,!0);break}}i||(i=g(a,b,c,d,e),c.appendChild(i),c.booleanCovs.push(i))},i=function(a,b,c,d,e,g){if(!c.booleanCovs)c.booleanCovs=[];for(var i in e)if(e.hasOwnProperty(i)){var k=f(a,b,e[i].start,e[i].end);k&&h(k.s,k.e,c,!1,g)}for(i in d)d.hasOwnProperty(i)&&(k=f(a,b,d[i].start,d[i].end))&&h(k.s,k.e,c,!0,g);c.oldClassName=c.className==g?c.oldClassName:c.className;c.className=g},k;for(k in e.featureNodes)if(e.featureNodes.hasOwnProperty(k)){var j=
  e.featureNodes[k];if(j.feature)m=j.feature.get("start"),l=j.feature.get("end"),i(m,l,j,b,a,"basic");else{var m=j.subfeatureEdges.s,l=j.subfeatureEdges.e;i(m,l,j,b,a,"basicSubfeature")}}}},measureStyles:function(){var a=document.createElement("div");a.className="feature-label";a.style.height="auto";a.style.visibility="hidden";a.appendChild(document.createTextNode("1234567890"));document.body.appendChild(a);this.labelHeight=a.clientHeight;this.labelWidth=a.clientWidth/10;document.body.removeChild(a);
  var b,a=document.createElement("div");a.className="feature "+this.config.style.className+" plus-"+this.config.style.className+" plus-"+this.config.style.className+"1";if(this.config.style.featureCss)a.style.cssText=this.config.style.featureCss;a.style.visibility="hidden";s.is_ie6&&a.appendChild(document.createComment("foo"));document.body.appendChild(a);b=e.getMarginBox(a);this.glyphHeight=Math.round(b.h);this.padding=this.defaultPadding+b.w;document.body.removeChild(a);if(this.config.style.arrowheadClass)a=
  document.createElement("div"),a.className="plus-"+this.config.style.arrowheadClass,s.is_ie6&&a.appendChild(document.createComment("foo")),document.body.appendChild(a),b=e.position(a),this.plusArrowWidth=b.w,this.plusArrowHeight=b.h,a.className="minus-"+this.config.style.arrowheadClass,b=e.position(a),this.minusArrowWidth=b.w,this.minusArrowHeight=b.h,document.body.removeChild(a)},hideAll:function(){this._clearLayout();return this.inherited(arguments)},getFeatDiv:function(a){a=this.getId(a);if(!a)return null;
  for(var b=0;b<this.blocks.length;b++){var c=this.blocks[b];if(c&&c.featureNodes&&(c=c.featureNodes[a]))return c}return null},getId:function(a){return a.id()},renderFeature:function(a,b,c,d,e,f,g,h){var i=a.get("end"),k=a.get("start");"string"==typeof i&&(i=parseInt(i));"string"==typeof k&&(k=parseInt(k));var m=k,l=i;if(this.config.style.arrowheadClass)switch(a.get("strand")){case 1:case "+":l+=this.plusArrowWidth/d;break;case -1:case "-":m-=this.minusArrowWidth/d}var n=this.glyphHeight+this.glyphHeightPad,
  p=this.getFeatureLabel(a),q=d>f&&this.getFeatureDescription(a);q&&q.length>this.config.style.maxDescriptionLength&&(q=q.substr(0,this.config.style.maxDescriptionLength+1).replace(/(\s+\S+|\s*)$/,"")+String.fromCharCode(8230));this.showLabels&&d>=e&&p&&(l=Math.max(l,m+(""+p).length*this.labelWidth/d),n+=this.labelHeight+this.labelPad);this.showLabels&&q&&(l=Math.max(l,m+(""+q).length*this.labelWidth/d),n+=this.labelHeight+this.labelPad);var l=l+Math.max(1,this.padding/d),r=this._getLayout(d).addRect(b,
  m,l,n);if(null===r)return this.markBlockHeightOverflow(c),null;n=this.config.hooks.create(this,a);this._connectFeatDivHandlers(n);n.track=this;n.feature=a;n.layoutEnd=l;n.featureEdges={s:Math.max(n.feature.get("start"),g),e:Math.min(n.feature.get("end"),h)};n.callbackArgs=[this,n.feature,n];n._labelScale=e;n._descriptionScale=f;c.featureNodes[b]=n;if(m<c.startBase){if(!c.leftOverlaps)c.leftOverlaps=[];c.leftOverlaps.push(b)}if(l>c.endBase){if(!c.rightOverlaps)c.rightOverlaps=[];c.rightOverlaps.push(b)}dojo.addClass(n,
  "feature");f=this.config.style.className;"{type}"==f&&(f=a.get("type"));b=a.get("strand");switch(b){case 1:case "+":dojo.addClass(n,"plus-"+f);break;case -1:case "-":dojo.addClass(n,"minus-"+f);break;default:dojo.addClass(n,f)}l=a.get("phase");null!==l&&void 0!==l&&dojo.addClass(n,f+"_phase"+l);(f=this.isFeatureHighlighted(a,p))&&dojo.addClass(n,"highlighted");var k=Math.max(k,g),i=Math.min(i,h),s=c.endBase-c.startBase,l=Math.max(this.minFeatWidth,100*((i-k)/s));n.style.cssText="left:"+100*(k-c.startBase)/
  s+"%;top:"+r+"px; width:"+l+"%;"+(this.config.style.featureCss?this.config.style.featureCss:"");n._containerStart=g;n._containerEnd=h;if(this.config.style.arrowheadClass)switch(g=document.createElement("div"),b){case 1:case "+":g.className="plus-"+this.config.style.arrowheadClass;g.style.cssText="right: "+-this.plusArrowWidth+"px";n.appendChild(g);break;case -1:case "-":g.className="minus-"+this.config.style.arrowheadClass,g.style.cssText="left: "+-this.minusArrowWidth+"px",n.appendChild(g)}g=j.mixin({track:this,
  feature:a,callbackArgs:[this,a]});if(n.title)n.title=this.template(a,this._evalConf(g,n.title,"label"));if((p||q)&&this.showLabels&&d>=e){d=dojo.create("div",{className:"feature-label"+(f?" highlighted":""),innerHTML:(p?'<div class="feature-name">'+p+"</div>":"")+(q?' <div class="feature-description">'+q+"</div>":""),style:{top:r+this.glyphHeight+2+"px",left:100*(m-c.startBase)/s+"%"}},c.domNode);this._connectFeatDivHandlers(d);if(n.title)d.title=n.title;n.label=d;d.feature=a;d.track=this;d.callbackArgs=
  [this,n.feature,n]}l>this.config.style.minSubfeatureWidth&&this.handleSubFeatures(a,n,k,i,c);this.config.menuTemplate&&window.setTimeout(dojo.hitch(this,"_connectMenus",n),50+150*Math.random());"function"==typeof this.config.hooks.modify&&this.config.hooks.modify(this,a,n);return n},handleSubFeatures:function(a,b,c,d,e){var f=a.get("subfeatures");if(f)for(var g=0;g<f.length;g++)this.renderSubfeature(a,b,f[g],c,d,e)},_getHeight:function(a){if(this.config.disableHeightCache)return a.offsetHeight||0;
  var b=this.heightCache[a.className];if(b)return b;b=a.offsetHeight||0;return this.heightCache[a.className]=b},_centerChildrenVertically:function(a){if(0<a.childNodes.length)for(var b=this._getHeight(a),c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];if(d.style){var e=this._getHeight(d);dojo.style(d,{marginTop:"0",top:(b-e)/2+"px"});0<d.childNodes.length&&this._centerChildrenVertically(d)}}},_connectFeatDivHandlers:function(a){for(var b in this.eventHandlers)this.own(d(a,b,this.eventHandlers[b]));
  this.eventHandlers.click&&this.eventHandlers.click.label&&a.setAttribute("title",this.eventHandlers.click.label)},_connectMenus:function(a){var b=j.hitch(this,"_refreshMenu",a);this.own(d(a,"mouseover",b));a.label&&this.own(d(a.label,"mouseover",b))},_refreshMenu:function(a){if(!a.contextMenu)a.contextMenu=this._makeFeatureContextMenu(a,this.config.menuTemplate);a.contextMenuTimeout&&window.clearTimeout(a.contextMenuTimeout);a.contextMenuTimeout=window.setTimeout(function(){a.contextMenu&&(a.contextMenu.destroyRecursive(),
  s.removeAttribute(a,"contextMenu"));s.removeAttribute(a,"contextMenuTimeout")},3E4)},_makeFeatureContextMenu:function(a,b){var b=this._processMenuSpec(dojo.clone(b),a),c=this._renderContextMenu(b,a);c.startup();c.bindDomNode(a);a.label&&c.bindDomNode(a.label);return c},renderSubfeature:function(a,b,c,d,e,f){var a=c.get("start"),g=c.get("end"),h=e-d,i=c.get("type"),k;if(this.config.style.subfeatureClasses)if(k=this.config.style.subfeatureClasses[i],void 0===k)k=i;else{if(null===k)return null}else k=
  i;if("hidden"==k)return null;i=document.createElement("div");i.subfeatureEdges={s:a,e:g};dojo.addClass(i,"subfeature");if(k)switch(c.get("strand")){case 1:case "+":dojo.addClass(i,"plus-"+k);break;case -1:case "-":dojo.addClass(i,"minus-"+k);break;default:dojo.addClass(i,k)}if(g<=d||a>=e)return null;s.is_ie6&&i.appendChild(document.createComment());i.style.cssText="left: "+100*((a-d)/h)+"%;width: "+100*((g-a)/h)+"%;";b.appendChild(i);return f.featureNodes[c.id()]=i},_getLayout:function(a){if(!this.haveMeasurements)this.measureStyles(),
  this.haveMeasurements=!0;if((!this.layout||this.layout.pitchX!=4/a)&&a)this.layout=new u({pitchX:4/a,pitchY:this.config.layoutPitchY||this.glyphHeight+this.glyphHeightPad,maxHeight:this.getConf("maxHeight")});return this.layout},_clearLayout:function(){delete this.layout},clear:function(){delete this.layout;this.inherited(arguments)},changed:function(){this._clearLayout();this.inherited(arguments)},_exportFormats:function(){return[{name:"GFF3",label:"GFF3",fileExt:"gff3"},{name:"BED",label:"BED",
  fileExt:"bed"},{name:"SequinTable",label:"Sequin Table",fileExt:"sqn"}]},_trackMenuOptions:function(){var a=this.inherited(arguments),b=this;a.push.apply(a,[{type:"dijit/MenuSeparator"},{label:"Show labels",type:"dijit/CheckedMenuItem",checked:!!("showLabels"in this?this.showLabels:this.config.style.showLabels),onClick:function(){b.showLabels=this.checked;b.changed()}}]);return a}})})},"JBrowse/View/Track/_YScaleMixin":function(){define(["dojo/_base/declare","dojo/query","JBrowse/View/Ruler"],function(i,
  j,h){return i(null,{makeYScale:function(g){var g=g||{},e="number"==typeof g.min?g.min:this.minDisplayed,d="number"==typeof g.max?g.max:this.maxDisplayed;this.yscale&&this.yscale.parentNode.removeChild(this.yscale);var c=dojo.create("div",{className:"ruler vertical_ruler",style:{height:this.height+"px",width:"10px",position:"absolute",zIndex:17}},this.div);this.yscale=c;if(this.window_info&&"x"in this.window_info)if("yScalePosition"in this.config)if("right"==this.config.yScalePosition)this.yscale.style.left=
  this.window_info.x+(this.window_info.width-1||0)+"px";else if("left"==this.config.yScalePosition)this.yscale.style.left=this.window_info.x+10+1+"px";else{if("center"==this.config.yScalePosition)this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"}else this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px";dojo.style(c,"top"==this.config.align?{bottom:0}:{top:0});g=new h({min:e,max:d,direction:"up",leftBottom:!("yScalePosition"in this.config&&"left"==this.config.yScalePosition),
  fixBounds:g.fixBounds||!1});g.render_to(c);this.ruler=g},removeYScale:function(){this.yscale?(this.yscale&&(this.yscale.parentNode.removeChild(this.yscale),delete this.yscale),delete this.yscale_params):j(".ruler",this.div).orphan()},updateYScaleFromViewDimensions:function(g){if(("number"==typeof g.x||"number"==typeof g.width)&&this.yscale)if("yScalePosition"in this.config)if("right"==this.config.yScalePosition)this.yscale.style.left=this.window_info.x+(this.window_info.width-1||0)+"px";else if("left"==
  this.config.yScalePosition)this.yscale.style.left=this.window_info.x+10+"px";else{if("center"==this.config.yScalePosition)this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"}else this.yscale.style.left=this.window_info.x+(this.window_info.width||0)/2+"px"}})})},"JBrowse/View/Ruler":function(){define("dojo/query,dojox/charting/Chart,dojox/charting/axis2d/Default,dojox/charting/plot2d/Bubble,dojo/NodeList-dom,dojo/number".split(","),function(i,j){function h(g){dojo.mixin(this,
  g)}h.prototype.render_to=function(g){"string"==typeof g&&(g=dojo.byId(g));var e=dojo.position(g);Math.log(this.max+1);Math.log(10);e=dojo.create("div",{style:{position:"absolute",left:"-9px",bottom:"-9px",width:"10px",height:e.h+18+"px"}},g);try{var d=new j(e,{fill:"transparent"});d.addAxis("y",{vertical:!0,fill:"transparent",min:this.min,max:this.max,fixLower:this.fixBounds?"major":"none",fixUpper:this.fixBounds?"major":"none",leftBottom:this.leftBottom});d.addPlot("default",{type:"Bubble",fill:"transparent"});
  d.render();i("svg rect",d.domNode).orphan();this.scaler=d.axes.y.scaler}catch(c){console.error(c+""),console.error("Failed to draw Ruler with SVG, your browser may not support the necessary technology."),g.removeChild(e)}};return h})},"dojox/charting/Chart":function(){define("../main,dojo/_base/lang,dojo/_base/array,dojo/_base/declare,dojo/dom-style,dojo/dom,dojo/dom-geometry,dojo/dom-construct,dojo/_base/Color,dojo/_base/sniff,./Element,./SimpleTheme,./Series,./axis2d/common,dojox/gfx/shape,dojox/gfx,dojox/lang/functional,dojox/lang/functional/fold,dojox/lang/functional/reversed".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q){function s(a,b){if(a&&b)a.min=Math.min(a.min,b.min),a.max=Math.max(a.max,b.max);return a||b}function u(a,b){var c={},d={};h.forEach(a,function(a){var b=c[a.name]=a.getSeriesStats();a.hAxis&&(d[a.hAxis]=s(d[a.hAxis],{min:b.hmin,max:b.hmax}));a.vAxis&&(d[a.vAxis]=s(d[a.vAxis],{min:b.vmin,max:b.vmax}))});h.forEach(a,function(a){var e=c[a.name];if(a.hAxis){var f=d[a.hAxis];e.hmin=f.min;e.hmax=f.max}if(a.vAxis)f=d[a.vAxis],e.vmin=f.min,e.vmax=f.max;a.initializeScalers(b,
  e)})}var v=j.getObject("charting",!0,i),w=q.lambda("item.clear()"),t=q.lambda("item.purgeGroup()"),y=q.lambda("item.destroy()"),x=q.lambda("item.dirty = false"),B=q.lambda("item.dirty = true"),C=q.lambda("item.name");return g("dojox.charting.Chart",null,{constructor:function(a,b){b||(b={});this.margins=b.margins?b.margins:{l:10,t:10,r:10,b:10};this.stroke=b.stroke;this.fill=b.fill;this.delayInMs=b.delayInMs||200;this.title=b.title;this.titleGap=b.titleGap;this.titlePos=b.titlePos;this.titleFont=b.titleFont;
  this.titleFontColor=b.titleFontColor;this.theme=this.chartTitle=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=!0;this.node=d.byId(a);var e=c.getMarginBox(a);this.surface=p.createSurface(this.node,e.w||400,e.h||300);if(-1==this.surface.declaredClass.indexOf("vml"))this.plotGroup=this.surface.createGroup()},destroy:function(){h.forEach(this.series,y);h.forEach(this.stack,y);q.forIn(this.axes,y);this.surface.destroy();this.chartTitle&&this.chartTitle.tagName&&b.destroy(this.chartTitle)},
  getCoords:function(){var a=this.node,b=e.getComputedStyle(a),b=c.getMarginBox(a,b),a=c.position(a,!0);b.x=a.x;b.y=a.y;return b},setTheme:function(a){this.theme=a.clone();this.dirty=!0;return this},addAxis:function(a,b){var c;c=b&&b.type||"Default";if("string"==typeof c){if(!v.axis2d||!v.axis2d[c])throw Error("Can't find axis: "+c+" - Check require() dependencies.");c=new v.axis2d[c](this,b)}else c=new c(this,b);c.name=a;c.dirty=!0;a in this.axes&&this.axes[a].destroy();this.axes[a]=c;this.dirty=!0;
  return this},getAxis:function(a){return this.axes[a]},removeAxis:function(a){if(a in this.axes)this.axes[a].destroy(),delete this.axes[a],this.dirty=!0;return this},addPlot:function(a,b){var c;c=b&&b.type||"Default";if("string"==typeof c){if(!v.plot2d||!v.plot2d[c])throw Error("Can't find plot: "+c+" - didn't you forget to dojo.require() it?");c=new v.plot2d[c](this,b)}else c=new c(this,b);c.name=a;c.dirty=!0;a in this.plots?(this.stack[this.plots[a]].destroy(),this.stack[this.plots[a]]=c):(this.plots[a]=
  this.stack.length,this.stack.push(c));this.dirty=!0;return this},getPlot:function(a){return this.stack[this.plots[a]]},removePlot:function(a){if(a in this.plots){var b=this.plots[a];delete this.plots[a];this.stack[b].destroy();this.stack.splice(b,1);q.forIn(this.plots,function(a,c,d){a>b&&(d[c]=a-1)});var c=h.filter(this.series,function(b){return b.plot!=a});if(c.length<this.series.length)h.forEach(this.series,function(b){b.plot==a&&b.destroy()}),this.runs={},h.forEach(c,function(a,b){this.runs[a.plot]=
  b},this),this.series=c;this.dirty=!0}return this},getPlotOrder:function(){return q.map(this.stack,C)},setPlotOrder:function(a){var b={},c=q.filter(a,function(a){if(!(a in this.plots)||a in b)return!1;b[a]=1;return!0},this);c.length<this.stack.length&&q.forEach(this.stack,function(a){a=a.name;a in b||c.push(a)});a=q.map(c,function(a){return this.stack[this.plots[a]]},this);q.forEach(a,function(a,b){this.plots[a.name]=b},this);this.stack=a;this.dirty=!0;return this},movePlotToFront:function(a){if(a in
  this.plots){var b=this.plots[a];if(b){var c=this.getPlotOrder();c.splice(b,1);c.unshift(a);return this.setPlotOrder(c)}}return this},movePlotToBack:function(a){if(a in this.plots){var b=this.plots[a];if(b<this.stack.length-1){var c=this.getPlotOrder();c.splice(b,1);c.push(a);return this.setPlotOrder(c)}}return this},addSeries:function(a,b,c){b=new r(this,b,c);b.name=a;a in this.runs?(this.series[this.runs[a]].destroy(),this.series[this.runs[a]]=b):(this.runs[a]=this.series.length,this.series.push(b));
  this.dirty=!0;if(!("ymin"in b)&&"min"in b)b.ymin=b.min;if(!("ymax"in b)&&"max"in b)b.ymax=b.max;return this},getSeries:function(a){return this.series[this.runs[a]]},removeSeries:function(a){if(a in this.runs){var b=this.runs[a];delete this.runs[a];this.series[b].destroy();this.series.splice(b,1);q.forIn(this.runs,function(a,c,d){a>b&&(d[c]=a-1)});this.dirty=!0}return this},updateSeries:function(a,b,c){if(a in this.runs)a=this.series[this.runs[a]],a.update(b),c?this.dirty=!0:(this._invalidateDependentPlots(a.plot,
  !1),this._invalidateDependentPlots(a.plot,!0));return this},getSeriesOrder:function(a){return q.map(q.filter(this.series,function(b){return b.plot==a}),C)},setSeriesOrder:function(a){var b,c={},d=q.filter(a,function(a){if(!(a in this.runs)||a in c)return!1;var d=this.series[this.runs[a]];if(b){if(d.plot!=b)return!1}else b=d.plot;c[a]=1;return!0},this);q.forEach(this.series,function(a){var e=a.name;!(e in c)&&a.plot==b&&d.push(e)});this.series=q.map(d,function(a){return this.series[this.runs[a]]},
  this).concat(q.filter(this.series,function(a){return a.plot!=b}));q.forEach(this.series,function(a,b){this.runs[a.name]=b},this);this.dirty=!0;return this},moveSeriesToFront:function(a){if(a in this.runs){var b=this.runs[a],c=this.getSeriesOrder(this.series[b].plot);if(a!=c[0])return c.splice(b,1),c.unshift(a),this.setSeriesOrder(c)}return this},moveSeriesToBack:function(a){if(a in this.runs){var b=this.runs[a],c=this.getSeriesOrder(this.series[b].plot);if(a!=c[c.length-1])return c.splice(b,1),c.push(a),
  this.setSeriesOrder(c)}return this},resize:function(a,b){var d;switch(arguments.length){case 1:d=j.mixin({},a);c.setMarginBox(this.node,d);break;case 2:d={w:a,h:b},c.setMarginBox(this.node,d)}d=c.getMarginBox(this.node);var e=this.surface.getDimensions();return e.width!=d.w||e.height!=d.h?(this.surface.setDimensions(d.w,d.h),this.dirty=!0,this.render()):this},getGeometry:function(){var a={};q.forIn(this.axes,function(b){b.initialized()&&(a[b.name]={name:b.name,vertical:b.vertical,scaler:b.scaler,
  ticks:b.ticks})});return a},setAxisWindow:function(a,b,c,d){var e=this.axes[a];e&&(e.setWindow(b,c),h.forEach(this.stack,function(b){if(b.hAxis==a||b.vAxis==a)b.zoom=d}));return this},setWindow:function(a,b,c,d,e){"plotArea"in this||this.calculateGeometry();q.forIn(this.axes,function(e){var f,g;f=e.getScaler().bounds;g=f.span/(f.upper-f.lower);e.vertical?(f=b,g=d/g/f):(f=a,g=c/g/f);e.setWindow(f,g)});h.forEach(this.stack,function(a){a.zoom=e});return this},zoomIn:function(a,b,c){var d=this.axes[a];
  if(d){var d=d.getScaler().bounds,e=Math.min(b[0],b[1]),f=Math.max(b[0],b[1]),e=b[0]<d.lower?d.lower:e,f=b[1]>d.upper?d.upper:f;this.setAxisWindow(a,(d.upper-d.lower)/(f-e),e-d.lower);c?this.delayedRender():this.render()}},calculateGeometry:function(){if(this.dirty)return this.fullGeometry();var a=h.filter(this.stack,function(a){return a.dirty||a.hAxis&&this.axes[a.hAxis].dirty||a.vAxis&&this.axes[a.vAxis].dirty},this);u(a,this.plotArea);return this},fullGeometry:function(){this._makeDirty();h.forEach(this.stack,
  w);this.theme||this.setTheme(new n);h.forEach(this.series,function(a){if(!(a.plot in this.plots)){if(!v.plot2d||!v.plot2d.Default)throw Error("Can't find plot: Default - didn't you forget to dojo.require() it?");var b=new v.plot2d.Default(this,{});b.name=a.plot;this.plots[a.plot]=this.stack.length;this.stack.push(b)}this.stack[this.plots[a.plot]].addSeries(a)},this);h.forEach(this.stack,function(a){a.assignAxes&&a.assignAxes(this.axes)},this);var a=this.dim=this.surface.getDimensions();a.width=p.normalizedLength(a.width);
  a.height=p.normalizedLength(a.height);q.forIn(this.axes,w);u(this.stack,a);var b=this.offsets={l:0,r:0,t:0,b:0};q.forIn(this.axes,function(a){q.forIn(a.getOffsets(),function(a,c){b[c]=Math.max(a,b[c])})});if(this.title){this.titleGap=0==this.titleGap?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||"top";this.titleFont=this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";var c=
  p.normalizedLength(p.splitFontString(this.titleFont).size);b["top"==this.titlePos?"t":"b"]+=c+this.titleGap}q.forIn(this.margins,function(a,c){b[c]+=a});this.plotArea={width:a.width-b.l-b.r,height:a.height-b.t-b.b};q.forIn(this.axes,w);u(this.stack,this.plotArea);return this},render:function(){if(this._delayedRenderHandle)clearTimeout(this._delayedRenderHandle),this._delayedRenderHandle=null;this.theme&&this.theme.clear();if(this.dirty)return this.fullRender();this.calculateGeometry();q.forEachRev(this.stack,
  function(a){a.render(this.dim,this.offsets)},this);q.forIn(this.axes,function(a){a.render(this.dim,this.offsets)},this);this._makeClean();return this},fullRender:function(){this.fullGeometry();var c=this.offsets,d=this.dim,e=Math.max(0,d.width-c.l-c.r),f=Math.max(0,d.height-c.t-c.b);h.forEach(this.series,t);q.forIn(this.axes,t);h.forEach(this.stack,t);for(var g=this.surface.children,i=0;i<g.length;++i)l.dispose(g[i]);this.chartTitle&&this.chartTitle.tagName&&b.destroy(this.chartTitle);this.plotGroup&&
  this.plotGroup.clear();this.surface.clear();this.chartTitle=null;this.plotGroup?(this._renderChartBackground(d,c),this._renderPlotBackground(d,c,e,f),this.surface.add(this.plotGroup),this.plotGroup.setClip({x:c.l,y:c.t,width:e,height:f})):this._renderPlotBackground(d,c,e,f);q.foldr(this.stack,function(a,b){return b.render(d,c),0},0);this.plotGroup||this._renderChartBackground(d,c);if(this.title)e="canvas"==p.renderer||!a("ie")&&!a("opera")?"html":"gfx",f=p.normalizedLength(p.splitFontString(this.titleFont).size),
  this.chartTitle=m.createText[e](this,this.surface,d.width/2,"top"==this.titlePos?f+this.margins.t:d.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor);q.forIn(this.axes,function(a){a.render(d,c)});this._makeClean();return this},_renderChartBackground:function(a,b){var c=this.theme,d,g=void 0!==this.fill?this.fill:c.chart&&c.chart.fill,c=void 0!==this.stroke?this.stroke:c.chart&&c.chart.stroke;if("inherit"==g){d=this.node;for(g=new f(e.get(d,"backgroundColor"));0==g.a&&d!=
  document.documentElement;)g=new f(e.get(d,"backgroundColor")),d=d.parentNode}g&&(this.plotGroup?(g=k.prototype._shapeFill(k.prototype._plotFill(g,a),{x:0,y:0,width:a.width+1,height:a.height+1}),this.surface.createRect({width:a.width+1,height:a.height+1}).setFill(g)):(g=k.prototype._plotFill(g,a,b),b.l&&(d={x:0,y:0,width:b.l,height:a.height+1},this.surface.createRect(d).setFill(k.prototype._shapeFill(g,d))),b.r&&(d={x:a.width-b.r,y:0,width:b.r+1,height:a.height+2},this.surface.createRect(d).setFill(k.prototype._shapeFill(g,
  d))),b.t&&(d={x:0,y:0,width:a.width+1,height:b.t},this.surface.createRect(d).setFill(k.prototype._shapeFill(g,d))),b.b&&(d={x:0,y:a.height-b.b,width:a.width+1,height:b.b+2},this.surface.createRect(d).setFill(k.prototype._shapeFill(g,d)))));c&&this.surface.createRect({width:a.width-1,height:a.height-1}).setStroke(c)},_renderPlotBackground:function(a,b,c,d){var e=this.theme,f=e.plotarea&&e.plotarea.fill,e=e.plotarea&&e.plotarea.stroke,g={x:b.l-1,y:b.t-1,width:c+2,height:d+2};f&&(f=k.prototype._shapeFill(k.prototype._plotFill(f,
  a,b),g),this.surface.createRect(g).setFill(f));e&&this.surface.createRect({x:b.l,y:b.t,width:c+1,height:d+1}).setStroke(e)},delayedRender:function(){if(!this._delayedRenderHandle)this._delayedRenderHandle=setTimeout(j.hitch(this,function(){this.render()}),this.delayInMs);return this},connectToPlot:function(a,b,c){return a in this.plots?this.stack[this.plots[a]].connect(b,c):null},fireEvent:function(a,b,c){if(a in this.runs){var d=this.series[this.runs[a]].plot;d in this.plots&&(d=this.stack[this.plots[d]])&&
  d.fireEvent(a,b,c)}return this},_makeClean:function(){h.forEach(this.axes,x);h.forEach(this.stack,x);h.forEach(this.series,x);this.dirty=!1},_makeDirty:function(){h.forEach(this.axes,B);h.forEach(this.stack,B);h.forEach(this.series,B);this.dirty=!0},_invalidateDependentPlots:function(a,b){if(a in this.plots){var c=this.stack[this.plots[a]],d,e=b?"vAxis":"hAxis";if(c[e]){if((d=this.axes[c[e]])&&d.dependOnData())d.dirty=!0,h.forEach(this.stack,function(a){if(a[e]&&a[e]==c[e])a.dirty=!0})}else c.dirty=
  !0}}})})},"dojox/charting/Element":function(){define("dojo/_base/lang,dojo/_base/array,dojo/dom-construct,dojo/_base/declare,dojox/gfx,dojox/gfx/shape".split(","),function(i,j,h,g,e,d){return g("dojox.charting.Element",null,{chart:null,group:null,htmlElements:null,dirty:!0,constructor:function(c){this.chart=c;this.group=null;this.htmlElements=[];this.dirty=!0;this.trailingSymbol="...";this._events=[]},purgeGroup:function(){this.destroyHtmlElements();if(this.group){this.group.removeShape();for(var c=
  this.group.children,b=0;b<c.length;++b)d.dispose(c[b],!0);this.group.clear();d.dispose(this.group,!0);this.group=null}this.dirty=!0;if(this._events.length)j.forEach(this._events,function(b){b.shape.disconnect(b.handle)}),this._events=[];return this},cleanGroup:function(c){this.destroyHtmlElements();if(!c)c=this.chart.surface;if(this.group){for(var c=this.group.children,b=0;b<c.length;++b)d.dispose(c[b],!0);this.group.clear()}else this.group=c.createGroup();this.dirty=!0;return this},destroyHtmlElements:function(){if(this.htmlElements.length)j.forEach(this.htmlElements,
  h.destroy),this.htmlElements=[]},destroy:function(){this.purgeGroup()},getTextWidth:function(c,b){return e._base._getTextBox(c,{font:b}).w||0},getTextWithLimitLength:function(c,b,d,a){if(!c||0>=c.length)return{text:"",truncated:a||!1};if(!d||0>=d)return{text:c,truncated:a||!1};var e=c.substring(0,1)+this.trailingSymbol,g=this.getTextWidth(e,b);if(d<=g)return{text:e,truncated:!0};if(this.getTextWidth(c,b)<=d)return{text:c,truncated:a||!1};a=0;for(e=c.length;a<e;){if(2>=e-a){for(;this.getTextWidth(c.substring(0,
  a)+this.trailingSymbol,b)>d;)a-=1;return{text:c.substring(0,a)+this.trailingSymbol,truncated:!0}}g=a+Math.round(0.618*(e-a));this.getTextWidth(c.substring(0,g),b)<d?a=g:e=g}},getTextWithLimitCharCount:function(c,b,d,a){return!c||0>=c.length?{text:"",truncated:a||!1}:!d||0>=d||c.length<=d?{text:c,truncated:a||!1}:{text:c.substring(0,d)+this.trailingSymbol,truncated:!0}},_plotFill:function(c,b,d){if(!c||!c.type||!c.space)return c;var a=c.space,g;switch(c.type){case "linear":if("plot"===a||"shapeX"===
  a||"shapeY"===a){c=e.makeParameters(e.defaultLinearGradient,c);c.space=a;if("plot"===a||"shapeX"===a)g=b.height-d.t-d.b,c.y1=d.t+g*c.y1/100,c.y2=d.t+g*c.y2/100;if("plot"===a||"shapeY"===a)g=b.width-d.l-d.r,c.x1=d.l+g*c.x1/100,c.x2=d.l+g*c.x2/100}break;case "radial":if("plot"===a)c=e.makeParameters(e.defaultRadialGradient,c),c.space=a,a=b.width-d.l-d.r,b=b.height-d.t-d.b,c.cx=d.l+a*c.cx/100,c.cy=d.t+b*c.cy/100,c.r=c.r*Math.sqrt(a*a+b*b)/200;break;case "pattern":if("plot"===a||"shapeX"===a||"shapeY"===
  a){c=e.makeParameters(e.defaultPattern,c);c.space=a;if("plot"===a||"shapeX"===a)g=b.height-d.t-d.b,c.y=d.t+g*c.y/100,c.height=g*c.height/100;if("plot"===a||"shapeY"===a)g=b.width-d.l-d.r,c.x=d.l+g*c.x/100,c.width=g*c.width/100}}return c},_shapeFill:function(c,b){if(!c||!c.space)return c;var d=c.space,a;switch(c.type){case "linear":if("shape"===d||"shapeX"===d||"shapeY"===d){c=e.makeParameters(e.defaultLinearGradient,c);c.space=d;if("shape"===d||"shapeX"===d)a=b.width,c.x1=b.x+a*c.x1/100,c.x2=b.x+
  a*c.x2/100;if("shape"===d||"shapeY"===d)a=b.height,c.y1=b.y+a*c.y1/100,c.y2=b.y+a*c.y2/100}break;case "radial":if("shape"===d)c=e.makeParameters(e.defaultRadialGradient,c),c.space=d,c.cx=b.x+b.width/2,c.cy=b.y+b.height/2,c.r=c.r*b.width/200;break;case "pattern":if("shape"===d||"shapeX"===d||"shapeY"===d){c=e.makeParameters(e.defaultPattern,c);c.space=d;if("shape"===d||"shapeX"===d)a=b.width,c.x=b.x+a*c.x/100,c.width=a*c.width/100;if("shape"===d||"shapeY"===d)a=b.height,c.y=b.y+a*c.y/100,c.height=
  a*c.height/100}}return c},_pseudoRadialFill:function(c,b,d,a,g){if(!c||"radial"!==c.type||"shape"!==c.space)return c;var h=c.space,c=e.makeParameters(e.defaultRadialGradient,c);c.space=h;if(4>arguments.length)return c.cx=b.x,c.cy=b.y,c.r=c.r*d/100,c;h=5>arguments.length?a:(g+a)/2;return{type:"linear",x1:b.x,y1:b.y,x2:b.x+c.r*d*Math.cos(h)/100,y2:b.y+c.r*d*Math.sin(h)/100,colors:c.colors}}})})},"dojox/gfx":function(){define(["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(i,j,h){j.switchTo(h);
  return j})},"dojox/gfx/_base":function(){define("dojo/_base/kernel,dojo/_base/lang,dojo/_base/Color,dojo/_base/sniff,dojo/_base/window,dojo/_base/array,dojo/dom,dojo/dom-construct,dojo/dom-geometry".split(","),function(i,j,h,g,e,d,c,b,f){var a=j.getObject("dojox.gfx",!0),k=a._base={};a._hasClass=function(a,b){var c=a.getAttribute("className");return c&&0<=(" "+c+" ").indexOf(" "+b+" ")};a._addClass=function(a,b){var c=a.getAttribute("className")||"";if(!c||0>(" "+c+" ").indexOf(" "+b+" "))a.setAttribute("className",
  c+(c?" ":"")+b)};a._removeClass=function(a,b){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)"),"$1$2"))};k._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},c;if(g("ie"))e.doc.documentElement.style.fontSize="100%";var d=b.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",
  padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},e.body());for(c in a)d.style.fontSize=c,a[c]=16*Math.round(12*d.offsetHeight/16)/12/1E3;e.body().removeChild(d);return a};var n=null;k._getCachedFontMeasurements=function(a){if(a||!n)n=k._getFontMeasurements();return n};var r=null,m={};k._getTextBox=function(a,c,d){var g,h,i=arguments.length,k;r||(r=b.create("div",{style:{position:"absolute",top:"-10000px",left:"0"}},e.body()));g=r;g.className="";h=g.style;h.borderWidth="0";h.margin="0";
  h.padding="0";h.outline="0";if(1<i&&c)for(k in c)k in m||(h[k]=c[k]);if(2<i&&d)g.className=d;g.innerHTML=a;return g.getBoundingClientRect?(g=g.getBoundingClientRect(),{l:g.left,t:g.top,w:g.width||g.right-g.left,h:g.height||g.bottom-g.top}):f.getMarginBox(g)};var l=0;k._getUniqueId=function(){var a;do a=i._scopeName+"xUnique"+ ++l;while(c.byId(a));return a};j.mixin(a,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,
  r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",
  x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var b={};return function(c){var d=b[c];if(d)return new d;d=b[c]=new Function;d.prototype=a["default"+c];return new d}}(),
  normalizeColor:function(a){return a instanceof h?a:new h(a)},normalizeParameters:function(a,b){var c;if(b){var d={};for(c in a)c in b&&!(c in d)&&(a[c]=b[c])}return a},makeParameters:function(a,b){var c=null;if(!b)return j.delegate(a);var d={};for(c in a)c in d||(d[c]=j.clone(c in b?b[c]:a[c]));return d},formatNumber:function(a,b){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var d=c.indexOf(".");0<=d&&5<c.length-d&&(c=a.toFixed(4))}return 0>a?c:b?" "+c:c},makeFontString:function(a){return a.style+
  " "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(b){var c=a.getDefault("Font"),b=b.split(/\s+/);if(!(5>b.length)){c.style=b[0];c.variant=b[1];c.weight=b[2];var d=b[3].indexOf("/");c.size=0>d?b[3]:b[3].substring(0,d);var e=4;0>d&&("/"==b[4]?e=6:"/"==b[4].charAt(0)&&(e=5));if(e<b.length)c.family=b.slice(e).join(" ")}return c},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return a._base._getCachedFontMeasurements()["12pt"]/12},pt2px:function(b){return b*a.px_in_pt()},
  px2pt:function(b){return b/a.px_in_pt()},normalizedLength:function(b){if(0===b.length)return 0;if(2<b.length){var c=a.px_in_pt(),d=parseFloat(b);switch(b.slice(-2)){case "px":return d;case "pt":return d*c;case "in":return 72*d*c;case "pc":return 12*d*c;case "mm":return d*a.mm_in_pt*c;case "cm":return d*a.cm_in_pt*c}}return parseFloat(b)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,
  b){return a&&b&&a===b},switchTo:function(b){var c="string"==typeof b?a[b]:b;c&&d.forEach("Group,Rect,Ellipse,Circle,Line,Polyline,Image,Text,Path,TextPath,Surface,createSurface,fixTarget".split(","),function(b){a[b]=c[b]})}});return a})},"dojox/gfx/renderer":function(){define(["./_base","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window","dojo/_base/config"],function(i,j,h,g,e){var d=null;return{load:function(c,b,f){function a(){b(["dojox/gfx/"+k],function(a){i.renderer=k;d=a;f(a)})}if(d&&"force"!=
  c)f(d);else{for(var k=e.forceGfxRenderer,c=!k&&(j.isString(e.gfxRenderer)?e.gfxRenderer:"svg,vml,canvas,silverlight").split(","),n,r;!k&&c.length;)switch(c.shift()){case "svg":"SVGAngle"in g.global&&(k="svg");break;case "vml":h("ie")&&(k="vml");break;case "silverlight":try{h("ie")?(n=new ActiveXObject("AgControl.AgControl"))&&n.IsVersionSupported("1.0")&&(r=!0):navigator.plugins["Silverlight Plug-In"]&&(r=!0)}catch(m){r=!1}finally{n=null}r&&(k="silverlight");break;case "canvas":g.global.CanvasRenderingContext2D&&
  (k="canvas")}"canvas"===k&&!1!==e.canvasEvents&&(k="canvasWithEvents");"svg"==k&&"undefined"!=typeof window.svgweb?window.svgweb.addOnLoad(a):a()}}}})},"dojox/gfx/shape":function(){define("./_base,dojo/_base/lang,dojo/_base/declare,dojo/_base/kernel,dojo/_base/sniff,dojo/_base/connect,dojo/_base/array,dojo/dom-construct,dojo/_base/Color,./matrix".split(","),function(i,j,h,g,e,d,c,b,f,a){var k=i.shape={},n={},r={};k.register=function(a){var b=a.declaredClass.split(".").pop(),c=b in n?++n[b]:n[b]=0,
  b=b+c;r[b]=a;return b};k.byId=function(a){return r[a]};k.dispose=function(a,b){if(b&&a.children)for(var c=0;c<a.children.length;++c)k.dispose(a.children[c],!0);delete r[a.getUID()]};k.Shape=h("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null;var a=k.register(this);this.getUID=function(){return a}},destroy:function(){k.dispose(this)},getNode:function(){return this.rawNode},getShape:function(){return this.shape},
  getTransform:function(){return this.matrix},getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent},getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var b=this.getBoundingBox();if(!b)return null;var c=this._getRealMatrix();return[a.multiplyPoint(c,b.x,b.y),a.multiplyPoint(c,b.x+b.width,b.y),a.multiplyPoint(c,b.x+b.width,b.y+b.height),a.multiplyPoint(c,b.x,b.y+b.height)]},getEventSource:function(){return this.rawNode},
  setClip:function(a){this.clip=a},getClip:function(){return this.clip},setShape:function(a){this.shape=i.makeParameters(this.shape,a);this.bbox=null;return this},setFill:function(a){if(!a)return this.fillStyle=null,this;var b=null;if("object"==typeof a&&"type"in a)switch(a.type){case "linear":b=i.makeParameters(i.defaultLinearGradient,a);break;case "radial":b=i.makeParameters(i.defaultRadialGradient,a);break;case "pattern":b=i.makeParameters(i.defaultPattern,a)}else b=i.normalizeColor(a);this.fillStyle=
  b;return this},setStroke:function(a){if(!a)return this.strokeStyle=null,this;if("string"==typeof a||j.isArray(a)||a instanceof f)a={color:a};a=this.strokeStyle=i.makeParameters(i.defaultStroke,a);a.color=i.normalizeColor(a.color);return this},setTransform:function(b){this.matrix=a.clone(b?a.normalize(b):a.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this},moveToBack:function(){var a=
  this.getParent();a&&(a._moveChildToBack(this),this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(a){return a?this.setTransform([this.matrix,a]):this},applyLeftTransform:function(a){return a?this.setTransform([a,this.matrix]):this},applyTransform:function(a){return a?this.setTransform([this.matrix,a]):this},removeShape:function(a){this.parent&&this.parent.remove(this,a);return this},_setParent:function(a,b){this.parent=a;return this._updateParentMatrix(b)},
  _updateParentMatrix:function(b){this.parentMatrix=b?a.clone(b):null;return this._applyTransform()},_getRealMatrix:function(){for(var b=this.matrix,c=this.parent;c;)c.matrix&&(b=a.multiply(c.matrix,b)),c=c.parent;return b}});k._eventsProcessing={connect:function(a,b,c){return d.connect(this.getEventSource(),a,k.fixCallback(this,i.fixTarget,b,c))},disconnect:function(a){d.disconnect(a)}};k.fixCallback=function(a,b,c,d){d||(d=c,c=null);if(j.isString(d)){c=c||g.global;if(!c[d])throw['dojox.gfx.shape.fixCallback: scope["',
  d,'"] is null (scope="',c,'")'].join("");return function(e){return b(e,a)?c[d].apply(c,arguments||[]):void 0}}return!c?function(e){return b(e,a)?d.apply(c,arguments):void 0}:function(e){return b(e,a)?d.apply(c,arguments||[]):void 0}};j.extend(k.Shape,k._eventsProcessing);k.Container={_init:function(){this.children=[]},openBatch:function(){},closeBatch:function(){},add:function(a){var b=a.getParent();b&&b.remove(a,!0);this.children.push(a);return a._setParent(this,this._getRealMatrix())},remove:function(a,
  b){for(var c=0;c<this.children.length;++c)if(this.children[c]==a){if(!b)a.parent=null,a.parentMatrix=null;this.children.splice(c,1);break}return this},clear:function(a){for(var b,c=0;c<this.children.length;++c)b=this.children[c],b.parent=null,b.parentMatrix=null,a&&b.destroy();this.children=[];return this},getBoundingBox:function(){if(this.children){var b=null;c.forEach(this.children,function(c){var d=c.getBoundingBox();if(d)(c=c.getTransform())&&(d=a.multiplyRectangle(c,d)),b?(b.x=Math.min(b.x,d.x),
  b.y=Math.min(b.y,d.y),b.endX=Math.max(b.endX,d.x+d.width),b.endY=Math.max(b.endY,d.y+d.height)):b={x:d.x,y:d.y,endX:d.x+d.width,endY:d.y+d.height}});if(b)b.width=b.endX-b.x,b.height=b.endY-b.y;return b}return null},_moveChildToFront:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){this.children.splice(b,1);this.children.push(a);break}return this},_moveChildToBack:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){this.children.splice(b,1);this.children.unshift(a);
  break}return this}};k.Surface=h("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){c.forEach(this._nodes,b.destroy);this._nodes=[];c.forEach(this._events,d.disconnect);this._events=[];this.rawNode=null;if(e("ie"))for(;this._parent.lastChild;)b.destroy(this._parent.lastChild);else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},_getRealMatrix:function(){return null},isLoaded:!0,
  onLoad:function(){},whenLoaded:function(a,b){var c=j.hitch(a,b);if(this.isLoaded)c(this);else var e=d.connect(this,"onLoad",function(a){d.disconnect(e);c(a)})}});j.extend(k.Surface,k._eventsProcessing);k.Rect=h("dojox.gfx.shape.Rect",k.Shape,{constructor:function(a){this.shape=i.getDefault("Rect");this.rawNode=a},getBoundingBox:function(){return this.shape}});k.Ellipse=h("dojox.gfx.shape.Ellipse",k.Shape,{constructor:function(a){this.shape=i.getDefault("Ellipse");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=
  this.shape;this.bbox={x:a.cx-a.rx,y:a.cy-a.ry,width:2*a.rx,height:2*a.ry}}return this.bbox}});k.Circle=h("dojox.gfx.shape.Circle",k.Shape,{constructor:function(a){this.shape=i.getDefault("Circle");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox}});k.Line=h("dojox.gfx.shape.Line",k.Shape,{constructor:function(a){this.shape=i.getDefault("Line");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=
  this.shape;this.bbox={x:Math.min(a.x1,a.x2),y:Math.min(a.y1,a.y2),width:Math.abs(a.x2-a.x1),height:Math.abs(a.y2-a.y1)}}return this.bbox}});k.Polyline=h("dojox.gfx.shape.Polyline",k.Shape,{constructor:function(a){this.shape=i.getDefault("Polyline");this.rawNode=a},setShape:function(a,b){a&&a instanceof Array?(this.inherited(arguments,[{points:a}]),b&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[a]);return this},_normalizePoints:function(){var a=
  this.shape.points,b=a&&a.length;if(b&&"number"==typeof a[0]){for(var c=[],d=0;d<b;d+=2)c.push({x:a[d],y:a[d+1]});this.shape.points=c}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var a=this.shape.points,b=a.length,c=a[0],d=c.x,e=c.y,f=c.x,g=c.y,h=1;h<b;++h){c=a[h];if(d>c.x)d=c.x;if(f<c.x)f=c.x;if(e>c.y)e=c.y;if(g<c.y)g=c.y}this.bbox={x:d,y:e,width:f-d,height:g-e}}return this.bbox}});k.Image=h("dojox.gfx.shape.Image",k.Shape,{constructor:function(a){this.shape=i.getDefault("Image");
  this.rawNode=a},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});k.Text=h(k.Shape,{constructor:function(a){this.fontStyle=null;this.shape=i.getDefault("Text");this.rawNode=a},getFont:function(){return this.fontStyle},setFont:function(a){this.fontStyle="string"==typeof a?i.splitFontString(a):i.makeParameters(i.defaultFont,a);this._setFont();return this}});k.Creator={createShape:function(a){switch(a.type){case i.defaultPath.type:return this.createPath(a);
  case i.defaultRect.type:return this.createRect(a);case i.defaultCircle.type:return this.createCircle(a);case i.defaultEllipse.type:return this.createEllipse(a);case i.defaultLine.type:return this.createLine(a);case i.defaultPolyline.type:return this.createPolyline(a);case i.defaultImage.type:return this.createImage(a);case i.defaultText.type:return this.createText(a);case i.defaultTextPath.type:return this.createTextPath(a)}return null},createGroup:function(){return this.createObject(i.Group)},createRect:function(a){return this.createObject(i.Rect,
  a)},createEllipse:function(a){return this.createObject(i.Ellipse,a)},createCircle:function(a){return this.createObject(i.Circle,a)},createLine:function(a){return this.createObject(i.Line,a)},createPolyline:function(a){return this.createObject(i.Polyline,a)},createImage:function(a){return this.createObject(i.Image,a)},createText:function(a){return this.createObject(i.Text,a)},createPath:function(a){return this.createObject(i.Path,a)},createTextPath:function(a){return this.createObject(i.TextPath,{}).setText(a)},
  createObject:function(){return null}};return k})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(i,j){var h=i.matrix={},g={};h._degToRad=function(e){return g[e]||(g[e]=Math.PI*e/180)};h._radToDeg=function(e){return 180*(e/Math.PI)};h.Matrix2D=function(e){if(e)if("number"==typeof e)this.xx=this.yy=e;else if(e instanceof Array){if(0<e.length){for(var d=h.normalize(e[0]),c=1;c<e.length;++c){var b=d,f=h.normalize(e[c]),d=new h.Matrix2D;d.xx=b.xx*f.xx+b.xy*f.yx;d.xy=b.xx*f.xy+
  b.xy*f.yy;d.yx=b.yx*f.xx+b.yy*f.yx;d.yy=b.yx*f.xy+b.yy*f.yy;d.dx=b.xx*f.dx+b.xy*f.dy+b.dx;d.dy=b.yx*f.dx+b.yy*f.dy+b.dy}j.mixin(this,d)}}else j.mixin(this,e)};j.extend(h.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});j.mixin(h,{identity:new h.Matrix2D,flipX:new h.Matrix2D({xx:-1}),flipY:new h.Matrix2D({yy:-1}),flipXY:new h.Matrix2D({xx:-1,yy:-1}),translate:function(e,d){return 1<arguments.length?new h.Matrix2D({dx:e,dy:d}):new h.Matrix2D({dx:e.x,dy:e.y})},scale:function(e,d){return 1<arguments.length?
  new h.Matrix2D({xx:e,yy:d}):"number"==typeof e?new h.Matrix2D({xx:e,yy:e}):new h.Matrix2D({xx:e.x,yy:e.y})},rotate:function(e){var d=Math.cos(e),e=Math.sin(e);return new h.Matrix2D({xx:d,xy:-e,yx:e,yy:d})},rotateg:function(e){return h.rotate(h._degToRad(e))},skewX:function(e){return new h.Matrix2D({xy:Math.tan(e)})},skewXg:function(e){return h.skewX(h._degToRad(e))},skewY:function(e){return new h.Matrix2D({yx:Math.tan(e)})},skewYg:function(e){return h.skewY(h._degToRad(e))},reflect:function(e,d){if(1==
  arguments.length)d=e.y,e=e.x;var c=e*e,b=d*d,f=c+b,a=2*e*d/f;return new h.Matrix2D({xx:2*c/f-1,xy:a,yx:a,yy:2*b/f-1})},project:function(e,d){if(1==arguments.length)d=e.y,e=e.x;var c=e*e,b=d*d,f=c+b,a=e*d/f;return new h.Matrix2D({xx:c/f,xy:a,yx:a,yy:b/f})},normalize:function(e){return e instanceof h.Matrix2D?e:new h.Matrix2D(e)},isIdentity:function(e){return 1==e.xx&&0==e.xy&&0==e.yx&&1==e.yy&&0==e.dx&&0==e.dy},clone:function(e){var d=new h.Matrix2D,c;for(c in e)"number"==typeof e[c]&&"number"==typeof d[c]&&
  d[c]!=e[c]&&(d[c]=e[c]);return d},invert:function(e){var e=h.normalize(e),d=e.xx*e.yy-e.xy*e.yx;return e=new h.Matrix2D({xx:e.yy/d,xy:-e.xy/d,yx:-e.yx/d,yy:e.xx/d,dx:(e.xy*e.dy-e.yy*e.dx)/d,dy:(e.yx*e.dx-e.xx*e.dy)/d})},_multiplyPoint:function(e,d,c){return{x:e.xx*d+e.xy*c+e.dx,y:e.yx*d+e.yy*c+e.dy}},multiplyPoint:function(e,d,c){e=h.normalize(e);return"number"==typeof d&&"number"==typeof c?h._multiplyPoint(e,d,c):h._multiplyPoint(e,d.x,d.y)},multiplyRectangle:function(e,d){var c=h.normalize(e),d=
  d||{x:0,y:0,width:0,height:0};if(h.isIdentity(c))return{x:d.x,y:d.y,width:d.width,height:d.height};var b=h.multiplyPoint(c,d.x,d.y),f=h.multiplyPoint(c,d.x,d.y+d.height),a=h.multiplyPoint(c,d.x+d.width,d.y),g=h.multiplyPoint(c,d.x+d.width,d.y+d.height),c=Math.min(b.x,f.x,a.x,g.x),i=Math.min(b.y,f.y,a.y,g.y),j=Math.max(b.x,f.x,a.x,g.x),b=Math.max(b.y,f.y,a.y,g.y);return{x:c,y:i,width:j-c,height:b-i}},multiply:function(e){for(var d=h.normalize(e),c=1;c<arguments.length;++c){var b=d,f=h.normalize(arguments[c]),
  d=new h.Matrix2D;d.xx=b.xx*f.xx+b.xy*f.yx;d.xy=b.xx*f.xy+b.xy*f.yy;d.yx=b.yx*f.xx+b.yy*f.yx;d.yy=b.yx*f.xy+b.yy*f.yy;d.dx=b.xx*f.dx+b.xy*f.dy+b.dx;d.dy=b.yx*f.dx+b.yy*f.dy+b.dy}return d},_sandwich:function(e,d,c){return h.multiply(h.translate(d,c),e,h.translate(-d,-c))},scaleAt:function(e,d,c,b){switch(arguments.length){case 4:return h._sandwich(h.scale(e,d),c,b);case 3:return"number"==typeof c?h._sandwich(h.scale(e),d,c):h._sandwich(h.scale(e,d),c.x,c.y)}return h._sandwich(h.scale(e),d.x,d.y)},rotateAt:function(e,
  d,c){return 2<arguments.length?h._sandwich(h.rotate(e),d,c):h._sandwich(h.rotate(e),d.x,d.y)},rotategAt:function(e,d,c){return 2<arguments.length?h._sandwich(h.rotateg(e),d,c):h._sandwich(h.rotateg(e),d.x,d.y)},skewXAt:function(e,d,c){return 2<arguments.length?h._sandwich(h.skewX(e),d,c):h._sandwich(h.skewX(e),d.x,d.y)},skewXgAt:function(e,d,c){return 2<arguments.length?h._sandwich(h.skewXg(e),d,c):h._sandwich(h.skewXg(e),d.x,d.y)},skewYAt:function(e,d,c){return 2<arguments.length?h._sandwich(h.skewY(e),
  d,c):h._sandwich(h.skewY(e),d.x,d.y)},skewYgAt:function(e,d,c){return 2<arguments.length?h._sandwich(h.skewYg(e),d,c):h._sandwich(h.skewYg(e),d.x,d.y)}});i.Matrix2D=h.Matrix2D;return h})},"dojox/charting/SimpleTheme":function(){define("dojo/_base/lang,dojo/_base/array,dojo/_base/declare,dojo/_base/Color,dojox/lang/utils,dojox/gfx/gradutils".split(","),function(i,j,h,g,e,d){var c=h("dojox.charting.SimpleTheme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(b){var b=b||{},d=c.defaultTheme;
  j.forEach("chart,plotarea,axis,grid,series,marker,indicator".split(","),function(a){this[a]=i.delegate(d[a],b[a])},this);b.seriesThemes&&b.seriesThemes.length?(this.colors=null,this.seriesThemes=b.seriesThemes.slice(0)):(this.seriesThemes=null,this.colors=(b.colors||c.defaultColors).slice(0));this.markerThemes=null;if(b.markerThemes&&b.markerThemes.length)this.markerThemes=b.markerThemes.slice(0);this.markers=b.markers?i.clone(b.markers):i.delegate(c.defaultMarkers);this.noGradConv=b.noGradConv;this.noRadialConv=
  b.noRadialConv;b.reverseFills&&this.reverseFills();this._current=0;this._buildMarkerArray()},clone:function(){var b=new this.constructor({chart:this.chart,plotarea:this.plotarea,axis:this.axis,grid:this.grid,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,indicator:this.indicator,seriesThemes:this.seriesThemes,markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv});j.forEach("clone,clear,next,skip,addMixin,post,getTick".split(","),function(c){this.hasOwnProperty(c)&&
  (b[c]=this[c])},this);return b},clear:function(){this._current=0},next:function(b,c,a){var d=e.merge,h;if(this.colors){h=i.delegate(this.series);var d=i.delegate(this.marker),j=new g(this.colors[this._current%this.colors.length]),m;h.stroke&&h.stroke.color?(h.stroke=i.delegate(h.stroke),m=new g(h.stroke.color),h.stroke.color=new g(j),h.stroke.color.a=m.a):h.stroke={color:j};d.stroke&&d.stroke.color?(d.stroke=i.delegate(d.stroke),m=new g(d.stroke.color),d.stroke.color=new g(j),d.stroke.color.a=m.a):
  d.stroke={color:j};!h.fill||h.fill.type?h.fill=j:(m=new g(h.fill),h.fill=new g(j),h.fill.a=m.a);!d.fill||d.fill.type?d.fill=j:(m=new g(d.fill),d.fill=new g(j),d.fill.a=m.a)}else h=this.seriesThemes?d(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series,d=this.markerThemes?d(this.marker,this.markerThemes[this._current%this.markerThemes.length]):h;h={series:h,marker:d,symbol:d&&d.symbol||this._markers[this._current%this._markers.length]};++this._current;c&&(h=this.addMixin(h,
  b,c));a&&(h=this.post(h,b));return h},skip:function(){++this._current},addMixin:function(b,c,a,d){if(i.isArray(a))j.forEach(a,function(a){b=this.addMixin(b,c,a)},this);else{var g={};"color"in a&&("line"==c||"area"==c?(i.setObject("series.stroke.color",a.color,g),i.setObject("marker.stroke.color",a.color,g)):i.setObject("series.fill",a.color,g));j.forEach("stroke,outline,shadow,fill,font,fontColor,labelWiring".split(","),function(b){var c="marker"+b.charAt(0).toUpperCase()+b.substr(1),d=c in a;b in
  a&&(i.setObject("series."+b,a[b],g),d||i.setObject("marker."+b,a[b],g));d&&i.setObject("marker."+b,a[c],g)});if("marker"in a)g.symbol=a.marker,g.symbol=a.marker;b=e.merge(b,g)}d&&(b=this.post(b,c));return b},post:function(b,c){var a=b.series.fill,d;if(!this.noGradConv&&this.shapeSpaces[a.space]&&"linear"==a.type){if("bar"==c)d={x1:a.y1,y1:a.x1,x2:a.y2,y2:a.x2};else if(!this.noRadialConv&&"shape"==a.space&&("slice"==c||"circle"==c))d={type:"radial",cx:0,cy:0,r:100};if(d)return e.merge(b,{series:{fill:d}})}return b},
  getTick:function(b,c){var a=this.axis.tick,d=b+"Tick",g=e.merge;a?this.axis[d]&&(a=g(a,this.axis[d])):a=this.axis[d];c&&(a?c[d]&&(a=g(a,c[d])):a=c[d]);return a},inspectObjects:function(b){j.forEach("chart,plotarea,axis,grid,series,marker,indicator".split(","),function(c){b(this[c])},this);this.seriesThemes&&j.forEach(this.seriesThemes,b);this.markerThemes&&j.forEach(this.markerThemes,b)},reverseFills:function(){this.inspectObjects(function(b){if(b&&b.fill)b.fill=d.reverse(b.fill)})},addMarker:function(b,
  c){this.markers[b]=c;this._buildMarkerArray()},setMarkers:function(b){this.markers=b;this._buildMarkerArray()},_buildMarkerArray:function(){this._markers=[];for(var b in this.markers)this._markers.push(this.markers[b])}});i.mixin(c,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c",
  "#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",font:"normal normal normal 7pt Tahoma",fontColor:"#333",labelGap:4},majorTick:{width:1,length:6},minorTick:{width:0.8,length:3},microTick:{width:0.5,length:1},title:{gap:15,font:"normal normal normal 11pt Tahoma",
  fontColor:"#333",orientation:"axis"}},series:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000"},indicator:{lineStroke:{width:1.5,color:"#333"},lineOutline:{width:0.1,color:"#ccc"},lineShadow:null,stroke:{width:1.5,color:"#333"},
  outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",radius:3,font:"normal normal normal 10pt Tahoma",fontColor:"#000",markerFill:"#ccc",markerSymbol:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",markerStroke:{width:1.5,color:"#333"},markerOutline:{width:0.1,color:"#ccc"},markerShadow:null}}});return c})},"dojox/lang/utils":function(){define(["..","dojo/_base/lang"],function(i,j){var h=j.getObject("lang.utils",!0,i),g={},e=Object.prototype.toString,d=function(c){if(c)switch(e.call(c)){case "[object Array]":return c.slice(0);
  case "[object Object]":return j.delegate(c)}return c};j.mixin(h,{coerceType:function(c,b){switch(typeof c){case "number":return Number(eval("("+b+")"));case "string":return""+b;case "boolean":return Boolean(eval("("+b+")"))}return eval("("+b+")")},updateWithObject:function(c,b,e){if(!b)return c;for(var a in c)if(a in b&&!(a in g)){var i=c[a];i&&"object"==typeof i?h.updateWithObject(i,b[a],e):c[a]=e?h.coerceType(i,b[a]):d(b[a])}return c},updateWithPattern:function(c,b,e,a){if(!b||!e)return c;for(var i in e)i in
  b&&!(i in g)&&(c[i]=a?h.coerceType(e[i],b[i]):d(b[i]));return c},merge:function(c,b){if(b){var d=e.call(c),a=e.call(b),g,i;switch(a){case "[object Array]":if(a==d){d=Array(Math.max(c.length,b.length));for(g=0,a=d.length;g<a;++g)d[g]=h.merge(c[g],b[g]);return d}return b.slice(0);case "[object Object]":if(a==d&&c){d=j.delegate(c);for(g in b)g in c?(a=c[g],i=b[g],i!==a&&(d[g]=h.merge(a,i))):d[g]=j.clone(b[g]);return d}return j.clone(b)}}return b}});return h})},"dojox/gfx/gradutils":function(){define(["./_base",
  "dojo/_base/lang","./matrix","dojo/_base/Color"],function(i,j,h,g){function e(d,c){if(0>=d)return c[0].color;var b=c.length;if(1<=d)return c[b-1].color;for(var e=0;e<b;++e){var a=c[e];if(a.offset>=d)return e?(b=c[e-1],g.blendColors(new g(b.color),new g(a.color),(d-b.offset)/(a.offset-b.offset))):a.color}return c[b-1].color}i=i.gradutils={};i.getColor=function(d,c){var b;if(d){switch(d.type){case "linear":b=Math.atan2(d.y2-d.y1,d.x2-d.x1);b=h.rotate(-b);var f=h.project(d.x2-d.x1,d.y2-d.y1),a=h.multiplyPoint(f,
  c),i=h.multiplyPoint(f,d.x1,d.y1),f=h.multiplyPoint(f,d.x2,d.y2),f=h.multiplyPoint(b,f.x-i.x,f.y-i.y).x;b=h.multiplyPoint(b,a.x-i.x,a.y-i.y).x/f;break;case "radial":b=c.x-d.cx,a=c.y-d.cy,b=Math.sqrt(b*b+a*a)/d.r}return e(b,d.colors)}return new g(d||[0,0,0,0])};i.reverse=function(d){if(d)switch(d.type){case "linear":case "radial":if(d=j.delegate(d),d.colors){for(var c=d.colors,b=c.length,e=0,a,g=d.colors=Array(c.length);e<b;++e)a=c[e],g[e]={offset:1-a.offset,color:a.color};g.sort(function(a,b){return a.offset-
  b.offset})}}return d};return i})},"dojox/charting/Series":function(){define(["dojo/_base/lang","dojo/_base/declare","./Element"],function(i,j,h){return j("dojox.charting.Series",h,{constructor:function(g,e,d){i.mixin(this,d);if("string"!=typeof this.plot)this.plot="default";this.update(e)},clear:function(){this.dyn={}},update:function(g){i.isArray(g)?this.data=g:(this.source=g,this.data=this.source.data,this.source.setSeriesObject&&this.source.setSeriesObject(this));this.dirty=!0;this.clear()}})})},
  "dojox/charting/axis2d/common":function(){define(["dojo/_base/lang","dojo/_base/window","dojo/dom-geometry","dojox/gfx"],function(i,j,h,g){var e=i.getObject("dojox.charting.axis2d.common",!0),d=function(c){c.marginLeft="0px";c.marginTop="0px";c.marginRight="0px";c.marginBottom="0px";c.paddingLeft="0px";c.paddingTop="0px";c.paddingRight="0px";c.paddingBottom="0px";c.borderLeftWidth="0px";c.borderTopWidth="0px";c.borderRightWidth="0px";c.borderBottomWidth="0px"};return i.mixin(e,{createText:{gfx:function(c,
  b,d,a,e,g,h,i){return b.createText({x:d,y:a,text:g,align:e}).setFont(h).setFill(i)},html:function(c,b,e,a,i,n,r,m,l){var b=j.doc.createElement("div"),p=b.style,q;if(c.getTextDir)b.dir=c.getTextDir(n);d(p);p.font=r;b.innerHTML=(""+n).replace(/\s/g,"&nbsp;");p.color=m;p.position="absolute";p.left="-10000px";j.body().appendChild(b);n=g.normalizedLength(g.splitFontString(r).size);if(!l)b.getBoundingClientRect?(q=b.getBoundingClientRect(),q=q.width||q.right-q.left):q=h.getMarginBox(b).w;"rtl"==b.dir&&
  (e+=l?l:q);j.body().removeChild(b);p.position="relative";if(l)switch(p.width=l+"px",i){case "middle":p.textAlign="center";p.left=e-l/2+"px";break;case "end":p.textAlign="right";p.left=e-l+"px";break;default:p.left=e+"px",p.textAlign="left"}else switch(i){case "middle":p.left=Math.floor(e-q/2)+"px";break;case "end":p.left=Math.floor(e-q)+"px";break;default:p.left=Math.floor(e)+"px"}p.top=Math.floor(a-n)+"px";p.whiteSpace="nowrap";e=j.doc.createElement("div");a=e.style;d(a);a.width="0px";a.height="0px";
  e.appendChild(b);c.node.insertBefore(e,c.node.firstChild);return e}}})})},"dojox/lang/functional":function(){define(["./functional/lambda","./functional/array","./functional/object"],function(i){return i})},"dojox/lang/functional/array":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","./lambda"],function(i,j,h,g){var e={};j.mixin(g,{filter:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||i.global,c=g.lambda(c),f=[],a,h,n;if(j.isArray(d))for(h=0,n=d.length;h<
  n;++h)a=d[h],c.call(b,a,h,d)&&f.push(a);else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(h=0;d.hasNext();)a=d.next(),c.call(b,a,h++,d)&&f.push(a);else for(h in d)h in e||(a=d[h],c.call(b,a,h,d)&&f.push(a));return f},forEach:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||i.global,c=g.lambda(c),f,a;if(j.isArray(d))for(f=0,a=d.length;f<a;c.call(b,d[f],f,d),++f);else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(f=0;d.hasNext();c.call(b,d.next(),f++,d));
  else for(f in d)f in e||c.call(b,d[f],f,d);return b},map:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||i.global,c=g.lambda(c),f,a,h;if(j.isArray(d)){f=Array(a=d.length);for(h=0;h<a;f[h]=c.call(b,d[h],h,d),++h);}else if("function"==typeof d.hasNext&&"function"==typeof d.next){f=[];for(h=0;d.hasNext();f.push(c.call(b,d.next(),h++,d)));}else for(h in f=[],d)h in e||f.push(c.call(b,d[h],h,d));return f},every:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||i.global,c=g.lambda(c),
  f,a;if(j.isArray(d))for(f=0,a=d.length;f<a;++f){if(!c.call(b,d[f],f,d))return!1}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(f=0;d.hasNext();){if(!c.call(b,d.next(),f++,d))return!1}else for(f in d)if(!(f in e)&&!c.call(b,d[f],f,d))return!1;return!0},some:function(d,c,b){"string"==typeof d&&(d=d.split(""));var b=b||i.global,c=g.lambda(c),f,a;if(j.isArray(d))for(f=0,a=d.length;f<a;++f){if(c.call(b,d[f],f,d))return!0}else if("function"==typeof d.hasNext&&"function"==typeof d.next)for(f=
  0;d.hasNext();){if(c.call(b,d.next(),f++,d))return!0}else for(f in d)if(!(f in e)&&c.call(b,d[f],f,d))return!0;return!1}});return g})},"dojox/lang/functional/reversed":function(){define(["dojo/_base/lang","dojo/_base/kernel","./lambda"],function(i,j,h){i.mixin(h,{filterRev:function(g,e,d){"string"==typeof g&&(g=g.split(""));for(var d=d||j.global,e=h.lambda(e),c=[],b,f=g.length-1;0<=f;--f)b=g[f],e.call(d,b,f,g)&&c.push(b);return c},forEachRev:function(g,e,d){"string"==typeof g&&(g=g.split(""));for(var d=
  d||j.global,e=h.lambda(e),c=g.length-1;0<=c;e.call(d,g[c],c,g),--c);},mapRev:function(g,e,d){"string"==typeof g&&(g=g.split(""));for(var d=d||j.global,e=h.lambda(e),c=g.length,b=Array(c),c=c-1,f=0;0<=c;b[f++]=e.call(d,g[c],c,g),--c);return b},everyRev:function(g,e,d){"string"==typeof g&&(g=g.split(""));for(var d=d||j.global,e=h.lambda(e),c=g.length-1;0<=c;--c)if(!e.call(d,g[c],c,g))return!1;return!0},someRev:function(g,e,d){"string"==typeof g&&(g=g.split(""));for(var d=d||j.global,e=h.lambda(e),c=
  g.length-1;0<=c;--c)if(e.call(d,g[c],c,g))return!0;return!1}});return h})},"dojox/charting/axis2d/Default":function(){define("dojo/_base/lang,dojo/_base/array,dojo/_base/sniff,dojo/_base/declare,dojo/_base/connect,dojo/dom-geometry,./Invisible,../scaler/common,../scaler/linear,./common,dojox/gfx,dojox/lang/utils,dojox/lang/functional".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r){return g("dojox.charting.axis2d.Default",c,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,
  includeZero:!1,fixed:!0,majorLabels:!0,minorTicks:!0,minorLabels:!0,microTicks:!1,rotation:0,htmlLabels:!0,enableCache:!1,dropLabels:!0,labelSizeChange:!1},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,maxLabelCharCount:0,trailingSymbol:null,stroke:{},majorTick:{},minorTick:{},microTick:{},tick:{},font:"",fontColor:"",title:"",titleGap:0,titleFont:"",titleFontColor:"",titleOrientation:""},constructor:function(a,b){this.opt=
  i.clone(this.defaultParams);n.updateWithObject(this.opt,b);n.updateWithPattern(this.opt,b,this.optionalParams);if(this.opt.enableCache)this._textFreePool=[],this._lineFreePool=[],this._textUsePool=[],this._lineUsePool=[];this._invalidMaxLabelSize=!0},setWindow:function(a,b){if(a!=this.scale)this._invalidMaxLabelSize=!0;return this.inherited(arguments)},_groupLabelWidth:function(a,b,c){if(!a.length)return 0;if(50<a.length)a.length=50;i.isObject(a[0])&&(a=r.map(a,function(a){return a.text}));c&&(a=
  r.map(a,function(a){return 0==i.trim(a).length?"":a.substring(0,c)+this.trailingSymbol},this));a=a.join("<br>");return k._base._getTextBox(a,{font:b}).w||0},_getMaxLabelSize:function(a,b,c,d,e,g){if(null==this._maxLabelSize&&6==arguments.length){var h=this.opt;this.scaler.minMinorStep=this._prevMinMinorStep=0;var k=i.clone(h);delete k.to;delete k.from;var t=f.buildScaler(a,b,c,k,h.to-h.from);t.minMinorStep=0;this._majorStart=t.major.start;h=f.buildTicks(t,h);if(g&&h){var n=t=0,r=function(a){a.label&&
  this.push(a.label)},B=[];this.opt.majorLabels&&(j.forEach(h.major,r,B),t=this._groupLabelWidth(B,e,k.maxLabelCharCount),k.maxLabelSize&&(t=Math.min(k.maxLabelSize,t)));B=[];this.opt.dropLabels&&this.opt.minorLabels&&(j.forEach(h.minor,r,B),n=this._groupLabelWidth(B,e,k.maxLabelCharCount),k.maxLabelSize&&(n=Math.min(k.maxLabelSize,n)));this._maxLabelSize={majLabelW:t,minLabelW:n,majLabelH:g,minLabelH:g}}else this._maxLabelSize=null}return this._maxLabelSize},calculate:function(a,b,c){this.inherited(arguments);
  this.scaler.minMinorStep=this._prevMinMinorStep;if((this._invalidMaxLabelSize||c!=this._oldSpan)&&Infinity!=a&&-Infinity!=b){this._invalidMaxLabelSize=!1;if(this.opt.labelSizeChange)this._maxLabelSize=null;this._oldSpan=c;var d=this.opt,e=this.chart.theme.axis,g=d.rotation%360,h=this.chart.theme.axis.tick.labelGap,i=d.font||e.majorTick&&e.majorTick.font||e.tick&&e.tick.font,e=i?k.normalizedLength(k.splitFontString(i).size):0,i=this._getMaxLabelSize(a,b,c,g,i,e);"number"!=typeof h&&(h=4);if(i&&d.dropLabels){var d=
  Math.abs(Math.cos(g*Math.PI/180)),j=Math.abs(Math.sin(g*Math.PI/180));0>g&&(g+=360);switch(g){case 0:case 180:this.vertical?g=e:(g=i.majLabelW,e=i.minLabelW);break;case 90:case 270:this.vertical?(g=i.majLabelW,e=i.minLabelW):g=e;break;default:var g=this.vertical?Math.min(i.majLabelW,e/d):Math.min(i.majLabelW,e/j),n=Math.sqrt(i.minLabelW*i.minLabelW+e*e),e=Math.min(n,this.vertical?e*d+i.minLabelW*j:i.minLabelW*d+e*j)}this.scaler.minMinorStep=this._prevMinMinorStep=Math.max(g,e)+h;this._skipInterval=
  this.scaler.minMinorStep<=this.scaler.minor.tick*this.scaler.bounds.scale?0:Math.floor((g+h)/(this.scaler.major.tick*this.scaler.bounds.scale))}else this._skipInterval=0}this.ticks=f.buildTicks(this.scaler,this.opt);return this},getOffsets:function(){var a={l:0,r:0,t:0,b:0};if(!this.scaler)return a;var b=this.opt,c=this.chart.theme.axis,d=this.chart.theme.axis.tick.labelGap,e=b.titleFont||c.title&&c.title.font,c=0==b.titleGap?0:b.titleGap||c.title&&c.title.gap,f=this.chart.theme.getTick("major",b),
  g=this.chart.theme.getTick("minor",b),e=e?k.normalizedLength(k.splitFontString(e).size):0,h=b.rotation%360,i=b.leftBottom,j=Math.abs(Math.cos(h*Math.PI/180)),n=Math.abs(Math.sin(h*Math.PI/180));this.trailingSymbol=void 0===b.trailingSymbol||null===b.trailingSymbol?this.trailingSymbol:b.trailingSymbol;"number"!=typeof d&&(d=4);0>h&&(h+=360);var r=this._getMaxLabelSize();if(r){var C=Math.ceil(Math.max(r.majLabelW,r.minLabelW))+1,A=Math.ceil(Math.max(r.majLabelH,r.minLabelH))+1;if(this.vertical)switch(r=
  i?"l":"r",h){case 0:case 180:a[r]=C;a.t=a.b=A/2;break;case 90:case 270:a[r]=A;a.t=a.b=C/2;break;default:45>=h||180<h&&225>=h?(a[r]=A*n/2+C*j,a[i?"t":"b"]=A*j/2+C*n,a[i?"b":"t"]=A*j/2):315<h||180>h&&135<h?(a[r]=A*n/2+C*j,a[i?"b":"t"]=A*j/2+C*n,a[i?"t":"b"]=A*j/2):90>h||180<h&&270>h?(a[r]=A*n+C*j,a[i?"t":"b"]=A*j+C*n):(a[r]=A*n+C*j,a[i?"b":"t"]=A*j+C*n)}else switch(r=i?"b":"t",h){case 0:case 180:a[r]=A;a.l=a.r=C/2;break;case 90:case 270:a[r]=C;a.l=a.r=A/2;break;default:45<=h&&90>=h||225<=h&&270>=h?
  (a[r]=A*j/2+C*n,a[i?"r":"l"]=A*n/2+C*j,a[i?"l":"r"]=A*n/2):90<=h&&135>=h||270<=h&&315>=h?(a[r]=A*j/2+C*n,a[i?"l":"r"]=A*n/2+C*j,a[i?"r":"l"]=A*n/2):45>h||180<h&&225>h?(a[r]=A*j+C*n,a[i?"r":"l"]=A*n+C*j):(a[r]=A*j+C*n,a[i?"l":"r"]=A*n+C*j)}a[r]+=d+Math.max(f.length,g.length)+(b.title?e+c:0)}return a},cleanGroup:function(a){if(this.opt.enableCache&&this.group)this._lineFreePool=this._lineFreePool.concat(this._lineUsePool),this._lineUsePool=[],this._textFreePool=this._textFreePool.concat(this._textUsePool),
  this._textUsePool=[];this.inherited(arguments)},createText:function(b,c,d,e,f,g,h,i,k){if(!this.opt.enableCache||"html"==b)return a.createText[b](this.chart,c,d,e,f,g,h,i,k);0<this._textFreePool.length?(b=this._textFreePool.pop(),b.setShape({x:d,y:e,text:g,align:f}),c.add(b)):b=a.createText[b](this.chart,c,d,e,f,g,h,i);this._textUsePool.push(b);return b},createLine:function(a,b){var c;this.opt.enableCache&&0<this._lineFreePool.length?(c=this._lineFreePool.pop(),c.setShape(b),a.add(c)):c=a.createLine(b);
  this.opt.enableCache&&this._lineUsePool.push(c);return c},render:function(b,c){var d,e,g,i,n,r,t,y,x,B,C,A,E,N;if(!this.dirty||!this.scaler)return this;var L=this.opt;x=this.chart.theme.axis;var I=L.leftBottom,D=L.rotation%360,z=0,F,H,z=this.chart.theme.axis.tick.labelGap,M=L.font||x.majorTick&&x.majorTick.font||x.tick&&x.tick.font,K=L.titleFont||x.title&&x.title.font,O=L.fontColor||x.majorTick&&x.majorTick.fontColor||x.tick&&x.tick.fontColor||"black",T=L.titleFontColor||x.title&&x.title.fontColor||
  "black";n=0==L.titleGap?0:L.titleGap||x.title&&x.title.gap||15;var J=L.titleOrientation||x.title&&x.title.orientation||"axis",G=this.chart.theme.getTick("major",L),U=this.chart.theme.getTick("minor",L),P=this.chart.theme.getTick("micro",L);Math.max(G.length,U.length,P.length);var R="stroke"in L?L.stroke:x.stroke,Q=M?k.normalizedLength(k.splitFontString(M).size):0;r=Math.abs(Math.cos(D*Math.PI/180));F=Math.abs(Math.sin(D*Math.PI/180));var S=K?k.normalizedLength(k.splitFontString(K).size):0;"number"!=
  typeof z&&(z=4);0>D&&(D+=360);var $=this._getMaxLabelSize(),$=$&&$.majLabelW;if(this.vertical){E=b.height-c.b;N=void 0;C=c.t;A=void 0;x=(b.height-c.b+c.t)/2;B=void 0;F=Q*F+($||0)*r+z+Math.max(G.length,U.length)+S+n;t=0;y=-1;d=0;e=0;n=1;r=0;g=z;i=0;switch(D){case 0:H="end";e=0.4*Q;break;case 90:H="middle";d=-Q;break;case 180:H="start";e=0.4*-Q;break;case 270:H="middle";break;default:45>D?(H="end",e=0.4*Q):90>D?(H="end",e=0.4*Q):135>D?H="start":225>D?(H="start",e=0.4*-Q):270>D?(H="start",d=I?0:0.4*
  Q):315>D?(H="end",d=I?0:0.4*Q):(H="end",e=0.4*Q)}if(I)N=A=c.l,z=J&&"away"==J?90:270,B=c.l-F+(270==z?S:0),n=-1,g=-g;else switch(N=A=b.width-c.r,z=J&&"axis"==J?90:270,B=b.width-c.r+F-(270==z?0:S),H){case "start":H="end";break;case "end":H="start";break;case "middle":d+=Q}}else{N=c.l;E=void 0;A=b.width-c.r;C=void 0;B=(b.width-c.r+c.l)/2;x=void 0;F=Q*r+($||0)*F+z+Math.max(G.length,U.length)+S+n;t=1;y=0;d=0;e=0;n=0;r=1;g=0;i=z;switch(D){case 0:H="middle";e=Q;break;case 90:H="start";d=0.4*-Q;break;case 180:H=
  "middle";break;case 270:H="end";d=0.4*Q;break;default:45>D?(H="start",e=I?Q:0):135>D?(H="start",d=0.4*-Q):180>D?(H="start",e=I?0:-Q):225>D?(H="end",e=I?0:-Q):315>D?(H="end",e=I?0.4*Q:0):(H="end",e=I?Q:0)}if(I)E=C=b.height-c.b,z=J&&"axis"==J?180:0,x=b.height-c.b+F-(z?S:0);else switch(E=C=c.t,z=J&&"away"==J?180:0,x=c.t-F+(z?0:S),r=-1,i=-i,H){case "start":H="end";break;case "end":H="start";break;case "middle":e-=Q}}this.cleanGroup();var W=this.group,I=this.scaler,J=this.ticks,aa=f.getTransformerFromModel(this.scaler),
  Y=(!L.title||!z)&&!D&&this.opt.htmlLabels&&!h("ie")&&!h("opera")?"html":"gfx",Z=n*G.length,V=r*G.length,ba=this._skipInterval;W.createLine({x1:N,y1:E,x2:A,y2:C}).setStroke(R);L.title&&(K=a.createText[Y](this.chart,W,B,x,"middle",L.title,K,T),"html"==Y?this.htmlElements.push(K):K.setTransform(k.matrix.rotategAt(z,B,x)));if(null==J)return this.dirty=!1,this;var X=0<J.major.length?(J.major[0].value-this._majorStart)/I.major.tick:0,ia=this.opt.majorLabels;j.forEach(J.major,function(a,b){var c=aa(a.value),
  f=N+t*c,h=E+y*c,b=b+X;this.createLine(W,{x1:f,y1:h,x2:f+Z,y2:h+V}).setStroke(G);if(a.label&&(!ba||0==(b-(1+ba))%(1+ba))){var j=L.maxLabelCharCount?this.getTextWithLimitCharCount(a.label,M,L.maxLabelCharCount):{text:a.label,truncated:!1},j=L.maxLabelSize?this.getTextWithLimitLength(j.text,M,L.maxLabelSize,j.truncated):j,c=this.createText(Y,W,f+Z+g+(D?0:d),h+V+i+(D?0:e),H,j.text,M,O);this.chart.truncateBidi&&j.truncated&&this.chart.truncateBidi(c,a.label,Y);j.truncated&&this.labelTooltip(c,this.chart,
  a.label,j.text,M,Y);"html"==Y?this.htmlElements.push(c):D&&c.setTransform([{dx:d,dy:e},k.matrix.rotategAt(D,f+Z+g,h+V+i)])}},this);Z=n*U.length;V=r*U.length;ia=this.opt.minorLabels&&I.minMinorStep<=I.minor.tick*I.bounds.scale;j.forEach(J.minor,function(a){var b=aa(a.value),c=N+t*b,f=E+y*b;this.createLine(W,{x1:c,y1:f,x2:c+Z,y2:f+V}).setStroke(U);if(ia&&a.label){var h=L.maxLabelCharCount?this.getTextWithLimitCharCount(a.label,M,L.maxLabelCharCount):{text:a.label,truncated:!1},h=L.maxLabelSize?this.getTextWithLimitLength(h.text,
  M,L.maxLabelSize,h.truncated):h,b=this.createText(Y,W,c+Z+g+(D?0:d),f+V+i+(D?0:e),H,h.text,M,O);this.chart.getTextDir&&h.truncated&&this.chart.truncateBidi(b,a.label,Y);h.truncated&&this.labelTooltip(b,this.chart,a.label,h.text,M,Y);"html"==Y?this.htmlElements.push(b):D&&b.setTransform([{dx:d,dy:e},k.matrix.rotategAt(D,c+Z+g,f+V+i)])}},this);Z=n*P.length;V=r*P.length;j.forEach(J.micro,function(a){var b=aa(a.value),a=N+t*b,b=E+y*b;this.createLine(W,{x1:a,y1:b,x2:a+Z,y2:b+V}).setStroke(P)},this);this.dirty=
  !1;return this},labelTooltip:function(a,b,c,f,g,h){var j=["dijit/Tooltip"],n={type:"rect"},t=["above","below"],f=k._base._getTextBox(f,{font:g}).w||0,g=g?k.normalizedLength(k.splitFontString(g).size):0;"html"==h?(i.mixin(n,d.position(a.firstChild,!0)),n.width=Math.ceil(f),n.height=Math.ceil(g),this._events.push({shape:dojo,handle:e.connect(a.firstChild,"onmouseover",this,function(){require(j,function(a){a.show(c,n,t)})})}),this._events.push({shape:dojo,handle:e.connect(a.firstChild,"onmouseout",this,
  function(){require(j,function(a){a.hide(n)})})})):(h=a.getShape(),b=b.getCoords(),n=i.mixin(n,{x:h.x-f/2,y:h.y}),n.x+=b.x,n.y+=b.y,n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=Math.ceil(f),n.height=Math.ceil(g),this._events.push({shape:a,handle:a.connect("onmouseenter",this,function(){require(j,function(a){a.show(c,n,t)})})}),this._events.push({shape:a,handle:a.connect("onmouseleave",this,function(){require(j,function(a){a.hide(n)})})}))}})})},"dojox/charting/axis2d/Invisible":function(){define("dojo/_base/lang,dojo/_base/declare,./Base,../scaler/linear,dojox/gfx,dojox/lang/utils".split(","),
  function(i,j,h,g,e,d){return j("dojox.charting.axis2d.Invisible",h,{defaultParams:{vertical:!1,fixUpper:"none",fixLower:"none",natural:!1,leftBottom:!0,includeZero:!1,fixed:!0},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1},constructor:function(c,b){this.opt=i.clone(this.defaultParams);d.updateWithObject(this.opt,b);d.updateWithPattern(this.opt,b,this.optionalParams)},dependOnData:function(){return!("min"in this.opt)||!("max"in this.opt)},clear:function(){delete this.scaler;
  delete this.ticks;this.dirty=!0;return this},initialized:function(){return"scaler"in this&&!(this.dirty&&this.dependOnData())},setWindow:function(c,b){this.scale=c;this.offset=b;return this.clear()},getWindowScale:function(){return"scale"in this?this.scale:1},getWindowOffset:function(){return"offset"in this?this.offset:0},calculate:function(c,b,d){if(this.initialized())return this;var a=this.opt;this.labels=a.labels;this.scaler=g.buildScaler(c,b,d,a);var e=this.scaler.bounds;if("scale"in this){a.from=
  e.lower+this.offset;a.to=(e.upper-e.lower)/this.scale+a.from;if(!isFinite(a.from)||isNaN(a.from)||!isFinite(a.to)||isNaN(a.to)||a.to-a.from>=e.upper-e.lower)delete a.from,delete a.to,delete this.scale,delete this.offset;else{if(a.from<e.lower)a.to+=e.lower-a.from,a.from=e.lower;else if(a.to>e.upper)a.from+=e.upper-a.to,a.to=e.upper;this.offset=a.from-e.lower}this.scaler=g.buildScaler(c,b,d,a);1==this.scale&&0==this.offset&&(delete this.scale,delete this.offset)}return this},getScaler:function(){return this.scaler},
  getTicks:function(){return this.ticks}})})},"dojox/charting/axis2d/Base":function(){define(["dojo/_base/declare","../Element"],function(i,j){return i("dojox.charting.axis2d.Base",j,{constructor:function(h,g){this.vertical=g&&g.vertical;this.opt={};this.opt.min=g&&g.min;this.opt.max=g&&g.max},clear:function(){return this},initialized:function(){return!1},calculate:function(){return this},getScaler:function(){return null},getTicks:function(){return null},getOffsets:function(){return{l:0,r:0,t:0,b:0}},
  render:function(){this.dirty=!1;return this}})})},"dojox/charting/scaler/linear":function(){define(["dojo/_base/lang","./common"],function(i,j){function h(c,b){for(var c=c.toLowerCase(),d=b.length-1;0<=d;--d)if(c===b[d])return!0;return!1}var g=i.getObject("dojox.charting.scaler.linear",!0),e=j.getNumericLabel,d=function(c,b,d,a,e,j,r){d=i.delegate(d);if(!a){if("major"==d.fixUpper)d.fixUpper="minor";if("major"==d.fixLower)d.fixLower="minor"}if(!e){if("minor"==d.fixUpper)d.fixUpper="micro";if("minor"==
  d.fixLower)d.fixLower="micro"}if(!j){if("micro"==d.fixUpper)d.fixUpper="none";if("micro"==d.fixLower)d.fixLower="none"}var m=h(d.fixLower,["major"])?Math.floor(d.min/a)*a:h(d.fixLower,["minor"])?Math.floor(d.min/e)*e:h(d.fixLower,["micro"])?Math.floor(d.min/j)*j:d.min,l=h(d.fixUpper,["major"])?Math.ceil(d.max/a)*a:h(d.fixUpper,["minor"])?Math.ceil(d.max/e)*e:h(d.fixUpper,["micro"])?Math.ceil(d.max/j)*j:d.max;d.useMin&&(c=m);d.useMax&&(b=l);var p=!a||d.useMin&&h(d.fixLower,["major"])?c:Math.ceil(c/
  a)*a,q=!e||d.useMin&&h(d.fixLower,["major","minor"])?c:Math.ceil(c/e)*e,s=!j||d.useMin&&h(d.fixLower,["major","minor","micro"])?c:Math.ceil(c/j)*j,u=!a?0:(d.useMax&&h(d.fixUpper,["major"])?Math.round((b-p)/a):Math.floor((b-p)/a))+1,v=!e?0:(d.useMax&&h(d.fixUpper,["major","minor"])?Math.round((b-q)/e):Math.floor((b-q)/e))+1,d=!j?0:(d.useMax&&h(d.fixUpper,["major","minor","micro"])?Math.round((b-s)/j):Math.floor((b-s)/j))+1,w=e?Math.round(a/e):0,t=j?Math.round(e/j):0,y=a?Math.floor(Math.log(a)/Math.LN10):
  0,x=e?Math.floor(Math.log(e)/Math.LN10):0,B=r/(b-c);isFinite(B)||(B=1);return{bounds:{lower:m,upper:l,from:c,to:b,scale:B,span:r},major:{tick:a,start:p,count:u,prec:y},minor:{tick:e,start:q,count:v,prec:x},micro:{tick:j,start:s,count:d,prec:0},minorPerMajor:w,microPerMinor:t,scaler:g}};return i.mixin(g,{buildScaler:function(c,b,e,a,g,h){var i={fixUpper:"none",fixLower:"none",natural:!1};if(a){if("fixUpper"in a)i.fixUpper=""+a.fixUpper;if("fixLower"in a)i.fixLower=""+a.fixLower;if("natural"in a)i.natural=
  Boolean(a.natural)}h=!h||3>h?3:h;if("min"in a)c=a.min;if("max"in a)b=a.max;a.includeZero&&(0<c&&(c=0),0>b&&(b=0));i.min=c;i.useMin=!0;i.max=b;i.useMax=!0;if("from"in a)c=a.from,i.useMin=!1;if("to"in a)b=a.to,i.useMax=!1;if(b<=c)return d(c,b,i,0,0,0,e);g||(g=b-c);var g=Math.floor(Math.log(g)/Math.LN10),g=a&&"majorTickStep"in a?a.majorTickStep:Math.pow(10,g),j=0,l=0,p;if(a&&"minorTickStep"in a)j=a.minorTickStep;else{do{j=g/10;if(!i.natural||0.9<j)if(p=d(c,b,i,g,j,0,e),p.bounds.scale*p.minor.tick>h)break;
  j=g/5;if(!i.natural||0.9<j)if(p=d(c,b,i,g,j,0,e),p.bounds.scale*p.minor.tick>h)break;j=g/2;if(!i.natural||0.9<j)if(p=d(c,b,i,g,j,0,e),p.bounds.scale*p.minor.tick>h)break;return d(c,b,i,g,0,0,e)}while(0)}if(a&&"microTickStep"in a)l=a.microTickStep,p=d(c,b,i,g,j,l,e);else{do{l=j/10;if(!i.natural||0.9<l)if(p=d(c,b,i,g,j,l,e),3<p.bounds.scale*p.micro.tick)break;l=j/5;if(!i.natural||0.9<l)if(p=d(c,b,i,g,j,l,e),3<p.bounds.scale*p.micro.tick)break;l=j/2;if(!i.natural||0.9<l)if(p=d(c,b,i,g,j,l,e),3<p.bounds.scale*
  p.micro.tick)break;l=0}while(0)}return l?p:d(c,b,i,g,j,0,e)},buildTicks:function(c,b){var d,a,g,h=c.major.start,i=c.minor.start,j=c.micro.start;if(b.microTicks&&c.micro.tick)d=c.micro.tick,a=j;else if(b.minorTicks&&c.minor.tick)d=c.minor.tick,a=i;else if(c.major.tick)d=c.major.tick,a=h;else return null;var l=1/c.bounds.scale;if(c.bounds.to<=c.bounds.from||isNaN(l)||!isFinite(l)||0>=d||isNaN(d)||!isFinite(d))return null;for(var p=[],q=[],s=[];a<=c.bounds.to+l;){if(Math.abs(h-a)<d/2){g={value:h};if(b.majorLabels)g.label=
  e(h,c.major.prec,b);p.push(g);h+=c.major.tick;i+=c.minor.tick}else if(Math.abs(i-a)<d/2){if(b.minorTicks){g={value:i};if(b.minorLabels&&c.minMinorStep<=c.minor.tick*c.bounds.scale)g.label=e(i,c.minor.prec,b);q.push(g)}i+=c.minor.tick}else b.microTicks&&s.push({value:j});j+=c.micro.tick;a+=d}return{major:p,minor:q,micro:s}},getTransformerFromModel:function(c){var b=c.bounds.from,d=c.bounds.scale;return function(a){return(a-b)*d}},getTransformerFromPlot:function(c){var b=c.bounds.from,d=c.bounds.scale;
  return function(a){return a/d+b}}})})},"dojox/charting/scaler/common":function(){define(["dojo/_base/lang"],function(i){var j=function(e,d){return Math.abs(e-d)<=1.0E-6*(Math.abs(e)+Math.abs(d))},h=i.getObject("dojox.charting.scaler.common",!0),g={};return i.mixin(h,{doIfLoaded:function(e,d,c){if(void 0==g[e])try{g[e]=require(e)}catch(b){g[e]=null}return g[e]?d(g[e]):c()},getNumericLabel:function(e,d,c){var b="";h.doIfLoaded("dojo/number",function(a){b=(c.fixed?a.format(e,{places:0>d?-d:0}):a.format(e))||
  ""},function(){b=c.fixed?e.toFixed(0>d?-d:0):e.toString()});if(c.labelFunc){var f=c.labelFunc(b,e,d);if(f)return f}if(c.labels){for(var f=c.labels,a=0,g=f.length;a<g;){var i=Math.floor((a+g)/2);f[i].value<e?a=i+1:g=i}if(a<f.length&&j(f[a].value,e))return f[a].text;--a;if(0<=a&&a<f.length&&j(f[a].value,e))return f[a].text;a+=2;if(a<f.length&&j(f[a].value,e))return f[a].text}return b}})})},"dojox/charting/plot2d/Bubble":function(){define("dojo/_base/lang,dojo/_base/declare,dojo/_base/array,./CartesianBase,./_PlotEvents,./common,dojox/lang/functional,dojox/lang/functional/reversed,dojox/lang/utils,dojox/gfx/fx".split(","),
  function(i,j,h,g,e,d,c,b,f,a){var k=b.lambda("item.purgeGroup()");return j("dojox.charting.plot2d.Bubble",[g,e],{defaultParams:{hAxis:"x",vAxis:"y",animate:null},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},styleFunc:null,font:"",fontColor:""},constructor:function(a,b){this.opt=i.clone(this.defaultParams);f.updateWithObject(this.opt,b);f.updateWithPattern(this.opt,b,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate},render:function(a,
  b){if(this.zoom&&!this.isDataDirty())return this.performZoom(a,b);this.resetEvents();if(this.dirty=this.isDirty()){h.forEach(this.series,k);this._eventSeries={};this.cleanGroup();var e=this.group;c.forEachRev(this.series,function(a){a.cleanGroup(e)})}for(var f=this.chart.theme,g=this._hScaler.scaler.getTransformerFromModel(this._hScaler),i=this._vScaler.scaler.getTransformerFromModel(this._vScaler),j=this.events(),u=this.series.length-1;0<=u;--u){var v=this.series[u];if(!this.dirty&&!v.dirty)f.skip(),
  this._reconnectEvents(v.name);else if(v.cleanGroup(),v.data.length)if("number"==typeof v.data[0])console.warn("dojox.charting.plot2d.Bubble: the data in the following series cannot be rendered as a bubble chart; ",v);else{var w=f.next("circle",[this.opt,v]),e=v.group,t=h.map(v.data,function(c){return c?{x:g(c.x)+b.l,y:a.height-b.b-i(c.y),radius:this._vScaler.bounds.scale*(c.size/2)}:null},this),y=null,x=null,B=null,C=this.opt.styleFunc,A=function(a){return C?f.addMixin(w,"circle",[a,C(a)],!0):f.addMixin(w,
  "circle",a,!0)};if(w.series.shadow&&(B=h.map(t,function(c,d){if(null!==c){var f=A(v.data[d]).series.shadow,f=e.createCircle({cx:c.x+f.dx,cy:c.y+f.dy,r:c.radius}).setStroke(f).setFill(f.color);this.animate&&this._animateBubble(f,a.height-b.b,c.radius);return f}return null},this),B.length))v.dyn.shadow=B[B.length-1].getStroke();if(w.series.outline&&(x=h.map(t,function(c,f){if(null!==c){var g=A(v.data[f]),g=d.makeStroke(g.series.outline);g.width=2*g.width+w.series.stroke.width;g=e.createCircle({cx:c.x,
  cy:c.y,r:c.radius}).setStroke(g);this.animate&&this._animateBubble(g,a.height-b.b,c.radius);return g}return null},this),x.length))v.dyn.outline=x[x.length-1].getStroke();y=h.map(t,function(c,d){if(null!==c){var f=A(v.data[d]),g={x:c.x-c.radius,y:c.y-c.radius,width:2*c.radius,height:2*c.radius},h=this._plotFill(f.series.fill,a,b),h=this._shapeFill(h,g),f=e.createCircle({cx:c.x,cy:c.y,r:c.radius}).setFill(h).setStroke(f.series.stroke);this.animate&&this._animateBubble(f,a.height-b.b,c.radius);return f}return null},
  this);if(y.length)v.dyn.fill=y[y.length-1].getFill(),v.dyn.stroke=y[y.length-1].getStroke();if(j){var E=Array(y.length);h.forEach(y,function(a,b){if(null!==a){var c={element:"circle",index:b,run:v,shape:a,outline:x&&x[b]||null,shadow:B&&B[b]||null,x:v.data[b].x,y:v.data[b].y,r:v.data[b].size/2,cx:t[b].x,cy:t[b].y,cr:t[b].radius};this._connectEvents(c);E[b]=c}},this);this._eventSeries[v.name]=E}else delete this._eventSeries[v.name];v.dirty=!1}else v.dirty=!1,f.skip()}this.dirty=!1;return this},_animateBubble:function(b,
  c,d){a.animateTransform(i.delegate({shape:b,duration:1200,transform:[{name:"translate",start:[0,c],end:[0,0]},{name:"scale",start:[0,1/d],end:[1,1]},{name:"original"}]},this.animate)).play()}})})},"dojox/charting/plot2d/CartesianBase":function(){define("dojo/_base/lang,dojo/_base/declare,dojo/_base/connect,./Base,../scaler/primitive,dojox/gfx/fx".split(","),function(i,j,h,g,e,d){return j("dojox.charting.plot2d.CartesianBase",g,{constructor:function(){this.axes=["hAxis","vAxis"];this.zoom=null;this.zoomQueue=
  [];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0}},clear:function(){this.inherited(arguments);this._vAxis=this._hAxis=null;return this},cleanGroup:function(c){this.inherited(arguments,[c||this.chart.plotGroup])},setAxis:function(c){c&&(this[c.vertical?"_vAxis":"_hAxis"]=c);return this},toPage:function(c){var b=this._hAxis,d=this._vAxis,a=b.getScaler(),e=d.getScaler(),g=a.scaler.getTransformerFromModel(a),h=e.scaler.getTransformerFromModel(e),i=this.chart.getCoords(),j=this.chart.offsets,
  p=this.chart.dim,a=function(a){var c={};c.x=g(a[b.name])+i.x+j.l;c.y=i.y+p.height-j.b-h(a[d.name]);return c};return c?a(c):a},toData:function(c){var b=this._hAxis,d=this._vAxis,a=b.getScaler(),e=d.getScaler(),g=a.scaler.getTransformerFromPlot(a),h=e.scaler.getTransformerFromPlot(e),i=this.chart.getCoords(),j=this.chart.offsets,p=this.chart.dim,a=function(a){var c={};c[b.name]=g(a.x-i.x-j.l);c[d.name]=h(i.y+p.height-a.y-j.b);return c};return c?a(c):a},isDirty:function(){return this.dirty||this._hAxis&&
  this._hAxis.dirty||this._vAxis&&this._vAxis.dirty},performZoom:function(c,b){var e=this._vAxis.scale||1,a=this._hAxis.scale||1,g=this._hScaler.bounds,g=(g.from-g.lower)*g.scale,j=this._vScaler.bounds,j=(j.from-j.lower)*j.scale,r=e/this.lastWindow.vscale,m=a/this.lastWindow.hscale,r=d.animateTransform(i.delegate({shape:this.group,duration:1200,transform:[{name:"translate",start:[0,0],end:[b.l*(1-m),(c.height-b.b)*(1-r)]},{name:"scale",start:[1,1],end:[m,r]},{name:"original"},{name:"translate",start:[0,
  0],end:[(this.lastWindow.xoffset-g)/(1==this.lastWindow.hscale?a:this.lastWindow.hscale),(j-this.lastWindow.yoffset)/(1==this.lastWindow.vscale?e:this.lastWindow.vscale)]}]},this.zoom));i.mixin(this.lastWindow,{vscale:e,hscale:a,xoffset:g,yoffset:j});this.zoomQueue.push(r);h.connect(r,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();0<this.zoomQueue.length&&this.zoomQueue[0].play()});1==this.zoomQueue.length&&this.zoomQueue[0].play();return this},initializeScalers:function(c,b){this._hAxis?
  (this._hAxis.initialized()||this._hAxis.calculate(b.hmin,b.hmax,c.width),this._hScaler=this._hAxis.getScaler()):this._hScaler=e.buildScaler(b.hmin,b.hmax,c.width);this._vAxis?(this._vAxis.initialized()||this._vAxis.calculate(b.vmin,b.vmax,c.height),this._vScaler=this._vAxis.getScaler()):this._vScaler=e.buildScaler(b.vmin,b.vmax,c.height);return this}})})},"dojox/charting/plot2d/Base":function(){define(["dojo/_base/declare","../Element","dojo/_base/array","./common"],function(i,j,h,g){return i("dojox.charting.plot2d.Base",
  j,{constructor:function(){},clear:function(){this.series=[];this.dirty=!0;return this},setAxis:function(){return this},assignAxes:function(e){h.forEach(this.axes,function(d){this[d]&&this.setAxis(e[this[d]])},this)},addSeries:function(e){this.series.push(e);return this},getSeriesStats:function(){return g.collectSimpleStats(this.series)},calculateAxes:function(e){this.initializeScalers(e,this.getSeriesStats());return this},initializeScalers:function(){return this},isDataDirty:function(){return h.some(this.series,
  function(e){return e.dirty})},render:function(){return this},getRequiredColors:function(){return this.series.length}})})},"dojox/charting/plot2d/common":function(){define("dojo/_base/lang,dojo/_base/array,dojo/_base/Color,dojox/gfx,dojox/lang/functional,../scaler/common".split(","),function(i,j,h,g,e,d){var c=i.getObject("dojox.charting.plot2d.common",!0);return i.mixin(c,{doIfLoaded:d.doIfLoaded,makeStroke:function(b){if(!b)return b;if("string"==typeof b||b instanceof h)b={color:b};return g.makeParameters(g.defaultStroke,
  b)},augmentColor:function(b,c){var a=new h(b),d=new h(c);d.a=a.a;return d},augmentStroke:function(b,d){var a=c.makeStroke(b);if(a)a.color=c.augmentColor(a.color,d);return a},augmentFill:function(b,d){new h(d);return"string"==typeof b||b instanceof h?c.augmentColor(b,d):b},defaultStats:{vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY,hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(b){for(var d=i.delegate(c.defaultStats),a=0;a<b.length;++a)for(var e=
  b[a],g=0;g<e.data.length;g++)if(null!==e.data[g]){if("number"==typeof e.data[g]){var g=d.vmin,h=d.vmax;(!("ymin"in e)||!("ymax"in e))&&j.forEach(e.data,function(a,b){if(null!==a){var c=b+1,e=a;isNaN(e)&&(e=0);d.hmin=Math.min(d.hmin,c);d.hmax=Math.max(d.hmax,c);d.vmin=Math.min(d.vmin,e);d.vmax=Math.max(d.vmax,e)}})}else{var m=d.hmin,l=d.hmax,g=d.vmin,h=d.vmax;(!("xmin"in e)||!("xmax"in e)||!("ymin"in e)||!("ymax"in e))&&j.forEach(e.data,function(a,b){if(null!==a){var c="x"in a?a.x:b+1,e=a.y;isNaN(c)&&
  (c=0);isNaN(e)&&(e=0);d.hmin=Math.min(d.hmin,c);d.hmax=Math.max(d.hmax,c);d.vmin=Math.min(d.vmin,e);d.vmax=Math.max(d.vmax,e)}});if("xmin"in e)d.hmin=Math.min(m,e.xmin);if("xmax"in e)d.hmax=Math.max(l,e.xmax)}if("ymin"in e)d.vmin=Math.min(g,e.ymin);if("ymax"in e)d.vmax=Math.max(h,e.ymax);break}return d},calculateBarSize:function(b,c,a){a||(a=1);var d=c.gap,d=(b-2*d)/a;"minBarSize"in c&&(d=Math.max(d,c.minBarSize));"maxBarSize"in c&&(d=Math.min(d,c.maxBarSize));d=Math.max(d,1);return{size:d,gap:(b-
  d*a)/2}},collectStackedStats:function(b){var d=i.clone(c.defaultStats);if(b.length){d.hmin=Math.min(d.hmin,1);d.hmax=e.foldl(b,"seed, run -> Math.max(seed, run.data.length)",d.hmax);for(var a=0;a<d.hmax;++a){var g=b[0].data[a],g=g&&("number"==typeof g?g:g.y);isNaN(g)&&(g=0);d.vmin=Math.min(d.vmin,g);for(var h=1;h<b.length;++h){var j=b[h].data[a],j=j&&("number"==typeof j?j:j.y);isNaN(j)&&(j=0);g+=j}d.vmax=Math.max(d.vmax,g)}}return d},curve:function(b,c){var a=b.slice(0);"x"==c&&(a[a.length]=a[0]);
  return j.map(a,function(b,d){if(0==d)return"M"+b.x+","+b.y;if(isNaN(c)){if("X"==c||"x"==c||"S"==c){var e,g=a[d-1],h=a[d],i,j,s,u=1/6;1==d?(e="x"==c?a[a.length-2]:g,u=1/3):e=a[d-2];d==a.length-1?(i="x"==c?a[1]:h,u=1/3):i=a[d+1];j=Math.sqrt((h.x-g.x)*(h.x-g.x)+(h.y-g.y)*(h.y-g.y));s=Math.sqrt((h.x-e.x)*(h.x-e.x)+(h.y-e.y)*(h.y-e.y));var v=Math.sqrt((i.x-g.x)*(i.x-g.x)+(i.y-g.y)*(i.y-g.y)),w=s*u,u=v*u;w>j/2&&u>j/2?(w=j/2,u=j/2):w>j/2?(w=j/2,u=j/2*v/s):u>j/2&&(u=j/2,w=j/2*s/v);"S"==c&&(e==g&&(w=0),h==
  i&&(u=0));j=g.x+w*(h.x-e.x)/s;e=g.y+w*(h.y-e.y)/s;s=h.x-u*(i.x-g.x)/v;g=h.y-u*(i.y-g.y)/v}}else return h=b.x-a[d-1].x,"C"+(b.x-(c-1)*(h/c))+","+a[d-1].y+" "+(b.x-h/c)+","+b.y+" "+b.x+","+b.y;return"C"+(j+","+e+" "+s+","+g+" "+h.x+","+h.y)}).join(" ")},getLabel:function(b,c,a){return d.doIfLoaded("dojo/number",function(d){return(c?d.format(b,{places:a}):d.format(b))||""},function(){return c?b.toFixed(a):b.toString()})}})})},"dojox/charting/scaler/primitive":function(){define(["dojo/_base/lang"],function(i){var j=
  i.getObject("dojox.charting.scaler.primitive",!0);return i.mixin(j,{buildScaler:function(h,g,e){h==g&&(h-=0.5,g+=0.5);return{bounds:{lower:h,upper:g,from:h,to:g,scale:e/(g-h),span:e},scaler:j}},buildTicks:function(){return{major:[],minor:[],micro:[]}},getTransformerFromModel:function(h){var g=h.bounds.from,e=h.bounds.scale;return function(d){return(d-g)*e}},getTransformerFromPlot:function(h){var g=h.bounds.from,e=h.bounds.scale;return function(d){return d/e+g}}})})},"dojox/gfx/fx":function(){define("dojo/_base/lang,./_base,./matrix,dojo/_base/Color,dojo/_base/array,dojo/_base/fx,dojo/_base/connect".split(","),
  function(i,j,h,g,e,d,c){function b(a,b){this.start=a;this.end=b}function f(a,b,c){this.start=a;this.end=b;this.units=c}function a(a,b){this.start=a;this.end=b;this.temp=new g}function k(a){this.values=a;this.length=a.length}function n(a,b){this.values=a;this.def=b?b:{}}function r(a,b){this.stack=a;this.original=b}function m(b,c,d,e){if(b.values)return new k(b.values);var f,g;g=b.start?j.normalizeColor(b.start):f=c?d?c[d]:c:e;b.end?b=j.normalizeColor(b.end):(f||(f=c?d?c[d]:c:e),b=f);return new a(g,
  b)}var l=j.fx={};b.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};f.prototype.getValue=function(a){return(this.end-this.start)*a+this.start+this.units};a.prototype.getValue=function(a){return g.blendColors(this.start,this.end,a,this.temp)};k.prototype.getValue=function(a){return this.values[Math.min(Math.floor(a*this.length),this.length-1)]};n.prototype.getValue=function(a){var b=i.clone(this.def),c;for(c in this.values)b[c]=this.values[c].getValue(a);return b};r.prototype.getValue=
  function(a){var b=[];e.forEach(this.stack,function(c){if(c instanceof h.Matrix2D)b.push(c);else if("original"==c.name&&this.original)b.push(this.original);else if("matrix"==c.name){if(c.start instanceof h.Matrix2D&&c.end instanceof h.Matrix2D){var d=new h.Matrix2D,f;for(f in c.start)d[f]=(c.end[f]-c.start[f])*a+c.start[f];b.push(d)}}else c.name in h&&(d=h[c.name],"function"!=typeof d?b.push(d):(f=e.map(c.start,function(b,d){return(c.end[d]-b)*a+b}),d=d.apply(h,f),d instanceof h.Matrix2D&&b.push(d)))},
  this);return b};var p=new g(0,0,0,0);l.animateStroke=function(a){if(!a.easing)a.easing=d._defaultEasing;var e=new d.Animation(a),f=a.shape,g;c.connect(e,"beforeBegin",e,function(){g=f.getStroke();var c=a.color,d={},e;if(c)d.color=m(c,g,"color",p);if((c=a.style)&&c.values)d.style=new k(c.values);if(c=a.width){var h=c;h.values?e=new k(h.values):(c=h.start?h.start:e=g?g.width:1,h.end?e=h.end:"number"!=typeof e&&(e=g?g.width:1),e=new b(c,e));d.width=e}if((c=a.cap)&&c.values)d.cap=new k(c.values);if(c=
  a.join)if(c.values)d.join=new k(c.values);else if(e=c.start?c.start:g&&g.join||0,c=c.end?c.end:g&&g.join||0,"number"==typeof e&&"number"==typeof c)d.join=new b(e,c);this.curve=new n(d,g)});c.connect(e,"onAnimate",f,"setStroke");return e};l.animateFill=function(a){if(!a.easing)a.easing=d._defaultEasing;var b=new d.Animation(a),e=a.shape,f;c.connect(b,"beforeBegin",b,function(){f=e.getFill();var b=a.color;if(b)this.curve=m(b,f,"",p)});c.connect(b,"onAnimate",e,"setFill");return b};l.animateFont=function(a){if(!a.easing)a.easing=
  d._defaultEasing;var b=new d.Animation(a),e=a.shape,g;c.connect(b,"beforeBegin",b,function(){g=e.getFont();var b=a.style,c={},d,h;if(b&&b.values)c.style=new k(b.values);if((b=a.variant)&&b.values)c.variant=new k(b.values);if((b=a.weight)&&b.values)c.weight=new k(b.values);if((b=a.family)&&b.values)c.family=new k(b.values);if((b=a.size)&&b.units)d=parseFloat(b.start?b.start:e.font&&e.font.size||"0"),h=parseFloat(b.end?b.end:e.font&&e.font.size||"0"),c.size=new f(d,h,b.units);this.curve=new n(c,g)});
  c.connect(b,"onAnimate",e,"setFont");return b};l.animateTransform=function(a){if(!a.easing)a.easing=d._defaultEasing;var b=new d.Animation(a),e=a.shape,f;c.connect(b,"beforeBegin",b,function(){f=e.getTransform();this.curve=new r(a.transform,f)});c.connect(b,"onAnimate",e,"setTransform");return b};return l})},"dojox/charting/plot2d/_PlotEvents":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect"],function(i,j,h,g){return h("dojox.charting.plot2d._PlotEvents",
  null,{constructor:function(){this._shapeEvents=[];this._eventSeries={}},destroy:function(){this.resetEvents();this.inherited(arguments)},plotEvent:function(){},raiseEvent:function(e){this.plotEvent(e);var d=i.delegate(e);d.originalEvent=e.type;d.originalPlot=e.plot;d.type="onindirect";j.forEach(this.chart.stack,function(c){if(c!==this&&c.plotEvent)d.plot=c,c.plotEvent(d)},this)},connect:function(e,d){this.dirty=!0;return g.connect(this,"plotEvent",e,d)},events:function(){return!!this.plotEvent.after},
  resetEvents:function(){if(this._shapeEvents.length)j.forEach(this._shapeEvents,function(e){e.shape.disconnect(e.handle)}),this._shapeEvents=[];this.raiseEvent({type:"onplotreset",plot:this})},_connectSingleEvent:function(e,d){this._shapeEvents.push({shape:e.eventMask,handle:e.eventMask.connect(d,this,function(c){e.type=d;e.event=c;this.raiseEvent(e);e.event=null})})},_connectEvents:function(e){if(e)e.chart=this.chart,e.plot=this,e.hAxis=this.hAxis||null,e.vAxis=this.vAxis||null,e.eventMask=e.eventMask||
  e.shape,this._connectSingleEvent(e,"onmouseover"),this._connectSingleEvent(e,"onmouseout"),this._connectSingleEvent(e,"onclick")},_reconnectEvents:function(e){(e=this._eventSeries[e])&&j.forEach(e,this._connectEvents,this)},fireEvent:function(e,d,c,b){if((e=this._eventSeries[e])&&e.length&&c<e.length)c=e[c],c.type=d,c.event=b||null,this.raiseEvent(c),c.event=null}})})},"JBrowse/View/Track/_FeatureDetailMixin":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/aspect,dojo/dom-construct,JBrowse/Util,JBrowse/View/FASTA,JBrowse/View/_FeatureDescriptionMixin".split(","),
  function(i,j,h,g,e,d,c,b){return i(b,{constructor:function(){"function"==typeof this.destroy&&g.before(this,"destroy",function(){delete this.eventHandlers})},_setupEventHandlers:function(){var b=dojo.clone(this.config.events||{});if(!b.click)b.click=(this.config.style||{}).linkTemplate?{action:"newWindow",url:this.config.style.linkTemplate}:{action:"contentDialog",title:"{type} {name}",content:dojo.hitch(this,"defaultFeatureDetail")};var b=dojo.clone(b),a;for(a in this.config){var c=a.replace(/^on(?=[A-Z])/,
  "");c!=a&&(b[c.toLowerCase()]=this.config[a])}for(a in b)"string"==typeof b[a]&&(b[a]={url:b[a]});this.eventHandlers=b;this.eventHandlers.click=this._makeClickHandler(this.eventHandlers.click)},defaultFeatureDetail:function(b,a,c,d){d=d||dojo.create("div",{className:"detail feature-detail feature-detail-"+b.name.replace(/\s+/g,"_").toLowerCase(),innerHTML:""});this._renderCoreDetails(b,a,c,d);this._renderAdditionalTagsDetail(b,a,c,d);this._renderUnderlyingReferenceSequence(b,a,c,d);this._renderSubfeaturesDetail(b,
  a,c,d);return d},_renderCoreDetails:function(b,a,c,e){b=dojo.create("div",{className:"core"},e);c=dojo.hitch(this,"renderDetailField",b);b.innerHTML+='<h2 class="sectiontitle">Primary Data</h2>';c("Name",this.getFeatureLabel(a),a);c("Type",a.get("type"),a);c("Score",a.get("score"),a);c("Description",this.getFeatureDescription(a),a);c("Position",d.assembleLocString({start:a.get("start"),end:a.get("end"),ref:this.refSeq.name,strand:a.get("strand")}),a);c("Length",d.addCommas(a.get("end")-a.get("start"))+
  " bp",a)},_renderSubfeaturesDetail:function(b,a,c,d){(c=a.get("subfeatures"))&&c.length&&this._subfeaturesDetail(b,c,d,a)},_isReservedTag:function(b){return{name:1,start:1,end:1,strand:1,note:1,subfeatures:1,type:1,score:1}[b.toLowerCase()]},_renderAdditionalTagsDetail:function(b,a,c,d){b=j.filter(a.tags(),function(a){return!this._isReservedTag(a)},this);b.length&&(e.create("div",{className:"additional",innerHTML:'<h2 class="sectiontitle">Attributes</h2>'},d),j.forEach(b.sort(),function(b){this.renderDetailField(d,
  b,a.get(b),a)},this))},_renderUnderlyingReferenceSequence:function(b,a,e,g){e=dojo.create("div",{className:"field_container feature_sequence"},g);dojo.create("h2",{className:"field feature_sequence",innerHTML:"Region sequence",title:"reference sequence underlying this "+(a.get("type")||"feature")},e);var h="feature_sequence"+this._uniqID(),i=dojo.create("div",{id:h,innerHTML:'<div style="height: 12em">Loading...</div>',className:"value feature_sequence"},e),e=this.config.maxFeatureSizeForUnderlyingRefSeq;
  e<a.get("end")-a.get("start")?i.innerHTML="Not displaying underlying reference sequence, feature is longer than maximum of "+d.humanReadableNumber(e)+"bp":b.browser.getStore("refseqs",dojo.hitch(this,function(b){i=dojo.byId(h)||i;b?b.getReferenceSequence({ref:this.refSeq.name,start:a.get("start"),end:a.get("end")},dojo.hitch(this,function(b){i=dojo.byId(h)||i;i.innerHTML="";(new c({track:this,width:62,htmlMaxRows:10})).renderHTML({ref:this.refSeq.name,start:a.get("start"),end:a.get("end"),strand:a.get("strand"),
  type:a.get("type")},-1==a.get("strand")?d.revcom(b):b,i)}),function(){},dojo.hitch(this,function(){i=dojo.byId(h)||i;i.innerHTML='<span class="ghosted">reference sequence not available</span>'})):i.innerHTML='<span class="ghosted">reference sequence not available</span>'}))},_uniqID:function(){this._idCounter=this._idCounter||0;return this._idCounter++},_subfeaturesDetail:function(b,a,c){c=dojo.create("div",{className:"field_container subfeatures"},c);dojo.create("h2",{className:"field subfeatures",
  innerHTML:"Subfeatures"},c);var d=dojo.create("div",{className:"value subfeatures"},c);j.forEach(a||[],function(a){this.defaultFeatureDetail(b,a,null,dojo.create("div",{className:"detail feature-detail subfeature-detail feature-detail-"+b.name+" subfeature-detail-"+b.name,innerHTML:""},d))},this)}})})},"JBrowse/View/FASTA":function(){define("dojo/_base/declare,dojo/dom-construct,dijit/Toolbar,dijit/form/Button,JBrowse/Util,JBrowse/has".split(","),function(i,j,h,g,e,d){return i(null,{constructor:function(c){this.width=
  c.width||78;this.htmlMaxRows=c.htmlMaxRows||15;this.canSaveFiles=(this.track=c.track)&&c.track._canSaveFiles&&c.track._canSaveFiles()},renderHTML:function(c,b,f){var a=this.renderText(c,b),b=a.match(/\n/g).length+1,f=j.create("div",{className:"fastaView"},f);if(this.canSaveFiles){var i=this;(new h).placeAt(f).addChild(new g({iconClass:"dijitIconSave",label:"FASTA",title:"save as FASTA",disabled:!d("save-generated-files"),onClick:function(){i.track._fileDownload({format:"FASTA",filename:e.assembleLocString(c)+
  ".fasta",data:a})}}))}var n=0;j.create("textarea",{className:"fasta",cols:this.width,rows:Math.min(b,this.htmlMaxRows),readonly:!0},f).innerHTML=a.replace(/\n/g,function(){return n++?"":"\n"});return f},renderText:function(c,b){return">"+c.ref+" "+e.assembleLocString(c)+(c.type?" class="+c.type:"")+" length="+(c.end-c.start)+"\n"+this._wrap(b,this.width)},_wrap:function(c,b){b=b||this.width;return c.replace(RegExp("(.{"+b+"})","g"),"$1\n")}})})},"dijit/Toolbar":function(){define("require,dojo/_base/declare,dojo/has,dojo/keys,dojo/ready,./_Widget,./_KeyNavContainer,./_TemplatedMixin".split(","),
  function(i,j,h,g,e,d,c,b){h("dijit-legacy-requires")&&e(0,function(){i(["dijit/ToolbarSeparator"])});return j("dijit.Toolbar",[d,b,c],{templateString:'<div class="dijit" role="toolbar" tabIndex="${tabIndex}" data-dojo-attach-point="containerNode"></div>',baseClass:"dijitToolbar",postCreate:function(){this.inherited(arguments);this.connectKeyNavHandlers(this.isLeftToRight()?[g.LEFT_ARROW]:[g.RIGHT_ARROW],this.isLeftToRight()?[g.RIGHT_ARROW]:[g.LEFT_ARROW])}})})},"JBrowse/View/_FeatureDescriptionMixin":function(){define(["dojo/_base/declare",
  "dojo/_base/lang"],function(i,j){return i(null,{getFeatureLabel:function(h){return this._getFeatureDescriptiveThing("label","name,id",h)},getFeatureDescription:function(h){return this._getFeatureDescriptiveThing("description","note,description",h)},_getFeatureDescriptiveThing:function(h,g,e){var d=this.config.style[h]||this.config[h];if(!d)return null;if("function"==typeof d)return d.call(this,e);if(!this.descriptionFields)this.descriptionFields={};var c;if(!(c=this.descriptionFields[h]))d?(j.isArray(d)?
  d=d.join(","):"string"!=typeof d&&(console.warn("invalid `description` setting ("+d+') for "'+(this.name||this.track.name)+'" track, falling back to "note,description"'),d=g),d=d.toLowerCase().split(/\s*\,\s*/)):d=[],c=this.descriptionFields[h]=d;h=c;for(g=0;g<h.length;g++)if(d=e.get(h[g]))return d;return null}})})},"JBrowse/View/Track/_TrackDetailsStatsMixin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred"],function(i,j,h){return i(null,{_trackDetailsContent:function(){var g=
  this,e=new h,d=arguments;this.store.getGlobalStats(function(c){e.resolve(g.inherited(d,[{"Stats (current reference sequence)":c}]))},j.hitch(e,"reject"));return e}})})},"JBrowse/View/GranularRectLayout":function(){define(["dojo/_base/declare"],function(i){return i(null,{constructor:function(i){this.pitchX=i.pitchX||10;this.pitchY=i.pitchY||10;this.displayMode=i.displayMode;if("compact"==this.displayMode)this.pitchY=Math.round(this.pitchY/4)||1,this.pitchX=Math.round(this.pitchX/4)||1;this.bitmap=
  [];this.rectangles={};this.maxHeight=Math.ceil((i.maxHeight||Infinity)/this.pitchY);this.pTotalHeight=0},addRect:function(i,h,g,e,d){if(i in this.rectangles){i=this.rectangles[i];if(null===i.top)return null;this._addRectToBitmap(i,d);return i.top*this.pitchY}h=Math.floor(h/this.pitchX);g=Math.floor(g/this.pitchX);e=Math.ceil(e/this.pitchY);h={id:i,l:h,r:g,mX:Math.floor((h+g)/2),h:e};if(d)h.data=d;for(var g=this.maxHeight-e,c=0;c<=g&&this._collides(h,c);c++);if(c>g)return h.top=c=null,this.rectangles[i]=
  h,this.pTotalHeight=Math.max(this.pTotalHeight||0,c+e),null;h.top=c;this._addRectToBitmap(h,d);this.rectangles[i]=h;this.pTotalHeight=Math.max(this.pTotalHeight||0,c+e);return c*this.pitchY},_collides:function(i,h){if("collapsed"==this.displayMode)return!1;var g=this.bitmap,e=g[h];if(e&&(e[i.l]||e[i.r]||e[i.mX]))return!0;for(var e=h+i.h,d=h;d<e;d++){var c=g[d];if(c){if(c.allFilled)return!0;if(c.length>i.l)for(var b=i.l;b<=i.r;b++)if(c[b])return!0}}return!1},_autovivify:function(i,h){var g;if(!(g=
  i[h]))g=[],i[h]=g;return g},_addRectToBitmap:function(i,h){if(null!==i.top){var h=h||!0,g=this.bitmap,e=this._autovivify,d=i.top+i.h;if(2E4<i.r-i.l)for(var c=i.top;c<d;c++)e(g,c).allFilled=h;else for(c=i.top;c<d;c++)for(var b=e(g,c),f=i.l;f<=i.r;f++)b[f]=h}},discardRange:function(i,h){for(var g=Math.floor(i/this.pitchX),e=Math.floor(h/this.pitchX),d=this.bitmap,c=0;c<d.length;++c){var b=d[c];if(b)for(var f=g;f<=e;++f)delete b[f]}},hasSeen:function(i){return!!this.rectangles[i]},getByCoord:function(i,
  h){var g=this.bitmap[Math.floor(h/this.pitchY)];return!g?void 0:g.allFilled||g[Math.floor(i/this.pitchX)]},getByID:function(i){if(i=this.rectangles[i])return i.data||!0},cleanup:function(){},getTotalHeight:function(){return this.pTotalHeight*this.pitchY}})})},"JBrowse/View/Track/FixedImage/Wiggle":function(){define(["dojo/_base/declare","JBrowse/View/Track/FixedImage","JBrowse/View/Track/_YScaleMixin"],function(i,j,h){return i([j,h],{constructor:function(){},updateStaticElements:function(g){this.inherited(arguments);
  this.updateYScaleFromViewDimensions(g)},makeImageLoadHandler:function(g,e,d,c){return this.inherited(arguments,[g,e,d,dojo.hitch(this,function(){this.makeWiggleYScale();c&&c()})])},makeWiggleYScale:function(){var g=this;this.store.getGlobalStats(function(e){g.yscale||g.makeYScale({min:e.scoreMin,max:e.scoreMax})})}})})},"JBrowse/View/Track/FixedImage":function(){define(["dojo/_base/declare","JBrowse/has","JBrowse/View/Track/BlockBased"],function(i,j,h){return i(h,{constructor:function(g){this.trackPadding=
  g.trackPadding||0},handleImageError:function(g){(g.currentTarget||g.srcElement).style.display="none";dojo.stopEvent(g)},makeImageLoadHandler:function(g,e,d,c){var b=dojo.hitch(this,function(){this.imageHeight=g.height;g.style.height=g.height+"px";g.style.width=100*(g.baseWidth/d)+"%";this.heightUpdate(g.height,e);c&&c();return!0});return j("ie")?function(){window.setTimeout(b,250)}:b},fillBlock:function(g){var e=g.blockIndex,d=g.block,c=g.leftBase,b=g.rightBase,f=g.finishCallback||function(){},a=
  b-c;this.store.getImages({scale:g.scale,start:c,end:b},dojo.hitch(this,function(b){dojo.forEach(b,function(b){b.className="image-track";if(!b.parentNode||!b.parentNode.parentNode){b.style.position="absolute";b.style.left=100*((b.startBase-c)/a)+"%";switch(this.config.align){case "top":b.style.top="0px";break;default:b.style.bottom=this.trackPadding+"px"}d.domNode.appendChild(b)}var f=this.makeImageLoadHandler(b,e,a);b.complete?f():b.onload=f},this);f()}),dojo.hitch(this,function(a){404==a.status?
  f():this.fillBlockError(e,d,a);f()}))},startZoom:function(){},endZoom:function(){this.clear()},clear:function(){this.inherited(arguments)},transfer:function(g,e){if(g&&e)for(var d=g.domNode.childNodes,c=e.startBase,b=e.endBase,f,a=0;a<d.length;a++)if(f=d[a],"startBase"in f&&f.startBase<b&&f.startBase+f.baseWidth>c)f.style.left=100*((f.startBase-c)/(b-c))+"%",e.domNode.appendChild(f)}})})},"JBrowse/View/Track/Wiggle":function(){define(["JBrowse/View/Track/Wiggle/XYPlot"],function(i){return i})},"JBrowse/View/Track/Wiggle/XYPlot":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/Color,dojo/on,JBrowse/View/Track/WiggleBase,JBrowse/View/Track/_YScaleMixin,JBrowse/Util,./_Scale".split(","),
  function(i,j,h,g,e,d,c,b){return i([e,d],{_defaultConfig:function(){return c.deepUpdate(dojo.clone(this.inherited(arguments)),{style:{pos_color:"blue",neg_color:"red",origin_color:"#888",variance_band_color:"rgba(0,0,0,0.3)"}})},_getScaling:function(c,a,d){this._getScalingStats(c,dojo.hitch(this,function(c){if(!this.lastScaling||!this.lastScaling.sameStats(c)||this.trackHeightChanged){c=new b(this.config,c);if(0.005>Math.abs(c.min/c.max))c.min=0;this.makeYScale({fixBounds:!0,min:c.min,max:c.max});
  c.min=this.ruler.scaler.bounds.lower;c.max=this.ruler.scaler.bounds.upper;c.range=c.max-c.min;this.lastScaling=c;this.trackHeightChanged=!1}a(this.lastScaling)}),d)},updateStaticElements:function(b){this.inherited(arguments);this.updateYScaleFromViewDimensions(b)},_drawFeatures:function(b,a,d,e,g,h,i){var j=this,q=g.getContext("2d"),s=g.height,u=c.getResolution(q,this.browser.config.highResolutionMode),v=dojo.hitch(this,function(a){return s*(1-i.normalize(a))/u}),w=v(i.origin),t=this.config.disable_clip_markers;
  dojo.forEach(h,function(a,b){if(a){var c=v(a.score),d=a.feat;if(0<=c){var e=this.getConfForFeature("style.bg_color",d);if(e)q.fillStyle=e,j._fillRectMod(q,b,0,1,s)}if(c<=s||c>w)if(c<=w){if(q.fillStyle=this.getConfForFeature("style.pos_color",d),j._fillRectMod(q,b,c,1,w-c+1),!t&&0>c)q.fillStyle=this.getConfForFeature("style.clip_marker_color",d)||this.getConfForFeature("style.neg_color",d),j._fillRectMod(q,b,0,1,3)}else if(q.fillStyle=this.getConfForFeature("style.neg_color",d),j._fillRectMod(q,b,
  w,1,c-w+1),!t&&c>=s)q.fillStyle=this.getConfForFeature("style.clip_marker_color",d)||this.getConfForFeature("style.pos_color",d),j._fillRectMod(q,b,s-3,1,3)}},this)},_calculatePixelScores:function(b,a,c){var d=Array(b),e=this.config.scoreType;dojo.forEach(a,function(a,b){for(var f=a.source,g=c[b],h=g.r,i=a.get(e)||a.get("score"),g=Math.round(g.l);g<h;g++)d[g]&&d[g].lastUsedStore==f?d[g].score=Math.max(d[g].score,i):d[g]?(d[g].score+=i,d[g].lastUsedStore=f):d[g]={score:i,lastUsedStore:f,feat:a}},this);
  for(b=0;b<d.length;b++)d[b]&&(d[b]={score:d[b].score,feat:d[b].feat});return d},_maskBySpans:function(b,a,c,d,e,g,h,i){var j=e.getContext("2d"),s=e.height,u;for(u in i)if(i.hasOwnProperty(u)){var v=Math.ceil((i[u].end-i[u].start)*b),w=Math.round((i[u].start-a)*b);j.clearRect(w,0,v,s)}j.globalAlpha=this.config.style.masked_transparancy||0.2;this.config.style.masked_transparancy=j.globalAlpha;this._drawFeatures(b,a,c,d,e,g,h)},_postDraw:function(b,a,d,e,g,i,l,p){var q=g.getContext("2d"),s=g.height,
  u=c.getResolution(q,this.browser.config.highResolutionMode),v=dojo.hitch(this,function(a){return s*(1-p.normalize(a))/u}),w=this;if(this.config.variance_band){var t="object"==typeof this.config.variance_band?j.map(this.config.variance_band,function(a){return parseFloat(a)}).sort().reverse():[2,1];this.getGlobalStats(dojo.hitch(this,function(a){if("scoreMean"in a&&"scoreStdDev"in a){var b=function(b,c,d){q.fillStyle=c;var c=v(a.scoreMean+b),e=v(a.scoreMean-b)-c,e=Math.max(1,e);w._fillRectMod(q,0,c,
  g.width,e);q.font="12px sans-serif";0<b?(q.fillText("+"+d,2,c),q.fillText("-"+d,2,c+e)):q.fillText(d,2,c)},c=new h(this.config.style.variance_band_color),d=new h(this.config.style.variance_band_color);d.a/=t.length;j.forEach(t,function(e,f){b(e*a.scoreStdDev,h.blendColors(d,c,(f+1)/t.length).toCss(!0),e+"\u03c3")});b(0,"rgba(255,255,0,0.7)","mean")}}))}b=this.config.style.origin_color;if("string"==typeof b&&!{none:1,off:1,no:1,zero:1}[b])a=v(p.origin),q.fillStyle=b,q.fillRect(0,a,g.width,1)}})})},
  "JBrowse/View/Track/WiggleBase":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/_base/event,dojo/dom-construct,dojo/on,dojo/mouse,JBrowse/View/Track/BlockBased,JBrowse/View/Track/_ExportMixin,JBrowse/View/Track/_TrackDetailsStatsMixin,JBrowse/View/Dialog/SetTrackHeight,JBrowse/Util,JBrowse/has,./Wiggle/_Scale".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n,r,m){return i([b,f,a],{constructor:function(a){this.trackPadding=a.trackPadding||0;if(!("style"in this.config))this.config.style=
  {};this.store=a.store;this._setupEventHandlers()},_defaultConfig:function(){return{maxExportSpan:5E5,autoscale:"global",scoreType:"score",logScaleOption:!0}},_setupEventHandlers:function(){var a=dojo.clone(this.config.events||{});if(!a.click&&(this.config.style||{}).linkTemplate)a.click={action:"newWindow",url:this.config.style.linkTemplate};var a=dojo.clone(a),b;for(b in this.config){var c=b.replace(/^on(?=[A-Z])/,"");c!=b&&(a[c.toLowerCase()]=this.config[b])}for(b in a)"string"==typeof a[b]&&(a[b]=
  {url:a[b]});this.eventHandlers=a;if(this.eventHandlers.click)this.eventHandlers.click=this._makeClickHandler(this.eventHandlers.click)},_getScaling:function(a,b,c){this._getScalingStats(a,dojo.hitch(this,function(a){if(!this.lastScaling||!this.lastScaling.sameStats(a))try{this.lastScaling=new m(this.config,a),b(this.lastScaling)}catch(d){c(d)}else b(this.lastScaling)}),c)},_getScalingStats:function(a,b,c){if(m.prototype.needStats(this.config))return"local"==this.config.autoscale?(a=h.mixin({scale:a.scale},
  this.browser.view.visibleRegion()),a.start=Math.ceil(a.start),a.end=Math.floor(a.end),this.getRegionStats.call(this,a,b,c)):this.getGlobalStats.call(this,b,c);b(null);return null},getFeatures:function(a,b,c){this.store.getFeatures.apply(this.store,arguments)},getGlobalStats:function(a,b){this.store.getGlobalStats(a,b)},getRegionStats:function(a,b,c){this.store.getRegionStats(a,b,c)},_canvasWidth:function(a){return Math.ceil((a.endBase-a.startBase)*a.scale)},_canvasHeight:function(){return parseInt((this.config.style||
  {}).height)||100},_getBlockFeatures:function(a){var b=this,c=a.block,d=a.leftBase,e=a.rightBase,f=a.scale,g=a.finishCallback||function(){},h=this._canvasWidth(a.block),i=[];this.getFeatures({ref:this.refSeq.name,basesPerSpan:1/f,scale:f,start:d,end:e+1},function(a){b.filterFeature(a)&&i.push(a)},dojo.hitch(this,function(a){if(c.domNode&&c.domNode.parentNode){var b=j.map(i,function(a){return this._featureRect(f,d,h,a)},this);c.features=i;c.featureRects=b;c.pixelScores=this._calculatePixelScores(this._canvasWidth(c),
  i,b);if(a&&a.maskingSpans)c.maskingSpans=a.maskingSpans;g()}}),dojo.hitch(this,function(b){console.error(b.stack||""+b,b);this._handleError(b,a)}))},renderBlock:function(a){var b=a.block;if(this.scaling.compare(b.scaling)&&b.pixelScores){b.scaling=this.scaling;e.empty(b.domNode);try{dojo.create("canvas").getContext("2d").fillStyle="red"}catch(c){this.fatalError="This browser does not support HTML canvas elements.";this.fillBlockError(blockIndex,b,this.fatalError);return}var d=b.features,f=b.featureRects,
  g=this.scaling,h=this._canvasHeight(),h=dojo.create("canvas",{height:h,width:this._canvasWidth(b),style:{cursor:"default",height:h+"px",width:r("inaccurate-html-width")?"":"100%","min-width":r("inaccurate-html-width")?"100%":"","max-width":r("inaccurate-html-width")?"102%":""},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track"},b.domNode),i=h.getContext("2d"),j=n.getResolution(i,this.browser.config.highResolutionMode);if("disabled"!=this.browser.config.highResolutionMode&&
  1<=j){var k=h.height;h.width=Math.round(h.width*j);h.height=Math.round(k*j);h.style.height=k+"px";i.scale(j,j)}h.startBase=b.startBase;b.canvas=h;i=this._calculatePixelScores(h.width,d,f);this._draw(b.scale,b.startBase,b.endBase,b,h,d,f,g,i,b.maskingSpans);this.heightUpdate(h.height/j,a.blockIndex);if(!h.parentNode||!h.parentNode.parentNode)switch(a=b.endBase-b.startBase,h.style.position="absolute",h.style.left=100*((h.startBase-b.startBase)/a)+"%",this.config.align){case "top":h.style.top="0px";
  break;default:h.style.bottom=this.trackPadding+"px"}}},fillBlock:function(a){var b=this;this.heightUpdate(this._canvasHeight(),a.blockIndex);var c=a.finishCallback||function(){};a.finishCallback=function(){b.updateGraphs(a,c)};this._getBlockFeatures(a)},updateGraphs:function(a,b){var c=this;this._getScaling(a,function(a){c.scaling=a;j.forEach(c.blocks,function(a,b){a&&a.domNode.parentNode&&c.renderBlock({block:a,blockIndex:b})});b()},function(b){c._handleError(b,a)})},_draw:function(a,b,c,d,e,f,g,
  h,i,j){this._preDraw(a,b,c,d,e,f,g,h);this._drawFeatures(a,b,c,d,e,i,h);j&&this._maskBySpans(a,b,c,d,e,i,h,j);this._postDraw(a,b,c,d,e,f,g,h)},startZoom:function(){},endZoom:function(){this.clear()},_featureRect:function(a,b,c,d){a={w:Math.ceil((d.get("end")-d.get("start"))*a),l:Math.round((d.get("start")-b)*a)};if(0>a.l)a.w+=a.l,a.l=0;a.w=Math.min(c-a.l,a.w);a.r=a.w+a.l;return a},_preDraw:function(){},_drawFeatures:function(){},_maskBySpans:function(){},_postDraw:function(){},_calculatePixelScores:function(a,
  b,c){var d=Array(a),e=this.config.scoreType;dojo.forEach(b,function(a,b){for(var f=a.source,g=c[b],h=g.r,i=a.get(e)||a.get("score"),g=Math.round(g.l);g<h;g++)d[g]&&d[g].lastUsedStore==f?d[g].score=Math.max(d[g].score,i):d[g]?(d[g].score+=i,d[g].lastUsedStore=f):d[g]={score:i,lastUsedStore:f,feat:a}},this);for(a=0;a<d.length;a++)d[a]&&delete d[a].lastUsedStore;return d},setViewInfo:function(){this.inherited(arguments);this._makeScoreDisplay()},_makeScoreDisplay:function(){var a=this.browser.view,b=
  this;if(!this._mouseoverEvent)this._mouseoverEvent=this.own(d(this.div,"mousemove",function(c){var c=g.fix(c),d=a.absXtoBp(c.clientX);b.mouseover(d,c)}))[0];if(!this._mouseoutEvent)this._mouseoutEvent=this.own(d(this.div,c.leave,function(){b.mouseover(void 0)}))[0];if(b.eventHandlers.click&&!this._mouseClickEvent)this._mouseClickEvent=this.own(d(this.div,"click",b.eventHandlers.click))[0];if(!this.scoreDisplay)this.scoreDisplay={flag:dojo.create("div",{className:"wiggleValueDisplay",style:{position:"fixed",
  display:"none",zIndex:15}},this.div),pole:dojo.create("div",{className:"wigglePositionIndicator",style:{position:"fixed",display:"none",zIndex:15}},this.div)}},mouseover:function(a,b){if(void 0===a)this.scoreDisplay.flag.style.display="none",this.scoreDisplay.pole.style.display="none";else{var c;j.some(this.blocks,function(b){return b&&b.startBase<=a&&b.endBase>=a?(c=b,!0):!1});if(c&&c.canvas&&c.pixelScores&&b){var d=c.pixelScores,e=dojo.position(c.canvas);if(this._showPixelValue(this.scoreDisplay.flag,
  d[Math.round(b.pageX-e.x)]))this.scoreDisplay.flag.style.display="block",this.scoreDisplay.pole.style.display="block",this.scoreDisplay.flag.style.left=b.clientX+"px",this.scoreDisplay.flag.style.top=e.y+"px",this.scoreDisplay.pole.style.left=b.clientX+"px",this.scoreDisplay.pole.style.height=e.h+"px"}}},_showPixelValue:function(a,b){if("number"==typeof b)return a.innerHTML=parseFloat(b.toPrecision(6)),!0;return b&&"number"==typeof b.score?(a.innerHTML=parseFloat(b.score.toPrecision(6)),!0):!1},_exportFormats:function(){return[{name:"bedGraph",
  label:"bedGraph",fileExt:"bedgraph"},{name:"Wiggle",label:"Wiggle",fileExt:"wig"},{name:"GFF3",label:"GFF3",fileExt:"gff3"}]},_trackMenuOptions:function(){var a=this,b=this.inherited(arguments)||[];b.push({label:"Change height",iconClass:"jbrowseIconVerticalResize",action:function(){(new k({height:a._canvasHeight(),setCallback:function(b){a.trackHeightChanged=!0;a.updateUserStyles({height:b})}})).show()}});this.config.logScaleOption&&b.push({label:"Log scale",type:"dijit/CheckedMenuItem",checked:"log"==
  this.config.scale,onClick:function(){a.config.scale=this.checked?"log":"linear";a.browser.publish("/jbrowse/v1/v/tracks/replace",[a.config])}});return b},_fillRectMod:function(a,b,c,d,e){var f=window.devicePixelRatio||1,g=d;"disabled"!=this.browser.config.highResolutionMode&&0<f-Math.floor(f)&&(g=d+0.3);a.fillRect(b,c,g,e)}})})},"JBrowse/View/Track/Wiggle/_Scale":function(){define(["dojo/_base/lang","JBrowse/Util","JBrowse/Digest/Crc32"],function(i,j,h){return j.fastDeclare({needStats:function(g){return!("min_score"in
  g&&"max_score"in g&&"z_score"!=g.bicolor_pivot&&"mean"!=g.bicolor_pivot&&"z_score"!=g.scale)},constructor:function(g,e){var d=this.needStats(g);if(d&&!e)throw"No stats object provided, cannot calculate scale";if(d&&e.scoreMin==e.scoreMax)e=i.mixin({},e),0>e.scoreMin?e.scoreMax=0:e.scoreMin=0;if("z_score"==g.autoscale&&!g.scale||"z_score"==g.scale&&!g.autoscale)g.scale="z_score",g.autoscale="z_score";var c=parseFloat(g.z_score_bound)||4,b="min_score"in g?parseFloat(g.min_score):function(){switch(g.autoscale){case "z_score":return Math.max(-c,
  (e.scoreMin-e.scoreMean)/e.scoreStdDev);case "global":case "local":return e.scoreMin;default:return Math.max(e.scoreMin,e.scoreMean-c*e.scoreStdDev)}}(),f="max_score"in g?parseFloat(g.max_score):function(){switch(g.autoscale){case "z_score":return Math.min(c,(e.scoreMax-e.scoreMean)/e.scoreStdDev);case "global":case "local":return e.scoreMax;default:return Math.min(e.scoreMax,e.scoreMean+c*e.scoreStdDev)}}();if("number"!=typeof b||isNaN(b))b=0;if("number"!=typeof f||isNaN(f))f=b+10;var a=parseFloat(g.data_offset)||
  0;"log"==g.scale?(f=this.log(f+a),b=this.log(b+a)):(f+=a,b+=a);var j="bicolor_pivot"in g?"mean"==g.bicolor_pivot?e.scoreMean||0:"zero"==g.bicolor_pivot?0:parseFloat(g.bicolor_pivot):"z_score"==g.scale?e.scoreMean||0:"log"==g.scale?1:0;i.mixin(this,{offset:a,min:b,max:f,range:f-b,origin:j,_statsFingerprint:h.objectFingerprint(e)});if(d)this.scoreMean=e.scoreMean,this.scoreStdDev=e.scoreStdDev;this.normalize=function(a){switch(a.scale){case "z_score":return function(a){return(a+this.offset-this.scoreMean)/
  this.scoreStdDev-this.min/this.range};case "log":return function(a){return(this.log(a+this.offset)-this.min)/this.range};default:return function(a){return(a+this.offset-this.min)/this.range}}}(g)},log:function(g){return g?Math.log(Math.abs(g))*(0>g?-1:1):0},compare:function(g){return!g?1:this.offset-g.offset||this.min-g.min||this.max-g.max||this.range-g.range||this.origin-g.origin},sameStats:function(g){return this._statsFingerprint==h.objectFingerprint(g)}})})},"JBrowse/View/Track/Wiggle/Density":function(){define(["dojo/_base/declare",
  "dojo/_base/array","dojo/_base/Color","JBrowse/View/Track/WiggleBase","JBrowse/Util"],function(i,j,h,g,e){return i(g,{_defaultConfig:function(){return e.deepUpdate(dojo.clone(this.inherited(arguments)),{maxExportSpan:5E5,style:{height:31,pos_color:"#00f",neg_color:"#f00",bg_color:"rgba(230,230,230,0.6)",clip_marker_color:"black"}})},_drawFeatures:function(d,c,b,e,a,g,i){var j=this,m=a.getContext("2d"),l=a.height,p="function"==typeof this.config.style.color?this.config.style.color:function(){var a=
  j.config.disable_clip_markers,b=i.normalize(i.origin);return function(c,d){var e=c.feat;return a||1>=d&&0<=d?h.blendColors(new h(j.getConfForFeature("style.bg_color",e)),new h(j.getConfForFeature(d>=b?"style.pos_color":"style.neg_color",e)),Math.abs(d-b)).toString():1<d?j.getConfForFeature("style.pos_color",e):j.getConfForFeature("style.neg_color",e)}}();dojo.forEach(g,function(a,b){if(a){var c=a.feat,d=i.normalize(a.score);m.fillStyle=""+p(a,d);j._fillRectMod(m,b,0,1,l);if(1<d)m.fillStyle=j.getConfForFeature("style.clip_marker_color",
  c)||"red",j._fillRectMod(m,b,0,1,3);else if(0>d)m.fillStyle=j.getConfForFeature("style.clip_marker_color",c)||"red",j._fillRectMod(m,b,l-3,1,3)}})},_maskBySpans:function(d,c,b,e,a,g,h,i){var j=a.getContext("2d"),l=a.height;j.fillStyle=this.config.style.mask_color||"rgba(128,128,128,0.6)";this.config.style.mask_color=j.fillStyle;for(var p in i)i.hasOwnProperty(p)&&(b=Math.ceil((i[p].end-i[p].start)*d),e=Math.round((i[p].start-c)*d),j.fillRect(e,0,b,l),j.clearRect(e,0,b,l/3),j.clearRect(e,2/3*l,b,l/
  3));dojo.forEach(g,function(a,b){a||j.clearRect(b,0,1,l)})},_postDraw:function(){}})})},"JBrowse/View/Track/Alignments":function(){define("dojo/_base/declare,dojo/_base/array,dojo/promise/all,JBrowse/Util,JBrowse/View/Track/HTMLFeatures,JBrowse/View/Track/_AlignmentsMixin".split(","),function(i,j,h,g,e,d){return i([e,d],{_defaultConfig:function(){return g.deepUpdate(dojo.clone(this.inherited(arguments)),{maxFeatureScreenDensity:1.5,layoutPitchY:4,hideDuplicateReads:!0,hideQCFailingReads:!0,hideSecondary:!0,
  hideSupplementary:!0,hideMissingMatepairs:!1,hideUnmapped:!0,hideForwardStrand:!1,hideReverseStrand:!1,style:{_defaultLabelScale:50,className:"alignment",arrowheadClass:"arrowhead",centerChildrenVertically:!0,showMismatches:!0,showSubfeatures:!1,showLabels:!1}})},renderFeature:function(c,b,d,a,e,g,h,i){var j=this.inherited(arguments);if(!j)return null;var p=Math.max(c.get("start"),h),q=Math.min(c.get("end"),i);this.config.style.showMismatches&&this._drawMismatches(c,j,a,p,q);c.get("multi_segment_template")&&
  !c.get("multi_segment_all_aligned")&&(j.className+=" missing_mate");return j},handleSubFeatures:function(c,b,d,a,e){this.config.style.showSubfeatures&&this.inherited(arguments)},_drawMismatches:function(c,b,d,a,e){var g=e-a;if(1<g*d){var h=this._getMismatches(c),i=this.getCharacterMeasurements(),l=d>=i.w;j.forEach(h,function(h){var i=c.get("start")+h.start,j=i+h.length;if(!(j<=a||i>=e)){var m=h.base,r=Math.max(i,a),j=Math.min(j,e),w=j-r,t=dojo.create("span",{className:h.type+" base_"+m.toLowerCase(),
  style:{position:"absolute",left:100*(r-a)/g+"%",width:1<d*w?100*w/g+"%":"1px"}},b);if(!l)t.title=m;if(l&&20>=h.length)for(var y=0;y<h.length;y++){var x=i+y;x>=r&&x<=j&&dojo.create("span",{className:"base base_"+m.toLowerCase(),style:{position:"absolute",width:d+"px",left:100*((x-r)/w)+"%"},innerHTML:m},t)}}},this)}},getCharacterMeasurements:function(){if(!this._measurements)this._measurements=this._measureSequenceCharacterSize(this.div);return this._measurements},_measureSequenceCharacterSize:function(c){var b=
  dojo.create("div",{innerHTML:'<span class="base mismatch">A</span><span class="base mismatch">C</span><span class="base mismatch">T</span><span class="base mismatch">G</span><span class="base mismatch">N</span>',style:{visibility:"hidden",position:"absolute",left:"0px"}},c),d={w:b.clientWidth/5,h:b.clientHeight};c.removeChild(b);return d},_trackMenuOptions:function(){return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions()]).then(function(c){var b=c.shift();c.unshift({type:"dijit/MenuSeparator"});
  return b.concat.apply(b,c)})}})})},"JBrowse/View/Track/_AlignmentsMixin":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/when,JBrowse/Util,JBrowse/Store/SeqFeature/_MismatchesMixin,JBrowse/View/Track/_NamedFeatureFiltersMixin".split(","),function(i,j,h,g,e,d,c){return i([d,c],{defaultFeatureDetail:function(b,c){var a=dojo.create("div",{className:"detail feature-detail feature-detail-"+b.name.replace(/\s+/g,"_").toLowerCase(),innerHTML:""}),d=dojo.hitch(this,function(b,
  c,d){b=e.ucFirst(b.replace(/_/g," "));return this.renderDetailField(a,b,c,d)});d("Name",c.get("name"),c);d("Type",c.get("type"),c);d("Score",c.get("score"),c);d("Description",c.get("note"),c);d("Position",e.assembleLocString({start:c.get("start"),end:c.get("end"),ref:this.refSeq.name})+({1:" (+)","-1":" (-)","0":" (no strand)"}[c.get("strand")]||""),c);c.get("seq")&&d("Sequence and Quality",this._renderSeqQual(c),c);var g=j.filter(c.tags(),function(a){return!{name:1,score:1,start:1,end:1,strand:1,
  note:1,subfeatures:1,type:1}[a.toLowerCase()]}).sort();dojo.forEach(g,function(a){d(a,c.get(a),c)});return a},_renderSeqQual:function(b){var c=b.get("seq"),b=b.get("qual")||"";if(!c)return"";for(var b=b.split(/\s+/),a="",d=0;d<c.length;d++)a+='<div class="basePosition" title="position '+(d+1)+'"><span class="seq">'+c[d]+"</span>",b[d]&&(a+='<span class="qual">'+b[d]+"</span>"),a+="</div>";return'<div class="baseQuality">'+a+"</div>"},_getStyleSheets:function(b){var c=[];j.forEach(b,function(a){c.push(a);
  j.forEach(a.cssRules||a.rules,function(a){a.styleSheet&&c.push.apply(c,this._getStyleSheets([a.styleSheet]))},this)},this);return c},colorForBase:function(b){this._baseStyles=this._baseStyles||function(){var b={};try{var a=this._getStyleSheets(document.styleSheets);j.forEach(a,function(a){(a=a.rules||a.cssRules)&&j.forEach(a,function(a){var c=/^\.base_([^\s_]+)$/.exec(a.selectorText);if(c&&c[1]){var d=c[1];if((c=/\#[0-9a-f]{3,6}|(?:rgb|hsl)a?\([^\)]*\)/gi.exec(a.cssText))&&c[0])b[d.toLowerCase()]=
  c[0],b[d.toUpperCase()]=c[0]}})})}catch(c){}return b}.call(this);return this._baseStyles[b]||"#999"},_getNamedFeatureFilters:function(){return h.mixin({},this.inherited(arguments),{hideDuplicateReads:{desc:"Hide PCR/Optical duplicate reads",func:function(b){return!b.get("duplicate")}},hideQCFailingReads:{desc:"Hide reads failing vendor QC",func:function(b){return!b.get("qc_failed")}},hideSecondary:{desc:"Hide secondary alignments",func:function(b){return!b.get("secondary_alignment")}},hideSupplementary:{desc:"Hide supplementary alignments",
  func:function(b){return!b.get("supplementary_alignment")}},hideMissingMatepairs:{desc:"Hide reads with missing mate pairs",func:function(b){return!(b.get("multi_segment_template")&&!b.get("multi_segment_all_aligned"))}},hideUnmapped:{desc:"Hide unmapped reads",func:function(b){return!b.get("unmapped")}},hideForwardStrand:{desc:"Hide reads aligned to the forward strand",func:function(b){return 1!=b.get("strand")}},hideReverseStrand:{desc:"Hide reads aligned to the reverse strand",func:function(b){return-1!=
  b.get("strand")}}})},_alignmentsFilterTrackMenuOptions:function(){var b=this;return g(this._getNamedFeatureFilters()).then(function(c){return b._makeFeatureFilterTrackMenuItems("hideDuplicateReads,hideQCFailingReads,hideMissingMatepairs,hideSecondary,hideSupplementary,hideUnmapped,SEPARATOR,hideForwardStrand,hideReverseStrand".split(","),c)})}})})},"JBrowse/Store/SeqFeature/_MismatchesMixin":function(){define(["dojo/_base/declare","dojo/_base/array"],function(i,j){return i(null,{constructor:function(){this.cigarAttributeName=
  (this.config.cigarAttribute||"cigar").toLowerCase();this.mdAttributeName=(this.config.mdAttribute||"md").toLowerCase()},_getSkipsAndDeletions:function(h){var g=h.get(this.cigarAttributeName);return g?this._cigarToSkipsAndDeletions(h,this._parseCigar(g)):[]},_getMismatches:function(h){var g=[],e=h.get(this.cigarAttributeName),d;e&&(d=this._parseCigar(e),g.push.apply(g,this._cigarToMismatches(h,d)));(e=h.get(this.mdAttributeName))&&g.push.apply(g,this._mdToMismatches(h,e,d,g));var c={};return g=j.filter(g,
  function(b){var b=b.type+","+b.start+","+b.length,d=c[b];c[b]=!0;return!d})},_parseCigar:function(h){return j.map(h.toUpperCase().match(/\d+\D/g),function(g){return[g.match(/\D/)[0],parseInt(g)]})},_cigarToMismatches:function(h,g){var e=0,d=[];j.forEach(g,function(c){var b=c[0],c=c[1];"I"==b?d.push({start:e,type:"insertion",base:""+c,length:1}):"D"==b?d.push({start:e,type:"deletion",base:"*",length:c}):"N"==b?d.push({start:e,type:"skip",base:"N",length:c}):"X"==b?d.push({start:e,type:"mismatch",base:"X",
  length:c}):"H"==b?d.push({start:e,type:"hardclip",base:"H"+c,length:1}):"S"==b&&d.push({start:e,type:"softclip",base:"S"+c,length:1});"I"!=b&&"S"!=b&&"H"!=b&&(e+=c)});return d},_cigarToSkipsAndDeletions:function(h,g){var e=0,d=[];j.forEach(g,function(c){var b=c[0],c=c[1];"D"==b?d.push({start:e,type:"deletion",base:"*",length:c}):"N"==b&&d.push({start:e,type:"skip",base:"N",length:c});"I"!=b&&"S"!=b&&"H"!=b&&(e+=c)});return d},_mdToMismatches:function(h,g,e,d){function c(a,b){for(var c=0,d=0,e=0;e<
  b.length&&d<=a;e++){var f=b[e][0],g=b[e][1];"S"==f||"I"==f?c+=g:("D"==f||"P"==f||(c+=g),d+=g)}return c-(d-a)}function b(){j.forEach(d||[],function(b){"skip"==b.type&&a.start>=b.start&&(a.start+=b.length)});f.push(a);a={start:a.start+a.length,length:0,base:"",type:"mismatch"}}var f=[],a={start:0,base:"",length:0,type:"mismatch"},i=h.get("seq");j.forEach(g.match(/(\d+|\^[a-z]+|[a-z])/ig),function(d){if(d.match(/^\d/))a.start+=parseInt(d);else if(d.match(/^\^/))a.length=d.length-1,a.base="*",a.type=
  "deletion",b();else if(d.match(/^[a-z]/i))for(var f=0;f<d.length;f++)a.length=1,a.base=i?i.substr(e?c(a.start,e):a.start,1):"X",b()});return f}})})},"JBrowse/View/Track/_NamedFeatureFiltersMixin":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/when"],function(i,j,h){return i(null,{constructor:function(){this._initializeConfiguredFeatureFilters()},_initializeConfiguredFeatureFilters:function(){var g=this;return h(this._getNamedFeatureFilters()).then(function(e){for(var d in e)g.config[d]?
  g.addFeatureFilter(e[d].func,d):g.removeFeatureFilter(d)})},_toggleFeatureFilter:function(g,e){void 0===e&&(e=!this.config[g]);if(!!e!==!!this.config[g]){this.config[g]=e;var d=this;h(this._getNamedFeatureFilters(),function(c){e?d.addFeatureFilter(c[g].func,g):d.removeFeatureFilter(g);d.changed()})}},_getNamedFeatureFilters:function(){return{}},_makeFeatureFilterTrackMenuItems:function(g,e){var d=this;return h(e||this._getNamedFeatureFilters()).then(function(c){return j.map(g,function(b){return d._makeFeatureFilterTrackMenuItem(b,
  c[b])})})},_makeFeatureFilterTrackMenuItem:function(g,e){var d=this;return"SEPARATOR"==g?{type:"dijit/MenuSeparator"}:{label:e.desc,title:e.title,type:"dijit/CheckedMenuItem",checked:!!d.config[g],onClick:function(){d._toggleFeatureFilter(g,this.checked)}}}})})},"JBrowse/View/Track/Alignments2":function(){define("dojo/_base/declare,dojo/_base/array,dojo/promise/all,JBrowse/Util,JBrowse/View/Track/CanvasFeatures,JBrowse/View/Track/_AlignmentsMixin".split(","),function(i,j,h,g,e,d){return i([e,d],{_defaultConfig:function(){var c=
  g.deepUpdate(dojo.clone(this.inherited(arguments)),{glyph:"JBrowse/View/FeatureGlyph/Alignment",maxFeatureGlyphExpansion:0,maxFeatureScreenDensity:6,hideDuplicateReads:!0,hideQCFailingReads:!0,hideSecondary:!0,hideSupplementary:!0,hideUnmapped:!0,hideMissingMatepairs:!1,hideForwardStrand:!1,hideReverseStrand:!1,useXS:!1,useReverseTemplate:!1,useXSOption:!0,useReverseTemplateOption:!0,histograms:{description:"coverage depth",binsPerBlock:200},style:{showLabels:!1}});c.menuTemplate.push({iconClass:"dijitIconUndo",
  url:function(b,c){return b.browser.makeCurrentViewURL({loc:b._nextSegmentViewLoc(c,0.8),highlight:c.get("next_segment_position"),tracklist:0})},action:"iframeDialog",title:"Open {next_segment_position} in a popup",disabled:function(b,c){return!c.get("next_segment_position")},label:"Quick-view mate/next location"},{iconClass:"dijitIconUndo",url:function(b,c){return b.browser.makeCurrentViewURL({loc:b._nextSegmentViewLoc(c),highlight:c.get("next_segment_position")})},action:"newWindow",title:"Open {next_segment_position} in a new tab",
  disabled:function(b,c){return!c.get("next_segment_position")},label:"Open mate/next location in new tab"});return c},_nextSegmentViewLoc:function(c,b){var d=c.get("next_segment_position");if(d){var a=d.split(":"),d=a[0],a=parseInt(a[1]),e=this.browser.view.visibleRegion(),e=Math.round((e.end-e.start+1)*(b||1));return g.assembleLocString({start:Math.round(a-e/2),end:Math.round(a+e/2),ref:d})}},_trackMenuOptions:function(){var c=this,b=[];this.config.useReverseTemplateOption&&b.push({label:"Use reversed template",
  type:"dijit/CheckedMenuItem",checked:this.config.useReverseTemplate,onClick:function(){c.config.useReverseTemplate=this.get("checked");c.browser.publish("/jbrowse/v1/v/tracks/replace",[c.config])}});this.config.useXSOption&&b.push({label:"Use XS",type:"dijit/CheckedMenuItem",checked:this.config.useXS,onClick:function(){c.config.useXS=this.get("checked");c.browser.publish("/jbrowse/v1/v/tracks/replace",[c.config])}});return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions(),b]).then(function(b){var a=
  b.shift();b.unshift({type:"dijit/MenuSeparator"});return a.concat.apply(a,b)})}})})},"JBrowse/View/Track/CanvasFeatures":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,dojo/_base/event,dojo/mouse,dojo/dom-construct,dojo/Deferred,dojo/on,JBrowse/has,JBrowse/Util,JBrowse/View/GranularRectLayout,JBrowse/View/Track/BlockBased,JBrowse/View/Track/_ExportMixin,JBrowse/Errors,JBrowse/View/Track/_FeatureDetailMixin,JBrowse/View/Track/_FeatureContextMenusMixin,JBrowse/View/Track/_YScaleMixin,JBrowse/Model/Location,JBrowse/Model/SimpleFeature".split(","),
  function(i,j,h,g,e,d,c,b,f,a,k,n,r,m,l,p,q,s,u){var v=i(null,{constructor:function(a){this.dims={h:a.h,w:a.w};this.byID={}},getByID:function(a){return this.byID[a]},addAll:function(a){var b=this.byID;j.forEach(a,function(a){a&&(b[a.f.id()]=a)},this)},getAll:function(){var a=[],b;for(b in this.byID)a.push(this.byID[b]);return a}});return i([n,l,r,p,q],{constructor:function(){this.glyphsLoaded={};this.glyphsBeingLoaded={};this.regionStats={};this.showLabels=this.config.style.showLabels;this.showTooltips=
  this.config.style.showTooltips;this.displayMode=this.config.displayMode;var a=this.browser.cookie("track-"+this.name);if(a)this.displayMode=a;this._setupEventHandlers()},_defaultConfig:function(){return a.deepUpdate(h.clone(this.inherited(arguments)),{maxFeatureScreenDensity:0.5,glyph:h.hitch(this,"guessGlyphType"),maxFeatureGlyphExpansion:500,maxHeight:600,histograms:{description:"feature density",min:0,height:100,color:"goldenrod",clip_marker_color:"red"},style:{_defaultHistScale:4,_defaultLabelScale:30,
  _defaultDescriptionScale:120,showLabels:!0,showTooltips:!0,label:"name,id",description:"note, description"},displayMode:"normal",events:{contextmenu:function(a,b,c,d,e){e=g.fix(e);b&&b.contextMenu&&b.contextMenu._openMyself({target:c.featureCanvas,coords:{x:e.pageX,y:e.pageY}});g.stop(e)}},menuTemplate:[{label:"View details",title:"{type} {name}",action:"contentDialog",iconClass:"dijitIconTask",content:dojo.hitch(this,"defaultFeatureDetail")},{label:function(){return"Zoom to this "+(this.feature.get("type")||
  "feature")},action:function(){var a=this.track.refSeq,b=Math.round(10/this.viewInfo.scale),c=Math.max(a.start,this.feature.get("start")-b),b=Math.min(a.end,this.feature.get("end")+b);this.track.genomeView.setLocation(a,c,b)},iconClass:"dijitIconConnector"},{label:function(){return"Highlight this "+(this.feature.get("type")||"feature")},action:function(){this.track.browser.setHighlightAndRedraw(new s({feature:this.feature,tracks:[this.track]}))},iconClass:"dijitIconFilter"}]})},setViewInfo:function(a,
  b,c,e,f,g,h){this.inherited(arguments);this.staticCanvas=d.create("canvas",{style:{height:"100%",cursor:"default",position:"absolute",zIndex:15}},e);this.staticCanvas.height=this.staticCanvas.offsetHeight;this._makeLabelTooltip()},guessGlyphType:function(a){return"JBrowse/View/FeatureGlyph/"+({gene:"Gene",mRNA:"ProcessedTranscript",transcript:"ProcessedTranscript"}[a.get("type")]||"Box")},fillBlock:function(a){var b=a.blockIndex,c=a.block,d=a.scale;f("canvas")?this.store.getGlobalStats(h.hitch(this,
  function(e){e=h.mixin({stats:e,displayMode:this.displayMode,showFeatures:d>=(this.config.style.featureScale||(e.featureDensity||0)/this.config.maxFeatureScreenDensity),showLabels:this.showLabels&&"normal"==this.displayMode&&d>=(this.config.style.labelScale||(e.featureDensity||0)*this.config.style._defaultLabelScale),showDescriptions:this.showLabels&&"normal"==this.displayMode&&d>=(this.config.style.descriptionScale||(e.featureDensity||0)*this.config.style._defaultDescriptionScale)},a);e.showFeatures?
  (this.setLabel(this.key),this.removeYScale(),this.fillFeatures(e)):this.config.histograms.store||this.store.getRegionFeatureDensities?this.fillHistograms(e):(this.setLabel(this.key),this.fillTooManyFeaturesMessage(b,c,d),a.finishCallback())}),dojo.hitch(this,function(b){this._handleError(b,a);a.finishCallback(b)})):(this.fatalError="This browser does not support HTML canvas elements.",this.fillBlockError(b,c,this.fatalError))},_handleError:function(a,b){"object"==typeof a&&a instanceof m.DataOverflow&&
  (this.config.histograms.store||this.store.getRegionFeatureDensities)?this.fillHistograms(b):this.inherited(arguments)},_getLayout:function(a){if(!this.layout||this._layoutpitchX!=4/a){var b=this.getConf("layoutPitchY")||4;this.layout=new k({pitchX:4/a,pitchY:b,maxHeight:this.getConf("maxHeight"),displayMode:this.displayMode});this._layoutpitchX=4/a}return this.layout},_clearLayout:function(){delete this.layout},hideAll:function(){this._clearLayout();return this.inherited(arguments)},getGlyph:function(a,
  b,c){var d=this.getConfForFeature("glyph",b),e;if(e=this.glyphsLoaded[d])c(e);else if(a=this.glyphsBeingLoaded[d])a.push(c);else{var f=this;this.glyphsBeingLoaded[d]=[c];require([d],function(a){e=f.glyphsLoaded[d]=new a({track:f,config:f.config,browser:f.browser});j.forEach(f.glyphsBeingLoaded[d],function(a){a(e)});delete f.glyphsBeingLoaded[d]})}},fillHistograms:function(a){this.config.histograms.description?this.setLabel(this.key+' <span class="feature-density">('+this.config.histograms.description+
  ")</span>"):this.setLabel(this.key);var b=this.config.histograms.binsPerBlock||25,b=Math.abs(a.rightBase-a.leftBase)/b,c={ref:this.refSeq.name,start:a.leftBase,end:a.rightBase,basesPerSpan:b,basesPerBin:b};if(this.store.getRegionFeatureDensities)this.store.getRegionFeatureDensities(c,h.hitch(this,"_drawHistograms",a));else{var d=this,e={features:[],stats:{}},f=h.hitch(this,"_handleError");this.browser.getStore(this.config.histograms.store,function(b){b.getGlobalStats(function(g){e.stats.max=g.scoreMax;
  b.getFeatures(c,function(a){e.features.push(a)},function(){d._drawHistograms(a,e);a.finishCallback()},f)},f)})}},_drawHistograms:function(b,c){var e="max"in this.config.histograms?this.config.histograms.max:c.stats.max;if(void 0===e)console.warn("no stats.max in hist data, not drawing histogram for block "+b.blockIndex);else{var f;if((f=c.features)||c.bins&&(f=this._histBinsToFeatures(b,c))){var g=b.block,h=this.config.histograms.height,i=b.scale,j=b.leftBase,k=this.config.histograms.min;d.empty(g.domNode);
  var l=g.featureCanvas=d.create("canvas",{height:h,width:g.domNode.offsetWidth+1,style:{cursor:"default",height:h+"px",position:"absolute"},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track canvas-track-histograms"},g.domNode);this.heightUpdate(h,b.blockIndex);var g=l.getContext("2d"),n=a.getResolution(g,this.browser.config.highResolutionMode);if("disabled"!=this.browser.config.highResolutionMode&&1<=n){var m=l.width,p=l.height;l.width=m*n;l.height=p*n;l.style.width=
  m+"px";l.style.height=p+"px";g.scale(n,n)}g.fillStyle=this.config.histograms.color;for(l=0;l<f.length;l++)if(p=f[l],n=p.get("score")/e*h,m=Math.ceil((p.get("end")-p.get("start"))*i),p=Math.round((p.get("start")-j)*i),g.fillRect(p,h-n,m,n),n>h)g.fillStyle=this.config.histograms.clip_marker_color,g.fillRect(p,0,m,3),g.fillStyle=this.config.histograms.color;this.makeHistogramYScale(h,k,e)}}},_histBinsToFeatures:function(a,b){var c=parseFloat(b.stats.basesPerBin),d=a.leftBase;return j.map(b.bins,function(a,
  b){return new u({data:{start:d+b*c,end:d+(b+1)*c,score:a}})})},makeHistogramYScale:function(a,b,c){if(!this.yscale_params||!(this.yscale_params.height==a&&this.yscale_params.max==c&&this.yscale_params.min==b))this.yscale_params={height:a,min:b,max:c},this.makeYScale({min:b,max:c})},fillFeatures:function(b){var e=this,f=b.blockIndex,g=b.block,h=g.domNode.offsetWidth,i=b.scale,j=b.leftBase,k=b.rightBase,l=b.finishCallback,n=[],m=0,p=new c,r=!1,q=dojo.hitch(e,function(a){this._handleError(a,b);l(a)}),
  s=this._getLayout(i),i=Math.round(this.config.maxFeatureGlyphExpansion/i);this.store.getFeatures({ref:this.refSeq.name,start:Math.max(0,j-i),end:k+i},function(a){if(!e.destroyed&&e.filterFeature(a)){n.push(null);m++;var c=n.length-1;e.getGlyph(b,a,function(d){d=d.layoutFeature(b,s,a);null===d?g.maxHeightExceeded=!0:d.l>=h||0>d.l+d.w||(n[c]=d);!--m&&r&&p.resolve()},q)}},function(){e.destroyed||(r=!0,!m&&!p.isFulfilled()&&p.resolve(),p.then(function(){var c=s.getTotalHeight(),h=g.featureCanvas=d.create("canvas",
  {height:c,width:g.domNode.offsetWidth+1,style:{cursor:"default",height:c+"px",position:"absolute"},innerHTML:"Your web browser cannot display this type of track.",className:"canvas-track"},g.domNode),i=h.getContext("2d"),j=a.getResolution(i,e.browser.config.highResolutionMode);if("disabled"!=e.browser.config.highResolutionMode&&1<=j){var k=h.width,m=h.height;h.width=k*j;h.height=m*j;h.style.width=k+"px";h.style.height=m+"px";i.scale(j,j)}g.maxHeightExceeded&&e.markBlockHeightOverflow(g);e.heightUpdate(c,
  f);e.renderFeatures(b,n);e.renderClickMap(b,n);l()}))},q)},startZoom:function(){this.inherited(arguments);j.forEach(this.blocks,function(a){try{a.featureCanvas.style.width="100%"}catch(b){}})},endZoom:function(){j.forEach(this.blocks,function(a){try{delete a.featureCanvas.style.width}catch(b){}});this.clear();this.inherited(arguments)},renderClickMap:function(a,b){var c=a.block,d=new v({h:c.featureCanvas.height,w:c.featureCanvas.width});c.fRectIndex=d;d.addAll(b);!c.featureCanvas||!c.featureCanvas.getContext("2d")?
  console.warn("No 2d context available from canvas"):(this._attachMouseOverEvents(),this._connectEventHandlers(c),this.updateStaticElements({x:this.browser.view.getX()}))},_attachMouseOverEvents:function(){var a=this.browser.view,c=this;if("collapsed"==this.displayMode)this._mouseoverEvent&&(this._mouseoverEvent.remove(),delete this._mouseoverEvent),this._mouseoutEvent&&(this._mouseoutEvent.remove(),delete this._mouseoutEvent);else{if(!this._mouseoverEvent)this._mouseoverEvent=this.own(b(this.staticCanvas,
  "mousemove",function(b){var b=g.fix(b),d=a.absXtoBp(b.clientX),d=c.layout.getByCoord(d,void 0===b.offsetY?b.layerY:b.offsetY);c.mouseoverFeature(d,b)}))[0];if(!this._mouseoutEvent)this._mouseoutEvent=this.own(b(this.staticCanvas,"mouseout",function(){c.mouseoverFeature(void 0)}))[0]}},_makeLabelTooltip:function(){if(this.showTooltips&&!this.labelTooltip){var a=this.labelTooltip=d.create("div",{className:"featureTooltip",style:{position:"fixed",display:"none",zIndex:19}},document.body);d.create("span",
  {className:"tooltipLabel",style:{display:"block"}},a);d.create("span",{className:"tooltipDescription",style:{display:"block"}},a)}},_connectEventHandlers:function(a){for(var c in this.eventHandlers)(function(c,d){var e=this;a.own(b(this.staticCanvas,c,function(b){var b=g.fix(b),c=e.browser.view.absXtoBp(b.clientX);if(a.containsBp(c)&&(c=e.layout.getByCoord(c,void 0===b.offsetY?b.layerY:b.offsetY))){var f=a.fRectIndex.getByID(c.id());d.call({track:e,feature:c,fRect:f,block:a,callbackArgs:[e,c,f]},
  c,f,a,e,b)}}))}).call(this,c,this.eventHandlers[c])},getRenderingContext:function(a){if(!a.block||!a.block.featureCanvas)return null;try{return a.block.featureCanvas.getContext("2d")}catch(b){return console.error(b,b.stack),null}},renderFeatures:function(a,b){var c=this.getRenderingContext(a);if(c){var d=this;j.forEach(b,function(a){a&&d.renderFeature(c,a)})}},mouseoverFeature:function(a,b){if(this.lastMouseover!=a){if(b)var c=this.browser.view.absXtoBp(b.clientX);if(this.labelTooltip)this.labelTooltip.style.display=
  "none";j.forEach(this.blocks,function(d){if(d){var e=this.getRenderingContext({block:d,leftBase:d.startBase,scale:d.scale});if(e){if(this.lastMouseover&&d.fRectIndex){var f=d.fRectIndex.getByID(this.lastMouseover.id());f&&this.renderFeature(e,f)}d.tooltipTimeout&&window.clearTimeout(d.tooltipTimeout);if(a){var g=d.fRectIndex&&d.fRectIndex.getByID(a.id());if(g){if(d.containsBp(c))f=dojo.hitch(this,function(){if(this.labelTooltip){var c=g.label||g.glyph.makeFeatureLabel(a),d=g.description||g.glyph.makeFeatureDescriptionLabel(a);
  if(c||d){if(!this.ignoreTooltipTimeout)this.labelTooltip.style.left=b.clientX+"px",this.labelTooltip.style.top=b.clientY+15+"px";this.ignoreTooltipTimeout=!0;this.labelTooltip.style.display="block";var e=this.labelTooltip.childNodes[0],f=this.labelTooltip.childNodes[1];this.config.onClick&&this.config.onClick.label?(d=h.mixin({track:this,feature:a,callbackArgs:[this,a]}),e.style.display="block",e.style.font=c.font,e.style.color=c.fill,e.innerHTML=this.template(a,this._evalConf(d,this.config.onClick.label,
  "label"))):(c?(e.style.display="block",e.style.font=c.font,e.style.color=c.fill,e.innerHTML=c.text):(e.style.display="none",e.innerHTML="(no label)"),d?(f.style.display="block",f.style.font=d.font,f.style.color=d.fill,f.innerHTML=d.text):(f.style.display="none",f.innerHTML="(no description)"))}}}),this.ignoreTooltipTimeout?f():d.tooltipTimeout=window.setTimeout(f,600);g.glyph.mouseoverFeature(e,g);this._refreshContextMenu(g)}}else d.tooltipTimeout=window.setTimeout(dojo.hitch(this,function(){this.ignoreTooltipTimeout=
  !1}),200)}}},this);this.lastMouseover=a}},cleanupBlock:function(a){this.inherited(arguments);a&&this.layout&&this.layout.discardRange(a.startBase,a.endBase)},renderFeature:function(a,b){b.glyph.renderFeature(a,b)},_trackMenuOptions:function(){var a=this.inherited(arguments),b=this;this.displayModeMenuItems=["normal","compact","collapsed"].map(function(a){return{label:a,type:"dijit/CheckedMenuItem",title:"Render this track in "+a+" mode",checked:b.displayMode==a,onClick:function(){b.displayMode=a;
  b._clearLayout();b.hideAll();b.genomeView.showVisibleBlocks(!0);b.makeTrackMenu();b.browser.cookie("track-"+b.name,b.displayMode)}}});dojo.hitch(this,function(){for(var a in this.displayModeMenuItems)this.displayModeMenuItems[a].checked=this.displayMode==this.displayModeMenuItems[a].label});a.push.apply(a,[{type:"dijit/MenuSeparator"},{label:"Display mode",iconClass:"dijitIconPackage",title:"Make features take up more or less space",children:this.displayModeMenuItems},{label:"Show labels",type:"dijit/CheckedMenuItem",
  checked:!!("showLabels"in this?this.showLabels:this.config.style.showLabels),onClick:function(){b.showLabels=this.checked;b.changed()}}]);return a},_exportFormats:function(){return[{name:"GFF3",label:"GFF3",fileExt:"gff3"},{name:"BED",label:"BED",fileExt:"bed"},{name:"SequinTable",label:"Sequin Table",fileExt:"sqn"}]},updateStaticElements:function(a){this.inherited(arguments);this.updateYScaleFromViewDimensions(a);if(a.hasOwnProperty("x")){var b=this.staticCanvas.getContext("2d");this.staticCanvas.width=
  this.browser.view.elem.clientWidth;this.staticCanvas.style.left=a.x+"px";b.clearRect(0,0,this.staticCanvas.width,this.staticCanvas.height);var c=this.browser.view.minVisible(),d=this.browser.view.maxVisible(),e={minVisible:c,maxVisible:d,bpToPx:dojo.hitch(this.browser.view,"bpToPx"),lWidth:this.label.offsetWidth};j.forEach(this.blocks,function(a){if(a&&a.fRectIndex){var a=a.fRectIndex.byID,c;for(c in a){var d=a[c];d.glyph.updateStaticElements(b,d,e)}}},this)}},heightUpdate:function(a,b){this.inherited(arguments);
  if(this.staticCanvas)this.staticCanvas.height=this.staticCanvas.offsetHeight},destroy:function(){this.destroyed=!0;d.destroy(this.staticCanvas);delete this.staticCanvas;delete this.layout;delete this.glyphsLoaded;this.inherited(arguments)}})})},"JBrowse/View/FeatureGlyph":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/aspect","JBrowse/Component"],function(i,j,h,g){return i(g,{constructor:function(e){this.track=e.track;this.booleanAlpha=0.17;h.before(this,"renderFeature",function(d,
  c){if(c.m){var b=Math.floor(c.l),e=Math.ceil(c.w+c.l)-b;c.m.sort(function(a,b){return a.l-b.l});var a=c.m[0];if(a.l<=b){var g=c.m[0].l,h;for(h in c.m){a=c.m[h];if(a.l>g)break;g=a.l+a.w}if(g>=b+e)d.globalAlpha=this.booleanAlpha,c.noMask=!0}}},!0);h.after(this,"renderFeature",function(d,c){if(c.m&&!c.noMask)this.maskBySpans(d,c);else if(c.noMask)delete c.noMask,d.globalAlpha=1},!0)},getStyle:function(e,d){return this.getConfForFeature("style."+d,e)},getConfForFeature:function(e,d){return this.getConf(e,
  [d,e,this,this.track])},mouseoverFeature:function(e,d){this.renderFeature(e,d);e.fillStyle=this.getStyle(d.f,"mouseovercolor");e.fillRect(d.rect.l,d.t,d.rect.w,d.rect.h)},_getFeatureRectangle:function(e,d){var c=e.block,b={l:c.bpToX(d.get("start")),h:this._getFeatureHeight(viewArgs,d),viewInfo:e,f:d,glyph:this};b.w=c.bpToX(d.get("end"))-b.l;this._addMasksToRect(e,d,b)},_addMasksToRect:function(e,d,c){var b=e.block;if(d.masks)c.m=[],j.forEach(d.masks,function(d){var a={l:b.bpToX(d.start)};a.w=b.bpToX(d.end)-
  a.l;c.m.push(a)});return c},layoutFeature:function(e,d,c){var b=this._getFeatureRectangle(e,c),f=e.scale,a=e.leftBase,e=b.l/f+a,f=(b.l+b.w)/f+a;b.t=d.addRect(c.id(),e,f,b.h,c);if(null===b.t)return null;b.f=c;return b},renderFeature:function(){},maskBySpans:function(e,d){var c=this,b=dojo.create("canvas",{height:e.canvas.height,width:e.canvas.width}),f=b.getContext("2d"),a=Math.floor(d.l),g=Math.ceil(d.w+d.l)-a;j.forEach(d.m,function(h){try{if(h.l<a)h.w+=h.l-a,h.l=a;if(h.w>g)h.w=g;if(0>h.l)h.w+=h.l,
  h.l=0;if(h.l+h.w>a+g)h.w=g+a-h.l;if(h.l+h.w>e.canvas.width)h.w=e.canvas.width-h.l;f.drawImage(e.canvas,h.l,d.t,h.w,d.h,h.l,d.t,h.w,d.h);e.globalAlpha=c.booleanAlpha;e.clearRect(h.l,d.t,h.w,d.h);e.drawImage(b,h.l,d.t,h.w,d.h,h.l,d.t,h.w,d.h);e.globalAlpha=1}catch(i){}})},_getFeatureHeight:function(e,d){return this.getStyle(d,"height")},updateStaticElements:function(){}})})},"JBrowse/View/FeatureGlyph/Box":function(){define("dojo/_base/declare,dojo/_base/array,dojo/_base/lang,JBrowse/Util/FastPromise,JBrowse/View/FeatureGlyph,./_FeatureLabelMixin".split(","),
  function(i,j,h,g,e,d){return i([e,d],{constructor:function(){this._embeddedImagePromises={}},_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{maxDescriptionLength:70,color:"goldenrod",mouseovercolor:"rgba(0,0,0,0.3)",borderColor:null,borderWidth:0.5,height:11,marginBottom:2,strandArrow:!0,label:"name, id",textFont:"normal 12px Univers,Helvetica,Arial,sans-serif",textColor:"black",text2Color:"blue",text2Font:"normal 12px Univers,Helvetica,Arial,sans-serif",description:"note, description"}})},
  _getFeatureHeight:function(c,b){var d=this.getStyle(b,"height");"compact"==c.displayMode&&(d=Math.round(0.45*d));if(this.getStyle(b,"strandArrow")){var a=b.get("strand");1==a?d=Math.max(this._embeddedImages.plusArrow.height,d):-1==a&&(d=Math.max(this._embeddedImages.minusArrow.height,d))}return d},_getFeatureRectangle:function(c,b){var d=c.block,a={l:d.bpToX(b.get("start")),h:this._getFeatureHeight(c,b),viewInfo:c,f:b,glyph:this};a.w=d.bpToX(b.get("end"))-a.l;a.rect={l:a.l,h:a.h,w:Math.max(a.w,2),
  t:0};a.w=a.rect.w;"compact"!=c.displayMode&&(a.h+=this.getStyle(b,"marginBottom")||0);if(this.getStyle(b,"strandArrow"))-1==(a.strandArrow=b.get("strand"))?(d=this._embeddedImages.minusArrow,a.w+=d.width,a.l-=d.width):(d=this._embeddedImages.plusArrow,a.w+=d.width);if("collapsed"==c.displayMode)return a;this._expandRectangleWithLabels(c,b,a);this._addMasksToRect(c,b,a);return a},layoutFeature:function(c,b,d){var a=this.inherited(arguments);if(!a)return a;a.rect.t=a.t;return a},_expandRectangleWithLabels:function(c,
  b,d){if(c.showLabels){var a=this.makeFeatureLabel(b,d);if(a)d.h+=a.h,d.w=Math.max(a.w,d.w),d.label=a,a.yOffset=d.rect.h+a.h}if(c.showDescriptions&&(c=this.makeFeatureDescriptionLabel(b,d)))d.description=c,d.h+=c.h,d.w=Math.max(c.w,d.w),c.yOffset=d.h-(this.getStyle(b,"marginBottom")||0)},_embeddedImages:{plusArrow:{data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAATUlEQVQIW2NkwATGQKFYIG4A4g8gacb///+7AWlBmNq+vj6V4uLiJiD/FRBXA/F8xu7u7kcVFRWyMEVATQz//v0Dcf9CxaYRZxIxbgIARiAhmifVe8UAAAAASUVORK5CYII=",
  width:9,height:5},minusArrow:{data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAASklEQVQIW2NkQAABILMBiBcD8VkkcQZGIAeEE4G4FYjFent764qKiu4gKXoPUjAJiLOggsxMTEwMjIwgYQjo6Oh4TLRJME043QQA+W8UD/sdk9IAAAAASUVORK5CYII=",width:9,height:5}},getEmbeddedImage:function(c){return this._embeddedImagePromises[c]||function(){var b=new g,d=this._embeddedImages[c];if(d){var a=new Image;a.onload=function(){b.resolve(this)};a.src=d.data}else b.resolve(null);return this._embeddedImagePromises[c]=
  b}.call(this)},renderFeature:function(c,b){"collapsed"!=this.track.displayMode&&c.clearRect(Math.floor(b.l),b.t,Math.ceil(b.w-Math.floor(b.l)+b.l),b.h);this.renderBox(c,b.viewInfo,b.f,b.t,b.rect.h,b.f);this.renderLabel(c,b);this.renderDescription(c,b);this.renderArrowhead(c,b)},renderBox:function(c,b,d,a,e,g,i){var g=b.block.bpToX(d.get("start")),j=b.block.bpToX(d.get("end"))-g,i=i||h.hitch(this,"getStyle");if(b=this._getFeatureHeight(b,d)){b!=e&&(a+=Math.round((e-b)/2));(e=i(d,"color"))?(c.fillStyle=
  e,c.fillRect(g,a,Math.max(1,j),b)):c.clearRect(g,a,Math.max(1,j),b);var l;if((e=i(d,"borderColor"))&&(l=i(d,"borderWidth")))3<j?(c.lineWidth=l,c.strokeStyle=e,c.strokeRect(g+l/2,a+l/2,j-l,b-l)):(c.globalAlpha=2*l/j,c.fillStyle=e,c.fillRect(g,a,Math.max(1,j),b),c.globalAlpha=1)}},renderLabel:function(c,b){if(b.label)c.font=b.label.font,c.fillStyle=b.label.fill,c.textBaseline=b.label.baseline,c.fillText(b.label.text,b.l+(b.label.xOffset||0),b.t+(b.label.yOffset||0))},renderDescription:function(c,b){if(b.description)c.font=
  b.description.font,c.fillStyle=b.description.fill,c.textBaseline=b.description.baseline,c.fillText(b.description.text,b.l+(b.description.xOffset||0),b.t+(b.description.yOffset||0))},renderArrowhead:function(c,b){b.strandArrow&&(1==b.strandArrow&&b.rect.l+b.rect.w<=c.canvas.width?this.getEmbeddedImage("plusArrow").then(function(d){c.imageSmoothingEnabled=!1;c.drawImage(d,b.rect.l+b.rect.w,b.t+(b.rect.h-d.height)/2)}):-1==b.strandArrow&&0<=b.rect.l&&this.getEmbeddedImage("minusArrow").then(function(d){c.imageSmoothingEnabled=
  !1;c.drawImage(d,b.rect.l-9,b.t+(b.rect.h-d.height)/2)}))},updateStaticElements:function(c,b,d){var a=d.minVisible,e=d.maxVisible,g=b.viewInfo.block;if(g.containsBp(a)||g.containsBp(e)){var h=d.bpToPx,g=b.f,d=g.get("start"),g=g.get("end");b.strandArrow&&(1==b.strandArrow&&g>=e&&d<=e?this.getEmbeddedImage("plusArrow").then(function(d){c.imageSmoothingEnabled=!1;c.drawImage(d,h(e)-h(a)-9,b.t+(b.rect.h-d.height)/2)}):-1==b.strandArrow&&d<=a&&g>=a&&this.getEmbeddedImage("minusArrow").then(function(a){c.imageSmoothingEnabled=
  !1;c.drawImage(a,0,b.t+(b.rect.h-a.height)/2)}));var i=b.label?b.label.w:0,j=b.description?b.description.w:0;h(g);Math.max(i,j);h(a);h(d);h(a)}}})})},"JBrowse/Util/FastPromise":function(){define([],function(){var i=function(){this.callbacks=[]};i.prototype.then=function(i){"value"in this?i(this.value):this.callbacks.push(i)};i.prototype.resolve=function(i){this.value=i;i=this.callbacks;delete this.callbacks;for(var h=0;h<i.length;h++)i[h](this.value)};return i})},"JBrowse/View/FeatureGlyph/_FeatureLabelMixin":function(){define(["dojo/_base/declare",
  "dojo/_base/lang","JBrowse/View/_FeatureDescriptionMixin"],function(i,j,h){var g={};return i(h,{makeFeatureLabel:function(e,d){var c=this.getFeatureLabel(e);if(!c)return null;var b=this.getStyle(e,"textFont"),c=d?this.makeBottomOrTopLabel(c,b,d):this.makePopupLabel(c,b);c.fill=this.getStyle(e,"textColor");return c},makeFeatureDescriptionLabel:function(e,d){var c=this.getFeatureDescription(e);if(!c)return null;var b=this.getStyle(e,"text2Font"),c=d?this.makeBottomOrTopLabel(c,b,d):this.makePopupLabel(c,
  b);c.fill=this.getStyle(e,"text2Color");return c},makeSideLabel:function(e,d){if(!e)return null;var c=this.measureFont(d),b=Math.round((e.length*c.w-this.track.getConf("maxFeatureGlyphExpansion"))/c.w);0<b&&(e=e.slice(0,e.length-b-1)+"\u2026");return{text:e,font:d,baseline:"middle",w:c.w*e.length,h:c.h}},makeBottomOrTopLabel:function(e,d,c){if(!e)return null;var b=this.measureFont(d),c=Math.round((e.length*b.w-c.w-this.track.getConf("maxFeatureGlyphExpansion"))/b.w);0<c&&(e=e.slice(0,e.length-c-1)+
  "\u2026");return{text:e,font:d,baseline:"bottom",w:b.w*e.length,h:b.h}},makePopupLabel:function(e,d){if(!e)return null;var c=this.measureFont(d);return{text:e,font:d,w:c.w*e.length,h:c.h}},measureFont:function(e){var d;if(!(d=g[e]))d=document.createElement("canvas").getContext("2d"),d.font=e,d=d.measureText("MMMMMMMMMMMMXXXXXXXXXX1234567890-.CGCC12345"),d={h:d.height||parseInt(e.match(/(\d+)px/)[1]),w:d.width/43},d=g[e]=d;return d}})})},"JBrowse/View/FeatureGlyph/Segments":function(){define(["dojo/_base/declare",
  "dojo/_base/lang","dojo/_base/array","JBrowse/View/FeatureGlyph/Box"],function(i,j,h,g){return i(g,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{connectorColor:"#333",connectorThickness:1,borderColor:"rgba( 0, 0, 0, 0.3 )"},subParts:function(){return!0}})},renderFeature:function(e,d){"collapsed"!=this.track.displayMode&&e.clearRect(Math.floor(d.l),d.t,Math.ceil(d.w),d.h);this.renderConnector(e,d);this.renderSegments(e,d);this.renderLabel(e,d);this.renderDescription(e,
  d);this.renderArrowhead(e,d)},renderConnector:function(e,d){var c=this.getStyle(d.f,"connectorColor");if(c)e.fillStyle=c,c=this.getStyle(d.f,"connectorThickness"),e.fillRect(d.rect.l,Math.round(d.rect.t+(d.rect.h-c)/2),d.rect.w,c)},renderSegments:function(e,d){function c(b,c){return"height"==c?f._getFeatureHeight(d.viewInfo,b):f.getStyle(b,c)||f.getStyle(a,c)}var b=this._getSubparts(d.f);if(b.length)for(var f=this,a=d.f,g=0;g<b.length;++g)this.renderBox(e,d.viewInfo,b[g],d.t,d.rect.h,d.f,c)},_getSubparts:function(e){e=
  e.children();if(!e)return[];for(var d=[],c=0;c<e.length;c++)this._filterSubpart(e[c])&&d.push(e[c]);return d},_filterSubpart:function(e){return(this._subpartsFilter||(this._subpartsFilter=this._makeSubpartsFilter()))(e)},_makeSubpartsFilter:function(){var e=this.getConf("subParts");"string"==typeof e&&(e=e.split(/\s*,\s*/));return"object"==typeof e?(e=j.isArray(e)?function(){var d={};h.forEach(e,function(c){d[c.toLowerCase()]=!0});return d}.call(this):function(){var d={},c;for(c in e)d[c.toLowerCase()]=
  e[c];return d}.call(this),function(d){return e[(d.get("type")||"").toLowerCase()]}):e=function(){return!0}}})})},"JBrowse/View/FeatureGlyph/Gene":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","JBrowse/View/FeatureGlyph/Box","JBrowse/View/FeatureGlyph/ProcessedTranscript"],function(i,j,h,g,e){return i(g,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{transcriptType:"mRNA",style:{transcriptLabelFont:"normal 10px Univers,Helvetica,Arial,sans-serif",
  transcriptLabelColor:"black",textFont:"bold 12px Univers,Helvetica,Arial,sans-serif"},labelTranscripts:!0,marginBottom:0})},_boxGlyph:function(){return this.__boxGlyph||(this.__boxGlyph=new g({track:this.track,browser:this.browser,config:this.config}))},_ptGlyph:function(){return this.__ptGlyph||(this.__ptGlyph=new e({track:this.track,browser:this.browser,config:this.config}))},_getFeatureRectangle:function(d,c){var b=j.mixin({},d);b.showDescriptions=b.showLabels=!1;var e=c.children(),a=1,g={l:0,
  h:0,r:0,w:0,subRects:[],viewInfo:d,f:c,glyph:this};if(e&&e.length){e.sort(function(a,b){return(a.get("name")||"").localeCompare(b.get("name")||"")});g.l=Infinity;g.r=-Infinity;for(var h=this.getConfForFeature("transcriptType",c),i=0;i<e.length;i++){var m=(e[i].get("type")==h?this._ptGlyph():this._boxGlyph())._getFeatureRectangle(b,e[i]),a=i==e.length-1?0:1;m.t=m.rect.t=g.h&&"collapsed"!=d.displayMode?g.h+a:0;if(d.showLabels&&this.getConfForFeature("labelTranscripts",e[i])){var l=this.makeSideLabel(this.getFeatureLabel(e[i]),
  this.getStyle(e[i],"transcriptLabelFont"),m);if(l){l.fill=this.getStyle(e[i],"transcriptLabelColor");m.label=l;m.l-=l.w;m.w+=l.w;if(l.h>m.h)m.h=l.h;l.yOffset=Math.floor(m.h/2);l.xOffset=0}}g.subRects.push(m);g.r=Math.max(g.r,m.l+m.w-1);g.l=Math.min(g.l,m.l);g.h=m.t+m.h+a}}g.w=Math.max(g.r-g.l+1,2);delete g.r;g.rect={l:g.l,h:g.h,w:g.w};"compact"!=d.displayMode&&(g.h+=this.getStyle(c,"marginBottom")||0);if("collapsed"==d.displayMode)return g;this._expandRectangleWithLabels(d,c,g);this._addMasksToRect(d,
  c,g);return g},layoutFeature:function(d,c,b){var e=this.inherited(arguments);e&&h.forEach(e.subRects,function(a){a.t+=e.t;a.rect.t+=e.t});return e},renderFeature:function(d,c){"collapsed"!=c.viewInfo.displayMode&&d.clearRect(Math.floor(c.l),c.t,Math.ceil(c.w-Math.floor(c.l)+c.l),c.h);for(var b=c.subRects,e=0;e<b.length;e++)b[e].glyph.renderFeature(d,b[e]);this.renderLabel(d,c);this.renderDescription(d,c)},updateStaticElements:function(d,c,b){this.inherited(arguments);for(var e=c.subRects,a=0;a<e.length;a++)e[a].glyph.updateStaticElements(d,
  e[a],b)}})})},"JBrowse/View/FeatureGlyph/ProcessedTranscript":function(){define(["dojo/_base/declare","dojo/_base/array","dojox/color/Palette","JBrowse/Model/SimpleFeature","JBrowse/View/FeatureGlyph/Segments"],function(i,j,h,g,e){return i(e,{_defaultConfig:function(){return this._mergeConfigs(this.inherited(arguments),{style:{utrColor:function(d,c,b){return b._utrColor(b.getStyle(d.parent(),"color")).toString()}},subParts:"CDS, UTR, five_prime_UTR, three_prime_UTR",impliedUTRs:!1})},_getSubparts:function(d){var c=
  d.children();if(!c)return[];c&&this.config.impliedUTRs&&(c=this._makeUTRs(d,c));for(var d=[],b=0;b<c.length;b++)this._filterSubpart(c[b])&&d.push(c[b]);return d},_makeUTRs:function(d,c){var b=Infinity,e=-Infinity,a,h,i,j,m=[];for(a=0;a<c.length;a++)j=c[a].get("type"),/^cds/i.test(j)?(b>c[a].get("start")&&(b=c[a].get("start")),e<c[a].get("end")&&(e=c[a].get("end"))):/exon/i.test(j)?m.push(c[a]):this._isUTR(c[a])&&(h=c[a].get("start")==d.get("start"),i=c[a].get("end")==d.get("end"));if(!m.length||!(Infinity>
  b&&-Infinity<e))return c;m.sort(function(a,b){return a.get("start")-b.get("start")});j=d.get("strand");var l;if(!h)for(a=0;a<m.length;a++){h=m[a].get("start");if(h>=b)break;l=b>m[a].get("end")?m[a].get("end"):b;c.unshift(new g({parent:d,data:{start:h,end:l,strand:j,type:0<=j?"five_prime_UTR":"three_prime_UTR"}}))}if(!i)for(a=m.length-1;0<=a;a--){l=m[a].get("end");if(l<=e)break;h=e<m[a].get("start")?m[a].get("start"):e;c.push(new g({parent:d,data:{start:h,end:l,strand:j,type:0<=j?"three_prime_UTR":
  "five_prime_UTR"}}))}return c},_utrColor:function(d){return(this._palette||(this._palette=h.generate(d,"splitComplementary"))).colors[1]},_isUTR:function(d){return/(\bUTR|_UTR|untranslated[_\s]region)\b/.test(d.get("type")||"")},getStyle:function(d,c){return"color"==c&&this._isUTR(d)?this.getStyle(d,"utrColor"):this.inherited(arguments)},_getFeatureHeight:function(d,c){var b=this.inherited(arguments);return this._isUTR(c)?0.65*b:b}})})},"dojox/color/Palette":function(){define(["dojo/_base/lang","dojo/_base/array",
  "./_base"],function(i,j,h){function g(b,a,c){var d=new h.Palette;d.colors=[];j.forEach(b.colors,function(b){var e="dg"==a?b.g+c:b.g,f="db"==a?b.b+c:b.b,g="da"==a?b.a+c:b.a;d.colors.push(new h.Color({r:Math.min(255,Math.max(0,"dr"==a?b.r+c:b.r)),g:Math.min(255,Math.max(0,e)),b:Math.min(255,Math.max(0,f)),a:Math.min(1,Math.max(0,g))}))});return d}function e(b,a,c){var d=new h.Palette;d.colors=[];j.forEach(b.colors,function(b){var b=b.toCmy(),e="dm"==a?b.m+c:b.m,f="dy"==a?b.y+c:b.y;d.colors.push(h.fromCmy(Math.min(100,
  Math.max(0,"dc"==a?b.c+c:b.c)),Math.min(100,Math.max(0,e)),Math.min(100,Math.max(0,f))))});return d}function d(b,a,c){var d=new h.Palette;d.colors=[];j.forEach(b.colors,function(b){var b=b.toCmyk(),e="dm"==a?b.m+c:b.m,f="dy"==a?b.y+c:b.y,g="dk"==a?b.b+c:b.b;d.colors.push(h.fromCmyk(Math.min(100,Math.max(0,"dc"==a?b.c+c:b.c)),Math.min(100,Math.max(0,e)),Math.min(100,Math.max(0,f)),Math.min(100,Math.max(0,g))))});return d}function c(b,a,c){var d=new h.Palette;d.colors=[];j.forEach(b.colors,function(b){var b=
  b.toHsl(),e="dl"==a?b.l+c:b.l;d.colors.push(h.fromHsl(("dh"==a?b.h+c:b.h)%360,Math.min(100,Math.max(0,"ds"==a?b.s+c:b.s)),Math.min(100,Math.max(0,e))))});return d}function b(b,a,c){var d=new h.Palette;d.colors=[];j.forEach(b.colors,function(b){var b=b.toHsv(),e="dv"==a?b.v+c:b.v;d.colors.push(h.fromHsv(("dh"==a?b.h+c:b.h)%360,Math.min(100,Math.max(0,"ds"==a?b.s+c:b.s)),Math.min(100,Math.max(0,e))))});return d}h.Palette=function(b){this.colors=[];if(b instanceof h.Palette)this.colors=b.colors.slice(0);
  else if(b instanceof h.Color)this.colors=[null,null,b,null,null];else if(i.isArray(b))this.colors=j.map(b.slice(0),function(a){return i.isString(a)?new h.Color(a):a});else if(i.isString(b))this.colors=[null,null,new h.Color(b),null,null]};i.extend(h.Palette,{transform:function(f){var a=g;if(f.use){var h=f.use.toLowerCase();0==h.indexOf("hs")?a="l"==h.charAt(2)?c:b:0==h.indexOf("cmy")&&(a="k"==h.charAt(3)?d:e)}else if("dc"in f||"dm"in f||"dy"in f)a="dk"in f?d:e;else if("dh"in f||"ds"in f)a="dv"in f?
  b:c;var h=this,i;for(i in f)"use"!=i&&(h=a(h,i,f[i]));return h},clone:function(){return new h.Palette(this)}});i.mixin(h.Palette,{generators:{analogous:function(b){var a=b.high||60,c=b.low||18,b=(i.isString(b.base)?new h.Color(b.base):b.base).toHsv(),a=[(b.h+c+360)%360,(b.h+Math.round(c/2)+360)%360,b.h,(b.h-Math.round(a/2)+360)%360,(b.h-a+360)%360],c=Math.max(10,95>=b.s?b.s+5:100-(b.s-95)),d=1<b.s?b.s-1:21-b.s,e=92<=b.v?b.v-9:Math.max(b.v+9,20),g=90>=b.v?Math.max(b.v+5,20):95+Math.ceil((b.v-90)/2),
  l=[c,d,b.s,c,c],p=[e,g,b.v,e,g];return new h.Palette(j.map(a,function(a,b){return h.fromHsv(a,l[b],p[b])}))},monochromatic:function(b){var b=i.isString(b.base)?new h.Color(b.base):b.base,a=b.toHsv(),c=9<a.s-30?a.s-30:a.s+30,d=a.s,e=20<a.v-20?a.v-20:a.v+60,g=20<a.v-50?a.v-50:a.v+30;return new h.Palette([h.fromHsv(a.h,c,100-0.8*(100-a.v)),h.fromHsv(a.h,d,g),b,h.fromHsv(a.h,c,g),h.fromHsv(a.h,d,e)])},triadic:function(b){var b=i.isString(b.base)?new h.Color(b.base):b.base,a=b.toHsv(),c=(a.h-157+360)%
  360,d=90<a.s?a.s-10:a.s+10,e=95<a.s?a.s-5:a.s+5,g=20<a.v-20?a.v-20:a.v+20,j=20<a.v-30?a.v-30:a.v+30,p=70<a.v-30?a.v-30:a.v+30;return new h.Palette([h.fromHsv((a.h+57+360)%360,20<a.s?a.s-10:a.s+10,a.v),h.fromHsv(a.h,d,j),b,h.fromHsv(c,d,g),h.fromHsv(c,e,p)])},complementary:function(b){var b=i.isString(b.base)?new h.Color(b.base):b.base,a=b.toHsv(),c=360>2*a.h+137?2*a.h+137:Math.floor(a.h/2)-137,d=Math.max(a.s-10,0),e=100-0.9*(100-a.s),g=Math.min(100,a.s+20),j=Math.min(100,a.v+30),p=20<a.v?a.v-30:a.v+
  30;return new h.Palette([h.fromHsv(a.h,d,j),h.fromHsv(a.h,e,p),b,h.fromHsv(c,g,p),h.fromHsv(c,a.s,a.v)])},splitComplementary:function(b){var a=i.isString(b.base)?new h.Color(b.base):b.base,c=b.da||30,b=a.toHsv(),d=360>2*b.h+137?2*b.h+137:Math.floor(b.h/2)-137,e=(d-c+360)%360,c=(d+c)%360,d=Math.max(b.s-10,0),g=100-0.9*(100-b.s),j=Math.min(100,b.s+20),p=Math.min(100,b.v+30),q=20<b.v?b.v-30:b.v+30;return new h.Palette([h.fromHsv(e,d,p),h.fromHsv(e,g,q),a,h.fromHsv(c,j,q),h.fromHsv(c,b.s,b.v)])},compound:function(b){var b=
  i.isString(b.base)?new h.Color(b.base):b.base,a=b.toHsv(),c=360>2*a.h+18?2*a.h+18:Math.floor(a.h/2)-18,d=360>2*a.h+120?2*a.h+120:Math.floor(a.h/2)-120,e=360>2*a.h+99?2*a.h+99:Math.floor(a.h/2)-99,g=10<a.s-40?a.s-40:a.s+40,j=80<a.s-10?a.s-10:a.s+10,p=10<a.s-25?a.s-25:a.s+25,q=10<a.v-40?a.v-40:a.v+40,s=80<a.v-20?a.v-20:a.v+20,a=Math.max(a.v,20);return new h.Palette([h.fromHsv(c,g,q),h.fromHsv(c,j,s),b,h.fromHsv(d,p,a),h.fromHsv(e,j,s)])},shades:function(b){var b=i.isString(b.base)?new h.Color(b.base):
  b.base,a=b.toHsv(),c=100==a.s&&0==a.v?0:a.s,d=20<a.v-50?a.v-50:a.v+30,e=20<=a.v-25?a.v-25:a.v+55,g=20<=a.v-75?a.v-75:a.v+5,j=Math.max(a.v-10,20);return new h.Palette([new h.fromHsv(a.h,c,d),new h.fromHsv(a.h,c,e),b,new h.fromHsv(a.h,c,g),new h.fromHsv(a.h,c,j)])}},generate:function(b,a){if(i.isFunction(a))return a({base:b});if(h.Palette.generators[a])return h.Palette.generators[a]({base:b});throw Error("dojox.color.Palette.generate: the specified generator ('"+a+"') does not exist.");}});return h.Palette})},
  "dojox/color/_base":function(){define(["../main","dojo/_base/lang","dojo/_base/Color","dojo/colors"],function(i,j,h,g){i=j.getObject("color",!0,i);i.Color=h;i.blend=h.blendColors;i.fromRgb=h.fromRgb;i.fromHex=h.fromHex;i.fromArray=h.fromArray;i.fromString=h.fromString;i.greyscale=g.makeGrey;j.mixin(i,{fromCmy:function(e,d,c){if(j.isArray(e))d=e[1],c=e[2],e=e[0];else if(j.isObject(e))d=e.m,c=e.y,e=e.c;e/=100;d/=100;c/=100;d=1-d;c=1-c;return new h({r:Math.round(255*(1-e)),g:Math.round(255*d),b:Math.round(255*
  c)})},fromCmyk:function(e,d,c,b){if(j.isArray(e))d=e[1],c=e[2],b=e[3],e=e[0];else if(j.isObject(e))d=e.m,c=e.y,b=e.b,e=e.c;e/=100;d/=100;c/=100;b/=100;e=1-Math.min(1,e*(1-b)+b);d=1-Math.min(1,d*(1-b)+b);c=1-Math.min(1,c*(1-b)+b);return new h({r:Math.round(255*e),g:Math.round(255*d),b:Math.round(255*c)})},fromHsl:function(e,d,c){if(j.isArray(e))d=e[1],c=e[2],e=e[0];else if(j.isObject(e))d=e.s,c=e.l,e=e.h;d/=100;for(c/=100;0>e;)e+=360;for(;360<=e;)e-=360;var b,f,a;120>e?(b=(120-e)/60,f=e/60,a=0):240>
  e?(b=0,f=(240-e)/60,a=(e-120)/60):(b=(e-240)/60,f=0,a=(360-e)/60);b=2*d*Math.min(b,1)+(1-d);f=2*d*Math.min(f,1)+(1-d);a=2*d*Math.min(a,1)+(1-d);0.5>c?(b*=c,f*=c,a*=c):(b=(1-c)*b+2*c-1,f=(1-c)*f+2*c-1,a=(1-c)*a+2*c-1);return new h({r:Math.round(255*b),g:Math.round(255*f),b:Math.round(255*a)})}});i.fromHsv=function(e,d,c){if(j.isArray(e))d=e[1],c=e[2],e=e[0];else if(j.isObject(e))d=e.s,c=e.v,e=e.h;360==e&&(e=0);var d=d/100,c=c/100,b,f,a;if(0==d)b=c,a=c,f=c;else{var g=e/60,e=Math.floor(g),i=g-e,g=c*
  (1-d),r=c*(1-d*i),d=c*(1-d*(1-i));switch(e){case 0:b=c;f=d;a=g;break;case 1:b=r;f=c;a=g;break;case 2:b=g;f=c;a=d;break;case 3:b=g;f=r;a=c;break;case 4:b=d;f=g;a=c;break;case 5:b=c,f=g,a=r}}return new h({r:Math.round(255*b),g:Math.round(255*f),b:Math.round(255*a)})};j.extend(h,{toCmy:function(){var e=1-this.g/255,d=1-this.b/255;return{c:Math.round(100*(1-this.r/255)),m:Math.round(100*e),y:Math.round(100*d)}},toCmyk:function(){var e,d,c,b=this.r/255;d=this.g/255;c=this.b/255;e=Math.min(1-b,1-d,1-c);
  d=(1-d-e)/(1-e);c=(1-c-e)/(1-e);return{c:Math.round(100*((1-b-e)/(1-e))),m:Math.round(100*d),y:Math.round(100*c),b:Math.round(100*e)}},toHsl:function(){var e=this.r/255,d=this.g/255,c=this.b/255,b=Math.min(e,c,d),f=Math.max(e,d,c),a=f-b,g=0,h=0,b=(b+f)/2;0<b&&1>b&&(h=a/(0.5>b?2*b:2-2*b));0<a&&(f==e&&f!=d&&(g+=(d-c)/a),f==d&&f!=c&&(g+=2+(c-e)/a),f==c&&f!=e&&(g+=4+(e-d)/a),g*=60);return{h:g,s:Math.round(100*h),l:Math.round(100*b)}},toHsv:function(){var e=this.r/255,d=this.g/255,c=this.b/255,b=Math.min(e,
  c,d),f=Math.max(e,d,c),b=f-b,a=null,g=0==f?0:b/f;0==g?a=0:(a=e==f?60*(d-c)/b:d==f?120+60*(c-e)/b:240+60*(e-d)/b,0>a&&(a+=360));return{h:a,s:Math.round(100*g),v:Math.round(100*f)}}});return i})},"dojo/colors":function(){define("dojo/colors",["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(i,j,h,g){var e={};j.setObject("dojo.colors",e);var d=function(b,c,a){0>a&&++a;1<a&&--a;var d=6*a;return 1>d?b+(c-b)*d:1>2*a?c:2>3*a?b+6*(c-b)*(2/3-a):b};i.colorFromRgb=h.fromRgb=function(b,
  c){var a=b.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(a){var e=a[2].split(/\s*,\s*/),i=e.length,a=a[1];if("rgb"==a&&3==i||"rgba"==a&&4==i){a=e[0];return"%"==a.charAt(a.length-1)?(a=g.map(e,function(a){return 2.56*parseFloat(a)}),4==i&&(a[3]=e[3]),h.fromArray(a,c)):h.fromArray(e,c)}if("hsl"==a&&3==i||"hsla"==a&&4==i){var a=(parseFloat(e[0])%360+360)%360/360,j=parseFloat(e[1])/100,m=parseFloat(e[2])/100,j=0.5>=m?m*(j+1):m+j-m*j,m=2*m-j,a=[256*d(m,j,a+1/3),256*d(m,j,a),256*d(m,j,a-
  1/3),1];4==i&&(a[3]=e[3]);return h.fromArray(a,c)}}return null};var c=function(b,c,a){b=Number(b);return isNaN(b)?a:b<c?c:b>a?a:b};h.prototype.sanitize=function(){this.r=Math.round(c(this.r,0,255));this.g=Math.round(c(this.g,0,255));this.b=Math.round(c(this.b,0,255));this.a=c(this.a,0,1);return this};e.makeGrey=h.makeGrey=function(b,c){return h.fromArray([b,b,b,c])};j.mixin(h.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],
  bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],
  darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,
  165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,
  122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,
  25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,
  69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return h})},"JBrowse/View/FeatureGlyph/Alignment":function(){define(["dojo/_base/declare",
  "dojo/_base/array","JBrowse/View/FeatureGlyph/Box","JBrowse/Store/SeqFeature/_MismatchesMixin"],function(i,j,h,g){return i([h,g],{constructor:function(){if(!this.config.style.showMismatches)this._drawMismatches=function(){}},_defaultConfig:function(){return this._mergeConfigs(dojo.clone(this.inherited(arguments)),{style:{color:function(e,d,c,b){d=e.get("strand");if(1!=Math.abs(d)&&"+"!=d&&"-"!=d)return b.colorForBase("reference");if(b.config.useXS)return(d={"-":"color_rev_strand","+":"color_fwd_strand"}[e._get("xs")])||
  (d="color_nostrand"),c.getStyle(e,d);if(e.get("multi_segment_template")){var f=e.get("multi_segment_first");return e.get("multi_segment_all_correctly_aligned")?f||!b.config.useReverseTemplate?1==d||"+"==d?c.getStyle(e,"color_fwd_strand"):c.getStyle(e,"color_rev_strand"):1==d||"+"==d?c.getStyle(e,"color_rev_strand"):c.getStyle(e,"color_fwd_strand"):e.get("multi_segment_next_segment_unmapped")?f||!b.config.useReverseTemplate?1==d||"+"==d?c.getStyle(e,"color_fwd_missing_mate"):c.getStyle(e,"color_rev_missing_mate"):
  1==d||"+"==d?c.getStyle(e,"color_rev_missing_mate"):c.getStyle(e,"color_fwd_missing_mate"):e.get("seq_id")==e.get("next_seq_id")?f||!b.config.useReverseTemplate?1==d||"+"==d?c.getStyle(e,"color_fwd_strand_not_proper"):c.getStyle(e,"color_rev_strand_not_proper"):1==d||"+"==d?c.getStyle(e,"color_rev_strand_not_proper"):c.getStyle(e,"color_fwd_strand_not_proper"):1==d||"+"==d?c.getStyle(e,"color_fwd_diff_chr"):c.getStyle(e,"color_rev_diff_chr")}return 1==d||"+"==d?c.getStyle(e,"color_fwd_strand"):c.getStyle(e,
  "color_rev_strand")},color_fwd_strand_not_proper:"#ECC8C8",color_rev_strand_not_proper:"#BEBED8",color_fwd_strand:"#EC8B8B",color_rev_strand:"#8F8FD8",color_fwd_missing_mate:"#D11919",color_rev_missing_mate:"#1919D1",color_fwd_diff_chr:"#000000",color_rev_diff_chr:"#969696",color_nostrand:"#999999",border_color:null,strandArrow:!1,height:7,marginBottom:1,showMismatches:!0,mismatchFont:"bold 10px Courier New,monospace"}})},renderFeature:function(e,d){this.inherited(arguments);2<d.w&&(0.2<d.viewInfo.scale?
  this._drawMismatches(e,d,this._getMismatches(d.f)):this._drawMismatches(e,d,this._getSkipsAndDeletions(d.f)))},_drawMismatches:function(e,d,c){var b=d.f,f=d.viewInfo.block,a=this.getCharacterMeasurements(e);e.textBaseline="middle";j.forEach(c,function(c){var g=b.get("start")+c.start,h=g+c.length,i=(d.rect||{}).h||d.h,g=f.bpToX(g),j=d.rect.t,h=Math.max(f.bpToX(h)-g,1);if("mismatch"==c.type||"deletion"==c.type){if(e.fillStyle=this.track.colorForBase("deletion"==c.type?"deletion":c.base),e.fillRect(g,
  j,h,i),h>=a.w&&i>=a.h-3)e.font=this.config.style.mismatchFont,e.fillStyle="deletion"==c.type?"white":"black",e.fillText(c.base,g+(h-a.w)/2+1,j+i/2)}else if("insertion"==c.type){if(e.fillStyle="purple",e.fillRect(g-1,j+1,2,i-2),e.fillRect(g-2,j,4,1),e.fillRect(g-2,j+i-1,4,1),h>=a.w&&i>=a.h-3)e.font=this.config.style.mismatchFont,e.fillText("("+c.base+")",g+2,j+i/2)}else if("hardclip"==c.type||"softclip"==c.type){if(e.fillStyle="hardclip"==c.type?"red":"blue",e.fillRect(g-1,j+1,2,i-2),e.fillRect(g-
  2,j,4,1),e.fillRect(g-2,j+i-1,4,1),h>=a.w&&i>=a.h-3)e.font=this.config.style.mismatchFont,e.fillText("("+c.base+")",g+2,j+i/2)}else if("skip"==c.type)e.clearRect(g,j,h,i),e.fillStyle="#333",e.fillRect(g,j+(i-2)/2,h,2)},this);e.textBaseline="alphabetic"},getCharacterMeasurements:function(){var e;if(!(e=this.charSize)){var d;try{d=(this.config.style.mismatchFont.match(/(\d+)px/i)||[])[1]}catch(c){}d=d||Infinity;e={w:d,h:d}}return this.charSize=e}})})},"JBrowse/View/Track/FeatureCoverage":function(){define(["dojo/_base/declare",
  "dojo/_base/array","JBrowse/View/Track/Wiggle/XYPlot","JBrowse/Util","JBrowse/Store/SeqFeature/Coverage"],function(i,j,h,g,e){return i(h,{constructor:function(){this.store=new e({store:this.store,browser:this.browser})},_defaultConfig:function(){return g.deepUpdate(dojo.clone(this.inherited(arguments)),{autoscale:"local"})}})})},"JBrowse/Store/SeqFeature/Coverage":function(){define(["dojo/_base/declare","JBrowse/Store/SeqFeature","JBrowse/Util","JBrowse/Model/CoverageFeature"],function(i,j,h,g){return i(j,
  {constructor:function(e){this.store=e.store},getGlobalStats:function(e){e({})},getFeatures:function(e,d,c,b){var f=e.start,a=e.end-f,h=Math.ceil(1/(e.scale||("basesPerSpan"in e?1/e.basesPerSpan:10))),i=Array(Math.ceil(a/h)),j=function(a,b){var c=(a-f-1)/h,d=Math.floor(c);return{bin:d,overlap:b?1-(c-d):c-d}};this.store.getFeatures(e,function(a){var b=j(a.get("start"),!1),a=j(a.get("end"),!0);b.bin==a.bin?i[b.bin]=(i[b.bin]||0)+a.overlap+b.overlap-1:(i[b.bin]=(i[b.bin]||0)+b.overlap,i[a.bin]=(i[a.bin]||
  0)+a.overlap);for(b=b.bin+1;b<=a.bin-1;b++)i[b]=(i[b]||0)+1},function(){for(var a=0;a<i.length;a++){var b=f+h*a;d(new g({start:b,end:b+h,score:i[a]||0}))}c()},b)}})})},"JBrowse/Model/CoverageFeature":function(){define(["JBrowse/Util"],function(i){return i.fastDeclare({get:function(i){return this[i]},tags:function(){return["start","end","score"]},score:0,constructor:function(i){this.start=i.start;this.end=i.end;this.score=i.score}})})},"JBrowse/View/Track/SNPCoverage":function(){define("dojo/_base/declare,dojo/_base/array,dojo/promise/all,JBrowse/View/Track/Wiggle/XYPlot,JBrowse/Util,JBrowse/View/Track/_AlignmentsMixin,JBrowse/Store/SeqFeature/SNPCoverage".split(","),
  function(i,j,h,g,e,d,c){return i([g,d],{constructor:function(){delete this.config.bicolor_pivot;delete this.config.scale;delete this.config.align;var b=this;this.store=new c({store:this.store,config:{mismatchScale:this.config.mismatchScale},browser:this.browser,filter:function(c){return b.filterFeature(c)}})},_defaultConfig:function(){return e.deepUpdate(dojo.clone(this.inherited(arguments)),{autoscale:"local",min_score:0,mismatchScale:0.1,hideDuplicateReads:!0,logScaleOption:!1,hideQCFailingReads:!0,
  hideSecondary:!0,hideSupplementary:!0,hideMissingMatepairs:!1,hideUnmapped:!0})},_drawFeatures:function(b,c,a,d,g,h,i,j){var p=this,q=g.getContext("2d"),s=g.height,u=e.getResolution(q,this.browser.config.highResolutionMode),v=dojo.hitch(this,function(a){return s*(1-j.normalize(a))/u}),w=v(j.origin),t=dojo.create("canvas",{height:20,width:g.width,style:{cursor:"default",width:"100%",height:"20px"},innerHTML:"Your web browser cannot display this type of track.",className:"SNP-indicator-track"},d.domNode),
  y=t.getContext("2d"),u=e.getResolution(y,this.browser.config.highResolutionMode);if("disabled"!=this.browser.config.highResolutionMode&&1!=u)b=t.height,t.width*=u,t.height=b*u,t.style.height=b+"px",y.scale(u,u);var x=this.config.style.neg_color,B=this.config.style.clip_marker_color,C=this.config.style.bg_color,A=this.config.disable_clip_markers,E=function(a,b,c,d){if(b<=s)if(q.fillStyle=p.colorForBase(a),b<=w){if(p._fillRectMod(q,d.l,b,d.w,c),!A&&0>b)q.fillStyle=B||x,p._fillRectMod(q,d.l,0,d.w,2)}else if(p._fillRectMod(q,
  d.l,w,d.w,c),!A&&b>=s)q.fillStyle=B||p.colorForBase(a),p._fillRectMod(q,d.l,s-3,d.w,2)};dojo.forEach(h,function(a,b){var c=i[b],d=a.get("score");if(C)q.fillStyle=C,p._fillRectMod(q,c.l,0,c.w,s);E("reference",v(d.total()),w-v(d.get("reference"))+1,c)});dojo.forEach(h,function(a,b){var c=i[b],d=a.get("score"),e=d.total();d.forEach(function(a,b){if(!{reference:!0,skip:!0,deletion:!0}[b]&&a>0.5*e)y.save(),"disabled"!=p.browser.config.highResolutionMode&&y.scale(u,1),y.beginPath(),y.arc(c.l+0.5*c.w,0.4*
  t.height/u,0.2*t.height/u,1.75*Math.PI,1.25*Math.PI,!1),y.lineTo(c.l+0.5*c.w,0),y.closePath(),y.fillStyle=p.colorForBase(b),y.fill(),y.lineWidth=1,y.strokeStyle="black",y.stroke(),"disabled"!=p.browser.config.highResolutionMode&&y.restore()});e-=d.get("reference");d.forEach(function(a,b){"reference"!=b&&(E(b,v(e),w-v(a)+1,c),e-=a)})},this)},_draw:function(b,c,a,d,e,g,h,i,j,q){this._preDraw(b,c,a,d,e,g,h,i);this._drawFeatures(b,c,a,d,e,g,h,i);q&&this._maskBySpans(b,c,e,q);this._postDraw(b,c,a,d,e,
  g,h,i)},_maskBySpans:function(b,c,a,d){var e=a.getContext("2d"),g=a.height,h=this.config.style.masked_transparancy||0.17;this.config.style.masked_transparancy=h;var i=dojo.create("canvas",{height:g,width:a.width}),j=i.getContext("2d"),q;for(q in d)if(d.hasOwnProperty(q)){var s=Math.round((d[q].end-d[q].start)*b),u=Math.round((d[q].start-c)*b);u+s>=a.width&&(s=a.width-u);if(0!=s)j.drawImage(a,u,0,s,g,u,0,s,g),e.globalAlpha=h,e.clearRect(u,0,s,g),e.drawImage(i,u,0,s,g,u,0,s,g),e.globalAlpha=1}},_showPixelValue:function(b,
  c){function a(a){return parseFloat(a).toPrecision(6).replace(/0+$/,"").replace(/\.$/,"")}if(!c||!c.score)return!1;c=c.score;if(c.snpsCounted){var d=c.total(),e="<table>",g=function(a){a=Math.round(100*(a/d));return"number"==typeof a&&!isNaN(a)?a+"%":""};c.forEach(function(b,c){var d="";b.forEach&&(d=[],b.forEach(function(b,c){d.push(a(b)+" "+c)}),(d=d.join(", "))&&(d="("+d+")"));c={"*":"del",reference:"Ref",skip:"Skip/intron"}[c]||c;e+="<tr><td>"+c+'</td><td class="count">'+a(b)+'</td><td class="pct">'+
  g(b)+'</td><td class="subdist">'+d+"</td></tr>"});e+='<tr class="total"><td>Total</td><td class="count">'+a(d)+'</td><td class="pct">&nbsp;</td><td class="subdist">&nbsp;</td></tr>';b.innerHTML=e+"</table>"}else b.innerHTML='<table><tr><td>Total</td><td class="count">'+a(c)+"</td></tr></table>";return!0},_trackMenuOptions:function(){return h([this.inherited(arguments),this._alignmentsFilterTrackMenuOptions()]).then(function(b){var c=b.shift();b.unshift({type:"dijit/MenuSeparator"});return c.concat.apply(c,
  b)})}})})},"JBrowse/Store/SeqFeature/SNPCoverage":function(){define("dojo/_base/declare,dojo/_base/array,JBrowse/Util,JBrowse/Store/SeqFeature,JBrowse/Model/NestedFrequencyTable,JBrowse/Model/CoverageFeature,./_MismatchesMixin".split(","),function(i,j,h,g,e,d,c){return i([g,c],{constructor:function(b){this.store=b.store;this.filter=b.filter||function(){return!0}},getGlobalStats:function(b){b({})},_defaultConfig:function(){return h.deepUpdate(dojo.clone(this.inherited(arguments)),{mismatchScale:0.1})},
  getFeatures:function(b,c,a,g){function h(a,b,c){var a=(a-j)/q,b=(b-1-j)/q,d=Math.floor(a),e=Math.floor(b);if(!(d>=s||0>e))if(0>d&&(a=d=0),e>=s&&(e=s-1,b=s),d==e)c(d,b-a);else{c(d,d+1-a);for(a=d+1;a<e;a++)c(a,1);c(e,b-e)}}for(var i=this,j=b.start,l=b.end,p=b.scale||b.basesPerSpan&&1/b.basesPerSpan||10,q=function(){var a=1/p;return a<=1/i.config.mismatchScale?1:Math.ceil(a)}(),s=Math.ceil((l-j)/q),u=Array(s),v=0;v<s;v++)if(u[v]=new e,1==q)u[v].snpsCounted=!0;i.store.getFeatures(b,function(a){if(i.filter(a)){var b=
  {"-1":"-",1:"+"}[""+a.get("strand")]||"unstranded";h(a.get("start"),a.get("end"),function(a,c){u[a].getNested("reference").increment(b,c)});if(1==q)for(var c=i._getMismatches(a),d=0;d<c.length;d++){var e=c[d];h(a.get("start")+e.start,a.get("start")+e.start+e.length,function(a,c){var d=u[a];d.getNested("reference").decrement(b,c);var f=e.base;"insertion"==e.type?f="ins "+f:"skip"==e.type&&(f="skip");d.getNested(f).increment(b,c)})}}},function(e){var g=function(){for(var b=0;b<u.length;b++){var g=j+
  q*b;c(new d({start:g,end:g+q,score:u[b]}))}a(e)};if(1==q){var h;i.browser.getStore("refseqs",function(a){a?a.getFeatures(b,function(a){h=a.get("seq")},function(){if(h)for(var a=j;a<=l;a++){var b=Math.floor((a-j)/q);u[b].refBase=h[b]}g()},g):g()})}else g()},g)}})})},"JBrowse/Model/NestedFrequencyTable":function(){define(["JBrowse/Util"],function(i){var j=i.fastDeclare({constructor:function(h){this._categories={};h&&dojo.mixin(this._categories,h)},total:function(){var h=0,g;for(g in this._categories)var e=
  this._categories[g],h=h+(e.total?e.total():e);return h},decrement:function(h,g){g||(g=1);h=h?h.toString():"default";return this._categories[h]?this._categories[h]=Math.max(0,this._categories[h]-g):0},increment:function(h,g){g||(g=1);h=h?h.toString():"default";return this._categories[h]=(this._categories[h]||0)+g},get:function(h){return this._categories[h]||0},getNested:function(h){"string"==typeof h&&(h=h.split("/"));if(!h.length)return this;var g=h[0].toString(),e=this._categories[g];if(!e||!e._categories)e=
  this._categories[g]=new j(e?{"default":e+0}:{});return 1<h.length?e.getNested(h.slice(1)):e},categories:function(){return i.dojof.keys(this._categories)},toString:function(){return this.total().toPrecision(6).toString().replace(/\.?0+$/,"")},valueOf:function(){return this.total()},forEach:function(h,g){var e=this._categories;if(g)for(var d in e)h.call(g,e[d],d);else for(d in e)h(e[d],d)}});return j})},"JBrowse/Store/TrackMetaData":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/data/util/simpleFetch",
  "JBrowse/Util","JBrowse/Digest/Crc32"],function(i,j,h,g,e){var d=g.dojof,i=i(null,{_noDataValue:"(no data)",constructor:function(c){var b=["conf"];this._filterFacet=function(){var a=c.indexFacets||function(){return!0};"string"==typeof a&&(a=[a]);if(dojo.isArray(a))var d=a,a=function(a){return dojo.some(d,function(b){return a==b.toLowerCase()})};var e=this.getIdentityAttributes();return function(c){return dojo.some(e,function(a){return a==c})||a(c)&&!dojo.some(b,function(a){return a==c})}}.call(this);
  this.onReadyFuncs=dojo.isArray(c.onReady)?dojo.clone(c.onReady):c.onReady?[c.onReady]:[];this._indexItems({store:this,items:dojo.map(c.trackConfigs,dojo.hitch(this,"_trackConfigToItem"))});var d=0;c.metadataStores=dojo.filter(c.metadataStores,function(a){return a});if(!c.metadataStores||!c.metadataStores.length)this._finishLoad();else{var a=dojo.hitch(this,function(){++d==c.metadataStores.length&&this._finishLoad()});dojo.forEach(c.metadataStores,function(b){b.fetch({scope:this,onComplete:dojo.hitch(this,
  function(c){this._indexItems({store:b,items:c,supplementalOnly:!0});a()}),onError:function(b){console.error(b,b.stack);a()}})},this)}c.browser.subscribe("/jbrowse/v1/c/tracks/new",dojo.hitch(this,"addTracks"));c.browser.subscribe("/jbrowse/v1/c/tracks/replace",dojo.hitch(this,function(a){this.deleteTracks(a,"no events");this.addTracks(a,"no events")}));c.browser.subscribe("/jbrowse/v1/c/tracks/delete",dojo.hitch(this,"deleteTracks"))},_trackConfigToItem:function(c){var b=dojo.clone(c.metadata||{});
  b.label=c.label;b.key=c.key;b.conf=c;b["track type"]=c.type;if(c.category)b.category=c.category;return b},comparatorMap:{category:function(c,b){for(var d=(c||"Uncategorized").split(/\s*\/\s*/),a=(b||"Uncategorized").split(/\s*\/\s*/),e,g;(e=d.shift())&&(g=a.shift());)if(e=e.localeCompare(g))return e;return 0}},addTracks:function(c,b){c.length&&(delete this.previousQueryFingerprint,delete this.previousResults);j.forEach(c,function(c){this._indexItems({store:this,items:[this._trackConfigToItem(c)]});
  var a=c.label,d=this.fetchItemByIdentity(a);if(d){if(!b)this.onNew(d)}else console.error("failed to add "+a+" track to track metadata store",c)},this)},deleteTracks:function(c,b){c.length&&(delete this.previousQueryFingerprint,delete this.previousResults);j.forEach(c,function(c){if(c=this.fetchItemByIdentity(c.label))if(c.DELETED=!0,!b)this.onDelete(c)},this)},_finishLoad:function(){this.facets.sort();dojo.forEach(d.values(this.facetIndexes.byName),function(b){b.avgBucketSize=b.itemCount/b.bucketCount});
  this.facetIndexes.facetRank=dojo.clone(this.facets).sort(dojo.hitch(this,function(b,c){return this.facetIndexes.byName[b].avgBucketSize-this.facetIndexes.byName[c].avgBucketSize}));var c=dojo.hitch(this,"_itemSortFunc");dojo.forEach(d.values(this.facetIndexes.byName),function(b){dojo.forEach(d.values(b.byValue),function(b){var a=[],d={};j.forEach(b.items,function(b){var c=this.getIdentity(b);d[c]||(d[c]=!0,a.push(b))},this);b.items=a.sort(c)},this)},this);this.ready=!0;this._onReady()},_itemSortFunc:function(c,
  b){var d=this.getIdentity(c),a=this.getIdentity(b);return d==a?0:d>a?1:d<a?-1:0},_indexItems:function(c){var b=c.store,e=c.items,a={},e=dojo.map(e,function(c){var d=b.getAttributes(c),e={};dojo.forEach(d,function(d){if(d){var f=d.toLowerCase();a[f]=!0;e[f]=b.getValue(c,d)}});return e},this);this.identIndex=this.identIndex||{};e=function(){var a={};return dojo.map(e,function(b){var d=this.getIdentity(b),e=this.identIndex[d];e&&e.DELETED&&delete e.DELETED;if(a[d]||c.supplementalOnly&&!e)return null;
  a[d]=!0;return this.identIndex[d]=dojo.mixin(e||{},b)},this)}.call(this);e=dojo.filter(e,function(a){return a});d.keys(a);var g=this._addFacets(d.keys(a)),h=j.filter(this.facets,function(b){return b in a});this.facetIndexes=this.facetIndexes||{itemCount:0,bucketCount:0,byName:{}};dojo.forEach(g,function(a){this.facetIndexes.byName[a]||(this.facetIndexes.bucketCount++,this.facetIndexes.byName[a]={itemCount:0,bucketCount:0,byValue:{}})},this);if(h.length){var i={};dojo.forEach(h,function(a){i[a]={}});
  dojo.forEach(e,function(a){this.facetIndexes.itemCount++;dojo.forEach(h,function(b){var c=this.getValue(a,b,void 0);"undefined"!=typeof c&&(i[b][this.getIdentity(a)]=1,this._indexItem(b,c,a))},this)},this);dojo.forEach(h,function(a){dojo.forEach(d.values(this.identIndex),function(b){i[a][this.getIdentity(b)]||this._indexItem(a,this._noDataValue,b)},this)},this)}},_indexItem:function(c,b,d){var c=this.facetIndexes.byName[c],a=c.byValue[b];a||(a=c.byValue[b]={itemCount:0,items:[]},c.bucketCount++);
  a.itemCount++;c.itemCount++;a.items.push(d)},_addFacets:function(c){var b=this.facets||[],d={};this.facets=dojo.filter(b.concat(c),function(a){var b=this._filterFacet(a)&&!d[a];d[a]=!0;return b},this);return this.facets.slice(b.length)},getCount:function(){return this._fetchCount},getFacetCounts:function(c){var b=this._fetchFacetCounts[c]||this._fetchFacetCounts.__other__;return b?b[c]:void 0},getFacetNames:function(){return this.facets},getFacetValues:function(c){c=this.facetIndexes.byName[c];return!c?
  []:d.keys(c.byValue)},getFacetStats:function(c){var b=this.facetIndexes.byName[c];if(!b)return{};var d={};dojo.forEach(["itemCount","bucketCount","avgBucketSize"],function(a){d[a]=b[a]});return d},getValue:function(c,b,d){c=c[b];return"undefined"==typeof c?d:c},getValues:function(c,b){var d=[c[b]];return"undefined"==typeof d[0]?[]:d},getAttributes:function(c){return d.keys(c)},hasAttribute:function(c,b){return c.hasOwnProperty(b)},containsValue:function(c,b,d){return c[b]==d},isItem:function(c){return"object"==
  typeof c&&"string"==typeof c.label},isItemLoaded:function(){return this.ready},loadItem:function(){},getItem:function(c){return this.ready?this.identIndex[c]:null},_fetchItems:function(c,b,f){if(this.ready){var a=dojo.clone(c.query||{});dojo.forEach(d.keys(a),function(b){dojo.isArray(a[b])||(a[b]=[a[b]])},this);f=e.objectFingerprint(a);f==this.previousQueryFingerprint?f=this.previousResults:(this.previousQueryFingerprint=f,this.previousResults=f=this._doQuery(a));b(f,c);this.onFetchSuccess()}else this.onReady(dojo.hitch(this,
  "_fetchItems",c,b,f))},_doQuery:function(c){var b=this._compileTextFilter(c.text);delete c.text;var e=[],a=[];if(b)a.push(this._filterDeleted(j.filter(d.values(this.identIndex),b)).sort(dojo.hitch(this,"_itemSortFunc"))),a[0].facetName="Contains text";a.push.apply(a,dojo.map(d.keys(c),function(a){var b=c[a],d=[];if(!this.facetIndexes.byName[a])throw console.error("No facet defined with name '"+a+"'."),"No facet defined with name '"+a+"', faceted search failed.";dojo.forEach(b,function(b){d.push.apply(d,
  this._filterDeleted((this.facetIndexes.byName[a].byValue[b]||{}).items||[]))},this);d.facetName=a;d.sort(dojo.hitch(this,"_itemSortFunc"));return d},this));dojo.forEach(a,function(a){a.myOffset=0;a.topItem=function(){return this[this.myOffset]};a.shift=function(){this.myOffset++}});var g={};if(a.length){var h=0;for(dojo.forEach(a,function(a){h+=a.length});h;){var i={},m=[],l,p;dojo.forEach(a,function(a){l=(p=a.topItem())?this.getIdentity(p):"(at end of set)";i[l]?i[l].push(a):(i[l]=[a],m.push(l))},
  this);1==m.length?e.push(p):(m.sort(),"(at end of set)"==m[0]?(l=m[1],b=0):(l=m[0],b=1),l="(at end of set)"==m[0]?m[1]:m[0],2==m.length&&i[l].length==a.length-1&&(b=i[m[b]][0],this._countItem(g,i[l][0].topItem(),b.facetName)));dojo.forEach(i[l],function(a){a.shift();h--})}}else e=this._filterDeleted(d.values(this.identIndex));dojo.forEach(d.keys(g).concat(["__other__"]),function(a){dojo.forEach(e,function(b){this._countItem(g,b,a)},this)},this);1==a.length&&dojo.forEach(d.values(this.identIndex),
  function(b){this._countItem(g,b,a[0].facetName)},this);this._fetchFacetCounts=g;this._fetchCount=e.length;return e},_countItem:function(c,b,d){var a=c[d];a||(a=c[d]={});dojo.forEach("__other__"==d?this.facets:[d],function(c){var d=this.getValue(b,c,this._noDataValue),e=a[c];e||(e=a[c]={},e[d]=0);e[d]=(e[d]||0)+1},this)},onReady:function(c,b){c=c||dojo.global;b=dojo.hitch(c,b);this.ready?b():this.onReadyFuncs.push(b)},_onReady:function(){dojo.forEach(this.onReadyFuncs||[],function(c){c.call()})},onFetchSuccess:function(){},
  onNew:function(){},onDelete:function(){},onSet:function(){},_filterDeleted:function(c){return j.filter(c,function(b){return!b.DELETED})},_compileTextFilter:function(c){if(void 0===c)return null;for(var b=/\s*["']([^"']+)["']\s*/g,d=/(\S+)/g,a=function(){var a=b.exec(c)||d.exec(c);if(a){var a=a[1],e=Math.max(b.lastIndex,d.lastIndex);d.lastIndex=b.lastIndex=e}return a},e=[],g;g=a();)g=dojo.regexp.escapeString(g,"*?").replace(/\*/g,".+").replace(/ /g,"\\s+").replace(/\?/g,"."),e.push(RegExp(g,"i"));
  return dojo.hitch(this,function(a){return dojo.some(this.facets,function(b){var c=this.getValue(a,b);return j.every(e,function(a){return a.test(c)})},this)})},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0,"dojo.data.api.Notification":!0}},close:function(){},getLabel:function(c){return this.getValue(c,"key",void 0)},getLabelAttributes:function(){return["key"]},getIdentityAttributes:function(){return["label"]},getIdentity:function(c){return this.getValue(c,"label",
  void 0)},fetchItemByIdentity:function(c){return this.identIndex[c]}});dojo.extend(i,h);return i})},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(i,j,h){var g={};i.setObject("dojo.data.util.simpleFetch",g);g.errorHandler=function(e,d){d.onError&&d.onError.call(d.scope||j.global,e,d)};g.fetchHandler=function(e,d){var c=d.abort||null,b=!1,f=d.start?d.start:0,a=d.count&&Infinity!==d.count?f+d.count:e.length;d.abort=function(){b=!0;c&&c.call(d)};
  var g=d.scope||j.global;if(!d.store)d.store=this;d.onBegin&&d.onBegin.call(g,e.length,d);d.sort&&e.sort(h.createSortFunction(d.sort,this));if(d.onItem)for(var i=f;i<e.length&&i<a;++i){var r=e[i];b||d.onItem.call(g,r,d)}d.onComplete&&!b&&(i=null,d.onItem||(i=e.slice(f,a)),d.onComplete.call(g,i,d))};g.fetch=function(e){e=e||{};if(!e.store)e.store=this;this._fetchItems(e,i.hitch(this,"fetchHandler"),i.hitch(this,"errorHandler"));return e};return g})},"xstyle/load-css":function(){define([],function(){function i(a,
  b){var c=a[d]("link");c.rel="stylesheet";c.type="text/css";if(b)c.href=b;return c}function j(a){for(var a=a.split("!"),b,c=1;b=a[c++];)b=b.split("=",2),a[b[0]]=2==b.length?b[1]:!0;return a}function h(b){if(a["dom-create-style-element"])return c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(b)),k.insertBefore(c,k.firstChild),c;var c=document.createStyleSheet();c.cssText=b;return c.owningElement}var g="onreadystatechange",e="onload",d="createElement",
  c=!1,b=document,f="undefined"==typeof _css_cache?{}:_css_cache,a={"event-link-onload":null===document.createElement("link").onload&&!navigator.userAgent.match(/AppleWebKit/),"dom-create-style-element":!document.createStyleSheet},k=b.head||(b.head=b.getElementsByTagName("head")[0]);if(!a["bundled-css"])var n=function(b,d){function f(a){if(a=a.sheet||a.styleSheet)for(var b=document.styleSheets,c=b.length;0<c;c--)if(b[c-1]==a)return!0}function h(a,b){f(a.link)?(i(a),b()):c||setTimeout(function(){h(a,
  b)},a.wait)}function i(a){a=a.link;a[g]=a[e]=null}function j(){k||(k=!0,d())}if(require.onError)require.onError=function(a){return function(){c=!0;a.apply(this,arguments)}}(require.onError);var k;(function(b,c){var d=b.link;d[g]=d[e]=function(){if(!d.readyState||"complete"==d.readyState)a["event-link-onload"]=!0,i(b),c()}})(b,j);a["event-link-onload"]||h(b,j)};return function(a,c,d){for(var e=a.split(","),g=e.length,s=function(){0==--g&&c(w.sheet||w.styleSheet)},u=0;u<e.length;u++){var a=e[u],v=f[a];
  if(v)return w=h(v),s();var a=j(a),v=a.shift(),v=v.lastIndexOf(".")<=v.lastIndexOf("/")?v+".css":v,w=i(b),a="nowait"in a?"false"!=a.nowait:!(!d||!d.cssDeferLoad);n({link:w,url:v,wait:d&&d.cssWatchPeriod||25},s);a&&c(w);w.href=v;k.appendChild(w)}}})},"dojox/gfx/svg":function(){define("dojo/_base/lang,dojo/_base/sniff,dojo/_base/window,dojo/dom,dojo/_base/declare,dojo/_base/array,dojo/dom-geometry,dojo/dom-attr,dojo/_base/Color,./_base,./shape,./path".split(","),function(i,j,h,g,e,d,c,b,f,a,k,n){function r(a,
  b){return h.doc.createElementNS?h.doc.createElementNS(a,b):h.doc.createElement(b)}function m(a){return l.useSvgWeb?h.doc.createTextNode(a,!0):h.doc.createTextNode(a)}var l=a.svg={};l.useSvgWeb="undefined"!=typeof window.svgweb;var p=navigator.userAgent,q=j("ios"),s=j("android"),u=j("chrome")||s&&4<=s?"auto":"optimizeLegibility";l.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};l.getRef=function(a){return!a||"none"==a?null:a.match(/^url\(#.+\)$/)?g.byId(a.slice(5,-1)):
  a.match(/^#dojoUnique\d+$/)?g.byId(a.slice(1)):null};l.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};var v=0;l.Shape=e("dojox.gfx.svg.Shape",k.Shape,{destroy:function(){if(this.fillStyle&&"type"in this.fillStyle){var a=this.rawNode.getAttribute("fill");(a=l.getRef(a))&&a.parentNode.removeChild(a)}if(this.clip&&(a=this.rawNode.getAttribute("clip-path")))(a=
  g.byId(a.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);this.rawNode=null;k.Shape.prototype.destroy.apply(this,arguments)},setFill:function(b){if(!b)return this.fillStyle=null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;var c,e=function(a){this.setAttribute(a,c[a].toFixed(8))};if("object"==typeof b&&"type"in b){switch(b.type){case "linear":c=a.makeParameters(a.defaultLinearGradient,b);b=this._setFillObject(c,"linearGradient");d.forEach(["x1",
  "y1","x2","y2"],e,b);break;case "radial":c=a.makeParameters(a.defaultRadialGradient,b);b=this._setFillObject(c,"radialGradient");d.forEach(["cx","cy","r"],e,b);break;case "pattern":c=a.makeParameters(a.defaultPattern,b),b=this._setFillObject(c,"pattern"),d.forEach(["x","y","width","height"],e,b)}this.fillStyle=c;return this}this.fillStyle=c=a.normalizeColor(b);this.rawNode.setAttribute("fill",c.toCss());this.rawNode.setAttribute("fill-opacity",c.a);this.rawNode.setAttribute("fill-rule","evenodd");
  return this},setStroke:function(b){var c=this.rawNode;if(!b)return this.strokeStyle=null,c.setAttribute("stroke","none"),c.setAttribute("stroke-opacity",0),this;if("string"==typeof b||i.isArray(b)||b instanceof f)b={color:b};b=this.strokeStyle=a.makeParameters(a.defaultStroke,b);b.color=a.normalizeColor(b.color);if(b){c.setAttribute("stroke",b.color.toCss());c.setAttribute("stroke-opacity",b.color.a);c.setAttribute("stroke-width",b.width);c.setAttribute("stroke-linecap",b.cap);"number"==typeof b.join?
  (c.setAttribute("stroke-linejoin","miter"),c.setAttribute("stroke-miterlimit",b.join)):c.setAttribute("stroke-linejoin",b.join);var d=b.style.toLowerCase();d in l.dasharray&&(d=l.dasharray[d]);if(d instanceof Array){for(var d=i._toArray(d),e=0;e<d.length;++e)d[e]*=b.width;if("butt"!=b.cap){for(e=0;e<d.length;e+=2)d[e]-=b.width,1>d[e]&&(d[e]=1);for(e=1;e<d.length;e+=2)d[e]+=b.width}d=d.join(",")}c.setAttribute("stroke-dasharray",d);c.setAttribute("dojoGfxStrokeStyle",b.style)}return this},_getParentSurface:function(){for(var b=
  this.parent;b&&!(b instanceof a.Surface);b=b.parent);return b},_setFillObject:function(b,c){var d=l.xmlns.svg;this.fillStyle=b;var e=this._getParentSurface().defNode,f=this.rawNode.getAttribute("fill");if(f=l.getRef(f))if(f.tagName.toLowerCase()!=c.toLowerCase()){var g=f.id;f.parentNode.removeChild(f);f=r(d,c);f.setAttribute("id",g);e.appendChild(f)}else for(;f.childNodes.length;)f.removeChild(f.lastChild);else f=r(d,c),f.setAttribute("id",a._base._getUniqueId()),e.appendChild(f);if("pattern"==c)f.setAttribute("patternUnits",
  "userSpaceOnUse"),d=r(d,"image"),d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",b.width.toFixed(8)),d.setAttribute("height",b.height.toFixed(8)),d.setAttributeNS?d.setAttributeNS(l.xmlns.xlink,"xlink:href",b.src):d.setAttribute("xlink:href",b.src),f.appendChild(d);else{f.setAttribute("gradientUnits","userSpaceOnUse");for(e=0;e<b.colors.length;++e){var g=b.colors[e],h=r(d,"stop"),i=g.color=a.normalizeColor(g.color);h.setAttribute("offset",g.offset.toFixed(8));h.setAttribute("stop-color",
  i.toCss());h.setAttribute("stop-opacity",i.a);f.appendChild(h)}}this.rawNode.setAttribute("fill","url(#"+f.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule","evenodd");return f},_applyTransform:function(){if(this.matrix){var a=this.matrix;this.rawNode.setAttribute("transform","matrix("+a.xx.toFixed(8)+","+a.yx.toFixed(8)+","+a.xy.toFixed(8)+","+a.yy.toFixed(8)+","+a.dx.toFixed(8)+","+a.dy.toFixed(8)+")")}else this.rawNode.removeAttribute("transform");
  return this},setRawNode:function(a){a=this.rawNode=a;"image"!=this.shape.type&&a.setAttribute("fill","none");a.setAttribute("fill-opacity",0);a.setAttribute("stroke","none");a.setAttribute("stroke-opacity",0);a.setAttribute("stroke-width",1);a.setAttribute("stroke-linecap","butt");a.setAttribute("stroke-linejoin","miter");a.setAttribute("stroke-miterlimit",4);a.__gfxObject__=this.getUID()},setShape:function(b){this.shape=a.makeParameters(this.shape,b);for(var c in this.shape)"type"!=c&&this.rawNode.setAttribute(c,
  this.shape[c]);this.bbox=null;return this},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this},_moveToBack:function(){this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);return this},setClip:function(a){this.inherited(arguments);var c=a?"width"in a?"rect":"cx"in a?"ellipse":"points"in a?"polyline":"d"in a?"path":null:null;if(a&&!c)return this;if("polyline"===c)a=i.clone(a),a.points=a.points.join(",");var d,e=b.get(this.rawNode,"clip-path");
  e&&(d=g.byId(e.match(/gfx_clip[\d]+/)[0]))&&d.removeChild(d.childNodes[0]);a?(d?(c=r(l.xmlns.svg,c),d.appendChild(c)):(e="gfx_clip"+ ++v,this.rawNode.setAttribute("clip-path","url(#"+e+")"),d=r(l.xmlns.svg,"clipPath"),c=r(l.xmlns.svg,c),d.appendChild(c),this.rawNode.parentNode.appendChild(d),b.set(d,"id",e)),b.set(c,a)):(this.rawNode.removeAttribute("clip-path"),d&&d.parentNode.removeChild(d));return this},_removeClipNode:function(){var a,c=b.get(this.rawNode,"clip-path");c&&(a=g.byId(c.match(/gfx_clip[\d]+/)[0]))&&
  a.parentNode.removeChild(a);return a}});l.Group=e("dojox.gfx.svg.Group",l.Shape,{constructor:function(){k.Container._init.call(this)},setRawNode:function(a){this.rawNode=a;this.rawNode.__gfxObject__=this.getUID()},destroy:function(){this.clear(!0);l.Shape.prototype.destroy.apply(this,arguments)}});l.Group.nodeType="g";l.Rect=e("dojox.gfx.svg.Rect",[l.Shape,k.Rect],{setShape:function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=null;for(var c in this.shape)"type"!=c&&"r"!=c&&this.rawNode.setAttribute(c,
  this.shape[c]);null!=this.shape.r&&(this.rawNode.setAttribute("ry",this.shape.r),this.rawNode.setAttribute("rx",this.shape.r));return this}});l.Rect.nodeType="rect";l.Ellipse=e("dojox.gfx.svg.Ellipse",[l.Shape,k.Ellipse],{});l.Ellipse.nodeType="ellipse";l.Circle=e("dojox.gfx.svg.Circle",[l.Shape,k.Circle],{});l.Circle.nodeType="circle";l.Line=e("dojox.gfx.svg.Line",[l.Shape,k.Line],{});l.Line.nodeType="line";l.Polyline=e("dojox.gfx.svg.Polyline",[l.Shape,k.Polyline],{setShape:function(b,c){b&&b instanceof
  Array?(this.shape=a.makeParameters(this.shape,{points:b}),c&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.shape=a.makeParameters(this.shape,b);this.bbox=null;this._normalizePoints();for(var d=[],e=this.shape.points,f=0;f<e.length;++f)d.push(e[f].x.toFixed(8),e[f].y.toFixed(8));this.rawNode.setAttribute("points",d.join(" "));return this}});l.Polyline.nodeType="polyline";l.Image=e("dojox.gfx.svg.Image",[l.Shape,k.Image],{setShape:function(b){this.shape=a.makeParameters(this.shape,
  b);this.bbox=null;var b=this.rawNode,c;for(c in this.shape)"type"!=c&&"src"!=c&&b.setAttribute(c,this.shape[c]);b.setAttribute("preserveAspectRatio","none");b.setAttributeNS?b.setAttributeNS(l.xmlns.xlink,"xlink:href",this.shape.src):b.setAttribute("xlink:href",this.shape.src);b.__gfxObject__=this.getUID();return this}});l.Image.nodeType="image";l.Text=e("dojox.gfx.svg.Text",[l.Shape,k.Text],{setShape:function(b){this.shape=a.makeParameters(this.shape,b);this.bbox=null;var b=this.rawNode,c=this.shape;
  b.setAttribute("x",c.x);b.setAttribute("y",c.y);b.setAttribute("text-anchor",c.align);b.setAttribute("text-decoration",c.decoration);b.setAttribute("rotate",c.rotated?90:0);b.setAttribute("kerning",c.kerning?"auto":0);b.setAttribute("text-rendering",u);b.firstChild?b.firstChild.nodeValue=c.text:b.appendChild(m(c.text));return this},getTextWidth:function(){var a=this.rawNode,b=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var c=0,d=a.firstChild.nodeValue;b.appendChild(a);if(""!=d)for(;!c;)c=
  a.getBBox?parseInt(a.getBBox().width):68;b.removeChild(a);return c}});l.Text.nodeType="text";l.Path=e("dojox.gfx.svg.Path",[l.Shape,n.Path],{_updateWithSegment:function(a){this.inherited(arguments);"string"==typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)},setShape:function(a){this.inherited(arguments);this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");return this}});l.Path.nodeType="path";l.TextPath=e("dojox.gfx.svg.TextPath",[l.Shape,
  n.TextPath],{_updateWithSegment:function(a){this.inherited(arguments);this._setTextPath()},setShape:function(a){this.inherited(arguments);this._setTextPath();return this},_setTextPath:function(){if("string"==typeof this.shape.path){var b=this.rawNode;if(!b.firstChild){var c=r(l.xmlns.svg,"textPath"),d=m("");c.appendChild(d);b.appendChild(c)}c=(c=b.firstChild.getAttributeNS(l.xmlns.xlink,"href"))&&l.getRef(c);if(!c&&(d=this._getParentSurface())){var d=d.defNode,c=r(l.xmlns.svg,"path"),e=a._base._getUniqueId();
  c.setAttribute("id",e);d.appendChild(c);b.firstChild.setAttributeNS?b.firstChild.setAttributeNS(l.xmlns.xlink,"xlink:href","#"+e):b.firstChild.setAttribute("xlink:href","#"+e)}c&&c.setAttribute("d",this.shape.path)}},_setText:function(){var a=this.rawNode;if(!a.firstChild){var b=r(l.xmlns.svg,"textPath"),c=m("");b.appendChild(c);a.appendChild(b)}a=a.firstChild;b=this.text;a.setAttribute("alignment-baseline","middle");switch(b.align){case "middle":a.setAttribute("text-anchor","middle");a.setAttribute("startOffset",
  "50%");break;case "end":a.setAttribute("text-anchor","end");a.setAttribute("startOffset","100%");break;default:a.setAttribute("text-anchor","start"),a.setAttribute("startOffset","0%")}a.setAttribute("baseline-shift","0.5ex");a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.firstChild.data=b.text}});l.TextPath.nodeType="text";var w=534<function(){var a=/WebKit\/(\d*)/.exec(p);return a?a[1]:0}();l.Surface=e("dojox.gfx.svg.Surface",
  k.Surface,{constructor:function(){k.Container._init.call(this)},destroy:function(){k.Container.clear.call(this,!0);this.defNode=null;this.inherited(arguments)},setDimensions:function(a,b){if(!this.rawNode)return this;this.rawNode.setAttribute("width",a);this.rawNode.setAttribute("height",b);if(w)this.rawNode.style.width=a,this.rawNode.style.height=b;return this},getDimensions:function(){return this.rawNode?{width:a.normalizedLength(this.rawNode.getAttribute("width")),height:a.normalizedLength(this.rawNode.getAttribute("height"))}:
  null}});l.createSurface=function(a,b,c){var d=new l.Surface;d.rawNode=r(l.xmlns.svg,"svg");d.rawNode.setAttribute("overflow","hidden");b&&d.rawNode.setAttribute("width",b);c&&d.rawNode.setAttribute("height",c);b=r(l.xmlns.svg,"defs");d.rawNode.appendChild(b);d.defNode=b;d._parent=g.byId(a);d._parent.appendChild(d.rawNode);return d};var j={_setFont:function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-variant",a.variant);this.rawNode.setAttribute("font-weight",
  a.weight);this.rawNode.setAttribute("font-size",a.size);this.rawNode.setAttribute("font-family",a.family)}},t=k.Container,e={openBatch:function(){this.fragment=l.useSvgWeb?h.doc.createDocumentFragment(!0):h.doc.createDocumentFragment()},closeBatch:function(){this.fragment&&(this.rawNode.appendChild(this.fragment),delete this.fragment)},add:function(a){this!=a.getParent()&&(this.fragment?this.fragment.appendChild(a.rawNode):this.rawNode.appendChild(a.rawNode),t.add.apply(this,arguments),a.setClip(a.clip));
  return this},remove:function(a,b){this==a.getParent()&&(this.rawNode==a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode),this.fragment&&this.fragment==a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode),a._removeClipNode(),t.remove.apply(this,arguments));return this},clear:function(){for(var a=this.rawNode;a.lastChild;)a.removeChild(a.lastChild);var b=this.defNode;if(b){for(;b.lastChild;)b.removeChild(b.lastChild);a.appendChild(b)}return t.clear.apply(this,arguments)},getBoundingBox:t.getBoundingBox,
  _moveChildToFront:t._moveChildToFront,_moveChildToBack:t._moveChildToBack},n={createObject:function(a,b){if(!this.rawNode)return null;var c=new a,d=r(l.xmlns.svg,a.nodeType);c.setRawNode(d);c.setShape(b);this.add(c);return c}};i.extend(l.Text,j);i.extend(l.TextPath,j);i.extend(l.Group,e);i.extend(l.Group,k.Creator);i.extend(l.Group,n);i.extend(l.Surface,e);i.extend(l.Surface,k.Creator);i.extend(l.Surface,n);l.fixTarget=function(a){if(!a.gfxTarget)a.gfxTarget=q&&a.target.wholeText?k.byId(a.target.parentElement.__gfxObject__):
  k.byId(a.target.__gfxObject__);return!0};if(l.useSvgWeb)l.createSurface=function(b,d,e){var f=new l.Surface;if(!d||!e)var h=c.position(b),d=d||h.w,e=e||h.h;var b=g.byId(b),h=b.id?b.id+"_svgweb":a._base._getUniqueId(),i=r(l.xmlns.svg,"svg");i.id=h;i.setAttribute("width",d);i.setAttribute("height",e);svgweb.appendChild(i,b);i.addEventListener("SVGLoad",function(){f.rawNode=this;f.isLoaded=!0;var a=r(l.xmlns.svg,"defs");f.rawNode.appendChild(a);f.defNode=a;if(f.onLoad)f.onLoad(f)},!1);f.isLoaded=!1;
  return f},l.Surface.extend({destroy:function(){var a=this.rawNode;svgweb.removeChild(a,a.parentNode)}}),j={connect:function(a,b,c){"on"===a.substring(0,2)&&(a=a.substring(2));c=2==arguments.length?b:i.hitch(b,c);this.getEventSource().addEventListener(a,c,!1);return[this,a,c]},disconnect:function(a){this.getEventSource().removeEventListener(a[1],a[2],!1);delete a[0]}},i.extend(l.Shape,j),i.extend(l.Surface,j);return l})},"dojox/gfx/path":function(){define(["./_base","dojo/_base/lang","dojo/_base/declare",
  "./matrix","./shape"],function(i,j,h,g,e){e=h("dojox.gfx.path.Path",e.Shape,{constructor:function(d){this.shape=j.clone(i.defaultPath);this.segments=[];this.tbbox=null;this.absolute=!0;this.last={};this.rawNode=d;this.segmented=!1},setAbsoluteMode:function(d){this._confirmSegmented();this.absolute="string"==typeof d?"absolute"==d:d;return this},getAbsoluteMode:function(){this._confirmSegmented();return this.absolute},getBoundingBox:function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?
  {x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var d=this.bbox,c=this._getRealMatrix();this.bbox=null;for(var b=0,e=this.segments.length;b<e;++b)this._updateWithSegment(this.segments[b],c);c=this.bbox;this.bbox=d;return this.tbbox=c?[{x:c.l,y:c.t},{x:c.r,y:c.t},{x:c.r,y:c.b},{x:c.l,y:c.b}]:null},getLastPosition:function(){this._confirmSegmented();return"x"in this.last?
  this.last:null},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments)},_updateBBox:function(d,c,b){if(b)c=g.multiplyPoint(b,d,c),d=c.x,c=c.y;if(this.bbox&&"l"in this.bbox){if(this.bbox.l>d)this.bbox.l=d;if(this.bbox.r<d)this.bbox.r=d;if(this.bbox.t>c)this.bbox.t=c;if(this.bbox.b<c)this.bbox.b=c}else this.bbox={l:d,b:c,r:d,t:c}},_updateWithSegment:function(d,c){var b=d.args,e=b.length,a;switch(d.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(a=0;a<e;a+=2)this._updateBBox(b[a],
  b[a+1],c);this.last.x=b[e-2];this.last.y=b[e-1];this.absolute=!0;break;case "H":for(a=0;a<e;++a)this._updateBBox(b[a],this.last.y,c);this.last.x=b[e-1];this.absolute=!0;break;case "V":for(a=0;a<e;++a)this._updateBBox(this.last.x,b[a],c);this.last.y=b[e-1];this.absolute=!0;break;case "m":a=0;if(!("x"in this.last))this._updateBBox(this.last.x=b[0],this.last.y=b[1],c),a=2;for(;a<e;a+=2)this._updateBBox(this.last.x+=b[a],this.last.y+=b[a+1],c);this.absolute=!1;break;case "l":case "t":for(a=0;a<e;a+=2)this._updateBBox(this.last.x+=
  b[a],this.last.y+=b[a+1],c);this.absolute=!1;break;case "h":for(a=0;a<e;++a)this._updateBBox(this.last.x+=b[a],this.last.y,c);this.absolute=!1;break;case "v":for(a=0;a<e;++a)this._updateBBox(this.last.x,this.last.y+=b[a],c);this.absolute=!1;break;case "c":for(a=0;a<e;a+=6)this._updateBBox(this.last.x+b[a],this.last.y+b[a+1],c),this._updateBBox(this.last.x+b[a+2],this.last.y+b[a+3],c),this._updateBBox(this.last.x+=b[a+4],this.last.y+=b[a+5],c);this.absolute=!1;break;case "s":case "q":for(a=0;a<e;a+=
  4)this._updateBBox(this.last.x+b[a],this.last.y+b[a+1],c),this._updateBBox(this.last.x+=b[a+2],this.last.y+=b[a+3],c);this.absolute=!1;break;case "A":for(a=0;a<e;a+=7)this._updateBBox(b[a+5],b[a+6],c);this.last.x=b[e-2];this.last.y=b[e-1];this.absolute=!0;break;case "a":for(a=0;a<e;a+=7)this._updateBBox(this.last.x+=b[a+5],this.last.y+=b[a+6],c);this.absolute=!1}var g=[d.action];for(a=0;a<e;++a)g.push(i.formatNumber(b[a],!0));"string"==typeof this.shape.path?this.shape.path+=g.join(""):Array.prototype.push.apply(this.shape.path,
  g)},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(d,c){this.tbbox=null;var b=this._validSegments[d.toLowerCase()];"number"==typeof b&&(b?c.length>=b&&(b={action:d,args:c.slice(0,c.length-c.length%b)},this.segments.push(b),this._updateWithSegment(b)):(b={action:d,args:[]},this.segments.push(b),this._updateWithSegment(b)))},_collectArgs:function(d,c){for(var b=0;b<c.length;++b){var e=c[b];"boolean"==typeof e?d.push(e?1:0):"number"==typeof e?d.push(e):e instanceof Array?
  this._collectArgs(d,e):"x"in e&&"y"in e&&d.push(e.x,e.y)}},moveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"M":"m",d);return this},lineTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"L":"l",d);return this},hLineTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"H":"h",d);return this},vLineTo:function(){this._confirmSegmented();
  var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"V":"v",d);return this},curveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"C":"c",d);return this},smoothCurveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"S":"s",d);return this},qCurveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"Q":
  "q",d);return this},qSmoothCurveTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"T":"t",d);return this},arcTo:function(){this._confirmSegmented();var d=[];this._collectArgs(d,arguments);this._pushSegment(this.absolute?"A":"a",d);return this},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this},_confirmSegmented:function(){if(!this.segmented){var d=this.shape.path;this.shape.path=[];this._setPath(d);this.shape.path=
  this.shape.path.join("");this.segmented=!0}},_setPath:function(d){d=j.isArray(d)?d:d.match(i.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(d){for(var c="",b=[],e=d.length,a=0;a<e;++a){var g=d[a],h=parseFloat(g);isNaN(h)?(c&&this._pushSegment(c,b),b=[],c=g):b.push(h)}this._pushSegment(c,b)}},setShape:function(d){this.inherited(arguments,["string"==typeof d?{path:d}:d]);this.segmented=!1;this.segments=[];i.lazyPathSegmentation||this._confirmSegmented();return this},_2PI:2*
  Math.PI});h=h("dojox.gfx.path.TextPath",e,{constructor:function(){if(!("text"in this))this.text=j.clone(i.defaultTextPath);if(!("fontStyle"in this))this.fontStyle=j.clone(i.defaultFont)},getText:function(){return this.text},setText:function(d){this.text=i.makeParameters(this.text,"string"==typeof d?{text:d}:d);this._setText();return this},getFont:function(){return this.fontStyle},setFont:function(d){this.fontStyle="string"==typeof d?i.splitFontString(d):i.makeParameters(i.defaultFont,d);this._setFont();
  return this}});return i.path={Path:e,TextPath:h}})},"dojox/data/CsvStore":function(){define("dojo/_base/lang,dojo/_base/declare,dojo/_base/xhr,dojo/_base/kernel,dojo/data/util/filter,dojo/data/util/simpleFetch".split(","),function(i,j,h,g,e,d){j=j("dojox.data.CsvStore",null,{constructor:function(c){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=!1;if(c.url)this.url=c.url;this._csvData=c.data;if(c.label)this.label=c.label;else if(""===this.label)this.label=
  void 0;this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._loadInProgress=!1;this._queuedFetches=[];this.identifier=c.identifier;""===this.identifier?delete this.identifier:this._idMap={};if("separator"in c)this.separator=c.separator;if("urlPreventCache"in c)this.urlPreventCache=c.urlPreventCache?!0:!1},url:"",label:"",identifier:"",separator:",",urlPreventCache:!1,_assertIsItem:function(c){if(!this.isItem(c))throw Error(this.declaredClass+
  ": a function was passed an item argument that was not an item");},_getIndex:function(c){c=this.getIdentity(c);this.identifier&&(c=this._idMap[c]);return c},getValue:function(c,b,d){this._assertIsItem(c);var a=d;if("string"===typeof b)b=this._attributeIndexes[b],null!=b&&(a=this._dataArray[this._getIndex(c)][b]||d);else throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");return a},getValues:function(c,b){var d=this.getValue(c,b);return d?[d]:[]},getAttributes:function(c){this._assertIsItem(c);
  for(var b=[],c=this._dataArray[this._getIndex(c)],d=0;d<c.length;d++)""!==c[d]&&b.push(this._attributes[d]);return b},hasAttribute:function(c,b){this._assertIsItem(c);if("string"===typeof b){var d=this._attributeIndexes[b],a=this._dataArray[this._getIndex(c)];return"undefined"!==typeof d&&d<a.length&&""!==a[d]}throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");},containsValue:function(c,b,d){var a=void 0;"string"===typeof d&&(a=e.patternToRegExp(d,
  !1));return this._containsValue(c,b,d,a)},_containsValue:function(c,b,d,a){c=this.getValues(c,b);for(b=0;b<c.length;++b){var e=c[b];if("string"===typeof e&&a)return null!==e.match(a);if(d===e)return!0}return!1},isItem:function(c){if(c&&c[this._storeProp]===this)if(c=c[this._idProp],this.identifier){if(this._dataArray[this._idMap[c]])return!0}else if(0<=c&&c<this._dataArray.length)return!0;return!1},isItemLoaded:function(c){return this.isItem(c)},loadItem:function(){},getFeatures:function(){return this._features},
  getLabel:function(c){if(this.label&&this.isItem(c))return this.getValue(c,this.label)},getLabelAttributes:function(){return this.label?[this.label]:null},_fetchItems:function(c,b,d){var a=this,g=function(c,d){var f=null;if(c.query){var g,h,f=[],i=c.queryOptions?c.queryOptions.ignoreCase:!1,j={};for(g in c.query)h=c.query[g],"string"===typeof h&&(j[g]=e.patternToRegExp(h,i));for(i=0;i<d.length;++i){var k=!0,l=d[i];for(g in c.query)h=c.query[g],a._containsValue(l,g,h,j[g])||(k=!1);k&&f.push(l)}}else f=
  d.slice(0,d.length);b(f,c)};if(this._loadFinished)g(c,this._arrayOfAllItems);else if(""!==this.url)if(this._loadInProgress)this._queuedFetches.push({args:c,filter:g});else{this._loadInProgress=!0;var i=h.get({url:a.url,handleAs:"text",preventCache:a.urlPreventCache});i.addCallback(function(b){try{a._processData(b),g(c,a._arrayOfAllItems),a._handleQueuedFetches()}catch(e){d(e,c)}});i.addErrback(function(b){a._loadInProgress=!1;if(d)d(b,c);else throw b;});var j=null;if(c.abort)j=c.abort;c.abort=function(){i&&
  -1===i.fired&&i.cancel();j&&j.call(c)}}else if(this._csvData)try{this._processData(this._csvData),this._csvData=null,g(c,this._arrayOfAllItems)}catch(m){d(m,c)}else{var l=Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");if(d)d(l,c);else throw l;}},close:function(){},_getArrayOfArraysFromCsvFileContents:function(c){if(i.isString(c)){for(var b=RegExp("^\\s+","g"),d=RegExp("\\s+$","g"),a=RegExp('""',"g"),e=[],g=this._splitLines(c),c=0;c<g.length;++c){var h=
  g[c];if(0<h.length){for(var h=h.split(this.separator),j=0;j<h.length;){var l=h[j].replace(b,""),p=l.replace(d,""),q=p.charAt(0),s=p.charAt(p.length-1),u=p.charAt(p.length-2),v=p.charAt(p.length-3);if(2===p.length&&'""'==p)h[j]="";else if('"'==q&&('"'!=s||'"'==s&&'"'==u&&'"'!=v)){if(j+1===h.length)return;h[j]=l+this.separator+h[j+1];h.splice(j+1,1)}else'"'==q&&'"'==s&&(p=p.slice(1,p.length-1),p=p.replace(a,'"')),h[j]=p,j+=1}e.push(h)}}this._attributes=e.shift();for(c=0;c<this._attributes.length;c++)this._attributeIndexes[this._attributes[c]]=
  c;this._dataArray=e}},_splitLines:function(c){var b=[],d,a="",e=!1;for(d=0;d<c.length;d++){var g=c.charAt(d);switch(g){case '"':e=!e;a+=g;break;case "\r":e?a+=g:(b.push(a),a="",d<c.length-1&&"\n"==c.charAt(d+1)&&d++);break;case "\n":e?a+=g:(b.push(a),a="");break;default:a+=g}}""!==a&&b.push(a);return b},_processData:function(c){this._getArrayOfArraysFromCsvFileContents(c);this._arrayOfAllItems=[];if(this.identifier&&void 0===this._attributeIndexes[this.identifier])throw Error(this.declaredClass+": Identity specified is not a column header in the data set.");
  for(c=0;c<this._dataArray.length;c++){var b=c;this.identifier&&(b=this._dataArray[c][this._attributeIndexes[this.identifier]],this._idMap[b]=c);this._arrayOfAllItems.push(this._createItemFromIdentity(b))}this._loadFinished=!0;this._loadInProgress=!1},_createItemFromIdentity:function(c){var b={};b[this._storeProp]=this;b[this._idProp]=c;return b},getIdentity:function(c){return this.isItem(c)?c[this._idProp]:null},fetchItemByIdentity:function(c){var b,d=c.scope?c.scope:g.global;if(this._loadFinished)b=
  this._createItemFromIdentity(c.identity),this.isItem(b)||(b=null),c.onItem&&c.onItem.call(d,b);else{var a=this;if(""!==this.url)this._loadInProgress?this._queuedFetches.push({args:c}):(this._loadInProgress=!0,b=h.get({url:a.url,handleAs:"text"}),b.addCallback(function(b){try{a._processData(b);var e=a._createItemFromIdentity(c.identity);a.isItem(e)||(e=null);c.onItem&&c.onItem.call(d,e);a._handleQueuedFetches()}catch(g){c.onError&&c.onError.call(d,g)}}),b.addErrback(function(a){this._loadInProgress=
  !1;c.onError&&c.onError.call(d,a)}));else if(this._csvData)try{a._processData(a._csvData),a._csvData=null,b=a._createItemFromIdentity(c.identity),a.isItem(b)||(b=null),c.onItem&&c.onItem.call(d,b)}catch(e){c.onError&&c.onError.call(d,e)}}},getIdentityAttributes:function(){return this.identifier?[this.identifier]:null},_handleQueuedFetches:function(){if(0<this._queuedFetches.length){for(var c=0;c<this._queuedFetches.length;c++){var b=this._queuedFetches[c],d=b.filter,a=b.args;d?d(a,this._arrayOfAllItems):
  this.fetchItemByIdentity(b.args)}this._queuedFetches=[]}}});i.extend(j,d);return j})},"jszlib/main":function(){define(["jszlib/inflate"],function(i){return{inflate:i}})},"jszlib/inflate":function(){define(["./arrayCopy"],function(i){function j(){}function h(){this.was=[0]}function g(a,c,f){this.hufts=new Int32Array(3*b);this.window=new Uint8Array(f);this.end=f;this.checkfn=c;this.mode=k;this.reset(a,null);this.index=this.table=this.left=0;this.blens=null;this.bb=new Int32Array(1);this.tb=new Int32Array(1);
  this.codes=new e;this.check=this.write=this.read=this.bitb=this.bitk=this.last=0;this.inftree=new d}function e(){}function d(){}function c(a,b,c,d){if(null==b)return 1;for(var e=a&65535,a=a>>16&65535,f;0<d;){f=d<w?d:w;for(d-=f;16<=f;)e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=b[c++]&255,a+=e,e+=
  b[c++]&255,a+=e,e+=b[c++]&255,a+=e,f-=16;if(0!=f){do e+=b[c++]&255,a+=e;while(0!=--f)}e%=v;a%=v}return a<<16|e}var b=1440,f=["Z_OK: stream correct","Z_STREAM_END: end of stream","Z_NEED_DICT: stream not yet complete"];f[-1]="Z_ERRNO";f[-2]="Z_STREAM_ERROR";f[-3]="Z_DATA_ERROR";f[-4]="Z_MEM_ERROR";f[-5]="Z_BUF_ERROR: premature end of buffer";f[-6]="Z_VERSION_ERROR";var a=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=0,n=[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],r=[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],m=[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],l=[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],p=[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],q=[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];j.prototype.inflateInit=function(a,b){a||(a=15);b&&(b=!1);this.istate=
  new h;return this.istate.inflateInit(this,b?-a:a)};j.prototype.inflate=function(a){return null==this.istate?-2:this.istate.inflate(this,a)};j.prototype.inflateEnd=function(){if(null==this.istate)return-2;var a=istate.inflateEnd(this);this.istate=null;return a};j.prototype.inflateSync=function(){return istate.inflateSync(this)};j.prototype.inflateSetDictionary=function(a,b){return istate.inflateSetDictionary(this,a,b)};h.prototype.inflateReset=function(a){if(null==a||null==a.istate)return-2;a.total_in=
  a.total_out=0;a.msg=null;a.istate.mode=0!=a.istate.nowrap?7:0;a.istate.blocks.reset(a,null);return 0};h.prototype.inflateEnd=function(a){null!=this.blocks&&this.blocks.free(a);this.blocks=null;return 0};h.prototype.inflateInit=function(a,b){this.blocks=a.msg=null;0>b&&(b=-b);if(8>b||15<b)return this.inflateEnd(a),-2;this.wbits=b;a.istate.blocks=new g(a,0!=a.istate.nowrap?null:this,1<<b);this.inflateReset(a);return 0};h.prototype.inflate=function(a,b){var c,d;if(null==a||null==a.istate||null==a.next_in)return-2;
  b=4==b?-5:0;for(c=-5;;)switch(a.istate.mode){case 0:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;if(8!=((a.istate.method=a.next_in[a.next_in_index++])&15)){a.istate.mode=13;a.msg="unknown compression method";a.istate.marker=5;break}if((a.istate.method>>4)+8>a.istate.wbits){a.istate.mode=13;a.msg="invalid window size";a.istate.marker=5;break}a.istate.mode=1;case 1:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;d=a.next_in[a.next_in_index++]&255;if(0!=((a.istate.method<<8)+d)%31){a.istate.mode=
  13;a.msg="incorrect header check";a.istate.marker=5;break}if(0==(d&32)){a.istate.mode=7;break}a.istate.mode=2;case 2:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need=(a.next_in[a.next_in_index++]&255)<<24&4278190080;a.istate.mode=3;case 3:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<16&16711680;a.istate.mode=4;case 4:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&
  255)<<8&65280;a.istate.mode=5;case 5:if(0==a.avail_in)return c;a.avail_in--;a.total_in++;a.istate.need+=a.next_in[a.next_in_index++]&255;a.adler=a.istate.need;a.istate.mode=6;return 2;case 6:return a.istate.mode=13,a.msg="need dictionary",a.istate.marker=0,-2;case 7:c=a.istate.blocks.proc(a,c);if(-3==c){a.istate.mode=13;a.istate.marker=0;break}0==c&&(c=b);if(1!=c)return c;c=b;a.istate.blocks.reset(a,a.istate.was);if(0!=a.istate.nowrap){a.istate.mode=12;break}a.istate.mode=8;case 8:if(0==a.avail_in)return c;
  c=b;a.avail_in--;a.total_in++;a.istate.need=(a.next_in[a.next_in_index++]&255)<<24&4278190080;a.istate.mode=9;case 9:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<16&16711680;a.istate.mode=10;case 10:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=(a.next_in[a.next_in_index++]&255)<<8&65280;a.istate.mode=11;case 11:if(0==a.avail_in)return c;c=b;a.avail_in--;a.total_in++;a.istate.need+=a.next_in[a.next_in_index++]&
  255;if(a.istate.was[0]!=a.istate.need){a.istate.mode=13;a.msg="incorrect data check";a.istate.marker=5;break}a.istate.mode=12;case 12:return 1;case 13:return-3;default:return-2}};h.prototype.inflateSetDictionary=function(a,b,d){var e=0,f=d;if(null==a||null==a.istate||6!=a.istate.mode)return-2;if(c(1,b,0,d)!=a.adler)return-3;a.adler=c(0,null,0,0);f>=1<<a.istate.wbits&&(f=(1<<a.istate.wbits)-1,e=d-f);a.istate.blocks.set_dictionary(b,e,f);a.istate.mode=7;return 0};var s=[0,0,255,255];h.prototype.inflateSync=
  function(a){var b,c,d;if(null==a||null==a.istate)return-2;if(13!=a.istate.mode)a.istate.mode=13,a.istate.marker=0;if(0==(b=a.avail_in))return-5;c=a.next_in_index;for(d=a.istate.marker;0!=b&&4>d;)a.next_in[c]==s[d]?d++:d=0!=a.next_in[c]?0:4-d,c++,b--;a.total_in+=c-a.next_in_index;a.next_in_index=c;a.avail_in=b;a.istate.marker=d;if(4!=d)return-3;b=a.total_in;c=a.total_out;this.inflateReset(a);a.total_in=b;a.total_out=c;a.istate.mode=7;return 0};h.prototype.inflateSyncPoint=function(a){return null==
  a||null==a.istate||null==a.istate.blocks?-2:a.istate.blocks.sync_point()};var u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];g.prototype.reset=function(a,b){if(b)b[0]=this.check;6==this.mode&&this.codes.free(a);this.mode=k;this.read=this.write=this.bitb=this.bitk=0;if(this.checkfn)this.check=c(0,null,0,0),a.adler=this.check};g.prototype.proc=function(b,c){var d,e,f,g,h,j,l;g=b.next_in_index;h=b.avail_in;e=this.bitb;f=this.bitk;j=this.write;for(l=j<this.read?this.read-j-1:this.end-j;;)switch(this.mode){case k:for(;3>
  f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}d=e&7;this.last=d&1;switch(d>>>1){case 0:e>>>=3;f-=3;d=f&7;e>>>=d;f-=d;this.mode=1;break;case 1:var m=new Int32Array(1),p=new Int32Array(1),q=[],s=[];d=p;var v=q,w=s;m[0]=9;d[0]=5;v[0]=n;w[0]=r;this.codes.init(m[0],p[0],q[0],0,s[0],0,b);e>>>=3;f-=3;this.mode=6;break;case 2:e>>>=3;f-=3;this.mode=3;break;case 3:return e>>>=
  3,f-=3,this.mode=13,b.msg="invalid block type",c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c)}break;case 1:for(;32>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}if((~e>>>16&65535)!=(e&65535))return this.mode=13,b.msg="invalid stored block lengths",c=-3,this.bitb=e,this.bitk=f,b.avail_in=
  h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);this.left=e&65535;e=f=0;this.mode=0!=this.left?2:0!=this.last?7:k;break;case 2:if(0==h||0==l&&(j==end&&0!=read&&(j=0,l=j<this.read?this.read-j-1:this.end-j),0==l&&(this.write=j,c=this.inflate_flush(b,c),j=this.write,l=j<this.read?this.read-j-1:this.end-j,j==this.end&&0!=this.read&&(j=0,l=j<this.read?this.read-j-1:this.end-j),0==l)))return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=
  g,this.write=j,this.inflate_flush(b,c);c=0;d=this.left;d>h&&(d=h);d>l&&(d=l);i(b.next_in,g,this.window,j,d);g+=d;h-=d;j+=d;l-=d;if(0!=(this.left-=d))break;this.mode=0!=this.last?7:k;break;case 3:for(;14>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}this.table=d=e&16383;if(29<(d&31)||29<(d>>5&31))return this.mode=9,b.msg="too many length or distance symbols",c=
  -3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);d=258+(d&31)+(d>>5&31);if(null==this.blens||this.blens.length<d)this.blens=new Int32Array(d);else for(l=0;l<d;l++)this.blens[l]=0;e>>>=14;f-=14;this.index=0;this.mode=4;case 4:for(;this.index<4+(this.table>>>10);){for(;3>f;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);h--;e|=
  (b.next_in[g++]&255)<<f;f+=8}this.blens[u[this.index++]]=e&7;e>>>=3;f-=3}for(;19>this.index;)this.blens[u[this.index++]]=0;this.bb[0]=7;d=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,b);if(0!=d){c=d;if(-3==c)this.blens=null,this.mode=9;this.bitb=e;this.bitk=f;b.avail_in=h;b.total_in+=g-b.next_in_index;b.next_in_index=g;this.write=j;return this.inflate_flush(b,c)}this.index=0;this.mode=5;case 5:for(;;){d=this.table;if(!(this.index<258+(d&31)+(d>>5&31)))break;for(d=this.bb[0];f<
  d;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}d=this.hufts[3*(this.tb[0]+(e&a[d]))+1];p=this.hufts[3*(this.tb[0]+(e&a[d]))+2];if(16>p)e>>>=d,f-=d,this.blens[this.index++]=p;else{l=18==p?7:p-14;for(m=18==p?11:3;f<d+l;){if(0!=h)c=0;else return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,
  c);h--;e|=(b.next_in[g++]&255)<<f;f+=8}e>>>=d;f-=d;m+=e&a[l];e>>>=l;f-=l;l=this.index;d=this.table;if(l+m>258+(d&31)+(d>>5&31)||16==p&&1>l)return this.blens=null,this.mode=9,b.msg="invalid bit length repeat",c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);p=16==p?this.blens[l-1]:0;do this.blens[l++]=p;while(0!=--m);this.index=l}}this.tb[0]=-1;m=new Int32Array(1);p=new Int32Array(1);q=new Int32Array(1);s=new Int32Array(1);
  m[0]=9;p[0]=6;d=this.table;d=this.inftree.inflate_trees_dynamic(257+(d&31),1+(d>>5&31),this.blens,m,p,q,s,this.hufts,b);if(0!=d){if(-3==d)this.blens=null,this.mode=13;c=d;this.bitb=e;this.bitk=f;b.avail_in=h;b.total_in+=g-b.next_in_index;b.next_in_index=g;this.write=j;return this.inflate_flush(b,c)}this.codes.init(m[0],p[0],this.hufts,q[0],this.hufts,s[0],b);this.mode=6;case 6:this.bitb=e;this.bitk=f;b.avail_in=h;b.total_in+=g-b.next_in_index;b.next_in_index=g;this.write=j;if(1!=(c=this.codes.proc(this,
  b,c)))return this.inflate_flush(b,c);c=0;this.codes.free(b);g=b.next_in_index;h=b.avail_in;e=this.bitb;f=this.bitk;j=this.write;l=j<this.read?this.read-j-1:this.end-j;if(0==this.last){this.mode=k;break}this.mode=7;case 7:this.write=j;c=this.inflate_flush(b,c);j=this.write;if(this.read!=this.write)return this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);this.mode=12;case 8:return c=1,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=
  g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);case 9:return c=-3,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c);default:return c=-2,this.bitb=e,this.bitk=f,b.avail_in=h,b.total_in+=g-b.next_in_index,b.next_in_index=g,this.write=j,this.inflate_flush(b,c)}};g.prototype.free=function(a){this.reset(a,null);this.hufts=this.window=null};g.prototype.set_dictionary=function(a,b,c){i(a,b,this.window,0,c);
  this.read=this.write=c};g.prototype.sync_point=function(){return 1==this.mode};g.prototype.inflate_flush=function(a,b){var d,e,f;e=a.next_out_index;f=this.read;d=(f<=this.write?this.write:this.end)-f;if(d>a.avail_out)d=a.avail_out;0!=d&&-5==b&&(b=0);a.avail_out-=d;a.total_out+=d;if(null!=this.checkfn)this.check=c(this.check,this.window,f,d),a.adler=this.check;i(this.window,f,a.next_out,e,d);e+=d;f+=d;if(f==this.end){f=0;if(this.write==this.end)this.write=0;d=this.write-f;if(d>a.avail_out)d=a.avail_out;
  0!=d&&-5==b&&(b=0);a.avail_out-=d;a.total_out+=d;if(null!=this.checkfn)this.check=c(this.check,this.window,f,d),a.adler=this.check;i(this.window,f,a.next_out,e,d);e+=d;f+=d}a.next_out_index=e;this.read=f;return b};e.prototype.init=function(a,b,c,d,e,f){this.mode=0;this.lbits=a;this.dbits=b;this.ltree=c;this.ltree_index=d;this.dtree=e;this.dtree_index=f;this.tree=null};e.prototype.proc=function(b,c,d){var e,f,g=0,h=0,i=0,j,k,l,i=c.next_in_index;j=c.avail_in;g=b.bitb;h=b.bitk;k=b.write;for(l=k<b.read?
  b.read-k-1:b.end-k;;)switch(this.mode){case 0:if(258<=l&&10<=j&&(b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,d=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,b,c),i=c.next_in_index,j=c.avail_in,g=b.bitb,h=b.bitk,k=b.write,l=k<b.read?b.read-k-1:b.end-k,0!=d)){this.mode=1==d?7:9;break}this.need=this.lbits;this.tree=this.ltree;this.tree_index=this.ltree_index;this.mode=1;case 1:for(e=this.need;h<e;){if(0!=j)d=
  0;else return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);j--;g|=(c.next_in[i++]&255)<<h;h+=8}e=3*(this.tree_index+(g&a[e]));g>>>=this.tree[e+1];h-=this.tree[e+1];f=this.tree[e];if(0==f){this.lit=this.tree[e+2];this.mode=6;break}if(0!=(f&16)){this.get=f&15;this.len=this.tree[e+2];this.mode=2;break}if(0==(f&64)){this.need=f;this.tree_index=e/3+this.tree[e+2];break}if(0!=(f&32)){this.mode=7;break}this.mode=9;c.msg="invalid literal/length code";
  d=-3;b.bitb=g;b.bitk=h;c.avail_in=j;c.total_in+=i-c.next_in_index;c.next_in_index=i;b.write=k;return b.inflate_flush(c,d);case 2:for(e=this.get;h<e;){if(0!=j)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);j--;g|=(c.next_in[i++]&255)<<h;h+=8}this.len+=g&a[e];g>>=e;h-=e;this.need=this.dbits;this.tree=this.dtree;this.tree_index=this.dtree_index;this.mode=3;case 3:for(e=this.need;h<e;){if(0!=j)d=0;else return b.bitb=g,b.bitk=
  h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);j--;g|=(c.next_in[i++]&255)<<h;h+=8}e=3*(this.tree_index+(g&a[e]));g>>=this.tree[e+1];h-=this.tree[e+1];f=this.tree[e];if(0!=(f&16)){this.get=f&15;this.dist=this.tree[e+2];this.mode=4;break}if(0==(f&64)){this.need=f;this.tree_index=e/3+this.tree[e+2];break}this.mode=9;c.msg="invalid distance code";d=-3;b.bitb=g;b.bitk=h;c.avail_in=j;c.total_in+=i-c.next_in_index;c.next_in_index=i;b.write=k;return b.inflate_flush(c,
  d);case 4:for(e=this.get;h<e;){if(0!=j)d=0;else return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);j--;g|=(c.next_in[i++]&255)<<h;h+=8}this.dist+=g&a[e];g>>=e;h-=e;this.mode=5;case 5:for(e=k-this.dist;0>e;)e+=b.end;for(;0!=this.len;){if(0==l&&(k==b.end&&0!=b.read&&(k=0,l=k<b.read?b.read-k-1:b.end-k),0==l&&(b.write=k,d=b.inflate_flush(c,d),k=b.write,l=k<b.read?b.read-k-1:b.end-k,k==b.end&&0!=b.read&&(k=0,l=k<b.read?b.read-k-1:b.end-
  k),0==l)))return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);b.window[k++]=b.window[e++];l--;e==b.end&&(e=0);this.len--}this.mode=0;break;case 6:if(0==l&&(k==b.end&&0!=b.read&&(k=0,l=k<b.read?b.read-k-1:b.end-k),0==l&&(b.write=k,d=b.inflate_flush(c,d),k=b.write,l=k<b.read?b.read-k-1:b.end-k,k==b.end&&0!=b.read&&(k=0,l=k<b.read?b.read-k-1:b.end-k),0==l)))return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=
  i,b.write=k,b.inflate_flush(c,d);d=0;b.window[k++]=this.lit;l--;this.mode=0;break;case 7:7<h&&(h-=8,j++,i--);b.write=k;d=b.inflate_flush(c,d);k=b.write;if(b.read!=b.write)return b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);this.mode=8;case 8:return d=1,b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d);case 9:return d=-3,b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,
  c.next_in_index=i,b.write=k,b.inflate_flush(c,d);default:return d=-2,b.bitb=g,b.bitk=h,c.avail_in=j,c.total_in+=i-c.next_in_index,c.next_in_index=i,b.write=k,b.inflate_flush(c,d)}};e.prototype.free=function(){};e.prototype.inflate_fast=function(b,c,d,e,f,g,h,j){var k,l,n,m,p,q,r,s,v,w,u,G;q=j.next_in_index;r=j.avail_in;m=h.bitb;p=h.bitk;s=h.write;v=s<h.read?h.read-s-1:h.end-s;b=a[b];w=a[c];do{for(;20>p;)r--,m|=(j.next_in[q++]&255)<<p,p+=8;k=m&b;l=d;n=e;G=3*(n+k);if(0==(c=l[G]))m>>=l[G+1],p-=l[G+1],
  h.window[s++]=l[G+2],v--;else{do{m>>=l[G+1];p-=l[G+1];if(0!=(c&16)){c&=15;u=l[G+2]+(m&a[c]);m>>=c;for(p-=c;15>p;)r--,m|=(j.next_in[q++]&255)<<p,p+=8;k=m&w;l=f;n=g;G=3*(n+k);c=l[G];do if(m>>=l[G+1],p-=l[G+1],0!=(c&16)){for(c&=15;p<c;)r--,m|=(j.next_in[q++]&255)<<p,p+=8;k=l[G+2]+(m&a[c]);m>>=c;p-=c;v-=u;if(s>=k)k=s-k,h.window[s++]=h.window[k++],h.window[s++]=h.window[k++],u-=2;else{k=s-k;do k+=h.end;while(0>k);c=h.end-k;if(u>c){u-=c;if(0<s-k&&c>s-k){do h.window[s++]=h.window[k++];while(0!=--c)}else i(h.window,
  k,h.window,s,c),s+=c;k=0}}do h.window[s++]=h.window[k++];while(0!=--u);break}else if(0==(c&64))k+=l[G+2],k+=m&a[c],G=3*(n+k),c=l[G];else return j.msg="invalid distance code",u=j.avail_in-r,u=p>>3<u?p>>3:u,r+=u,q-=u,p-=u<<3,h.bitb=m,h.bitk=p,j.avail_in=r,j.total_in+=q-j.next_in_index,j.next_in_index=q,h.write=s,-3;while(1);break}if(0==(c&64)){if(k+=l[G+2],k+=m&a[c],G=3*(n+k),0==(c=l[G])){m>>=l[G+1];p-=l[G+1];h.window[s++]=l[G+2];v--;break}}else{if(0!=(c&32))return u=j.avail_in-r,u=p>>3<u?p>>3:u,r+=
  u,q-=u,p-=u<<3,h.bitb=m,h.bitk=p,j.avail_in=r,j.total_in+=q-j.next_in_index,j.next_in_index=q,h.write=s,1;j.msg="invalid literal/length code";u=j.avail_in-r;u=p>>3<u?p>>3:u;r+=u;q-=u;p-=u<<3;h.bitb=m;h.bitk=p;j.avail_in=r;j.total_in+=q-j.next_in_index;j.next_in_index=q;h.write=s;return-3}}while(1)}}while(258<=v&&10<=r);u=j.avail_in-r;u=p>>3<u?p>>3:u;q-=u;h.bitb=m;h.bitk=p-(u<<3);j.avail_in=r+u;j.total_in+=q-j.next_in_index;j.next_in_index=q;h.write=s;return 0};d.prototype.huft_build=function(a,c,
  d,e,f,g,h,j,k,l,m){var n,p,q,r,s,u,v,w,G;u=0;p=d;do this.c[a[c+u]]++,u++,p--;while(0!=p);if(this.c[0]==d)return h[0]=-1,j[0]=0;s=j[0];for(q=1;15>=q&&!(0!=this.c[q]);q++);r=q;s<q&&(s=q);for(p=15;0!=p&&!(0!=this.c[p]);p--);l=p;s>p&&(s=p);j[0]=s;for(j=1<<q;q<p;q++,j<<=1)if(0>(j-=this.c[q]))return-3;if(0>(j-=this.c[p]))return-3;this.c[p]+=j;this.x[1]=q=0;u=1;for(v=2;0!=--p;)this.x[v]=q+=this.c[u],v++,u++;u=p=0;do{if(0!=(q=a[c+u]))this.v[this.x[q]++]=p;u++}while(++p<d);d=this.x[l];u=this.x[0]=p=0;c=-1;
  w=-s;for(G=v=this.u[0]=0;r<=l;r++)for(a=this.c[r];0!=a--;){for(;r>w+s;){c++;w+=s;G=l-w;G=G>s?s:G;if((n=1<<(q=r-w))>a+1)if(n-=a+1,v=r,q<G)for(;++q<G&&!((n<<=1)<=this.c[++v]);)n-=this.c[v];G=1<<q;if(this.hn[0]+G>b)return-3;this.u[c]=v=this.hn[0];this.hn[0]+=G;0!=c?(this.x[c]=p,this.r[0]=q,this.r[1]=s,q=p>>>w-s,this.r[2]=v-this.u[c-1]-q,i(this.r,0,k,3*(this.u[c-1]+q),3)):h[0]=v}this.r[1]=r-w;u>=d?this.r[0]=192:m[u]<e?(this.r[0]=256>this.v[u]?0:96,this.r[2]=this.v[u++]):(this.r[0]=g[this.v[u]-e]+16+64,
  this.r[2]=f[this.v[u++]-e]);n=1<<r-w;for(q=p>>>w;q<G;q+=n)i(this.r,0,k,3*(v+q),3);for(q=1<<r-1;0!=(p&q);q>>>=1)p^=q;p^=q;for(q=(1<<w)-1;(p&q)!=this.x[c];)c--,w-=s,q=(1<<w)-1}return 0!=j&&1!=l?-5:0};d.prototype.inflate_trees_bits=function(a,b,c,d,e){this.initWorkArea(19);this.hn[0]=0;a=this.huft_build(a,0,19,19,null,null,c,b,d,this.hn,this.v);if(-3==a)e.msg="oversubscribed dynamic bit lengths tree";else if(-5==a||0==b[0])e.msg="incomplete dynamic bit lengths tree",a=-3;return a};d.prototype.inflate_trees_dynamic=
  function(a,b,c,d,e,f,g,h,i){this.initWorkArea(288);this.hn[0]=0;f=this.huft_build(c,0,a,257,m,l,f,d,h,this.hn,this.v);if(0!=f||0==d[0]){if(-3==f)i.msg="oversubscribed literal/length tree";else if(-4!=f)i.msg="incomplete literal/length tree",f=-3;return f}this.initWorkArea(288);f=this.huft_build(c,a,b,0,p,q,g,e,h,this.hn,this.v);if(0!=f||0==e[0]&&257<a){if(-3==f)i.msg="oversubscribed distance tree";else if(-5==f)i.msg="incomplete distance tree",f=-3;else if(-4!=f)i.msg="empty distance tree with lengths",
  f=-3;return f}return 0};d.prototype.initWorkArea=function(a){var b;if(null==this.hn)this.hn=new Int32Array(1),this.v=new Int32Array(a),this.c=new Int32Array(16),this.r=new Int32Array(3),this.u=new Int32Array(15),this.x=new Int32Array(16);if(this.v.length<a)this.v=new Int32Array(a);for(b=0;b<a;b++)this.v[b]=0;for(b=0;16>b;b++)this.c[b]=0;for(b=0;3>b;b++)this.r[b]=0;i(this.c,0,this.u,0,15);i(this.c,0,this.x,0,16)};var v=65521,w=5552;return function(a,b,c,d){a=b?new Uint8Array(a,b,c):new Uint8Array(a);
  c=new j;c.inflateInit(15,!0);c.next_in=a;c.next_in_index=0;c.avail_in=a.length;for(var a=[],e=0;;){var g=new Uint8Array(32E3);c.next_out=g;c.next_out_index=0;c.avail_out=g.length;var h=c.inflate(0);if(0!=h&&1!=h)throw a=c.msg?"object"==typeof c.msg?c.msg:"string"==typeof c.msg?Error(c.msg):Error('Unknown error in inflate: msg="'+c.msg+'", status="'+f[h]||h+'"'):Error('Inflate error, status="'+f[h]||h+'")'),a.statusCode=h,a.statusString=f[h],a;if(0!=c.avail_out){var k=new Uint8Array(g.length-c.avail_out);
  i(g,0,k,0,g.length-c.avail_out);g=k}a.push(g);e+=g.length;if(1==h)break}d&&(d[0]=(b||0)+c.next_in_index);if(1==a.length)return a[0].buffer;b=new Uint8Array(e);for(c=d=0;c<a.length;++c)h=a[c],i(h,0,b,d,h.length),d+=h.length;return b.buffer}})},"dgrid/TouchScroll":function(){define("dgrid/TouchScroll","dojo/_base/declare,dojo/on,./util/touch,./util/has-css3,put-selector/put,xstyle/css!./css/TouchScroll.css".split(","),function(i,j,h,g,e){function d(a,b,c){var d=a.touchNode,e=p[a.id],f,g,h;if("object"!==
  typeof b)h=b,b=c,c=g=!0;else{c="x"in b;g="y"in b;if(!c||!g)f=a.getScrollPosition();h=c?b.x:f.x;b=g?b.y:f.y}d.style[A]=E+-h+"px,"+-b+"px"+N;e&&c&&a._scrollbarXNode&&(a._scrollbarXNode.style[A]=E+h*e.parentWidth/e.scrollWidth+"px,0"+N);e&&g&&a._scrollbarYNode&&(a._scrollbarYNode.style[A]=E+"0,"+b*e.parentHeight/e.scrollHeight+"px"+N);j.emit(a.touchNode.parentNode,"scroll",{scrollLeft:h,scrollTop:b})}function c(a){return p[a.id]?w.exec(window.getComputedStyle(a.touchNode)[A]):v.exec(a.touchNode.style[A])}
  function b(a){var b=this.widget,b=[this.node,b._scrollbarXNode,b._scrollbarYNode],c=b.length;if(this.timer)clearTimeout(this.timer),this.timer=null;for(this.transitionHandler&&this.transitionHandler.remove();c--;)b[c]&&(b[c].style[C+"Duration"]="0");(!a||!a.preserveScrollbars)&&e(this.node.parentNode,".touchscroll-fadeout");delete this.resetEffects}function f(a){var b=a.widget,d=b.touchNode,e=b.id,f=0,g=0,i;if(h.countCurrentTouches(a,d)===b.touchesToScroll){if(i=c(b))f=+i[1],g=+i[2];if(i=p[e])i.resetEffects&&
  i.resetEffects({preserveScrollbars:!0}),d.style[A]=E+f+"px,"+g+"px"+N,q[e]=i;a=a.targetTouches[0];i=p[e]={widget:b,node:d,startX:f-a.pageX,startY:g-a.pageY,lastX:f,lastY:g,pageX:a.pageX,pageY:a.pageY,tickFunc:function(){var a=p[e],b,c;if(a)(b=v.exec(a.node.style[A]))?(c=+b[1],b=+b[2],a.velX=c-a.lastX,a.velY=b-a.lastY,a.lastX=c,a.lastY=b):a.lastX=a.lastY=0,a.timer=setTimeout(a.tickFunc,m)}};i.timer=setTimeout(i.tickFunc,m)}}function a(a){var b=a.widget,c=b.id,f=b.touchesToScroll,g=p[c],i,j;if(!g||
  (i=h.countCurrentTouches(a,b.touchNode))!==f)i>f&&b.cancelTouchScroll();else{i=a.targetTouches;f=i[0];if(!g.scrollbarsShown&&(q[c]||Math.abs(f.pageX-g.pageX)>b.scrollThreshold||Math.abs(f.pageY-g.pageY)>b.scrollThreshold)){var c=b.touchNode,k=c.parentNode,l=k.offsetWidth-u,m=k.offsetHeight-u,n=g.scrollWidth=c.scrollWidth,r=g.scrollHeight=c.scrollHeight,s=g.parentWidth=k.offsetWidth,t=g.parentHeight=k.offsetHeight;n>s?(b._scrollbarXNode||(j=e(k,"div.touchscroll-x")),j=b._scrollbarXNode=b._scrollbarXNode||
  e(j,"div.touchscroll-bar"),j.style.width=l*l/n+"px",j.style.left=c.offsetLeft+"px",e(k,".touchscroll-scrollable-x"),g.scrollableX=!0):e(k,"!touchscroll-scrollable-x");r>t?(b._scrollbarYNode||(j=e(k,"div.touchscroll-y")),j=b._scrollbarYNode=b._scrollbarYNode||e(j,"div.touchscroll-bar"),j.style.height=m*m/r+"px",j.style.top=c.offsetTop+"px",e(k,".touchscroll-scrollable-y"),g.scrollableY=!0):e(k,"!touchscroll-scrollable-y");e(k,"!touchscroll-fadeout");g.scrollbarsShown=!0;for(j=i.length;j--;)i[j].touchScrolled=
  !0}a.preventDefault();if(g.scrollbarsShown&&(g.scrollableX||g.scrollableY))a=g.scrollableX?g.startX+f.pageX:0,f=g.scrollableY?g.startY+f.pageY:0,j=g.scrollableX?-(g.scrollWidth-g.parentWidth):0,g=g.scrollableY?-(g.scrollHeight-g.parentHeight):0,0<a?a/=2:a<j&&(a=j-(j-a)/2),0<f?f/=2:f<g&&(f=g-(g-f)/2),d(b,-a,-f)}}function k(a){var b=a.widget,c=b.id;p[c]&&h.countCurrentTouches(a,b.touchNode)==b.touchesToScroll-1&&r(c)}function n(a,b,c){function d(){delete e.transitionHandler;e.resetEffects();delete p[a]}
  var e=p[a],f=e.widget,g=e.node,h=e.scrollableX?Math.max(Math.min(0,b),-(e.scrollWidth-e.parentWidth)):b,i=e.scrollableY?Math.max(Math.min(0,c),-(e.scrollHeight-e.parentHeight)):c;delete e.timer;if(h!=b||i!=c){e.transitionHandler=j.once(g,y,d);g.style[C+"Duration"]=f.bounceDuration+"ms";g.style[A]=E+h+"px,"+i+"px"+N;if(h!=b&&e.scrollableX)g=e.widget._scrollbarXNode,g.style[C+"Duration"]=f.bounceDuration+"ms",g.style[A]=b>h?E+"0,0"+N:E+(g.parentNode.offsetWidth-g.offsetWidth)+"px,0"+N;if(i!=c&&e.scrollableY)g=
  e.widget._scrollbarYNode,g.style[C+"Duration"]=f.bounceDuration+"ms",g.style[A]=c>i?E+"0,0"+N:E+"0,"+(g.parentNode.offsetHeight-g.offsetHeight)+"px"+N}else d()}function r(a){var c=p[a],e=q[a],f,g;delete q[a];c.timer&&clearTimeout(c.timer);c.resetEffects=b;(f=v.exec(c.node.style[A]))?(g=+f[1],f=+f[2]):g=f=0;if(!c.velX&&!c.velY||(0<=g||g<=-(c.scrollWidth-c.parentWidth))&&(0<=f||f<=-(c.scrollHeight-c.parentHeight)))n(a,g,f);else{if(e&&(e.velX||e.velY)&&(0>=c.velX&&0>=e.velX||0<=c.velX&&0<=e.velX)&&(0>=
  c.velY&&0>=e.velY||0<=c.velY&&0<=e.velY))c.velX=1.15*(c.velX+e.velX),c.velY=1.15*(c.velY+e.velY);c.lastX=g;c.lastY=f;c.calcFunc=function(){var b=p[a],c,e,f,g,h,i;if(b)if(c=b.widget,h=c.glideDecel(b.velX),i=c.glideDecel(b.velY),Math.abs(h)>=s||Math.abs(i)>=s){f=b.lastX+h;g=b.lastY+i;if(0<f||f<-(b.scrollWidth-b.parentWidth))for(e=6;e--;)h=c.glideDecel(h);if(0<g||g<-(b.scrollHeight-b.parentHeight))for(e=6;e--;)i=c.glideDecel(i);d(c,-f,-g);b.lastX=f;b.lastY=g;b.velX=h;b.velY=i;b.timer=setTimeout(b.calcFunc,
  l)}else n(a,b.lastX,b.lastY)};c.timer=setTimeout(c.calcFunc,l)}}var m=50,l=30,p={},q={},s=1,u=8,v=/^translate(?:3d)?\((-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,w=/^matrix\(1, 0, 0, 1, (-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,t=g("css-transitions"),y=g("transitionend"),x=g("css-transforms"),g=g("css-transforms3d"),B,C,A,E,N;g?(E="translate3d(",N=",0)"):x&&(E="translate(",N=")");if(!t||!E)return console.warn("CSS3 features unavailable for touch scroll effects."),function(){};A=g||x;A=!0===A?"transform":A+"Transform";
  C=!0===t?"transition":t+"Transition";B=!0===x?"":"-"+x.toLowerCase()+"-";return i(null,{touchesToScroll:1,touchNode:null,scrollThreshold:10,bounceDuration:300,postCreate:function(){this._initTouch();this.inherited(arguments)},_initTouch:function(){function b(){e.cancelTouchScroll()}function c(a){return function(c){c.widget=e;c.cancelTouchScroll=b;a.call(this,c)}}var d=this.touchNode=this.touchNode||this.containerNode,e=this,g;!d||!d.parentNode?console.warn("TouchScroll requires a nested node upon which to operate."):
  (g=d.parentNode,g.style.overflow="hidden",d.style[C+"Property"]=B+"transform",d.style[C+"TimingFunction"]="cubic-bezier(0.33, 0.66, 0.66, 1)",this._touchScrollListeners=[j(g,"touchstart",c(f)),j(g,"touchmove",c(a)),j(g,"touchend,touchcancel",c(k))])},destroy:function(){for(var a=this._touchScrollListeners.length;a--;)this._touchScrollListeners[a].remove();delete p[this.id];this.inherited(arguments)},scrollTo:function(a){var b=p[this.id],c=this.touchNode,e=c.parentNode;!a.preserveMomentum&&b&&b.resetEffects&&
  b.resetEffects();if(a.x)a.x=Math.max(0,Math.min(a.x,c.scrollWidth-e.offsetWidth));if(a.y)a.y=Math.max(0,Math.min(a.y,c.scrollHeight-e.offsetHeight));d(this,a)},getScrollPosition:function(){var a=c(this);return a?{x:-a[1],y:-a[2]}:{x:0,y:0}},cancelTouchScroll:function(){var a=p[this.id];a&&(a.resetEffects?a.resetEffects():(a.timer&&clearTimeout(a.timer),e(a.node.parentNode,".touchscroll-fadeout")),delete p[this.id])},glideDecel:function(a){return 0.9*a}})})},"dgrid/util/touch":function(){define("dgrid/util/touch",
  ["dojo/on","dojo/query"],function(i,j){function h(e,d,c,b){if(!(1<c.targetTouches.length)){var f=c.changedTouches[0],a=f.screenX,h=f.screenY;b&&c.preventDefault();var j=i(e,"touchend",function(c){var e=c.changedTouches[0];c.targetTouches.length||(Math.abs(e.screenX-a)<g.tapRadius&&Math.abs(e.screenY-h)<g.tapRadius&&(b&&c.preventDefault(),d.call(this,c)),j.remove())})}}var g={tapRadius:10,dbltapTime:250,selector:function(e,d,c){return function(b,f){var a=d.bubble;a?d=a:!1!==c&&(c=!0);return i(b,d,
  function(a){var d=a.target;if(3==d.nodeType)d=d.parentNode;for(;!j.matches(d,e,b);)if(d==b||!c||!(d=d.parentNode))return;return f.call(d,a)})}},countCurrentTouches:function(e,d){var c,b,f;for(c=0,b=0;f=e.touches[c];++c)d.contains(f.target)&&++b;return b},tap:function(e,d){return i(e,"touchstart",function(c){h(e,d,c)})}};g.dbltap=function(e,d){var c,b;return i(e,"touchstart",function(f){c?h(e,function(a){if(c){var e=a.changedTouches[0];Math.abs(e.screenX-c.screenX)<g.tapRadius&&Math.abs(e.screenY-
  c.screenY)<g.tapRadius&&(b&&clearTimeout(b),c=b=null,d.call(this,a))}},f,!0):h(e,function(a){c=a.changedTouches[0];b=setTimeout(function(){c=b=null},g.dbltapTime)},f)})};return g})},"dgrid/util/has-css3":function(){define("dgrid/util/has-css3",["dojo/has","xstyle/css!../css/has-transforms3d.css"],function(i){var j=["ms","O","Moz","Webkit"];i.add("css-transitions",function(h,g,e){h=e.style;if(void 0!==h.transitionProperty)return!0;for(g=j.length;g--;)if(void 0!==h[j[g]+"TransitionProperty"])return j[g];
  return!1});i.add("transitionend",function(){var h=i("css-transitions");return!h?!1:!0===h?"transitionend":{ms:"MSTransitionEnd",O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[h]});i.add("css-transforms",function(h,g,e){h=e.style;if(void 0!==h.transformProperty)return!0;for(g=j.length;g--;)if(void 0!==h[j[g]+"Transform"])return j[g];return!1});i.add("css-transforms3d",function(h,g,e){e.className="has-csstransforms3d";document.body.appendChild(e);h=e.offsetLeft;if(9===h)return!0;
  if(9<h)return(e=j[h-10])||!1;document.body.removeChild(e);e.className="";return!1});return i})},"*now":function(i){i(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])}}});(function(){var i=this.require;i({cache:{}});!i.async&&i(["dojo"]);i.boot&&i.apply(null,i.boot)})();