diff --git a/client/galaxy/scripts/mvc/tool/tool-form-base.js b/client/galaxy/scripts/mvc/tool/tool-form-base.js index d861c619b1a..2cff16dec14 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-base.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-base.js @@ -268,8 +268,11 @@ define( [ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view _templateHelp: function( options ) { var $tmpl = $( '
' ).addClass( 'ui-form-help' ).append( options.help ); $tmpl.find( 'a' ).attr( 'target', '_blank' ); - _.each($tmpl.find("img"), function(img) { - $(img).attr("src", Galaxy.root + $(img).attr("src")); + $tmpl.find("img").each( function() { + var img_src = $(this).attr("src"); + if (img_src.indexOf("admin_toolshed") !== -1){ + $(this).attr("src", Galaxy.root + img_src); + } }); return $tmpl; }, diff --git a/static/maps/mvc/tool/tool-form-base.js.map b/static/maps/mvc/tool/tool-form-base.js.map index 0ea76602d83..ec311e7f5ff 100644 --- a/static/maps/mvc/tool/tool-form-base.js.map +++ b/static/maps/mvc/tool/tool-form-base.js.map @@ -1 +1 @@ -{"version":3,"file":"tool-form-base.js","sources":["../../../src/mvc/tool/tool-form-base.js"],"names":["define","Utils","Deferred","Ui","FormBase","CitationModel","CitationView","extend","initialize","options","self","this","deferred","prototype","call","model","get","_buildForm","attributes","execute","process","_buildModel","parent","Galaxy","currHistoryPanel","listenTo","collection","$el","on","remove","hide","emit","debug","set","title","name","description","version","operations","_operations","onchange","reset","render","append","$","addClass","_footer","new_options","hide_message","id","build_url","build_data","job_id","root","params","url","data","success","display","message","update","status","persistent","resolve","window","location","error","response","error_message","err_msg","param","redirect","is","prepend","Message","large","modal","show","body","buttons","Close","reject","versions_button","ButtonMenu","icon","narrow","tooltip","sustain_version","versions","length","i","addMenu","onclick","replace","menu_button","biostar_url","open","prompt","origin","user","href","requirements","requirements_visible","portlet","collapsed","expand","_templateRequirements","sharable_url","menu","_templateHelp","citations","$citations","ToolCitationCollection","tool_id","citation_list_view","CitationListView","el","fetch","$tmpl","help","find","attr","_","each","img","nreq","requirements_message","req","requirements_link","text"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"tool-form-base.js","sources":["../../../src/mvc/tool/tool-form-base.js"],"names":["define","Utils","Deferred","Ui","FormBase","CitationModel","CitationView","extend","initialize","options","self","this","deferred","prototype","call","model","get","_buildForm","attributes","execute","process","_buildModel","parent","Galaxy","currHistoryPanel","listenTo","collection","$el","on","remove","hide","emit","debug","set","title","name","description","version","operations","_operations","onchange","reset","render","append","$","addClass","_footer","new_options","hide_message","id","build_url","build_data","job_id","root","params","url","data","success","display","message","update","status","persistent","resolve","window","location","error","response","error_message","err_msg","param","redirect","is","prepend","Message","large","modal","show","body","buttons","Close","reject","versions_button","ButtonMenu","icon","narrow","tooltip","sustain_version","versions","length","i","addMenu","onclick","replace","menu_button","biostar_url","open","prompt","origin","user","href","requirements","requirements_visible","portlet","collapsed","expand","_templateRequirements","sharable_url","menu","_templateHelp","citations","$citations","ToolCitationCollection","tool_id","citation_list_view","CitationListView","el","fetch","$tmpl","help","find","attr","each","img_src","indexOf","nreq","requirements_message","_","req","requirements_link","text"],"mappings":"AAGAA,QAAU,cAAe,iBAAkB,iBAAkB,qBAAsB,8BAA+B,8BAC9G,SAAUC,EAAOC,EAAUC,EAAIC,EAAUC,EAAeC,GACxD,MAAOF,GAASG,QACZC,WAAY,SAAUC,GAClB,GAAIC,GAAOC,IACXA,MAAKC,SAAW,GAAIV,GACpBE,EAASS,UAAUL,WAAWM,KAAMH,KAAMF,GACrCE,KAAKI,MAAMC,IAAK,UACjBL,KAAKM,WAAYN,KAAKI,MAAMG,YAE5BP,KAAKC,SAASO,QAAS,SAAUC,GAC7BV,EAAKW,YAAaD,EAASV,EAAKK,MAAMG,YAAY,KAIrDP,KAAKI,MAAMC,IAAK,sBAAyBM,OAAOC,QAAUD,OAAOC,OAAOC,kBACzEb,KAAKc,SAAUH,OAAOC,OAAOC,iBAAiBE,WAAY,SAAU,WAChEhB,EAAKK,MAAMC,IAAK,gBAIxBL,KAAKgB,IAAIC,GAAI,SAAU,WAAalB,EAAKmB,YAI7CA,OAAQ,WACJ,GAAInB,GAAOC,IACXA,MAAKgB,IAAIG,OACTnB,KAAKC,SAASO,QAAS,WACnBf,EAASS,UAAUgB,OAAOf,KAAMJ,GAChCa,OAAOQ,KAAKC,MAAO,2BAA4B,oBAKvDf,WAAY,SAAUR,GAClB,GAAIC,GAAOC,IACXA,MAAKI,MAAMkB,IAAKxB,GAChBE,KAAKI,MAAMkB,KACPC,MAAczB,EAAQyB,OAAS,MAAQzB,EAAQ0B,KAAO,QAAU1B,EAAQ2B,YAAc,oBAAsB3B,EAAQ4B,QAAU,IAC9HC,YAAe3B,KAAKI,MAAMC,IAAK,oBAAuBL,KAAK4B,cAC3DC,SAAc,WACV9B,EAAKE,SAAS6B,QACd/B,EAAKE,SAASO,QAAS,SAAWC,GAC9BV,EAAKK,MAAMC,IAAK,cAAgBI,EAASV,QAIrDC,KAAKI,MAAMC,IAAK,cAAiBL,KAAKI,MAAMC,IAAK,aAAeL,MAChEA,KAAK+B,SACC/B,KAAKI,MAAMC,IAAK,gBAClBL,KAAKgB,IAAIgB,OAAQC,EAAG,UAAWC,SAAU,uBAAwBF,OAAQhC,KAAKmC,aAKtFzB,YAAa,SAAUD,EAAS2B,EAAaC,GACzC,GAAItC,GAAOC,KACPF,EAAUE,KAAKI,MAAMG,UACzBT,GAAQ4B,QAAUU,EAAYV,QAC9B5B,EAAQwC,GAAKF,EAAYE,EAGzB,IAAIC,GAAY,GACZC,IACCJ,GAAYK,OACbF,EAAY3B,OAAO8B,KAAO,YAAcN,EAAYK,OAAS,oBAE7DF,EAAY3B,OAAO8B,KAAO,aAAe5C,EAAQwC,GAAK,SACtDE,EAAaP,EAAErC,UAAYgB,OAAO+B,QAClCH,EAAsB,eAAcA,GAAsB,QAC1D1C,EAAQ4B,UAAac,EAA2B,aAAI1C,EAAQ4B,UAIhEpC,EAAMe,KACFuC,IAAUL,EACVM,KAAUL,EACVM,QAAU,SAAUD,GAChB,MAAKA,GAAKE,SAIVhD,EAAKO,WAAYuC,IAChBR,GAAgBtC,EAAKiD,QAAQC,QAC1BC,OAAc,UACdF,QAAc,sBAAyBlD,EAAQ0B,KAAO,aAAgB1B,EAAQ4B,QAAU,SAAY5B,EAAQwC,GAAK,KACjHa,YAAc,IAElBvC,OAAOQ,KAAKC,MAAM,gCAAiC,4BAA6BwB,OAChFpC,GAAQ2C,gBAVJC,OAAOC,SAAW1C,OAAO8B,OAYjCa,MAAU,SAAUC,EAAUN,GAC1B,GAAIO,GAAkBD,GAAYA,EAASE,SAAa,iBACzC,MAAVR,EACDG,OAAOC,SAAW1C,OAAO8B,KAAO,cAAgBT,EAAE0B,OAAQC,SAAWhD,OAAO8B,KAAO,YAAc5C,EAAQwC,KACjGvC,EAAKiB,IAAI6C,GAAI,UACrB9D,EAAKiB,IAAI8C,QAAS,GAAMtE,GAAGuE,SACvBf,QAAcS,EACdP,OAAc,SACdC,YAAc,EACda,OAAc,IACbhD,KAELJ,OAAOqD,OAASrD,OAAOqD,MAAMC,MACzB3C,MAAU,sBACV4C,KAAUV,EACVW,SACIC,MAAU,WACNzD,OAAOqD,MAAM9C,WAK7BP,OAAOQ,KAAKC,MAAO,gCAAiC,qCAAsCmC,GAC1F/C,EAAQ6D,aAMpB1C,YAAa,WACT,GAAI7B,GAAOC,KACPF,EAAUE,KAAKI,MAAMG,WAGrBgE,EAAkB,GAAI/E,GAAGgF,YACzBC,KAAU,WACVlD,OAAazB,EAAQ4E,QAAU,YAAgB,KAC/CC,QAAU,+BAEd,KAAM7E,EAAQ8E,iBAAmB9E,EAAQ+E,UAAY/E,EAAQ+E,SAASC,OAAS,EAC3E,IAAM,GAAIC,KAAKjF,GAAQ+E,SAAW,CAC9B,GAAInD,GAAU5B,EAAQ+E,SAAUE,EAC3BrD,IAAW5B,EAAQ4B,SACpB6C,EAAgBS,SACZzD,MAAU,aAAeG,EACzBA,QAAUA,EACV+C,KAAU,UACVQ,QAAU,WAEN,GAAI3C,GAAKxC,EAAQwC,GAAG4C,QAASpF,EAAQ4B,QAAS1B,KAAK0B,SAC/CA,EAAU1B,KAAK0B,OAEnB3B,GAAKE,SAAS6B,QACd/B,EAAKE,SAASO,QAAS,SAAUC,GAC7BV,EAAKW,YAAaD,GAAW6B,GAAKA,EAAIZ,QAAUA,aAOpE6C,GAAgBvD,IAAIG,MAIxB,IAAIgE,GAAc,GAAI3F,GAAGgF,YACrBC,KAAU,gBACVlD,OAAazB,EAAQ4E,QAAU,WAAe,KAC9CC,QAAU,0BAiFd,OA/EK7E,GAAQsF,cACTD,EAAYH,SACRP,KAAU,qBACVlD,MAAU,YACV0D,QAAU,WACN5B,OAAOgC,KAAMvF,EAAQsF,YAAc,mBAG3CD,EAAYH,SACRP,KAAU,YACVlD,MAAU,SACV0D,QAAU,WACN5B,OAAOgC,KAAMvF,EAAQsF,YAAc,yBAA2BtF,EAAQ0B,UAIlF2D,EAAYH,SACRP,KAAU,WACVlD,MAAU,QACV0D,QAAU,WACNK,OAAQ,mCAAoCjC,OAAOC,SAASiC,OAAS3E,OAAO8B,KAAO,gBAAkB5C,EAAQwC,OAKhH1B,OAAO4E,MAAQ5E,OAAO4E,KAAKnF,IAAK,cACjC8E,EAAYH,SACRP,KAAU,cACVlD,MAAU,WACV0D,QAAU,WACN5B,OAAOC,SAASmC,KAAO7E,OAAO8B,KAAO,aAAe5C,EAAQwC,GAAK,eAGzE6C,EAAYH,SACRP,KAAU,aACVlD,MAAU,aACV0D,QAAU,WACN3F,EAAMe,KACFuC,IAAUhC,OAAO8B,KAAO,aAAe5C,EAAQwC,GAAK,UACpDQ,QAAU,WACN/C,EAAKiD,QAAQC,QAAUE,YAAa,EAAOH,QAAU,8BAA+BE,OAAS,aAEjGK,MAAU,SAAUC,GAChBzD,EAAKiD,QAAQC,QAAUE,YAAa,EAAOH,QAAUQ,EAASE,QAASR,OAAS,kBAQ/FpD,EAAQ4F,cAAgB5F,EAAQ4F,aAAaZ,OAAS,GACvDK,EAAYH,SACRP,KAAU,iBACVlD,MAAU,eACV0D,QAAU,YACAjF,KAAK2F,sBAAwB5F,EAAK6F,QAAQC,WAC5C7F,KAAK2F,sBAAuB,EAC5B5F,EAAK6F,QAAQE,SACb/F,EAAKiD,QAAQC,QAAUE,YAAa,EAAMH,QAAUjD,EAAKgG,sBAAuBjG,GAAWoD,OAAS,WAEpGlD,KAAK2F,sBAAuB,EAC5B5F,EAAKiD,QAAQC,QAAUD,QAAU,SAO5ClD,EAAQkG,cACTb,EAAYH,SACRP,KAAU,mBACVlD,MAAU,mBACV0D,QAAU,WACN5B,OAAOgC,KAAMvF,EAAQkG,kBAM7BC,KAAcd,EACdN,SAAcN,IAKtBpC,QAAS,WACL,GAAIrC,GAAUE,KAAKI,MAAMG,WACrBS,EAAMiB,EAAG,UAAWD,OAAQhC,KAAKkG,cAAepG,GACpD,IAAKA,EAAQqG,UAAY,CACrB,GAAIC,GAAanE,EAAG,UAChBkE,EAAY,GAAIzG,GAAc2G,sBAClCF,GAAUG,QAAUxG,EAAQwC,EAC5B,IAAIiE,GAAqB,GAAI5G,GAAa6G,kBAAmBC,GAAIL,EAAYrF,WAAYoF,GACzFI,GAAmBxE,SACnBoE,EAAUO,QACV1F,EAAIgB,OAAQoE,GAEhB,MAAOpF,IAIXkF,cAAe,SAAUpG,GACrB,GAAI6G,GAAQ1E,EAAG,UAAWC,SAAU,gBAAiBF,OAAQlC,EAAQ8G,KAQrE,OAPAD,GAAME,KAAM,KAAMC,KAAM,SAAU,UAClCH,EAAME,KAAK,OAAOE,KAAM,WACpB,GAAIC,GAAU/E,EAAEjC,MAAM8G,KAAK,MACe,MAAtCE,EAAQC,QAAQ,mBAChBhF,EAAEjC,MAAM8G,KAAK,MAAOlG,OAAO8B,KAAOsE,KAGnCL,GAGXZ,sBAAuB,SAAUjG,GAC7B,GAAIoH,GAAOpH,EAAQ4F,aAAaZ,MAChC,IAAKoC,EAAO,EAAI,CACZ,GAAIC,GAAuB,qBAC3BC,GAAEL,KAAMjH,EAAQ4F,aAAc,SAAU2B,EAAKtC,GACzCoC,GAAwBE,EAAI7F,MAAS6F,EAAI3F,QAAU,aAAe2F,EAAI3F,QAAU,IAAM,KAAawF,EAAO,EAAXnC,EAAe,KAASA,GAAKmC,EAAO,EAAI,QAAU,KAErJ,IAAII,GAAoBrF,EAAG,QAAS6E,KAAM,SAAU,UAAWA,KAAM,OAAQ,iDAAkDS,KAAM,OACrI,OAAOtF,GAAG,WAAYD,OAAQmF,EAAuB,YAAanF,OAAQsF,GAAoBtF,OAAQ,0BAE1G,MAAO"} \ No newline at end of file diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 1effe701cb7..faf3fe5e9f6 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -3,9 +3,9 @@ var e={multiple:this.options.multiple,containerCssClass:this.options.css,placeho this.DATA_.EntryType=i,this.DATA_.EntryKey="",this.STATE_=this.STATES_.ENTRY_KEY,t=!0):(this.error_('Unrecognized object type: "'+this.DATA_.ObjectType+'"'),this.STATE_=this.STATES_.ENTRY_OR_JUNK)}break;case this.STATES_.ENTRY_KEY:if(("{"===e||"("===e)&&null==this.BRACETYPE_){this.BRACETYPE_=e,this.BRACECOUNT_=1,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;break}/[,%\s]/.test(e)?this.DATA_.EntryKey.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):null==this.BRACETYPE_?(this.error_("No opening brace for object."),this.STATE_=this.STATES_.ENTRY_OR_JUNK):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,t=!0,this.STATE_=this.STATES_.KV_KEY,this.PARSETMP_.Key="",this.DATA_.Fields={}):(this.DATA_.EntryKey+=e,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1);break;case this.STATES_.KV_KEY:if("}"==e&&"{"==this.BRACETYPE_||")"==e&&"("==this.BRACETYPE_){this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}/[\-A-Za-z:]/.test(e)?(this.PARSETMP_.Key+=e,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1):this.PARSETMP_.Key.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.EQUALS,t=!0);break;case this.STATES_.EQUALS:if("}"==e&&"{"==this.BRACETYPE_||")"==e&&"("==this.BRACETYPE_){this.error_('Key-value pair has key "'+this.PARSETMP_.Key+'", but no value.'),this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}"="==e&&(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_VALUE,this.PARSETMP_.Value="",this.VALBRACES_={'"':[],"{":[]});break;case this.STATES_.KV_VALUE:var n=this.VALBRACES_,s=this.PARSETMP_.Value,o=!1;if('"'==e||"{"==e||"}"==e||","==e){if(","==e&&0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),o=!0}if('"'==e){if(0===n['"'].length+n["{"].length){n['"'].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1;break}1!=n['"'].length||0!=n["{"].length||0!=s.length&&"\\"==s[s.length-1]||(o=!0)}if("{"==e&&(0!=s.length&&"\\"==s[s.length-1]||(n["{"].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1)),"}"==e)if(0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),t=!0,o=!0}else 0!=s.length&&"\\"==s[s.length-1]||n["{"].length>0&&(n["{"].splice(n["{"].length-1,1),0==n["{"].length+n['"'].length&&(o=!0))}o?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_KEY,this.DATA_.Fields[this.PARSETMP_.Key]=this.PARSETMP_.Value,this.PARSETMP_={Key:""},this.VALBRACES_=null):this.PARSETMP_.Value+=e}}},this.CHARCONV_=[[/\\space /g," "],[/\\textdollar /g,"$"],[/\\textquotesingle /g,"'"],[/\\ast /g,"*"],[/\\textbackslash /g,"\\"],[/\\\^\{\}/g,"^"],[/\\textasciigrave /g,"`"],[/\\lbrace /g,"{"],[/\\vert /g,"|"],[/\\rbrace /g,"}"],[/\\textasciitilde /g,"~"],[/\\textexclamdown /g,"¡"],[/\\textcent /g,"¢"],[/\\textsterling /g,"£"],[/\\textcurrency /g,"¤"],[/\\textyen /g,"¥"],[/\\textbrokenbar /g,"¦"],[/\\textsection /g,"§"],[/\\textasciidieresis /g,"¨"],[/\\textcopyright /g,"©"],[/\\textordfeminine /g,"ª"],[/\\guillemotleft /g,"«"],[/\\lnot /g,"¬"],[/\\textregistered /g,"®"],[/\\textasciimacron /g,"¯"],[/\\textdegree /g,"°"],[/\\pm /g,"±"],[/\\textasciiacute /g,"´"],[/\\mathrm\{\\mu\}/g,"µ"],[/\\textparagraph /g,"¶"],[/\\cdot /g,"·"],[/\\c\{\}/g,"¸"],[/\\textordmasculine /g,"º"],[/\\guillemotright /g,"»"],[/\\textonequarter /g,"¼"],[/\\textonehalf /g,"½"],[/\\textthreequarters /g,"¾"],[/\\textquestiondown /g,"¿"],[/\\`\{A\}/g,"À"],[/\\'\{A\}/g,"Á"],[/\\\^\{A\}/g,"Â"],[/\\~\{A\}/g,"Ã"],[/\\"\{A\}/g,"Ä"],[/\\AA /g,"Å"],[/\\AE /g,"Æ"],[/\\c\{C\}/g,"Ç"],[/\\`\{E\}/g,"È"],[/\\'\{E\}/g,"É"],[/\\\^\{E\}/g,"Ê"],[/\\"\{E\}/g,"Ë"],[/\\`\{I\}/g,"Ì"],[/\\'\{I\}/g,"Í"],[/\\\^\{I\}/g,"Î"],[/\\"\{I\}/g,"Ï"],[/\\DH /g,"Ð"],[/\\~\{N\}/g,"Ñ"],[/\\`\{O\}/g,"Ò"],[/\\'\{O\}/g,"Ó"],[/\\\^\{O\}/g,"Ô"],[/\\~\{O\}/g,"Õ"],[/\\"\{O\}/g,"Ö"],[/\\texttimes /g,"×"],[/\\O /g,"Ø"],[/\\`\{U\}/g,"Ù"],[/\\'\{U\}/g,"Ú"],[/\\\^\{U\}/g,"Û"],[/\\"\{U\}/g,"Ü"],[/\\'\{Y\}/g,"Ý"],[/\\TH /g,"Þ"],[/\\ss /g,"ß"],[/\\`\{a\}/g,"à"],[/\\'\{a\}/g,"á"],[/\\\^\{a\}/g,"â"],[/\\~\{a\}/g,"ã"],[/\\"\{a\}/g,"ä"],[/\\aa /g,"å"],[/\\ae /g,"æ"],[/\\c\{c\}/g,"ç"],[/\\`\{e\}/g,"è"],[/\\'\{e\}/g,"é"],[/\\\^\{e\}/g,"ê"],[/\\"\{e\}/g,"ë"],[/\\`\{\\i\}/g,"ì"],[/\\'\{\\i\}/g,"í"],[/\\\^\{\\i\}/g,"î"],[/\\"\{\\i\}/g,"ï"],[/\\dh /g,"ð"],[/\\~\{n\}/g,"ñ"],[/\\`\{o\}/g,"ò"],[/\\'\{o\}/g,"ó"],[/\\\^\{o\}/g,"ô"],[/\\~\{o\}/g,"õ"],[/\\"\{o\}/g,"ö"],[/\\div /g,"÷"],[/\\o /g,"ø"],[/\\`\{u\}/g,"ù"],[/\\'\{u\}/g,"ú"],[/\\\^\{u\}/g,"û"],[/\\"\{u\}/g,"ü"],[/\\'\{y\}/g,"ý"],[/\\th /g,"þ"],[/\\"\{y\}/g,"ÿ"],[/\\=\{A\}/g,"Ā"],[/\\=\{a\}/g,"ā"],[/\\u\{A\}/g,"Ă"],[/\\u\{a\}/g,"ă"],[/\\k\{A\}/g,"Ą"],[/\\k\{a\}/g,"ą"],[/\\'\{C\}/g,"Ć"],[/\\'\{c\}/g,"ć"],[/\\\^\{C\}/g,"Ĉ"],[/\\\^\{c\}/g,"ĉ"],[/\\.\{C\}/g,"Ċ"],[/\\.\{c\}/g,"ċ"],[/\\v\{C\}/g,"Č"],[/\\v\{c\}/g,"č"],[/\\v\{D\}/g,"Ď"],[/\\v\{d\}/g,"ď"],[/\\DJ /g,"Đ"],[/\\dj /g,"đ"],[/\\=\{E\}/g,"Ē"],[/\\=\{e\}/g,"ē"],[/\\u\{E\}/g,"Ĕ"],[/\\u\{e\}/g,"ĕ"],[/\\.\{E\}/g,"Ė"],[/\\.\{e\}/g,"ė"],[/\\k\{E\}/g,"Ę"],[/\\k\{e\}/g,"ę"],[/\\v\{E\}/g,"Ě"],[/\\v\{e\}/g,"ě"],[/\\\^\{G\}/g,"Ĝ"],[/\\\^\{g\}/g,"ĝ"],[/\\u\{G\}/g,"Ğ"],[/\\u\{g\}/g,"ğ"],[/\\.\{G\}/g,"Ġ"],[/\\.\{g\}/g,"ġ"],[/\\c\{G\}/g,"Ģ"],[/\\c\{g\}/g,"ģ"],[/\\\^\{H\}/g,"Ĥ"],[/\\\^\{h\}/g,"ĥ"],[/\\Elzxh /g,"ħ"],[/\\~\{I\}/g,"Ĩ"],[/\\~\{\\i\}/g,"ĩ"],[/\\=\{I\}/g,"Ī"],[/\\=\{\\i\}/g,"ī"],[/\\u\{I\}/g,"Ĭ"],[/\\u\{\\i\}/g,"ĭ"],[/\\k\{I\}/g,"Į"],[/\\k\{i\}/g,"į"],[/\\.\{I\}/g,"İ"],[/\\i /g,"ı"],[/\\\^\{J\}/g,"Ĵ"],[/\\\^\{\\j\}/g,"ĵ"],[/\\c\{K\}/g,"Ķ"],[/\\c\{k\}/g,"ķ"],[/\\'\{L\}/g,"Ĺ"],[/\\'\{l\}/g,"ĺ"],[/\\c\{L\}/g,"Ļ"],[/\\c\{l\}/g,"ļ"],[/\\v\{L\}/g,"Ľ"],[/\\v\{l\}/g,"ľ"],[/\\L /g,"Ł"],[/\\l /g,"ł"],[/\\'\{N\}/g,"Ń"],[/\\'\{n\}/g,"ń"],[/\\c\{N\}/g,"Ņ"],[/\\c\{n\}/g,"ņ"],[/\\v\{N\}/g,"Ň"],[/\\v\{n\}/g,"ň"],[/\\NG /g,"Ŋ"],[/\\ng /g,"ŋ"],[/\\=\{O\}/g,"Ō"],[/\\=\{o\}/g,"ō"],[/\\u\{O\}/g,"Ŏ"],[/\\u\{o\}/g,"ŏ"],[/\\H\{O\}/g,"Ő"],[/\\H\{o\}/g,"ő"],[/\\OE /g,"Œ"],[/\\oe /g,"œ"],[/\\'\{R\}/g,"Ŕ"],[/\\'\{r\}/g,"ŕ"],[/\\c\{R\}/g,"Ŗ"],[/\\c\{r\}/g,"ŗ"],[/\\v\{R\}/g,"Ř"],[/\\v\{r\}/g,"ř"],[/\\'\{S\}/g,"Ś"],[/\\'\{s\}/g,"ś"],[/\\\^\{S\}/g,"Ŝ"],[/\\\^\{s\}/g,"ŝ"],[/\\c\{S\}/g,"Ş"],[/\\c\{s\}/g,"ş"],[/\\v\{S\}/g,"Š"],[/\\v\{s\}/g,"š"],[/\\c\{T\}/g,"Ţ"],[/\\c\{t\}/g,"ţ"],[/\\v\{T\}/g,"Ť"],[/\\v\{t\}/g,"ť"],[/\\~\{U\}/g,"Ũ"],[/\\~\{u\}/g,"ũ"],[/\\=\{U\}/g,"Ū"],[/\\=\{u\}/g,"ū"],[/\\u\{U\}/g,"Ŭ"],[/\\u\{u\}/g,"ŭ"],[/\\r\{U\}/g,"Ů"],[/\\r\{u\}/g,"ů"],[/\\H\{U\}/g,"Ű"],[/\\H\{u\}/g,"ű"],[/\\k\{U\}/g,"Ų"],[/\\k\{u\}/g,"ų"],[/\\\^\{W\}/g,"Ŵ"],[/\\\^\{w\}/g,"ŵ"],[/\\\^\{Y\}/g,"Ŷ"],[/\\\^\{y\}/g,"ŷ"],[/\\"\{Y\}/g,"Ÿ"],[/\\'\{Z\}/g,"Ź"],[/\\'\{z\}/g,"ź"],[/\\.\{Z\}/g,"Ż"],[/\\.\{z\}/g,"ż"],[/\\v\{Z\}/g,"Ž"],[/\\v\{z\}/g,"ž"],[/\\texthvlig /g,"ƕ"],[/\\textnrleg /g,"ƞ"],[/\\eth /g,"ƪ"],[/\\textdoublepipe /g,"ǂ"],[/\\'\{g\}/g,"ǵ"],[/\\Elztrna /g,"ɐ"],[/\\Elztrnsa /g,"ɒ"],[/\\Elzopeno /g,"ɔ"],[/\\Elzrtld /g,"ɖ"],[/\\Elzschwa /g,"ə"],[/\\varepsilon /g,"ɛ"],[/\\Elzpgamma /g,"ɣ"],[/\\Elzpbgam /g,"ɤ"],[/\\Elztrnh /g,"ɥ"],[/\\Elzbtdl /g,"ɬ"],[/\\Elzrtll /g,"ɭ"],[/\\Elztrnm /g,"ɯ"],[/\\Elztrnmlr /g,"ɰ"],[/\\Elzltlmr /g,"ɱ"],[/\\Elzltln /g,"ɲ"],[/\\Elzrtln /g,"ɳ"],[/\\Elzclomeg /g,"ɷ"],[/\\textphi /g,"ɸ"],[/\\Elztrnr /g,"ɹ"],[/\\Elztrnrl /g,"ɺ"],[/\\Elzrttrnr /g,"ɻ"],[/\\Elzrl /g,"ɼ"],[/\\Elzrtlr /g,"ɽ"],[/\\Elzfhr /g,"ɾ"],[/\\Elzrtls /g,"ʂ"],[/\\Elzesh /g,"ʃ"],[/\\Elztrnt /g,"ʇ"],[/\\Elzrtlt /g,"ʈ"],[/\\Elzpupsil /g,"ʊ"],[/\\Elzpscrv /g,"ʋ"],[/\\Elzinvv /g,"ʌ"],[/\\Elzinvw /g,"ʍ"],[/\\Elztrny /g,"ʎ"],[/\\Elzrtlz /g,"ʐ"],[/\\Elzyogh /g,"ʒ"],[/\\Elzglst /g,"ʔ"],[/\\Elzreglst /g,"ʕ"],[/\\Elzinglst /g,"ʖ"],[/\\textturnk /g,"ʞ"],[/\\Elzdyogh /g,"ʤ"],[/\\Elztesh /g,"ʧ"],[/\\textasciicaron /g,"ˇ"],[/\\Elzverts /g,"ˈ"],[/\\Elzverti /g,"ˌ"],[/\\Elzlmrk /g,"ː"],[/\\Elzhlmrk /g,"ˑ"],[/\\Elzsbrhr /g,"˒"],[/\\Elzsblhr /g,"˓"],[/\\Elzrais /g,"˔"],[/\\Elzlow /g,"˕"],[/\\textasciibreve /g,"˘"],[/\\textperiodcentered /g,"˙"],[/\\r\{\}/g,"˚"],[/\\k\{\}/g,"˛"],[/\\texttildelow /g,"˜"],[/\\H\{\}/g,"˝"],[/\\tone\{55\}/g,"˥"],[/\\tone\{44\}/g,"˦"],[/\\tone\{33\}/g,"˧"],[/\\tone\{22\}/g,"˨"],[/\\tone\{11\}/g,"˩"],[/\\cyrchar\\C/g,"̏"],[/\\Elzpalh /g,"̡"],[/\\Elzrh /g,"̢"],[/\\Elzsbbrg /g,"̪"],[/\\Elzxl /g,"̵"],[/\\Elzbar /g,"̶"],[/\\'\{A\}/g,"Ά"],[/\\'\{E\}/g,"Έ"],[/\\'\{H\}/g,"Ή"],[/\\'\{\}\{I\}/g,"Ί"],[/\\'\{\}O/g,"Ό"],[/\\mathrm\{'Y\}/g,"Ύ"],[/\\mathrm\{'\\Omega\}/g,"Ώ"],[/\\acute\{\\ddot\{\\iota\}\}/g,"ΐ"],[/\\Alpha /g,"Α"],[/\\Beta /g,"Β"],[/\\Gamma /g,"Γ"],[/\\Delta /g,"Δ"],[/\\Epsilon /g,"Ε"],[/\\Zeta /g,"Ζ"],[/\\Eta /g,"Η"],[/\\Theta /g,"Θ"],[/\\Iota /g,"Ι"],[/\\Kappa /g,"Κ"],[/\\Lambda /g,"Λ"],[/\\Xi /g,"Ξ"],[/\\Pi /g,"Π"],[/\\Rho /g,"Ρ"],[/\\Sigma /g,"Σ"],[/\\Tau /g,"Τ"],[/\\Upsilon /g,"Υ"],[/\\Phi /g,"Φ"],[/\\Chi /g,"Χ"],[/\\Psi /g,"Ψ"],[/\\Omega /g,"Ω"],[/\\mathrm\{\\ddot\{I\}\}/g,"Ϊ"],[/\\mathrm\{\\ddot\{Y\}\}/g,"Ϋ"],[/\\'\{\$\\alpha\$\}/g,"ά"],[/\\acute\{\\epsilon\}/g,"έ"],[/\\acute\{\\eta\}/g,"ή"],[/\\acute\{\\iota\}/g,"ί"],[/\\acute\{\\ddot\{\\upsilon\}\}/g,"ΰ"],[/\\alpha /g,"α"],[/\\beta /g,"β"],[/\\gamma /g,"γ"],[/\\delta /g,"δ"],[/\\epsilon /g,"ε"],[/\\zeta /g,"ζ"],[/\\eta /g,"η"],[/\\texttheta /g,"θ"],[/\\iota /g,"ι"],[/\\kappa /g,"κ"],[/\\lambda /g,"λ"],[/\\mu /g,"μ"],[/\\nu /g,"ν"],[/\\xi /g,"ξ"],[/\\pi /g,"π"],[/\\rho /g,"ρ"],[/\\varsigma /g,"ς"],[/\\sigma /g,"σ"],[/\\tau /g,"τ"],[/\\upsilon /g,"υ"],[/\\varphi /g,"φ"],[/\\chi /g,"χ"],[/\\psi /g,"ψ"],[/\\omega /g,"ω"],[/\\ddot\{\\iota\}/g,"ϊ"],[/\\ddot\{\\upsilon\}/g,"ϋ"],[/\\'\{o\}/g,"ό"],[/\\acute\{\\upsilon\}/g,"ύ"],[/\\acute\{\\omega\}/g,"ώ"],[/\\Pisymbol\{ppi022\}\{87\}/g,"ϐ"],[/\\textvartheta /g,"ϑ"],[/\\Upsilon /g,"ϒ"],[/\\phi /g,"ϕ"],[/\\varpi /g,"ϖ"],[/\\Stigma /g,"Ϛ"],[/\\Digamma /g,"Ϝ"],[/\\digamma /g,"ϝ"],[/\\Koppa /g,"Ϟ"],[/\\Sampi /g,"Ϡ"],[/\\varkappa /g,"ϰ"],[/\\varrho /g,"ϱ"],[/\\textTheta /g,"ϴ"],[/\\backepsilon /g,"϶"],[/\\cyrchar\\CYRYO /g,"Ё"],[/\\cyrchar\\CYRDJE /g,"Ђ"],[/\\cyrchar\{\\'\\CYRG\}/g,"Ѓ"],[/\\cyrchar\\CYRIE /g,"Є"],[/\\cyrchar\\CYRDZE /g,"Ѕ"],[/\\cyrchar\\CYRII /g,"І"],[/\\cyrchar\\CYRYI /g,"Ї"],[/\\cyrchar\\CYRJE /g,"Ј"],[/\\cyrchar\\CYRLJE /g,"Љ"],[/\\cyrchar\\CYRNJE /g,"Њ"],[/\\cyrchar\\CYRTSHE /g,"Ћ"],[/\\cyrchar\{\\'\\CYRK\}/g,"Ќ"],[/\\cyrchar\\CYRUSHRT /g,"Ў"],[/\\cyrchar\\CYRDZHE /g,"Џ"],[/\\cyrchar\\CYRA /g,"А"],[/\\cyrchar\\CYRB /g,"Б"],[/\\cyrchar\\CYRV /g,"В"],[/\\cyrchar\\CYRG /g,"Г"],[/\\cyrchar\\CYRD /g,"Д"],[/\\cyrchar\\CYRE /g,"Е"],[/\\cyrchar\\CYRZH /g,"Ж"],[/\\cyrchar\\CYRZ /g,"З"],[/\\cyrchar\\CYRI /g,"И"],[/\\cyrchar\\CYRISHRT /g,"Й"],[/\\cyrchar\\CYRK /g,"К"],[/\\cyrchar\\CYRL /g,"Л"],[/\\cyrchar\\CYRM /g,"М"],[/\\cyrchar\\CYRN /g,"Н"],[/\\cyrchar\\CYRO /g,"О"],[/\\cyrchar\\CYRP /g,"П"],[/\\cyrchar\\CYRR /g,"Р"],[/\\cyrchar\\CYRS /g,"С"],[/\\cyrchar\\CYRT /g,"Т"],[/\\cyrchar\\CYRU /g,"У"],[/\\cyrchar\\CYRF /g,"Ф"],[/\\cyrchar\\CYRH /g,"Х"],[/\\cyrchar\\CYRC /g,"Ц"],[/\\cyrchar\\CYRCH /g,"Ч"],[/\\cyrchar\\CYRSH /g,"Ш"],[/\\cyrchar\\CYRSHCH /g,"Щ"],[/\\cyrchar\\CYRHRDSN /g,"Ъ"],[/\\cyrchar\\CYRERY /g,"Ы"],[/\\cyrchar\\CYRSFTSN /g,"Ь"],[/\\cyrchar\\CYREREV /g,"Э"],[/\\cyrchar\\CYRYU /g,"Ю"],[/\\cyrchar\\CYRYA /g,"Я"],[/\\cyrchar\\cyra /g,"а"],[/\\cyrchar\\cyrb /g,"б"],[/\\cyrchar\\cyrv /g,"в"],[/\\cyrchar\\cyrg /g,"г"],[/\\cyrchar\\cyrd /g,"д"],[/\\cyrchar\\cyre /g,"е"],[/\\cyrchar\\cyrzh /g,"ж"],[/\\cyrchar\\cyrz /g,"з"],[/\\cyrchar\\cyri /g,"и"],[/\\cyrchar\\cyrishrt /g,"й"],[/\\cyrchar\\cyrk /g,"к"],[/\\cyrchar\\cyrl /g,"л"],[/\\cyrchar\\cyrm /g,"м"],[/\\cyrchar\\cyrn /g,"н"],[/\\cyrchar\\cyro /g,"о"],[/\\cyrchar\\cyrp /g,"п"],[/\\cyrchar\\cyrr /g,"р"],[/\\cyrchar\\cyrs /g,"с"],[/\\cyrchar\\cyrt /g,"т"],[/\\cyrchar\\cyru /g,"у"],[/\\cyrchar\\cyrf /g,"ф"],[/\\cyrchar\\cyrh /g,"х"],[/\\cyrchar\\cyrc /g,"ц"],[/\\cyrchar\\cyrch /g,"ч"],[/\\cyrchar\\cyrsh /g,"ш"],[/\\cyrchar\\cyrshch /g,"щ"],[/\\cyrchar\\cyrhrdsn /g,"ъ"],[/\\cyrchar\\cyrery /g,"ы"],[/\\cyrchar\\cyrsftsn /g,"ь"],[/\\cyrchar\\cyrerev /g,"э"],[/\\cyrchar\\cyryu /g,"ю"],[/\\cyrchar\\cyrya /g,"я"],[/\\cyrchar\\cyryo /g,"ё"],[/\\cyrchar\\cyrdje /g,"ђ"],[/\\cyrchar\{\\'\\cyrg\}/g,"ѓ"],[/\\cyrchar\\cyrie /g,"є"],[/\\cyrchar\\cyrdze /g,"ѕ"],[/\\cyrchar\\cyrii /g,"і"],[/\\cyrchar\\cyryi /g,"ї"],[/\\cyrchar\\cyrje /g,"ј"],[/\\cyrchar\\cyrlje /g,"љ"],[/\\cyrchar\\cyrnje /g,"њ"],[/\\cyrchar\\cyrtshe /g,"ћ"],[/\\cyrchar\{\\'\\cyrk\}/g,"ќ"],[/\\cyrchar\\cyrushrt /g,"ў"],[/\\cyrchar\\cyrdzhe /g,"џ"],[/\\cyrchar\\CYROMEGA /g,"Ѡ"],[/\\cyrchar\\cyromega /g,"ѡ"],[/\\cyrchar\\CYRYAT /g,"Ѣ"],[/\\cyrchar\\CYRIOTE /g,"Ѥ"],[/\\cyrchar\\cyriote /g,"ѥ"],[/\\cyrchar\\CYRLYUS /g,"Ѧ"],[/\\cyrchar\\cyrlyus /g,"ѧ"],[/\\cyrchar\\CYRIOTLYUS /g,"Ѩ"],[/\\cyrchar\\cyriotlyus /g,"ѩ"],[/\\cyrchar\\CYRBYUS /g,"Ѫ"],[/\\cyrchar\\CYRIOTBYUS /g,"Ѭ"],[/\\cyrchar\\cyriotbyus /g,"ѭ"],[/\\cyrchar\\CYRKSI /g,"Ѯ"],[/\\cyrchar\\cyrksi /g,"ѯ"],[/\\cyrchar\\CYRPSI /g,"Ѱ"],[/\\cyrchar\\cyrpsi /g,"ѱ"],[/\\cyrchar\\CYRFITA /g,"Ѳ"],[/\\cyrchar\\CYRIZH /g,"Ѵ"],[/\\cyrchar\\CYRUK /g,"Ѹ"],[/\\cyrchar\\cyruk /g,"ѹ"],[/\\cyrchar\\CYROMEGARND /g,"Ѻ"],[/\\cyrchar\\cyromegarnd /g,"ѻ"],[/\\cyrchar\\CYROMEGATITLO /g,"Ѽ"],[/\\cyrchar\\cyromegatitlo /g,"ѽ"],[/\\cyrchar\\CYROT /g,"Ѿ"],[/\\cyrchar\\cyrot /g,"ѿ"],[/\\cyrchar\\CYRKOPPA /g,"Ҁ"],[/\\cyrchar\\cyrkoppa /g,"ҁ"],[/\\cyrchar\\cyrthousands /g,"҂"],[/\\cyrchar\\cyrhundredthousands /g,"҈"],[/\\cyrchar\\cyrmillions /g,"҉"],[/\\cyrchar\\CYRSEMISFTSN /g,"Ҍ"],[/\\cyrchar\\cyrsemisftsn /g,"ҍ"],[/\\cyrchar\\CYRRTICK /g,"Ҏ"],[/\\cyrchar\\cyrrtick /g,"ҏ"],[/\\cyrchar\\CYRGUP /g,"Ґ"],[/\\cyrchar\\cyrgup /g,"ґ"],[/\\cyrchar\\CYRGHCRS /g,"Ғ"],[/\\cyrchar\\cyrghcrs /g,"ғ"],[/\\cyrchar\\CYRGHK /g,"Ҕ"],[/\\cyrchar\\cyrghk /g,"ҕ"],[/\\cyrchar\\CYRZHDSC /g,"Җ"],[/\\cyrchar\\cyrzhdsc /g,"җ"],[/\\cyrchar\\CYRZDSC /g,"Ҙ"],[/\\cyrchar\\cyrzdsc /g,"ҙ"],[/\\cyrchar\\CYRKDSC /g,"Қ"],[/\\cyrchar\\cyrkdsc /g,"қ"],[/\\cyrchar\\CYRKVCRS /g,"Ҝ"],[/\\cyrchar\\cyrkvcrs /g,"ҝ"],[/\\cyrchar\\CYRKHCRS /g,"Ҟ"],[/\\cyrchar\\cyrkhcrs /g,"ҟ"],[/\\cyrchar\\CYRKBEAK /g,"Ҡ"],[/\\cyrchar\\cyrkbeak /g,"ҡ"],[/\\cyrchar\\CYRNDSC /g,"Ң"],[/\\cyrchar\\cyrndsc /g,"ң"],[/\\cyrchar\\CYRNG /g,"Ҥ"],[/\\cyrchar\\cyrng /g,"ҥ"],[/\\cyrchar\\CYRPHK /g,"Ҧ"],[/\\cyrchar\\cyrphk /g,"ҧ"],[/\\cyrchar\\CYRABHHA /g,"Ҩ"],[/\\cyrchar\\cyrabhha /g,"ҩ"],[/\\cyrchar\\CYRSDSC /g,"Ҫ"],[/\\cyrchar\\cyrsdsc /g,"ҫ"],[/\\cyrchar\\CYRTDSC /g,"Ҭ"],[/\\cyrchar\\cyrtdsc /g,"ҭ"],[/\\cyrchar\\CYRY /g,"Ү"],[/\\cyrchar\\cyry /g,"ү"],[/\\cyrchar\\CYRYHCRS /g,"Ұ"],[/\\cyrchar\\cyryhcrs /g,"ұ"],[/\\cyrchar\\CYRHDSC /g,"Ҳ"],[/\\cyrchar\\cyrhdsc /g,"ҳ"],[/\\cyrchar\\CYRTETSE /g,"Ҵ"],[/\\cyrchar\\cyrtetse /g,"ҵ"],[/\\cyrchar\\CYRCHRDSC /g,"Ҷ"],[/\\cyrchar\\cyrchrdsc /g,"ҷ"],[/\\cyrchar\\CYRCHVCRS /g,"Ҹ"],[/\\cyrchar\\cyrchvcrs /g,"ҹ"],[/\\cyrchar\\CYRSHHA /g,"Һ"],[/\\cyrchar\\cyrshha /g,"һ"],[/\\cyrchar\\CYRABHCH /g,"Ҽ"],[/\\cyrchar\\cyrabhch /g,"ҽ"],[/\\cyrchar\\CYRABHCHDSC /g,"Ҿ"],[/\\cyrchar\\cyrabhchdsc /g,"ҿ"],[/\\cyrchar\\CYRpalochka /g,"Ӏ"],[/\\cyrchar\\CYRKHK /g,"Ӄ"],[/\\cyrchar\\cyrkhk /g,"ӄ"],[/\\cyrchar\\CYRNHK /g,"Ӈ"],[/\\cyrchar\\cyrnhk /g,"ӈ"],[/\\cyrchar\\CYRCHLDSC /g,"Ӌ"],[/\\cyrchar\\cyrchldsc /g,"ӌ"],[/\\cyrchar\\CYRAE /g,"Ӕ"],[/\\cyrchar\\cyrae /g,"ӕ"],[/\\cyrchar\\CYRSCHWA /g,"Ә"],[/\\cyrchar\\cyrschwa /g,"ә"],[/\\cyrchar\\CYRABHDZE /g,"Ӡ"],[/\\cyrchar\\cyrabhdze /g,"ӡ"],[/\\cyrchar\\CYROTLD /g,"Ө"],[/\\cyrchar\\cyrotld /g,"ө"],[/\\hspace\{0.6em\}/g," "],[/\\hspace\{1em\}/g," "],[/\\hspace\{0.33em\}/g," "],[/\\hspace\{0.25em\}/g," "],[/\\hspace\{0.166em\}/g," "],[/\\hphantom\{0\}/g," "],[/\\hphantom\{,\}/g," "],[/\\hspace\{0.167em\}/g," "],[/\\mkern1mu /g," "],[/\\textendash /g,"–"],[/\\textemdash /g,"—"],[/\\rule\{1em\}\{1pt\}/g,"―"],[/\\Vert /g,"‖"],[/\\Elzreapos /g,"‛"],[/\\textquotedblleft /g,"“"],[/\\textquotedblright /g,"”"],[/\\textdagger /g,"†"],[/\\textdaggerdbl /g,"‡"],[/\\textbullet /g,"•"],[/\\ldots /g,"…"],[/\\textperthousand /g,"‰"],[/\\textpertenthousand /g,"‱"],[/\\backprime /g,"‵"],[/\\guilsinglleft /g,"‹"],[/\\guilsinglright /g,"›"],[/\\mkern4mu /g," "],[/\\nolinebreak /g,""],[/\\ensuremath\{\\Elzpes\}/g,"₧"],[/\\mbox\{\\texteuro\} /g,"€"],[/\\dddot /g,"⃛"],[/\\ddddot /g,"⃜"],[/\\mathbb\{C\}/g,"ℂ"],[/\\mathscr\{g\}/g,"ℊ"],[/\\mathscr\{H\}/g,"ℋ"],[/\\mathfrak\{H\}/g,"ℌ"],[/\\mathbb\{H\}/g,"ℍ"],[/\\hslash /g,"ℏ"],[/\\mathscr\{I\}/g,"ℐ"],[/\\mathfrak\{I\}/g,"ℑ"],[/\\mathscr\{L\}/g,"ℒ"],[/\\mathscr\{l\}/g,"ℓ"],[/\\mathbb\{N\}/g,"ℕ"],[/\\cyrchar\\textnumero /g,"№"],[/\\wp /g,"℘"],[/\\mathbb\{P\}/g,"ℙ"],[/\\mathbb\{Q\}/g,"ℚ"],[/\\mathscr\{R\}/g,"ℛ"],[/\\mathfrak\{R\}/g,"ℜ"],[/\\mathbb\{R\}/g,"ℝ"],[/\\Elzxrat /g,"℞"],[/\\texttrademark /g,"™"],[/\\mathbb\{Z\}/g,"ℤ"],[/\\Omega /g,"Ω"],[/\\mho /g,"℧"],[/\\mathfrak\{Z\}/g,"ℨ"],[/\\ElsevierGlyph\{2129\}/g,"℩"],[/\\AA /g,"Å"],[/\\mathscr\{B\}/g,"ℬ"],[/\\mathfrak\{C\}/g,"ℭ"],[/\\mathscr\{e\}/g,"ℯ"],[/\\mathscr\{E\}/g,"ℰ"],[/\\mathscr\{F\}/g,"ℱ"],[/\\mathscr\{M\}/g,"ℳ"],[/\\mathscr\{o\}/g,"ℴ"],[/\\aleph /g,"ℵ"],[/\\beth /g,"ℶ"],[/\\gimel /g,"ℷ"],[/\\daleth /g,"ℸ"],[/\\textfrac\{1\}\{3\}/g,"⅓"],[/\\textfrac\{2\}\{3\}/g,"⅔"],[/\\textfrac\{1\}\{5\}/g,"⅕"],[/\\textfrac\{2\}\{5\}/g,"⅖"],[/\\textfrac\{3\}\{5\}/g,"⅗"],[/\\textfrac\{4\}\{5\}/g,"⅘"],[/\\textfrac\{1\}\{6\}/g,"⅙"],[/\\textfrac\{5\}\{6\}/g,"⅚"],[/\\textfrac\{1\}\{8\}/g,"⅛"],[/\\textfrac\{3\}\{8\}/g,"⅜"],[/\\textfrac\{5\}\{8\}/g,"⅝"],[/\\textfrac\{7\}\{8\}/g,"⅞"],[/\\leftarrow /g,"←"],[/\\uparrow /g,"↑"],[/\\rightarrow /g,"→"],[/\\downarrow /g,"↓"],[/\\leftrightarrow /g,"↔"],[/\\updownarrow /g,"↕"],[/\\nwarrow /g,"↖"],[/\\nearrow /g,"↗"],[/\\searrow /g,"↘"],[/\\swarrow /g,"↙"],[/\\nleftarrow /g,"↚"],[/\\nrightarrow /g,"↛"],[/\\arrowwaveright /g,"↜"],[/\\arrowwaveright /g,"↝"],[/\\twoheadleftarrow /g,"↞"],[/\\twoheadrightarrow /g,"↠"],[/\\leftarrowtail /g,"↢"],[/\\rightarrowtail /g,"↣"],[/\\mapsto /g,"↦"],[/\\hookleftarrow /g,"↩"],[/\\hookrightarrow /g,"↪"],[/\\looparrowleft /g,"↫"],[/\\looparrowright /g,"↬"],[/\\leftrightsquigarrow /g,"↭"],[/\\nleftrightarrow /g,"↮"],[/\\Lsh /g,"↰"],[/\\Rsh /g,"↱"],[/\\ElsevierGlyph\{21B3\}/g,"↳"],[/\\curvearrowleft /g,"↶"],[/\\curvearrowright /g,"↷"],[/\\circlearrowleft /g,"↺"],[/\\circlearrowright /g,"↻"],[/\\leftharpoonup /g,"↼"],[/\\leftharpoondown /g,"↽"],[/\\upharpoonright /g,"↾"],[/\\upharpoonleft /g,"↿"],[/\\rightharpoonup /g,"⇀"],[/\\rightharpoondown /g,"⇁"],[/\\downharpoonright /g,"⇂"],[/\\downharpoonleft /g,"⇃"],[/\\rightleftarrows /g,"⇄"],[/\\dblarrowupdown /g,"⇅"],[/\\leftrightarrows /g,"⇆"],[/\\leftleftarrows /g,"⇇"],[/\\upuparrows /g,"⇈"],[/\\rightrightarrows /g,"⇉"],[/\\downdownarrows /g,"⇊"],[/\\leftrightharpoons /g,"⇋"],[/\\rightleftharpoons /g,"⇌"],[/\\nLeftarrow /g,"⇍"],[/\\nLeftrightarrow /g,"⇎"],[/\\nRightarrow /g,"⇏"],[/\\Leftarrow /g,"⇐"],[/\\Uparrow /g,"⇑"],[/\\Rightarrow /g,"⇒"],[/\\Downarrow /g,"⇓"],[/\\Leftrightarrow /g,"⇔"],[/\\Updownarrow /g,"⇕"],[/\\Lleftarrow /g,"⇚"],[/\\Rrightarrow /g,"⇛"],[/\\rightsquigarrow /g,"⇝"],[/\\DownArrowUpArrow /g,"⇵"],[/\\forall /g,"∀"],[/\\complement /g,"∁"],[/\\partial /g,"∂"],[/\\exists /g,"∃"],[/\\nexists /g,"∄"],[/\\varnothing /g,"∅"],[/\\nabla /g,"∇"],[/\\in /g,"∈"],[/\\not\\in /g,"∉"],[/\\ni /g,"∋"],[/\\not\\ni /g,"∌"],[/\\prod /g,"∏"],[/\\coprod /g,"∐"],[/\\sum /g,"∑"],[/\\mp /g,"∓"],[/\\dotplus /g,"∔"],[/\\setminus /g,"∖"],[/\\circ /g,"∘"],[/\\bullet /g,"∙"],[/\\surd /g,"√"],[/\\propto /g,"∝"],[/\\infty /g,"∞"],[/\\rightangle /g,"∟"],[/\\angle /g,"∠"],[/\\measuredangle /g,"∡"],[/\\sphericalangle /g,"∢"],[/\\mid /g,"∣"],[/\\nmid /g,"∤"],[/\\parallel /g,"∥"],[/\\nparallel /g,"∦"],[/\\wedge /g,"∧"],[/\\vee /g,"∨"],[/\\cap /g,"∩"],[/\\cup /g,"∪"],[/\\int /g,"∫"],[/\\int\\!\\int /g,"∬"],[/\\int\\!\\int\\!\\int /g,"∭"],[/\\oint /g,"∮"],[/\\surfintegral /g,"∯"],[/\\volintegral /g,"∰"],[/\\clwintegral /g,"∱"],[/\\ElsevierGlyph\{2232\}/g,"∲"],[/\\ElsevierGlyph\{2233\}/g,"∳"],[/\\therefore /g,"∴"],[/\\because /g,"∵"],[/\\Colon /g,"∷"],[/\\ElsevierGlyph\{2238\}/g,"∸"],[/\\mathbin\{\{:\}\\!\\!\{\-\}\\!\\!\{:\}\}/g,"∺"],[/\\homothetic /g,"∻"],[/\\sim /g,"∼"],[/\\backsim /g,"∽"],[/\\lazysinv /g,"∾"],[/\\wr /g,"≀"],[/\\not\\sim /g,"≁"],[/\\ElsevierGlyph\{2242\}/g,"≂"],[/\\NotEqualTilde /g,"≂-00338"],[/\\simeq /g,"≃"],[/\\not\\simeq /g,"≄"],[/\\cong /g,"≅"],[/\\approxnotequal /g,"≆"],[/\\not\\cong /g,"≇"],[/\\approx /g,"≈"],[/\\not\\approx /g,"≉"],[/\\approxeq /g,"≊"],[/\\tildetrpl /g,"≋"],[/\\not\\apid /g,"≋-00338"],[/\\allequal /g,"≌"],[/\\asymp /g,"≍"],[/\\Bumpeq /g,"≎"],[/\\NotHumpDownHump /g,"≎-00338"],[/\\bumpeq /g,"≏"],[/\\NotHumpEqual /g,"≏-00338"],[/\\doteq /g,"≐"],[/\\not\\doteq/g,"≐-00338"],[/\\doteqdot /g,"≑"],[/\\fallingdotseq /g,"≒"],[/\\risingdotseq /g,"≓"],[/\\eqcirc /g,"≖"],[/\\circeq /g,"≗"],[/\\estimates /g,"≙"],[/\\ElsevierGlyph\{225A\}/g,"≚"],[/\\starequal /g,"≛"],[/\\triangleq /g,"≜"],[/\\ElsevierGlyph\{225F\}/g,"≟"],[/\\not =/g,"≠"],[/\\equiv /g,"≡"],[/\\not\\equiv /g,"≢"],[/\\leq /g,"≤"],[/\\geq /g,"≥"],[/\\leqq /g,"≦"],[/\\geqq /g,"≧"],[/\\lneqq /g,"≨"],[/\\lvertneqq /g,"≨-0FE00"],[/\\gneqq /g,"≩"],[/\\gvertneqq /g,"≩-0FE00"],[/\\ll /g,"≪"],[/\\NotLessLess /g,"≪-00338"],[/\\gg /g,"≫"],[/\\NotGreaterGreater /g,"≫-00338"],[/\\between /g,"≬"],[/\\not\\kern\-0.3em\\times /g,"≭"],[/\\not/g,"≯"],[/\\not\\leq /g,"≰"],[/\\not\\geq /g,"≱"],[/\\lessequivlnt /g,"≲"],[/\\greaterequivlnt /g,"≳"],[/\\ElsevierGlyph\{2274\}/g,"≴"],[/\\ElsevierGlyph\{2275\}/g,"≵"],[/\\lessgtr /g,"≶"],[/\\gtrless /g,"≷"],[/\\notlessgreater /g,"≸"],[/\\notgreaterless /g,"≹"],[/\\prec /g,"≺"],[/\\succ /g,"≻"],[/\\preccurlyeq /g,"≼"],[/\\succcurlyeq /g,"≽"],[/\\precapprox /g,"≾"],[/\\NotPrecedesTilde /g,"≾-00338"],[/\\succapprox /g,"≿"],[/\\NotSucceedsTilde /g,"≿-00338"],[/\\not\\prec /g,"⊀"],[/\\not\\succ /g,"⊁"],[/\\subset /g,"⊂"],[/\\supset /g,"⊃"],[/\\not\\subset /g,"⊄"],[/\\not\\supset /g,"⊅"],[/\\subseteq /g,"⊆"],[/\\supseteq /g,"⊇"],[/\\not\\subseteq /g,"⊈"],[/\\not\\supseteq /g,"⊉"],[/\\subsetneq /g,"⊊"],[/\\varsubsetneqq /g,"⊊-0FE00"],[/\\supsetneq /g,"⊋"],[/\\varsupsetneq /g,"⊋-0FE00"],[/\\uplus /g,"⊎"],[/\\sqsubset /g,"⊏"],[/\\NotSquareSubset /g,"⊏-00338"],[/\\sqsupset /g,"⊐"],[/\\NotSquareSuperset /g,"⊐-00338"],[/\\sqsubseteq /g,"⊑"],[/\\sqsupseteq /g,"⊒"],[/\\sqcap /g,"⊓"],[/\\sqcup /g,"⊔"],[/\\oplus /g,"⊕"],[/\\ominus /g,"⊖"],[/\\otimes /g,"⊗"],[/\\oslash /g,"⊘"],[/\\odot /g,"⊙"],[/\\circledcirc /g,"⊚"],[/\\circledast /g,"⊛"],[/\\circleddash /g,"⊝"],[/\\boxplus /g,"⊞"],[/\\boxminus /g,"⊟"],[/\\boxtimes /g,"⊠"],[/\\boxdot /g,"⊡"],[/\\vdash /g,"⊢"],[/\\dashv /g,"⊣"],[/\\top /g,"⊤"],[/\\perp /g,"⊥"],[/\\truestate /g,"⊧"],[/\\forcesextra /g,"⊨"],[/\\Vdash /g,"⊩"],[/\\Vvdash /g,"⊪"],[/\\VDash /g,"⊫"],[/\\nvdash /g,"⊬"],[/\\nvDash /g,"⊭"],[/\\nVdash /g,"⊮"],[/\\nVDash /g,"⊯"],[/\\vartriangleleft /g,"⊲"],[/\\vartriangleright /g,"⊳"],[/\\trianglelefteq /g,"⊴"],[/\\trianglerighteq /g,"⊵"],[/\\original /g,"⊶"],[/\\image /g,"⊷"],[/\\multimap /g,"⊸"],[/\\hermitconjmatrix /g,"⊹"],[/\\intercal /g,"⊺"],[/\\veebar /g,"⊻"],[/\\rightanglearc /g,"⊾"],[/\\ElsevierGlyph\{22C0\}/g,"⋀"],[/\\ElsevierGlyph\{22C1\}/g,"⋁"],[/\\bigcap /g,"⋂"],[/\\bigcup /g,"⋃"],[/\\diamond /g,"⋄"],[/\\cdot /g,"⋅"],[/\\star /g,"⋆"],[/\\divideontimes /g,"⋇"],[/\\bowtie /g,"⋈"],[/\\ltimes /g,"⋉"],[/\\rtimes /g,"⋊"],[/\\leftthreetimes /g,"⋋"],[/\\rightthreetimes /g,"⋌"],[/\\backsimeq /g,"⋍"],[/\\curlyvee /g,"⋎"],[/\\curlywedge /g,"⋏"],[/\\Subset /g,"⋐"],[/\\Supset /g,"⋑"],[/\\Cap /g,"⋒"],[/\\Cup /g,"⋓"],[/\\pitchfork /g,"⋔"],[/\\lessdot /g,"⋖"],[/\\gtrdot /g,"⋗"],[/\\verymuchless /g,"⋘"],[/\\verymuchgreater /g,"⋙"],[/\\lesseqgtr /g,"⋚"],[/\\gtreqless /g,"⋛"],[/\\curlyeqprec /g,"⋞"],[/\\curlyeqsucc /g,"⋟"],[/\\not\\sqsubseteq /g,"⋢"],[/\\not\\sqsupseteq /g,"⋣"],[/\\Elzsqspne /g,"⋥"],[/\\lnsim /g,"⋦"],[/\\gnsim /g,"⋧"],[/\\precedesnotsimilar /g,"⋨"],[/\\succnsim /g,"⋩"],[/\\ntriangleleft /g,"⋪"],[/\\ntriangleright /g,"⋫"],[/\\ntrianglelefteq /g,"⋬"],[/\\ntrianglerighteq /g,"⋭"],[/\\vdots /g,"⋮"],[/\\cdots /g,"⋯"],[/\\upslopeellipsis /g,"⋰"],[/\\downslopeellipsis /g,"⋱"],[/\\barwedge /g,"⌅"],[/\\perspcorrespond /g,"⌆"],[/\\lceil /g,"⌈"],[/\\rceil /g,"⌉"],[/\\lfloor /g,"⌊"],[/\\rfloor /g,"⌋"],[/\\recorder /g,"⌕"],[/\\mathchar"2208/g,"⌖"],[/\\ulcorner /g,"⌜"],[/\\urcorner /g,"⌝"],[/\\llcorner /g,"⌞"],[/\\lrcorner /g,"⌟"],[/\\frown /g,"⌢"],[/\\smile /g,"⌣"],[/\\langle /g,"〈"],[/\\rangle /g,"〉"],[/\\ElsevierGlyph\{E838\}/g,"⌽"],[/\\Elzdlcorn /g,"⎣"],[/\\lmoustache /g,"⎰"],[/\\rmoustache /g,"⎱"],[/\\textvisiblespace /g,"␣"],[/\\ding\{172\}/g,"①"],[/\\ding\{173\}/g,"②"],[/\\ding\{174\}/g,"③"],[/\\ding\{175\}/g,"④"],[/\\ding\{176\}/g,"⑤"],[/\\ding\{177\}/g,"⑥"],[/\\ding\{178\}/g,"⑦"],[/\\ding\{179\}/g,"⑧"],[/\\ding\{180\}/g,"⑨"],[/\\ding\{181\}/g,"⑩"],[/\\circledS /g,"Ⓢ"],[/\\Elzdshfnc /g,"┆"],[/\\Elzsqfnw /g,"┙"],[/\\diagup /g,"╱"],[/\\ding\{110\}/g,"■"],[/\\square /g,"□"],[/\\blacksquare /g,"▪"],[/\\fbox\{~~\}/g,"▭"],[/\\Elzvrecto /g,"▯"],[/\\ElsevierGlyph\{E381\}/g,"▱"],[/\\ding\{115\}/g,"▲"],[/\\bigtriangleup /g,"△"],[/\\blacktriangle /g,"▴"],[/\\vartriangle /g,"▵"],[/\\blacktriangleright /g,"▸"],[/\\triangleright /g,"▹"],[/\\ding\{116\}/g,"▼"],[/\\bigtriangledown /g,"▽"],[/\\blacktriangledown /g,"▾"],[/\\triangledown /g,"▿"],[/\\blacktriangleleft /g,"◂"],[/\\triangleleft /g,"◃"],[/\\ding\{117\}/g,"◆"],[/\\lozenge /g,"◊"],[/\\bigcirc /g,"○"],[/\\ding\{108\}/g,"●"],[/\\Elzcirfl /g,"◐"],[/\\Elzcirfr /g,"◑"],[/\\Elzcirfb /g,"◒"],[/\\ding\{119\}/g,"◗"],[/\\Elzrvbull /g,"◘"],[/\\Elzsqfl /g,"◧"],[/\\Elzsqfr /g,"◨"],[/\\Elzsqfse /g,"◪"],[/\\bigcirc /g,"◯"],[/\\ding\{72\}/g,"★"],[/\\ding\{73\}/g,"☆"],[/\\ding\{37\}/g,"☎"],[/\\ding\{42\}/g,"☛"],[/\\ding\{43\}/g,"☞"],[/\\rightmoon /g,"☾"],[/\\mercury /g,"☿"],[/\\venus /g,"♀"],[/\\male /g,"♂"],[/\\jupiter /g,"♃"],[/\\saturn /g,"♄"],[/\\uranus /g,"♅"],[/\\neptune /g,"♆"],[/\\pluto /g,"♇"],[/\\aries /g,"♈"],[/\\taurus /g,"♉"],[/\\gemini /g,"♊"],[/\\cancer /g,"♋"],[/\\leo /g,"♌"],[/\\virgo /g,"♍"],[/\\libra /g,"♎"],[/\\scorpio /g,"♏"],[/\\sagittarius /g,"♐"],[/\\capricornus /g,"♑"],[/\\aquarius /g,"♒"],[/\\pisces /g,"♓"],[/\\ding\{171\}/g,"♠"],[/\\diamond /g,"♢"],[/\\ding\{168\}/g,"♣"],[/\\ding\{170\}/g,"♥"],[/\\ding\{169\}/g,"♦"],[/\\quarternote /g,"♩"],[/\\eighthnote /g,"♪"],[/\\flat /g,"♭"],[/\\natural /g,"♮"],[/\\sharp /g,"♯"],[/\\ding\{33\}/g,"✁"],[/\\ding\{34\}/g,"✂"],[/\\ding\{35\}/g,"✃"],[/\\ding\{36\}/g,"✄"],[/\\ding\{38\}/g,"✆"],[/\\ding\{39\}/g,"✇"],[/\\ding\{40\}/g,"✈"],[/\\ding\{41\}/g,"✉"],[/\\ding\{44\}/g,"✌"],[/\\ding\{45\}/g,"✍"],[/\\ding\{46\}/g,"✎"],[/\\ding\{47\}/g,"✏"],[/\\ding\{48\}/g,"✐"],[/\\ding\{49\}/g,"✑"],[/\\ding\{50\}/g,"✒"],[/\\ding\{51\}/g,"✓"],[/\\ding\{52\}/g,"✔"],[/\\ding\{53\}/g,"✕"],[/\\ding\{54\}/g,"✖"],[/\\ding\{55\}/g,"✗"],[/\\ding\{56\}/g,"✘"],[/\\ding\{57\}/g,"✙"],[/\\ding\{58\}/g,"✚"],[/\\ding\{59\}/g,"✛"],[/\\ding\{60\}/g,"✜"],[/\\ding\{61\}/g,"✝"],[/\\ding\{62\}/g,"✞"],[/\\ding\{63\}/g,"✟"],[/\\ding\{64\}/g,"✠"],[/\\ding\{65\}/g,"✡"],[/\\ding\{66\}/g,"✢"],[/\\ding\{67\}/g,"✣"],[/\\ding\{68\}/g,"✤"],[/\\ding\{69\}/g,"✥"],[/\\ding\{70\}/g,"✦"],[/\\ding\{71\}/g,"✧"],[/\\ding\{73\}/g,"✩"],[/\\ding\{74\}/g,"✪"],[/\\ding\{75\}/g,"✫"],[/\\ding\{76\}/g,"✬"],[/\\ding\{77\}/g,"✭"],[/\\ding\{78\}/g,"✮"],[/\\ding\{79\}/g,"✯"],[/\\ding\{80\}/g,"✰"],[/\\ding\{81\}/g,"✱"],[/\\ding\{82\}/g,"✲"],[/\\ding\{83\}/g,"✳"],[/\\ding\{84\}/g,"✴"],[/\\ding\{85\}/g,"✵"],[/\\ding\{86\}/g,"✶"],[/\\ding\{87\}/g,"✷"],[/\\ding\{88\}/g,"✸"],[/\\ding\{89\}/g,"✹"],[/\\ding\{90\}/g,"✺"],[/\\ding\{91\}/g,"✻"],[/\\ding\{92\}/g,"✼"],[/\\ding\{93\}/g,"✽"],[/\\ding\{94\}/g,"✾"],[/\\ding\{95\}/g,"✿"],[/\\ding\{96\}/g,"❀"],[/\\ding\{97\}/g,"❁"],[/\\ding\{98\}/g,"❂"],[/\\ding\{99\}/g,"❃"],[/\\ding\{100\}/g,"❄"],[/\\ding\{101\}/g,"❅"],[/\\ding\{102\}/g,"❆"],[/\\ding\{103\}/g,"❇"],[/\\ding\{104\}/g,"❈"],[/\\ding\{105\}/g,"❉"],[/\\ding\{106\}/g,"❊"],[/\\ding\{107\}/g,"❋"],[/\\ding\{109\}/g,"❍"],[/\\ding\{111\}/g,"❏"],[/\\ding\{112\}/g,"❐"],[/\\ding\{113\}/g,"❑"],[/\\ding\{114\}/g,"❒"],[/\\ding\{118\}/g,"❖"],[/\\ding\{120\}/g,"❘"],[/\\ding\{121\}/g,"❙"],[/\\ding\{122\}/g,"❚"],[/\\ding\{123\}/g,"❛"],[/\\ding\{124\}/g,"❜"],[/\\ding\{125\}/g,"❝"],[/\\ding\{126\}/g,"❞"],[/\\ding\{161\}/g,"❡"],[/\\ding\{162\}/g,"❢"],[/\\ding\{163\}/g,"❣"],[/\\ding\{164\}/g,"❤"],[/\\ding\{165\}/g,"❥"],[/\\ding\{166\}/g,"❦"],[/\\ding\{167\}/g,"❧"],[/\\ding\{182\}/g,"❶"],[/\\ding\{183\}/g,"❷"],[/\\ding\{184\}/g,"❸"],[/\\ding\{185\}/g,"❹"],[/\\ding\{186\}/g,"❺"],[/\\ding\{187\}/g,"❻"],[/\\ding\{188\}/g,"❼"],[/\\ding\{189\}/g,"❽"],[/\\ding\{190\}/g,"❾"],[/\\ding\{191\}/g,"❿"],[/\\ding\{192\}/g,"➀"],[/\\ding\{193\}/g,"➁"],[/\\ding\{194\}/g,"➂"],[/\\ding\{195\}/g,"➃"],[/\\ding\{196\}/g,"➄"],[/\\ding\{197\}/g,"➅"],[/\\ding\{198\}/g,"➆"],[/\\ding\{199\}/g,"➇"],[/\\ding\{200\}/g,"➈"],[/\\ding\{201\}/g,"➉"],[/\\ding\{202\}/g,"➊"],[/\\ding\{203\}/g,"➋"],[/\\ding\{204\}/g,"➌"],[/\\ding\{205\}/g,"➍"],[/\\ding\{206\}/g,"➎"],[/\\ding\{207\}/g,"➏"],[/\\ding\{208\}/g,"➐"],[/\\ding\{209\}/g,"➑"],[/\\ding\{210\}/g,"➒"],[/\\ding\{211\}/g,"➓"],[/\\ding\{212\}/g,"➔"],[/\\ding\{216\}/g,"➘"],[/\\ding\{217\}/g,"➙"],[/\\ding\{218\}/g,"➚"],[/\\ding\{219\}/g,"➛"],[/\\ding\{220\}/g,"➜"],[/\\ding\{221\}/g,"➝"],[/\\ding\{222\}/g,"➞"],[/\\ding\{223\}/g,"➟"],[/\\ding\{224\}/g,"➠"],[/\\ding\{225\}/g,"➡"],[/\\ding\{226\}/g,"➢"],[/\\ding\{227\}/g,"➣"],[/\\ding\{228\}/g,"➤"],[/\\ding\{229\}/g,"➥"],[/\\ding\{230\}/g,"➦"],[/\\ding\{231\}/g,"➧"],[/\\ding\{232\}/g,"➨"],[/\\ding\{233\}/g,"➩"],[/\\ding\{234\}/g,"➪"],[/\\ding\{235\}/g,"➫"],[/\\ding\{236\}/g,"➬"],[/\\ding\{237\}/g,"➭"],[/\\ding\{238\}/g,"➮"],[/\\ding\{239\}/g,"➯"],[/\\ding\{241\}/g,"➱"],[/\\ding\{242\}/g,"➲"],[/\\ding\{243\}/g,"➳"],[/\\ding\{244\}/g,"➴"],[/\\ding\{245\}/g,"➵"],[/\\ding\{246\}/g,"➶"],[/\\ding\{247\}/g,"➷"],[/\\ding\{248\}/g,"➸"],[/\\ding\{249\}/g,"➹"],[/\\ding\{250\}/g,"➺"],[/\\ding\{251\}/g,"➻"],[/\\ding\{252\}/g,"➼"],[/\\ding\{253\}/g,"➽"],[/\\ding\{254\}/g,"➾"],[/\\longleftarrow /g,"⟵"],[/\\longrightarrow /g,"⟶"],[/\\longleftrightarrow /g,"⟷"],[/\\Longleftarrow /g,"⟸"],[/\\Longrightarrow /g,"⟹"],[/\\Longleftrightarrow /g,"⟺"],[/\\longmapsto /g,"⟼"],[/\\sim\\joinrel\\leadsto/g,"⟿"],[/\\ElsevierGlyph\{E212\}/g,"⤅"],[/\\UpArrowBar /g,"⤒"],[/\\DownArrowBar /g,"⤓"],[/\\ElsevierGlyph\{E20C\}/g,"⤣"],[/\\ElsevierGlyph\{E20D\}/g,"⤤"],[/\\ElsevierGlyph\{E20B\}/g,"⤥"],[/\\ElsevierGlyph\{E20A\}/g,"⤦"],[/\\ElsevierGlyph\{E211\}/g,"⤧"],[/\\ElsevierGlyph\{E20E\}/g,"⤨"],[/\\ElsevierGlyph\{E20F\}/g,"⤩"],[/\\ElsevierGlyph\{E210\}/g,"⤪"],[/\\ElsevierGlyph\{E21C\}/g,"⤳"],[/\\ElsevierGlyph\{E21D\}/g,"⤳-00338"],[/\\ElsevierGlyph\{E21A\}/g,"⤶"],[/\\ElsevierGlyph\{E219\}/g,"⤷"],[/\\Elolarr /g,"⥀"],[/\\Elorarr /g,"⥁"],[/\\ElzRlarr /g,"⥂"],[/\\ElzrLarr /g,"⥄"],[/\\Elzrarrx /g,"⥇"],[/\\LeftRightVector /g,"⥎"],[/\\RightUpDownVector /g,"⥏"],[/\\DownLeftRightVector /g,"⥐"],[/\\LeftUpDownVector /g,"⥑"],[/\\LeftVectorBar /g,"⥒"],[/\\RightVectorBar /g,"⥓"],[/\\RightUpVectorBar /g,"⥔"],[/\\RightDownVectorBar /g,"⥕"],[/\\DownLeftVectorBar /g,"⥖"],[/\\DownRightVectorBar /g,"⥗"],[/\\LeftUpVectorBar /g,"⥘"],[/\\LeftDownVectorBar /g,"⥙"],[/\\LeftTeeVector /g,"⥚"],[/\\RightTeeVector /g,"⥛"],[/\\RightUpTeeVector /g,"⥜"],[/\\RightDownTeeVector /g,"⥝"],[/\\DownLeftTeeVector /g,"⥞"],[/\\DownRightTeeVector /g,"⥟"],[/\\LeftUpTeeVector /g,"⥠"],[/\\LeftDownTeeVector /g,"⥡"],[/\\UpEquilibrium /g,"⥮"],[/\\ReverseUpEquilibrium /g,"⥯"],[/\\RoundImplies /g,"⥰"],[/\\ElsevierGlyph\{E214\}/g,"⥼"],[/\\ElsevierGlyph\{E215\}/g,"⥽"],[/\\Elztfnc /g,"⦀"],[/\\ElsevierGlyph\{3018\}/g,"⦅"],[/\\Elroang /g,"⦆"],[/\\ElsevierGlyph\{E291\}/g,"⦔"],[/\\Elzddfnc /g,"⦙"],[/\\Angle /g,"⦜"],[/\\Elzlpargt /g,"⦠"],[/\\ElsevierGlyph\{E260\}/g,"⦵"],[/\\ElsevierGlyph\{E61B\}/g,"⦶"],[/\\ElzLap /g,"⧊"],[/\\Elzdefas /g,"⧋"],[/\\LeftTriangleBar /g,"⧏"],[/\\NotLeftTriangleBar /g,"⧏-00338"],[/\\RightTriangleBar /g,"⧐"],[/\\NotRightTriangleBar /g,"⧐-00338"],[/\\ElsevierGlyph\{E372\}/g,"⧜"],[/\\blacklozenge /g,"⧫"],[/\\RuleDelayed /g,"⧴"],[/\\Elxuplus /g,"⨄"],[/\\ElzThr /g,"⨅"],[/\\Elxsqcup /g,"⨆"],[/\\ElzInf /g,"⨇"],[/\\ElzSup /g,"⨈"],[/\\ElzCint /g,"⨍"],[/\\clockoint /g,"⨏"],[/\\ElsevierGlyph\{E395\}/g,"⨐"],[/\\sqrint /g,"⨖"],[/\\ElsevierGlyph\{E25A\}/g,"⨥"],[/\\ElsevierGlyph\{E25B\}/g,"⨪"],[/\\ElsevierGlyph\{E25C\}/g,"⨭"],[/\\ElsevierGlyph\{E25D\}/g,"⨮"],[/\\ElzTimes /g,"⨯"],[/\\ElsevierGlyph\{E25E\}/g,"⨴"],[/\\ElsevierGlyph\{E25E\}/g,"⨵"],[/\\ElsevierGlyph\{E259\}/g,"⨼"],[/\\amalg /g,"⨿"],[/\\ElzAnd /g,"⩓"],[/\\ElzOr /g,"⩔"],[/\\ElsevierGlyph\{E36E\}/g,"⩕"],[/\\ElOr /g,"⩖"],[/\\perspcorrespond /g,"⩞"],[/\\Elzminhat /g,"⩟"],[/\\ElsevierGlyph\{225A\}/g,"⩣"],[/\\stackrel\{*\}\{=\}/g,"⩮"],[/\\Equal /g,"⩵"],[/\\leqslant /g,"⩽"],[/\\nleqslant /g,"⩽-00338"],[/\\geqslant /g,"⩾"],[/\\ngeqslant /g,"⩾-00338"],[/\\lessapprox /g,"⪅"],[/\\gtrapprox /g,"⪆"],[/\\lneq /g,"⪇"],[/\\gneq /g,"⪈"],[/\\lnapprox /g,"⪉"],[/\\gnapprox /g,"⪊"],[/\\lesseqqgtr /g,"⪋"],[/\\gtreqqless /g,"⪌"],[/\\eqslantless /g,"⪕"],[/\\eqslantgtr /g,"⪖"],[/\\Pisymbol\{ppi020\}\{117\}/g,"⪝"],[/\\Pisymbol\{ppi020\}\{105\}/g,"⪞"],[/\\NestedLessLess /g,"⪡"],[/\\NotNestedLessLess /g,"⪡-00338"],[/\\NestedGreaterGreater /g,"⪢"],[/\\NotNestedGreaterGreater /g,"⪢-00338"],[/\\preceq /g,"⪯"],[/\\not\\preceq /g,"⪯-00338"],[/\\succeq /g,"⪰"],[/\\not\\succeq /g,"⪰-00338"],[/\\precneqq /g,"⪵"],[/\\succneqq /g,"⪶"],[/\\precapprox /g,"⪷"],[/\\succapprox /g,"⪸"],[/\\precnapprox /g,"⪹"],[/\\succnapprox /g,"⪺"],[/\\subseteqq /g,"⫅"],[/\\nsubseteqq /g,"⫅-00338"],[/\\supseteqq /g,"⫆"],[/\\nsupseteqq/g,"⫆-00338"],[/\\subsetneqq /g,"⫋"],[/\\supsetneqq /g,"⫌"],[/\\ElsevierGlyph\{E30D\}/g,"⫫"],[/\\Elztdcol /g,"⫶"],[/\\ElsevierGlyph\{300A\}/g,"《"],[/\\ElsevierGlyph\{300B\}/g,"》"],[/\\ElsevierGlyph\{3018\}/g,"〘"],[/\\ElsevierGlyph\{3019\}/g,"〙"],[/\\openbracketleft /g,"〚"],[/\\openbracketright /g,"〛"]], this}"undefined"!=typeof e&&e.exports&&(e.exports=i)},function(e,t,i){var n,s;(function(o){n=[i(6),i(20),i(5)],s=function(e,t,i){var n=o.View.extend({tagName:"div",className:"citations",render:function(){return this.$el.append(""+this.formattedReference()+"
"),this},formattedReference:function(){var e=this.model,t=e.entryType(),i=e.fields(),n="",s=this._asSentence((i.author?i.author:"")+(i.year?" ("+i.year+")":""))+" ",o=i.title||"",a=i.pages?"pp. "+i.pages:"",r=i.address;if("article"==t){var l=(i.volume?i.volume:"")+(i.number?" ("+i.number+")":"")+(a?", "+a:"");n=s+this._asSentence(o)+(i.journal?"In "+i.journal+", ":"")+this._asSentence(l)+this._asSentence(i.address)+""}else n="inproceedings"==t||"proceedings"==t?s+this._asSentence(o)+(i.booktitle?"In "+i.booktitle+", ":"")+(a?a:"")+(r?", "+r:"")+".":"mastersthesis"==t||"phdthesis"==t?s+this._asSentence(o)+(i.howpublished?i.howpublished+". ":"")+(i.note?i.note+".":""):"techreport"==t?s+this._asSentence(o)+this._asSentence(i.institution)+this._asSentence(i.number)+this._asSentence(i.type):"book"==t||"inbook"==t||"incollection"==t?s+" "+this._formatBookInfo(i):s+" "+this._asSentence(o)+this._asSentence(i.howpublished)+this._asSentence(i.note);var c="";i.doi&&(c="http://dx.doi.org/"+i.doi,n+='[doi:'+i.doi+"]");var d=i.url||c;return d&&(n+='[Link]'),n},_formatBookInfo:function(e){var t="";return e.chapter&&(t+=e.chapter+" in "),e.title&&(t+=""+e.title+""),e.editor&&(t+=", Edited by "+e.editor+", "),e.publisher&&(t+=", "+e.publisher),e.pages&&(t+=", pp. "+e.pages),e.series&&(t+=", "+e.series+""),e.volume&&(t+=", Vol."+e.volume),e.issn&&(t+=", ISBN: "+e.issn),t+"."},_asSentence:function(e){return e&&e.trim()?e+". ":""}}),s=o.View.extend({el:"#citations",initialize:function(){this.listenTo(this.collection,"add",this.renderCitation)},events:{"click .citations-to-bibtex":"showBibtex","click .citations-to-formatted":"showFormatted"},renderCitation:function(e){var t=new n({model:e});this.$(".citations-formatted").append(t.render().el);var i=this.$(".citations-bibtex-text");i.val(i.val()+"\n\r"+e.attributes.content)},render:function(){this.$el.html(this.citationsElement()),this.collection.each(function(e){this.renderCitation(e)},this),this.showFormatted()},showBibtex:function(){this.$(".citations-to-formatted").show(),this.$(".citations-to-bibtex").hide(),this.$(".citations-bibtex").show(),this.$(".citations-formatted").hide(),this.$(".citations-bibtex-text").select()},showFormatted:function(){this.$(".citations-to-formatted").hide(),this.$(".citations-to-bibtex").show(),this.$(".citations-bibtex").hide(),this.$(".citations-formatted").show()},partialWarningElement:function(){return this.collection.partial?['"+JSON.stringify(i.responseJSON)+"":content+=": "+n}t._showAlert(content,"alert-danger")},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .main-help":"_toggleHelp","click .header .alert button":"_hideAlert","click .reset":"reset","click .clear-selected":"clearSelectedElements","click .collection-elements":"clearSelectedElements","dragover .collection-elements":"_dragoverElements","drop .collection-elements":"_dropElements","collection-element.dragstart .collection-elements":"_elementDragstart","collection-element.dragend .collection-elements":"_elementDragend","change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","change .hide-originals":"_changeHideOriginals","click .cancel-create":"_cancelCreate","click .create-collection":"_clickCreate"},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(e){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(e){e.preventDefault();var t=this.$list();this._checkForAutoscroll(t,e.originalEvent.clientY);var i=this._getNearestElement(e.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=r('');i.length?i.before(n):t.append(n)},_checkForAutoscroll:function(e,t){var i=2,n=e.offset(),s=e.scrollTop(),o=t-n.top,a=n.top+e.outerHeight()-t;o>=0&&o
",d(["Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ","workflows in order to have analyses done on each member of the entire group. This interface allows ","you to create a collection and re-order the final collection."].join("")),"
","",d(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidElements:a.template([d("The following selections could not be included due to problems:"),"<%= dataset.peek %>',"<% } %>","<% } %>","
| Name | Size | Created |
|---|
| Name | Size | Created |
|---|
h)return 1}return 0}return e}.apply(t,n),!(void 0!==s&&(e.exports=s))},,function(e,t,i){(function(t){var n=i(10).RightPanel,s=(i(7),i(119));CurrentHistoryView=i(116).CurrentHistoryView,_l=i(5);var o=n.extend({title:_l("History"),initialize:function(e){n.prototype.initialize.call(this,e),this.options=t.pick(e,"userIsAnonymous","allow_user_dataset_purge","galaxyRoot"),this.historyView=new CurrentHistoryView({className:CurrentHistoryView.prototype.className+" middle",purgeAllowed:e.allow_user_dataset_purge,linkTarget:"galaxy_main"})},$toggleButton:function(){return this.$(".footer > .panel-collapse")},render:function(){n.prototype.render.call(this),this.optionsMenu=s(this.$("#history-options-button"),{anonymous:this.options.userIsAnonymous,purgeAllowed:this.options.allow_user_dataset_purge,root:this.options.galaxyRoot}),this.$("> .header .buttons [title]").tooltip({placement:"bottom"}),this.historyView.setElement(this.$(".history-panel")),this.$el.attr("class","history-right-panel")},_templateHeader:function(e){var i=this.options.galaxyRoot+"history",n=this.options.galaxyRoot+"history/view_multiple";return['
"].join("")},_templateBody:function(e){return[''].join("")},_templateFooter:function(e){return['"+JSON.stringify(e.responseJSON)+"":": "+i),creator._showAlert(n,"alert-danger")},render:function(e,t){return this.$el.empty().html(this.templates.main()),this._renderHeader(e),this._renderMiddle(e),this._renderFooter(e),this._addPluginComponents(),this.trigger("rendered",this),this},_renderHeader:function(e,t){var i=this.$(".header").empty().html(this.templates.header()).find(".help-content").prepend(l(this.templates.helpContent()));return this._renderFilters(),i},_renderFilters:function(){return this.$(".forward-column .column-header input").val(this.filters[0]).add(this.$(".reverse-column .column-header input").val(this.filters[1]))},_renderMiddle:function(e,t){var i=this.$(".middle").empty().html(this.templates.middle());return this.unpairedPanelHidden?this.$(".unpaired-columns").hide():this.pairedPanelHidden&&this.$(".paired-columns").hide(),this._renderUnpaired(),this._renderPaired(),i},_renderUnpaired:function(e,t){var i,n,o=this,a=[],r=this._splitByFilters();return this.$(".forward-column .title").text([r[0].length,s("unpaired forward")].join(" ")),this.$(".forward-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[0].length)),this.$(".reverse-column .title").text([r[1].length,s("unpaired reverse")].join(" ")),this.$(".reverse-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[1].length)),this.$(".unpaired-columns .column-datasets").empty(),this.$(".autopair-link").toggle(0!==this.unpaired.length),0===this.unpaired.length?void this._renderUnpairedEmpty():(n=r[1].map(function(e,t){return void 0!==r[0][t]&&r[0][t]!==e&&a.push(o._renderPairButton()),o._renderUnpairedDataset(e)}),i=r[0].map(function(e){return o._renderUnpairedDataset(e)}),i.length||n.length?(this.$(".unpaired-columns .forward-column .column-datasets").append(i).add(this.$(".unpaired-columns .paired-column .column-datasets").append(a)).add(this.$(".unpaired-columns .reverse-column .column-datasets").append(n)),void this._adjUnpairedOnScrollbar()):void this._renderUnpairedNotShown())},_renderUnpairedDisplayStr:function(e){return["(",e," ",s("filtered out"),")"].join("")},_renderUnpairedDataset:function(e){return l("").attr("id","dataset-"+e.id).addClass("dataset unpaired").attr("draggable",!0).addClass(e.selected?"selected":"").append(l("").addClass("dataset-name").text(e.name)).data("dataset",e)},_renderPairButton:function(){return l("").addClass("dataset unpaired").append(l("").addClass("dataset-name").text(s("Pair these datasets")))},_renderUnpairedEmpty:function(){var e=l('').text("("+s("no remaining unpaired datasets")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_renderUnpairedNotShown:function(){var e=l('').text("("+s("no datasets were found matching the current filters")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_adjUnpairedOnScrollbar:function(){var e=this.$(".unpaired-columns").last(),t=this.$(".unpaired-columns .reverse-column .dataset").first();if(t.length){var i=e.offset().left+e.outerWidth(),n=t.offset().left+t.outerWidth(),s=Math.floor(i)-Math.floor(n);this.$(".unpaired-columns .forward-column").css("margin-left",s>0?s:0)}},_renderPaired:function(e,t){if(this.$(".paired-column-title .title").text([this.paired.length,s("paired")].join(" ")),this.$(".unpair-all-link").toggle(0!==this.paired.length),0===this.paired.length)return void this._renderPairedEmpty();this.$(".remove-extensions-link").show(),this.$(".paired-columns .column-datasets").empty();var i=this;this.paired.forEach(function(e,t){var n=new u({pair:e});i.$(".paired-columns .column-datasets").append(n.render().$el).append(['"].join(""))})},_renderPairedEmpty:function(){var e=l('').text("("+s("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(e),e},footerSettings:{".hide-originals":"hideOriginals",".remove-extensions":"removeExtensions"},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(e){function t(e,t){return['"].join("")}var i=l(a.template(['
\" + this.formattedReference() + \"
\");\n\t return this;\n\t },\n\t formattedReference: function () {\n\t var model = this.model;\n\t var entryType = model.entryType();\n\t var fields = model.fields();\n\t\n\t var ref = \"\";\n\t // Code inspired by...\n\t // https://github.com/vkaravir/bib-publication-list/blob/master/src/bib-publication-list.js\n\t var authorsAndYear = this._asSentence((fields.author ? fields.author : \"\") + (fields.year ? \" (\" + fields.year + \")\" : \"\")) + \" \";\n\t var title = fields.title || \"\";\n\t var pages = fields.pages ? \"pp. \" + fields.pages : \"\";\n\t var address = fields.address;\n\t if (entryType == \"article\") {\n\t var volume = (fields.volume ? fields.volume : \"\") + (fields.number ? \" (\" + fields.number + \")\" : \"\") + (pages ? \", \" + pages : \"\");\n\t ref = authorsAndYear + this._asSentence(title) + (fields.journal ? \"In \" + fields.journal + \", \" : \"\") + this._asSentence(volume) + this._asSentence(fields.address) + \"<\\/em>\";\n\t } else if (entryType == \"inproceedings\" || entryType == \"proceedings\") {\n\t ref = authorsAndYear + this._asSentence(title) + (fields.booktitle ? \"In \" + fields.booktitle + \", \" : \"\") + (pages ? pages : \"\") + (address ? \", \" + address : \"\") + \".<\\/em>\";\n\t } else if (entryType == \"mastersthesis\" || entryType == \"phdthesis\") {\n\t ref = authorsAndYear + this._asSentence(title) + (fields.howpublished ? fields.howpublished + \". \" : \"\") + (fields.note ? fields.note + \".\" : \"\");\n\t } else if (entryType == \"techreport\") {\n\t ref = authorsAndYear + this._asSentence(title) + this._asSentence(fields.institution) + this._asSentence(fields.number) + this._asSentence(fields.type);\n\t } else if (entryType == \"book\" || entryType == \"inbook\" || entryType == \"incollection\") {\n\t ref = authorsAndYear + \" \" + this._formatBookInfo(fields);\n\t } else {\n\t ref = authorsAndYear + \" \" + this._asSentence(title) + this._asSentence(fields.howpublished) + this._asSentence(fields.note);\n\t }\n\t var doiUrl = \"\";\n\t if (fields.doi) {\n\t doiUrl = 'http://dx.doi.org/' + fields.doi;\n\t ref += '[doi:' + fields.doi + \"]\";\n\t }\n\t var url = fields.url || doiUrl;\n\t if (url) {\n\t ref += '[Link]';\n\t }\n\t return ref;\n\t },\n\t _formatBookInfo: function (fields) {\n\t var info = \"\";\n\t if (fields.chapter) {\n\t info += fields.chapter + \" in \";\n\t }\n\t if (fields.title) {\n\t info += \"\" + fields.title + \"<\\/em>\";\n\t }\n\t if (fields.editor) {\n\t info += \", Edited by \" + fields.editor + \", \";\n\t }\n\t if (fields.publisher) {\n\t info += \", \" + fields.publisher;\n\t }\n\t if (fields.pages) {\n\t info += \", pp. \" + fields.pages + \"\";\n\t }\n\t if (fields.series) {\n\t info += \", \" + fields.series + \"<\\/em>\";\n\t }\n\t if (fields.volume) {\n\t info += \", Vol.\" + fields.volume;\n\t }\n\t if (fields.issn) {\n\t info += \", ISBN: \" + fields.issn;\n\t }\n\t return info + \".\";\n\t },\n\t _asSentence: function (str) {\n\t return str && str.trim() ? str + \". \" : \"\";\n\t }\n\t });\n\t\n\t var CitationListView = Backbone.View.extend({\n\t el: '#citations',\n\t /**\n\t * Set up view.\n\t */\n\t initialize: function () {\n\t this.listenTo(this.collection, 'add', this.renderCitation);\n\t },\n\t\n\t events: {\n\t 'click .citations-to-bibtex': 'showBibtex',\n\t 'click .citations-to-formatted': 'showFormatted'\n\t },\n\t\n\t renderCitation: function (citation) {\n\t var citationView = new CitationView({ model: citation });\n\t this.$(\".citations-formatted\").append(citationView.render().el);\n\t var rawTextarea = this.$(\".citations-bibtex-text\");\n\t rawTextarea.val(rawTextarea.val() + \"\\n\\r\" + citation.attributes.content);\n\t },\n\t\n\t render: function () {\n\t this.$el.html(this.citationsElement());\n\t this.collection.each(function (item) {\n\t this.renderCitation(item);\n\t }, this);\n\t this.showFormatted();\n\t },\n\t\n\t showBibtex: function () {\n\t this.$(\".citations-to-formatted\").show();\n\t this.$(\".citations-to-bibtex\").hide();\n\t this.$(\".citations-bibtex\").show();\n\t this.$(\".citations-formatted\").hide();\n\t this.$(\".citations-bibtex-text\").select();\n\t },\n\t\n\t showFormatted: function () {\n\t this.$(\".citations-to-formatted\").hide();\n\t this.$(\".citations-to-bibtex\").show();\n\t this.$(\".citations-bibtex\").hide();\n\t this.$(\".citations-formatted\").show();\n\t },\n\t\n\t partialWarningElement: function () {\n\t if (this.collection.partial) {\n\t return ['' + JSON.stringify(xhr.responseJSON) + '';\n\t } else {\n\t content += ': ' + message;\n\t }\n\t }\n\t creator._showAlert(content, 'alert-danger');\n\t },\n\t\n\t events: {\n\t // header\n\t 'click .more-help': '_clickMoreHelp',\n\t 'click .less-help': '_clickLessHelp',\n\t 'click .main-help': '_toggleHelp',\n\t 'click .header .alert button': '_hideAlert',\n\t\n\t 'click .reset': 'reset',\n\t 'click .clear-selected': 'clearSelectedElements',\n\t\n\t // elements - selection\n\t 'click .collection-elements': 'clearSelectedElements',\n\t\n\t // elements - drop target\n\t // 'dragenter .collection-elements': '_dragenterElements',\n\t // 'dragleave .collection-elements': '_dragleaveElements',\n\t 'dragover .collection-elements': '_dragoverElements',\n\t 'drop .collection-elements': '_dropElements',\n\t\n\t // these bubble up from the elements as custom events\n\t 'collection-element.dragstart .collection-elements': '_elementDragstart',\n\t 'collection-element.dragend .collection-elements': '_elementDragend',\n\t\n\t // footer\n\t 'change .collection-name': '_changeName',\n\t 'keydown .collection-name': '_nameCheckForEnter',\n\t 'change .hide-originals': '_changeHideOriginals',\n\t 'click .cancel-create': '_cancelCreate',\n\t 'click .create-collection': '_clickCreate' //,\n\t },\n\t\n\t // ........................................................................ elements\n\t /** reset all data to the initial state */\n\t reset: function () {\n\t this._instanceSetUp();\n\t this._elementsSetUp();\n\t this.render();\n\t },\n\t\n\t /** deselect all elements */\n\t clearSelectedElements: function (ev) {\n\t this.$('.collection-elements .collection-element').removeClass('selected');\n\t this.$('.collection-elements-controls > .clear-selected').hide();\n\t },\n\t\n\t //_dragenterElements : function( ev ){\n\t // //this.debug( '_dragenterElements:', ev );\n\t //},\n\t //TODO: if selected are dragged out of the list area - remove the placeholder - cuz it won't work anyway\n\t // _dragleaveElements : function( ev ){\n\t // //this.debug( '_dragleaveElements:', ev );\n\t // },\n\t\n\t /** track the mouse drag over the list adding a placeholder to show where the drop would occur */\n\t _dragoverElements: function (ev) {\n\t //this.debug( '_dragoverElements:', ev );\n\t ev.preventDefault();\n\t\n\t var $list = this.$list();\n\t this._checkForAutoscroll($list, ev.originalEvent.clientY);\n\t var $nearest = this._getNearestElement(ev.originalEvent.clientY);\n\t\n\t //TODO: no need to re-create - move instead\n\t this.$('.element-drop-placeholder').remove();\n\t var $placeholder = $('');\n\t if (!$nearest.length) {\n\t $list.append($placeholder);\n\t } else {\n\t $nearest.before($placeholder);\n\t }\n\t },\n\t\n\t /** If the mouse is near enough to the list's top or bottom, scroll the list */\n\t _checkForAutoscroll: function ($element, y) {\n\t var AUTOSCROLL_SPEED = 2,\n\t offset = $element.offset(),\n\t scrollTop = $element.scrollTop(),\n\t upperDist = y - offset.top,\n\t lowerDist = offset.top + $element.outerHeight() - y;\n\t if (upperDist >= 0 && upperDist < this.autoscrollDist) {\n\t $element.scrollTop(scrollTop - AUTOSCROLL_SPEED);\n\t } else if (lowerDist >= 0 && lowerDist < this.autoscrollDist) {\n\t $element.scrollTop(scrollTop + AUTOSCROLL_SPEED);\n\t }\n\t },\n\t\n\t /** get the nearest element based on the mouse's Y coordinate.\n\t * If the y is at the end of the list, return an empty jQuery object.\n\t */\n\t _getNearestElement: function (y) {\n\t var WIGGLE = 4,\n\t lis = this.$('.collection-elements li.collection-element').toArray();\n\t for (var i = 0; i < lis.length; i++) {\n\t var $li = $(lis[i]),\n\t top = $li.offset().top,\n\t halfHeight = Math.floor($li.outerHeight() / 2) + WIGGLE;\n\t if (top + halfHeight > y && top - halfHeight < y) {\n\t return $li;\n\t }\n\t }\n\t return $();\n\t },\n\t\n\t /** drop (dragged/selected elements) onto the list, re-ordering the internal list */\n\t _dropElements: function (ev) {\n\t if (ev.originalEvent) {\n\t ev = ev.originalEvent;\n\t }\n\t // both required for firefox\n\t ev.preventDefault();\n\t ev.dataTransfer.dropEffect = 'move';\n\t\n\t // insert before the nearest element or after the last.\n\t var $nearest = this._getNearestElement(ev.clientY);\n\t if ($nearest.length) {\n\t this.$dragging.insertBefore($nearest);\n\t } else {\n\t // no nearest before - insert after last element\n\t this.$dragging.insertAfter(this.$('.collection-elements .collection-element').last());\n\t }\n\t // resync the creator's list based on the new DOM order\n\t this._syncOrderToDom();\n\t return false;\n\t },\n\t\n\t /** resync the creator's list of elements based on the DOM order */\n\t _syncOrderToDom: function () {\n\t var creator = this,\n\t newElements = [];\n\t //TODO: doesn't seem wise to use the dom to store these - can't we sync another way?\n\t this.$('.collection-elements .collection-element').each(function () {\n\t var id = $(this).attr('data-element-id'),\n\t element = _.findWhere(creator.workingElements, { id: id });\n\t if (element) {\n\t newElements.push(element);\n\t } else {\n\t console.error('missing element: ', id);\n\t }\n\t });\n\t this.workingElements = newElements;\n\t this._renderList();\n\t },\n\t\n\t /** drag communication with element sub-views: dragstart */\n\t _elementDragstart: function (ev, element) {\n\t // auto select the element causing the event and move all selected\n\t element.select(true);\n\t this.$dragging = this.$('.collection-elements .collection-element.selected');\n\t },\n\t\n\t /** drag communication with element sub-views: dragend - remove the placeholder */\n\t _elementDragend: function (ev, element) {\n\t $('.element-drop-placeholder').remove();\n\t this.$dragging = null;\n\t },\n\t\n\t // ------------------------------------------------------------------------ templates\n\t //TODO: move to require text plugin and load these as text\n\t //TODO: underscore currently unnecc. bc no vars are used\n\t //TODO: better way of localizing text-nodes in long strings\n\t /** underscore template fns attached to class */\n\t templates: _.extend({}, baseCreator.CollectionCreatorMixin._creatorTemplates, {\n\t\n\t /** the header (not including help text) */\n\t header: _.template(['
', _l(['Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ', 'workflows in order to have analyses done on each member of the entire group. This interface allows ', 'you to create a collection and re-order the final collection.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\".'].join('')), '
'].join('')),\n\t\n\t /** shown in list when all elements are discarded */\n\t invalidElements: _.template([_l('The following selections could not be included due to problems:'), '<%= dataset.peek %>', '<% } %>', '<% } %>', '
| ' + ' | Name | ' + 'Size | ' + 'Created | ' + '
|---|
' + JSON.stringify(xhr.responseJSON) + '';\n\t } else {\n\t content += ': ' + message;\n\t }\n\t }\n\t creator._showAlert(content, 'alert-danger');\n\t },\n\t\n\t // ------------------------------------------------------------------------ rendering\n\t /** render the entire interface */\n\t render: function (speed, callback) {\n\t //this.debug( '-- _render' );\n\t //this.$el.empty().html( this.templates.main() );\n\t this.$el.empty().html(this.templates.main());\n\t this._renderHeader(speed);\n\t this._renderMiddle(speed);\n\t this._renderFooter(speed);\n\t this._addPluginComponents();\n\t this.trigger('rendered', this);\n\t return this;\n\t },\n\t\n\t /** render the header section */\n\t _renderHeader: function (speed, callback) {\n\t //this.debug( '-- _renderHeader' );\n\t var $header = this.$('.header').empty().html(this.templates.header()).find('.help-content').prepend($(this.templates.helpContent()));\n\t\n\t this._renderFilters();\n\t return $header;\n\t },\n\t /** fill the filter inputs with the filter values */\n\t _renderFilters: function () {\n\t return this.$('.forward-column .column-header input').val(this.filters[0]).add(this.$('.reverse-column .column-header input').val(this.filters[1]));\n\t },\n\t\n\t /** render the middle including unpaired and paired sections (which may be hidden) */\n\t _renderMiddle: function (speed, callback) {\n\t var $middle = this.$('.middle').empty().html(this.templates.middle());\n\t\n\t // (re-) hide the un/paired panels based on instance vars\n\t if (this.unpairedPanelHidden) {\n\t this.$('.unpaired-columns').hide();\n\t } else if (this.pairedPanelHidden) {\n\t this.$('.paired-columns').hide();\n\t }\n\t\n\t this._renderUnpaired();\n\t this._renderPaired();\n\t return $middle;\n\t },\n\t /** render the unpaired section, showing datasets accrd. to filters, update the unpaired counts */\n\t _renderUnpaired: function (speed, callback) {\n\t //this.debug( '-- _renderUnpaired' );\n\t var creator = this,\n\t $fwd,\n\t $rev,\n\t $prd = [],\n\t split = this._splitByFilters();\n\t // update unpaired counts\n\t this.$('.forward-column .title').text([split[0].length, _l('unpaired forward')].join(' '));\n\t this.$('.forward-column .unpaired-info').text(this._renderUnpairedDisplayStr(this.unpaired.length - split[0].length));\n\t this.$('.reverse-column .title').text([split[1].length, _l('unpaired reverse')].join(' '));\n\t this.$('.reverse-column .unpaired-info').text(this._renderUnpairedDisplayStr(this.unpaired.length - split[1].length));\n\t\n\t this.$('.unpaired-columns .column-datasets').empty();\n\t\n\t // show/hide the auto pair button if any unpaired are left\n\t this.$('.autopair-link').toggle(this.unpaired.length !== 0);\n\t if (this.unpaired.length === 0) {\n\t this._renderUnpairedEmpty();\n\t return;\n\t }\n\t\n\t // create the dataset dom arrays\n\t $rev = split[1].map(function (dataset, i) {\n\t // if there'll be a fwd dataset across the way, add a button to pair the row\n\t if (split[0][i] !== undefined && split[0][i] !== dataset) {\n\t $prd.push(creator._renderPairButton());\n\t }\n\t return creator._renderUnpairedDataset(dataset);\n\t });\n\t $fwd = split[0].map(function (dataset) {\n\t return creator._renderUnpairedDataset(dataset);\n\t });\n\t\n\t if (!$fwd.length && !$rev.length) {\n\t this._renderUnpairedNotShown();\n\t return;\n\t }\n\t // add to appropo cols\n\t //TODO: not the best way to render - consider rendering the entire unpaired-columns section in a fragment\n\t // and swapping out that\n\t this.$('.unpaired-columns .forward-column .column-datasets').append($fwd).add(this.$('.unpaired-columns .paired-column .column-datasets').append($prd)).add(this.$('.unpaired-columns .reverse-column .column-datasets').append($rev));\n\t this._adjUnpairedOnScrollbar();\n\t },\n\t /** return a string to display the count of filtered out datasets */\n\t _renderUnpairedDisplayStr: function (numFiltered) {\n\t return ['(', numFiltered, ' ', _l('filtered out'), ')'].join('');\n\t },\n\t /** return an unattached jQuery DOM element to represent an unpaired dataset */\n\t _renderUnpairedDataset: function (dataset) {\n\t //TODO: to underscore template\n\t return $('').attr('id', 'dataset-' + dataset.id).addClass('dataset unpaired').attr('draggable', true).addClass(dataset.selected ? 'selected' : '').append($('').addClass('dataset-name').text(dataset.name))\n\t //??\n\t .data('dataset', dataset);\n\t },\n\t /** render the button that may go between unpaired datasets, allowing the user to pair a row */\n\t _renderPairButton: function () {\n\t //TODO: *not* a dataset - don't pretend like it is\n\t return $('').addClass('dataset unpaired').append($('').addClass('dataset-name').text(_l('Pair these datasets')));\n\t },\n\t /** a message to display when no unpaired left */\n\t _renderUnpairedEmpty: function () {\n\t //this.debug( '-- renderUnpairedEmpty' );\n\t var $msg = $('').text('(' + _l('no remaining unpaired datasets') + ')');\n\t this.$('.unpaired-columns .paired-column .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t /** a message to display when no unpaired can be shown with the current filters */\n\t _renderUnpairedNotShown: function () {\n\t //this.debug( '-- renderUnpairedEmpty' );\n\t var $msg = $('').text('(' + _l('no datasets were found matching the current filters') + ')');\n\t this.$('.unpaired-columns .paired-column .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t /** try to detect if the unpaired section has a scrollbar and adjust left column for better centering of all */\n\t _adjUnpairedOnScrollbar: function () {\n\t var $unpairedColumns = this.$('.unpaired-columns').last(),\n\t $firstDataset = this.$('.unpaired-columns .reverse-column .dataset').first();\n\t if (!$firstDataset.length) {\n\t return;\n\t }\n\t var ucRight = $unpairedColumns.offset().left + $unpairedColumns.outerWidth(),\n\t dsRight = $firstDataset.offset().left + $firstDataset.outerWidth(),\n\t rightDiff = Math.floor(ucRight) - Math.floor(dsRight);\n\t //this.debug( 'rightDiff:', ucRight, '-', dsRight, '=', rightDiff );\n\t this.$('.unpaired-columns .forward-column').css('margin-left', rightDiff > 0 ? rightDiff : 0);\n\t },\n\t\n\t /** render the paired section and update counts of paired datasets */\n\t _renderPaired: function (speed, callback) {\n\t //this.debug( '-- _renderPaired' );\n\t this.$('.paired-column-title .title').text([this.paired.length, _l('paired')].join(' '));\n\t // show/hide the unpair all link\n\t this.$('.unpair-all-link').toggle(this.paired.length !== 0);\n\t if (this.paired.length === 0) {\n\t this._renderPairedEmpty();\n\t return;\n\t //TODO: would be best to return here (the $columns)\n\t } else {\n\t // show/hide 'remove extensions link' when any paired and they seem to have extensions\n\t this.$('.remove-extensions-link').show();\n\t }\n\t\n\t this.$('.paired-columns .column-datasets').empty();\n\t var creator = this;\n\t this.paired.forEach(function (pair, i) {\n\t //TODO: cache these?\n\t var pairView = new PairView({ pair: pair });\n\t creator.$('.paired-columns .column-datasets').append(pairView.render().$el).append([''].join(''));\n\t });\n\t },\n\t /** a message to display when none paired */\n\t _renderPairedEmpty: function () {\n\t var $msg = $('').text('(' + _l('no paired datasets yet') + ')');\n\t this.$('.paired-columns .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t\n\t footerSettings: {\n\t '.hide-originals': 'hideOriginals',\n\t '.remove-extensions': 'removeExtensions'\n\t },\n\t\n\t /** add any jQuery/bootstrap/custom plugins to elements rendered */\n\t _addPluginComponents: function () {\n\t this._chooseFiltersPopover('.choose-filters-link');\n\t this.$('.help-content i').hoverhighlight('.collection-creator', 'rgba( 64, 255, 255, 1.0 )');\n\t },\n\t\n\t /** build a filter selection popover allowing selection of common filter pairs */\n\t _chooseFiltersPopover: function (selector) {\n\t function filterChoice(val1, val2) {\n\t return [''].join('');\n\t }\n\t var $popoverContent = $(_.template(['
', _l(['Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ', 'These collections can be passed to tools and workflows in order to have analyses done on each member of ', 'the entire group. This interface allows you to create a collection, choose which datasets are paired, ', 'and re-order the final collection.'].join('')), '
', '', _l(['Unpaired datasets are shown in the unpaired section ', '(hover over the underlined words to highlight below). ', 'Paired datasets are shown in the paired section.', '
', _l(['
', _l(['To unpair individual dataset pairs, click the ', 'unpair buttons ( ). ', 'Click the \"Unpair all\" link to unpair all pairs.'].join('')), '
', '', _l(['You can include or remove the file extensions (e.g. \".fastq\") from your pair names by toggling the ', '\"Remove file extensions from pair names?\" control.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\". ', '(Note: you do not have to pair all unpaired datasets to finish.)'].join('')), '
'].join(''))\n\t })\n\t });\n\t\n\t //=============================================================================\n\t /** a modal version of the paired collection creator */\n\t var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datasets, options) {\n\t\n\t var deferred = jQuery.Deferred(),\n\t creator;\n\t\n\t options = _.defaults(options || {}, {\n\t datasets: datasets,\n\t oncancel: function () {\n\t Galaxy.modal.hide();\n\t deferred.reject('cancelled');\n\t },\n\t oncreate: function (creator, response) {\n\t Galaxy.modal.hide();\n\t deferred.resolve(response);\n\t }\n\t });\n\t\n\t if (!window.Galaxy || !Galaxy.modal) {\n\t throw new Error('Galaxy or Galaxy.modal not found');\n\t }\n\t\n\t creator = new PairedCollectionCreator(options);\n\t Galaxy.modal.show({\n\t title: 'Create a collection of paired datasets',\n\t body: creator.$el,\n\t width: '80%',\n\t height: '800px',\n\t closing_events: true\n\t });\n\t creator.render();\n\t window.creator = creator;\n\t\n\t //TODO: remove modal header\n\t return deferred;\n\t };\n\t\n\t //=============================================================================\n\t function createListOfPairsCollection(collection, defaultHideSourceItems) {\n\t var elements = collection.toJSON();\n\t //TODO: validate elements\n\t return pairedCollectionCreatorModal(elements, {\n\t historyId: collection.historyId,\n\t defaultHideSourceItems: defaultHideSourceItems\n\t });\n\t }\n\t\n\t //=============================================================================\n\t return {\n\t PairedCollectionCreator: PairedCollectionCreator,\n\t pairedCollectionCreatorModal: pairedCollectionCreatorModal,\n\t createListOfPairsCollection: createListOfPairsCollection\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2), __webpack_require__(1), __webpack_require__(1)))\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, _, jQuery) {!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(35), __webpack_require__(42), __webpack_require__(6), __webpack_require__(5)], __WEBPACK_AMD_DEFINE_RESULT__ = function (LIST_CREATOR, HDCA, BASE_MVC, _l) {\n\t\n\t 'use strict';\n\t\n\t var logNamespace = 'collections';\n\t /*==============================================================================\n\t TODO:\n\t the paired creator doesn't really mesh with the list creator as parent\n\t it may be better to make an abstract super class for both\n\t composites may inherit from this (or vis-versa)\n\t PairedDatasetCollectionElementView doesn't make a lot of sense\n\t \n\t ==============================================================================*/\n\t /** */\n\t var PairedDatasetCollectionElementView = Backbone.View.extend(BASE_MVC.LoggableMixin).extend({\n\t _logNamespace: logNamespace,\n\t\n\t //TODO: use proper class (DatasetDCE or NestedDCDCE (or the union of both))\n\t tagName: 'li',\n\t className: 'collection-element',\n\t\n\t initialize: function (attributes) {\n\t this.element = attributes.element || {};\n\t this.identifier = attributes.identifier;\n\t },\n\t\n\t render: function () {\n\t this.$el.attr('data-element-id', this.element.id).html(this.template({ identifier: this.identifier, element: this.element }));\n\t return this;\n\t },\n\t\n\t //TODO: lots of unused space in the element - possibly load details and display them horiz.\n\t template: _.template(['<%- identifier %>', '<%- element.name %>'].join('')),\n\t\n\t /** remove the DOM and any listeners */\n\t destroy: function () {\n\t this.off();\n\t this.$el.remove();\n\t },\n\t\n\t /** string rep */\n\t toString: function () {\n\t return 'DatasetCollectionElementView()';\n\t }\n\t });\n\t\n\t // ============================================================================\n\t var _super = LIST_CREATOR.ListCollectionCreator;\n\t\n\t /** An interface for building collections.\n\t */\n\t var PairCollectionCreator = _super.extend({\n\t\n\t /** the class used to display individual elements */\n\t elementViewClass: PairedDatasetCollectionElementView,\n\t /** the class this creator will create and save */\n\t collectionClass: HDCA.HistoryPairDatasetCollection,\n\t className: 'pair-collection-creator collection-creator flex-row-container',\n\t\n\t /** override to no-op */\n\t _mangleDuplicateNames: function () {},\n\t\n\t // TODO: this whole pattern sucks. There needs to be two classes of problem area:\n\t // bad inital choices and\n\t // when the user has painted his/her self into a corner during creation/use-of-the-creator\n\t /** render the entire interface */\n\t render: function (speed, callback) {\n\t if (this.workingElements.length === 2) {\n\t return _super.prototype.render.call(this, speed, callback);\n\t }\n\t return this._renderInvalid(speed, callback);\n\t },\n\t\n\t // ------------------------------------------------------------------------ rendering elements\n\t /** render forward/reverse */\n\t _renderList: function (speed, callback) {\n\t //this.debug( '-- _renderList' );\n\t //precondition: there are two valid elements in workingElements\n\t var creator = this,\n\t $tmp = jQuery(''),\n\t $list = creator.$list();\n\t\n\t // lose the original views, create the new, append all at once, then call their renders\n\t _.each(this.elementViews, function (view) {\n\t view.destroy();\n\t creator.removeElementView(view);\n\t });\n\t $tmp.append(creator._createForwardElementView().$el);\n\t $tmp.append(creator._createReverseElementView().$el);\n\t $list.empty().append($tmp.children());\n\t _.invoke(creator.elementViews, 'render');\n\t },\n\t\n\t /** create the forward element view */\n\t _createForwardElementView: function () {\n\t return this._createElementView(this.workingElements[0], { identifier: 'forward' });\n\t },\n\t\n\t /** create the forward element view */\n\t _createReverseElementView: function () {\n\t return this._createElementView(this.workingElements[1], { identifier: 'reverse' });\n\t },\n\t\n\t /** create an element view, cache in elementViews, and return */\n\t _createElementView: function (element, options) {\n\t var elementView = new this.elementViewClass(_.extend(options, {\n\t element: element\n\t }));\n\t this.elementViews.push(elementView);\n\t return elementView;\n\t },\n\t\n\t /** swap the forward, reverse elements and re-render */\n\t swap: function () {\n\t this.workingElements = [this.workingElements[1], this.workingElements[0]];\n\t this._renderList();\n\t },\n\t\n\t events: _.extend(_.clone(_super.prototype.events), {\n\t 'click .swap': 'swap'\n\t }),\n\t\n\t // ------------------------------------------------------------------------ templates\n\t //TODO: move to require text plugin and load these as text\n\t //TODO: underscore currently unnecc. bc no vars are used\n\t //TODO: better way of localizing text-nodes in long strings\n\t /** underscore template fns attached to class */\n\t templates: _.extend(_.clone(_super.prototype.templates), {\n\t /** the middle: element list */\n\t middle: _.template(['', _l(['Pair collections are permanent collections containing two datasets: one forward and one reverse. ', 'Often these are forward and reverse reads. The pair collections can be passed to tools and ', 'workflows in order to have analyses done on both datasets. This interface allows ', 'you to create a pair, name it, and swap which is forward and which reverse.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\".'].join('')), '
'].join('')),\n\t\n\t /** a simplified page communicating what went wrong and why the user needs to reselect something else */\n\t invalidInitial: _.template(['' + this.progressive + '...
';\n\t this.modal.$('.modal-body').empty().append(indicator).css({ 'margin-top': '8px' });\n\t },\n\t\n\t // (sorta) public interface - display the modal, render the form, and potentially copy the history\n\t // returns a jQuery.Deferred done->history copied, fail->user cancelled\n\t dialog: function _dialog(modal, history, options) {\n\t options = options || {};\n\t\n\t var dialog = this,\n\t deferred = jQuery.Deferred(),\n\t\n\t // TODO: getting a little byzantine here\n\t defaultCopyNameFn = options.nameFn || this.defaultName,\n\t defaultCopyName = defaultCopyNameFn({ name: history.get('name') }),\n\t\n\t // TODO: these two might be simpler as one 3 state option (all,active,no-choice)\n\t defaultCopyWhat = options.allDatasets ? 'copy-all' : 'copy-non-deleted',\n\t allowAll = !_.isUndefined(options.allowAll) ? options.allowAll : true,\n\t autoClose = !_.isUndefined(options.autoClose) ? options.autoClose : true;\n\t\n\t this.modal = modal;\n\t\n\t // validate the name and copy if good\n\t function checkNameAndCopy() {\n\t var name = modal.$('#copy-modal-title').val();\n\t if (!name) {\n\t modal.$('.invalid-title').show();\n\t return;\n\t }\n\t // get further settings, shut down and indicate the ajax call, then hide and resolve/reject\n\t var copyAllDatasets = modal.$('input[name=\"copy-what\"]:checked').val() === 'copy-all';\n\t modal.$('button').prop('disabled', true);\n\t dialog._showAjaxIndicator();\n\t history.copy(true, name, copyAllDatasets).done(function (response) {\n\t deferred.resolve(response);\n\t }).fail(function (xhr, status, message) {\n\t var options = { name: name, copyAllDatasets: copyAllDatasets };\n\t ERROR_MODAL.ajaxErrorModal(history, xhr, options, dialog.errorMessage);\n\t deferred.rejectWith(deferred, arguments);\n\t }).done(function () {\n\t if (autoClose) {\n\t modal.hide();\n\t }\n\t });\n\t }\n\t\n\t var originalClosingCallback = options.closing_callback;\n\t modal.show(_.extend(options, {\n\t title: this.title({ name: history.get('name') }),\n\t body: $(dialog._template({\n\t name: defaultCopyName,\n\t isAnon: Galaxy.user.isAnonymous(),\n\t allowAll: allowAll,\n\t copyWhat: defaultCopyWhat,\n\t activeLabel: this.activeLabel,\n\t allLabel: this.allLabel,\n\t anonWarning: this.anonWarning\n\t })),\n\t buttons: _.object([[_l('Cancel'), function () {\n\t modal.hide();\n\t }], [this.submitLabel, checkNameAndCopy]]),\n\t height: 'auto',\n\t closing_events: true,\n\t closing_callback: function _historyCopyClose(cancelled) {\n\t if (cancelled) {\n\t deferred.reject({ cancelled: true });\n\t }\n\t if (originalClosingCallback) {\n\t originalClosingCallback(cancelled);\n\t }\n\t }\n\t }));\n\t\n\t // set the default dataset copy, autofocus the title, and set up for a simple return\n\t modal.$('#copy-modal-title').focus().select();\n\t modal.$('#copy-modal-title').on('keydown', function (ev) {\n\t if (ev.keyCode === 13) {\n\t ev.preventDefault();\n\t checkNameAndCopy();\n\t }\n\t });\n\t\n\t return deferred;\n\t }\n\t };\n\t\n\t //==============================================================================\n\t // maintain the (slight) distinction between copy and import\n\t /**\n\t * Subclass CopyDialog to use the import language.\n\t */\n\t var ImportDialog = _.extend({}, CopyDialog, {\n\t defaultName: _.template(\"imported: <%- name %>\"),\n\t title: _.template(_l('Importing history') + ' \"<%- name %>\"'),\n\t submitLabel: _l('Import'),\n\t errorMessage: _l('History could not be imported.'),\n\t progressive: _l('Importing history'),\n\t activeLabel: _l('Import only the active, non-deleted datasets'),\n\t allLabel: _l('Import all datasets including deleted ones'),\n\t anonWarning: _l('As an anonymous user, unless you login or register, you will lose your current history ') + _l('after importing this history. ')\n\t\n\t });\n\t\n\t //==============================================================================\n\t /**\n\t * Main interface for both history import and history copy dialogs.\n\t * @param {Backbone.Model} history the history to copy\n\t * @param {Object} options a hash\n\t * @return {jQuery.Deferred} promise that fails on close and succeeds on copy\n\t *\n\t * options:\n\t * (this object is also passed to the modal used to display the dialog and accepts modal options)\n\t * {Function} nameFn if defined, use this to build the default name shown to the user\n\t * (the fn is passed: {name:| Name | ' + 'Size | ' + 'Status | ' + '' + ' |
|---|
| ' + ' | ' + ' | Description | ' + 'Name | ' + 'Size | ' + 'Settings | ' + 'Status | ' + '
|---|
| Name | ' + 'Size | ' + 'Type | ' + 'Genome | ' + 'Settings | ' + 'Status | ' + '' + ' |
|---|
' + 'The length format is two-column, separated by whitespace, of the form:' + '
chrom/contig length of chrom/contig' + '' + '
' + 'For example, the first few entries of mm9.len are as follows:' + '
' + 'chr1 197195432\\n' + 'chr2 181748087\\n' + 'chr3 159599783\\n' + 'chr4 155630120\\n' + 'chr5 152537259' + '' + '' + '
Trackster uses this information to populate the select box for chrom/contig, and' + 'to set the maximum basepair of the track browser. You may either upload a .len file' + 'of this format (Len File option), or directly enter the information into the box ' + '(Len Entry option).
';\n\t },\n\t\n\t _templateFasta: function () {\n\t return '' + 'This is a multi-fasta file from your current history that provides the genome' + 'sequences for each chromosome/contig in your build.' + '
' + '' + 'Here is a snippet from an example multi-fasta file:' + '
' + '>chr1\\n' + 'ATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\\n\\n' + '>chr2\\n' + 'GGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\\n\\n' + '...' + '' + '';\n\t }\n\t });\n\t\n\t return {\n\t View: View\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(1)))\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, $, _) {/** User Preferences view */\n\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(21), __webpack_require__(7)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Form, Ui) {\n\t\n\t /** Contains descriptive dictionaries describing user forms */\n\t var Model = Backbone.Model.extend({\n\t initialize: function (options) {\n\t options = options || {};\n\t options.user_id = options.user_id || Galaxy.user.id;\n\t this.set({\n\t 'user_id': options.user_id,\n\t 'information': {\n\t title: 'Manage information',\n\t description: 'Edit your email, addresses and custom parameters or change your username.',\n\t url: 'api/users/' + options.user_id + '/information/inputs',\n\t icon: 'fa-user'\n\t },\n\t 'password': {\n\t title: 'Change password',\n\t description: 'Allows you to change your login credentials.',\n\t icon: 'fa-unlock-alt',\n\t url: 'api/users/' + options.user_id + '/password/inputs',\n\t submit_title: 'Save password'\n\t },\n\t 'communication': {\n\t title: 'Change communication settings',\n\t description: 'Enable or disable the communication feature to chat with other users.',\n\t url: 'api/users/' + options.user_id + '/communication/inputs',\n\t icon: 'fa-comments-o'\n\t },\n\t 'permissions': {\n\t title: 'Set dataset permissions for new histories',\n\t description: 'Grant others default access to newly created histories. Changes made here will only affect histories created after these settings have been stored.',\n\t url: 'api/users/' + options.user_id + '/permissions/inputs',\n\t icon: 'fa-users',\n\t submit_title: 'Save permissions'\n\t },\n\t 'api_key': {\n\t title: 'Manage API key',\n\t description: 'Access your current API key or create a new one.',\n\t url: 'api/users/' + options.user_id + '/api_key/inputs',\n\t icon: 'fa-key',\n\t submit_title: 'Create a new key',\n\t submit_icon: 'fa-check'\n\t },\n\t 'toolbox_filters': {\n\t title: 'Manage Toolbox filters',\n\t description: 'Customize your Toolbox by displaying or omitting sets of Tools.',\n\t url: 'api/users/' + options.user_id + '/toolbox_filters/inputs',\n\t icon: 'fa-filter',\n\t submit_title: 'Save filters'\n\t },\n\t 'openids': {\n\t title: 'Manage OpenIDs',\n\t description: 'Associate OpenIDs with your account.',\n\t icon: 'fa-openid',\n\t onclick: function () {\n\t window.location.href = Galaxy.root + 'user/openid_manage?cntrller=user&use_panels=True';\n\t }\n\t },\n\t 'custom_builds': {\n\t title: 'Manage custom builds',\n\t description: 'Add or remove custom builds using history datasets.',\n\t icon: 'fa-cubes',\n\t onclick: function () {\n\t window.location.href = Galaxy.root + 'custom_builds';\n\t }\n\t },\n\t 'logout': {\n\t title: 'Sign out',\n\t description: 'Click here to sign out of all sessions.',\n\t icon: 'fa-sign-out',\n\t onclick: function () {\n\t Galaxy.modal.show({\n\t title: 'Sign out',\n\t body: 'Do you want to continue and sign out of all active sessions?',\n\t buttons: {\n\t 'Cancel': function () {\n\t Galaxy.modal.hide();\n\t },\n\t 'Sign out': function () {\n\t window.location.href = Galaxy.root + 'user/logout';\n\t }\n\t }\n\t });\n\t }\n\t }\n\t });\n\t }\n\t });\n\t\n\t /** View of the main user preference panel with links to individual user forms */\n\t var View = Backbone.View.extend({\n\t\n\t initialize: function () {\n\t this.model = new Model();\n\t this.message = new Ui.Message();\n\t this.setElement('');\n\t this.render();\n\t },\n\t\n\t render: function () {\n\t var self = this;\n\t var config = Galaxy.config;\n\t $.getJSON(Galaxy.root + 'api/users/' + Galaxy.user.id, function (data) {\n\t self.$preferences = $('').addClass('ui-panel').append(self.message.$el).append($('').append('User preferences')).append($('').append('You are logged in as ' + _.escape(data.email) + '.')).append(self.$table = $('
' + 'You are using ' + options.nice_total_disk_usage + ' of disk space in this Galaxy instance. ' + (Galaxy.config.enable_quotas ? 'Your disk quota is: ' + options.quota + '. ' : '') + 'Is your usage more than expected? See the documentation for tips on how to find all of the data in your account.' + '
';\n\t }\n\t });\n\t\n\t /** View of individual user forms */\n\t var Forms = Backbone.View.extend({\n\t\n\t initialize: function (options) {\n\t this.model = new Model(options);\n\t this.page = this.model.get(options.form_id);\n\t this.setElement('');\n\t this.render();\n\t },\n\t\n\t render: function () {\n\t var self = this;\n\t $.ajax({\n\t url: Galaxy.root + this.page.url,\n\t type: 'GET'\n\t }).done(function (response) {\n\t var options = $.extend({}, self.page, response);\n\t var form = new Form({\n\t title: options.title,\n\t icon: options.icon,\n\t inputs: options.inputs,\n\t operations: {\n\t 'submit': new Ui.ButtonIcon({\n\t tooltip: options.submit_tooltip,\n\t title: options.submit_title || 'Save settings',\n\t icon: options.submit_icon || 'fa-save',\n\t onclick: function () {\n\t self._submit(form, options);\n\t }\n\t })\n\t }\n\t });\n\t self.$el.empty().append(form.$el);\n\t }).fail(function (response) {\n\t self.$el.empty().append(new Ui.Message({\n\t message: 'Failed to load resource ' + self.page.url + '.',\n\t status: 'danger',\n\t persistent: true\n\t }).$el);\n\t });\n\t },\n\t\n\t _submit: function (form, options) {\n\t var self = this;\n\t $.ajax({\n\t url: Galaxy.root + options.url,\n\t data: JSON.stringify(form.data.create()),\n\t type: 'PUT',\n\t contentType: 'application/json'\n\t }).done(function (response) {\n\t form.data.matchModel(response, function (input, input_id) {\n\t form.field_list[input_id].value(input.value);\n\t });\n\t form.message.update({ message: response.message, status: 'success' });\n\t }).fail(function (response) {\n\t form.message.update({ message: response.responseJSON.err_msg, status: 'danger' });\n\t });\n\t }\n\t });\n\t\n\t return {\n\t View: View,\n\t Forms: Forms\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(1), __webpack_require__(2)))\n\n/***/ }),\n/* 131 */,\n/* 132 */,\n/* 133 */,\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(jQuery, $) {(function (root, factory) {\n\t if (true) {\n\t // AMD. Register as an anonymous module.\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else {\n\t // Browser globals\n\t root.LoadingIndicator = factory();\n\t }\n\t\n\t //============================================================================\n\t})(this, function () {\n\t //TODO: too specific to history panel\n\t function LoadingIndicator($where, options) {\n\t\n\t var self = this;\n\t // defaults\n\t options = jQuery.extend({\n\t cover: false\n\t }, options || {});\n\t\n\t function render() {\n\t var html = ['\" + this.formattedReference() + \"
\" );\n return this;\n },\n formattedReference: function() {\n var model = this.model;\n var entryType = model.entryType();\n var fields = model.fields();\n\n var ref = \"\";\n // Code inspired by...\n // https://github.com/vkaravir/bib-publication-list/blob/master/src/bib-publication-list.js\n var authorsAndYear = this._asSentence( (fields.author ? fields.author : \"\") + (fields.year ? (\" (\" + fields.year + \")\") : \"\") ) + \" \";\n var title = fields.title || \"\";\n var pages = fields.pages ? (\"pp. \" + fields.pages) : \"\";\n var address = fields.address;\n if( entryType == \"article\" ) {\n var volume = (fields.volume ? fields.volume : \"\") +\n (fields.number ? ( \" (\" + fields.number + \")\" ) : \"\") +\n (pages ? \", \" + pages : \"\");\n ref = authorsAndYear + this._asSentence(title) +\n (fields.journal ? (\"In \" + fields.journal + \", \") : \"\") +\n this._asSentence(volume) + \n this._asSentence(fields.address) +\n \"<\\/em>\";\n } else if( entryType == \"inproceedings\" || entryType == \"proceedings\" ) {\n ref = authorsAndYear + \n this._asSentence(title) + \n (fields.booktitle ? (\"In \" + fields.booktitle + \", \") : \"\") +\n (pages ? pages : \"\") +\n (address ? \", \" + address : \"\") + \n \".<\\/em>\";\n } else if( entryType == \"mastersthesis\" || entryType == \"phdthesis\" ) {\n ref = authorsAndYear + this._asSentence(title) +\n (fields.howpublished ? fields.howpublished + \". \" : \"\") +\n (fields.note ? fields.note + \".\" : \"\");\n } else if( entryType == \"techreport\" ) {\n ref = authorsAndYear + this._asSentence(title) +\n this._asSentence(fields.institution) +\n this._asSentence(fields.number) +\n this._asSentence(fields.type);\n } else if( entryType == \"book\" || entryType == \"inbook\" || entryType == \"incollection\" ) {\n ref = authorsAndYear + \" \" + this._formatBookInfo(fields);\n } else {\n ref = authorsAndYear + \" \" + this._asSentence(title) +\n this._asSentence(fields.howpublished) +\n this._asSentence(fields.note);\n }\n var doiUrl = \"\";\n if( fields.doi ) {\n doiUrl = 'http://dx.doi.org/' + fields.doi;\n ref += '[doi:' + fields.doi + \"]\";\n }\n var url = fields.url || doiUrl;\n if( url ) {\n ref += '[Link]';\n }\n return ref;\n },\n _formatBookInfo: function(fields) {\n var info = \"\";\n if( fields.chapter ) {\n info += fields.chapter + \" in \";\n }\n if( fields.title ) {\n info += \"\" + fields.title + \"<\\/em>\";\n }\n if( fields.editor ) {\n info += \", Edited by \" + fields.editor + \", \";\n }\n if( fields.publisher) {\n info += \", \" + fields.publisher;\n }\n if( fields.pages ) {\n info += \", pp. \" + fields.pages + \"\";\n }\n if( fields.series ) {\n info += \", \" + fields.series + \"<\\/em>\";\n }\n if( fields.volume ) {\n info += \", Vol.\" + fields.volume;\n }\n if( fields.issn ) {\n info += \", ISBN: \" + fields.issn;\n }\n return info + \".\";\n },\n _asSentence: function(str) {\n return (str && str.trim()) ? str + \". \" : \"\";\n }\n});\n\nvar CitationListView = Backbone.View.extend({\n el: '#citations',\n /**\n * Set up view.\n */\n initialize: function() {\n this.listenTo( this.collection, 'add', this.renderCitation );\n },\n\n events: {\n 'click .citations-to-bibtex': 'showBibtex',\n 'click .citations-to-formatted': 'showFormatted'\n },\n\n renderCitation: function( citation ) {\n var citationView = new CitationView( { model: citation } );\n this.$(\".citations-formatted\").append( citationView.render().el );\n var rawTextarea = this.$(\".citations-bibtex-text\");\n rawTextarea.val( rawTextarea.val() + \"\\n\\r\" + citation.attributes.content );\n },\n\n render: function() {\n this.$el.html(this.citationsElement());\n this.collection.each(function( item ){\n this.renderCitation( item );\n }, this);\n this.showFormatted();\n },\n\n showBibtex: function() {\n this.$(\".citations-to-formatted\").show();\n this.$(\".citations-to-bibtex\").hide();\n this.$(\".citations-bibtex\").show();\n this.$(\".citations-formatted\").hide();\n this.$(\".citations-bibtex-text\").select();\n },\n\n showFormatted: function() {\n this.$(\".citations-to-formatted\").hide();\n this.$(\".citations-to-bibtex\").show();\n this.$(\".citations-bibtex\").hide();\n this.$(\".citations-formatted\").show();\n },\n\n partialWarningElement: function() {\n if( this.collection.partial ) {\n return [\n '' + JSON.stringify( xhr.responseJSON ) + '';\n } else {\n content += ': ' + message;\n }\n }\n creator._showAlert( content, 'alert-danger' );\n },\n\n events : {\n // header\n 'click .more-help' : '_clickMoreHelp',\n 'click .less-help' : '_clickLessHelp',\n 'click .main-help' : '_toggleHelp',\n 'click .header .alert button' : '_hideAlert',\n\n 'click .reset' : 'reset',\n 'click .clear-selected' : 'clearSelectedElements',\n\n // elements - selection\n 'click .collection-elements' : 'clearSelectedElements',\n\n // elements - drop target\n // 'dragenter .collection-elements': '_dragenterElements',\n // 'dragleave .collection-elements': '_dragleaveElements',\n 'dragover .collection-elements' : '_dragoverElements',\n 'drop .collection-elements' : '_dropElements',\n\n // these bubble up from the elements as custom events\n 'collection-element.dragstart .collection-elements' : '_elementDragstart',\n 'collection-element.dragend .collection-elements' : '_elementDragend',\n\n // footer\n 'change .collection-name' : '_changeName',\n 'keydown .collection-name' : '_nameCheckForEnter',\n 'change .hide-originals' : '_changeHideOriginals',\n 'click .cancel-create' : '_cancelCreate',\n 'click .create-collection' : '_clickCreate'//,\n },\n\n // ........................................................................ elements\n /** reset all data to the initial state */\n reset : function(){\n this._instanceSetUp();\n this._elementsSetUp();\n this.render();\n },\n\n /** deselect all elements */\n clearSelectedElements : function( ev ){\n this.$( '.collection-elements .collection-element' ).removeClass( 'selected' );\n this.$( '.collection-elements-controls > .clear-selected' ).hide();\n },\n\n //_dragenterElements : function( ev ){\n // //this.debug( '_dragenterElements:', ev );\n //},\n//TODO: if selected are dragged out of the list area - remove the placeholder - cuz it won't work anyway\n // _dragleaveElements : function( ev ){\n // //this.debug( '_dragleaveElements:', ev );\n // },\n\n /** track the mouse drag over the list adding a placeholder to show where the drop would occur */\n _dragoverElements : function( ev ){\n //this.debug( '_dragoverElements:', ev );\n ev.preventDefault();\n\n var $list = this.$list();\n this._checkForAutoscroll( $list, ev.originalEvent.clientY );\n var $nearest = this._getNearestElement( ev.originalEvent.clientY );\n\n //TODO: no need to re-create - move instead\n this.$( '.element-drop-placeholder' ).remove();\n var $placeholder = $( '' );\n if( !$nearest.length ){\n $list.append( $placeholder );\n } else {\n $nearest.before( $placeholder );\n }\n },\n\n /** If the mouse is near enough to the list's top or bottom, scroll the list */\n _checkForAutoscroll : function( $element, y ){\n var AUTOSCROLL_SPEED = 2,\n offset = $element.offset(),\n scrollTop = $element.scrollTop(),\n upperDist = y - offset.top,\n lowerDist = ( offset.top + $element.outerHeight() ) - y;\n if( upperDist >= 0 && upperDist < this.autoscrollDist ){\n $element.scrollTop( scrollTop - AUTOSCROLL_SPEED );\n } else if( lowerDist >= 0 && lowerDist < this.autoscrollDist ){\n $element.scrollTop( scrollTop + AUTOSCROLL_SPEED );\n }\n },\n\n /** get the nearest element based on the mouse's Y coordinate.\n * If the y is at the end of the list, return an empty jQuery object.\n */\n _getNearestElement : function( y ){\n var WIGGLE = 4,\n lis = this.$( '.collection-elements li.collection-element' ).toArray();\n for( var i=0; i
', _l([\n 'Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ',\n 'workflows in order to have analyses done on each member of the entire group. This interface allows ',\n 'you to create a collection and re-order the final collection.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\".'\n ].join( '' )), '
'\n ].join('')),\n\n /** shown in list when all elements are discarded */\n invalidElements : _.template([\n _l( 'The following selections could not be included due to problems:' ),\n '<%= dataset.peek %>',\n '<% } %>',\n '<% } %>',\n '
| ' +\n ' | Name | ' +\n 'Size | ' +\n 'Created | ' +\n '
|---|
' + JSON.stringify( xhr.responseJSON ) + '';\n } else {\n content += ': ' + message;\n }\n }\n creator._showAlert( content, 'alert-danger' );\n },\n\n // ------------------------------------------------------------------------ rendering\n /** render the entire interface */\n render : function( speed, callback ){\n //this.debug( '-- _render' );\n //this.$el.empty().html( this.templates.main() );\n this.$el.empty().html( this.templates.main() );\n this._renderHeader( speed );\n this._renderMiddle( speed );\n this._renderFooter( speed );\n this._addPluginComponents();\n this.trigger( 'rendered', this );\n return this;\n },\n\n /** render the header section */\n _renderHeader : function( speed, callback ){\n //this.debug( '-- _renderHeader' );\n var $header = this.$( '.header' ).empty().html( this.templates.header() )\n .find( '.help-content' ).prepend( $( this.templates.helpContent() ) );\n\n this._renderFilters();\n return $header;\n },\n /** fill the filter inputs with the filter values */\n _renderFilters : function(){\n return this.$( '.forward-column .column-header input' ).val( this.filters[0] )\n .add( this.$( '.reverse-column .column-header input' ).val( this.filters[1] ) );\n },\n\n /** render the middle including unpaired and paired sections (which may be hidden) */\n _renderMiddle : function( speed, callback ){\n var $middle = this.$( '.middle' ).empty().html( this.templates.middle() );\n\n // (re-) hide the un/paired panels based on instance vars\n if( this.unpairedPanelHidden ){\n this.$( '.unpaired-columns' ).hide();\n } else if( this.pairedPanelHidden ){\n this.$( '.paired-columns' ).hide();\n }\n\n this._renderUnpaired();\n this._renderPaired();\n return $middle;\n },\n /** render the unpaired section, showing datasets accrd. to filters, update the unpaired counts */\n _renderUnpaired : function( speed, callback ){\n //this.debug( '-- _renderUnpaired' );\n var creator = this,\n $fwd, $rev, $prd = [],\n split = this._splitByFilters();\n // update unpaired counts\n this.$( '.forward-column .title' )\n .text([ split[0].length, _l( 'unpaired forward' ) ].join( ' ' ));\n this.$( '.forward-column .unpaired-info' )\n .text( this._renderUnpairedDisplayStr( this.unpaired.length - split[0].length ) );\n this.$( '.reverse-column .title' )\n .text([ split[1].length, _l( 'unpaired reverse' ) ].join( ' ' ));\n this.$( '.reverse-column .unpaired-info' )\n .text( this._renderUnpairedDisplayStr( this.unpaired.length - split[1].length ) );\n\n this.$( '.unpaired-columns .column-datasets' ).empty();\n\n // show/hide the auto pair button if any unpaired are left\n this.$( '.autopair-link' ).toggle( this.unpaired.length !== 0 );\n if( this.unpaired.length === 0 ){\n this._renderUnpairedEmpty();\n return;\n }\n\n // create the dataset dom arrays\n $rev = split[1].map( function( dataset, i ){\n // if there'll be a fwd dataset across the way, add a button to pair the row\n if( ( split[0][ i ] !== undefined )\n && ( split[0][ i ] !== dataset ) ){\n $prd.push( creator._renderPairButton() );\n }\n return creator._renderUnpairedDataset( dataset );\n });\n $fwd = split[0].map( function( dataset ){\n return creator._renderUnpairedDataset( dataset );\n });\n\n if( !$fwd.length && !$rev.length ){\n this._renderUnpairedNotShown();\n return;\n }\n // add to appropo cols\n //TODO: not the best way to render - consider rendering the entire unpaired-columns section in a fragment\n // and swapping out that\n this.$( '.unpaired-columns .forward-column .column-datasets' ).append( $fwd )\n .add( this.$( '.unpaired-columns .paired-column .column-datasets' ).append( $prd ) )\n .add( this.$( '.unpaired-columns .reverse-column .column-datasets' ).append( $rev ) );\n this._adjUnpairedOnScrollbar();\n },\n /** return a string to display the count of filtered out datasets */\n _renderUnpairedDisplayStr : function( numFiltered ){\n return [ '(', numFiltered, ' ', _l( 'filtered out' ), ')' ].join('');\n },\n /** return an unattached jQuery DOM element to represent an unpaired dataset */\n _renderUnpairedDataset : function( dataset ){\n //TODO: to underscore template\n return $( '')\n .attr( 'id', 'dataset-' + dataset.id )\n .addClass( 'dataset unpaired' )\n .attr( 'draggable', true )\n .addClass( dataset.selected? 'selected': '' )\n .append( $( '' ).addClass( 'dataset-name' ).text( dataset.name ) )\n //??\n .data( 'dataset', dataset );\n },\n /** render the button that may go between unpaired datasets, allowing the user to pair a row */\n _renderPairButton : function(){\n //TODO: *not* a dataset - don't pretend like it is\n return $( '').addClass( 'dataset unpaired' )\n .append( $( '' ).addClass( 'dataset-name' ).text( _l( 'Pair these datasets' ) ) );\n },\n /** a message to display when no unpaired left */\n _renderUnpairedEmpty : function(){\n //this.debug( '-- renderUnpairedEmpty' );\n var $msg = $( '' )\n .text( '(' + _l( 'no remaining unpaired datasets' ) + ')' );\n this.$( '.unpaired-columns .paired-column .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n /** a message to display when no unpaired can be shown with the current filters */\n _renderUnpairedNotShown : function(){\n //this.debug( '-- renderUnpairedEmpty' );\n var $msg = $( '' )\n .text( '(' + _l( 'no datasets were found matching the current filters' ) + ')' );\n this.$( '.unpaired-columns .paired-column .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n /** try to detect if the unpaired section has a scrollbar and adjust left column for better centering of all */\n _adjUnpairedOnScrollbar : function(){\n var $unpairedColumns = this.$( '.unpaired-columns' ).last(),\n $firstDataset = this.$( '.unpaired-columns .reverse-column .dataset' ).first();\n if( !$firstDataset.length ){ return; }\n var ucRight = $unpairedColumns.offset().left + $unpairedColumns.outerWidth(),\n dsRight = $firstDataset.offset().left + $firstDataset.outerWidth(),\n rightDiff = Math.floor( ucRight ) - Math.floor( dsRight );\n //this.debug( 'rightDiff:', ucRight, '-', dsRight, '=', rightDiff );\n this.$( '.unpaired-columns .forward-column' )\n .css( 'margin-left', ( rightDiff > 0 )? rightDiff: 0 );\n },\n\n /** render the paired section and update counts of paired datasets */\n _renderPaired : function( speed, callback ){\n //this.debug( '-- _renderPaired' );\n this.$( '.paired-column-title .title' ).text([ this.paired.length, _l( 'paired' ) ].join( ' ' ) );\n // show/hide the unpair all link\n this.$( '.unpair-all-link' ).toggle( this.paired.length !== 0 );\n if( this.paired.length === 0 ){\n this._renderPairedEmpty();\n return;\n //TODO: would be best to return here (the $columns)\n } else {\n // show/hide 'remove extensions link' when any paired and they seem to have extensions\n this.$( '.remove-extensions-link' ).show();\n }\n\n this.$( '.paired-columns .column-datasets' ).empty();\n var creator = this;\n this.paired.forEach( function( pair, i ){\n //TODO: cache these?\n var pairView = new PairView({ pair: pair });\n creator.$( '.paired-columns .column-datasets' )\n .append( pairView.render().$el )\n .append([\n ''\n ].join( '' ));\n });\n },\n /** a message to display when none paired */\n _renderPairedEmpty : function(){\n var $msg = $( '' )\n .text( '(' + _l( 'no paired datasets yet' ) + ')' );\n this.$( '.paired-columns .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n\n footerSettings : {\n '.hide-originals': 'hideOriginals',\n '.remove-extensions': 'removeExtensions'\n },\n\n /** add any jQuery/bootstrap/custom plugins to elements rendered */\n _addPluginComponents : function(){\n this._chooseFiltersPopover( '.choose-filters-link' );\n this.$( '.help-content i' ).hoverhighlight( '.collection-creator', 'rgba( 64, 255, 255, 1.0 )' );\n },\n\n /** build a filter selection popover allowing selection of common filter pairs */\n _chooseFiltersPopover : function( selector ){\n function filterChoice( val1, val2 ){\n return [\n ''\n ].join('');\n }\n var $popoverContent = $( _.template([\n '
', _l([\n 'Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ',\n 'These collections can be passed to tools and workflows in order to have analyses done on each member of ',\n 'the entire group. This interface allows you to create a collection, choose which datasets are paired, ',\n 'and re-order the final collection.'\n ].join( '' )), '
',\n '', _l([\n 'Unpaired datasets are shown in the unpaired section ',\n '(hover over the underlined words to highlight below). ',\n 'Paired datasets are shown in the paired section.',\n '
', _l([\n '
', _l([\n 'To unpair individual dataset pairs, click the ',\n 'unpair buttons ( ). ',\n 'Click the \"Unpair all\" link to unpair all pairs.'\n ].join( '' )), '
',\n '', _l([\n 'You can include or remove the file extensions (e.g. \".fastq\") from your pair names by toggling the ',\n '\"Remove file extensions from pair names?\" control.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\". ',\n '(Note: you do not have to pair all unpaired datasets to finish.)'\n ].join( '' )), '
'\n ].join(''))\n })\n});\n\n//=============================================================================\n/** a modal version of the paired collection creator */\nvar pairedCollectionCreatorModal = function _pairedCollectionCreatorModal( datasets, options ){\n\n var deferred = jQuery.Deferred(),\n creator;\n\n options = _.defaults( options || {}, {\n datasets : datasets,\n oncancel : function(){\n Galaxy.modal.hide();\n deferred.reject( 'cancelled' );\n },\n oncreate : function( creator, response ){\n Galaxy.modal.hide();\n deferred.resolve( response );\n }\n });\n\n if( !window.Galaxy || !Galaxy.modal ){\n throw new Error( 'Galaxy or Galaxy.modal not found' );\n }\n\n creator = new PairedCollectionCreator( options );\n Galaxy.modal.show({\n title : 'Create a collection of paired datasets',\n body : creator.$el,\n width : '80%',\n height : '800px',\n closing_events: true\n });\n creator.render();\n window.creator = creator;\n\n //TODO: remove modal header\n return deferred;\n};\n\n\n//=============================================================================\nfunction createListOfPairsCollection( collection, defaultHideSourceItems ){\n var elements = collection.toJSON();\n//TODO: validate elements\n return pairedCollectionCreatorModal( elements, {\n historyId : collection.historyId,\n defaultHideSourceItems: defaultHideSourceItems\n });\n}\n\n\n//=============================================================================\n return {\n PairedCollectionCreator : PairedCollectionCreator,\n pairedCollectionCreatorModal : pairedCollectionCreatorModal,\n createListOfPairsCollection : createListOfPairsCollection\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js","define([\n \"mvc/collection/list-collection-creator\",\n \"mvc/history/hdca-model\",\n \"mvc/base-mvc\",\n \"utils/localization\"\n], function( LIST_CREATOR, HDCA, BASE_MVC, _l ){\n\n'use strict';\n\nvar logNamespace = 'collections';\n/*==============================================================================\nTODO:\n the paired creator doesn't really mesh with the list creator as parent\n it may be better to make an abstract super class for both\n composites may inherit from this (or vis-versa)\n PairedDatasetCollectionElementView doesn't make a lot of sense\n\n==============================================================================*/\n/** */\nvar PairedDatasetCollectionElementView = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend({\n _logNamespace : logNamespace,\n\n//TODO: use proper class (DatasetDCE or NestedDCDCE (or the union of both))\n tagName : 'li',\n className : 'collection-element',\n\n initialize : function( attributes ){\n this.element = attributes.element || {};\n this.identifier = attributes.identifier;\n },\n\n render : function(){\n this.$el\n .attr( 'data-element-id', this.element.id )\n .html( this.template({ identifier: this.identifier, element: this.element }) );\n return this;\n },\n\n //TODO: lots of unused space in the element - possibly load details and display them horiz.\n template : _.template([\n '<%- identifier %>',\n '<%- element.name %>',\n ].join('')),\n\n /** remove the DOM and any listeners */\n destroy : function(){\n this.off();\n this.$el.remove();\n },\n\n /** string rep */\n toString : function(){\n return 'DatasetCollectionElementView()';\n }\n});\n\n\n// ============================================================================\nvar _super = LIST_CREATOR.ListCollectionCreator;\n\n/** An interface for building collections.\n */\nvar PairCollectionCreator = _super.extend({\n\n /** the class used to display individual elements */\n elementViewClass : PairedDatasetCollectionElementView,\n /** the class this creator will create and save */\n collectionClass : HDCA.HistoryPairDatasetCollection,\n className : 'pair-collection-creator collection-creator flex-row-container',\n\n /** override to no-op */\n _mangleDuplicateNames : function(){},\n\n // TODO: this whole pattern sucks. There needs to be two classes of problem area:\n // bad inital choices and\n // when the user has painted his/her self into a corner during creation/use-of-the-creator\n /** render the entire interface */\n render : function( speed, callback ){\n if( this.workingElements.length === 2 ){\n return _super.prototype.render.call( this, speed, callback );\n }\n return this._renderInvalid( speed, callback );\n },\n\n // ------------------------------------------------------------------------ rendering elements\n /** render forward/reverse */\n _renderList : function( speed, callback ){\n //this.debug( '-- _renderList' );\n //precondition: there are two valid elements in workingElements\n var creator = this,\n $tmp = jQuery( '' ),\n $list = creator.$list();\n\n // lose the original views, create the new, append all at once, then call their renders\n _.each( this.elementViews, function( view ){\n view.destroy();\n creator.removeElementView( view );\n });\n $tmp.append( creator._createForwardElementView().$el );\n $tmp.append( creator._createReverseElementView().$el );\n $list.empty().append( $tmp.children() );\n _.invoke( creator.elementViews, 'render' );\n },\n\n /** create the forward element view */\n _createForwardElementView : function(){\n return this._createElementView( this.workingElements[0], { identifier: 'forward' } );\n },\n\n /** create the forward element view */\n _createReverseElementView : function(){\n return this._createElementView( this.workingElements[1], { identifier: 'reverse' } );\n },\n\n /** create an element view, cache in elementViews, and return */\n _createElementView : function( element, options ){\n var elementView = new this.elementViewClass( _.extend( options, {\n element : element,\n }));\n this.elementViews.push( elementView );\n return elementView;\n },\n\n /** swap the forward, reverse elements and re-render */\n swap : function(){\n this.workingElements = [\n this.workingElements[1],\n this.workingElements[0],\n ];\n this._renderList();\n },\n\n events : _.extend( _.clone( _super.prototype.events ), {\n 'click .swap' : 'swap',\n }),\n\n // ------------------------------------------------------------------------ templates\n //TODO: move to require text plugin and load these as text\n //TODO: underscore currently unnecc. bc no vars are used\n //TODO: better way of localizing text-nodes in long strings\n /** underscore template fns attached to class */\n templates : _.extend( _.clone( _super.prototype.templates ), {\n /** the middle: element list */\n middle : _.template([\n '', _l([\n 'Pair collections are permanent collections containing two datasets: one forward and one reverse. ',\n 'Often these are forward and reverse reads. The pair collections can be passed to tools and ',\n 'workflows in order to have analyses done on both datasets. This interface allows ',\n 'you to create a pair, name it, and swap which is forward and which reverse.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\".'\n ].join( '' )), '
'\n ].join('')),\n\n /** a simplified page communicating what went wrong and why the user needs to reselect something else */\n invalidInitial : _.template([\n '' + this.progressive + '...
';\n this.modal.$( '.modal-body' ).empty().append( indicator ).css({ 'margin-top': '8px' });\n },\n\n // (sorta) public interface - display the modal, render the form, and potentially copy the history\n // returns a jQuery.Deferred done->history copied, fail->user cancelled\n dialog : function _dialog( modal, history, options ){\n options = options || {};\n\n var dialog = this,\n deferred = jQuery.Deferred(),\n // TODO: getting a little byzantine here\n defaultCopyNameFn = options.nameFn || this.defaultName,\n defaultCopyName = defaultCopyNameFn({ name: history.get( 'name' ) }),\n // TODO: these two might be simpler as one 3 state option (all,active,no-choice)\n defaultCopyWhat = options.allDatasets? 'copy-all' : 'copy-non-deleted',\n allowAll = !_.isUndefined( options.allowAll )? options.allowAll : true,\n autoClose = !_.isUndefined( options.autoClose )? options.autoClose : true;\n\n this.modal = modal;\n\n\n // validate the name and copy if good\n function checkNameAndCopy(){\n var name = modal.$( '#copy-modal-title' ).val();\n if( !name ){\n modal.$( '.invalid-title' ).show();\n return;\n }\n // get further settings, shut down and indicate the ajax call, then hide and resolve/reject\n var copyAllDatasets = modal.$( 'input[name=\"copy-what\"]:checked' ).val() === 'copy-all';\n modal.$( 'button' ).prop( 'disabled', true );\n dialog._showAjaxIndicator();\n history.copy( true, name, copyAllDatasets )\n .done( function( response ){\n deferred.resolve( response );\n })\n .fail( function( xhr, status, message ){\n var options = { name: name, copyAllDatasets: copyAllDatasets };\n ERROR_MODAL.ajaxErrorModal( history, xhr, options, dialog.errorMessage );\n deferred.rejectWith( deferred, arguments );\n })\n .done( function(){\n if( autoClose ){ modal.hide(); }\n });\n }\n\n var originalClosingCallback = options.closing_callback;\n modal.show( _.extend( options, {\n title : this.title({ name: history.get( 'name' ) }),\n body : $( dialog._template({\n name : defaultCopyName,\n isAnon : Galaxy.user.isAnonymous(),\n allowAll : allowAll,\n copyWhat : defaultCopyWhat,\n activeLabel : this.activeLabel,\n allLabel : this.allLabel,\n anonWarning : this.anonWarning,\n })),\n buttons : _.object([\n [ _l( 'Cancel' ), function(){ modal.hide(); } ],\n [ this.submitLabel, checkNameAndCopy ]\n ]),\n height : 'auto',\n closing_events : true,\n closing_callback: function _historyCopyClose( cancelled ){\n if( cancelled ){\n deferred.reject({ cancelled : true });\n }\n if( originalClosingCallback ){\n originalClosingCallback( cancelled );\n }\n }\n }));\n\n // set the default dataset copy, autofocus the title, and set up for a simple return\n modal.$( '#copy-modal-title' ).focus().select();\n modal.$( '#copy-modal-title' ).on( 'keydown', function( ev ){\n if( ev.keyCode === 13 ){\n ev.preventDefault();\n checkNameAndCopy();\n }\n });\n\n return deferred;\n },\n};\n\n//==============================================================================\n// maintain the (slight) distinction between copy and import\n/**\n * Subclass CopyDialog to use the import language.\n */\nvar ImportDialog = _.extend( {}, CopyDialog, {\n defaultName : _.template( \"imported: <%- name %>\" ),\n title : _.template( _l( 'Importing history' ) + ' \"<%- name %>\"' ),\n submitLabel : _l( 'Import' ),\n errorMessage : _l( 'History could not be imported.' ),\n progressive : _l( 'Importing history' ),\n activeLabel : _l( 'Import only the active, non-deleted datasets' ),\n allLabel : _l( 'Import all datasets including deleted ones' ),\n anonWarning : _l( 'As an anonymous user, unless you login or register, you will lose your current history ' ) +\n _l( 'after importing this history. ' ),\n\n});\n\n//==============================================================================\n/**\n * Main interface for both history import and history copy dialogs.\n * @param {Backbone.Model} history the history to copy\n * @param {Object} options a hash\n * @return {jQuery.Deferred} promise that fails on close and succeeds on copy\n *\n * options:\n * (this object is also passed to the modal used to display the dialog and accepts modal options)\n * {Function} nameFn if defined, use this to build the default name shown to the user\n * (the fn is passed: {name:| Name | ' +\n 'Size | ' +\n 'Status | ' +\n '' +\n ' |
|---|
| ' +\n ' | ' +\n ' | Description | ' +\n 'Name | ' +\n 'Size | ' +\n 'Settings | ' +\n 'Status | ' +\n '
|---|
| Name | ' +\n 'Size | ' +\n 'Type | ' +\n 'Genome | ' +\n 'Settings | ' +\n 'Status | ' +\n '' +\n ' |
|---|
' +\n 'The length format is two-column, separated by whitespace, of the form:' +\n '
chrom/contig length of chrom/contig' +\n '' +\n '
' +\n 'For example, the first few entries of mm9.len are as follows:' +\n '
' +\n 'chr1 197195432\\n' +\n 'chr2 181748087\\n' +\n 'chr3 159599783\\n' +\n 'chr4 155630120\\n' +\n 'chr5 152537259' +\n '' +\n '' +\n '
Trackster uses this information to populate the select box for chrom/contig, and' +\n 'to set the maximum basepair of the track browser. You may either upload a .len file' +\n 'of this format (Len File option), or directly enter the information into the box ' +\n '(Len Entry option).
';\n },\n\n _templateFasta: function() {\n return '' +\n 'This is a multi-fasta file from your current history that provides the genome' +\n 'sequences for each chromosome/contig in your build.' +\n '
' +\n '' +\n 'Here is a snippet from an example multi-fasta file:' +\n '
' +\n '>chr1\\n' +\n 'ATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\\n\\n' +\n '>chr2\\n' +\n 'GGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\\n\\n' +\n '...' +\n '' +\n '';\n }\n });\n\n return {\n View: View\n }\n});\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/user/user-custom-builds.js","/** User Preferences view */\ndefine( [ 'mvc/form/form-view', 'mvc/ui/ui-misc' ], function( Form, Ui ) {\n\n /** Contains descriptive dictionaries describing user forms */\n var Model = Backbone.Model.extend({\n initialize: function( options ) {\n options = options || {};\n options.user_id = options.user_id || Galaxy.user.id;\n this.set({\n 'user_id' : options.user_id,\n 'information': {\n title : 'Manage information',\n description : 'Edit your email, addresses and custom parameters or change your username.',\n url : 'api/users/' + options.user_id + '/information/inputs',\n icon : 'fa-user'\n },\n 'password': {\n title : 'Change password',\n description : 'Allows you to change your login credentials.',\n icon : 'fa-unlock-alt',\n url : 'api/users/' + options.user_id + '/password/inputs',\n submit_title : 'Save password',\n },\n 'communication': {\n title : 'Change communication settings',\n description : 'Enable or disable the communication feature to chat with other users.',\n url : 'api/users/' + options.user_id + '/communication/inputs',\n icon : 'fa-comments-o'\n },\n 'permissions': {\n title : 'Set dataset permissions for new histories',\n description : 'Grant others default access to newly created histories. Changes made here will only affect histories created after these settings have been stored.',\n url : 'api/users/' + options.user_id + '/permissions/inputs',\n icon : 'fa-users',\n submit_title : 'Save permissions'\n },\n 'api_key': {\n title : 'Manage API key',\n description : 'Access your current API key or create a new one.',\n url : 'api/users/' + options.user_id + '/api_key/inputs',\n icon : 'fa-key',\n submit_title : 'Create a new key',\n submit_icon : 'fa-check'\n },\n 'toolbox_filters': {\n title : 'Manage Toolbox filters',\n description : 'Customize your Toolbox by displaying or omitting sets of Tools.',\n url : 'api/users/' + options.user_id + '/toolbox_filters/inputs',\n icon : 'fa-filter',\n submit_title : 'Save filters'\n },\n 'openids': {\n title : 'Manage OpenIDs',\n description : 'Associate OpenIDs with your account.',\n icon : 'fa-openid',\n onclick : function() {\n window.location.href = Galaxy.root + 'user/openid_manage?cntrller=user&use_panels=True';\n }\n },\n 'custom_builds': {\n title : 'Manage custom builds',\n description : 'Add or remove custom builds using history datasets.',\n icon : 'fa-cubes',\n onclick : function() {\n window.location.href = Galaxy.root + 'custom_builds';\n }\n },\n 'logout': {\n title : 'Sign out',\n description : 'Click here to sign out of all sessions.',\n icon : 'fa-sign-out',\n onclick : function() {\n Galaxy.modal.show({\n title : 'Sign out',\n body : 'Do you want to continue and sign out of all active sessions?',\n buttons : {\n 'Cancel' : function() { Galaxy.modal.hide(); },\n 'Sign out' : function() { window.location.href = Galaxy.root + 'user/logout'; }\n }\n });\n }\n }\n });\n }\n });\n\n /** View of the main user preference panel with links to individual user forms */\n var View = Backbone.View.extend({\n\n initialize: function() {\n this.model = new Model();\n this.message = new Ui.Message();\n this.setElement( '' );\n this.render();\n },\n\n render: function() {\n var self = this;\n var config = Galaxy.config;\n $.getJSON( Galaxy.root + 'api/users/' + Galaxy.user.id, function( data ) {\n self.$preferences = $( '' ).addClass( 'ui-panel' )\n .append( self.message.$el )\n .append( $( '' ).append( 'User preferences' ) )\n .append( $( '' ).append( 'You are logged in as ' + _.escape( data.email ) + '.' ) )\n .append( self.$table = $( '
' +\n 'You are using ' + options.nice_total_disk_usage + ' of disk space in this Galaxy instance. ' +\n ( Galaxy.config.enable_quotas ? 'Your disk quota is: ' + options.quota + '. ' : '' ) +\n 'Is your usage more than expected? See the documentation for tips on how to find all of the data in your account.' +\n '
';\n }\n });\n\n /** View of individual user forms */\n var Forms = Backbone.View.extend({\n\n initialize: function( options ) {\n this.model = new Model( options );\n this.page = this.model.get( options.form_id );\n this.setElement( '' );\n this.render();\n },\n\n render: function() {\n var self = this;\n $.ajax({\n url : Galaxy.root + this.page.url,\n type : 'GET'\n }).done( function( response ) {\n var options = $.extend( {}, self.page, response );\n var form = new Form({\n title : options.title,\n icon : options.icon,\n inputs : options.inputs,\n operations: {\n 'submit': new Ui.ButtonIcon({\n tooltip : options.submit_tooltip,\n title : options.submit_title || 'Save settings',\n icon : options.submit_icon || 'fa-save',\n onclick : function() { self._submit( form, options ) }\n })\n }\n });\n self.$el.empty().append( form.$el );\n }).fail( function( response ) {\n self.$el.empty().append( new Ui.Message({\n message : 'Failed to load resource ' + self.page.url + '.',\n status : 'danger',\n persistent : true\n }).$el );\n });\n },\n\n _submit: function( form, options ) {\n var self = this;\n $.ajax( {\n url : Galaxy.root + options.url,\n data : JSON.stringify( form.data.create() ),\n type : 'PUT',\n contentType : 'application/json'\n }).done( function( response ) {\n form.data.matchModel( response, function ( input, input_id ) {\n form.field_list[ input_id ].value( input.value );\n });\n form.message.update( { message: response.message, status: 'success' } );\n }).fail( function( response ) {\n form.message.update( { message: response.responseJSON.err_msg, status: 'danger' } );\n });\n }\n });\n\n return {\n View : View,\n Forms : Forms\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/user/user-preferences.js","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else {\n // Browser globals\n root.LoadingIndicator = factory();\n }\n\n//============================================================================\n}(this, function () {\n //TODO: too specific to history panel\n function LoadingIndicator( $where, options ){\n\n var self = this;\n // defaults\n options = jQuery.extend({\n cover : false\n }, options || {} );\n\n function render(){\n var html = [\n '\" + this.formattedReference() + \"
\");\n\t return this;\n\t },\n\t formattedReference: function () {\n\t var model = this.model;\n\t var entryType = model.entryType();\n\t var fields = model.fields();\n\t\n\t var ref = \"\";\n\t // Code inspired by...\n\t // https://github.com/vkaravir/bib-publication-list/blob/master/src/bib-publication-list.js\n\t var authorsAndYear = this._asSentence((fields.author ? fields.author : \"\") + (fields.year ? \" (\" + fields.year + \")\" : \"\")) + \" \";\n\t var title = fields.title || \"\";\n\t var pages = fields.pages ? \"pp. \" + fields.pages : \"\";\n\t var address = fields.address;\n\t if (entryType == \"article\") {\n\t var volume = (fields.volume ? fields.volume : \"\") + (fields.number ? \" (\" + fields.number + \")\" : \"\") + (pages ? \", \" + pages : \"\");\n\t ref = authorsAndYear + this._asSentence(title) + (fields.journal ? \"In \" + fields.journal + \", \" : \"\") + this._asSentence(volume) + this._asSentence(fields.address) + \"<\\/em>\";\n\t } else if (entryType == \"inproceedings\" || entryType == \"proceedings\") {\n\t ref = authorsAndYear + this._asSentence(title) + (fields.booktitle ? \"In \" + fields.booktitle + \", \" : \"\") + (pages ? pages : \"\") + (address ? \", \" + address : \"\") + \".<\\/em>\";\n\t } else if (entryType == \"mastersthesis\" || entryType == \"phdthesis\") {\n\t ref = authorsAndYear + this._asSentence(title) + (fields.howpublished ? fields.howpublished + \". \" : \"\") + (fields.note ? fields.note + \".\" : \"\");\n\t } else if (entryType == \"techreport\") {\n\t ref = authorsAndYear + this._asSentence(title) + this._asSentence(fields.institution) + this._asSentence(fields.number) + this._asSentence(fields.type);\n\t } else if (entryType == \"book\" || entryType == \"inbook\" || entryType == \"incollection\") {\n\t ref = authorsAndYear + \" \" + this._formatBookInfo(fields);\n\t } else {\n\t ref = authorsAndYear + \" \" + this._asSentence(title) + this._asSentence(fields.howpublished) + this._asSentence(fields.note);\n\t }\n\t var doiUrl = \"\";\n\t if (fields.doi) {\n\t doiUrl = 'http://dx.doi.org/' + fields.doi;\n\t ref += '[doi:' + fields.doi + \"]\";\n\t }\n\t var url = fields.url || doiUrl;\n\t if (url) {\n\t ref += '[Link]';\n\t }\n\t return ref;\n\t },\n\t _formatBookInfo: function (fields) {\n\t var info = \"\";\n\t if (fields.chapter) {\n\t info += fields.chapter + \" in \";\n\t }\n\t if (fields.title) {\n\t info += \"\" + fields.title + \"<\\/em>\";\n\t }\n\t if (fields.editor) {\n\t info += \", Edited by \" + fields.editor + \", \";\n\t }\n\t if (fields.publisher) {\n\t info += \", \" + fields.publisher;\n\t }\n\t if (fields.pages) {\n\t info += \", pp. \" + fields.pages + \"\";\n\t }\n\t if (fields.series) {\n\t info += \", \" + fields.series + \"<\\/em>\";\n\t }\n\t if (fields.volume) {\n\t info += \", Vol.\" + fields.volume;\n\t }\n\t if (fields.issn) {\n\t info += \", ISBN: \" + fields.issn;\n\t }\n\t return info + \".\";\n\t },\n\t _asSentence: function (str) {\n\t return str && str.trim() ? str + \". \" : \"\";\n\t }\n\t });\n\t\n\t var CitationListView = Backbone.View.extend({\n\t el: '#citations',\n\t /**\n\t * Set up view.\n\t */\n\t initialize: function () {\n\t this.listenTo(this.collection, 'add', this.renderCitation);\n\t },\n\t\n\t events: {\n\t 'click .citations-to-bibtex': 'showBibtex',\n\t 'click .citations-to-formatted': 'showFormatted'\n\t },\n\t\n\t renderCitation: function (citation) {\n\t var citationView = new CitationView({ model: citation });\n\t this.$(\".citations-formatted\").append(citationView.render().el);\n\t var rawTextarea = this.$(\".citations-bibtex-text\");\n\t rawTextarea.val(rawTextarea.val() + \"\\n\\r\" + citation.attributes.content);\n\t },\n\t\n\t render: function () {\n\t this.$el.html(this.citationsElement());\n\t this.collection.each(function (item) {\n\t this.renderCitation(item);\n\t }, this);\n\t this.showFormatted();\n\t },\n\t\n\t showBibtex: function () {\n\t this.$(\".citations-to-formatted\").show();\n\t this.$(\".citations-to-bibtex\").hide();\n\t this.$(\".citations-bibtex\").show();\n\t this.$(\".citations-formatted\").hide();\n\t this.$(\".citations-bibtex-text\").select();\n\t },\n\t\n\t showFormatted: function () {\n\t this.$(\".citations-to-formatted\").hide();\n\t this.$(\".citations-to-bibtex\").show();\n\t this.$(\".citations-bibtex\").hide();\n\t this.$(\".citations-formatted\").show();\n\t },\n\t\n\t partialWarningElement: function () {\n\t if (this.collection.partial) {\n\t return ['' + JSON.stringify(xhr.responseJSON) + '';\n\t } else {\n\t content += ': ' + message;\n\t }\n\t }\n\t creator._showAlert(content, 'alert-danger');\n\t },\n\t\n\t events: {\n\t // header\n\t 'click .more-help': '_clickMoreHelp',\n\t 'click .less-help': '_clickLessHelp',\n\t 'click .main-help': '_toggleHelp',\n\t 'click .header .alert button': '_hideAlert',\n\t\n\t 'click .reset': 'reset',\n\t 'click .clear-selected': 'clearSelectedElements',\n\t\n\t // elements - selection\n\t 'click .collection-elements': 'clearSelectedElements',\n\t\n\t // elements - drop target\n\t // 'dragenter .collection-elements': '_dragenterElements',\n\t // 'dragleave .collection-elements': '_dragleaveElements',\n\t 'dragover .collection-elements': '_dragoverElements',\n\t 'drop .collection-elements': '_dropElements',\n\t\n\t // these bubble up from the elements as custom events\n\t 'collection-element.dragstart .collection-elements': '_elementDragstart',\n\t 'collection-element.dragend .collection-elements': '_elementDragend',\n\t\n\t // footer\n\t 'change .collection-name': '_changeName',\n\t 'keydown .collection-name': '_nameCheckForEnter',\n\t 'change .hide-originals': '_changeHideOriginals',\n\t 'click .cancel-create': '_cancelCreate',\n\t 'click .create-collection': '_clickCreate' //,\n\t },\n\t\n\t // ........................................................................ elements\n\t /** reset all data to the initial state */\n\t reset: function () {\n\t this._instanceSetUp();\n\t this._elementsSetUp();\n\t this.render();\n\t },\n\t\n\t /** deselect all elements */\n\t clearSelectedElements: function (ev) {\n\t this.$('.collection-elements .collection-element').removeClass('selected');\n\t this.$('.collection-elements-controls > .clear-selected').hide();\n\t },\n\t\n\t //_dragenterElements : function( ev ){\n\t // //this.debug( '_dragenterElements:', ev );\n\t //},\n\t //TODO: if selected are dragged out of the list area - remove the placeholder - cuz it won't work anyway\n\t // _dragleaveElements : function( ev ){\n\t // //this.debug( '_dragleaveElements:', ev );\n\t // },\n\t\n\t /** track the mouse drag over the list adding a placeholder to show where the drop would occur */\n\t _dragoverElements: function (ev) {\n\t //this.debug( '_dragoverElements:', ev );\n\t ev.preventDefault();\n\t\n\t var $list = this.$list();\n\t this._checkForAutoscroll($list, ev.originalEvent.clientY);\n\t var $nearest = this._getNearestElement(ev.originalEvent.clientY);\n\t\n\t //TODO: no need to re-create - move instead\n\t this.$('.element-drop-placeholder').remove();\n\t var $placeholder = $('');\n\t if (!$nearest.length) {\n\t $list.append($placeholder);\n\t } else {\n\t $nearest.before($placeholder);\n\t }\n\t },\n\t\n\t /** If the mouse is near enough to the list's top or bottom, scroll the list */\n\t _checkForAutoscroll: function ($element, y) {\n\t var AUTOSCROLL_SPEED = 2,\n\t offset = $element.offset(),\n\t scrollTop = $element.scrollTop(),\n\t upperDist = y - offset.top,\n\t lowerDist = offset.top + $element.outerHeight() - y;\n\t if (upperDist >= 0 && upperDist < this.autoscrollDist) {\n\t $element.scrollTop(scrollTop - AUTOSCROLL_SPEED);\n\t } else if (lowerDist >= 0 && lowerDist < this.autoscrollDist) {\n\t $element.scrollTop(scrollTop + AUTOSCROLL_SPEED);\n\t }\n\t },\n\t\n\t /** get the nearest element based on the mouse's Y coordinate.\n\t * If the y is at the end of the list, return an empty jQuery object.\n\t */\n\t _getNearestElement: function (y) {\n\t var WIGGLE = 4,\n\t lis = this.$('.collection-elements li.collection-element').toArray();\n\t for (var i = 0; i < lis.length; i++) {\n\t var $li = $(lis[i]),\n\t top = $li.offset().top,\n\t halfHeight = Math.floor($li.outerHeight() / 2) + WIGGLE;\n\t if (top + halfHeight > y && top - halfHeight < y) {\n\t return $li;\n\t }\n\t }\n\t return $();\n\t },\n\t\n\t /** drop (dragged/selected elements) onto the list, re-ordering the internal list */\n\t _dropElements: function (ev) {\n\t if (ev.originalEvent) {\n\t ev = ev.originalEvent;\n\t }\n\t // both required for firefox\n\t ev.preventDefault();\n\t ev.dataTransfer.dropEffect = 'move';\n\t\n\t // insert before the nearest element or after the last.\n\t var $nearest = this._getNearestElement(ev.clientY);\n\t if ($nearest.length) {\n\t this.$dragging.insertBefore($nearest);\n\t } else {\n\t // no nearest before - insert after last element\n\t this.$dragging.insertAfter(this.$('.collection-elements .collection-element').last());\n\t }\n\t // resync the creator's list based on the new DOM order\n\t this._syncOrderToDom();\n\t return false;\n\t },\n\t\n\t /** resync the creator's list of elements based on the DOM order */\n\t _syncOrderToDom: function () {\n\t var creator = this,\n\t newElements = [];\n\t //TODO: doesn't seem wise to use the dom to store these - can't we sync another way?\n\t this.$('.collection-elements .collection-element').each(function () {\n\t var id = $(this).attr('data-element-id'),\n\t element = _.findWhere(creator.workingElements, { id: id });\n\t if (element) {\n\t newElements.push(element);\n\t } else {\n\t console.error('missing element: ', id);\n\t }\n\t });\n\t this.workingElements = newElements;\n\t this._renderList();\n\t },\n\t\n\t /** drag communication with element sub-views: dragstart */\n\t _elementDragstart: function (ev, element) {\n\t // auto select the element causing the event and move all selected\n\t element.select(true);\n\t this.$dragging = this.$('.collection-elements .collection-element.selected');\n\t },\n\t\n\t /** drag communication with element sub-views: dragend - remove the placeholder */\n\t _elementDragend: function (ev, element) {\n\t $('.element-drop-placeholder').remove();\n\t this.$dragging = null;\n\t },\n\t\n\t // ------------------------------------------------------------------------ templates\n\t //TODO: move to require text plugin and load these as text\n\t //TODO: underscore currently unnecc. bc no vars are used\n\t //TODO: better way of localizing text-nodes in long strings\n\t /** underscore template fns attached to class */\n\t templates: _.extend({}, baseCreator.CollectionCreatorMixin._creatorTemplates, {\n\t\n\t /** the header (not including help text) */\n\t header: _.template(['
', _l(['Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ', 'workflows in order to have analyses done on each member of the entire group. This interface allows ', 'you to create a collection and re-order the final collection.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\".'].join('')), '
'].join('')),\n\t\n\t /** shown in list when all elements are discarded */\n\t invalidElements: _.template([_l('The following selections could not be included due to problems:'), '<%= dataset.peek %>', '<% } %>', '<% } %>', '
| ' + ' | Name | ' + 'Size | ' + 'Created | ' + '
|---|
' + JSON.stringify(xhr.responseJSON) + '';\n\t } else {\n\t content += ': ' + message;\n\t }\n\t }\n\t creator._showAlert(content, 'alert-danger');\n\t },\n\t\n\t // ------------------------------------------------------------------------ rendering\n\t /** render the entire interface */\n\t render: function (speed, callback) {\n\t //this.debug( '-- _render' );\n\t //this.$el.empty().html( this.templates.main() );\n\t this.$el.empty().html(this.templates.main());\n\t this._renderHeader(speed);\n\t this._renderMiddle(speed);\n\t this._renderFooter(speed);\n\t this._addPluginComponents();\n\t this.trigger('rendered', this);\n\t return this;\n\t },\n\t\n\t /** render the header section */\n\t _renderHeader: function (speed, callback) {\n\t //this.debug( '-- _renderHeader' );\n\t var $header = this.$('.header').empty().html(this.templates.header()).find('.help-content').prepend($(this.templates.helpContent()));\n\t\n\t this._renderFilters();\n\t return $header;\n\t },\n\t /** fill the filter inputs with the filter values */\n\t _renderFilters: function () {\n\t return this.$('.forward-column .column-header input').val(this.filters[0]).add(this.$('.reverse-column .column-header input').val(this.filters[1]));\n\t },\n\t\n\t /** render the middle including unpaired and paired sections (which may be hidden) */\n\t _renderMiddle: function (speed, callback) {\n\t var $middle = this.$('.middle').empty().html(this.templates.middle());\n\t\n\t // (re-) hide the un/paired panels based on instance vars\n\t if (this.unpairedPanelHidden) {\n\t this.$('.unpaired-columns').hide();\n\t } else if (this.pairedPanelHidden) {\n\t this.$('.paired-columns').hide();\n\t }\n\t\n\t this._renderUnpaired();\n\t this._renderPaired();\n\t return $middle;\n\t },\n\t /** render the unpaired section, showing datasets accrd. to filters, update the unpaired counts */\n\t _renderUnpaired: function (speed, callback) {\n\t //this.debug( '-- _renderUnpaired' );\n\t var creator = this,\n\t $fwd,\n\t $rev,\n\t $prd = [],\n\t split = this._splitByFilters();\n\t // update unpaired counts\n\t this.$('.forward-column .title').text([split[0].length, _l('unpaired forward')].join(' '));\n\t this.$('.forward-column .unpaired-info').text(this._renderUnpairedDisplayStr(this.unpaired.length - split[0].length));\n\t this.$('.reverse-column .title').text([split[1].length, _l('unpaired reverse')].join(' '));\n\t this.$('.reverse-column .unpaired-info').text(this._renderUnpairedDisplayStr(this.unpaired.length - split[1].length));\n\t\n\t this.$('.unpaired-columns .column-datasets').empty();\n\t\n\t // show/hide the auto pair button if any unpaired are left\n\t this.$('.autopair-link').toggle(this.unpaired.length !== 0);\n\t if (this.unpaired.length === 0) {\n\t this._renderUnpairedEmpty();\n\t return;\n\t }\n\t\n\t // create the dataset dom arrays\n\t $rev = split[1].map(function (dataset, i) {\n\t // if there'll be a fwd dataset across the way, add a button to pair the row\n\t if (split[0][i] !== undefined && split[0][i] !== dataset) {\n\t $prd.push(creator._renderPairButton());\n\t }\n\t return creator._renderUnpairedDataset(dataset);\n\t });\n\t $fwd = split[0].map(function (dataset) {\n\t return creator._renderUnpairedDataset(dataset);\n\t });\n\t\n\t if (!$fwd.length && !$rev.length) {\n\t this._renderUnpairedNotShown();\n\t return;\n\t }\n\t // add to appropo cols\n\t //TODO: not the best way to render - consider rendering the entire unpaired-columns section in a fragment\n\t // and swapping out that\n\t this.$('.unpaired-columns .forward-column .column-datasets').append($fwd).add(this.$('.unpaired-columns .paired-column .column-datasets').append($prd)).add(this.$('.unpaired-columns .reverse-column .column-datasets').append($rev));\n\t this._adjUnpairedOnScrollbar();\n\t },\n\t /** return a string to display the count of filtered out datasets */\n\t _renderUnpairedDisplayStr: function (numFiltered) {\n\t return ['(', numFiltered, ' ', _l('filtered out'), ')'].join('');\n\t },\n\t /** return an unattached jQuery DOM element to represent an unpaired dataset */\n\t _renderUnpairedDataset: function (dataset) {\n\t //TODO: to underscore template\n\t return $('').attr('id', 'dataset-' + dataset.id).addClass('dataset unpaired').attr('draggable', true).addClass(dataset.selected ? 'selected' : '').append($('').addClass('dataset-name').text(dataset.name))\n\t //??\n\t .data('dataset', dataset);\n\t },\n\t /** render the button that may go between unpaired datasets, allowing the user to pair a row */\n\t _renderPairButton: function () {\n\t //TODO: *not* a dataset - don't pretend like it is\n\t return $('').addClass('dataset unpaired').append($('').addClass('dataset-name').text(_l('Pair these datasets')));\n\t },\n\t /** a message to display when no unpaired left */\n\t _renderUnpairedEmpty: function () {\n\t //this.debug( '-- renderUnpairedEmpty' );\n\t var $msg = $('').text('(' + _l('no remaining unpaired datasets') + ')');\n\t this.$('.unpaired-columns .paired-column .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t /** a message to display when no unpaired can be shown with the current filters */\n\t _renderUnpairedNotShown: function () {\n\t //this.debug( '-- renderUnpairedEmpty' );\n\t var $msg = $('').text('(' + _l('no datasets were found matching the current filters') + ')');\n\t this.$('.unpaired-columns .paired-column .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t /** try to detect if the unpaired section has a scrollbar and adjust left column for better centering of all */\n\t _adjUnpairedOnScrollbar: function () {\n\t var $unpairedColumns = this.$('.unpaired-columns').last(),\n\t $firstDataset = this.$('.unpaired-columns .reverse-column .dataset').first();\n\t if (!$firstDataset.length) {\n\t return;\n\t }\n\t var ucRight = $unpairedColumns.offset().left + $unpairedColumns.outerWidth(),\n\t dsRight = $firstDataset.offset().left + $firstDataset.outerWidth(),\n\t rightDiff = Math.floor(ucRight) - Math.floor(dsRight);\n\t //this.debug( 'rightDiff:', ucRight, '-', dsRight, '=', rightDiff );\n\t this.$('.unpaired-columns .forward-column').css('margin-left', rightDiff > 0 ? rightDiff : 0);\n\t },\n\t\n\t /** render the paired section and update counts of paired datasets */\n\t _renderPaired: function (speed, callback) {\n\t //this.debug( '-- _renderPaired' );\n\t this.$('.paired-column-title .title').text([this.paired.length, _l('paired')].join(' '));\n\t // show/hide the unpair all link\n\t this.$('.unpair-all-link').toggle(this.paired.length !== 0);\n\t if (this.paired.length === 0) {\n\t this._renderPairedEmpty();\n\t return;\n\t //TODO: would be best to return here (the $columns)\n\t } else {\n\t // show/hide 'remove extensions link' when any paired and they seem to have extensions\n\t this.$('.remove-extensions-link').show();\n\t }\n\t\n\t this.$('.paired-columns .column-datasets').empty();\n\t var creator = this;\n\t this.paired.forEach(function (pair, i) {\n\t //TODO: cache these?\n\t var pairView = new PairView({ pair: pair });\n\t creator.$('.paired-columns .column-datasets').append(pairView.render().$el).append([''].join(''));\n\t });\n\t },\n\t /** a message to display when none paired */\n\t _renderPairedEmpty: function () {\n\t var $msg = $('').text('(' + _l('no paired datasets yet') + ')');\n\t this.$('.paired-columns .column-datasets').empty().prepend($msg);\n\t return $msg;\n\t },\n\t\n\t footerSettings: {\n\t '.hide-originals': 'hideOriginals',\n\t '.remove-extensions': 'removeExtensions'\n\t },\n\t\n\t /** add any jQuery/bootstrap/custom plugins to elements rendered */\n\t _addPluginComponents: function () {\n\t this._chooseFiltersPopover('.choose-filters-link');\n\t this.$('.help-content i').hoverhighlight('.collection-creator', 'rgba( 64, 255, 255, 1.0 )');\n\t },\n\t\n\t /** build a filter selection popover allowing selection of common filter pairs */\n\t _chooseFiltersPopover: function (selector) {\n\t function filterChoice(val1, val2) {\n\t return [''].join('');\n\t }\n\t var $popoverContent = $(_.template(['
', _l(['Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ', 'These collections can be passed to tools and workflows in order to have analyses done on each member of ', 'the entire group. This interface allows you to create a collection, choose which datasets are paired, ', 'and re-order the final collection.'].join('')), '
', '', _l(['Unpaired datasets are shown in the unpaired section ', '(hover over the underlined words to highlight below). ', 'Paired datasets are shown in the paired section.', '
', _l(['
', _l(['To unpair individual dataset pairs, click the ', 'unpair buttons ( ). ', 'Click the \"Unpair all\" link to unpair all pairs.'].join('')), '
', '', _l(['You can include or remove the file extensions (e.g. \".fastq\") from your pair names by toggling the ', '\"Remove file extensions from pair names?\" control.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\". ', '(Note: you do not have to pair all unpaired datasets to finish.)'].join('')), '
'].join(''))\n\t })\n\t });\n\t\n\t //=============================================================================\n\t /** a modal version of the paired collection creator */\n\t var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datasets, options) {\n\t\n\t var deferred = jQuery.Deferred(),\n\t creator;\n\t\n\t options = _.defaults(options || {}, {\n\t datasets: datasets,\n\t oncancel: function () {\n\t Galaxy.modal.hide();\n\t deferred.reject('cancelled');\n\t },\n\t oncreate: function (creator, response) {\n\t Galaxy.modal.hide();\n\t deferred.resolve(response);\n\t }\n\t });\n\t\n\t if (!window.Galaxy || !Galaxy.modal) {\n\t throw new Error('Galaxy or Galaxy.modal not found');\n\t }\n\t\n\t creator = new PairedCollectionCreator(options);\n\t Galaxy.modal.show({\n\t title: 'Create a collection of paired datasets',\n\t body: creator.$el,\n\t width: '80%',\n\t height: '800px',\n\t closing_events: true\n\t });\n\t creator.render();\n\t window.creator = creator;\n\t\n\t //TODO: remove modal header\n\t return deferred;\n\t };\n\t\n\t //=============================================================================\n\t function createListOfPairsCollection(collection, defaultHideSourceItems) {\n\t var elements = collection.toJSON();\n\t //TODO: validate elements\n\t return pairedCollectionCreatorModal(elements, {\n\t historyId: collection.historyId,\n\t defaultHideSourceItems: defaultHideSourceItems\n\t });\n\t }\n\t\n\t //=============================================================================\n\t return {\n\t PairedCollectionCreator: PairedCollectionCreator,\n\t pairedCollectionCreatorModal: pairedCollectionCreatorModal,\n\t createListOfPairsCollection: createListOfPairsCollection\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2), __webpack_require__(1), __webpack_require__(1)))\n\n/***/ }),\n/* 112 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, _, jQuery) {!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(35), __webpack_require__(42), __webpack_require__(6), __webpack_require__(5)], __WEBPACK_AMD_DEFINE_RESULT__ = function (LIST_CREATOR, HDCA, BASE_MVC, _l) {\n\t\n\t 'use strict';\n\t\n\t var logNamespace = 'collections';\n\t /*==============================================================================\n\t TODO:\n\t the paired creator doesn't really mesh with the list creator as parent\n\t it may be better to make an abstract super class for both\n\t composites may inherit from this (or vis-versa)\n\t PairedDatasetCollectionElementView doesn't make a lot of sense\n\t \n\t ==============================================================================*/\n\t /** */\n\t var PairedDatasetCollectionElementView = Backbone.View.extend(BASE_MVC.LoggableMixin).extend({\n\t _logNamespace: logNamespace,\n\t\n\t //TODO: use proper class (DatasetDCE or NestedDCDCE (or the union of both))\n\t tagName: 'li',\n\t className: 'collection-element',\n\t\n\t initialize: function (attributes) {\n\t this.element = attributes.element || {};\n\t this.identifier = attributes.identifier;\n\t },\n\t\n\t render: function () {\n\t this.$el.attr('data-element-id', this.element.id).html(this.template({ identifier: this.identifier, element: this.element }));\n\t return this;\n\t },\n\t\n\t //TODO: lots of unused space in the element - possibly load details and display them horiz.\n\t template: _.template(['<%- identifier %>', '<%- element.name %>'].join('')),\n\t\n\t /** remove the DOM and any listeners */\n\t destroy: function () {\n\t this.off();\n\t this.$el.remove();\n\t },\n\t\n\t /** string rep */\n\t toString: function () {\n\t return 'DatasetCollectionElementView()';\n\t }\n\t });\n\t\n\t // ============================================================================\n\t var _super = LIST_CREATOR.ListCollectionCreator;\n\t\n\t /** An interface for building collections.\n\t */\n\t var PairCollectionCreator = _super.extend({\n\t\n\t /** the class used to display individual elements */\n\t elementViewClass: PairedDatasetCollectionElementView,\n\t /** the class this creator will create and save */\n\t collectionClass: HDCA.HistoryPairDatasetCollection,\n\t className: 'pair-collection-creator collection-creator flex-row-container',\n\t\n\t /** override to no-op */\n\t _mangleDuplicateNames: function () {},\n\t\n\t // TODO: this whole pattern sucks. There needs to be two classes of problem area:\n\t // bad inital choices and\n\t // when the user has painted his/her self into a corner during creation/use-of-the-creator\n\t /** render the entire interface */\n\t render: function (speed, callback) {\n\t if (this.workingElements.length === 2) {\n\t return _super.prototype.render.call(this, speed, callback);\n\t }\n\t return this._renderInvalid(speed, callback);\n\t },\n\t\n\t // ------------------------------------------------------------------------ rendering elements\n\t /** render forward/reverse */\n\t _renderList: function (speed, callback) {\n\t //this.debug( '-- _renderList' );\n\t //precondition: there are two valid elements in workingElements\n\t var creator = this,\n\t $tmp = jQuery(''),\n\t $list = creator.$list();\n\t\n\t // lose the original views, create the new, append all at once, then call their renders\n\t _.each(this.elementViews, function (view) {\n\t view.destroy();\n\t creator.removeElementView(view);\n\t });\n\t $tmp.append(creator._createForwardElementView().$el);\n\t $tmp.append(creator._createReverseElementView().$el);\n\t $list.empty().append($tmp.children());\n\t _.invoke(creator.elementViews, 'render');\n\t },\n\t\n\t /** create the forward element view */\n\t _createForwardElementView: function () {\n\t return this._createElementView(this.workingElements[0], { identifier: 'forward' });\n\t },\n\t\n\t /** create the forward element view */\n\t _createReverseElementView: function () {\n\t return this._createElementView(this.workingElements[1], { identifier: 'reverse' });\n\t },\n\t\n\t /** create an element view, cache in elementViews, and return */\n\t _createElementView: function (element, options) {\n\t var elementView = new this.elementViewClass(_.extend(options, {\n\t element: element\n\t }));\n\t this.elementViews.push(elementView);\n\t return elementView;\n\t },\n\t\n\t /** swap the forward, reverse elements and re-render */\n\t swap: function () {\n\t this.workingElements = [this.workingElements[1], this.workingElements[0]];\n\t this._renderList();\n\t },\n\t\n\t events: _.extend(_.clone(_super.prototype.events), {\n\t 'click .swap': 'swap'\n\t }),\n\t\n\t // ------------------------------------------------------------------------ templates\n\t //TODO: move to require text plugin and load these as text\n\t //TODO: underscore currently unnecc. bc no vars are used\n\t //TODO: better way of localizing text-nodes in long strings\n\t /** underscore template fns attached to class */\n\t templates: _.extend(_.clone(_super.prototype.templates), {\n\t /** the middle: element list */\n\t middle: _.template(['', _l(['Pair collections are permanent collections containing two datasets: one forward and one reverse. ', 'Often these are forward and reverse reads. The pair collections can be passed to tools and ', 'workflows in order to have analyses done on both datasets. This interface allows ', 'you to create a pair, name it, and swap which is forward and which reverse.'].join('')), '
', '', _l(['Once your collection is complete, enter a name and ', 'click \"Create list\".'].join('')), '
'].join('')),\n\t\n\t /** a simplified page communicating what went wrong and why the user needs to reselect something else */\n\t invalidInitial: _.template(['' + this.progressive + '...
';\n\t this.modal.$('.modal-body').empty().append(indicator).css({ 'margin-top': '8px' });\n\t },\n\t\n\t // (sorta) public interface - display the modal, render the form, and potentially copy the history\n\t // returns a jQuery.Deferred done->history copied, fail->user cancelled\n\t dialog: function _dialog(modal, history, options) {\n\t options = options || {};\n\t\n\t var dialog = this,\n\t deferred = jQuery.Deferred(),\n\t\n\t // TODO: getting a little byzantine here\n\t defaultCopyNameFn = options.nameFn || this.defaultName,\n\t defaultCopyName = defaultCopyNameFn({ name: history.get('name') }),\n\t\n\t // TODO: these two might be simpler as one 3 state option (all,active,no-choice)\n\t defaultCopyWhat = options.allDatasets ? 'copy-all' : 'copy-non-deleted',\n\t allowAll = !_.isUndefined(options.allowAll) ? options.allowAll : true,\n\t autoClose = !_.isUndefined(options.autoClose) ? options.autoClose : true;\n\t\n\t this.modal = modal;\n\t\n\t // validate the name and copy if good\n\t function checkNameAndCopy() {\n\t var name = modal.$('#copy-modal-title').val();\n\t if (!name) {\n\t modal.$('.invalid-title').show();\n\t return;\n\t }\n\t // get further settings, shut down and indicate the ajax call, then hide and resolve/reject\n\t var copyAllDatasets = modal.$('input[name=\"copy-what\"]:checked').val() === 'copy-all';\n\t modal.$('button').prop('disabled', true);\n\t dialog._showAjaxIndicator();\n\t history.copy(true, name, copyAllDatasets).done(function (response) {\n\t deferred.resolve(response);\n\t }).fail(function (xhr, status, message) {\n\t var options = { name: name, copyAllDatasets: copyAllDatasets };\n\t ERROR_MODAL.ajaxErrorModal(history, xhr, options, dialog.errorMessage);\n\t deferred.rejectWith(deferred, arguments);\n\t }).done(function () {\n\t if (autoClose) {\n\t modal.hide();\n\t }\n\t });\n\t }\n\t\n\t var originalClosingCallback = options.closing_callback;\n\t modal.show(_.extend(options, {\n\t title: this.title({ name: history.get('name') }),\n\t body: $(dialog._template({\n\t name: defaultCopyName,\n\t isAnon: Galaxy.user.isAnonymous(),\n\t allowAll: allowAll,\n\t copyWhat: defaultCopyWhat,\n\t activeLabel: this.activeLabel,\n\t allLabel: this.allLabel,\n\t anonWarning: this.anonWarning\n\t })),\n\t buttons: _.object([[_l('Cancel'), function () {\n\t modal.hide();\n\t }], [this.submitLabel, checkNameAndCopy]]),\n\t height: 'auto',\n\t closing_events: true,\n\t closing_callback: function _historyCopyClose(cancelled) {\n\t if (cancelled) {\n\t deferred.reject({ cancelled: true });\n\t }\n\t if (originalClosingCallback) {\n\t originalClosingCallback(cancelled);\n\t }\n\t }\n\t }));\n\t\n\t // set the default dataset copy, autofocus the title, and set up for a simple return\n\t modal.$('#copy-modal-title').focus().select();\n\t modal.$('#copy-modal-title').on('keydown', function (ev) {\n\t if (ev.keyCode === 13) {\n\t ev.preventDefault();\n\t checkNameAndCopy();\n\t }\n\t });\n\t\n\t return deferred;\n\t }\n\t };\n\t\n\t //==============================================================================\n\t // maintain the (slight) distinction between copy and import\n\t /**\n\t * Subclass CopyDialog to use the import language.\n\t */\n\t var ImportDialog = _.extend({}, CopyDialog, {\n\t defaultName: _.template(\"imported: <%- name %>\"),\n\t title: _.template(_l('Importing history') + ' \"<%- name %>\"'),\n\t submitLabel: _l('Import'),\n\t errorMessage: _l('History could not be imported.'),\n\t progressive: _l('Importing history'),\n\t activeLabel: _l('Import only the active, non-deleted datasets'),\n\t allLabel: _l('Import all datasets including deleted ones'),\n\t anonWarning: _l('As an anonymous user, unless you login or register, you will lose your current history ') + _l('after importing this history. ')\n\t\n\t });\n\t\n\t //==============================================================================\n\t /**\n\t * Main interface for both history import and history copy dialogs.\n\t * @param {Backbone.Model} history the history to copy\n\t * @param {Object} options a hash\n\t * @return {jQuery.Deferred} promise that fails on close and succeeds on copy\n\t *\n\t * options:\n\t * (this object is also passed to the modal used to display the dialog and accepts modal options)\n\t * {Function} nameFn if defined, use this to build the default name shown to the user\n\t * (the fn is passed: {name:| Name | ' + 'Size | ' + 'Status | ' + '' + ' |
|---|
| ' + ' | ' + ' | Description | ' + 'Name | ' + 'Size | ' + 'Settings | ' + 'Status | ' + '
|---|
| Name | ' + 'Size | ' + 'Type | ' + 'Genome | ' + 'Settings | ' + 'Status | ' + '' + ' |
|---|
' + 'The length format is two-column, separated by whitespace, of the form:' + '
chrom/contig length of chrom/contig' + '' + '
' + 'For example, the first few entries of mm9.len are as follows:' + '
' + 'chr1 197195432\\n' + 'chr2 181748087\\n' + 'chr3 159599783\\n' + 'chr4 155630120\\n' + 'chr5 152537259' + '' + '' + '
Trackster uses this information to populate the select box for chrom/contig, and' + 'to set the maximum basepair of the track browser. You may either upload a .len file' + 'of this format (Len File option), or directly enter the information into the box ' + '(Len Entry option).
';\n\t },\n\t\n\t _templateFasta: function () {\n\t return '' + 'This is a multi-fasta file from your current history that provides the genome' + 'sequences for each chromosome/contig in your build.' + '
' + '' + 'Here is a snippet from an example multi-fasta file:' + '
' + '>chr1\\n' + 'ATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\\n\\n' + '>chr2\\n' + 'GGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\\n\\n' + '...' + '' + '';\n\t }\n\t });\n\t\n\t return {\n\t View: View\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(1)))\n\n/***/ }),\n/* 130 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Backbone, $, _) {/** User Preferences view */\n\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(21), __webpack_require__(7)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Form, Ui) {\n\t\n\t /** Contains descriptive dictionaries describing user forms */\n\t var Model = Backbone.Model.extend({\n\t initialize: function (options) {\n\t options = options || {};\n\t options.user_id = options.user_id || Galaxy.user.id;\n\t this.set({\n\t 'user_id': options.user_id,\n\t 'information': {\n\t title: 'Manage information',\n\t description: 'Edit your email, addresses and custom parameters or change your username.',\n\t url: 'api/users/' + options.user_id + '/information/inputs',\n\t icon: 'fa-user'\n\t },\n\t 'password': {\n\t title: 'Change password',\n\t description: 'Allows you to change your login credentials.',\n\t icon: 'fa-unlock-alt',\n\t url: 'api/users/' + options.user_id + '/password/inputs',\n\t submit_title: 'Save password'\n\t },\n\t 'communication': {\n\t title: 'Change communication settings',\n\t description: 'Enable or disable the communication feature to chat with other users.',\n\t url: 'api/users/' + options.user_id + '/communication/inputs',\n\t icon: 'fa-comments-o'\n\t },\n\t 'permissions': {\n\t title: 'Set dataset permissions for new histories',\n\t description: 'Grant others default access to newly created histories. Changes made here will only affect histories created after these settings have been stored.',\n\t url: 'api/users/' + options.user_id + '/permissions/inputs',\n\t icon: 'fa-users',\n\t submit_title: 'Save permissions'\n\t },\n\t 'api_key': {\n\t title: 'Manage API key',\n\t description: 'Access your current API key or create a new one.',\n\t url: 'api/users/' + options.user_id + '/api_key/inputs',\n\t icon: 'fa-key',\n\t submit_title: 'Create a new key',\n\t submit_icon: 'fa-check'\n\t },\n\t 'toolbox_filters': {\n\t title: 'Manage Toolbox filters',\n\t description: 'Customize your Toolbox by displaying or omitting sets of Tools.',\n\t url: 'api/users/' + options.user_id + '/toolbox_filters/inputs',\n\t icon: 'fa-filter',\n\t submit_title: 'Save filters'\n\t },\n\t 'openids': {\n\t title: 'Manage OpenIDs',\n\t description: 'Associate OpenIDs with your account.',\n\t icon: 'fa-openid',\n\t onclick: function () {\n\t window.location.href = Galaxy.root + 'user/openid_manage?cntrller=user&use_panels=True';\n\t }\n\t },\n\t 'custom_builds': {\n\t title: 'Manage custom builds',\n\t description: 'Add or remove custom builds using history datasets.',\n\t icon: 'fa-cubes',\n\t onclick: function () {\n\t window.location.href = Galaxy.root + 'custom_builds';\n\t }\n\t },\n\t 'logout': {\n\t title: 'Sign out',\n\t description: 'Click here to sign out of all sessions.',\n\t icon: 'fa-sign-out',\n\t onclick: function () {\n\t Galaxy.modal.show({\n\t title: 'Sign out',\n\t body: 'Do you want to continue and sign out of all active sessions?',\n\t buttons: {\n\t 'Cancel': function () {\n\t Galaxy.modal.hide();\n\t },\n\t 'Sign out': function () {\n\t window.location.href = Galaxy.root + 'user/logout';\n\t }\n\t }\n\t });\n\t }\n\t }\n\t });\n\t }\n\t });\n\t\n\t /** View of the main user preference panel with links to individual user forms */\n\t var View = Backbone.View.extend({\n\t\n\t initialize: function () {\n\t this.model = new Model();\n\t this.message = new Ui.Message();\n\t this.setElement('');\n\t this.render();\n\t },\n\t\n\t render: function () {\n\t var self = this;\n\t var config = Galaxy.config;\n\t $.getJSON(Galaxy.root + 'api/users/' + Galaxy.user.id, function (data) {\n\t self.$preferences = $('').addClass('ui-panel').append(self.message.$el).append($('').append('User preferences')).append($('').append('You are logged in as ' + _.escape(data.email) + '.')).append(self.$table = $('
' + 'You are using ' + options.nice_total_disk_usage + ' of disk space in this Galaxy instance. ' + (Galaxy.config.enable_quotas ? 'Your disk quota is: ' + options.quota + '. ' : '') + 'Is your usage more than expected? See the documentation for tips on how to find all of the data in your account.' + '
';\n\t }\n\t });\n\t\n\t /** View of individual user forms */\n\t var Forms = Backbone.View.extend({\n\t\n\t initialize: function (options) {\n\t this.model = new Model(options);\n\t this.page = this.model.get(options.form_id);\n\t this.setElement('');\n\t this.render();\n\t },\n\t\n\t render: function () {\n\t var self = this;\n\t $.ajax({\n\t url: Galaxy.root + this.page.url,\n\t type: 'GET'\n\t }).done(function (response) {\n\t var options = $.extend({}, self.page, response);\n\t var form = new Form({\n\t title: options.title,\n\t icon: options.icon,\n\t inputs: options.inputs,\n\t operations: {\n\t 'submit': new Ui.ButtonIcon({\n\t tooltip: options.submit_tooltip,\n\t title: options.submit_title || 'Save settings',\n\t icon: options.submit_icon || 'fa-save',\n\t onclick: function () {\n\t self._submit(form, options);\n\t }\n\t })\n\t }\n\t });\n\t self.$el.empty().append(form.$el);\n\t }).fail(function (response) {\n\t self.$el.empty().append(new Ui.Message({\n\t message: 'Failed to load resource ' + self.page.url + '.',\n\t status: 'danger',\n\t persistent: true\n\t }).$el);\n\t });\n\t },\n\t\n\t _submit: function (form, options) {\n\t var self = this;\n\t $.ajax({\n\t url: Galaxy.root + options.url,\n\t data: JSON.stringify(form.data.create()),\n\t type: 'PUT',\n\t contentType: 'application/json'\n\t }).done(function (response) {\n\t form.data.matchModel(response, function (input, input_id) {\n\t form.field_list[input_id].value(input.value);\n\t });\n\t form.message.update({ message: response.message, status: 'success' });\n\t }).fail(function (response) {\n\t form.message.update({ message: response.responseJSON.err_msg, status: 'danger' });\n\t });\n\t }\n\t });\n\t\n\t return {\n\t View: View,\n\t Forms: Forms\n\t };\n\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(1), __webpack_require__(2)))\n\n/***/ }),\n/* 131 */,\n/* 132 */,\n/* 133 */,\n/* 134 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(jQuery, $) {(function (root, factory) {\n\t if (true) {\n\t // AMD. Register as an anonymous module.\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t } else {\n\t // Browser globals\n\t root.LoadingIndicator = factory();\n\t }\n\t\n\t //============================================================================\n\t})(this, function () {\n\t //TODO: too specific to history panel\n\t function LoadingIndicator($where, options) {\n\t\n\t var self = this;\n\t // defaults\n\t options = jQuery.extend({\n\t cover: false\n\t }, options || {});\n\t\n\t function render() {\n\t var html = ['\" + this.formattedReference() + \"
\" );\n return this;\n },\n formattedReference: function() {\n var model = this.model;\n var entryType = model.entryType();\n var fields = model.fields();\n\n var ref = \"\";\n // Code inspired by...\n // https://github.com/vkaravir/bib-publication-list/blob/master/src/bib-publication-list.js\n var authorsAndYear = this._asSentence( (fields.author ? fields.author : \"\") + (fields.year ? (\" (\" + fields.year + \")\") : \"\") ) + \" \";\n var title = fields.title || \"\";\n var pages = fields.pages ? (\"pp. \" + fields.pages) : \"\";\n var address = fields.address;\n if( entryType == \"article\" ) {\n var volume = (fields.volume ? fields.volume : \"\") +\n (fields.number ? ( \" (\" + fields.number + \")\" ) : \"\") +\n (pages ? \", \" + pages : \"\");\n ref = authorsAndYear + this._asSentence(title) +\n (fields.journal ? (\"In \" + fields.journal + \", \") : \"\") +\n this._asSentence(volume) + \n this._asSentence(fields.address) +\n \"<\\/em>\";\n } else if( entryType == \"inproceedings\" || entryType == \"proceedings\" ) {\n ref = authorsAndYear + \n this._asSentence(title) + \n (fields.booktitle ? (\"In \" + fields.booktitle + \", \") : \"\") +\n (pages ? pages : \"\") +\n (address ? \", \" + address : \"\") + \n \".<\\/em>\";\n } else if( entryType == \"mastersthesis\" || entryType == \"phdthesis\" ) {\n ref = authorsAndYear + this._asSentence(title) +\n (fields.howpublished ? fields.howpublished + \". \" : \"\") +\n (fields.note ? fields.note + \".\" : \"\");\n } else if( entryType == \"techreport\" ) {\n ref = authorsAndYear + this._asSentence(title) +\n this._asSentence(fields.institution) +\n this._asSentence(fields.number) +\n this._asSentence(fields.type);\n } else if( entryType == \"book\" || entryType == \"inbook\" || entryType == \"incollection\" ) {\n ref = authorsAndYear + \" \" + this._formatBookInfo(fields);\n } else {\n ref = authorsAndYear + \" \" + this._asSentence(title) +\n this._asSentence(fields.howpublished) +\n this._asSentence(fields.note);\n }\n var doiUrl = \"\";\n if( fields.doi ) {\n doiUrl = 'http://dx.doi.org/' + fields.doi;\n ref += '[doi:' + fields.doi + \"]\";\n }\n var url = fields.url || doiUrl;\n if( url ) {\n ref += '[Link]';\n }\n return ref;\n },\n _formatBookInfo: function(fields) {\n var info = \"\";\n if( fields.chapter ) {\n info += fields.chapter + \" in \";\n }\n if( fields.title ) {\n info += \"\" + fields.title + \"<\\/em>\";\n }\n if( fields.editor ) {\n info += \", Edited by \" + fields.editor + \", \";\n }\n if( fields.publisher) {\n info += \", \" + fields.publisher;\n }\n if( fields.pages ) {\n info += \", pp. \" + fields.pages + \"\";\n }\n if( fields.series ) {\n info += \", \" + fields.series + \"<\\/em>\";\n }\n if( fields.volume ) {\n info += \", Vol.\" + fields.volume;\n }\n if( fields.issn ) {\n info += \", ISBN: \" + fields.issn;\n }\n return info + \".\";\n },\n _asSentence: function(str) {\n return (str && str.trim()) ? str + \". \" : \"\";\n }\n});\n\nvar CitationListView = Backbone.View.extend({\n el: '#citations',\n /**\n * Set up view.\n */\n initialize: function() {\n this.listenTo( this.collection, 'add', this.renderCitation );\n },\n\n events: {\n 'click .citations-to-bibtex': 'showBibtex',\n 'click .citations-to-formatted': 'showFormatted'\n },\n\n renderCitation: function( citation ) {\n var citationView = new CitationView( { model: citation } );\n this.$(\".citations-formatted\").append( citationView.render().el );\n var rawTextarea = this.$(\".citations-bibtex-text\");\n rawTextarea.val( rawTextarea.val() + \"\\n\\r\" + citation.attributes.content );\n },\n\n render: function() {\n this.$el.html(this.citationsElement());\n this.collection.each(function( item ){\n this.renderCitation( item );\n }, this);\n this.showFormatted();\n },\n\n showBibtex: function() {\n this.$(\".citations-to-formatted\").show();\n this.$(\".citations-to-bibtex\").hide();\n this.$(\".citations-bibtex\").show();\n this.$(\".citations-formatted\").hide();\n this.$(\".citations-bibtex-text\").select();\n },\n\n showFormatted: function() {\n this.$(\".citations-to-formatted\").hide();\n this.$(\".citations-to-bibtex\").show();\n this.$(\".citations-bibtex\").hide();\n this.$(\".citations-formatted\").show();\n },\n\n partialWarningElement: function() {\n if( this.collection.partial ) {\n return [\n '' + JSON.stringify( xhr.responseJSON ) + '';\n } else {\n content += ': ' + message;\n }\n }\n creator._showAlert( content, 'alert-danger' );\n },\n\n events : {\n // header\n 'click .more-help' : '_clickMoreHelp',\n 'click .less-help' : '_clickLessHelp',\n 'click .main-help' : '_toggleHelp',\n 'click .header .alert button' : '_hideAlert',\n\n 'click .reset' : 'reset',\n 'click .clear-selected' : 'clearSelectedElements',\n\n // elements - selection\n 'click .collection-elements' : 'clearSelectedElements',\n\n // elements - drop target\n // 'dragenter .collection-elements': '_dragenterElements',\n // 'dragleave .collection-elements': '_dragleaveElements',\n 'dragover .collection-elements' : '_dragoverElements',\n 'drop .collection-elements' : '_dropElements',\n\n // these bubble up from the elements as custom events\n 'collection-element.dragstart .collection-elements' : '_elementDragstart',\n 'collection-element.dragend .collection-elements' : '_elementDragend',\n\n // footer\n 'change .collection-name' : '_changeName',\n 'keydown .collection-name' : '_nameCheckForEnter',\n 'change .hide-originals' : '_changeHideOriginals',\n 'click .cancel-create' : '_cancelCreate',\n 'click .create-collection' : '_clickCreate'//,\n },\n\n // ........................................................................ elements\n /** reset all data to the initial state */\n reset : function(){\n this._instanceSetUp();\n this._elementsSetUp();\n this.render();\n },\n\n /** deselect all elements */\n clearSelectedElements : function( ev ){\n this.$( '.collection-elements .collection-element' ).removeClass( 'selected' );\n this.$( '.collection-elements-controls > .clear-selected' ).hide();\n },\n\n //_dragenterElements : function( ev ){\n // //this.debug( '_dragenterElements:', ev );\n //},\n//TODO: if selected are dragged out of the list area - remove the placeholder - cuz it won't work anyway\n // _dragleaveElements : function( ev ){\n // //this.debug( '_dragleaveElements:', ev );\n // },\n\n /** track the mouse drag over the list adding a placeholder to show where the drop would occur */\n _dragoverElements : function( ev ){\n //this.debug( '_dragoverElements:', ev );\n ev.preventDefault();\n\n var $list = this.$list();\n this._checkForAutoscroll( $list, ev.originalEvent.clientY );\n var $nearest = this._getNearestElement( ev.originalEvent.clientY );\n\n //TODO: no need to re-create - move instead\n this.$( '.element-drop-placeholder' ).remove();\n var $placeholder = $( '' );\n if( !$nearest.length ){\n $list.append( $placeholder );\n } else {\n $nearest.before( $placeholder );\n }\n },\n\n /** If the mouse is near enough to the list's top or bottom, scroll the list */\n _checkForAutoscroll : function( $element, y ){\n var AUTOSCROLL_SPEED = 2,\n offset = $element.offset(),\n scrollTop = $element.scrollTop(),\n upperDist = y - offset.top,\n lowerDist = ( offset.top + $element.outerHeight() ) - y;\n if( upperDist >= 0 && upperDist < this.autoscrollDist ){\n $element.scrollTop( scrollTop - AUTOSCROLL_SPEED );\n } else if( lowerDist >= 0 && lowerDist < this.autoscrollDist ){\n $element.scrollTop( scrollTop + AUTOSCROLL_SPEED );\n }\n },\n\n /** get the nearest element based on the mouse's Y coordinate.\n * If the y is at the end of the list, return an empty jQuery object.\n */\n _getNearestElement : function( y ){\n var WIGGLE = 4,\n lis = this.$( '.collection-elements li.collection-element' ).toArray();\n for( var i=0; i
', _l([\n 'Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ',\n 'workflows in order to have analyses done on each member of the entire group. This interface allows ',\n 'you to create a collection and re-order the final collection.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\".'\n ].join( '' )), '
'\n ].join('')),\n\n /** shown in list when all elements are discarded */\n invalidElements : _.template([\n _l( 'The following selections could not be included due to problems:' ),\n '<%= dataset.peek %>',\n '<% } %>',\n '<% } %>',\n '
| ' +\n ' | Name | ' +\n 'Size | ' +\n 'Created | ' +\n '
|---|
' + JSON.stringify( xhr.responseJSON ) + '';\n } else {\n content += ': ' + message;\n }\n }\n creator._showAlert( content, 'alert-danger' );\n },\n\n // ------------------------------------------------------------------------ rendering\n /** render the entire interface */\n render : function( speed, callback ){\n //this.debug( '-- _render' );\n //this.$el.empty().html( this.templates.main() );\n this.$el.empty().html( this.templates.main() );\n this._renderHeader( speed );\n this._renderMiddle( speed );\n this._renderFooter( speed );\n this._addPluginComponents();\n this.trigger( 'rendered', this );\n return this;\n },\n\n /** render the header section */\n _renderHeader : function( speed, callback ){\n //this.debug( '-- _renderHeader' );\n var $header = this.$( '.header' ).empty().html( this.templates.header() )\n .find( '.help-content' ).prepend( $( this.templates.helpContent() ) );\n\n this._renderFilters();\n return $header;\n },\n /** fill the filter inputs with the filter values */\n _renderFilters : function(){\n return this.$( '.forward-column .column-header input' ).val( this.filters[0] )\n .add( this.$( '.reverse-column .column-header input' ).val( this.filters[1] ) );\n },\n\n /** render the middle including unpaired and paired sections (which may be hidden) */\n _renderMiddle : function( speed, callback ){\n var $middle = this.$( '.middle' ).empty().html( this.templates.middle() );\n\n // (re-) hide the un/paired panels based on instance vars\n if( this.unpairedPanelHidden ){\n this.$( '.unpaired-columns' ).hide();\n } else if( this.pairedPanelHidden ){\n this.$( '.paired-columns' ).hide();\n }\n\n this._renderUnpaired();\n this._renderPaired();\n return $middle;\n },\n /** render the unpaired section, showing datasets accrd. to filters, update the unpaired counts */\n _renderUnpaired : function( speed, callback ){\n //this.debug( '-- _renderUnpaired' );\n var creator = this,\n $fwd, $rev, $prd = [],\n split = this._splitByFilters();\n // update unpaired counts\n this.$( '.forward-column .title' )\n .text([ split[0].length, _l( 'unpaired forward' ) ].join( ' ' ));\n this.$( '.forward-column .unpaired-info' )\n .text( this._renderUnpairedDisplayStr( this.unpaired.length - split[0].length ) );\n this.$( '.reverse-column .title' )\n .text([ split[1].length, _l( 'unpaired reverse' ) ].join( ' ' ));\n this.$( '.reverse-column .unpaired-info' )\n .text( this._renderUnpairedDisplayStr( this.unpaired.length - split[1].length ) );\n\n this.$( '.unpaired-columns .column-datasets' ).empty();\n\n // show/hide the auto pair button if any unpaired are left\n this.$( '.autopair-link' ).toggle( this.unpaired.length !== 0 );\n if( this.unpaired.length === 0 ){\n this._renderUnpairedEmpty();\n return;\n }\n\n // create the dataset dom arrays\n $rev = split[1].map( function( dataset, i ){\n // if there'll be a fwd dataset across the way, add a button to pair the row\n if( ( split[0][ i ] !== undefined )\n && ( split[0][ i ] !== dataset ) ){\n $prd.push( creator._renderPairButton() );\n }\n return creator._renderUnpairedDataset( dataset );\n });\n $fwd = split[0].map( function( dataset ){\n return creator._renderUnpairedDataset( dataset );\n });\n\n if( !$fwd.length && !$rev.length ){\n this._renderUnpairedNotShown();\n return;\n }\n // add to appropo cols\n //TODO: not the best way to render - consider rendering the entire unpaired-columns section in a fragment\n // and swapping out that\n this.$( '.unpaired-columns .forward-column .column-datasets' ).append( $fwd )\n .add( this.$( '.unpaired-columns .paired-column .column-datasets' ).append( $prd ) )\n .add( this.$( '.unpaired-columns .reverse-column .column-datasets' ).append( $rev ) );\n this._adjUnpairedOnScrollbar();\n },\n /** return a string to display the count of filtered out datasets */\n _renderUnpairedDisplayStr : function( numFiltered ){\n return [ '(', numFiltered, ' ', _l( 'filtered out' ), ')' ].join('');\n },\n /** return an unattached jQuery DOM element to represent an unpaired dataset */\n _renderUnpairedDataset : function( dataset ){\n //TODO: to underscore template\n return $( '')\n .attr( 'id', 'dataset-' + dataset.id )\n .addClass( 'dataset unpaired' )\n .attr( 'draggable', true )\n .addClass( dataset.selected? 'selected': '' )\n .append( $( '' ).addClass( 'dataset-name' ).text( dataset.name ) )\n //??\n .data( 'dataset', dataset );\n },\n /** render the button that may go between unpaired datasets, allowing the user to pair a row */\n _renderPairButton : function(){\n //TODO: *not* a dataset - don't pretend like it is\n return $( '').addClass( 'dataset unpaired' )\n .append( $( '' ).addClass( 'dataset-name' ).text( _l( 'Pair these datasets' ) ) );\n },\n /** a message to display when no unpaired left */\n _renderUnpairedEmpty : function(){\n //this.debug( '-- renderUnpairedEmpty' );\n var $msg = $( '' )\n .text( '(' + _l( 'no remaining unpaired datasets' ) + ')' );\n this.$( '.unpaired-columns .paired-column .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n /** a message to display when no unpaired can be shown with the current filters */\n _renderUnpairedNotShown : function(){\n //this.debug( '-- renderUnpairedEmpty' );\n var $msg = $( '' )\n .text( '(' + _l( 'no datasets were found matching the current filters' ) + ')' );\n this.$( '.unpaired-columns .paired-column .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n /** try to detect if the unpaired section has a scrollbar and adjust left column for better centering of all */\n _adjUnpairedOnScrollbar : function(){\n var $unpairedColumns = this.$( '.unpaired-columns' ).last(),\n $firstDataset = this.$( '.unpaired-columns .reverse-column .dataset' ).first();\n if( !$firstDataset.length ){ return; }\n var ucRight = $unpairedColumns.offset().left + $unpairedColumns.outerWidth(),\n dsRight = $firstDataset.offset().left + $firstDataset.outerWidth(),\n rightDiff = Math.floor( ucRight ) - Math.floor( dsRight );\n //this.debug( 'rightDiff:', ucRight, '-', dsRight, '=', rightDiff );\n this.$( '.unpaired-columns .forward-column' )\n .css( 'margin-left', ( rightDiff > 0 )? rightDiff: 0 );\n },\n\n /** render the paired section and update counts of paired datasets */\n _renderPaired : function( speed, callback ){\n //this.debug( '-- _renderPaired' );\n this.$( '.paired-column-title .title' ).text([ this.paired.length, _l( 'paired' ) ].join( ' ' ) );\n // show/hide the unpair all link\n this.$( '.unpair-all-link' ).toggle( this.paired.length !== 0 );\n if( this.paired.length === 0 ){\n this._renderPairedEmpty();\n return;\n //TODO: would be best to return here (the $columns)\n } else {\n // show/hide 'remove extensions link' when any paired and they seem to have extensions\n this.$( '.remove-extensions-link' ).show();\n }\n\n this.$( '.paired-columns .column-datasets' ).empty();\n var creator = this;\n this.paired.forEach( function( pair, i ){\n //TODO: cache these?\n var pairView = new PairView({ pair: pair });\n creator.$( '.paired-columns .column-datasets' )\n .append( pairView.render().$el )\n .append([\n ''\n ].join( '' ));\n });\n },\n /** a message to display when none paired */\n _renderPairedEmpty : function(){\n var $msg = $( '' )\n .text( '(' + _l( 'no paired datasets yet' ) + ')' );\n this.$( '.paired-columns .column-datasets' ).empty().prepend( $msg );\n return $msg;\n },\n\n footerSettings : {\n '.hide-originals': 'hideOriginals',\n '.remove-extensions': 'removeExtensions'\n },\n\n /** add any jQuery/bootstrap/custom plugins to elements rendered */\n _addPluginComponents : function(){\n this._chooseFiltersPopover( '.choose-filters-link' );\n this.$( '.help-content i' ).hoverhighlight( '.collection-creator', 'rgba( 64, 255, 255, 1.0 )' );\n },\n\n /** build a filter selection popover allowing selection of common filter pairs */\n _chooseFiltersPopover : function( selector ){\n function filterChoice( val1, val2 ){\n return [\n ''\n ].join('');\n }\n var $popoverContent = $( _.template([\n '
', _l([\n 'Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ',\n 'These collections can be passed to tools and workflows in order to have analyses done on each member of ',\n 'the entire group. This interface allows you to create a collection, choose which datasets are paired, ',\n 'and re-order the final collection.'\n ].join( '' )), '
',\n '', _l([\n 'Unpaired datasets are shown in the unpaired section ',\n '(hover over the underlined words to highlight below). ',\n 'Paired datasets are shown in the paired section.',\n '
', _l([\n '
', _l([\n 'To unpair individual dataset pairs, click the ',\n 'unpair buttons ( ). ',\n 'Click the \"Unpair all\" link to unpair all pairs.'\n ].join( '' )), '
',\n '', _l([\n 'You can include or remove the file extensions (e.g. \".fastq\") from your pair names by toggling the ',\n '\"Remove file extensions from pair names?\" control.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\". ',\n '(Note: you do not have to pair all unpaired datasets to finish.)'\n ].join( '' )), '
'\n ].join(''))\n })\n});\n\n//=============================================================================\n/** a modal version of the paired collection creator */\nvar pairedCollectionCreatorModal = function _pairedCollectionCreatorModal( datasets, options ){\n\n var deferred = jQuery.Deferred(),\n creator;\n\n options = _.defaults( options || {}, {\n datasets : datasets,\n oncancel : function(){\n Galaxy.modal.hide();\n deferred.reject( 'cancelled' );\n },\n oncreate : function( creator, response ){\n Galaxy.modal.hide();\n deferred.resolve( response );\n }\n });\n\n if( !window.Galaxy || !Galaxy.modal ){\n throw new Error( 'Galaxy or Galaxy.modal not found' );\n }\n\n creator = new PairedCollectionCreator( options );\n Galaxy.modal.show({\n title : 'Create a collection of paired datasets',\n body : creator.$el,\n width : '80%',\n height : '800px',\n closing_events: true\n });\n creator.render();\n window.creator = creator;\n\n //TODO: remove modal header\n return deferred;\n};\n\n\n//=============================================================================\nfunction createListOfPairsCollection( collection, defaultHideSourceItems ){\n var elements = collection.toJSON();\n//TODO: validate elements\n return pairedCollectionCreatorModal( elements, {\n historyId : collection.historyId,\n defaultHideSourceItems: defaultHideSourceItems\n });\n}\n\n\n//=============================================================================\n return {\n PairedCollectionCreator : PairedCollectionCreator,\n pairedCollectionCreatorModal : pairedCollectionCreatorModal,\n createListOfPairsCollection : createListOfPairsCollection\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js","define([\n \"mvc/collection/list-collection-creator\",\n \"mvc/history/hdca-model\",\n \"mvc/base-mvc\",\n \"utils/localization\"\n], function( LIST_CREATOR, HDCA, BASE_MVC, _l ){\n\n'use strict';\n\nvar logNamespace = 'collections';\n/*==============================================================================\nTODO:\n the paired creator doesn't really mesh with the list creator as parent\n it may be better to make an abstract super class for both\n composites may inherit from this (or vis-versa)\n PairedDatasetCollectionElementView doesn't make a lot of sense\n\n==============================================================================*/\n/** */\nvar PairedDatasetCollectionElementView = Backbone.View.extend( BASE_MVC.LoggableMixin ).extend({\n _logNamespace : logNamespace,\n\n//TODO: use proper class (DatasetDCE or NestedDCDCE (or the union of both))\n tagName : 'li',\n className : 'collection-element',\n\n initialize : function( attributes ){\n this.element = attributes.element || {};\n this.identifier = attributes.identifier;\n },\n\n render : function(){\n this.$el\n .attr( 'data-element-id', this.element.id )\n .html( this.template({ identifier: this.identifier, element: this.element }) );\n return this;\n },\n\n //TODO: lots of unused space in the element - possibly load details and display them horiz.\n template : _.template([\n '<%- identifier %>',\n '<%- element.name %>',\n ].join('')),\n\n /** remove the DOM and any listeners */\n destroy : function(){\n this.off();\n this.$el.remove();\n },\n\n /** string rep */\n toString : function(){\n return 'DatasetCollectionElementView()';\n }\n});\n\n\n// ============================================================================\nvar _super = LIST_CREATOR.ListCollectionCreator;\n\n/** An interface for building collections.\n */\nvar PairCollectionCreator = _super.extend({\n\n /** the class used to display individual elements */\n elementViewClass : PairedDatasetCollectionElementView,\n /** the class this creator will create and save */\n collectionClass : HDCA.HistoryPairDatasetCollection,\n className : 'pair-collection-creator collection-creator flex-row-container',\n\n /** override to no-op */\n _mangleDuplicateNames : function(){},\n\n // TODO: this whole pattern sucks. There needs to be two classes of problem area:\n // bad inital choices and\n // when the user has painted his/her self into a corner during creation/use-of-the-creator\n /** render the entire interface */\n render : function( speed, callback ){\n if( this.workingElements.length === 2 ){\n return _super.prototype.render.call( this, speed, callback );\n }\n return this._renderInvalid( speed, callback );\n },\n\n // ------------------------------------------------------------------------ rendering elements\n /** render forward/reverse */\n _renderList : function( speed, callback ){\n //this.debug( '-- _renderList' );\n //precondition: there are two valid elements in workingElements\n var creator = this,\n $tmp = jQuery( '' ),\n $list = creator.$list();\n\n // lose the original views, create the new, append all at once, then call their renders\n _.each( this.elementViews, function( view ){\n view.destroy();\n creator.removeElementView( view );\n });\n $tmp.append( creator._createForwardElementView().$el );\n $tmp.append( creator._createReverseElementView().$el );\n $list.empty().append( $tmp.children() );\n _.invoke( creator.elementViews, 'render' );\n },\n\n /** create the forward element view */\n _createForwardElementView : function(){\n return this._createElementView( this.workingElements[0], { identifier: 'forward' } );\n },\n\n /** create the forward element view */\n _createReverseElementView : function(){\n return this._createElementView( this.workingElements[1], { identifier: 'reverse' } );\n },\n\n /** create an element view, cache in elementViews, and return */\n _createElementView : function( element, options ){\n var elementView = new this.elementViewClass( _.extend( options, {\n element : element,\n }));\n this.elementViews.push( elementView );\n return elementView;\n },\n\n /** swap the forward, reverse elements and re-render */\n swap : function(){\n this.workingElements = [\n this.workingElements[1],\n this.workingElements[0],\n ];\n this._renderList();\n },\n\n events : _.extend( _.clone( _super.prototype.events ), {\n 'click .swap' : 'swap',\n }),\n\n // ------------------------------------------------------------------------ templates\n //TODO: move to require text plugin and load these as text\n //TODO: underscore currently unnecc. bc no vars are used\n //TODO: better way of localizing text-nodes in long strings\n /** underscore template fns attached to class */\n templates : _.extend( _.clone( _super.prototype.templates ), {\n /** the middle: element list */\n middle : _.template([\n '', _l([\n 'Pair collections are permanent collections containing two datasets: one forward and one reverse. ',\n 'Often these are forward and reverse reads. The pair collections can be passed to tools and ',\n 'workflows in order to have analyses done on both datasets. This interface allows ',\n 'you to create a pair, name it, and swap which is forward and which reverse.'\n ].join( '' )), '
',\n '', _l([\n 'Once your collection is complete, enter a name and ',\n 'click \"Create list\".'\n ].join( '' )), '
'\n ].join('')),\n\n /** a simplified page communicating what went wrong and why the user needs to reselect something else */\n invalidInitial : _.template([\n '' + this.progressive + '...
';\n this.modal.$( '.modal-body' ).empty().append( indicator ).css({ 'margin-top': '8px' });\n },\n\n // (sorta) public interface - display the modal, render the form, and potentially copy the history\n // returns a jQuery.Deferred done->history copied, fail->user cancelled\n dialog : function _dialog( modal, history, options ){\n options = options || {};\n\n var dialog = this,\n deferred = jQuery.Deferred(),\n // TODO: getting a little byzantine here\n defaultCopyNameFn = options.nameFn || this.defaultName,\n defaultCopyName = defaultCopyNameFn({ name: history.get( 'name' ) }),\n // TODO: these two might be simpler as one 3 state option (all,active,no-choice)\n defaultCopyWhat = options.allDatasets? 'copy-all' : 'copy-non-deleted',\n allowAll = !_.isUndefined( options.allowAll )? options.allowAll : true,\n autoClose = !_.isUndefined( options.autoClose )? options.autoClose : true;\n\n this.modal = modal;\n\n\n // validate the name and copy if good\n function checkNameAndCopy(){\n var name = modal.$( '#copy-modal-title' ).val();\n if( !name ){\n modal.$( '.invalid-title' ).show();\n return;\n }\n // get further settings, shut down and indicate the ajax call, then hide and resolve/reject\n var copyAllDatasets = modal.$( 'input[name=\"copy-what\"]:checked' ).val() === 'copy-all';\n modal.$( 'button' ).prop( 'disabled', true );\n dialog._showAjaxIndicator();\n history.copy( true, name, copyAllDatasets )\n .done( function( response ){\n deferred.resolve( response );\n })\n .fail( function( xhr, status, message ){\n var options = { name: name, copyAllDatasets: copyAllDatasets };\n ERROR_MODAL.ajaxErrorModal( history, xhr, options, dialog.errorMessage );\n deferred.rejectWith( deferred, arguments );\n })\n .done( function(){\n if( autoClose ){ modal.hide(); }\n });\n }\n\n var originalClosingCallback = options.closing_callback;\n modal.show( _.extend( options, {\n title : this.title({ name: history.get( 'name' ) }),\n body : $( dialog._template({\n name : defaultCopyName,\n isAnon : Galaxy.user.isAnonymous(),\n allowAll : allowAll,\n copyWhat : defaultCopyWhat,\n activeLabel : this.activeLabel,\n allLabel : this.allLabel,\n anonWarning : this.anonWarning,\n })),\n buttons : _.object([\n [ _l( 'Cancel' ), function(){ modal.hide(); } ],\n [ this.submitLabel, checkNameAndCopy ]\n ]),\n height : 'auto',\n closing_events : true,\n closing_callback: function _historyCopyClose( cancelled ){\n if( cancelled ){\n deferred.reject({ cancelled : true });\n }\n if( originalClosingCallback ){\n originalClosingCallback( cancelled );\n }\n }\n }));\n\n // set the default dataset copy, autofocus the title, and set up for a simple return\n modal.$( '#copy-modal-title' ).focus().select();\n modal.$( '#copy-modal-title' ).on( 'keydown', function( ev ){\n if( ev.keyCode === 13 ){\n ev.preventDefault();\n checkNameAndCopy();\n }\n });\n\n return deferred;\n },\n};\n\n//==============================================================================\n// maintain the (slight) distinction between copy and import\n/**\n * Subclass CopyDialog to use the import language.\n */\nvar ImportDialog = _.extend( {}, CopyDialog, {\n defaultName : _.template( \"imported: <%- name %>\" ),\n title : _.template( _l( 'Importing history' ) + ' \"<%- name %>\"' ),\n submitLabel : _l( 'Import' ),\n errorMessage : _l( 'History could not be imported.' ),\n progressive : _l( 'Importing history' ),\n activeLabel : _l( 'Import only the active, non-deleted datasets' ),\n allLabel : _l( 'Import all datasets including deleted ones' ),\n anonWarning : _l( 'As an anonymous user, unless you login or register, you will lose your current history ' ) +\n _l( 'after importing this history. ' ),\n\n});\n\n//==============================================================================\n/**\n * Main interface for both history import and history copy dialogs.\n * @param {Backbone.Model} history the history to copy\n * @param {Object} options a hash\n * @return {jQuery.Deferred} promise that fails on close and succeeds on copy\n *\n * options:\n * (this object is also passed to the modal used to display the dialog and accepts modal options)\n * {Function} nameFn if defined, use this to build the default name shown to the user\n * (the fn is passed: {name:| Name | ' +\n 'Size | ' +\n 'Status | ' +\n '' +\n ' |
|---|
| ' +\n ' | ' +\n ' | Description | ' +\n 'Name | ' +\n 'Size | ' +\n 'Settings | ' +\n 'Status | ' +\n '
|---|
| Name | ' +\n 'Size | ' +\n 'Type | ' +\n 'Genome | ' +\n 'Settings | ' +\n 'Status | ' +\n '' +\n ' |
|---|
' +\n 'The length format is two-column, separated by whitespace, of the form:' +\n '
chrom/contig length of chrom/contig' +\n '' +\n '
' +\n 'For example, the first few entries of mm9.len are as follows:' +\n '
' +\n 'chr1 197195432\\n' +\n 'chr2 181748087\\n' +\n 'chr3 159599783\\n' +\n 'chr4 155630120\\n' +\n 'chr5 152537259' +\n '' +\n '' +\n '
Trackster uses this information to populate the select box for chrom/contig, and' +\n 'to set the maximum basepair of the track browser. You may either upload a .len file' +\n 'of this format (Len File option), or directly enter the information into the box ' +\n '(Len Entry option).
';\n },\n\n _templateFasta: function() {\n return '' +\n 'This is a multi-fasta file from your current history that provides the genome' +\n 'sequences for each chromosome/contig in your build.' +\n '
' +\n '' +\n 'Here is a snippet from an example multi-fasta file:' +\n '
' +\n '>chr1\\n' +\n 'ATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\\n\\n' +\n '>chr2\\n' +\n 'GGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\\n\\n' +\n '...' +\n '' +\n '';\n }\n });\n\n return {\n View: View\n }\n});\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/user/user-custom-builds.js","/** User Preferences view */\ndefine( [ 'mvc/form/form-view', 'mvc/ui/ui-misc' ], function( Form, Ui ) {\n\n /** Contains descriptive dictionaries describing user forms */\n var Model = Backbone.Model.extend({\n initialize: function( options ) {\n options = options || {};\n options.user_id = options.user_id || Galaxy.user.id;\n this.set({\n 'user_id' : options.user_id,\n 'information': {\n title : 'Manage information',\n description : 'Edit your email, addresses and custom parameters or change your username.',\n url : 'api/users/' + options.user_id + '/information/inputs',\n icon : 'fa-user'\n },\n 'password': {\n title : 'Change password',\n description : 'Allows you to change your login credentials.',\n icon : 'fa-unlock-alt',\n url : 'api/users/' + options.user_id + '/password/inputs',\n submit_title : 'Save password',\n },\n 'communication': {\n title : 'Change communication settings',\n description : 'Enable or disable the communication feature to chat with other users.',\n url : 'api/users/' + options.user_id + '/communication/inputs',\n icon : 'fa-comments-o'\n },\n 'permissions': {\n title : 'Set dataset permissions for new histories',\n description : 'Grant others default access to newly created histories. Changes made here will only affect histories created after these settings have been stored.',\n url : 'api/users/' + options.user_id + '/permissions/inputs',\n icon : 'fa-users',\n submit_title : 'Save permissions'\n },\n 'api_key': {\n title : 'Manage API key',\n description : 'Access your current API key or create a new one.',\n url : 'api/users/' + options.user_id + '/api_key/inputs',\n icon : 'fa-key',\n submit_title : 'Create a new key',\n submit_icon : 'fa-check'\n },\n 'toolbox_filters': {\n title : 'Manage Toolbox filters',\n description : 'Customize your Toolbox by displaying or omitting sets of Tools.',\n url : 'api/users/' + options.user_id + '/toolbox_filters/inputs',\n icon : 'fa-filter',\n submit_title : 'Save filters'\n },\n 'openids': {\n title : 'Manage OpenIDs',\n description : 'Associate OpenIDs with your account.',\n icon : 'fa-openid',\n onclick : function() {\n window.location.href = Galaxy.root + 'user/openid_manage?cntrller=user&use_panels=True';\n }\n },\n 'custom_builds': {\n title : 'Manage custom builds',\n description : 'Add or remove custom builds using history datasets.',\n icon : 'fa-cubes',\n onclick : function() {\n window.location.href = Galaxy.root + 'custom_builds';\n }\n },\n 'logout': {\n title : 'Sign out',\n description : 'Click here to sign out of all sessions.',\n icon : 'fa-sign-out',\n onclick : function() {\n Galaxy.modal.show({\n title : 'Sign out',\n body : 'Do you want to continue and sign out of all active sessions?',\n buttons : {\n 'Cancel' : function() { Galaxy.modal.hide(); },\n 'Sign out' : function() { window.location.href = Galaxy.root + 'user/logout'; }\n }\n });\n }\n }\n });\n }\n });\n\n /** View of the main user preference panel with links to individual user forms */\n var View = Backbone.View.extend({\n\n initialize: function() {\n this.model = new Model();\n this.message = new Ui.Message();\n this.setElement( '' );\n this.render();\n },\n\n render: function() {\n var self = this;\n var config = Galaxy.config;\n $.getJSON( Galaxy.root + 'api/users/' + Galaxy.user.id, function( data ) {\n self.$preferences = $( '' ).addClass( 'ui-panel' )\n .append( self.message.$el )\n .append( $( '' ).append( 'User preferences' ) )\n .append( $( '' ).append( 'You are logged in as ' + _.escape( data.email ) + '.' ) )\n .append( self.$table = $( '
' +\n 'You are using ' + options.nice_total_disk_usage + ' of disk space in this Galaxy instance. ' +\n ( Galaxy.config.enable_quotas ? 'Your disk quota is: ' + options.quota + '. ' : '' ) +\n 'Is your usage more than expected? See the documentation for tips on how to find all of the data in your account.' +\n '
';\n }\n });\n\n /** View of individual user forms */\n var Forms = Backbone.View.extend({\n\n initialize: function( options ) {\n this.model = new Model( options );\n this.page = this.model.get( options.form_id );\n this.setElement( '' );\n this.render();\n },\n\n render: function() {\n var self = this;\n $.ajax({\n url : Galaxy.root + this.page.url,\n type : 'GET'\n }).done( function( response ) {\n var options = $.extend( {}, self.page, response );\n var form = new Form({\n title : options.title,\n icon : options.icon,\n inputs : options.inputs,\n operations: {\n 'submit': new Ui.ButtonIcon({\n tooltip : options.submit_tooltip,\n title : options.submit_title || 'Save settings',\n icon : options.submit_icon || 'fa-save',\n onclick : function() { self._submit( form, options ) }\n })\n }\n });\n self.$el.empty().append( form.$el );\n }).fail( function( response ) {\n self.$el.empty().append( new Ui.Message({\n message : 'Failed to load resource ' + self.page.url + '.',\n status : 'danger',\n persistent : true\n }).$el );\n });\n },\n\n _submit: function( form, options ) {\n var self = this;\n $.ajax( {\n url : Galaxy.root + options.url,\n data : JSON.stringify( form.data.create() ),\n type : 'PUT',\n contentType : 'application/json'\n }).done( function( response ) {\n form.data.matchModel( response, function ( input, input_id ) {\n form.field_list[ input_id ].value( input.value );\n });\n form.message.update( { message: response.message, status: 'success' } );\n }).fail( function( response ) {\n form.message.update( { message: response.responseJSON.err_msg, status: 'danger' } );\n });\n }\n });\n\n return {\n View : View,\n Forms : Forms\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/user/user-preferences.js","(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else {\n // Browser globals\n root.LoadingIndicator = factory();\n }\n\n//============================================================================\n}(this, function () {\n //TODO: too specific to history panel\n function LoadingIndicator( $where, options ){\n\n var self = this;\n // defaults\n options = jQuery.extend({\n cover : false\n }, options || {} );\n\n function render(){\n var html = [\n '