");n.appendTo("body");select_all(n[0]);try{document.execCommand("copy")}catch(e){}n.remove()}var get_textarea_selection=function(){var e=document.createElement("textarea");var t="selectionStart"in e;e=null;if(t){return function(e){var t=e.selectionEnd-e.selectionStart;return e.value.substr(e.selectionStart,t)}}else if(document.selection){return function(){var e=document.selection.createRange();return e.text()}}else{return function(){return""}}}();function clear_textarea_selection(e){e.selectionStart=e.selectionEnd=0}var select=function(){if(window.getSelection){var e=window.getSelection();if(e.setBaseAndExtent){return function(e,t){var n=window.getSelection();n.setBaseAndExtent(e,0,t,1)}}else{return function(e,t){var n=window.getSelection();var r=document.createRange();r.setStart(e,0);r.setEnd(t,t.childNodes.length);n.removeAllRanges();n.addRange(r)}}}else{return $.noop}}();function select_all(e){if(window.getSelection){var t=window.getSelection();if(t.setBaseAndExtent){t.setBaseAndExtent(e,0,e,1)}else if(document.createRange){var n=document.createRange();n.selectNodeContents(e);t.removeAllRanges();t.addRange(n)}}}function process_command(e,t){var n=e.match(command_re)||[];if(n.length){var r=n.shift();var i=$.map(n,function(e){if(e.match(/^["']/)){e=e.replace(/\n/g,"\\u0000\\u0000\\u0000\\u0000");e=t(e);return e.replace(/\x00\x00\x00\x00/g,"\n")}return t(e)});var o=$.map(n,function(e){var t=e.match(/^(['"]).*\1$/);return t&&t[1]||""});var a=e.substring(r.length).trim();return{command:e,name:r,args:i,args_quotes:o,rest:a}}else{return{command:e,name:"",args:[],args_quotes:o,rest:""}}}$.terminal={version:"DEV",date:"Sat, 12 May 2018 08:39:19 +0000",color_names:["transparent","currentcolor","black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],Cycle:Cycle,History:History,Stack:Stack,valid_color:function e(t){if(t.match(color_hex_re)){return true}else{return $.inArray(t.toLowerCase(),$.terminal.color_names)!==-1}},unclosed_strings:function e(t){return!!t.match(unclosed_strings_re)},escape_regex:function e(t){if(typeof t==="string"){var n=/([-\\^$[\]()+{}?*.|])/g;return t.replace(n,"\\$1")}},have_formatting:function e(t){return typeof t==="string"&&!!t.match(format_exist_re)},is_formatting:function e(t){return typeof t==="string"&&!!t.match(format_full_re)},format_split:function e(t){return t.split(format_split_re).filter(Boolean)},iterate_formatting:function e(t,n){function r(e){return t.substring(e-6,e)===" "||t.substring(e-1,e).match(/\s/)}function i(e){return t.substring(e).match(/^(&[^;]+;)/)}var o=false;var a=false;var s=0;var l;var f=-1;var c;var u=0;for(var p=0;p
=4){var i=t.split(/;/);var o=i.slice(0,4).join(";");var a=i.slice(4).join(";");return"[["+o+";"+(a||n)+"]"+n+"]"}else if(r===2){r=";;"}else if(r===3){r=";"}else{r=""}var s=n.replace(/\\\]/g,"]").replace(/\n/g,"\\n").replace(/ /g," ");return"[["+t+r+s+"]"+n+"]"})},split_equal:function e(t,n,r){var i="";var o=[];var a=$.terminal.normalize(t).split(/\n/g);for(var s=0,l=a.length;s=n||t||e.length===n-1&&strlen(f[e.index+1])===2){var a=false;if(r&&e.space!==-1){var s=$.terminal.strip(f.substring(e.space));s=$(""+s+"").text();var l=s.length;var m=e.index+n+1;s=s.substring(0,m);if(s.match(/\s| /)||m>l){a=true}}if(r&&e.space!==-1&&e.index!==p-1&&a){u=f.substring(c,e.space);var d=e.space-1}else{u=f.substring(c,e.index+1)}if(r){u=u.replace(/^( |\s)+|( |\s)+$/g,"")}c=(d||e.index)+1;if(i){var h=u.match(/^[^\]]*\]/);u=i+u;if(h){i=""}}var g=u.match(format_re);if(g){var v=g[g.length-1];if(v[v.length-1]!=="]"){i=v.match(format_begin_re)[1];u+="]"}else if(u.match(format_end_re)){u=u.replace(format_end_re,"");i=v.match(format_begin_re)[1]}}o.push(u);return{index:d,length:0,space:-1}}})}return o},amp:function(e){return e.replace(/&(?!#[0-9]+;|[a-zA-Z]+;)/g,"&")},encode:function e(t){return $.terminal.amp(t).replace(//g,">").replace(/ /g," ").replace(/\t/g," ")},nested_formatting:function e(t){if(!$.terminal.have_formatting(t)){return t}var n=[];var r=/((?:\[\[(?:[^\]]|\\\])+\])?(?:[^\][]|\\\])*\]?)/;var i=/(\[\[(?:[^\]]|\\\])+\])[\s\S]*/;return t.split(r).filter(Boolean).map(function(e){if(e.match(/^\[\[/)){if(!$.terminal.is_formatting(e)){e+="]";n.push(e.replace(i,"$1"))}}else{var t=false;if(e.match(/\]/)){t=true}if(n.length){e=n[n.length-1]+e}if(t){n.pop()}else if(n.length){e+="]"}}return e}).join("")},escape_formatting:function e(t){return $.terminal.escape_brackets(t)},apply_formatters:function(e,t){var n=$.terminal.defaults.formatters;var r=0;try{return n.reduce(function(e,n){r++;if(typeof n==="function"&&n.__meta__){var i=n(e,t);if(typeof i==="string"){return i}}else{return $.terminal.format_split(e).map(function(e){if($.terminal.is_formatting(e)){return e}else{if(n instanceof Array){return e.replace(n[0],n[1])}else if(typeof n==="function"){var r=n(e,t);if(typeof r==="string"){return r}}return e}}).join("")}return e},e)}catch(e){throw new Error("Error in formatter ["+(r-1)+"]")}},format:function e(t,n){function r(e){if(e.match(/\\]/)){e=e.replace(/(\\+)]/g,function(e,t){if(t.length%2===1){return"]"}else{return t.replace(/../,"\\")}})}return safe(e)}var i=$.extend({},{linksNoReferrer:false},n||{});if(typeof t==="string"){var o=$.terminal.format_split(t);t=$.map(o,function(e){if(e===""){return e}else if($.terminal.is_formatting(e)){e=e.replace(/\[\[[^\]]+\]/,function(e){return e.replace(/ /g," ")});return e.replace(format_parts_re,function(e,t,o,a,s,l,f){if(f===""){return""}f=r(f);var c="";if(t.indexOf("b")!==-1){c+="font-weight:bold;"}var u=[];if(t.indexOf("u")!==-1){u.push("underline")}if(t.indexOf("s")!==-1){u.push("line-through")}if(t.indexOf("o")!==-1){u.push("overline")}if(u.length){c+="text-decoration:"+u.join(" ")+";"}if(t.indexOf("i")!==-1){c+="font-style:italic;"}if($.terminal.valid_color(o)){c+="color:"+o+";";if(t.indexOf("g")!==-1){c+="text-shadow:0 0 5px "+o+";"}}if($.terminal.valid_color(a)){c+="background-color:"+a}var p;if(l===""){p=f}else{p=l.replace(/]/g,"]").replace(/>/g,">").replace(/"+f+""}else{d+=' data-text="'+p.replace(/"/g,""e;")+'">'+f+""}return d})}else{e=r(e);var t=extra_css(e,n);if(t.length){e=wide_characters(e,n);return''+e+""}else{return""+e+""}}}).join("");return t.replace(/
<\/span>/gi,"
")}else{return""}},escape_brackets:function e(t){return t.replace(/\[/g,"[").replace(/\]/g,"]")},length:function(e){return text(e).length},columns:function(e,t,n){var r=e.map(function(e){return e.length});var i=Math.max.apply(null,r)+n;if(typeof n==="undefined"){n=4}var o=Math.floor(t/i);var a=[];var s;function l(t){var n=new Array(i-e[t].length).join(" ");s.push(e[t]+(t%o===0?"":n))}if(o<2){return e.join("\n")}for(var f=0;f
').appendTo("body");t.addClass(e.attr("class"));if(e){var n=e.attr("style");if(n){n=n.split(/\s*;\s*/).filter(function(e){return!e.match(/display\s*:\s*none/i)}).join(";");t.attr("style",n)}}var r=t.find("span")[0].getBoundingClientRect();var i={width:r.width,height:r.height};t.remove();return i}function get_num_chars(e,t){var n=e.find(".terminal-fill").width();var r=Math.floor(n/t.width);return r||1e3}function get_num_rows(e,t){return Math.floor(e.find(".terminal-fill").height()/t.height)}function all(e,t){var n=e.filter(function(e){return e[t]()===e});return n.length===e.length}function string_case(e){var t=e.split("");if(all(t,"toLowerCase")){return"lower"}else if(all(t,"toUpperCase")){return"upper"}else{return"mixed"}}function same_case(e){return string_case(e)!=="mixed"}var version_set=!$.terminal.version.match(/^\{\{/);var copyright="Copyright (c) 2011-2018 Jakub Jankiewicz